aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
authorSage Weil <sage@inktank.com>2013-08-15 14:11:45 -0400
committerSage Weil <sage@inktank.com>2013-08-15 14:11:45 -0400
commitee3e542fec6e69bc9fb668698889a37d93950ddf (patch)
treee74ee766a4764769ef1d3d45d266b4dea64101d3 /arch/arm
parentfe2a801b50c0bb8039d627e5ae1fec249d10ff39 (diff)
parentf1d6e17f540af37bb1891480143669ba7636c4cf (diff)
Merge remote-tracking branch 'linus/master' into testing
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/Kconfig146
-rw-r--r--arch/arm/Kconfig-nommu14
-rw-r--r--arch/arm/Kconfig.debug176
-rw-r--r--arch/arm/Makefile79
-rw-r--r--arch/arm/boot/compressed/.gitignore1
-rw-r--r--arch/arm/boot/compressed/Makefile5
-rw-r--r--arch/arm/boot/compressed/atags_to_fdt.c44
-rw-r--r--arch/arm/boot/compressed/decompress.c4
-rw-r--r--arch/arm/boot/compressed/head-shmobile.S21
-rw-r--r--arch/arm/boot/compressed/head.S40
-rw-r--r--arch/arm/boot/compressed/piggy.lz4.S6
-rw-r--r--arch/arm/boot/dts/Makefile43
-rw-r--r--arch/arm/boot/dts/aks-cdu.dts12
-rw-r--r--arch/arm/boot/dts/am335x-bone.dts120
-rw-r--r--arch/arm/boot/dts/am335x-evm.dts280
-rw-r--r--arch/arm/boot/dts/am335x-evmsk.dts194
-rw-r--r--arch/arm/boot/dts/am33xx.dtsi143
-rw-r--r--arch/arm/boot/dts/am3517-evm.dts2
-rw-r--r--arch/arm/boot/dts/am3517_mt_ventoux.dts2
-rw-r--r--arch/arm/boot/dts/am4372.dtsi68
-rw-r--r--arch/arm/boot/dts/am43x-epos-evm.dts18
-rw-r--r--arch/arm/boot/dts/animeo_ip.dts18
-rw-r--r--arch/arm/boot/dts/armada-370-db.dts1
-rw-r--r--arch/arm/boot/dts/armada-370-mirabox.dts1
-rw-r--r--arch/arm/boot/dts/armada-370-rd.dts17
-rw-r--r--arch/arm/boot/dts/armada-370-xp.dtsi23
-rw-r--r--arch/arm/boot/dts/armada-370.dtsi4
-rw-r--r--arch/arm/boot/dts/armada-xp-db.dts34
-rw-r--r--arch/arm/boot/dts/armada-xp-gp.dts10
-rw-r--r--arch/arm/boot/dts/armada-xp-mv78260.dtsi2
-rw-r--r--arch/arm/boot/dts/armada-xp-mv78460.dtsi5
-rw-r--r--arch/arm/boot/dts/armada-xp-openblocks-ax3-4.dts9
-rw-r--r--arch/arm/boot/dts/armada-xp.dtsi8
-rw-r--r--arch/arm/boot/dts/at91-ariag25.dts27
-rw-r--r--arch/arm/boot/dts/at91-foxg20.dts157
-rw-r--r--arch/arm/boot/dts/at91rm9200.dtsi309
-rw-r--r--arch/arm/boot/dts/at91rm9200ek.dts20
-rw-r--r--arch/arm/boot/dts/at91sam9260.dtsi309
-rw-r--r--arch/arm/boot/dts/at91sam9263.dtsi249
-rw-r--r--arch/arm/boot/dts/at91sam9263ek.dts28
-rw-r--r--arch/arm/boot/dts/at91sam9g15.dtsi2
-rw-r--r--arch/arm/boot/dts/at91sam9g15ek.dts4
-rw-r--r--arch/arm/boot/dts/at91sam9g20.dtsi2
-rw-r--r--arch/arm/boot/dts/at91sam9g20ek.dts6
-rw-r--r--arch/arm/boot/dts/at91sam9g20ek_2mmc.dts10
-rw-r--r--arch/arm/boot/dts/at91sam9g20ek_common.dtsi32
-rw-r--r--arch/arm/boot/dts/at91sam9g25.dtsi2
-rw-r--r--arch/arm/boot/dts/at91sam9g25ek.dts4
-rw-r--r--arch/arm/boot/dts/at91sam9g35.dtsi2
-rw-r--r--arch/arm/boot/dts/at91sam9g35ek.dts4
-rw-r--r--arch/arm/boot/dts/at91sam9g45.dtsi364
-rw-r--r--arch/arm/boot/dts/at91sam9m10g45ek.dts47
-rw-r--r--arch/arm/boot/dts/at91sam9n12.dtsi248
-rw-r--r--arch/arm/boot/dts/at91sam9n12ek.dts18
-rw-r--r--arch/arm/boot/dts/at91sam9x25.dtsi22
-rw-r--r--arch/arm/boot/dts/at91sam9x25ek.dts4
-rw-r--r--arch/arm/boot/dts/at91sam9x35.dtsi2
-rw-r--r--arch/arm/boot/dts/at91sam9x35ek.dts4
-rw-r--r--arch/arm/boot/dts/at91sam9x5.dtsi474
-rw-r--r--arch/arm/boot/dts/at91sam9x5cm.dtsi8
-rw-r--r--arch/arm/boot/dts/at91sam9x5ek.dtsi23
-rw-r--r--arch/arm/boot/dts/atlas6.dtsi24
-rw-r--r--arch/arm/boot/dts/bcm11351-brt.dts19
-rw-r--r--arch/arm/boot/dts/bcm11351.dtsi47
-rw-r--r--arch/arm/boot/dts/bcm2835-rpi-b.dts11
-rw-r--r--arch/arm/boot/dts/ccu8540.dts41
-rw-r--r--arch/arm/boot/dts/ccu9540.dts6
-rw-r--r--arch/arm/boot/dts/cros5250-common.dtsi4
-rw-r--r--arch/arm/boot/dts/da850-enbw-cmc.dts2
-rw-r--r--arch/arm/boot/dts/da850-evm.dts2
-rw-r--r--arch/arm/boot/dts/da850.dtsi4
-rw-r--r--arch/arm/boot/dts/dbx5x0.dtsi231
-rw-r--r--arch/arm/boot/dts/dove-cubox.dts51
-rw-r--r--arch/arm/boot/dts/ecx-common.dtsi2
-rw-r--r--arch/arm/boot/dts/ethernut5.dts6
-rw-r--r--arch/arm/boot/dts/evk-pro3.dts6
-rw-r--r--arch/arm/boot/dts/exynos4.dtsi4
-rw-r--r--arch/arm/boot/dts/exynos4210-origen.dts171
-rw-r--r--arch/arm/boot/dts/exynos4210-pinctrl.dtsi89
-rw-r--r--arch/arm/boot/dts/exynos4210-smdkv310.dts2
-rw-r--r--arch/arm/boot/dts/exynos4210-trats.dts2
-rw-r--r--arch/arm/boot/dts/exynos4210-universal_c210.dts2
-rw-r--r--arch/arm/boot/dts/exynos4210.dtsi9
-rw-r--r--arch/arm/boot/dts/exynos4212.dtsi2
-rw-r--r--arch/arm/boot/dts/exynos4412-odroidx.dts199
-rw-r--r--arch/arm/boot/dts/exynos4412-origen.dts68
-rw-r--r--arch/arm/boot/dts/exynos4412-smdk4412.dts87
-rw-r--r--arch/arm/boot/dts/exynos4412.dtsi2
-rw-r--r--arch/arm/boot/dts/exynos4x12-pinctrl.dtsi56
-rw-r--r--arch/arm/boot/dts/exynos4x12.dtsi14
-rw-r--r--arch/arm/boot/dts/exynos5.dtsi111
-rw-r--r--arch/arm/boot/dts/exynos5250-arndale.dts33
-rw-r--r--arch/arm/boot/dts/exynos5250-pinctrl.dtsi7
-rw-r--r--arch/arm/boot/dts/exynos5250-smdk5250.dts46
-rw-r--r--arch/arm/boot/dts/exynos5250-snow.dts8
-rw-r--r--arch/arm/boot/dts/exynos5250.dtsi130
-rw-r--r--arch/arm/boot/dts/exynos5420-pinctrl.dtsi680
-rw-r--r--arch/arm/boot/dts/exynos5420-smdk5420.dts33
-rw-r--r--arch/arm/boot/dts/exynos5420.dtsi148
-rw-r--r--arch/arm/boot/dts/exynos5440-sd5v1.dts4
-rw-r--r--arch/arm/boot/dts/exynos5440-ssdk5440.dts51
-rw-r--r--arch/arm/boot/dts/exynos5440.dtsi112
-rw-r--r--arch/arm/boot/dts/ge863-pro3.dtsi2
-rw-r--r--arch/arm/boot/dts/href.dtsi61
-rw-r--r--arch/arm/boot/dts/hrefprev60.dts10
-rw-r--r--arch/arm/boot/dts/hrefv60plus.dts20
-rw-r--r--arch/arm/boot/dts/imx23.dtsi8
-rw-r--r--arch/arm/boot/dts/imx27-phytec-phycore-rdk.dts37
-rw-r--r--arch/arm/boot/dts/imx27-phytec-phycore-som.dts179
-rw-r--r--arch/arm/boot/dts/imx27-phytec-phycore.dts79
-rw-r--r--arch/arm/boot/dts/imx27.dtsi80
-rw-r--r--arch/arm/boot/dts/imx28-apf28dev.dts1
-rw-r--r--arch/arm/boot/dts/imx28-apx4devkit.dts2
-rw-r--r--arch/arm/boot/dts/imx28-cfa10036.dts38
-rw-r--r--arch/arm/boot/dts/imx28-cfa10049.dts8
-rw-r--r--arch/arm/boot/dts/imx28-cfa10055.dts179
-rw-r--r--arch/arm/boot/dts/imx28-cfa10057.dts191
-rw-r--r--arch/arm/boot/dts/imx28-evk.dts14
-rw-r--r--arch/arm/boot/dts/imx28-m28evk.dts16
-rw-r--r--arch/arm/boot/dts/imx28.dtsi46
-rw-r--r--arch/arm/boot/dts/imx51-apf51.dts7
-rw-r--r--arch/arm/boot/dts/imx51-babbage.dts13
-rw-r--r--arch/arm/boot/dts/imx51.dtsi23
-rw-r--r--arch/arm/boot/dts/imx53-m53evk.dts259
-rw-r--r--arch/arm/boot/dts/imx53-mba53.dts175
-rw-r--r--arch/arm/boot/dts/imx53-qsb.dts36
-rw-r--r--arch/arm/boot/dts/imx53-tqma53.dtsi45
-rw-r--r--arch/arm/boot/dts/imx53-tx53.dtsi122
-rw-r--r--arch/arm/boot/dts/imx53.dtsi329
-rw-r--r--arch/arm/boot/dts/imx6dl-sabreauto.dts8
-rw-r--r--arch/arm/boot/dts/imx6dl-sabresd.dts1
-rw-r--r--arch/arm/boot/dts/imx6dl.dtsi114
-rw-r--r--arch/arm/boot/dts/imx6q-phytec-pbab01.dts34
-rw-r--r--arch/arm/boot/dts/imx6q-phytec-pfla02.dtsi74
-rw-r--r--arch/arm/boot/dts/imx6q-sabreauto.dts8
-rw-r--r--arch/arm/boot/dts/imx6q-sabresd.dts1
-rw-r--r--arch/arm/boot/dts/imx6q.dtsi104
-rw-r--r--arch/arm/boot/dts/imx6qdl-sabreauto.dtsi41
-rw-r--r--arch/arm/boot/dts/imx6qdl-sabresd.dtsi66
-rw-r--r--arch/arm/boot/dts/imx6qdl.dtsi13
-rw-r--r--arch/arm/boot/dts/imx6sl-evk.dts74
-rw-r--r--arch/arm/boot/dts/imx6sl.dtsi779
-rw-r--r--arch/arm/boot/dts/integratorap.dts41
-rw-r--r--arch/arm/boot/dts/keystone.dts117
-rw-r--r--arch/arm/boot/dts/kirkwood-6281.dtsi59
-rw-r--r--arch/arm/boot/dts/kirkwood-6282.dtsi76
-rw-r--r--arch/arm/boot/dts/kirkwood-cloudbox.dts10
-rw-r--r--arch/arm/boot/dts/kirkwood-db-88f6281.dts30
-rw-r--r--arch/arm/boot/dts/kirkwood-db-88f6282.dts34
-rw-r--r--arch/arm/boot/dts/kirkwood-db.dtsi89
-rw-r--r--arch/arm/boot/dts/kirkwood-dns320.dts7
-rw-r--r--arch/arm/boot/dts/kirkwood-dns325.dts5
-rw-r--r--arch/arm/boot/dts/kirkwood-dnskw.dtsi32
-rw-r--r--arch/arm/boot/dts/kirkwood-dockstar.dts9
-rw-r--r--arch/arm/boot/dts/kirkwood-dreamplug.dts12
-rw-r--r--arch/arm/boot/dts/kirkwood-goflexnet.dts18
-rw-r--r--arch/arm/boot/dts/kirkwood-guruplug-server-plus.dts10
-rw-r--r--arch/arm/boot/dts/kirkwood-ib62x0.dts17
-rw-r--r--arch/arm/boot/dts/kirkwood-iconnect.dts44
-rw-r--r--arch/arm/boot/dts/kirkwood-iomega_ix2_200.dts15
-rw-r--r--arch/arm/boot/dts/kirkwood-is2.dts2
-rw-r--r--arch/arm/boot/dts/kirkwood-km_kirkwood.dts13
-rw-r--r--arch/arm/boot/dts/kirkwood-lsxl.dtsi26
-rw-r--r--arch/arm/boot/dts/kirkwood-mplcec4.dts33
-rw-r--r--arch/arm/boot/dts/kirkwood-netgear_readynas_duo_v2.dts30
-rw-r--r--arch/arm/boot/dts/kirkwood-ns2-common.dtsi10
-rw-r--r--arch/arm/boot/dts/kirkwood-ns2.dts2
-rw-r--r--arch/arm/boot/dts/kirkwood-ns2lite.dts2
-rw-r--r--arch/arm/boot/dts/kirkwood-ns2max.dts2
-rw-r--r--arch/arm/boot/dts/kirkwood-ns2mini.dts2
-rw-r--r--arch/arm/boot/dts/kirkwood-nsa310.dts38
-rw-r--r--arch/arm/boot/dts/kirkwood-openblocks_a6.dts108
-rw-r--r--arch/arm/boot/dts/kirkwood-sheevaplug-common.dtsi93
-rw-r--r--arch/arm/boot/dts/kirkwood-sheevaplug-esata.dts43
-rw-r--r--arch/arm/boot/dts/kirkwood-sheevaplug.dts43
-rw-r--r--arch/arm/boot/dts/kirkwood-topkick.dts52
-rw-r--r--arch/arm/boot/dts/kirkwood-ts219-6281.dts11
-rw-r--r--arch/arm/boot/dts/kirkwood-ts219-6282.dts19
-rw-r--r--arch/arm/boot/dts/kirkwood-ts219.dtsi24
-rw-r--r--arch/arm/boot/dts/kirkwood.dtsi42
-rw-r--r--arch/arm/boot/dts/kizbox.dts16
-rw-r--r--arch/arm/boot/dts/lpc32xx.dtsi8
-rw-r--r--arch/arm/boot/dts/mpa1600.dts4
-rw-r--r--arch/arm/boot/dts/msm8660-surf.dts15
-rw-r--r--arch/arm/boot/dts/msm8960-cdp.dts13
-rw-r--r--arch/arm/boot/dts/nspire-classic.dtsi74
-rw-r--r--arch/arm/boot/dts/nspire-clp.dts45
-rw-r--r--arch/arm/boot/dts/nspire-cx.dts112
-rw-r--r--arch/arm/boot/dts/nspire-tp.dts44
-rw-r--r--arch/arm/boot/dts/nspire.dtsi175
-rw-r--r--arch/arm/boot/dts/omap2.dtsi11
-rw-r--r--arch/arm/boot/dts/omap2420-h4.dts2
-rw-r--r--arch/arm/boot/dts/omap2420.dtsi2
-rw-r--r--arch/arm/boot/dts/omap2430.dtsi2
-rw-r--r--arch/arm/boot/dts/omap3-beagle-xm.dts48
-rw-r--r--arch/arm/boot/dts/omap3-beagle.dts72
-rw-r--r--arch/arm/boot/dts/omap3-devkit8000.dts40
-rw-r--r--arch/arm/boot/dts/omap3-evm.dts7
-rw-r--r--arch/arm/boot/dts/omap3-igep.dtsi43
-rw-r--r--arch/arm/boot/dts/omap3-igep0020.dts111
-rw-r--r--arch/arm/boot/dts/omap3-igep0030.dts60
-rw-r--r--arch/arm/boot/dts/omap3-overo.dtsi20
-rw-r--r--arch/arm/boot/dts/omap3-tobi.dts52
-rw-r--r--arch/arm/boot/dts/omap3.dtsi11
-rw-r--r--arch/arm/boot/dts/omap3430-sdp.dts6
-rw-r--r--arch/arm/boot/dts/omap34xx.dtsi2
-rw-r--r--arch/arm/boot/dts/omap36xx.dtsi2
-rw-r--r--arch/arm/boot/dts/omap4-panda-a4.dts10
-rw-r--r--arch/arm/boot/dts/omap4-panda-common.dtsi162
-rw-r--r--arch/arm/boot/dts/omap4-panda-es.dts38
-rw-r--r--arch/arm/boot/dts/omap4-panda.dts4
-rw-r--r--arch/arm/boot/dts/omap4-sdp-es23plus.dts8
-rw-r--r--arch/arm/boot/dts/omap4-sdp.dts126
-rw-r--r--arch/arm/boot/dts/omap4-var-som.dts8
-rw-r--r--arch/arm/boot/dts/omap4.dtsi131
-rw-r--r--arch/arm/boot/dts/omap443x.dtsi8
-rw-r--r--arch/arm/boot/dts/omap4460.dtsi15
-rw-r--r--arch/arm/boot/dts/omap5-evm.dts261
-rw-r--r--arch/arm/boot/dts/omap5-uevm.dts505
-rw-r--r--arch/arm/boot/dts/omap5.dtsi180
-rw-r--r--arch/arm/boot/dts/picoxcell-pc3x2.dtsi8
-rw-r--r--arch/arm/boot/dts/picoxcell-pc3x3.dtsi8
-rw-r--r--arch/arm/boot/dts/pm9g45.dts22
-rw-r--r--arch/arm/boot/dts/prima2.dtsi20
-rw-r--r--arch/arm/boot/dts/pxa2xx.dtsi7
-rw-r--r--arch/arm/boot/dts/r8a73a4.dtsi6
-rw-r--r--arch/arm/boot/dts/r8a7740-armadillo800eva-reference.dts45
-rw-r--r--arch/arm/boot/dts/r8a7740.dtsi121
-rw-r--r--arch/arm/boot/dts/r8a7779.dtsi17
-rw-r--r--arch/arm/boot/dts/r8a7790.dtsi6
-rw-r--r--arch/arm/boot/dts/rk3066a-clocks.dtsi299
-rw-r--r--arch/arm/boot/dts/rk3066a.dtsi390
-rw-r--r--arch/arm/boot/dts/s3c2416-pinctrl.dtsi173
-rw-r--r--arch/arm/boot/dts/s3c2416-smdk2416.dts72
-rw-r--r--arch/arm/boot/dts/s3c2416.dtsi79
-rw-r--r--arch/arm/boot/dts/s3c24xx.dtsi92
-rw-r--r--arch/arm/boot/dts/sama5d3.dtsi553
-rw-r--r--arch/arm/boot/dts/sama5d31ek.dts6
-rw-r--r--arch/arm/boot/dts/sama5d33ek.dts4
-rw-r--r--arch/arm/boot/dts/sama5d34ek.dts6
-rw-r--r--arch/arm/boot/dts/sama5d35ek.dts4
-rw-r--r--arch/arm/boot/dts/sama5d3xcm.dtsi4
-rw-r--r--arch/arm/boot/dts/sama5d3xdm.dtsi2
-rw-r--r--arch/arm/boot/dts/sama5d3xmb.dtsi26
-rw-r--r--arch/arm/boot/dts/sh7372.dtsi5
-rw-r--r--arch/arm/boot/dts/sh73a0-kzm9g-reference.dts86
-rw-r--r--arch/arm/boot/dts/sh73a0.dtsi18
-rw-r--r--arch/arm/boot/dts/snowball.dts93
-rw-r--r--arch/arm/boot/dts/socfpga.dtsi217
-rw-r--r--arch/arm/boot/dts/socfpga_cyclone5.dts13
-rw-r--r--arch/arm/boot/dts/socfpga_vt.dts5
-rw-r--r--arch/arm/boot/dts/spear13xx.dtsi2
-rw-r--r--arch/arm/boot/dts/spear3xx.dtsi8
-rw-r--r--arch/arm/boot/dts/spear600.dtsi8
-rw-r--r--arch/arm/boot/dts/st-pincfg.h71
-rw-r--r--arch/arm/boot/dts/ste-nomadik-s8815.dts69
-rw-r--r--arch/arm/boot/dts/ste-nomadik-stn8815.dtsi574
-rw-r--r--arch/arm/boot/dts/ste-u300.dts473
-rw-r--r--arch/arm/boot/dts/stih415-b2000.dts15
-rw-r--r--arch/arm/boot/dts/stih415-b2020.dts15
-rw-r--r--arch/arm/boot/dts/stih415-clock.dtsi38
-rw-r--r--arch/arm/boot/dts/stih415-pinctrl.dtsi268
-rw-r--r--arch/arm/boot/dts/stih415.dtsi87
-rw-r--r--arch/arm/boot/dts/stih416-b2000.dts16
-rw-r--r--arch/arm/boot/dts/stih416-b2020.dts16
-rw-r--r--arch/arm/boot/dts/stih416-clock.dtsi41
-rw-r--r--arch/arm/boot/dts/stih416-pinctrl.dtsi303
-rw-r--r--arch/arm/boot/dts/stih416.dtsi96
-rw-r--r--arch/arm/boot/dts/stih41x-b2000.dtsi41
-rw-r--r--arch/arm/boot/dts/stih41x-b2020.dtsi42
-rw-r--r--arch/arm/boot/dts/stih41x.dtsi40
-rw-r--r--arch/arm/boot/dts/stuib.dtsi26
-rw-r--r--arch/arm/boot/dts/sun4i-a10-cubieboard.dts27
-rw-r--r--arch/arm/boot/dts/sun4i-a10-hackberry.dts41
-rw-r--r--arch/arm/boot/dts/sun4i-a10.dtsi81
-rw-r--r--arch/arm/boot/dts/sun5i-a10s-olinuxino-micro.dts76
-rw-r--r--arch/arm/boot/dts/sun5i-a10s.dtsi286
-rw-r--r--arch/arm/boot/dts/sun5i-a13-olinuxino.dts18
-rw-r--r--arch/arm/boot/dts/sun5i-a13.dtsi89
-rw-r--r--arch/arm/boot/dts/tegra114-dalmore.dts71
-rw-r--r--arch/arm/boot/dts/tegra114-pluto.dts2
-rw-r--r--arch/arm/boot/dts/tegra114.dtsi277
-rw-r--r--arch/arm/boot/dts/tegra20-colibri-512.dtsi30
-rw-r--r--arch/arm/boot/dts/tegra20-harmony.dts67
-rw-r--r--arch/arm/boot/dts/tegra20-iris-512.dts13
-rw-r--r--arch/arm/boot/dts/tegra20-medcom-wide.dts12
-rw-r--r--arch/arm/boot/dts/tegra20-paz00.dts48
-rw-r--r--arch/arm/boot/dts/tegra20-plutux.dts12
-rw-r--r--arch/arm/boot/dts/tegra20-seaboard.dts70
-rw-r--r--arch/arm/boot/dts/tegra20-tamonten.dtsi15
-rw-r--r--arch/arm/boot/dts/tegra20-tec.dts13
-rw-r--r--arch/arm/boot/dts/tegra20-trimslice.dts47
-rw-r--r--arch/arm/boot/dts/tegra20-ventana.dts60
-rw-r--r--arch/arm/boot/dts/tegra20-whistler.dts49
-rw-r--r--arch/arm/boot/dts/tegra20.dtsi285
-rw-r--r--arch/arm/boot/dts/tegra30-beaver.dts68
-rw-r--r--arch/arm/boot/dts/tegra30-cardhu-a02.dts16
-rw-r--r--arch/arm/boot/dts/tegra30-cardhu-a04.dts18
-rw-r--r--arch/arm/boot/dts/tegra30-cardhu.dtsi47
-rw-r--r--arch/arm/boot/dts/tegra30.dtsi288
-rw-r--r--arch/arm/boot/dts/tny_a9260.dts4
-rw-r--r--arch/arm/boot/dts/tny_a9263.dts4
-rw-r--r--arch/arm/boot/dts/tny_a9g20.dts4
-rw-r--r--arch/arm/boot/dts/twl4030.dtsi6
-rw-r--r--arch/arm/boot/dts/twl4030_omap3.dtsi25
-rw-r--r--arch/arm/boot/dts/usb_a9260.dts13
-rw-r--r--arch/arm/boot/dts/usb_a9260_common.dtsi6
-rw-r--r--arch/arm/boot/dts/usb_a9263.dts22
-rw-r--r--arch/arm/boot/dts/usb_a9g20-dab-mmx.dtsi22
-rw-r--r--arch/arm/boot/dts/usb_a9g20.dts18
-rw-r--r--arch/arm/boot/dts/usb_a9g20_common.dtsi27
-rw-r--r--arch/arm/boot/dts/usb_a9g20_lpw.dts31
-rw-r--r--arch/arm/boot/dts/vf610-pinfunc.h810
-rw-r--r--arch/arm/boot/dts/vf610-twr.dts57
-rw-r--r--arch/arm/boot/dts/vf610.dtsi464
-rw-r--r--arch/arm/boot/dts/vt8500-bv07.dts4
-rw-r--r--arch/arm/boot/dts/vt8500.dtsi29
-rw-r--r--arch/arm/boot/dts/wm8505-ref.dts4
-rw-r--r--arch/arm/boot/dts/wm8505.dtsi84
-rw-r--r--arch/arm/boot/dts/wm8650-mid.dts3
-rw-r--r--arch/arm/boot/dts/wm8650.dtsi79
-rw-r--r--arch/arm/boot/dts/wm8750-apc8750.dts30
-rw-r--r--arch/arm/boot/dts/wm8750.dtsi347
-rw-r--r--arch/arm/boot/dts/wm8850-w70v2.dts4
-rw-r--r--arch/arm/boot/dts/wm8850.dtsi94
-rw-r--r--arch/arm/boot/dts/zynq-7000.dtsi73
-rw-r--r--arch/arm/boot/dts/zynq-zc702.dts6
-rw-r--r--arch/arm/boot/dts/zynq-zc706.dts35
-rw-r--r--arch/arm/boot/dts/zynq-zed.dts35
-rw-r--r--arch/arm/common/Kconfig3
-rw-r--r--arch/arm/common/Makefile1
-rw-r--r--arch/arm/common/edma.c (renamed from arch/arm/mach-davinci/dma.c)367
-rw-r--r--arch/arm/common/mcpm_head.S4
-rw-r--r--arch/arm/common/mcpm_platsmp.c9
-rw-r--r--arch/arm/common/timer-sp.c2
-rw-r--r--arch/arm/configs/ap4evb_defconfig56
-rw-r--r--arch/arm/configs/armadillo800eva_defconfig2
-rw-r--r--arch/arm/configs/at91_dt_defconfig57
-rw-r--r--arch/arm/configs/at91rm9200_defconfig219
-rw-r--r--arch/arm/configs/at91sam9260_9g20_defconfig (renamed from arch/arm/configs/at91sam9g20_defconfig)66
-rw-r--r--arch/arm/configs/at91sam9260_defconfig91
-rw-r--r--arch/arm/configs/at91sam9261_9g10_defconfig (renamed from arch/arm/configs/at91sam9261_defconfig)19
-rw-r--r--arch/arm/configs/at91sam9263_defconfig40
-rw-r--r--arch/arm/configs/at91sam9g45_defconfig94
-rw-r--r--arch/arm/configs/bcm2835_defconfig19
-rw-r--r--arch/arm/configs/bcm_defconfig7
-rw-r--r--arch/arm/configs/bockw_defconfig27
-rw-r--r--arch/arm/configs/bonito_defconfig72
-rw-r--r--arch/arm/configs/clps711x_defconfig8
-rw-r--r--arch/arm/configs/da8xx_omapl_defconfig2
-rw-r--r--arch/arm/configs/davinci_all_defconfig2
-rw-r--r--arch/arm/configs/exynos_defconfig3
-rw-r--r--arch/arm/configs/imx_v6_v7_defconfig10
-rw-r--r--arch/arm/configs/keystone_defconfig157
-rw-r--r--arch/arm/configs/kirkwood_defconfig10
-rw-r--r--arch/arm/configs/kzm9g_defconfig3
-rw-r--r--arch/arm/configs/multi_v7_defconfig140
-rw-r--r--arch/arm/configs/mvebu_defconfig6
-rw-r--r--arch/arm/configs/nhk8815_defconfig13
-rw-r--r--arch/arm/configs/omap1_defconfig3
-rw-r--r--arch/arm/configs/omap2plus_defconfig22
-rw-r--r--arch/arm/configs/sama5_defconfig35
-rw-r--r--arch/arm/configs/spear13xx_defconfig1
-rw-r--r--arch/arm/configs/tegra_defconfig23
-rw-r--r--arch/arm/configs/u300_defconfig14
-rw-r--r--arch/arm/configs/u8500_defconfig44
-rw-r--r--arch/arm/include/asm/a.out-core.h45
-rw-r--r--arch/arm/include/asm/arch_timer.h11
-rw-r--r--arch/arm/include/asm/assembler.h17
-rw-r--r--arch/arm/include/asm/cp15.h19
-rw-r--r--arch/arm/include/asm/cputype.h52
-rw-r--r--arch/arm/include/asm/div64.h2
-rw-r--r--arch/arm/include/asm/elf.h6
-rw-r--r--arch/arm/include/asm/glue-cache.h27
-rw-r--r--arch/arm/include/asm/glue-df.h8
-rw-r--r--arch/arm/include/asm/glue-proc.h9
-rw-r--r--arch/arm/include/asm/hardware/iop3xx.h3
-rw-r--r--arch/arm/include/asm/hardware/pci_v3.h186
-rw-r--r--arch/arm/include/asm/hugetlb-3level.h71
-rw-r--r--arch/arm/include/asm/hugetlb.h84
-rw-r--r--arch/arm/include/asm/io.h8
-rw-r--r--arch/arm/include/asm/irqflags.h22
-rw-r--r--arch/arm/include/asm/kvm_arch_timer.h85
-rw-r--r--arch/arm/include/asm/kvm_arm.h1
-rw-r--r--arch/arm/include/asm/kvm_asm.h24
-rw-r--r--arch/arm/include/asm/kvm_emulate.h5
-rw-r--r--arch/arm/include/asm/kvm_host.h13
-rw-r--r--arch/arm/include/asm/kvm_vgic.h220
-rw-r--r--arch/arm/include/asm/mach/arch.h10
-rw-r--r--arch/arm/include/asm/mach/pci.h17
-rw-r--r--arch/arm/include/asm/memory.h24
-rw-r--r--arch/arm/include/asm/mmu.h3
-rw-r--r--arch/arm/include/asm/mmu_context.h43
-rw-r--r--arch/arm/include/asm/mpu.h76
-rw-r--r--arch/arm/include/asm/page.h4
-rw-r--r--arch/arm/include/asm/pgtable-3level-hwdef.h24
-rw-r--r--arch/arm/include/asm/pgtable-3level.h96
-rw-r--r--arch/arm/include/asm/pgtable-nommu.h2
-rw-r--r--arch/arm/include/asm/pgtable.h10
-rw-r--r--arch/arm/include/asm/proc-fns.h30
-rw-r--r--arch/arm/include/asm/processor.h4
-rw-r--r--arch/arm/include/asm/psci.h9
-rw-r--r--arch/arm/include/asm/ptrace.h4
-rw-r--r--arch/arm/include/asm/sched_clock.h18
-rw-r--r--arch/arm/include/asm/smp.h5
-rw-r--r--arch/arm/include/asm/smp_plat.h22
-rw-r--r--arch/arm/include/asm/smp_scu.h13
-rw-r--r--arch/arm/include/asm/spinlock.h25
-rw-r--r--arch/arm/include/asm/suspend.h5
-rw-r--r--arch/arm/include/asm/system_info.h1
-rw-r--r--arch/arm/include/asm/system_misc.h3
-rw-r--r--arch/arm/include/asm/thread_info.h3
-rw-r--r--arch/arm/include/asm/tlb.h6
-rw-r--r--arch/arm/include/asm/tlbflush.h43
-rw-r--r--arch/arm/include/asm/tls.h40
-rw-r--r--arch/arm/include/asm/v7m.h44
-rw-r--r--arch/arm/include/asm/virt.h12
-rw-r--r--arch/arm/include/asm/xen/hypercall.h1
-rw-r--r--arch/arm/include/asm/xen/page.h3
-rw-r--r--arch/arm/include/debug/imx-uart.h10
-rw-r--r--arch/arm/include/debug/keystone.S43
-rw-r--r--arch/arm/include/debug/mvebu.S5
-rw-r--r--arch/arm/include/debug/nspire.S28
-rw-r--r--arch/arm/include/debug/rockchip.S42
-rw-r--r--arch/arm/include/debug/sti.S61
-rw-r--r--arch/arm/include/debug/u300.S (renamed from arch/arm/mach-u300/include/mach/debug-macro.S)9
-rw-r--r--arch/arm/include/debug/vexpress.S10
-rw-r--r--arch/arm/include/uapi/asm/Kbuild1
-rw-r--r--arch/arm/include/uapi/asm/a.out.h34
-rw-r--r--arch/arm/include/uapi/asm/hwcap.h2
-rw-r--r--arch/arm/include/uapi/asm/ptrace.h35
-rw-r--r--arch/arm/kernel/Makefile20
-rw-r--r--arch/arm/kernel/arch_timer.c2
-rw-r--r--arch/arm/kernel/asm-offsets.c6
-rw-r--r--arch/arm/kernel/bios32.c9
-rw-r--r--arch/arm/kernel/entry-armv.S108
-rw-r--r--arch/arm/kernel/entry-common.S46
-rw-r--r--arch/arm/kernel/entry-header.S124
-rw-r--r--arch/arm/kernel/entry-v7m.S143
-rw-r--r--arch/arm/kernel/fiq.c19
-rw-r--r--arch/arm/kernel/head-common.S4
-rw-r--r--arch/arm/kernel/head-nommu.S170
-rw-r--r--arch/arm/kernel/head.S12
-rw-r--r--arch/arm/kernel/hw_breakpoint.c4
-rw-r--r--arch/arm/kernel/hyp-stub.S11
-rw-r--r--arch/arm/kernel/module.c8
-rw-r--r--arch/arm/kernel/perf_event.c8
-rw-r--r--arch/arm/kernel/perf_event_cpu.c6
-rw-r--r--arch/arm/kernel/process.c68
-rw-r--r--arch/arm/kernel/psci.c7
-rw-r--r--arch/arm/kernel/psci_smp.c83
-rw-r--r--arch/arm/kernel/ptrace.c10
-rw-r--r--arch/arm/kernel/sched_clock.c217
-rw-r--r--arch/arm/kernel/setup.c117
-rw-r--r--arch/arm/kernel/signal.c57
-rw-r--r--arch/arm/kernel/signal.h12
-rw-r--r--arch/arm/kernel/sleep.S97
-rw-r--r--arch/arm/kernel/smp.c39
-rw-r--r--arch/arm/kernel/smp_tlb.c35
-rw-r--r--arch/arm/kernel/smp_twd.c8
-rw-r--r--arch/arm/kernel/suspend.c76
-rw-r--r--arch/arm/kernel/time.c4
-rw-r--r--arch/arm/kernel/traps.c56
-rw-r--r--arch/arm/kernel/vmlinux.lds.S21
-rw-r--r--arch/arm/kvm/Kconfig8
-rw-r--r--arch/arm/kvm/Makefile7
-rw-r--r--arch/arm/kvm/arch_timer.c272
-rw-r--r--arch/arm/kvm/arm.c8
-rw-r--r--arch/arm/kvm/coproc.c4
-rw-r--r--arch/arm/kvm/handle_exit.c3
-rw-r--r--arch/arm/kvm/interrupts.S16
-rw-r--r--arch/arm/kvm/interrupts_head.S14
-rw-r--r--arch/arm/kvm/mmio.c6
-rw-r--r--arch/arm/kvm/mmu.c3
-rw-r--r--arch/arm/kvm/psci.c2
-rw-r--r--arch/arm/kvm/reset.c12
-rw-r--r--arch/arm/kvm/vgic.c1499
-rw-r--r--arch/arm/lib/delay.c2
-rw-r--r--arch/arm/mach-at91/Kconfig1
-rw-r--r--arch/arm/mach-at91/Kconfig.non_dt169
-rw-r--r--arch/arm/mach-at91/Makefile6
-rw-r--r--arch/arm/mach-at91/at91rm9200.c11
-rw-r--r--arch/arm/mach-at91/at91sam9260.c4
-rw-r--r--arch/arm/mach-at91/at91sam9261.c4
-rw-r--r--arch/arm/mach-at91/at91sam9263.c2
-rw-r--r--arch/arm/mach-at91/at91sam9g45.c4
-rw-r--r--arch/arm/mach-at91/at91sam9rl.c2
-rw-r--r--arch/arm/mach-at91/at91sam9x5.c2
-rw-r--r--arch/arm/mach-at91/at91x40.c7
-rw-r--r--arch/arm/mach-at91/board-dt-sama5.c3
-rw-r--r--arch/arm/mach-at91/board-rm9200dk.c228
-rw-r--r--arch/arm/mach-at91/board-sam9261ek.c28
-rw-r--r--arch/arm/mach-at91/board-usb-a926x.c384
-rw-r--r--arch/arm/mach-at91/clock.c30
-rw-r--r--arch/arm/mach-at91/cpuidle.c2
-rw-r--r--arch/arm/mach-at91/generic.h7
-rw-r--r--arch/arm/mach-at91/include/mach/at91_pmc.h3
-rw-r--r--arch/arm/mach-at91/irq.c9
-rw-r--r--arch/arm/mach-at91/pm.c2
-rw-r--r--arch/arm/mach-at91/setup.c4
-rw-r--r--arch/arm/mach-at91/soc.h1
-rw-r--r--arch/arm/mach-bcm/board_bcm.c2
-rw-r--r--arch/arm/mach-bcm2835/bcm2835.c4
-rw-r--r--arch/arm/mach-clps711x/Kconfig3
-rw-r--r--arch/arm/mach-clps711x/Makefile5
-rw-r--r--arch/arm/mach-clps711x/board-autcpu12.c133
-rw-r--r--arch/arm/mach-clps711x/board-cdb89712.c3
-rw-r--r--arch/arm/mach-clps711x/board-clep7312.c1
-rw-r--r--arch/arm/mach-clps711x/board-edb7211.c34
-rw-r--r--arch/arm/mach-clps711x/board-fortunet.c1
-rw-r--r--arch/arm/mach-clps711x/board-p720t.c254
-rw-r--r--arch/arm/mach-clps711x/common.c91
-rw-r--r--arch/arm/mach-clps711x/common.h5
-rw-r--r--arch/arm/mach-clps711x/devices.c68
-rw-r--r--arch/arm/mach-clps711x/devices.h12
-rw-r--r--arch/arm/mach-clps711x/include/mach/autcpu12.h59
-rw-r--r--arch/arm/mach-clps711x/include/mach/clps711x.h88
-rw-r--r--arch/arm/mach-clps711x/include/mach/hardware.h7
-rw-r--r--arch/arm/mach-clps711x/include/mach/memory.h41
-rw-r--r--arch/arm/mach-clps711x/include/mach/syspld.h116
-rw-r--r--arch/arm/mach-cns3xxx/core.h4
-rw-r--r--arch/arm/mach-cns3xxx/pm.c2
-rw-r--r--arch/arm/mach-davinci/Kconfig1
-rw-r--r--arch/arm/mach-davinci/Makefile2
-rw-r--r--arch/arm/mach-davinci/board-da850-evm.c1
-rw-r--r--arch/arm/mach-davinci/board-dm365-evm.c3
-rw-r--r--arch/arm/mach-davinci/board-sffsdr.c1
-rw-r--r--arch/arm/mach-davinci/board-tnetv107x-evm.c2
-rw-r--r--arch/arm/mach-davinci/da850.c8
-rw-r--r--arch/arm/mach-davinci/davinci.h30
-rw-r--r--arch/arm/mach-davinci/devices-da8xx.c11
-rw-r--r--arch/arm/mach-davinci/devices-tnetv107x.c6
-rw-r--r--arch/arm/mach-davinci/devices.c9
-rw-r--r--arch/arm/mach-davinci/dm355.c8
-rw-r--r--arch/arm/mach-davinci/dm365.c8
-rw-r--r--arch/arm/mach-davinci/dm644x.c6
-rw-r--r--arch/arm/mach-davinci/dm646x.c6
-rw-r--r--arch/arm/mach-davinci/include/mach/common.h3
-rw-r--r--arch/arm/mach-davinci/include/mach/cp_intc.h4
-rw-r--r--arch/arm/mach-davinci/include/mach/da8xx.h21
-rw-r--r--arch/arm/mach-davinci/include/mach/edma.h267
-rw-r--r--arch/arm/mach-davinci/include/mach/tnetv107x.h9
-rw-r--r--arch/arm/mach-davinci/time.c2
-rw-r--r--arch/arm/mach-davinci/tnetv107x.c3
-rw-r--r--arch/arm/mach-dove/Kconfig3
-rw-r--r--arch/arm/mach-dove/board-dt.c3
-rw-r--r--arch/arm/mach-dove/common.c3
-rw-r--r--arch/arm/mach-dove/common.h4
-rw-r--r--arch/arm/mach-dove/include/mach/bridge-regs.h1
-rw-r--r--arch/arm/mach-ebsa110/core.c5
-rw-r--r--arch/arm/mach-ep93xx/core.c3
-rw-r--r--arch/arm/mach-ep93xx/include/mach/platform.h4
-rw-r--r--arch/arm/mach-exynos/Kconfig367
-rw-r--r--arch/arm/mach-exynos/Makefile35
-rw-r--r--arch/arm/mach-exynos/common.c595
-rw-r--r--arch/arm/mach-exynos/common.h10
-rw-r--r--arch/arm/mach-exynos/cpuidle.c1
-rw-r--r--arch/arm/mach-exynos/dev-ahci.c255
-rw-r--r--arch/arm/mach-exynos/dev-audio.c254
-rw-r--r--arch/arm/mach-exynos/dev-ohci.c52
-rw-r--r--arch/arm/mach-exynos/dev-uart.c55
-rw-r--r--arch/arm/mach-exynos/dma.c322
-rw-r--r--arch/arm/mach-exynos/firmware.c22
-rw-r--r--arch/arm/mach-exynos/headsmp.S2
-rw-r--r--arch/arm/mach-exynos/include/mach/gpio.h289
-rw-r--r--arch/arm/mach-exynos/include/mach/irqs.h476
-rw-r--r--arch/arm/mach-exynos/include/mach/map.h214
-rw-r--r--arch/arm/mach-exynos/include/mach/memory.h5
-rw-r--r--arch/arm/mach-exynos/include/mach/pm-core.h12
-rw-r--r--arch/arm/mach-exynos/include/mach/regs-gpio.h40
-rw-r--r--arch/arm/mach-exynos/include/mach/regs-usb-phy.h74
-rw-r--r--arch/arm/mach-exynos/include/mach/uncompress.h10
-rw-r--r--arch/arm/mach-exynos/mach-armlex4210.c207
-rw-r--r--arch/arm/mach-exynos/mach-exynos4-dt.c8
-rw-r--r--arch/arm/mach-exynos/mach-exynos5-dt.c9
-rw-r--r--arch/arm/mach-exynos/mach-nuri.c1388
-rw-r--r--arch/arm/mach-exynos/mach-origen.c823
-rw-r--r--arch/arm/mach-exynos/mach-smdk4x12.c396
-rw-r--r--arch/arm/mach-exynos/mach-smdkv310.c444
-rw-r--r--arch/arm/mach-exynos/mach-universal_c210.c1159
-rw-r--r--arch/arm/mach-exynos/platsmp.c18
-rw-r--r--arch/arm/mach-exynos/pm.c7
-rw-r--r--arch/arm/mach-exynos/pm_domains.c101
-rw-r--r--arch/arm/mach-exynos/setup-fimc.c44
-rw-r--r--arch/arm/mach-exynos/setup-fimd0.c43
-rw-r--r--arch/arm/mach-exynos/setup-i2c0.c29
-rw-r--r--arch/arm/mach-exynos/setup-i2c1.c23
-rw-r--r--arch/arm/mach-exynos/setup-i2c2.c23
-rw-r--r--arch/arm/mach-exynos/setup-i2c3.c23
-rw-r--r--arch/arm/mach-exynos/setup-i2c4.c23
-rw-r--r--arch/arm/mach-exynos/setup-i2c5.c23
-rw-r--r--arch/arm/mach-exynos/setup-i2c6.c23
-rw-r--r--arch/arm/mach-exynos/setup-i2c7.c23
-rw-r--r--arch/arm/mach-exynos/setup-keypad.c36
-rw-r--r--arch/arm/mach-exynos/setup-sdhci-gpio.c152
-rw-r--r--arch/arm/mach-exynos/setup-spi.c45
-rw-r--r--arch/arm/mach-exynos/setup-usb-phy.c223
-rw-r--r--arch/arm/mach-footbridge/cats-hw.c2
-rw-r--r--arch/arm/mach-footbridge/common.c4
-rw-r--r--arch/arm/mach-footbridge/common.h3
-rw-r--r--arch/arm/mach-footbridge/dc21285.c2
-rw-r--r--arch/arm/mach-footbridge/netwinder-hw.c4
-rw-r--r--arch/arm/mach-highbank/core.h4
-rw-r--r--arch/arm/mach-highbank/highbank.c8
-rw-r--r--arch/arm/mach-highbank/platsmp.c2
-rw-r--r--arch/arm/mach-highbank/system.c5
-rw-r--r--arch/arm/mach-imx/Kconfig69
-rw-r--r--arch/arm/mach-imx/Makefile4
-rw-r--r--arch/arm/mach-imx/clk-imx51-imx53.c75
-rw-r--r--arch/arm/mach-imx/clk-imx6q.c53
-rw-r--r--arch/arm/mach-imx/clk-imx6sl.c267
-rw-r--r--arch/arm/mach-imx/clk-pllv3.c10
-rw-r--r--arch/arm/mach-imx/clk-vf610.c321
-rw-r--r--arch/arm/mach-imx/clk.c35
-rw-r--r--arch/arm/mach-imx/clk.h4
-rw-r--r--arch/arm/mach-imx/common.h6
-rw-r--r--arch/arm/mach-imx/devices-imx25.h8
-rw-r--r--arch/arm/mach-imx/devices-imx35.h8
-rw-r--r--arch/arm/mach-imx/devices/Kconfig1
-rw-r--r--arch/arm/mach-imx/devices/devices-common.h4
-rw-r--r--arch/arm/mach-imx/devices/platform-flexcan.c5
-rw-r--r--arch/arm/mach-imx/eukrea_mbimxsd25-baseboard.c2
-rw-r--r--arch/arm/mach-imx/eukrea_mbimxsd35-baseboard.c2
-rw-r--r--arch/arm/mach-imx/hardware.h1
-rw-r--r--arch/arm/mach-imx/imx25-dt.c2
-rw-r--r--arch/arm/mach-imx/imx27-dt.c2
-rw-r--r--arch/arm/mach-imx/imx31-dt.c2
-rw-r--r--arch/arm/mach-imx/imx51-dt.c2
-rw-r--r--arch/arm/mach-imx/irq-common.c1
-rw-r--r--arch/arm/mach-imx/mach-imx53.c17
-rw-r--r--arch/arm/mach-imx/mach-imx6q.c84
-rw-r--r--arch/arm/mach-imx/mach-imx6sl.c52
-rw-r--r--arch/arm/mach-imx/mach-mx25_3ds.c2
-rw-r--r--arch/arm/mach-imx/mach-mx31moboard.c9
-rw-r--r--arch/arm/mach-imx/mach-pca100.c4
-rw-r--r--arch/arm/mach-imx/mach-pcm043.c2
-rw-r--r--arch/arm/mach-imx/mach-vf610.c48
-rw-r--r--arch/arm/mach-imx/mm-imx1.c2
-rw-r--r--arch/arm/mach-imx/mm-imx21.c2
-rw-r--r--arch/arm/mach-imx/mm-imx25.c2
-rw-r--r--arch/arm/mach-imx/mm-imx27.c2
-rw-r--r--arch/arm/mach-imx/mm-imx3.c6
-rw-r--r--arch/arm/mach-imx/mm-imx5.c3
-rw-r--r--arch/arm/mach-imx/mx27.h2
-rw-r--r--arch/arm/mach-imx/platsmp.c2
-rw-r--r--arch/arm/mach-imx/system.c49
-rw-r--r--arch/arm/mach-imx/time.c2
-rw-r--r--arch/arm/mach-imx/ulpi.c118
-rw-r--r--arch/arm/mach-imx/ulpi.h11
-rw-r--r--arch/arm/mach-integrator/Makefile2
-rw-r--r--arch/arm/mach-integrator/common.h3
-rw-r--r--arch/arm/mach-integrator/core.c2
-rw-r--r--arch/arm/mach-integrator/include/mach/platform.h23
-rw-r--r--arch/arm/mach-integrator/integrator_ap.c33
-rw-r--r--arch/arm/mach-integrator/pci.c113
-rw-r--r--arch/arm/mach-integrator/pci_v3.c564
-rw-r--r--arch/arm/mach-integrator/pci_v3.h2
-rw-r--r--arch/arm/mach-iop13xx/include/mach/iop13xx.h5
-rw-r--r--arch/arm/mach-iop13xx/io.c2
-rw-r--r--arch/arm/mach-iop13xx/setup.c5
-rw-r--r--arch/arm/mach-iop32x/n2100.c2
-rw-r--r--arch/arm/mach-ixp4xx/Kconfig1
-rw-r--r--arch/arm/mach-ixp4xx/common.c8
-rw-r--r--arch/arm/mach-ixp4xx/dsmg600-setup.c2
-rw-r--r--arch/arm/mach-ixp4xx/include/mach/platform.h4
-rw-r--r--arch/arm/mach-ixp4xx/include/mach/timex.h2
-rw-r--r--arch/arm/mach-ixp4xx/omixp-setup.c2
-rw-r--r--arch/arm/mach-keystone/Kconfig15
-rw-r--r--arch/arm/mach-keystone/Makefile6
-rw-r--r--arch/arm/mach-keystone/Makefile.boot1
-rw-r--r--arch/arm/mach-keystone/keystone.c75
-rw-r--r--arch/arm/mach-keystone/keystone.h23
-rw-r--r--arch/arm/mach-keystone/platsmp.c43
-rw-r--r--arch/arm/mach-keystone/smc.S29
-rw-r--r--arch/arm/mach-kirkwood/Kconfig33
-rw-r--r--arch/arm/mach-kirkwood/Makefile4
-rw-r--r--arch/arm/mach-kirkwood/board-db88f628x-bp.c24
-rw-r--r--arch/arm/mach-kirkwood/board-dt.c22
-rw-r--r--arch/arm/mach-kirkwood/board-iconnect.c8
-rw-r--r--arch/arm/mach-kirkwood/board-lsxl.c16
-rw-r--r--arch/arm/mach-kirkwood/board-mplcec4.c1
-rw-r--r--arch/arm/mach-kirkwood/board-nsa310.c25
-rw-r--r--arch/arm/mach-kirkwood/board-readynas.c1
-rw-r--r--arch/arm/mach-kirkwood/board-sheevaplug.c27
-rw-r--r--arch/arm/mach-kirkwood/board-ts219.c3
-rw-r--r--arch/arm/mach-kirkwood/common.c50
-rw-r--r--arch/arm/mach-kirkwood/common.h17
-rw-r--r--arch/arm/mach-kirkwood/db88f6281-bp-setup.c108
-rw-r--r--arch/arm/mach-kirkwood/include/mach/bridge-regs.h4
-rw-r--r--arch/arm/mach-kirkwood/pcie.c22
-rw-r--r--arch/arm/mach-ks8695/generic.h2
-rw-r--r--arch/arm/mach-ks8695/time.c4
-rw-r--r--arch/arm/mach-lpc32xx/common.c6
-rw-r--r--arch/arm/mach-lpc32xx/common.h3
-rw-r--r--arch/arm/mach-lpc32xx/phy3250.c4
-rw-r--r--arch/arm/mach-mmp/aspenite.c10
-rw-r--r--arch/arm/mach-mmp/common.c2
-rw-r--r--arch/arm/mach-mmp/common.h3
-rw-r--r--arch/arm/mach-mmp/include/mach/pxa168.h4
-rw-r--r--arch/arm/mach-mmp/pxa168.c2
-rw-r--r--arch/arm/mach-mmp/teton_bga.c8
-rw-r--r--arch/arm/mach-mmp/time.c2
-rw-r--r--arch/arm/mach-msm/Kconfig10
-rw-r--r--arch/arm/mach-msm/Makefile16
-rw-r--r--arch/arm/mach-msm/board-dt-8660.c2
-rw-r--r--arch/arm/mach-msm/board-dt-8960.c2
-rw-r--r--arch/arm/mach-msm/board-halibut.c2
-rw-r--r--arch/arm/mach-msm/board-msm7x30.c2
-rw-r--r--arch/arm/mach-msm/board-qsd8x50.c2
-rw-r--r--arch/arm/mach-msm/board-trout-panel.c19
-rw-r--r--arch/arm/mach-msm/board-trout.c3
-rw-r--r--arch/arm/mach-msm/clock-7x30.h155
-rw-r--r--arch/arm/mach-msm/clock-debug.c130
-rw-r--r--arch/arm/mach-msm/clock-pcom.c149
-rw-r--r--arch/arm/mach-msm/clock-pcom.h31
-rw-r--r--arch/arm/mach-msm/clock.c166
-rw-r--r--arch/arm/mach-msm/clock.h51
-rw-r--r--arch/arm/mach-msm/common.h2
-rw-r--r--arch/arm/mach-msm/core.h2
-rw-r--r--arch/arm/mach-msm/devices-msm7x00.c12
-rw-r--r--arch/arm/mach-msm/devices-msm7x30.c15
-rw-r--r--arch/arm/mach-msm/devices-qsd8x50.c12
-rw-r--r--arch/arm/mach-msm/devices.h15
-rw-r--r--arch/arm/mach-msm/dma.c5
-rw-r--r--arch/arm/mach-msm/gpiomux-8x60.c19
-rw-r--r--arch/arm/mach-msm/gpiomux-v1.c33
-rw-r--r--arch/arm/mach-msm/gpiomux-v2.c25
-rw-r--r--arch/arm/mach-msm/gpiomux-v2.h61
-rw-r--r--arch/arm/mach-msm/gpiomux.c15
-rw-r--r--arch/arm/mach-msm/gpiomux.h15
-rw-r--r--arch/arm/mach-msm/headsmp.S2
-rw-r--r--arch/arm/mach-msm/include/mach/board.h5
-rw-r--r--arch/arm/mach-msm/include/mach/clk.h9
-rw-r--r--arch/arm/mach-msm/include/mach/msm_iomap-8960.h7
-rw-r--r--arch/arm/mach-msm/include/mach/msm_iomap-8x60.h6
-rw-r--r--arch/arm/mach-msm/include/mach/msm_iomap.h2
-rw-r--r--arch/arm/mach-msm/io.c6
-rw-r--r--arch/arm/mach-msm/platsmp.c6
-rw-r--r--arch/arm/mach-msm/timer.c6
-rw-r--r--arch/arm/mach-mv78xx0/common.c2
-rw-r--r--arch/arm/mach-mv78xx0/common.h4
-rw-r--r--arch/arm/mach-mvebu/Kconfig7
-rw-r--r--arch/arm/mach-mvebu/armada-370-xp.c57
-rw-r--r--arch/arm/mach-mvebu/armada-370-xp.h10
-rw-r--r--arch/arm/mach-mvebu/coherency.c45
-rw-r--r--arch/arm/mach-mvebu/coherency.h4
-rw-r--r--arch/arm/mach-mvebu/common.h6
-rw-r--r--arch/arm/mach-mvebu/headsmp.S18
-rw-r--r--arch/arm/mach-mvebu/platsmp.c15
-rw-r--r--arch/arm/mach-mvebu/system-controller.c3
-rw-r--r--arch/arm/mach-mxs/Kconfig4
-rw-r--r--arch/arm/mach-mxs/mach-mxs.c181
-rw-r--r--arch/arm/mach-mxs/pm.h4
-rw-r--r--arch/arm/mach-netx/generic.c3
-rw-r--r--arch/arm/mach-netx/generic.h4
-rw-r--r--arch/arm/mach-nomadik/Kconfig1
-rw-r--r--arch/arm/mach-nomadik/cpu-8815.c77
-rw-r--r--arch/arm/mach-nspire/Kconfig16
-rw-r--r--arch/arm/mach-nspire/Makefile2
-rw-r--r--arch/arm/mach-nspire/Makefile.boot0
-rw-r--r--arch/arm/mach-nspire/clcd.c119
-rw-r--r--arch/arm/mach-nspire/clcd.h14
-rw-r--r--arch/arm/mach-nspire/mmio.h20
-rw-r--r--arch/arm/mach-nspire/nspire.c89
-rw-r--r--arch/arm/mach-omap1/Makefile4
-rw-r--r--arch/arm/mach-omap1/board-h2.c36
-rw-r--r--arch/arm/mach-omap1/board-nokia770.c10
-rw-r--r--arch/arm/mach-omap1/board-palmte.c31
-rw-r--r--arch/arm/mach-omap1/board-palmtt.c30
-rw-r--r--arch/arm/mach-omap1/board-palmz71.c31
-rw-r--r--arch/arm/mach-omap1/board-sx1.c36
-rw-r--r--arch/arm/mach-omap1/board-voiceblue.c3
-rw-r--r--arch/arm/mach-omap1/common.h3
-rw-r--r--arch/arm/mach-omap1/devices.c9
-rw-r--r--arch/arm/mach-omap1/dma.c2
-rw-r--r--arch/arm/mach-omap1/dma.h42
-rw-r--r--arch/arm/mach-omap1/include/mach/irda.h33
-rw-r--r--arch/arm/mach-omap1/lcd_dma.c2
-rw-r--r--arch/arm/mach-omap1/mailbox.c199
-rw-r--r--arch/arm/mach-omap1/mcbsp.c33
-rw-r--r--arch/arm/mach-omap1/reset.c3
-rw-r--r--arch/arm/mach-omap1/time.c2
-rw-r--r--arch/arm/mach-omap2/Kconfig165
-rw-r--r--arch/arm/mach-omap2/Makefile30
-rw-r--r--arch/arm/mach-omap2/am33xx-restart.c3
-rw-r--r--arch/arm/mach-omap2/am33xx.h1
-rw-r--r--arch/arm/mach-omap2/board-4430sdp.c765
-rw-r--r--arch/arm/mach-omap2/board-cm-t35.c3
-rw-r--r--arch/arm/mach-omap2/board-devkit8000.c1
-rw-r--r--arch/arm/mach-omap2/board-flash.c3
-rw-r--r--arch/arm/mach-omap2/board-generic.c39
-rw-r--r--arch/arm/mach-omap2/board-igep0020.c31
-rw-r--r--arch/arm/mach-omap2/board-ldp.c3
-rw-r--r--arch/arm/mach-omap2/board-omap3evm.c4
-rw-r--r--arch/arm/mach-omap2/board-omap3pandora.c1
-rw-r--r--arch/arm/mach-omap2/board-omap4panda.c455
-rw-r--r--arch/arm/mach-omap2/board-overo.c3
-rw-r--r--arch/arm/mach-omap2/board-rx51-peripherals.c1
-rw-r--r--arch/arm/mach-omap2/board-rx51-video.c2
-rw-r--r--arch/arm/mach-omap2/cclock33xx_data.c79
-rw-r--r--arch/arm/mach-omap2/cclock3xxx_data.c11
-rw-r--r--arch/arm/mach-omap2/clockdomain.h1
-rw-r--r--arch/arm/mach-omap2/clockdomains54xx_data.c464
-rw-r--r--arch/arm/mach-omap2/cm-regbits-54xx.h1737
-rw-r--r--arch/arm/mach-omap2/cm1_44xx.h7
-rw-r--r--arch/arm/mach-omap2/cm1_54xx.h213
-rw-r--r--arch/arm/mach-omap2/cm2_44xx.h7
-rw-r--r--arch/arm/mach-omap2/cm2_54xx.h389
-rw-r--r--arch/arm/mach-omap2/cm33xx.h2
-rw-r--r--arch/arm/mach-omap2/cm_44xx_54xx.h36
-rw-r--r--arch/arm/mach-omap2/common.h22
-rw-r--r--arch/arm/mach-omap2/control.c1
-rw-r--r--arch/arm/mach-omap2/control.h12
-rw-r--r--arch/arm/mach-omap2/devices.c161
-rw-r--r--arch/arm/mach-omap2/dma.h61
-rw-r--r--arch/arm/mach-omap2/dss-common.c2
-rw-r--r--arch/arm/mach-omap2/fb.c5
-rw-r--r--arch/arm/mach-omap2/gpmc-nand.c44
-rw-r--r--arch/arm/mach-omap2/gpmc.c84
-rw-r--r--arch/arm/mach-omap2/hsmmc.c103
-rw-r--r--arch/arm/mach-omap2/id.c34
-rw-r--r--arch/arm/mach-omap2/io.c28
-rw-r--r--arch/arm/mach-omap2/mailbox.c430
-rw-r--r--arch/arm/mach-omap2/mux.h3
-rw-r--r--arch/arm/mach-omap2/mux44xx.c1356
-rw-r--r--arch/arm/mach-omap2/mux44xx.h298
-rw-r--r--arch/arm/mach-omap2/omap-headsmp.S10
-rw-r--r--arch/arm/mach-omap2/omap-mpuss-lowpower.c71
-rw-r--r--arch/arm/mach-omap2/omap-smp.c10
-rw-r--r--arch/arm/mach-omap2/omap-wakeupgen.c4
-rw-r--r--arch/arm/mach-omap2/omap2-restart.c2
-rw-r--r--arch/arm/mach-omap2/omap3-restart.c3
-rw-r--r--arch/arm/mach-omap2/omap4-common.c17
-rw-r--r--arch/arm/mach-omap2/omap4-restart.c28
-rw-r--r--arch/arm/mach-omap2/omap_device.c34
-rw-r--r--arch/arm/mach-omap2/omap_device.h10
-rw-r--r--arch/arm/mach-omap2/omap_hwmod.c2
-rw-r--r--arch/arm/mach-omap2/omap_hwmod.h51
-rw-r--r--arch/arm/mach-omap2/omap_hwmod_2420_data.c14
-rw-r--r--arch/arm/mach-omap2/omap_hwmod_2430_data.c13
-rw-r--r--arch/arm/mach-omap2/omap_hwmod_2xxx_3xxx_ipblock_data.c21
-rw-r--r--arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c6
-rw-r--r--arch/arm/mach-omap2/omap_hwmod_33xx_data.c1080
-rw-r--r--arch/arm/mach-omap2/omap_hwmod_3xxx_data.c41
-rw-r--r--arch/arm/mach-omap2/omap_hwmod_44xx_data.c1549
-rw-r--r--arch/arm/mach-omap2/omap_hwmod_54xx_data.c2151
-rw-r--r--arch/arm/mach-omap2/pm44xx.c58
-rw-r--r--arch/arm/mach-omap2/pmu.c5
-rw-r--r--arch/arm/mach-omap2/powerdomain.c5
-rw-r--r--arch/arm/mach-omap2/powerdomain.h3
-rw-r--r--arch/arm/mach-omap2/powerdomains3xxx_data.c62
-rw-r--r--arch/arm/mach-omap2/powerdomains54xx_data.c331
-rw-r--r--arch/arm/mach-omap2/prcm-common.h11
-rw-r--r--arch/arm/mach-omap2/prcm44xx.h6
-rw-r--r--arch/arm/mach-omap2/prcm_mpu44xx.h14
-rw-r--r--arch/arm/mach-omap2/prcm_mpu54xx.h87
-rw-r--r--arch/arm/mach-omap2/prcm_mpu_44xx_54xx.h36
-rw-r--r--arch/arm/mach-omap2/prm-regbits-54xx.h2701
-rw-r--r--arch/arm/mach-omap2/prm33xx.c7
-rw-r--r--arch/arm/mach-omap2/prm44xx.h33
-rw-r--r--arch/arm/mach-omap2/prm44xx_54xx.h58
-rw-r--r--arch/arm/mach-omap2/prm54xx.h421
-rw-r--r--arch/arm/mach-omap2/scrm54xx.h231
-rw-r--r--arch/arm/mach-omap2/serial.c21
-rw-r--r--arch/arm/mach-omap2/sleep44xx.S6
-rw-r--r--arch/arm/mach-omap2/smartreflex-class3.c8
-rw-r--r--arch/arm/mach-omap2/soc.h26
-rw-r--r--arch/arm/mach-omap2/sram.c3
-rw-r--r--arch/arm/mach-omap2/timer.c6
-rw-r--r--arch/arm/mach-omap2/twl-common.c1
-rw-r--r--arch/arm/mach-omap2/usb-host.c300
-rw-r--r--arch/arm/mach-omap2/usb-musb.c3
-rw-r--r--arch/arm/mach-omap2/voltage.h2
-rw-r--r--arch/arm/mach-omap2/voltagedomains33xx_data.c43
-rw-r--r--arch/arm/mach-omap2/voltagedomains54xx_data.c92
-rw-r--r--arch/arm/mach-orion5x/common.c2
-rw-r--r--arch/arm/mach-orion5x/common.h4
-rw-r--r--arch/arm/mach-orion5x/include/mach/bridge-regs.h3
-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-picoxcell/Kconfig1
-rw-r--r--arch/arm/mach-picoxcell/common.c13
-rw-r--r--arch/arm/mach-picoxcell/common.h17
-rw-r--r--arch/arm/mach-prima2/common.c21
-rw-r--r--arch/arm/mach-prima2/common.h4
-rw-r--r--arch/arm/mach-prima2/headsmp.S2
-rw-r--r--arch/arm/mach-prima2/platsmp.c4
-rw-r--r--arch/arm/mach-prima2/pm.c2
-rw-r--r--arch/arm/mach-prima2/rstc.c3
-rw-r--r--arch/arm/mach-pxa/Kconfig3
-rw-r--r--arch/arm/mach-pxa/corgi.c6
-rw-r--r--arch/arm/mach-pxa/em-x270.c37
-rw-r--r--arch/arm/mach-pxa/ezx.c60
-rw-r--r--arch/arm/mach-pxa/generic.h4
-rw-r--r--arch/arm/mach-pxa/littleton.c10
-rw-r--r--arch/arm/mach-pxa/mainstone.c13
-rw-r--r--arch/arm/mach-pxa/mioa701.c19
-rw-r--r--arch/arm/mach-pxa/palmld.c10
-rw-r--r--arch/arm/mach-pxa/palmt5.c10
-rw-r--r--arch/arm/mach-pxa/palmtreo.c23
-rw-r--r--arch/arm/mach-pxa/palmtx.c10
-rw-r--r--arch/arm/mach-pxa/palmz72.c10
-rw-r--r--arch/arm/mach-pxa/pcm990-baseboard.c3
-rw-r--r--arch/arm/mach-pxa/poodle.c6
-rw-r--r--arch/arm/mach-pxa/reset.c8
-rw-r--r--arch/arm/mach-pxa/spitz.c12
-rw-r--r--arch/arm/mach-pxa/stargate2.c3
-rw-r--r--arch/arm/mach-pxa/tavorevb.c10
-rw-r--r--arch/arm/mach-pxa/time.c2
-rw-r--r--arch/arm/mach-pxa/tosa.c6
-rw-r--r--arch/arm/mach-pxa/z2.c10
-rw-r--r--arch/arm/mach-pxa/zylonite.c10
-rw-r--r--arch/arm/mach-realview/realview_eb.c3
-rw-r--r--arch/arm/mach-realview/realview_pb1176.c3
-rw-r--r--arch/arm/mach-realview/realview_pb11mp.c3
-rw-r--r--arch/arm/mach-realview/realview_pba8.c3
-rw-r--r--arch/arm/mach-realview/realview_pbx.c3
-rw-r--r--arch/arm/mach-rockchip/Kconfig16
-rw-r--r--arch/arm/mach-rockchip/Makefile1
-rw-r--r--arch/arm/mach-rockchip/rockchip.c52
-rw-r--r--arch/arm/mach-rpc/riscpc.c3
-rw-r--r--arch/arm/mach-s3c24xx/Kconfig80
-rw-r--r--arch/arm/mach-s3c24xx/Makefile7
-rw-r--r--arch/arm/mach-s3c24xx/clock-s3c2410.c161
-rw-r--r--arch/arm/mach-s3c24xx/clock-s3c2440.c3
-rw-r--r--arch/arm/mach-s3c24xx/common.h12
-rw-r--r--arch/arm/mach-s3c24xx/cpufreq-debugfs.c198
-rw-r--r--arch/arm/mach-s3c24xx/cpufreq-s3c2410.c160
-rw-r--r--arch/arm/mach-s3c24xx/cpufreq-s3c2412.c258
-rw-r--r--arch/arm/mach-s3c24xx/cpufreq-s3c2440.c312
-rw-r--r--arch/arm/mach-s3c24xx/cpufreq-utils.c2
-rw-r--r--arch/arm/mach-s3c24xx/cpufreq.c711
-rw-r--r--arch/arm/mach-s3c24xx/dma-s3c2412.c56
-rw-r--r--arch/arm/mach-s3c24xx/dma-s3c2443.c3
-rw-r--r--arch/arm/mach-s3c24xx/dma.c3
-rw-r--r--arch/arm/mach-s3c24xx/include/mach/s3c2412.h (renamed from arch/arm/mach-s3c24xx/s3c2412.h)0
-rw-r--r--arch/arm/mach-s3c24xx/include/mach/uncompress.h3
-rw-r--r--arch/arm/mach-s3c24xx/iotiming-s3c2412.c2
-rw-r--r--arch/arm/mach-s3c24xx/mach-s3c2416-dt.c91
-rw-r--r--arch/arm/mach-s3c24xx/pll-s3c2410.c54
-rw-r--r--arch/arm/mach-s3c24xx/pll-s3c2440-12000000.c54
-rw-r--r--arch/arm/mach-s3c24xx/pll-s3c2440-16934400.c110
-rw-r--r--arch/arm/mach-s3c24xx/s3c2410.c8
-rw-r--r--arch/arm/mach-s3c24xx/s3c2412.c5
-rw-r--r--arch/arm/mach-s3c24xx/s3c2416.c5
-rw-r--r--arch/arm/mach-s3c24xx/s3c2443.c5
-rw-r--r--arch/arm/mach-s3c24xx/s3c244x.c8
-rw-r--r--arch/arm/mach-s3c64xx/common.c13
-rw-r--r--arch/arm/mach-s3c64xx/common.h4
-rw-r--r--arch/arm/mach-s3c64xx/include/mach/uncompress.h3
-rw-r--r--arch/arm/mach-s5p64x0/common.c9
-rw-r--r--arch/arm/mach-s5p64x0/common.h4
-rw-r--r--arch/arm/mach-s5p64x0/include/mach/uncompress.h162
-rw-r--r--arch/arm/mach-s5pc100/common.c8
-rw-r--r--arch/arm/mach-s5pc100/common.h4
-rw-r--r--arch/arm/mach-s5pc100/include/mach/uncompress.h2
-rw-r--r--arch/arm/mach-s5pv210/common.c2
-rw-r--r--arch/arm/mach-s5pv210/common.h4
-rw-r--r--arch/arm/mach-s5pv210/include/mach/uncompress.h2
-rw-r--r--arch/arm/mach-s5pv210/mach-aquila.c8
-rw-r--r--arch/arm/mach-s5pv210/mach-goni.c8
-rw-r--r--arch/arm/mach-sa1100/generic.c5
-rw-r--r--arch/arm/mach-sa1100/generic.h3
-rw-r--r--arch/arm/mach-sa1100/time.c2
-rw-r--r--arch/arm/mach-shark/core.c3
-rw-r--r--arch/arm/mach-shmobile/Kconfig79
-rw-r--r--arch/arm/mach-shmobile/Makefile3
-rw-r--r--arch/arm/mach-shmobile/Makefile.boot18
-rw-r--r--arch/arm/mach-shmobile/board-ap4evb.c1332
-rw-r--r--arch/arm/mach-shmobile/board-ape6evm.c15
-rw-r--r--arch/arm/mach-shmobile/board-armadillo800eva-reference.c213
-rw-r--r--arch/arm/mach-shmobile/board-armadillo800eva.c122
-rw-r--r--arch/arm/mach-shmobile/board-bockw.c186
-rw-r--r--arch/arm/mach-shmobile/board-bonito.c495
-rw-r--r--arch/arm/mach-shmobile/board-kzm9d.c2
-rw-r--r--arch/arm/mach-shmobile/board-kzm9g-reference.c1
-rw-r--r--arch/arm/mach-shmobile/board-kzm9g.c207
-rw-r--r--arch/arm/mach-shmobile/board-lager.c64
-rw-r--r--arch/arm/mach-shmobile/board-mackerel.c171
-rw-r--r--arch/arm/mach-shmobile/board-marzen.c191
-rw-r--r--arch/arm/mach-shmobile/clock-r8a73a4.c387
-rw-r--r--arch/arm/mach-shmobile/clock-r8a7740.c13
-rw-r--r--arch/arm/mach-shmobile/clock-r8a7778.c185
-rw-r--r--arch/arm/mach-shmobile/clock-r8a7779.c6
-rw-r--r--arch/arm/mach-shmobile/clock-r8a7790.c255
-rw-r--r--arch/arm/mach-shmobile/clock-sh7372.c6
-rw-r--r--arch/arm/mach-shmobile/clock-sh73a0.c111
-rw-r--r--arch/arm/mach-shmobile/headsmp-scu.S30
-rw-r--r--arch/arm/mach-shmobile/headsmp.S15
-rw-r--r--arch/arm/mach-shmobile/include/mach/clock.h8
-rw-r--r--arch/arm/mach-shmobile/include/mach/common.h6
-rw-r--r--arch/arm/mach-shmobile/include/mach/head-ap4evb.txt93
-rw-r--r--arch/arm/mach-shmobile/include/mach/irqs.h5
-rw-r--r--arch/arm/mach-shmobile/include/mach/memory.h7
-rw-r--r--arch/arm/mach-shmobile/include/mach/mmc-ap4eb.h29
-rw-r--r--arch/arm/mach-shmobile/include/mach/mmc.h4
-rw-r--r--arch/arm/mach-shmobile/include/mach/r8a7740.h491
-rw-r--r--arch/arm/mach-shmobile/include/mach/r8a7778.h11
-rw-r--r--arch/arm/mach-shmobile/include/mach/r8a7779.h3
-rw-r--r--arch/arm/mach-shmobile/include/mach/sh7372.h393
-rw-r--r--arch/arm/mach-shmobile/include/mach/zboot.h6
-rw-r--r--arch/arm/mach-shmobile/intc-r8a7740.c24
-rw-r--r--arch/arm/mach-shmobile/pm-sh7372.c3
-rw-r--r--arch/arm/mach-shmobile/setup-emev2.c8
-rw-r--r--arch/arm/mach-shmobile/setup-r8a73a4.c2
-rw-r--r--arch/arm/mach-shmobile/setup-r8a7740.c78
-rw-r--r--arch/arm/mach-shmobile/setup-r8a7778.c262
-rw-r--r--arch/arm/mach-shmobile/setup-r8a7779.c215
-rw-r--r--arch/arm/mach-shmobile/setup-r8a7790.c60
-rw-r--r--arch/arm/mach-shmobile/setup-sh73a0.c95
-rw-r--r--arch/arm/mach-shmobile/sleep-sh7372.S5
-rw-r--r--arch/arm/mach-shmobile/smp-emev2.c8
-rw-r--r--arch/arm/mach-shmobile/smp-r8a7779.c8
-rw-r--r--arch/arm/mach-shmobile/smp-sh73a0.c8
-rw-r--r--arch/arm/mach-socfpga/Kconfig2
-rw-r--r--arch/arm/mach-socfpga/headsmp.S1
-rw-r--r--arch/arm/mach-socfpga/platsmp.c2
-rw-r--r--arch/arm/mach-socfpga/socfpga.c7
-rw-r--r--arch/arm/mach-spear/generic.h6
-rw-r--r--arch/arm/mach-spear/platsmp.c4
-rw-r--r--arch/arm/mach-spear/restart.c5
-rw-r--r--arch/arm/mach-spear/spear1310.c2
-rw-r--r--arch/arm/mach-spear/spear1340.c2
-rw-r--r--arch/arm/mach-spear/spear300.c2
-rw-r--r--arch/arm/mach-spear/spear310.c2
-rw-r--r--arch/arm/mach-spear/spear320.c2
-rw-r--r--arch/arm/mach-spear/spear3xx.c4
-rw-r--r--arch/arm/mach-spear/spear6xx.c6
-rw-r--r--arch/arm/mach-sti/Kconfig46
-rw-r--r--arch/arm/mach-sti/Makefile2
-rw-r--r--arch/arm/mach-sti/board-dt.c48
-rw-r--r--arch/arm/mach-sti/headsmp.S42
-rw-r--r--arch/arm/mach-sti/platsmp.c117
-rw-r--r--arch/arm/mach-sti/smp.h17
-rw-r--r--arch/arm/mach-sunxi/sunxi.c23
-rw-r--r--arch/arm/mach-sunxi/sunxi.h20
-rw-r--r--arch/arm/mach-tegra/Kconfig5
-rw-r--r--arch/arm/mach-tegra/Makefile1
-rw-r--r--arch/arm/mach-tegra/board.h3
-rw-r--r--arch/arm/mach-tegra/common.c9
-rw-r--r--arch/arm/mach-tegra/common.h1
-rw-r--r--arch/arm/mach-tegra/cpuidle-tegra20.c10
-rw-r--r--arch/arm/mach-tegra/cpuidle-tegra30.c10
-rw-r--r--arch/arm/mach-tegra/cpuidle.c19
-rw-r--r--arch/arm/mach-tegra/cpuidle.h15
-rw-r--r--arch/arm/mach-tegra/flowctrl.h1
-rw-r--r--arch/arm/mach-tegra/fuse.h22
-rw-r--r--arch/arm/mach-tegra/hotplug.c13
-rw-r--r--arch/arm/mach-tegra/platsmp.c30
-rw-r--r--arch/arm/mach-tegra/pm.c27
-rw-r--r--arch/arm/mach-tegra/pm.h4
-rw-r--r--arch/arm/mach-tegra/pmc.c2
-rw-r--r--arch/arm/mach-tegra/reset-handler.S51
-rw-r--r--arch/arm/mach-tegra/sleep-tegra30.S30
-rw-r--r--arch/arm/mach-tegra/sleep.S8
-rw-r--r--arch/arm/mach-tegra/sleep.h35
-rw-r--r--arch/arm/mach-tegra/tegra2_emc.c2
-rw-r--r--arch/arm/mach-u300/Kconfig32
-rw-r--r--arch/arm/mach-u300/Makefile2
-rw-r--r--arch/arm/mach-u300/core.c759
-rw-r--r--arch/arm/mach-u300/dummyspichip.c20
-rw-r--r--arch/arm/mach-u300/i2c.c285
-rw-r--r--arch/arm/mach-u300/i2c.h23
-rw-r--r--arch/arm/mach-u300/include/mach/hardware.h5
-rw-r--r--arch/arm/mach-u300/include/mach/irqs.h80
-rw-r--r--arch/arm/mach-u300/include/mach/syscon.h592
-rw-r--r--arch/arm/mach-u300/include/mach/timex.h17
-rw-r--r--arch/arm/mach-u300/include/mach/u300-regs.h165
-rw-r--r--arch/arm/mach-u300/include/mach/uncompress.h45
-rw-r--r--arch/arm/mach-u300/regulator.c67
-rw-r--r--arch/arm/mach-u300/spi.c102
-rw-r--r--arch/arm/mach-u300/spi.h26
-rw-r--r--arch/arm/mach-u300/timer.c115
-rw-r--r--arch/arm/mach-u300/timer.h1
-rw-r--r--arch/arm/mach-u300/u300-gpio.h70
-rw-r--r--arch/arm/mach-ux500/board-mop500-audio.c68
-rw-r--r--arch/arm/mach-ux500/board-mop500-pins.c283
-rw-r--r--arch/arm/mach-ux500/board-mop500-regulators.c1
-rw-r--r--arch/arm/mach-ux500/board-mop500-sdi.c90
-rw-r--r--arch/arm/mach-ux500/board-mop500.c94
-rw-r--r--arch/arm/mach-ux500/board-mop500.h2
-rw-r--r--arch/arm/mach-ux500/cache-l2x0.c3
-rw-r--r--arch/arm/mach-ux500/cpu-db8500.c92
-rw-r--r--arch/arm/mach-ux500/cpu.c6
-rw-r--r--arch/arm/mach-ux500/db8500-regs.h3
-rw-r--r--arch/arm/mach-ux500/devices-db8500.c125
-rw-r--r--arch/arm/mach-ux500/id.c6
-rw-r--r--arch/arm/mach-ux500/platsmp.c4
-rw-r--r--arch/arm/mach-ux500/ste-dma40-db8500.h193
-rw-r--r--arch/arm/mach-ux500/usb.c47
-rw-r--r--arch/arm/mach-versatile/core.c3
-rw-r--r--arch/arm/mach-versatile/core.h3
-rw-r--r--arch/arm/mach-vexpress/Kconfig9
-rw-r--r--arch/arm/mach-vexpress/Makefile1
-rw-r--r--arch/arm/mach-vexpress/core.h2
-rw-r--r--arch/arm/mach-vexpress/dcscb.c253
-rw-r--r--arch/arm/mach-vexpress/dcscb_setup.S38
-rw-r--r--arch/arm/mach-vexpress/platsmp.c20
-rw-r--r--arch/arm/mach-vexpress/v2m.c3
-rw-r--r--arch/arm/mach-virt/Kconfig2
-rw-r--r--arch/arm/mach-virt/Makefile1
-rw-r--r--arch/arm/mach-virt/platsmp.c50
-rw-r--r--arch/arm/mach-virt/virt.c5
-rw-r--r--arch/arm/mach-vt8500/vt8500.c5
-rw-r--r--arch/arm/mach-w90x900/cpu.c4
-rw-r--r--arch/arm/mach-w90x900/nuc9xx.h5
-rw-r--r--arch/arm/mach-zynq/common.c7
-rw-r--r--arch/arm/mach-zynq/common.h2
-rw-r--r--arch/arm/mach-zynq/headsmp.S2
-rw-r--r--arch/arm/mach-zynq/platsmp.c58
-rw-r--r--arch/arm/mach-zynq/slcr.c2
-rw-r--r--arch/arm/mm/Kconfig58
-rw-r--r--arch/arm/mm/Makefile3
-rw-r--r--arch/arm/mm/cache-l2x0.c158
-rw-r--r--arch/arm/mm/cache-nop.S50
-rw-r--r--arch/arm/mm/context.c67
-rw-r--r--arch/arm/mm/dma-mapping.c62
-rw-r--r--arch/arm/mm/fault.c2
-rw-r--r--arch/arm/mm/flush.c27
-rw-r--r--arch/arm/mm/fsr-3level.c4
-rw-r--r--arch/arm/mm/hugetlbpage.c101
-rw-r--r--arch/arm/mm/init.c77
-rw-r--r--arch/arm/mm/ioremap.c10
-rw-r--r--arch/arm/mm/mmap.c2
-rw-r--r--arch/arm/mm/mmu.c110
-rw-r--r--arch/arm/mm/nommu.c270
-rw-r--r--arch/arm/mm/proc-arm1020.S2
-rw-r--r--arch/arm/mm/proc-arm1020e.S2
-rw-r--r--arch/arm/mm/proc-arm1022.S2
-rw-r--r--arch/arm/mm/proc-arm1026.S3
-rw-r--r--arch/arm/mm/proc-arm720.S2
-rw-r--r--arch/arm/mm/proc-arm740.S2
-rw-r--r--arch/arm/mm/proc-arm7tdmi.S2
-rw-r--r--arch/arm/mm/proc-arm920.S2
-rw-r--r--arch/arm/mm/proc-arm922.S2
-rw-r--r--arch/arm/mm/proc-arm925.S2
-rw-r--r--arch/arm/mm/proc-arm926.S2
-rw-r--r--arch/arm/mm/proc-arm940.S2
-rw-r--r--arch/arm/mm/proc-arm946.S2
-rw-r--r--arch/arm/mm/proc-arm9tdmi.S2
-rw-r--r--arch/arm/mm/proc-fa526.S2
-rw-r--r--arch/arm/mm/proc-feroceon.S2
-rw-r--r--arch/arm/mm/proc-mohawk.S2
-rw-r--r--arch/arm/mm/proc-sa110.S2
-rw-r--r--arch/arm/mm/proc-sa1100.S2
-rw-r--r--arch/arm/mm/proc-v6.S8
-rw-r--r--arch/arm/mm/proc-v7-2level.S6
-rw-r--r--arch/arm/mm/proc-v7-3level.S59
-rw-r--r--arch/arm/mm/proc-v7.S40
-rw-r--r--arch/arm/mm/proc-v7m.S157
-rw-r--r--arch/arm/mm/proc-xsc3.S2
-rw-r--r--arch/arm/mm/proc-xscale.S2
-rw-r--r--arch/arm/net/bpf_jit_32.c18
-rw-r--r--arch/arm/plat-iop/adma.c2
-rw-r--r--arch/arm/plat-iop/gpio.c1
-rw-r--r--arch/arm/plat-iop/restart.c2
-rw-r--r--arch/arm/plat-iop/time.c2
-rw-r--r--arch/arm/plat-omap/Kconfig16
-rw-r--r--arch/arm/plat-omap/Makefile3
-rw-r--r--arch/arm/plat-omap/counter_32k.c2
-rw-r--r--arch/arm/plat-omap/dma.c11
-rw-r--r--arch/arm/plat-omap/include/plat/mailbox.h105
-rw-r--r--arch/arm/plat-omap/mailbox.c435
-rw-r--r--arch/arm/plat-orion/common.c10
-rw-r--r--arch/arm/plat-orion/gpio.c2
-rw-r--r--arch/arm/plat-orion/time.c2
-rw-r--r--arch/arm/plat-samsung/Kconfig60
-rw-r--r--arch/arm/plat-samsung/Makefile14
-rw-r--r--arch/arm/plat-samsung/include/plat/clock.h5
-rw-r--r--arch/arm/plat-samsung/include/plat/cpu-freq-core.h12
-rw-r--r--arch/arm/plat-samsung/include/plat/cpu-freq.h6
-rw-r--r--arch/arm/plat-samsung/include/plat/cpu.h8
-rw-r--r--arch/arm/plat-samsung/include/plat/dma-s3c24xx.h5
-rw-r--r--arch/arm/plat-samsung/include/plat/pm.h13
-rw-r--r--arch/arm/plat-samsung/include/plat/regs-watchdog.h41
-rw-r--r--arch/arm/plat-samsung/include/plat/uncompress.h21
-rw-r--r--arch/arm/plat-samsung/include/plat/watchdog-reset.h38
-rw-r--r--arch/arm/plat-samsung/init.c8
-rw-r--r--arch/arm/plat-samsung/pm-gpio.c5
-rw-r--r--arch/arm/plat-samsung/pm.c22
-rw-r--r--arch/arm/plat-samsung/s5p-dev-mfc.c11
-rw-r--r--arch/arm/plat-samsung/samsung-time.c2
-rw-r--r--arch/arm/plat-samsung/watchdog-reset.c97
-rw-r--r--arch/arm/plat-versatile/headsmp.S2
-rw-r--r--arch/arm/plat-versatile/platsmp.c6
-rw-r--r--arch/arm/plat-versatile/sched-clock.c2
-rw-r--r--arch/arm/xen/enlighten.c3
-rw-r--r--arch/arm/xen/hypercall.S1
1189 files changed, 41724 insertions, 35968 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 136f263ed47b..43594d5116ef 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -9,17 +9,17 @@ config ARM
9 select BUILDTIME_EXTABLE_SORT if MMU 9 select BUILDTIME_EXTABLE_SORT if MMU
10 select CPU_PM if (SUSPEND || CPU_IDLE) 10 select CPU_PM if (SUSPEND || CPU_IDLE)
11 select DCACHE_WORD_ACCESS if (CPU_V6 || CPU_V6K || CPU_V7) && !CPU_BIG_ENDIAN && MMU 11 select DCACHE_WORD_ACCESS if (CPU_V6 || CPU_V6K || CPU_V7) && !CPU_BIG_ENDIAN && MMU
12 select GENERIC_ATOMIC64 if (CPU_V6 || !CPU_32v6K || !AEABI) 12 select GENERIC_ATOMIC64 if (CPU_V7M || CPU_V6 || !CPU_32v6K || !AEABI)
13 select GENERIC_CLOCKEVENTS_BROADCAST if SMP 13 select GENERIC_CLOCKEVENTS_BROADCAST if SMP
14 select GENERIC_IRQ_PROBE 14 select GENERIC_IRQ_PROBE
15 select GENERIC_IRQ_SHOW 15 select GENERIC_IRQ_SHOW
16 select GENERIC_PCI_IOMAP 16 select GENERIC_PCI_IOMAP
17 select GENERIC_SCHED_CLOCK
17 select GENERIC_SMP_IDLE_THREAD 18 select GENERIC_SMP_IDLE_THREAD
18 select GENERIC_IDLE_POLL_SETUP 19 select GENERIC_IDLE_POLL_SETUP
19 select GENERIC_STRNCPY_FROM_USER 20 select GENERIC_STRNCPY_FROM_USER
20 select GENERIC_STRNLEN_USER 21 select GENERIC_STRNLEN_USER
21 select HARDIRQS_SW_RESEND 22 select HARDIRQS_SW_RESEND
22 select HAVE_AOUT
23 select HAVE_ARCH_JUMP_LABEL if !XIP_KERNEL 23 select HAVE_ARCH_JUMP_LABEL if !XIP_KERNEL
24 select HAVE_ARCH_KGDB 24 select HAVE_ARCH_KGDB
25 select HAVE_ARCH_SECCOMP_FILTER 25 select HAVE_ARCH_SECCOMP_FILTER
@@ -40,6 +40,7 @@ config ARM
40 select HAVE_IDE if PCI || ISA || PCMCIA 40 select HAVE_IDE if PCI || ISA || PCMCIA
41 select HAVE_IRQ_TIME_ACCOUNTING 41 select HAVE_IRQ_TIME_ACCOUNTING
42 select HAVE_KERNEL_GZIP 42 select HAVE_KERNEL_GZIP
43 select HAVE_KERNEL_LZ4
43 select HAVE_KERNEL_LZMA 44 select HAVE_KERNEL_LZMA
44 select HAVE_KERNEL_LZO 45 select HAVE_KERNEL_LZO
45 select HAVE_KERNEL_XZ 46 select HAVE_KERNEL_XZ
@@ -175,6 +176,9 @@ config ARCH_HAS_CPUFREQ
175 and that the relevant menu configurations are displayed for 176 and that the relevant menu configurations are displayed for
176 it. 177 it.
177 178
179config ARCH_HAS_BANDGAP
180 bool
181
178config GENERIC_HWEIGHT 182config GENERIC_HWEIGHT
179 bool 183 bool
180 default y 184 default y
@@ -213,7 +217,8 @@ config VECTORS_BASE
213 default DRAM_BASE if REMAP_VECTORS_TO_RAM 217 default DRAM_BASE if REMAP_VECTORS_TO_RAM
214 default 0x00000000 218 default 0x00000000
215 help 219 help
216 The base address of exception vectors. 220 The base address of exception vectors. This must be two pages
221 in size.
217 222
218config ARM_PATCH_PHYS_VIRT 223config ARM_PATCH_PHYS_VIRT
219 bool "Patch physical to virtual translations at runtime" if EMBEDDED 224 bool "Patch physical to virtual translations at runtime" if EMBEDDED
@@ -366,11 +371,12 @@ config ARCH_CLPS711X
366 select ARCH_REQUIRE_GPIOLIB 371 select ARCH_REQUIRE_GPIOLIB
367 select AUTO_ZRELADDR 372 select AUTO_ZRELADDR
368 select CLKDEV_LOOKUP 373 select CLKDEV_LOOKUP
374 select CLKSRC_MMIO
369 select COMMON_CLK 375 select COMMON_CLK
370 select CPU_ARM720T 376 select CPU_ARM720T
371 select GENERIC_CLOCKEVENTS 377 select GENERIC_CLOCKEVENTS
378 select MFD_SYSCON
372 select MULTI_IRQ_HANDLER 379 select MULTI_IRQ_HANDLER
373 select NEED_MACH_MEMORY_H
374 select SPARSE_IRQ 380 select SPARSE_IRQ
375 help 381 help
376 Support for Cirrus Logic 711x/721x/731x based boards. 382 Support for Cirrus Logic 711x/721x/731x based boards.
@@ -502,6 +508,7 @@ config ARCH_DOVE
502 508
503config ARCH_KIRKWOOD 509config ARCH_KIRKWOOD
504 bool "Marvell Kirkwood" 510 bool "Marvell Kirkwood"
511 select ARCH_HAS_CPUFREQ
505 select ARCH_REQUIRE_GPIOLIB 512 select ARCH_REQUIRE_GPIOLIB
506 select CPU_FEROCEON 513 select CPU_FEROCEON
507 select GENERIC_CLOCKEVENTS 514 select GENERIC_CLOCKEVENTS
@@ -623,8 +630,8 @@ config ARCH_MSM
623 bool "Qualcomm MSM" 630 bool "Qualcomm MSM"
624 select ARCH_REQUIRE_GPIOLIB 631 select ARCH_REQUIRE_GPIOLIB
625 select CLKDEV_LOOKUP 632 select CLKDEV_LOOKUP
633 select COMMON_CLK
626 select GENERIC_CLOCKEVENTS 634 select GENERIC_CLOCKEVENTS
627 select HAVE_CLK
628 help 635 help
629 Support for Qualcomm MSM/QSD based systems. This runs on the 636 Support for Qualcomm MSM/QSD based systems. This runs on the
630 apps processor of the MSM/QSD and depends on a shared memory 637 apps processor of the MSM/QSD and depends on a shared memory
@@ -634,6 +641,7 @@ config ARCH_MSM
634 641
635config ARCH_SHMOBILE 642config ARCH_SHMOBILE
636 bool "Renesas SH-Mobile / R-Mobile" 643 bool "Renesas SH-Mobile / R-Mobile"
644 select ARM_PATCH_PHYS_VIRT
637 select CLKDEV_LOOKUP 645 select CLKDEV_LOOKUP
638 select GENERIC_CLOCKEVENTS 646 select GENERIC_CLOCKEVENTS
639 select HAVE_ARM_SCU if SMP 647 select HAVE_ARM_SCU if SMP
@@ -643,9 +651,8 @@ config ARCH_SHMOBILE
643 select HAVE_SMP 651 select HAVE_SMP
644 select MIGHT_HAVE_CACHE_L2X0 652 select MIGHT_HAVE_CACHE_L2X0
645 select MULTI_IRQ_HANDLER 653 select MULTI_IRQ_HANDLER
646 select NEED_MACH_MEMORY_H
647 select NO_IOPORT 654 select NO_IOPORT
648 select PINCTRL if ARCH_WANT_OPTIONAL_GPIOLIB 655 select PINCTRL
649 select PM_GENERIC_DOMAINS if PM 656 select PM_GENERIC_DOMAINS if PM
650 select SPARSE_IRQ 657 select SPARSE_IRQ
651 help 658 help
@@ -695,6 +702,7 @@ config ARCH_S3C24XX
695 select CLKDEV_LOOKUP 702 select CLKDEV_LOOKUP
696 select CLKSRC_MMIO 703 select CLKSRC_MMIO
697 select GENERIC_CLOCKEVENTS 704 select GENERIC_CLOCKEVENTS
705 select GPIO_SAMSUNG
698 select HAVE_CLK 706 select HAVE_CLK
699 select HAVE_S3C2410_I2C if I2C 707 select HAVE_S3C2410_I2C if I2C
700 select HAVE_S3C2410_WATCHDOG if WATCHDOG 708 select HAVE_S3C2410_WATCHDOG if WATCHDOG
@@ -702,6 +710,7 @@ config ARCH_S3C24XX
702 select MULTI_IRQ_HANDLER 710 select MULTI_IRQ_HANDLER
703 select NEED_MACH_GPIO_H 711 select NEED_MACH_GPIO_H
704 select NEED_MACH_IO_H 712 select NEED_MACH_IO_H
713 select SAMSUNG_ATAGS
705 help 714 help
706 Samsung S3C2410, S3C2412, S3C2413, S3C2416, S3C2440, S3C2442, S3C2443 715 Samsung S3C2410, S3C2412, S3C2413, S3C2416, S3C2440, S3C2442, S3C2443
707 and S3C2450 SoCs based systems, such as the Simtec Electronics BAST 716 and S3C2450 SoCs based systems, such as the Simtec Electronics BAST
@@ -717,6 +726,7 @@ config ARCH_S3C64XX
717 select CLKSRC_MMIO 726 select CLKSRC_MMIO
718 select CPU_V6 727 select CPU_V6
719 select GENERIC_CLOCKEVENTS 728 select GENERIC_CLOCKEVENTS
729 select GPIO_SAMSUNG
720 select HAVE_CLK 730 select HAVE_CLK
721 select HAVE_S3C2410_I2C if I2C 731 select HAVE_S3C2410_I2C if I2C
722 select HAVE_S3C2410_WATCHDOG if WATCHDOG 732 select HAVE_S3C2410_WATCHDOG if WATCHDOG
@@ -726,9 +736,11 @@ config ARCH_S3C64XX
726 select PLAT_SAMSUNG 736 select PLAT_SAMSUNG
727 select S3C_DEV_NAND 737 select S3C_DEV_NAND
728 select S3C_GPIO_TRACK 738 select S3C_GPIO_TRACK
739 select SAMSUNG_ATAGS
729 select SAMSUNG_CLKSRC 740 select SAMSUNG_CLKSRC
730 select SAMSUNG_GPIOLIB_4BIT 741 select SAMSUNG_GPIOLIB_4BIT
731 select SAMSUNG_IRQ_VIC_TIMER 742 select SAMSUNG_IRQ_VIC_TIMER
743 select SAMSUNG_WDT_RESET
732 select USB_ARCH_HAS_OHCI 744 select USB_ARCH_HAS_OHCI
733 help 745 help
734 Samsung S3C64XX series based systems 746 Samsung S3C64XX series based systems
@@ -739,11 +751,14 @@ config ARCH_S5P64X0
739 select CLKSRC_MMIO 751 select CLKSRC_MMIO
740 select CPU_V6 752 select CPU_V6
741 select GENERIC_CLOCKEVENTS 753 select GENERIC_CLOCKEVENTS
754 select GPIO_SAMSUNG
742 select HAVE_CLK 755 select HAVE_CLK
743 select HAVE_S3C2410_I2C if I2C 756 select HAVE_S3C2410_I2C if I2C
744 select HAVE_S3C2410_WATCHDOG if WATCHDOG 757 select HAVE_S3C2410_WATCHDOG if WATCHDOG
745 select HAVE_S3C_RTC if RTC_CLASS 758 select HAVE_S3C_RTC if RTC_CLASS
746 select NEED_MACH_GPIO_H 759 select NEED_MACH_GPIO_H
760 select SAMSUNG_WDT_RESET
761 select SAMSUNG_ATAGS
747 help 762 help
748 Samsung S5P64X0 CPU based systems, such as the Samsung SMDK6440, 763 Samsung S5P64X0 CPU based systems, such as the Samsung SMDK6440,
749 SMDK6450. 764 SMDK6450.
@@ -755,11 +770,14 @@ config ARCH_S5PC100
755 select CLKSRC_MMIO 770 select CLKSRC_MMIO
756 select CPU_V7 771 select CPU_V7
757 select GENERIC_CLOCKEVENTS 772 select GENERIC_CLOCKEVENTS
773 select GPIO_SAMSUNG
758 select HAVE_CLK 774 select HAVE_CLK
759 select HAVE_S3C2410_I2C if I2C 775 select HAVE_S3C2410_I2C if I2C
760 select HAVE_S3C2410_WATCHDOG if WATCHDOG 776 select HAVE_S3C2410_WATCHDOG if WATCHDOG
761 select HAVE_S3C_RTC if RTC_CLASS 777 select HAVE_S3C_RTC if RTC_CLASS
762 select NEED_MACH_GPIO_H 778 select NEED_MACH_GPIO_H
779 select SAMSUNG_WDT_RESET
780 select SAMSUNG_ATAGS
763 help 781 help
764 Samsung S5PC100 series based systems 782 Samsung S5PC100 series based systems
765 783
@@ -772,12 +790,14 @@ config ARCH_S5PV210
772 select CLKSRC_MMIO 790 select CLKSRC_MMIO
773 select CPU_V7 791 select CPU_V7
774 select GENERIC_CLOCKEVENTS 792 select GENERIC_CLOCKEVENTS
793 select GPIO_SAMSUNG
775 select HAVE_CLK 794 select HAVE_CLK
776 select HAVE_S3C2410_I2C if I2C 795 select HAVE_S3C2410_I2C if I2C
777 select HAVE_S3C2410_WATCHDOG if WATCHDOG 796 select HAVE_S3C2410_WATCHDOG if WATCHDOG
778 select HAVE_S3C_RTC if RTC_CLASS 797 select HAVE_S3C_RTC if RTC_CLASS
779 select NEED_MACH_GPIO_H 798 select NEED_MACH_GPIO_H
780 select NEED_MACH_MEMORY_H 799 select NEED_MACH_MEMORY_H
800 select SAMSUNG_ATAGS
781 help 801 help
782 Samsung S5PV210/S5PC110 series based systems 802 Samsung S5PV210/S5PC110 series based systems
783 803
@@ -785,7 +805,9 @@ config ARCH_EXYNOS
785 bool "Samsung EXYNOS" 805 bool "Samsung EXYNOS"
786 select ARCH_HAS_CPUFREQ 806 select ARCH_HAS_CPUFREQ
787 select ARCH_HAS_HOLES_MEMORYMODEL 807 select ARCH_HAS_HOLES_MEMORYMODEL
808 select ARCH_REQUIRE_GPIOLIB
788 select ARCH_SPARSEMEM_ENABLE 809 select ARCH_SPARSEMEM_ENABLE
810 select ARM_GIC
789 select CLKDEV_LOOKUP 811 select CLKDEV_LOOKUP
790 select COMMON_CLK 812 select COMMON_CLK
791 select CPU_V7 813 select CPU_V7
@@ -794,8 +816,9 @@ config ARCH_EXYNOS
794 select HAVE_S3C2410_I2C if I2C 816 select HAVE_S3C2410_I2C if I2C
795 select HAVE_S3C2410_WATCHDOG if WATCHDOG 817 select HAVE_S3C2410_WATCHDOG if WATCHDOG
796 select HAVE_S3C_RTC if RTC_CLASS 818 select HAVE_S3C_RTC if RTC_CLASS
797 select NEED_MACH_GPIO_H
798 select NEED_MACH_MEMORY_H 819 select NEED_MACH_MEMORY_H
820 select SPARSE_IRQ
821 select USE_OF
799 help 822 help
800 Support for SAMSUNG's EXYNOS SoCs (EXYNOS4/5) 823 Support for SAMSUNG's EXYNOS SoCs (EXYNOS4/5)
801 824
@@ -813,23 +836,6 @@ config ARCH_SHARK
813 Support for the StrongARM based Digital DNARD machine, also known 836 Support for the StrongARM based Digital DNARD machine, also known
814 as "Shark" (<http://www.shark-linux.de/shark.html>). 837 as "Shark" (<http://www.shark-linux.de/shark.html>).
815 838
816config ARCH_U300
817 bool "ST-Ericsson U300 Series"
818 depends on MMU
819 select ARCH_REQUIRE_GPIOLIB
820 select ARM_AMBA
821 select ARM_PATCH_PHYS_VIRT
822 select ARM_VIC
823 select CLKDEV_LOOKUP
824 select CLKSRC_MMIO
825 select COMMON_CLK
826 select CPU_ARM926T
827 select GENERIC_CLOCKEVENTS
828 select HAVE_TCM
829 select SPARSE_IRQ
830 help
831 Support for ST-Ericsson U300 series mobile platforms.
832
833config ARCH_DAVINCI 839config ARCH_DAVINCI
834 bool "TI DaVinci" 840 bool "TI DaVinci"
835 select ARCH_HAS_HOLES_MEMORYMODEL 841 select ARCH_HAS_HOLES_MEMORYMODEL
@@ -840,6 +846,7 @@ config ARCH_DAVINCI
840 select GENERIC_IRQ_CHIP 846 select GENERIC_IRQ_CHIP
841 select HAVE_IDE 847 select HAVE_IDE
842 select NEED_MACH_GPIO_H 848 select NEED_MACH_GPIO_H
849 select TI_PRIV_EDMA
843 select USE_OF 850 select USE_OF
844 select ZONE_DMA 851 select ZONE_DMA
845 help 852 help
@@ -871,20 +878,21 @@ menu "Multiple platform selection"
871 878
872comment "CPU Core family selection" 879comment "CPU Core family selection"
873 880
874config ARCH_MULTI_V4
875 bool "ARMv4 based platforms (FA526, StrongARM)"
876 depends on !ARCH_MULTI_V6_V7
877 select ARCH_MULTI_V4_V5
878
879config ARCH_MULTI_V4T 881config ARCH_MULTI_V4T
880 bool "ARMv4T based platforms (ARM720T, ARM920T, ...)" 882 bool "ARMv4T based platforms (ARM720T, ARM920T, ...)"
881 depends on !ARCH_MULTI_V6_V7 883 depends on !ARCH_MULTI_V6_V7
882 select ARCH_MULTI_V4_V5 884 select ARCH_MULTI_V4_V5
885 select CPU_ARM920T if !(CPU_ARM7TDMI || CPU_ARM720T || \
886 CPU_ARM740T || CPU_ARM9TDMI || CPU_ARM922T || \
887 CPU_ARM925T || CPU_ARM940T)
883 888
884config ARCH_MULTI_V5 889config ARCH_MULTI_V5
885 bool "ARMv5 based platforms (ARM926T, XSCALE, PJ1, ...)" 890 bool "ARMv5 based platforms (ARM926T, XSCALE, PJ1, ...)"
886 depends on !ARCH_MULTI_V6_V7 891 depends on !ARCH_MULTI_V6_V7
887 select ARCH_MULTI_V4_V5 892 select ARCH_MULTI_V4_V5
893 select CPU_ARM926T if (!CPU_ARM946E || CPU_ARM1020 || \
894 CPU_ARM1020E || CPU_ARM1022 || CPU_ARM1026 || \
895 CPU_XSCALE || CPU_XSC3 || CPU_MOHAWK || CPU_FEROCEON)
888 896
889config ARCH_MULTI_V4_V5 897config ARCH_MULTI_V4_V5
890 bool 898 bool
@@ -948,6 +956,8 @@ source "arch/arm/mach-iop13xx/Kconfig"
948 956
949source "arch/arm/mach-ixp4xx/Kconfig" 957source "arch/arm/mach-ixp4xx/Kconfig"
950 958
959source "arch/arm/mach-keystone/Kconfig"
960
951source "arch/arm/mach-kirkwood/Kconfig" 961source "arch/arm/mach-kirkwood/Kconfig"
952 962
953source "arch/arm/mach-ks8695/Kconfig" 963source "arch/arm/mach-ks8695/Kconfig"
@@ -964,6 +974,8 @@ source "arch/arm/mach-netx/Kconfig"
964 974
965source "arch/arm/mach-nomadik/Kconfig" 975source "arch/arm/mach-nomadik/Kconfig"
966 976
977source "arch/arm/mach-nspire/Kconfig"
978
967source "arch/arm/plat-omap/Kconfig" 979source "arch/arm/plat-omap/Kconfig"
968 980
969source "arch/arm/mach-omap1/Kconfig" 981source "arch/arm/mach-omap1/Kconfig"
@@ -981,6 +993,8 @@ source "arch/arm/mach-mmp/Kconfig"
981 993
982source "arch/arm/mach-realview/Kconfig" 994source "arch/arm/mach-realview/Kconfig"
983 995
996source "arch/arm/mach-rockchip/Kconfig"
997
984source "arch/arm/mach-sa1100/Kconfig" 998source "arch/arm/mach-sa1100/Kconfig"
985 999
986source "arch/arm/plat-samsung/Kconfig" 1000source "arch/arm/plat-samsung/Kconfig"
@@ -989,6 +1003,8 @@ source "arch/arm/mach-socfpga/Kconfig"
989 1003
990source "arch/arm/mach-spear/Kconfig" 1004source "arch/arm/mach-spear/Kconfig"
991 1005
1006source "arch/arm/mach-sti/Kconfig"
1007
992source "arch/arm/mach-s3c24xx/Kconfig" 1008source "arch/arm/mach-s3c24xx/Kconfig"
993 1009
994if ARCH_S3C64XX 1010if ARCH_S3C64XX
@@ -1300,7 +1316,7 @@ config ARM_ERRATA_754327
1300 1316
1301config ARM_ERRATA_364296 1317config ARM_ERRATA_364296
1302 bool "ARM errata: Possible cache data corruption with hit-under-miss enabled" 1318 bool "ARM errata: Possible cache data corruption with hit-under-miss enabled"
1303 depends on CPU_V6 && !SMP 1319 depends on CPU_V6
1304 help 1320 help
1305 This options enables the workaround for the 364296 ARM1136 1321 This options enables the workaround for the 364296 ARM1136
1306 r0p2 erratum (possible cache data corruption with 1322 r0p2 erratum (possible cache data corruption with
@@ -1417,6 +1433,7 @@ config PCI_HOST_ITE8152
1417 select DMABOUNCE 1433 select DMABOUNCE
1418 1434
1419source "drivers/pci/Kconfig" 1435source "drivers/pci/Kconfig"
1436source "drivers/pci/pcie/Kconfig"
1420 1437
1421source "drivers/pcmcia/Kconfig" 1438source "drivers/pcmcia/Kconfig"
1422 1439
@@ -1438,7 +1455,7 @@ config SMP
1438 depends on CPU_V6K || CPU_V7 1455 depends on CPU_V6K || CPU_V7
1439 depends on GENERIC_CLOCKEVENTS 1456 depends on GENERIC_CLOCKEVENTS
1440 depends on HAVE_SMP 1457 depends on HAVE_SMP
1441 depends on MMU 1458 depends on MMU || ARM_MPU
1442 select USE_GENERIC_SMP_HELPERS 1459 select USE_GENERIC_SMP_HELPERS
1443 help 1460 help
1444 This enables support for systems with more than one CPU. If you have 1461 This enables support for systems with more than one CPU. If you have
@@ -1459,7 +1476,7 @@ config SMP
1459 1476
1460config SMP_ON_UP 1477config SMP_ON_UP
1461 bool "Allow booting SMP kernel on uniprocessor systems (EXPERIMENTAL)" 1478 bool "Allow booting SMP kernel on uniprocessor systems (EXPERIMENTAL)"
1462 depends on SMP && !XIP_KERNEL 1479 depends on SMP && !XIP_KERNEL && MMU
1463 default y 1480 default y
1464 help 1481 help
1465 SMP kernels contain instructions which fail on non-SMP processors. 1482 SMP kernels contain instructions which fail on non-SMP processors.
@@ -1552,7 +1569,7 @@ config NR_CPUS
1552 1569
1553config HOTPLUG_CPU 1570config HOTPLUG_CPU
1554 bool "Support for hot-pluggable CPUs" 1571 bool "Support for hot-pluggable CPUs"
1555 depends on SMP && HOTPLUG 1572 depends on SMP
1556 help 1573 help
1557 Say Y here to experiment with turning CPUs off and on. CPUs 1574 Say Y here to experiment with turning CPUs off and on. CPUs
1558 can be controlled through /sys/devices/system/cpu. 1575 can be controlled through /sys/devices/system/cpu.
@@ -1583,7 +1600,7 @@ config LOCAL_TIMERS
1583config ARCH_NR_GPIO 1600config ARCH_NR_GPIO
1584 int 1601 int
1585 default 1024 if ARCH_SHMOBILE || ARCH_TEGRA 1602 default 1024 if ARCH_SHMOBILE || ARCH_TEGRA
1586 default 512 if SOC_OMAP5 1603 default 512 if ARCH_EXYNOS || ARCH_KEYSTONE || SOC_OMAP5
1587 default 392 if ARCH_U8500 1604 default 392 if ARCH_U8500
1588 default 352 if ARCH_VT8500 1605 default 352 if ARCH_VT8500
1589 default 288 if ARCH_SUNXI 1606 default 288 if ARCH_SUNXI
@@ -1609,7 +1626,7 @@ config SCHED_HRTICK
1609 1626
1610config THUMB2_KERNEL 1627config THUMB2_KERNEL
1611 bool "Compile the kernel in Thumb-2 mode" if !CPU_THUMBONLY 1628 bool "Compile the kernel in Thumb-2 mode" if !CPU_THUMBONLY
1612 depends on CPU_V7 && !CPU_V6 && !CPU_V6K 1629 depends on (CPU_V7 || CPU_V7M) && !CPU_V6 && !CPU_V6K
1613 default y if CPU_THUMBONLY 1630 default y if CPU_THUMBONLY
1614 select AEABI 1631 select AEABI
1615 select ARM_ASM_UNIFIED 1632 select ARM_ASM_UNIFIED
@@ -1731,6 +1748,14 @@ config HW_PERF_EVENTS
1731 Enable hardware performance counter support for perf events. If 1748 Enable hardware performance counter support for perf events. If
1732 disabled, perf events will use software events only. 1749 disabled, perf events will use software events only.
1733 1750
1751config SYS_SUPPORTS_HUGETLBFS
1752 def_bool y
1753 depends on ARM_LPAE
1754
1755config HAVE_ARCH_TRANSPARENT_HUGEPAGE
1756 def_bool y
1757 depends on ARM_LPAE
1758
1734source "mm/Kconfig" 1759source "mm/Kconfig"
1735 1760
1736config FORCE_MAX_ZONEORDER 1761config FORCE_MAX_ZONEORDER
@@ -2064,7 +2089,7 @@ config CRASH_DUMP
2064 2089
2065config AUTO_ZRELADDR 2090config AUTO_ZRELADDR
2066 bool "Auto calculation of the decompressed kernel image address" 2091 bool "Auto calculation of the decompressed kernel image address"
2067 depends on !ZBOOT_ROM && !ARCH_U300 2092 depends on !ZBOOT_ROM
2068 help 2093 help
2069 ZRELADDR is the physical address where the decompressed kernel 2094 ZRELADDR is the physical address where the decompressed kernel
2070 image will be placed. If AUTO_ZRELADDR is selected, the address 2095 image will be placed. If AUTO_ZRELADDR is selected, the address
@@ -2078,53 +2103,6 @@ menu "CPU Power Management"
2078 2103
2079if ARCH_HAS_CPUFREQ 2104if ARCH_HAS_CPUFREQ
2080source "drivers/cpufreq/Kconfig" 2105source "drivers/cpufreq/Kconfig"
2081
2082config CPU_FREQ_S3C
2083 bool
2084 help
2085 Internal configuration node for common cpufreq on Samsung SoC
2086
2087config CPU_FREQ_S3C24XX
2088 bool "CPUfreq driver for Samsung S3C24XX series CPUs (EXPERIMENTAL)"
2089 depends on ARCH_S3C24XX && CPU_FREQ
2090 select CPU_FREQ_S3C
2091 help
2092 This enables the CPUfreq driver for the Samsung S3C24XX family
2093 of CPUs.
2094
2095 For details, take a look at <file:Documentation/cpu-freq>.
2096
2097 If in doubt, say N.
2098
2099config CPU_FREQ_S3C24XX_PLL
2100 bool "Support CPUfreq changing of PLL frequency (EXPERIMENTAL)"
2101 depends on CPU_FREQ_S3C24XX
2102 help
2103 Compile in support for changing the PLL frequency from the
2104 S3C24XX series CPUfreq driver. The PLL takes time to settle
2105 after a frequency change, so by default it is not enabled.
2106
2107 This also means that the PLL tables for the selected CPU(s) will
2108 be built which may increase the size of the kernel image.
2109
2110config CPU_FREQ_S3C24XX_DEBUG
2111 bool "Debug CPUfreq Samsung driver core"
2112 depends on CPU_FREQ_S3C24XX
2113 help
2114 Enable s3c_freq_dbg for the Samsung S3C CPUfreq core
2115
2116config CPU_FREQ_S3C24XX_IODEBUG
2117 bool "Debug CPUfreq Samsung driver IO timing"
2118 depends on CPU_FREQ_S3C24XX
2119 help
2120 Enable s3c_freq_iodbg for the Samsung S3C CPUfreq core
2121
2122config CPU_FREQ_S3C24XX_DEBUGFS
2123 bool "Export debugfs for CPUFreq"
2124 depends on CPU_FREQ_S3C24XX && DEBUG_FS
2125 help
2126 Export status information via debugfs.
2127
2128endif 2106endif
2129 2107
2130source "drivers/cpuidle/Kconfig" 2108source "drivers/cpuidle/Kconfig"
diff --git a/arch/arm/Kconfig-nommu b/arch/arm/Kconfig-nommu
index 2cef8e13f9f8..aed66d5df7f1 100644
--- a/arch/arm/Kconfig-nommu
+++ b/arch/arm/Kconfig-nommu
@@ -28,7 +28,7 @@ config FLASH_SIZE
28config PROCESSOR_ID 28config PROCESSOR_ID
29 hex 'Hard wire the processor ID' 29 hex 'Hard wire the processor ID'
30 default 0x00007700 30 default 0x00007700
31 depends on !CPU_CP15 31 depends on !(CPU_CP15 || CPU_V7M)
32 help 32 help
33 If processor has no CP15 register, this processor ID is 33 If processor has no CP15 register, this processor ID is
34 used instead of the auto-probing which utilizes the register. 34 used instead of the auto-probing which utilizes the register.
@@ -50,3 +50,15 @@ config REMAP_VECTORS_TO_RAM
50 Otherwise, say 'y' here. In this case, the kernel will require 50 Otherwise, say 'y' here. In this case, the kernel will require
51 external support to redirect the hardware exception vectors to 51 external support to redirect the hardware exception vectors to
52 the writable versions located at DRAM_BASE. 52 the writable versions located at DRAM_BASE.
53
54config ARM_MPU
55 bool 'Use the ARM v7 PMSA Compliant MPU'
56 depends on CPU_V7
57 default y
58 help
59 Some ARM systems without an MMU have instead a Memory Protection
60 Unit (MPU) that defines the type and permissions for regions of
61 memory.
62
63 If your CPU has an MPU then you should choose 'y' here unless you
64 know that you do not want to use the MPU.
diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug
index 1d41908d5cda..583f4a00ec32 100644
--- a/arch/arm/Kconfig.debug
+++ b/arch/arm/Kconfig.debug
@@ -251,6 +251,27 @@ choice
251 Say Y here if you want kernel low-level debugging support 251 Say Y here if you want kernel low-level debugging support
252 on i.MX6Q/DL. 252 on i.MX6Q/DL.
253 253
254 config DEBUG_IMX6SL_UART
255 bool "i.MX6SL Debug UART"
256 depends on SOC_IMX6SL
257 help
258 Say Y here if you want kernel low-level debugging support
259 on i.MX6SL.
260
261 config DEBUG_KEYSTONE_UART0
262 bool "Kernel low-level debugging on KEYSTONE2 using UART0"
263 depends on ARCH_KEYSTONE
264 help
265 Say Y here if you want the debug print routines to direct
266 their output to UART0 serial port on KEYSTONE2 devices.
267
268 config DEBUG_KEYSTONE_UART1
269 bool "Kernel low-level debugging on KEYSTONE2 using UART1"
270 depends on ARCH_KEYSTONE
271 help
272 Say Y here if you want the debug print routines to direct
273 their output to UART1 serial port on KEYSTONE2 devices.
274
254 config DEBUG_MMP_UART2 275 config DEBUG_MMP_UART2
255 bool "Kernel low-level debugging message via MMP UART2" 276 bool "Kernel low-level debugging message via MMP UART2"
256 depends on ARCH_MMP 277 depends on ARCH_MMP
@@ -303,12 +324,37 @@ choice
303 their output to the serial port on MSM 8960 devices. 324 their output to the serial port on MSM 8960 devices.
304 325
305 config DEBUG_MVEBU_UART 326 config DEBUG_MVEBU_UART
306 bool "Kernel low-level debugging messages via MVEBU UART" 327 bool "Kernel low-level debugging messages via MVEBU UART (old bootloaders)"
328 depends on ARCH_MVEBU
329 help
330 Say Y here if you want kernel low-level debugging support
331 on MVEBU based platforms.
332
333 This option should be used with the old bootloaders
334 that left the internal registers mapped at
335 0xd0000000. As of today, this is the case on
336 platforms such as the Globalscale Mirabox or the
337 Plathome OpenBlocks AX3, when using the original
338 bootloader.
339
340 If the wrong DEBUG_MVEBU_UART* option is selected,
341 when u-boot hands over to the kernel, the system
342 silently crashes, with no serial output at all.
343
344 config DEBUG_MVEBU_UART_ALTERNATE
345 bool "Kernel low-level debugging messages via MVEBU UART (new bootloaders)"
307 depends on ARCH_MVEBU 346 depends on ARCH_MVEBU
308 help 347 help
309 Say Y here if you want kernel low-level debugging support 348 Say Y here if you want kernel low-level debugging support
310 on MVEBU based platforms. 349 on MVEBU based platforms.
311 350
351 This option should be used with the new bootloaders
352 that remap the internal registers at 0xf1000000.
353
354 If the wrong DEBUG_MVEBU_UART* option is selected,
355 when u-boot hands over to the kernel, the system
356 silently crashes, with no serial output at all.
357
312 config DEBUG_NOMADIK_UART 358 config DEBUG_NOMADIK_UART
313 bool "Kernel low-level debugging messages via NOMADIK UART" 359 bool "Kernel low-level debugging messages via NOMADIK UART"
314 depends on ARCH_NOMADIK 360 depends on ARCH_NOMADIK
@@ -316,6 +362,20 @@ choice
316 Say Y here if you want kernel low-level debugging support 362 Say Y here if you want kernel low-level debugging support
317 on NOMADIK based platforms. 363 on NOMADIK based platforms.
318 364
365 config DEBUG_NSPIRE_CLASSIC_UART
366 bool "Kernel low-level debugging via TI-NSPIRE 8250 UART"
367 depends on ARCH_NSPIRE
368 help
369 Say Y here if you want kernel low-level debugging support
370 on TI-NSPIRE classic models.
371
372 config DEBUG_NSPIRE_CX_UART
373 bool "Kernel low-level debugging via TI-NSPIRE PL011 UART"
374 depends on ARCH_NSPIRE
375 help
376 Say Y here if you want kernel low-level debugging support
377 on TI-NSPIRE CX models.
378
319 config DEBUG_OMAP2PLUS_UART 379 config DEBUG_OMAP2PLUS_UART
320 bool "Kernel low-level debugging messages via OMAP2PLUS UART" 380 bool "Kernel low-level debugging messages via OMAP2PLUS UART"
321 depends on ARCH_OMAP2PLUS 381 depends on ARCH_OMAP2PLUS
@@ -353,6 +413,13 @@ choice
353 their output to the standard serial port on the RealView 413 their output to the standard serial port on the RealView
354 PB1176 platform. 414 PB1176 platform.
355 415
416 config DEBUG_ROCKCHIP_UART
417 bool "Kernel low-level debugging messages via Rockchip UART"
418 depends on ARCH_ROCKCHIP
419 help
420 Say Y here if you want kernel low-level debugging support
421 on Rockchip based platforms.
422
356 config DEBUG_S3C_UART0 423 config DEBUG_S3C_UART0
357 depends on PLAT_SAMSUNG 424 depends on PLAT_SAMSUNG
358 select DEBUG_EXYNOS_UART if ARCH_EXYNOS 425 select DEBUG_EXYNOS_UART if ARCH_EXYNOS
@@ -443,6 +510,23 @@ choice
443 Say Y here if you want the debug print routines to direct 510 Say Y here if you want the debug print routines to direct
444 their output to the uart1 port on SiRFmarco devices. 511 their output to the uart1 port on SiRFmarco devices.
445 512
513 config DEBUG_STI_UART
514 depends on ARCH_STI
515 bool "Use StiH415/416 ASC for low-level debug"
516 help
517 Say Y here if you want kernel low-level debugging support
518 on StiH415/416 based platforms like B2000, B2020.
519 It support UART2 and SBC_UART1.
520
521 If unsure, say N.
522
523 config DEBUG_U300_UART
524 bool "Kernel low-level debugging messages via U300 UART0"
525 depends on ARCH_U300
526 help
527 Say Y here if you want the debug print routines to direct
528 their output to the uart port on U300 devices.
529
446 config DEBUG_UX500_UART 530 config DEBUG_UX500_UART
447 depends on ARCH_U8500 531 depends on ARCH_U8500
448 bool "Use Ux500 UART for low-level debug" 532 bool "Use Ux500 UART for low-level debug"
@@ -476,6 +560,13 @@ choice
476 of the tiles using the RS1 memory map, including all new A-class 560 of the tiles using the RS1 memory map, including all new A-class
477 core tiles, FPGA-based SMMs and software models. 561 core tiles, FPGA-based SMMs and software models.
478 562
563 config DEBUG_VEXPRESS_UART0_CRX
564 bool "Use PL011 UART0 at 0xb0090000 (Cortex-R compliant tiles)"
565 depends on ARCH_VEXPRESS && !MMU
566 help
567 This option selects UART0 at 0xb0090000. This is appropriate for
568 Cortex-R series tiles and SMMs, such as Cortex-R5 and Cortex-R7
569
479 config DEBUG_VT8500_UART0 570 config DEBUG_VT8500_UART0
480 bool "Use UART0 on VIA/Wondermedia SoCs" 571 bool "Use UART0 on VIA/Wondermedia SoCs"
481 depends on ARCH_VT8500 572 depends on ARCH_VT8500
@@ -532,7 +623,8 @@ config DEBUG_IMX_UART_PORT
532 DEBUG_IMX35_UART || \ 623 DEBUG_IMX35_UART || \
533 DEBUG_IMX51_UART || \ 624 DEBUG_IMX51_UART || \
534 DEBUG_IMX53_UART || \ 625 DEBUG_IMX53_UART || \
535 DEBUG_IMX6Q_UART 626 DEBUG_IMX6Q_UART || \
627 DEBUG_IMX6SL_UART
536 default 1 628 default 1
537 depends on ARCH_MXC 629 depends on ARCH_MXC
538 help 630 help
@@ -589,6 +681,32 @@ endchoice
589 681
590choice 682choice
591 prompt "Low-level debug console UART" 683 prompt "Low-level debug console UART"
684 depends on DEBUG_ROCKCHIP_UART
685
686 config DEBUG_RK29_UART0
687 bool "RK29 UART0"
688
689 config DEBUG_RK29_UART1
690 bool "RK29 UART1"
691
692 config DEBUG_RK29_UART2
693 bool "RK29 UART2"
694
695 config DEBUG_RK3X_UART0
696 bool "RK3X UART0"
697
698 config DEBUG_RK3X_UART1
699 bool "RK3X UART1"
700
701 config DEBUG_RK3X_UART2
702 bool "RK3X UART2"
703
704 config DEBUG_RK3X_UART3
705 bool "RK3X UART3"
706endchoice
707
708choice
709 prompt "Low-level debug console UART"
592 depends on DEBUG_LL && DEBUG_TEGRA_UART 710 depends on DEBUG_LL && DEBUG_TEGRA_UART
593 711
594 config TEGRA_DEBUG_UART_AUTO_ODMDATA 712 config TEGRA_DEBUG_UART_AUTO_ODMDATA
@@ -617,6 +735,30 @@ choice
617 735
618endchoice 736endchoice
619 737
738choice
739 prompt "Low-level debug console UART"
740 depends on DEBUG_LL && DEBUG_STI_UART
741
742 config STIH41X_DEBUG_ASC2
743 bool "ASC2 UART"
744 help
745 Say Y here if you want kernel low-level debugging support
746 on STiH415/416 based platforms like b2000, which has
747 default UART wired up to ASC2.
748
749 If unsure, say N.
750
751 config STIH41X_DEBUG_SBC_ASC1
752 bool "SBC ASC1 UART"
753 help
754 Say Y here if you want kernel low-level debugging support
755 on STiH415/416 based platforms like b2020. which has
756 default UART wired up to SBC ASC1.
757
758 If unsure, say N.
759
760endchoice
761
620config DEBUG_LL_INCLUDE 762config DEBUG_LL_INCLUDE
621 string 763 string
622 default "debug/bcm2835.S" if DEBUG_BCM2835 764 default "debug/bcm2835.S" if DEBUG_BCM2835
@@ -631,30 +773,50 @@ config DEBUG_LL_INCLUDE
631 DEBUG_IMX35_UART || \ 773 DEBUG_IMX35_UART || \
632 DEBUG_IMX51_UART || \ 774 DEBUG_IMX51_UART || \
633 DEBUG_IMX53_UART ||\ 775 DEBUG_IMX53_UART ||\
634 DEBUG_IMX6Q_UART 776 DEBUG_IMX6Q_UART || \
635 default "debug/mvebu.S" if DEBUG_MVEBU_UART 777 DEBUG_IMX6SL_UART
778 default "debug/keystone.S" if DEBUG_KEYSTONE_UART0 || \
779 DEBUG_KEYSTONE_UART1
780 default "debug/mvebu.S" if DEBUG_MVEBU_UART || \
781 DEBUG_MVEBU_UART_ALTERNATE
636 default "debug/mxs.S" if DEBUG_IMX23_UART || DEBUG_IMX28_UART 782 default "debug/mxs.S" if DEBUG_IMX23_UART || DEBUG_IMX28_UART
637 default "debug/nomadik.S" if DEBUG_NOMADIK_UART 783 default "debug/nomadik.S" if DEBUG_NOMADIK_UART
784 default "debug/nspire.S" if DEBUG_NSPIRE_CX_UART || \
785 DEBUG_NSPIRE_CLASSIC_UART
638 default "debug/omap2plus.S" if DEBUG_OMAP2PLUS_UART 786 default "debug/omap2plus.S" if DEBUG_OMAP2PLUS_UART
639 default "debug/picoxcell.S" if DEBUG_PICOXCELL_UART 787 default "debug/picoxcell.S" if DEBUG_PICOXCELL_UART
640 default "debug/pxa.S" if DEBUG_PXA_UART1 || DEBUG_MMP_UART2 || \ 788 default "debug/pxa.S" if DEBUG_PXA_UART1 || DEBUG_MMP_UART2 || \
641 DEBUG_MMP_UART3 789 DEBUG_MMP_UART3
790 default "debug/rockchip.S" if DEBUG_ROCKCHIP_UART
642 default "debug/sirf.S" if DEBUG_SIRFPRIMA2_UART1 || DEBUG_SIRFMARCO_UART1 791 default "debug/sirf.S" if DEBUG_SIRFPRIMA2_UART1 || DEBUG_SIRFMARCO_UART1
643 default "debug/socfpga.S" if DEBUG_SOCFPGA_UART 792 default "debug/socfpga.S" if DEBUG_SOCFPGA_UART
793 default "debug/sti.S" if DEBUG_STI_UART
644 default "debug/sunxi.S" if DEBUG_SUNXI_UART0 || DEBUG_SUNXI_UART1 794 default "debug/sunxi.S" if DEBUG_SUNXI_UART0 || DEBUG_SUNXI_UART1
645 default "debug/tegra.S" if DEBUG_TEGRA_UART 795 default "debug/tegra.S" if DEBUG_TEGRA_UART
796 default "debug/u300.S" if DEBUG_U300_UART
646 default "debug/ux500.S" if DEBUG_UX500_UART 797 default "debug/ux500.S" if DEBUG_UX500_UART
647 default "debug/vexpress.S" if DEBUG_VEXPRESS_UART0_DETECT || \ 798 default "debug/vexpress.S" if DEBUG_VEXPRESS_UART0_DETECT || \
648 DEBUG_VEXPRESS_UART0_CA9 || DEBUG_VEXPRESS_UART0_RS1 799 DEBUG_VEXPRESS_UART0_CA9 || DEBUG_VEXPRESS_UART0_RS1 || \
800 DEBUG_VEXPRESS_UART0_CRX
649 default "debug/vt8500.S" if DEBUG_VT8500_UART0 801 default "debug/vt8500.S" if DEBUG_VT8500_UART0
650 default "debug/zynq.S" if DEBUG_ZYNQ_UART0 || DEBUG_ZYNQ_UART1 802 default "debug/zynq.S" if DEBUG_ZYNQ_UART0 || DEBUG_ZYNQ_UART1
651 default "mach/debug-macro.S" 803 default "mach/debug-macro.S"
652 804
653config DEBUG_UNCOMPRESS 805config DEBUG_UNCOMPRESS
654 bool 806 bool
655 default y if ARCH_MULTIPLATFORM && DEBUG_LL && \ 807 depends on ARCH_MULTIPLATFORM
656 !DEBUG_OMAP2PLUS_UART && \ 808 default y if DEBUG_LL && !DEBUG_OMAP2PLUS_UART && \
657 !DEBUG_TEGRA_UART 809 !DEBUG_TEGRA_UART
810 help
811 This option influences the normal decompressor output for
812 multiplatform kernels. Normally, multiplatform kernels disable
813 decompressor output because it is not possible to know where to
814 send the decompressor output.
815
816 When this option is set, the selected DEBUG_LL output method
817 will be re-used for normal decompressor output on multiplatform
818 kernels.
819
658 820
659config UNCOMPRESS_INCLUDE 821config UNCOMPRESS_INCLUDE
660 string 822 string
diff --git a/arch/arm/Makefile b/arch/arm/Makefile
index 1ba358ba16b8..6fd2ceae305a 100644
--- a/arch/arm/Makefile
+++ b/arch/arm/Makefile
@@ -59,37 +59,44 @@ comma = ,
59# Note that GCC does not numerically define an architecture version 59# Note that GCC does not numerically define an architecture version
60# macro, but instead defines a whole series of macros which makes 60# macro, but instead defines a whole series of macros which makes
61# testing for a specific architecture or later rather impossible. 61# testing for a specific architecture or later rather impossible.
62arch-$(CONFIG_CPU_32v7) :=-D__LINUX_ARM_ARCH__=7 $(call cc-option,-march=armv7-a,-march=armv5t -Wa$(comma)-march=armv7-a) 62arch-$(CONFIG_CPU_32v7M) =-D__LINUX_ARM_ARCH__=7 -march=armv7-m -Wa,-march=armv7-m
63arch-$(CONFIG_CPU_32v6) :=-D__LINUX_ARM_ARCH__=6 $(call cc-option,-march=armv6,-march=armv5t -Wa$(comma)-march=armv6) 63arch-$(CONFIG_CPU_32v7) =-D__LINUX_ARM_ARCH__=7 $(call cc-option,-march=armv7-a,-march=armv5t -Wa$(comma)-march=armv7-a)
64arch-$(CONFIG_CPU_32v6) =-D__LINUX_ARM_ARCH__=6 $(call cc-option,-march=armv6,-march=armv5t -Wa$(comma)-march=armv6)
64# Only override the compiler option if ARMv6. The ARMv6K extensions are 65# Only override the compiler option if ARMv6. The ARMv6K extensions are
65# always available in ARMv7 66# always available in ARMv7
66ifeq ($(CONFIG_CPU_32v6),y) 67ifeq ($(CONFIG_CPU_32v6),y)
67arch-$(CONFIG_CPU_32v6K) :=-D__LINUX_ARM_ARCH__=6 $(call cc-option,-march=armv6k,-march=armv5t -Wa$(comma)-march=armv6k) 68arch-$(CONFIG_CPU_32v6K) =-D__LINUX_ARM_ARCH__=6 $(call cc-option,-march=armv6k,-march=armv5t -Wa$(comma)-march=armv6k)
68endif 69endif
69arch-$(CONFIG_CPU_32v5) :=-D__LINUX_ARM_ARCH__=5 $(call cc-option,-march=armv5te,-march=armv4t) 70arch-$(CONFIG_CPU_32v5) =-D__LINUX_ARM_ARCH__=5 $(call cc-option,-march=armv5te,-march=armv4t)
70arch-$(CONFIG_CPU_32v4T) :=-D__LINUX_ARM_ARCH__=4 -march=armv4t 71arch-$(CONFIG_CPU_32v4T) =-D__LINUX_ARM_ARCH__=4 -march=armv4t
71arch-$(CONFIG_CPU_32v4) :=-D__LINUX_ARM_ARCH__=4 -march=armv4 72arch-$(CONFIG_CPU_32v4) =-D__LINUX_ARM_ARCH__=4 -march=armv4
72arch-$(CONFIG_CPU_32v3) :=-D__LINUX_ARM_ARCH__=3 -march=armv3 73arch-$(CONFIG_CPU_32v3) =-D__LINUX_ARM_ARCH__=3 -march=armv3
74
75# Evaluate arch cc-option calls now
76arch-y := $(arch-y)
73 77
74# This selects how we optimise for the processor. 78# This selects how we optimise for the processor.
75tune-$(CONFIG_CPU_ARM7TDMI) :=-mtune=arm7tdmi 79tune-$(CONFIG_CPU_ARM7TDMI) =-mtune=arm7tdmi
76tune-$(CONFIG_CPU_ARM720T) :=-mtune=arm7tdmi 80tune-$(CONFIG_CPU_ARM720T) =-mtune=arm7tdmi
77tune-$(CONFIG_CPU_ARM740T) :=-mtune=arm7tdmi 81tune-$(CONFIG_CPU_ARM740T) =-mtune=arm7tdmi
78tune-$(CONFIG_CPU_ARM9TDMI) :=-mtune=arm9tdmi 82tune-$(CONFIG_CPU_ARM9TDMI) =-mtune=arm9tdmi
79tune-$(CONFIG_CPU_ARM940T) :=-mtune=arm9tdmi 83tune-$(CONFIG_CPU_ARM940T) =-mtune=arm9tdmi
80tune-$(CONFIG_CPU_ARM946E) :=$(call cc-option,-mtune=arm9e,-mtune=arm9tdmi) 84tune-$(CONFIG_CPU_ARM946E) =$(call cc-option,-mtune=arm9e,-mtune=arm9tdmi)
81tune-$(CONFIG_CPU_ARM920T) :=-mtune=arm9tdmi 85tune-$(CONFIG_CPU_ARM920T) =-mtune=arm9tdmi
82tune-$(CONFIG_CPU_ARM922T) :=-mtune=arm9tdmi 86tune-$(CONFIG_CPU_ARM922T) =-mtune=arm9tdmi
83tune-$(CONFIG_CPU_ARM925T) :=-mtune=arm9tdmi 87tune-$(CONFIG_CPU_ARM925T) =-mtune=arm9tdmi
84tune-$(CONFIG_CPU_ARM926T) :=-mtune=arm9tdmi 88tune-$(CONFIG_CPU_ARM926T) =-mtune=arm9tdmi
85tune-$(CONFIG_CPU_FA526) :=-mtune=arm9tdmi 89tune-$(CONFIG_CPU_FA526) =-mtune=arm9tdmi
86tune-$(CONFIG_CPU_SA110) :=-mtune=strongarm110 90tune-$(CONFIG_CPU_SA110) =-mtune=strongarm110
87tune-$(CONFIG_CPU_SA1100) :=-mtune=strongarm1100 91tune-$(CONFIG_CPU_SA1100) =-mtune=strongarm1100
88tune-$(CONFIG_CPU_XSCALE) :=$(call cc-option,-mtune=xscale,-mtune=strongarm110) -Wa,-mcpu=xscale 92tune-$(CONFIG_CPU_XSCALE) =$(call cc-option,-mtune=xscale,-mtune=strongarm110) -Wa,-mcpu=xscale
89tune-$(CONFIG_CPU_XSC3) :=$(call cc-option,-mtune=xscale,-mtune=strongarm110) -Wa,-mcpu=xscale 93tune-$(CONFIG_CPU_XSC3) =$(call cc-option,-mtune=xscale,-mtune=strongarm110) -Wa,-mcpu=xscale
90tune-$(CONFIG_CPU_FEROCEON) :=$(call cc-option,-mtune=marvell-f,-mtune=xscale) 94tune-$(CONFIG_CPU_FEROCEON) =$(call cc-option,-mtune=marvell-f,-mtune=xscale)
91tune-$(CONFIG_CPU_V6) :=$(call cc-option,-mtune=arm1136j-s,-mtune=strongarm) 95tune-$(CONFIG_CPU_V6) =$(call cc-option,-mtune=arm1136j-s,-mtune=strongarm)
92tune-$(CONFIG_CPU_V6K) :=$(call cc-option,-mtune=arm1136j-s,-mtune=strongarm) 96tune-$(CONFIG_CPU_V6K) =$(call cc-option,-mtune=arm1136j-s,-mtune=strongarm)
97
98# Evaluate tune cc-option calls now
99tune-y := $(tune-y)
93 100
94ifeq ($(CONFIG_AEABI),y) 101ifeq ($(CONFIG_AEABI),y)
95CFLAGS_ABI :=-mabi=aapcs-linux -mno-thumb-interwork 102CFLAGS_ABI :=-mabi=aapcs-linux -mno-thumb-interwork
@@ -146,6 +153,7 @@ machine-$(CONFIG_ARCH_DAVINCI) += davinci
146machine-$(CONFIG_ARCH_DOVE) += dove 153machine-$(CONFIG_ARCH_DOVE) += dove
147machine-$(CONFIG_ARCH_EBSA110) += ebsa110 154machine-$(CONFIG_ARCH_EBSA110) += ebsa110
148machine-$(CONFIG_ARCH_EP93XX) += ep93xx 155machine-$(CONFIG_ARCH_EP93XX) += ep93xx
156machine-$(CONFIG_ARCH_EXYNOS) += exynos
149machine-$(CONFIG_ARCH_GEMINI) += gemini 157machine-$(CONFIG_ARCH_GEMINI) += gemini
150machine-$(CONFIG_ARCH_HIGHBANK) += highbank 158machine-$(CONFIG_ARCH_HIGHBANK) += highbank
151machine-$(CONFIG_ARCH_INTEGRATOR) += integrator 159machine-$(CONFIG_ARCH_INTEGRATOR) += integrator
@@ -153,50 +161,54 @@ machine-$(CONFIG_ARCH_IOP13XX) += iop13xx
153machine-$(CONFIG_ARCH_IOP32X) += iop32x 161machine-$(CONFIG_ARCH_IOP32X) += iop32x
154machine-$(CONFIG_ARCH_IOP33X) += iop33x 162machine-$(CONFIG_ARCH_IOP33X) += iop33x
155machine-$(CONFIG_ARCH_IXP4XX) += ixp4xx 163machine-$(CONFIG_ARCH_IXP4XX) += ixp4xx
164machine-$(CONFIG_ARCH_KEYSTONE) += keystone
156machine-$(CONFIG_ARCH_KIRKWOOD) += kirkwood 165machine-$(CONFIG_ARCH_KIRKWOOD) += kirkwood
157machine-$(CONFIG_ARCH_KS8695) += ks8695 166machine-$(CONFIG_ARCH_KS8695) += ks8695
158machine-$(CONFIG_ARCH_LPC32XX) += lpc32xx 167machine-$(CONFIG_ARCH_LPC32XX) += lpc32xx
159machine-$(CONFIG_ARCH_MMP) += mmp 168machine-$(CONFIG_ARCH_MMP) += mmp
160machine-$(CONFIG_ARCH_MSM) += msm 169machine-$(CONFIG_ARCH_MSM) += msm
161machine-$(CONFIG_ARCH_MV78XX0) += mv78xx0 170machine-$(CONFIG_ARCH_MV78XX0) += mv78xx0
171machine-$(CONFIG_ARCH_MVEBU) += mvebu
162machine-$(CONFIG_ARCH_MXC) += imx 172machine-$(CONFIG_ARCH_MXC) += imx
163machine-$(CONFIG_ARCH_MXS) += mxs 173machine-$(CONFIG_ARCH_MXS) += mxs
164machine-$(CONFIG_ARCH_MVEBU) += mvebu
165machine-$(CONFIG_ARCH_NETX) += netx 174machine-$(CONFIG_ARCH_NETX) += netx
166machine-$(CONFIG_ARCH_NOMADIK) += nomadik 175machine-$(CONFIG_ARCH_NOMADIK) += nomadik
176machine-$(CONFIG_ARCH_NSPIRE) += nspire
167machine-$(CONFIG_ARCH_OMAP1) += omap1 177machine-$(CONFIG_ARCH_OMAP1) += omap1
168machine-$(CONFIG_ARCH_OMAP2PLUS) += omap2 178machine-$(CONFIG_ARCH_OMAP2PLUS) += omap2
169machine-$(CONFIG_ARCH_ORION5X) += orion5x 179machine-$(CONFIG_ARCH_ORION5X) += orion5x
170machine-$(CONFIG_ARCH_PICOXCELL) += picoxcell 180machine-$(CONFIG_ARCH_PICOXCELL) += picoxcell
171machine-$(CONFIG_ARCH_PRIMA2) += prima2
172machine-$(CONFIG_ARCH_PXA) += pxa 181machine-$(CONFIG_ARCH_PXA) += pxa
173machine-$(CONFIG_ARCH_REALVIEW) += realview 182machine-$(CONFIG_ARCH_REALVIEW) += realview
183machine-$(CONFIG_ARCH_ROCKCHIP) += rockchip
174machine-$(CONFIG_ARCH_RPC) += rpc 184machine-$(CONFIG_ARCH_RPC) += rpc
175machine-$(CONFIG_ARCH_S3C24XX) += s3c24xx 185machine-$(CONFIG_ARCH_S3C24XX) += s3c24xx
176machine-$(CONFIG_ARCH_S3C64XX) += s3c64xx 186machine-$(CONFIG_ARCH_S3C64XX) += s3c64xx
177machine-$(CONFIG_ARCH_S5P64X0) += s5p64x0 187machine-$(CONFIG_ARCH_S5P64X0) += s5p64x0
178machine-$(CONFIG_ARCH_S5PC100) += s5pc100 188machine-$(CONFIG_ARCH_S5PC100) += s5pc100
179machine-$(CONFIG_ARCH_S5PV210) += s5pv210 189machine-$(CONFIG_ARCH_S5PV210) += s5pv210
180machine-$(CONFIG_ARCH_EXYNOS) += exynos
181machine-$(CONFIG_ARCH_SA1100) += sa1100 190machine-$(CONFIG_ARCH_SA1100) += sa1100
182machine-$(CONFIG_ARCH_SHARK) += shark 191machine-$(CONFIG_ARCH_SHARK) += shark
183machine-$(CONFIG_ARCH_SHMOBILE) += shmobile 192machine-$(CONFIG_ARCH_SHMOBILE) += shmobile
193machine-$(CONFIG_ARCH_SIRF) += prima2
194machine-$(CONFIG_ARCH_SOCFPGA) += socfpga
195machine-$(CONFIG_ARCH_STI) += sti
196machine-$(CONFIG_ARCH_SUNXI) += sunxi
184machine-$(CONFIG_ARCH_TEGRA) += tegra 197machine-$(CONFIG_ARCH_TEGRA) += tegra
185machine-$(CONFIG_ARCH_U300) += u300 198machine-$(CONFIG_ARCH_U300) += u300
186machine-$(CONFIG_ARCH_U8500) += ux500 199machine-$(CONFIG_ARCH_U8500) += ux500
187machine-$(CONFIG_ARCH_VERSATILE) += versatile 200machine-$(CONFIG_ARCH_VERSATILE) += versatile
188machine-$(CONFIG_ARCH_VEXPRESS) += vexpress 201machine-$(CONFIG_ARCH_VEXPRESS) += vexpress
202machine-$(CONFIG_ARCH_VIRT) += virt
189machine-$(CONFIG_ARCH_VT8500) += vt8500 203machine-$(CONFIG_ARCH_VT8500) += vt8500
190machine-$(CONFIG_ARCH_W90X900) += w90x900 204machine-$(CONFIG_ARCH_W90X900) += w90x900
205machine-$(CONFIG_ARCH_ZYNQ) += zynq
191machine-$(CONFIG_FOOTBRIDGE) += footbridge 206machine-$(CONFIG_FOOTBRIDGE) += footbridge
192machine-$(CONFIG_ARCH_SOCFPGA) += socfpga
193machine-$(CONFIG_PLAT_SPEAR) += spear 207machine-$(CONFIG_PLAT_SPEAR) += spear
194machine-$(CONFIG_ARCH_VIRT) += virt
195machine-$(CONFIG_ARCH_ZYNQ) += zynq
196machine-$(CONFIG_ARCH_SUNXI) += sunxi
197 208
198# Platform directory name. This list is sorted alphanumerically 209# Platform directory name. This list is sorted alphanumerically
199# by CONFIG_* macro name. 210# by CONFIG_* macro name.
211plat-$(CONFIG_ARCH_EXYNOS) += samsung
200plat-$(CONFIG_ARCH_OMAP) += omap 212plat-$(CONFIG_ARCH_OMAP) += omap
201plat-$(CONFIG_ARCH_S3C64XX) += samsung 213plat-$(CONFIG_ARCH_S3C64XX) += samsung
202plat-$(CONFIG_PLAT_IOP) += iop 214plat-$(CONFIG_PLAT_IOP) += iop
@@ -289,9 +301,10 @@ zImage Image xipImage bootpImage uImage: vmlinux
289zinstall uinstall install: vmlinux 301zinstall uinstall install: vmlinux
290 $(Q)$(MAKE) $(build)=$(boot) MACHINE=$(MACHINE) $@ 302 $(Q)$(MAKE) $(build)=$(boot) MACHINE=$(MACHINE) $@
291 303
292%.dtb: scripts 304%.dtb: | scripts
293 $(Q)$(MAKE) $(build)=$(boot)/dts MACHINE=$(MACHINE) $(boot)/dts/$@ 305 $(Q)$(MAKE) $(build)=$(boot)/dts MACHINE=$(MACHINE) $(boot)/dts/$@
294 306
307PHONY += dtbs
295dtbs: scripts 308dtbs: scripts
296 $(Q)$(MAKE) $(build)=$(boot)/dts MACHINE=$(MACHINE) dtbs 309 $(Q)$(MAKE) $(build)=$(boot)/dts MACHINE=$(MACHINE) dtbs
297 310
diff --git a/arch/arm/boot/compressed/.gitignore b/arch/arm/boot/compressed/.gitignore
index f79a08efe000..47279aa96a6a 100644
--- a/arch/arm/boot/compressed/.gitignore
+++ b/arch/arm/boot/compressed/.gitignore
@@ -6,6 +6,7 @@ piggy.gzip
6piggy.lzo 6piggy.lzo
7piggy.lzma 7piggy.lzma
8piggy.xzkern 8piggy.xzkern
9piggy.lz4
9vmlinux 10vmlinux
10vmlinux.lds 11vmlinux.lds
11 12
diff --git a/arch/arm/boot/compressed/Makefile b/arch/arm/boot/compressed/Makefile
index 120b83bfde20..7ac1610252ba 100644
--- a/arch/arm/boot/compressed/Makefile
+++ b/arch/arm/boot/compressed/Makefile
@@ -27,7 +27,7 @@ OBJS += misc.o decompress.o
27ifeq ($(CONFIG_DEBUG_UNCOMPRESS),y) 27ifeq ($(CONFIG_DEBUG_UNCOMPRESS),y)
28OBJS += debug.o 28OBJS += debug.o
29endif 29endif
30FONTC = $(srctree)/drivers/video/console/font_acorn_8x8.c 30FONTC = $(srctree)/lib/fonts/font_acorn_8x8.c
31 31
32# string library code (-Os is enforced to keep it much smaller) 32# string library code (-Os is enforced to keep it much smaller)
33OBJS += string.o 33OBJS += string.o
@@ -91,6 +91,7 @@ suffix_$(CONFIG_KERNEL_GZIP) = gzip
91suffix_$(CONFIG_KERNEL_LZO) = lzo 91suffix_$(CONFIG_KERNEL_LZO) = lzo
92suffix_$(CONFIG_KERNEL_LZMA) = lzma 92suffix_$(CONFIG_KERNEL_LZMA) = lzma
93suffix_$(CONFIG_KERNEL_XZ) = xzkern 93suffix_$(CONFIG_KERNEL_XZ) = xzkern
94suffix_$(CONFIG_KERNEL_LZ4) = lz4
94 95
95# Borrowed libfdt files for the ATAG compatibility mode 96# Borrowed libfdt files for the ATAG compatibility mode
96 97
@@ -115,7 +116,7 @@ targets := vmlinux vmlinux.lds \
115 font.o font.c head.o misc.o $(OBJS) 116 font.o font.c head.o misc.o $(OBJS)
116 117
117# Make sure files are removed during clean 118# Make sure files are removed during clean
118extra-y += piggy.gzip piggy.lzo piggy.lzma piggy.xzkern \ 119extra-y += piggy.gzip piggy.lzo piggy.lzma piggy.xzkern piggy.lz4 \
119 lib1funcs.S ashldi3.S $(libfdt) $(libfdt_hdrs) \ 120 lib1funcs.S ashldi3.S $(libfdt) $(libfdt_hdrs) \
120 hyp-stub.S 121 hyp-stub.S
121 122
diff --git a/arch/arm/boot/compressed/atags_to_fdt.c b/arch/arm/boot/compressed/atags_to_fdt.c
index aabc02a68482..d1153c8a765a 100644
--- a/arch/arm/boot/compressed/atags_to_fdt.c
+++ b/arch/arm/boot/compressed/atags_to_fdt.c
@@ -53,6 +53,17 @@ static const void *getprop(const void *fdt, const char *node_path,
53 return fdt_getprop(fdt, offset, property, len); 53 return fdt_getprop(fdt, offset, property, len);
54} 54}
55 55
56static uint32_t get_cell_size(const void *fdt)
57{
58 int len;
59 uint32_t cell_size = 1;
60 const uint32_t *size_len = getprop(fdt, "/", "#size-cells", &len);
61
62 if (size_len)
63 cell_size = fdt32_to_cpu(*size_len);
64 return cell_size;
65}
66
56static void merge_fdt_bootargs(void *fdt, const char *fdt_cmdline) 67static void merge_fdt_bootargs(void *fdt, const char *fdt_cmdline)
57{ 68{
58 char cmdline[COMMAND_LINE_SIZE]; 69 char cmdline[COMMAND_LINE_SIZE];
@@ -95,9 +106,11 @@ static void merge_fdt_bootargs(void *fdt, const char *fdt_cmdline)
95int atags_to_fdt(void *atag_list, void *fdt, int total_space) 106int atags_to_fdt(void *atag_list, void *fdt, int total_space)
96{ 107{
97 struct tag *atag = atag_list; 108 struct tag *atag = atag_list;
98 uint32_t mem_reg_property[2 * NR_BANKS]; 109 /* In the case of 64 bits memory size, need to reserve 2 cells for
110 * address and size for each bank */
111 uint32_t mem_reg_property[2 * 2 * NR_BANKS];
99 int memcount = 0; 112 int memcount = 0;
100 int ret; 113 int ret, memsize;
101 114
102 /* make sure we've got an aligned pointer */ 115 /* make sure we've got an aligned pointer */
103 if ((u32)atag_list & 0x3) 116 if ((u32)atag_list & 0x3)
@@ -137,8 +150,25 @@ int atags_to_fdt(void *atag_list, void *fdt, int total_space)
137 continue; 150 continue;
138 if (!atag->u.mem.size) 151 if (!atag->u.mem.size)
139 continue; 152 continue;
140 mem_reg_property[memcount++] = cpu_to_fdt32(atag->u.mem.start); 153 memsize = get_cell_size(fdt);
141 mem_reg_property[memcount++] = cpu_to_fdt32(atag->u.mem.size); 154
155 if (memsize == 2) {
156 /* if memsize is 2, that means that
157 * each data needs 2 cells of 32 bits,
158 * so the data are 64 bits */
159 uint64_t *mem_reg_prop64 =
160 (uint64_t *)mem_reg_property;
161 mem_reg_prop64[memcount++] =
162 cpu_to_fdt64(atag->u.mem.start);
163 mem_reg_prop64[memcount++] =
164 cpu_to_fdt64(atag->u.mem.size);
165 } else {
166 mem_reg_property[memcount++] =
167 cpu_to_fdt32(atag->u.mem.start);
168 mem_reg_property[memcount++] =
169 cpu_to_fdt32(atag->u.mem.size);
170 }
171
142 } else if (atag->hdr.tag == ATAG_INITRD2) { 172 } else if (atag->hdr.tag == ATAG_INITRD2) {
143 uint32_t initrd_start, initrd_size; 173 uint32_t initrd_start, initrd_size;
144 initrd_start = atag->u.initrd.start; 174 initrd_start = atag->u.initrd.start;
@@ -150,8 +180,10 @@ int atags_to_fdt(void *atag_list, void *fdt, int total_space)
150 } 180 }
151 } 181 }
152 182
153 if (memcount) 183 if (memcount) {
154 setprop(fdt, "/memory", "reg", mem_reg_property, 4*memcount); 184 setprop(fdt, "/memory", "reg", mem_reg_property,
185 4 * memcount * memsize);
186 }
155 187
156 return fdt_pack(fdt); 188 return fdt_pack(fdt);
157} 189}
diff --git a/arch/arm/boot/compressed/decompress.c b/arch/arm/boot/compressed/decompress.c
index 24b0475cb8bf..bd245d34952d 100644
--- a/arch/arm/boot/compressed/decompress.c
+++ b/arch/arm/boot/compressed/decompress.c
@@ -51,6 +51,10 @@ extern char * strstr(const char * s1, const char *s2);
51#include "../../../../lib/decompress_unxz.c" 51#include "../../../../lib/decompress_unxz.c"
52#endif 52#endif
53 53
54#ifdef CONFIG_KERNEL_LZ4
55#include "../../../../lib/decompress_unlz4.c"
56#endif
57
54int do_decompress(u8 *input, int len, u8 *output, void (*error)(char *x)) 58int do_decompress(u8 *input, int len, u8 *output, void (*error)(char *x))
55{ 59{
56 return decompress(input, len, NULL, NULL, output, NULL, error); 60 return decompress(input, len, NULL, NULL, output, NULL, error);
diff --git a/arch/arm/boot/compressed/head-shmobile.S b/arch/arm/boot/compressed/head-shmobile.S
index fe3719b516fd..e2d636336b7c 100644
--- a/arch/arm/boot/compressed/head-shmobile.S
+++ b/arch/arm/boot/compressed/head-shmobile.S
@@ -46,7 +46,7 @@ __image_start:
46__image_end: 46__image_end:
47 .long _got_end 47 .long _got_end
48__load_base: 48__load_base:
49 .long CONFIG_MEMORY_START + 0x02000000 @ Load at 32Mb into SDRAM 49 .long MEMORY_START + 0x02000000 @ Load at 32Mb into SDRAM
50__loaded: 50__loaded:
51 .long __continue 51 .long __continue
52 .align 52 .align
@@ -55,26 +55,9 @@ __tmp_stack:
55__continue: 55__continue:
56#endif /* CONFIG_ZBOOT_ROM_MMC || CONFIG_ZBOOT_ROM_SH_MOBILE_SDHI */ 56#endif /* CONFIG_ZBOOT_ROM_MMC || CONFIG_ZBOOT_ROM_SH_MOBILE_SDHI */
57 57
58 b 1f
59__atags:@ tag #1
60 .long 12 @ tag->hdr.size = tag_size(tag_core);
61 .long 0x54410001 @ tag->hdr.tag = ATAG_CORE;
62 .long 0 @ tag->u.core.flags = 0;
63 .long 0 @ tag->u.core.pagesize = 0;
64 .long 0 @ tag->u.core.rootdev = 0;
65 @ tag #2
66 .long 8 @ tag->hdr.size = tag_size(tag_mem32);
67 .long 0x54410002 @ tag->hdr.tag = ATAG_MEM;
68 .long CONFIG_MEMORY_SIZE @ tag->u.mem.size = CONFIG_MEMORY_SIZE;
69 .long CONFIG_MEMORY_START @ @ tag->u.mem.start = CONFIG_MEMORY_START;
70 @ tag #3
71 .long 0 @ tag->hdr.size = 0
72 .long 0 @ tag->hdr.tag = ATAG_NONE;
731:
74
75 /* Set board ID necessary for boot */ 58 /* Set board ID necessary for boot */
76 ldr r7, 1f @ Set machine type register 59 ldr r7, 1f @ Set machine type register
77 adr r8, __atags @ Set atag register 60 mov r8, #0 @ pass null pointer as atag
78 b 2f 61 b 2f
79 62
801 : .long MACH_TYPE 631 : .long MACH_TYPE
diff --git a/arch/arm/boot/compressed/head.S b/arch/arm/boot/compressed/head.S
index 032a8d987148..75189f13cf54 100644
--- a/arch/arm/boot/compressed/head.S
+++ b/arch/arm/boot/compressed/head.S
@@ -142,7 +142,6 @@ start:
142 mov r7, r1 @ save architecture ID 142 mov r7, r1 @ save architecture ID
143 mov r8, r2 @ save atags pointer 143 mov r8, r2 @ save atags pointer
144 144
145#ifndef __ARM_ARCH_2__
146 /* 145 /*
147 * Booting from Angel - need to enter SVC mode and disable 146 * Booting from Angel - need to enter SVC mode and disable
148 * FIQs/IRQs (numeric definitions from angel arm.h source). 147 * FIQs/IRQs (numeric definitions from angel arm.h source).
@@ -158,10 +157,6 @@ not_angel:
158 safe_svcmode_maskall r0 157 safe_svcmode_maskall r0
159 msr spsr_cxsf, r9 @ Save the CPU boot mode in 158 msr spsr_cxsf, r9 @ Save the CPU boot mode in
160 @ SPSR 159 @ SPSR
161#else
162 teqp pc, #0x0c000003 @ turn off interrupts
163#endif
164
165 /* 160 /*
166 * Note that some cache flushing and other stuff may 161 * Note that some cache flushing and other stuff may
167 * be needed here - is there an Angel SWI call for this? 162 * be needed here - is there an Angel SWI call for this?
@@ -183,7 +178,19 @@ not_angel:
183 ldr r4, =zreladdr 178 ldr r4, =zreladdr
184#endif 179#endif
185 180
186 bl cache_on 181 /*
182 * Set up a page table only if it won't overwrite ourself.
183 * That means r4 < pc && r4 - 16k page directory > &_end.
184 * Given that r4 > &_end is most unfrequent, we add a rough
185 * additional 1MB of room for a possible appended DTB.
186 */
187 mov r0, pc
188 cmp r0, r4
189 ldrcc r0, LC0+32
190 addcc r0, r0, pc
191 cmpcc r4, r0
192 orrcc r4, r4, #1 @ remember we skipped cache_on
193 blcs cache_on
187 194
188restart: adr r0, LC0 195restart: adr r0, LC0
189 ldmia r0, {r1, r2, r3, r6, r10, r11, r12} 196 ldmia r0, {r1, r2, r3, r6, r10, r11, r12}
@@ -229,7 +236,7 @@ restart: adr r0, LC0
229 * r0 = delta 236 * r0 = delta
230 * r2 = BSS start 237 * r2 = BSS start
231 * r3 = BSS end 238 * r3 = BSS end
232 * r4 = final kernel address 239 * r4 = final kernel address (possibly with LSB set)
233 * r5 = appended dtb size (still unknown) 240 * r5 = appended dtb size (still unknown)
234 * r6 = _edata 241 * r6 = _edata
235 * r7 = architecture ID 242 * r7 = architecture ID
@@ -277,6 +284,7 @@ restart: adr r0, LC0
277 */ 284 */
278 cmp r0, #1 285 cmp r0, #1
279 sub r0, r4, #TEXT_OFFSET 286 sub r0, r4, #TEXT_OFFSET
287 bic r0, r0, #1
280 add r0, r0, #0x100 288 add r0, r0, #0x100
281 mov r1, r6 289 mov r1, r6
282 sub r2, sp, r6 290 sub r2, sp, r6
@@ -323,12 +331,13 @@ dtb_check_done:
323 331
324/* 332/*
325 * Check to see if we will overwrite ourselves. 333 * Check to see if we will overwrite ourselves.
326 * r4 = final kernel address 334 * r4 = final kernel address (possibly with LSB set)
327 * r9 = size of decompressed image 335 * r9 = size of decompressed image
328 * r10 = end of this image, including bss/stack/malloc space if non XIP 336 * r10 = end of this image, including bss/stack/malloc space if non XIP
329 * We basically want: 337 * We basically want:
330 * r4 - 16k page directory >= r10 -> OK 338 * r4 - 16k page directory >= r10 -> OK
331 * r4 + image length <= address of wont_overwrite -> OK 339 * r4 + image length <= address of wont_overwrite -> OK
340 * Note: the possible LSB in r4 is harmless here.
332 */ 341 */
333 add r10, r10, #16384 342 add r10, r10, #16384
334 cmp r4, r10 343 cmp r4, r10
@@ -390,7 +399,8 @@ dtb_check_done:
390 add sp, sp, r6 399 add sp, sp, r6
391#endif 400#endif
392 401
393 bl cache_clean_flush 402 tst r4, #1
403 bleq cache_clean_flush
394 404
395 adr r0, BSYM(restart) 405 adr r0, BSYM(restart)
396 add r0, r0, r6 406 add r0, r0, r6
@@ -402,7 +412,7 @@ wont_overwrite:
402 * r0 = delta 412 * r0 = delta
403 * r2 = BSS start 413 * r2 = BSS start
404 * r3 = BSS end 414 * r3 = BSS end
405 * r4 = kernel execution address 415 * r4 = kernel execution address (possibly with LSB set)
406 * r5 = appended dtb size (0 if not present) 416 * r5 = appended dtb size (0 if not present)
407 * r7 = architecture ID 417 * r7 = architecture ID
408 * r8 = atags pointer 418 * r8 = atags pointer
@@ -465,6 +475,15 @@ not_relocated: mov r0, #0
465 cmp r2, r3 475 cmp r2, r3
466 blo 1b 476 blo 1b
467 477
478 /*
479 * Did we skip the cache setup earlier?
480 * That is indicated by the LSB in r4.
481 * Do it now if so.
482 */
483 tst r4, #1
484 bic r4, r4, #1
485 blne cache_on
486
468/* 487/*
469 * The C runtime environment should now be setup sufficiently. 488 * The C runtime environment should now be setup sufficiently.
470 * Set up some pointers, and start decompressing. 489 * Set up some pointers, and start decompressing.
@@ -513,6 +532,7 @@ LC0: .word LC0 @ r1
513 .word _got_start @ r11 532 .word _got_start @ r11
514 .word _got_end @ ip 533 .word _got_end @ ip
515 .word .L_user_stack_end @ sp 534 .word .L_user_stack_end @ sp
535 .word _end - restart + 16384 + 1024*1024
516 .size LC0, . - LC0 536 .size LC0, . - LC0
517 537
518#ifdef CONFIG_ARCH_RPC 538#ifdef CONFIG_ARCH_RPC
diff --git a/arch/arm/boot/compressed/piggy.lz4.S b/arch/arm/boot/compressed/piggy.lz4.S
new file mode 100644
index 000000000000..3d9a575618a3
--- /dev/null
+++ b/arch/arm/boot/compressed/piggy.lz4.S
@@ -0,0 +1,6 @@
1 .section .piggydata,#alloc
2 .globl input_data
3input_data:
4 .incbin "arch/arm/boot/compressed/piggy.lz4"
5 .globl input_data_end
6input_data_end:
diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index f0895c581a89..641b3c9a7028 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -16,11 +16,13 @@ dtb-$(CONFIG_ARCH_AT91) += at91sam9263ek.dtb
16dtb-$(CONFIG_ARCH_AT91) += tny_a9263.dtb 16dtb-$(CONFIG_ARCH_AT91) += tny_a9263.dtb
17dtb-$(CONFIG_ARCH_AT91) += usb_a9263.dtb 17dtb-$(CONFIG_ARCH_AT91) += usb_a9263.dtb
18# sam9g20 18# sam9g20
19dtb-$(CONFIG_ARCH_AT91) += at91-foxg20.dtb
19dtb-$(CONFIG_ARCH_AT91) += at91sam9g20ek.dtb 20dtb-$(CONFIG_ARCH_AT91) += at91sam9g20ek.dtb
20dtb-$(CONFIG_ARCH_AT91) += at91sam9g20ek_2mmc.dtb 21dtb-$(CONFIG_ARCH_AT91) += at91sam9g20ek_2mmc.dtb
21dtb-$(CONFIG_ARCH_AT91) += kizbox.dtb 22dtb-$(CONFIG_ARCH_AT91) += kizbox.dtb
22dtb-$(CONFIG_ARCH_AT91) += tny_a9g20.dtb 23dtb-$(CONFIG_ARCH_AT91) += tny_a9g20.dtb
23dtb-$(CONFIG_ARCH_AT91) += usb_a9g20.dtb 24dtb-$(CONFIG_ARCH_AT91) += usb_a9g20.dtb
25dtb-$(CONFIG_ARCH_AT91) += usb_a9g20_lpw.dtb
24# sam9g45 26# sam9g45
25dtb-$(CONFIG_ARCH_AT91) += at91sam9m10g45ek.dtb 27dtb-$(CONFIG_ARCH_AT91) += at91sam9m10g45ek.dtb
26dtb-$(CONFIG_ARCH_AT91) += pm9g45.dtb 28dtb-$(CONFIG_ARCH_AT91) += pm9g45.dtb
@@ -57,6 +59,7 @@ dtb-$(CONFIG_ARCH_EXYNOS) += exynos4210-origen.dtb \
57 exynos5440-sd5v1.dtb \ 59 exynos5440-sd5v1.dtb \
58 exynos5250-smdk5250.dtb \ 60 exynos5250-smdk5250.dtb \
59 exynos5250-snow.dtb \ 61 exynos5250-snow.dtb \
62 exynos5420-smdk5420.dtb \
60 exynos5440-ssdk5440.dtb 63 exynos5440-ssdk5440.dtb
61dtb-$(CONFIG_ARCH_HIGHBANK) += highbank.dtb \ 64dtb-$(CONFIG_ARCH_HIGHBANK) += highbank.dtb \
62 ecx-2000.dtb 65 ecx-2000.dtb
@@ -64,6 +67,8 @@ dtb-$(CONFIG_ARCH_INTEGRATOR) += integratorap.dtb \
64 integratorcp.dtb 67 integratorcp.dtb
65dtb-$(CONFIG_ARCH_LPC32XX) += ea3250.dtb phy3250.dtb 68dtb-$(CONFIG_ARCH_LPC32XX) += ea3250.dtb phy3250.dtb
66dtb-$(CONFIG_ARCH_KIRKWOOD) += kirkwood-cloudbox.dtb \ 69dtb-$(CONFIG_ARCH_KIRKWOOD) += kirkwood-cloudbox.dtb \
70 kirkwood-db-88f6281.dtb \
71 kirkwood-db-88f6282.dtb \
67 kirkwood-dns320.dtb \ 72 kirkwood-dns320.dtb \
68 kirkwood-dns325.dtb \ 73 kirkwood-dns325.dtb \
69 kirkwood-dockstar.dtb \ 74 kirkwood-dockstar.dtb \
@@ -84,6 +89,8 @@ dtb-$(CONFIG_ARCH_KIRKWOOD) += kirkwood-cloudbox.dtb \
84 kirkwood-ns2max.dtb \ 89 kirkwood-ns2max.dtb \
85 kirkwood-ns2mini.dtb \ 90 kirkwood-ns2mini.dtb \
86 kirkwood-nsa310.dtb \ 91 kirkwood-nsa310.dtb \
92 kirkwood-sheevaplug.dtb \
93 kirkwood-sheevaplug-esata.dtb \
87 kirkwood-topkick.dtb \ 94 kirkwood-topkick.dtb \
88 kirkwood-ts219-6281.dtb \ 95 kirkwood-ts219-6281.dtb \
89 kirkwood-ts219-6282.dtb \ 96 kirkwood-ts219-6282.dtb \
@@ -103,13 +110,15 @@ dtb-$(CONFIG_ARCH_MXC) += \
103 imx27-apf27.dtb \ 110 imx27-apf27.dtb \
104 imx27-apf27dev.dtb \ 111 imx27-apf27dev.dtb \
105 imx27-pdk.dtb \ 112 imx27-pdk.dtb \
106 imx27-phytec-phycore.dtb \ 113 imx27-phytec-phycore-som.dtb \
114 imx27-phytec-phycore-rdk.dtb \
107 imx31-bug.dtb \ 115 imx31-bug.dtb \
108 imx51-apf51.dtb \ 116 imx51-apf51.dtb \
109 imx51-apf51dev.dtb \ 117 imx51-apf51dev.dtb \
110 imx51-babbage.dtb \ 118 imx51-babbage.dtb \
111 imx53-ard.dtb \ 119 imx53-ard.dtb \
112 imx53-evk.dtb \ 120 imx53-evk.dtb \
121 imx53-m53evk.dtb \
113 imx53-mba53.dtb \ 122 imx53-mba53.dtb \
114 imx53-qsb.dtb \ 123 imx53-qsb.dtb \
115 imx53-smd.dtb \ 124 imx53-smd.dtb \
@@ -117,10 +126,13 @@ dtb-$(CONFIG_ARCH_MXC) += \
117 imx6dl-sabresd.dtb \ 126 imx6dl-sabresd.dtb \
118 imx6dl-wandboard.dtb \ 127 imx6dl-wandboard.dtb \
119 imx6q-arm2.dtb \ 128 imx6q-arm2.dtb \
129 imx6q-phytec-pbab01.dtb \
120 imx6q-sabreauto.dtb \ 130 imx6q-sabreauto.dtb \
121 imx6q-sabrelite.dtb \ 131 imx6q-sabrelite.dtb \
122 imx6q-sabresd.dtb \ 132 imx6q-sabresd.dtb \
123 imx6q-sbc6x.dtb 133 imx6q-sbc6x.dtb \
134 imx6sl-evk.dtb \
135 vf610-twr.dtb
124dtb-$(CONFIG_ARCH_MXS) += imx23-evk.dtb \ 136dtb-$(CONFIG_ARCH_MXS) += imx23-evk.dtb \
125 imx23-olinuxino.dtb \ 137 imx23-olinuxino.dtb \
126 imx23-stmp378x_devb.dtb \ 138 imx23-stmp378x_devb.dtb \
@@ -130,11 +142,16 @@ dtb-$(CONFIG_ARCH_MXS) += imx23-evk.dtb \
130 imx28-cfa10036.dtb \ 142 imx28-cfa10036.dtb \
131 imx28-cfa10037.dtb \ 143 imx28-cfa10037.dtb \
132 imx28-cfa10049.dtb \ 144 imx28-cfa10049.dtb \
145 imx28-cfa10055.dtb \
146 imx28-cfa10057.dtb \
133 imx28-evk.dtb \ 147 imx28-evk.dtb \
134 imx28-m28evk.dtb \ 148 imx28-m28evk.dtb \
135 imx28-sps1.dtb \ 149 imx28-sps1.dtb \
136 imx28-tx28.dtb 150 imx28-tx28.dtb
137dtb-$(CONFIG_ARCH_NOMADIK) += ste-nomadik-s8815.dtb 151dtb-$(CONFIG_ARCH_NOMADIK) += ste-nomadik-s8815.dtb
152dtb-$(CONFIG_ARCH_NSPIRE) += nspire-cx.dtb \
153 nspire-tp.dtb \
154 nspire-clp.dtb
138dtb-$(CONFIG_ARCH_OMAP2PLUS) += omap2420-h4.dtb \ 155dtb-$(CONFIG_ARCH_OMAP2PLUS) += omap2420-h4.dtb \
139 omap3430-sdp.dtb \ 156 omap3430-sdp.dtb \
140 omap3-beagle.dtb \ 157 omap3-beagle.dtb \
@@ -149,19 +166,26 @@ dtb-$(CONFIG_ARCH_OMAP2PLUS) += omap2420-h4.dtb \
149 omap4-panda-es.dtb \ 166 omap4-panda-es.dtb \
150 omap4-var-som.dtb \ 167 omap4-var-som.dtb \
151 omap4-sdp.dtb \ 168 omap4-sdp.dtb \
152 omap5-evm.dtb \ 169 omap4-sdp-es23plus.dtb \
170 omap5-uevm.dtb \
153 am335x-evm.dtb \ 171 am335x-evm.dtb \
154 am335x-evmsk.dtb \ 172 am335x-evmsk.dtb \
155 am335x-bone.dtb 173 am335x-bone.dtb \
174 am3517-evm.dtb \
175 am3517_mt_ventoux.dtb \
176 am43x-epos-evm.dtb
156dtb-$(CONFIG_ARCH_ORION5X) += orion5x-lacie-ethernet-disk-mini-v2.dtb 177dtb-$(CONFIG_ARCH_ORION5X) += orion5x-lacie-ethernet-disk-mini-v2.dtb
157dtb-$(CONFIG_ARCH_PRIMA2) += prima2-evb.dtb 178dtb-$(CONFIG_ARCH_PRIMA2) += prima2-evb.dtb
158dtb-$(CONFIG_ARCH_U8500) += snowball.dtb \ 179dtb-$(CONFIG_ARCH_U8500) += snowball.dtb \
159 hrefprev60.dtb \ 180 hrefprev60.dtb \
160 hrefv60plus.dtb \ 181 hrefv60plus.dtb \
182 ccu8540.dtb \
161 ccu9540.dtb 183 ccu9540.dtb
184dtb-$(CONFIG_ARCH_S3C24XX) += s3c2416-smdk2416.dtb
162dtb-$(CONFIG_ARCH_SHMOBILE) += emev2-kzm9d.dtb \ 185dtb-$(CONFIG_ARCH_SHMOBILE) += emev2-kzm9d.dtb \
163 r8a7740-armadillo800eva.dtb \ 186 r8a7740-armadillo800eva.dtb \
164 r8a7778-bockw.dtb \ 187 r8a7778-bockw.dtb \
188 r8a7740-armadillo800eva-reference.dtb \
165 r8a7779-marzen-reference.dtb \ 189 r8a7779-marzen-reference.dtb \
166 r8a7790-lager.dtb \ 190 r8a7790-lager.dtb \
167 sh73a0-kzm9g.dtb \ 191 sh73a0-kzm9g.dtb \
@@ -177,10 +201,15 @@ dtb-$(CONFIG_ARCH_SPEAR3XX)+= spear300-evb.dtb \
177 spear320-evb.dtb \ 201 spear320-evb.dtb \
178 spear320-hmi.dtb 202 spear320-hmi.dtb
179dtb-$(CONFIG_ARCH_SPEAR6XX)+= spear600-evb.dtb 203dtb-$(CONFIG_ARCH_SPEAR6XX)+= spear600-evb.dtb
204dtb-$(CONFIG_ARCH_STI)+= stih415-b2000.dtb \
205 stih416-b2000.dtb \
206 stih415-b2020.dtb \
207 stih416-b2020.dtb
180dtb-$(CONFIG_ARCH_SUNXI) += \ 208dtb-$(CONFIG_ARCH_SUNXI) += \
181 sun4i-a10-cubieboard.dtb \ 209 sun4i-a10-cubieboard.dtb \
182 sun4i-a10-mini-xplus.dtb \ 210 sun4i-a10-mini-xplus.dtb \
183 sun4i-a10-hackberry.dtb \ 211 sun4i-a10-hackberry.dtb \
212 sun5i-a10s-olinuxino-micro.dtb \
184 sun5i-a13-olinuxino.dtb 213 sun5i-a13-olinuxino.dtb
185dtb-$(CONFIG_ARCH_TEGRA) += tegra20-harmony.dtb \ 214dtb-$(CONFIG_ARCH_TEGRA) += tegra20-harmony.dtb \
186 tegra20-iris-512.dtb \ 215 tegra20-iris-512.dtb \
@@ -199,6 +228,7 @@ dtb-$(CONFIG_ARCH_TEGRA) += tegra20-harmony.dtb \
199 tegra114-pluto.dtb 228 tegra114-pluto.dtb
200dtb-$(CONFIG_ARCH_VERSATILE) += versatile-ab.dtb \ 229dtb-$(CONFIG_ARCH_VERSATILE) += versatile-ab.dtb \
201 versatile-pb.dtb 230 versatile-pb.dtb
231dtb-$(CONFIG_ARCH_U300) += ste-u300.dtb
202dtb-$(CONFIG_ARCH_VEXPRESS) += vexpress-v2p-ca5s.dtb \ 232dtb-$(CONFIG_ARCH_VEXPRESS) += vexpress-v2p-ca5s.dtb \
203 vexpress-v2p-ca9.dtb \ 233 vexpress-v2p-ca9.dtb \
204 vexpress-v2p-ca15-tc1.dtb \ 234 vexpress-v2p-ca15-tc1.dtb \
@@ -207,8 +237,11 @@ dtb-$(CONFIG_ARCH_VIRT) += xenvm-4.2.dtb
207dtb-$(CONFIG_ARCH_VT8500) += vt8500-bv07.dtb \ 237dtb-$(CONFIG_ARCH_VT8500) += vt8500-bv07.dtb \
208 wm8505-ref.dtb \ 238 wm8505-ref.dtb \
209 wm8650-mid.dtb \ 239 wm8650-mid.dtb \
240 wm8750-apc8750.dtb \
210 wm8850-w70v2.dtb 241 wm8850-w70v2.dtb
211dtb-$(CONFIG_ARCH_ZYNQ) += zynq-zc702.dtb 242dtb-$(CONFIG_ARCH_ZYNQ) += zynq-zc702.dtb \
243 zynq-zc706.dtb \
244 zynq-zed.dtb
212 245
213targets += dtbs 246targets += dtbs
214targets += $(dtb-y) 247targets += $(dtb-y)
diff --git a/arch/arm/boot/dts/aks-cdu.dts b/arch/arm/boot/dts/aks-cdu.dts
index 29b9f15e7599..54cb5cf8604a 100644
--- a/arch/arm/boot/dts/aks-cdu.dts
+++ b/arch/arm/boot/dts/aks-cdu.dts
@@ -9,7 +9,7 @@
9 9
10/dts-v1/; 10/dts-v1/;
11 11
12/include/ "ge863-pro3.dtsi" 12#include "ge863-pro3.dtsi"
13 13
14/ { 14/ {
15 chosen { 15 chosen {
@@ -46,7 +46,7 @@
46 }; 46 };
47 47
48 usb1: gadget@fffa4000 { 48 usb1: gadget@fffa4000 {
49 atmel,vbus-gpio = <&pioC 15 0>; 49 atmel,vbus-gpio = <&pioC 15 GPIO_ACTIVE_HIGH>;
50 status = "okay"; 50 status = "okay";
51 }; 51 };
52 }; 52 };
@@ -90,23 +90,23 @@
90 compatible = "gpio-leds"; 90 compatible = "gpio-leds";
91 91
92 red { 92 red {
93 gpios = <&pioC 10 0>; 93 gpios = <&pioC 10 GPIO_ACTIVE_HIGH>;
94 linux,default-trigger = "none"; 94 linux,default-trigger = "none";
95 }; 95 };
96 96
97 green { 97 green {
98 gpios = <&pioA 5 1>; 98 gpios = <&pioA 5 GPIO_ACTIVE_LOW>;
99 linux,default-trigger = "none"; 99 linux,default-trigger = "none";
100 default-state = "on"; 100 default-state = "on";
101 }; 101 };
102 102
103 yellow { 103 yellow {
104 gpios = <&pioB 20 1>; 104 gpios = <&pioB 20 GPIO_ACTIVE_LOW>;
105 linux,default-trigger = "none"; 105 linux,default-trigger = "none";
106 }; 106 };
107 107
108 blue { 108 blue {
109 gpios = <&pioB 21 1>; 109 gpios = <&pioB 21 GPIO_ACTIVE_LOW>;
110 linux,default-trigger = "none"; 110 linux,default-trigger = "none";
111 }; 111 };
112 }; 112 };
diff --git a/arch/arm/boot/dts/am335x-bone.dts b/arch/arm/boot/dts/am335x-bone.dts
index 5302f79c05b7..444b4ede0d60 100644
--- a/arch/arm/boot/dts/am335x-bone.dts
+++ b/arch/arm/boot/dts/am335x-bone.dts
@@ -7,7 +7,7 @@
7 */ 7 */
8/dts-v1/; 8/dts-v1/;
9 9
10/include/ "am33xx.dtsi" 10#include "am33xx.dtsi"
11 11
12/ { 12/ {
13 model = "TI AM335x BeagleBone"; 13 model = "TI AM335x BeagleBone";
@@ -26,24 +26,104 @@
26 26
27 am33xx_pinmux: pinmux@44e10800 { 27 am33xx_pinmux: pinmux@44e10800 {
28 pinctrl-names = "default"; 28 pinctrl-names = "default";
29 pinctrl-0 = <&user_leds_s0>; 29 pinctrl-0 = <&clkout2_pin>;
30 30
31 user_leds_s0: user_leds_s0 { 31 user_leds_s0: user_leds_s0 {
32 pinctrl-single,pins = < 32 pinctrl-single,pins = <
33 0x54 0x7 /* gpmc_a5.gpio1_21, OUTPUT | MODE7 */ 33 0x54 (PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* gpmc_a5.gpio1_21 */
34 0x58 0x17 /* gpmc_a6.gpio1_22, OUTPUT_PULLUP | MODE7 */ 34 0x58 (PIN_OUTPUT_PULLUP | MUX_MODE7) /* gpmc_a6.gpio1_22 */
35 0x5c 0x7 /* gpmc_a7.gpio1_23, OUTPUT | MODE7 */ 35 0x5c (PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* gpmc_a7.gpio1_23 */
36 0x60 0x17 /* gpmc_a8.gpio1_24, OUTPUT_PULLUP | MODE7 */ 36 0x60 (PIN_OUTPUT_PULLUP | MUX_MODE7) /* gpmc_a8.gpio1_24 */
37 >;
38 };
39
40 i2c0_pins: pinmux_i2c0_pins {
41 pinctrl-single,pins = <
42 0x188 (PIN_INPUT_PULLUP | MUX_MODE0) /* i2c0_sda.i2c0_sda */
43 0x18c (PIN_INPUT_PULLUP | MUX_MODE0) /* i2c0_scl.i2c0_scl */
44 >;
45 };
46
47 uart0_pins: pinmux_uart0_pins {
48 pinctrl-single,pins = <
49 0x170 (PIN_INPUT_PULLUP | MUX_MODE0) /* uart0_rxd.uart0_rxd */
50 0x174 (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* uart0_txd.uart0_txd */
51 >;
52 };
53
54 clkout2_pin: pinmux_clkout2_pin {
55 pinctrl-single,pins = <
56 0x1b4 (PIN_OUTPUT_PULLDOWN | MUX_MODE3) /* xdma_event_intr1.clkout2 */
57 >;
58 };
59
60 cpsw_default: cpsw_default {
61 pinctrl-single,pins = <
62 /* Slave 1 */
63 0x110 (PIN_INPUT_PULLUP | MUX_MODE0) /* mii1_rxerr.mii1_rxerr */
64 0x114 (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* mii1_txen.mii1_txen */
65 0x118 (PIN_INPUT_PULLUP | MUX_MODE0) /* mii1_rxdv.mii1_rxdv */
66 0x11c (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* mii1_txd3.mii1_txd3 */
67 0x120 (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* mii1_txd2.mii1_txd2 */
68 0x124 (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* mii1_txd1.mii1_txd1 */
69 0x128 (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* mii1_txd0.mii1_txd0 */
70 0x12c (PIN_INPUT_PULLUP | MUX_MODE0) /* mii1_txclk.mii1_txclk */
71 0x130 (PIN_INPUT_PULLUP | MUX_MODE0) /* mii1_rxclk.mii1_rxclk */
72 0x134 (PIN_INPUT_PULLUP | MUX_MODE0) /* mii1_rxd3.mii1_rxd3 */
73 0x138 (PIN_INPUT_PULLUP | MUX_MODE0) /* mii1_rxd2.mii1_rxd2 */
74 0x13c (PIN_INPUT_PULLUP | MUX_MODE0) /* mii1_rxd1.mii1_rxd1 */
75 0x140 (PIN_INPUT_PULLUP | MUX_MODE0) /* mii1_rxd0.mii1_rxd0 */
76 >;
77 };
78
79 cpsw_sleep: cpsw_sleep {
80 pinctrl-single,pins = <
81 /* Slave 1 reset value */
82 0x110 (PIN_INPUT_PULLDOWN | MUX_MODE7)
83 0x114 (PIN_INPUT_PULLDOWN | MUX_MODE7)
84 0x118 (PIN_INPUT_PULLDOWN | MUX_MODE7)
85 0x11c (PIN_INPUT_PULLDOWN | MUX_MODE7)
86 0x120 (PIN_INPUT_PULLDOWN | MUX_MODE7)
87 0x124 (PIN_INPUT_PULLDOWN | MUX_MODE7)
88 0x128 (PIN_INPUT_PULLDOWN | MUX_MODE7)
89 0x12c (PIN_INPUT_PULLDOWN | MUX_MODE7)
90 0x130 (PIN_INPUT_PULLDOWN | MUX_MODE7)
91 0x134 (PIN_INPUT_PULLDOWN | MUX_MODE7)
92 0x138 (PIN_INPUT_PULLDOWN | MUX_MODE7)
93 0x13c (PIN_INPUT_PULLDOWN | MUX_MODE7)
94 0x140 (PIN_INPUT_PULLDOWN | MUX_MODE7)
95 >;
96 };
97
98 davinci_mdio_default: davinci_mdio_default {
99 pinctrl-single,pins = <
100 /* MDIO */
101 0x148 (PIN_INPUT_PULLUP | SLEWCTRL_FAST | MUX_MODE0) /* mdio_data.mdio_data */
102 0x14c (PIN_OUTPUT_PULLUP | MUX_MODE0) /* mdio_clk.mdio_clk */
103 >;
104 };
105
106 davinci_mdio_sleep: davinci_mdio_sleep {
107 pinctrl-single,pins = <
108 /* MDIO reset value */
109 0x148 (PIN_INPUT_PULLDOWN | MUX_MODE7)
110 0x14c (PIN_INPUT_PULLDOWN | MUX_MODE7)
37 >; 111 >;
38 }; 112 };
39 }; 113 };
40 114
41 ocp { 115 ocp {
42 uart1: serial@44e09000 { 116 uart0: serial@44e09000 {
117 pinctrl-names = "default";
118 pinctrl-0 = <&uart0_pins>;
119
43 status = "okay"; 120 status = "okay";
44 }; 121 };
45 122
46 i2c0: i2c@44e0b000 { 123 i2c0: i2c@44e0b000 {
124 pinctrl-names = "default";
125 pinctrl-0 = <&i2c0_pins>;
126
47 status = "okay"; 127 status = "okay";
48 clock-frequency = <400000>; 128 clock-frequency = <400000>;
49 129
@@ -55,31 +135,34 @@
55 }; 135 };
56 136
57 leds { 137 leds {
138 pinctrl-names = "default";
139 pinctrl-0 = <&user_leds_s0>;
140
58 compatible = "gpio-leds"; 141 compatible = "gpio-leds";
59 142
60 led@2 { 143 led@2 {
61 label = "beaglebone:green:heartbeat"; 144 label = "beaglebone:green:heartbeat";
62 gpios = <&gpio1 21 0>; 145 gpios = <&gpio1 21 GPIO_ACTIVE_HIGH>;
63 linux,default-trigger = "heartbeat"; 146 linux,default-trigger = "heartbeat";
64 default-state = "off"; 147 default-state = "off";
65 }; 148 };
66 149
67 led@3 { 150 led@3 {
68 label = "beaglebone:green:mmc0"; 151 label = "beaglebone:green:mmc0";
69 gpios = <&gpio1 22 0>; 152 gpios = <&gpio1 22 GPIO_ACTIVE_HIGH>;
70 linux,default-trigger = "mmc0"; 153 linux,default-trigger = "mmc0";
71 default-state = "off"; 154 default-state = "off";
72 }; 155 };
73 156
74 led@4 { 157 led@4 {
75 label = "beaglebone:green:usr2"; 158 label = "beaglebone:green:usr2";
76 gpios = <&gpio1 23 0>; 159 gpios = <&gpio1 23 GPIO_ACTIVE_HIGH>;
77 default-state = "off"; 160 default-state = "off";
78 }; 161 };
79 162
80 led@5 { 163 led@5 {
81 label = "beaglebone:green:usr3"; 164 label = "beaglebone:green:usr3";
82 gpios = <&gpio1 24 0>; 165 gpios = <&gpio1 24 GPIO_ACTIVE_HIGH>;
83 default-state = "off"; 166 default-state = "off";
84 }; 167 };
85 }; 168 };
@@ -131,8 +214,23 @@
131 214
132&cpsw_emac0 { 215&cpsw_emac0 {
133 phy_id = <&davinci_mdio>, <0>; 216 phy_id = <&davinci_mdio>, <0>;
217 phy-mode = "mii";
134}; 218};
135 219
136&cpsw_emac1 { 220&cpsw_emac1 {
137 phy_id = <&davinci_mdio>, <1>; 221 phy_id = <&davinci_mdio>, <1>;
222 phy-mode = "mii";
223};
224
225&mac {
226 pinctrl-names = "default", "sleep";
227 pinctrl-0 = <&cpsw_default>;
228 pinctrl-1 = <&cpsw_sleep>;
229
230};
231
232&davinci_mdio {
233 pinctrl-names = "default", "sleep";
234 pinctrl-0 = <&davinci_mdio_default>;
235 pinctrl-1 = <&davinci_mdio_sleep>;
138}; 236};
diff --git a/arch/arm/boot/dts/am335x-evm.dts b/arch/arm/boot/dts/am335x-evm.dts
index 0423298a26fe..3aee1a43782d 100644
--- a/arch/arm/boot/dts/am335x-evm.dts
+++ b/arch/arm/boot/dts/am335x-evm.dts
@@ -7,7 +7,7 @@
7 */ 7 */
8/dts-v1/; 8/dts-v1/;
9 9
10/include/ "am33xx.dtsi" 10#include "am33xx.dtsi"
11 11
12/ { 12/ {
13 model = "TI AM335x EVM"; 13 model = "TI AM335x EVM";
@@ -26,32 +26,143 @@
26 26
27 am33xx_pinmux: pinmux@44e10800 { 27 am33xx_pinmux: pinmux@44e10800 {
28 pinctrl-names = "default"; 28 pinctrl-names = "default";
29 pinctrl-0 = <&matrix_keypad_s0 &volume_keys_s0>; 29 pinctrl-0 = <&matrix_keypad_s0 &volume_keys_s0 &clkout2_pin>;
30 30
31 matrix_keypad_s0: matrix_keypad_s0 { 31 matrix_keypad_s0: matrix_keypad_s0 {
32 pinctrl-single,pins = < 32 pinctrl-single,pins = <
33 0x54 0x7 /* gpmc_a5.gpio1_21, OUTPUT | MODE7 */ 33 0x54 (PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* gpmc_a5.gpio1_21 */
34 0x58 0x7 /* gpmc_a6.gpio1_22, OUTPUT | MODE7 */ 34 0x58 (PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* gpmc_a6.gpio1_22 */
35 0x64 0x27 /* gpmc_a9.gpio1_25, INPUT | MODE7 */ 35 0x64 (PIN_INPUT_PULLDOWN | MUX_MODE7) /* gpmc_a9.gpio1_25 */
36 0x68 0x27 /* gpmc_a10.gpio1_26, INPUT | MODE7 */ 36 0x68 (PIN_INPUT_PULLDOWN | MUX_MODE7) /* gpmc_a10.gpio1_26 */
37 0x6c 0x27 /* gpmc_a11.gpio1_27, INPUT | MODE7 */ 37 0x6c (PIN_INPUT_PULLDOWN | MUX_MODE7) /* gpmc_a11.gpio1_27 */
38 >; 38 >;
39 }; 39 };
40 40
41 volume_keys_s0: volume_keys_s0 { 41 volume_keys_s0: volume_keys_s0 {
42 pinctrl-single,pins = < 42 pinctrl-single,pins = <
43 0x150 0x27 /* spi0_sclk.gpio0_2, INPUT | MODE7 */ 43 0x150 (PIN_INPUT_PULLDOWN | MUX_MODE7) /* spi0_sclk.gpio0_2 */
44 0x154 0x27 /* spi0_d0.gpio0_3, INPUT | MODE7 */ 44 0x154 (PIN_INPUT_PULLDOWN | MUX_MODE7) /* spi0_d0.gpio0_3 */
45 >;
46 };
47
48 i2c0_pins: pinmux_i2c0_pins {
49 pinctrl-single,pins = <
50 0x188 (PIN_INPUT_PULLUP | MUX_MODE0) /* i2c0_sda.i2c0_sda */
51 0x18c (PIN_INPUT_PULLUP | MUX_MODE0) /* i2c0_scl.i2c0_scl */
52 >;
53 };
54
55 i2c1_pins: pinmux_i2c1_pins {
56 pinctrl-single,pins = <
57 0x158 (PIN_INPUT_PULLUP | MUX_MODE2) /* spi0_d1.i2c1_sda */
58 0x15c (PIN_INPUT_PULLUP | MUX_MODE2) /* spi0_cs0.i2c1_scl */
59 >;
60 };
61
62 uart0_pins: pinmux_uart0_pins {
63 pinctrl-single,pins = <
64 0x170 (PIN_INPUT_PULLUP | MUX_MODE0) /* uart0_rxd.uart0_rxd */
65 0x174 (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* uart0_txd.uart0_txd */
66 >;
67 };
68
69 clkout2_pin: pinmux_clkout2_pin {
70 pinctrl-single,pins = <
71 0x1b4 (PIN_OUTPUT_PULLDOWN | MUX_MODE3) /* xdma_event_intr1.clkout2 */
72 >;
73 };
74
75 nandflash_pins_s0: nandflash_pins_s0 {
76 pinctrl-single,pins = <
77 0x0 (PIN_INPUT_PULLUP | MUX_MODE0) /* gpmc_ad0.gpmc_ad0 */
78 0x4 (PIN_INPUT_PULLUP | MUX_MODE0) /* gpmc_ad1.gpmc_ad1 */
79 0x8 (PIN_INPUT_PULLUP | MUX_MODE0) /* gpmc_ad2.gpmc_ad2 */
80 0xc (PIN_INPUT_PULLUP | MUX_MODE0) /* gpmc_ad3.gpmc_ad3 */
81 0x10 (PIN_INPUT_PULLUP | MUX_MODE0) /* gpmc_ad4.gpmc_ad4 */
82 0x14 (PIN_INPUT_PULLUP | MUX_MODE0) /* gpmc_ad5.gpmc_ad5 */
83 0x18 (PIN_INPUT_PULLUP | MUX_MODE0) /* gpmc_ad6.gpmc_ad6 */
84 0x1c (PIN_INPUT_PULLUP | MUX_MODE0) /* gpmc_ad7.gpmc_ad7 */
85 0x70 (PIN_INPUT_PULLUP | MUX_MODE0) /* gpmc_wait0.gpmc_wait0 */
86 0x74 (PIN_INPUT_PULLUP | MUX_MODE7) /* gpmc_wpn.gpio0_30 */
87 0x7c (PIN_OUTPUT | MUX_MODE0) /* gpmc_csn0.gpmc_csn0 */
88 0x90 (PIN_OUTPUT | MUX_MODE0) /* gpmc_advn_ale.gpmc_advn_ale */
89 0x94 (PIN_OUTPUT | MUX_MODE0) /* gpmc_oen_ren.gpmc_oen_ren */
90 0x98 (PIN_OUTPUT | MUX_MODE0) /* gpmc_wen.gpmc_wen */
91 0x9c (PIN_OUTPUT | MUX_MODE0) /* gpmc_be0n_cle.gpmc_be0n_cle */
92 >;
93 };
94
95 ecap0_pins: backlight_pins {
96 pinctrl-single,pins = <
97 0x164 0x0 /* eCAP0_in_PWM0_out.eCAP0_in_PWM0_out MODE0 */
98 >;
99 };
100
101 cpsw_default: cpsw_default {
102 pinctrl-single,pins = <
103 /* Slave 1 */
104 0x114 (PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* mii1_txen.rgmii1_tctl */
105 0x118 (PIN_INPUT_PULLDOWN | MUX_MODE2) /* mii1_rxdv.rgmii1_rctl */
106 0x11c (PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* mii1_txd3.rgmii1_td3 */
107 0x120 (PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* mii1_txd2.rgmii1_td2 */
108 0x124 (PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* mii1_txd1.rgmii1_td1 */
109 0x128 (PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* mii1_txd0.rgmii1_td0 */
110 0x12c (PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* mii1_txclk.rgmii1_tclk */
111 0x130 (PIN_INPUT_PULLDOWN | MUX_MODE2) /* mii1_rxclk.rgmii1_rclk */
112 0x134 (PIN_INPUT_PULLDOWN | MUX_MODE2) /* mii1_rxd3.rgmii1_rd3 */
113 0x138 (PIN_INPUT_PULLDOWN | MUX_MODE2) /* mii1_rxd2.rgmii1_rd2 */
114 0x13c (PIN_INPUT_PULLDOWN | MUX_MODE2) /* mii1_rxd1.rgmii1_rd1 */
115 0x140 (PIN_INPUT_PULLDOWN | MUX_MODE2) /* mii1_rxd0.rgmii1_rd0 */
116 >;
117 };
118
119 cpsw_sleep: cpsw_sleep {
120 pinctrl-single,pins = <
121 /* Slave 1 reset value */
122 0x114 (PIN_INPUT_PULLDOWN | MUX_MODE7)
123 0x118 (PIN_INPUT_PULLDOWN | MUX_MODE7)
124 0x11c (PIN_INPUT_PULLDOWN | MUX_MODE7)
125 0x120 (PIN_INPUT_PULLDOWN | MUX_MODE7)
126 0x124 (PIN_INPUT_PULLDOWN | MUX_MODE7)
127 0x128 (PIN_INPUT_PULLDOWN | MUX_MODE7)
128 0x12c (PIN_INPUT_PULLDOWN | MUX_MODE7)
129 0x130 (PIN_INPUT_PULLDOWN | MUX_MODE7)
130 0x134 (PIN_INPUT_PULLDOWN | MUX_MODE7)
131 0x138 (PIN_INPUT_PULLDOWN | MUX_MODE7)
132 0x13c (PIN_INPUT_PULLDOWN | MUX_MODE7)
133 0x140 (PIN_INPUT_PULLDOWN | MUX_MODE7)
134 >;
135 };
136
137 davinci_mdio_default: davinci_mdio_default {
138 pinctrl-single,pins = <
139 /* MDIO */
140 0x148 (PIN_INPUT_PULLUP | SLEWCTRL_FAST | MUX_MODE0) /* mdio_data.mdio_data */
141 0x14c (PIN_OUTPUT_PULLUP | MUX_MODE0) /* mdio_clk.mdio_clk */
142 >;
143 };
144
145 davinci_mdio_sleep: davinci_mdio_sleep {
146 pinctrl-single,pins = <
147 /* MDIO reset value */
148 0x148 (PIN_INPUT_PULLDOWN | MUX_MODE7)
149 0x14c (PIN_INPUT_PULLDOWN | MUX_MODE7)
45 >; 150 >;
46 }; 151 };
47 }; 152 };
48 153
49 ocp { 154 ocp {
50 uart1: serial@44e09000 { 155 uart0: serial@44e09000 {
156 pinctrl-names = "default";
157 pinctrl-0 = <&uart0_pins>;
158
51 status = "okay"; 159 status = "okay";
52 }; 160 };
53 161
54 i2c0: i2c@44e0b000 { 162 i2c0: i2c@44e0b000 {
163 pinctrl-names = "default";
164 pinctrl-0 = <&i2c0_pins>;
165
55 status = "okay"; 166 status = "okay";
56 clock-frequency = <400000>; 167 clock-frequency = <400000>;
57 168
@@ -61,6 +172,9 @@
61 }; 172 };
62 173
63 i2c1: i2c@4802a000 { 174 i2c1: i2c@4802a000 {
175 pinctrl-names = "default";
176 pinctrl-0 = <&i2c1_pins>;
177
64 status = "okay"; 178 status = "okay";
65 clock-frequency = <100000>; 179 clock-frequency = <100000>;
66 180
@@ -102,6 +216,101 @@
102 reg = <0x48>; 216 reg = <0x48>;
103 }; 217 };
104 }; 218 };
219
220 elm: elm@48080000 {
221 status = "okay";
222 };
223
224 epwmss0: epwmss@48300000 {
225 status = "okay";
226
227 ecap0: ecap@48300100 {
228 status = "okay";
229 pinctrl-names = "default";
230 pinctrl-0 = <&ecap0_pins>;
231 };
232 };
233
234 gpmc: gpmc@50000000 {
235 status = "okay";
236 pinctrl-names = "default";
237 pinctrl-0 = <&nandflash_pins_s0>;
238 ranges = <0 0 0x08000000 0x10000000>; /* CS0: NAND */
239 nand@0,0 {
240 reg = <0 0 0>; /* CS0, offset 0 */
241 nand-bus-width = <8>;
242 ti,nand-ecc-opt = "bch8";
243 gpmc,device-nand = "true";
244 gpmc,device-width = <1>;
245 gpmc,sync-clk-ps = <0>;
246 gpmc,cs-on-ns = <0>;
247 gpmc,cs-rd-off-ns = <44>;
248 gpmc,cs-wr-off-ns = <44>;
249 gpmc,adv-on-ns = <6>;
250 gpmc,adv-rd-off-ns = <34>;
251 gpmc,adv-wr-off-ns = <44>;
252 gpmc,we-on-ns = <0>;
253 gpmc,we-off-ns = <40>;
254 gpmc,oe-on-ns = <0>;
255 gpmc,oe-off-ns = <54>;
256 gpmc,access-ns = <64>;
257 gpmc,rd-cycle-ns = <82>;
258 gpmc,wr-cycle-ns = <82>;
259 gpmc,wait-on-read = "true";
260 gpmc,wait-on-write = "true";
261 gpmc,bus-turnaround-ns = <0>;
262 gpmc,cycle2cycle-delay-ns = <0>;
263 gpmc,clk-activation-ns = <0>;
264 gpmc,wait-monitoring-ns = <0>;
265 gpmc,wr-access-ns = <40>;
266 gpmc,wr-data-mux-bus-ns = <0>;
267
268 #address-cells = <1>;
269 #size-cells = <1>;
270 elm_id = <&elm>;
271
272 /* MTD partition table */
273 partition@0 {
274 label = "SPL1";
275 reg = <0x00000000 0x000020000>;
276 };
277
278 partition@1 {
279 label = "SPL2";
280 reg = <0x00020000 0x00020000>;
281 };
282
283 partition@2 {
284 label = "SPL3";
285 reg = <0x00040000 0x00020000>;
286 };
287
288 partition@3 {
289 label = "SPL4";
290 reg = <0x00060000 0x00020000>;
291 };
292
293 partition@4 {
294 label = "U-boot";
295 reg = <0x00080000 0x001e0000>;
296 };
297
298 partition@5 {
299 label = "environment";
300 reg = <0x00260000 0x00020000>;
301 };
302
303 partition@6 {
304 label = "Kernel";
305 reg = <0x00280000 0x00500000>;
306 };
307
308 partition@7 {
309 label = "File-System";
310 reg = <0x00780000 0x0F880000>;
311 };
312 };
313 };
105 }; 314 };
106 315
107 vbat: fixedregulator@0 { 316 vbat: fixedregulator@0 {
@@ -123,12 +332,12 @@
123 debounce-delay-ms = <5>; 332 debounce-delay-ms = <5>;
124 col-scan-delay-us = <2>; 333 col-scan-delay-us = <2>;
125 334
126 row-gpios = <&gpio1 25 0 /* Bank1, pin25 */ 335 row-gpios = <&gpio1 25 GPIO_ACTIVE_HIGH /* Bank1, pin25 */
127 &gpio1 26 0 /* Bank1, pin26 */ 336 &gpio1 26 GPIO_ACTIVE_HIGH /* Bank1, pin26 */
128 &gpio1 27 0>; /* Bank1, pin27 */ 337 &gpio1 27 GPIO_ACTIVE_HIGH>; /* Bank1, pin27 */
129 338
130 col-gpios = <&gpio1 21 0 /* Bank1, pin21 */ 339 col-gpios = <&gpio1 21 GPIO_ACTIVE_HIGH /* Bank1, pin21 */
131 &gpio1 22 0>; /* Bank1, pin22 */ 340 &gpio1 22 GPIO_ACTIVE_HIGH>; /* Bank1, pin22 */
132 341
133 linux,keymap = <0x0000008b /* MENU */ 342 linux,keymap = <0x0000008b /* MENU */
134 0x0100009e /* BACK */ 343 0x0100009e /* BACK */
@@ -147,20 +356,27 @@
147 switch@9 { 356 switch@9 {
148 label = "volume-up"; 357 label = "volume-up";
149 linux,code = <115>; 358 linux,code = <115>;
150 gpios = <&gpio0 2 1>; 359 gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
151 gpio-key,wakeup; 360 gpio-key,wakeup;
152 }; 361 };
153 362
154 switch@10 { 363 switch@10 {
155 label = "volume-down"; 364 label = "volume-down";
156 linux,code = <114>; 365 linux,code = <114>;
157 gpios = <&gpio0 3 1>; 366 gpios = <&gpio0 3 GPIO_ACTIVE_LOW>;
158 gpio-key,wakeup; 367 gpio-key,wakeup;
159 }; 368 };
160 }; 369 };
370
371 backlight {
372 compatible = "pwm-backlight";
373 pwms = <&ecap0 0 50000 0>;
374 brightness-levels = <0 51 53 56 62 75 101 152 255>;
375 default-brightness-level = <8>;
376 };
161}; 377};
162 378
163/include/ "tps65910.dtsi" 379#include "tps65910.dtsi"
164 380
165&tps { 381&tps {
166 vcc1-supply = <&vbat>; 382 vcc1-supply = <&vbat>;
@@ -237,10 +453,38 @@
237 }; 453 };
238}; 454};
239 455
456&mac {
457 pinctrl-names = "default", "sleep";
458 pinctrl-0 = <&cpsw_default>;
459 pinctrl-1 = <&cpsw_sleep>;
460};
461
462&davinci_mdio {
463 pinctrl-names = "default", "sleep";
464 pinctrl-0 = <&davinci_mdio_default>;
465 pinctrl-1 = <&davinci_mdio_sleep>;
466};
467
240&cpsw_emac0 { 468&cpsw_emac0 {
241 phy_id = <&davinci_mdio>, <0>; 469 phy_id = <&davinci_mdio>, <0>;
470 phy-mode = "rgmii-txid";
242}; 471};
243 472
244&cpsw_emac1 { 473&cpsw_emac1 {
245 phy_id = <&davinci_mdio>, <1>; 474 phy_id = <&davinci_mdio>, <1>;
475 phy-mode = "rgmii-txid";
476};
477
478&tscadc {
479 status = "okay";
480 tsc {
481 ti,wires = <4>;
482 ti,x-plate-resistance = <200>;
483 ti,coordiante-readouts = <5>;
484 ti,wire-config = <0x00 0x11 0x22 0x33>;
485 };
486
487 adc {
488 ti,adc-channels = <4 5 6 7>;
489 };
246}; 490};
diff --git a/arch/arm/boot/dts/am335x-evmsk.dts b/arch/arm/boot/dts/am335x-evmsk.dts
index f67c360844f4..0c8ad173d2b0 100644
--- a/arch/arm/boot/dts/am335x-evmsk.dts
+++ b/arch/arm/boot/dts/am335x-evmsk.dts
@@ -13,7 +13,7 @@
13 13
14/dts-v1/; 14/dts-v1/;
15 15
16/include/ "am33xx.dtsi" 16#include "am33xx.dtsi"
17 17
18/ { 18/ {
19 model = "TI AM335x EVM-SK"; 19 model = "TI AM335x EVM-SK";
@@ -32,33 +32,145 @@
32 32
33 am33xx_pinmux: pinmux@44e10800 { 33 am33xx_pinmux: pinmux@44e10800 {
34 pinctrl-names = "default"; 34 pinctrl-names = "default";
35 pinctrl-0 = <&user_leds_s0 &gpio_keys_s0>; 35 pinctrl-0 = <&gpio_keys_s0 &clkout2_pin>;
36 36
37 user_leds_s0: user_leds_s0 { 37 user_leds_s0: user_leds_s0 {
38 pinctrl-single,pins = < 38 pinctrl-single,pins = <
39 0x10 0x7 /* gpmc_ad4.gpio1_4, OUTPUT | MODE7 */ 39 0x10 (PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* gpmc_ad4.gpio1_4 */
40 0x14 0x7 /* gpmc_ad5.gpio1_5, OUTPUT | MODE7 */ 40 0x14 (PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* gpmc_ad5.gpio1_5 */
41 0x18 0x7 /* gpmc_ad6.gpio1_6, OUTPUT | MODE7 */ 41 0x18 (PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* gpmc_ad6.gpio1_6 */
42 0x1c 0x7 /* gpmc_ad7.gpio1_7, OUTPUT | MODE7 */ 42 0x1c (PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* gpmc_ad7.gpio1_7 */
43 >; 43 >;
44 }; 44 };
45 45
46 gpio_keys_s0: gpio_keys_s0 { 46 gpio_keys_s0: gpio_keys_s0 {
47 pinctrl-single,pins = < 47 pinctrl-single,pins = <
48 0x94 0x27 /* gpmc_oen_ren.gpio2_3, INPUT | MODE7 */ 48 0x94 (PIN_INPUT_PULLDOWN | MUX_MODE7) /* gpmc_oen_ren.gpio2_3 */
49 0x90 0x27 /* gpmc_advn_ale.gpio2_2, INPUT | MODE7 */ 49 0x90 (PIN_INPUT_PULLDOWN | MUX_MODE7) /* gpmc_advn_ale.gpio2_2 */
50 0x70 0x27 /* gpmc_wait0.gpio0_30, INPUT | MODE7 */ 50 0x70 (PIN_INPUT_PULLDOWN | MUX_MODE7) /* gpmc_wait0.gpio0_30 */
51 0x9c 0x27 /* gpmc_ben0_cle.gpio2_5, INPUT | MODE7 */ 51 0x9c (PIN_INPUT_PULLDOWN | MUX_MODE7) /* gpmc_ben0_cle.gpio2_5 */
52 >;
53 };
54
55 i2c0_pins: pinmux_i2c0_pins {
56 pinctrl-single,pins = <
57 0x188 (PIN_INPUT_PULLUP | MUX_MODE0) /* i2c0_sda.i2c0_sda */
58 0x18c (PIN_INPUT_PULLUP | MUX_MODE0) /* i2c0_scl.i2c0_scl */
59 >;
60 };
61
62 uart0_pins: pinmux_uart0_pins {
63 pinctrl-single,pins = <
64 0x170 (PIN_INPUT_PULLUP | MUX_MODE0) /* uart0_rxd.uart0_rxd */
65 0x174 (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* uart0_txd.uart0_txd */
66 >;
67 };
68
69 clkout2_pin: pinmux_clkout2_pin {
70 pinctrl-single,pins = <
71 0x1b4 (PIN_OUTPUT_PULLDOWN | MUX_MODE3) /* xdma_event_intr1.clkout2 */
72 >;
73 };
74
75 ecap2_pins: backlight_pins {
76 pinctrl-single,pins = <
77 0x19c 0x4 /* mcasp0_ahclkr.ecap2_in_pwm2_out MODE4 */
78 >;
79 };
80
81 cpsw_default: cpsw_default {
82 pinctrl-single,pins = <
83 /* Slave 1 */
84 0x114 (PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* mii1_txen.rgmii1_tctl */
85 0x118 (PIN_INPUT_PULLDOWN | MUX_MODE2) /* mii1_rxdv.rgmii1_rctl */
86 0x11c (PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* mii1_txd3.rgmii1_td3 */
87 0x120 (PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* mii1_txd2.rgmii1_td2 */
88 0x124 (PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* mii1_txd1.rgmii1_td1 */
89 0x128 (PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* mii1_txd0.rgmii1_td0 */
90 0x12c (PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* mii1_txclk.rgmii1_tclk */
91 0x130 (PIN_INPUT_PULLDOWN | MUX_MODE2) /* mii1_rxclk.rgmii1_rclk */
92 0x134 (PIN_INPUT_PULLDOWN | MUX_MODE2) /* mii1_rxd3.rgmii1_rd3 */
93 0x138 (PIN_INPUT_PULLDOWN | MUX_MODE2) /* mii1_rxd2.rgmii1_rd2 */
94 0x13c (PIN_INPUT_PULLDOWN | MUX_MODE2) /* mii1_rxd1.rgmii1_rd1 */
95 0x140 (PIN_INPUT_PULLDOWN | MUX_MODE2) /* mii1_rxd0.rgmii1_rd0 */
96
97 /* Slave 2 */
98 0x40 (PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* gpmc_a0.rgmii2_tctl */
99 0x44 (PIN_INPUT_PULLDOWN | MUX_MODE2) /* gpmc_a1.rgmii2_rctl */
100 0x48 (PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* gpmc_a2.rgmii2_td3 */
101 0x4c (PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* gpmc_a3.rgmii2_td2 */
102 0x50 (PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* gpmc_a4.rgmii2_td1 */
103 0x54 (PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* gpmc_a5.rgmii2_td0 */
104 0x58 (PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* gpmc_a6.rgmii2_tclk */
105 0x5c (PIN_INPUT_PULLDOWN | MUX_MODE2) /* gpmc_a7.rgmii2_rclk */
106 0x60 (PIN_INPUT_PULLDOWN | MUX_MODE2) /* gpmc_a8.rgmii2_rd3 */
107 0x64 (PIN_INPUT_PULLDOWN | MUX_MODE2) /* gpmc_a9.rgmii2_rd2 */
108 0x68 (PIN_INPUT_PULLDOWN | MUX_MODE2) /* gpmc_a10.rgmii2_rd1 */
109 0x6c (PIN_INPUT_PULLDOWN | MUX_MODE2) /* gpmc_a11.rgmii2_rd0 */
110 >;
111 };
112
113 cpsw_sleep: cpsw_sleep {
114 pinctrl-single,pins = <
115 /* Slave 1 reset value */
116 0x114 (PIN_INPUT_PULLDOWN | MUX_MODE7)
117 0x118 (PIN_INPUT_PULLDOWN | MUX_MODE7)
118 0x11c (PIN_INPUT_PULLDOWN | MUX_MODE7)
119 0x120 (PIN_INPUT_PULLDOWN | MUX_MODE7)
120 0x124 (PIN_INPUT_PULLDOWN | MUX_MODE7)
121 0x128 (PIN_INPUT_PULLDOWN | MUX_MODE7)
122 0x12c (PIN_INPUT_PULLDOWN | MUX_MODE7)
123 0x130 (PIN_INPUT_PULLDOWN | MUX_MODE7)
124 0x134 (PIN_INPUT_PULLDOWN | MUX_MODE7)
125 0x138 (PIN_INPUT_PULLDOWN | MUX_MODE7)
126 0x13c (PIN_INPUT_PULLDOWN | MUX_MODE7)
127 0x140 (PIN_INPUT_PULLDOWN | MUX_MODE7)
128
129 /* Slave 2 reset value*/
130 0x40 (PIN_INPUT_PULLDOWN | MUX_MODE7)
131 0x44 (PIN_INPUT_PULLDOWN | MUX_MODE7)
132 0x48 (PIN_INPUT_PULLDOWN | MUX_MODE7)
133 0x4c (PIN_INPUT_PULLDOWN | MUX_MODE7)
134 0x50 (PIN_INPUT_PULLDOWN | MUX_MODE7)
135 0x54 (PIN_INPUT_PULLDOWN | MUX_MODE7)
136 0x58 (PIN_INPUT_PULLDOWN | MUX_MODE7)
137 0x5c (PIN_INPUT_PULLDOWN | MUX_MODE7)
138 0x60 (PIN_INPUT_PULLDOWN | MUX_MODE7)
139 0x64 (PIN_INPUT_PULLDOWN | MUX_MODE7)
140 0x68 (PIN_INPUT_PULLDOWN | MUX_MODE7)
141 0x6c (PIN_INPUT_PULLDOWN | MUX_MODE7)
142 >;
143 };
144
145 davinci_mdio_default: davinci_mdio_default {
146 pinctrl-single,pins = <
147 /* MDIO */
148 0x148 (PIN_INPUT_PULLUP | SLEWCTRL_FAST | MUX_MODE0) /* mdio_data.mdio_data */
149 0x14c (PIN_OUTPUT_PULLUP | MUX_MODE0) /* mdio_clk.mdio_clk */
150 >;
151 };
152
153 davinci_mdio_sleep: davinci_mdio_sleep {
154 pinctrl-single,pins = <
155 /* MDIO reset value */
156 0x148 (PIN_INPUT_PULLDOWN | MUX_MODE7)
157 0x14c (PIN_INPUT_PULLDOWN | MUX_MODE7)
52 >; 158 >;
53 }; 159 };
54 }; 160 };
55 161
56 ocp { 162 ocp {
57 uart1: serial@44e09000 { 163 uart0: serial@44e09000 {
164 pinctrl-names = "default";
165 pinctrl-0 = <&uart0_pins>;
166
58 status = "okay"; 167 status = "okay";
59 }; 168 };
60 169
61 i2c0: i2c@44e0b000 { 170 i2c0: i2c@44e0b000 {
171 pinctrl-names = "default";
172 pinctrl-0 = <&i2c0_pins>;
173
62 status = "okay"; 174 status = "okay";
63 clock-frequency = <400000>; 175 clock-frequency = <400000>;
64 176
@@ -94,6 +206,16 @@
94 st,max-limit-z = <750>; 206 st,max-limit-z = <750>;
95 }; 207 };
96 }; 208 };
209
210 epwmss2: epwmss@48304000 {
211 status = "okay";
212
213 ecap2: ecap@48304100 {
214 status = "okay";
215 pinctrl-names = "default";
216 pinctrl-0 = <&ecap2_pins>;
217 };
218 };
97 }; 219 };
98 220
99 vbat: fixedregulator@0 { 221 vbat: fixedregulator@0 {
@@ -111,30 +233,33 @@
111 }; 233 };
112 234
113 leds { 235 leds {
236 pinctrl-names = "default";
237 pinctrl-0 = <&user_leds_s0>;
238
114 compatible = "gpio-leds"; 239 compatible = "gpio-leds";
115 240
116 led@1 { 241 led@1 {
117 label = "evmsk:green:usr0"; 242 label = "evmsk:green:usr0";
118 gpios = <&gpio1 4 0>; 243 gpios = <&gpio1 4 GPIO_ACTIVE_HIGH>;
119 default-state = "off"; 244 default-state = "off";
120 }; 245 };
121 246
122 led@2 { 247 led@2 {
123 label = "evmsk:green:usr1"; 248 label = "evmsk:green:usr1";
124 gpios = <&gpio1 5 0>; 249 gpios = <&gpio1 5 GPIO_ACTIVE_HIGH>;
125 default-state = "off"; 250 default-state = "off";
126 }; 251 };
127 252
128 led@3 { 253 led@3 {
129 label = "evmsk:green:mmc0"; 254 label = "evmsk:green:mmc0";
130 gpios = <&gpio1 6 0>; 255 gpios = <&gpio1 6 GPIO_ACTIVE_HIGH>;
131 linux,default-trigger = "mmc0"; 256 linux,default-trigger = "mmc0";
132 default-state = "off"; 257 default-state = "off";
133 }; 258 };
134 259
135 led@4 { 260 led@4 {
136 label = "evmsk:green:heartbeat"; 261 label = "evmsk:green:heartbeat";
137 gpios = <&gpio1 7 0>; 262 gpios = <&gpio1 7 GPIO_ACTIVE_HIGH>;
138 linux,default-trigger = "heartbeat"; 263 linux,default-trigger = "heartbeat";
139 default-state = "off"; 264 default-state = "off";
140 }; 265 };
@@ -148,31 +273,38 @@
148 switch@1 { 273 switch@1 {
149 label = "button0"; 274 label = "button0";
150 linux,code = <0x100>; 275 linux,code = <0x100>;
151 gpios = <&gpio2 3 0>; 276 gpios = <&gpio2 3 GPIO_ACTIVE_HIGH>;
152 }; 277 };
153 278
154 switch@2 { 279 switch@2 {
155 label = "button1"; 280 label = "button1";
156 linux,code = <0x101>; 281 linux,code = <0x101>;
157 gpios = <&gpio2 2 0>; 282 gpios = <&gpio2 2 GPIO_ACTIVE_HIGH>;
158 }; 283 };
159 284
160 switch@3 { 285 switch@3 {
161 label = "button2"; 286 label = "button2";
162 linux,code = <0x102>; 287 linux,code = <0x102>;
163 gpios = <&gpio0 30 0>; 288 gpios = <&gpio0 30 GPIO_ACTIVE_HIGH>;
164 gpio-key,wakeup; 289 gpio-key,wakeup;
165 }; 290 };
166 291
167 switch@4 { 292 switch@4 {
168 label = "button3"; 293 label = "button3";
169 linux,code = <0x103>; 294 linux,code = <0x103>;
170 gpios = <&gpio2 5 0>; 295 gpios = <&gpio2 5 GPIO_ACTIVE_HIGH>;
171 }; 296 };
172 }; 297 };
298
299 backlight {
300 compatible = "pwm-backlight";
301 pwms = <&ecap2 0 50000 1>;
302 brightness-levels = <0 58 61 66 75 90 125 170 255>;
303 default-brightness-level = <8>;
304 };
173}; 305};
174 306
175/include/ "tps65910.dtsi" 307#include "tps65910.dtsi"
176 308
177&tps { 309&tps {
178 vcc1-supply = <&vbat>; 310 vcc1-supply = <&vbat>;
@@ -248,3 +380,25 @@
248 }; 380 };
249 }; 381 };
250}; 382};
383
384&mac {
385 pinctrl-names = "default", "sleep";
386 pinctrl-0 = <&cpsw_default>;
387 pinctrl-1 = <&cpsw_sleep>;
388};
389
390&davinci_mdio {
391 pinctrl-names = "default", "sleep";
392 pinctrl-0 = <&davinci_mdio_default>;
393 pinctrl-1 = <&davinci_mdio_sleep>;
394};
395
396&cpsw_emac0 {
397 phy_id = <&davinci_mdio>, <0>;
398 phy-mode = "rgmii-txid";
399};
400
401&cpsw_emac1 {
402 phy_id = <&davinci_mdio>, <1>;
403 phy-mode = "rgmii-txid";
404};
diff --git a/arch/arm/boot/dts/am33xx.dtsi b/arch/arm/boot/dts/am33xx.dtsi
index 8e1248f01fab..38b446ba1ce1 100644
--- a/arch/arm/boot/dts/am33xx.dtsi
+++ b/arch/arm/boot/dts/am33xx.dtsi
@@ -8,26 +8,33 @@
8 * kind, whether express or implied. 8 * kind, whether express or implied.
9 */ 9 */
10 10
11/include/ "skeleton.dtsi" 11#include <dt-bindings/gpio/gpio.h>
12#include <dt-bindings/pinctrl/am33xx.h>
13
14#include "skeleton.dtsi"
12 15
13/ { 16/ {
14 compatible = "ti,am33xx"; 17 compatible = "ti,am33xx";
15 interrupt-parent = <&intc>; 18 interrupt-parent = <&intc>;
16 19
17 aliases { 20 aliases {
18 serial0 = &uart1; 21 serial0 = &uart0;
19 serial1 = &uart2; 22 serial1 = &uart1;
20 serial2 = &uart3; 23 serial2 = &uart2;
21 serial3 = &uart4; 24 serial3 = &uart3;
22 serial4 = &uart5; 25 serial4 = &uart4;
23 serial5 = &uart6; 26 serial5 = &uart5;
24 d_can0 = &dcan0; 27 d_can0 = &dcan0;
25 d_can1 = &dcan1; 28 d_can1 = &dcan1;
26 }; 29 };
27 30
28 cpus { 31 cpus {
32 #address-cells = <1>;
33 #size-cells = <0>;
29 cpu@0 { 34 cpu@0 {
30 compatible = "arm,cortex-a8"; 35 compatible = "arm,cortex-a8";
36 device_type = "cpu";
37 reg = <0>;
31 38
32 /* 39 /*
33 * To consider voltage drop between PMIC and SoC, 40 * To consider voltage drop between PMIC and SoC,
@@ -133,7 +140,7 @@
133 interrupts = <62>; 140 interrupts = <62>;
134 }; 141 };
135 142
136 uart1: serial@44e09000 { 143 uart0: serial@44e09000 {
137 compatible = "ti,omap3-uart"; 144 compatible = "ti,omap3-uart";
138 ti,hwmods = "uart1"; 145 ti,hwmods = "uart1";
139 clock-frequency = <48000000>; 146 clock-frequency = <48000000>;
@@ -142,7 +149,7 @@
142 status = "disabled"; 149 status = "disabled";
143 }; 150 };
144 151
145 uart2: serial@48022000 { 152 uart1: serial@48022000 {
146 compatible = "ti,omap3-uart"; 153 compatible = "ti,omap3-uart";
147 ti,hwmods = "uart2"; 154 ti,hwmods = "uart2";
148 clock-frequency = <48000000>; 155 clock-frequency = <48000000>;
@@ -151,7 +158,7 @@
151 status = "disabled"; 158 status = "disabled";
152 }; 159 };
153 160
154 uart3: serial@48024000 { 161 uart2: serial@48024000 {
155 compatible = "ti,omap3-uart"; 162 compatible = "ti,omap3-uart";
156 ti,hwmods = "uart3"; 163 ti,hwmods = "uart3";
157 clock-frequency = <48000000>; 164 clock-frequency = <48000000>;
@@ -160,7 +167,7 @@
160 status = "disabled"; 167 status = "disabled";
161 }; 168 };
162 169
163 uart4: serial@481a6000 { 170 uart3: serial@481a6000 {
164 compatible = "ti,omap3-uart"; 171 compatible = "ti,omap3-uart";
165 ti,hwmods = "uart4"; 172 ti,hwmods = "uart4";
166 clock-frequency = <48000000>; 173 clock-frequency = <48000000>;
@@ -169,7 +176,7 @@
169 status = "disabled"; 176 status = "disabled";
170 }; 177 };
171 178
172 uart5: serial@481a8000 { 179 uart4: serial@481a8000 {
173 compatible = "ti,omap3-uart"; 180 compatible = "ti,omap3-uart";
174 ti,hwmods = "uart5"; 181 ti,hwmods = "uart5";
175 clock-frequency = <48000000>; 182 clock-frequency = <48000000>;
@@ -178,7 +185,7 @@
178 status = "disabled"; 185 status = "disabled";
179 }; 186 };
180 187
181 uart6: serial@481aa000 { 188 uart5: serial@481aa000 {
182 compatible = "ti,omap3-uart"; 189 compatible = "ti,omap3-uart";
183 ti,hwmods = "uart6"; 190 ti,hwmods = "uart6";
184 clock-frequency = <48000000>; 191 clock-frequency = <48000000>;
@@ -343,6 +350,90 @@
343 ti,hwmods = "usb_otg_hs"; 350 ti,hwmods = "usb_otg_hs";
344 }; 351 };
345 352
353 epwmss0: epwmss@48300000 {
354 compatible = "ti,am33xx-pwmss";
355 reg = <0x48300000 0x10>;
356 ti,hwmods = "epwmss0";
357 #address-cells = <1>;
358 #size-cells = <1>;
359 status = "disabled";
360 ranges = <0x48300100 0x48300100 0x80 /* ECAP */
361 0x48300180 0x48300180 0x80 /* EQEP */
362 0x48300200 0x48300200 0x80>; /* EHRPWM */
363
364 ecap0: ecap@48300100 {
365 compatible = "ti,am33xx-ecap";
366 #pwm-cells = <3>;
367 reg = <0x48300100 0x80>;
368 ti,hwmods = "ecap0";
369 status = "disabled";
370 };
371
372 ehrpwm0: ehrpwm@48300200 {
373 compatible = "ti,am33xx-ehrpwm";
374 #pwm-cells = <3>;
375 reg = <0x48300200 0x80>;
376 ti,hwmods = "ehrpwm0";
377 status = "disabled";
378 };
379 };
380
381 epwmss1: epwmss@48302000 {
382 compatible = "ti,am33xx-pwmss";
383 reg = <0x48302000 0x10>;
384 ti,hwmods = "epwmss1";
385 #address-cells = <1>;
386 #size-cells = <1>;
387 status = "disabled";
388 ranges = <0x48302100 0x48302100 0x80 /* ECAP */
389 0x48302180 0x48302180 0x80 /* EQEP */
390 0x48302200 0x48302200 0x80>; /* EHRPWM */
391
392 ecap1: ecap@48302100 {
393 compatible = "ti,am33xx-ecap";
394 #pwm-cells = <3>;
395 reg = <0x48302100 0x80>;
396 ti,hwmods = "ecap1";
397 status = "disabled";
398 };
399
400 ehrpwm1: ehrpwm@48302200 {
401 compatible = "ti,am33xx-ehrpwm";
402 #pwm-cells = <3>;
403 reg = <0x48302200 0x80>;
404 ti,hwmods = "ehrpwm1";
405 status = "disabled";
406 };
407 };
408
409 epwmss2: epwmss@48304000 {
410 compatible = "ti,am33xx-pwmss";
411 reg = <0x48304000 0x10>;
412 ti,hwmods = "epwmss2";
413 #address-cells = <1>;
414 #size-cells = <1>;
415 status = "disabled";
416 ranges = <0x48304100 0x48304100 0x80 /* ECAP */
417 0x48304180 0x48304180 0x80 /* EQEP */
418 0x48304200 0x48304200 0x80>; /* EHRPWM */
419
420 ecap2: ecap@48304100 {
421 compatible = "ti,am33xx-ecap";
422 #pwm-cells = <3>;
423 reg = <0x48304100 0x80>;
424 ti,hwmods = "ecap2";
425 status = "disabled";
426 };
427
428 ehrpwm2: ehrpwm@48304200 {
429 compatible = "ti,am33xx-ehrpwm";
430 #pwm-cells = <3>;
431 reg = <0x48304200 0x80>;
432 ti,hwmods = "ehrpwm2";
433 status = "disabled";
434 };
435 };
436
346 mac: ethernet@4a100000 { 437 mac: ethernet@4a100000 {
347 compatible = "ti,cpsw"; 438 compatible = "ti,cpsw";
348 ti,hwmods = "cpgmac0"; 439 ti,hwmods = "cpgmac0";
@@ -394,7 +485,6 @@
394 compatible = "ti,am3352-ocmcram"; 485 compatible = "ti,am3352-ocmcram";
395 reg = <0x40300000 0x10000>; 486 reg = <0x40300000 0x10000>;
396 ti,hwmods = "ocmcram"; 487 ti,hwmods = "ocmcram";
397 ti,no_idle_on_suspend;
398 }; 488 };
399 489
400 wkup_m3: wkup_m3@44d00000 { 490 wkup_m3: wkup_m3@44d00000 {
@@ -404,6 +494,31 @@
404 ti,hwmods = "wkup_m3"; 494 ti,hwmods = "wkup_m3";
405 }; 495 };
406 496
497 elm: elm@48080000 {
498 compatible = "ti,am3352-elm";
499 reg = <0x48080000 0x2000>;
500 interrupts = <4>;
501 ti,hwmods = "elm";
502 status = "disabled";
503 };
504
505 tscadc: tscadc@44e0d000 {
506 compatible = "ti,am3359-tscadc";
507 reg = <0x44e0d000 0x1000>;
508 interrupt-parent = <&intc>;
509 interrupts = <16>;
510 ti,hwmods = "adc_tsc";
511 status = "disabled";
512
513 tsc {
514 compatible = "ti,am3359-tsc";
515 };
516 am335x_adc: adc {
517 #io-channel-cells = <1>;
518 compatible = "ti,am3359-adc";
519 };
520 };
521
407 gpmc: gpmc@50000000 { 522 gpmc: gpmc@50000000 {
408 compatible = "ti,am3352-gpmc"; 523 compatible = "ti,am3352-gpmc";
409 ti,hwmods = "gpmc"; 524 ti,hwmods = "gpmc";
diff --git a/arch/arm/boot/dts/am3517-evm.dts b/arch/arm/boot/dts/am3517-evm.dts
index e9b5bdae4908..e99dfaf70052 100644
--- a/arch/arm/boot/dts/am3517-evm.dts
+++ b/arch/arm/boot/dts/am3517-evm.dts
@@ -7,7 +7,7 @@
7 */ 7 */
8/dts-v1/; 8/dts-v1/;
9 9
10/include/ "omap34xx.dtsi" 10#include "omap34xx.dtsi"
11 11
12/ { 12/ {
13 model = "TI AM3517 EVM (AM3517/05)"; 13 model = "TI AM3517 EVM (AM3517/05)";
diff --git a/arch/arm/boot/dts/am3517_mt_ventoux.dts b/arch/arm/boot/dts/am3517_mt_ventoux.dts
index 556868388a23..fdf5ce63c8e6 100644
--- a/arch/arm/boot/dts/am3517_mt_ventoux.dts
+++ b/arch/arm/boot/dts/am3517_mt_ventoux.dts
@@ -7,7 +7,7 @@
7 */ 7 */
8/dts-v1/; 8/dts-v1/;
9 9
10/include/ "omap34xx.dtsi" 10#include "omap34xx.dtsi"
11 11
12/ { 12/ {
13 model = "TeeJet Mt.Ventoux"; 13 model = "TeeJet Mt.Ventoux";
diff --git a/arch/arm/boot/dts/am4372.dtsi b/arch/arm/boot/dts/am4372.dtsi
new file mode 100644
index 000000000000..ddc1df77ac52
--- /dev/null
+++ b/arch/arm/boot/dts/am4372.dtsi
@@ -0,0 +1,68 @@
1/*
2 * Device Tree Source for AM4372 SoC
3 *
4 * Copyright (C) 2013 Texas Instruments Incorporated - http://www.ti.com/
5 *
6 * This file is licensed under the terms of the GNU General Public License
7 * version 2. This program is licensed "as is" without any warranty of any
8 * kind, whether express or implied.
9 */
10
11#include <dt-bindings/interrupt-controller/arm-gic.h>
12
13#include "skeleton.dtsi"
14
15/ {
16 compatible = "ti,am4372", "ti,am43";
17 interrupt-parent = <&gic>;
18
19
20 aliases {
21 serial0 = &uart0;
22 };
23
24 cpus {
25 cpu@0 {
26 compatible = "arm,cortex-a9";
27 };
28 };
29
30 gic: interrupt-controller@48241000 {
31 compatible = "arm,cortex-a9-gic";
32 interrupt-controller;
33 #interrupt-cells = <3>;
34 reg = <0x48241000 0x1000>,
35 <0x48240100 0x0100>;
36 };
37
38 ocp {
39 compatible = "simple-bus";
40 #address-cells = <1>;
41 #size-cells = <1>;
42 ranges;
43
44 uart0: serial@44e09000 {
45 compatible = "ti,am4372-uart","ti,omap2-uart";
46 reg = <0x44e09000 0x2000>;
47 interrupts = <GIC_SPI 72 IRQ_TYPE_LEVEL_HIGH>;
48 };
49
50 timer1: timer@44e31000 {
51 compatible = "ti,am4372-timer-1ms","ti,am335x-timer-1ms";
52 reg = <0x44e31000 0x400>;
53 interrupts = <GIC_SPI 67 IRQ_TYPE_LEVEL_HIGH>;
54 ti,timer-alwon;
55 };
56
57 timer2: timer@48040000 {
58 compatible = "ti,am4372-timer","ti,am335x-timer";
59 reg = <0x48040000 0x400>;
60 interrupts = <GIC_SPI 68 IRQ_TYPE_LEVEL_HIGH>;
61 };
62
63 counter32k: counter@44e86000 {
64 compatible = "ti,am4372-counter32k","ti,omap-counter32k";
65 reg = <0x44e86000 0x40>;
66 };
67 };
68};
diff --git a/arch/arm/boot/dts/am43x-epos-evm.dts b/arch/arm/boot/dts/am43x-epos-evm.dts
new file mode 100644
index 000000000000..74174d48f476
--- /dev/null
+++ b/arch/arm/boot/dts/am43x-epos-evm.dts
@@ -0,0 +1,18 @@
1/*
2 * Copyright (C) 2013 Texas Instruments Incorporated - http://www.ti.com/
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/* AM43x EPOS EVM */
10
11/dts-v1/;
12
13#include "am4372.dtsi"
14
15/ {
16 model = "TI AM43x EPOS EVM";
17 compatible = "ti,am43x-epos-evm","ti,am4372","ti,am43";
18};
diff --git a/arch/arm/boot/dts/animeo_ip.dts b/arch/arm/boot/dts/animeo_ip.dts
index 5160210f74da..3a1de9eb5111 100644
--- a/arch/arm/boot/dts/animeo_ip.dts
+++ b/arch/arm/boot/dts/animeo_ip.dts
@@ -7,7 +7,7 @@
7 */ 7 */
8 8
9/dts-v1/; 9/dts-v1/;
10/include/ "at91sam9260.dtsi" 10#include "at91sam9260.dtsi"
11 11
12/ { 12/ {
13 model = "Somfy Animeo IP"; 13 model = "Somfy Animeo IP";
@@ -123,7 +123,7 @@
123 123
124 usb0: ohci@00500000 { 124 usb0: ohci@00500000 {
125 num-ports = <2>; 125 num-ports = <2>;
126 atmel,vbus-gpio = <&pioB 15 1>; 126 atmel,vbus-gpio = <&pioB 15 GPIO_ACTIVE_LOW>;
127 status = "okay"; 127 status = "okay";
128 }; 128 };
129 }; 129 };
@@ -133,23 +133,23 @@
133 133
134 power_green { 134 power_green {
135 label = "power_green"; 135 label = "power_green";
136 gpios = <&pioC 17 0>; 136 gpios = <&pioC 17 GPIO_ACTIVE_HIGH>;
137 linux,default-trigger = "heartbeat"; 137 linux,default-trigger = "heartbeat";
138 }; 138 };
139 139
140 power_red { 140 power_red {
141 label = "power_red"; 141 label = "power_red";
142 gpios = <&pioA 2 0>; 142 gpios = <&pioA 2 GPIO_ACTIVE_HIGH>;
143 }; 143 };
144 144
145 tx_green { 145 tx_green {
146 label = "tx_green"; 146 label = "tx_green";
147 gpios = <&pioC 19 0>; 147 gpios = <&pioC 19 GPIO_ACTIVE_HIGH>;
148 }; 148 };
149 149
150 tx_red { 150 tx_red {
151 label = "tx_red"; 151 label = "tx_red";
152 gpios = <&pioC 18 0>; 152 gpios = <&pioC 18 GPIO_ACTIVE_HIGH>;
153 }; 153 };
154 }; 154 };
155 155
@@ -160,21 +160,21 @@
160 160
161 keyswitch_in { 161 keyswitch_in {
162 label = "keyswitch_in"; 162 label = "keyswitch_in";
163 gpios = <&pioB 1 0>; 163 gpios = <&pioB 1 GPIO_ACTIVE_HIGH>;
164 linux,code = <28>; 164 linux,code = <28>;
165 gpio-key,wakeup; 165 gpio-key,wakeup;
166 }; 166 };
167 167
168 error_in { 168 error_in {
169 label = "error_in"; 169 label = "error_in";
170 gpios = <&pioB 2 0>; 170 gpios = <&pioB 2 GPIO_ACTIVE_HIGH>;
171 linux,code = <29>; 171 linux,code = <29>;
172 gpio-key,wakeup; 172 gpio-key,wakeup;
173 }; 173 };
174 174
175 btn { 175 btn {
176 label = "btn"; 176 label = "btn";
177 gpios = <&pioC 23 0>; 177 gpios = <&pioC 23 GPIO_ACTIVE_HIGH>;
178 linux,code = <31>; 178 linux,code = <31>;
179 gpio-key,wakeup; 179 gpio-key,wakeup;
180 }; 180 };
diff --git a/arch/arm/boot/dts/armada-370-db.dts b/arch/arm/boot/dts/armada-370-db.dts
index 2353b1f13704..beee1699d49e 100644
--- a/arch/arm/boot/dts/armada-370-db.dts
+++ b/arch/arm/boot/dts/armada-370-db.dts
@@ -74,6 +74,7 @@
74 */ 74 */
75 status = "disabled"; 75 status = "disabled";
76 /* No CD or WP GPIOs */ 76 /* No CD or WP GPIOs */
77 broken-cd;
77 }; 78 };
78 79
79 usb@50000 { 80 usb@50000 {
diff --git a/arch/arm/boot/dts/armada-370-mirabox.dts b/arch/arm/boot/dts/armada-370-mirabox.dts
index 14e36e19d515..45b107763e3b 100644
--- a/arch/arm/boot/dts/armada-370-mirabox.dts
+++ b/arch/arm/boot/dts/armada-370-mirabox.dts
@@ -99,6 +99,7 @@
99 * No CD or WP GPIOs: SDIO interface used for 99 * No CD or WP GPIOs: SDIO interface used for
100 * Wifi/Bluetooth chip 100 * Wifi/Bluetooth chip
101 */ 101 */
102 broken-cd;
102 }; 103 };
103 104
104 usb@50000 { 105 usb@50000 {
diff --git a/arch/arm/boot/dts/armada-370-rd.dts b/arch/arm/boot/dts/armada-370-rd.dts
index 130f8390a7e4..a3a2fedb8726 100644
--- a/arch/arm/boot/dts/armada-370-rd.dts
+++ b/arch/arm/boot/dts/armada-370-rd.dts
@@ -64,6 +64,7 @@
64 pinctrl-names = "default"; 64 pinctrl-names = "default";
65 status = "okay"; 65 status = "okay";
66 /* No CD or WP GPIOs */ 66 /* No CD or WP GPIOs */
67 broken-cd;
67 }; 68 };
68 69
69 usb@50000 { 70 usb@50000 {
@@ -84,6 +85,22 @@
84 gpios = <&gpio0 6 1>; 85 gpios = <&gpio0 6 1>;
85 }; 86 };
86 }; 87 };
88
89 pcie-controller {
90 status = "okay";
91
92 /* Internal mini-PCIe connector */
93 pcie@1,0 {
94 /* Port 0, Lane 0 */
95 status = "okay";
96 };
97
98 /* Internal mini-PCIe connector */
99 pcie@2,0 {
100 /* Port 1, Lane 0 */
101 status = "okay";
102 };
103 };
87 }; 104 };
88 }; 105 };
89 }; 106 };
diff --git a/arch/arm/boot/dts/armada-370-xp.dtsi b/arch/arm/boot/dts/armada-370-xp.dtsi
index 550eb772c30e..90b117624abb 100644
--- a/arch/arm/boot/dts/armada-370-xp.dtsi
+++ b/arch/arm/boot/dts/armada-370-xp.dtsi
@@ -22,9 +22,18 @@
22 model = "Marvell Armada 370 and XP SoC"; 22 model = "Marvell Armada 370 and XP SoC";
23 compatible = "marvell,armada-370-xp"; 23 compatible = "marvell,armada-370-xp";
24 24
25 aliases {
26 eth0 = &eth0;
27 eth1 = &eth1;
28 };
29
25 cpus { 30 cpus {
31 #address-cells = <1>;
32 #size-cells = <0>;
26 cpu@0 { 33 cpu@0 {
27 compatible = "marvell,sheeva-v7"; 34 compatible = "marvell,sheeva-v7";
35 device_type = "cpu";
36 reg = <0>;
28 }; 37 };
29 }; 38 };
30 39
@@ -80,7 +89,7 @@
80 89
81 sata@a0000 { 90 sata@a0000 {
82 compatible = "marvell,orion-sata"; 91 compatible = "marvell,orion-sata";
83 reg = <0xa0000 0x2400>; 92 reg = <0xa0000 0x5000>;
84 interrupts = <55>; 93 interrupts = <55>;
85 clocks = <&gateclk 15>, <&gateclk 30>; 94 clocks = <&gateclk 15>, <&gateclk 30>;
86 clock-names = "0", "1"; 95 clock-names = "0", "1";
@@ -94,17 +103,17 @@
94 reg = <0x72004 0x4>; 103 reg = <0x72004 0x4>;
95 }; 104 };
96 105
97 ethernet@70000 { 106 eth0: ethernet@70000 {
98 compatible = "marvell,armada-370-neta"; 107 compatible = "marvell,armada-370-neta";
99 reg = <0x70000 0x2500>; 108 reg = <0x70000 0x4000>;
100 interrupts = <8>; 109 interrupts = <8>;
101 clocks = <&gateclk 4>; 110 clocks = <&gateclk 4>;
102 status = "disabled"; 111 status = "disabled";
103 }; 112 };
104 113
105 ethernet@74000 { 114 eth1: ethernet@74000 {
106 compatible = "marvell,armada-370-neta"; 115 compatible = "marvell,armada-370-neta";
107 reg = <0x74000 0x2500>; 116 reg = <0x74000 0x4000>;
108 interrupts = <10>; 117 interrupts = <10>;
109 clocks = <&gateclk 3>; 118 clocks = <&gateclk 3>;
110 status = "disabled"; 119 status = "disabled";
@@ -143,6 +152,10 @@
143 reg = <0xd4000 0x200>; 152 reg = <0xd4000 0x200>;
144 interrupts = <54>; 153 interrupts = <54>;
145 clocks = <&gateclk 17>; 154 clocks = <&gateclk 17>;
155 bus-width = <4>;
156 cap-sdio-irq;
157 cap-sd-highspeed;
158 cap-mmc-highspeed;
146 status = "disabled"; 159 status = "disabled";
147 }; 160 };
148 161
diff --git a/arch/arm/boot/dts/armada-370.dtsi b/arch/arm/boot/dts/armada-370.dtsi
index aee2b1866ce2..fa3dfc6b4c6a 100644
--- a/arch/arm/boot/dts/armada-370.dtsi
+++ b/arch/arm/boot/dts/armada-370.dtsi
@@ -180,10 +180,6 @@
180 180
181 bus-range = <0x00 0xff>; 181 bus-range = <0x00 0xff>;
182 182
183 reg = <0x40000 0x2000>, <0x80000 0x2000>;
184
185 reg-names = "pcie0.0", "pcie1.0";
186
187 ranges = <0x82000000 0 0x40000 0x40000 0 0x00002000 /* Port 0.0 registers */ 183 ranges = <0x82000000 0 0x40000 0x40000 0 0x00002000 /* Port 0.0 registers */
188 0x82000000 0 0x80000 0x80000 0 0x00002000 /* Port 1.0 registers */ 184 0x82000000 0 0x80000 0x80000 0 0x00002000 /* Port 1.0 registers */
189 0x82000000 0 0xe0000000 0xe0000000 0 0x08000000 /* non-prefetchable memory */ 185 0x82000000 0 0xe0000000 0xe0000000 0 0x08000000 /* non-prefetchable memory */
diff --git a/arch/arm/boot/dts/armada-xp-db.dts b/arch/arm/boot/dts/armada-xp-db.dts
index d6cc8bf8272e..e28e68ff864d 100644
--- a/arch/arm/boot/dts/armada-xp-db.dts
+++ b/arch/arm/boot/dts/armada-xp-db.dts
@@ -30,6 +30,10 @@
30 }; 30 };
31 31
32 soc { 32 soc {
33 ranges = <0 0 0xd0000000 0x100000 /* Internal registers 1MiB */
34 0xe0000000 0 0xe0000000 0x8100000 /* PCIe */
35 0xf0000000 0 0xf0000000 0x1000000>; /* Device Bus, NOR 16MiB */
36
33 internal-regs { 37 internal-regs {
34 serial@12000 { 38 serial@12000 {
35 clock-frequency = <250000000>; 39 clock-frequency = <250000000>;
@@ -97,6 +101,7 @@
97 pinctrl-names = "default"; 101 pinctrl-names = "default";
98 status = "okay"; 102 status = "okay";
99 /* No CD or WP GPIOs */ 103 /* No CD or WP GPIOs */
104 broken-cd;
100 }; 105 };
101 106
102 usb@50000 { 107 usb@50000 {
@@ -155,6 +160,35 @@
155 status = "okay"; 160 status = "okay";
156 }; 161 };
157 }; 162 };
163
164 devbus-bootcs@10400 {
165 status = "okay";
166 ranges = <0 0xf0000000 0x1000000>;
167
168 /* Device Bus parameters are required */
169
170 /* Read parameters */
171 devbus,bus-width = <8>;
172 devbus,turn-off-ps = <60000>;
173 devbus,badr-skew-ps = <0>;
174 devbus,acc-first-ps = <124000>;
175 devbus,acc-next-ps = <248000>;
176 devbus,rd-setup-ps = <0>;
177 devbus,rd-hold-ps = <0>;
178
179 /* Write parameters */
180 devbus,sync-enable = <0>;
181 devbus,wr-high-ps = <60000>;
182 devbus,wr-low-ps = <60000>;
183 devbus,ale-wr-ps = <60000>;
184
185 /* NOR 16 MiB */
186 nor@0 {
187 compatible = "cfi-flash";
188 reg = <0 0x1000000>;
189 bank-width = <2>;
190 };
191 };
158 }; 192 };
159 }; 193 };
160}; 194};
diff --git a/arch/arm/boot/dts/armada-xp-gp.dts b/arch/arm/boot/dts/armada-xp-gp.dts
index 76db557adbe7..c87b2de29c30 100644
--- a/arch/arm/boot/dts/armada-xp-gp.dts
+++ b/arch/arm/boot/dts/armada-xp-gp.dts
@@ -105,6 +105,16 @@
105 phy-mode = "rgmii-id"; 105 phy-mode = "rgmii-id";
106 }; 106 };
107 107
108 /* Front-side USB slot */
109 usb@50000 {
110 status = "okay";
111 };
112
113 /* Back-side USB slot */
114 usb@51000 {
115 status = "okay";
116 };
117
108 spi0: spi@10600 { 118 spi0: spi@10600 {
109 status = "okay"; 119 status = "okay";
110 120
diff --git a/arch/arm/boot/dts/armada-xp-mv78260.dtsi b/arch/arm/boot/dts/armada-xp-mv78260.dtsi
index f4029f015aff..2d9335da210c 100644
--- a/arch/arm/boot/dts/armada-xp-mv78260.dtsi
+++ b/arch/arm/boot/dts/armada-xp-mv78260.dtsi
@@ -92,7 +92,7 @@
92 92
93 ethernet@34000 { 93 ethernet@34000 {
94 compatible = "marvell,armada-370-neta"; 94 compatible = "marvell,armada-370-neta";
95 reg = <0x34000 0x2500>; 95 reg = <0x34000 0x4000>;
96 interrupts = <14>; 96 interrupts = <14>;
97 clocks = <&gateclk 1>; 97 clocks = <&gateclk 1>;
98 status = "disabled"; 98 status = "disabled";
diff --git a/arch/arm/boot/dts/armada-xp-mv78460.dtsi b/arch/arm/boot/dts/armada-xp-mv78460.dtsi
index 6ab56bd35de9..c7b1f4d5c1c7 100644
--- a/arch/arm/boot/dts/armada-xp-mv78460.dtsi
+++ b/arch/arm/boot/dts/armada-xp-mv78460.dtsi
@@ -23,6 +23,7 @@
23 gpio0 = &gpio0; 23 gpio0 = &gpio0;
24 gpio1 = &gpio1; 24 gpio1 = &gpio1;
25 gpio2 = &gpio2; 25 gpio2 = &gpio2;
26 eth3 = &eth3;
26 }; 27 };
27 28
28 29
@@ -105,9 +106,9 @@
105 interrupts = <91>; 106 interrupts = <91>;
106 }; 107 };
107 108
108 ethernet@34000 { 109 eth3: ethernet@34000 {
109 compatible = "marvell,armada-370-neta"; 110 compatible = "marvell,armada-370-neta";
110 reg = <0x34000 0x2500>; 111 reg = <0x34000 0x4000>;
111 interrupts = <14>; 112 interrupts = <14>;
112 clocks = <&gateclk 1>; 113 clocks = <&gateclk 1>;
113 status = "disabled"; 114 status = "disabled";
diff --git a/arch/arm/boot/dts/armada-xp-openblocks-ax3-4.dts b/arch/arm/boot/dts/armada-xp-openblocks-ax3-4.dts
index fdea75c73411..8f510458ea86 100644
--- a/arch/arm/boot/dts/armada-xp-openblocks-ax3-4.dts
+++ b/arch/arm/boot/dts/armada-xp-openblocks-ax3-4.dts
@@ -138,13 +138,22 @@
138 nr-ports = <2>; 138 nr-ports = <2>;
139 status = "okay"; 139 status = "okay";
140 }; 140 };
141
142 /* Front side USB 0 */
141 usb@50000 { 143 usb@50000 {
142 status = "okay"; 144 status = "okay";
143 }; 145 };
146
147 /* Front side USB 1 */
144 usb@51000 { 148 usb@51000 {
145 status = "okay"; 149 status = "okay";
146 }; 150 };
147 151
152 /* USB interface in the mini-PCIe connector */
153 usb@52000 {
154 status = "okay";
155 };
156
148 devbus-bootcs@10400 { 157 devbus-bootcs@10400 {
149 status = "okay"; 158 status = "okay";
150 ranges = <0 0xf0000000 0x8000000>; /* @addr 0xf000000, size 0x8000000 */ 159 ranges = <0 0xf0000000 0x8000000>; /* @addr 0xf000000, size 0x8000000 */
diff --git a/arch/arm/boot/dts/armada-xp.dtsi b/arch/arm/boot/dts/armada-xp.dtsi
index 5b902f9a3af2..416eb9481844 100644
--- a/arch/arm/boot/dts/armada-xp.dtsi
+++ b/arch/arm/boot/dts/armada-xp.dtsi
@@ -22,6 +22,10 @@
22 model = "Marvell Armada XP family SoC"; 22 model = "Marvell Armada XP family SoC";
23 compatible = "marvell,armadaxp", "marvell,armada-370-xp"; 23 compatible = "marvell,armadaxp", "marvell,armada-370-xp";
24 24
25 aliases {
26 eth2 = &eth2;
27 };
28
25 soc { 29 soc {
26 internal-regs { 30 internal-regs {
27 L2: l2-cache { 31 L2: l2-cache {
@@ -86,9 +90,9 @@
86 reg = <0x18200 0x500>; 90 reg = <0x18200 0x500>;
87 }; 91 };
88 92
89 ethernet@30000 { 93 eth2: ethernet@30000 {
90 compatible = "marvell,armada-370-neta"; 94 compatible = "marvell,armada-370-neta";
91 reg = <0x30000 0x2500>; 95 reg = <0x30000 0x4000>;
92 interrupts = <12>; 96 interrupts = <12>;
93 clocks = <&gateclk 2>; 97 clocks = <&gateclk 2>;
94 status = "disabled"; 98 status = "disabled";
diff --git a/arch/arm/boot/dts/at91-ariag25.dts b/arch/arm/boot/dts/at91-ariag25.dts
index c7aebba4e8e7..cce45f5177f9 100644
--- a/arch/arm/boot/dts/at91-ariag25.dts
+++ b/arch/arm/boot/dts/at91-ariag25.dts
@@ -7,7 +7,7 @@
7 * Licensed under GPLv2 or later. 7 * Licensed under GPLv2 or later.
8 */ 8 */
9/dts-v1/; 9/dts-v1/;
10/include/ "at91sam9g25.dtsi" 10#include "at91sam9g25.dtsi"
11 11
12/ { 12/ {
13 model = "Acme Systems Aria G25"; 13 model = "Acme Systems Aria G25";
@@ -21,6 +21,7 @@
21 serial3 = &usart2; 21 serial3 = &usart2;
22 serial4 = &usart3; 22 serial4 = &usart3;
23 serial5 = &uart0; 23 serial5 = &uart0;
24 serial6 = &uart1;
24 }; 25 };
25 26
26 chosen { 27 chosen {
@@ -112,13 +113,17 @@
112 status = "okay"; 113 status = "okay";
113 }; 114 };
114 115
116 /*
117 * UART0/1 pins are marked as GPIO on
118 * Aria documentation.
119 * Change to "okay" if you need additional serial ports
120 */
115 uart0: serial@f8040000 { 121 uart0: serial@f8040000 {
116 compatible = "atmel,at91sam9260-usart"; 122 status = "disabled";
117 reg = <0xf8040000 0x200>; 123 };
118 interrupts = <15 4 5>; 124
119 pinctrl-names = "default"; 125 uart1: serial@f8044000 {
120 pinctrl-0 = <&pinctrl_uart0>; 126 status = "disabled";
121 status = "okay";
122 }; 127 };
123 128
124 adc0: adc@f804c000 { 129 adc0: adc@f804c000 {
@@ -138,6 +143,10 @@
138 }; 143 };
139 }; 144 };
140 }; 145 };
146
147 rtc@fffffeb0 {
148 status = "okay";
149 };
141 }; 150 };
142 151
143 usb0: ohci@00600000 { 152 usb0: ohci@00600000 {
@@ -156,7 +165,7 @@
156 /* little green LED in middle of Aria G25 module */ 165 /* little green LED in middle of Aria G25 module */
157 aria_led { 166 aria_led {
158 label = "aria_led"; 167 label = "aria_led";
159 gpios = <&pioB 8 0>; /* PB8 */ 168 gpios = <&pioB 8 GPIO_ACTIVE_HIGH>; /* PB8 */
160 linux,default-trigger = "heartbeat"; 169 linux,default-trigger = "heartbeat";
161 }; 170 };
162 171
@@ -164,7 +173,7 @@
164 173
165 onewire@0 { 174 onewire@0 {
166 compatible = "w1-gpio"; 175 compatible = "w1-gpio";
167 gpios = <&pioA 21 1>; 176 gpios = <&pioA 21 GPIO_ACTIVE_LOW>;
168 pinctrl-names = "default"; 177 pinctrl-names = "default";
169 pinctrl-0 = <&pinctrl_w1_0>; 178 pinctrl-0 = <&pinctrl_w1_0>;
170 }; 179 };
diff --git a/arch/arm/boot/dts/at91-foxg20.dts b/arch/arm/boot/dts/at91-foxg20.dts
new file mode 100644
index 000000000000..cbe967343997
--- /dev/null
+++ b/arch/arm/boot/dts/at91-foxg20.dts
@@ -0,0 +1,157 @@
1/*
2 * at91-foxg20.dts - Device Tree file for Acme Systems FoxG20 board
3 *
4 * Based on DT files for at91sam9g20ek evaluation board (AT91SAM9G20 SoC)
5 *
6 * Copyright (C) 2013 Douglas Gilbert <dgilbert@interlog.com>
7 *
8 * Licensed under GPLv2 or later.
9 */
10/dts-v1/;
11#include "at91sam9g20.dtsi"
12
13/ {
14 model = "Acme Systems FoxG20";
15 compatible = "acme,foxg20", "atmel,at91sam9g20", "atmel,at91sam9";
16
17 chosen {
18 bootargs = "console=ttyS0,115200 root=/dev/mmcblk0p2 rw rootwait";
19 };
20
21 memory {
22 reg = <0x20000000 0x4000000>;
23 };
24
25 clocks {
26 #address-cells = <1>;
27 #size-cells = <1>;
28 ranges;
29
30 main_clock: clock@0 {
31 compatible = "atmel,osc", "fixed-clock";
32 clock-frequency = <18432000>;
33 };
34 };
35
36 ahb {
37 apb {
38 usb1: gadget@fffa4000 {
39 atmel,vbus-gpio = <&pioC 6 GPIO_ACTIVE_HIGH>;
40 status = "okay";
41 };
42
43 mmc0: mmc@fffa8000 {
44 pinctrl-0 = <
45 &pinctrl_mmc0_clk
46 &pinctrl_mmc0_slot1_cmd_dat0
47 &pinctrl_mmc0_slot1_dat1_3>;
48 status = "okay";
49
50 slot@1 {
51 reg = <1>;
52 bus-width = <4>;
53 };
54 };
55
56 usart0: serial@fffb0000 {
57 pinctrl-0 =
58 <&pinctrl_usart0
59 &pinctrl_usart0_rts
60 &pinctrl_usart0_cts
61 >;
62 status = "okay";
63 };
64
65 usart1: serial@fffb4000 {
66 status = "okay";
67 };
68
69 usart2: serial@fffb8000 {
70 status = "okay";
71 };
72
73 macb0: ethernet@fffc4000 {
74 phy-mode = "rmii";
75 status = "okay";
76 };
77
78 usart3: serial@fffd0000 {
79 status = "okay";
80 };
81
82 uart0: serial@fffd4000 {
83 status = "okay";
84 };
85
86 uart1: serial@fffd8000 {
87 status = "okay";
88 };
89
90 dbgu: serial@fffff200 {
91 status = "okay";
92 };
93
94 pinctrl@fffff400 {
95 board {
96 pinctrl_pck0_as_mck: pck0_as_mck {
97 atmel,pins =
98 <AT91_PIOC 1 AT91_PERIPH_B AT91_PINCTRL_NONE>;
99 };
100 };
101
102 mmc0_slot1 {
103 pinctrl_board_mmc0_slot1: mmc0_slot1-board {
104 atmel,pins =
105 <AT91_PIOC 9 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP_DEGLITCH>; /* CD pin */
106 };
107 };
108
109 i2c0 {
110 pinctrl_i2c0: i2c0-0 {
111 atmel,pins =
112 <AT91_PIOA 23 AT91_PERIPH_A AT91_PINCTRL_MULTI_DRIVE /* TWD (SDA), open drain */
113 AT91_PIOA 24 AT91_PERIPH_A AT91_PINCTRL_MULTI_DRIVE>; /* TWCK (SCL), open drain */
114 };
115 };
116 };
117
118 watchdog@fffffd40 {
119 status = "okay";
120 };
121 };
122
123 usb0: ohci@00500000 {
124 num-ports = <2>;
125 status = "okay";
126 };
127 };
128
129 i2c@0 {
130 pinctrl-names = "default";
131 pinctrl-0 = <&pinctrl_i2c0>;
132 i2c-gpio,delay-us = <5>; /* ~85 kHz */
133 status = "okay";
134 };
135
136 leds {
137 compatible = "gpio-leds";
138
139 /* red LED marked "PC7" near mini USB (device) receptacle */
140 user_led {
141 label = "user_led";
142 gpios = <&pioC 7 GPIO_ACTIVE_HIGH>; /* PC7 */
143 linux,default-trigger = "heartbeat";
144 };
145 };
146
147 gpio_keys {
148 compatible = "gpio-keys";
149
150 btn {
151 label = "Button";
152 gpios = <&pioC 4 GPIO_ACTIVE_LOW>;
153 linux,code = <0x103>;
154 gpio-key,wakeup;
155 };
156 };
157};
diff --git a/arch/arm/boot/dts/at91rm9200.dtsi b/arch/arm/boot/dts/at91rm9200.dtsi
index 5d3ed5aafc69..92b9e21389db 100644
--- a/arch/arm/boot/dts/at91rm9200.dtsi
+++ b/arch/arm/boot/dts/at91rm9200.dtsi
@@ -10,7 +10,10 @@
10 * Licensed under GPLv2 or later. 10 * Licensed under GPLv2 or later.
11 */ 11 */
12 12
13/include/ "skeleton.dtsi" 13#include "skeleton.dtsi"
14#include <dt-bindings/pinctrl/at91.h>
15#include <dt-bindings/interrupt-controller/irq.h>
16#include <dt-bindings/gpio/gpio.h>
14 17
15/ { 18/ {
16 model = "Atmel AT91RM9200 family SoC"; 19 model = "Atmel AT91RM9200 family SoC";
@@ -35,8 +38,12 @@
35 ssc2 = &ssc2; 38 ssc2 = &ssc2;
36 }; 39 };
37 cpus { 40 cpus {
38 cpu@0 { 41 #address-cells = <0>;
42 #size-cells = <0>;
43
44 cpu {
39 compatible = "arm,arm920t"; 45 compatible = "arm,arm920t";
46 device_type = "cpu";
40 }; 47 };
41 }; 48 };
42 49
@@ -77,25 +84,29 @@
77 st: timer@fffffd00 { 84 st: timer@fffffd00 {
78 compatible = "atmel,at91rm9200-st"; 85 compatible = "atmel,at91rm9200-st";
79 reg = <0xfffffd00 0x100>; 86 reg = <0xfffffd00 0x100>;
80 interrupts = <1 4 7>; 87 interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>;
81 }; 88 };
82 89
83 tcb0: timer@fffa0000 { 90 tcb0: timer@fffa0000 {
84 compatible = "atmel,at91rm9200-tcb"; 91 compatible = "atmel,at91rm9200-tcb";
85 reg = <0xfffa0000 0x100>; 92 reg = <0xfffa0000 0x100>;
86 interrupts = <17 4 0 18 4 0 19 4 0>; 93 interrupts = <17 IRQ_TYPE_LEVEL_HIGH 0
94 18 IRQ_TYPE_LEVEL_HIGH 0
95 19 IRQ_TYPE_LEVEL_HIGH 0>;
87 }; 96 };
88 97
89 tcb1: timer@fffa4000 { 98 tcb1: timer@fffa4000 {
90 compatible = "atmel,at91rm9200-tcb"; 99 compatible = "atmel,at91rm9200-tcb";
91 reg = <0xfffa4000 0x100>; 100 reg = <0xfffa4000 0x100>;
92 interrupts = <20 4 0 21 4 0 22 4 0>; 101 interrupts = <20 IRQ_TYPE_LEVEL_HIGH 0
102 21 IRQ_TYPE_LEVEL_HIGH 0
103 22 IRQ_TYPE_LEVEL_HIGH 0>;
93 }; 104 };
94 105
95 i2c0: i2c@fffb8000 { 106 i2c0: i2c@fffb8000 {
96 compatible = "atmel,at91rm9200-i2c"; 107 compatible = "atmel,at91rm9200-i2c";
97 reg = <0xfffb8000 0x4000>; 108 reg = <0xfffb8000 0x4000>;
98 interrupts = <12 4 6>; 109 interrupts = <12 IRQ_TYPE_LEVEL_HIGH 6>;
99 pinctrl-names = "default"; 110 pinctrl-names = "default";
100 pinctrl-0 = <&pinctrl_twi>; 111 pinctrl-0 = <&pinctrl_twi>;
101 #address-cells = <1>; 112 #address-cells = <1>;
@@ -106,7 +117,7 @@
106 mmc0: mmc@fffb4000 { 117 mmc0: mmc@fffb4000 {
107 compatible = "atmel,hsmci"; 118 compatible = "atmel,hsmci";
108 reg = <0xfffb4000 0x4000>; 119 reg = <0xfffb4000 0x4000>;
109 interrupts = <10 4 0>; 120 interrupts = <10 IRQ_TYPE_LEVEL_HIGH 0>;
110 #address-cells = <1>; 121 #address-cells = <1>;
111 #size-cells = <0>; 122 #size-cells = <0>;
112 status = "disabled"; 123 status = "disabled";
@@ -115,7 +126,7 @@
115 ssc0: ssc@fffd0000 { 126 ssc0: ssc@fffd0000 {
116 compatible = "atmel,at91rm9200-ssc"; 127 compatible = "atmel,at91rm9200-ssc";
117 reg = <0xfffd0000 0x4000>; 128 reg = <0xfffd0000 0x4000>;
118 interrupts = <14 4 5>; 129 interrupts = <14 IRQ_TYPE_LEVEL_HIGH 5>;
119 pinctrl-names = "default"; 130 pinctrl-names = "default";
120 pinctrl-0 = <&pinctrl_ssc0_tx &pinctrl_ssc0_rx>; 131 pinctrl-0 = <&pinctrl_ssc0_tx &pinctrl_ssc0_rx>;
121 status = "disable"; 132 status = "disable";
@@ -124,7 +135,7 @@
124 ssc1: ssc@fffd4000 { 135 ssc1: ssc@fffd4000 {
125 compatible = "atmel,at91rm9200-ssc"; 136 compatible = "atmel,at91rm9200-ssc";
126 reg = <0xfffd4000 0x4000>; 137 reg = <0xfffd4000 0x4000>;
127 interrupts = <15 4 5>; 138 interrupts = <15 IRQ_TYPE_LEVEL_HIGH 5>;
128 pinctrl-names = "default"; 139 pinctrl-names = "default";
129 pinctrl-0 = <&pinctrl_ssc1_tx &pinctrl_ssc1_rx>; 140 pinctrl-0 = <&pinctrl_ssc1_tx &pinctrl_ssc1_rx>;
130 status = "disable"; 141 status = "disable";
@@ -133,7 +144,7 @@
133 ssc2: ssc@fffd8000 { 144 ssc2: ssc@fffd8000 {
134 compatible = "atmel,at91rm9200-ssc"; 145 compatible = "atmel,at91rm9200-ssc";
135 reg = <0xfffd8000 0x4000>; 146 reg = <0xfffd8000 0x4000>;
136 interrupts = <16 4 5>; 147 interrupts = <16 IRQ_TYPE_LEVEL_HIGH 5>;
137 pinctrl-names = "default"; 148 pinctrl-names = "default";
138 pinctrl-0 = <&pinctrl_ssc2_tx &pinctrl_ssc2_rx>; 149 pinctrl-0 = <&pinctrl_ssc2_tx &pinctrl_ssc2_rx>;
139 status = "disable"; 150 status = "disable";
@@ -142,7 +153,7 @@
142 macb0: ethernet@fffbc000 { 153 macb0: ethernet@fffbc000 {
143 compatible = "cdns,at91rm9200-emac", "cdns,emac"; 154 compatible = "cdns,at91rm9200-emac", "cdns,emac";
144 reg = <0xfffbc000 0x4000>; 155 reg = <0xfffbc000 0x4000>;
145 interrupts = <24 4 3>; 156 interrupts = <24 IRQ_TYPE_LEVEL_HIGH 3>;
146 phy-mode = "rmii"; 157 phy-mode = "rmii";
147 pinctrl-names = "default"; 158 pinctrl-names = "default";
148 pinctrl-0 = <&pinctrl_macb_rmii>; 159 pinctrl-0 = <&pinctrl_macb_rmii>;
@@ -167,234 +178,319 @@
167 dbgu { 178 dbgu {
168 pinctrl_dbgu: dbgu-0 { 179 pinctrl_dbgu: dbgu-0 {
169 atmel,pins = 180 atmel,pins =
170 <0 30 0x1 0x0 /* PA30 periph A */ 181 <AT91_PIOA 30 AT91_PERIPH_A AT91_PINCTRL_NONE /* PA30 periph A */
171 0 31 0x1 0x1>; /* PA31 periph with pullup */ 182 AT91_PIOA 31 AT91_PERIPH_A AT91_PINCTRL_PULL_UP>; /* PA31 periph with pullup */
172 }; 183 };
173 }; 184 };
174 185
175 uart0 { 186 uart0 {
176 pinctrl_uart0: uart0-0 { 187 pinctrl_uart0: uart0-0 {
177 atmel,pins = 188 atmel,pins =
178 <0 17 0x1 0x0 /* PA17 periph A */ 189 <AT91_PIOA 17 AT91_PERIPH_A AT91_PINCTRL_NONE /* PA17 periph A */
179 0 18 0x1 0x0>; /* PA18 periph A */ 190 AT91_PIOA 18 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PA18 periph A */
180 }; 191 };
181 192
182 pinctrl_uart0_rts: uart0_rts-0 { 193 pinctrl_uart0_rts: uart0_rts-0 {
183 atmel,pins = 194 atmel,pins =
184 <0 20 0x1 0x0>; /* PA20 periph A */ 195 <AT91_PIOA 20 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PA20 periph A */
185 }; 196 };
186 197
187 pinctrl_uart0_cts: uart0_cts-0 { 198 pinctrl_uart0_cts: uart0_cts-0 {
188 atmel,pins = 199 atmel,pins =
189 <0 21 0x1 0x0>; /* PA21 periph A */ 200 <AT91_PIOA 21 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PA21 periph A */
190 }; 201 };
191 }; 202 };
192 203
193 uart1 { 204 uart1 {
194 pinctrl_uart1: uart1-0 { 205 pinctrl_uart1: uart1-0 {
195 atmel,pins = 206 atmel,pins =
196 <1 20 0x1 0x1 /* PB20 periph A with pullup */ 207 <AT91_PIOB 20 AT91_PERIPH_A AT91_PINCTRL_PULL_UP /* PB20 periph A with pullup */
197 1 21 0x1 0x0>; /* PB21 periph A */ 208 AT91_PIOB 21 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PB21 periph A */
198 }; 209 };
199 210
200 pinctrl_uart1_rts: uart1_rts-0 { 211 pinctrl_uart1_rts: uart1_rts-0 {
201 atmel,pins = 212 atmel,pins =
202 <1 24 0x1 0x0>; /* PB24 periph A */ 213 <AT91_PIOB 24 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PB24 periph A */
203 }; 214 };
204 215
205 pinctrl_uart1_cts: uart1_cts-0 { 216 pinctrl_uart1_cts: uart1_cts-0 {
206 atmel,pins = 217 atmel,pins =
207 <1 26 0x1 0x0>; /* PB26 periph A */ 218 <AT91_PIOB 26 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PB26 periph A */
208 }; 219 };
209 220
210 pinctrl_uart1_dtr_dsr: uart1_dtr_dsr-0 { 221 pinctrl_uart1_dtr_dsr: uart1_dtr_dsr-0 {
211 atmel,pins = 222 atmel,pins =
212 <1 19 0x1 0x0 /* PB19 periph A */ 223 <AT91_PIOB 19 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB19 periph A */
213 1 25 0x1 0x0>; /* PB25 periph A */ 224 AT91_PIOB 25 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PB25 periph A */
214 }; 225 };
215 226
216 pinctrl_uart1_dcd: uart1_dcd-0 { 227 pinctrl_uart1_dcd: uart1_dcd-0 {
217 atmel,pins = 228 atmel,pins =
218 <1 23 0x1 0x0>; /* PB23 periph A */ 229 <AT91_PIOB 23 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PB23 periph A */
219 }; 230 };
220 231
221 pinctrl_uart1_ri: uart1_ri-0 { 232 pinctrl_uart1_ri: uart1_ri-0 {
222 atmel,pins = 233 atmel,pins =
223 <1 18 0x1 0x0>; /* PB18 periph A */ 234 <AT91_PIOB 18 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PB18 periph A */
224 }; 235 };
225 }; 236 };
226 237
227 uart2 { 238 uart2 {
228 pinctrl_uart2: uart2-0 { 239 pinctrl_uart2: uart2-0 {
229 atmel,pins = 240 atmel,pins =
230 <0 22 0x1 0x0 /* PA22 periph A */ 241 <AT91_PIOA 22 AT91_PERIPH_A AT91_PINCTRL_NONE /* PA22 periph A */
231 0 23 0x1 0x1>; /* PA23 periph A with pullup */ 242 AT91_PIOA 23 AT91_PERIPH_A AT91_PINCTRL_PULL_UP>; /* PA23 periph A with pullup */
232 }; 243 };
233 244
234 pinctrl_uart2_rts: uart2_rts-0 { 245 pinctrl_uart2_rts: uart2_rts-0 {
235 atmel,pins = 246 atmel,pins =
236 <0 30 0x2 0x0>; /* PA30 periph B */ 247 <AT91_PIOA 30 AT91_PERIPH_B AT91_PINCTRL_NONE>; /* PA30 periph B */
237 }; 248 };
238 249
239 pinctrl_uart2_cts: uart2_cts-0 { 250 pinctrl_uart2_cts: uart2_cts-0 {
240 atmel,pins = 251 atmel,pins =
241 <0 31 0x2 0x0>; /* PA31 periph B */ 252 <AT91_PIOA 31 AT91_PERIPH_B AT91_PINCTRL_NONE>; /* PA31 periph B */
242 }; 253 };
243 }; 254 };
244 255
245 uart3 { 256 uart3 {
246 pinctrl_uart3: uart3-0 { 257 pinctrl_uart3: uart3-0 {
247 atmel,pins = 258 atmel,pins =
248 <0 5 0x2 0x1 /* PA5 periph B with pullup */ 259 <AT91_PIOA 5 AT91_PERIPH_B AT91_PINCTRL_PULL_UP /* PA5 periph B with pullup */
249 0 6 0x2 0x0>; /* PA6 periph B */ 260 AT91_PIOA 6 AT91_PERIPH_B AT91_PINCTRL_NONE>; /* PA6 periph B */
250 }; 261 };
251 262
252 pinctrl_uart3_rts: uart3_rts-0 { 263 pinctrl_uart3_rts: uart3_rts-0 {
253 atmel,pins = 264 atmel,pins =
254 <1 0 0x2 0x0>; /* PB0 periph B */ 265 <AT91_PIOB 0 AT91_PERIPH_B AT91_PINCTRL_NONE>; /* PB0 periph B */
255 }; 266 };
256 267
257 pinctrl_uart3_cts: uart3_cts-0 { 268 pinctrl_uart3_cts: uart3_cts-0 {
258 atmel,pins = 269 atmel,pins =
259 <1 1 0x2 0x0>; /* PB1 periph B */ 270 <AT91_PIOB 1 AT91_PERIPH_B AT91_PINCTRL_NONE>; /* PB1 periph B */
260 }; 271 };
261 }; 272 };
262 273
263 nand { 274 nand {
264 pinctrl_nand: nand-0 { 275 pinctrl_nand: nand-0 {
265 atmel,pins = 276 atmel,pins =
266 <2 2 0x0 0x1 /* PC2 gpio RDY pin pull_up */ 277 <AT91_PIOC 2 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP /* PC2 gpio RDY pin pull_up */
267 1 1 0x0 0x1>; /* PB1 gpio CD pin pull_up */ 278 AT91_PIOB 1 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP>; /* PB1 gpio CD pin pull_up */
268 }; 279 };
269 }; 280 };
270 281
271 macb { 282 macb {
272 pinctrl_macb_rmii: macb_rmii-0 { 283 pinctrl_macb_rmii: macb_rmii-0 {
273 atmel,pins = 284 atmel,pins =
274 <0 7 0x1 0x0 /* PA7 periph A */ 285 <AT91_PIOA 7 AT91_PERIPH_A AT91_PINCTRL_NONE /* PA7 periph A */
275 0 8 0x1 0x0 /* PA8 periph A */ 286 AT91_PIOA 8 AT91_PERIPH_A AT91_PINCTRL_NONE /* PA8 periph A */
276 0 9 0x1 0x0 /* PA9 periph A */ 287 AT91_PIOA 9 AT91_PERIPH_A AT91_PINCTRL_NONE /* PA9 periph A */
277 0 10 0x1 0x0 /* PA10 periph A */ 288 AT91_PIOA 10 AT91_PERIPH_A AT91_PINCTRL_NONE /* PA10 periph A */
278 0 11 0x1 0x0 /* PA11 periph A */ 289 AT91_PIOA 11 AT91_PERIPH_A AT91_PINCTRL_NONE /* PA11 periph A */
279 0 12 0x1 0x0 /* PA12 periph A */ 290 AT91_PIOA 12 AT91_PERIPH_A AT91_PINCTRL_NONE /* PA12 periph A */
280 0 13 0x1 0x0 /* PA13 periph A */ 291 AT91_PIOA 13 AT91_PERIPH_A AT91_PINCTRL_NONE /* PA13 periph A */
281 0 14 0x1 0x0 /* PA14 periph A */ 292 AT91_PIOA 14 AT91_PERIPH_A AT91_PINCTRL_NONE /* PA14 periph A */
282 0 15 0x1 0x0 /* PA15 periph A */ 293 AT91_PIOA 15 AT91_PERIPH_A AT91_PINCTRL_NONE /* PA15 periph A */
283 0 16 0x1 0x0>; /* PA16 periph A */ 294 AT91_PIOA 16 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PA16 periph A */
284 }; 295 };
285 296
286 pinctrl_macb_rmii_mii: macb_rmii_mii-0 { 297 pinctrl_macb_rmii_mii: macb_rmii_mii-0 {
287 atmel,pins = 298 atmel,pins =
288 <1 12 0x2 0x0 /* PB12 periph B */ 299 <AT91_PIOB 12 AT91_PERIPH_B AT91_PINCTRL_NONE /* PB12 periph B */
289 1 13 0x2 0x0 /* PB13 periph B */ 300 AT91_PIOB 13 AT91_PERIPH_B AT91_PINCTRL_NONE /* PB13 periph B */
290 1 14 0x2 0x0 /* PB14 periph B */ 301 AT91_PIOB 14 AT91_PERIPH_B AT91_PINCTRL_NONE /* PB14 periph B */
291 1 15 0x2 0x0 /* PB15 periph B */ 302 AT91_PIOB 15 AT91_PERIPH_B AT91_PINCTRL_NONE /* PB15 periph B */
292 1 16 0x2 0x0 /* PB16 periph B */ 303 AT91_PIOB 16 AT91_PERIPH_B AT91_PINCTRL_NONE /* PB16 periph B */
293 1 17 0x2 0x0 /* PB17 periph B */ 304 AT91_PIOB 17 AT91_PERIPH_B AT91_PINCTRL_NONE /* PB17 periph B */
294 1 18 0x2 0x0 /* PB18 periph B */ 305 AT91_PIOB 18 AT91_PERIPH_B AT91_PINCTRL_NONE /* PB18 periph B */
295 1 19 0x2 0x0>; /* PB19 periph B */ 306 AT91_PIOB 19 AT91_PERIPH_B AT91_PINCTRL_NONE>; /* PB19 periph B */
296 }; 307 };
297 }; 308 };
298 309
299 mmc0 { 310 mmc0 {
300 pinctrl_mmc0_clk: mmc0_clk-0 { 311 pinctrl_mmc0_clk: mmc0_clk-0 {
301 atmel,pins = 312 atmel,pins =
302 <0 27 0x1 0x0>; /* PA27 periph A */ 313 <AT91_PIOA 27 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PA27 periph A */
303 }; 314 };
304 315
305 pinctrl_mmc0_slot0_cmd_dat0: mmc0_slot0_cmd_dat0-0 { 316 pinctrl_mmc0_slot0_cmd_dat0: mmc0_slot0_cmd_dat0-0 {
306 atmel,pins = 317 atmel,pins =
307 <0 28 0x1 0x1 /* PA28 periph A with pullup */ 318 <AT91_PIOA 28 AT91_PERIPH_A AT91_PINCTRL_PULL_UP /* PA28 periph A with pullup */
308 0 29 0x1 0x1>; /* PA29 periph A with pullup */ 319 AT91_PIOA 29 AT91_PERIPH_A AT91_PINCTRL_PULL_UP>; /* PA29 periph A with pullup */
309 }; 320 };
310 321
311 pinctrl_mmc0_slot0_dat1_3: mmc0_slot0_dat1_3-0 { 322 pinctrl_mmc0_slot0_dat1_3: mmc0_slot0_dat1_3-0 {
312 atmel,pins = 323 atmel,pins =
313 <1 3 0x2 0x1 /* PB3 periph B with pullup */ 324 <AT91_PIOB 3 AT91_PERIPH_B AT91_PINCTRL_PULL_UP /* PB3 periph B with pullup */
314 1 4 0x2 0x1 /* PB4 periph B with pullup */ 325 AT91_PIOB 4 AT91_PERIPH_B AT91_PINCTRL_PULL_UP /* PB4 periph B with pullup */
315 1 5 0x2 0x1>; /* PB5 periph B with pullup */ 326 AT91_PIOB 5 AT91_PERIPH_B AT91_PINCTRL_PULL_UP>; /* PB5 periph B with pullup */
316 }; 327 };
317 328
318 pinctrl_mmc0_slot1_cmd_dat0: mmc0_slot1_cmd_dat0-0 { 329 pinctrl_mmc0_slot1_cmd_dat0: mmc0_slot1_cmd_dat0-0 {
319 atmel,pins = 330 atmel,pins =
320 <0 8 0x2 0x1 /* PA8 periph B with pullup */ 331 <AT91_PIOA 8 AT91_PERIPH_B AT91_PINCTRL_PULL_UP /* PA8 periph B with pullup */
321 0 9 0x2 0x1>; /* PA9 periph B with pullup */ 332 AT91_PIOA 9 AT91_PERIPH_B AT91_PINCTRL_PULL_UP>; /* PA9 periph B with pullup */
322 }; 333 };
323 334
324 pinctrl_mmc0_slot1_dat1_3: mmc0_slot1_dat1_3-0 { 335 pinctrl_mmc0_slot1_dat1_3: mmc0_slot1_dat1_3-0 {
325 atmel,pins = 336 atmel,pins =
326 <0 10 0x2 0x1 /* PA10 periph B with pullup */ 337 <AT91_PIOA 10 AT91_PERIPH_B AT91_PINCTRL_PULL_UP /* PA10 periph B with pullup */
327 0 11 0x2 0x1 /* PA11 periph B with pullup */ 338 AT91_PIOA 11 AT91_PERIPH_B AT91_PINCTRL_PULL_UP /* PA11 periph B with pullup */
328 0 12 0x2 0x1>; /* PA12 periph B with pullup */ 339 AT91_PIOA 12 AT91_PERIPH_B AT91_PINCTRL_PULL_UP>; /* PA12 periph B with pullup */
329 }; 340 };
330 }; 341 };
331 342
332 ssc0 { 343 ssc0 {
333 pinctrl_ssc0_tx: ssc0_tx-0 { 344 pinctrl_ssc0_tx: ssc0_tx-0 {
334 atmel,pins = 345 atmel,pins =
335 <1 0 0x1 0x0 /* PB0 periph A */ 346 <AT91_PIOB 0 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB0 periph A */
336 1 1 0x1 0x0 /* PB1 periph A */ 347 AT91_PIOB 1 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB1 periph A */
337 1 2 0x1 0x0>; /* PB2 periph A */ 348 AT91_PIOB 2 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PB2 periph A */
338 }; 349 };
339 350
340 pinctrl_ssc0_rx: ssc0_rx-0 { 351 pinctrl_ssc0_rx: ssc0_rx-0 {
341 atmel,pins = 352 atmel,pins =
342 <1 3 0x1 0x0 /* PB3 periph A */ 353 <AT91_PIOB 3 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB3 periph A */
343 1 4 0x1 0x0 /* PB4 periph A */ 354 AT91_PIOB 4 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB4 periph A */
344 1 5 0x1 0x0>; /* PB5 periph A */ 355 AT91_PIOB 5 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PB5 periph A */
345 }; 356 };
346 }; 357 };
347 358
348 ssc1 { 359 ssc1 {
349 pinctrl_ssc1_tx: ssc1_tx-0 { 360 pinctrl_ssc1_tx: ssc1_tx-0 {
350 atmel,pins = 361 atmel,pins =
351 <1 6 0x1 0x0 /* PB6 periph A */ 362 <AT91_PIOB 6 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB6 periph A */
352 1 7 0x1 0x0 /* PB7 periph A */ 363 AT91_PIOB 7 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB7 periph A */
353 1 8 0x1 0x0>; /* PB8 periph A */ 364 AT91_PIOB 8 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PB8 periph A */
354 }; 365 };
355 366
356 pinctrl_ssc1_rx: ssc1_rx-0 { 367 pinctrl_ssc1_rx: ssc1_rx-0 {
357 atmel,pins = 368 atmel,pins =
358 <1 9 0x1 0x0 /* PB9 periph A */ 369 <AT91_PIOB 9 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB9 periph A */
359 1 10 0x1 0x0 /* PB10 periph A */ 370 AT91_PIOB 10 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB10 periph A */
360 1 11 0x1 0x0>; /* PB11 periph A */ 371 AT91_PIOB 11 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PB11 periph A */
361 }; 372 };
362 }; 373 };
363 374
364 ssc2 { 375 ssc2 {
365 pinctrl_ssc2_tx: ssc2_tx-0 { 376 pinctrl_ssc2_tx: ssc2_tx-0 {
366 atmel,pins = 377 atmel,pins =
367 <1 12 0x1 0x0 /* PB12 periph A */ 378 <AT91_PIOB 12 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB12 periph A */
368 1 13 0x1 0x0 /* PB13 periph A */ 379 AT91_PIOB 13 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB13 periph A */
369 1 14 0x1 0x0>; /* PB14 periph A */ 380 AT91_PIOB 14 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PB14 periph A */
370 }; 381 };
371 382
372 pinctrl_ssc2_rx: ssc2_rx-0 { 383 pinctrl_ssc2_rx: ssc2_rx-0 {
373 atmel,pins = 384 atmel,pins =
374 <1 15 0x1 0x0 /* PB15 periph A */ 385 <AT91_PIOB 15 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB15 periph A */
375 1 16 0x1 0x0 /* PB16 periph A */ 386 AT91_PIOB 16 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB16 periph A */
376 1 17 0x1 0x0>; /* PB17 periph A */ 387 AT91_PIOB 17 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PB17 periph A */
377 }; 388 };
378 }; 389 };
379 390
380 twi { 391 twi {
381 pinctrl_twi: twi-0 { 392 pinctrl_twi: twi-0 {
382 atmel,pins = 393 atmel,pins =
383 <0 25 0x1 0x2 /* PA25 periph A with multi drive */ 394 <AT91_PIOA 25 AT91_PERIPH_A AT91_PINCTRL_MULTI_DRIVE /* PA25 periph A with multi drive */
384 0 26 0x1 0x2>; /* PA26 periph A with multi drive */ 395 AT91_PIOA 26 AT91_PERIPH_A AT91_PINCTRL_MULTI_DRIVE>; /* PA26 periph A with multi drive */
385 }; 396 };
386 397
387 pinctrl_twi_gpio: twi_gpio-0 { 398 pinctrl_twi_gpio: twi_gpio-0 {
388 atmel,pins = 399 atmel,pins =
389 <0 25 0x0 0x2 /* PA25 GPIO with multi drive */ 400 <AT91_PIOA 25 AT91_PERIPH_GPIO AT91_PINCTRL_MULTI_DRIVE /* PA25 GPIO with multi drive */
390 0 26 0x0 0x2>; /* PA26 GPIO with multi drive */ 401 AT91_PIOA 26 AT91_PERIPH_GPIO AT91_PINCTRL_MULTI_DRIVE>; /* PA26 GPIO with multi drive */
402 };
403 };
404
405 tcb0 {
406 pinctrl_tcb0_tclk0: tcb0_tclk0-0 {
407 atmel,pins = <AT91_PIOA 13 AT91_PERIPH_B AT91_PINCTRL_NONE>;
408 };
409
410 pinctrl_tcb0_tclk1: tcb0_tclk1-0 {
411 atmel,pins = <AT91_PIOA 14 AT91_PERIPH_B AT91_PINCTRL_NONE>;
412 };
413
414 pinctrl_tcb0_tclk2: tcb0_tclk2-0 {
415 atmel,pins = <AT91_PIOA 15 AT91_PERIPH_B AT91_PINCTRL_NONE>;
416 };
417
418 pinctrl_tcb0_tioa0: tcb0_tioa0-0 {
419 atmel,pins = <AT91_PIOA 17 AT91_PERIPH_B AT91_PINCTRL_NONE>;
420 };
421
422 pinctrl_tcb0_tioa1: tcb0_tioa1-0 {
423 atmel,pins = <AT91_PIOA 19 AT91_PERIPH_B AT91_PINCTRL_NONE>;
424 };
425
426 pinctrl_tcb0_tioa2: tcb0_tioa2-0 {
427 atmel,pins = <AT91_PIOA 21 AT91_PERIPH_B AT91_PINCTRL_NONE>;
428 };
429
430 pinctrl_tcb0_tiob0: tcb0_tiob0-0 {
431 atmel,pins = <AT91_PIOA 18 AT91_PERIPH_B AT91_PINCTRL_NONE>;
432 };
433
434 pinctrl_tcb0_tiob1: tcb0_tiob1-0 {
435 atmel,pins = <AT91_PIOA 20 AT91_PERIPH_B AT91_PINCTRL_NONE>;
436 };
437
438 pinctrl_tcb0_tiob2: tcb0_tiob2-0 {
439 atmel,pins = <AT91_PIOA 22 AT91_PERIPH_B AT91_PINCTRL_NONE>;
440 };
441 };
442
443 tcb1 {
444 pinctrl_tcb1_tclk0: tcb1_tclk0-0 {
445 atmel,pins = <AT91_PIOA 27 AT91_PERIPH_B AT91_PINCTRL_NONE>;
446 };
447
448 pinctrl_tcb1_tclk1: tcb1_tclk1-0 {
449 atmel,pins = <AT91_PIOA 28 AT91_PERIPH_B AT91_PINCTRL_NONE>;
450 };
451
452 pinctrl_tcb1_tclk2: tcb1_tclk2-0 {
453 atmel,pins = <AT91_PIOA 29 AT91_PERIPH_B AT91_PINCTRL_NONE>;
454 };
455
456 pinctrl_tcb1_tioa0: tcb1_tioa0-0 {
457 atmel,pins = <AT91_PIOB 6 AT91_PERIPH_B AT91_PINCTRL_NONE>;
458 };
459
460 pinctrl_tcb1_tioa1: tcb1_tioa1-0 {
461 atmel,pins = <AT91_PIOB 8 AT91_PERIPH_B AT91_PINCTRL_NONE>;
462 };
463
464 pinctrl_tcb1_tioa2: tcb1_tioa2-0 {
465 atmel,pins = <AT91_PIOB 10 AT91_PERIPH_B AT91_PINCTRL_NONE>;
466 };
467
468 pinctrl_tcb1_tiob0: tcb1_tiob0-0 {
469 atmel,pins = <AT91_PIOB 7 AT91_PERIPH_B AT91_PINCTRL_NONE>;
470 };
471
472 pinctrl_tcb1_tiob1: tcb1_tiob1-0 {
473 atmel,pins = <AT91_PIOB 9 AT91_PERIPH_B AT91_PINCTRL_NONE>;
474 };
475
476 pinctrl_tcb1_tiob2: tcb1_tiob2-0 {
477 atmel,pins = <AT91_PIOB 11 AT91_PERIPH_B AT91_PINCTRL_NONE>;
478 };
479 };
480
481 spi0 {
482 pinctrl_spi0: spi0-0 {
483 atmel,pins =
484 <AT91_PIOA 0 AT91_PERIPH_A AT91_PINCTRL_NONE /* PA0 periph A SPI0_MISO pin */
485 AT91_PIOA 1 AT91_PERIPH_A AT91_PINCTRL_NONE /* PA1 periph A SPI0_MOSI pin */
486 AT91_PIOA 2 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PA2 periph A SPI0_SPCK pin */
391 }; 487 };
392 }; 488 };
393 489
394 pioA: gpio@fffff400 { 490 pioA: gpio@fffff400 {
395 compatible = "atmel,at91rm9200-gpio"; 491 compatible = "atmel,at91rm9200-gpio";
396 reg = <0xfffff400 0x200>; 492 reg = <0xfffff400 0x200>;
397 interrupts = <2 4 1>; 493 interrupts = <2 IRQ_TYPE_LEVEL_HIGH 1>;
398 #gpio-cells = <2>; 494 #gpio-cells = <2>;
399 gpio-controller; 495 gpio-controller;
400 interrupt-controller; 496 interrupt-controller;
@@ -404,7 +500,7 @@
404 pioB: gpio@fffff600 { 500 pioB: gpio@fffff600 {
405 compatible = "atmel,at91rm9200-gpio"; 501 compatible = "atmel,at91rm9200-gpio";
406 reg = <0xfffff600 0x200>; 502 reg = <0xfffff600 0x200>;
407 interrupts = <3 4 1>; 503 interrupts = <3 IRQ_TYPE_LEVEL_HIGH 1>;
408 #gpio-cells = <2>; 504 #gpio-cells = <2>;
409 gpio-controller; 505 gpio-controller;
410 interrupt-controller; 506 interrupt-controller;
@@ -414,7 +510,7 @@
414 pioC: gpio@fffff800 { 510 pioC: gpio@fffff800 {
415 compatible = "atmel,at91rm9200-gpio"; 511 compatible = "atmel,at91rm9200-gpio";
416 reg = <0xfffff800 0x200>; 512 reg = <0xfffff800 0x200>;
417 interrupts = <4 4 1>; 513 interrupts = <4 IRQ_TYPE_LEVEL_HIGH 1>;
418 #gpio-cells = <2>; 514 #gpio-cells = <2>;
419 gpio-controller; 515 gpio-controller;
420 interrupt-controller; 516 interrupt-controller;
@@ -424,7 +520,7 @@
424 pioD: gpio@fffffa00 { 520 pioD: gpio@fffffa00 {
425 compatible = "atmel,at91rm9200-gpio"; 521 compatible = "atmel,at91rm9200-gpio";
426 reg = <0xfffffa00 0x200>; 522 reg = <0xfffffa00 0x200>;
427 interrupts = <5 4 1>; 523 interrupts = <5 IRQ_TYPE_LEVEL_HIGH 1>;
428 #gpio-cells = <2>; 524 #gpio-cells = <2>;
429 gpio-controller; 525 gpio-controller;
430 interrupt-controller; 526 interrupt-controller;
@@ -435,7 +531,7 @@
435 dbgu: serial@fffff200 { 531 dbgu: serial@fffff200 {
436 compatible = "atmel,at91rm9200-usart"; 532 compatible = "atmel,at91rm9200-usart";
437 reg = <0xfffff200 0x200>; 533 reg = <0xfffff200 0x200>;
438 interrupts = <1 4 7>; 534 interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>;
439 pinctrl-names = "default"; 535 pinctrl-names = "default";
440 pinctrl-0 = <&pinctrl_dbgu>; 536 pinctrl-0 = <&pinctrl_dbgu>;
441 status = "disabled"; 537 status = "disabled";
@@ -444,7 +540,7 @@
444 usart0: serial@fffc0000 { 540 usart0: serial@fffc0000 {
445 compatible = "atmel,at91rm9200-usart"; 541 compatible = "atmel,at91rm9200-usart";
446 reg = <0xfffc0000 0x200>; 542 reg = <0xfffc0000 0x200>;
447 interrupts = <6 4 5>; 543 interrupts = <6 IRQ_TYPE_LEVEL_HIGH 5>;
448 atmel,use-dma-rx; 544 atmel,use-dma-rx;
449 atmel,use-dma-tx; 545 atmel,use-dma-tx;
450 pinctrl-names = "default"; 546 pinctrl-names = "default";
@@ -455,7 +551,7 @@
455 usart1: serial@fffc4000 { 551 usart1: serial@fffc4000 {
456 compatible = "atmel,at91rm9200-usart"; 552 compatible = "atmel,at91rm9200-usart";
457 reg = <0xfffc4000 0x200>; 553 reg = <0xfffc4000 0x200>;
458 interrupts = <7 4 5>; 554 interrupts = <7 IRQ_TYPE_LEVEL_HIGH 5>;
459 atmel,use-dma-rx; 555 atmel,use-dma-rx;
460 atmel,use-dma-tx; 556 atmel,use-dma-tx;
461 pinctrl-names = "default"; 557 pinctrl-names = "default";
@@ -466,7 +562,7 @@
466 usart2: serial@fffc8000 { 562 usart2: serial@fffc8000 {
467 compatible = "atmel,at91rm9200-usart"; 563 compatible = "atmel,at91rm9200-usart";
468 reg = <0xfffc8000 0x200>; 564 reg = <0xfffc8000 0x200>;
469 interrupts = <8 4 5>; 565 interrupts = <8 IRQ_TYPE_LEVEL_HIGH 5>;
470 atmel,use-dma-rx; 566 atmel,use-dma-rx;
471 atmel,use-dma-tx; 567 atmel,use-dma-tx;
472 pinctrl-names = "default"; 568 pinctrl-names = "default";
@@ -477,7 +573,7 @@
477 usart3: serial@fffcc000 { 573 usart3: serial@fffcc000 {
478 compatible = "atmel,at91rm9200-usart"; 574 compatible = "atmel,at91rm9200-usart";
479 reg = <0xfffcc000 0x200>; 575 reg = <0xfffcc000 0x200>;
480 interrupts = <23 4 5>; 576 interrupts = <23 IRQ_TYPE_LEVEL_HIGH 5>;
481 atmel,use-dma-rx; 577 atmel,use-dma-rx;
482 atmel,use-dma-tx; 578 atmel,use-dma-tx;
483 pinctrl-names = "default"; 579 pinctrl-names = "default";
@@ -488,7 +584,18 @@
488 usb1: gadget@fffb0000 { 584 usb1: gadget@fffb0000 {
489 compatible = "atmel,at91rm9200-udc"; 585 compatible = "atmel,at91rm9200-udc";
490 reg = <0xfffb0000 0x4000>; 586 reg = <0xfffb0000 0x4000>;
491 interrupts = <11 4 2>; 587 interrupts = <11 IRQ_TYPE_LEVEL_HIGH 2>;
588 status = "disabled";
589 };
590
591 spi0: spi@fffe0000 {
592 #address-cells = <1>;
593 #size-cells = <0>;
594 compatible = "atmel,at91rm9200-spi";
595 reg = <0xfffe0000 0x200>;
596 interrupts = <13 IRQ_TYPE_LEVEL_HIGH 3>;
597 pinctrl-names = "default";
598 pinctrl-0 = <&pinctrl_spi0>;
492 status = "disabled"; 599 status = "disabled";
493 }; 600 };
494 }; 601 };
@@ -503,9 +610,9 @@
503 pinctrl-names = "default"; 610 pinctrl-names = "default";
504 pinctrl-0 = <&pinctrl_nand>; 611 pinctrl-0 = <&pinctrl_nand>;
505 nand-ecc-mode = "soft"; 612 nand-ecc-mode = "soft";
506 gpios = <&pioC 2 0 613 gpios = <&pioC 2 GPIO_ACTIVE_HIGH
507 0 614 0
508 &pioB 1 0 615 &pioB 1 GPIO_ACTIVE_HIGH
509 >; 616 >;
510 status = "disabled"; 617 status = "disabled";
511 }; 618 };
@@ -513,15 +620,15 @@
513 usb0: ohci@00300000 { 620 usb0: ohci@00300000 {
514 compatible = "atmel,at91rm9200-ohci", "usb-ohci"; 621 compatible = "atmel,at91rm9200-ohci", "usb-ohci";
515 reg = <0x00300000 0x100000>; 622 reg = <0x00300000 0x100000>;
516 interrupts = <23 4 2>; 623 interrupts = <23 IRQ_TYPE_LEVEL_HIGH 2>;
517 status = "disabled"; 624 status = "disabled";
518 }; 625 };
519 }; 626 };
520 627
521 i2c@0 { 628 i2c@0 {
522 compatible = "i2c-gpio"; 629 compatible = "i2c-gpio";
523 gpios = <&pioA 25 0 /* sda */ 630 gpios = <&pioA 25 GPIO_ACTIVE_HIGH /* sda */
524 &pioA 26 0 /* scl */ 631 &pioA 26 GPIO_ACTIVE_HIGH /* scl */
525 >; 632 >;
526 i2c-gpio,sda-open-drain; 633 i2c-gpio,sda-open-drain;
527 i2c-gpio,scl-open-drain; 634 i2c-gpio,scl-open-drain;
diff --git a/arch/arm/boot/dts/at91rm9200ek.dts b/arch/arm/boot/dts/at91rm9200ek.dts
index e586d85f8e23..d2d72c3b44c4 100644
--- a/arch/arm/boot/dts/at91rm9200ek.dts
+++ b/arch/arm/boot/dts/at91rm9200ek.dts
@@ -6,7 +6,7 @@
6 * Licensed under GPLv2 only 6 * Licensed under GPLv2 only
7 */ 7 */
8/dts-v1/; 8/dts-v1/;
9/include/ "at91rm9200.dtsi" 9#include "at91rm9200.dtsi"
10 10
11/ { 11/ {
12 model = "Atmel AT91RM9200 evaluation kit"; 12 model = "Atmel AT91RM9200 evaluation kit";
@@ -50,9 +50,19 @@
50 }; 50 };
51 51
52 usb1: gadget@fffb0000 { 52 usb1: gadget@fffb0000 {
53 atmel,vbus-gpio = <&pioD 4 0>; 53 atmel,vbus-gpio = <&pioD 4 GPIO_ACTIVE_HIGH>;
54 status = "okay"; 54 status = "okay";
55 }; 55 };
56
57 spi0: spi@fffe0000 {
58 status = "okay";
59 cs-gpios = <&pioA 3 0>, <0>, <0>, <0>;
60 mtd_dataflash@0 {
61 compatible = "atmel,at45", "atmel,dataflash";
62 spi-max-frequency = <15000000>;
63 reg = <0>;
64 };
65 };
56 }; 66 };
57 67
58 usb0: ohci@00300000 { 68 usb0: ohci@00300000 {
@@ -66,19 +76,19 @@
66 76
67 ds2 { 77 ds2 {
68 label = "green"; 78 label = "green";
69 gpios = <&pioB 0 0x1>; 79 gpios = <&pioB 0 GPIO_ACTIVE_LOW>;
70 linux,default-trigger = "mmc0"; 80 linux,default-trigger = "mmc0";
71 }; 81 };
72 82
73 ds4 { 83 ds4 {
74 label = "yellow"; 84 label = "yellow";
75 gpios = <&pioB 1 0x1>; 85 gpios = <&pioB 1 GPIO_ACTIVE_LOW>;
76 linux,default-trigger = "heartbeat"; 86 linux,default-trigger = "heartbeat";
77 }; 87 };
78 88
79 ds6 { 89 ds6 {
80 label = "red"; 90 label = "red";
81 gpios = <&pioB 2 0x1>; 91 gpios = <&pioB 2 GPIO_ACTIVE_LOW>;
82 }; 92 };
83 }; 93 };
84}; 94};
diff --git a/arch/arm/boot/dts/at91sam9260.dtsi b/arch/arm/boot/dts/at91sam9260.dtsi
index 84c4bef2d726..c7ccbcbffb3e 100644
--- a/arch/arm/boot/dts/at91sam9260.dtsi
+++ b/arch/arm/boot/dts/at91sam9260.dtsi
@@ -8,7 +8,10 @@
8 * Licensed under GPLv2 or later. 8 * Licensed under GPLv2 or later.
9 */ 9 */
10 10
11/include/ "skeleton.dtsi" 11#include "skeleton.dtsi"
12#include <dt-bindings/pinctrl/at91.h>
13#include <dt-bindings/interrupt-controller/irq.h>
14#include <dt-bindings/gpio/gpio.h>
12 15
13/ { 16/ {
14 model = "Atmel AT91SAM9260 family SoC"; 17 model = "Atmel AT91SAM9260 family SoC";
@@ -32,8 +35,12 @@
32 ssc0 = &ssc0; 35 ssc0 = &ssc0;
33 }; 36 };
34 cpus { 37 cpus {
35 cpu@0 { 38 #address-cells = <0>;
36 compatible = "arm,arm926ejs"; 39 #size-cells = <0>;
40
41 cpu {
42 compatible = "arm,arm926ej-s";
43 device_type = "cpu";
37 }; 44 };
38 }; 45 };
39 46
@@ -84,19 +91,23 @@
84 pit: timer@fffffd30 { 91 pit: timer@fffffd30 {
85 compatible = "atmel,at91sam9260-pit"; 92 compatible = "atmel,at91sam9260-pit";
86 reg = <0xfffffd30 0xf>; 93 reg = <0xfffffd30 0xf>;
87 interrupts = <1 4 7>; 94 interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>;
88 }; 95 };
89 96
90 tcb0: timer@fffa0000 { 97 tcb0: timer@fffa0000 {
91 compatible = "atmel,at91rm9200-tcb"; 98 compatible = "atmel,at91rm9200-tcb";
92 reg = <0xfffa0000 0x100>; 99 reg = <0xfffa0000 0x100>;
93 interrupts = <17 4 0 18 4 0 19 4 0>; 100 interrupts = <17 IRQ_TYPE_LEVEL_HIGH 0
101 18 IRQ_TYPE_LEVEL_HIGH 0
102 19 IRQ_TYPE_LEVEL_HIGH 0>;
94 }; 103 };
95 104
96 tcb1: timer@fffdc000 { 105 tcb1: timer@fffdc000 {
97 compatible = "atmel,at91rm9200-tcb"; 106 compatible = "atmel,at91rm9200-tcb";
98 reg = <0xfffdc000 0x100>; 107 reg = <0xfffdc000 0x100>;
99 interrupts = <26 4 0 27 4 0 28 4 0>; 108 interrupts = <26 IRQ_TYPE_LEVEL_HIGH 0
109 27 IRQ_TYPE_LEVEL_HIGH 0
110 28 IRQ_TYPE_LEVEL_HIGH 0>;
100 }; 111 };
101 112
102 pinctrl@fffff400 { 113 pinctrl@fffff400 {
@@ -116,234 +127,318 @@
116 dbgu { 127 dbgu {
117 pinctrl_dbgu: dbgu-0 { 128 pinctrl_dbgu: dbgu-0 {
118 atmel,pins = 129 atmel,pins =
119 <1 14 0x1 0x0 /* PB14 periph A */ 130 <AT91_PIOB 14 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB14 periph A */
120 1 15 0x1 0x1>; /* PB15 periph with pullup */ 131 AT91_PIOB 15 AT91_PERIPH_A AT91_PINCTRL_PULL_UP>; /* PB15 periph with pullup */
121 }; 132 };
122 }; 133 };
123 134
124 usart0 { 135 usart0 {
125 pinctrl_usart0: usart0-0 { 136 pinctrl_usart0: usart0-0 {
126 atmel,pins = 137 atmel,pins =
127 <1 4 0x1 0x0 /* PB4 periph A */ 138 <AT91_PIOB 4 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB4 periph A */
128 1 5 0x1 0x0>; /* PB5 periph A */ 139 AT91_PIOB 5 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PB5 periph A */
129 }; 140 };
130 141
131 pinctrl_usart0_rts: usart0_rts-0 { 142 pinctrl_usart0_rts: usart0_rts-0 {
132 atmel,pins = 143 atmel,pins =
133 <1 26 0x1 0x0>; /* PB26 periph A */ 144 <AT91_PIOB 26 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PB26 periph A */
134 }; 145 };
135 146
136 pinctrl_usart0_cts: usart0_cts-0 { 147 pinctrl_usart0_cts: usart0_cts-0 {
137 atmel,pins = 148 atmel,pins =
138 <1 27 0x1 0x0>; /* PB27 periph A */ 149 <AT91_PIOB 27 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PB27 periph A */
139 }; 150 };
140 151
141 pinctrl_usart0_dtr_dsr: usart0_dtr_dsr-0 { 152 pinctrl_usart0_dtr_dsr: usart0_dtr_dsr-0 {
142 atmel,pins = 153 atmel,pins =
143 <1 24 0x1 0x0 /* PB24 periph A */ 154 <AT91_PIOB 24 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB24 periph A */
144 1 22 0x1 0x0>; /* PB22 periph A */ 155 AT91_PIOB 22 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PB22 periph A */
145 }; 156 };
146 157
147 pinctrl_usart0_dcd: usart0_dcd-0 { 158 pinctrl_usart0_dcd: usart0_dcd-0 {
148 atmel,pins = 159 atmel,pins =
149 <1 23 0x1 0x0>; /* PB23 periph A */ 160 <AT91_PIOB 23 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PB23 periph A */
150 }; 161 };
151 162
152 pinctrl_usart0_ri: usart0_ri-0 { 163 pinctrl_usart0_ri: usart0_ri-0 {
153 atmel,pins = 164 atmel,pins =
154 <1 25 0x1 0x0>; /* PB25 periph A */ 165 <AT91_PIOB 25 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PB25 periph A */
155 }; 166 };
156 }; 167 };
157 168
158 usart1 { 169 usart1 {
159 pinctrl_usart1: usart1-0 { 170 pinctrl_usart1: usart1-0 {
160 atmel,pins = 171 atmel,pins =
161 <1 6 0x1 0x1 /* PB6 periph A with pullup */ 172 <AT91_PIOB 6 AT91_PERIPH_A AT91_PINCTRL_PULL_UP /* PB6 periph A with pullup */
162 1 7 0x1 0x0>; /* PB7 periph A */ 173 AT91_PIOB 7 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PB7 periph A */
163 }; 174 };
164 175
165 pinctrl_usart1_rts: usart1_rts-0 { 176 pinctrl_usart1_rts: usart1_rts-0 {
166 atmel,pins = 177 atmel,pins =
167 <1 28 0x1 0x0>; /* PB28 periph A */ 178 <AT91_PIOB 28 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PB28 periph A */
168 }; 179 };
169 180
170 pinctrl_usart1_cts: usart1_cts-0 { 181 pinctrl_usart1_cts: usart1_cts-0 {
171 atmel,pins = 182 atmel,pins =
172 <1 29 0x1 0x0>; /* PB29 periph A */ 183 <AT91_PIOB 29 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PB29 periph A */
173 }; 184 };
174 }; 185 };
175 186
176 usart2 { 187 usart2 {
177 pinctrl_usart2: usart2-0 { 188 pinctrl_usart2: usart2-0 {
178 atmel,pins = 189 atmel,pins =
179 <1 8 0x1 0x1 /* PB8 periph A with pullup */ 190 <AT91_PIOB 8 AT91_PERIPH_A AT91_PINCTRL_PULL_UP /* PB8 periph A with pullup */
180 1 9 0x1 0x0>; /* PB9 periph A */ 191 AT91_PIOB 9 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PB9 periph A */
181 }; 192 };
182 193
183 pinctrl_usart2_rts: usart2_rts-0 { 194 pinctrl_usart2_rts: usart2_rts-0 {
184 atmel,pins = 195 atmel,pins =
185 <0 4 0x1 0x0>; /* PA4 periph A */ 196 <AT91_PIOA 4 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PA4 periph A */
186 }; 197 };
187 198
188 pinctrl_usart2_cts: usart2_cts-0 { 199 pinctrl_usart2_cts: usart2_cts-0 {
189 atmel,pins = 200 atmel,pins =
190 <0 5 0x1 0x0>; /* PA5 periph A */ 201 <AT91_PIOA 5 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PA5 periph A */
191 }; 202 };
192 }; 203 };
193 204
194 usart3 { 205 usart3 {
195 pinctrl_usart3: usart3-0 { 206 pinctrl_usart3: usart3-0 {
196 atmel,pins = 207 atmel,pins =
197 <1 10 0x1 0x1 /* PB10 periph A with pullup */ 208 <AT91_PIOB 10 AT91_PERIPH_A AT91_PINCTRL_PULL_UP /* PB10 periph A with pullup */
198 1 11 0x1 0x0>; /* PB11 periph A */ 209 AT91_PIOB 11 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PB11 periph A */
199 }; 210 };
200 211
201 pinctrl_usart3_rts: usart3_rts-0 { 212 pinctrl_usart3_rts: usart3_rts-0 {
202 atmel,pins = 213 atmel,pins =
203 <2 8 0x2 0x0>; /* PC8 periph B */ 214 <AT91_PIOB 8 AT91_PERIPH_B AT91_PINCTRL_NONE>; /* PC8 periph B */
204 }; 215 };
205 216
206 pinctrl_usart3_cts: usart3_cts-0 { 217 pinctrl_usart3_cts: usart3_cts-0 {
207 atmel,pins = 218 atmel,pins =
208 <2 10 0x2 0x0>; /* PC10 periph B */ 219 <AT91_PIOB 10 AT91_PERIPH_B AT91_PINCTRL_NONE>; /* PC10 periph B */
209 }; 220 };
210 }; 221 };
211 222
212 uart0 { 223 uart0 {
213 pinctrl_uart0: uart0-0 { 224 pinctrl_uart0: uart0-0 {
214 atmel,pins = 225 atmel,pins =
215 <0 31 0x2 0x1 /* PA31 periph B with pullup */ 226 <AT91_PIOA 31 AT91_PERIPH_B AT91_PINCTRL_PULL_UP /* PA31 periph B with pullup */
216 0 30 0x2 0x0>; /* PA30 periph B */ 227 AT91_PIOA 30 AT91_PERIPH_B AT91_PINCTRL_NONE>; /* PA30 periph B */
217 }; 228 };
218 }; 229 };
219 230
220 uart1 { 231 uart1 {
221 pinctrl_uart1: uart1-0 { 232 pinctrl_uart1: uart1-0 {
222 atmel,pins = 233 atmel,pins =
223 <1 12 0x1 0x1 /* PB12 periph A with pullup */ 234 <AT91_PIOB 12 AT91_PERIPH_A AT91_PINCTRL_PULL_UP /* PB12 periph A with pullup */
224 1 13 0x1 0x0>; /* PB13 periph A */ 235 AT91_PIOB 13 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PB13 periph A */
225 }; 236 };
226 }; 237 };
227 238
228 nand { 239 nand {
229 pinctrl_nand: nand-0 { 240 pinctrl_nand: nand-0 {
230 atmel,pins = 241 atmel,pins =
231 <2 13 0x0 0x1 /* PC13 gpio RDY pin pull_up */ 242 <AT91_PIOC 13 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP /* PC13 gpio RDY pin pull_up */
232 2 14 0x0 0x1>; /* PC14 gpio enable pin pull_up */ 243 AT91_PIOC 14 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP>; /* PC14 gpio enable pin pull_up */
233 }; 244 };
234 }; 245 };
235 246
236 macb { 247 macb {
237 pinctrl_macb_rmii: macb_rmii-0 { 248 pinctrl_macb_rmii: macb_rmii-0 {
238 atmel,pins = 249 atmel,pins =
239 <0 12 0x1 0x0 /* PA12 periph A */ 250 <AT91_PIOA 12 AT91_PERIPH_A AT91_PINCTRL_NONE /* PA12 periph A */
240 0 13 0x1 0x0 /* PA13 periph A */ 251 AT91_PIOA 13 AT91_PERIPH_A AT91_PINCTRL_NONE /* PA13 periph A */
241 0 14 0x1 0x0 /* PA14 periph A */ 252 AT91_PIOA 14 AT91_PERIPH_A AT91_PINCTRL_NONE /* PA14 periph A */
242 0 15 0x1 0x0 /* PA15 periph A */ 253 AT91_PIOA 15 AT91_PERIPH_A AT91_PINCTRL_NONE /* PA15 periph A */
243 0 16 0x1 0x0 /* PA16 periph A */ 254 AT91_PIOA 16 AT91_PERIPH_A AT91_PINCTRL_NONE /* PA16 periph A */
244 0 17 0x1 0x0 /* PA17 periph A */ 255 AT91_PIOA 17 AT91_PERIPH_A AT91_PINCTRL_NONE /* PA17 periph A */
245 0 18 0x1 0x0 /* PA18 periph A */ 256 AT91_PIOA 18 AT91_PERIPH_A AT91_PINCTRL_NONE /* PA18 periph A */
246 0 19 0x1 0x0 /* PA19 periph A */ 257 AT91_PIOA 19 AT91_PERIPH_A AT91_PINCTRL_NONE /* PA19 periph A */
247 0 20 0x1 0x0 /* PA20 periph A */ 258 AT91_PIOA 20 AT91_PERIPH_A AT91_PINCTRL_NONE /* PA20 periph A */
248 0 21 0x1 0x0>; /* PA21 periph A */ 259 AT91_PIOA 21 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PA21 periph A */
249 }; 260 };
250 261
251 pinctrl_macb_rmii_mii: macb_rmii_mii-0 { 262 pinctrl_macb_rmii_mii: macb_rmii_mii-0 {
252 atmel,pins = 263 atmel,pins =
253 <0 22 0x2 0x0 /* PA22 periph B */ 264 <AT91_PIOA 22 AT91_PERIPH_B AT91_PINCTRL_NONE /* PA22 periph B */
254 0 23 0x2 0x0 /* PA23 periph B */ 265 AT91_PIOA 23 AT91_PERIPH_B AT91_PINCTRL_NONE /* PA23 periph B */
255 0 24 0x2 0x0 /* PA24 periph B */ 266 AT91_PIOA 24 AT91_PERIPH_B AT91_PINCTRL_NONE /* PA24 periph B */
256 0 25 0x2 0x0 /* PA25 periph B */ 267 AT91_PIOA 25 AT91_PERIPH_B AT91_PINCTRL_NONE /* PA25 periph B */
257 0 26 0x2 0x0 /* PA26 periph B */ 268 AT91_PIOA 26 AT91_PERIPH_B AT91_PINCTRL_NONE /* PA26 periph B */
258 0 27 0x2 0x0 /* PA27 periph B */ 269 AT91_PIOA 27 AT91_PERIPH_B AT91_PINCTRL_NONE /* PA27 periph B */
259 0 28 0x2 0x0 /* PA28 periph B */ 270 AT91_PIOA 28 AT91_PERIPH_B AT91_PINCTRL_NONE /* PA28 periph B */
260 0 29 0x2 0x0>; /* PA29 periph B */ 271 AT91_PIOA 29 AT91_PERIPH_B AT91_PINCTRL_NONE>; /* PA29 periph B */
261 }; 272 };
262 273
263 pinctrl_macb_rmii_mii_alt: macb_rmii_mii-1 { 274 pinctrl_macb_rmii_mii_alt: macb_rmii_mii-1 {
264 atmel,pins = 275 atmel,pins =
265 <0 10 0x2 0x0 /* PA10 periph B */ 276 <AT91_PIOA 10 AT91_PERIPH_B AT91_PINCTRL_NONE /* PA10 periph B */
266 0 11 0x2 0x0 /* PA11 periph B */ 277 AT91_PIOA 11 AT91_PERIPH_B AT91_PINCTRL_NONE /* PA11 periph B */
267 0 22 0x2 0x0 /* PA22 periph B */ 278 AT91_PIOA 22 AT91_PERIPH_B AT91_PINCTRL_NONE /* PA22 periph B */
268 0 25 0x2 0x0 /* PA25 periph B */ 279 AT91_PIOA 25 AT91_PERIPH_B AT91_PINCTRL_NONE /* PA25 periph B */
269 0 26 0x2 0x0 /* PA26 periph B */ 280 AT91_PIOA 26 AT91_PERIPH_B AT91_PINCTRL_NONE /* PA26 periph B */
270 0 27 0x2 0x0 /* PA27 periph B */ 281 AT91_PIOA 27 AT91_PERIPH_B AT91_PINCTRL_NONE /* PA27 periph B */
271 0 28 0x2 0x0 /* PA28 periph B */ 282 AT91_PIOA 28 AT91_PERIPH_B AT91_PINCTRL_NONE /* PA28 periph B */
272 0 29 0x2 0x0>; /* PA29 periph B */ 283 AT91_PIOA 29 AT91_PERIPH_B AT91_PINCTRL_NONE>; /* PA29 periph B */
273 }; 284 };
274 }; 285 };
275 286
276 mmc0 { 287 mmc0 {
277 pinctrl_mmc0_clk: mmc0_clk-0 { 288 pinctrl_mmc0_clk: mmc0_clk-0 {
278 atmel,pins = 289 atmel,pins =
279 <0 8 0x1 0x0>; /* PA8 periph A */ 290 <AT91_PIOA 8 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PA8 periph A */
280 }; 291 };
281 292
282 pinctrl_mmc0_slot0_cmd_dat0: mmc0_slot0_cmd_dat0-0 { 293 pinctrl_mmc0_slot0_cmd_dat0: mmc0_slot0_cmd_dat0-0 {
283 atmel,pins = 294 atmel,pins =
284 <0 7 0x1 0x1 /* PA7 periph A with pullup */ 295 <AT91_PIOA 7 AT91_PERIPH_A AT91_PINCTRL_PULL_UP /* PA7 periph A with pullup */
285 0 6 0x1 0x1>; /* PA6 periph A with pullup */ 296 AT91_PIOA 6 AT91_PERIPH_A AT91_PINCTRL_PULL_UP>; /* PA6 periph A with pullup */
286 }; 297 };
287 298
288 pinctrl_mmc0_slot0_dat1_3: mmc0_slot0_dat1_3-0 { 299 pinctrl_mmc0_slot0_dat1_3: mmc0_slot0_dat1_3-0 {
289 atmel,pins = 300 atmel,pins =
290 <0 9 0x1 0x1 /* PA9 periph A with pullup */ 301 <AT91_PIOA 9 AT91_PERIPH_A AT91_PINCTRL_PULL_UP /* PA9 periph A with pullup */
291 0 10 0x1 0x1 /* PA10 periph A with pullup */ 302 AT91_PIOA 10 AT91_PERIPH_A AT91_PINCTRL_PULL_UP /* PA10 periph A with pullup */
292 0 11 0x1 0x1>; /* PA11 periph A with pullup */ 303 AT91_PIOA 11 AT91_PERIPH_A AT91_PINCTRL_PULL_UP>; /* PA11 periph A with pullup */
293 }; 304 };
294 305
295 pinctrl_mmc0_slot1_cmd_dat0: mmc0_slot1_cmd_dat0-0 { 306 pinctrl_mmc0_slot1_cmd_dat0: mmc0_slot1_cmd_dat0-0 {
296 atmel,pins = 307 atmel,pins =
297 <0 1 0x2 0x1 /* PA1 periph B with pullup */ 308 <AT91_PIOA 1 AT91_PERIPH_B AT91_PINCTRL_PULL_UP /* PA1 periph B with pullup */
298 0 0 0x2 0x1>; /* PA0 periph B with pullup */ 309 AT91_PIOA 0 AT91_PERIPH_B AT91_PINCTRL_PULL_UP>; /* PA0 periph B with pullup */
299 }; 310 };
300 311
301 pinctrl_mmc0_slot1_dat1_3: mmc0_slot1_dat1_3-0 { 312 pinctrl_mmc0_slot1_dat1_3: mmc0_slot1_dat1_3-0 {
302 atmel,pins = 313 atmel,pins =
303 <0 5 0x2 0x1 /* PA5 periph B with pullup */ 314 <AT91_PIOA 5 AT91_PERIPH_B AT91_PINCTRL_PULL_UP /* PA5 periph B with pullup */
304 0 4 0x2 0x1 /* PA4 periph B with pullup */ 315 AT91_PIOA 4 AT91_PERIPH_B AT91_PINCTRL_PULL_UP /* PA4 periph B with pullup */
305 0 3 0x2 0x1>; /* PA3 periph B with pullup */ 316 AT91_PIOA 3 AT91_PERIPH_B AT91_PINCTRL_PULL_UP>; /* PA3 periph B with pullup */
306 }; 317 };
307 }; 318 };
308 319
309 ssc0 { 320 ssc0 {
310 pinctrl_ssc0_tx: ssc0_tx-0 { 321 pinctrl_ssc0_tx: ssc0_tx-0 {
311 atmel,pins = 322 atmel,pins =
312 <1 16 0x1 0x0 /* PB16 periph A */ 323 <AT91_PIOB 16 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB16 periph A */
313 1 17 0x1 0x0 /* PB17 periph A */ 324 AT91_PIOB 17 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB17 periph A */
314 1 18 0x1 0x0>; /* PB18 periph A */ 325 AT91_PIOB 18 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PB18 periph A */
315 }; 326 };
316 327
317 pinctrl_ssc0_rx: ssc0_rx-0 { 328 pinctrl_ssc0_rx: ssc0_rx-0 {
318 atmel,pins = 329 atmel,pins =
319 <1 19 0x1 0x0 /* PB19 periph A */ 330 <AT91_PIOB 19 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB19 periph A */
320 1 20 0x1 0x0 /* PB20 periph A */ 331 AT91_PIOB 20 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB20 periph A */
321 1 21 0x1 0x0>; /* PB21 periph A */ 332 AT91_PIOB 21 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PB21 periph A */
322 }; 333 };
323 }; 334 };
324 335
325 spi0 { 336 spi0 {
326 pinctrl_spi0: spi0-0 { 337 pinctrl_spi0: spi0-0 {
327 atmel,pins = 338 atmel,pins =
328 <0 0 0x1 0x0 /* PA0 periph A SPI0_MISO pin */ 339 <AT91_PIOA 0 AT91_PERIPH_A AT91_PINCTRL_NONE /* PA0 periph A SPI0_MISO pin */
329 0 1 0x1 0x0 /* PA1 periph A SPI0_MOSI pin */ 340 AT91_PIOA 1 AT91_PERIPH_A AT91_PINCTRL_NONE /* PA1 periph A SPI0_MOSI pin */
330 0 2 0x1 0x0>; /* PA2 periph A SPI0_SPCK pin */ 341 AT91_PIOA 2 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PA2 periph A SPI0_SPCK pin */
331 }; 342 };
332 }; 343 };
333 344
334 spi1 { 345 spi1 {
335 pinctrl_spi1: spi1-0 { 346 pinctrl_spi1: spi1-0 {
336 atmel,pins = 347 atmel,pins =
337 <1 0 0x1 0x0 /* PB0 periph A SPI1_MISO pin */ 348 <AT91_PIOB 0 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB0 periph A SPI1_MISO pin */
338 1 1 0x1 0x0 /* PB1 periph A SPI1_MOSI pin */ 349 AT91_PIOB 1 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB1 periph A SPI1_MOSI pin */
339 1 2 0x1 0x0>; /* PB2 periph A SPI1_SPCK pin */ 350 AT91_PIOB 2 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PB2 periph A SPI1_SPCK pin */
351 };
352 };
353
354 i2c_gpio0 {
355 pinctrl_i2c_gpio0: i2c_gpio0-0 {
356 atmel,pins =
357 <AT91_PIOA 23 AT91_PERIPH_GPIO AT91_PINCTRL_MULTI_DRIVE
358 AT91_PIOA 24 AT91_PERIPH_GPIO AT91_PINCTRL_MULTI_DRIVE>;
359 };
360 };
361
362 tcb0 {
363 pinctrl_tcb0_tclk0: tcb0_tclk0-0 {
364 atmel,pins = <AT91_PIOA 25 AT91_PERIPH_A AT91_PINCTRL_NONE>;
365 };
366
367 pinctrl_tcb0_tclk1: tcb0_tclk1-0 {
368 atmel,pins = <AT91_PIOB 6 AT91_PERIPH_B AT91_PINCTRL_NONE>;
369 };
370
371 pinctrl_tcb0_tclk2: tcb0_tclk2-0 {
372 atmel,pins = <AT91_PIOB 7 AT91_PERIPH_B AT91_PINCTRL_NONE>;
373 };
374
375 pinctrl_tcb0_tioa0: tcb0_tioa0-0 {
376 atmel,pins = <AT91_PIOA 26 AT91_PERIPH_A AT91_PINCTRL_NONE>;
377 };
378
379 pinctrl_tcb0_tioa1: tcb0_tioa1-0 {
380 atmel,pins = <AT91_PIOA 27 AT91_PERIPH_A AT91_PINCTRL_NONE>;
381 };
382
383 pinctrl_tcb0_tioa2: tcb0_tioa2-0 {
384 atmel,pins = <AT91_PIOA 28 AT91_PERIPH_A AT91_PINCTRL_NONE>;
385 };
386
387 pinctrl_tcb0_tiob0: tcb0_tiob0-0 {
388 atmel,pins = <AT91_PIOC 9 AT91_PERIPH_B AT91_PINCTRL_NONE>;
389 };
390
391 pinctrl_tcb0_tiob1: tcb0_tiob1-0 {
392 atmel,pins = <AT91_PIOC 7 AT91_PERIPH_A AT91_PINCTRL_NONE>;
393 };
394
395 pinctrl_tcb0_tiob2: tcb0_tiob2-0 {
396 atmel,pins = <AT91_PIOC 6 AT91_PERIPH_A AT91_PINCTRL_NONE>;
397 };
398 };
399
400 tcb1 {
401 pinctrl_tcb1_tclk0: tcb1_tclk0-0 {
402 atmel,pins = <AT91_PIOB 16 AT91_PERIPH_B AT91_PINCTRL_NONE>;
403 };
404
405 pinctrl_tcb1_tclk1: tcb1_tclk1-0 {
406 atmel,pins = <AT91_PIOB 17 AT91_PERIPH_B AT91_PINCTRL_NONE>;
407 };
408
409 pinctrl_tcb1_tclk2: tcb1_tclk2-0 {
410 atmel,pins = <AT91_PIOC 22 AT91_PERIPH_B AT91_PINCTRL_NONE>;
411 };
412
413 pinctrl_tcb1_tioa0: tcb1_tioa0-0 {
414 atmel,pins = <AT91_PIOB 0 AT91_PERIPH_B AT91_PINCTRL_NONE>;
415 };
416
417 pinctrl_tcb1_tioa1: tcb1_tioa1-0 {
418 atmel,pins = <AT91_PIOB 2 AT91_PERIPH_B AT91_PINCTRL_NONE>;
419 };
420
421 pinctrl_tcb1_tioa2: tcb1_tioa2-0 {
422 atmel,pins = <AT91_PIOB 3 AT91_PERIPH_B AT91_PINCTRL_NONE>;
423 };
424
425 pinctrl_tcb1_tiob0: tcb1_tiob0-0 {
426 atmel,pins = <AT91_PIOB 1 AT91_PERIPH_B AT91_PINCTRL_NONE>;
427 };
428
429 pinctrl_tcb1_tiob1: tcb1_tiob1-0 {
430 atmel,pins = <AT91_PIOB 18 AT91_PERIPH_B AT91_PINCTRL_NONE>;
431 };
432
433 pinctrl_tcb1_tiob2: tcb1_tiob2-0 {
434 atmel,pins = <AT91_PIOB 19 AT91_PERIPH_B AT91_PINCTRL_NONE>;
340 }; 435 };
341 }; 436 };
342 437
343 pioA: gpio@fffff400 { 438 pioA: gpio@fffff400 {
344 compatible = "atmel,at91rm9200-gpio"; 439 compatible = "atmel,at91rm9200-gpio";
345 reg = <0xfffff400 0x200>; 440 reg = <0xfffff400 0x200>;
346 interrupts = <2 4 1>; 441 interrupts = <2 IRQ_TYPE_LEVEL_HIGH 1>;
347 #gpio-cells = <2>; 442 #gpio-cells = <2>;
348 gpio-controller; 443 gpio-controller;
349 interrupt-controller; 444 interrupt-controller;
@@ -353,7 +448,7 @@
353 pioB: gpio@fffff600 { 448 pioB: gpio@fffff600 {
354 compatible = "atmel,at91rm9200-gpio"; 449 compatible = "atmel,at91rm9200-gpio";
355 reg = <0xfffff600 0x200>; 450 reg = <0xfffff600 0x200>;
356 interrupts = <3 4 1>; 451 interrupts = <3 IRQ_TYPE_LEVEL_HIGH 1>;
357 #gpio-cells = <2>; 452 #gpio-cells = <2>;
358 gpio-controller; 453 gpio-controller;
359 interrupt-controller; 454 interrupt-controller;
@@ -363,7 +458,7 @@
363 pioC: gpio@fffff800 { 458 pioC: gpio@fffff800 {
364 compatible = "atmel,at91rm9200-gpio"; 459 compatible = "atmel,at91rm9200-gpio";
365 reg = <0xfffff800 0x200>; 460 reg = <0xfffff800 0x200>;
366 interrupts = <4 4 1>; 461 interrupts = <4 IRQ_TYPE_LEVEL_HIGH 1>;
367 #gpio-cells = <2>; 462 #gpio-cells = <2>;
368 gpio-controller; 463 gpio-controller;
369 interrupt-controller; 464 interrupt-controller;
@@ -374,7 +469,7 @@
374 dbgu: serial@fffff200 { 469 dbgu: serial@fffff200 {
375 compatible = "atmel,at91sam9260-usart"; 470 compatible = "atmel,at91sam9260-usart";
376 reg = <0xfffff200 0x200>; 471 reg = <0xfffff200 0x200>;
377 interrupts = <1 4 7>; 472 interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>;
378 pinctrl-names = "default"; 473 pinctrl-names = "default";
379 pinctrl-0 = <&pinctrl_dbgu>; 474 pinctrl-0 = <&pinctrl_dbgu>;
380 status = "disabled"; 475 status = "disabled";
@@ -383,7 +478,7 @@
383 usart0: serial@fffb0000 { 478 usart0: serial@fffb0000 {
384 compatible = "atmel,at91sam9260-usart"; 479 compatible = "atmel,at91sam9260-usart";
385 reg = <0xfffb0000 0x200>; 480 reg = <0xfffb0000 0x200>;
386 interrupts = <6 4 5>; 481 interrupts = <6 IRQ_TYPE_LEVEL_HIGH 5>;
387 atmel,use-dma-rx; 482 atmel,use-dma-rx;
388 atmel,use-dma-tx; 483 atmel,use-dma-tx;
389 pinctrl-names = "default"; 484 pinctrl-names = "default";
@@ -394,7 +489,7 @@
394 usart1: serial@fffb4000 { 489 usart1: serial@fffb4000 {
395 compatible = "atmel,at91sam9260-usart"; 490 compatible = "atmel,at91sam9260-usart";
396 reg = <0xfffb4000 0x200>; 491 reg = <0xfffb4000 0x200>;
397 interrupts = <7 4 5>; 492 interrupts = <7 IRQ_TYPE_LEVEL_HIGH 5>;
398 atmel,use-dma-rx; 493 atmel,use-dma-rx;
399 atmel,use-dma-tx; 494 atmel,use-dma-tx;
400 pinctrl-names = "default"; 495 pinctrl-names = "default";
@@ -405,7 +500,7 @@
405 usart2: serial@fffb8000 { 500 usart2: serial@fffb8000 {
406 compatible = "atmel,at91sam9260-usart"; 501 compatible = "atmel,at91sam9260-usart";
407 reg = <0xfffb8000 0x200>; 502 reg = <0xfffb8000 0x200>;
408 interrupts = <8 4 5>; 503 interrupts = <8 IRQ_TYPE_LEVEL_HIGH 5>;
409 atmel,use-dma-rx; 504 atmel,use-dma-rx;
410 atmel,use-dma-tx; 505 atmel,use-dma-tx;
411 pinctrl-names = "default"; 506 pinctrl-names = "default";
@@ -416,7 +511,7 @@
416 usart3: serial@fffd0000 { 511 usart3: serial@fffd0000 {
417 compatible = "atmel,at91sam9260-usart"; 512 compatible = "atmel,at91sam9260-usart";
418 reg = <0xfffd0000 0x200>; 513 reg = <0xfffd0000 0x200>;
419 interrupts = <23 4 5>; 514 interrupts = <23 IRQ_TYPE_LEVEL_HIGH 5>;
420 atmel,use-dma-rx; 515 atmel,use-dma-rx;
421 atmel,use-dma-tx; 516 atmel,use-dma-tx;
422 pinctrl-names = "default"; 517 pinctrl-names = "default";
@@ -427,7 +522,7 @@
427 uart0: serial@fffd4000 { 522 uart0: serial@fffd4000 {
428 compatible = "atmel,at91sam9260-usart"; 523 compatible = "atmel,at91sam9260-usart";
429 reg = <0xfffd4000 0x200>; 524 reg = <0xfffd4000 0x200>;
430 interrupts = <24 4 5>; 525 interrupts = <24 IRQ_TYPE_LEVEL_HIGH 5>;
431 atmel,use-dma-rx; 526 atmel,use-dma-rx;
432 atmel,use-dma-tx; 527 atmel,use-dma-tx;
433 pinctrl-names = "default"; 528 pinctrl-names = "default";
@@ -438,7 +533,7 @@
438 uart1: serial@fffd8000 { 533 uart1: serial@fffd8000 {
439 compatible = "atmel,at91sam9260-usart"; 534 compatible = "atmel,at91sam9260-usart";
440 reg = <0xfffd8000 0x200>; 535 reg = <0xfffd8000 0x200>;
441 interrupts = <25 4 5>; 536 interrupts = <25 IRQ_TYPE_LEVEL_HIGH 5>;
442 atmel,use-dma-rx; 537 atmel,use-dma-rx;
443 atmel,use-dma-tx; 538 atmel,use-dma-tx;
444 pinctrl-names = "default"; 539 pinctrl-names = "default";
@@ -449,7 +544,7 @@
449 macb0: ethernet@fffc4000 { 544 macb0: ethernet@fffc4000 {
450 compatible = "cdns,at32ap7000-macb", "cdns,macb"; 545 compatible = "cdns,at32ap7000-macb", "cdns,macb";
451 reg = <0xfffc4000 0x100>; 546 reg = <0xfffc4000 0x100>;
452 interrupts = <21 4 3>; 547 interrupts = <21 IRQ_TYPE_LEVEL_HIGH 3>;
453 pinctrl-names = "default"; 548 pinctrl-names = "default";
454 pinctrl-0 = <&pinctrl_macb_rmii>; 549 pinctrl-0 = <&pinctrl_macb_rmii>;
455 status = "disabled"; 550 status = "disabled";
@@ -458,14 +553,14 @@
458 usb1: gadget@fffa4000 { 553 usb1: gadget@fffa4000 {
459 compatible = "atmel,at91rm9200-udc"; 554 compatible = "atmel,at91rm9200-udc";
460 reg = <0xfffa4000 0x4000>; 555 reg = <0xfffa4000 0x4000>;
461 interrupts = <10 4 2>; 556 interrupts = <10 IRQ_TYPE_LEVEL_HIGH 2>;
462 status = "disabled"; 557 status = "disabled";
463 }; 558 };
464 559
465 i2c0: i2c@fffac000 { 560 i2c0: i2c@fffac000 {
466 compatible = "atmel,at91sam9260-i2c"; 561 compatible = "atmel,at91sam9260-i2c";
467 reg = <0xfffac000 0x100>; 562 reg = <0xfffac000 0x100>;
468 interrupts = <11 4 6>; 563 interrupts = <11 IRQ_TYPE_LEVEL_HIGH 6>;
469 #address-cells = <1>; 564 #address-cells = <1>;
470 #size-cells = <0>; 565 #size-cells = <0>;
471 status = "disabled"; 566 status = "disabled";
@@ -474,7 +569,7 @@
474 mmc0: mmc@fffa8000 { 569 mmc0: mmc@fffa8000 {
475 compatible = "atmel,hsmci"; 570 compatible = "atmel,hsmci";
476 reg = <0xfffa8000 0x600>; 571 reg = <0xfffa8000 0x600>;
477 interrupts = <9 4 0>; 572 interrupts = <9 IRQ_TYPE_LEVEL_HIGH 0>;
478 #address-cells = <1>; 573 #address-cells = <1>;
479 #size-cells = <0>; 574 #size-cells = <0>;
480 status = "disabled"; 575 status = "disabled";
@@ -483,7 +578,7 @@
483 ssc0: ssc@fffbc000 { 578 ssc0: ssc@fffbc000 {
484 compatible = "atmel,at91rm9200-ssc"; 579 compatible = "atmel,at91rm9200-ssc";
485 reg = <0xfffbc000 0x4000>; 580 reg = <0xfffbc000 0x4000>;
486 interrupts = <14 4 5>; 581 interrupts = <14 IRQ_TYPE_LEVEL_HIGH 5>;
487 pinctrl-names = "default"; 582 pinctrl-names = "default";
488 pinctrl-0 = <&pinctrl_ssc0_tx &pinctrl_ssc0_rx>; 583 pinctrl-0 = <&pinctrl_ssc0_tx &pinctrl_ssc0_rx>;
489 status = "disabled"; 584 status = "disabled";
@@ -494,7 +589,7 @@
494 #size-cells = <0>; 589 #size-cells = <0>;
495 compatible = "atmel,at91rm9200-spi"; 590 compatible = "atmel,at91rm9200-spi";
496 reg = <0xfffc8000 0x200>; 591 reg = <0xfffc8000 0x200>;
497 interrupts = <12 4 3>; 592 interrupts = <12 IRQ_TYPE_LEVEL_HIGH 3>;
498 pinctrl-names = "default"; 593 pinctrl-names = "default";
499 pinctrl-0 = <&pinctrl_spi0>; 594 pinctrl-0 = <&pinctrl_spi0>;
500 status = "disabled"; 595 status = "disabled";
@@ -505,7 +600,7 @@
505 #size-cells = <0>; 600 #size-cells = <0>;
506 compatible = "atmel,at91rm9200-spi"; 601 compatible = "atmel,at91rm9200-spi";
507 reg = <0xfffcc000 0x200>; 602 reg = <0xfffcc000 0x200>;
508 interrupts = <13 4 3>; 603 interrupts = <13 IRQ_TYPE_LEVEL_HIGH 3>;
509 pinctrl-names = "default"; 604 pinctrl-names = "default";
510 pinctrl-0 = <&pinctrl_spi1>; 605 pinctrl-0 = <&pinctrl_spi1>;
511 status = "disabled"; 606 status = "disabled";
@@ -514,7 +609,7 @@
514 adc0: adc@fffe0000 { 609 adc0: adc@fffe0000 {
515 compatible = "atmel,at91sam9260-adc"; 610 compatible = "atmel,at91sam9260-adc";
516 reg = <0xfffe0000 0x100>; 611 reg = <0xfffe0000 0x100>;
517 interrupts = <5 4 0>; 612 interrupts = <5 IRQ_TYPE_LEVEL_HIGH 0>;
518 atmel,adc-use-external-triggers; 613 atmel,adc-use-external-triggers;
519 atmel,adc-channels-used = <0xf>; 614 atmel,adc-channels-used = <0xf>;
520 atmel,adc-vref = <3300>; 615 atmel,adc-vref = <3300>;
@@ -567,8 +662,8 @@
567 atmel,nand-cmd-offset = <22>; 662 atmel,nand-cmd-offset = <22>;
568 pinctrl-names = "default"; 663 pinctrl-names = "default";
569 pinctrl-0 = <&pinctrl_nand>; 664 pinctrl-0 = <&pinctrl_nand>;
570 gpios = <&pioC 13 0 665 gpios = <&pioC 13 GPIO_ACTIVE_HIGH
571 &pioC 14 0 666 &pioC 14 GPIO_ACTIVE_HIGH
572 0 667 0
573 >; 668 >;
574 status = "disabled"; 669 status = "disabled";
@@ -577,21 +672,23 @@
577 usb0: ohci@00500000 { 672 usb0: ohci@00500000 {
578 compatible = "atmel,at91rm9200-ohci", "usb-ohci"; 673 compatible = "atmel,at91rm9200-ohci", "usb-ohci";
579 reg = <0x00500000 0x100000>; 674 reg = <0x00500000 0x100000>;
580 interrupts = <20 4 2>; 675 interrupts = <20 IRQ_TYPE_LEVEL_HIGH 2>;
581 status = "disabled"; 676 status = "disabled";
582 }; 677 };
583 }; 678 };
584 679
585 i2c@0 { 680 i2c@0 {
586 compatible = "i2c-gpio"; 681 compatible = "i2c-gpio";
587 gpios = <&pioA 23 0 /* sda */ 682 gpios = <&pioA 23 GPIO_ACTIVE_HIGH /* sda */
588 &pioA 24 0 /* scl */ 683 &pioA 24 GPIO_ACTIVE_HIGH /* scl */
589 >; 684 >;
590 i2c-gpio,sda-open-drain; 685 i2c-gpio,sda-open-drain;
591 i2c-gpio,scl-open-drain; 686 i2c-gpio,scl-open-drain;
592 i2c-gpio,delay-us = <2>; /* ~100 kHz */ 687 i2c-gpio,delay-us = <2>; /* ~100 kHz */
593 #address-cells = <1>; 688 #address-cells = <1>;
594 #size-cells = <0>; 689 #size-cells = <0>;
690 pinctrl-names = "default";
691 pinctrl-0 = <&pinctrl_i2c_gpio0>;
595 status = "disabled"; 692 status = "disabled";
596 }; 693 };
597}; 694};
diff --git a/arch/arm/boot/dts/at91sam9263.dtsi b/arch/arm/boot/dts/at91sam9263.dtsi
index 94b58ab2cc08..d5bd65f74602 100644
--- a/arch/arm/boot/dts/at91sam9263.dtsi
+++ b/arch/arm/boot/dts/at91sam9263.dtsi
@@ -6,7 +6,10 @@
6 * Licensed under GPLv2 only. 6 * Licensed under GPLv2 only.
7 */ 7 */
8 8
9/include/ "skeleton.dtsi" 9#include "skeleton.dtsi"
10#include <dt-bindings/pinctrl/at91.h>
11#include <dt-bindings/interrupt-controller/irq.h>
12#include <dt-bindings/gpio/gpio.h>
10 13
11/ { 14/ {
12 model = "Atmel AT91SAM9263 family SoC"; 15 model = "Atmel AT91SAM9263 family SoC";
@@ -29,8 +32,12 @@
29 ssc1 = &ssc1; 32 ssc1 = &ssc1;
30 }; 33 };
31 cpus { 34 cpus {
32 cpu@0 { 35 #address-cells = <0>;
33 compatible = "arm,arm926ejs"; 36 #size-cells = <0>;
37
38 cpu {
39 compatible = "arm,arm926ej-s";
40 device_type = "cpu";
34 }; 41 };
35 }; 42 };
36 43
@@ -72,13 +79,13 @@
72 pit: timer@fffffd30 { 79 pit: timer@fffffd30 {
73 compatible = "atmel,at91sam9260-pit"; 80 compatible = "atmel,at91sam9260-pit";
74 reg = <0xfffffd30 0xf>; 81 reg = <0xfffffd30 0xf>;
75 interrupts = <1 4 7>; 82 interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>;
76 }; 83 };
77 84
78 tcb0: timer@fff7c000 { 85 tcb0: timer@fff7c000 {
79 compatible = "atmel,at91rm9200-tcb"; 86 compatible = "atmel,at91rm9200-tcb";
80 reg = <0xfff7c000 0x100>; 87 reg = <0xfff7c000 0x100>;
81 interrupts = <19 4 0>; 88 interrupts = <19 IRQ_TYPE_LEVEL_HIGH 0>;
82 }; 89 };
83 90
84 rstc@fffffd00 { 91 rstc@fffffd00 {
@@ -110,221 +117,259 @@
110 dbgu { 117 dbgu {
111 pinctrl_dbgu: dbgu-0 { 118 pinctrl_dbgu: dbgu-0 {
112 atmel,pins = 119 atmel,pins =
113 <2 30 0x1 0x0 /* PC30 periph A */ 120 <AT91_PIOC 30 AT91_PERIPH_A AT91_PINCTRL_NONE /* PC30 periph A */
114 2 31 0x1 0x1>; /* PC31 periph with pullup */ 121 AT91_PIOC 31 AT91_PERIPH_A AT91_PINCTRL_PULL_UP>; /* PC31 periph with pullup */
115 }; 122 };
116 }; 123 };
117 124
118 usart0 { 125 usart0 {
119 pinctrl_usart0: usart0-0 { 126 pinctrl_usart0: usart0-0 {
120 atmel,pins = 127 atmel,pins =
121 <0 26 0x1 0x1 /* PA26 periph A with pullup */ 128 <AT91_PIOA 26 AT91_PERIPH_A AT91_PINCTRL_PULL_UP /* PA26 periph A with pullup */
122 0 27 0x1 0x0>; /* PA27 periph A */ 129 AT91_PIOA 27 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PA27 periph A */
123 }; 130 };
124 131
125 pinctrl_usart0_rts: usart0_rts-0 { 132 pinctrl_usart0_rts: usart0_rts-0 {
126 atmel,pins = 133 atmel,pins =
127 <0 28 0x1 0x0>; /* PA28 periph A */ 134 <AT91_PIOA 28 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PA28 periph A */
128 }; 135 };
129 136
130 pinctrl_usart0_cts: usart0_cts-0 { 137 pinctrl_usart0_cts: usart0_cts-0 {
131 atmel,pins = 138 atmel,pins =
132 <0 29 0x1 0x0>; /* PA29 periph A */ 139 <AT91_PIOA 29 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PA29 periph A */
133 }; 140 };
134 }; 141 };
135 142
136 usart1 { 143 usart1 {
137 pinctrl_usart1: usart1-0 { 144 pinctrl_usart1: usart1-0 {
138 atmel,pins = 145 atmel,pins =
139 <3 0 0x1 0x1 /* PD0 periph A with pullup */ 146 <AT91_PIOD 0 AT91_PERIPH_A AT91_PINCTRL_PULL_UP /* PD0 periph A with pullup */
140 3 1 0x1 0x0>; /* PD1 periph A */ 147 AT91_PIOD 1 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PD1 periph A */
141 }; 148 };
142 149
143 pinctrl_usart1_rts: usart1_rts-0 { 150 pinctrl_usart1_rts: usart1_rts-0 {
144 atmel,pins = 151 atmel,pins =
145 <3 7 0x2 0x0>; /* PD7 periph B */ 152 <AT91_PIOD 7 AT91_PERIPH_B AT91_PINCTRL_NONE>; /* PD7 periph B */
146 }; 153 };
147 154
148 pinctrl_usart1_cts: usart1_cts-0 { 155 pinctrl_usart1_cts: usart1_cts-0 {
149 atmel,pins = 156 atmel,pins =
150 <3 8 0x2 0x0>; /* PD8 periph B */ 157 <AT91_PIOD 8 AT91_PERIPH_B AT91_PINCTRL_NONE>; /* PD8 periph B */
151 }; 158 };
152 }; 159 };
153 160
154 usart2 { 161 usart2 {
155 pinctrl_usart2: usart2-0 { 162 pinctrl_usart2: usart2-0 {
156 atmel,pins = 163 atmel,pins =
157 <3 2 0x1 0x1 /* PD2 periph A with pullup */ 164 <AT91_PIOD 2 AT91_PERIPH_A AT91_PINCTRL_PULL_UP /* PD2 periph A with pullup */
158 3 3 0x1 0x0>; /* PD3 periph A */ 165 AT91_PIOD 3 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PD3 periph A */
159 }; 166 };
160 167
161 pinctrl_usart2_rts: usart2_rts-0 { 168 pinctrl_usart2_rts: usart2_rts-0 {
162 atmel,pins = 169 atmel,pins =
163 <3 5 0x2 0x0>; /* PD5 periph B */ 170 <AT91_PIOD 5 AT91_PERIPH_B AT91_PINCTRL_NONE>; /* PD5 periph B */
164 }; 171 };
165 172
166 pinctrl_usart2_cts: usart2_cts-0 { 173 pinctrl_usart2_cts: usart2_cts-0 {
167 atmel,pins = 174 atmel,pins =
168 <4 6 0x2 0x0>; /* PD6 periph B */ 175 <AT91_PIOD 6 AT91_PERIPH_B AT91_PINCTRL_NONE>; /* PD6 periph B */
169 }; 176 };
170 }; 177 };
171 178
172 nand { 179 nand {
173 pinctrl_nand: nand-0 { 180 pinctrl_nand: nand-0 {
174 atmel,pins = 181 atmel,pins =
175 <0 22 0x0 0x1 /* PA22 gpio RDY pin pull_up*/ 182 <AT91_PIOA 22 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP /* PA22 gpio RDY pin pull_up*/
176 3 15 0x0 0x1>; /* PD15 gpio enable pin pull_up */ 183 AT91_PIOD 15 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP>; /* PD15 gpio enable pin pull_up */
177 }; 184 };
178 }; 185 };
179 186
180 macb { 187 macb {
181 pinctrl_macb_rmii: macb_rmii-0 { 188 pinctrl_macb_rmii: macb_rmii-0 {
182 atmel,pins = 189 atmel,pins =
183 <2 25 0x2 0x0 /* PC25 periph B */ 190 <AT91_PIOC 25 AT91_PERIPH_B AT91_PINCTRL_NONE /* PC25 periph B */
184 4 21 0x1 0x0 /* PE21 periph A */ 191 AT91_PIOE 21 AT91_PERIPH_A AT91_PINCTRL_NONE /* PE21 periph A */
185 4 23 0x1 0x0 /* PE23 periph A */ 192 AT91_PIOE 23 AT91_PERIPH_A AT91_PINCTRL_NONE /* PE23 periph A */
186 4 24 0x1 0x0 /* PE24 periph A */ 193 AT91_PIOE 24 AT91_PERIPH_A AT91_PINCTRL_NONE /* PE24 periph A */
187 4 25 0x1 0x0 /* PE25 periph A */ 194 AT91_PIOE 25 AT91_PERIPH_A AT91_PINCTRL_NONE /* PE25 periph A */
188 4 26 0x1 0x0 /* PE26 periph A */ 195 AT91_PIOE 26 AT91_PERIPH_A AT91_PINCTRL_NONE /* PE26 periph A */
189 4 27 0x1 0x0 /* PE27 periph A */ 196 AT91_PIOE 27 AT91_PERIPH_A AT91_PINCTRL_NONE /* PE27 periph A */
190 4 28 0x1 0x0 /* PE28 periph A */ 197 AT91_PIOE 28 AT91_PERIPH_A AT91_PINCTRL_NONE /* PE28 periph A */
191 4 29 0x1 0x0 /* PE29 periph A */ 198 AT91_PIOE 29 AT91_PERIPH_A AT91_PINCTRL_NONE /* PE29 periph A */
192 4 30 0x1 0x0>; /* PE30 periph A */ 199 AT91_PIOE 30 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PE30 periph A */
193 }; 200 };
194 201
195 pinctrl_macb_rmii_mii: macb_rmii_mii-0 { 202 pinctrl_macb_rmii_mii: macb_rmii_mii-0 {
196 atmel,pins = 203 atmel,pins =
197 <2 20 0x2 0x0 /* PC20 periph B */ 204 <AT91_PIOC 20 AT91_PERIPH_B AT91_PINCTRL_NONE /* PC20 periph B */
198 2 21 0x2 0x0 /* PC21 periph B */ 205 AT91_PIOC 21 AT91_PERIPH_B AT91_PINCTRL_NONE /* PC21 periph B */
199 2 22 0x2 0x0 /* PC22 periph B */ 206 AT91_PIOC 22 AT91_PERIPH_B AT91_PINCTRL_NONE /* PC22 periph B */
200 2 23 0x2 0x0 /* PC23 periph B */ 207 AT91_PIOC 23 AT91_PERIPH_B AT91_PINCTRL_NONE /* PC23 periph B */
201 2 24 0x2 0x0 /* PC24 periph B */ 208 AT91_PIOC 24 AT91_PERIPH_B AT91_PINCTRL_NONE /* PC24 periph B */
202 2 25 0x2 0x0 /* PC25 periph B */ 209 AT91_PIOC 25 AT91_PERIPH_B AT91_PINCTRL_NONE /* PC25 periph B */
203 2 27 0x2 0x0 /* PC27 periph B */ 210 AT91_PIOC 27 AT91_PERIPH_B AT91_PINCTRL_NONE /* PC27 periph B */
204 4 22 0x2 0x0>; /* PE22 periph B */ 211 AT91_PIOE 22 AT91_PERIPH_B AT91_PINCTRL_NONE>; /* PE22 periph B */
205 }; 212 };
206 }; 213 };
207 214
208 mmc0 { 215 mmc0 {
209 pinctrl_mmc0_clk: mmc0_clk-0 { 216 pinctrl_mmc0_clk: mmc0_clk-0 {
210 atmel,pins = 217 atmel,pins =
211 <0 12 0x1 0x0>; /* PA12 periph A */ 218 <AT91_PIOA 12 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PA12 periph A */
212 }; 219 };
213 220
214 pinctrl_mmc0_slot0_cmd_dat0: mmc0_slot0_cmd_dat0-0 { 221 pinctrl_mmc0_slot0_cmd_dat0: mmc0_slot0_cmd_dat0-0 {
215 atmel,pins = 222 atmel,pins =
216 <0 1 0x1 0x1 /* PA1 periph A with pullup */ 223 <AT91_PIOA 1 AT91_PERIPH_A AT91_PINCTRL_PULL_UP /* PA1 periph A with pullup */
217 0 0 0x1 0x1>; /* PA0 periph A with pullup */ 224 AT91_PIOA 0 AT91_PERIPH_A AT91_PINCTRL_PULL_UP>; /* PA0 periph A with pullup */
218 }; 225 };
219 226
220 pinctrl_mmc0_slot0_dat1_3: mmc0_slot0_dat1_3-0 { 227 pinctrl_mmc0_slot0_dat1_3: mmc0_slot0_dat1_3-0 {
221 atmel,pins = 228 atmel,pins =
222 <0 3 0x1 0x1 /* PA3 periph A with pullup */ 229 <AT91_PIOA 3 AT91_PERIPH_A AT91_PINCTRL_PULL_UP /* PA3 periph A with pullup */
223 0 4 0x1 0x1 /* PA4 periph A with pullup */ 230 AT91_PIOA 4 AT91_PERIPH_A AT91_PINCTRL_PULL_UP /* PA4 periph A with pullup */
224 0 5 0x1 0x1>; /* PA5 periph A with pullup */ 231 AT91_PIOA 5 AT91_PERIPH_A AT91_PINCTRL_PULL_UP>; /* PA5 periph A with pullup */
225 }; 232 };
226 233
227 pinctrl_mmc0_slot1_cmd_dat0: mmc0_slot1_cmd_dat0-0 { 234 pinctrl_mmc0_slot1_cmd_dat0: mmc0_slot1_cmd_dat0-0 {
228 atmel,pins = 235 atmel,pins =
229 <0 16 0x1 0x1 /* PA16 periph A with pullup */ 236 <AT91_PIOA 16 AT91_PERIPH_A AT91_PINCTRL_PULL_UP /* PA16 periph A with pullup */
230 0 17 0x1 0x1>; /* PA17 periph A with pullup */ 237 AT91_PIOA 17 AT91_PERIPH_A AT91_PINCTRL_PULL_UP>; /* PA17 periph A with pullup */
231 }; 238 };
232 239
233 pinctrl_mmc0_slot1_dat1_3: mmc0_slot1_dat1_3-0 { 240 pinctrl_mmc0_slot1_dat1_3: mmc0_slot1_dat1_3-0 {
234 atmel,pins = 241 atmel,pins =
235 <0 18 0x1 0x1 /* PA18 periph A with pullup */ 242 <AT91_PIOA 18 AT91_PERIPH_A AT91_PINCTRL_PULL_UP /* PA18 periph A with pullup */
236 0 19 0x1 0x1 /* PA19 periph A with pullup */ 243 AT91_PIOA 19 AT91_PERIPH_A AT91_PINCTRL_PULL_UP /* PA19 periph A with pullup */
237 0 20 0x1 0x1>; /* PA20 periph A with pullup */ 244 AT91_PIOA 20 AT91_PERIPH_A AT91_PINCTRL_PULL_UP>; /* PA20 periph A with pullup */
238 }; 245 };
239 }; 246 };
240 247
241 mmc1 { 248 mmc1 {
242 pinctrl_mmc1_clk: mmc1_clk-0 { 249 pinctrl_mmc1_clk: mmc1_clk-0 {
243 atmel,pins = 250 atmel,pins =
244 <0 6 0x1 0x0>; /* PA6 periph A */ 251 <AT91_PIOA 6 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PA6 periph A */
245 }; 252 };
246 253
247 pinctrl_mmc1_slot0_cmd_dat0: mmc1_slot0_cmd_dat0-0 { 254 pinctrl_mmc1_slot0_cmd_dat0: mmc1_slot0_cmd_dat0-0 {
248 atmel,pins = 255 atmel,pins =
249 <0 7 0x1 0x1 /* PA7 periph A with pullup */ 256 <AT91_PIOA 7 AT91_PERIPH_A AT91_PINCTRL_PULL_UP /* PA7 periph A with pullup */
250 0 8 0x1 0x1>; /* PA8 periph A with pullup */ 257 AT91_PIOA 8 AT91_PERIPH_A AT91_PINCTRL_PULL_UP>; /* PA8 periph A with pullup */
251 }; 258 };
252 259
253 pinctrl_mmc1_slot0_dat1_3: mmc1_slot0_dat1_3-0 { 260 pinctrl_mmc1_slot0_dat1_3: mmc1_slot0_dat1_3-0 {
254 atmel,pins = 261 atmel,pins =
255 <0 9 0x1 0x1 /* PA9 periph A with pullup */ 262 <AT91_PIOA 9 AT91_PERIPH_A AT91_PINCTRL_PULL_UP /* PA9 periph A with pullup */
256 0 10 0x1 0x1 /* PA10 periph A with pullup */ 263 AT91_PIOA 10 AT91_PERIPH_A AT91_PINCTRL_PULL_UP /* PA10 periph A with pullup */
257 0 11 0x1 0x1>; /* PA11 periph A with pullup */ 264 AT91_PIOA 11 AT91_PERIPH_A AT91_PINCTRL_PULL_UP>; /* PA11 periph A with pullup */
258 }; 265 };
259 266
260 pinctrl_mmc1_slot1_cmd_dat0: mmc1_slot1_cmd_dat0-0 { 267 pinctrl_mmc1_slot1_cmd_dat0: mmc1_slot1_cmd_dat0-0 {
261 atmel,pins = 268 atmel,pins =
262 <0 21 0x1 0x1 /* PA21 periph A with pullup */ 269 <AT91_PIOA 21 AT91_PERIPH_A AT91_PINCTRL_PULL_UP /* PA21 periph A with pullup */
263 0 22 0x1 0x1>; /* PA22 periph A with pullup */ 270 AT91_PIOA 22 AT91_PERIPH_A AT91_PINCTRL_PULL_UP>; /* PA22 periph A with pullup */
264 }; 271 };
265 272
266 pinctrl_mmc1_slot1_dat1_3: mmc1_slot1_dat1_3-0 { 273 pinctrl_mmc1_slot1_dat1_3: mmc1_slot1_dat1_3-0 {
267 atmel,pins = 274 atmel,pins =
268 <0 23 0x1 0x1 /* PA23 periph A with pullup */ 275 <AT91_PIOA 23 AT91_PERIPH_A AT91_PINCTRL_PULL_UP /* PA23 periph A with pullup */
269 0 24 0x1 0x1 /* PA24 periph A with pullup */ 276 AT91_PIOA 24 AT91_PERIPH_A AT91_PINCTRL_PULL_UP /* PA24 periph A with pullup */
270 0 25 0x1 0x1>; /* PA25 periph A with pullup */ 277 AT91_PIOA 25 AT91_PERIPH_A AT91_PINCTRL_PULL_UP>; /* PA25 periph A with pullup */
271 }; 278 };
272 }; 279 };
273 280
274 ssc0 { 281 ssc0 {
275 pinctrl_ssc0_tx: ssc0_tx-0 { 282 pinctrl_ssc0_tx: ssc0_tx-0 {
276 atmel,pins = 283 atmel,pins =
277 <1 0 0x2 0x0 /* PB0 periph B */ 284 <AT91_PIOB 0 AT91_PERIPH_B AT91_PINCTRL_NONE /* PB0 periph B */
278 1 1 0x2 0x0 /* PB1 periph B */ 285 AT91_PIOB 1 AT91_PERIPH_B AT91_PINCTRL_NONE /* PB1 periph B */
279 1 2 0x2 0x0>; /* PB2 periph B */ 286 AT91_PIOB 2 AT91_PERIPH_B AT91_PINCTRL_NONE>; /* PB2 periph B */
280 }; 287 };
281 288
282 pinctrl_ssc0_rx: ssc0_rx-0 { 289 pinctrl_ssc0_rx: ssc0_rx-0 {
283 atmel,pins = 290 atmel,pins =
284 <1 3 0x2 0x0 /* PB3 periph B */ 291 <AT91_PIOB 3 AT91_PERIPH_B AT91_PINCTRL_NONE /* PB3 periph B */
285 1 4 0x2 0x0 /* PB4 periph B */ 292 AT91_PIOB 4 AT91_PERIPH_B AT91_PINCTRL_NONE /* PB4 periph B */
286 1 5 0x2 0x0>; /* PB5 periph B */ 293 AT91_PIOB 5 AT91_PERIPH_B AT91_PINCTRL_NONE>; /* PB5 periph B */
287 }; 294 };
288 }; 295 };
289 296
290 ssc1 { 297 ssc1 {
291 pinctrl_ssc1_tx: ssc1_tx-0 { 298 pinctrl_ssc1_tx: ssc1_tx-0 {
292 atmel,pins = 299 atmel,pins =
293 <1 6 0x1 0x0 /* PB6 periph A */ 300 <AT91_PIOB 6 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB6 periph A */
294 1 7 0x1 0x0 /* PB7 periph A */ 301 AT91_PIOB 7 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB7 periph A */
295 1 8 0x1 0x0>; /* PB8 periph A */ 302 AT91_PIOB 8 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PB8 periph A */
296 }; 303 };
297 304
298 pinctrl_ssc1_rx: ssc1_rx-0 { 305 pinctrl_ssc1_rx: ssc1_rx-0 {
299 atmel,pins = 306 atmel,pins =
300 <1 9 0x1 0x0 /* PB9 periph A */ 307 <AT91_PIOB 9 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB9 periph A */
301 1 10 0x1 0x0 /* PB10 periph A */ 308 AT91_PIOB 10 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB10 periph A */
302 1 11 0x1 0x0>; /* PB11 periph A */ 309 AT91_PIOB 11 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PB11 periph A */
303 }; 310 };
304 }; 311 };
305 312
306 spi0 { 313 spi0 {
307 pinctrl_spi0: spi0-0 { 314 pinctrl_spi0: spi0-0 {
308 atmel,pins = 315 atmel,pins =
309 <0 0 0x2 0x0 /* PA0 periph B SPI0_MISO pin */ 316 <AT91_PIOA 0 AT91_PERIPH_B AT91_PINCTRL_NONE /* PA0 periph B SPI0_MISO pin */
310 0 1 0x2 0x0 /* PA1 periph B SPI0_MOSI pin */ 317 AT91_PIOA 1 AT91_PERIPH_B AT91_PINCTRL_NONE /* PA1 periph B SPI0_MOSI pin */
311 0 2 0x2 0x0>; /* PA2 periph B SPI0_SPCK pin */ 318 AT91_PIOA 2 AT91_PERIPH_B AT91_PINCTRL_NONE>; /* PA2 periph B SPI0_SPCK pin */
312 }; 319 };
313 }; 320 };
314 321
315 spi1 { 322 spi1 {
316 pinctrl_spi1: spi1-0 { 323 pinctrl_spi1: spi1-0 {
317 atmel,pins = 324 atmel,pins =
318 <1 12 0x1 0x0 /* PB12 periph A SPI1_MISO pin */ 325 <AT91_PIOB 12 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB12 periph A SPI1_MISO pin */
319 1 13 0x1 0x0 /* PB13 periph A SPI1_MOSI pin */ 326 AT91_PIOB 13 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB13 periph A SPI1_MOSI pin */
320 1 14 0x1 0x0>; /* PB14 periph A SPI1_SPCK pin */ 327 AT91_PIOB 14 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PB14 periph A SPI1_SPCK pin */
328 };
329 };
330
331 tcb0 {
332 pinctrl_tcb0_tclk0: tcb0_tclk0-0 {
333 atmel,pins = <AT91_PIOB 28 AT91_PERIPH_B AT91_PINCTRL_NONE>;
334 };
335
336 pinctrl_tcb0_tclk1: tcb0_tclk1-0 {
337 atmel,pins = <AT91_PIOC 28 AT91_PERIPH_B AT91_PINCTRL_NONE>;
338 };
339
340 pinctrl_tcb0_tclk2: tcb0_tclk2-0 {
341 atmel,pins = <AT91_PIOA 15 AT91_PERIPH_A AT91_PINCTRL_NONE>;
342 };
343
344 pinctrl_tcb0_tioa0: tcb0_tioa0-0 {
345 atmel,pins = <AT91_PIOE 18 AT91_PERIPH_B AT91_PINCTRL_NONE>;
346 };
347
348 pinctrl_tcb0_tioa1: tcb0_tioa1-0 {
349 atmel,pins = <AT91_PIOE 8 AT91_PERIPH_B AT91_PINCTRL_NONE>;
350 };
351
352 pinctrl_tcb0_tioa2: tcb0_tioa2-0 {
353 atmel,pins = <AT91_PIOB 17 AT91_PERIPH_B AT91_PINCTRL_NONE>;
354 };
355
356 pinctrl_tcb0_tiob0: tcb0_tiob0-0 {
357 atmel,pins = <AT91_PIOE 19 AT91_PERIPH_B AT91_PINCTRL_NONE>;
358 };
359
360 pinctrl_tcb0_tiob1: tcb0_tiob1-0 {
361 atmel,pins = <AT91_PIOE 9 AT91_PERIPH_B AT91_PINCTRL_NONE>;
362 };
363
364 pinctrl_tcb0_tiob2: tcb0_tiob2-0 {
365 atmel,pins = <AT91_PIOB 18 AT91_PERIPH_B AT91_PINCTRL_NONE>;
321 }; 366 };
322 }; 367 };
323 368
324 pioA: gpio@fffff200 { 369 pioA: gpio@fffff200 {
325 compatible = "atmel,at91rm9200-gpio"; 370 compatible = "atmel,at91rm9200-gpio";
326 reg = <0xfffff200 0x200>; 371 reg = <0xfffff200 0x200>;
327 interrupts = <2 4 1>; 372 interrupts = <2 IRQ_TYPE_LEVEL_HIGH 1>;
328 #gpio-cells = <2>; 373 #gpio-cells = <2>;
329 gpio-controller; 374 gpio-controller;
330 interrupt-controller; 375 interrupt-controller;
@@ -334,7 +379,7 @@
334 pioB: gpio@fffff400 { 379 pioB: gpio@fffff400 {
335 compatible = "atmel,at91rm9200-gpio"; 380 compatible = "atmel,at91rm9200-gpio";
336 reg = <0xfffff400 0x200>; 381 reg = <0xfffff400 0x200>;
337 interrupts = <3 4 1>; 382 interrupts = <3 IRQ_TYPE_LEVEL_HIGH 1>;
338 #gpio-cells = <2>; 383 #gpio-cells = <2>;
339 gpio-controller; 384 gpio-controller;
340 interrupt-controller; 385 interrupt-controller;
@@ -344,7 +389,7 @@
344 pioC: gpio@fffff600 { 389 pioC: gpio@fffff600 {
345 compatible = "atmel,at91rm9200-gpio"; 390 compatible = "atmel,at91rm9200-gpio";
346 reg = <0xfffff600 0x200>; 391 reg = <0xfffff600 0x200>;
347 interrupts = <4 4 1>; 392 interrupts = <4 IRQ_TYPE_LEVEL_HIGH 1>;
348 #gpio-cells = <2>; 393 #gpio-cells = <2>;
349 gpio-controller; 394 gpio-controller;
350 interrupt-controller; 395 interrupt-controller;
@@ -354,7 +399,7 @@
354 pioD: gpio@fffff800 { 399 pioD: gpio@fffff800 {
355 compatible = "atmel,at91rm9200-gpio"; 400 compatible = "atmel,at91rm9200-gpio";
356 reg = <0xfffff800 0x200>; 401 reg = <0xfffff800 0x200>;
357 interrupts = <4 4 1>; 402 interrupts = <4 IRQ_TYPE_LEVEL_HIGH 1>;
358 #gpio-cells = <2>; 403 #gpio-cells = <2>;
359 gpio-controller; 404 gpio-controller;
360 interrupt-controller; 405 interrupt-controller;
@@ -364,7 +409,7 @@
364 pioE: gpio@fffffa00 { 409 pioE: gpio@fffffa00 {
365 compatible = "atmel,at91rm9200-gpio"; 410 compatible = "atmel,at91rm9200-gpio";
366 reg = <0xfffffa00 0x200>; 411 reg = <0xfffffa00 0x200>;
367 interrupts = <4 4 1>; 412 interrupts = <4 IRQ_TYPE_LEVEL_HIGH 1>;
368 #gpio-cells = <2>; 413 #gpio-cells = <2>;
369 gpio-controller; 414 gpio-controller;
370 interrupt-controller; 415 interrupt-controller;
@@ -375,7 +420,7 @@
375 dbgu: serial@ffffee00 { 420 dbgu: serial@ffffee00 {
376 compatible = "atmel,at91sam9260-usart"; 421 compatible = "atmel,at91sam9260-usart";
377 reg = <0xffffee00 0x200>; 422 reg = <0xffffee00 0x200>;
378 interrupts = <1 4 7>; 423 interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>;
379 pinctrl-names = "default"; 424 pinctrl-names = "default";
380 pinctrl-0 = <&pinctrl_dbgu>; 425 pinctrl-0 = <&pinctrl_dbgu>;
381 status = "disabled"; 426 status = "disabled";
@@ -384,7 +429,7 @@
384 usart0: serial@fff8c000 { 429 usart0: serial@fff8c000 {
385 compatible = "atmel,at91sam9260-usart"; 430 compatible = "atmel,at91sam9260-usart";
386 reg = <0xfff8c000 0x200>; 431 reg = <0xfff8c000 0x200>;
387 interrupts = <7 4 5>; 432 interrupts = <7 IRQ_TYPE_LEVEL_HIGH 5>;
388 atmel,use-dma-rx; 433 atmel,use-dma-rx;
389 atmel,use-dma-tx; 434 atmel,use-dma-tx;
390 pinctrl-names = "default"; 435 pinctrl-names = "default";
@@ -395,7 +440,7 @@
395 usart1: serial@fff90000 { 440 usart1: serial@fff90000 {
396 compatible = "atmel,at91sam9260-usart"; 441 compatible = "atmel,at91sam9260-usart";
397 reg = <0xfff90000 0x200>; 442 reg = <0xfff90000 0x200>;
398 interrupts = <8 4 5>; 443 interrupts = <8 IRQ_TYPE_LEVEL_HIGH 5>;
399 atmel,use-dma-rx; 444 atmel,use-dma-rx;
400 atmel,use-dma-tx; 445 atmel,use-dma-tx;
401 pinctrl-names = "default"; 446 pinctrl-names = "default";
@@ -406,7 +451,7 @@
406 usart2: serial@fff94000 { 451 usart2: serial@fff94000 {
407 compatible = "atmel,at91sam9260-usart"; 452 compatible = "atmel,at91sam9260-usart";
408 reg = <0xfff94000 0x200>; 453 reg = <0xfff94000 0x200>;
409 interrupts = <9 4 5>; 454 interrupts = <9 IRQ_TYPE_LEVEL_HIGH 5>;
410 atmel,use-dma-rx; 455 atmel,use-dma-rx;
411 atmel,use-dma-tx; 456 atmel,use-dma-tx;
412 pinctrl-names = "default"; 457 pinctrl-names = "default";
@@ -417,7 +462,7 @@
417 ssc0: ssc@fff98000 { 462 ssc0: ssc@fff98000 {
418 compatible = "atmel,at91rm9200-ssc"; 463 compatible = "atmel,at91rm9200-ssc";
419 reg = <0xfff98000 0x4000>; 464 reg = <0xfff98000 0x4000>;
420 interrupts = <16 4 5>; 465 interrupts = <16 IRQ_TYPE_LEVEL_HIGH 5>;
421 pinctrl-names = "default"; 466 pinctrl-names = "default";
422 pinctrl-0 = <&pinctrl_ssc0_tx &pinctrl_ssc0_rx>; 467 pinctrl-0 = <&pinctrl_ssc0_tx &pinctrl_ssc0_rx>;
423 status = "disabled"; 468 status = "disabled";
@@ -426,7 +471,7 @@
426 ssc1: ssc@fff9c000 { 471 ssc1: ssc@fff9c000 {
427 compatible = "atmel,at91rm9200-ssc"; 472 compatible = "atmel,at91rm9200-ssc";
428 reg = <0xfff9c000 0x4000>; 473 reg = <0xfff9c000 0x4000>;
429 interrupts = <17 4 5>; 474 interrupts = <17 IRQ_TYPE_LEVEL_HIGH 5>;
430 pinctrl-names = "default"; 475 pinctrl-names = "default";
431 pinctrl-0 = <&pinctrl_ssc1_tx &pinctrl_ssc1_rx>; 476 pinctrl-0 = <&pinctrl_ssc1_tx &pinctrl_ssc1_rx>;
432 status = "disabled"; 477 status = "disabled";
@@ -435,7 +480,7 @@
435 macb0: ethernet@fffbc000 { 480 macb0: ethernet@fffbc000 {
436 compatible = "cdns,at32ap7000-macb", "cdns,macb"; 481 compatible = "cdns,at32ap7000-macb", "cdns,macb";
437 reg = <0xfffbc000 0x100>; 482 reg = <0xfffbc000 0x100>;
438 interrupts = <21 4 3>; 483 interrupts = <21 IRQ_TYPE_LEVEL_HIGH 3>;
439 pinctrl-names = "default"; 484 pinctrl-names = "default";
440 pinctrl-0 = <&pinctrl_macb_rmii>; 485 pinctrl-0 = <&pinctrl_macb_rmii>;
441 status = "disabled"; 486 status = "disabled";
@@ -444,14 +489,14 @@
444 usb1: gadget@fff78000 { 489 usb1: gadget@fff78000 {
445 compatible = "atmel,at91rm9200-udc"; 490 compatible = "atmel,at91rm9200-udc";
446 reg = <0xfff78000 0x4000>; 491 reg = <0xfff78000 0x4000>;
447 interrupts = <24 4 2>; 492 interrupts = <24 IRQ_TYPE_LEVEL_HIGH 2>;
448 status = "disabled"; 493 status = "disabled";
449 }; 494 };
450 495
451 i2c0: i2c@fff88000 { 496 i2c0: i2c@fff88000 {
452 compatible = "atmel,at91sam9263-i2c"; 497 compatible = "atmel,at91sam9263-i2c";
453 reg = <0xfff88000 0x100>; 498 reg = <0xfff88000 0x100>;
454 interrupts = <13 4 6>; 499 interrupts = <13 IRQ_TYPE_LEVEL_HIGH 6>;
455 #address-cells = <1>; 500 #address-cells = <1>;
456 #size-cells = <0>; 501 #size-cells = <0>;
457 status = "disabled"; 502 status = "disabled";
@@ -460,7 +505,7 @@
460 mmc0: mmc@fff80000 { 505 mmc0: mmc@fff80000 {
461 compatible = "atmel,hsmci"; 506 compatible = "atmel,hsmci";
462 reg = <0xfff80000 0x600>; 507 reg = <0xfff80000 0x600>;
463 interrupts = <10 4 0>; 508 interrupts = <10 IRQ_TYPE_LEVEL_HIGH 0>;
464 #address-cells = <1>; 509 #address-cells = <1>;
465 #size-cells = <0>; 510 #size-cells = <0>;
466 status = "disabled"; 511 status = "disabled";
@@ -469,7 +514,7 @@
469 mmc1: mmc@fff84000 { 514 mmc1: mmc@fff84000 {
470 compatible = "atmel,hsmci"; 515 compatible = "atmel,hsmci";
471 reg = <0xfff84000 0x600>; 516 reg = <0xfff84000 0x600>;
472 interrupts = <11 4 0>; 517 interrupts = <11 IRQ_TYPE_LEVEL_HIGH 0>;
473 #address-cells = <1>; 518 #address-cells = <1>;
474 #size-cells = <0>; 519 #size-cells = <0>;
475 status = "disabled"; 520 status = "disabled";
@@ -486,7 +531,7 @@
486 #size-cells = <0>; 531 #size-cells = <0>;
487 compatible = "atmel,at91rm9200-spi"; 532 compatible = "atmel,at91rm9200-spi";
488 reg = <0xfffa4000 0x200>; 533 reg = <0xfffa4000 0x200>;
489 interrupts = <14 4 3>; 534 interrupts = <14 IRQ_TYPE_LEVEL_HIGH 3>;
490 pinctrl-names = "default"; 535 pinctrl-names = "default";
491 pinctrl-0 = <&pinctrl_spi0>; 536 pinctrl-0 = <&pinctrl_spi0>;
492 status = "disabled"; 537 status = "disabled";
@@ -497,7 +542,7 @@
497 #size-cells = <0>; 542 #size-cells = <0>;
498 compatible = "atmel,at91rm9200-spi"; 543 compatible = "atmel,at91rm9200-spi";
499 reg = <0xfffa8000 0x200>; 544 reg = <0xfffa8000 0x200>;
500 interrupts = <15 4 3>; 545 interrupts = <15 IRQ_TYPE_LEVEL_HIGH 3>;
501 pinctrl-names = "default"; 546 pinctrl-names = "default";
502 pinctrl-0 = <&pinctrl_spi1>; 547 pinctrl-0 = <&pinctrl_spi1>;
503 status = "disabled"; 548 status = "disabled";
@@ -515,8 +560,8 @@
515 atmel,nand-cmd-offset = <22>; 560 atmel,nand-cmd-offset = <22>;
516 pinctrl-names = "default"; 561 pinctrl-names = "default";
517 pinctrl-0 = <&pinctrl_nand>; 562 pinctrl-0 = <&pinctrl_nand>;
518 gpios = <&pioA 22 0 563 gpios = <&pioA 22 GPIO_ACTIVE_HIGH
519 &pioD 15 0 564 &pioD 15 GPIO_ACTIVE_HIGH
520 0 565 0
521 >; 566 >;
522 status = "disabled"; 567 status = "disabled";
@@ -525,15 +570,15 @@
525 usb0: ohci@00a00000 { 570 usb0: ohci@00a00000 {
526 compatible = "atmel,at91rm9200-ohci", "usb-ohci"; 571 compatible = "atmel,at91rm9200-ohci", "usb-ohci";
527 reg = <0x00a00000 0x100000>; 572 reg = <0x00a00000 0x100000>;
528 interrupts = <29 4 2>; 573 interrupts = <29 IRQ_TYPE_LEVEL_HIGH 2>;
529 status = "disabled"; 574 status = "disabled";
530 }; 575 };
531 }; 576 };
532 577
533 i2c@0 { 578 i2c@0 {
534 compatible = "i2c-gpio"; 579 compatible = "i2c-gpio";
535 gpios = <&pioB 4 0 /* sda */ 580 gpios = <&pioB 4 GPIO_ACTIVE_HIGH /* sda */
536 &pioB 5 0 /* scl */ 581 &pioB 5 GPIO_ACTIVE_HIGH /* scl */
537 >; 582 >;
538 i2c-gpio,sda-open-drain; 583 i2c-gpio,sda-open-drain;
539 i2c-gpio,scl-open-drain; 584 i2c-gpio,scl-open-drain;
diff --git a/arch/arm/boot/dts/at91sam9263ek.dts b/arch/arm/boot/dts/at91sam9263ek.dts
index 3b82d91e7fcc..70f835b55c0b 100644
--- a/arch/arm/boot/dts/at91sam9263ek.dts
+++ b/arch/arm/boot/dts/at91sam9263ek.dts
@@ -6,7 +6,7 @@
6 * Licensed under GPLv2 only 6 * Licensed under GPLv2 only
7 */ 7 */
8/dts-v1/; 8/dts-v1/;
9/include/ "at91sam9263.dtsi" 9#include "at91sam9263.dtsi"
10 10
11/ { 11/ {
12 model = "Atmel at91sam9263ek"; 12 model = "Atmel at91sam9263ek";
@@ -51,7 +51,7 @@
51 }; 51 };
52 52
53 usb1: gadget@fff78000 { 53 usb1: gadget@fff78000 {
54 atmel,vbus-gpio = <&pioA 25 0>; 54 atmel,vbus-gpio = <&pioA 25 GPIO_ACTIVE_HIGH>;
55 status = "okay"; 55 status = "okay";
56 }; 56 };
57 57
@@ -65,8 +65,8 @@
65 slot@0 { 65 slot@0 {
66 reg = <0>; 66 reg = <0>;
67 bus-width = <4>; 67 bus-width = <4>;
68 cd-gpios = <&pioE 18 0>; 68 cd-gpios = <&pioE 18 GPIO_ACTIVE_HIGH>;
69 wp-gpios = <&pioE 19 0>; 69 wp-gpios = <&pioE 19 GPIO_ACTIVE_HIGH>;
70 }; 70 };
71 }; 71 };
72 72
@@ -74,8 +74,8 @@
74 mmc0 { 74 mmc0 {
75 pinctrl_board_mmc0: mmc0-board { 75 pinctrl_board_mmc0: mmc0-board {
76 atmel,pins = 76 atmel,pins =
77 <5 18 0x0 0x5 /* PE18 gpio CD pin pull up and deglitch */ 77 <AT91_PIOE 18 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP_DEGLITCH /* PE18 gpio CD pin pull up and deglitch */
78 5 19 0x0 0x1>; /* PE19 gpio WP pin pull up */ 78 AT91_PIOE 19 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP>; /* PE19 gpio WP pin pull up */
79 }; 79 };
80 }; 80 };
81 }; 81 };
@@ -89,6 +89,10 @@
89 reg = <0>; 89 reg = <0>;
90 }; 90 };
91 }; 91 };
92
93 watchdog@fffffd40 {
94 status = "okay";
95 };
92 }; 96 };
93 97
94 nand0: nand@40000000 { 98 nand0: nand@40000000 {
@@ -141,8 +145,8 @@
141 usb0: ohci@00a00000 { 145 usb0: ohci@00a00000 {
142 num-ports = <2>; 146 num-ports = <2>;
143 status = "okay"; 147 status = "okay";
144 atmel,vbus-gpio = <&pioA 24 0 148 atmel,vbus-gpio = <&pioA 24 GPIO_ACTIVE_HIGH
145 &pioA 21 0 149 &pioA 21 GPIO_ACTIVE_HIGH
146 >; 150 >;
147 }; 151 };
148 }; 152 };
@@ -152,13 +156,13 @@
152 156
153 d3 { 157 d3 {
154 label = "d3"; 158 label = "d3";
155 gpios = <&pioB 7 0>; 159 gpios = <&pioB 7 GPIO_ACTIVE_HIGH>;
156 linux,default-trigger = "heartbeat"; 160 linux,default-trigger = "heartbeat";
157 }; 161 };
158 162
159 d2 { 163 d2 {
160 label = "d2"; 164 label = "d2";
161 gpios = <&pioC 29 1>; 165 gpios = <&pioC 29 GPIO_ACTIVE_LOW>;
162 linux,default-trigger = "nand-disk"; 166 linux,default-trigger = "nand-disk";
163 }; 167 };
164 }; 168 };
@@ -168,14 +172,14 @@
168 172
169 left_click { 173 left_click {
170 label = "left_click"; 174 label = "left_click";
171 gpios = <&pioC 5 1>; 175 gpios = <&pioC 5 GPIO_ACTIVE_LOW>;
172 linux,code = <272>; 176 linux,code = <272>;
173 gpio-key,wakeup; 177 gpio-key,wakeup;
174 }; 178 };
175 179
176 right_click { 180 right_click {
177 label = "right_click"; 181 label = "right_click";
178 gpios = <&pioC 4 1>; 182 gpios = <&pioC 4 GPIO_ACTIVE_LOW>;
179 linux,code = <273>; 183 linux,code = <273>;
180 gpio-key,wakeup; 184 gpio-key,wakeup;
181 }; 185 };
diff --git a/arch/arm/boot/dts/at91sam9g15.dtsi b/arch/arm/boot/dts/at91sam9g15.dtsi
index 28467fd6bf96..cfd7044616d7 100644
--- a/arch/arm/boot/dts/at91sam9g15.dtsi
+++ b/arch/arm/boot/dts/at91sam9g15.dtsi
@@ -6,7 +6,7 @@
6 * Licensed under GPLv2. 6 * Licensed under GPLv2.
7 */ 7 */
8 8
9/include/ "at91sam9x5.dtsi" 9#include "at91sam9x5.dtsi"
10 10
11/ { 11/ {
12 model = "Atmel AT91SAM9G15 SoC"; 12 model = "Atmel AT91SAM9G15 SoC";
diff --git a/arch/arm/boot/dts/at91sam9g15ek.dts b/arch/arm/boot/dts/at91sam9g15ek.dts
index 5427b2dba87e..26b0444b0f96 100644
--- a/arch/arm/boot/dts/at91sam9g15ek.dts
+++ b/arch/arm/boot/dts/at91sam9g15ek.dts
@@ -7,8 +7,8 @@
7 * Licensed under GPLv2 or later. 7 * Licensed under GPLv2 or later.
8 */ 8 */
9/dts-v1/; 9/dts-v1/;
10/include/ "at91sam9g15.dtsi" 10#include "at91sam9g15.dtsi"
11/include/ "at91sam9x5ek.dtsi" 11#include "at91sam9x5ek.dtsi"
12 12
13/ { 13/ {
14 model = "Atmel AT91SAM9G15-EK"; 14 model = "Atmel AT91SAM9G15-EK";
diff --git a/arch/arm/boot/dts/at91sam9g20.dtsi b/arch/arm/boot/dts/at91sam9g20.dtsi
index 75ce6e760016..b8e79466014f 100644
--- a/arch/arm/boot/dts/at91sam9g20.dtsi
+++ b/arch/arm/boot/dts/at91sam9g20.dtsi
@@ -6,7 +6,7 @@
6 * Licensed under GPLv2. 6 * Licensed under GPLv2.
7 */ 7 */
8 8
9/include/ "at91sam9260.dtsi" 9#include "at91sam9260.dtsi"
10 10
11/ { 11/ {
12 model = "Atmel AT91SAM9G20 family SoC"; 12 model = "Atmel AT91SAM9G20 family SoC";
diff --git a/arch/arm/boot/dts/at91sam9g20ek.dts b/arch/arm/boot/dts/at91sam9g20ek.dts
index e5324bf9d529..bbfd753112c9 100644
--- a/arch/arm/boot/dts/at91sam9g20ek.dts
+++ b/arch/arm/boot/dts/at91sam9g20ek.dts
@@ -6,7 +6,7 @@
6 * Licensed under GPLv2. 6 * Licensed under GPLv2.
7 */ 7 */
8/dts-v1/; 8/dts-v1/;
9/include/ "at91sam9g20ek_common.dtsi" 9#include "at91sam9g20ek_common.dtsi"
10 10
11/ { 11/ {
12 model = "Atmel at91sam9g20ek"; 12 model = "Atmel at91sam9g20ek";
@@ -17,13 +17,13 @@
17 17
18 ds1 { 18 ds1 {
19 label = "ds1"; 19 label = "ds1";
20 gpios = <&pioA 9 0>; 20 gpios = <&pioA 9 GPIO_ACTIVE_HIGH>;
21 linux,default-trigger = "heartbeat"; 21 linux,default-trigger = "heartbeat";
22 }; 22 };
23 23
24 ds5 { 24 ds5 {
25 label = "ds5"; 25 label = "ds5";
26 gpios = <&pioA 6 1>; 26 gpios = <&pioA 6 GPIO_ACTIVE_LOW>;
27 }; 27 };
28 }; 28 };
29}; 29};
diff --git a/arch/arm/boot/dts/at91sam9g20ek_2mmc.dts b/arch/arm/boot/dts/at91sam9g20ek_2mmc.dts
index 66467b113126..bdb799bad179 100644
--- a/arch/arm/boot/dts/at91sam9g20ek_2mmc.dts
+++ b/arch/arm/boot/dts/at91sam9g20ek_2mmc.dts
@@ -6,7 +6,7 @@
6 * Licensed under GPLv2. 6 * Licensed under GPLv2.
7 */ 7 */
8/dts-v1/; 8/dts-v1/;
9/include/ "at91sam9g20ek_common.dtsi" 9#include "at91sam9g20ek_common.dtsi"
10 10
11/ { 11/ {
12 model = "Atmel at91sam9g20ek 2 mmc"; 12 model = "Atmel at91sam9g20ek 2 mmc";
@@ -23,7 +23,7 @@
23 slot@0 { 23 slot@0 {
24 reg = <0>; 24 reg = <0>;
25 bus-width = <4>; 25 bus-width = <4>;
26 cd-gpios = <&pioC 2 0>; 26 cd-gpios = <&pioC 2 GPIO_ACTIVE_HIGH>;
27 }; 27 };
28 }; 28 };
29 29
@@ -31,7 +31,7 @@
31 mmc0_slot0 { 31 mmc0_slot0 {
32 pinctrl_board_mmc0_slot0: mmc0_slot0-board { 32 pinctrl_board_mmc0_slot0: mmc0_slot0-board {
33 atmel,pins = 33 atmel,pins =
34 <2 2 0x0 0x5>; /* PC2 gpio CD pin pull up and deglitch */ 34 <AT91_PIOC 2 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP_DEGLITCH>; /* PC2 gpio CD pin pull up and deglitch */
35 }; 35 };
36 }; 36 };
37 }; 37 };
@@ -43,13 +43,13 @@
43 43
44 ds1 { 44 ds1 {
45 label = "ds1"; 45 label = "ds1";
46 gpios = <&pioB 9 0>; 46 gpios = <&pioB 9 GPIO_ACTIVE_HIGH>;
47 linux,default-trigger = "heartbeat"; 47 linux,default-trigger = "heartbeat";
48 }; 48 };
49 49
50 ds5 { 50 ds5 {
51 label = "ds5"; 51 label = "ds5";
52 gpios = <&pioB 8 1>; 52 gpios = <&pioB 8 GPIO_ACTIVE_LOW>;
53 }; 53 };
54 }; 54 };
55}; 55};
diff --git a/arch/arm/boot/dts/at91sam9g20ek_common.dtsi b/arch/arm/boot/dts/at91sam9g20ek_common.dtsi
index 6a92c5baef8c..137354689ad0 100644
--- a/arch/arm/boot/dts/at91sam9g20ek_common.dtsi
+++ b/arch/arm/boot/dts/at91sam9g20ek_common.dtsi
@@ -5,7 +5,7 @@
5 * 5 *
6 * Licensed under GPLv2. 6 * Licensed under GPLv2.
7 */ 7 */
8/include/ "at91sam9g20.dtsi" 8#include "at91sam9g20.dtsi"
9 9
10/ { 10/ {
11 11
@@ -34,10 +34,17 @@
34 board { 34 board {
35 pinctrl_pck0_as_mck: pck0_as_mck { 35 pinctrl_pck0_as_mck: pck0_as_mck {
36 atmel,pins = 36 atmel,pins =
37 <2 1 0x2 0x0>; /* PC1 periph B */ 37 <AT91_PIOC 1 AT91_PERIPH_B AT91_PINCTRL_NONE>; /* PC1 periph B */
38 }; 38 };
39 39
40 }; 40 };
41
42 mmc0_slot1 {
43 pinctrl_board_mmc0_slot1: mmc0_slot1-board {
44 atmel,pins =
45 <AT91_PIOC 9 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP_DEGLITCH>; /* PC9 gpio CD pin pull up and deglitch */
46 };
47 };
41 }; 48 };
42 49
43 dbgu: serial@fffff200 { 50 dbgu: serial@fffff200 {
@@ -65,7 +72,7 @@
65 }; 72 };
66 73
67 usb1: gadget@fffa4000 { 74 usb1: gadget@fffa4000 {
68 atmel,vbus-gpio = <&pioC 5 0>; 75 atmel,vbus-gpio = <&pioC 5 GPIO_ACTIVE_HIGH>;
69 status = "okay"; 76 status = "okay";
70 }; 77 };
71 78
@@ -79,16 +86,7 @@
79 slot@1 { 86 slot@1 {
80 reg = <1>; 87 reg = <1>;
81 bus-width = <4>; 88 bus-width = <4>;
82 cd-gpios = <&pioC 9 0>; 89 cd-gpios = <&pioC 9 GPIO_ACTIVE_HIGH>;
83 };
84 };
85
86 pinctrl@fffff400 {
87 mmc0_slot1 {
88 pinctrl_board_mmc0_slot1: mmc0_slot1-board {
89 atmel,pins =
90 <2 9 0x0 0x5>; /* PC9 gpio CD pin pull up and deglitch */
91 };
92 }; 90 };
93 }; 91 };
94 92
@@ -106,6 +104,10 @@
106 reg = <1>; 104 reg = <1>;
107 }; 105 };
108 }; 106 };
107
108 watchdog@fffffd40 {
109 status = "okay";
110 };
109 }; 111 };
110 112
111 nand0: nand@40000000 { 113 nand0: nand@40000000 {
@@ -180,14 +182,14 @@
180 182
181 btn3 { 183 btn3 {
182 label = "Button 3"; 184 label = "Button 3";
183 gpios = <&pioA 30 1>; 185 gpios = <&pioA 30 GPIO_ACTIVE_LOW>;
184 linux,code = <0x103>; 186 linux,code = <0x103>;
185 gpio-key,wakeup; 187 gpio-key,wakeup;
186 }; 188 };
187 189
188 btn4 { 190 btn4 {
189 label = "Button 4"; 191 label = "Button 4";
190 gpios = <&pioA 31 1>; 192 gpios = <&pioA 31 GPIO_ACTIVE_LOW>;
191 linux,code = <0x104>; 193 linux,code = <0x104>;
192 gpio-key,wakeup; 194 gpio-key,wakeup;
193 }; 195 };
diff --git a/arch/arm/boot/dts/at91sam9g25.dtsi b/arch/arm/boot/dts/at91sam9g25.dtsi
index 5fd32df03f25..b4ec6fe53fc7 100644
--- a/arch/arm/boot/dts/at91sam9g25.dtsi
+++ b/arch/arm/boot/dts/at91sam9g25.dtsi
@@ -6,7 +6,7 @@
6 * Licensed under GPLv2. 6 * Licensed under GPLv2.
7 */ 7 */
8 8
9/include/ "at91sam9x5.dtsi" 9#include "at91sam9x5.dtsi"
10 10
11/ { 11/ {
12 model = "Atmel AT91SAM9G25 SoC"; 12 model = "Atmel AT91SAM9G25 SoC";
diff --git a/arch/arm/boot/dts/at91sam9g25ek.dts b/arch/arm/boot/dts/at91sam9g25ek.dts
index a1c511fecdc1..1e4c49c584d3 100644
--- a/arch/arm/boot/dts/at91sam9g25ek.dts
+++ b/arch/arm/boot/dts/at91sam9g25ek.dts
@@ -7,8 +7,8 @@
7 * Licensed under GPLv2 or later. 7 * Licensed under GPLv2 or later.
8 */ 8 */
9/dts-v1/; 9/dts-v1/;
10/include/ "at91sam9g25.dtsi" 10#include "at91sam9g25.dtsi"
11/include/ "at91sam9x5ek.dtsi" 11#include "at91sam9x5ek.dtsi"
12 12
13/ { 13/ {
14 model = "Atmel AT91SAM9G25-EK"; 14 model = "Atmel AT91SAM9G25-EK";
diff --git a/arch/arm/boot/dts/at91sam9g35.dtsi b/arch/arm/boot/dts/at91sam9g35.dtsi
index d6fa8af50724..bebf9f55614b 100644
--- a/arch/arm/boot/dts/at91sam9g35.dtsi
+++ b/arch/arm/boot/dts/at91sam9g35.dtsi
@@ -6,7 +6,7 @@
6 * Licensed under GPLv2. 6 * Licensed under GPLv2.
7 */ 7 */
8 8
9/include/ "at91sam9x5.dtsi" 9#include "at91sam9x5.dtsi"
10 10
11/ { 11/ {
12 model = "Atmel AT91SAM9G35 SoC"; 12 model = "Atmel AT91SAM9G35 SoC";
diff --git a/arch/arm/boot/dts/at91sam9g35ek.dts b/arch/arm/boot/dts/at91sam9g35ek.dts
index 6f58ab8d21f5..641a9bf89ed1 100644
--- a/arch/arm/boot/dts/at91sam9g35ek.dts
+++ b/arch/arm/boot/dts/at91sam9g35ek.dts
@@ -7,8 +7,8 @@
7 * Licensed under GPLv2 or later. 7 * Licensed under GPLv2 or later.
8 */ 8 */
9/dts-v1/; 9/dts-v1/;
10/include/ "at91sam9g35.dtsi" 10#include "at91sam9g35.dtsi"
11/include/ "at91sam9x5ek.dtsi" 11#include "at91sam9x5ek.dtsi"
12 12
13/ { 13/ {
14 model = "Atmel AT91SAM9G35-EK"; 14 model = "Atmel AT91SAM9G35-EK";
diff --git a/arch/arm/boot/dts/at91sam9g45.dtsi b/arch/arm/boot/dts/at91sam9g45.dtsi
index bf18a735c37d..c3e514837074 100644
--- a/arch/arm/boot/dts/at91sam9g45.dtsi
+++ b/arch/arm/boot/dts/at91sam9g45.dtsi
@@ -9,7 +9,11 @@
9 * Licensed under GPLv2 or later. 9 * Licensed under GPLv2 or later.
10 */ 10 */
11 11
12/include/ "skeleton.dtsi" 12#include "skeleton.dtsi"
13#include <dt-bindings/dma/at91.h>
14#include <dt-bindings/pinctrl/at91.h>
15#include <dt-bindings/interrupt-controller/irq.h>
16#include <dt-bindings/gpio/gpio.h>
13 17
14/ { 18/ {
15 model = "Atmel AT91SAM9G45 family SoC"; 19 model = "Atmel AT91SAM9G45 family SoC";
@@ -35,8 +39,12 @@
35 ssc1 = &ssc1; 39 ssc1 = &ssc1;
36 }; 40 };
37 cpus { 41 cpus {
38 cpu@0 { 42 #address-cells = <0>;
39 compatible = "arm,arm926ejs"; 43 #size-cells = <0>;
44
45 cpu {
46 compatible = "arm,arm926ej-s";
47 device_type = "cpu";
40 }; 48 };
41 }; 49 };
42 50
@@ -83,7 +91,7 @@
83 pit: timer@fffffd30 { 91 pit: timer@fffffd30 {
84 compatible = "atmel,at91sam9260-pit"; 92 compatible = "atmel,at91sam9260-pit";
85 reg = <0xfffffd30 0xf>; 93 reg = <0xfffffd30 0xf>;
86 interrupts = <1 4 7>; 94 interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>;
87 }; 95 };
88 96
89 97
@@ -95,19 +103,19 @@
95 tcb0: timer@fff7c000 { 103 tcb0: timer@fff7c000 {
96 compatible = "atmel,at91rm9200-tcb"; 104 compatible = "atmel,at91rm9200-tcb";
97 reg = <0xfff7c000 0x100>; 105 reg = <0xfff7c000 0x100>;
98 interrupts = <18 4 0>; 106 interrupts = <18 IRQ_TYPE_LEVEL_HIGH 0>;
99 }; 107 };
100 108
101 tcb1: timer@fffd4000 { 109 tcb1: timer@fffd4000 {
102 compatible = "atmel,at91rm9200-tcb"; 110 compatible = "atmel,at91rm9200-tcb";
103 reg = <0xfffd4000 0x100>; 111 reg = <0xfffd4000 0x100>;
104 interrupts = <18 4 0>; 112 interrupts = <18 IRQ_TYPE_LEVEL_HIGH 0>;
105 }; 113 };
106 114
107 dma: dma-controller@ffffec00 { 115 dma: dma-controller@ffffec00 {
108 compatible = "atmel,at91sam9g45-dma"; 116 compatible = "atmel,at91sam9g45-dma";
109 reg = <0xffffec00 0x200>; 117 reg = <0xffffec00 0x200>;
110 interrupts = <21 4 0>; 118 interrupts = <21 IRQ_TYPE_LEVEL_HIGH 0>;
111 #dma-cells = <2>; 119 #dma-cells = <2>;
112 }; 120 };
113 121
@@ -130,221 +138,297 @@
130 dbgu { 138 dbgu {
131 pinctrl_dbgu: dbgu-0 { 139 pinctrl_dbgu: dbgu-0 {
132 atmel,pins = 140 atmel,pins =
133 <1 12 0x1 0x0 /* PB12 periph A */ 141 <AT91_PIOB 12 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB12 periph A */
134 1 13 0x1 0x0>; /* PB13 periph A */ 142 AT91_PIOB 13 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PB13 periph A */
135 }; 143 };
136 }; 144 };
137 145
138 usart0 { 146 usart0 {
139 pinctrl_usart0: usart0-0 { 147 pinctrl_usart0: usart0-0 {
140 atmel,pins = 148 atmel,pins =
141 <1 19 0x1 0x1 /* PB19 periph A with pullup */ 149 <AT91_PIOB 19 AT91_PERIPH_A AT91_PINCTRL_PULL_UP /* PB19 periph A with pullup */
142 1 18 0x1 0x0>; /* PB18 periph A */ 150 AT91_PIOB 18 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PB18 periph A */
143 }; 151 };
144 152
145 pinctrl_usart0_rts: usart0_rts-0 { 153 pinctrl_usart0_rts: usart0_rts-0 {
146 atmel,pins = 154 atmel,pins =
147 <1 17 0x2 0x0>; /* PB17 periph B */ 155 <AT91_PIOB 17 AT91_PERIPH_B AT91_PINCTRL_NONE>; /* PB17 periph B */
148 }; 156 };
149 157
150 pinctrl_usart0_cts: usart0_cts-0 { 158 pinctrl_usart0_cts: usart0_cts-0 {
151 atmel,pins = 159 atmel,pins =
152 <1 15 0x2 0x0>; /* PB15 periph B */ 160 <AT91_PIOB 15 AT91_PERIPH_B AT91_PINCTRL_NONE>; /* PB15 periph B */
153 }; 161 };
154 }; 162 };
155 163
156 uart1 { 164 uart1 {
157 pinctrl_usart1: usart1-0 { 165 pinctrl_usart1: usart1-0 {
158 atmel,pins = 166 atmel,pins =
159 <1 4 0x1 0x1 /* PB4 periph A with pullup */ 167 <AT91_PIOB 4 AT91_PERIPH_A AT91_PINCTRL_PULL_UP /* PB4 periph A with pullup */
160 1 5 0x1 0x0>; /* PB5 periph A */ 168 AT91_PIOB 5 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PB5 periph A */
161 }; 169 };
162 170
163 pinctrl_usart1_rts: usart1_rts-0 { 171 pinctrl_usart1_rts: usart1_rts-0 {
164 atmel,pins = 172 atmel,pins =
165 <3 16 0x1 0x0>; /* PD16 periph A */ 173 <AT91_PIOD 16 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PD16 periph A */
166 }; 174 };
167 175
168 pinctrl_usart1_cts: usart1_cts-0 { 176 pinctrl_usart1_cts: usart1_cts-0 {
169 atmel,pins = 177 atmel,pins =
170 <3 17 0x1 0x0>; /* PD17 periph A */ 178 <AT91_PIOD 17 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PD17 periph A */
171 }; 179 };
172 }; 180 };
173 181
174 usart2 { 182 usart2 {
175 pinctrl_usart2: usart2-0 { 183 pinctrl_usart2: usart2-0 {
176 atmel,pins = 184 atmel,pins =
177 <1 6 0x1 0x1 /* PB6 periph A with pullup */ 185 <AT91_PIOB 6 AT91_PERIPH_A AT91_PINCTRL_PULL_UP /* PB6 periph A with pullup */
178 1 7 0x1 0x0>; /* PB7 periph A */ 186 AT91_PIOB 7 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PB7 periph A */
179 }; 187 };
180 188
181 pinctrl_usart2_rts: usart2_rts-0 { 189 pinctrl_usart2_rts: usart2_rts-0 {
182 atmel,pins = 190 atmel,pins =
183 <2 9 0x2 0x0>; /* PC9 periph B */ 191 <AT91_PIOC 9 AT91_PERIPH_B AT91_PINCTRL_NONE>; /* PC9 periph B */
184 }; 192 };
185 193
186 pinctrl_usart2_cts: usart2_cts-0 { 194 pinctrl_usart2_cts: usart2_cts-0 {
187 atmel,pins = 195 atmel,pins =
188 <2 11 0x2 0x0>; /* PC11 periph B */ 196 <AT91_PIOC 11 AT91_PERIPH_B AT91_PINCTRL_NONE>; /* PC11 periph B */
189 }; 197 };
190 }; 198 };
191 199
192 usart3 { 200 usart3 {
193 pinctrl_usart3: usart3-0 { 201 pinctrl_usart3: usart3-0 {
194 atmel,pins = 202 atmel,pins =
195 <1 8 0x1 0x1 /* PB9 periph A with pullup */ 203 <AT91_PIOB 8 AT91_PERIPH_A AT91_PINCTRL_PULL_UP /* PB9 periph A with pullup */
196 1 9 0x1 0x0>; /* PB8 periph A */ 204 AT91_PIOB 9 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PB8 periph A */
197 }; 205 };
198 206
199 pinctrl_usart3_rts: usart3_rts-0 { 207 pinctrl_usart3_rts: usart3_rts-0 {
200 atmel,pins = 208 atmel,pins =
201 <0 23 0x2 0x0>; /* PA23 periph B */ 209 <AT91_PIOA 23 AT91_PERIPH_B AT91_PINCTRL_NONE>; /* PA23 periph B */
202 }; 210 };
203 211
204 pinctrl_usart3_cts: usart3_cts-0 { 212 pinctrl_usart3_cts: usart3_cts-0 {
205 atmel,pins = 213 atmel,pins =
206 <0 24 0x2 0x0>; /* PA24 periph B */ 214 <AT91_PIOA 24 AT91_PERIPH_B AT91_PINCTRL_NONE>; /* PA24 periph B */
207 }; 215 };
208 }; 216 };
209 217
210 nand { 218 nand {
211 pinctrl_nand: nand-0 { 219 pinctrl_nand: nand-0 {
212 atmel,pins = 220 atmel,pins =
213 <2 8 0x0 0x1 /* PC8 gpio RDY pin pull_up*/ 221 <AT91_PIOC 8 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP /* PC8 gpio RDY pin pull_up*/
214 2 14 0x0 0x1>; /* PC14 gpio enable pin pull_up */ 222 AT91_PIOC 14 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP>; /* PC14 gpio enable pin pull_up */
215 }; 223 };
216 }; 224 };
217 225
218 macb { 226 macb {
219 pinctrl_macb_rmii: macb_rmii-0 { 227 pinctrl_macb_rmii: macb_rmii-0 {
220 atmel,pins = 228 atmel,pins =
221 <0 10 0x1 0x0 /* PA10 periph A */ 229 <AT91_PIOA 10 AT91_PERIPH_A AT91_PINCTRL_NONE /* PA10 periph A */
222 0 11 0x1 0x0 /* PA11 periph A */ 230 AT91_PIOA 11 AT91_PERIPH_A AT91_PINCTRL_NONE /* PA11 periph A */
223 0 12 0x1 0x0 /* PA12 periph A */ 231 AT91_PIOA 12 AT91_PERIPH_A AT91_PINCTRL_NONE /* PA12 periph A */
224 0 13 0x1 0x0 /* PA13 periph A */ 232 AT91_PIOA 13 AT91_PERIPH_A AT91_PINCTRL_NONE /* PA13 periph A */
225 0 14 0x1 0x0 /* PA14 periph A */ 233 AT91_PIOA 14 AT91_PERIPH_A AT91_PINCTRL_NONE /* PA14 periph A */
226 0 15 0x1 0x0 /* PA15 periph A */ 234 AT91_PIOA 15 AT91_PERIPH_A AT91_PINCTRL_NONE /* PA15 periph A */
227 0 16 0x1 0x0 /* PA16 periph A */ 235 AT91_PIOA 16 AT91_PERIPH_A AT91_PINCTRL_NONE /* PA16 periph A */
228 0 17 0x1 0x0 /* PA17 periph A */ 236 AT91_PIOA 17 AT91_PERIPH_A AT91_PINCTRL_NONE /* PA17 periph A */
229 0 18 0x1 0x0 /* PA18 periph A */ 237 AT91_PIOA 18 AT91_PERIPH_A AT91_PINCTRL_NONE /* PA18 periph A */
230 0 19 0x1 0x0>; /* PA19 periph A */ 238 AT91_PIOA 19 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PA19 periph A */
231 }; 239 };
232 240
233 pinctrl_macb_rmii_mii: macb_rmii_mii-0 { 241 pinctrl_macb_rmii_mii: macb_rmii_mii-0 {
234 atmel,pins = 242 atmel,pins =
235 <0 6 0x2 0x0 /* PA6 periph B */ 243 <AT91_PIOA 6 AT91_PERIPH_B AT91_PINCTRL_NONE /* PA6 periph B */
236 0 7 0x2 0x0 /* PA7 periph B */ 244 AT91_PIOA 7 AT91_PERIPH_B AT91_PINCTRL_NONE /* PA7 periph B */
237 0 8 0x2 0x0 /* PA8 periph B */ 245 AT91_PIOA 8 AT91_PERIPH_B AT91_PINCTRL_NONE /* PA8 periph B */
238 0 9 0x2 0x0 /* PA9 periph B */ 246 AT91_PIOA 9 AT91_PERIPH_B AT91_PINCTRL_NONE /* PA9 periph B */
239 0 27 0x2 0x0 /* PA27 periph B */ 247 AT91_PIOA 27 AT91_PERIPH_B AT91_PINCTRL_NONE /* PA27 periph B */
240 0 28 0x2 0x0 /* PA28 periph B */ 248 AT91_PIOA 28 AT91_PERIPH_B AT91_PINCTRL_NONE /* PA28 periph B */
241 0 29 0x2 0x0 /* PA29 periph B */ 249 AT91_PIOA 29 AT91_PERIPH_B AT91_PINCTRL_NONE /* PA29 periph B */
242 0 30 0x2 0x0>; /* PA30 periph B */ 250 AT91_PIOA 30 AT91_PERIPH_B AT91_PINCTRL_NONE>; /* PA30 periph B */
243 }; 251 };
244 }; 252 };
245 253
246 mmc0 { 254 mmc0 {
247 pinctrl_mmc0_slot0_clk_cmd_dat0: mmc0_slot0_clk_cmd_dat0-0 { 255 pinctrl_mmc0_slot0_clk_cmd_dat0: mmc0_slot0_clk_cmd_dat0-0 {
248 atmel,pins = 256 atmel,pins =
249 <0 0 0x1 0x0 /* PA0 periph A */ 257 <AT91_PIOA 0 AT91_PERIPH_A AT91_PINCTRL_NONE /* PA0 periph A */
250 0 1 0x1 0x1 /* PA1 periph A with pullup */ 258 AT91_PIOA 1 AT91_PERIPH_A AT91_PINCTRL_PULL_UP /* PA1 periph A with pullup */
251 0 2 0x1 0x1>; /* PA2 periph A with pullup */ 259 AT91_PIOA 2 AT91_PERIPH_A AT91_PINCTRL_PULL_UP>; /* PA2 periph A with pullup */
252 }; 260 };
253 261
254 pinctrl_mmc0_slot0_dat1_3: mmc0_slot0_dat1_3-0 { 262 pinctrl_mmc0_slot0_dat1_3: mmc0_slot0_dat1_3-0 {
255 atmel,pins = 263 atmel,pins =
256 <0 3 0x1 0x1 /* PA3 periph A with pullup */ 264 <AT91_PIOA 3 AT91_PERIPH_A AT91_PINCTRL_PULL_UP /* PA3 periph A with pullup */
257 0 4 0x1 0x1 /* PA4 periph A with pullup */ 265 AT91_PIOA 4 AT91_PERIPH_A AT91_PINCTRL_PULL_UP /* PA4 periph A with pullup */
258 0 5 0x1 0x1>; /* PA5 periph A with pullup */ 266 AT91_PIOA 5 AT91_PERIPH_A AT91_PINCTRL_PULL_UP>; /* PA5 periph A with pullup */
259 }; 267 };
260 268
261 pinctrl_mmc0_slot0_dat4_7: mmc0_slot0_dat4_7-0 { 269 pinctrl_mmc0_slot0_dat4_7: mmc0_slot0_dat4_7-0 {
262 atmel,pins = 270 atmel,pins =
263 <0 6 0x1 0x1 /* PA6 periph A with pullup */ 271 <AT91_PIOA 6 AT91_PERIPH_A AT91_PINCTRL_PULL_UP /* PA6 periph A with pullup */
264 0 7 0x1 0x1 /* PA7 periph A with pullup */ 272 AT91_PIOA 7 AT91_PERIPH_A AT91_PINCTRL_PULL_UP /* PA7 periph A with pullup */
265 0 8 0x1 0x1 /* PA8 periph A with pullup */ 273 AT91_PIOA 8 AT91_PERIPH_A AT91_PINCTRL_PULL_UP /* PA8 periph A with pullup */
266 0 9 0x1 0x1>; /* PA9 periph A with pullup */ 274 AT91_PIOA 9 AT91_PERIPH_A AT91_PINCTRL_PULL_UP>; /* PA9 periph A with pullup */
267 }; 275 };
268 }; 276 };
269 277
270 mmc1 { 278 mmc1 {
271 pinctrl_mmc1_slot0_clk_cmd_dat0: mmc1_slot0_clk_cmd_dat0-0 { 279 pinctrl_mmc1_slot0_clk_cmd_dat0: mmc1_slot0_clk_cmd_dat0-0 {
272 atmel,pins = 280 atmel,pins =
273 <0 31 0x1 0x0 /* PA31 periph A */ 281 <AT91_PIOA 31 AT91_PERIPH_A AT91_PINCTRL_NONE /* PA31 periph A */
274 0 22 0x1 0x1 /* PA22 periph A with pullup */ 282 AT91_PIOA 22 AT91_PERIPH_A AT91_PINCTRL_PULL_UP /* PA22 periph A with pullup */
275 0 23 0x1 0x1>; /* PA23 periph A with pullup */ 283 AT91_PIOA 23 AT91_PERIPH_A AT91_PINCTRL_PULL_UP>; /* PA23 periph A with pullup */
276 }; 284 };
277 285
278 pinctrl_mmc1_slot0_dat1_3: mmc1_slot0_dat1_3-0 { 286 pinctrl_mmc1_slot0_dat1_3: mmc1_slot0_dat1_3-0 {
279 atmel,pins = 287 atmel,pins =
280 <0 24 0x1 0x1 /* PA24 periph A with pullup */ 288 <AT91_PIOA 24 AT91_PERIPH_A AT91_PINCTRL_PULL_UP /* PA24 periph A with pullup */
281 0 25 0x1 0x1 /* PA25 periph A with pullup */ 289 AT91_PIOA 25 AT91_PERIPH_A AT91_PINCTRL_PULL_UP /* PA25 periph A with pullup */
282 0 26 0x1 0x1>; /* PA26 periph A with pullup */ 290 AT91_PIOA 26 AT91_PERIPH_A AT91_PINCTRL_PULL_UP>; /* PA26 periph A with pullup */
283 }; 291 };
284 292
285 pinctrl_mmc1_slot0_dat4_7: mmc1_slot0_dat4_7-0 { 293 pinctrl_mmc1_slot0_dat4_7: mmc1_slot0_dat4_7-0 {
286 atmel,pins = 294 atmel,pins =
287 <0 27 0x1 0x1 /* PA27 periph A with pullup */ 295 <AT91_PIOA 27 AT91_PERIPH_A AT91_PINCTRL_PULL_UP /* PA27 periph A with pullup */
288 0 28 0x1 0x1 /* PA28 periph A with pullup */ 296 AT91_PIOA 28 AT91_PERIPH_A AT91_PINCTRL_PULL_UP /* PA28 periph A with pullup */
289 0 29 0x1 0x1 /* PA29 periph A with pullup */ 297 AT91_PIOA 29 AT91_PERIPH_A AT91_PINCTRL_PULL_UP /* PA29 periph A with pullup */
290 0 20 0x1 0x1>; /* PA30 periph A with pullup */ 298 AT91_PIOA 20 AT91_PERIPH_A AT91_PINCTRL_PULL_UP>; /* PA30 periph A with pullup */
291 }; 299 };
292 }; 300 };
293 301
294 ssc0 { 302 ssc0 {
295 pinctrl_ssc0_tx: ssc0_tx-0 { 303 pinctrl_ssc0_tx: ssc0_tx-0 {
296 atmel,pins = 304 atmel,pins =
297 <3 0 0x1 0x0 /* PD0 periph A */ 305 <AT91_PIOD 0 AT91_PERIPH_A AT91_PINCTRL_NONE /* PD0 periph A */
298 3 1 0x1 0x0 /* PD1 periph A */ 306 AT91_PIOD 1 AT91_PERIPH_A AT91_PINCTRL_NONE /* PD1 periph A */
299 3 2 0x1 0x0>; /* PD2 periph A */ 307 AT91_PIOD 2 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PD2 periph A */
300 }; 308 };
301 309
302 pinctrl_ssc0_rx: ssc0_rx-0 { 310 pinctrl_ssc0_rx: ssc0_rx-0 {
303 atmel,pins = 311 atmel,pins =
304 <3 3 0x1 0x0 /* PD3 periph A */ 312 <AT91_PIOD 3 AT91_PERIPH_A AT91_PINCTRL_NONE /* PD3 periph A */
305 3 4 0x1 0x0 /* PD4 periph A */ 313 AT91_PIOD 4 AT91_PERIPH_A AT91_PINCTRL_NONE /* PD4 periph A */
306 3 5 0x1 0x0>; /* PD5 periph A */ 314 AT91_PIOD 5 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PD5 periph A */
307 }; 315 };
308 }; 316 };
309 317
310 ssc1 { 318 ssc1 {
311 pinctrl_ssc1_tx: ssc1_tx-0 { 319 pinctrl_ssc1_tx: ssc1_tx-0 {
312 atmel,pins = 320 atmel,pins =
313 <3 10 0x1 0x0 /* PD10 periph A */ 321 <AT91_PIOD 10 AT91_PERIPH_A AT91_PINCTRL_NONE /* PD10 periph A */
314 3 11 0x1 0x0 /* PD11 periph A */ 322 AT91_PIOD 11 AT91_PERIPH_A AT91_PINCTRL_NONE /* PD11 periph A */
315 3 12 0x1 0x0>; /* PD12 periph A */ 323 AT91_PIOD 12 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PD12 periph A */
316 }; 324 };
317 325
318 pinctrl_ssc1_rx: ssc1_rx-0 { 326 pinctrl_ssc1_rx: ssc1_rx-0 {
319 atmel,pins = 327 atmel,pins =
320 <3 13 0x1 0x0 /* PD13 periph A */ 328 <AT91_PIOD 13 AT91_PERIPH_A AT91_PINCTRL_NONE /* PD13 periph A */
321 3 14 0x1 0x0 /* PD14 periph A */ 329 AT91_PIOD 14 AT91_PERIPH_A AT91_PINCTRL_NONE /* PD14 periph A */
322 3 15 0x1 0x0>; /* PD15 periph A */ 330 AT91_PIOD 15 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PD15 periph A */
323 }; 331 };
324 }; 332 };
325 333
326 spi0 { 334 spi0 {
327 pinctrl_spi0: spi0-0 { 335 pinctrl_spi0: spi0-0 {
328 atmel,pins = 336 atmel,pins =
329 <1 0 0x1 0x0 /* PB0 periph A SPI0_MISO pin */ 337 <AT91_PIOB 0 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB0 periph A SPI0_MISO pin */
330 1 1 0x1 0x0 /* PB1 periph A SPI0_MOSI pin */ 338 AT91_PIOB 1 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB1 periph A SPI0_MOSI pin */
331 1 2 0x1 0x0>; /* PB2 periph A SPI0_SPCK pin */ 339 AT91_PIOB 2 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PB2 periph A SPI0_SPCK pin */
332 }; 340 };
333 }; 341 };
334 342
335 spi1 { 343 spi1 {
336 pinctrl_spi1: spi1-0 { 344 pinctrl_spi1: spi1-0 {
337 atmel,pins = 345 atmel,pins =
338 <1 14 0x1 0x0 /* PB14 periph A SPI1_MISO pin */ 346 <AT91_PIOB 14 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB14 periph A SPI1_MISO pin */
339 1 15 0x1 0x0 /* PB15 periph A SPI1_MOSI pin */ 347 AT91_PIOB 15 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB15 periph A SPI1_MOSI pin */
340 1 16 0x1 0x0>; /* PB16 periph A SPI1_SPCK pin */ 348 AT91_PIOB 16 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PB16 periph A SPI1_SPCK pin */
349 };
350 };
351
352 tcb0 {
353 pinctrl_tcb0_tclk0: tcb0_tclk0-0 {
354 atmel,pins = <AT91_PIOD 23 AT91_PERIPH_A AT91_PINCTRL_NONE>;
355 };
356
357 pinctrl_tcb0_tclk1: tcb0_tclk1-0 {
358 atmel,pins = <AT91_PIOD 29 AT91_PERIPH_A AT91_PINCTRL_NONE>;
359 };
360
361 pinctrl_tcb0_tclk2: tcb0_tclk2-0 {
362 atmel,pins = <AT91_PIOC 10 AT91_PERIPH_B AT91_PINCTRL_NONE>;
363 };
364
365 pinctrl_tcb0_tioa0: tcb0_tioa0-0 {
366 atmel,pins = <AT91_PIOD 20 AT91_PERIPH_A AT91_PINCTRL_NONE>;
367 };
368
369 pinctrl_tcb0_tioa1: tcb0_tioa1-0 {
370 atmel,pins = <AT91_PIOD 21 AT91_PERIPH_A AT91_PINCTRL_NONE>;
371 };
372
373 pinctrl_tcb0_tioa2: tcb0_tioa2-0 {
374 atmel,pins = <AT91_PIOD 22 AT91_PERIPH_A AT91_PINCTRL_NONE>;
375 };
376
377 pinctrl_tcb0_tiob0: tcb0_tiob0-0 {
378 atmel,pins = <AT91_PIOD 30 AT91_PERIPH_A AT91_PINCTRL_NONE>;
379 };
380
381 pinctrl_tcb0_tiob1: tcb0_tiob1-0 {
382 atmel,pins = <AT91_PIOD 31 AT91_PERIPH_A AT91_PINCTRL_NONE>;
383 };
384
385 pinctrl_tcb0_tiob2: tcb0_tiob2-0 {
386 atmel,pins = <AT91_PIOA 26 AT91_PERIPH_B AT91_PINCTRL_NONE>;
387 };
388 };
389
390 tcb1 {
391 pinctrl_tcb1_tclk0: tcb1_tclk0-0 {
392 atmel,pins = <AT91_PIOA 0 AT91_PERIPH_B AT91_PINCTRL_NONE>;
393 };
394
395 pinctrl_tcb1_tclk1: tcb1_tclk1-0 {
396 atmel,pins = <AT91_PIOA 3 AT91_PERIPH_B AT91_PINCTRL_NONE>;
397 };
398
399 pinctrl_tcb1_tclk2: tcb1_tclk2-0 {
400 atmel,pins = <AT91_PIOD 9 AT91_PERIPH_B AT91_PINCTRL_NONE>;
401 };
402
403 pinctrl_tcb1_tioa0: tcb1_tioa0-0 {
404 atmel,pins = <AT91_PIOA 1 AT91_PERIPH_B AT91_PINCTRL_NONE>;
405 };
406
407 pinctrl_tcb1_tioa1: tcb1_tioa1-0 {
408 atmel,pins = <AT91_PIOA 4 AT91_PERIPH_B AT91_PINCTRL_NONE>;
409 };
410
411 pinctrl_tcb1_tioa2: tcb1_tioa2-0 {
412 atmel,pins = <AT91_PIOD 7 AT91_PERIPH_B AT91_PINCTRL_NONE>;
413 };
414
415 pinctrl_tcb1_tiob0: tcb1_tiob0-0 {
416 atmel,pins = <AT91_PIOA 2 AT91_PERIPH_B AT91_PINCTRL_NONE>;
417 };
418
419 pinctrl_tcb1_tiob1: tcb1_tiob1-0 {
420 atmel,pins = <AT91_PIOA 5 AT91_PERIPH_B AT91_PINCTRL_NONE>;
421 };
422
423 pinctrl_tcb1_tiob2: tcb1_tiob2-0 {
424 atmel,pins = <AT91_PIOD 8 AT91_PERIPH_B AT91_PINCTRL_NONE>;
341 }; 425 };
342 }; 426 };
343 427
344 pioA: gpio@fffff200 { 428 pioA: gpio@fffff200 {
345 compatible = "atmel,at91rm9200-gpio"; 429 compatible = "atmel,at91rm9200-gpio";
346 reg = <0xfffff200 0x200>; 430 reg = <0xfffff200 0x200>;
347 interrupts = <2 4 1>; 431 interrupts = <2 IRQ_TYPE_LEVEL_HIGH 1>;
348 #gpio-cells = <2>; 432 #gpio-cells = <2>;
349 gpio-controller; 433 gpio-controller;
350 interrupt-controller; 434 interrupt-controller;
@@ -354,7 +438,7 @@
354 pioB: gpio@fffff400 { 438 pioB: gpio@fffff400 {
355 compatible = "atmel,at91rm9200-gpio"; 439 compatible = "atmel,at91rm9200-gpio";
356 reg = <0xfffff400 0x200>; 440 reg = <0xfffff400 0x200>;
357 interrupts = <3 4 1>; 441 interrupts = <3 IRQ_TYPE_LEVEL_HIGH 1>;
358 #gpio-cells = <2>; 442 #gpio-cells = <2>;
359 gpio-controller; 443 gpio-controller;
360 interrupt-controller; 444 interrupt-controller;
@@ -364,7 +448,7 @@
364 pioC: gpio@fffff600 { 448 pioC: gpio@fffff600 {
365 compatible = "atmel,at91rm9200-gpio"; 449 compatible = "atmel,at91rm9200-gpio";
366 reg = <0xfffff600 0x200>; 450 reg = <0xfffff600 0x200>;
367 interrupts = <4 4 1>; 451 interrupts = <4 IRQ_TYPE_LEVEL_HIGH 1>;
368 #gpio-cells = <2>; 452 #gpio-cells = <2>;
369 gpio-controller; 453 gpio-controller;
370 interrupt-controller; 454 interrupt-controller;
@@ -374,7 +458,7 @@
374 pioD: gpio@fffff800 { 458 pioD: gpio@fffff800 {
375 compatible = "atmel,at91rm9200-gpio"; 459 compatible = "atmel,at91rm9200-gpio";
376 reg = <0xfffff800 0x200>; 460 reg = <0xfffff800 0x200>;
377 interrupts = <5 4 1>; 461 interrupts = <5 IRQ_TYPE_LEVEL_HIGH 1>;
378 #gpio-cells = <2>; 462 #gpio-cells = <2>;
379 gpio-controller; 463 gpio-controller;
380 interrupt-controller; 464 interrupt-controller;
@@ -384,7 +468,7 @@
384 pioE: gpio@fffffa00 { 468 pioE: gpio@fffffa00 {
385 compatible = "atmel,at91rm9200-gpio"; 469 compatible = "atmel,at91rm9200-gpio";
386 reg = <0xfffffa00 0x200>; 470 reg = <0xfffffa00 0x200>;
387 interrupts = <5 4 1>; 471 interrupts = <5 IRQ_TYPE_LEVEL_HIGH 1>;
388 #gpio-cells = <2>; 472 #gpio-cells = <2>;
389 gpio-controller; 473 gpio-controller;
390 interrupt-controller; 474 interrupt-controller;
@@ -395,7 +479,7 @@
395 dbgu: serial@ffffee00 { 479 dbgu: serial@ffffee00 {
396 compatible = "atmel,at91sam9260-usart"; 480 compatible = "atmel,at91sam9260-usart";
397 reg = <0xffffee00 0x200>; 481 reg = <0xffffee00 0x200>;
398 interrupts = <1 4 7>; 482 interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>;
399 pinctrl-names = "default"; 483 pinctrl-names = "default";
400 pinctrl-0 = <&pinctrl_dbgu>; 484 pinctrl-0 = <&pinctrl_dbgu>;
401 status = "disabled"; 485 status = "disabled";
@@ -404,7 +488,7 @@
404 usart0: serial@fff8c000 { 488 usart0: serial@fff8c000 {
405 compatible = "atmel,at91sam9260-usart"; 489 compatible = "atmel,at91sam9260-usart";
406 reg = <0xfff8c000 0x200>; 490 reg = <0xfff8c000 0x200>;
407 interrupts = <7 4 5>; 491 interrupts = <7 IRQ_TYPE_LEVEL_HIGH 5>;
408 atmel,use-dma-rx; 492 atmel,use-dma-rx;
409 atmel,use-dma-tx; 493 atmel,use-dma-tx;
410 pinctrl-names = "default"; 494 pinctrl-names = "default";
@@ -415,7 +499,7 @@
415 usart1: serial@fff90000 { 499 usart1: serial@fff90000 {
416 compatible = "atmel,at91sam9260-usart"; 500 compatible = "atmel,at91sam9260-usart";
417 reg = <0xfff90000 0x200>; 501 reg = <0xfff90000 0x200>;
418 interrupts = <8 4 5>; 502 interrupts = <8 IRQ_TYPE_LEVEL_HIGH 5>;
419 atmel,use-dma-rx; 503 atmel,use-dma-rx;
420 atmel,use-dma-tx; 504 atmel,use-dma-tx;
421 pinctrl-names = "default"; 505 pinctrl-names = "default";
@@ -426,7 +510,7 @@
426 usart2: serial@fff94000 { 510 usart2: serial@fff94000 {
427 compatible = "atmel,at91sam9260-usart"; 511 compatible = "atmel,at91sam9260-usart";
428 reg = <0xfff94000 0x200>; 512 reg = <0xfff94000 0x200>;
429 interrupts = <9 4 5>; 513 interrupts = <9 IRQ_TYPE_LEVEL_HIGH 5>;
430 atmel,use-dma-rx; 514 atmel,use-dma-rx;
431 atmel,use-dma-tx; 515 atmel,use-dma-tx;
432 pinctrl-names = "default"; 516 pinctrl-names = "default";
@@ -437,7 +521,7 @@
437 usart3: serial@fff98000 { 521 usart3: serial@fff98000 {
438 compatible = "atmel,at91sam9260-usart"; 522 compatible = "atmel,at91sam9260-usart";
439 reg = <0xfff98000 0x200>; 523 reg = <0xfff98000 0x200>;
440 interrupts = <10 4 5>; 524 interrupts = <10 IRQ_TYPE_LEVEL_HIGH 5>;
441 atmel,use-dma-rx; 525 atmel,use-dma-rx;
442 atmel,use-dma-tx; 526 atmel,use-dma-tx;
443 pinctrl-names = "default"; 527 pinctrl-names = "default";
@@ -448,7 +532,7 @@
448 macb0: ethernet@fffbc000 { 532 macb0: ethernet@fffbc000 {
449 compatible = "cdns,at32ap7000-macb", "cdns,macb"; 533 compatible = "cdns,at32ap7000-macb", "cdns,macb";
450 reg = <0xfffbc000 0x100>; 534 reg = <0xfffbc000 0x100>;
451 interrupts = <25 4 3>; 535 interrupts = <25 IRQ_TYPE_LEVEL_HIGH 3>;
452 pinctrl-names = "default"; 536 pinctrl-names = "default";
453 pinctrl-0 = <&pinctrl_macb_rmii>; 537 pinctrl-0 = <&pinctrl_macb_rmii>;
454 status = "disabled"; 538 status = "disabled";
@@ -457,7 +541,7 @@
457 i2c0: i2c@fff84000 { 541 i2c0: i2c@fff84000 {
458 compatible = "atmel,at91sam9g10-i2c"; 542 compatible = "atmel,at91sam9g10-i2c";
459 reg = <0xfff84000 0x100>; 543 reg = <0xfff84000 0x100>;
460 interrupts = <12 4 6>; 544 interrupts = <12 IRQ_TYPE_LEVEL_HIGH 6>;
461 #address-cells = <1>; 545 #address-cells = <1>;
462 #size-cells = <0>; 546 #size-cells = <0>;
463 status = "disabled"; 547 status = "disabled";
@@ -466,7 +550,7 @@
466 i2c1: i2c@fff88000 { 550 i2c1: i2c@fff88000 {
467 compatible = "atmel,at91sam9g10-i2c"; 551 compatible = "atmel,at91sam9g10-i2c";
468 reg = <0xfff88000 0x100>; 552 reg = <0xfff88000 0x100>;
469 interrupts = <13 4 6>; 553 interrupts = <13 IRQ_TYPE_LEVEL_HIGH 6>;
470 #address-cells = <1>; 554 #address-cells = <1>;
471 #size-cells = <0>; 555 #size-cells = <0>;
472 status = "disabled"; 556 status = "disabled";
@@ -475,7 +559,7 @@
475 ssc0: ssc@fff9c000 { 559 ssc0: ssc@fff9c000 {
476 compatible = "atmel,at91sam9g45-ssc"; 560 compatible = "atmel,at91sam9g45-ssc";
477 reg = <0xfff9c000 0x4000>; 561 reg = <0xfff9c000 0x4000>;
478 interrupts = <16 4 5>; 562 interrupts = <16 IRQ_TYPE_LEVEL_HIGH 5>;
479 pinctrl-names = "default"; 563 pinctrl-names = "default";
480 pinctrl-0 = <&pinctrl_ssc0_tx &pinctrl_ssc0_rx>; 564 pinctrl-0 = <&pinctrl_ssc0_tx &pinctrl_ssc0_rx>;
481 status = "disabled"; 565 status = "disabled";
@@ -484,7 +568,7 @@
484 ssc1: ssc@fffa0000 { 568 ssc1: ssc@fffa0000 {
485 compatible = "atmel,at91sam9g45-ssc"; 569 compatible = "atmel,at91sam9g45-ssc";
486 reg = <0xfffa0000 0x4000>; 570 reg = <0xfffa0000 0x4000>;
487 interrupts = <17 4 5>; 571 interrupts = <17 IRQ_TYPE_LEVEL_HIGH 5>;
488 pinctrl-names = "default"; 572 pinctrl-names = "default";
489 pinctrl-0 = <&pinctrl_ssc1_tx &pinctrl_ssc1_rx>; 573 pinctrl-0 = <&pinctrl_ssc1_tx &pinctrl_ssc1_rx>;
490 status = "disabled"; 574 status = "disabled";
@@ -493,7 +577,7 @@
493 adc0: adc@fffb0000 { 577 adc0: adc@fffb0000 {
494 compatible = "atmel,at91sam9260-adc"; 578 compatible = "atmel,at91sam9260-adc";
495 reg = <0xfffb0000 0x100>; 579 reg = <0xfffb0000 0x100>;
496 interrupts = <20 4 0>; 580 interrupts = <20 IRQ_TYPE_LEVEL_HIGH 0>;
497 atmel,adc-use-external-triggers; 581 atmel,adc-use-external-triggers;
498 atmel,adc-channels-used = <0xff>; 582 atmel,adc-channels-used = <0xff>;
499 atmel,adc-vref = <3300>; 583 atmel,adc-vref = <3300>;
@@ -533,8 +617,8 @@
533 mmc0: mmc@fff80000 { 617 mmc0: mmc@fff80000 {
534 compatible = "atmel,hsmci"; 618 compatible = "atmel,hsmci";
535 reg = <0xfff80000 0x600>; 619 reg = <0xfff80000 0x600>;
536 interrupts = <11 4 0>; 620 interrupts = <11 IRQ_TYPE_LEVEL_HIGH 0>;
537 dmas = <&dma 1 0>; 621 dmas = <&dma 1 AT91_DMA_CFG_PER_ID(0)>;
538 dma-names = "rxtx"; 622 dma-names = "rxtx";
539 #address-cells = <1>; 623 #address-cells = <1>;
540 #size-cells = <0>; 624 #size-cells = <0>;
@@ -544,8 +628,8 @@
544 mmc1: mmc@fffd0000 { 628 mmc1: mmc@fffd0000 {
545 compatible = "atmel,hsmci"; 629 compatible = "atmel,hsmci";
546 reg = <0xfffd0000 0x600>; 630 reg = <0xfffd0000 0x600>;
547 interrupts = <29 4 0>; 631 interrupts = <29 IRQ_TYPE_LEVEL_HIGH 0>;
548 dmas = <&dma 1 13>; 632 dmas = <&dma 1 AT91_DMA_CFG_PER_ID(13)>;
549 dma-names = "rxtx"; 633 dma-names = "rxtx";
550 #address-cells = <1>; 634 #address-cells = <1>;
551 #size-cells = <0>; 635 #size-cells = <0>;
@@ -579,6 +663,68 @@
579 pinctrl-0 = <&pinctrl_spi1>; 663 pinctrl-0 = <&pinctrl_spi1>;
580 status = "disabled"; 664 status = "disabled";
581 }; 665 };
666
667 usb2: gadget@fff78000 {
668 #address-cells = <1>;
669 #size-cells = <0>;
670 compatible = "atmel,at91sam9rl-udc";
671 reg = <0x00600000 0x80000
672 0xfff78000 0x400>;
673 interrupts = <27 IRQ_TYPE_LEVEL_HIGH 0>;
674 status = "disabled";
675
676 ep0 {
677 reg = <0>;
678 atmel,fifo-size = <64>;
679 atmel,nb-banks = <1>;
680 };
681
682 ep1 {
683 reg = <1>;
684 atmel,fifo-size = <1024>;
685 atmel,nb-banks = <2>;
686 atmel,can-dma;
687 atmel,can-isoc;
688 };
689
690 ep2 {
691 reg = <2>;
692 atmel,fifo-size = <1024>;
693 atmel,nb-banks = <2>;
694 atmel,can-dma;
695 atmel,can-isoc;
696 };
697
698 ep3 {
699 reg = <3>;
700 atmel,fifo-size = <1024>;
701 atmel,nb-banks = <3>;
702 atmel,can-dma;
703 };
704
705 ep4 {
706 reg = <4>;
707 atmel,fifo-size = <1024>;
708 atmel,nb-banks = <3>;
709 atmel,can-dma;
710 };
711
712 ep5 {
713 reg = <5>;
714 atmel,fifo-size = <1024>;
715 atmel,nb-banks = <3>;
716 atmel,can-dma;
717 atmel,can-isoc;
718 };
719
720 ep6 {
721 reg = <6>;
722 atmel,fifo-size = <1024>;
723 atmel,nb-banks = <3>;
724 atmel,can-dma;
725 atmel,can-isoc;
726 };
727 };
582 }; 728 };
583 729
584 nand0: nand@40000000 { 730 nand0: nand@40000000 {
@@ -592,8 +738,8 @@
592 atmel,nand-cmd-offset = <22>; 738 atmel,nand-cmd-offset = <22>;
593 pinctrl-names = "default"; 739 pinctrl-names = "default";
594 pinctrl-0 = <&pinctrl_nand>; 740 pinctrl-0 = <&pinctrl_nand>;
595 gpios = <&pioC 8 0 741 gpios = <&pioC 8 GPIO_ACTIVE_HIGH
596 &pioC 14 0 742 &pioC 14 GPIO_ACTIVE_HIGH
597 0 743 0
598 >; 744 >;
599 status = "disabled"; 745 status = "disabled";
@@ -602,22 +748,22 @@
602 usb0: ohci@00700000 { 748 usb0: ohci@00700000 {
603 compatible = "atmel,at91rm9200-ohci", "usb-ohci"; 749 compatible = "atmel,at91rm9200-ohci", "usb-ohci";
604 reg = <0x00700000 0x100000>; 750 reg = <0x00700000 0x100000>;
605 interrupts = <22 4 2>; 751 interrupts = <22 IRQ_TYPE_LEVEL_HIGH 2>;
606 status = "disabled"; 752 status = "disabled";
607 }; 753 };
608 754
609 usb1: ehci@00800000 { 755 usb1: ehci@00800000 {
610 compatible = "atmel,at91sam9g45-ehci", "usb-ehci"; 756 compatible = "atmel,at91sam9g45-ehci", "usb-ehci";
611 reg = <0x00800000 0x100000>; 757 reg = <0x00800000 0x100000>;
612 interrupts = <22 4 2>; 758 interrupts = <22 IRQ_TYPE_LEVEL_HIGH 2>;
613 status = "disabled"; 759 status = "disabled";
614 }; 760 };
615 }; 761 };
616 762
617 i2c@0 { 763 i2c@0 {
618 compatible = "i2c-gpio"; 764 compatible = "i2c-gpio";
619 gpios = <&pioA 20 0 /* sda */ 765 gpios = <&pioA 20 GPIO_ACTIVE_HIGH /* sda */
620 &pioA 21 0 /* scl */ 766 &pioA 21 GPIO_ACTIVE_HIGH /* scl */
621 >; 767 >;
622 i2c-gpio,sda-open-drain; 768 i2c-gpio,sda-open-drain;
623 i2c-gpio,scl-open-drain; 769 i2c-gpio,scl-open-drain;
diff --git a/arch/arm/boot/dts/at91sam9m10g45ek.dts b/arch/arm/boot/dts/at91sam9m10g45ek.dts
index 51d9251b5bbe..a4b00e5c61c0 100644
--- a/arch/arm/boot/dts/at91sam9m10g45ek.dts
+++ b/arch/arm/boot/dts/at91sam9m10g45ek.dts
@@ -7,7 +7,7 @@
7 * Licensed under GPLv2 or later. 7 * Licensed under GPLv2 or later.
8 */ 8 */
9/dts-v1/; 9/dts-v1/;
10/include/ "at91sam9g45.dtsi" 10#include "at91sam9g45.dtsi"
11 11
12/ { 12/ {
13 model = "Atmel AT91SAM9M10G45-EK"; 13 model = "Atmel AT91SAM9M10G45-EK";
@@ -59,6 +59,10 @@
59 status = "okay"; 59 status = "okay";
60 }; 60 };
61 61
62 watchdog@fffffd40 {
63 status = "okay";
64 };
65
62 mmc0: mmc@fff80000 { 66 mmc0: mmc@fff80000 {
63 pinctrl-0 = < 67 pinctrl-0 = <
64 &pinctrl_board_mmc0 68 &pinctrl_board_mmc0
@@ -68,7 +72,7 @@
68 slot@0 { 72 slot@0 {
69 reg = <0>; 73 reg = <0>;
70 bus-width = <4>; 74 bus-width = <4>;
71 cd-gpios = <&pioD 10 0>; 75 cd-gpios = <&pioD 10 GPIO_ACTIVE_HIGH>;
72 }; 76 };
73 }; 77 };
74 78
@@ -81,8 +85,8 @@
81 slot@0 { 85 slot@0 {
82 reg = <0>; 86 reg = <0>;
83 bus-width = <4>; 87 bus-width = <4>;
84 cd-gpios = <&pioD 11 0>; 88 cd-gpios = <&pioD 11 GPIO_ACTIVE_HIGH>;
85 wp-gpios = <&pioD 29 0>; 89 wp-gpios = <&pioD 29 GPIO_ACTIVE_HIGH>;
86 }; 90 };
87 }; 91 };
88 92
@@ -90,15 +94,15 @@
90 mmc0 { 94 mmc0 {
91 pinctrl_board_mmc0: mmc0-board { 95 pinctrl_board_mmc0: mmc0-board {
92 atmel,pins = 96 atmel,pins =
93 <3 10 0x0 0x5>; /* PD10 gpio CD pin pull up and deglitch */ 97 <AT91_PIOD 10 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP_DEGLITCH>; /* PD10 gpio CD pin pull up and deglitch */
94 }; 98 };
95 }; 99 };
96 100
97 mmc1 { 101 mmc1 {
98 pinctrl_board_mmc1: mmc1-board { 102 pinctrl_board_mmc1: mmc1-board {
99 atmel,pins = 103 atmel,pins =
100 <3 11 0x0 0x5 /* PD11 gpio CD pin pull up and deglitch */ 104 <AT91_PIOD 11 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP_DEGLITCH /* PD11 gpio CD pin pull up and deglitch */
101 3 29 0x0 0x1>; /* PD29 gpio WP pin pull up */ 105 AT91_PIOD 29 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP>; /* PD29 gpio WP pin pull up */
102 }; 106 };
103 }; 107 };
104 }; 108 };
@@ -112,6 +116,11 @@
112 reg = <0>; 116 reg = <0>;
113 }; 117 };
114 }; 118 };
119
120 usb2: gadget@fff78000 {
121 atmel,vbus-gpio = <&pioB 19 GPIO_ACTIVE_HIGH>;
122 status = "okay";
123 };
115 }; 124 };
116 125
117 nand0: nand@40000000 { 126 nand0: nand@40000000 {
@@ -139,8 +148,8 @@
139 usb0: ohci@00700000 { 148 usb0: ohci@00700000 {
140 status = "okay"; 149 status = "okay";
141 num-ports = <2>; 150 num-ports = <2>;
142 atmel,vbus-gpio = <&pioD 1 1 151 atmel,vbus-gpio = <&pioD 1 GPIO_ACTIVE_LOW
143 &pioD 3 1>; 152 &pioD 3 GPIO_ACTIVE_LOW>;
144 }; 153 };
145 154
146 usb1: ehci@00800000 { 155 usb1: ehci@00800000 {
@@ -153,19 +162,19 @@
153 162
154 d8 { 163 d8 {
155 label = "d8"; 164 label = "d8";
156 gpios = <&pioD 30 0>; 165 gpios = <&pioD 30 GPIO_ACTIVE_HIGH>;
157 linux,default-trigger = "heartbeat"; 166 linux,default-trigger = "heartbeat";
158 }; 167 };
159 168
160 d6 { 169 d6 {
161 label = "d6"; 170 label = "d6";
162 gpios = <&pioD 0 1>; 171 gpios = <&pioD 0 GPIO_ACTIVE_LOW>;
163 linux,default-trigger = "nand-disk"; 172 linux,default-trigger = "nand-disk";
164 }; 173 };
165 174
166 d7 { 175 d7 {
167 label = "d7"; 176 label = "d7";
168 gpios = <&pioD 31 1>; 177 gpios = <&pioD 31 GPIO_ACTIVE_LOW>;
169 linux,default-trigger = "mmc0"; 178 linux,default-trigger = "mmc0";
170 }; 179 };
171 }; 180 };
@@ -175,45 +184,45 @@
175 184
176 left_click { 185 left_click {
177 label = "left_click"; 186 label = "left_click";
178 gpios = <&pioB 6 1>; 187 gpios = <&pioB 6 GPIO_ACTIVE_LOW>;
179 linux,code = <272>; 188 linux,code = <272>;
180 gpio-key,wakeup; 189 gpio-key,wakeup;
181 }; 190 };
182 191
183 right_click { 192 right_click {
184 label = "right_click"; 193 label = "right_click";
185 gpios = <&pioB 7 1>; 194 gpios = <&pioB 7 GPIO_ACTIVE_LOW>;
186 linux,code = <273>; 195 linux,code = <273>;
187 gpio-key,wakeup; 196 gpio-key,wakeup;
188 }; 197 };
189 198
190 left { 199 left {
191 label = "Joystick Left"; 200 label = "Joystick Left";
192 gpios = <&pioB 14 1>; 201 gpios = <&pioB 14 GPIO_ACTIVE_LOW>;
193 linux,code = <105>; 202 linux,code = <105>;
194 }; 203 };
195 204
196 right { 205 right {
197 label = "Joystick Right"; 206 label = "Joystick Right";
198 gpios = <&pioB 15 1>; 207 gpios = <&pioB 15 GPIO_ACTIVE_LOW>;
199 linux,code = <106>; 208 linux,code = <106>;
200 }; 209 };
201 210
202 up { 211 up {
203 label = "Joystick Up"; 212 label = "Joystick Up";
204 gpios = <&pioB 16 1>; 213 gpios = <&pioB 16 GPIO_ACTIVE_LOW>;
205 linux,code = <103>; 214 linux,code = <103>;
206 }; 215 };
207 216
208 down { 217 down {
209 label = "Joystick Down"; 218 label = "Joystick Down";
210 gpios = <&pioB 17 1>; 219 gpios = <&pioB 17 GPIO_ACTIVE_LOW>;
211 linux,code = <108>; 220 linux,code = <108>;
212 }; 221 };
213 222
214 enter { 223 enter {
215 label = "Joystick Press"; 224 label = "Joystick Press";
216 gpios = <&pioB 18 1>; 225 gpios = <&pioB 18 GPIO_ACTIVE_LOW>;
217 linux,code = <28>; 226 linux,code = <28>;
218 }; 227 };
219 }; 228 };
diff --git a/arch/arm/boot/dts/at91sam9n12.dtsi b/arch/arm/boot/dts/at91sam9n12.dtsi
index 8d25f889928e..bb7f564b3a55 100644
--- a/arch/arm/boot/dts/at91sam9n12.dtsi
+++ b/arch/arm/boot/dts/at91sam9n12.dtsi
@@ -7,7 +7,11 @@
7 * Licensed under GPLv2 or later. 7 * Licensed under GPLv2 or later.
8 */ 8 */
9 9
10/include/ "skeleton.dtsi" 10#include "skeleton.dtsi"
11#include <dt-bindings/dma/at91.h>
12#include <dt-bindings/pinctrl/at91.h>
13#include <dt-bindings/interrupt-controller/irq.h>
14#include <dt-bindings/gpio/gpio.h>
11 15
12/ { 16/ {
13 model = "Atmel AT91SAM9N12 SoC"; 17 model = "Atmel AT91SAM9N12 SoC";
@@ -31,8 +35,12 @@
31 ssc0 = &ssc0; 35 ssc0 = &ssc0;
32 }; 36 };
33 cpus { 37 cpus {
34 cpu@0 { 38 #address-cells = <0>;
35 compatible = "arm,arm926ejs"; 39 #size-cells = <0>;
40
41 cpu {
42 compatible = "arm,arm926ej-s";
43 device_type = "cpu";
36 }; 44 };
37 }; 45 };
38 46
@@ -78,7 +86,7 @@
78 pit: timer@fffffe30 { 86 pit: timer@fffffe30 {
79 compatible = "atmel,at91sam9260-pit"; 87 compatible = "atmel,at91sam9260-pit";
80 reg = <0xfffffe30 0xf>; 88 reg = <0xfffffe30 0xf>;
81 interrupts = <1 4 7>; 89 interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>;
82 }; 90 };
83 91
84 shdwc@fffffe10 { 92 shdwc@fffffe10 {
@@ -89,8 +97,8 @@
89 mmc0: mmc@f0008000 { 97 mmc0: mmc@f0008000 {
90 compatible = "atmel,hsmci"; 98 compatible = "atmel,hsmci";
91 reg = <0xf0008000 0x600>; 99 reg = <0xf0008000 0x600>;
92 interrupts = <12 4 0>; 100 interrupts = <12 IRQ_TYPE_LEVEL_HIGH 0>;
93 dmas = <&dma 1 0>; 101 dmas = <&dma 1 AT91_DMA_CFG_PER_ID(0)>;
94 dma-names = "rxtx"; 102 dma-names = "rxtx";
95 #address-cells = <1>; 103 #address-cells = <1>;
96 #size-cells = <0>; 104 #size-cells = <0>;
@@ -100,19 +108,19 @@
100 tcb0: timer@f8008000 { 108 tcb0: timer@f8008000 {
101 compatible = "atmel,at91sam9x5-tcb"; 109 compatible = "atmel,at91sam9x5-tcb";
102 reg = <0xf8008000 0x100>; 110 reg = <0xf8008000 0x100>;
103 interrupts = <17 4 0>; 111 interrupts = <17 IRQ_TYPE_LEVEL_HIGH 0>;
104 }; 112 };
105 113
106 tcb1: timer@f800c000 { 114 tcb1: timer@f800c000 {
107 compatible = "atmel,at91sam9x5-tcb"; 115 compatible = "atmel,at91sam9x5-tcb";
108 reg = <0xf800c000 0x100>; 116 reg = <0xf800c000 0x100>;
109 interrupts = <17 4 0>; 117 interrupts = <17 IRQ_TYPE_LEVEL_HIGH 0>;
110 }; 118 };
111 119
112 dma: dma-controller@ffffec00 { 120 dma: dma-controller@ffffec00 {
113 compatible = "atmel,at91sam9g45-dma"; 121 compatible = "atmel,at91sam9g45-dma";
114 reg = <0xffffec00 0x200>; 122 reg = <0xffffec00 0x200>;
115 interrupts = <20 4 0>; 123 interrupts = <20 IRQ_TYPE_LEVEL_HIGH 0>;
116 #dma-cells = <2>; 124 #dma-cells = <2>;
117 }; 125 };
118 126
@@ -134,159 +142,235 @@
134 dbgu { 142 dbgu {
135 pinctrl_dbgu: dbgu-0 { 143 pinctrl_dbgu: dbgu-0 {
136 atmel,pins = 144 atmel,pins =
137 <0 9 0x1 0x0 /* PA9 periph A */ 145 <AT91_PIOA 9 AT91_PERIPH_A AT91_PINCTRL_NONE /* PA9 periph A */
138 0 10 0x1 0x1>; /* PA10 periph with pullup */ 146 AT91_PIOA 10 AT91_PERIPH_A AT91_PINCTRL_PULL_UP>; /* PA10 periph with pullup */
139 }; 147 };
140 }; 148 };
141 149
142 usart0 { 150 usart0 {
143 pinctrl_usart0: usart0-0 { 151 pinctrl_usart0: usart0-0 {
144 atmel,pins = 152 atmel,pins =
145 <0 1 0x1 0x1 /* PA1 periph A with pullup */ 153 <AT91_PIOA 1 AT91_PERIPH_A AT91_PINCTRL_PULL_UP /* PA1 periph A with pullup */
146 0 0 0x1 0x0>; /* PA0 periph A */ 154 AT91_PIOA 0 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PA0 periph A */
147 }; 155 };
148 156
149 pinctrl_usart0_rts: usart0_rts-0 { 157 pinctrl_usart0_rts: usart0_rts-0 {
150 atmel,pins = 158 atmel,pins =
151 <0 2 0x1 0x0>; /* PA2 periph A */ 159 <AT91_PIOA 2 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PA2 periph A */
152 }; 160 };
153 161
154 pinctrl_usart0_cts: usart0_cts-0 { 162 pinctrl_usart0_cts: usart0_cts-0 {
155 atmel,pins = 163 atmel,pins =
156 <0 3 0x1 0x0>; /* PA3 periph A */ 164 <AT91_PIOA 3 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PA3 periph A */
157 }; 165 };
158 }; 166 };
159 167
160 usart1 { 168 usart1 {
161 pinctrl_usart1: usart1-0 { 169 pinctrl_usart1: usart1-0 {
162 atmel,pins = 170 atmel,pins =
163 <0 6 0x1 0x1 /* PA6 periph A with pullup */ 171 <AT91_PIOA 6 AT91_PERIPH_A AT91_PINCTRL_PULL_UP /* PA6 periph A with pullup */
164 0 5 0x1 0x0>; /* PA5 periph A */ 172 AT91_PIOA 5 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PA5 periph A */
165 }; 173 };
166 }; 174 };
167 175
168 usart2 { 176 usart2 {
169 pinctrl_usart2: usart2-0 { 177 pinctrl_usart2: usart2-0 {
170 atmel,pins = 178 atmel,pins =
171 <0 8 0x1 0x1 /* PA8 periph A with pullup */ 179 <AT91_PIOA 8 AT91_PERIPH_A AT91_PINCTRL_PULL_UP /* PA8 periph A with pullup */
172 0 7 0x1 0x0>; /* PA7 periph A */ 180 AT91_PIOA 7 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PA7 periph A */
173 }; 181 };
174 182
175 pinctrl_usart2_rts: usart2_rts-0 { 183 pinctrl_usart2_rts: usart2_rts-0 {
176 atmel,pins = 184 atmel,pins =
177 <1 0 0x2 0x0>; /* PB0 periph B */ 185 <AT91_PIOB 0 AT91_PERIPH_B AT91_PINCTRL_NONE>; /* PB0 periph B */
178 }; 186 };
179 187
180 pinctrl_usart2_cts: usart2_cts-0 { 188 pinctrl_usart2_cts: usart2_cts-0 {
181 atmel,pins = 189 atmel,pins =
182 <1 1 0x2 0x0>; /* PB1 periph B */ 190 <AT91_PIOB 1 AT91_PERIPH_B AT91_PINCTRL_NONE>; /* PB1 periph B */
183 }; 191 };
184 }; 192 };
185 193
186 usart3 { 194 usart3 {
187 pinctrl_usart3: usart3-0 { 195 pinctrl_usart3: usart3-0 {
188 atmel,pins = 196 atmel,pins =
189 <2 23 0x2 0x1 /* PC23 periph B with pullup */ 197 <AT91_PIOC 23 AT91_PERIPH_B AT91_PINCTRL_PULL_UP /* PC23 periph B with pullup */
190 2 22 0x2 0x0>; /* PC22 periph B */ 198 AT91_PIOC 22 AT91_PERIPH_B AT91_PINCTRL_NONE>; /* PC22 periph B */
191 }; 199 };
192 200
193 pinctrl_usart3_rts: usart3_rts-0 { 201 pinctrl_usart3_rts: usart3_rts-0 {
194 atmel,pins = 202 atmel,pins =
195 <2 24 0x2 0x0>; /* PC24 periph B */ 203 <AT91_PIOC 24 AT91_PERIPH_B AT91_PINCTRL_NONE>; /* PC24 periph B */
196 }; 204 };
197 205
198 pinctrl_usart3_cts: usart3_cts-0 { 206 pinctrl_usart3_cts: usart3_cts-0 {
199 atmel,pins = 207 atmel,pins =
200 <2 25 0x2 0x0>; /* PC25 periph B */ 208 <AT91_PIOC 25 AT91_PERIPH_B AT91_PINCTRL_NONE>; /* PC25 periph B */
201 }; 209 };
202 }; 210 };
203 211
204 uart0 { 212 uart0 {
205 pinctrl_uart0: uart0-0 { 213 pinctrl_uart0: uart0-0 {
206 atmel,pins = 214 atmel,pins =
207 <2 9 0x3 0x1 /* PC9 periph C with pullup */ 215 <AT91_PIOC 9 AT91_PERIPH_C AT91_PINCTRL_PULL_UP /* PC9 periph C with pullup */
208 2 8 0x3 0x0>; /* PC8 periph C */ 216 AT91_PIOC 8 AT91_PERIPH_C AT91_PINCTRL_NONE>; /* PC8 periph C */
209 }; 217 };
210 }; 218 };
211 219
212 uart1 { 220 uart1 {
213 pinctrl_uart1: uart1-0 { 221 pinctrl_uart1: uart1-0 {
214 atmel,pins = 222 atmel,pins =
215 <2 16 0x3 0x1 /* PC17 periph C with pullup */ 223 <AT91_PIOC 16 AT91_PERIPH_C AT91_PINCTRL_PULL_UP /* PC17 periph C with pullup */
216 2 17 0x3 0x0>; /* PC16 periph C */ 224 AT91_PIOC 17 AT91_PERIPH_C AT91_PINCTRL_NONE>; /* PC16 periph C */
217 }; 225 };
218 }; 226 };
219 227
220 nand { 228 nand {
221 pinctrl_nand: nand-0 { 229 pinctrl_nand: nand-0 {
222 atmel,pins = 230 atmel,pins =
223 <3 5 0x0 0x1 /* PD5 gpio RDY pin pull_up*/ 231 <AT91_PIOD 5 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP /* PD5 gpio RDY pin pull_up*/
224 3 4 0x0 0x1>; /* PD4 gpio enable pin pull_up */ 232 AT91_PIOD 4 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP>; /* PD4 gpio enable pin pull_up */
225 }; 233 };
226 }; 234 };
227 235
228 mmc0 { 236 mmc0 {
229 pinctrl_mmc0_slot0_clk_cmd_dat0: mmc0_slot0_clk_cmd_dat0-0 { 237 pinctrl_mmc0_slot0_clk_cmd_dat0: mmc0_slot0_clk_cmd_dat0-0 {
230 atmel,pins = 238 atmel,pins =
231 <0 17 0x1 0x0 /* PA17 periph A */ 239 <AT91_PIOA 17 AT91_PERIPH_A AT91_PINCTRL_NONE /* PA17 periph A */
232 0 16 0x1 0x1 /* PA16 periph A with pullup */ 240 AT91_PIOA 16 AT91_PERIPH_A AT91_PINCTRL_PULL_UP /* PA16 periph A with pullup */
233 0 15 0x1 0x1>; /* PA15 periph A with pullup */ 241 AT91_PIOA 15 AT91_PERIPH_A AT91_PINCTRL_PULL_UP>; /* PA15 periph A with pullup */
234 }; 242 };
235 243
236 pinctrl_mmc0_slot0_dat1_3: mmc0_slot0_dat1_3-0 { 244 pinctrl_mmc0_slot0_dat1_3: mmc0_slot0_dat1_3-0 {
237 atmel,pins = 245 atmel,pins =
238 <0 18 0x1 0x1 /* PA18 periph A with pullup */ 246 <AT91_PIOA 18 AT91_PERIPH_A AT91_PINCTRL_PULL_UP /* PA18 periph A with pullup */
239 0 19 0x1 0x1 /* PA19 periph A with pullup */ 247 AT91_PIOA 19 AT91_PERIPH_A AT91_PINCTRL_PULL_UP /* PA19 periph A with pullup */
240 0 20 0x1 0x1>; /* PA20 periph A with pullup */ 248 AT91_PIOA 20 AT91_PERIPH_A AT91_PINCTRL_PULL_UP>; /* PA20 periph A with pullup */
241 }; 249 };
242 250
243 pinctrl_mmc0_slot0_dat4_7: mmc0_slot0_dat4_7-0 { 251 pinctrl_mmc0_slot0_dat4_7: mmc0_slot0_dat4_7-0 {
244 atmel,pins = 252 atmel,pins =
245 <0 11 0x2 0x1 /* PA11 periph B with pullup */ 253 <AT91_PIOA 11 AT91_PERIPH_B AT91_PINCTRL_PULL_UP /* PA11 periph B with pullup */
246 0 12 0x2 0x1 /* PA12 periph B with pullup */ 254 AT91_PIOA 12 AT91_PERIPH_B AT91_PINCTRL_PULL_UP /* PA12 periph B with pullup */
247 0 13 0x2 0x1 /* PA13 periph B with pullup */ 255 AT91_PIOA 13 AT91_PERIPH_B AT91_PINCTRL_PULL_UP /* PA13 periph B with pullup */
248 0 14 0x2 0x1>; /* PA14 periph B with pullup */ 256 AT91_PIOA 14 AT91_PERIPH_B AT91_PINCTRL_PULL_UP>; /* PA14 periph B with pullup */
249 }; 257 };
250 }; 258 };
251 259
252 ssc0 { 260 ssc0 {
253 pinctrl_ssc0_tx: ssc0_tx-0 { 261 pinctrl_ssc0_tx: ssc0_tx-0 {
254 atmel,pins = 262 atmel,pins =
255 <0 24 0x2 0x0 /* PA24 periph B */ 263 <AT91_PIOA 24 AT91_PERIPH_B AT91_PINCTRL_NONE /* PA24 periph B */
256 0 25 0x2 0x0 /* PA25 periph B */ 264 AT91_PIOA 25 AT91_PERIPH_B AT91_PINCTRL_NONE /* PA25 periph B */
257 0 26 0x2 0x0>; /* PA26 periph B */ 265 AT91_PIOA 26 AT91_PERIPH_B AT91_PINCTRL_NONE>; /* PA26 periph B */
258 }; 266 };
259 267
260 pinctrl_ssc0_rx: ssc0_rx-0 { 268 pinctrl_ssc0_rx: ssc0_rx-0 {
261 atmel,pins = 269 atmel,pins =
262 <0 27 0x2 0x0 /* PA27 periph B */ 270 <AT91_PIOA 27 AT91_PERIPH_B AT91_PINCTRL_NONE /* PA27 periph B */
263 0 28 0x2 0x0 /* PA28 periph B */ 271 AT91_PIOA 28 AT91_PERIPH_B AT91_PINCTRL_NONE /* PA28 periph B */
264 0 29 0x2 0x0>; /* PA29 periph B */ 272 AT91_PIOA 29 AT91_PERIPH_B AT91_PINCTRL_NONE>; /* PA29 periph B */
265 }; 273 };
266 }; 274 };
267 275
268 spi0 { 276 spi0 {
269 pinctrl_spi0: spi0-0 { 277 pinctrl_spi0: spi0-0 {
270 atmel,pins = 278 atmel,pins =
271 <0 11 0x1 0x0 /* PA11 periph A SPI0_MISO pin */ 279 <AT91_PIOA 11 AT91_PERIPH_A AT91_PINCTRL_NONE /* PA11 periph A SPI0_MISO pin */
272 0 12 0x1 0x0 /* PA12 periph A SPI0_MOSI pin */ 280 AT91_PIOA 12 AT91_PERIPH_A AT91_PINCTRL_NONE /* PA12 periph A SPI0_MOSI pin */
273 0 13 0x1 0x0>; /* PA13 periph A SPI0_SPCK pin */ 281 AT91_PIOA 13 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PA13 periph A SPI0_SPCK pin */
274 }; 282 };
275 }; 283 };
276 284
277 spi1 { 285 spi1 {
278 pinctrl_spi1: spi1-0 { 286 pinctrl_spi1: spi1-0 {
279 atmel,pins = 287 atmel,pins =
280 <0 21 0x2 0x0 /* PA21 periph B SPI1_MISO pin */ 288 <AT91_PIOA 21 AT91_PERIPH_B AT91_PINCTRL_NONE /* PA21 periph B SPI1_MISO pin */
281 0 22 0x2 0x0 /* PA22 periph B SPI1_MOSI pin */ 289 AT91_PIOA 22 AT91_PERIPH_B AT91_PINCTRL_NONE /* PA22 periph B SPI1_MOSI pin */
282 0 23 0x2 0x0>; /* PA23 periph B SPI1_SPCK pin */ 290 AT91_PIOA 23 AT91_PERIPH_B AT91_PINCTRL_NONE>; /* PA23 periph B SPI1_SPCK pin */
291 };
292 };
293
294 tcb0 {
295 pinctrl_tcb0_tclk0: tcb0_tclk0-0 {
296 atmel,pins = <AT91_PIOA 24 AT91_PERIPH_A AT91_PINCTRL_NONE>;
297 };
298
299 pinctrl_tcb0_tclk1: tcb0_tclk1-0 {
300 atmel,pins = <AT91_PIOA 25 AT91_PERIPH_A AT91_PINCTRL_NONE>;
301 };
302
303 pinctrl_tcb0_tclk2: tcb0_tclk2-0 {
304 atmel,pins = <AT91_PIOA 26 AT91_PERIPH_A AT91_PINCTRL_NONE>;
305 };
306
307 pinctrl_tcb0_tioa0: tcb0_tioa0-0 {
308 atmel,pins = <AT91_PIOA 21 AT91_PERIPH_A AT91_PINCTRL_NONE>;
309 };
310
311 pinctrl_tcb0_tioa1: tcb0_tioa1-0 {
312 atmel,pins = <AT91_PIOA 22 AT91_PERIPH_A AT91_PINCTRL_NONE>;
313 };
314
315 pinctrl_tcb0_tioa2: tcb0_tioa2-0 {
316 atmel,pins = <AT91_PIOA 23 AT91_PERIPH_A AT91_PINCTRL_NONE>;
317 };
318
319 pinctrl_tcb0_tiob0: tcb0_tiob0-0 {
320 atmel,pins = <AT91_PIOA 27 AT91_PERIPH_A AT91_PINCTRL_NONE>;
321 };
322
323 pinctrl_tcb0_tiob1: tcb0_tiob1-0 {
324 atmel,pins = <AT91_PIOA 28 AT91_PERIPH_A AT91_PINCTRL_NONE>;
325 };
326
327 pinctrl_tcb0_tiob2: tcb0_tiob2-0 {
328 atmel,pins = <AT91_PIOA 29 AT91_PERIPH_A AT91_PINCTRL_NONE>;
329 };
330 };
331
332 tcb1 {
333 pinctrl_tcb1_tclk0: tcb1_tclk0-0 {
334 atmel,pins = <AT91_PIOC 4 AT91_PERIPH_C AT91_PINCTRL_NONE>;
335 };
336
337 pinctrl_tcb1_tclk1: tcb1_tclk1-0 {
338 atmel,pins = <AT91_PIOC 7 AT91_PERIPH_C AT91_PINCTRL_NONE>;
339 };
340
341 pinctrl_tcb1_tclk2: tcb1_tclk2-0 {
342 atmel,pins = <AT91_PIOC 14 AT91_PERIPH_C AT91_PINCTRL_NONE>;
343 };
344
345 pinctrl_tcb1_tioa0: tcb1_tioa0-0 {
346 atmel,pins = <AT91_PIOC 2 AT91_PERIPH_C AT91_PINCTRL_NONE>;
347 };
348
349 pinctrl_tcb1_tioa1: tcb1_tioa1-0 {
350 atmel,pins = <AT91_PIOC 5 AT91_PERIPH_C AT91_PINCTRL_NONE>;
351 };
352
353 pinctrl_tcb1_tioa2: tcb1_tioa2-0 {
354 atmel,pins = <AT91_PIOC 12 AT91_PERIPH_C AT91_PINCTRL_NONE>;
355 };
356
357 pinctrl_tcb1_tiob0: tcb1_tiob0-0 {
358 atmel,pins = <AT91_PIOC 3 AT91_PERIPH_C AT91_PINCTRL_NONE>;
359 };
360
361 pinctrl_tcb1_tiob1: tcb1_tiob1-0 {
362 atmel,pins = <AT91_PIOC 6 AT91_PERIPH_C AT91_PINCTRL_NONE>;
363 };
364
365 pinctrl_tcb1_tiob2: tcb1_tiob2-0 {
366 atmel,pins = <AT91_PIOC 13 AT91_PERIPH_C AT91_PINCTRL_NONE>;
283 }; 367 };
284 }; 368 };
285 369
286 pioA: gpio@fffff400 { 370 pioA: gpio@fffff400 {
287 compatible = "atmel,at91sam9x5-gpio", "atmel,at91rm9200-gpio"; 371 compatible = "atmel,at91sam9x5-gpio", "atmel,at91rm9200-gpio";
288 reg = <0xfffff400 0x200>; 372 reg = <0xfffff400 0x200>;
289 interrupts = <2 4 1>; 373 interrupts = <2 IRQ_TYPE_LEVEL_HIGH 1>;
290 #gpio-cells = <2>; 374 #gpio-cells = <2>;
291 gpio-controller; 375 gpio-controller;
292 interrupt-controller; 376 interrupt-controller;
@@ -296,7 +380,7 @@
296 pioB: gpio@fffff600 { 380 pioB: gpio@fffff600 {
297 compatible = "atmel,at91sam9x5-gpio", "atmel,at91rm9200-gpio"; 381 compatible = "atmel,at91sam9x5-gpio", "atmel,at91rm9200-gpio";
298 reg = <0xfffff600 0x200>; 382 reg = <0xfffff600 0x200>;
299 interrupts = <2 4 1>; 383 interrupts = <2 IRQ_TYPE_LEVEL_HIGH 1>;
300 #gpio-cells = <2>; 384 #gpio-cells = <2>;
301 gpio-controller; 385 gpio-controller;
302 interrupt-controller; 386 interrupt-controller;
@@ -306,7 +390,7 @@
306 pioC: gpio@fffff800 { 390 pioC: gpio@fffff800 {
307 compatible = "atmel,at91sam9x5-gpio", "atmel,at91rm9200-gpio"; 391 compatible = "atmel,at91sam9x5-gpio", "atmel,at91rm9200-gpio";
308 reg = <0xfffff800 0x200>; 392 reg = <0xfffff800 0x200>;
309 interrupts = <3 4 1>; 393 interrupts = <3 IRQ_TYPE_LEVEL_HIGH 1>;
310 #gpio-cells = <2>; 394 #gpio-cells = <2>;
311 gpio-controller; 395 gpio-controller;
312 interrupt-controller; 396 interrupt-controller;
@@ -316,7 +400,7 @@
316 pioD: gpio@fffffa00 { 400 pioD: gpio@fffffa00 {
317 compatible = "atmel,at91sam9x5-gpio", "atmel,at91rm9200-gpio"; 401 compatible = "atmel,at91sam9x5-gpio", "atmel,at91rm9200-gpio";
318 reg = <0xfffffa00 0x200>; 402 reg = <0xfffffa00 0x200>;
319 interrupts = <3 4 1>; 403 interrupts = <3 IRQ_TYPE_LEVEL_HIGH 1>;
320 #gpio-cells = <2>; 404 #gpio-cells = <2>;
321 gpio-controller; 405 gpio-controller;
322 interrupt-controller; 406 interrupt-controller;
@@ -327,7 +411,7 @@
327 dbgu: serial@fffff200 { 411 dbgu: serial@fffff200 {
328 compatible = "atmel,at91sam9260-usart"; 412 compatible = "atmel,at91sam9260-usart";
329 reg = <0xfffff200 0x200>; 413 reg = <0xfffff200 0x200>;
330 interrupts = <1 4 7>; 414 interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>;
331 pinctrl-names = "default"; 415 pinctrl-names = "default";
332 pinctrl-0 = <&pinctrl_dbgu>; 416 pinctrl-0 = <&pinctrl_dbgu>;
333 status = "disabled"; 417 status = "disabled";
@@ -336,7 +420,7 @@
336 ssc0: ssc@f0010000 { 420 ssc0: ssc@f0010000 {
337 compatible = "atmel,at91sam9g45-ssc"; 421 compatible = "atmel,at91sam9g45-ssc";
338 reg = <0xf0010000 0x4000>; 422 reg = <0xf0010000 0x4000>;
339 interrupts = <28 4 5>; 423 interrupts = <28 IRQ_TYPE_LEVEL_HIGH 5>;
340 pinctrl-names = "default"; 424 pinctrl-names = "default";
341 pinctrl-0 = <&pinctrl_ssc0_tx &pinctrl_ssc0_rx>; 425 pinctrl-0 = <&pinctrl_ssc0_tx &pinctrl_ssc0_rx>;
342 status = "disabled"; 426 status = "disabled";
@@ -345,7 +429,7 @@
345 usart0: serial@f801c000 { 429 usart0: serial@f801c000 {
346 compatible = "atmel,at91sam9260-usart"; 430 compatible = "atmel,at91sam9260-usart";
347 reg = <0xf801c000 0x4000>; 431 reg = <0xf801c000 0x4000>;
348 interrupts = <5 4 5>; 432 interrupts = <5 IRQ_TYPE_LEVEL_HIGH 5>;
349 pinctrl-names = "default"; 433 pinctrl-names = "default";
350 pinctrl-0 = <&pinctrl_usart0>; 434 pinctrl-0 = <&pinctrl_usart0>;
351 status = "disabled"; 435 status = "disabled";
@@ -354,7 +438,7 @@
354 usart1: serial@f8020000 { 438 usart1: serial@f8020000 {
355 compatible = "atmel,at91sam9260-usart"; 439 compatible = "atmel,at91sam9260-usart";
356 reg = <0xf8020000 0x4000>; 440 reg = <0xf8020000 0x4000>;
357 interrupts = <6 4 5>; 441 interrupts = <6 IRQ_TYPE_LEVEL_HIGH 5>;
358 pinctrl-names = "default"; 442 pinctrl-names = "default";
359 pinctrl-0 = <&pinctrl_usart1>; 443 pinctrl-0 = <&pinctrl_usart1>;
360 status = "disabled"; 444 status = "disabled";
@@ -363,7 +447,7 @@
363 usart2: serial@f8024000 { 447 usart2: serial@f8024000 {
364 compatible = "atmel,at91sam9260-usart"; 448 compatible = "atmel,at91sam9260-usart";
365 reg = <0xf8024000 0x4000>; 449 reg = <0xf8024000 0x4000>;
366 interrupts = <7 4 5>; 450 interrupts = <7 IRQ_TYPE_LEVEL_HIGH 5>;
367 pinctrl-names = "default"; 451 pinctrl-names = "default";
368 pinctrl-0 = <&pinctrl_usart2>; 452 pinctrl-0 = <&pinctrl_usart2>;
369 status = "disabled"; 453 status = "disabled";
@@ -372,7 +456,7 @@
372 usart3: serial@f8028000 { 456 usart3: serial@f8028000 {
373 compatible = "atmel,at91sam9260-usart"; 457 compatible = "atmel,at91sam9260-usart";
374 reg = <0xf8028000 0x4000>; 458 reg = <0xf8028000 0x4000>;
375 interrupts = <8 4 5>; 459 interrupts = <8 IRQ_TYPE_LEVEL_HIGH 5>;
376 pinctrl-names = "default"; 460 pinctrl-names = "default";
377 pinctrl-0 = <&pinctrl_usart3>; 461 pinctrl-0 = <&pinctrl_usart3>;
378 status = "disabled"; 462 status = "disabled";
@@ -381,9 +465,9 @@
381 i2c0: i2c@f8010000 { 465 i2c0: i2c@f8010000 {
382 compatible = "atmel,at91sam9x5-i2c"; 466 compatible = "atmel,at91sam9x5-i2c";
383 reg = <0xf8010000 0x100>; 467 reg = <0xf8010000 0x100>;
384 interrupts = <9 4 6>; 468 interrupts = <9 IRQ_TYPE_LEVEL_HIGH 6>;
385 dmas = <&dma 1 13>, 469 dmas = <&dma 1 AT91_DMA_CFG_PER_ID(13)>,
386 <&dma 1 14>; 470 <&dma 1 AT91_DMA_CFG_PER_ID(14)>;
387 dma-names = "tx", "rx"; 471 dma-names = "tx", "rx";
388 #address-cells = <1>; 472 #address-cells = <1>;
389 #size-cells = <0>; 473 #size-cells = <0>;
@@ -393,9 +477,9 @@
393 i2c1: i2c@f8014000 { 477 i2c1: i2c@f8014000 {
394 compatible = "atmel,at91sam9x5-i2c"; 478 compatible = "atmel,at91sam9x5-i2c";
395 reg = <0xf8014000 0x100>; 479 reg = <0xf8014000 0x100>;
396 interrupts = <10 4 6>; 480 interrupts = <10 IRQ_TYPE_LEVEL_HIGH 6>;
397 dmas = <&dma 1 15>, 481 dmas = <&dma 1 AT91_DMA_CFG_PER_ID(15)>,
398 <&dma 1 16>; 482 <&dma 1 AT91_DMA_CFG_PER_ID(16)>;
399 dma-names = "tx", "rx"; 483 dma-names = "tx", "rx";
400 #address-cells = <1>; 484 #address-cells = <1>;
401 #size-cells = <0>; 485 #size-cells = <0>;
@@ -407,7 +491,10 @@
407 #size-cells = <0>; 491 #size-cells = <0>;
408 compatible = "atmel,at91rm9200-spi"; 492 compatible = "atmel,at91rm9200-spi";
409 reg = <0xf0000000 0x100>; 493 reg = <0xf0000000 0x100>;
410 interrupts = <13 4 3>; 494 interrupts = <13 IRQ_TYPE_LEVEL_HIGH 3>;
495 dmas = <&dma 1 AT91_DMA_CFG_PER_ID(1)>,
496 <&dma 1 AT91_DMA_CFG_PER_ID(2)>;
497 dma-names = "tx", "rx";
411 pinctrl-names = "default"; 498 pinctrl-names = "default";
412 pinctrl-0 = <&pinctrl_spi0>; 499 pinctrl-0 = <&pinctrl_spi0>;
413 status = "disabled"; 500 status = "disabled";
@@ -418,11 +505,20 @@
418 #size-cells = <0>; 505 #size-cells = <0>;
419 compatible = "atmel,at91rm9200-spi"; 506 compatible = "atmel,at91rm9200-spi";
420 reg = <0xf0004000 0x100>; 507 reg = <0xf0004000 0x100>;
421 interrupts = <14 4 3>; 508 interrupts = <14 IRQ_TYPE_LEVEL_HIGH 3>;
509 dmas = <&dma 1 AT91_DMA_CFG_PER_ID(3)>,
510 <&dma 1 AT91_DMA_CFG_PER_ID(4)>;
511 dma-names = "tx", "rx";
422 pinctrl-names = "default"; 512 pinctrl-names = "default";
423 pinctrl-0 = <&pinctrl_spi1>; 513 pinctrl-0 = <&pinctrl_spi1>;
424 status = "disabled"; 514 status = "disabled";
425 }; 515 };
516
517 watchdog@fffffe40 {
518 compatible = "atmel,at91sam9260-wdt";
519 reg = <0xfffffe40 0x10>;
520 status = "disabled";
521 };
426 }; 522 };
427 523
428 nand0: nand@40000000 { 524 nand0: nand@40000000 {
@@ -439,8 +535,8 @@
439 atmel,nand-cmd-offset = <22>; 535 atmel,nand-cmd-offset = <22>;
440 pinctrl-names = "default"; 536 pinctrl-names = "default";
441 pinctrl-0 = <&pinctrl_nand>; 537 pinctrl-0 = <&pinctrl_nand>;
442 gpios = <&pioD 5 0 538 gpios = <&pioD 5 GPIO_ACTIVE_HIGH
443 &pioD 4 0 539 &pioD 4 GPIO_ACTIVE_HIGH
444 0 540 0
445 >; 541 >;
446 status = "disabled"; 542 status = "disabled";
@@ -449,15 +545,15 @@
449 usb0: ohci@00500000 { 545 usb0: ohci@00500000 {
450 compatible = "atmel,at91rm9200-ohci", "usb-ohci"; 546 compatible = "atmel,at91rm9200-ohci", "usb-ohci";
451 reg = <0x00500000 0x00100000>; 547 reg = <0x00500000 0x00100000>;
452 interrupts = <22 4 2>; 548 interrupts = <22 IRQ_TYPE_LEVEL_HIGH 2>;
453 status = "disabled"; 549 status = "disabled";
454 }; 550 };
455 }; 551 };
456 552
457 i2c@0 { 553 i2c@0 {
458 compatible = "i2c-gpio"; 554 compatible = "i2c-gpio";
459 gpios = <&pioA 30 0 /* sda */ 555 gpios = <&pioA 30 GPIO_ACTIVE_HIGH /* sda */
460 &pioA 31 0 /* scl */ 556 &pioA 31 GPIO_ACTIVE_HIGH /* scl */
461 >; 557 >;
462 i2c-gpio,sda-open-drain; 558 i2c-gpio,sda-open-drain;
463 i2c-gpio,scl-open-drain; 559 i2c-gpio,scl-open-drain;
diff --git a/arch/arm/boot/dts/at91sam9n12ek.dts b/arch/arm/boot/dts/at91sam9n12ek.dts
index d30e48bd1e9d..d59b70c6a6a0 100644
--- a/arch/arm/boot/dts/at91sam9n12ek.dts
+++ b/arch/arm/boot/dts/at91sam9n12ek.dts
@@ -7,7 +7,7 @@
7 * Licensed under GPLv2 or later. 7 * Licensed under GPLv2 or later.
8 */ 8 */
9/dts-v1/; 9/dts-v1/;
10/include/ "at91sam9n12.dtsi" 10#include "at91sam9n12.dtsi"
11 11
12/ { 12/ {
13 model = "Atmel AT91SAM9N12-EK"; 13 model = "Atmel AT91SAM9N12-EK";
@@ -55,7 +55,7 @@
55 slot@0 { 55 slot@0 {
56 reg = <0>; 56 reg = <0>;
57 bus-width = <4>; 57 bus-width = <4>;
58 cd-gpios = <&pioA 7 0>; 58 cd-gpios = <&pioA 7 GPIO_ACTIVE_HIGH>;
59 }; 59 };
60 }; 60 };
61 61
@@ -63,7 +63,7 @@
63 mmc0 { 63 mmc0 {
64 pinctrl_board_mmc0: mmc0-board { 64 pinctrl_board_mmc0: mmc0-board {
65 atmel,pins = 65 atmel,pins =
66 <0 7 0x0 0x5>; /* PA7 gpio CD pin pull up and deglitch */ 66 <AT91_PIOA 7 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP_DEGLITCH>; /* PA7 gpio CD pin pull up and deglitch */
67 }; 67 };
68 }; 68 };
69 }; 69 };
@@ -77,6 +77,10 @@
77 reg = <0>; 77 reg = <0>;
78 }; 78 };
79 }; 79 };
80
81 watchdog@fffffe40 {
82 status = "okay";
83 };
80 }; 84 };
81 85
82 nand0: nand@40000000 { 86 nand0: nand@40000000 {
@@ -95,19 +99,19 @@
95 99
96 d8 { 100 d8 {
97 label = "d8"; 101 label = "d8";
98 gpios = <&pioB 4 1>; 102 gpios = <&pioB 4 GPIO_ACTIVE_LOW>;
99 linux,default-trigger = "mmc0"; 103 linux,default-trigger = "mmc0";
100 }; 104 };
101 105
102 d9 { 106 d9 {
103 label = "d6"; 107 label = "d6";
104 gpios = <&pioB 5 1>; 108 gpios = <&pioB 5 GPIO_ACTIVE_LOW>;
105 linux,default-trigger = "nand-disk"; 109 linux,default-trigger = "nand-disk";
106 }; 110 };
107 111
108 d10 { 112 d10 {
109 label = "d7"; 113 label = "d7";
110 gpios = <&pioB 6 0>; 114 gpios = <&pioB 6 GPIO_ACTIVE_HIGH>;
111 linux,default-trigger = "heartbeat"; 115 linux,default-trigger = "heartbeat";
112 }; 116 };
113 }; 117 };
@@ -117,7 +121,7 @@
117 121
118 enter { 122 enter {
119 label = "Enter"; 123 label = "Enter";
120 gpios = <&pioB 4 1>; 124 gpios = <&pioB 4 GPIO_ACTIVE_LOW>;
121 linux,code = <28>; 125 linux,code = <28>;
122 gpio-key,wakeup; 126 gpio-key,wakeup;
123 }; 127 };
diff --git a/arch/arm/boot/dts/at91sam9x25.dtsi b/arch/arm/boot/dts/at91sam9x25.dtsi
index 9ac2bc2b4f07..49e94aba938f 100644
--- a/arch/arm/boot/dts/at91sam9x25.dtsi
+++ b/arch/arm/boot/dts/at91sam9x25.dtsi
@@ -6,7 +6,7 @@
6 * Licensed under GPLv2. 6 * Licensed under GPLv2.
7 */ 7 */
8 8
9/include/ "at91sam9x5.dtsi" 9#include "at91sam9x5.dtsi"
10 10
11/ { 11/ {
12 model = "Atmel AT91SAM9X25 SoC"; 12 model = "Atmel AT91SAM9X25 SoC";
@@ -26,16 +26,16 @@
26 macb1 { 26 macb1 {
27 pinctrl_macb1_rmii: macb1_rmii-0 { 27 pinctrl_macb1_rmii: macb1_rmii-0 {
28 atmel,pins = 28 atmel,pins =
29 <2 16 0x2 0x0 /* PC16 periph B */ 29 <AT91_PIOC 16 AT91_PERIPH_B AT91_PINCTRL_NONE /* PC16 periph B */
30 2 18 0x2 0x0 /* PC18 periph B */ 30 AT91_PIOC 18 AT91_PERIPH_B AT91_PINCTRL_NONE /* PC18 periph B */
31 2 19 0x2 0x0 /* PC19 periph B */ 31 AT91_PIOC 19 AT91_PERIPH_B AT91_PINCTRL_NONE /* PC19 periph B */
32 2 20 0x2 0x0 /* PC20 periph B */ 32 AT91_PIOC 20 AT91_PERIPH_B AT91_PINCTRL_NONE /* PC20 periph B */
33 2 21 0x2 0x0 /* PC21 periph B */ 33 AT91_PIOC 21 AT91_PERIPH_B AT91_PINCTRL_NONE /* PC21 periph B */
34 2 27 0x2 0x0 /* PC27 periph B */ 34 AT91_PIOC 27 AT91_PERIPH_B AT91_PINCTRL_NONE /* PC27 periph B */
35 2 28 0x2 0x0 /* PC28 periph B */ 35 AT91_PIOC 28 AT91_PERIPH_B AT91_PINCTRL_NONE /* PC28 periph B */
36 2 29 0x2 0x0 /* PC29 periph B */ 36 AT91_PIOC 29 AT91_PERIPH_B AT91_PINCTRL_NONE /* PC29 periph B */
37 2 30 0x2 0x0 /* PC30 periph B */ 37 AT91_PIOC 30 AT91_PERIPH_B AT91_PINCTRL_NONE /* PC30 periph B */
38 2 31 0x2 0x0>; /* PC31 periph B */ 38 AT91_PIOC 31 AT91_PERIPH_B AT91_PINCTRL_NONE>; /* PC31 periph B */
39 }; 39 };
40 }; 40 };
41 }; 41 };
diff --git a/arch/arm/boot/dts/at91sam9x25ek.dts b/arch/arm/boot/dts/at91sam9x25ek.dts
index 315250b4995e..494864836e83 100644
--- a/arch/arm/boot/dts/at91sam9x25ek.dts
+++ b/arch/arm/boot/dts/at91sam9x25ek.dts
@@ -7,8 +7,8 @@
7 * Licensed under GPLv2 or later. 7 * Licensed under GPLv2 or later.
8 */ 8 */
9/dts-v1/; 9/dts-v1/;
10/include/ "at91sam9x25.dtsi" 10#include "at91sam9x25.dtsi"
11/include/ "at91sam9x5ek.dtsi" 11#include "at91sam9x5ek.dtsi"
12 12
13/ { 13/ {
14 model = "Atmel AT91SAM9X25-EK"; 14 model = "Atmel AT91SAM9X25-EK";
diff --git a/arch/arm/boot/dts/at91sam9x35.dtsi b/arch/arm/boot/dts/at91sam9x35.dtsi
index ba67d83d17ac..1a3d525a1f5d 100644
--- a/arch/arm/boot/dts/at91sam9x35.dtsi
+++ b/arch/arm/boot/dts/at91sam9x35.dtsi
@@ -6,7 +6,7 @@
6 * Licensed under GPLv2. 6 * Licensed under GPLv2.
7 */ 7 */
8 8
9/include/ "at91sam9x5.dtsi" 9#include "at91sam9x5.dtsi"
10 10
11/ { 11/ {
12 model = "Atmel AT91SAM9X35 SoC"; 12 model = "Atmel AT91SAM9X35 SoC";
diff --git a/arch/arm/boot/dts/at91sam9x35ek.dts b/arch/arm/boot/dts/at91sam9x35ek.dts
index 6ad19a0d5424..343d32818ca3 100644
--- a/arch/arm/boot/dts/at91sam9x35ek.dts
+++ b/arch/arm/boot/dts/at91sam9x35ek.dts
@@ -7,8 +7,8 @@
7 * Licensed under GPLv2 or later. 7 * Licensed under GPLv2 or later.
8 */ 8 */
9/dts-v1/; 9/dts-v1/;
10/include/ "at91sam9x35.dtsi" 10#include "at91sam9x35.dtsi"
11/include/ "at91sam9x5ek.dtsi" 11#include "at91sam9x5ek.dtsi"
12 12
13/ { 13/ {
14 model = "Atmel AT91SAM9X35-EK"; 14 model = "Atmel AT91SAM9X35-EK";
diff --git a/arch/arm/boot/dts/at91sam9x5.dtsi b/arch/arm/boot/dts/at91sam9x5.dtsi
index 1145ac330fb7..57d45f5bea09 100644
--- a/arch/arm/boot/dts/at91sam9x5.dtsi
+++ b/arch/arm/boot/dts/at91sam9x5.dtsi
@@ -9,7 +9,11 @@
9 * Licensed under GPLv2 or later. 9 * Licensed under GPLv2 or later.
10 */ 10 */
11 11
12/include/ "skeleton.dtsi" 12#include "skeleton.dtsi"
13#include <dt-bindings/dma/at91.h>
14#include <dt-bindings/pinctrl/at91.h>
15#include <dt-bindings/interrupt-controller/irq.h>
16#include <dt-bindings/gpio/gpio.h>
13 17
14/ { 18/ {
15 model = "Atmel AT91SAM9x5 family SoC"; 19 model = "Atmel AT91SAM9x5 family SoC";
@@ -33,8 +37,12 @@
33 ssc0 = &ssc0; 37 ssc0 = &ssc0;
34 }; 38 };
35 cpus { 39 cpus {
36 cpu@0 { 40 #address-cells = <0>;
37 compatible = "arm,arm926ejs"; 41 #size-cells = <0>;
42
43 cpu {
44 compatible = "arm,arm926ej-s";
45 device_type = "cpu";
38 }; 46 };
39 }; 47 };
40 48
@@ -85,32 +93,32 @@
85 pit: timer@fffffe30 { 93 pit: timer@fffffe30 {
86 compatible = "atmel,at91sam9260-pit"; 94 compatible = "atmel,at91sam9260-pit";
87 reg = <0xfffffe30 0xf>; 95 reg = <0xfffffe30 0xf>;
88 interrupts = <1 4 7>; 96 interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>;
89 }; 97 };
90 98
91 tcb0: timer@f8008000 { 99 tcb0: timer@f8008000 {
92 compatible = "atmel,at91sam9x5-tcb"; 100 compatible = "atmel,at91sam9x5-tcb";
93 reg = <0xf8008000 0x100>; 101 reg = <0xf8008000 0x100>;
94 interrupts = <17 4 0>; 102 interrupts = <17 IRQ_TYPE_LEVEL_HIGH 0>;
95 }; 103 };
96 104
97 tcb1: timer@f800c000 { 105 tcb1: timer@f800c000 {
98 compatible = "atmel,at91sam9x5-tcb"; 106 compatible = "atmel,at91sam9x5-tcb";
99 reg = <0xf800c000 0x100>; 107 reg = <0xf800c000 0x100>;
100 interrupts = <17 4 0>; 108 interrupts = <17 IRQ_TYPE_LEVEL_HIGH 0>;
101 }; 109 };
102 110
103 dma0: dma-controller@ffffec00 { 111 dma0: dma-controller@ffffec00 {
104 compatible = "atmel,at91sam9g45-dma"; 112 compatible = "atmel,at91sam9g45-dma";
105 reg = <0xffffec00 0x200>; 113 reg = <0xffffec00 0x200>;
106 interrupts = <20 4 0>; 114 interrupts = <20 IRQ_TYPE_LEVEL_HIGH 0>;
107 #dma-cells = <2>; 115 #dma-cells = <2>;
108 }; 116 };
109 117
110 dma1: dma-controller@ffffee00 { 118 dma1: dma-controller@ffffee00 {
111 compatible = "atmel,at91sam9g45-dma"; 119 compatible = "atmel,at91sam9g45-dma";
112 reg = <0xffffee00 0x200>; 120 reg = <0xffffee00 0x200>;
113 interrupts = <21 4 0>; 121 interrupts = <21 IRQ_TYPE_LEVEL_HIGH 0>;
114 #dma-cells = <2>; 122 #dma-cells = <2>;
115 }; 123 };
116 124
@@ -124,297 +132,373 @@
124 dbgu { 132 dbgu {
125 pinctrl_dbgu: dbgu-0 { 133 pinctrl_dbgu: dbgu-0 {
126 atmel,pins = 134 atmel,pins =
127 <0 9 0x1 0x0 /* PA9 periph A */ 135 <AT91_PIOA 9 AT91_PERIPH_A AT91_PINCTRL_NONE /* PA9 periph A */
128 0 10 0x1 0x1>; /* PA10 periph A with pullup */ 136 AT91_PIOA 10 AT91_PERIPH_A AT91_PINCTRL_PULL_UP>; /* PA10 periph A with pullup */
129 }; 137 };
130 }; 138 };
131 139
132 usart0 { 140 usart0 {
133 pinctrl_usart0: usart0-0 { 141 pinctrl_usart0: usart0-0 {
134 atmel,pins = 142 atmel,pins =
135 <0 0 0x1 0x1 /* PA0 periph A with pullup */ 143 <AT91_PIOA 0 AT91_PERIPH_A AT91_PINCTRL_PULL_UP /* PA0 periph A with pullup */
136 0 1 0x1 0x0>; /* PA1 periph A */ 144 AT91_PIOA 1 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PA1 periph A */
137 }; 145 };
138 146
139 pinctrl_usart0_rts: usart0_rts-0 { 147 pinctrl_usart0_rts: usart0_rts-0 {
140 atmel,pins = 148 atmel,pins =
141 <0 2 0x1 0x0>; /* PA2 periph A */ 149 <AT91_PIOA 2 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PA2 periph A */
142 }; 150 };
143 151
144 pinctrl_usart0_cts: usart0_cts-0 { 152 pinctrl_usart0_cts: usart0_cts-0 {
145 atmel,pins = 153 atmel,pins =
146 <0 3 0x1 0x0>; /* PA3 periph A */ 154 <AT91_PIOA 3 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PA3 periph A */
147 }; 155 };
148 156
149 pinctrl_usart0_sck: usart0_sck-0 { 157 pinctrl_usart0_sck: usart0_sck-0 {
150 atmel,pins = 158 atmel,pins =
151 <0 4 0x1 0x0>; /* PA4 periph A */ 159 <AT91_PIOA 4 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PA4 periph A */
152 }; 160 };
153 }; 161 };
154 162
155 usart1 { 163 usart1 {
156 pinctrl_usart1: usart1-0 { 164 pinctrl_usart1: usart1-0 {
157 atmel,pins = 165 atmel,pins =
158 <0 5 0x1 0x1 /* PA5 periph A with pullup */ 166 <AT91_PIOA 5 AT91_PERIPH_A AT91_PINCTRL_PULL_UP /* PA5 periph A with pullup */
159 0 6 0x1 0x0>; /* PA6 periph A */ 167 AT91_PIOA 6 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PA6 periph A */
160 }; 168 };
161 169
162 pinctrl_usart1_rts: usart1_rts-0 { 170 pinctrl_usart1_rts: usart1_rts-0 {
163 atmel,pins = 171 atmel,pins =
164 <2 27 0x3 0x0>; /* PC27 periph C */ 172 <AT91_PIOC 27 AT91_PERIPH_C AT91_PINCTRL_NONE>; /* PC27 periph C */
165 }; 173 };
166 174
167 pinctrl_usart1_cts: usart1_cts-0 { 175 pinctrl_usart1_cts: usart1_cts-0 {
168 atmel,pins = 176 atmel,pins =
169 <2 28 0x3 0x0>; /* PC28 periph C */ 177 <AT91_PIOC 28 AT91_PERIPH_C AT91_PINCTRL_NONE>; /* PC28 periph C */
170 }; 178 };
171 179
172 pinctrl_usart1_sck: usart1_sck-0 { 180 pinctrl_usart1_sck: usart1_sck-0 {
173 atmel,pins = 181 atmel,pins =
174 <2 28 0x3 0x0>; /* PC29 periph C */ 182 <AT91_PIOC 28 AT91_PERIPH_C AT91_PINCTRL_NONE>; /* PC29 periph C */
175 }; 183 };
176 }; 184 };
177 185
178 usart2 { 186 usart2 {
179 pinctrl_usart2: usart2-0 { 187 pinctrl_usart2: usart2-0 {
180 atmel,pins = 188 atmel,pins =
181 <0 7 0x1 0x1 /* PA7 periph A with pullup */ 189 <AT91_PIOA 7 AT91_PERIPH_A AT91_PINCTRL_PULL_UP /* PA7 periph A with pullup */
182 0 8 0x1 0x0>; /* PA8 periph A */ 190 AT91_PIOA 8 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PA8 periph A */
183 }; 191 };
184 192
185 pinctrl_uart2_rts: uart2_rts-0 { 193 pinctrl_uart2_rts: uart2_rts-0 {
186 atmel,pins = 194 atmel,pins =
187 <1 0 0x2 0x0>; /* PB0 periph B */ 195 <AT91_PIOB 0 AT91_PERIPH_B AT91_PINCTRL_NONE>; /* PB0 periph B */
188 }; 196 };
189 197
190 pinctrl_uart2_cts: uart2_cts-0 { 198 pinctrl_uart2_cts: uart2_cts-0 {
191 atmel,pins = 199 atmel,pins =
192 <1 1 0x2 0x0>; /* PB1 periph B */ 200 <AT91_PIOB 1 AT91_PERIPH_B AT91_PINCTRL_NONE>; /* PB1 periph B */
193 }; 201 };
194 202
195 pinctrl_usart2_sck: usart2_sck-0 { 203 pinctrl_usart2_sck: usart2_sck-0 {
196 atmel,pins = 204 atmel,pins =
197 <1 2 0x2 0x0>; /* PB2 periph B */ 205 <AT91_PIOB 2 AT91_PERIPH_B AT91_PINCTRL_NONE>; /* PB2 periph B */
198 }; 206 };
199 }; 207 };
200 208
201 usart3 { 209 usart3 {
202 pinctrl_usart3: usart3-0 { 210 pinctrl_usart3: usart3-0 {
203 atmel,pins = 211 atmel,pins =
204 <2 22 0x2 0x1 /* PC22 periph B with pullup */ 212 <AT91_PIOC 22 AT91_PERIPH_B AT91_PINCTRL_PULL_UP /* PC22 periph B with pullup */
205 2 23 0x2 0x0>; /* PC23 periph B */ 213 AT91_PIOC 23 AT91_PERIPH_B AT91_PINCTRL_NONE>; /* PC23 periph B */
206 }; 214 };
207 215
208 pinctrl_usart3_rts: usart3_rts-0 { 216 pinctrl_usart3_rts: usart3_rts-0 {
209 atmel,pins = 217 atmel,pins =
210 <2 24 0x2 0x0>; /* PC24 periph B */ 218 <AT91_PIOC 24 AT91_PERIPH_B AT91_PINCTRL_NONE>; /* PC24 periph B */
211 }; 219 };
212 220
213 pinctrl_usart3_cts: usart3_cts-0 { 221 pinctrl_usart3_cts: usart3_cts-0 {
214 atmel,pins = 222 atmel,pins =
215 <2 25 0x2 0x0>; /* PC25 periph B */ 223 <AT91_PIOC 25 AT91_PERIPH_B AT91_PINCTRL_NONE>; /* PC25 periph B */
216 }; 224 };
217 225
218 pinctrl_usart3_sck: usart3_sck-0 { 226 pinctrl_usart3_sck: usart3_sck-0 {
219 atmel,pins = 227 atmel,pins =
220 <2 26 0x2 0x0>; /* PC26 periph B */ 228 <AT91_PIOC 26 AT91_PERIPH_B AT91_PINCTRL_NONE>; /* PC26 periph B */
221 }; 229 };
222 }; 230 };
223 231
224 uart0 { 232 uart0 {
225 pinctrl_uart0: uart0-0 { 233 pinctrl_uart0: uart0-0 {
226 atmel,pins = 234 atmel,pins =
227 <2 8 0x3 0x0 /* PC8 periph C */ 235 <AT91_PIOC 8 AT91_PERIPH_C AT91_PINCTRL_NONE /* PC8 periph C */
228 2 9 0x3 0x1>; /* PC9 periph C with pullup */ 236 AT91_PIOC 9 AT91_PERIPH_C AT91_PINCTRL_PULL_UP>; /* PC9 periph C with pullup */
229 }; 237 };
230 }; 238 };
231 239
232 uart1 { 240 uart1 {
233 pinctrl_uart1: uart1-0 { 241 pinctrl_uart1: uart1-0 {
234 atmel,pins = 242 atmel,pins =
235 <2 16 0x3 0x0 /* PC16 periph C */ 243 <AT91_PIOC 16 AT91_PERIPH_C AT91_PINCTRL_NONE /* PC16 periph C */
236 2 17 0x3 0x1>; /* PC17 periph C with pullup */ 244 AT91_PIOC 17 AT91_PERIPH_C AT91_PINCTRL_PULL_UP>; /* PC17 periph C with pullup */
237 }; 245 };
238 }; 246 };
239 247
240 nand { 248 nand {
241 pinctrl_nand: nand-0 { 249 pinctrl_nand: nand-0 {
242 atmel,pins = 250 atmel,pins =
243 <3 0 0x1 0x0 /* PD0 periph A Read Enable */ 251 <AT91_PIOD 0 AT91_PERIPH_A AT91_PINCTRL_NONE /* PD0 periph A Read Enable */
244 3 1 0x1 0x0 /* PD1 periph A Write Enable */ 252 AT91_PIOD 1 AT91_PERIPH_A AT91_PINCTRL_NONE /* PD1 periph A Write Enable */
245 3 2 0x1 0x0 /* PD2 periph A Address Latch Enable */ 253 AT91_PIOD 2 AT91_PERIPH_A AT91_PINCTRL_NONE /* PD2 periph A Address Latch Enable */
246 3 3 0x1 0x0 /* PD3 periph A Command Latch Enable */ 254 AT91_PIOD 3 AT91_PERIPH_A AT91_PINCTRL_NONE /* PD3 periph A Command Latch Enable */
247 3 4 0x0 0x1 /* PD4 gpio Chip Enable pin pull_up */ 255 AT91_PIOD 4 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP /* PD4 gpio Chip Enable pin pull_up */
248 3 5 0x0 0x1 /* PD5 gpio RDY/BUSY pin pull_up */ 256 AT91_PIOD 5 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP /* PD5 gpio RDY/BUSY pin pull_up */
249 3 6 0x1 0x0 /* PD6 periph A Data bit 0 */ 257 AT91_PIOD 6 AT91_PERIPH_A AT91_PINCTRL_NONE /* PD6 periph A Data bit 0 */
250 3 7 0x1 0x0 /* PD7 periph A Data bit 1 */ 258 AT91_PIOD 7 AT91_PERIPH_A AT91_PINCTRL_NONE /* PD7 periph A Data bit 1 */
251 3 8 0x1 0x0 /* PD8 periph A Data bit 2 */ 259 AT91_PIOD 8 AT91_PERIPH_A AT91_PINCTRL_NONE /* PD8 periph A Data bit 2 */
252 3 9 0x1 0x0 /* PD9 periph A Data bit 3 */ 260 AT91_PIOD 9 AT91_PERIPH_A AT91_PINCTRL_NONE /* PD9 periph A Data bit 3 */
253 3 10 0x1 0x0 /* PD10 periph A Data bit 4 */ 261 AT91_PIOD 10 AT91_PERIPH_A AT91_PINCTRL_NONE /* PD10 periph A Data bit 4 */
254 3 11 0x1 0x0 /* PD11 periph A Data bit 5 */ 262 AT91_PIOD 11 AT91_PERIPH_A AT91_PINCTRL_NONE /* PD11 periph A Data bit 5 */
255 3 12 0x1 0x0 /* PD12 periph A Data bit 6 */ 263 AT91_PIOD 12 AT91_PERIPH_A AT91_PINCTRL_NONE /* PD12 periph A Data bit 6 */
256 3 13 0x1 0x0>; /* PD13 periph A Data bit 7 */ 264 AT91_PIOD 13 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PD13 periph A Data bit 7 */
257 }; 265 };
258 266
259 pinctrl_nand_16bits: nand_16bits-0 { 267 pinctrl_nand_16bits: nand_16bits-0 {
260 atmel,pins = 268 atmel,pins =
261 <3 14 0x1 0x0 /* PD14 periph A Data bit 8 */ 269 <AT91_PIOD 14 AT91_PERIPH_A AT91_PINCTRL_NONE /* PD14 periph A Data bit 8 */
262 3 15 0x1 0x0 /* PD15 periph A Data bit 9 */ 270 AT91_PIOD 15 AT91_PERIPH_A AT91_PINCTRL_NONE /* PD15 periph A Data bit 9 */
263 3 16 0x1 0x0 /* PD16 periph A Data bit 10 */ 271 AT91_PIOD 16 AT91_PERIPH_A AT91_PINCTRL_NONE /* PD16 periph A Data bit 10 */
264 3 17 0x1 0x0 /* PD17 periph A Data bit 11 */ 272 AT91_PIOD 17 AT91_PERIPH_A AT91_PINCTRL_NONE /* PD17 periph A Data bit 11 */
265 3 18 0x1 0x0 /* PD18 periph A Data bit 12 */ 273 AT91_PIOD 18 AT91_PERIPH_A AT91_PINCTRL_NONE /* PD18 periph A Data bit 12 */
266 3 19 0x1 0x0 /* PD19 periph A Data bit 13 */ 274 AT91_PIOD 19 AT91_PERIPH_A AT91_PINCTRL_NONE /* PD19 periph A Data bit 13 */
267 3 20 0x1 0x0 /* PD20 periph A Data bit 14 */ 275 AT91_PIOD 20 AT91_PERIPH_A AT91_PINCTRL_NONE /* PD20 periph A Data bit 14 */
268 3 21 0x1 0x0>; /* PD21 periph A Data bit 15 */ 276 AT91_PIOD 21 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PD21 periph A Data bit 15 */
269 }; 277 };
270 }; 278 };
271 279
272 macb0 { 280 macb0 {
273 pinctrl_macb0_rmii: macb0_rmii-0 { 281 pinctrl_macb0_rmii: macb0_rmii-0 {
274 atmel,pins = 282 atmel,pins =
275 <1 0 0x1 0x0 /* PB0 periph A */ 283 <AT91_PIOB 0 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB0 periph A */
276 1 1 0x1 0x0 /* PB1 periph A */ 284 AT91_PIOB 1 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB1 periph A */
277 1 2 0x1 0x0 /* PB2 periph A */ 285 AT91_PIOB 2 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB2 periph A */
278 1 3 0x1 0x0 /* PB3 periph A */ 286 AT91_PIOB 3 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB3 periph A */
279 1 4 0x1 0x0 /* PB4 periph A */ 287 AT91_PIOB 4 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB4 periph A */
280 1 5 0x1 0x0 /* PB5 periph A */ 288 AT91_PIOB 5 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB5 periph A */
281 1 6 0x1 0x0 /* PB6 periph A */ 289 AT91_PIOB 6 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB6 periph A */
282 1 7 0x1 0x0 /* PB7 periph A */ 290 AT91_PIOB 7 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB7 periph A */
283 1 9 0x1 0x0 /* PB9 periph A */ 291 AT91_PIOB 9 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB9 periph A */
284 1 10 0x1 0x0>; /* PB10 periph A */ 292 AT91_PIOB 10 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PB10 periph A */
285 }; 293 };
286 294
287 pinctrl_macb0_rmii_mii: macb0_rmii_mii-0 { 295 pinctrl_macb0_rmii_mii: macb0_rmii_mii-0 {
288 atmel,pins = 296 atmel,pins =
289 <1 8 0x1 0x0 /* PB8 periph A */ 297 <AT91_PIOB 8 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB8 periph A */
290 1 11 0x1 0x0 /* PB11 periph A */ 298 AT91_PIOB 11 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB11 periph A */
291 1 12 0x1 0x0 /* PB12 periph A */ 299 AT91_PIOB 12 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB12 periph A */
292 1 13 0x1 0x0 /* PB13 periph A */ 300 AT91_PIOB 13 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB13 periph A */
293 1 14 0x1 0x0 /* PB14 periph A */ 301 AT91_PIOB 14 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB14 periph A */
294 1 15 0x1 0x0 /* PB15 periph A */ 302 AT91_PIOB 15 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB15 periph A */
295 1 16 0x1 0x0 /* PB16 periph A */ 303 AT91_PIOB 16 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB16 periph A */
296 1 17 0x1 0x0>; /* PB17 periph A */ 304 AT91_PIOB 17 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PB17 periph A */
297 }; 305 };
298 }; 306 };
299 307
300 mmc0 { 308 mmc0 {
301 pinctrl_mmc0_slot0_clk_cmd_dat0: mmc0_slot0_clk_cmd_dat0-0 { 309 pinctrl_mmc0_slot0_clk_cmd_dat0: mmc0_slot0_clk_cmd_dat0-0 {
302 atmel,pins = 310 atmel,pins =
303 <0 17 0x1 0x0 /* PA17 periph A */ 311 <AT91_PIOA 17 AT91_PERIPH_A AT91_PINCTRL_NONE /* PA17 periph A */
304 0 16 0x1 0x1 /* PA16 periph A with pullup */ 312 AT91_PIOA 16 AT91_PERIPH_A AT91_PINCTRL_PULL_UP /* PA16 periph A with pullup */
305 0 15 0x1 0x1>; /* PA15 periph A with pullup */ 313 AT91_PIOA 15 AT91_PERIPH_A AT91_PINCTRL_PULL_UP>; /* PA15 periph A with pullup */
306 }; 314 };
307 315
308 pinctrl_mmc0_slot0_dat1_3: mmc0_slot0_dat1_3-0 { 316 pinctrl_mmc0_slot0_dat1_3: mmc0_slot0_dat1_3-0 {
309 atmel,pins = 317 atmel,pins =
310 <0 18 0x1 0x1 /* PA18 periph A with pullup */ 318 <AT91_PIOA 18 AT91_PERIPH_A AT91_PINCTRL_PULL_UP /* PA18 periph A with pullup */
311 0 19 0x1 0x1 /* PA19 periph A with pullup */ 319 AT91_PIOA 19 AT91_PERIPH_A AT91_PINCTRL_PULL_UP /* PA19 periph A with pullup */
312 0 20 0x1 0x1>; /* PA20 periph A with pullup */ 320 AT91_PIOA 20 AT91_PERIPH_A AT91_PINCTRL_PULL_UP>; /* PA20 periph A with pullup */
313 }; 321 };
314 }; 322 };
315 323
316 mmc1 { 324 mmc1 {
317 pinctrl_mmc1_slot0_clk_cmd_dat0: mmc1_slot0_clk_cmd_dat0-0 { 325 pinctrl_mmc1_slot0_clk_cmd_dat0: mmc1_slot0_clk_cmd_dat0-0 {
318 atmel,pins = 326 atmel,pins =
319 <0 13 0x2 0x0 /* PA13 periph B */ 327 <AT91_PIOA 13 AT91_PERIPH_B AT91_PINCTRL_NONE /* PA13 periph B */
320 0 12 0x2 0x1 /* PA12 periph B with pullup */ 328 AT91_PIOA 12 AT91_PERIPH_B AT91_PINCTRL_PULL_UP /* PA12 periph B with pullup */
321 0 11 0x2 0x1>; /* PA11 periph B with pullup */ 329 AT91_PIOA 11 AT91_PERIPH_B AT91_PINCTRL_PULL_UP>; /* PA11 periph B with pullup */
322 }; 330 };
323 331
324 pinctrl_mmc1_slot0_dat1_3: mmc1_slot0_dat1_3-0 { 332 pinctrl_mmc1_slot0_dat1_3: mmc1_slot0_dat1_3-0 {
325 atmel,pins = 333 atmel,pins =
326 <0 2 0x2 0x1 /* PA2 periph B with pullup */ 334 <AT91_PIOA 2 AT91_PERIPH_B AT91_PINCTRL_PULL_UP /* PA2 periph B with pullup */
327 0 3 0x2 0x1 /* PA3 periph B with pullup */ 335 AT91_PIOA 3 AT91_PERIPH_B AT91_PINCTRL_PULL_UP /* PA3 periph B with pullup */
328 0 4 0x2 0x1>; /* PA4 periph B with pullup */ 336 AT91_PIOA 4 AT91_PERIPH_B AT91_PINCTRL_PULL_UP>; /* PA4 periph B with pullup */
329 }; 337 };
330 }; 338 };
331 339
332 ssc0 { 340 ssc0 {
333 pinctrl_ssc0_tx: ssc0_tx-0 { 341 pinctrl_ssc0_tx: ssc0_tx-0 {
334 atmel,pins = 342 atmel,pins =
335 <0 24 0x2 0x0 /* PA24 periph B */ 343 <AT91_PIOA 24 AT91_PERIPH_B AT91_PINCTRL_NONE /* PA24 periph B */
336 0 25 0x2 0x0 /* PA25 periph B */ 344 AT91_PIOA 25 AT91_PERIPH_B AT91_PINCTRL_NONE /* PA25 periph B */
337 0 26 0x2 0x0>; /* PA26 periph B */ 345 AT91_PIOA 26 AT91_PERIPH_B AT91_PINCTRL_NONE>; /* PA26 periph B */
338 }; 346 };
339 347
340 pinctrl_ssc0_rx: ssc0_rx-0 { 348 pinctrl_ssc0_rx: ssc0_rx-0 {
341 atmel,pins = 349 atmel,pins =
342 <0 27 0x2 0x0 /* PA27 periph B */ 350 <AT91_PIOA 27 AT91_PERIPH_B AT91_PINCTRL_NONE /* PA27 periph B */
343 0 28 0x2 0x0 /* PA28 periph B */ 351 AT91_PIOA 28 AT91_PERIPH_B AT91_PINCTRL_NONE /* PA28 periph B */
344 0 29 0x2 0x0>; /* PA29 periph B */ 352 AT91_PIOA 29 AT91_PERIPH_B AT91_PINCTRL_NONE>; /* PA29 periph B */
345 }; 353 };
346 }; 354 };
347 355
348 spi0 { 356 spi0 {
349 pinctrl_spi0: spi0-0 { 357 pinctrl_spi0: spi0-0 {
350 atmel,pins = 358 atmel,pins =
351 <0 11 0x1 0x0 /* PA11 periph A SPI0_MISO pin */ 359 <AT91_PIOA 11 AT91_PERIPH_A AT91_PINCTRL_NONE /* PA11 periph A SPI0_MISO pin */
352 0 12 0x1 0x0 /* PA12 periph A SPI0_MOSI pin */ 360 AT91_PIOA 12 AT91_PERIPH_A AT91_PINCTRL_NONE /* PA12 periph A SPI0_MOSI pin */
353 0 13 0x1 0x0>; /* PA13 periph A SPI0_SPCK pin */ 361 AT91_PIOA 13 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PA13 periph A SPI0_SPCK pin */
354 }; 362 };
355 }; 363 };
356 364
357 spi1 { 365 spi1 {
358 pinctrl_spi1: spi1-0 { 366 pinctrl_spi1: spi1-0 {
359 atmel,pins = 367 atmel,pins =
360 <0 21 0x2 0x0 /* PA21 periph B SPI1_MISO pin */ 368 <AT91_PIOA 21 AT91_PERIPH_B AT91_PINCTRL_NONE /* PA21 periph B SPI1_MISO pin */
361 0 22 0x2 0x0 /* PA22 periph B SPI1_MOSI pin */ 369 AT91_PIOA 22 AT91_PERIPH_B AT91_PINCTRL_NONE /* PA22 periph B SPI1_MOSI pin */
362 0 23 0x2 0x0>; /* PA23 periph B SPI1_SPCK pin */ 370 AT91_PIOA 23 AT91_PERIPH_B AT91_PINCTRL_NONE>; /* PA23 periph B SPI1_SPCK pin */
363 }; 371 };
364 }; 372 };
365 373
366 i2c0 { 374 i2c0 {
367 pinctrl_i2c0: i2c0-0 { 375 pinctrl_i2c0: i2c0-0 {
368 atmel,pins = 376 atmel,pins =
369 <0 30 0x1 0x0 /* PA30 periph A I2C0 data */ 377 <AT91_PIOA 30 AT91_PERIPH_A AT91_PINCTRL_NONE /* PA30 periph A I2C0 data */
370 0 31 0x1 0x0>; /* PA31 periph A I2C0 clock */ 378 AT91_PIOA 31 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PA31 periph A I2C0 clock */
371 }; 379 };
372 }; 380 };
373 381
374 i2c1 { 382 i2c1 {
375 pinctrl_i2c1: i2c1-0 { 383 pinctrl_i2c1: i2c1-0 {
376 atmel,pins = 384 atmel,pins =
377 <2 0 0x3 0x0 /* PC0 periph C I2C1 data */ 385 <AT91_PIOC 0 AT91_PERIPH_C AT91_PINCTRL_NONE /* PC0 periph C I2C1 data */
378 2 1 0x3 0x0>; /* PC1 periph C I2C1 clock */ 386 AT91_PIOC 1 AT91_PERIPH_C AT91_PINCTRL_NONE>; /* PC1 periph C I2C1 clock */
379 }; 387 };
380 }; 388 };
381 389
382 i2c2 { 390 i2c2 {
383 pinctrl_i2c2: i2c2-0 { 391 pinctrl_i2c2: i2c2-0 {
384 atmel,pins = 392 atmel,pins =
385 <1 4 0x2 0x0 /* PB4 periph B I2C2 data */ 393 <AT91_PIOB 4 AT91_PERIPH_B AT91_PINCTRL_NONE /* PB4 periph B I2C2 data */
386 1 5 0x2 0x0>; /* PB5 periph B I2C2 clock */ 394 AT91_PIOB 5 AT91_PERIPH_B AT91_PINCTRL_NONE>; /* PB5 periph B I2C2 clock */
387 }; 395 };
388 }; 396 };
389 397
390 i2c_gpio0 { 398 i2c_gpio0 {
391 pinctrl_i2c_gpio0: i2c_gpio0-0 { 399 pinctrl_i2c_gpio0: i2c_gpio0-0 {
392 atmel,pins = 400 atmel,pins =
393 <0 30 0x0 0x2 /* PA30 gpio multidrive I2C0 data */ 401 <AT91_PIOA 30 AT91_PERIPH_GPIO AT91_PINCTRL_MULTI_DRIVE /* PA30 gpio multidrive I2C0 data */
394 0 31 0x0 0x2>; /* PA31 gpio multidrive I2C0 clock */ 402 AT91_PIOA 31 AT91_PERIPH_GPIO AT91_PINCTRL_MULTI_DRIVE>; /* PA31 gpio multidrive I2C0 clock */
395 }; 403 };
396 }; 404 };
397 405
398 i2c_gpio1 { 406 i2c_gpio1 {
399 pinctrl_i2c_gpio1: i2c_gpio1-0 { 407 pinctrl_i2c_gpio1: i2c_gpio1-0 {
400 atmel,pins = 408 atmel,pins =
401 <2 0 0x0 0x2 /* PC0 gpio multidrive I2C1 data */ 409 <AT91_PIOC 0 AT91_PERIPH_GPIO AT91_PINCTRL_MULTI_DRIVE /* PC0 gpio multidrive I2C1 data */
402 2 1 0x0 0x2>; /* PC1 gpio multidrive I2C1 clock */ 410 AT91_PIOC 1 AT91_PERIPH_GPIO AT91_PINCTRL_MULTI_DRIVE>; /* PC1 gpio multidrive I2C1 clock */
403 }; 411 };
404 }; 412 };
405 413
406 i2c_gpio2 { 414 i2c_gpio2 {
407 pinctrl_i2c_gpio2: i2c_gpio2-0 { 415 pinctrl_i2c_gpio2: i2c_gpio2-0 {
408 atmel,pins = 416 atmel,pins =
409 <1 4 0x0 0x2 /* PB4 gpio multidrive I2C2 data */ 417 <AT91_PIOB 4 AT91_PERIPH_GPIO AT91_PINCTRL_MULTI_DRIVE /* PB4 gpio multidrive I2C2 data */
410 1 5 0x0 0x2>; /* PB5 gpio multidrive I2C2 clock */ 418 AT91_PIOB 5 AT91_PERIPH_GPIO AT91_PINCTRL_MULTI_DRIVE>; /* PB5 gpio multidrive I2C2 clock */
419 };
420 };
421
422 tcb0 {
423 pinctrl_tcb0_tclk0: tcb0_tclk0-0 {
424 atmel,pins = <AT91_PIOA 24 AT91_PERIPH_A AT91_PINCTRL_NONE>;
425 };
426
427 pinctrl_tcb0_tclk1: tcb0_tclk1-0 {
428 atmel,pins = <AT91_PIOA 25 AT91_PERIPH_A AT91_PINCTRL_NONE>;
429 };
430
431 pinctrl_tcb0_tclk2: tcb0_tclk2-0 {
432 atmel,pins = <AT91_PIOA 26 AT91_PERIPH_A AT91_PINCTRL_NONE>;
433 };
434
435 pinctrl_tcb0_tioa0: tcb0_tioa0-0 {
436 atmel,pins = <AT91_PIOA 21 AT91_PERIPH_A AT91_PINCTRL_NONE>;
437 };
438
439 pinctrl_tcb0_tioa1: tcb0_tioa1-0 {
440 atmel,pins = <AT91_PIOA 22 AT91_PERIPH_A AT91_PINCTRL_NONE>;
441 };
442
443 pinctrl_tcb0_tioa2: tcb0_tioa2-0 {
444 atmel,pins = <AT91_PIOA 23 AT91_PERIPH_A AT91_PINCTRL_NONE>;
445 };
446
447 pinctrl_tcb0_tiob0: tcb0_tiob0-0 {
448 atmel,pins = <AT91_PIOA 27 AT91_PERIPH_A AT91_PINCTRL_NONE>;
449 };
450
451 pinctrl_tcb0_tiob1: tcb0_tiob1-0 {
452 atmel,pins = <AT91_PIOA 28 AT91_PERIPH_A AT91_PINCTRL_NONE>;
453 };
454
455 pinctrl_tcb0_tiob2: tcb0_tiob2-0 {
456 atmel,pins = <AT91_PIOA 29 AT91_PERIPH_A AT91_PINCTRL_NONE>;
457 };
458 };
459
460 tcb1 {
461 pinctrl_tcb1_tclk0: tcb1_tclk0-0 {
462 atmel,pins = <AT91_PIOC 4 AT91_PERIPH_C AT91_PINCTRL_NONE>;
463 };
464
465 pinctrl_tcb1_tclk1: tcb1_tclk1-0 {
466 atmel,pins = <AT91_PIOC 7 AT91_PERIPH_C AT91_PINCTRL_NONE>;
467 };
468
469 pinctrl_tcb1_tclk2: tcb1_tclk2-0 {
470 atmel,pins = <AT91_PIOC 14 AT91_PERIPH_C AT91_PINCTRL_NONE>;
471 };
472
473 pinctrl_tcb1_tioa0: tcb1_tioa0-0 {
474 atmel,pins = <AT91_PIOC 2 AT91_PERIPH_C AT91_PINCTRL_NONE>;
475 };
476
477 pinctrl_tcb1_tioa1: tcb1_tioa1-0 {
478 atmel,pins = <AT91_PIOC 5 AT91_PERIPH_C AT91_PINCTRL_NONE>;
479 };
480
481 pinctrl_tcb1_tioa2: tcb1_tioa2-0 {
482 atmel,pins = <AT91_PIOC 12 AT91_PERIPH_C AT91_PINCTRL_NONE>;
483 };
484
485 pinctrl_tcb1_tiob0: tcb1_tiob0-0 {
486 atmel,pins = <AT91_PIOC 3 AT91_PERIPH_C AT91_PINCTRL_NONE>;
487 };
488
489 pinctrl_tcb1_tiob1: tcb1_tiob1-0 {
490 atmel,pins = <AT91_PIOC 6 AT91_PERIPH_C AT91_PINCTRL_NONE>;
491 };
492
493 pinctrl_tcb1_tiob2: tcb1_tiob2-0 {
494 atmel,pins = <AT91_PIOC 13 AT91_PERIPH_C AT91_PINCTRL_NONE>;
411 }; 495 };
412 }; 496 };
413 497
414 pioA: gpio@fffff400 { 498 pioA: gpio@fffff400 {
415 compatible = "atmel,at91sam9x5-gpio", "atmel,at91rm9200-gpio"; 499 compatible = "atmel,at91sam9x5-gpio", "atmel,at91rm9200-gpio";
416 reg = <0xfffff400 0x200>; 500 reg = <0xfffff400 0x200>;
417 interrupts = <2 4 1>; 501 interrupts = <2 IRQ_TYPE_LEVEL_HIGH 1>;
418 #gpio-cells = <2>; 502 #gpio-cells = <2>;
419 gpio-controller; 503 gpio-controller;
420 interrupt-controller; 504 interrupt-controller;
@@ -424,7 +508,7 @@
424 pioB: gpio@fffff600 { 508 pioB: gpio@fffff600 {
425 compatible = "atmel,at91sam9x5-gpio", "atmel,at91rm9200-gpio"; 509 compatible = "atmel,at91sam9x5-gpio", "atmel,at91rm9200-gpio";
426 reg = <0xfffff600 0x200>; 510 reg = <0xfffff600 0x200>;
427 interrupts = <2 4 1>; 511 interrupts = <2 IRQ_TYPE_LEVEL_HIGH 1>;
428 #gpio-cells = <2>; 512 #gpio-cells = <2>;
429 gpio-controller; 513 gpio-controller;
430 #gpio-lines = <19>; 514 #gpio-lines = <19>;
@@ -435,7 +519,7 @@
435 pioC: gpio@fffff800 { 519 pioC: gpio@fffff800 {
436 compatible = "atmel,at91sam9x5-gpio", "atmel,at91rm9200-gpio"; 520 compatible = "atmel,at91sam9x5-gpio", "atmel,at91rm9200-gpio";
437 reg = <0xfffff800 0x200>; 521 reg = <0xfffff800 0x200>;
438 interrupts = <3 4 1>; 522 interrupts = <3 IRQ_TYPE_LEVEL_HIGH 1>;
439 #gpio-cells = <2>; 523 #gpio-cells = <2>;
440 gpio-controller; 524 gpio-controller;
441 interrupt-controller; 525 interrupt-controller;
@@ -445,7 +529,7 @@
445 pioD: gpio@fffffa00 { 529 pioD: gpio@fffffa00 {
446 compatible = "atmel,at91sam9x5-gpio", "atmel,at91rm9200-gpio"; 530 compatible = "atmel,at91sam9x5-gpio", "atmel,at91rm9200-gpio";
447 reg = <0xfffffa00 0x200>; 531 reg = <0xfffffa00 0x200>;
448 interrupts = <3 4 1>; 532 interrupts = <3 IRQ_TYPE_LEVEL_HIGH 1>;
449 #gpio-cells = <2>; 533 #gpio-cells = <2>;
450 gpio-controller; 534 gpio-controller;
451 #gpio-lines = <22>; 535 #gpio-lines = <22>;
@@ -457,7 +541,7 @@
457 ssc0: ssc@f0010000 { 541 ssc0: ssc@f0010000 {
458 compatible = "atmel,at91sam9g45-ssc"; 542 compatible = "atmel,at91sam9g45-ssc";
459 reg = <0xf0010000 0x4000>; 543 reg = <0xf0010000 0x4000>;
460 interrupts = <28 4 5>; 544 interrupts = <28 IRQ_TYPE_LEVEL_HIGH 5>;
461 pinctrl-names = "default"; 545 pinctrl-names = "default";
462 pinctrl-0 = <&pinctrl_ssc0_tx &pinctrl_ssc0_rx>; 546 pinctrl-0 = <&pinctrl_ssc0_tx &pinctrl_ssc0_rx>;
463 status = "disabled"; 547 status = "disabled";
@@ -466,8 +550,8 @@
466 mmc0: mmc@f0008000 { 550 mmc0: mmc@f0008000 {
467 compatible = "atmel,hsmci"; 551 compatible = "atmel,hsmci";
468 reg = <0xf0008000 0x600>; 552 reg = <0xf0008000 0x600>;
469 interrupts = <12 4 0>; 553 interrupts = <12 IRQ_TYPE_LEVEL_HIGH 0>;
470 dmas = <&dma0 1 0>; 554 dmas = <&dma0 1 AT91_DMA_CFG_PER_ID(0)>;
471 dma-names = "rxtx"; 555 dma-names = "rxtx";
472 #address-cells = <1>; 556 #address-cells = <1>;
473 #size-cells = <0>; 557 #size-cells = <0>;
@@ -477,8 +561,8 @@
477 mmc1: mmc@f000c000 { 561 mmc1: mmc@f000c000 {
478 compatible = "atmel,hsmci"; 562 compatible = "atmel,hsmci";
479 reg = <0xf000c000 0x600>; 563 reg = <0xf000c000 0x600>;
480 interrupts = <26 4 0>; 564 interrupts = <26 IRQ_TYPE_LEVEL_HIGH 0>;
481 dmas = <&dma1 1 0>; 565 dmas = <&dma1 1 AT91_DMA_CFG_PER_ID(0)>;
482 dma-names = "rxtx"; 566 dma-names = "rxtx";
483 #address-cells = <1>; 567 #address-cells = <1>;
484 #size-cells = <0>; 568 #size-cells = <0>;
@@ -488,7 +572,7 @@
488 dbgu: serial@fffff200 { 572 dbgu: serial@fffff200 {
489 compatible = "atmel,at91sam9260-usart"; 573 compatible = "atmel,at91sam9260-usart";
490 reg = <0xfffff200 0x200>; 574 reg = <0xfffff200 0x200>;
491 interrupts = <1 4 7>; 575 interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>;
492 pinctrl-names = "default"; 576 pinctrl-names = "default";
493 pinctrl-0 = <&pinctrl_dbgu>; 577 pinctrl-0 = <&pinctrl_dbgu>;
494 status = "disabled"; 578 status = "disabled";
@@ -497,7 +581,7 @@
497 usart0: serial@f801c000 { 581 usart0: serial@f801c000 {
498 compatible = "atmel,at91sam9260-usart"; 582 compatible = "atmel,at91sam9260-usart";
499 reg = <0xf801c000 0x200>; 583 reg = <0xf801c000 0x200>;
500 interrupts = <5 4 5>; 584 interrupts = <5 IRQ_TYPE_LEVEL_HIGH 5>;
501 pinctrl-names = "default"; 585 pinctrl-names = "default";
502 pinctrl-0 = <&pinctrl_usart0>; 586 pinctrl-0 = <&pinctrl_usart0>;
503 status = "disabled"; 587 status = "disabled";
@@ -506,7 +590,7 @@
506 usart1: serial@f8020000 { 590 usart1: serial@f8020000 {
507 compatible = "atmel,at91sam9260-usart"; 591 compatible = "atmel,at91sam9260-usart";
508 reg = <0xf8020000 0x200>; 592 reg = <0xf8020000 0x200>;
509 interrupts = <6 4 5>; 593 interrupts = <6 IRQ_TYPE_LEVEL_HIGH 5>;
510 pinctrl-names = "default"; 594 pinctrl-names = "default";
511 pinctrl-0 = <&pinctrl_usart1>; 595 pinctrl-0 = <&pinctrl_usart1>;
512 status = "disabled"; 596 status = "disabled";
@@ -515,7 +599,7 @@
515 usart2: serial@f8024000 { 599 usart2: serial@f8024000 {
516 compatible = "atmel,at91sam9260-usart"; 600 compatible = "atmel,at91sam9260-usart";
517 reg = <0xf8024000 0x200>; 601 reg = <0xf8024000 0x200>;
518 interrupts = <7 4 5>; 602 interrupts = <7 IRQ_TYPE_LEVEL_HIGH 5>;
519 pinctrl-names = "default"; 603 pinctrl-names = "default";
520 pinctrl-0 = <&pinctrl_usart2>; 604 pinctrl-0 = <&pinctrl_usart2>;
521 status = "disabled"; 605 status = "disabled";
@@ -524,7 +608,7 @@
524 macb0: ethernet@f802c000 { 608 macb0: ethernet@f802c000 {
525 compatible = "cdns,at32ap7000-macb", "cdns,macb"; 609 compatible = "cdns,at32ap7000-macb", "cdns,macb";
526 reg = <0xf802c000 0x100>; 610 reg = <0xf802c000 0x100>;
527 interrupts = <24 4 3>; 611 interrupts = <24 IRQ_TYPE_LEVEL_HIGH 3>;
528 pinctrl-names = "default"; 612 pinctrl-names = "default";
529 pinctrl-0 = <&pinctrl_macb0_rmii>; 613 pinctrl-0 = <&pinctrl_macb0_rmii>;
530 status = "disabled"; 614 status = "disabled";
@@ -533,16 +617,16 @@
533 macb1: ethernet@f8030000 { 617 macb1: ethernet@f8030000 {
534 compatible = "cdns,at32ap7000-macb", "cdns,macb"; 618 compatible = "cdns,at32ap7000-macb", "cdns,macb";
535 reg = <0xf8030000 0x100>; 619 reg = <0xf8030000 0x100>;
536 interrupts = <27 4 3>; 620 interrupts = <27 IRQ_TYPE_LEVEL_HIGH 3>;
537 status = "disabled"; 621 status = "disabled";
538 }; 622 };
539 623
540 i2c0: i2c@f8010000 { 624 i2c0: i2c@f8010000 {
541 compatible = "atmel,at91sam9x5-i2c"; 625 compatible = "atmel,at91sam9x5-i2c";
542 reg = <0xf8010000 0x100>; 626 reg = <0xf8010000 0x100>;
543 interrupts = <9 4 6>; 627 interrupts = <9 IRQ_TYPE_LEVEL_HIGH 6>;
544 dmas = <&dma0 1 7>, 628 dmas = <&dma0 1 AT91_DMA_CFG_PER_ID(7)>,
545 <&dma0 1 8>; 629 <&dma0 1 AT91_DMA_CFG_PER_ID(8)>;
546 dma-names = "tx", "rx"; 630 dma-names = "tx", "rx";
547 #address-cells = <1>; 631 #address-cells = <1>;
548 #size-cells = <0>; 632 #size-cells = <0>;
@@ -554,9 +638,9 @@
554 i2c1: i2c@f8014000 { 638 i2c1: i2c@f8014000 {
555 compatible = "atmel,at91sam9x5-i2c"; 639 compatible = "atmel,at91sam9x5-i2c";
556 reg = <0xf8014000 0x100>; 640 reg = <0xf8014000 0x100>;
557 interrupts = <10 4 6>; 641 interrupts = <10 IRQ_TYPE_LEVEL_HIGH 6>;
558 dmas = <&dma1 1 5>, 642 dmas = <&dma1 1 AT91_DMA_CFG_PER_ID(5)>,
559 <&dma1 1 6>; 643 <&dma1 1 AT91_DMA_CFG_PER_ID(6)>;
560 dma-names = "tx", "rx"; 644 dma-names = "tx", "rx";
561 #address-cells = <1>; 645 #address-cells = <1>;
562 #size-cells = <0>; 646 #size-cells = <0>;
@@ -568,9 +652,9 @@
568 i2c2: i2c@f8018000 { 652 i2c2: i2c@f8018000 {
569 compatible = "atmel,at91sam9x5-i2c"; 653 compatible = "atmel,at91sam9x5-i2c";
570 reg = <0xf8018000 0x100>; 654 reg = <0xf8018000 0x100>;
571 interrupts = <11 4 6>; 655 interrupts = <11 IRQ_TYPE_LEVEL_HIGH 6>;
572 dmas = <&dma0 1 9>, 656 dmas = <&dma0 1 AT91_DMA_CFG_PER_ID(9)>,
573 <&dma0 1 10>; 657 <&dma0 1 AT91_DMA_CFG_PER_ID(10)>;
574 dma-names = "tx", "rx"; 658 dma-names = "tx", "rx";
575 #address-cells = <1>; 659 #address-cells = <1>;
576 #size-cells = <0>; 660 #size-cells = <0>;
@@ -579,10 +663,28 @@
579 status = "disabled"; 663 status = "disabled";
580 }; 664 };
581 665
666 uart0: serial@f8040000 {
667 compatible = "atmel,at91sam9260-usart";
668 reg = <0xf8040000 0x200>;
669 interrupts = <15 IRQ_TYPE_LEVEL_HIGH 5>;
670 pinctrl-names = "default";
671 pinctrl-0 = <&pinctrl_uart0>;
672 status = "disabled";
673 };
674
675 uart1: serial@f8044000 {
676 compatible = "atmel,at91sam9260-usart";
677 reg = <0xf8044000 0x200>;
678 interrupts = <16 IRQ_TYPE_LEVEL_HIGH 5>;
679 pinctrl-names = "default";
680 pinctrl-0 = <&pinctrl_uart1>;
681 status = "disabled";
682 };
683
582 adc0: adc@f804c000 { 684 adc0: adc@f804c000 {
583 compatible = "atmel,at91sam9260-adc"; 685 compatible = "atmel,at91sam9260-adc";
584 reg = <0xf804c000 0x100>; 686 reg = <0xf804c000 0x100>;
585 interrupts = <19 4 0>; 687 interrupts = <19 IRQ_TYPE_LEVEL_HIGH 0>;
586 atmel,adc-use-external; 688 atmel,adc-use-external;
587 atmel,adc-channels-used = <0xffff>; 689 atmel,adc-channels-used = <0xffff>;
588 atmel,adc-vref = <3300>; 690 atmel,adc-vref = <3300>;
@@ -625,7 +727,10 @@
625 #size-cells = <0>; 727 #size-cells = <0>;
626 compatible = "atmel,at91rm9200-spi"; 728 compatible = "atmel,at91rm9200-spi";
627 reg = <0xf0000000 0x100>; 729 reg = <0xf0000000 0x100>;
628 interrupts = <13 4 3>; 730 interrupts = <13 IRQ_TYPE_LEVEL_HIGH 3>;
731 dmas = <&dma0 1 AT91_DMA_CFG_PER_ID(1)>,
732 <&dma0 1 AT91_DMA_CFG_PER_ID(2)>;
733 dma-names = "tx", "rx";
629 pinctrl-names = "default"; 734 pinctrl-names = "default";
630 pinctrl-0 = <&pinctrl_spi0>; 735 pinctrl-0 = <&pinctrl_spi0>;
631 status = "disabled"; 736 status = "disabled";
@@ -636,16 +741,87 @@
636 #size-cells = <0>; 741 #size-cells = <0>;
637 compatible = "atmel,at91rm9200-spi"; 742 compatible = "atmel,at91rm9200-spi";
638 reg = <0xf0004000 0x100>; 743 reg = <0xf0004000 0x100>;
639 interrupts = <14 4 3>; 744 interrupts = <14 IRQ_TYPE_LEVEL_HIGH 3>;
745 dmas = <&dma1 1 AT91_DMA_CFG_PER_ID(1)>,
746 <&dma1 1 AT91_DMA_CFG_PER_ID(2)>;
747 dma-names = "tx", "rx";
640 pinctrl-names = "default"; 748 pinctrl-names = "default";
641 pinctrl-0 = <&pinctrl_spi1>; 749 pinctrl-0 = <&pinctrl_spi1>;
642 status = "disabled"; 750 status = "disabled";
643 }; 751 };
644 752
753 usb2: gadget@f803c000 {
754 #address-cells = <1>;
755 #size-cells = <0>;
756 compatible = "atmel,at91sam9rl-udc";
757 reg = <0x00500000 0x80000
758 0xf803c000 0x400>;
759 interrupts = <23 IRQ_TYPE_LEVEL_HIGH 0>;
760 status = "disabled";
761
762 ep0 {
763 reg = <0>;
764 atmel,fifo-size = <64>;
765 atmel,nb-banks = <1>;
766 };
767
768 ep1 {
769 reg = <1>;
770 atmel,fifo-size = <1024>;
771 atmel,nb-banks = <2>;
772 atmel,can-dma;
773 atmel,can-isoc;
774 };
775
776 ep2 {
777 reg = <2>;
778 atmel,fifo-size = <1024>;
779 atmel,nb-banks = <2>;
780 atmel,can-dma;
781 atmel,can-isoc;
782 };
783
784 ep3 {
785 reg = <3>;
786 atmel,fifo-size = <1024>;
787 atmel,nb-banks = <3>;
788 atmel,can-dma;
789 };
790
791 ep4 {
792 reg = <4>;
793 atmel,fifo-size = <1024>;
794 atmel,nb-banks = <3>;
795 atmel,can-dma;
796 };
797
798 ep5 {
799 reg = <5>;
800 atmel,fifo-size = <1024>;
801 atmel,nb-banks = <3>;
802 atmel,can-dma;
803 atmel,can-isoc;
804 };
805
806 ep6 {
807 reg = <6>;
808 atmel,fifo-size = <1024>;
809 atmel,nb-banks = <3>;
810 atmel,can-dma;
811 atmel,can-isoc;
812 };
813 };
814
815 watchdog@fffffe40 {
816 compatible = "atmel,at91sam9260-wdt";
817 reg = <0xfffffe40 0x10>;
818 status = "disabled";
819 };
820
645 rtc@fffffeb0 { 821 rtc@fffffeb0 {
646 compatible = "atmel,at91rm9200-rtc"; 822 compatible = "atmel,at91sam9x5-rtc";
647 reg = <0xfffffeb0 0x40>; 823 reg = <0xfffffeb0 0x40>;
648 interrupts = <1 4 7>; 824 interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>;
649 status = "disabled"; 825 status = "disabled";
650 }; 826 };
651 }; 827 };
@@ -664,8 +840,8 @@
664 atmel,nand-cmd-offset = <22>; 840 atmel,nand-cmd-offset = <22>;
665 pinctrl-names = "default"; 841 pinctrl-names = "default";
666 pinctrl-0 = <&pinctrl_nand>; 842 pinctrl-0 = <&pinctrl_nand>;
667 gpios = <&pioD 5 0 843 gpios = <&pioD 5 GPIO_ACTIVE_HIGH
668 &pioD 4 0 844 &pioD 4 GPIO_ACTIVE_HIGH
669 0 845 0
670 >; 846 >;
671 status = "disabled"; 847 status = "disabled";
@@ -674,22 +850,22 @@
674 usb0: ohci@00600000 { 850 usb0: ohci@00600000 {
675 compatible = "atmel,at91rm9200-ohci", "usb-ohci"; 851 compatible = "atmel,at91rm9200-ohci", "usb-ohci";
676 reg = <0x00600000 0x100000>; 852 reg = <0x00600000 0x100000>;
677 interrupts = <22 4 2>; 853 interrupts = <22 IRQ_TYPE_LEVEL_HIGH 2>;
678 status = "disabled"; 854 status = "disabled";
679 }; 855 };
680 856
681 usb1: ehci@00700000 { 857 usb1: ehci@00700000 {
682 compatible = "atmel,at91sam9g45-ehci", "usb-ehci"; 858 compatible = "atmel,at91sam9g45-ehci", "usb-ehci";
683 reg = <0x00700000 0x100000>; 859 reg = <0x00700000 0x100000>;
684 interrupts = <22 4 2>; 860 interrupts = <22 IRQ_TYPE_LEVEL_HIGH 2>;
685 status = "disabled"; 861 status = "disabled";
686 }; 862 };
687 }; 863 };
688 864
689 i2c@0 { 865 i2c@0 {
690 compatible = "i2c-gpio"; 866 compatible = "i2c-gpio";
691 gpios = <&pioA 30 0 /* sda */ 867 gpios = <&pioA 30 GPIO_ACTIVE_HIGH /* sda */
692 &pioA 31 0 /* scl */ 868 &pioA 31 GPIO_ACTIVE_HIGH /* scl */
693 >; 869 >;
694 i2c-gpio,sda-open-drain; 870 i2c-gpio,sda-open-drain;
695 i2c-gpio,scl-open-drain; 871 i2c-gpio,scl-open-drain;
@@ -703,8 +879,8 @@
703 879
704 i2c@1 { 880 i2c@1 {
705 compatible = "i2c-gpio"; 881 compatible = "i2c-gpio";
706 gpios = <&pioC 0 0 /* sda */ 882 gpios = <&pioC 0 GPIO_ACTIVE_HIGH /* sda */
707 &pioC 1 0 /* scl */ 883 &pioC 1 GPIO_ACTIVE_HIGH /* scl */
708 >; 884 >;
709 i2c-gpio,sda-open-drain; 885 i2c-gpio,sda-open-drain;
710 i2c-gpio,scl-open-drain; 886 i2c-gpio,scl-open-drain;
@@ -718,8 +894,8 @@
718 894
719 i2c@2 { 895 i2c@2 {
720 compatible = "i2c-gpio"; 896 compatible = "i2c-gpio";
721 gpios = <&pioB 4 0 /* sda */ 897 gpios = <&pioB 4 GPIO_ACTIVE_HIGH /* sda */
722 &pioB 5 0 /* scl */ 898 &pioB 5 GPIO_ACTIVE_HIGH /* scl */
723 >; 899 >;
724 i2c-gpio,sda-open-drain; 900 i2c-gpio,sda-open-drain;
725 i2c-gpio,scl-open-drain; 901 i2c-gpio,scl-open-drain;
diff --git a/arch/arm/boot/dts/at91sam9x5cm.dtsi b/arch/arm/boot/dts/at91sam9x5cm.dtsi
index 347a74a857f6..4a5ee5cc115a 100644
--- a/arch/arm/boot/dts/at91sam9x5cm.dtsi
+++ b/arch/arm/boot/dts/at91sam9x5cm.dtsi
@@ -28,7 +28,7 @@
28 pinctrl@fffff400 { 28 pinctrl@fffff400 {
29 1wire_cm { 29 1wire_cm {
30 pinctrl_1wire_cm: 1wire_cm-0 { 30 pinctrl_1wire_cm: 1wire_cm-0 {
31 atmel,pins = <1 18 0x0 0x2>; /* PB18 multidrive, conflicts with led */ 31 atmel,pins = <AT91_PIOB 18 AT91_PERIPH_GPIO AT91_PINCTRL_MULTI_DRIVE>; /* PB18 multidrive, conflicts with led */
32 }; 32 };
33 }; 33 };
34 }; 34 };
@@ -75,19 +75,19 @@
75 75
76 pb18 { 76 pb18 {
77 label = "pb18"; 77 label = "pb18";
78 gpios = <&pioB 18 1>; 78 gpios = <&pioB 18 GPIO_ACTIVE_LOW>;
79 linux,default-trigger = "heartbeat"; 79 linux,default-trigger = "heartbeat";
80 }; 80 };
81 81
82 pd21 { 82 pd21 {
83 label = "pd21"; 83 label = "pd21";
84 gpios = <&pioD 21 0>; 84 gpios = <&pioD 21 GPIO_ACTIVE_HIGH>;
85 }; 85 };
86 }; 86 };
87 87
88 1wire_cm { 88 1wire_cm {
89 compatible = "w1-gpio"; 89 compatible = "w1-gpio";
90 gpios = <&pioB 18 0>; 90 gpios = <&pioB 18 GPIO_ACTIVE_HIGH>;
91 linux,open-drain; 91 linux,open-drain;
92 pinctrl-names = "default"; 92 pinctrl-names = "default";
93 pinctrl-0 = <&pinctrl_1wire_cm>; 93 pinctrl-0 = <&pinctrl_1wire_cm>;
diff --git a/arch/arm/boot/dts/at91sam9x5ek.dtsi b/arch/arm/boot/dts/at91sam9x5ek.dtsi
index 1fa48d2bfd80..b753855b2058 100644
--- a/arch/arm/boot/dts/at91sam9x5ek.dtsi
+++ b/arch/arm/boot/dts/at91sam9x5ek.dtsi
@@ -6,7 +6,7 @@
6 * 6 *
7 * Licensed under GPLv2 or later. 7 * Licensed under GPLv2 or later.
8 */ 8 */
9/include/ "at91sam9x5cm.dtsi" 9#include "at91sam9x5cm.dtsi"
10 10
11/ { 11/ {
12 model = "Atmel AT91SAM9X5-EK"; 12 model = "Atmel AT91SAM9X5-EK";
@@ -27,7 +27,7 @@
27 slot@0 { 27 slot@0 {
28 reg = <0>; 28 reg = <0>;
29 bus-width = <4>; 29 bus-width = <4>;
30 cd-gpios = <&pioD 15 0>; 30 cd-gpios = <&pioD 15 GPIO_ACTIVE_HIGH>;
31 }; 31 };
32 }; 32 };
33 33
@@ -40,7 +40,7 @@
40 slot@0 { 40 slot@0 {
41 reg = <0>; 41 reg = <0>;
42 bus-width = <4>; 42 bus-width = <4>;
43 cd-gpios = <&pioD 14 0>; 43 cd-gpios = <&pioD 14 GPIO_ACTIVE_HIGH>;
44 }; 44 };
45 }; 45 };
46 46
@@ -52,6 +52,11 @@
52 status = "okay"; 52 status = "okay";
53 }; 53 };
54 54
55 usb2: gadget@f803c000 {
56 atmel,vbus-gpio = <&pioB 16 GPIO_ACTIVE_HIGH>;
57 status = "okay";
58 };
59
55 i2c0: i2c@f8010000 { 60 i2c0: i2c@f8010000 {
56 status = "okay"; 61 status = "okay";
57 }; 62 };
@@ -60,14 +65,14 @@
60 mmc0 { 65 mmc0 {
61 pinctrl_board_mmc0: mmc0-board { 66 pinctrl_board_mmc0: mmc0-board {
62 atmel,pins = 67 atmel,pins =
63 <3 15 0x0 0x5>; /* PD15 gpio CD pin pull up and deglitch */ 68 <AT91_PIOD 15 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP_DEGLITCH>; /* PD15 gpio CD pin pull up and deglitch */
64 }; 69 };
65 }; 70 };
66 71
67 mmc1 { 72 mmc1 {
68 pinctrl_board_mmc1: mmc1-board { 73 pinctrl_board_mmc1: mmc1-board {
69 atmel,pins = 74 atmel,pins =
70 <3 14 0x0 0x5>; /* PD14 gpio CD pin pull up and deglitch */ 75 <AT91_PIOD 14 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP_DEGLITCH>; /* PD14 gpio CD pin pull up and deglitch */
71 }; 76 };
72 }; 77 };
73 }; 78 };
@@ -81,13 +86,17 @@
81 reg = <0>; 86 reg = <0>;
82 }; 87 };
83 }; 88 };
89
90 watchdog@fffffe40 {
91 status = "okay";
92 };
84 }; 93 };
85 94
86 usb0: ohci@00600000 { 95 usb0: ohci@00600000 {
87 status = "okay"; 96 status = "okay";
88 num-ports = <2>; 97 num-ports = <2>;
89 atmel,vbus-gpio = <&pioD 19 1 98 atmel,vbus-gpio = <&pioD 19 GPIO_ACTIVE_LOW
90 &pioD 20 1 99 &pioD 20 GPIO_ACTIVE_LOW
91 >; 100 >;
92 }; 101 };
93 102
diff --git a/arch/arm/boot/dts/atlas6.dtsi b/arch/arm/boot/dts/atlas6.dtsi
index 7d1a27949c13..a0f2721ea583 100644
--- a/arch/arm/boot/dts/atlas6.dtsi
+++ b/arch/arm/boot/dts/atlas6.dtsi
@@ -485,6 +485,12 @@
485 sirf,function = "usp0"; 485 sirf,function = "usp0";
486 }; 486 };
487 }; 487 };
488 usp0_uart_nostreamctrl_pins_a: usp0@1 {
489 usp0 {
490 sirf,pins = "usp0_uart_nostreamctrl_grp";
491 sirf,function = "usp0_uart_nostreamctrl";
492 };
493 };
488 usp1_pins_a: usp1@0 { 494 usp1_pins_a: usp1@0 {
489 usp1 { 495 usp1 {
490 sirf,pins = "usp1grp"; 496 sirf,pins = "usp1grp";
@@ -515,16 +521,16 @@
515 sirf,function = "pulse_count"; 521 sirf,function = "pulse_count";
516 }; 522 };
517 }; 523 };
518 cko0_rst_pins_a: cko0_rst@0 { 524 cko0_pins_a: cko0@0 {
519 cko0_rst { 525 cko0 {
520 sirf,pins = "cko0_rstgrp"; 526 sirf,pins = "cko0grp";
521 sirf,function = "cko0_rst"; 527 sirf,function = "cko0";
522 }; 528 };
523 }; 529 };
524 cko1_rst_pins_a: cko1_rst@0 { 530 cko1_pins_a: cko1@0 {
525 cko1_rst { 531 cko1 {
526 sirf,pins = "cko1_rstgrp"; 532 sirf,pins = "cko1grp";
527 sirf,function = "cko1_rst"; 533 sirf,function = "cko1";
528 }; 534 };
529 }; 535 };
530 }; 536 };
@@ -613,7 +619,7 @@
613 }; 619 };
614 620
615 rtc-iobg { 621 rtc-iobg {
616 compatible = "sirf,prima2-rtciobg", "sirf-prima2-rtciobg-bus"; 622 compatible = "sirf,prima2-rtciobg", "sirf-prima2-rtciobg-bus", "simple-bus";
617 #address-cells = <1>; 623 #address-cells = <1>;
618 #size-cells = <1>; 624 #size-cells = <1>;
619 reg = <0x80030000 0x10000>; 625 reg = <0x80030000 0x10000>;
diff --git a/arch/arm/boot/dts/bcm11351-brt.dts b/arch/arm/boot/dts/bcm11351-brt.dts
index 248067cf7069..67ec524098b5 100644
--- a/arch/arm/boot/dts/bcm11351-brt.dts
+++ b/arch/arm/boot/dts/bcm11351-brt.dts
@@ -13,7 +13,7 @@
13 13
14/dts-v1/; 14/dts-v1/;
15 15
16/include/ "bcm11351.dtsi" 16#include "bcm11351.dtsi"
17 17
18/ { 18/ {
19 model = "BCM11351 BRT board"; 19 model = "BCM11351 BRT board";
@@ -27,4 +27,21 @@
27 status = "okay"; 27 status = "okay";
28 }; 28 };
29 29
30 sdio0: sdio@0x3f180000 {
31 max-frequency = <48000000>;
32 status = "okay";
33 };
34
35 sdio1: sdio@0x3f190000 {
36 non-removable;
37 max-frequency = <48000000>;
38 status = "okay";
39 };
40
41 sdio3: sdio@0x3f1b0000 {
42 max-frequency = <48000000>;
43 status = "okay";
44 };
45
46
30}; 47};
diff --git a/arch/arm/boot/dts/bcm11351.dtsi b/arch/arm/boot/dts/bcm11351.dtsi
index 41b2c6c33f09..c0cdf66f8964 100644
--- a/arch/arm/boot/dts/bcm11351.dtsi
+++ b/arch/arm/boot/dts/bcm11351.dtsi
@@ -11,7 +11,10 @@
11 * GNU General Public License for more details. 11 * GNU General Public License for more details.
12 */ 12 */
13 13
14/include/ "skeleton.dtsi" 14#include <dt-bindings/interrupt-controller/arm-gic.h>
15#include <dt-bindings/interrupt-controller/irq.h>
16
17#include "skeleton.dtsi"
15 18
16/ { 19/ {
17 model = "BCM11351 SoC"; 20 model = "BCM11351 SoC";
@@ -33,7 +36,7 @@
33 36
34 smc@0x3404c000 { 37 smc@0x3404c000 {
35 compatible = "bcm,bcm11351-smc", "bcm,kona-smc"; 38 compatible = "bcm,bcm11351-smc", "bcm,kona-smc";
36 reg = <0x3404c000 0x400>; //1 KiB in SRAM 39 reg = <0x3404c000 0x400>; /* 1 KiB in SRAM */
37 }; 40 };
38 41
39 uart@3e000000 { 42 uart@3e000000 {
@@ -41,23 +44,51 @@
41 status = "disabled"; 44 status = "disabled";
42 reg = <0x3e000000 0x1000>; 45 reg = <0x3e000000 0x1000>;
43 clock-frequency = <13000000>; 46 clock-frequency = <13000000>;
44 interrupts = <0x0 67 0x4>; 47 interrupts = <GIC_SPI 67 IRQ_TYPE_LEVEL_HIGH>;
45 reg-shift = <2>; 48 reg-shift = <2>;
46 reg-io-width = <4>; 49 reg-io-width = <4>;
47 }; 50 };
48 51
49 L2: l2-cache { 52 L2: l2-cache {
50 compatible = "arm,pl310-cache"; 53 compatible = "bcm,bcm11351-a2-pl310-cache";
51 reg = <0x3ff20000 0x1000>; 54 reg = <0x3ff20000 0x1000>;
52 cache-unified; 55 cache-unified;
53 cache-level = <2>; 56 cache-level = <2>;
54 }; 57 };
55 58
56 timer@35006000 { 59 timer@35006000 {
57 compatible = "bcm,kona-timer"; 60 compatible = "bcm,kona-timer";
58 reg = <0x35006000 0x1000>; 61 reg = <0x35006000 0x1000>;
59 interrupts = <0x0 7 0x4>; 62 interrupts = <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>;
60 clock-frequency = <32768>; 63 clock-frequency = <32768>;
61 }; 64 };
62 65
66 sdio0: sdio@0x3f180000 {
67 compatible = "bcm,kona-sdhci";
68 reg = <0x3f180000 0x10000>;
69 interrupts = <0x0 77 0x4>;
70 status = "disabled";
71 };
72
73 sdio1: sdio@0x3f190000 {
74 compatible = "bcm,kona-sdhci";
75 reg = <0x3f190000 0x10000>;
76 interrupts = <0x0 76 0x4>;
77 status = "disabled";
78 };
79
80 sdio2: sdio@0x3f1a0000 {
81 compatible = "bcm,kona-sdhci";
82 reg = <0x3f1a0000 0x10000>;
83 interrupts = <0x0 74 0x4>;
84 status = "disabled";
85 };
86
87 sdio3: sdio@0x3f1b0000 {
88 compatible = "bcm,kona-sdhci";
89 reg = <0x3f1b0000 0x10000>;
90 interrupts = <0x0 73 0x4>;
91 status = "disabled";
92 };
93
63}; 94};
diff --git a/arch/arm/boot/dts/bcm2835-rpi-b.dts b/arch/arm/boot/dts/bcm2835-rpi-b.dts
index aafda174a605..6e9deb786a7d 100644
--- a/arch/arm/boot/dts/bcm2835-rpi-b.dts
+++ b/arch/arm/boot/dts/bcm2835-rpi-b.dts
@@ -8,6 +8,17 @@
8 memory { 8 memory {
9 reg = <0 0x10000000>; 9 reg = <0 0x10000000>;
10 }; 10 };
11
12 leds {
13 compatible = "gpio-leds";
14
15 act {
16 label = "ACT";
17 gpios = <&gpio 16 1>;
18 default-state = "keep";
19 linux,default-trigger = "heartbeat";
20 };
21 };
11}; 22};
12 23
13&gpio { 24&gpio {
diff --git a/arch/arm/boot/dts/ccu8540.dts b/arch/arm/boot/dts/ccu8540.dts
new file mode 100644
index 000000000000..48ff03441f5a
--- /dev/null
+++ b/arch/arm/boot/dts/ccu8540.dts
@@ -0,0 +1,41 @@
1/*
2 * Copyright 2013 ST-Ericsson AB
3 *
4 * The code contained herein is licensed under the GNU General Public
5 * License. You may obtain a copy of the GNU General Public License
6 * Version 2 or later at the following locations:
7 *
8 * http://www.opensource.org/licenses/gpl-license.html
9 * http://www.gnu.org/copyleft/gpl.html
10 */
11
12/dts-v1/;
13#include "dbx5x0.dtsi"
14
15/ {
16 model = "ST-Ericsson U8540 platform with Device Tree";
17 compatible = "st-ericsson,ccu8540", "st-ericsson,u8540";
18
19 memory@0 {
20 reg = <0x20000000 0x1f000000>, <0xc0000000 0x3f000000>;
21 };
22
23 soc {
24 prcmu@80157000 {
25 reg = <0x80157000 0x2000>, <0x801b0000 0x8000>, <0x801b8000 0x3000>;
26 reg-names = "prcmu", "prcmu-tcpm", "prcmu-tcdm";
27 };
28
29 uart@80120000 {
30 status = "okay";
31 };
32
33 uart@80121000 {
34 status = "okay";
35 };
36
37 uart@80007000 {
38 status = "okay";
39 };
40 };
41};
diff --git a/arch/arm/boot/dts/ccu9540.dts b/arch/arm/boot/dts/ccu9540.dts
index 04305463f00d..ed29ec7288e4 100644
--- a/arch/arm/boot/dts/ccu9540.dts
+++ b/arch/arm/boot/dts/ccu9540.dts
@@ -10,7 +10,7 @@
10 */ 10 */
11 11
12/dts-v1/; 12/dts-v1/;
13/include/ "dbx5x0.dtsi" 13#include "dbx5x0.dtsi"
14 14
15/ { 15/ {
16 model = "ST-Ericsson CCU9540 platform with Device Tree"; 16 model = "ST-Ericsson CCU9540 platform with Device Tree";
@@ -20,7 +20,7 @@
20 reg = <0x00000000 0x20000000>; 20 reg = <0x00000000 0x20000000>;
21 }; 21 };
22 22
23 soc-u9500 { 23 soc {
24 uart@80120000 { 24 uart@80120000 {
25 status = "okay"; 25 status = "okay";
26 }; 26 };
@@ -52,7 +52,7 @@
52 // WLAN SDIO channel 52 // WLAN SDIO channel
53 sdi1_per2@80118000 { 53 sdi1_per2@80118000 {
54 arm,primecell-periphid = <0x10480180>; 54 arm,primecell-periphid = <0x10480180>;
55 max-frequency = <50000000>; 55 max-frequency = <100000000>;
56 bus-width = <4>; 56 bus-width = <4>;
57 57
58 status = "okay"; 58 status = "okay";
diff --git a/arch/arm/boot/dts/cros5250-common.dtsi b/arch/arm/boot/dts/cros5250-common.dtsi
index 3f0239ec1bc5..dc259e8b8a73 100644
--- a/arch/arm/boot/dts/cros5250-common.dtsi
+++ b/arch/arm/boot/dts/cros5250-common.dtsi
@@ -190,7 +190,7 @@
190 samsung,i2c-max-bus-freq = <66000>; 190 samsung,i2c-max-bus-freq = <66000>;
191 191
192 hdmiddc@50 { 192 hdmiddc@50 {
193 compatible = "samsung,exynos5-hdmiddc"; 193 compatible = "samsung,exynos4210-hdmiddc";
194 reg = <0x50>; 194 reg = <0x50>;
195 }; 195 };
196 }; 196 };
@@ -224,7 +224,7 @@
224 samsung,i2c-max-bus-freq = <378000>; 224 samsung,i2c-max-bus-freq = <378000>;
225 225
226 hdmiphy@38 { 226 hdmiphy@38 {
227 compatible = "samsung,exynos5-hdmiphy"; 227 compatible = "samsung,exynos4212-hdmiphy";
228 reg = <0x38>; 228 reg = <0x38>;
229 }; 229 };
230 }; 230 };
diff --git a/arch/arm/boot/dts/da850-enbw-cmc.dts b/arch/arm/boot/dts/da850-enbw-cmc.dts
index 422fdb3fcfc1..e750ab9086d5 100644
--- a/arch/arm/boot/dts/da850-enbw-cmc.dts
+++ b/arch/arm/boot/dts/da850-enbw-cmc.dts
@@ -10,7 +10,7 @@
10 * option) any later version. 10 * option) any later version.
11 */ 11 */
12/dts-v1/; 12/dts-v1/;
13/include/ "da850.dtsi" 13#include "da850.dtsi"
14 14
15/ { 15/ {
16 compatible = "enbw,cmc", "ti,da850"; 16 compatible = "enbw,cmc", "ti,da850";
diff --git a/arch/arm/boot/dts/da850-evm.dts b/arch/arm/boot/dts/da850-evm.dts
index c914357c0d89..5bce7cc55cf3 100644
--- a/arch/arm/boot/dts/da850-evm.dts
+++ b/arch/arm/boot/dts/da850-evm.dts
@@ -8,7 +8,7 @@
8 * Free Software Foundation, version 2. 8 * Free Software Foundation, version 2.
9 */ 9 */
10/dts-v1/; 10/dts-v1/;
11/include/ "da850.dtsi" 11#include "da850.dtsi"
12 12
13/ { 13/ {
14 compatible = "ti,da850-evm", "ti,da850"; 14 compatible = "ti,da850-evm", "ti,da850";
diff --git a/arch/arm/boot/dts/da850.dtsi b/arch/arm/boot/dts/da850.dtsi
index 2c88313d2c7a..d70ba5504481 100644
--- a/arch/arm/boot/dts/da850.dtsi
+++ b/arch/arm/boot/dts/da850.dtsi
@@ -7,7 +7,7 @@
7 * Free Software Foundation; either version 2 of the License, or (at your 7 * Free Software Foundation; either version 2 of the License, or (at your
8 * option) any later version. 8 * option) any later version.
9 */ 9 */
10/include/ "skeleton.dtsi" 10#include "skeleton.dtsi"
11 11
12/ { 12/ {
13 arm { 13 arm {
@@ -37,7 +37,7 @@
37 #size-cells = <0>; 37 #size-cells = <0>;
38 pinctrl-single,bit-per-mux; 38 pinctrl-single,bit-per-mux;
39 pinctrl-single,register-width = <32>; 39 pinctrl-single,register-width = <32>;
40 pinctrl-single,function-mask = <0xffffffff>; 40 pinctrl-single,function-mask = <0xf>;
41 status = "disabled"; 41 status = "disabled";
42 42
43 nand_cs3_pins: pinmux_nand_pins { 43 nand_cs3_pins: pinmux_nand_pins {
diff --git a/arch/arm/boot/dts/dbx5x0.dtsi b/arch/arm/boot/dts/dbx5x0.dtsi
index b6bc4ff17f26..a1529455f081 100644
--- a/arch/arm/boot/dts/dbx5x0.dtsi
+++ b/arch/arm/boot/dts/dbx5x0.dtsi
@@ -9,10 +9,11 @@
9 * http://www.gnu.org/copyleft/gpl.html 9 * http://www.gnu.org/copyleft/gpl.html
10 */ 10 */
11 11
12/include/ "skeleton.dtsi" 12#include <dt-bindings/interrupt-controller/irq.h>
13#include "skeleton.dtsi"
13 14
14/ { 15/ {
15 soc-u9500 { 16 soc {
16 #address-cells = <1>; 17 #address-cells = <1>;
17 #size-cells = <1>; 18 #size-cells = <1>;
18 compatible = "stericsson,db8500"; 19 compatible = "stericsson,db8500";
@@ -31,33 +32,33 @@
31 L2: l2-cache { 32 L2: l2-cache {
32 compatible = "arm,pl310-cache"; 33 compatible = "arm,pl310-cache";
33 reg = <0xa0412000 0x1000>; 34 reg = <0xa0412000 0x1000>;
34 interrupts = <0 13 4>; 35 interrupts = <0 13 IRQ_TYPE_LEVEL_HIGH>;
35 cache-unified; 36 cache-unified;
36 cache-level = <2>; 37 cache-level = <2>;
37 }; 38 };
38 39
39 pmu { 40 pmu {
40 compatible = "arm,cortex-a9-pmu"; 41 compatible = "arm,cortex-a9-pmu";
41 interrupts = <0 7 0x4>; 42 interrupts = <0 7 IRQ_TYPE_LEVEL_HIGH>;
42 }; 43 };
43 44
44 timer@a0410600 { 45 timer@a0410600 {
45 compatible = "arm,cortex-a9-twd-timer"; 46 compatible = "arm,cortex-a9-twd-timer";
46 reg = <0xa0410600 0x20>; 47 reg = <0xa0410600 0x20>;
47 interrupts = <1 13 0x304>; 48 interrupts = <1 13 0x304>; /* IRQ level high per-CPU */
48 }; 49 };
49 50
50 rtc@80154000 { 51 rtc@80154000 {
51 compatible = "arm,rtc-pl031", "arm,primecell"; 52 compatible = "arm,rtc-pl031", "arm,primecell";
52 reg = <0x80154000 0x1000>; 53 reg = <0x80154000 0x1000>;
53 interrupts = <0 18 0x4>; 54 interrupts = <0 18 IRQ_TYPE_LEVEL_HIGH>;
54 }; 55 };
55 56
56 gpio0: gpio@8012e000 { 57 gpio0: gpio@8012e000 {
57 compatible = "stericsson,db8500-gpio", 58 compatible = "stericsson,db8500-gpio",
58 "st,nomadik-gpio"; 59 "st,nomadik-gpio";
59 reg = <0x8012e000 0x80>; 60 reg = <0x8012e000 0x80>;
60 interrupts = <0 119 0x4>; 61 interrupts = <0 119 IRQ_TYPE_LEVEL_HIGH>;
61 interrupt-controller; 62 interrupt-controller;
62 #interrupt-cells = <2>; 63 #interrupt-cells = <2>;
63 st,supports-sleepmode; 64 st,supports-sleepmode;
@@ -70,7 +71,7 @@
70 compatible = "stericsson,db8500-gpio", 71 compatible = "stericsson,db8500-gpio",
71 "st,nomadik-gpio"; 72 "st,nomadik-gpio";
72 reg = <0x8012e080 0x80>; 73 reg = <0x8012e080 0x80>;
73 interrupts = <0 120 0x4>; 74 interrupts = <0 120 IRQ_TYPE_LEVEL_HIGH>;
74 interrupt-controller; 75 interrupt-controller;
75 #interrupt-cells = <2>; 76 #interrupt-cells = <2>;
76 st,supports-sleepmode; 77 st,supports-sleepmode;
@@ -83,7 +84,7 @@
83 compatible = "stericsson,db8500-gpio", 84 compatible = "stericsson,db8500-gpio",
84 "st,nomadik-gpio"; 85 "st,nomadik-gpio";
85 reg = <0x8000e000 0x80>; 86 reg = <0x8000e000 0x80>;
86 interrupts = <0 121 0x4>; 87 interrupts = <0 121 IRQ_TYPE_LEVEL_HIGH>;
87 interrupt-controller; 88 interrupt-controller;
88 #interrupt-cells = <2>; 89 #interrupt-cells = <2>;
89 st,supports-sleepmode; 90 st,supports-sleepmode;
@@ -96,7 +97,7 @@
96 compatible = "stericsson,db8500-gpio", 97 compatible = "stericsson,db8500-gpio",
97 "st,nomadik-gpio"; 98 "st,nomadik-gpio";
98 reg = <0x8000e080 0x80>; 99 reg = <0x8000e080 0x80>;
99 interrupts = <0 122 0x4>; 100 interrupts = <0 122 IRQ_TYPE_LEVEL_HIGH>;
100 interrupt-controller; 101 interrupt-controller;
101 #interrupt-cells = <2>; 102 #interrupt-cells = <2>;
102 st,supports-sleepmode; 103 st,supports-sleepmode;
@@ -109,7 +110,7 @@
109 compatible = "stericsson,db8500-gpio", 110 compatible = "stericsson,db8500-gpio",
110 "st,nomadik-gpio"; 111 "st,nomadik-gpio";
111 reg = <0x8000e100 0x80>; 112 reg = <0x8000e100 0x80>;
112 interrupts = <0 123 0x4>; 113 interrupts = <0 123 IRQ_TYPE_LEVEL_HIGH>;
113 interrupt-controller; 114 interrupt-controller;
114 #interrupt-cells = <2>; 115 #interrupt-cells = <2>;
115 st,supports-sleepmode; 116 st,supports-sleepmode;
@@ -122,7 +123,7 @@
122 compatible = "stericsson,db8500-gpio", 123 compatible = "stericsson,db8500-gpio",
123 "st,nomadik-gpio"; 124 "st,nomadik-gpio";
124 reg = <0x8000e180 0x80>; 125 reg = <0x8000e180 0x80>;
125 interrupts = <0 124 0x4>; 126 interrupts = <0 124 IRQ_TYPE_LEVEL_HIGH>;
126 interrupt-controller; 127 interrupt-controller;
127 #interrupt-cells = <2>; 128 #interrupt-cells = <2>;
128 st,supports-sleepmode; 129 st,supports-sleepmode;
@@ -135,7 +136,7 @@
135 compatible = "stericsson,db8500-gpio", 136 compatible = "stericsson,db8500-gpio",
136 "st,nomadik-gpio"; 137 "st,nomadik-gpio";
137 reg = <0x8011e000 0x80>; 138 reg = <0x8011e000 0x80>;
138 interrupts = <0 125 0x4>; 139 interrupts = <0 125 IRQ_TYPE_LEVEL_HIGH>;
139 interrupt-controller; 140 interrupt-controller;
140 #interrupt-cells = <2>; 141 #interrupt-cells = <2>;
141 st,supports-sleepmode; 142 st,supports-sleepmode;
@@ -148,7 +149,7 @@
148 compatible = "stericsson,db8500-gpio", 149 compatible = "stericsson,db8500-gpio",
149 "st,nomadik-gpio"; 150 "st,nomadik-gpio";
150 reg = <0x8011e080 0x80>; 151 reg = <0x8011e080 0x80>;
151 interrupts = <0 126 0x4>; 152 interrupts = <0 126 IRQ_TYPE_LEVEL_HIGH>;
152 interrupt-controller; 153 interrupt-controller;
153 #interrupt-cells = <2>; 154 #interrupt-cells = <2>;
154 st,supports-sleepmode; 155 st,supports-sleepmode;
@@ -161,7 +162,7 @@
161 compatible = "stericsson,db8500-gpio", 162 compatible = "stericsson,db8500-gpio",
162 "st,nomadik-gpio"; 163 "st,nomadik-gpio";
163 reg = <0xa03fe000 0x80>; 164 reg = <0xa03fe000 0x80>;
164 interrupts = <0 127 0x4>; 165 interrupts = <0 127 IRQ_TYPE_LEVEL_HIGH>;
165 interrupt-controller; 166 interrupt-controller;
166 #interrupt-cells = <2>; 167 #interrupt-cells = <2>;
167 st,supports-sleepmode; 168 st,supports-sleepmode;
@@ -171,29 +172,61 @@
171 }; 172 };
172 173
173 pinctrl { 174 pinctrl {
174 compatible = "stericsson,nmk-pinctrl"; 175 compatible = "stericsson,db8500-pinctrl";
175 prcm = <&prcmu>; 176 prcm = <&prcmu>;
176 }; 177 };
177 178
178 usb@a03e0000 { 179 usb_per5@a03e0000 {
179 compatible = "stericsson,db8500-musb", 180 compatible = "stericsson,db8500-musb",
180 "mentor,musb"; 181 "mentor,musb";
181 reg = <0xa03e0000 0x10000>; 182 reg = <0xa03e0000 0x10000>;
182 interrupts = <0 23 0x4>; 183 interrupts = <0 23 IRQ_TYPE_LEVEL_HIGH>;
183 }; 184 interrupt-names = "mc";
184 185
185 dma-controller@801C0000 { 186 dr_mode = "otg";
186 compatible = "stericsson,db8500-dma40", 187
187 "stericsson,dma40"; 188 dmas = <&dma 38 0 0x2>, /* Logical - DevToMem */
189 <&dma 38 0 0x0>, /* Logical - MemToDev */
190 <&dma 37 0 0x2>, /* Logical - DevToMem */
191 <&dma 37 0 0x0>, /* Logical - MemToDev */
192 <&dma 36 0 0x2>, /* Logical - DevToMem */
193 <&dma 36 0 0x0>, /* Logical - MemToDev */
194 <&dma 19 0 0x2>, /* Logical - DevToMem */
195 <&dma 19 0 0x0>, /* Logical - MemToDev */
196 <&dma 18 0 0x2>, /* Logical - DevToMem */
197 <&dma 18 0 0x0>, /* Logical - MemToDev */
198 <&dma 17 0 0x2>, /* Logical - DevToMem */
199 <&dma 17 0 0x0>, /* Logical - MemToDev */
200 <&dma 16 0 0x2>, /* Logical - DevToMem */
201 <&dma 16 0 0x0>, /* Logical - MemToDev */
202 <&dma 39 0 0x2>, /* Logical - DevToMem */
203 <&dma 39 0 0x0>; /* Logical - MemToDev */
204
205 dma-names = "iep_1_9", "oep_1_9",
206 "iep_2_10", "oep_2_10",
207 "iep_3_11", "oep_3_11",
208 "iep_4_12", "oep_4_12",
209 "iep_5_13", "oep_5_13",
210 "iep_6_14", "oep_6_14",
211 "iep_7_15", "oep_7_15",
212 "iep_8", "oep_8";
213 };
214
215 dma: dma-controller@801C0000 {
216 compatible = "stericsson,db8500-dma40", "stericsson,dma40";
188 reg = <0x801C0000 0x1000 0x40010000 0x800>; 217 reg = <0x801C0000 0x1000 0x40010000 0x800>;
189 interrupts = <0 25 0x4>; 218 reg-names = "base", "lcpa";
219 interrupts = <0 25 IRQ_TYPE_LEVEL_HIGH>;
220
221 #dma-cells = <3>;
222 memcpy-channels = <56 57 58 59 60>;
190 }; 223 };
191 224
192 prcmu: prcmu@80157000 { 225 prcmu: prcmu@80157000 {
193 compatible = "stericsson,db8500-prcmu"; 226 compatible = "stericsson,db8500-prcmu";
194 reg = <0x80157000 0x2000>, <0x801b0000 0x8000>, <0x801b8000 0x1000>; 227 reg = <0x80157000 0x2000>, <0x801b0000 0x8000>, <0x801b8000 0x1000>;
195 reg-names = "prcmu", "prcmu-tcpm", "prcmu-tcdm"; 228 reg-names = "prcmu", "prcmu-tcpm", "prcmu-tcdm";
196 interrupts = <0 47 0x4>; 229 interrupts = <0 47 IRQ_TYPE_LEVEL_HIGH>;
197 #address-cells = <1>; 230 #address-cells = <1>;
198 #size-cells = <1>; 231 #size-cells = <1>;
199 interrupt-controller; 232 interrupt-controller;
@@ -208,7 +241,8 @@
208 thermal@801573c0 { 241 thermal@801573c0 {
209 compatible = "stericsson,db8500-thermal"; 242 compatible = "stericsson,db8500-thermal";
210 reg = <0x801573c0 0x40>; 243 reg = <0x801573c0 0x40>;
211 interrupts = <21 0x4>, <22 0x4>; 244 interrupts = <21 IRQ_TYPE_LEVEL_HIGH>,
245 <22 IRQ_TYPE_LEVEL_HIGH>;
212 interrupt-names = "IRQ_HOTMON_LOW", "IRQ_HOTMON_HIGH"; 246 interrupt-names = "IRQ_HOTMON_LOW", "IRQ_HOTMON_HIGH";
213 status = "disabled"; 247 status = "disabled";
214 }; 248 };
@@ -322,21 +356,26 @@
322 ab8500 { 356 ab8500 {
323 compatible = "stericsson,ab8500"; 357 compatible = "stericsson,ab8500";
324 interrupt-parent = <&intc>; 358 interrupt-parent = <&intc>;
325 interrupts = <0 40 0x4>; 359 interrupts = <0 40 IRQ_TYPE_LEVEL_HIGH>;
326 interrupt-controller; 360 interrupt-controller;
327 #interrupt-cells = <2>; 361 #interrupt-cells = <2>;
328 362
363 ab8500_gpio: ab8500-gpio {
364 gpio-controller;
365 #gpio-cells = <2>;
366 };
367
329 ab8500-rtc { 368 ab8500-rtc {
330 compatible = "stericsson,ab8500-rtc"; 369 compatible = "stericsson,ab8500-rtc";
331 interrupts = <17 0x4 370 interrupts = <17 IRQ_TYPE_LEVEL_HIGH
332 18 0x4>; 371 18 IRQ_TYPE_LEVEL_HIGH>;
333 interrupt-names = "60S", "ALARM"; 372 interrupt-names = "60S", "ALARM";
334 }; 373 };
335 374
336 ab8500-gpadc { 375 ab8500-gpadc {
337 compatible = "stericsson,ab8500-gpadc"; 376 compatible = "stericsson,ab8500-gpadc";
338 interrupts = <32 0x4 377 interrupts = <32 IRQ_TYPE_LEVEL_HIGH
339 39 0x4>; 378 39 IRQ_TYPE_LEVEL_HIGH>;
340 interrupt-names = "HW_CONV_END", "SW_CONV_END"; 379 interrupt-names = "HW_CONV_END", "SW_CONV_END";
341 vddadc-supply = <&ab8500_ldo_tvout_reg>; 380 vddadc-supply = <&ab8500_ldo_tvout_reg>;
342 }; 381 };
@@ -369,13 +408,13 @@
369 408
370 ab8500_usb { 409 ab8500_usb {
371 compatible = "stericsson,ab8500-usb"; 410 compatible = "stericsson,ab8500-usb";
372 interrupts = < 90 0x4 411 interrupts = < 90 IRQ_TYPE_LEVEL_HIGH
373 96 0x4 412 96 IRQ_TYPE_LEVEL_HIGH
374 14 0x4 413 14 IRQ_TYPE_LEVEL_HIGH
375 15 0x4 414 15 IRQ_TYPE_LEVEL_HIGH
376 79 0x4 415 79 IRQ_TYPE_LEVEL_HIGH
377 74 0x4 416 74 IRQ_TYPE_LEVEL_HIGH
378 75 0x4>; 417 75 IRQ_TYPE_LEVEL_HIGH>;
379 interrupt-names = "ID_WAKEUP_R", 418 interrupt-names = "ID_WAKEUP_R",
380 "ID_WAKEUP_F", 419 "ID_WAKEUP_F",
381 "VBUS_DET_F", 420 "VBUS_DET_F",
@@ -383,15 +422,15 @@
383 "USB_LINK_STATUS", 422 "USB_LINK_STATUS",
384 "USB_ADP_PROBE_PLUG", 423 "USB_ADP_PROBE_PLUG",
385 "USB_ADP_PROBE_UNPLUG"; 424 "USB_ADP_PROBE_UNPLUG";
386 vddulpivio18-supply = <&ab8500_ldo_initcore_reg>; 425 vddulpivio18-supply = <&ab8500_ldo_intcore_reg>;
387 v-ape-supply = <&db8500_vape_reg>; 426 v-ape-supply = <&db8500_vape_reg>;
388 musb_1v8-supply = <&db8500_vsmps2_reg>; 427 musb_1v8-supply = <&db8500_vsmps2_reg>;
389 }; 428 };
390 429
391 ab8500-ponkey { 430 ab8500-ponkey {
392 compatible = "stericsson,ab8500-poweron-key"; 431 compatible = "stericsson,ab8500-poweron-key";
393 interrupts = <6 0x4 432 interrupts = <6 IRQ_TYPE_LEVEL_HIGH
394 7 0x4>; 433 7 IRQ_TYPE_LEVEL_HIGH>;
395 interrupt-names = "ONKEY_DBF", "ONKEY_DBR"; 434 interrupt-names = "ONKEY_DBF", "ONKEY_DBR";
396 }; 435 };
397 436
@@ -410,6 +449,11 @@
410 codec: ab8500-codec { 449 codec: ab8500-codec {
411 compatible = "stericsson,ab8500-codec"; 450 compatible = "stericsson,ab8500-codec";
412 451
452 V-AUD-supply = <&ab8500_ldo_audio_reg>;
453 V-AMIC1-supply = <&ab8500_ldo_anamic1_reg>;
454 V-AMIC2-supply = <&ab8500_ldo_anamic2_reg>;
455 V-DMIC-supply = <&ab8500_ldo_dmic_reg>;
456
413 stericsson,earpeice-cmv = <950>; /* Units in mV. */ 457 stericsson,earpeice-cmv = <950>; /* Units in mV. */
414 }; 458 };
415 459
@@ -441,8 +485,8 @@
441 }; 485 };
442 486
443 // supply for v-intcore12; VINTCORE12 LDO 487 // supply for v-intcore12; VINTCORE12 LDO
444 ab8500_ldo_initcore_reg: ab8500_ldo_initcore { 488 ab8500_ldo_intcore_reg: ab8500_ldo_intcore {
445 regulator-compatible = "ab8500_ldo_initcore"; 489 regulator-compatible = "ab8500_ldo_intcore";
446 }; 490 };
447 491
448 // supply for tvout; gpadc; TVOUT LDO 492 // supply for tvout; gpadc; TVOUT LDO
@@ -460,14 +504,14 @@
460 regulator-compatible = "ab8500_ldo_audio"; 504 regulator-compatible = "ab8500_ldo_audio";
461 }; 505 };
462 506
463 // supply for v-anamic1 VAMic1-LDO 507 // supply for v-anamic1 VAMIC1 LDO
464 ab8500_ldo_anamic1_reg: ab8500_ldo_anamic1 { 508 ab8500_ldo_anamic1_reg: ab8500_ldo_anamic1 {
465 regulator-compatible = "ab8500_ldo_anamic1"; 509 regulator-compatible = "ab8500_ldo_anamic1";
466 }; 510 };
467 511
468 // supply for v-amic2; VAMIC2 LDO; reuse constants for AMIC1 512 // supply for v-amic2; VAMIC2 LDO; reuse constants for AMIC1
469 ab8500_ldo_amamic2_reg: ab8500_ldo_amamic2 { 513 ab8500_ldo_anamic2_reg: ab8500_ldo_anamic2 {
470 regulator-compatible = "ab8500_ldo_amamic2"; 514 regulator-compatible = "ab8500_ldo_anamic2";
471 }; 515 };
472 516
473 // supply for v-dmic; VDMIC LDO 517 // supply for v-dmic; VDMIC LDO
@@ -486,7 +530,7 @@
486 i2c@80004000 { 530 i2c@80004000 {
487 compatible = "stericsson,db8500-i2c", "st,nomadik-i2c", "arm,primecell"; 531 compatible = "stericsson,db8500-i2c", "st,nomadik-i2c", "arm,primecell";
488 reg = <0x80004000 0x1000>; 532 reg = <0x80004000 0x1000>;
489 interrupts = <0 21 0x4>; 533 interrupts = <0 21 IRQ_TYPE_LEVEL_HIGH>;
490 arm,primecell-periphid = <0x180024>; 534 arm,primecell-periphid = <0x180024>;
491 535
492 #address-cells = <1>; 536 #address-cells = <1>;
@@ -499,7 +543,7 @@
499 i2c@80122000 { 543 i2c@80122000 {
500 compatible = "stericsson,db8500-i2c", "st,nomadik-i2c", "arm,primecell"; 544 compatible = "stericsson,db8500-i2c", "st,nomadik-i2c", "arm,primecell";
501 reg = <0x80122000 0x1000>; 545 reg = <0x80122000 0x1000>;
502 interrupts = <0 22 0x4>; 546 interrupts = <0 22 IRQ_TYPE_LEVEL_HIGH>;
503 arm,primecell-periphid = <0x180024>; 547 arm,primecell-periphid = <0x180024>;
504 548
505 #address-cells = <1>; 549 #address-cells = <1>;
@@ -512,7 +556,7 @@
512 i2c@80128000 { 556 i2c@80128000 {
513 compatible = "stericsson,db8500-i2c", "st,nomadik-i2c", "arm,primecell"; 557 compatible = "stericsson,db8500-i2c", "st,nomadik-i2c", "arm,primecell";
514 reg = <0x80128000 0x1000>; 558 reg = <0x80128000 0x1000>;
515 interrupts = <0 55 0x4>; 559 interrupts = <0 55 IRQ_TYPE_LEVEL_HIGH>;
516 arm,primecell-periphid = <0x180024>; 560 arm,primecell-periphid = <0x180024>;
517 561
518 #address-cells = <1>; 562 #address-cells = <1>;
@@ -525,7 +569,7 @@
525 i2c@80110000 { 569 i2c@80110000 {
526 compatible = "stericsson,db8500-i2c", "st,nomadik-i2c", "arm,primecell"; 570 compatible = "stericsson,db8500-i2c", "st,nomadik-i2c", "arm,primecell";
527 reg = <0x80110000 0x1000>; 571 reg = <0x80110000 0x1000>;
528 interrupts = <0 12 0x4>; 572 interrupts = <0 12 IRQ_TYPE_LEVEL_HIGH>;
529 arm,primecell-periphid = <0x180024>; 573 arm,primecell-periphid = <0x180024>;
530 574
531 #address-cells = <1>; 575 #address-cells = <1>;
@@ -538,7 +582,7 @@
538 i2c@8012a000 { 582 i2c@8012a000 {
539 compatible = "stericsson,db8500-i2c", "st,nomadik-i2c", "arm,primecell"; 583 compatible = "stericsson,db8500-i2c", "st,nomadik-i2c", "arm,primecell";
540 reg = <0x8012a000 0x1000>; 584 reg = <0x8012a000 0x1000>;
541 interrupts = <0 51 0x4>; 585 interrupts = <0 51 IRQ_TYPE_LEVEL_HIGH>;
542 arm,primecell-periphid = <0x180024>; 586 arm,primecell-periphid = <0x180024>;
543 587
544 #address-cells = <1>; 588 #address-cells = <1>;
@@ -551,82 +595,114 @@
551 ssp@80002000 { 595 ssp@80002000 {
552 compatible = "arm,pl022", "arm,primecell"; 596 compatible = "arm,pl022", "arm,primecell";
553 reg = <0x80002000 0x1000>; 597 reg = <0x80002000 0x1000>;
554 interrupts = <0 14 0x4>; 598 interrupts = <0 14 IRQ_TYPE_LEVEL_HIGH>;
555 #address-cells = <1>; 599 #address-cells = <1>;
556 #size-cells = <0>; 600 #size-cells = <0>;
557 status = "disabled"; 601 status = "disabled";
558
559 // Add one of these for each child device
560 cs-gpios = <&gpio0 31 0x4 &gpio4 14 0x4 &gpio4 16 0x4
561 &gpio6 22 0x4 &gpio7 0 0x4>;
562
563 }; 602 };
564 603
565 uart@80120000 { 604 uart@80120000 {
566 compatible = "arm,pl011", "arm,primecell"; 605 compatible = "arm,pl011", "arm,primecell";
567 reg = <0x80120000 0x1000>; 606 reg = <0x80120000 0x1000>;
568 interrupts = <0 11 0x4>; 607 interrupts = <0 11 IRQ_TYPE_LEVEL_HIGH>;
608
609 dmas = <&dma 13 0 0x2>, /* Logical - DevToMem */
610 <&dma 13 0 0x0>; /* Logical - MemToDev */
611 dma-names = "rx", "tx";
612
569 status = "disabled"; 613 status = "disabled";
570 }; 614 };
615
571 uart@80121000 { 616 uart@80121000 {
572 compatible = "arm,pl011", "arm,primecell"; 617 compatible = "arm,pl011", "arm,primecell";
573 reg = <0x80121000 0x1000>; 618 reg = <0x80121000 0x1000>;
574 interrupts = <0 19 0x4>; 619 interrupts = <0 19 IRQ_TYPE_LEVEL_HIGH>;
620
621 dmas = <&dma 12 0 0x2>, /* Logical - DevToMem */
622 <&dma 12 0 0x0>; /* Logical - MemToDev */
623 dma-names = "rx", "tx";
624
575 status = "disabled"; 625 status = "disabled";
576 }; 626 };
627
577 uart@80007000 { 628 uart@80007000 {
578 compatible = "arm,pl011", "arm,primecell"; 629 compatible = "arm,pl011", "arm,primecell";
579 reg = <0x80007000 0x1000>; 630 reg = <0x80007000 0x1000>;
580 interrupts = <0 26 0x4>; 631 interrupts = <0 26 IRQ_TYPE_LEVEL_HIGH>;
632
633 dmas = <&dma 11 0 0x2>, /* Logical - DevToMem */
634 <&dma 11 0 0x0>; /* Logical - MemToDev */
635 dma-names = "rx", "tx";
636
581 status = "disabled"; 637 status = "disabled";
582 }; 638 };
583 639
584 sdi0_per1@80126000 { 640 sdi0_per1@80126000 {
585 compatible = "arm,pl18x", "arm,primecell"; 641 compatible = "arm,pl18x", "arm,primecell";
586 reg = <0x80126000 0x1000>; 642 reg = <0x80126000 0x1000>;
587 interrupts = <0 60 0x4>; 643 interrupts = <0 60 IRQ_TYPE_LEVEL_HIGH>;
644
645 dmas = <&dma 29 0 0x2>, /* Logical - DevToMem */
646 <&dma 29 0 0x0>; /* Logical - MemToDev */
647 dma-names = "rx", "tx";
648
588 status = "disabled"; 649 status = "disabled";
589 }; 650 };
590 651
591 sdi1_per2@80118000 { 652 sdi1_per2@80118000 {
592 compatible = "arm,pl18x", "arm,primecell"; 653 compatible = "arm,pl18x", "arm,primecell";
593 reg = <0x80118000 0x1000>; 654 reg = <0x80118000 0x1000>;
594 interrupts = <0 50 0x4>; 655 interrupts = <0 50 IRQ_TYPE_LEVEL_HIGH>;
656
657 dmas = <&dma 32 0 0x2>, /* Logical - DevToMem */
658 <&dma 32 0 0x0>; /* Logical - MemToDev */
659 dma-names = "rx", "tx";
660
595 status = "disabled"; 661 status = "disabled";
596 }; 662 };
597 663
598 sdi2_per3@80005000 { 664 sdi2_per3@80005000 {
599 compatible = "arm,pl18x", "arm,primecell"; 665 compatible = "arm,pl18x", "arm,primecell";
600 reg = <0x80005000 0x1000>; 666 reg = <0x80005000 0x1000>;
601 interrupts = <0 41 0x4>; 667 interrupts = <0 41 IRQ_TYPE_LEVEL_HIGH>;
668
669 dmas = <&dma 28 0 0x2>, /* Logical - DevToMem */
670 <&dma 28 0 0x0>; /* Logical - MemToDev */
671 dma-names = "rx", "tx";
672
602 status = "disabled"; 673 status = "disabled";
603 }; 674 };
604 675
605 sdi3_per2@80119000 { 676 sdi3_per2@80119000 {
606 compatible = "arm,pl18x", "arm,primecell"; 677 compatible = "arm,pl18x", "arm,primecell";
607 reg = <0x80119000 0x1000>; 678 reg = <0x80119000 0x1000>;
608 interrupts = <0 59 0x4>; 679 interrupts = <0 59 IRQ_TYPE_LEVEL_HIGH>;
609 status = "disabled"; 680 status = "disabled";
610 }; 681 };
611 682
612 sdi4_per2@80114000 { 683 sdi4_per2@80114000 {
613 compatible = "arm,pl18x", "arm,primecell"; 684 compatible = "arm,pl18x", "arm,primecell";
614 reg = <0x80114000 0x1000>; 685 reg = <0x80114000 0x1000>;
615 interrupts = <0 99 0x4>; 686 interrupts = <0 99 IRQ_TYPE_LEVEL_HIGH>;
687
688 dmas = <&dma 42 0 0x2>, /* Logical - DevToMem */
689 <&dma 42 0 0x0>; /* Logical - MemToDev */
690 dma-names = "rx", "tx";
691
616 status = "disabled"; 692 status = "disabled";
617 }; 693 };
618 694
619 sdi5_per3@80008000 { 695 sdi5_per3@80008000 {
620 compatible = "arm,pl18x", "arm,primecell"; 696 compatible = "arm,pl18x", "arm,primecell";
621 reg = <0x80008000 0x1000>; 697 reg = <0x80008000 0x1000>;
622 interrupts = <0 100 0x4>; 698 interrupts = <0 100 IRQ_TYPE_LEVEL_HIGH>;
623 status = "disabled"; 699 status = "disabled";
624 }; 700 };
625 701
626 msp0: msp@80123000 { 702 msp0: msp@80123000 {
627 compatible = "stericsson,ux500-msp-i2s"; 703 compatible = "stericsson,ux500-msp-i2s";
628 reg = <0x80123000 0x1000>; 704 reg = <0x80123000 0x1000>;
629 interrupts = <0 31 0x4>; 705 interrupts = <0 31 IRQ_TYPE_LEVEL_HIGH>;
630 v-ape-supply = <&db8500_vape_reg>; 706 v-ape-supply = <&db8500_vape_reg>;
631 status = "disabled"; 707 status = "disabled";
632 }; 708 };
@@ -634,7 +710,7 @@
634 msp1: msp@80124000 { 710 msp1: msp@80124000 {
635 compatible = "stericsson,ux500-msp-i2s"; 711 compatible = "stericsson,ux500-msp-i2s";
636 reg = <0x80124000 0x1000>; 712 reg = <0x80124000 0x1000>;
637 interrupts = <0 62 0x4>; 713 interrupts = <0 62 IRQ_TYPE_LEVEL_HIGH>;
638 v-ape-supply = <&db8500_vape_reg>; 714 v-ape-supply = <&db8500_vape_reg>;
639 status = "disabled"; 715 status = "disabled";
640 }; 716 };
@@ -643,7 +719,7 @@
643 msp2: msp@80117000 { 719 msp2: msp@80117000 {
644 compatible = "stericsson,ux500-msp-i2s"; 720 compatible = "stericsson,ux500-msp-i2s";
645 reg = <0x80117000 0x1000>; 721 reg = <0x80117000 0x1000>;
646 interrupts = <0 98 0x4>; 722 interrupts = <0 98 IRQ_TYPE_LEVEL_HIGH>;
647 v-ape-supply = <&db8500_vape_reg>; 723 v-ape-supply = <&db8500_vape_reg>;
648 status = "disabled"; 724 status = "disabled";
649 }; 725 };
@@ -651,7 +727,7 @@
651 msp3: msp@80125000 { 727 msp3: msp@80125000 {
652 compatible = "stericsson,ux500-msp-i2s"; 728 compatible = "stericsson,ux500-msp-i2s";
653 reg = <0x80125000 0x1000>; 729 reg = <0x80125000 0x1000>;
654 interrupts = <0 62 0x4>; 730 interrupts = <0 62 IRQ_TYPE_LEVEL_HIGH>;
655 v-ape-supply = <&db8500_vape_reg>; 731 v-ape-supply = <&db8500_vape_reg>;
656 status = "disabled"; 732 status = "disabled";
657 }; 733 };
@@ -686,5 +762,20 @@
686 762
687 status = "disabled"; 763 status = "disabled";
688 }; 764 };
765
766 cryp@a03cb000 {
767 compatible = "stericsson,ux500-cryp";
768 reg = <0xa03cb000 0x1000>;
769 interrupts = <0 15 IRQ_TYPE_LEVEL_HIGH>;
770
771 v-ape-supply = <&db8500_vape_reg>;
772 };
773
774 hash@a03c2000 {
775 compatible = "stericsson,ux500-hash";
776 reg = <0xa03c2000 0x1000>;
777
778 v-ape-supply = <&db8500_vape_reg>;
779 };
689 }; 780 };
690}; 781};
diff --git a/arch/arm/boot/dts/dove-cubox.dts b/arch/arm/boot/dts/dove-cubox.dts
index 7e3065abd751..5cae2ab69762 100644
--- a/arch/arm/boot/dts/dove-cubox.dts
+++ b/arch/arm/boot/dts/dove-cubox.dts
@@ -44,11 +44,60 @@
44 gpio = <&gpio0 1 0>; 44 gpio = <&gpio0 1 0>;
45 }; 45 };
46 }; 46 };
47
48 clocks {
49 /* 25MHz reference crystal */
50 ref25: oscillator {
51 compatible = "fixed-clock";
52 #clock-cells = <0>;
53 clock-frequency = <25000000>;
54 };
55 };
47}; 56};
48 57
49&uart0 { status = "okay"; }; 58&uart0 { status = "okay"; };
50&sata0 { status = "okay"; }; 59&sata0 { status = "okay"; };
51&i2c0 { status = "okay"; }; 60
61&i2c0 {
62 status = "okay";
63 clock-frequency = <100000>;
64
65 si5351: clock-generator {
66 compatible = "silabs,si5351a-msop";
67 reg = <0x60>;
68 #address-cells = <1>;
69 #size-cells = <0>;
70 #clock-cells = <1>;
71
72 /* connect xtal input to 25MHz reference */
73 clocks = <&ref25>;
74
75 /* connect xtal input as source of pll0 and pll1 */
76 silabs,pll-source = <0 0>, <1 0>;
77
78 clkout0 {
79 reg = <0>;
80 silabs,drive-strength = <8>;
81 silabs,multisynth-source = <0>;
82 silabs,clock-source = <0>;
83 silabs,pll-master;
84 };
85
86 clkout1 {
87 reg = <1>;
88 silabs,drive-strength = <8>;
89 silabs,multisynth-source = <1>;
90 silabs,clock-source = <0>;
91 silabs,pll-master;
92 };
93
94 clkout2 {
95 reg = <2>;
96 silabs,multisynth-source = <1>;
97 silabs,clock-source = <0>;
98 };
99 };
100};
52 101
53&sdio0 { 102&sdio0 {
54 status = "okay"; 103 status = "okay";
diff --git a/arch/arm/boot/dts/ecx-common.dtsi b/arch/arm/boot/dts/ecx-common.dtsi
index d61b535f682a..e8559b753c9d 100644
--- a/arch/arm/boot/dts/ecx-common.dtsi
+++ b/arch/arm/boot/dts/ecx-common.dtsi
@@ -33,6 +33,8 @@
33 calxeda,port-phys = <&combophy5 0 &combophy0 0 33 calxeda,port-phys = <&combophy5 0 &combophy0 0
34 &combophy0 1 &combophy0 2 34 &combophy0 1 &combophy0 2
35 &combophy0 3>; 35 &combophy0 3>;
36 calxeda,sgpio-gpio =<&gpioh 5 1 &gpioh 6 1 &gpioh 7 1>;
37 calxeda,led-order = <4 0 1 2 3>;
36 }; 38 };
37 39
38 sdhci@ffe0e000 { 40 sdhci@ffe0e000 {
diff --git a/arch/arm/boot/dts/ethernut5.dts b/arch/arm/boot/dts/ethernut5.dts
index 1ea9d34460a4..143b6d25bc80 100644
--- a/arch/arm/boot/dts/ethernut5.dts
+++ b/arch/arm/boot/dts/ethernut5.dts
@@ -6,7 +6,7 @@
6 * Licensed under GPLv2. 6 * Licensed under GPLv2.
7 */ 7 */
8/dts-v1/; 8/dts-v1/;
9/include/ "at91sam9260.dtsi" 9#include "at91sam9260.dtsi"
10 10
11/ { 11/ {
12 model = "Ethernut 5"; 12 model = "Ethernut 5";
@@ -40,7 +40,7 @@
40 }; 40 };
41 41
42 usb1: gadget@fffa4000 { 42 usb1: gadget@fffa4000 {
43 atmel,vbus-gpio = <&pioC 5 0>; 43 atmel,vbus-gpio = <&pioC 5 GPIO_ACTIVE_HIGH>;
44 status = "okay"; 44 status = "okay";
45 }; 45 };
46 }; 46 };
@@ -52,7 +52,7 @@
52 status = "okay"; 52 status = "okay";
53 53
54 gpios = <0 54 gpios = <0
55 &pioC 14 0 55 &pioC 14 GPIO_ACTIVE_HIGH
56 0 56 0
57 >; 57 >;
58 58
diff --git a/arch/arm/boot/dts/evk-pro3.dts b/arch/arm/boot/dts/evk-pro3.dts
index 96e50f569433..4d829685fdfb 100644
--- a/arch/arm/boot/dts/evk-pro3.dts
+++ b/arch/arm/boot/dts/evk-pro3.dts
@@ -9,7 +9,7 @@
9 9
10/dts-v1/; 10/dts-v1/;
11 11
12/include/ "ge863-pro3.dtsi" 12#include "ge863-pro3.dtsi"
13 13
14/ { 14/ {
15 model = "Telit EVK-PRO3 for Telit GE863-PRO3"; 15 model = "Telit EVK-PRO3 for Telit GE863-PRO3";
@@ -31,7 +31,7 @@
31 }; 31 };
32 32
33 usb1: gadget@fffa4000 { 33 usb1: gadget@fffa4000 {
34 atmel,vbus-gpio = <&pioC 5 0>; 34 atmel,vbus-gpio = <&pioC 5 GPIO_ACTIVE_HIGH>;
35 status = "okay"; 35 status = "okay";
36 }; 36 };
37 37
@@ -50,4 +50,4 @@
50 status = "okay"; 50 status = "okay";
51 }; 51 };
52 52
53}; \ No newline at end of file 53};
diff --git a/arch/arm/boot/dts/exynos4.dtsi b/arch/arm/boot/dts/exynos4.dtsi
index 359694c78918..3f94fe8e3706 100644
--- a/arch/arm/boot/dts/exynos4.dtsi
+++ b/arch/arm/boot/dts/exynos4.dtsi
@@ -19,7 +19,7 @@
19 * published by the Free Software Foundation. 19 * published by the Free Software Foundation.
20 */ 20 */
21 21
22/include/ "skeleton.dtsi" 22#include "skeleton.dtsi"
23 23
24/ { 24/ {
25 interrupt-parent = <&gic>; 25 interrupt-parent = <&gic>;
@@ -160,6 +160,8 @@
160 reg = <0x13400000 0x10000>; 160 reg = <0x13400000 0x10000>;
161 interrupts = <0 94 0>; 161 interrupts = <0 94 0>;
162 samsung,power-domain = <&pd_mfc>; 162 samsung,power-domain = <&pd_mfc>;
163 clocks = <&clock 170>, <&clock 273>;
164 clock-names = "sclk_mfc", "mfc";
163 status = "disabled"; 165 status = "disabled";
164 }; 166 };
165 167
diff --git a/arch/arm/boot/dts/exynos4210-origen.dts b/arch/arm/boot/dts/exynos4210-origen.dts
index 524b90846df5..382d8c7e2906 100644
--- a/arch/arm/boot/dts/exynos4210-origen.dts
+++ b/arch/arm/boot/dts/exynos4210-origen.dts
@@ -15,7 +15,7 @@
15*/ 15*/
16 16
17/dts-v1/; 17/dts-v1/;
18/include/ "exynos4210.dtsi" 18#include "exynos4210.dtsi"
19 19
20/ { 20/ {
21 model = "Insignal Origen evaluation board based on Exynos4210"; 21 model = "Insignal Origen evaluation board based on Exynos4210";
@@ -41,6 +41,10 @@
41 enable-active-high; 41 enable-active-high;
42 }; 42 };
43 43
44 tmu@100C0000 {
45 status = "okay";
46 };
47
44 sdhci@12530000 { 48 sdhci@12530000 {
45 bus-width = <4>; 49 bus-width = <4>;
46 pinctrl-0 = <&sd2_clk &sd2_cmd &sd2_bus4 &sd2_cd>; 50 pinctrl-0 = <&sd2_clk &sd2_cmd &sd2_bus4 &sd2_cd>;
@@ -83,6 +87,150 @@
83 status = "okay"; 87 status = "okay";
84 }; 88 };
85 89
90 i2c@13860000 {
91 status = "okay";
92 samsung,i2c-sda-delay = <100>;
93 samsung,i2c-max-bus-freq = <20000>;
94 pinctrl-0 = <&i2c0_bus>;
95 pinctrl-names = "default";
96
97 max8997_pmic@66 {
98 compatible = "maxim,max8997-pmic";
99 reg = <0x66>;
100 interrupt-parent = <&gpx0>;
101 interrupts = <4 0>, <3 0>;
102
103 max8997,pmic-buck1-dvs-voltage = <1350000>;
104 max8997,pmic-buck2-dvs-voltage = <1100000>;
105 max8997,pmic-buck5-dvs-voltage = <1200000>;
106
107 regulators {
108 ldo1_reg: LDO1 {
109 regulator-name = "VDD_ABB_3.3V";
110 regulator-min-microvolt = <3300000>;
111 regulator-max-microvolt = <3300000>;
112 };
113
114 ldo2_reg: LDO2 {
115 regulator-name = "VDD_ALIVE_1.1V";
116 regulator-min-microvolt = <1100000>;
117 regulator-max-microvolt = <1100000>;
118 regulator-always-on;
119 };
120
121 ldo3_reg: LDO3 {
122 regulator-name = "VMIPI_1.1V";
123 regulator-min-microvolt = <1100000>;
124 regulator-max-microvolt = <1100000>;
125 };
126
127 ldo4_reg: LDO4 {
128 regulator-name = "VDD_RTC_1.8V";
129 regulator-min-microvolt = <1800000>;
130 regulator-max-microvolt = <1800000>;
131 regulator-always-on;
132 };
133
134 ldo6_reg: LDO6 {
135 regulator-name = "VMIPI_1.8V";
136 regulator-min-microvolt = <1800000>;
137 regulator-max-microvolt = <1800000>;
138 regulator-always-on;
139 };
140
141 ldo7_reg: LDO7 {
142 regulator-name = "VDD_AUD_1.8V";
143 regulator-min-microvolt = <1800000>;
144 regulator-max-microvolt = <1800000>;
145 };
146
147 ldo8_reg: LDO8 {
148 regulator-name = "VADC_3.3V";
149 regulator-min-microvolt = <3300000>;
150 regulator-max-microvolt = <3300000>;
151 };
152
153 ldo9_reg: LDO9 {
154 regulator-name = "DVDD_SWB_2.8V";
155 regulator-min-microvolt = <2800000>;
156 regulator-max-microvolt = <2800000>;
157 regulator-always-on;
158 };
159
160 ldo10_reg: LDO10 {
161 regulator-name = "VDD_PLL_1.1V";
162 regulator-min-microvolt = <1100000>;
163 regulator-max-microvolt = <1100000>;
164 regulator-always-on;
165 };
166
167 ldo11_reg: LDO11 {
168 regulator-name = "VDD_AUD_3V";
169 regulator-min-microvolt = <3000000>;
170 regulator-max-microvolt = <3000000>;
171 };
172
173 ldo14_reg: LDO14 {
174 regulator-name = "AVDD18_SWB_1.8V";
175 regulator-min-microvolt = <1800000>;
176 regulator-max-microvolt = <1800000>;
177 regulator-always-on;
178 };
179
180 ldo17_reg: LDO17 {
181 regulator-name = "VDD_SWB_3.3V";
182 regulator-min-microvolt = <3300000>;
183 regulator-max-microvolt = <3300000>;
184 regulator-always-on;
185 };
186
187 ldo21_reg: LDO21 {
188 regulator-name = "VDD_MIF_1.2V";
189 regulator-min-microvolt = <1200000>;
190 regulator-max-microvolt = <1200000>;
191 regulator-always-on;
192 };
193
194 buck1_reg: BUCK1 {
195 regulator-name = "VDD_ARM_1.2V";
196 regulator-min-microvolt = <950000>;
197 regulator-max-microvolt = <1350000>;
198 regulator-always-on;
199 regulator-boot-on;
200 };
201
202 buck2_reg: BUCK2 {
203 regulator-name = "VDD_INT_1.1V";
204 regulator-min-microvolt = <900000>;
205 regulator-max-microvolt = <1100000>;
206 regulator-always-on;
207 regulator-boot-on;
208 };
209
210 buck3_reg: BUCK3 {
211 regulator-name = "VDD_G3D_1.1V";
212 regulator-min-microvolt = <900000>;
213 regulator-max-microvolt = <1100000>;
214 };
215
216 buck5_reg: BUCK5 {
217 regulator-name = "VDDQ_M1M2_1.2V";
218 regulator-min-microvolt = <1200000>;
219 regulator-max-microvolt = <1200000>;
220 regulator-always-on;
221 };
222
223 buck7_reg: BUCK7 {
224 regulator-name = "VDD_LCD_3.3V";
225 regulator-min-microvolt = <3300000>;
226 regulator-max-microvolt = <3300000>;
227 regulator-boot-on;
228 regulator-always-on;
229 };
230 };
231 };
232 };
233
86 gpio_keys { 234 gpio_keys {
87 compatible = "gpio-keys"; 235 compatible = "gpio-keys";
88 #address-cells = <1>; 236 #address-cells = <1>;
@@ -143,4 +291,25 @@
143 clock-frequency = <24000000>; 291 clock-frequency = <24000000>;
144 }; 292 };
145 }; 293 };
294
295 fimd@11c00000 {
296 pinctrl-0 = <&lcd_en &lcd_clk &lcd_data24 &pwm0_out>;
297 pinctrl-names = "default";
298 status = "okay";
299 };
300
301 display-timings {
302 native-mode = <&timing0>;
303 timing0: timing {
304 clock-frequency = <50000>;
305 hactive = <1024>;
306 vactive = <600>;
307 hfront-porch = <64>;
308 hback-porch = <16>;
309 hsync-len = <48>;
310 vback-porch = <64>;
311 vfront-porch = <16>;
312 vsync-len = <3>;
313 };
314 };
146}; 315};
diff --git a/arch/arm/boot/dts/exynos4210-pinctrl.dtsi b/arch/arm/boot/dts/exynos4210-pinctrl.dtsi
index 55a2efb763d1..553bceae8967 100644
--- a/arch/arm/boot/dts/exynos4210-pinctrl.dtsi
+++ b/arch/arm/boot/dts/exynos4210-pinctrl.dtsi
@@ -330,6 +330,95 @@
330 samsung,pin-pud = <3>; 330 samsung,pin-pud = <3>;
331 samsung,pin-drv = <0>; 331 samsung,pin-drv = <0>;
332 }; 332 };
333
334 pwm0_out: pwm0-out {
335 samsung,pins = "gpd0-0";
336 samsung,pin-function = <2>;
337 samsung,pin-pud = <0>;
338 samsung,pin-drv = <0>;
339 };
340
341 pwm1_out: pwm1-out {
342 samsung,pins = "gpd0-1";
343 samsung,pin-function = <2>;
344 samsung,pin-pud = <0>;
345 samsung,pin-drv = <0>;
346 };
347
348 pwm2_out: pwm2-out {
349 samsung,pins = "gpd0-2";
350 samsung,pin-function = <2>;
351 samsung,pin-pud = <0>;
352 samsung,pin-drv = <0>;
353 };
354
355 pwm3_out: pwm3-out {
356 samsung,pins = "gpd0-3";
357 samsung,pin-function = <2>;
358 samsung,pin-pud = <0>;
359 samsung,pin-drv = <0>;
360 };
361
362 lcd_ctrl: lcd-ctrl {
363 samsung,pins = "gpd0-0", "gpd0-1";
364 samsung,pin-function = <3>;
365 samsung,pin-pud = <0>;
366 samsung,pin-drv = <0>;
367 };
368
369 lcd_sync: lcd-sync {
370 samsung,pins = "gpf0-0", "gpf0-1";
371 samsung,pin-function = <2>;
372 samsung,pin-pud = <0>;
373 samsung,pin-drv = <0>;
374 };
375
376 lcd_en: lcd-en {
377 samsung,pins = "gpe3-4";
378 samsung,pin-function = <2>;
379 samsung,pin-pud = <0>;
380 samsung,pin-drv = <0>;
381 };
382
383 lcd_clk: lcd-clk {
384 samsung,pins = "gpf0-0", "gpf0-1", "gpf0-2", "gpf0-3";
385 samsung,pin-function = <2>;
386 samsung,pin-pud = <0>;
387 samsung,pin-drv = <0>;
388 };
389
390 lcd_data16: lcd-data-width16 {
391 samsung,pins = "gpf0-7", "gpf1-0", "gpf1-1", "gpf1-2",
392 "gpf1-3", "gpf1-6", "gpf1-7", "gpf2-0",
393 "gpf2-1", "gpf2-2", "gpf2-3", "gpf2-7",
394 "gpf3-0", "gpf3-1", "gpf3-2", "gpf3-3";
395 samsung,pin-function = <2>;
396 samsung,pin-pud = <0>;
397 samsung,pin-drv = <0>;
398 };
399
400 lcd_data18: lcd-data-width18 {
401 samsung,pins = "gpf0-6", "gpf0-7", "gpf1-0", "gpf1-1",
402 "gpf1-2", "gpf1-3", "gpf1-6", "gpf1-7",
403 "gpf2-0", "gpf2-1", "gpf2-2", "gpf2-3",
404 "gpf2-6", "gpf2-7", "gpf3-0", "gpf3-1",
405 "gpf3-2", "gpf3-3";
406 samsung,pin-function = <2>;
407 samsung,pin-pud = <0>;
408 samsung,pin-drv = <0>;
409 };
410
411 lcd_data24: lcd-data-width24 {
412 samsung,pins = "gpf0-4", "gpf0-5", "gpf0-6", "gpf0-7",
413 "gpf1-0", "gpf1-1", "gpf1-2", "gpf1-3",
414 "gpf1-4", "gpf1-5", "gpf1-6", "gpf1-7",
415 "gpf2-0", "gpf2-1", "gpf2-2", "gpf2-3",
416 "gpf2-4", "gpf2-5", "gpf2-6", "gpf2-7",
417 "gpf3-0", "gpf3-1", "gpf3-2", "gpf3-3";
418 samsung,pin-function = <2>;
419 samsung,pin-pud = <0>;
420 samsung,pin-drv = <0>;
421 };
333 }; 422 };
334 423
335 pinctrl@11000000 { 424 pinctrl@11000000 {
diff --git a/arch/arm/boot/dts/exynos4210-smdkv310.dts b/arch/arm/boot/dts/exynos4210-smdkv310.dts
index 91332b72acf5..9c01b718d29d 100644
--- a/arch/arm/boot/dts/exynos4210-smdkv310.dts
+++ b/arch/arm/boot/dts/exynos4210-smdkv310.dts
@@ -15,7 +15,7 @@
15*/ 15*/
16 16
17/dts-v1/; 17/dts-v1/;
18/include/ "exynos4210.dtsi" 18#include "exynos4210.dtsi"
19 19
20/ { 20/ {
21 model = "Samsung smdkv310 evaluation board based on Exynos4210"; 21 model = "Samsung smdkv310 evaluation board based on Exynos4210";
diff --git a/arch/arm/boot/dts/exynos4210-trats.dts b/arch/arm/boot/dts/exynos4210-trats.dts
index 9a14484c7bb1..94eebffe3044 100644
--- a/arch/arm/boot/dts/exynos4210-trats.dts
+++ b/arch/arm/boot/dts/exynos4210-trats.dts
@@ -13,7 +13,7 @@
13*/ 13*/
14 14
15/dts-v1/; 15/dts-v1/;
16/include/ "exynos4210.dtsi" 16#include "exynos4210.dtsi"
17 17
18/ { 18/ {
19 model = "Samsung Trats based on Exynos4210"; 19 model = "Samsung Trats based on Exynos4210";
diff --git a/arch/arm/boot/dts/exynos4210-universal_c210.dts b/arch/arm/boot/dts/exynos4210-universal_c210.dts
index 345cdb51dcb7..889cdada1ce9 100644
--- a/arch/arm/boot/dts/exynos4210-universal_c210.dts
+++ b/arch/arm/boot/dts/exynos4210-universal_c210.dts
@@ -13,7 +13,7 @@
13*/ 13*/
14 14
15/dts-v1/; 15/dts-v1/;
16/include/ "exynos4210.dtsi" 16#include "exynos4210.dtsi"
17 17
18/ { 18/ {
19 model = "Samsung Universal C210 based on Exynos4210 rev0"; 19 model = "Samsung Universal C210 based on Exynos4210 rev0";
diff --git a/arch/arm/boot/dts/exynos4210.dtsi b/arch/arm/boot/dts/exynos4210.dtsi
index 54710de82908..b7f358a93bcb 100644
--- a/arch/arm/boot/dts/exynos4210.dtsi
+++ b/arch/arm/boot/dts/exynos4210.dtsi
@@ -19,8 +19,8 @@
19 * published by the Free Software Foundation. 19 * published by the Free Software Foundation.
20*/ 20*/
21 21
22/include/ "exynos4.dtsi" 22#include "exynos4.dtsi"
23/include/ "exynos4210-pinctrl.dtsi" 23#include "exynos4210-pinctrl.dtsi"
24 24
25/ { 25/ {
26 compatible = "samsung,exynos4210"; 26 compatible = "samsung,exynos4210";
@@ -112,12 +112,17 @@
112 interrupt-parent = <&combiner>; 112 interrupt-parent = <&combiner>;
113 reg = <0x100C0000 0x100>; 113 reg = <0x100C0000 0x100>;
114 interrupts = <2 4>; 114 interrupts = <2 4>;
115 clocks = <&clock 383>;
116 clock-names = "tmu_apbif";
117 status = "disabled";
115 }; 118 };
116 119
117 g2d@12800000 { 120 g2d@12800000 {
118 compatible = "samsung,s5pv210-g2d"; 121 compatible = "samsung,s5pv210-g2d";
119 reg = <0x12800000 0x1000>; 122 reg = <0x12800000 0x1000>;
120 interrupts = <0 89 0>; 123 interrupts = <0 89 0>;
124 clocks = <&clock 177>, <&clock 277>;
125 clock-names = "sclk_fimg2d", "fimg2d";
121 status = "disabled"; 126 status = "disabled";
122 }; 127 };
123}; 128};
diff --git a/arch/arm/boot/dts/exynos4212.dtsi b/arch/arm/boot/dts/exynos4212.dtsi
index c0f60f49cea6..6f34d7f6ba7e 100644
--- a/arch/arm/boot/dts/exynos4212.dtsi
+++ b/arch/arm/boot/dts/exynos4212.dtsi
@@ -17,7 +17,7 @@
17 * published by the Free Software Foundation. 17 * published by the Free Software Foundation.
18*/ 18*/
19 19
20/include/ "exynos4x12.dtsi" 20#include "exynos4x12.dtsi"
21 21
22/ { 22/ {
23 compatible = "samsung,exynos4212"; 23 compatible = "samsung,exynos4212";
diff --git a/arch/arm/boot/dts/exynos4412-odroidx.dts b/arch/arm/boot/dts/exynos4412-odroidx.dts
index 53bc8bf77984..46c678ee119c 100644
--- a/arch/arm/boot/dts/exynos4412-odroidx.dts
+++ b/arch/arm/boot/dts/exynos4412-odroidx.dts
@@ -12,7 +12,7 @@
12*/ 12*/
13 13
14/dts-v1/; 14/dts-v1/;
15/include/ "exynos4412.dtsi" 15#include "exynos4412.dtsi"
16 16
17/ { 17/ {
18 model = "Hardkernel ODROID-X board based on Exynos4412"; 18 model = "Hardkernel ODROID-X board based on Exynos4412";
@@ -43,6 +43,7 @@
43 #size-cells = <0>; 43 #size-cells = <0>;
44 pinctrl-0 = <&sd4_clk &sd4_cmd &sd4_bus4 &sd4_bus8>; 44 pinctrl-0 = <&sd4_clk &sd4_cmd &sd4_bus4 &sd4_bus8>;
45 pinctrl-names = "default"; 45 pinctrl-names = "default";
46 vmmc-supply = <&ldo20_reg &buck8_reg>;
46 status = "okay"; 47 status = "okay";
47 48
48 num-slots = <1>; 49 num-slots = <1>;
@@ -78,6 +79,7 @@
78 bus-width = <4>; 79 bus-width = <4>;
79 pinctrl-0 = <&sd2_clk &sd2_cmd &sd2_cd &sd2_bus4>; 80 pinctrl-0 = <&sd2_clk &sd2_cmd &sd2_cd &sd2_bus4>;
80 pinctrl-names = "default"; 81 pinctrl-names = "default";
82 vmmc-supply = <&ldo4_reg &ldo21_reg>;
81 status = "okay"; 83 status = "okay";
82 }; 84 };
83 85
@@ -108,4 +110,199 @@
108 clock-frequency = <24000000>; 110 clock-frequency = <24000000>;
109 }; 111 };
110 }; 112 };
113
114 i2c@13860000 {
115 pinctrl-0 = <&i2c0_bus>;
116 pinctrl-names = "default";
117 status = "okay";
118
119 max77686: pmic@09 {
120 compatible = "maxim,max77686";
121 reg = <0x09>;
122
123 voltage-regulators {
124 ldo1_reg: LDO1 {
125 regulator-name = "VDD_ALIVE_1.0V";
126 regulator-min-microvolt = <1000000>;
127 regulator-max-microvolt = <1000000>;
128 regulator-always-on;
129 };
130
131 ldo2_reg: LDO2 {
132 regulator-name = "VDDQ_M1_2_1.8V";
133 regulator-min-microvolt = <1800000>;
134 regulator-max-microvolt = <1800000>;
135 regulator-always-on;
136 };
137
138 ldo3_reg: LDO3 {
139 regulator-name = "VDDQ_EXT_1.8V";
140 regulator-min-microvolt = <1800000>;
141 regulator-max-microvolt = <1800000>;
142 regulator-always-on;
143 };
144
145 ldo4_reg: LDO4 {
146 regulator-name = "VDDQ_MMC2_2.8V";
147 regulator-min-microvolt = <2800000>;
148 regulator-max-microvolt = <2800000>;
149 regulator-always-on;
150 regulator-boot-on;
151 };
152
153 ldo5_reg: LDO5 {
154 regulator-name = "VDDQ_MMC1_3_1.8V";
155 regulator-min-microvolt = <1800000>;
156 regulator-max-microvolt = <1800000>;
157 regulator-always-on;
158 regulator-boot-on;
159 };
160
161 ldo6_reg: LDO6 {
162 regulator-name = "VDD10_MPLL_1.0V";
163 regulator-min-microvolt = <1000000>;
164 regulator-max-microvolt = <1000000>;
165 regulator-always-on;
166 };
167
168 ldo7_reg: LDO7 {
169 regulator-name = "VDD10_XPLL_1.0V";
170 regulator-min-microvolt = <1000000>;
171 regulator-max-microvolt = <1000000>;
172 regulator-always-on;
173 };
174
175 ldo11_reg: LDO11 {
176 regulator-name = "VDD18_ABB1_1.8V";
177 regulator-min-microvolt = <1800000>;
178 regulator-max-microvolt = <1800000>;
179 regulator-always-on;
180 };
181
182 ldo12_reg: LDO12 {
183 regulator-name = "VDD33_USB_3.3V";
184 regulator-min-microvolt = <3300000>;
185 regulator-max-microvolt = <3300000>;
186 regulator-always-on;
187 regulator-boot-on;
188 };
189
190 ldo13_reg: LDO13 {
191 regulator-name = "VDDQ_C2C_W_1.8V";
192 regulator-min-microvolt = <1800000>;
193 regulator-max-microvolt = <1800000>;
194 regulator-always-on;
195 regulator-boot-on;
196 };
197
198 ldo14_reg: LDO14 {
199 regulator-name = "VDD18_ABB0_2_1.8V";
200 regulator-min-microvolt = <1800000>;
201 regulator-max-microvolt = <1800000>;
202 regulator-always-on;
203 regulator-boot-on;
204 };
205
206 ldo15_reg: LDO15 {
207 regulator-name = "VDD10_HSIC_1.0V";
208 regulator-min-microvolt = <1000000>;
209 regulator-max-microvolt = <1000000>;
210 regulator-always-on;
211 regulator-boot-on;
212 };
213
214 ldo16_reg: LDO16 {
215 regulator-name = "VDD18_HSIC_1.8V";
216 regulator-min-microvolt = <1800000>;
217 regulator-max-microvolt = <1800000>;
218 regulator-always-on;
219 regulator-boot-on;
220 };
221
222 ldo20_reg: LDO20 {
223 regulator-name = "LDO20_1.8V";
224 regulator-min-microvolt = <1800000>;
225 regulator-max-microvolt = <1800000>;
226 regulator-boot-on;
227 };
228
229 ldo21_reg: LDO21 {
230 regulator-name = "LDO21_3.3V";
231 regulator-min-microvolt = <3300000>;
232 regulator-max-microvolt = <3300000>;
233 regulator-always-on;
234 regulator-boot-on;
235 };
236
237 ldo25_reg: LDO25 {
238 regulator-name = "VDDQ_LCD_1.8V";
239 regulator-min-microvolt = <1800000>;
240 regulator-max-microvolt = <1800000>;
241 regulator-always-on;
242 regulator-boot-on;
243 };
244
245 buck1_reg: BUCK1 {
246 regulator-name = "vdd_mif";
247 regulator-min-microvolt = <1000000>;
248 regulator-max-microvolt = <1000000>;
249 regulator-always-on;
250 regulator-boot-on;
251 };
252
253 buck2_reg: BUCK2 {
254 regulator-name = "vdd_arm";
255 regulator-min-microvolt = <900000>;
256 regulator-max-microvolt = <1300000>;
257 regulator-always-on;
258 regulator-boot-on;
259 };
260
261 buck3_reg: BUCK3 {
262 regulator-name = "vdd_int";
263 regulator-min-microvolt = <1000000>;
264 regulator-max-microvolt = <1000000>;
265 regulator-always-on;
266 regulator-boot-on;
267 };
268
269 buck4_reg: BUCK4 {
270 regulator-name = "vdd_g3d";
271 regulator-min-microvolt = <900000>;
272 regulator-max-microvolt = <1100000>;
273 regulator-microvolt-offset = <50000>;
274 };
275
276 buck5_reg: BUCK5 {
277 regulator-name = "VDDQ_CKEM1_2_1.2V";
278 regulator-min-microvolt = <1200000>;
279 regulator-max-microvolt = <1200000>;
280 regulator-always-on;
281 regulator-boot-on;
282 };
283
284 buck6_reg: BUCK6 {
285 regulator-name = "BUCK6_1.35V";
286 regulator-min-microvolt = <1350000>;
287 regulator-max-microvolt = <1350000>;
288 regulator-always-on;
289 regulator-boot-on;
290 };
291
292 buck7_reg: BUCK7 {
293 regulator-name = "BUCK7_2.0V";
294 regulator-min-microvolt = <2000000>;
295 regulator-max-microvolt = <2000000>;
296 regulator-always-on;
297 };
298
299 buck8_reg: BUCK8 {
300 regulator-name = "BUCK8_2.8V";
301 regulator-min-microvolt = <2800000>;
302 regulator-max-microvolt = <2800000>;
303 regulator-always-on;
304 };
305 };
306 };
307 };
111}; 308};
diff --git a/arch/arm/boot/dts/exynos4412-origen.dts b/arch/arm/boot/dts/exynos4412-origen.dts
index 1c21bad32ca9..7993641cb32a 100644
--- a/arch/arm/boot/dts/exynos4412-origen.dts
+++ b/arch/arm/boot/dts/exynos4412-origen.dts
@@ -13,7 +13,7 @@
13*/ 13*/
14 14
15/dts-v1/; 15/dts-v1/;
16/include/ "exynos4412.dtsi" 16#include "exynos4412.dtsi"
17 17
18/ { 18/ {
19 model = "Insignal Origen evaluation board based on Exynos4412"; 19 model = "Insignal Origen evaluation board based on Exynos4412";
@@ -36,6 +36,72 @@
36 enable-active-high; 36 enable-active-high;
37 }; 37 };
38 38
39 pinctrl@11000000 {
40 keypad_rows: keypad-rows {
41 samsung,pins = "gpx2-0", "gpx2-1", "gpx2-2";
42 samsung,pin-function = <3>;
43 samsung,pin-pud = <3>;
44 samsung,pin-drv = <0>;
45 };
46
47 keypad_cols: keypad-cols {
48 samsung,pins = "gpx1-0", "gpx1-1";
49 samsung,pin-function = <3>;
50 samsung,pin-pud = <0>;
51 samsung,pin-drv = <0>;
52 };
53 };
54
55 keypad@100A0000 {
56 samsung,keypad-num-rows = <3>;
57 samsung,keypad-num-columns = <2>;
58 linux,keypad-no-autorepeat;
59 linux,keypad-wakeup;
60 pinctrl-0 = <&keypad_rows &keypad_cols>;
61 pinctrl-names = "default";
62 status = "okay";
63
64 key_home {
65 keypad,row = <0>;
66 keypad,column = <0>;
67 linux,code = <102>;
68 };
69
70 key_down {
71 keypad,row = <0>;
72 keypad,column = <1>;
73 linux,code = <108>;
74 };
75
76 key_up {
77 keypad,row = <1>;
78 keypad,column = <0>;
79 linux,code = <103>;
80 };
81
82 key_menu {
83 keypad,row = <1>;
84 keypad,column = <1>;
85 linux,code = <139>;
86 };
87
88 key_back {
89 keypad,row = <2>;
90 keypad,column = <0>;
91 linux,code = <158>;
92 };
93
94 key_enter {
95 keypad,row = <2>;
96 keypad,column = <1>;
97 linux,code = <28>;
98 };
99 };
100
101 g2d@10800000 {
102 status = "okay";
103 };
104
39 sdhci@12530000 { 105 sdhci@12530000 {
40 bus-width = <4>; 106 bus-width = <4>;
41 pinctrl-0 = <&sd2_clk &sd2_cmd &sd2_bus4 &sd2_cd>; 107 pinctrl-0 = <&sd2_clk &sd2_cmd &sd2_bus4 &sd2_cd>;
diff --git a/arch/arm/boot/dts/exynos4412-smdk4412.dts b/arch/arm/boot/dts/exynos4412-smdk4412.dts
index dd564310d4a5..ad316a1ee9e0 100644
--- a/arch/arm/boot/dts/exynos4412-smdk4412.dts
+++ b/arch/arm/boot/dts/exynos4412-smdk4412.dts
@@ -13,7 +13,7 @@
13*/ 13*/
14 14
15/dts-v1/; 15/dts-v1/;
16/include/ "exynos4412.dtsi" 16#include "exynos4412.dtsi"
17 17
18/ { 18/ {
19 model = "Samsung SMDK evaluation board based on Exynos4412"; 19 model = "Samsung SMDK evaluation board based on Exynos4412";
@@ -31,8 +31,91 @@
31 status = "okay"; 31 status = "okay";
32 }; 32 };
33 33
34 g2d@10800000 { 34 pinctrl@11000000 {
35 keypad_rows: keypad-rows {
36 samsung,pins = "gpx2-0", "gpx2-1", "gpx2-2";
37 samsung,pin-function = <3>;
38 samsung,pin-pud = <3>;
39 samsung,pin-drv = <0>;
40 };
41
42 keypad_cols: keypad-cols {
43 samsung,pins = "gpx1-0", "gpx1-1", "gpx1-2", "gpx1-3",
44 "gpx1-4", "gpx1-5", "gpx1-6", "gpx1-7";
45 samsung,pin-function = <3>;
46 samsung,pin-pud = <0>;
47 samsung,pin-drv = <0>;
48 };
49 };
50
51 keypad@100A0000 {
52 samsung,keypad-num-rows = <3>;
53 samsung,keypad-num-columns = <8>;
54 linux,keypad-no-autorepeat;
55 linux,keypad-wakeup;
56 pinctrl-0 = <&keypad_rows &keypad_cols>;
57 pinctrl-names = "default";
35 status = "okay"; 58 status = "okay";
59
60 key_1 {
61 keypad,row = <1>;
62 keypad,column = <3>;
63 linux,code = <2>;
64 };
65
66 key_2 {
67 keypad,row = <1>;
68 keypad,column = <4>;
69 linux,code = <3>;
70 };
71
72 key_3 {
73 keypad,row = <1>;
74 keypad,column = <5>;
75 linux,code = <4>;
76 };
77
78 key_4 {
79 keypad,row = <1>;
80 keypad,column = <6>;
81 linux,code = <5>;
82 };
83
84 key_5 {
85 keypad,row = <1>;
86 keypad,column = <7>;
87 linux,code = <6>;
88 };
89
90 key_A {
91 keypad,row = <2>;
92 keypad,column = <6>;
93 linux,code = <30>;
94 };
95
96 key_B {
97 keypad,row = <2>;
98 keypad,column = <7>;
99 linux,code = <48>;
100 };
101
102 key_C {
103 keypad,row = <0>;
104 keypad,column = <5>;
105 linux,code = <46>;
106 };
107
108 key_D {
109 keypad,row = <2>;
110 keypad,column = <5>;
111 linux,code = <32>;
112 };
113
114 key_E {
115 keypad,row = <0>;
116 keypad,column = <7>;
117 linux,code = <18>;
118 };
36 }; 119 };
37 120
38 sdhci@12530000 { 121 sdhci@12530000 {
diff --git a/arch/arm/boot/dts/exynos4412.dtsi b/arch/arm/boot/dts/exynos4412.dtsi
index 270b389e0a1b..e743e677a9e2 100644
--- a/arch/arm/boot/dts/exynos4412.dtsi
+++ b/arch/arm/boot/dts/exynos4412.dtsi
@@ -17,7 +17,7 @@
17 * published by the Free Software Foundation. 17 * published by the Free Software Foundation.
18*/ 18*/
19 19
20/include/ "exynos4x12.dtsi" 20#include "exynos4x12.dtsi"
21 21
22/ { 22/ {
23 compatible = "samsung,exynos4412"; 23 compatible = "samsung,exynos4412";
diff --git a/arch/arm/boot/dts/exynos4x12-pinctrl.dtsi b/arch/arm/boot/dts/exynos4x12-pinctrl.dtsi
index 099cec79e2ae..704290f7c5c0 100644
--- a/arch/arm/boot/dts/exynos4x12-pinctrl.dtsi
+++ b/arch/arm/boot/dts/exynos4x12-pinctrl.dtsi
@@ -778,62 +778,6 @@
778 samsung,pin-drv = <3>; 778 samsung,pin-drv = <3>;
779 }; 779 };
780 780
781 keypad_col0: keypad-col0 {
782 samsung,pins = "gpl2-0";
783 samsung,pin-function = <3>;
784 samsung,pin-pud = <0>;
785 samsung,pin-drv = <0>;
786 };
787
788 keypad_col1: keypad-col1 {
789 samsung,pins = "gpl2-1";
790 samsung,pin-function = <3>;
791 samsung,pin-pud = <0>;
792 samsung,pin-drv = <0>;
793 };
794
795 keypad_col2: keypad-col2 {
796 samsung,pins = "gpl2-2";
797 samsung,pin-function = <3>;
798 samsung,pin-pud = <0>;
799 samsung,pin-drv = <0>;
800 };
801
802 keypad_col3: keypad-col3 {
803 samsung,pins = "gpl2-3";
804 samsung,pin-function = <3>;
805 samsung,pin-pud = <0>;
806 samsung,pin-drv = <0>;
807 };
808
809 keypad_col4: keypad-col4 {
810 samsung,pins = "gpl2-4";
811 samsung,pin-function = <3>;
812 samsung,pin-pud = <0>;
813 samsung,pin-drv = <0>;
814 };
815
816 keypad_col5: keypad-col5 {
817 samsung,pins = "gpl2-5";
818 samsung,pin-function = <3>;
819 samsung,pin-pud = <0>;
820 samsung,pin-drv = <0>;
821 };
822
823 keypad_col6: keypad-col6 {
824 samsung,pins = "gpl2-6";
825 samsung,pin-function = <3>;
826 samsung,pin-pud = <0>;
827 samsung,pin-drv = <0>;
828 };
829
830 keypad_col7: keypad-col7 {
831 samsung,pins = "gpl2-7";
832 samsung,pin-function = <3>;
833 samsung,pin-pud = <0>;
834 samsung,pin-drv = <0>;
835 };
836
837 cam_port_b: cam-port-b { 781 cam_port_b: cam-port-b {
838 samsung,pins = "gpm0-0", "gpm0-1", "gpm0-2", "gpm0-3", 782 samsung,pins = "gpm0-0", "gpm0-1", "gpm0-2", "gpm0-3",
839 "gpm0-4", "gpm0-5", "gpm0-6", "gpm0-7", 783 "gpm0-4", "gpm0-5", "gpm0-6", "gpm0-7",
diff --git a/arch/arm/boot/dts/exynos4x12.dtsi b/arch/arm/boot/dts/exynos4x12.dtsi
index e3380a7a285c..01da194ba329 100644
--- a/arch/arm/boot/dts/exynos4x12.dtsi
+++ b/arch/arm/boot/dts/exynos4x12.dtsi
@@ -17,8 +17,8 @@
17 * published by the Free Software Foundation. 17 * published by the Free Software Foundation.
18*/ 18*/
19 19
20/include/ "exynos4.dtsi" 20#include "exynos4.dtsi"
21/include/ "exynos4x12-pinctrl.dtsi" 21#include "exynos4x12-pinctrl.dtsi"
22 22
23/ { 23/ {
24 aliases { 24 aliases {
@@ -28,14 +28,6 @@
28 pinctrl3 = &pinctrl_3; 28 pinctrl3 = &pinctrl_3;
29 }; 29 };
30 30
31 combiner:interrupt-controller@10440000 {
32 interrupts = <0 0 0>, <0 1 0>, <0 2 0>, <0 3 0>,
33 <0 4 0>, <0 5 0>, <0 6 0>, <0 7 0>,
34 <0 8 0>, <0 9 0>, <0 10 0>, <0 11 0>,
35 <0 12 0>, <0 13 0>, <0 14 0>, <0 15 0>,
36 <0 16 0>, <0 17 0>, <0 18 0>, <0 19 0>;
37 };
38
39 clock: clock-controller@0x10030000 { 31 clock: clock-controller@0x10030000 {
40 compatible = "samsung,exynos4412-clock"; 32 compatible = "samsung,exynos4412-clock";
41 reg = <0x10030000 0x20000>; 33 reg = <0x10030000 0x20000>;
@@ -77,6 +69,8 @@
77 compatible = "samsung,exynos4212-g2d"; 69 compatible = "samsung,exynos4212-g2d";
78 reg = <0x10800000 0x1000>; 70 reg = <0x10800000 0x1000>;
79 interrupts = <0 89 0>; 71 interrupts = <0 89 0>;
72 clocks = <&clock 177>, <&clock 277>;
73 clock-names = "sclk_fimg2d", "fimg2d";
80 status = "disabled"; 74 status = "disabled";
81 }; 75 };
82}; 76};
diff --git a/arch/arm/boot/dts/exynos5.dtsi b/arch/arm/boot/dts/exynos5.dtsi
new file mode 100644
index 000000000000..f65e124c04a6
--- /dev/null
+++ b/arch/arm/boot/dts/exynos5.dtsi
@@ -0,0 +1,111 @@
1/*
2 * Samsung's Exynos5 SoC series common device tree source
3 *
4 * Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
5 * http://www.samsung.com
6 *
7 * Samsung's Exynos5 SoC series device nodes are listed in this file. Particular
8 * SoCs from Exynos5 series can include this file and provide values for SoCs
9 * specfic bindings.
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#include "skeleton.dtsi"
17
18/ {
19 interrupt-parent = <&gic>;
20
21 chipid@10000000 {
22 compatible = "samsung,exynos4210-chipid";
23 reg = <0x10000000 0x100>;
24 };
25
26 combiner:interrupt-controller@10440000 {
27 compatible = "samsung,exynos4210-combiner";
28 #interrupt-cells = <2>;
29 interrupt-controller;
30 samsung,combiner-nr = <32>;
31 reg = <0x10440000 0x1000>;
32 interrupts = <0 0 0>, <0 1 0>, <0 2 0>, <0 3 0>,
33 <0 4 0>, <0 5 0>, <0 6 0>, <0 7 0>,
34 <0 8 0>, <0 9 0>, <0 10 0>, <0 11 0>,
35 <0 12 0>, <0 13 0>, <0 14 0>, <0 15 0>,
36 <0 16 0>, <0 17 0>, <0 18 0>, <0 19 0>,
37 <0 20 0>, <0 21 0>, <0 22 0>, <0 23 0>,
38 <0 24 0>, <0 25 0>, <0 26 0>, <0 27 0>,
39 <0 28 0>, <0 29 0>, <0 30 0>, <0 31 0>;
40 };
41
42 gic:interrupt-controller@10481000 {
43 compatible = "arm,cortex-a15-gic", "arm,cortex-a9-gic";
44 #interrupt-cells = <3>;
45 interrupt-controller;
46 reg = <0x10481000 0x1000>,
47 <0x10482000 0x1000>,
48 <0x10484000 0x2000>,
49 <0x10486000 0x2000>;
50 interrupts = <1 9 0xf04>;
51 };
52
53 dwmmc_0: dwmmc0@12200000 {
54 compatible = "samsung,exynos5250-dw-mshc";
55 interrupts = <0 75 0>;
56 #address-cells = <1>;
57 #size-cells = <0>;
58 };
59
60 dwmmc_1: dwmmc1@12210000 {
61 compatible = "samsung,exynos5250-dw-mshc";
62 interrupts = <0 76 0>;
63 #address-cells = <1>;
64 #size-cells = <0>;
65 };
66
67 dwmmc_2: dwmmc2@12220000 {
68 compatible = "samsung,exynos5250-dw-mshc";
69 interrupts = <0 77 0>;
70 #address-cells = <1>;
71 #size-cells = <0>;
72 };
73
74 serial@12C00000 {
75 compatible = "samsung,exynos4210-uart";
76 reg = <0x12C00000 0x100>;
77 interrupts = <0 51 0>;
78 };
79
80 serial@12C10000 {
81 compatible = "samsung,exynos4210-uart";
82 reg = <0x12C10000 0x100>;
83 interrupts = <0 52 0>;
84 };
85
86 serial@12C20000 {
87 compatible = "samsung,exynos4210-uart";
88 reg = <0x12C20000 0x100>;
89 interrupts = <0 53 0>;
90 };
91
92 serial@12C30000 {
93 compatible = "samsung,exynos4210-uart";
94 reg = <0x12C30000 0x100>;
95 interrupts = <0 54 0>;
96 };
97
98 rtc {
99 compatible = "samsung,s3c6410-rtc";
100 reg = <0x101E0000 0x100>;
101 interrupts = <0 43 0>, <0 44 0>;
102 status = "disabled";
103 };
104
105 watchdog {
106 compatible = "samsung,s3c2410-wdt";
107 reg = <0x101D0000 0x100>;
108 interrupts = <0 42 0>;
109 status = "disabled";
110 };
111};
diff --git a/arch/arm/boot/dts/exynos5250-arndale.dts b/arch/arm/boot/dts/exynos5250-arndale.dts
index 02cfc76d002f..abc7272c7afd 100644
--- a/arch/arm/boot/dts/exynos5250-arndale.dts
+++ b/arch/arm/boot/dts/exynos5250-arndale.dts
@@ -10,7 +10,7 @@
10*/ 10*/
11 11
12/dts-v1/; 12/dts-v1/;
13/include/ "exynos5250.dtsi" 13#include "exynos5250.dtsi"
14 14
15/ { 15/ {
16 model = "Insignal Arndale evaluation board based on EXYNOS5250"; 16 model = "Insignal Arndale evaluation board based on EXYNOS5250";
@@ -449,4 +449,35 @@
449 clock-frequency = <24000000>; 449 clock-frequency = <24000000>;
450 }; 450 };
451 }; 451 };
452
453 dp-controller {
454 samsung,color-space = <0>;
455 samsung,dynamic-range = <0>;
456 samsung,ycbcr-coeff = <0>;
457 samsung,color-depth = <1>;
458 samsung,link-rate = <0x0a>;
459 samsung,lane-count = <4>;
460 };
461
462 fimd: fimd@14400000 {
463 display-timings {
464 native-mode = <&timing0>;
465 timing0: timing@0 {
466 /* 2560x1600 DP panel */
467 clock-frequency = <50000>;
468 hactive = <2560>;
469 vactive = <1600>;
470 hfront-porch = <48>;
471 hback-porch = <80>;
472 hsync-len = <32>;
473 vback-porch = <16>;
474 vfront-porch = <8>;
475 vsync-len = <6>;
476 };
477 };
478 };
479
480 rtc {
481 status = "okay";
482 };
452}; 483};
diff --git a/arch/arm/boot/dts/exynos5250-pinctrl.dtsi b/arch/arm/boot/dts/exynos5250-pinctrl.dtsi
index ded558bb0f3b..724a22f9b1c8 100644
--- a/arch/arm/boot/dts/exynos5250-pinctrl.dtsi
+++ b/arch/arm/boot/dts/exynos5250-pinctrl.dtsi
@@ -553,6 +553,13 @@
553 samsung,pin-pud = <0>; 553 samsung,pin-pud = <0>;
554 samaung,pin-drv = <0>; 554 samaung,pin-drv = <0>;
555 }; 555 };
556
557 dp_hpd: dp_hpd {
558 samsung,pins = "gpx0-7";
559 samsung,pin-function = <3>;
560 samsung,pin-pud = <0>;
561 samaung,pin-drv = <0>;
562 };
556 }; 563 };
557 564
558 pinctrl@13400000 { 565 pinctrl@13400000 {
diff --git a/arch/arm/boot/dts/exynos5250-smdk5250.dts b/arch/arm/boot/dts/exynos5250-smdk5250.dts
index 3e0c792e2767..49f18c24a576 100644
--- a/arch/arm/boot/dts/exynos5250-smdk5250.dts
+++ b/arch/arm/boot/dts/exynos5250-smdk5250.dts
@@ -10,7 +10,7 @@
10*/ 10*/
11 11
12/dts-v1/; 12/dts-v1/;
13/include/ "exynos5250.dtsi" 13#include "exynos5250.dtsi"
14 14
15/ { 15/ {
16 model = "SAMSUNG SMDK5250 board based on EXYNOS5250"; 16 model = "SAMSUNG SMDK5250 board based on EXYNOS5250";
@@ -37,6 +37,30 @@
37 }; 37 };
38 }; 38 };
39 39
40 vdd:fixed-regulator@0 {
41 compatible = "regulator-fixed";
42 regulator-name = "vdd-supply";
43 regulator-min-microvolt = <1800000>;
44 regulator-max-microvolt = <1800000>;
45 regulator-always-on;
46 };
47
48 dbvdd:fixed-regulator@1 {
49 compatible = "regulator-fixed";
50 regulator-name = "dbvdd-supply";
51 regulator-min-microvolt = <3300000>;
52 regulator-max-microvolt = <3300000>;
53 regulator-always-on;
54 };
55
56 spkvdd:fixed-regulator@2 {
57 compatible = "regulator-fixed";
58 regulator-name = "spkvdd-supply";
59 regulator-min-microvolt = <5000000>;
60 regulator-max-microvolt = <5000000>;
61 regulator-always-on;
62 };
63
40 i2c@12C70000 { 64 i2c@12C70000 {
41 samsung,i2c-sda-delay = <100>; 65 samsung,i2c-sda-delay = <100>;
42 samsung,i2c-max-bus-freq = <20000>; 66 samsung,i2c-max-bus-freq = <20000>;
@@ -47,8 +71,17 @@
47 }; 71 };
48 72
49 wm8994: wm8994@1a { 73 wm8994: wm8994@1a {
50 compatible = "wlf,wm8994"; 74 compatible = "wlf,wm8994";
51 reg = <0x1a>; 75 reg = <0x1a>;
76
77 gpio-controller;
78 #gpio-cells = <2>;
79
80 AVDD2-supply = <&vdd>;
81 CPVDD-supply = <&vdd>;
82 DBVDD-supply = <&dbvdd>;
83 SPKVDD1-supply = <&spkvdd>;
84 SPKVDD2-supply = <&spkvdd>;
52 }; 85 };
53 }; 86 };
54 87
@@ -72,7 +105,7 @@
72 samsung,i2c-max-bus-freq = <66000>; 105 samsung,i2c-max-bus-freq = <66000>;
73 106
74 hdmiddc@50 { 107 hdmiddc@50 {
75 compatible = "samsung,exynos5-hdmiddc"; 108 compatible = "samsung,exynos4210-hdmiddc";
76 reg = <0x50>; 109 reg = <0x50>;
77 }; 110 };
78 }; 111 };
@@ -102,7 +135,7 @@
102 samsung,i2c-max-bus-freq = <66000>; 135 samsung,i2c-max-bus-freq = <66000>;
103 136
104 hdmiphy@38 { 137 hdmiphy@38 {
105 compatible = "samsung,exynos5-hdmiphy"; 138 compatible = "samsung,exynos4212-hdmiphy";
106 reg = <0x38>; 139 reg = <0x38>;
107 }; 140 };
108 }; 141 };
@@ -224,6 +257,9 @@
224 samsung,color-depth = <1>; 257 samsung,color-depth = <1>;
225 samsung,link-rate = <0x0a>; 258 samsung,link-rate = <0x0a>;
226 samsung,lane-count = <4>; 259 samsung,lane-count = <4>;
260
261 pinctrl-names = "default";
262 pinctrl-0 = <&dp_hpd>;
227 }; 263 };
228 264
229 display-timings { 265 display-timings {
diff --git a/arch/arm/boot/dts/exynos5250-snow.dts b/arch/arm/boot/dts/exynos5250-snow.dts
index d449feb7e143..e79331dba12d 100644
--- a/arch/arm/boot/dts/exynos5250-snow.dts
+++ b/arch/arm/boot/dts/exynos5250-snow.dts
@@ -9,8 +9,8 @@
9*/ 9*/
10 10
11/dts-v1/; 11/dts-v1/;
12/include/ "exynos5250.dtsi" 12#include "exynos5250.dtsi"
13/include/ "cros5250-common.dtsi" 13#include "cros5250-common.dtsi"
14 14
15/ { 15/ {
16 model = "Google Snow"; 16 model = "Google Snow";
@@ -171,6 +171,10 @@
171 }; 171 };
172 }; 172 };
173 173
174 rtc {
175 status = "okay";
176 };
177
174 /* 178 /*
175 * On Snow we've got SIP WiFi and so can keep drive strengths low to 179 * On Snow we've got SIP WiFi and so can keep drive strengths low to
176 * reduce EMI. 180 * reduce EMI.
diff --git a/arch/arm/boot/dts/exynos5250.dtsi b/arch/arm/boot/dts/exynos5250.dtsi
index fc9fb3d526e2..ef57277fc38f 100644
--- a/arch/arm/boot/dts/exynos5250.dtsi
+++ b/arch/arm/boot/dts/exynos5250.dtsi
@@ -17,12 +17,13 @@
17 * published by the Free Software Foundation. 17 * published by the Free Software Foundation.
18*/ 18*/
19 19
20/include/ "skeleton.dtsi" 20#include "exynos5.dtsi"
21/include/ "exynos5250-pinctrl.dtsi" 21#include "exynos5250-pinctrl.dtsi"
22
23#include <dt-bindings/clk/exynos-audss-clk.h>
22 24
23/ { 25/ {
24 compatible = "samsung,exynos5250"; 26 compatible = "samsung,exynos5250";
25 interrupt-parent = <&gic>;
26 27
27 aliases { 28 aliases {
28 spi0 = &spi_0; 29 spi0 = &spi_0;
@@ -51,9 +52,20 @@
51 pinctrl3 = &pinctrl_3; 52 pinctrl3 = &pinctrl_3;
52 }; 53 };
53 54
54 chipid@10000000 { 55 cpus {
55 compatible = "samsung,exynos4210-chipid"; 56 #address-cells = <1>;
56 reg = <0x10000000 0x100>; 57 #size-cells = <0>;
58
59 cpu@0 {
60 device_type = "cpu";
61 compatible = "arm,cortex-a15";
62 reg = <0>;
63 };
64 cpu@1 {
65 device_type = "cpu";
66 compatible = "arm,cortex-a15";
67 reg = <1>;
68 };
57 }; 69 };
58 70
59 pd_gsc: gsc-power-domain@0x10044000 { 71 pd_gsc: gsc-power-domain@0x10044000 {
@@ -72,15 +84,10 @@
72 #clock-cells = <1>; 84 #clock-cells = <1>;
73 }; 85 };
74 86
75 gic:interrupt-controller@10481000 { 87 clock_audss: audss-clock-controller@3810000 {
76 compatible = "arm,cortex-a15-gic", "arm,cortex-a9-gic"; 88 compatible = "samsung,exynos5250-audss-clock";
77 #interrupt-cells = <3>; 89 reg = <0x03810000 0x0C>;
78 interrupt-controller; 90 #clock-cells = <1>;
79 reg = <0x10481000 0x1000>,
80 <0x10482000 0x1000>,
81 <0x10484000 0x2000>,
82 <0x10486000 0x2000>;
83 interrupts = <1 9 0xf04>;
84 }; 91 };
85 92
86 timer { 93 timer {
@@ -91,22 +98,6 @@
91 <1 10 0xf08>; 98 <1 10 0xf08>;
92 }; 99 };
93 100
94 combiner:interrupt-controller@10440000 {
95 compatible = "samsung,exynos4210-combiner";
96 #interrupt-cells = <2>;
97 interrupt-controller;
98 samsung,combiner-nr = <32>;
99 reg = <0x10440000 0x1000>;
100 interrupts = <0 0 0>, <0 1 0>, <0 2 0>, <0 3 0>,
101 <0 4 0>, <0 5 0>, <0 6 0>, <0 7 0>,
102 <0 8 0>, <0 9 0>, <0 10 0>, <0 11 0>,
103 <0 12 0>, <0 13 0>, <0 14 0>, <0 15 0>,
104 <0 16 0>, <0 17 0>, <0 18 0>, <0 19 0>,
105 <0 20 0>, <0 21 0>, <0 22 0>, <0 23 0>,
106 <0 24 0>, <0 25 0>, <0 26 0>, <0 27 0>,
107 <0 28 0>, <0 29 0>, <0 30 0>, <0 31 0>;
108 };
109
110 mct@101C0000 { 101 mct@101C0000 {
111 compatible = "samsung,exynos4210-mct"; 102 compatible = "samsung,exynos4210-mct";
112 reg = <0x101C0000 0x800>; 103 reg = <0x101C0000 0x800>;
@@ -168,9 +159,6 @@
168 }; 159 };
169 160
170 watchdog { 161 watchdog {
171 compatible = "samsung,s3c2410-wdt";
172 reg = <0x101D0000 0x100>;
173 interrupts = <0 42 0>;
174 clocks = <&clock 336>; 162 clocks = <&clock 336>;
175 clock-names = "watchdog"; 163 clock-names = "watchdog";
176 }; 164 };
@@ -183,12 +171,8 @@
183 }; 171 };
184 172
185 rtc { 173 rtc {
186 compatible = "samsung,s3c6410-rtc";
187 reg = <0x101E0000 0x100>;
188 interrupts = <0 43 0>, <0 44 0>;
189 clocks = <&clock 337>; 174 clocks = <&clock 337>;
190 clock-names = "rtc"; 175 clock-names = "rtc";
191 status = "disabled";
192 }; 176 };
193 177
194 tmu@10060000 { 178 tmu@10060000 {
@@ -200,33 +184,21 @@
200 }; 184 };
201 185
202 serial@12C00000 { 186 serial@12C00000 {
203 compatible = "samsung,exynos4210-uart";
204 reg = <0x12C00000 0x100>;
205 interrupts = <0 51 0>;
206 clocks = <&clock 289>, <&clock 146>; 187 clocks = <&clock 289>, <&clock 146>;
207 clock-names = "uart", "clk_uart_baud0"; 188 clock-names = "uart", "clk_uart_baud0";
208 }; 189 };
209 190
210 serial@12C10000 { 191 serial@12C10000 {
211 compatible = "samsung,exynos4210-uart";
212 reg = <0x12C10000 0x100>;
213 interrupts = <0 52 0>;
214 clocks = <&clock 290>, <&clock 147>; 192 clocks = <&clock 290>, <&clock 147>;
215 clock-names = "uart", "clk_uart_baud0"; 193 clock-names = "uart", "clk_uart_baud0";
216 }; 194 };
217 195
218 serial@12C20000 { 196 serial@12C20000 {
219 compatible = "samsung,exynos4210-uart";
220 reg = <0x12C20000 0x100>;
221 interrupts = <0 53 0>;
222 clocks = <&clock 291>, <&clock 148>; 197 clocks = <&clock 291>, <&clock 148>;
223 clock-names = "uart", "clk_uart_baud0"; 198 clock-names = "uart", "clk_uart_baud0";
224 }; 199 };
225 200
226 serial@12C30000 { 201 serial@12C30000 {
227 compatible = "samsung,exynos4210-uart";
228 reg = <0x12C30000 0x100>;
229 interrupts = <0 54 0>;
230 clocks = <&clock 292>, <&clock 149>; 202 clocks = <&clock 292>, <&clock 149>;
231 clock-names = "uart", "clk_uart_baud0"; 203 clock-names = "uart", "clk_uart_baud0";
232 }; 204 };
@@ -405,31 +377,19 @@
405 }; 377 };
406 378
407 dwmmc_0: dwmmc0@12200000 { 379 dwmmc_0: dwmmc0@12200000 {
408 compatible = "samsung,exynos5250-dw-mshc";
409 reg = <0x12200000 0x1000>; 380 reg = <0x12200000 0x1000>;
410 interrupts = <0 75 0>;
411 #address-cells = <1>;
412 #size-cells = <0>;
413 clocks = <&clock 280>, <&clock 139>; 381 clocks = <&clock 280>, <&clock 139>;
414 clock-names = "biu", "ciu"; 382 clock-names = "biu", "ciu";
415 }; 383 };
416 384
417 dwmmc_1: dwmmc1@12210000 { 385 dwmmc_1: dwmmc1@12210000 {
418 compatible = "samsung,exynos5250-dw-mshc";
419 reg = <0x12210000 0x1000>; 386 reg = <0x12210000 0x1000>;
420 interrupts = <0 76 0>;
421 #address-cells = <1>;
422 #size-cells = <0>;
423 clocks = <&clock 281>, <&clock 140>; 387 clocks = <&clock 281>, <&clock 140>;
424 clock-names = "biu", "ciu"; 388 clock-names = "biu", "ciu";
425 }; 389 };
426 390
427 dwmmc_2: dwmmc2@12220000 { 391 dwmmc_2: dwmmc2@12220000 {
428 compatible = "samsung,exynos5250-dw-mshc";
429 reg = <0x12220000 0x1000>; 392 reg = <0x12220000 0x1000>;
430 interrupts = <0 77 0>;
431 #address-cells = <1>;
432 #size-cells = <0>;
433 clocks = <&clock 282>, <&clock 141>; 393 clocks = <&clock 282>, <&clock 141>;
434 clock-names = "biu", "ciu"; 394 clock-names = "biu", "ciu";
435 }; 395 };
@@ -451,6 +411,10 @@
451 &pdma0 9 411 &pdma0 9
452 &pdma0 8>; 412 &pdma0 8>;
453 dma-names = "tx", "rx", "tx-sec"; 413 dma-names = "tx", "rx", "tx-sec";
414 clocks = <&clock_audss EXYNOS_I2S_BUS>,
415 <&clock_audss EXYNOS_I2S_BUS>,
416 <&clock_audss EXYNOS_SCLK_I2S>;
417 clock-names = "iis", "i2s_opclk0", "i2s_opclk1";
454 samsung,supports-6ch; 418 samsung,supports-6ch;
455 samsung,supports-rstclr; 419 samsung,supports-rstclr;
456 samsung,supports-secdai; 420 samsung,supports-secdai;
@@ -465,6 +429,8 @@
465 dmas = <&pdma1 12 429 dmas = <&pdma1 12
466 &pdma1 11>; 430 &pdma1 11>;
467 dma-names = "tx", "rx"; 431 dma-names = "tx", "rx";
432 clocks = <&clock 307>, <&clock 157>;
433 clock-names = "iis", "i2s_opclk0";
468 pinctrl-names = "default"; 434 pinctrl-names = "default";
469 pinctrl-0 = <&i2s1_bus>; 435 pinctrl-0 = <&i2s1_bus>;
470 }; 436 };
@@ -475,10 +441,42 @@
475 dmas = <&pdma0 12 441 dmas = <&pdma0 12
476 &pdma0 11>; 442 &pdma0 11>;
477 dma-names = "tx", "rx"; 443 dma-names = "tx", "rx";
444 clocks = <&clock 308>, <&clock 158>;
445 clock-names = "iis", "i2s_opclk0";
478 pinctrl-names = "default"; 446 pinctrl-names = "default";
479 pinctrl-0 = <&i2s2_bus>; 447 pinctrl-0 = <&i2s2_bus>;
480 }; 448 };
481 449
450 usb@12000000 {
451 compatible = "samsung,exynos5250-dwusb3";
452 clocks = <&clock 286>;
453 clock-names = "usbdrd30";
454 #address-cells = <1>;
455 #size-cells = <1>;
456 ranges;
457
458 dwc3 {
459 compatible = "synopsys,dwc3";
460 reg = <0x12000000 0x10000>;
461 interrupts = <0 72 0>;
462 usb-phy = <&usb2_phy &usb3_phy>;
463 };
464 };
465
466 usb3_phy: usbphy@12100000 {
467 compatible = "samsung,exynos5250-usb3phy";
468 reg = <0x12100000 0x100>;
469 clocks = <&clock 1>, <&clock 286>;
470 clock-names = "ext_xtal", "usbdrd30";
471 #address-cells = <1>;
472 #size-cells = <1>;
473 ranges;
474
475 usbphy-sys {
476 reg = <0x10040704 0x8>;
477 };
478 };
479
482 usb@12110000 { 480 usb@12110000 {
483 compatible = "samsung,exynos4210-ehci"; 481 compatible = "samsung,exynos4210-ehci";
484 reg = <0x12110000 0x100>; 482 reg = <0x12110000 0x100>;
@@ -497,7 +495,7 @@
497 clock-names = "usbhost"; 495 clock-names = "usbhost";
498 }; 496 };
499 497
500 usbphy@12130000 { 498 usb2_phy: usbphy@12130000 {
501 compatible = "samsung,exynos5250-usb2phy"; 499 compatible = "samsung,exynos5250-usb2phy";
502 reg = <0x12130000 0x100>; 500 reg = <0x12130000 0x100>;
503 clocks = <&clock 1>, <&clock 285>; 501 clocks = <&clock 1>, <&clock 285>;
@@ -601,7 +599,7 @@
601 }; 599 };
602 600
603 hdmi { 601 hdmi {
604 compatible = "samsung,exynos5-hdmi"; 602 compatible = "samsung,exynos4212-hdmi";
605 reg = <0x14530000 0x70000>; 603 reg = <0x14530000 0x70000>;
606 interrupts = <0 95 0>; 604 interrupts = <0 95 0>;
607 clocks = <&clock 333>, <&clock 136>, <&clock 137>, 605 clocks = <&clock 333>, <&clock 136>, <&clock 137>,
@@ -611,7 +609,7 @@
611 }; 609 };
612 610
613 mixer { 611 mixer {
614 compatible = "samsung,exynos5-mixer"; 612 compatible = "samsung,exynos5250-mixer";
615 reg = <0x14450000 0x10000>; 613 reg = <0x14450000 0x10000>;
616 interrupts = <0 94 0>; 614 interrupts = <0 94 0>;
617 }; 615 };
@@ -621,6 +619,8 @@
621 reg = <0x145b0000 0x1000>; 619 reg = <0x145b0000 0x1000>;
622 interrupts = <10 3>; 620 interrupts = <10 3>;
623 interrupt-parent = <&combiner>; 621 interrupt-parent = <&combiner>;
622 clocks = <&clock 342>;
623 clock-names = "dp";
624 #address-cells = <1>; 624 #address-cells = <1>;
625 #size-cells = <0>; 625 #size-cells = <0>;
626 626
diff --git a/arch/arm/boot/dts/exynos5420-pinctrl.dtsi b/arch/arm/boot/dts/exynos5420-pinctrl.dtsi
new file mode 100644
index 000000000000..5848c425ae4d
--- /dev/null
+++ b/arch/arm/boot/dts/exynos5420-pinctrl.dtsi
@@ -0,0 +1,680 @@
1/*
2 * Samsung's Exynos5420 SoC pin-mux and pin-config device tree source
3 *
4 * Copyright (c) 2013 Samsung Electronics Co., Ltd.
5 * http://www.samsung.com
6 *
7 * Samsung's Exynos5420 SoC pin-mux and pin-config options are listed as device
8 * tree nodes are listed in this file.
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License version 2 as
12 * published by the Free Software Foundation.
13*/
14
15/ {
16 pinctrl@13400000 {
17 gpy7: gpy7 {
18 gpio-controller;
19 #gpio-cells = <2>;
20
21 interrupt-controller;
22 #interrupt-cells = <2>;
23 };
24
25 gpx0: gpx0 {
26 gpio-controller;
27 #gpio-cells = <2>;
28
29 interrupt-controller;
30 interrupt-parent = <&combiner>;
31 #interrupt-cells = <2>;
32 interrupts = <23 0>, <24 0>, <25 0>, <25 1>,
33 <26 0>, <26 1>, <27 0>, <27 1>;
34 };
35
36 gpx1: gpx1 {
37 gpio-controller;
38 #gpio-cells = <2>;
39
40 interrupt-controller;
41 interrupt-parent = <&combiner>;
42 #interrupt-cells = <2>;
43 interrupts = <28 0>, <28 1>, <29 0>, <29 1>,
44 <30 0>, <30 1>, <31 0>, <31 1>;
45 };
46
47 gpx2: gpx2 {
48 gpio-controller;
49 #gpio-cells = <2>;
50
51 interrupt-controller;
52 #interrupt-cells = <2>;
53 };
54
55 gpx3: gpx3 {
56 gpio-controller;
57 #gpio-cells = <2>;
58
59 interrupt-controller;
60 #interrupt-cells = <2>;
61 };
62 };
63
64 pinctrl@13410000 {
65 gpc0: gpc0 {
66 gpio-controller;
67 #gpio-cells = <2>;
68
69 interrupt-controller;
70 #interrupt-cells = <2>;
71 };
72
73 gpc1: gpc1 {
74 gpio-controller;
75 #gpio-cells = <2>;
76
77 interrupt-controller;
78 #interrupt-cells = <2>;
79 };
80
81 gpc2: gpc2 {
82 gpio-controller;
83 #gpio-cells = <2>;
84
85 interrupt-controller;
86 #interrupt-cells = <2>;
87 };
88
89 gpc3: gpc3 {
90 gpio-controller;
91 #gpio-cells = <2>;
92
93 interrupt-controller;
94 #interrupt-cells = <2>;
95 };
96
97 gpc4: gpc4 {
98 gpio-controller;
99 #gpio-cells = <2>;
100
101 interrupt-controller;
102 #interrupt-cells = <2>;
103 };
104
105 gpd1: gpd1 {
106 gpio-controller;
107 #gpio-cells = <2>;
108
109 interrupt-controller;
110 #interrupt-cells = <2>;
111 };
112
113 gpy0: gpy0 {
114 gpio-controller;
115 #gpio-cells = <2>;
116 };
117
118 gpy1: gpy1 {
119 gpio-controller;
120 #gpio-cells = <2>;
121 };
122
123 gpy2: gpy2 {
124 gpio-controller;
125 #gpio-cells = <2>;
126 };
127
128 gpy3: gpy3 {
129 gpio-controller;
130 #gpio-cells = <2>;
131 };
132
133 gpy4: gpy4 {
134 gpio-controller;
135 #gpio-cells = <2>;
136 };
137
138 gpy5: gpy5 {
139 gpio-controller;
140 #gpio-cells = <2>;
141 };
142
143 gpy6: gpy6 {
144 gpio-controller;
145 #gpio-cells = <2>;
146 };
147
148 sd0_clk: sd0-clk {
149 samsung,pins = "gpc0-0";
150 samsung,pin-function = <2>;
151 samsung,pin-pud = <0>;
152 samsung,pin-drv = <3>;
153 };
154
155 sd0_cmd: sd0-cmd {
156 samsung,pins = "gpc0-1";
157 samsung,pin-function = <2>;
158 samsung,pin-pud = <0>;
159 samsung,pin-drv = <3>;
160 };
161
162 sd0_cd: sd0-cd {
163 samsung,pins = "gpc0-2";
164 samsung,pin-function = <2>;
165 samsung,pin-pud = <3>;
166 samsung,pin-drv = <3>;
167 };
168
169 sd0_bus1: sd0-bus-width1 {
170 samsung,pins = "gpc0-3";
171 samsung,pin-function = <2>;
172 samsung,pin-pud = <3>;
173 samsung,pin-drv = <3>;
174 };
175
176 sd0_bus4: sd0-bus-width4 {
177 samsung,pins = "gpc0-4", "gpc0-5", "gpc0-6";
178 samsung,pin-function = <2>;
179 samsung,pin-pud = <3>;
180 samsung,pin-drv = <3>;
181 };
182
183 sd0_bus8: sd0-bus-width8 {
184 samsung,pins = "gpc3-0", "gpc3-1", "gpc3-2", "gpc3-3";
185 samsung,pin-function = <2>;
186 samsung,pin-pud = <3>;
187 samsung,pin-drv = <3>;
188 };
189
190 sd1_clk: sd1-clk {
191 samsung,pins = "gpc1-0";
192 samsung,pin-function = <2>;
193 samsung,pin-pud = <0>;
194 samsung,pin-drv = <3>;
195 };
196
197 sd1_cmd: sd1-cmd {
198 samsung,pins = "gpc1-1";
199 samsung,pin-function = <2>;
200 samsung,pin-pud = <0>;
201 samsung,pin-drv = <3>;
202 };
203
204 sd1_cd: sd1-cd {
205 samsung,pins = "gpc1-2";
206 samsung,pin-function = <2>;
207 samsung,pin-pud = <3>;
208 samsung,pin-drv = <3>;
209 };
210
211 sd1_int: sd1-int {
212 samsung,pins = "gpd1-1";
213 samsung,pin-function = <2>;
214 samsung,pin-pud = <3>;
215 samsung,pin-drv = <0>;
216 };
217
218 sd1_bus1: sd1-bus-width1 {
219 samsung,pins = "gpc1-3";
220 samsung,pin-function = <2>;
221 samsung,pin-pud = <3>;
222 samsung,pin-drv = <3>;
223 };
224
225 sd1_bus4: sd1-bus-width4 {
226 samsung,pins = "gpc1-4", "gpc1-5", "gpc1-6";
227 samsung,pin-function = <2>;
228 samsung,pin-pud = <3>;
229 samsung,pin-drv = <3>;
230 };
231
232 sd1_bus8: sd1-bus-width8 {
233 samsung,pins = "gpd1-4", "gpd1-5", "gpd1-6", "gpd1-7";
234 samsung,pin-function = <2>;
235 samsung,pin-pud = <3>;
236 samsung,pin-drv = <3>;
237 };
238
239 sd2_clk: sd2-clk {
240 samsung,pins = "gpc2-0";
241 samsung,pin-function = <2>;
242 samsung,pin-pud = <0>;
243 samsung,pin-drv = <3>;
244 };
245
246 sd2_cmd: sd2-cmd {
247 samsung,pins = "gpc2-1";
248 samsung,pin-function = <2>;
249 samsung,pin-pud = <0>;
250 samsung,pin-drv = <3>;
251 };
252
253 sd2_cd: sd2-cd {
254 samsung,pins = "gpc2-2";
255 samsung,pin-function = <2>;
256 samsung,pin-pud = <3>;
257 samsung,pin-drv = <3>;
258 };
259
260 sd2_bus1: sd2-bus-width1 {
261 samsung,pins = "gpc2-3";
262 samsung,pin-function = <2>;
263 samsung,pin-pud = <3>;
264 samsung,pin-drv = <3>;
265 };
266
267 sd2_bus4: sd2-bus-width4 {
268 samsung,pins = "gpc2-4", "gpc2-5", "gpc2-6";
269 samsung,pin-function = <2>;
270 samsung,pin-pud = <3>;
271 samsung,pin-drv = <3>;
272 };
273 };
274
275 pinctrl@14000000 {
276 gpe0: gpe0 {
277 gpio-controller;
278 #gpio-cells = <2>;
279
280 interrupt-controller;
281 #interrupt-cells = <2>;
282 };
283
284 gpe1: gpe1 {
285 gpio-controller;
286 #gpio-cells = <2>;
287
288 interrupt-controller;
289 #interrupt-cells = <2>;
290 };
291
292 gpf0: gpf0 {
293 gpio-controller;
294 #gpio-cells = <2>;
295
296 interrupt-controller;
297 #interrupt-cells = <2>;
298 };
299
300 gpf1: gpf1 {
301 gpio-controller;
302 #gpio-cells = <2>;
303
304 interrupt-controller;
305 #interrupt-cells = <2>;
306 };
307
308 gpg0: gpg0 {
309 gpio-controller;
310 #gpio-cells = <2>;
311
312 interrupt-controller;
313 #interrupt-cells = <2>;
314 };
315
316 gpg1: gpg1 {
317 gpio-controller;
318 #gpio-cells = <2>;
319
320 interrupt-controller;
321 #interrupt-cells = <2>;
322 };
323
324 gpg2: gpg2 {
325 gpio-controller;
326 #gpio-cells = <2>;
327
328 interrupt-controller;
329 #interrupt-cells = <2>;
330 };
331
332 gpj4: gpj4 {
333 gpio-controller;
334 #gpio-cells = <2>;
335
336 interrupt-controller;
337 #interrupt-cells = <2>;
338 };
339
340 cam_gpio_a: cam-gpio-a {
341 samsung,pins = "gpe0-0", "gpe0-1", "gpe0-2", "gpe0-3",
342 "gpe0-4", "gpe0-5", "gpe0-6", "gpe0-7",
343 "gpe1-0", "gpe1-1";
344 samsung,pin-function = <2>;
345 samsung,pin-pud = <0>;
346 samsung,pin-drv = <0>;
347 };
348
349 cam_gpio_b: cam-gpio-b {
350 samsung,pins = "gpf0-0", "gpf0-1", "gpf0-2", "gpf0-3",
351 "gpf1-0", "gpf1-1", "gpf1-2", "gpf1-3";
352 samsung,pin-function = <3>;
353 samsung,pin-pud = <0>;
354 samsung,pin-drv = <0>;
355 };
356
357 cam_i2c2_bus: cam-i2c2-bus {
358 samsung,pins = "gpf0-4", "gpf0-5";
359 samsung,pin-function = <2>;
360 samsung,pin-pud = <3>;
361 samsung,pin-drv = <0>;
362 };
363 cam_spi1_bus: cam-spi1-bus {
364 samsung,pins = "gpe0-4", "gpe0-5", "gpf0-2", "gpf0-3";
365 samsung,pin-function = <4>;
366 samsung,pin-pud = <0>;
367 samsung,pin-drv = <0>;
368 };
369
370 cam_i2c1_bus: cam-i2c1-bus {
371 samsung,pins = "gpf0-2", "gpf0-3";
372 samsung,pin-function = <2>;
373 samsung,pin-pud = <3>;
374 samsung,pin-drv = <0>;
375 };
376
377 cam_i2c0_bus: cam-i2c0-bus {
378 samsung,pins = "gpf0-0", "gpf0-1";
379 samsung,pin-function = <2>;
380 samsung,pin-pud = <3>;
381 samsung,pin-drv = <0>;
382 };
383
384 cam_spi0_bus: cam-spi0-bus {
385 samsung,pins = "gpf1-0", "gpf1-1", "gpf1-2", "gpf1-3";
386 samsung,pin-function = <2>;
387 samsung,pin-pud = <0>;
388 samsung,pin-drv = <0>;
389 };
390
391 cam_bayrgb_bus: cam-bayrgb-bus {
392 samsung,pins = "gpg0-0", "gpg0-1", "gpg0-2", "gpg0-3",
393 "gpg0-4", "gpg0-5", "gpg0-6", "gpg0-7",
394 "gpg1-0", "gpg1-1", "gpg1-2", "gpg1-3",
395 "gpg1-4", "gpg1-5", "gpg1-6", "gpg1-7",
396 "gpg2-0";
397 samsung,pin-function = <2>;
398 samsung,pin-pud = <0>;
399 samsung,pin-drv = <0>;
400 };
401 };
402
403 pinctrl@14010000 {
404 gpa0: gpa0 {
405 gpio-controller;
406 #gpio-cells = <2>;
407
408 interrupt-controller;
409 #interrupt-cells = <2>;
410 };
411
412 gpa1: gpa1 {
413 gpio-controller;
414 #gpio-cells = <2>;
415
416 interrupt-controller;
417 #interrupt-cells = <2>;
418 };
419
420 gpa2: gpa2 {
421 gpio-controller;
422 #gpio-cells = <2>;
423
424 interrupt-controller;
425 #interrupt-cells = <2>;
426 };
427
428 gpb0: gpb0 {
429 gpio-controller;
430 #gpio-cells = <2>;
431
432 interrupt-controller;
433 #interrupt-cells = <2>;
434 };
435
436 gpb1: gpb1 {
437 gpio-controller;
438 #gpio-cells = <2>;
439
440 interrupt-controller;
441 #interrupt-cells = <2>;
442 };
443
444 gpb2: gpb2 {
445 gpio-controller;
446 #gpio-cells = <2>;
447
448 interrupt-controller;
449 #interrupt-cells = <2>;
450 };
451
452 gpb3: gpb3 {
453 gpio-controller;
454 #gpio-cells = <2>;
455
456 interrupt-controller;
457 #interrupt-cells = <2>;
458 };
459
460 gpb4: gpb4 {
461 gpio-controller;
462 #gpio-cells = <2>;
463
464 interrupt-controller;
465 #interrupt-cells = <2>;
466 };
467
468 gph0: gph0 {
469 gpio-controller;
470 #gpio-cells = <2>;
471
472 interrupt-controller;
473 #interrupt-cells = <2>;
474 };
475
476 uart0_data: uart0-data {
477 samsung,pins = "gpa0-0", "gpa0-1";
478 samsung,pin-function = <2>;
479 samsung,pin-pud = <0>;
480 samsung,pin-drv = <0>;
481 };
482
483 uart0_fctl: uart0-fctl {
484 samsung,pins = "gpa0-2", "gpa0-3";
485 samsung,pin-function = <2>;
486 samsung,pin-pud = <0>;
487 samsung,pin-drv = <0>;
488 };
489
490 uart1_data: uart1-data {
491 samsung,pins = "gpa0-4", "gpa0-5";
492 samsung,pin-function = <2>;
493 samsung,pin-pud = <0>;
494 samsung,pin-drv = <0>;
495 };
496
497 uart1_fctl: uart1-fctl {
498 samsung,pins = "gpa0-6", "gpa0-7";
499 samsung,pin-function = <2>;
500 samsung,pin-pud = <0>;
501 samsung,pin-drv = <0>;
502 };
503
504 i2c2_bus: i2c2-bus {
505 samsung,pins = "gpa0-6", "gpa0-7";
506 samsung,pin-function = <3>;
507 samsung,pin-pud = <3>;
508 samsung,pin-drv = <0>;
509 };
510
511 uart2_data: uart2-data {
512 samsung,pins = "gpa1-0", "gpa1-1";
513 samsung,pin-function = <2>;
514 samsung,pin-pud = <0>;
515 samsung,pin-drv = <0>;
516 };
517
518 uart2_fctl: uart2-fctl {
519 samsung,pins = "gpa1-2", "gpa1-3";
520 samsung,pin-function = <2>;
521 samsung,pin-pud = <0>;
522 samsung,pin-drv = <0>;
523 };
524
525 i2c3_bus: i2c3-bus {
526 samsung,pins = "gpa1-2", "gpa1-3";
527 samsung,pin-function = <3>;
528 samsung,pin-pud = <3>;
529 samsung,pin-drv = <0>;
530 };
531
532 uart3_data: uart3-data {
533 samsung,pins = "gpa1-4", "gpa1-5";
534 samsung,pin-function = <2>;
535 samsung,pin-pud = <0>;
536 samsung,pin-drv = <0>;
537 };
538
539 spi0_bus: spi0-bus {
540 samsung,pins = "gpa2-0", "gpa2-1", "gpa2-2", "gpa2-3";
541 samsung,pin-function = <2>;
542 samsung,pin-pud = <3>;
543 samsung,pin-drv = <0>;
544 };
545
546 spi1_bus: spi1-bus {
547 samsung,pins = "gpa2-4", "gpa2-6", "gpa2-7";
548 samsung,pin-function = <2>;
549 samsung,pin-pud = <3>;
550 samsung,pin-drv = <0>;
551 };
552
553 i2c4_hs_bus: i2c4-hs-bus {
554 samsung,pins = "gpa2-0", "gpa2-1";
555 samsung,pin-function = <3>;
556 samsung,pin-pud = <3>;
557 samsung,pin-drv = <0>;
558 };
559
560 i2c5_hs_bus: i2c5-hs-bus {
561 samsung,pins = "gpa2-2", "gpa2-3";
562 samsung,pin-function = <3>;
563 samsung,pin-pud = <3>;
564 samsung,pin-drv = <0>;
565 };
566
567 i2s1_bus: i2s1-bus {
568 samsung,pins = "gpb0-0", "gpb0-1", "gpb0-2", "gpb0-3",
569 "gpb0-4";
570 samsung,pin-function = <2>;
571 samsung,pin-pud = <0>;
572 samsung,pin-drv = <0>;
573 };
574
575 pcm1_bus: pcm1-bus {
576 samsung,pins = "gpb0-0", "gpb0-1", "gpb0-2", "gpb0-3",
577 "gpb0-4";
578 samsung,pin-function = <3>;
579 samsung,pin-pud = <0>;
580 samsung,pin-drv = <0>;
581 };
582
583 i2s2_bus: i2s2-bus {
584 samsung,pins = "gpb1-0", "gpb1-1", "gpb1-2", "gpb1-3",
585 "gpb1-4";
586 samsung,pin-function = <2>;
587 samsung,pin-pud = <0>;
588 samsung,pin-drv = <0>;
589 };
590
591 pcm2_bus: pcm2-bus {
592 samsung,pins = "gpb1-0", "gpb1-1", "gpb1-2", "gpb1-3",
593 "gpb1-4";
594 samsung,pin-function = <3>;
595 samsung,pin-pud = <0>;
596 samsung,pin-drv = <0>;
597 };
598
599 spdif_bus: spdif-bus {
600 samsung,pins = "gpb1-0", "gpb1-1";
601 samsung,pin-function = <4>;
602 samsung,pin-pud = <0>;
603 samsung,pin-drv = <0>;
604 };
605
606 spi2_bus: spi2-bus {
607 samsung,pins = "gpb1-1", "gpb1-3", "gpb1-4";
608 samsung,pin-function = <5>;
609 samsung,pin-pud = <3>;
610 samsung,pin-drv = <0>;
611 };
612
613 i2c6_hs_bus: i2c6-hs-bus {
614 samsung,pins = "gpb1-3", "gpb1-4";
615 samsung,pin-function = <4>;
616 samsung,pin-pud = <3>;
617 samsung,pin-drv = <0>;
618 };
619
620 i2c7_hs_bus: i2c7-hs-bus {
621 samsung,pins = "gpb2-2", "gpb2-3";
622 samsung,pin-function = <3>;
623 samsung,pin-pud = <3>;
624 samsung,pin-drv = <0>;
625 };
626
627 i2c0_bus: i2c0-bus {
628 samsung,pins = "gpb3-0", "gpb3-1";
629 samsung,pin-function = <2>;
630 samsung,pin-pud = <3>;
631 samsung,pin-drv = <0>;
632 };
633
634 i2c1_bus: i2c1-bus {
635 samsung,pins = "gpb3-2", "gpb3-3";
636 samsung,pin-function = <2>;
637 samsung,pin-pud = <3>;
638 samsung,pin-drv = <0>;
639 };
640
641 i2c8_hs_bus: i2c8-hs-bus {
642 samsung,pins = "gpb3-4", "gpb3-5";
643 samsung,pin-function = <2>;
644 samsung,pin-pud = <3>;
645 samsung,pin-drv = <0>;
646 };
647
648 i2c9_hs_bus: i2c9-hs-bus {
649 samsung,pins = "gpb3-6", "gpb3-7";
650 samsung,pin-function = <2>;
651 samsung,pin-pud = <3>;
652 samsung,pin-drv = <0>;
653 };
654
655 i2c10_hs_bus: i2c10-hs-bus {
656 samsung,pins = "gpb4-0", "gpb4-1";
657 samsung,pin-function = <2>;
658 samsung,pin-pud = <3>;
659 samsung,pin-drv = <0>;
660 };
661 };
662
663 pinctrl@03860000 {
664 gpz: gpz {
665 gpio-controller;
666 #gpio-cells = <2>;
667
668 interrupt-controller;
669 #interrupt-cells = <2>;
670 };
671
672 i2s0_bus: i2s0-bus {
673 samsung,pins = "gpz-0", "gpz-1", "gpz-2", "gpz-3",
674 "gpz-4", "gpz-5", "gpz-6";
675 samsung,pin-function = <2>;
676 samsung,pin-pud = <0>;
677 samsung,pin-drv = <0>;
678 };
679 };
680};
diff --git a/arch/arm/boot/dts/exynos5420-smdk5420.dts b/arch/arm/boot/dts/exynos5420-smdk5420.dts
new file mode 100644
index 000000000000..08607df6a180
--- /dev/null
+++ b/arch/arm/boot/dts/exynos5420-smdk5420.dts
@@ -0,0 +1,33 @@
1/*
2 * SAMSUNG SMDK5420 board device tree source
3 *
4 * Copyright (c) 2013 Samsung Electronics Co., Ltd.
5 * http://www.samsung.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 version 2 as
9 * published by the Free Software Foundation.
10*/
11
12/dts-v1/;
13#include "exynos5420.dtsi"
14
15/ {
16 model = "Samsung SMDK5420 board based on EXYNOS5420";
17 compatible = "samsung,smdk5420", "samsung,exynos5420";
18
19 memory {
20 reg = <0x20000000 0x80000000>;
21 };
22
23 chosen {
24 bootargs = "console=ttySAC2,115200 init=/linuxrc";
25 };
26
27 fixed-rate-clocks {
28 oscclk {
29 compatible = "samsung,exynos5420-oscclk";
30 clock-frequency = <24000000>;
31 };
32 };
33};
diff --git a/arch/arm/boot/dts/exynos5420.dtsi b/arch/arm/boot/dts/exynos5420.dtsi
new file mode 100644
index 000000000000..8c54c4b74f0e
--- /dev/null
+++ b/arch/arm/boot/dts/exynos5420.dtsi
@@ -0,0 +1,148 @@
1/*
2 * SAMSUNG EXYNOS5420 SoC device tree source
3 *
4 * Copyright (c) 2013 Samsung Electronics Co., Ltd.
5 * http://www.samsung.com
6 *
7 * SAMSUNG EXYNOS54200 SoC device nodes are listed in this file.
8 * EXYNOS5420 based board files can include this file and provide
9 * values for board specfic bindings.
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#include "exynos5.dtsi"
17/include/ "exynos5420-pinctrl.dtsi"
18/ {
19 compatible = "samsung,exynos5420";
20
21 aliases {
22 pinctrl0 = &pinctrl_0;
23 pinctrl1 = &pinctrl_1;
24 pinctrl2 = &pinctrl_2;
25 pinctrl3 = &pinctrl_3;
26 pinctrl4 = &pinctrl_4;
27 };
28
29 cpus {
30 #address-cells = <1>;
31 #size-cells = <0>;
32
33 cpu0: cpu@0 {
34 device_type = "cpu";
35 compatible = "arm,cortex-a15";
36 reg = <0x0>;
37 clock-frequency = <1800000000>;
38 };
39
40 cpu1: cpu@1 {
41 device_type = "cpu";
42 compatible = "arm,cortex-a15";
43 reg = <0x1>;
44 clock-frequency = <1800000000>;
45 };
46
47 cpu2: cpu@2 {
48 device_type = "cpu";
49 compatible = "arm,cortex-a15";
50 reg = <0x2>;
51 clock-frequency = <1800000000>;
52 };
53
54 cpu3: cpu@3 {
55 device_type = "cpu";
56 compatible = "arm,cortex-a15";
57 reg = <0x3>;
58 clock-frequency = <1800000000>;
59 };
60 };
61
62 clock: clock-controller@0x10010000 {
63 compatible = "samsung,exynos5420-clock";
64 reg = <0x10010000 0x30000>;
65 #clock-cells = <1>;
66 };
67
68 mct@101C0000 {
69 compatible = "samsung,exynos4210-mct";
70 reg = <0x101C0000 0x800>;
71 interrupt-controller;
72 #interrups-cells = <1>;
73 interrupt-parent = <&mct_map>;
74 interrupts = <0>, <1>, <2>, <3>, <4>, <5>, <6>, <7>;
75 clocks = <&clock 1>, <&clock 315>;
76 clock-names = "fin_pll", "mct";
77
78 mct_map: mct-map {
79 #interrupt-cells = <1>;
80 #address-cells = <0>;
81 #size-cells = <0>;
82 interrupt-map = <0 &combiner 23 3>,
83 <1 &combiner 23 4>,
84 <2 &combiner 25 2>,
85 <3 &combiner 25 3>,
86 <4 &gic 0 120 0>,
87 <5 &gic 0 121 0>,
88 <6 &gic 0 122 0>,
89 <7 &gic 0 123 0>;
90 };
91 };
92
93 pinctrl_0: pinctrl@13400000 {
94 compatible = "samsung,exynos5420-pinctrl";
95 reg = <0x13400000 0x1000>;
96 interrupts = <0 45 0>;
97
98 wakeup-interrupt-controller {
99 compatible = "samsung,exynos4210-wakeup-eint";
100 interrupt-parent = <&gic>;
101 interrupts = <0 32 0>;
102 };
103 };
104
105 pinctrl_1: pinctrl@13410000 {
106 compatible = "samsung,exynos5420-pinctrl";
107 reg = <0x13410000 0x1000>;
108 interrupts = <0 78 0>;
109 };
110
111 pinctrl_2: pinctrl@14000000 {
112 compatible = "samsung,exynos5420-pinctrl";
113 reg = <0x14000000 0x1000>;
114 interrupts = <0 46 0>;
115 };
116
117 pinctrl_3: pinctrl@14010000 {
118 compatible = "samsung,exynos5420-pinctrl";
119 reg = <0x14010000 0x1000>;
120 interrupts = <0 50 0>;
121 };
122
123 pinctrl_4: pinctrl@03860000 {
124 compatible = "samsung,exynos5420-pinctrl";
125 reg = <0x03860000 0x1000>;
126 interrupts = <0 47 0>;
127 };
128
129 serial@12C00000 {
130 clocks = <&clock 257>, <&clock 128>;
131 clock-names = "uart", "clk_uart_baud0";
132 };
133
134 serial@12C10000 {
135 clocks = <&clock 258>, <&clock 129>;
136 clock-names = "uart", "clk_uart_baud0";
137 };
138
139 serial@12C20000 {
140 clocks = <&clock 259>, <&clock 130>;
141 clock-names = "uart", "clk_uart_baud0";
142 };
143
144 serial@12C30000 {
145 clocks = <&clock 260>, <&clock 131>;
146 clock-names = "uart", "clk_uart_baud0";
147 };
148};
diff --git a/arch/arm/boot/dts/exynos5440-sd5v1.dts b/arch/arm/boot/dts/exynos5440-sd5v1.dts
index ef747b52b674..5b22508050da 100644
--- a/arch/arm/boot/dts/exynos5440-sd5v1.dts
+++ b/arch/arm/boot/dts/exynos5440-sd5v1.dts
@@ -10,14 +10,14 @@
10*/ 10*/
11 11
12/dts-v1/; 12/dts-v1/;
13/include/ "exynos5440.dtsi" 13#include "exynos5440.dtsi"
14 14
15/ { 15/ {
16 model = "SAMSUNG SD5v1 board based on EXYNOS5440"; 16 model = "SAMSUNG SD5v1 board based on EXYNOS5440";
17 compatible = "samsung,sd5v1", "samsung,exynos5440"; 17 compatible = "samsung,sd5v1", "samsung,exynos5440";
18 18
19 chosen { 19 chosen {
20 bootargs = "root=/dev/sda2 rw rootwait ignore_loglevel early_printk no_console_suspend mem=2048M@0x80000000 console=ttySAC0,115200"; 20 bootargs = "root=/dev/sda2 rw rootwait ignore_loglevel early_printk no_console_suspend mem=2048M@0x80000000 mem=6144M@0x100000000 console=ttySAC0,115200";
21 }; 21 };
22 22
23 fixed-rate-clocks { 23 fixed-rate-clocks {
diff --git a/arch/arm/boot/dts/exynos5440-ssdk5440.dts b/arch/arm/boot/dts/exynos5440-ssdk5440.dts
index d55042beb5c5..ede772741f81 100644
--- a/arch/arm/boot/dts/exynos5440-ssdk5440.dts
+++ b/arch/arm/boot/dts/exynos5440-ssdk5440.dts
@@ -10,18 +10,53 @@
10*/ 10*/
11 11
12/dts-v1/; 12/dts-v1/;
13/include/ "exynos5440.dtsi" 13#include "exynos5440.dtsi"
14 14
15/ { 15/ {
16 model = "SAMSUNG SSDK5440 board based on EXYNOS5440"; 16 model = "SAMSUNG SSDK5440 board based on EXYNOS5440";
17 compatible = "samsung,ssdk5440", "samsung,exynos5440"; 17 compatible = "samsung,ssdk5440", "samsung,exynos5440";
18 18
19 chosen { 19 chosen {
20 bootargs = "root=/dev/sda2 rw rootwait ignore_loglevel early_printk no_console_suspend mem=2048M@0x80000000 console=ttySAC0,115200"; 20 bootargs = "root=/dev/sda2 rw rootwait ignore_loglevel early_printk no_console_suspend mem=2048M@0x80000000 mem=6144M@0x100000000 console=ttySAC0,115200";
21 }; 21 };
22 22
23 spi { 23 spi_0: spi@D0000 {
24 status = "disabled"; 24
25 flash: w25q128@0 {
26 #address-cells = <1>;
27 #size-cells = <1>;
28 compatible = "winbond,w25q128";
29 spi-max-frequency = <15625000>;
30 reg = <0>;
31 controller-data {
32 samsung,spi-feedback-delay = <0>;
33 };
34
35 partition@00000 {
36 label = "BootLoader";
37 reg = <0x60000 0x80000>;
38 read-only;
39 };
40
41 partition@e0000 {
42 label = "Recovery-Kernel";
43 reg = <0xe0000 0x300000>;
44 read-only;
45 };
46
47 partition@3e0000 {
48 label = "CRAM-FS";
49 reg = <0x3e0000 0x700000>;
50 read-only;
51 };
52
53 partition@ae0000 {
54 label = "User-Data";
55 reg = <0xae0000 0x520000>;
56 };
57
58 };
59
25 }; 60 };
26 61
27 fixed-rate-clocks { 62 fixed-rate-clocks {
@@ -30,4 +65,12 @@
30 clock-frequency = <50000000>; 65 clock-frequency = <50000000>;
31 }; 66 };
32 }; 67 };
68
69 pcie@290000 {
70 reset-gpio = <&pin_ctrl 5 0>;
71 };
72
73 pcie@2a0000 {
74 reset-gpio = <&pin_ctrl 22 0>;
75 };
33}; 76};
diff --git a/arch/arm/boot/dts/exynos5440.dtsi b/arch/arm/boot/dts/exynos5440.dtsi
index f6b1c8973845..ff7f5d855845 100644
--- a/arch/arm/boot/dts/exynos5440.dtsi
+++ b/arch/arm/boot/dts/exynos5440.dtsi
@@ -9,13 +9,17 @@
9 * published by the Free Software Foundation. 9 * published by the Free Software Foundation.
10*/ 10*/
11 11
12/include/ "skeleton.dtsi" 12#include "skeleton.dtsi"
13 13
14/ { 14/ {
15 compatible = "samsung,exynos5440"; 15 compatible = "samsung,exynos5440";
16 16
17 interrupt-parent = <&gic>; 17 interrupt-parent = <&gic>;
18 18
19 aliases {
20 spi0 = &spi_0;
21 };
22
19 clock: clock-controller@0x160000 { 23 clock: clock-controller@0x160000 {
20 compatible = "samsung,exynos5440-clock"; 24 compatible = "samsung,exynos5440-clock";
21 reg = <0x160000 0x1000>; 25 reg = <0x160000 0x1000>;
@@ -38,18 +42,22 @@
38 #size-cells = <0>; 42 #size-cells = <0>;
39 43
40 cpu@0 { 44 cpu@0 {
45 device_type = "cpu";
41 compatible = "arm,cortex-a15"; 46 compatible = "arm,cortex-a15";
42 reg = <0>; 47 reg = <0>;
43 }; 48 };
44 cpu@1 { 49 cpu@1 {
50 device_type = "cpu";
45 compatible = "arm,cortex-a15"; 51 compatible = "arm,cortex-a15";
46 reg = <1>; 52 reg = <1>;
47 }; 53 };
48 cpu@2 { 54 cpu@2 {
55 device_type = "cpu";
49 compatible = "arm,cortex-a15"; 56 compatible = "arm,cortex-a15";
50 reg = <2>; 57 reg = <2>;
51 }; 58 };
52 cpu@3 { 59 cpu@3 {
60 device_type = "cpu";
53 compatible = "arm,cortex-a15"; 61 compatible = "arm,cortex-a15";
54 reg = <3>; 62 reg = <3>;
55 }; 63 };
@@ -79,8 +87,13 @@
79 interrupts = <0 57 0>; 87 interrupts = <0 57 0>;
80 operating-points = < 88 operating-points = <
81 /* KHz uV */ 89 /* KHz uV */
90 1500000 1100000
91 1400000 1075000
92 1300000 1050000
82 1200000 1025000 93 1200000 1025000
94 1100000 1000000
83 1000000 975000 95 1000000 975000
96 900000 950000
84 800000 925000 97 800000 925000
85 >; 98 >;
86 }; 99 };
@@ -101,19 +114,19 @@
101 clock-names = "uart", "clk_uart_baud0"; 114 clock-names = "uart", "clk_uart_baud0";
102 }; 115 };
103 116
104 spi { 117 spi_0: spi@D0000 {
105 compatible = "samsung,exynos4210-spi"; 118 compatible = "samsung,exynos5440-spi";
106 reg = <0xD0000 0x1000>; 119 reg = <0xD0000 0x100>;
107 interrupts = <0 4 0>; 120 interrupts = <0 4 0>;
108 tx-dma-channel = <&pdma0 5>; /* preliminary */
109 rx-dma-channel = <&pdma0 4>; /* preliminary */
110 #address-cells = <1>; 121 #address-cells = <1>;
111 #size-cells = <0>; 122 #size-cells = <0>;
123 samsung,spi-src-clk = <0>;
124 num-cs = <1>;
112 clocks = <&clock 21>, <&clock 16>; 125 clocks = <&clock 21>, <&clock 16>;
113 clock-names = "spi", "spi_busclk0"; 126 clock-names = "spi", "spi_busclk0";
114 }; 127 };
115 128
116 pinctrl { 129 pin_ctrl: pinctrl {
117 compatible = "samsung,exynos5440-pinctrl"; 130 compatible = "samsung,exynos5440-pinctrl";
118 reg = <0xE0000 0x1000>; 131 reg = <0xE0000 0x1000>;
119 interrupts = <0 37 0>, <0 38 0>, <0 39 0>, <0 40 0>, 132 interrupts = <0 37 0>, <0 38 0>, <0 39 0>, <0 40 0>,
@@ -184,28 +197,6 @@
184 compatible = "arm,amba-bus"; 197 compatible = "arm,amba-bus";
185 interrupt-parent = <&gic>; 198 interrupt-parent = <&gic>;
186 ranges; 199 ranges;
187
188 pdma0: pdma@00121000 {
189 compatible = "arm,pl330", "arm,primecell";
190 reg = <0x121000 0x1000>;
191 interrupts = <0 46 0>;
192 clocks = <&clock 8>;
193 clock-names = "apb_pclk";
194 #dma-cells = <1>;
195 #dma-channels = <8>;
196 #dma-requests = <32>;
197 };
198
199 pdma1: pdma@00120000 {
200 compatible = "arm,pl330", "arm,primecell";
201 reg = <0x120000 0x1000>;
202 interrupts = <0 47 0>;
203 clocks = <&clock 8>;
204 clock-names = "apb_pclk";
205 #dma-cells = <1>;
206 #dma-channels = <8>;
207 #dma-requests = <32>;
208 };
209 }; 200 };
210 201
211 rtc { 202 rtc {
@@ -214,6 +205,67 @@
214 interrupts = <0 17 0>, <0 16 0>; 205 interrupts = <0 17 0>, <0 16 0>;
215 clocks = <&clock 21>; 206 clocks = <&clock 21>;
216 clock-names = "rtc"; 207 clock-names = "rtc";
217 status = "disabled"; 208 };
209
210 sata@210000 {
211 compatible = "snps,exynos5440-ahci";
212 reg = <0x210000 0x10000>;
213 interrupts = <0 30 0>;
214 clocks = <&clock 23>;
215 clock-names = "sata";
216 };
217
218 ohci@220000 {
219 compatible = "samsung,exynos5440-ohci";
220 reg = <0x220000 0x1000>;
221 interrupts = <0 29 0>;
222 clocks = <&clock 24>;
223 clock-names = "usbhost";
224 };
225
226 ehci@221000 {
227 compatible = "samsung,exynos5440-ehci";
228 reg = <0x221000 0x1000>;
229 interrupts = <0 29 0>;
230 clocks = <&clock 24>;
231 clock-names = "usbhost";
232 };
233
234 pcie@290000 {
235 compatible = "samsung,exynos5440-pcie", "snps,dw-pcie";
236 reg = <0x290000 0x1000
237 0x270000 0x1000
238 0x271000 0x40>;
239 interrupts = <0 20 0>, <0 21 0>, <0 22 0>;
240 clocks = <&clock 28>, <&clock 27>;
241 clock-names = "pcie", "pcie_bus";
242 #address-cells = <3>;
243 #size-cells = <2>;
244 device_type = "pci";
245 ranges = <0x00000800 0 0x40000000 0x40000000 0 0x00001000 /* configuration space */
246 0x81000000 0 0 0x40001000 0 0x00010000 /* downstream I/O */
247 0x82000000 0 0x40011000 0x40011000 0 0x1ffef000>; /* non-prefetchable memory */
248 #interrupt-cells = <1>;
249 interrupt-map-mask = <0 0 0 0>;
250 interrupt-map = <0x0 0 &gic 53>;
251 };
252
253 pcie@2a0000 {
254 compatible = "samsung,exynos5440-pcie", "snps,dw-pcie";
255 reg = <0x2a0000 0x1000
256 0x272000 0x1000
257 0x271040 0x40>;
258 interrupts = <0 23 0>, <0 24 0>, <0 25 0>;
259 clocks = <&clock 29>, <&clock 27>;
260 clock-names = "pcie", "pcie_bus";
261 #address-cells = <3>;
262 #size-cells = <2>;
263 device_type = "pci";
264 ranges = <0x00000800 0 0x60000000 0x60000000 0 0x00001000 /* configuration space */
265 0x81000000 0 0 0x60001000 0 0x00010000 /* downstream I/O */
266 0x82000000 0 0x60011000 0x60011000 0 0x1ffef000>; /* non-prefetchable memory */
267 #interrupt-cells = <1>;
268 interrupt-map-mask = <0 0 0 0>;
269 interrupt-map = <0x0 0 &gic 56>;
218 }; 270 };
219}; 271};
diff --git a/arch/arm/boot/dts/ge863-pro3.dtsi b/arch/arm/boot/dts/ge863-pro3.dtsi
index 17136fc7a516..230099bb31c8 100644
--- a/arch/arm/boot/dts/ge863-pro3.dtsi
+++ b/arch/arm/boot/dts/ge863-pro3.dtsi
@@ -7,7 +7,7 @@
7 * Licensed under GPLv2 or later. 7 * Licensed under GPLv2 or later.
8 */ 8 */
9 9
10/include/ "at91sam9260.dtsi" 10#include "at91sam9260.dtsi"
11 11
12/ { 12/ {
13 clocks { 13 clocks {
diff --git a/arch/arm/boot/dts/href.dtsi b/arch/arm/boot/dts/href.dtsi
index c0bc426952ea..9db41b9d8358 100644
--- a/arch/arm/boot/dts/href.dtsi
+++ b/arch/arm/boot/dts/href.dtsi
@@ -9,7 +9,8 @@
9 * http://www.gnu.org/copyleft/gpl.html 9 * http://www.gnu.org/copyleft/gpl.html
10 */ 10 */
11 11
12/include/ "dbx5x0.dtsi" 12#include <dt-bindings/interrupt-controller/irq.h>
13#include "dbx5x0.dtsi"
13 14
14/ { 15/ {
15 memory { 16 memory {
@@ -27,7 +28,7 @@
27 }; 28 };
28 }; 29 };
29 30
30 soc-u9500 { 31 soc {
31 uart@80120000 { 32 uart@80120000 {
32 status = "okay"; 33 status = "okay";
33 }; 34 };
@@ -45,14 +46,14 @@
45 compatible = "tc3589x"; 46 compatible = "tc3589x";
46 reg = <0x42>; 47 reg = <0x42>;
47 interrupt-parent = <&gpio6>; 48 interrupt-parent = <&gpio6>;
48 interrupts = <25 0x1>; 49 interrupts = <25 IRQ_TYPE_EDGE_RISING>;
49 50
50 interrupt-controller; 51 interrupt-controller;
51 #interrupt-cells = <2>; 52 #interrupt-cells = <2>;
52 53
53 tc3589x_gpio: tc3589x_gpio { 54 tc3589x_gpio: tc3589x_gpio {
54 compatible = "tc3589x-gpio"; 55 compatible = "tc3589x-gpio";
55 interrupts = <0 0x1>; 56 interrupts = <0 IRQ_TYPE_EDGE_RISING>;
56 57
57 interrupt-controller; 58 interrupt-controller;
58 #interrupt-cells = <2>; 59 #interrupt-cells = <2>;
@@ -63,17 +64,43 @@
63 }; 64 };
64 65
65 i2c@80128000 { 66 i2c@80128000 {
66 lp5521@0x33 { 67 lp5521@33 {
67 compatible = "lp5521"; 68 compatible = "national,lp5521";
68 reg = <0x33>; 69 reg = <0x33>;
70 label = "lp5521_pri";
71 clock-mode = /bits/ 8 <2>;
72 chan0 {
73 led-cur = /bits/ 8 <0x2f>;
74 max-cur = /bits/ 8 <0x5f>;
75 };
76 chan1 {
77 led-cur = /bits/ 8 <0x2f>;
78 max-cur = /bits/ 8 <0x5f>;
79 };
80 chan2 {
81 led-cur = /bits/ 8 <0x2f>;
82 max-cur = /bits/ 8 <0x5f>;
83 };
69 }; 84 };
70 85 lp5521@34 {
71 lp5521@0x34 { 86 compatible = "national,lp5521";
72 compatible = "lp5521";
73 reg = <0x34>; 87 reg = <0x34>;
88 label = "lp5521_sec";
89 clock-mode = /bits/ 8 <2>;
90 chan0 {
91 led-cur = /bits/ 8 <0x2f>;
92 max-cur = /bits/ 8 <0x5f>;
93 };
94 chan1 {
95 led-cur = /bits/ 8 <0x2f>;
96 max-cur = /bits/ 8 <0x5f>;
97 };
98 chan2 {
99 led-cur = /bits/ 8 <0x2f>;
100 max-cur = /bits/ 8 <0x5f>;
101 };
74 }; 102 };
75 103 bh1780@29 {
76 bh1780@0x29 {
77 compatible = "rohm,bh1780gli"; 104 compatible = "rohm,bh1780gli";
78 reg = <0x33>; 105 reg = <0x33>;
79 }; 106 };
@@ -82,7 +109,7 @@
82 // External Micro SD slot 109 // External Micro SD slot
83 sdi0_per1@80126000 { 110 sdi0_per1@80126000 {
84 arm,primecell-periphid = <0x10480180>; 111 arm,primecell-periphid = <0x10480180>;
85 max-frequency = <50000000>; 112 max-frequency = <100000000>;
86 bus-width = <4>; 113 bus-width = <4>;
87 mmc-cap-sd-highspeed; 114 mmc-cap-sd-highspeed;
88 mmc-cap-mmc-highspeed; 115 mmc-cap-mmc-highspeed;
@@ -97,7 +124,7 @@
97 // WLAN SDIO channel 124 // WLAN SDIO channel
98 sdi1_per2@80118000 { 125 sdi1_per2@80118000 {
99 arm,primecell-periphid = <0x10480180>; 126 arm,primecell-periphid = <0x10480180>;
100 max-frequency = <50000000>; 127 max-frequency = <100000000>;
101 bus-width = <4>; 128 bus-width = <4>;
102 129
103 status = "okay"; 130 status = "okay";
@@ -106,7 +133,7 @@
106 // PoP:ed eMMC 133 // PoP:ed eMMC
107 sdi2_per3@80005000 { 134 sdi2_per3@80005000 {
108 arm,primecell-periphid = <0x10480180>; 135 arm,primecell-periphid = <0x10480180>;
109 max-frequency = <50000000>; 136 max-frequency = <100000000>;
110 bus-width = <8>; 137 bus-width = <8>;
111 mmc-cap-mmc-highspeed; 138 mmc-cap-mmc-highspeed;
112 139
@@ -116,7 +143,7 @@
116 // On-board eMMC 143 // On-board eMMC
117 sdi4_per2@80114000 { 144 sdi4_per2@80114000 {
118 arm,primecell-periphid = <0x10480180>; 145 arm,primecell-periphid = <0x10480180>;
119 max-frequency = <50000000>; 146 max-frequency = <100000000>;
120 bus-width = <8>; 147 bus-width = <8>;
121 mmc-cap-mmc-highspeed; 148 mmc-cap-mmc-highspeed;
122 vmmc-supply = <&ab8500_ldo_aux2_reg>; 149 vmmc-supply = <&ab8500_ldo_aux2_reg>;
@@ -236,7 +263,7 @@
236 regulator-name = "V-MMC-SD"; 263 regulator-name = "V-MMC-SD";
237 }; 264 };
238 265
239 ab8500_ldo_initcore_reg: ab8500_ldo_initcore { 266 ab8500_ldo_intcore_reg: ab8500_ldo_intcore {
240 regulator-name = "V-INTCORE"; 267 regulator-name = "V-INTCORE";
241 }; 268 };
242 269
@@ -256,7 +283,7 @@
256 regulator-name = "V-AMIC1"; 283 regulator-name = "V-AMIC1";
257 }; 284 };
258 285
259 ab8500_ldo_amamic2_reg: ab8500_ldo_amamic2 { 286 ab8500_ldo_anamic2_reg: ab8500_ldo_anamic2 {
260 regulator-name = "V-AMIC2"; 287 regulator-name = "V-AMIC2";
261 }; 288 };
262 289
diff --git a/arch/arm/boot/dts/hrefprev60.dts b/arch/arm/boot/dts/hrefprev60.dts
index c2d274815923..c6bb07df2d1d 100644
--- a/arch/arm/boot/dts/hrefprev60.dts
+++ b/arch/arm/boot/dts/hrefprev60.dts
@@ -10,9 +10,9 @@
10 */ 10 */
11 11
12/dts-v1/; 12/dts-v1/;
13/include/ "dbx5x0.dtsi" 13#include "dbx5x0.dtsi"
14/include/ "href.dtsi" 14#include "href.dtsi"
15/include/ "stuib.dtsi" 15#include "stuib.dtsi"
16 16
17/ { 17/ {
18 model = "ST-Ericsson HREF (pre-v60) platform with Device Tree"; 18 model = "ST-Ericsson HREF (pre-v60) platform with Device Tree";
@@ -24,7 +24,7 @@
24 }; 24 };
25 }; 25 };
26 26
27 soc-u9500 { 27 soc {
28 prcmu@80157000 { 28 prcmu@80157000 {
29 ab8500@5 { 29 ab8500@5 {
30 ab8500-gpio { 30 ab8500-gpio {
@@ -41,7 +41,7 @@
41 }; 41 };
42 42
43 i2c@80110000 { 43 i2c@80110000 {
44 bu21013_tp@0x5c { 44 bu21013_tp@5c {
45 reset-gpio = <&tc3589x_gpio 13 0x4>; 45 reset-gpio = <&tc3589x_gpio 13 0x4>;
46 }; 46 };
47 }; 47 };
diff --git a/arch/arm/boot/dts/hrefv60plus.dts b/arch/arm/boot/dts/hrefv60plus.dts
index 2b587a74b813..3d580d6447f9 100644
--- a/arch/arm/boot/dts/hrefv60plus.dts
+++ b/arch/arm/boot/dts/hrefv60plus.dts
@@ -10,9 +10,9 @@
10 */ 10 */
11 11
12/dts-v1/; 12/dts-v1/;
13/include/ "dbx5x0.dtsi" 13#include "dbx5x0.dtsi"
14/include/ "href.dtsi" 14#include "href.dtsi"
15/include/ "stuib.dtsi" 15#include "stuib.dtsi"
16 16
17/ { 17/ {
18 model = "ST-Ericsson HREF (v60+) platform with Device Tree"; 18 model = "ST-Ericsson HREF (v60+) platform with Device Tree";
@@ -24,7 +24,7 @@
24 }; 24 };
25 }; 25 };
26 26
27 soc-u9500 { 27 soc {
28 i2c@80110000 { 28 i2c@80110000 {
29 bu21013_tp@0x5c { 29 bu21013_tp@0x5c {
30 reset-gpio = <&gpio4 15 0x4>; 30 reset-gpio = <&gpio4 15 0x4>;
@@ -34,7 +34,7 @@
34 // External Micro SD slot 34 // External Micro SD slot
35 sdi0_per1@80126000 { 35 sdi0_per1@80126000 {
36 arm,primecell-periphid = <0x10480180>; 36 arm,primecell-periphid = <0x10480180>;
37 max-frequency = <50000000>; 37 max-frequency = <100000000>;
38 bus-width = <4>; 38 bus-width = <4>;
39 mmc-cap-sd-highspeed; 39 mmc-cap-sd-highspeed;
40 mmc-cap-mmc-highspeed; 40 mmc-cap-mmc-highspeed;
@@ -48,7 +48,7 @@
48 // WLAN SDIO channel 48 // WLAN SDIO channel
49 sdi1_per2@80118000 { 49 sdi1_per2@80118000 {
50 arm,primecell-periphid = <0x10480180>; 50 arm,primecell-periphid = <0x10480180>;
51 max-frequency = <50000000>; 51 max-frequency = <100000000>;
52 bus-width = <4>; 52 bus-width = <4>;
53 53
54 status = "okay"; 54 status = "okay";
@@ -57,7 +57,7 @@
57 // PoP:ed eMMC 57 // PoP:ed eMMC
58 sdi2_per3@80005000 { 58 sdi2_per3@80005000 {
59 arm,primecell-periphid = <0x10480180>; 59 arm,primecell-periphid = <0x10480180>;
60 max-frequency = <50000000>; 60 max-frequency = <100000000>;
61 bus-width = <8>; 61 bus-width = <8>;
62 mmc-cap-mmc-highspeed; 62 mmc-cap-mmc-highspeed;
63 63
@@ -67,7 +67,7 @@
67 // On-board eMMC 67 // On-board eMMC
68 sdi4_per2@80114000 { 68 sdi4_per2@80114000 {
69 arm,primecell-periphid = <0x10480180>; 69 arm,primecell-periphid = <0x10480180>;
70 max-frequency = <50000000>; 70 max-frequency = <100000000>;
71 bus-width = <8>; 71 bus-width = <8>;
72 mmc-cap-mmc-highspeed; 72 mmc-cap-mmc-highspeed;
73 vmmc-supply = <&ab8500_ldo_aux2_reg>; 73 vmmc-supply = <&ab8500_ldo_aux2_reg>;
@@ -172,7 +172,7 @@
172 regulator-name = "V-MMC-SD"; 172 regulator-name = "V-MMC-SD";
173 }; 173 };
174 174
175 ab8500_ldo_initcore_reg: ab8500_ldo_initcore { 175 ab8500_ldo_intcore_reg: ab8500_ldo_intcore {
176 regulator-name = "V-INTCORE"; 176 regulator-name = "V-INTCORE";
177 }; 177 };
178 178
@@ -192,7 +192,7 @@
192 regulator-name = "V-AMIC1"; 192 regulator-name = "V-AMIC1";
193 }; 193 };
194 194
195 ab8500_ldo_amamic2_reg: ab8500_ldo_amamic2 { 195 ab8500_ldo_anamic2_reg: ab8500_ldo_anamic2 {
196 regulator-name = "V-AMIC2"; 196 regulator-name = "V-AMIC2";
197 }; 197 };
198 198
diff --git a/arch/arm/boot/dts/imx23.dtsi b/arch/arm/boot/dts/imx23.dtsi
index 73fd7d0887b5..587ceef81e45 100644
--- a/arch/arm/boot/dts/imx23.dtsi
+++ b/arch/arm/boot/dts/imx23.dtsi
@@ -23,8 +23,12 @@
23 }; 23 };
24 24
25 cpus { 25 cpus {
26 cpu@0 { 26 #address-cells = <0>;
27 compatible = "arm,arm926ejs"; 27 #size-cells = <0>;
28
29 cpu {
30 compatible = "arm,arm926ej-s";
31 device_type = "cpu";
28 }; 32 };
29 }; 33 };
30 34
diff --git a/arch/arm/boot/dts/imx27-phytec-phycore-rdk.dts b/arch/arm/boot/dts/imx27-phytec-phycore-rdk.dts
new file mode 100644
index 000000000000..e7ed9786920a
--- /dev/null
+++ b/arch/arm/boot/dts/imx27-phytec-phycore-rdk.dts
@@ -0,0 +1,37 @@
1/*
2 * The code contained herein is licensed under the GNU General Public
3 * License. You may obtain a copy of the GNU General Public License
4 * Version 2 or later at the following locations:
5 *
6 * http://www.opensource.org/licenses/gpl-license.html
7 * http://www.gnu.org/copyleft/gpl.html
8 */
9
10#include "imx27-phytec-phycore-som.dts"
11
12/ {
13 model = "Phytec pcm970";
14 compatible = "phytec,imx27-pcm970", "phytec,imx27-pcm038", "fsl,imx27";
15};
16
17&cspi1 {
18 fsl,spi-num-chipselects = <2>;
19 cs-gpios = <&gpio4 28 0>, <&gpio4 27 0>;
20};
21
22&sdhci2 {
23 bus-width = <4>;
24 cd-gpios = <&gpio3 29 0>;
25 wp-gpios = <&gpio3 28 0>;
26 vmmc-supply = <&vmmc1_reg>;
27 status = "okay";
28};
29
30&uart1 {
31 fsl,uart-has-rtscts;
32};
33
34&uart2 {
35 fsl,uart-has-rtscts;
36 status = "okay";
37};
diff --git a/arch/arm/boot/dts/imx27-phytec-phycore-som.dts b/arch/arm/boot/dts/imx27-phytec-phycore-som.dts
new file mode 100644
index 000000000000..f0105651869d
--- /dev/null
+++ b/arch/arm/boot/dts/imx27-phytec-phycore-som.dts
@@ -0,0 +1,179 @@
1/*
2 * Copyright 2012 Sascha Hauer, Pengutronix
3 *
4 * The code contained herein is licensed under the GNU General Public
5 * License. You may obtain a copy of the GNU General Public License
6 * Version 2 or later at the following locations:
7 *
8 * http://www.opensource.org/licenses/gpl-license.html
9 * http://www.gnu.org/copyleft/gpl.html
10 */
11
12/dts-v1/;
13#include "imx27.dtsi"
14
15/ {
16 model = "Phytec pcm038";
17 compatible = "phytec,imx27-pcm038", "fsl,imx27";
18
19 memory {
20 reg = <0x0 0x0>;
21 };
22
23 soc {
24 aipi@10000000 { /* aipi1 */
25 serial@1000a000 {
26 status = "okay";
27 };
28
29 i2c@1001d000 {
30 clock-frequency = <400000>;
31 status = "okay";
32 at24@52 {
33 compatible = "at,24c32";
34 pagesize = <32>;
35 reg = <0x52>;
36 };
37 pcf8563@51 {
38 compatible = "nxp,pcf8563";
39 reg = <0x51>;
40 };
41 lm75@4a {
42 compatible = "national,lm75";
43 reg = <0x4a>;
44 };
45 };
46 };
47
48 aipi@10020000 { /* aipi2 */
49 ethernet@1002b000 {
50 phy-reset-gpios = <&gpio3 30 0>;
51 status = "okay";
52 };
53 };
54 };
55
56 nor_flash@c0000000 {
57 compatible = "cfi-flash";
58 bank-width = <2>;
59 reg = <0xc0000000 0x02000000>;
60 linux,mtd-name = "physmap-flash.0";
61 #address-cells = <1>;
62 #size-cells = <1>;
63 };
64};
65
66&cspi1 {
67 fsl,spi-num-chipselects = <1>;
68 cs-gpios = <&gpio4 28 0>;
69 status = "okay";
70
71 pmic: mc13783@0 {
72 #address-cells = <1>;
73 #size-cells = <0>;
74 compatible = "fsl,mc13783";
75 spi-max-frequency = <20000000>;
76 reg = <0>;
77 interrupt-parent = <&gpio2>;
78 interrupts = <23 0x4>;
79 fsl,mc13xxx-uses-adc;
80 fsl,mc13xxx-uses-rtc;
81
82 regulators {
83 sw1a_reg: sw1a {
84 regulator-min-microvolt = <1200000>;
85 regulator-max-microvolt = <1200000>;
86 regulator-always-on;
87 regulator-boot-on;
88 };
89
90 sw1b_reg: sw1b {
91 regulator-min-microvolt = <1200000>;
92 regulator-max-microvolt = <1200000>;
93 regulator-always-on;
94 regulator-boot-on;
95 };
96
97 sw2a_reg: sw2a {
98 regulator-min-microvolt = <1800000>;
99 regulator-max-microvolt = <1800000>;
100 regulator-always-on;
101 regulator-boot-on;
102 };
103
104 sw2b_reg: sw2b {
105 regulator-min-microvolt = <1800000>;
106 regulator-max-microvolt = <1800000>;
107 regulator-always-on;
108 regulator-boot-on;
109 };
110
111 sw3_reg: sw3 {
112 regulator-min-microvolt = <5000000>;
113 regulator-max-microvolt = <5000000>;
114 regulator-always-on;
115 regulator-boot-on;
116 };
117
118 vaudio_reg: vaudio {
119 regulator-always-on;
120 regulator-boot-on;
121 };
122
123 violo_reg: violo {
124 regulator-min-microvolt = <1800000>;
125 regulator-max-microvolt = <1800000>;
126 regulator-always-on;
127 regulator-boot-on;
128 };
129
130 viohi_reg: viohi {
131 regulator-always-on;
132 regulator-boot-on;
133 };
134
135 vgen_reg: vgen {
136 regulator-min-microvolt = <1500000>;
137 regulator-max-microvolt = <1500000>;
138 regulator-always-on;
139 regulator-boot-on;
140 };
141
142 vcam_reg: vcam {
143 regulator-min-microvolt = <2800000>;
144 regulator-max-microvolt = <2800000>;
145 };
146
147 vrf1_reg: vrf1 {
148 regulator-min-microvolt = <2775000>;
149 regulator-max-microvolt = <2775000>;
150 regulator-always-on;
151 regulator-boot-on;
152 };
153
154 vrf2_reg: vrf2 {
155 regulator-min-microvolt = <2775000>;
156 regulator-max-microvolt = <2775000>;
157 regulator-always-on;
158 regulator-boot-on;
159 };
160
161 vmmc1_reg: vmmc1 {
162 regulator-min-microvolt = <1600000>;
163 regulator-max-microvolt = <3000000>;
164 };
165
166 gpo1_reg: gpo1 { };
167
168 pwgt1spi_reg: pwgt1spi {
169 regulator-always-on;
170 };
171 };
172 };
173};
174
175&nfc {
176 nand-bus-width = <8>;
177 nand-ecc-mode = "hw";
178 status = "okay";
179};
diff --git a/arch/arm/boot/dts/imx27-phytec-phycore.dts b/arch/arm/boot/dts/imx27-phytec-phycore.dts
deleted file mode 100644
index fe64e3a91df0..000000000000
--- a/arch/arm/boot/dts/imx27-phytec-phycore.dts
+++ /dev/null
@@ -1,79 +0,0 @@
1/*
2 * Copyright 2012 Sascha Hauer, Pengutronix
3 *
4 * The code contained herein is licensed under the GNU General Public
5 * License. You may obtain a copy of the GNU General Public License
6 * Version 2 or later at the following locations:
7 *
8 * http://www.opensource.org/licenses/gpl-license.html
9 * http://www.gnu.org/copyleft/gpl.html
10 */
11
12/dts-v1/;
13#include "imx27.dtsi"
14
15/ {
16 model = "Phytec pcm038";
17 compatible = "phytec,imx27-pcm038", "fsl,imx27";
18
19 memory {
20 reg = <0x0 0x0>;
21 };
22
23 soc {
24 aipi@10000000 { /* aipi1 */
25 serial@1000a000 {
26 fsl,uart-has-rtscts;
27 status = "okay";
28 };
29
30 serial@1000b000 {
31 fsl,uart-has-rtscts;
32 status = "okay";
33 };
34
35 serial@1000c000 {
36 fsl,uart-has-rtscts;
37 status = "okay";
38 };
39
40 i2c@1001d000 {
41 clock-frequency = <400000>;
42 status = "okay";
43 at24@52 {
44 compatible = "at,24c32";
45 pagesize = <32>;
46 reg = <0x52>;
47 };
48 pcf8563@51 {
49 compatible = "nxp,pcf8563";
50 reg = <0x51>;
51 };
52 lm75@4a {
53 compatible = "national,lm75";
54 reg = <0x4a>;
55 };
56 };
57 };
58
59 aipi@10020000 { /* aipi2 */
60 ethernet@1002b000 {
61 status = "okay";
62 };
63 };
64 };
65
66 nor_flash@c0000000 {
67 compatible = "cfi-flash";
68 bank-width = <2>;
69 reg = <0xc0000000 0x02000000>;
70 #address-cells = <1>;
71 #size-cells = <1>;
72 };
73};
74
75&nfc {
76 nand-bus-width = <8>;
77 nand-ecc-mode = "hw";
78 status = "okay";
79};
diff --git a/arch/arm/boot/dts/imx27.dtsi b/arch/arm/boot/dts/imx27.dtsi
index 75bd11386516..0695264ddf1b 100644
--- a/arch/arm/boot/dts/imx27.dtsi
+++ b/arch/arm/boot/dts/imx27.dtsi
@@ -25,6 +25,9 @@
25 gpio3 = &gpio4; 25 gpio3 = &gpio4;
26 gpio4 = &gpio5; 26 gpio4 = &gpio5;
27 gpio5 = &gpio6; 27 gpio5 = &gpio6;
28 spi0 = &cspi1;
29 spi1 = &cspi2;
30 spi2 = &cspi3;
28 }; 31 };
29 32
30 avic: avic-interrupt-controller@e0000000 { 33 avic: avic-interrupt-controller@e0000000 {
@@ -58,6 +61,16 @@
58 reg = <0x10000000 0x20000>; 61 reg = <0x10000000 0x20000>;
59 ranges; 62 ranges;
60 63
64 dma: dma@10001000 {
65 compatible = "fsl,imx27-dma";
66 reg = <0x10001000 0x1000>;
67 interrupts = <32>;
68 clocks = <&clks 50>, <&clks 70>;
69 clock-names = "ipg", "ahb";
70 #dma-cells = <1>;
71 #dma-channels = <16>;
72 };
73
61 wdog: wdog@10002000 { 74 wdog: wdog@10002000 {
62 compatible = "fsl,imx27-wdt", "fsl,imx21-wdt"; 75 compatible = "fsl,imx27-wdt", "fsl,imx21-wdt";
63 reg = <0x10002000 0x1000>; 76 reg = <0x10002000 0x1000>;
@@ -89,6 +102,14 @@
89 clock-names = "ipg", "per"; 102 clock-names = "ipg", "per";
90 }; 103 };
91 104
105 pwm0: pwm@10006000 {
106 compatible = "fsl,imx27-pwm";
107 reg = <0x10006000 0x1000>;
108 interrupts = <23>;
109 clocks = <&clks 34>, <&clks 61>;
110 clock-names = "ipg", "per";
111 };
112
92 uart1: serial@1000a000 { 113 uart1: serial@1000a000 {
93 compatible = "fsl,imx27-uart", "fsl,imx21-uart"; 114 compatible = "fsl,imx27-uart", "fsl,imx21-uart";
94 reg = <0x1000a000 0x1000>; 115 reg = <0x1000a000 0x1000>;
@@ -157,6 +178,28 @@
157 status = "disabled"; 178 status = "disabled";
158 }; 179 };
159 180
181 sdhci1: sdhci@10013000 {
182 compatible = "fsl,imx27-mmc", "fsl,imx21-mmc";
183 reg = <0x10013000 0x1000>;
184 interrupts = <11>;
185 clocks = <&clks 30>, <&clks 60>;
186 clock-names = "ipg", "per";
187 dmas = <&dma 7>;
188 dma-names = "rx-tx";
189 status = "disabled";
190 };
191
192 sdhci2: sdhci@10014000 {
193 compatible = "fsl,imx27-mmc", "fsl,imx21-mmc";
194 reg = <0x10014000 0x1000>;
195 interrupts = <10>;
196 clocks = <&clks 29>, <&clks 60>;
197 clock-names = "ipg", "per";
198 dmas = <&dma 6>;
199 dma-names = "rx-tx";
200 status = "disabled";
201 };
202
160 gpio1: gpio@10015000 { 203 gpio1: gpio@10015000 {
161 compatible = "fsl,imx27-gpio", "fsl,imx21-gpio"; 204 compatible = "fsl,imx27-gpio", "fsl,imx21-gpio";
162 reg = <0x10015000 0x100>; 205 reg = <0x10015000 0x100>;
@@ -272,6 +315,17 @@
272 status = "disabled"; 315 status = "disabled";
273 }; 316 };
274 317
318 sdhci3: sdhci@1001e000 {
319 compatible = "fsl,imx27-mmc", "fsl,imx21-mmc";
320 reg = <0x1001e000 0x1000>;
321 interrupts = <9>;
322 clocks = <&clks 28>, <&clks 60>;
323 clock-names = "ipg", "per";
324 dmas = <&dma 36>;
325 dma-names = "rx-tx";
326 status = "disabled";
327 };
328
275 gpt6: timer@1001f000 { 329 gpt6: timer@1001f000 {
276 compatible = "fsl,imx27-gpt", "fsl,imx1-gpt"; 330 compatible = "fsl,imx27-gpt", "fsl,imx1-gpt";
277 reg = <0x1001f000 0x1000>; 331 reg = <0x1001f000 0x1000>;
@@ -288,6 +342,21 @@
288 reg = <0x10020000 0x20000>; 342 reg = <0x10020000 0x20000>;
289 ranges; 343 ranges;
290 344
345 coda: coda@10023000 {
346 compatible = "fsl,imx27-vpu";
347 reg = <0x10023000 0x0200>;
348 interrupts = <53>;
349 clocks = <&clks 57>, <&clks 66>;
350 clock-names = "per", "ahb";
351 iram = <&iram>;
352 };
353
354 clks: ccm@10027000{
355 compatible = "fsl,imx27-ccm";
356 reg = <0x10027000 0x1000>;
357 #clock-cells = <1>;
358 };
359
291 fec: ethernet@1002b000 { 360 fec: ethernet@1002b000 {
292 compatible = "fsl,imx27-fec"; 361 compatible = "fsl,imx27-fec";
293 reg = <0x1002b000 0x4000>; 362 reg = <0x1002b000 0x4000>;
@@ -296,19 +365,16 @@
296 clock-names = "ipg", "ahb", "ptp"; 365 clock-names = "ipg", "ahb", "ptp";
297 status = "disabled"; 366 status = "disabled";
298 }; 367 };
299
300 clks: ccm@10027000{
301 compatible = "fsl,imx27-ccm";
302 reg = <0x10027000 0x1000>;
303 #clock-cells = <1>;
304 };
305 }; 368 };
306 369
370 iram: iram@ffff4c00 {
371 compatible = "mmio-sram";
372 reg = <0xffff4c00 0xb400>;
373 };
307 374
308 nfc: nand@d8000000 { 375 nfc: nand@d8000000 {
309 #address-cells = <1>; 376 #address-cells = <1>;
310 #size-cells = <1>; 377 #size-cells = <1>;
311
312 compatible = "fsl,imx27-nand"; 378 compatible = "fsl,imx27-nand";
313 reg = <0xd8000000 0x1000>; 379 reg = <0xd8000000 0x1000>;
314 interrupts = <29>; 380 interrupts = <29>;
diff --git a/arch/arm/boot/dts/imx28-apf28dev.dts b/arch/arm/boot/dts/imx28-apf28dev.dts
index 3d905d16cbec..b602494c152b 100644
--- a/arch/arm/boot/dts/imx28-apf28dev.dts
+++ b/arch/arm/boot/dts/imx28-apf28dev.dts
@@ -103,6 +103,7 @@
103 103
104 apbx@80040000 { 104 apbx@80040000 {
105 lradc@80050000 { 105 lradc@80050000 {
106 fsl,lradc-touchscreen-wires = <4>;
106 status = "okay"; 107 status = "okay";
107 }; 108 };
108 109
diff --git a/arch/arm/boot/dts/imx28-apx4devkit.dts b/arch/arm/boot/dts/imx28-apx4devkit.dts
index 43bf3c796cba..0e7fed47bd8d 100644
--- a/arch/arm/boot/dts/imx28-apx4devkit.dts
+++ b/arch/arm/boot/dts/imx28-apx4devkit.dts
@@ -147,7 +147,7 @@
147 reg = <0x0a>; 147 reg = <0x0a>;
148 VDDA-supply = <&reg_3p3v>; 148 VDDA-supply = <&reg_3p3v>;
149 VDDIO-supply = <&reg_3p3v>; 149 VDDIO-supply = <&reg_3p3v>;
150 150 clocks = <&saif0>;
151 }; 151 };
152 152
153 pcf8563: rtc@51 { 153 pcf8563: rtc@51 {
diff --git a/arch/arm/boot/dts/imx28-cfa10036.dts b/arch/arm/boot/dts/imx28-cfa10036.dts
index 1594694532b9..94c4476972c3 100644
--- a/arch/arm/boot/dts/imx28-cfa10036.dts
+++ b/arch/arm/boot/dts/imx28-cfa10036.dts
@@ -45,6 +45,17 @@
45 fsl,voltage = <1>; 45 fsl,voltage = <1>;
46 fsl,pull-up = <0>; 46 fsl,pull-up = <0>;
47 }; 47 };
48
49 usb0_otg_cfa10036: otg-10036@0 {
50 reg = <0>;
51 fsl,pinmux-ids = <
52 0x0142 /* MX28_PAD_GPMI_READY0__USB0_ID */
53 >;
54 fsl,drive-strength = <0>;
55 fsl,voltage = <1>;
56 fsl,pull-up = <0>;
57 };
58
48 }; 59 };
49 60
50 ssp0: ssp@80010000 { 61 ssp0: ssp@80010000 {
@@ -58,12 +69,6 @@
58 }; 69 };
59 70
60 apbx@80040000 { 71 apbx@80040000 {
61 pwm: pwm@80064000 {
62 pinctrl-names = "default";
63 pinctrl-0 = <&pwm4_pins_a>;
64 status = "okay";
65 };
66
67 duart: serial@80074000 { 72 duart: serial@80074000 {
68 pinctrl-names = "default"; 73 pinctrl-names = "default";
69 pinctrl-0 = <&duart_pins_b>; 74 pinctrl-0 = <&duart_pins_b>;
@@ -73,15 +78,30 @@
73 i2c0: i2c@80058000 { 78 i2c0: i2c@80058000 {
74 pinctrl-names = "default"; 79 pinctrl-names = "default";
75 pinctrl-0 = <&i2c0_pins_b>; 80 pinctrl-0 = <&i2c0_pins_b>;
81 clock-frequency = <400000>;
76 status = "okay"; 82 status = "okay";
77 83
78 ssd1307: oled@3c { 84 ssd1306: oled@3c {
79 compatible = "solomon,ssd1307fb-i2c"; 85 compatible = "solomon,ssd1306fb-i2c";
80 reg = <0x3c>; 86 reg = <0x3c>;
81 pwms = <&pwm 4 3000>;
82 reset-gpios = <&gpio2 7 0>; 87 reset-gpios = <&gpio2 7 0>;
88 solomon,height = <32>;
89 solomon,width = <128>;
90 solomon,page-offset = <0>;
83 }; 91 };
84 }; 92 };
93
94 usbphy0: usbphy@8007c000 {
95 status = "okay";
96 };
97 };
98 };
99
100 ahb@80080000 {
101 usb0: usb@80080000 {
102 pinctrl-names = "default";
103 pinctrl-0 = <&usb0_otg_cfa10036>;
104 status = "okay";
85 }; 105 };
86 }; 106 };
87 107
diff --git a/arch/arm/boot/dts/imx28-cfa10049.dts b/arch/arm/boot/dts/imx28-cfa10049.dts
index 063e62059890..04b2f769ffbd 100644
--- a/arch/arm/boot/dts/imx28-cfa10049.dts
+++ b/arch/arm/boot/dts/imx28-cfa10049.dts
@@ -33,7 +33,7 @@
33 0x1163 /* MX28_PAD_LCD_D22__GPIO_1_22 */ 33 0x1163 /* MX28_PAD_LCD_D22__GPIO_1_22 */
34 0x1173 /* MX28_PAD_LCD_D22__GPIO_1_23 */ 34 0x1173 /* MX28_PAD_LCD_D22__GPIO_1_23 */
35 0x2153 /* MX28_PAD_SSP2_D5__GPIO_2_21 */ 35 0x2153 /* MX28_PAD_SSP2_D5__GPIO_2_21 */
36 0x3173 /* MX28_PAD_LCD_RESET__GPIO_3_23 */ 36 0x3053 /* MX28_PAD_AUART1_TX__GPIO_3_5 */
37 >; 37 >;
38 fsl,drive-strength = <0>; 38 fsl,drive-strength = <0>;
39 fsl,voltage = <1>; 39 fsl,voltage = <1>;
@@ -166,8 +166,8 @@
166 166
167 apbx@80040000 { 167 apbx@80040000 {
168 pwm: pwm@80064000 { 168 pwm: pwm@80064000 {
169 pinctrl-names = "default", "default"; 169 pinctrl-names = "default";
170 pinctrl-1 = <&pwm3_pins_b>; 170 pinctrl-0 = <&pwm3_pins_b>;
171 status = "okay"; 171 status = "okay";
172 }; 172 };
173 173
@@ -265,7 +265,7 @@
265 gpio-sck = <&gpio2 16 0>; 265 gpio-sck = <&gpio2 16 0>;
266 gpio-mosi = <&gpio2 17 0>; 266 gpio-mosi = <&gpio2 17 0>;
267 gpio-miso = <&gpio2 18 0>; 267 gpio-miso = <&gpio2 18 0>;
268 cs-gpios = <&gpio3 23 0>; 268 cs-gpios = <&gpio3 5 0>;
269 num-chipselects = <1>; 269 num-chipselects = <1>;
270 #address-cells = <1>; 270 #address-cells = <1>;
271 #size-cells = <0>; 271 #size-cells = <0>;
diff --git a/arch/arm/boot/dts/imx28-cfa10055.dts b/arch/arm/boot/dts/imx28-cfa10055.dts
new file mode 100644
index 000000000000..158111244122
--- /dev/null
+++ b/arch/arm/boot/dts/imx28-cfa10055.dts
@@ -0,0 +1,179 @@
1/*
2 * Copyright 2013 Crystalfontz America, Inc.
3 * Free Electrons
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/*
14 * The CFA-10055 is an expansion board for the CFA-10036 module and
15 * CFA-10037, thus we need to include the CFA-10037 DTS.
16 */
17/include/ "imx28-cfa10037.dts"
18
19/ {
20 model = "Crystalfontz CFA-10055 Board";
21 compatible = "crystalfontz,cfa10055", "crystalfontz,cfa10037", "crystalfontz,cfa10036", "fsl,imx28";
22
23 apb@80000000 {
24 apbh@80000000 {
25 pinctrl@80018000 {
26 pinctrl-names = "default", "default";
27 pinctrl-1 = <&hog_pins_cfa10055
28 &hog_pins_cfa10055_pullup>;
29
30 hog_pins_cfa10055: hog-10055@0 {
31 reg = <0>;
32 fsl,pinmux-ids = <
33 0x3053 /* MX28_PAD_AUART1_TX__GPIO_3_5 */
34 >;
35 fsl,drive-strength = <0>;
36 fsl,voltage = <1>;
37 fsl,pull-up = <0>;
38 };
39
40 hog_pins_cfa10055_pullup: hog-10055-pullup@0 {
41 reg = <0>;
42 fsl,pinmux-ids = <
43 0x31e3 /* MX28_PAD_LCD_RESET__GPIO_3_30 */
44 >;
45 fsl,drive-strength = <0>;
46 fsl,voltage = <1>;
47 fsl,pull-up = <1>;
48 };
49
50 spi2_pins_cfa10055: spi2-cfa10055@0 {
51 reg = <0>;
52 fsl,pinmux-ids = <
53 0x2103 /* MX28_PAD_SSP2_SCK__GPIO_2_16 */
54 0x2113 /* MX28_PAD_SSP2_CMD__GPIO_2_17 */
55 0x2123 /* MX28_PAD_SSP2_D0__GPIO_2_18 */
56 >;
57 fsl,drive-strength = <1>;
58 fsl,voltage = <1>;
59 fsl,pull-up = <1>;
60 };
61
62 lcdif_18bit_pins_cfa10055: lcdif-18bit@0 {
63 reg = <0>;
64 fsl,pinmux-ids = <
65 0x1000 /* MX28_PAD_LCD_D00__LCD_D0 */
66 0x1010 /* MX28_PAD_LCD_D01__LCD_D1 */
67 0x1020 /* MX28_PAD_LCD_D02__LCD_D2 */
68 0x1030 /* MX28_PAD_LCD_D03__LCD_D3 */
69 0x1040 /* MX28_PAD_LCD_D04__LCD_D4 */
70 0x1050 /* MX28_PAD_LCD_D05__LCD_D5 */
71 0x1060 /* MX28_PAD_LCD_D06__LCD_D6 */
72 0x1070 /* MX28_PAD_LCD_D07__LCD_D7 */
73 0x1080 /* MX28_PAD_LCD_D08__LCD_D8 */
74 0x1090 /* MX28_PAD_LCD_D09__LCD_D9 */
75 0x10a0 /* MX28_PAD_LCD_D10__LCD_D10 */
76 0x10b0 /* MX28_PAD_LCD_D11__LCD_D11 */
77 0x10c0 /* MX28_PAD_LCD_D12__LCD_D12 */
78 0x10d0 /* MX28_PAD_LCD_D13__LCD_D13 */
79 0x10e0 /* MX28_PAD_LCD_D14__LCD_D14 */
80 0x10f0 /* MX28_PAD_LCD_D15__LCD_D15 */
81 0x1100 /* MX28_PAD_LCD_D16__LCD_D16 */
82 0x1110 /* MX28_PAD_LCD_D17__LCD_D17 */
83 >;
84 fsl,drive-strength = <0>;
85 fsl,voltage = <1>;
86 fsl,pull-up = <0>;
87 };
88
89 lcdif_pins_cfa10055: lcdif-evk@0 {
90 reg = <0>;
91 fsl,pinmux-ids = <
92 0x1181 /* MX28_PAD_LCD_RD_E__LCD_VSYNC */
93 0x1191 /* MX28_PAD_LCD_WR_RWN__LCD_HSYNC */
94 0x11a1 /* MX28_PAD_LCD_RS__LCD_DOTCLK */
95 0x11b1 /* MX28_PAD_LCD_CS__LCD_ENABLE */
96 >;
97 fsl,drive-strength = <0>;
98 fsl,voltage = <1>;
99 fsl,pull-up = <0>;
100 };
101 };
102
103 lcdif@80030000 {
104 pinctrl-names = "default";
105 pinctrl-0 = <&lcdif_18bit_pins_cfa10055
106 &lcdif_pins_cfa10055>;
107 display = <&display>;
108 status = "okay";
109
110 display: display {
111 bits-per-pixel = <32>;
112 bus-width = <18>;
113
114 display-timings {
115 native-mode = <&timing0>;
116 timing0: timing0 {
117 clock-frequency = <9216000>;
118 hactive = <320>;
119 vactive = <480>;
120 hback-porch = <2>;
121 hfront-porch = <2>;
122 vback-porch = <2>;
123 vfront-porch = <2>;
124 hsync-len = <15>;
125 vsync-len = <15>;
126 hsync-active = <0>;
127 vsync-active = <0>;
128 de-active = <1>;
129 pixelclk-active = <1>;
130 };
131 };
132 };
133 };
134 };
135
136 apbx@80040000 {
137 lradc@80050000 {
138 fsl,lradc-touchscreen-wires = <4>;
139 status = "okay";
140 };
141
142 pwm: pwm@80064000 {
143 pinctrl-names = "default";
144 pinctrl-0 = <&pwm3_pins_b>;
145 status = "okay";
146 };
147 };
148 };
149
150 spi2 {
151 compatible = "spi-gpio";
152 pinctrl-names = "default";
153 pinctrl-0 = <&spi2_pins_cfa10055>;
154 status = "okay";
155 gpio-sck = <&gpio2 16 0>;
156 gpio-mosi = <&gpio2 17 0>;
157 gpio-miso = <&gpio2 18 0>;
158 cs-gpios = <&gpio3 5 0>;
159 num-chipselects = <1>;
160 #address-cells = <1>;
161 #size-cells = <0>;
162
163 hx8357: hx8357@0 {
164 compatible = "himax,hx8357b", "himax,hx8357";
165 reg = <0>;
166 spi-max-frequency = <100000>;
167 spi-cpol;
168 spi-cpha;
169 gpios-reset = <&gpio3 30 0>;
170 };
171 };
172
173 backlight {
174 compatible = "pwm-backlight";
175 pwms = <&pwm 3 5000000>;
176 brightness-levels = <0 4 8 16 32 64 128 255>;
177 default-brightness-level = <6>;
178 };
179};
diff --git a/arch/arm/boot/dts/imx28-cfa10057.dts b/arch/arm/boot/dts/imx28-cfa10057.dts
new file mode 100644
index 000000000000..2da713cdb42a
--- /dev/null
+++ b/arch/arm/boot/dts/imx28-cfa10057.dts
@@ -0,0 +1,191 @@
1/*
2 * Copyright 2013 Crystalfontz America, Inc.
3 * Copyright 2012 Free Electrons
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/*
14 * The CFA-10057 is an expansion board for the CFA-10036 module, thus we
15 * need to include the CFA-10036 DTS.
16 */
17/include/ "imx28-cfa10036.dts"
18
19/ {
20 model = "Crystalfontz CFA-10057 Board";
21 compatible = "crystalfontz,cfa10057", "crystalfontz,cfa10036", "fsl,imx28";
22
23 apb@80000000 {
24 apbh@80000000 {
25 pinctrl@80018000 {
26 pinctrl-names = "default", "default";
27 pinctrl-1 = <&hog_pins_cfa10057
28 &hog_pins_cfa10057_pullup>;
29
30 hog_pins_cfa10057: hog-10057@0 {
31 reg = <0>;
32 fsl,pinmux-ids = <
33 0x0073 /* MX28_PAD_GPMI_D7__GPIO_0_7 */
34 0x3053 /* MX28_PAD_AUART1_TX__GPIO_3_5 */
35 >;
36 fsl,drive-strength = <0>;
37 fsl,voltage = <1>;
38 fsl,pull-up = <0>;
39 };
40
41 hog_pins_cfa10057_pullup: hog-10057-pullup@0 {
42 reg = <0>;
43 fsl,pinmux-ids = <
44 0x2133 /* MX28_PAD_SSP2_D3__GPIO_2_19 */
45 0x3183 /* MX28_PAD_I2C0_SCL__GPIO_3_24 */
46 0x3193 /* MX28_PAD_I2C0_SDA__GPIO_3_25 */
47 0x31a3 /* MX28_PAD_SAIF_SDATA0__GPIO_3_26 */
48 0x31e3 /* MX28_PAD_LCD_RESET__GPIO_3_30 */
49 >;
50 fsl,drive-strength = <0>;
51 fsl,voltage = <1>;
52 fsl,pull-up = <1>;
53 };
54
55 lcdif_18bit_pins_cfa10057: lcdif-18bit@0 {
56 reg = <0>;
57 fsl,pinmux-ids = <
58 0x1000 /* MX28_PAD_LCD_D00__LCD_D0 */
59 0x1010 /* MX28_PAD_LCD_D01__LCD_D1 */
60 0x1020 /* MX28_PAD_LCD_D02__LCD_D2 */
61 0x1030 /* MX28_PAD_LCD_D03__LCD_D3 */
62 0x1040 /* MX28_PAD_LCD_D04__LCD_D4 */
63 0x1050 /* MX28_PAD_LCD_D05__LCD_D5 */
64 0x1060 /* MX28_PAD_LCD_D06__LCD_D6 */
65 0x1070 /* MX28_PAD_LCD_D07__LCD_D7 */
66 0x1080 /* MX28_PAD_LCD_D08__LCD_D8 */
67 0x1090 /* MX28_PAD_LCD_D09__LCD_D9 */
68 0x10a0 /* MX28_PAD_LCD_D10__LCD_D10 */
69 0x10b0 /* MX28_PAD_LCD_D11__LCD_D11 */
70 0x10c0 /* MX28_PAD_LCD_D12__LCD_D12 */
71 0x10d0 /* MX28_PAD_LCD_D13__LCD_D13 */
72 0x10e0 /* MX28_PAD_LCD_D14__LCD_D14 */
73 0x10f0 /* MX28_PAD_LCD_D15__LCD_D15 */
74 0x1100 /* MX28_PAD_LCD_D16__LCD_D16 */
75 0x1110 /* MX28_PAD_LCD_D17__LCD_D17 */
76 >;
77 fsl,drive-strength = <0>;
78 fsl,voltage = <1>;
79 fsl,pull-up = <0>;
80 };
81
82 lcdif_pins_cfa10057: lcdif-evk@0 {
83 reg = <0>;
84 fsl,pinmux-ids = <
85 0x1181 /* MX28_PAD_LCD_RD_E__LCD_VSYNC */
86 0x1191 /* MX28_PAD_LCD_WR_RWN__LCD_HSYNC */
87 0x11a1 /* MX28_PAD_LCD_RS__LCD_DOTCLK */
88 0x11b1 /* MX28_PAD_LCD_CS__LCD_ENABLE */
89 >;
90 fsl,drive-strength = <0>;
91 fsl,voltage = <1>;
92 fsl,pull-up = <0>;
93 };
94 };
95
96 lcdif@80030000 {
97 pinctrl-names = "default";
98 pinctrl-0 = <&lcdif_18bit_pins_cfa10057
99 &lcdif_pins_cfa10057>;
100 display = <&display>;
101 status = "okay";
102
103 display: display {
104 bits-per-pixel = <32>;
105 bus-width = <18>;
106
107 display-timings {
108 native-mode = <&timing0>;
109 timing0: timing0 {
110 clock-frequency = <30000000>;
111 hactive = <480>;
112 vactive = <800>;
113 hfront-porch = <12>;
114 hback-porch = <2>;
115 vfront-porch = <5>;
116 vback-porch = <3>;
117 hsync-len = <2>;
118 vsync-len = <2>;
119 hsync-active = <0>;
120 vsync-active = <0>;
121 de-active = <1>;
122 pixelclk-active = <1>;
123 };
124 };
125 };
126 };
127 };
128
129 apbx@80040000 {
130 lradc@80050000 {
131 fsl,lradc-touchscreen-wires = <4>;
132 status = "okay";
133 };
134
135 pwm: pwm@80064000 {
136 pinctrl-names = "default";
137 pinctrl-0 = <&pwm3_pins_b>;
138 status = "okay";
139 };
140
141 i2c1: i2c@8005a000 {
142 pinctrl-names = "default";
143 pinctrl-0 = <&i2c1_pins_a>;
144 status = "okay";
145 };
146
147 usbphy1: usbphy@8007e000 {
148 status = "okay";
149 };
150 };
151 };
152
153 ahb@80080000 {
154 usb1: usb@80090000 {
155 vbus-supply = <&reg_usb1_vbus>;
156 pinctrl-0 = <&usbphy1_pins_a>;
157 pinctrl-names = "default";
158 status = "okay";
159 };
160 };
161
162 regulators {
163 compatible = "simple-bus";
164
165 reg_usb1_vbus: usb1_vbus {
166 compatible = "regulator-fixed";
167 regulator-name = "usb1_vbus";
168 regulator-min-microvolt = <5000000>;
169 regulator-max-microvolt = <5000000>;
170 gpio = <&gpio0 7 1>;
171 };
172 };
173
174 ahb@80080000 {
175 mac0: ethernet@800f0000 {
176 phy-mode = "rmii";
177 pinctrl-names = "default";
178 pinctrl-0 = <&mac0_pins_a>;
179 phy-reset-gpios = <&gpio2 21 0>;
180 phy-reset-duration = <100>;
181 status = "okay";
182 };
183 };
184
185 backlight {
186 compatible = "pwm-backlight";
187 pwms = <&pwm 3 5000000>;
188 brightness-levels = <0 4 8 16 32 64 128 255>;
189 default-brightness-level = <7>;
190 };
191};
diff --git a/arch/arm/boot/dts/imx28-evk.dts b/arch/arm/boot/dts/imx28-evk.dts
index 3637bf3b1d59..e035f4664b97 100644
--- a/arch/arm/boot/dts/imx28-evk.dts
+++ b/arch/arm/boot/dts/imx28-evk.dts
@@ -155,12 +155,14 @@
155 can0: can@80032000 { 155 can0: can@80032000 {
156 pinctrl-names = "default"; 156 pinctrl-names = "default";
157 pinctrl-0 = <&can0_pins_a>; 157 pinctrl-0 = <&can0_pins_a>;
158 xceiver-supply = <&reg_can_3v3>;
158 status = "okay"; 159 status = "okay";
159 }; 160 };
160 161
161 can1: can@80034000 { 162 can1: can@80034000 {
162 pinctrl-names = "default"; 163 pinctrl-names = "default";
163 pinctrl-0 = <&can1_pins_a>; 164 pinctrl-0 = <&can1_pins_a>;
165 xceiver-supply = <&reg_can_3v3>;
164 status = "okay"; 166 status = "okay";
165 }; 167 };
166 }; 168 };
@@ -193,7 +195,7 @@
193 reg = <0x0a>; 195 reg = <0x0a>;
194 VDDA-supply = <&reg_3p3v>; 196 VDDA-supply = <&reg_3p3v>;
195 VDDIO-supply = <&reg_3p3v>; 197 VDDIO-supply = <&reg_3p3v>;
196 198 clocks = <&saif0>;
197 }; 199 };
198 200
199 at24@51 { 201 at24@51 {
@@ -319,6 +321,16 @@
319 gpio = <&gpio3 30 0>; 321 gpio = <&gpio3 30 0>;
320 enable-active-high; 322 enable-active-high;
321 }; 323 };
324
325 reg_can_3v3: can-3v3 {
326 compatible = "regulator-fixed";
327 regulator-name = "can-3v3";
328 regulator-min-microvolt = <3300000>;
329 regulator-max-microvolt = <3300000>;
330 gpio = <&gpio2 13 0>;
331 enable-active-high;
332 };
333
322 }; 334 };
323 335
324 sound { 336 sound {
diff --git a/arch/arm/boot/dts/imx28-m28evk.dts b/arch/arm/boot/dts/imx28-m28evk.dts
index 5aa44e05c9f5..44d9da57736e 100644
--- a/arch/arm/boot/dts/imx28-m28evk.dts
+++ b/arch/arm/boot/dts/imx28-m28evk.dts
@@ -184,7 +184,7 @@
184 reg = <0x0a>; 184 reg = <0x0a>;
185 VDDA-supply = <&reg_3p3v>; 185 VDDA-supply = <&reg_3p3v>;
186 VDDIO-supply = <&reg_3p3v>; 186 VDDIO-supply = <&reg_3p3v>;
187 187 clocks = <&saif0>;
188 }; 188 };
189 189
190 eeprom: eeprom@51 { 190 eeprom: eeprom@51 {
@@ -220,7 +220,19 @@
220 220
221 auart0: serial@8006a000 { 221 auart0: serial@8006a000 {
222 pinctrl-names = "default"; 222 pinctrl-names = "default";
223 pinctrl-0 = <&auart0_2pins_a>; 223 pinctrl-0 = <&auart0_pins_a>;
224 status = "okay";
225 };
226
227 auart1: serial@8006c000 {
228 pinctrl-names = "default";
229 pinctrl-0 = <&auart1_pins_a>;
230 status = "okay";
231 };
232
233 auart2: serial@8006e000 {
234 pinctrl-names = "default";
235 pinctrl-0 = <&auart2_2pins_b>;
224 status = "okay"; 236 status = "okay";
225 }; 237 };
226 }; 238 };
diff --git a/arch/arm/boot/dts/imx28.dtsi b/arch/arm/boot/dts/imx28.dtsi
index 600f7cb51f3e..9524a0571281 100644
--- a/arch/arm/boot/dts/imx28.dtsi
+++ b/arch/arm/boot/dts/imx28.dtsi
@@ -32,8 +32,12 @@
32 }; 32 };
33 33
34 cpus { 34 cpus {
35 cpu@0 { 35 #address-cells = <0>;
36 compatible = "arm,arm926ejs"; 36 #size-cells = <0>;
37
38 cpu {
39 compatible = "arm,arm926ej-s";
40 device_type = "cpu";
37 }; 41 };
38 }; 42 };
39 43
@@ -330,6 +334,17 @@
330 fsl,pull-up = <0>; 334 fsl,pull-up = <0>;
331 }; 335 };
332 336
337 auart2_2pins_b: auart2-2pins@1 {
338 reg = <1>;
339 fsl,pinmux-ids = <
340 0x3080 /* MX28_PAD_AUART2_RX__AUART2_RX */
341 0x3090 /* MX28_PAD_AUART2_TX__AUART2_TX */
342 >;
343 fsl,drive-strength = <0>;
344 fsl,voltage = <1>;
345 fsl,pull-up = <0>;
346 };
347
333 auart3_pins_a: auart3@0 { 348 auart3_pins_a: auart3@0 {
334 reg = <0>; 349 reg = <0>;
335 fsl,pinmux-ids = < 350 fsl,pinmux-ids = <
@@ -354,6 +369,28 @@
354 fsl,pull-up = <0>; 369 fsl,pull-up = <0>;
355 }; 370 };
356 371
372 auart3_2pins_b: auart3-2pins@1 {
373 reg = <1>;
374 fsl,pinmux-ids = <
375 0x30c0 /* MX28_PAD_AUART3_RX__AUART3_RX */
376 0x30d0 /* MX28_PAD_AUART3_TX__AUART3_TX */
377 >;
378 fsl,drive-strength = <0>;
379 fsl,voltage = <1>;
380 fsl,pull-up = <0>;
381 };
382
383 auart4_2pins_a: auart4@0 {
384 reg = <0>;
385 fsl,pinmux-ids = <
386 0x2181 /* MX28_PAD_SSP3_SCK__AUART4_TX */
387 0x2191 /* MX28_PAD_SSP3_MOSI__AUART4_RX */
388 >;
389 fsl,drive-strength = <0>;
390 fsl,voltage = <1>;
391 fsl,pull-up = <0>;
392 };
393
357 mac0_pins_a: mac0@0 { 394 mac0_pins_a: mac0@0 {
358 reg = <0>; 395 reg = <0>;
359 fsl,pinmux-ids = < 396 fsl,pinmux-ids = <
@@ -669,7 +706,7 @@
669 }; 706 };
670 707
671 digctl@8001c000 { 708 digctl@8001c000 {
672 compatible = "fsl,imx28-digctl"; 709 compatible = "fsl,imx28-digctl", "fsl,imx23-digctl";
673 reg = <0x8001c000 0x2000>; 710 reg = <0x8001c000 0x2000>;
674 interrupts = <89>; 711 interrupts = <89>;
675 status = "disabled"; 712 status = "disabled";
@@ -699,7 +736,7 @@
699 dcp@80028000 { 736 dcp@80028000 {
700 reg = <0x80028000 0x2000>; 737 reg = <0x80028000 0x2000>;
701 interrupts = <52 53 54>; 738 interrupts = <52 53 54>;
702 status = "disabled"; 739 compatible = "fsl-dcp";
703 }; 740 };
704 741
705 pxp@8002a000 { 742 pxp@8002a000 {
@@ -800,6 +837,7 @@
800 compatible = "fsl,imx28-saif"; 837 compatible = "fsl,imx28-saif";
801 reg = <0x80042000 0x2000>; 838 reg = <0x80042000 0x2000>;
802 interrupts = <59 80>; 839 interrupts = <59 80>;
840 #clock-cells = <0>;
803 clocks = <&clks 53>; 841 clocks = <&clks 53>;
804 dmas = <&dma_apbx 4>; 842 dmas = <&dma_apbx 4>;
805 dma-names = "rx-tx"; 843 dma-names = "rx-tx";
diff --git a/arch/arm/boot/dts/imx51-apf51.dts b/arch/arm/boot/dts/imx51-apf51.dts
index 2bcf6981d490..8f7f9ac0b989 100644
--- a/arch/arm/boot/dts/imx51-apf51.dts
+++ b/arch/arm/boot/dts/imx51-apf51.dts
@@ -45,6 +45,13 @@
45 status = "okay"; 45 status = "okay";
46}; 46};
47 47
48&nfc {
49 nand-bus-width = <8>;
50 nand-ecc-mode = "hw";
51 nand-on-flash-bbt;
52 status = "okay";
53};
54
48&uart3 { 55&uart3 {
49 pinctrl-names = "default"; 56 pinctrl-names = "default";
50 pinctrl-0 = <&pinctrl_uart3_2>; 57 pinctrl-0 = <&pinctrl_uart3_2>;
diff --git a/arch/arm/boot/dts/imx51-babbage.dts b/arch/arm/boot/dts/imx51-babbage.dts
index 6dd9486c755b..ad3471ca17c7 100644
--- a/arch/arm/boot/dts/imx51-babbage.dts
+++ b/arch/arm/boot/dts/imx51-babbage.dts
@@ -61,6 +61,16 @@
61 mux-int-port = <2>; 61 mux-int-port = <2>;
62 mux-ext-port = <3>; 62 mux-ext-port = <3>;
63 }; 63 };
64
65 clocks {
66 clk_26M: codec_clock {
67 compatible = "fixed-clock";
68 reg=<0>;
69 #clock-cells = <0>;
70 clock-frequency = <26000000>;
71 gpios = <&gpio4 26 1>;
72 };
73 };
64}; 74};
65 75
66&esdhc1 { 76&esdhc1 {
@@ -229,6 +239,7 @@
229 MX51_PAD_EIM_A27__GPIO2_21 0x5 239 MX51_PAD_EIM_A27__GPIO2_21 0x5
230 MX51_PAD_CSPI1_SS0__GPIO4_24 0x85 240 MX51_PAD_CSPI1_SS0__GPIO4_24 0x85
231 MX51_PAD_CSPI1_SS1__GPIO4_25 0x85 241 MX51_PAD_CSPI1_SS1__GPIO4_25 0x85
242 MX51_PAD_CSPI1_RDY__GPIO4_26 0x80000000
232 >; 243 >;
233 }; 244 };
234 }; 245 };
@@ -255,7 +266,7 @@
255 sgtl5000: codec@0a { 266 sgtl5000: codec@0a {
256 compatible = "fsl,sgtl5000"; 267 compatible = "fsl,sgtl5000";
257 reg = <0x0a>; 268 reg = <0x0a>;
258 clock-frequency = <26000000>; 269 clocks = <&clk_26M>;
259 VDDA-supply = <&vdig_reg>; 270 VDDA-supply = <&vdig_reg>;
260 VDDIO-supply = <&vvideo_reg>; 271 VDDIO-supply = <&vvideo_reg>;
261 }; 272 };
diff --git a/arch/arm/boot/dts/imx51.dtsi b/arch/arm/boot/dts/imx51.dtsi
index 53fdde69bbf4..25764b505a61 100644
--- a/arch/arm/boot/dts/imx51.dtsi
+++ b/arch/arm/boot/dts/imx51.dtsi
@@ -175,10 +175,20 @@
175 }; 175 };
176 }; 176 };
177 177
178 usbphy0: usbphy@0 {
179 compatible = "usb-nop-xceiv";
180 clocks = <&clks 124>;
181 clock-names = "main_clk";
182 status = "okay";
183 };
184
178 usbotg: usb@73f80000 { 185 usbotg: usb@73f80000 {
179 compatible = "fsl,imx51-usb", "fsl,imx27-usb"; 186 compatible = "fsl,imx51-usb", "fsl,imx27-usb";
180 reg = <0x73f80000 0x0200>; 187 reg = <0x73f80000 0x0200>;
181 interrupts = <18>; 188 interrupts = <18>;
189 clocks = <&clks 108>;
190 fsl,usbmisc = <&usbmisc 0>;
191 fsl,usbphy = <&usbphy0>;
182 status = "disabled"; 192 status = "disabled";
183 }; 193 };
184 194
@@ -186,6 +196,8 @@
186 compatible = "fsl,imx51-usb", "fsl,imx27-usb"; 196 compatible = "fsl,imx51-usb", "fsl,imx27-usb";
187 reg = <0x73f80200 0x0200>; 197 reg = <0x73f80200 0x0200>;
188 interrupts = <14>; 198 interrupts = <14>;
199 clocks = <&clks 108>;
200 fsl,usbmisc = <&usbmisc 1>;
189 status = "disabled"; 201 status = "disabled";
190 }; 202 };
191 203
@@ -193,6 +205,8 @@
193 compatible = "fsl,imx51-usb", "fsl,imx27-usb"; 205 compatible = "fsl,imx51-usb", "fsl,imx27-usb";
194 reg = <0x73f80400 0x0200>; 206 reg = <0x73f80400 0x0200>;
195 interrupts = <16>; 207 interrupts = <16>;
208 clocks = <&clks 108>;
209 fsl,usbmisc = <&usbmisc 2>;
196 status = "disabled"; 210 status = "disabled";
197 }; 211 };
198 212
@@ -200,9 +214,18 @@
200 compatible = "fsl,imx51-usb", "fsl,imx27-usb"; 214 compatible = "fsl,imx51-usb", "fsl,imx27-usb";
201 reg = <0x73f80600 0x0200>; 215 reg = <0x73f80600 0x0200>;
202 interrupts = <17>; 216 interrupts = <17>;
217 clocks = <&clks 108>;
218 fsl,usbmisc = <&usbmisc 3>;
203 status = "disabled"; 219 status = "disabled";
204 }; 220 };
205 221
222 usbmisc: usbmisc@73f80800 {
223 #index-cells = <1>;
224 compatible = "fsl,imx51-usbmisc";
225 reg = <0x73f80800 0x200>;
226 clocks = <&clks 108>;
227 };
228
206 gpio1: gpio@73f84000 { 229 gpio1: gpio@73f84000 {
207 compatible = "fsl,imx51-gpio", "fsl,imx35-gpio"; 230 compatible = "fsl,imx51-gpio", "fsl,imx35-gpio";
208 reg = <0x73f84000 0x4000>; 231 reg = <0x73f84000 0x4000>;
diff --git a/arch/arm/boot/dts/imx53-m53evk.dts b/arch/arm/boot/dts/imx53-m53evk.dts
new file mode 100644
index 000000000000..7d304d02ed38
--- /dev/null
+++ b/arch/arm/boot/dts/imx53-m53evk.dts
@@ -0,0 +1,259 @@
1/*
2 * Copyright (C) 2013 Marek Vasut <marex@denx.de>
3 *
4 * The code contained herein is licensed under the GNU General Public
5 * License. You may obtain a copy of the GNU General Public License
6 * Version 2 or later at the following locations:
7 *
8 * http://www.opensource.org/licenses/gpl-license.html
9 * http://www.gnu.org/copyleft/gpl.html
10 */
11
12/dts-v1/;
13#include "imx53.dtsi"
14
15/ {
16 model = "DENX M53EVK";
17 compatible = "denx,imx53-m53evk", "fsl,imx53";
18
19 memory {
20 reg = <0x70000000 0x20000000>;
21 };
22
23 soc {
24 display@di1 {
25 compatible = "fsl,imx-parallel-display";
26 crtcs = <&ipu 1>;
27 interface-pix-fmt = "bgr666";
28 pinctrl-names = "default";
29 pinctrl-0 = <&pinctrl_ipu_disp2_1>;
30
31 display-timings {
32 800x480p60 {
33 native-mode;
34 clock-frequency = <31500000>;
35 hactive = <800>;
36 vactive = <480>;
37 hfront-porch = <40>;
38 hback-porch = <88>;
39 hsync-len = <128>;
40 vback-porch = <33>;
41 vfront-porch = <9>;
42 vsync-len = <3>;
43 vsync-active = <1>;
44 };
45 };
46 };
47 };
48
49 backlight {
50 compatible = "pwm-backlight";
51 pwms = <&pwm1 0 3000>;
52 brightness-levels = <0 4 8 16 32 64 128 255>;
53 default-brightness-level = <6>;
54 };
55
56 leds {
57 compatible = "gpio-leds";
58 pinctrl-names = "default";
59 pinctrl-0 = <&led_pin_gpio>;
60
61 user1 {
62 label = "user1";
63 gpios = <&gpio2 8 0>;
64 linux,default-trigger = "heartbeat";
65 };
66
67 user2 {
68 label = "user2";
69 gpios = <&gpio2 9 0>;
70 linux,default-trigger = "heartbeat";
71 };
72 };
73
74 regulators {
75 compatible = "simple-bus";
76
77 reg_3p2v: 3p2v {
78 compatible = "regulator-fixed";
79 regulator-name = "3P2V";
80 regulator-min-microvolt = <3200000>;
81 regulator-max-microvolt = <3200000>;
82 regulator-always-on;
83 };
84 };
85
86 sound {
87 compatible = "fsl,imx53-m53evk-sgtl5000",
88 "fsl,imx-audio-sgtl5000";
89 model = "imx53-m53evk-sgtl5000";
90 ssi-controller = <&ssi2>;
91 audio-codec = <&sgtl5000>;
92 audio-routing =
93 "MIC_IN", "Mic Jack",
94 "Mic Jack", "Mic Bias",
95 "LINE_IN", "Line In Jack",
96 "Headphone Jack", "HP_OUT",
97 "Ext Spk", "LINE_OUT";
98 mux-int-port = <2>;
99 mux-ext-port = <4>;
100 };
101};
102
103&audmux {
104 pinctrl-names = "default";
105 pinctrl-0 = <&pinctrl_audmux_2>;
106 status = "okay";
107};
108
109&can1 {
110 pinctrl-names = "default";
111 pinctrl-0 = <&pinctrl_can1_3>;
112 status = "okay";
113};
114
115&can2 {
116 pinctrl-names = "default";
117 pinctrl-0 = <&pinctrl_can2_1>;
118 status = "okay";
119};
120
121&esdhc1 {
122 pinctrl-names = "default";
123 pinctrl-0 = <&pinctrl_esdhc1_1>;
124 cd-gpios = <&gpio1 1 0>;
125 wp-gpios = <&gpio1 9 0>;
126 status = "okay";
127};
128
129&fec {
130 pinctrl-names = "default";
131 pinctrl-0 = <&pinctrl_fec_1>;
132 phy-mode = "rmii";
133 status = "okay";
134};
135
136&i2c1 {
137 pinctrl-names = "default";
138 pinctrl-0 = <&pinctrl_i2c1_2>;
139 status = "okay";
140
141 sgtl5000: codec@0a {
142 compatible = "fsl,sgtl5000";
143 reg = <0x0a>;
144 VDDA-supply = <&reg_3p2v>;
145 VDDIO-supply = <&reg_3p2v>;
146 clocks = <&clks 150>;
147 };
148};
149
150&i2c2 {
151 pinctrl-names = "default";
152 pinctrl-0 = <&pinctrl_i2c2_2>;
153 clock-frequency = <400000>;
154 status = "okay";
155
156 stmpe610@41 {
157 compatible = "st,stmpe610";
158 #address-cells = <1>;
159 #size-cells = <0>;
160 reg = <0x41>;
161 id = <0>;
162 blocks = <0x5>;
163 interrupts = <6 0x0>;
164 interrupt-parent = <&gpio7>;
165 irq-trigger = <0x1>;
166
167 stmpe_touchscreen {
168 compatible = "stmpe,ts";
169 reg = <0>;
170 ts,sample-time = <4>;
171 ts,mod-12b = <1>;
172 ts,ref-sel = <0>;
173 ts,adc-freq = <1>;
174 ts,ave-ctrl = <3>;
175 ts,touch-det-delay = <3>;
176 ts,settling = <4>;
177 ts,fraction-z = <7>;
178 ts,i-drive = <1>;
179 };
180 };
181
182 eeprom: eeprom@50 {
183 compatible = "atmel,24c128";
184 reg = <0x50>;
185 pagesize = <32>;
186 };
187
188 rtc: rtc@68 {
189 compatible = "stm,m41t62";
190 reg = <0x68>;
191 };
192};
193
194&i2c3 {
195 pinctrl-names = "default";
196 pinctrl-0 = <&pinctrl_i2c3_1>;
197 status = "okay";
198};
199
200&iomuxc {
201 pinctrl-names = "default";
202 pinctrl-0 = <&pinctrl_hog>;
203
204 hog {
205 pinctrl_hog: hoggrp {
206 fsl,pins = <
207 MX53_PAD_GPIO_0__CCM_SSI_EXT1_CLK 0x80000000
208 MX53_PAD_EIM_EB3__GPIO2_31 0x80000000
209 MX53_PAD_PATA_DA_0__GPIO7_6 0x80000000
210 MX53_PAD_DISP0_DAT8__PWM1_PWMO 0x5
211
212 >;
213 };
214
215 led_pin_gpio: led_gpio@0 {
216 fsl,pins = <
217 MX53_PAD_PATA_DATA8__GPIO2_8 0x80000000
218 MX53_PAD_PATA_DATA9__GPIO2_9 0x80000000
219 >;
220 };
221 };
222};
223
224&nfc {
225 pinctrl-names = "default";
226 pinctrl-0 = <&pinctrl_nand_1>;
227 nand-bus-width = <8>;
228 nand-ecc-mode = "hw";
229 status = "okay";
230};
231
232&pwm1 {
233 pinctrl-names = "default";
234 pinctrl-0 = <&pinctrl_pwm1_1>;
235 status = "okay";
236};
237
238&ssi2 {
239 fsl,mode = "i2s-slave";
240 status = "okay";
241};
242
243&uart1 {
244 pinctrl-names = "default";
245 pinctrl-0 = <&pinctrl_uart1_2>;
246 status = "okay";
247};
248
249&uart2 {
250 pinctrl-names = "default";
251 pinctrl-0 = <&pinctrl_uart2_1>;
252 status = "okay";
253};
254
255&uart3 {
256 pinctrl-names = "default";
257 pinctrl-0 = <&pinctrl_uart3_1>;
258 status = "okay";
259};
diff --git a/arch/arm/boot/dts/imx53-mba53.dts b/arch/arm/boot/dts/imx53-mba53.dts
index 445a01119cc5..a63090267941 100644
--- a/arch/arm/boot/dts/imx53-mba53.dts
+++ b/arch/arm/boot/dts/imx53-mba53.dts
@@ -16,27 +16,81 @@
16/ { 16/ {
17 model = "TQ MBa53 starter kit"; 17 model = "TQ MBa53 starter kit";
18 compatible = "tq,mba53", "tq,tqma53", "fsl,imx53"; 18 compatible = "tq,mba53", "tq,tqma53", "fsl,imx53";
19
20 reg_backlight: fixed@0 {
21 compatible = "regulator-fixed";
22 regulator-name = "lcd-supply";
23 gpio = <&gpio2 5 0>;
24 startup-delay-us = <5000>;
25 enable-active-low;
26 };
27
28 backlight {
29 compatible = "pwm-backlight";
30 pwms = <&pwm2 0 50000>;
31 brightness-levels = <0 24 28 32 36 40 44 48 52 56 60 64 68 72 76 80 84 88 92 96 100>;
32 default-brightness-level = <10>;
33 enable-gpios = <&gpio7 7 0>;
34 power-supply = <&reg_backlight>;
35 };
36
37 disp1: display@disp1 {
38 compatible = "fsl,imx-parallel-display";
39 pinctrl-names = "default";
40 pinctrl-0 = <&pinctrl_disp1_1>;
41 crtcs = <&ipu 1>;
42 interface-pix-fmt = "rgb24";
43 status = "disabled";
44 };
45
46 reg_3p2v: 3p2v {
47 compatible = "regulator-fixed";
48 regulator-name = "3P2V";
49 regulator-min-microvolt = <3200000>;
50 regulator-max-microvolt = <3200000>;
51 regulator-always-on;
52 };
53
54 sound {
55 compatible = "tq,imx53-mba53-sgtl5000",
56 "fsl,imx-audio-sgtl5000";
57 model = "imx53-mba53-sgtl5000";
58 ssi-controller = <&ssi2>;
59 audio-codec = <&codec>;
60 audio-routing =
61 "MIC_IN", "Mic Jack",
62 "Mic Jack", "Mic Bias",
63 "Headphone Jack", "HP_OUT";
64 mux-int-port = <2>;
65 mux-ext-port = <5>;
66 };
67};
68
69&ldb {
70 pinctrl-names = "default";
71 pinctrl-0 = <&pinctrl_lvds1_1>;
72 status = "disabled";
19}; 73};
20 74
21&iomuxc { 75&iomuxc {
22 lvds1 { 76 lvds1 {
23 pinctrl_lvds1_1: lvds1-grp1 { 77 pinctrl_lvds1_1: lvds1-grp1 {
24 fsl,pins = < 78 fsl,pins = <
25 MX53_PAD_LVDS0_TX3_P__LDB_LVDS0_TX3 0x10000 79 MX53_PAD_LVDS0_TX3_P__LDB_LVDS0_TX3 0x80000000
26 MX53_PAD_LVDS0_CLK_P__LDB_LVDS0_CLK 0x10000 80 MX53_PAD_LVDS0_CLK_P__LDB_LVDS0_CLK 0x80000000
27 MX53_PAD_LVDS0_TX2_P__LDB_LVDS0_TX2 0x10000 81 MX53_PAD_LVDS0_TX2_P__LDB_LVDS0_TX2 0x80000000
28 MX53_PAD_LVDS0_TX1_P__LDB_LVDS0_TX1 0x10000 82 MX53_PAD_LVDS0_TX1_P__LDB_LVDS0_TX1 0x80000000
29 MX53_PAD_LVDS0_TX0_P__LDB_LVDS0_TX0 0x10000 83 MX53_PAD_LVDS0_TX0_P__LDB_LVDS0_TX0 0x80000000
30 >; 84 >;
31 }; 85 };
32 86
33 pinctrl_lvds1_2: lvds1-grp2 { 87 pinctrl_lvds1_2: lvds1-grp2 {
34 fsl,pins = < 88 fsl,pins = <
35 MX53_PAD_LVDS1_TX3_P__LDB_LVDS1_TX3 0x10000 89 MX53_PAD_LVDS1_TX3_P__LDB_LVDS1_TX3 0x80000000
36 MX53_PAD_LVDS1_TX2_P__LDB_LVDS1_TX2 0x10000 90 MX53_PAD_LVDS1_TX2_P__LDB_LVDS1_TX2 0x80000000
37 MX53_PAD_LVDS1_CLK_P__LDB_LVDS1_CLK 0x10000 91 MX53_PAD_LVDS1_CLK_P__LDB_LVDS1_CLK 0x80000000
38 MX53_PAD_LVDS1_TX1_P__LDB_LVDS1_TX1 0x10000 92 MX53_PAD_LVDS1_TX1_P__LDB_LVDS1_TX1 0x80000000
39 MX53_PAD_LVDS1_TX0_P__LDB_LVDS1_TX0 0x10000 93 MX53_PAD_LVDS1_TX0_P__LDB_LVDS1_TX0 0x80000000
40 >; 94 >;
41 }; 95 };
42 }; 96 };
@@ -44,33 +98,44 @@
44 disp1 { 98 disp1 {
45 pinctrl_disp1_1: disp1-grp1 { 99 pinctrl_disp1_1: disp1-grp1 {
46 fsl,pins = < 100 fsl,pins = <
47 MX53_PAD_EIM_DA10__IPU_DI1_PIN15 0x10000 /* DISP1_DRDY */ 101 MX53_PAD_EIM_A16__IPU_DI1_DISP_CLK 0x80000000 /* DISP1_CLK */
48 MX53_PAD_EIM_D23__IPU_DI1_PIN2 0x10000 /* DISP1_HSYNC */ 102 MX53_PAD_EIM_DA10__IPU_DI1_PIN15 0x80000000 /* DISP1_DRDY */
49 MX53_PAD_EIM_EB3__IPU_DI1_PIN3 0x10000 /* DISP1_VSYNC */ 103 MX53_PAD_EIM_D23__IPU_DI1_PIN2 0x80000000 /* DISP1_HSYNC */
50 MX53_PAD_EIM_D26__IPU_DISP1_DAT_22 0x10000 104 MX53_PAD_EIM_EB3__IPU_DI1_PIN3 0x80000000 /* DISP1_VSYNC */
51 MX53_PAD_EIM_D27__IPU_DISP1_DAT_23 0x10000 105 MX53_PAD_EIM_D26__IPU_DISP1_DAT_22 0x80000000
52 MX53_PAD_EIM_D30__IPU_DISP1_DAT_21 0x10000 106 MX53_PAD_EIM_D27__IPU_DISP1_DAT_23 0x80000000
53 MX53_PAD_EIM_D31__IPU_DISP1_DAT_20 0x10000 107 MX53_PAD_EIM_D30__IPU_DISP1_DAT_21 0x80000000
54 MX53_PAD_EIM_A24__IPU_DISP1_DAT_19 0x10000 108 MX53_PAD_EIM_D31__IPU_DISP1_DAT_20 0x80000000
55 MX53_PAD_EIM_A23__IPU_DISP1_DAT_18 0x10000 109 MX53_PAD_EIM_A24__IPU_DISP1_DAT_19 0x80000000
56 MX53_PAD_EIM_A22__IPU_DISP1_DAT_17 0x10000 110 MX53_PAD_EIM_A23__IPU_DISP1_DAT_18 0x80000000
57 MX53_PAD_EIM_A21__IPU_DISP1_DAT_16 0x10000 111 MX53_PAD_EIM_A22__IPU_DISP1_DAT_17 0x80000000
58 MX53_PAD_EIM_A20__IPU_DISP1_DAT_15 0x10000 112 MX53_PAD_EIM_A21__IPU_DISP1_DAT_16 0x80000000
59 MX53_PAD_EIM_A19__IPU_DISP1_DAT_14 0x10000 113 MX53_PAD_EIM_A20__IPU_DISP1_DAT_15 0x80000000
60 MX53_PAD_EIM_A18__IPU_DISP1_DAT_13 0x10000 114 MX53_PAD_EIM_A19__IPU_DISP1_DAT_14 0x80000000
61 MX53_PAD_EIM_A17__IPU_DISP1_DAT_12 0x10000 115 MX53_PAD_EIM_A18__IPU_DISP1_DAT_13 0x80000000
62 MX53_PAD_EIM_EB0__IPU_DISP1_DAT_11 0x10000 116 MX53_PAD_EIM_A17__IPU_DISP1_DAT_12 0x80000000
63 MX53_PAD_EIM_EB1__IPU_DISP1_DAT_10 0x10000 117 MX53_PAD_EIM_EB0__IPU_DISP1_DAT_11 0x80000000
64 MX53_PAD_EIM_DA0__IPU_DISP1_DAT_9 0x10000 118 MX53_PAD_EIM_EB1__IPU_DISP1_DAT_10 0x80000000
65 MX53_PAD_EIM_DA1__IPU_DISP1_DAT_8 0x10000 119 MX53_PAD_EIM_DA0__IPU_DISP1_DAT_9 0x80000000
66 MX53_PAD_EIM_DA2__IPU_DISP1_DAT_7 0x10000 120 MX53_PAD_EIM_DA1__IPU_DISP1_DAT_8 0x80000000
67 MX53_PAD_EIM_DA3__IPU_DISP1_DAT_6 0x10000 121 MX53_PAD_EIM_DA2__IPU_DISP1_DAT_7 0x80000000
68 MX53_PAD_EIM_DA4__IPU_DISP1_DAT_5 0x10000 122 MX53_PAD_EIM_DA3__IPU_DISP1_DAT_6 0x80000000
69 MX53_PAD_EIM_DA5__IPU_DISP1_DAT_4 0x10000 123 MX53_PAD_EIM_DA4__IPU_DISP1_DAT_5 0x80000000
70 MX53_PAD_EIM_DA6__IPU_DISP1_DAT_3 0x10000 124 MX53_PAD_EIM_DA5__IPU_DISP1_DAT_4 0x80000000
71 MX53_PAD_EIM_DA7__IPU_DISP1_DAT_2 0x10000 125 MX53_PAD_EIM_DA6__IPU_DISP1_DAT_3 0x80000000
72 MX53_PAD_EIM_DA8__IPU_DISP1_DAT_1 0x10000 126 MX53_PAD_EIM_DA7__IPU_DISP1_DAT_2 0x80000000
73 MX53_PAD_EIM_DA9__IPU_DISP1_DAT_0 0x10000 127 MX53_PAD_EIM_DA8__IPU_DISP1_DAT_1 0x80000000
128 MX53_PAD_EIM_DA9__IPU_DISP1_DAT_0 0x80000000
129 >;
130 };
131 };
132
133 tve {
134 pinctrl_vga_sync_1: vgasync-grp1 {
135 fsl,pins = <
136 /* VGA_VSYNC, HSYNC with max drive strength */
137 MX53_PAD_EIM_CS1__IPU_DI1_PIN6 0xe6
138 MX53_PAD_EIM_DA15__IPU_DI1_PIN4 0xe6
74 >; 139 >;
75 }; 140 };
76 }; 141 };
@@ -80,16 +145,27 @@
80 status = "okay"; 145 status = "okay";
81}; 146};
82 147
148&audmux {
149 status = "okay";
150 pinctrl-names = "default";
151 pinctrl-0 = <&pinctrl_audmux_1>;
152};
153
83&i2c2 { 154&i2c2 {
84 codec: sgtl5000@a { 155 codec: sgtl5000@a {
85 compatible = "fsl,sgtl5000"; 156 compatible = "fsl,sgtl5000";
86 reg = <0x0a>; 157 reg = <0x0a>;
158 clocks = <&clks 150>;
159 VDDA-supply = <&reg_3p2v>;
160 VDDIO-supply = <&reg_3p2v>;
87 }; 161 };
88 162
89 expander: pca9554@20 { 163 expander: pca9554@20 {
90 compatible = "pca9554"; 164 compatible = "pca9554";
91 reg = <0x20>; 165 reg = <0x20>;
92 interrupts = <109>; 166 interrupts = <109>;
167 #gpio-cells = <2>;
168 gpio-controller;
93 }; 169 };
94 170
95 sensor2: lm75@49 { 171 sensor2: lm75@49 {
@@ -99,6 +175,7 @@
99}; 175};
100 176
101&fec { 177&fec {
178 phy-reset-gpios = <&gpio7 6 0>;
102 status = "okay"; 179 status = "okay";
103}; 180};
104 181
@@ -114,10 +191,24 @@
114 status = "okay"; 191 status = "okay";
115}; 192};
116 193
194&usbotg {
195 dr_mode = "host";
196 status = "okay";
197};
198
199&usbh1 {
200 status = "okay";
201};
202
117&uart1 { 203&uart1 {
118 status = "okay"; 204 status = "okay";
119}; 205};
120 206
207&ssi2 {
208 fsl,mode = "i2s-slave";
209 status = "okay";
210};
211
121&uart2 { 212&uart2 {
122 status = "okay"; 213 status = "okay";
123}; 214};
@@ -133,3 +224,13 @@
133&i2c3 { 224&i2c3 {
134 status = "okay"; 225 status = "okay";
135}; 226};
227
228&tve {
229 pinctrl-names = "default";
230 pinctrl-0 = <&pinctrl_vga_sync_1>;
231 ddc = <&i2c3>;
232 fsl,tve-mode = "vga";
233 fsl,hsync-pin = <4>;
234 fsl,vsync-pin = <6>;
235 status = "okay";
236};
diff --git a/arch/arm/boot/dts/imx53-qsb.dts b/arch/arm/boot/dts/imx53-qsb.dts
index 8f0e9ae0e3e6..512a1f608253 100644
--- a/arch/arm/boot/dts/imx53-qsb.dts
+++ b/arch/arm/boot/dts/imx53-qsb.dts
@@ -21,6 +21,33 @@
21 reg = <0x70000000 0x40000000>; 21 reg = <0x70000000 0x40000000>;
22 }; 22 };
23 23
24 display@di0 {
25 compatible = "fsl,imx-parallel-display";
26 crtcs = <&ipu 0>;
27 interface-pix-fmt = "rgb565";
28 pinctrl-names = "default";
29 pinctrl-0 = <&pinctrl_ipu_disp0_1>;
30 status = "disabled";
31 display-timings {
32 claawvga {
33 native-mode;
34 clock-frequency = <27000000>;
35 hactive = <800>;
36 vactive = <480>;
37 hback-porch = <40>;
38 hfront-porch = <60>;
39 vback-porch = <10>;
40 vfront-porch = <10>;
41 hsync-len = <20>;
42 vsync-len = <10>;
43 hsync-active = <0>;
44 vsync-active = <0>;
45 de-active = <1>;
46 pixelclk-active = <0>;
47 };
48 };
49 };
50
24 gpio-keys { 51 gpio-keys {
25 compatible = "gpio-keys"; 52 compatible = "gpio-keys";
26 53
@@ -147,6 +174,7 @@
147 reg = <0x0a>; 174 reg = <0x0a>;
148 VDDA-supply = <&reg_3p2v>; 175 VDDA-supply = <&reg_3p2v>;
149 VDDIO-supply = <&reg_3p2v>; 176 VDDIO-supply = <&reg_3p2v>;
177 clocks = <&clks 150>;
150 }; 178 };
151}; 179};
152 180
@@ -268,3 +296,11 @@
268 phy-reset-gpios = <&gpio7 6 0>; 296 phy-reset-gpios = <&gpio7 6 0>;
269 status = "okay"; 297 status = "okay";
270}; 298};
299
300&usbh1 {
301 status = "okay";
302};
303
304&usbotg {
305 status = "okay";
306};
diff --git a/arch/arm/boot/dts/imx53-tqma53.dtsi b/arch/arm/boot/dts/imx53-tqma53.dtsi
index 38bed3ed7c1a..abd72af545bf 100644
--- a/arch/arm/boot/dts/imx53-tqma53.dtsi
+++ b/arch/arm/boot/dts/imx53-tqma53.dtsi
@@ -35,7 +35,9 @@
35 35
36&esdhc2 { 36&esdhc2 {
37 pinctrl-names = "default"; 37 pinctrl-names = "default";
38 pinctrl-0 = <&pinctrl_esdhc2_1>; 38 pinctrl-0 = <&pinctrl_esdhc2_1>,
39 <&pinctrl_tqma53_esdhc2_2>;
40 vmmc-supply = <&reg_3p3v>;
39 wp-gpios = <&gpio1 2 0>; 41 wp-gpios = <&gpio1 2 0>;
40 cd-gpios = <&gpio1 4 0>; 42 cd-gpios = <&gpio1 4 0>;
41 status = "disabled"; 43 status = "disabled";
@@ -69,14 +71,22 @@
69 pinctrl-names = "default"; 71 pinctrl-names = "default";
70 pinctrl-0 = <&pinctrl_hog>; 72 pinctrl-0 = <&pinctrl_hog>;
71 73
74 esdhc2_2 {
75 pinctrl_tqma53_esdhc2_2: esdhc2-tqma53-grp2 {
76 fsl,pins = <
77 MX53_PAD_GPIO_4__GPIO1_4 0x80000000 /* SD2_CD */
78 MX53_PAD_GPIO_2__GPIO1_2 0x80000000 /* SD2_WP */
79 >;
80 };
81 };
82
72 i2s { 83 i2s {
73 pinctrl_i2s_1: i2s-grp1 { 84 pinctrl_i2s_1: i2s-grp1 {
74 fsl,pins = < 85 fsl,pins = <
75 MX53_PAD_GPIO_19__GPIO4_5 0x10000 /* I2S_MCLK */ 86 MX53_PAD_KEY_COL0__AUDMUX_AUD5_TXC 0x80000000 /* I2S_SCLK */
76 MX53_PAD_KEY_COL0__AUDMUX_AUD5_TXC 0x10000 /* I2S_SCLK */ 87 MX53_PAD_KEY_ROW0__AUDMUX_AUD5_TXD 0x80000000 /* I2S_DOUT */
77 MX53_PAD_KEY_ROW0__AUDMUX_AUD5_TXD 0x10000 /* I2S_DOUT */ 88 MX53_PAD_KEY_COL1__AUDMUX_AUD5_TXFS 0x80000000 /* I2S_LRCLK */
78 MX53_PAD_KEY_COL1__AUDMUX_AUD5_TXFS 0x10000 /* I2S_LRCLK */ 89 MX53_PAD_KEY_ROW1__AUDMUX_AUD5_RXD 0x80000000 /* I2S_DIN */
79 MX53_PAD_KEY_ROW1__AUDMUX_AUD5_RXD 0x10000 /* I2S_DIN */
80 >; 90 >;
81 }; 91 };
82 }; 92 };
@@ -84,16 +94,17 @@
84 hog { 94 hog {
85 pinctrl_hog: hoggrp { 95 pinctrl_hog: hoggrp {
86 fsl,pins = < 96 fsl,pins = <
87 MX53_PAD_EIM_CS1__IPU_DI1_PIN6 0x10000 /* VSYNC */ 97 MX53_PAD_GPIO_0__CCM_SSI_EXT1_CLK 0x80000000 /* SSI_MCLK */
88 MX53_PAD_EIM_DA15__IPU_DI1_PIN4 0x10000 /* HSYNC */ 98 MX53_PAD_PATA_DA_1__GPIO7_7 0x80000000 /* LCD_BLT_EN */
89 MX53_PAD_PATA_DA_1__GPIO7_7 0x10000 /* LCD_BLT_EN */ 99 MX53_PAD_PATA_DA_2__GPIO7_8 0x80000000 /* LCD_RESET */
90 MX53_PAD_PATA_DA_2__GPIO7_8 0x10000 /* LCD_RESET */ 100 MX53_PAD_PATA_DATA5__GPIO2_5 0x80000000 /* LCD_POWER */
91 MX53_PAD_PATA_DATA5__GPIO2_5 0x10000 /* LCD_POWER */ 101 MX53_PAD_PATA_DATA6__GPIO2_6 0x80000000 /* PMIC_INT */
92 MX53_PAD_PATA_DATA6__GPIO2_6 0x10000 /* PMIC_INT */ 102 MX53_PAD_PATA_DATA14__GPIO2_14 0x80000000 /* CSI_RST */
93 MX53_PAD_PATA_DATA14__GPIO2_14 0x10000 /* CSI_RST */ 103 MX53_PAD_PATA_DATA15__GPIO2_15 0x80000000 /* CSI_PWDN */
94 MX53_PAD_PATA_DATA15__GPIO2_15 0x10000 /* CSI_PWDN */ 104 MX53_PAD_GPIO_19__GPIO4_5 0x80000000 /* #SYSTEM_DOWN */
95 MX53_PAD_GPIO_0__GPIO1_0 0x10000 /* SYSTEM_DOWN */ 105 MX53_PAD_GPIO_3__GPIO1_3 0x80000000
96 MX53_PAD_GPIO_3__GPIO1_3 0x10000 106 MX53_PAD_PATA_DA_0__GPIO7_6 0x80000000 /* #PHY_RESET */
107 MX53_PAD_GPIO_1__PWM2_PWMO 0x80000000 /* LCD_CONTRAST */
97 >; 108 >;
98 }; 109 };
99 }; 110 };
@@ -149,7 +160,7 @@
149 reg = <0x8>; 160 reg = <0x8>;
150 fsl,mc13xxx-uses-rtc; 161 fsl,mc13xxx-uses-rtc;
151 interrupt-parent = <&gpio2>; 162 interrupt-parent = <&gpio2>;
152 interrupts = <6 8>; /* PDATA_DATA6, low active */ 163 interrupts = <6 4>; /* PATA_DATA6, active high */
153 }; 164 };
154 165
155 sensor1: lm75@48 { 166 sensor1: lm75@48 {
diff --git a/arch/arm/boot/dts/imx53-tx53.dtsi b/arch/arm/boot/dts/imx53-tx53.dtsi
new file mode 100644
index 000000000000..f494766700a3
--- /dev/null
+++ b/arch/arm/boot/dts/imx53-tx53.dtsi
@@ -0,0 +1,122 @@
1/*
2 * Copyright 2013 Steffen Trumtrar <s.trumtrar@pengutronix.de>
3 *
4 * The code contained herein is licensed under the GNU General Public
5 * License. You may obtain a copy of the GNU General Public License
6 * Version 2 or later at the following locations:
7 *
8 * http://www.opensource.org/licenses/gpl-license.html
9 * http://www.gnu.org/copyleft/gpl.html
10 */
11
12/include/ "imx53.dtsi"
13
14/ {
15 model = "Ka-Ro TX53";
16 compatible = "karo,tx53", "fsl,imx53";
17
18 memory {
19 reg = <0x70000000 0x40000000>; /* Up to 1GiB */
20 };
21
22 regulators {
23 compatible = "simple-bus";
24
25 reg_3p3v: 3p3v {
26 compatible = "regulator-fixed";
27 regulator-name = "3P3V";
28 regulator-min-microvolt = <3300000>;
29 regulator-max-microvolt = <3300000>;
30 regulator-always-on;
31 };
32 };
33};
34
35&can1 {
36 pinctrl-names = "default";
37 pinctrl-0 = <&pinctrl_can1_2>;
38 status = "disabled";
39};
40
41&can2 {
42 pinctrl-names = "default";
43 pinctrl-0 = <&pinctrl_can2_1>;
44 status = "disabled";
45};
46
47&ecspi1 {
48 pinctrl-names = "default";
49 pinctrl-0 = <&pinctrl_ecspi1_2>;
50 status = "disabled";
51};
52
53&esdhc1 {
54 pinctrl-names = "default";
55 pinctrl-0 = <&pinctrl_esdhc1_2>;
56 status = "disabled";
57};
58
59&esdhc2 {
60 pinctrl-names = "default";
61 pinctrl-0 = <&pinctrl_esdhc2_1>;
62 status = "disabled";
63};
64
65&fec {
66 pinctrl-names = "default";
67 pinctrl-0 = <&pinctrl_fec_1>;
68 phy-mode = "rmii";
69 status = "disabled";
70};
71
72&i2c3 {
73 pinctrl-names = "default";
74 pinctrl-0 = <&pinctrl_i2c3_2>;
75 status = "disabled";
76};
77
78&owire {
79 pinctrl-names = "default";
80 pinctrl-0 = <&pinctrl_owire_1>;
81 status = "disabled";
82};
83
84&pwm2 {
85 pinctrl-names = "default";
86 pinctrl-0 = <&pinctrl_pwm2_1>;
87 status = "disabled";
88};
89
90&ssi1 {
91 pinctrl-names = "default";
92 pinctrl-0 = <&pinctrl_audmux_1>;
93 status = "disabled";
94};
95
96&ssi2 {
97 pinctrl-names = "default";
98 pinctrl-0 = <&pinctrl_audmux_2>;
99 status = "disabled";
100};
101
102&uart1 {
103 pinctrl-names = "default";
104 pinctrl-0 = <&pinctrl_uart1_2>,
105 <&pinctrl_uart1_3>;
106 fsl,uart-has-rtscts;
107 status = "disabled";
108};
109
110&uart2 {
111 pinctrl-names = "default";
112 pinctrl-0 = <&pinctrl_uart2_2>;
113 fsl,uart-has-rtscts;
114 status = "disabled";
115};
116
117&uart3 {
118 pinctrl-names = "default";
119 pinctrl-0 = <&pinctrl_uart3_1>;
120 fsl,uart-has-rtscts;
121 status = "disabled";
122};
diff --git a/arch/arm/boot/dts/imx53.dtsi b/arch/arm/boot/dts/imx53.dtsi
index eb83aa039b8b..569aa9f2c4ed 100644
--- a/arch/arm/boot/dts/imx53.dtsi
+++ b/arch/arm/boot/dts/imx53.dtsi
@@ -27,6 +27,9 @@
27 gpio4 = &gpio5; 27 gpio4 = &gpio5;
28 gpio5 = &gpio6; 28 gpio5 = &gpio6;
29 gpio6 = &gpio7; 29 gpio6 = &gpio7;
30 i2c0 = &i2c1;
31 i2c1 = &i2c2;
32 i2c2 = &i2c3;
30 }; 33 };
31 34
32 tzic: tz-interrupt-controller@0fffc000 { 35 tzic: tz-interrupt-controller@0fffc000 {
@@ -163,10 +166,27 @@
163 }; 166 };
164 }; 167 };
165 168
169 usbphy0: usbphy@0 {
170 compatible = "usb-nop-xceiv";
171 clocks = <&clks 124>;
172 clock-names = "main_clk";
173 status = "okay";
174 };
175
176 usbphy1: usbphy@1 {
177 compatible = "usb-nop-xceiv";
178 clocks = <&clks 125>;
179 clock-names = "main_clk";
180 status = "okay";
181 };
182
166 usbotg: usb@53f80000 { 183 usbotg: usb@53f80000 {
167 compatible = "fsl,imx53-usb", "fsl,imx27-usb"; 184 compatible = "fsl,imx53-usb", "fsl,imx27-usb";
168 reg = <0x53f80000 0x0200>; 185 reg = <0x53f80000 0x0200>;
169 interrupts = <18>; 186 interrupts = <18>;
187 clocks = <&clks 108>;
188 fsl,usbmisc = <&usbmisc 0>;
189 fsl,usbphy = <&usbphy0>;
170 status = "disabled"; 190 status = "disabled";
171 }; 191 };
172 192
@@ -174,6 +194,9 @@
174 compatible = "fsl,imx53-usb", "fsl,imx27-usb"; 194 compatible = "fsl,imx53-usb", "fsl,imx27-usb";
175 reg = <0x53f80200 0x0200>; 195 reg = <0x53f80200 0x0200>;
176 interrupts = <14>; 196 interrupts = <14>;
197 clocks = <&clks 108>;
198 fsl,usbmisc = <&usbmisc 1>;
199 fsl,usbphy = <&usbphy1>;
177 status = "disabled"; 200 status = "disabled";
178 }; 201 };
179 202
@@ -181,6 +204,8 @@
181 compatible = "fsl,imx53-usb", "fsl,imx27-usb"; 204 compatible = "fsl,imx53-usb", "fsl,imx27-usb";
182 reg = <0x53f80400 0x0200>; 205 reg = <0x53f80400 0x0200>;
183 interrupts = <16>; 206 interrupts = <16>;
207 clocks = <&clks 108>;
208 fsl,usbmisc = <&usbmisc 2>;
184 status = "disabled"; 209 status = "disabled";
185 }; 210 };
186 211
@@ -188,9 +213,18 @@
188 compatible = "fsl,imx53-usb", "fsl,imx27-usb"; 213 compatible = "fsl,imx53-usb", "fsl,imx27-usb";
189 reg = <0x53f80600 0x0200>; 214 reg = <0x53f80600 0x0200>;
190 interrupts = <17>; 215 interrupts = <17>;
216 clocks = <&clks 108>;
217 fsl,usbmisc = <&usbmisc 3>;
191 status = "disabled"; 218 status = "disabled";
192 }; 219 };
193 220
221 usbmisc: usbmisc@53f80800 {
222 #index-cells = <1>;
223 compatible = "fsl,imx53-usbmisc";
224 reg = <0x53f80800 0x200>;
225 clocks = <&clks 108>;
226 };
227
194 gpio1: gpio@53f84000 { 228 gpio1: gpio@53f84000 {
195 compatible = "fsl,imx53-gpio", "fsl,imx35-gpio"; 229 compatible = "fsl,imx53-gpio", "fsl,imx35-gpio";
196 reg = <0x53f84000 0x4000>; 230 reg = <0x53f84000 0x4000>;
@@ -267,6 +301,24 @@
267 MX53_PAD_KEY_ROW1__AUDMUX_AUD5_RXD 0x80000000 301 MX53_PAD_KEY_ROW1__AUDMUX_AUD5_RXD 0x80000000
268 >; 302 >;
269 }; 303 };
304
305 pinctrl_audmux_2: audmuxgrp-2 {
306 fsl,pins = <
307 MX53_PAD_SD2_DATA3__AUDMUX_AUD4_TXC 0x80000000
308 MX53_PAD_SD2_DATA2__AUDMUX_AUD4_TXD 0x80000000
309 MX53_PAD_SD2_DATA1__AUDMUX_AUD4_TXFS 0x80000000
310 MX53_PAD_SD2_DATA0__AUDMUX_AUD4_RXD 0x80000000
311 >;
312 };
313
314 pinctrl_audmux_3: audmuxgrp-3 {
315 fsl,pins = <
316 MX53_PAD_CSI0_DAT4__AUDMUX_AUD3_TXC 0x80000000
317 MX53_PAD_CSI0_DAT5__AUDMUX_AUD3_TXD 0x80000000
318 MX53_PAD_CSI0_DAT6__AUDMUX_AUD3_TXFS 0x80000000
319 MX53_PAD_CSI0_DAT7__AUDMUX_AUD3_RXD 0x80000000
320 >;
321 };
270 }; 322 };
271 323
272 fec { 324 fec {
@@ -284,6 +336,29 @@
284 MX53_PAD_FEC_TXD0__FEC_TDATA_0 0x80000000 336 MX53_PAD_FEC_TXD0__FEC_TDATA_0 0x80000000
285 >; 337 >;
286 }; 338 };
339
340 pinctrl_fec_2: fecgrp-2 {
341 fsl,pins = <
342 MX53_PAD_FEC_MDC__FEC_MDC 0x80000000
343 MX53_PAD_FEC_MDIO__FEC_MDIO 0x80000000
344 MX53_PAD_FEC_REF_CLK__FEC_TX_CLK 0x80000000
345 MX53_PAD_FEC_RX_ER__FEC_RX_ER 0x80000000
346 MX53_PAD_FEC_CRS_DV__FEC_RX_DV 0x80000000
347 MX53_PAD_FEC_RXD1__FEC_RDATA_1 0x80000000
348 MX53_PAD_FEC_RXD0__FEC_RDATA_0 0x80000000
349 MX53_PAD_FEC_TX_EN__FEC_TX_EN 0x80000000
350 MX53_PAD_FEC_TXD1__FEC_TDATA_1 0x80000000
351 MX53_PAD_FEC_TXD0__FEC_TDATA_0 0x80000000
352 MX53_PAD_KEY_ROW1__FEC_COL 0x80000000
353 MX53_PAD_KEY_COL3__FEC_CRS 0x80000000
354 MX53_PAD_KEY_COL2__FEC_RDATA_2 0x80000000
355 MX53_PAD_KEY_COL0__FEC_RDATA_3 0x80000000
356 MX53_PAD_KEY_COL1__FEC_RX_CLK 0x80000000
357 MX53_PAD_KEY_ROW2__FEC_TDATA_2 0x80000000
358 MX53_PAD_GPIO_19__FEC_TDATA_3 0x80000000
359 MX53_PAD_KEY_ROW0__FEC_TX_ER 0x80000000
360 >;
361 };
287 }; 362 };
288 363
289 csi { 364 csi {
@@ -312,6 +387,22 @@
312 MX53_PAD_CSI0_PIXCLK__IPU_CSI0_PIXCLK 0x1d5 387 MX53_PAD_CSI0_PIXCLK__IPU_CSI0_PIXCLK 0x1d5
313 >; 388 >;
314 }; 389 };
390
391 pinctrl_csi_2: csigrp-2 {
392 fsl,pins = <
393 MX53_PAD_CSI0_VSYNC__IPU_CSI0_VSYNC 0x1d5
394 MX53_PAD_CSI0_MCLK__IPU_CSI0_HSYNC 0x1d5
395 MX53_PAD_CSI0_PIXCLK__IPU_CSI0_PIXCLK 0x1d5
396 MX53_PAD_CSI0_DAT19__IPU_CSI0_D_19 0x1d5
397 MX53_PAD_CSI0_DAT18__IPU_CSI0_D_18 0x1d5
398 MX53_PAD_CSI0_DAT17__IPU_CSI0_D_17 0x1d5
399 MX53_PAD_CSI0_DAT16__IPU_CSI0_D_16 0x1d5
400 MX53_PAD_CSI0_DAT15__IPU_CSI0_D_15 0x1d5
401 MX53_PAD_CSI0_DAT14__IPU_CSI0_D_14 0x1d5
402 MX53_PAD_CSI0_DAT13__IPU_CSI0_D_13 0x1d5
403 MX53_PAD_CSI0_DAT12__IPU_CSI0_D_12 0x1d5
404 >;
405 };
315 }; 406 };
316 407
317 cspi { 408 cspi {
@@ -322,6 +413,14 @@
322 MX53_PAD_SD1_CLK__CSPI_SCLK 0x1d5 413 MX53_PAD_SD1_CLK__CSPI_SCLK 0x1d5
323 >; 414 >;
324 }; 415 };
416
417 pinctrl_cspi_2: cspigrp-2 {
418 fsl,pins = <
419 MX53_PAD_EIM_D22__CSPI_MISO 0x1d5
420 MX53_PAD_EIM_D28__CSPI_MOSI 0x1d5
421 MX53_PAD_EIM_D21__CSPI_SCLK 0x1d5
422 >;
423 };
325 }; 424 };
326 425
327 ecspi1 { 426 ecspi1 {
@@ -332,6 +431,27 @@
332 MX53_PAD_EIM_D18__ECSPI1_MOSI 0x80000000 431 MX53_PAD_EIM_D18__ECSPI1_MOSI 0x80000000
333 >; 432 >;
334 }; 433 };
434
435 pinctrl_ecspi1_2: ecspi1grp-2 {
436 fsl,pins = <
437 MX53_PAD_GPIO_19__ECSPI1_RDY 0x80000000
438 MX53_PAD_EIM_EB2__ECSPI1_SS0 0x80000000
439 MX53_PAD_EIM_D16__ECSPI1_SCLK 0x80000000
440 MX53_PAD_EIM_D17__ECSPI1_MISO 0x80000000
441 MX53_PAD_EIM_D18__ECSPI1_MOSI 0x80000000
442 MX53_PAD_EIM_D19__ECSPI1_SS1 0x80000000
443 >;
444 };
445 };
446
447 ecspi2 {
448 pinctrl_ecspi2_1: ecspi2grp-1 {
449 fsl,pins = <
450 MX53_PAD_EIM_OE__ECSPI2_MISO 0x80000000
451 MX53_PAD_EIM_CS1__ECSPI2_MOSI 0x80000000
452 MX53_PAD_EIM_CS0__ECSPI2_SCLK 0x80000000
453 >;
454 };
335 }; 455 };
336 456
337 esdhc1 { 457 esdhc1 {
@@ -406,6 +526,13 @@
406 MX53_PAD_KEY_ROW2__CAN1_RXCAN 0x80000000 526 MX53_PAD_KEY_ROW2__CAN1_RXCAN 0x80000000
407 >; 527 >;
408 }; 528 };
529
530 pinctrl_can1_3: can1grp-3 {
531 fsl,pins = <
532 MX53_PAD_GPIO_7__CAN1_TXCAN 0x80000000
533 MX53_PAD_GPIO_8__CAN1_RXCAN 0x80000000
534 >;
535 };
409 }; 536 };
410 537
411 can2 { 538 can2 {
@@ -424,6 +551,13 @@
424 MX53_PAD_CSI0_DAT9__I2C1_SCL 0xc0000000 551 MX53_PAD_CSI0_DAT9__I2C1_SCL 0xc0000000
425 >; 552 >;
426 }; 553 };
554
555 pinctrl_i2c1_2: i2c1grp-2 {
556 fsl,pins = <
557 MX53_PAD_EIM_D21__I2C1_SCL 0xc0000000
558 MX53_PAD_EIM_D28__I2C1_SDA 0xc0000000
559 >;
560 };
427 }; 561 };
428 562
429 i2c2 { 563 i2c2 {
@@ -433,6 +567,13 @@
433 MX53_PAD_KEY_COL3__I2C2_SCL 0xc0000000 567 MX53_PAD_KEY_COL3__I2C2_SCL 0xc0000000
434 >; 568 >;
435 }; 569 };
570
571 pinctrl_i2c2_2: i2c2grp-2 {
572 fsl,pins = <
573 MX53_PAD_EIM_D16__I2C2_SDA 0xc0000000
574 MX53_PAD_EIM_EB2__I2C2_SCL 0xc0000000
575 >;
576 };
436 }; 577 };
437 578
438 i2c3 { 579 i2c3 {
@@ -444,6 +585,119 @@
444 }; 585 };
445 }; 586 };
446 587
588 ipu_disp0 {
589 pinctrl_ipu_disp0_1: ipudisp0grp-1 {
590 fsl,pins = <
591 MX53_PAD_DI0_DISP_CLK__IPU_DI0_DISP_CLK 0x5
592 MX53_PAD_DI0_PIN15__IPU_DI0_PIN15 0x5
593 MX53_PAD_DI0_PIN2__IPU_DI0_PIN2 0x5
594 MX53_PAD_DI0_PIN3__IPU_DI0_PIN3 0x5
595 MX53_PAD_DISP0_DAT0__IPU_DISP0_DAT_0 0x5
596 MX53_PAD_DISP0_DAT1__IPU_DISP0_DAT_1 0x5
597 MX53_PAD_DISP0_DAT2__IPU_DISP0_DAT_2 0x5
598 MX53_PAD_DISP0_DAT3__IPU_DISP0_DAT_3 0x5
599 MX53_PAD_DISP0_DAT4__IPU_DISP0_DAT_4 0x5
600 MX53_PAD_DISP0_DAT5__IPU_DISP0_DAT_5 0x5
601 MX53_PAD_DISP0_DAT6__IPU_DISP0_DAT_6 0x5
602 MX53_PAD_DISP0_DAT7__IPU_DISP0_DAT_7 0x5
603 MX53_PAD_DISP0_DAT8__IPU_DISP0_DAT_8 0x5
604 MX53_PAD_DISP0_DAT9__IPU_DISP0_DAT_9 0x5
605 MX53_PAD_DISP0_DAT10__IPU_DISP0_DAT_10 0x5
606 MX53_PAD_DISP0_DAT11__IPU_DISP0_DAT_11 0x5
607 MX53_PAD_DISP0_DAT12__IPU_DISP0_DAT_12 0x5
608 MX53_PAD_DISP0_DAT13__IPU_DISP0_DAT_13 0x5
609 MX53_PAD_DISP0_DAT14__IPU_DISP0_DAT_14 0x5
610 MX53_PAD_DISP0_DAT15__IPU_DISP0_DAT_15 0x5
611 MX53_PAD_DISP0_DAT16__IPU_DISP0_DAT_16 0x5
612 MX53_PAD_DISP0_DAT17__IPU_DISP0_DAT_17 0x5
613 MX53_PAD_DISP0_DAT18__IPU_DISP0_DAT_18 0x5
614 MX53_PAD_DISP0_DAT19__IPU_DISP0_DAT_19 0x5
615 MX53_PAD_DISP0_DAT20__IPU_DISP0_DAT_20 0x5
616 MX53_PAD_DISP0_DAT21__IPU_DISP0_DAT_21 0x5
617 MX53_PAD_DISP0_DAT22__IPU_DISP0_DAT_22 0x5
618 MX53_PAD_DISP0_DAT23__IPU_DISP0_DAT_23 0x5
619 >;
620 };
621 };
622
623 ipu_disp1 {
624 pinctrl_ipu_disp1_1: ipudisp1grp-1 {
625 fsl,pins = <
626 MX53_PAD_EIM_DA9__IPU_DISP1_DAT_0 0x5
627 MX53_PAD_EIM_DA8__IPU_DISP1_DAT_1 0x5
628 MX53_PAD_EIM_DA7__IPU_DISP1_DAT_2 0x5
629 MX53_PAD_EIM_DA6__IPU_DISP1_DAT_3 0x5
630 MX53_PAD_EIM_DA5__IPU_DISP1_DAT_4 0x5
631 MX53_PAD_EIM_DA4__IPU_DISP1_DAT_5 0x5
632 MX53_PAD_EIM_DA3__IPU_DISP1_DAT_6 0x5
633 MX53_PAD_EIM_DA2__IPU_DISP1_DAT_7 0x5
634 MX53_PAD_EIM_DA1__IPU_DISP1_DAT_8 0x5
635 MX53_PAD_EIM_DA0__IPU_DISP1_DAT_9 0x5
636 MX53_PAD_EIM_EB1__IPU_DISP1_DAT_10 0x5
637 MX53_PAD_EIM_EB0__IPU_DISP1_DAT_11 0x5
638 MX53_PAD_EIM_A17__IPU_DISP1_DAT_12 0x5
639 MX53_PAD_EIM_A18__IPU_DISP1_DAT_13 0x5
640 MX53_PAD_EIM_A19__IPU_DISP1_DAT_14 0x5
641 MX53_PAD_EIM_A20__IPU_DISP1_DAT_15 0x5
642 MX53_PAD_EIM_A21__IPU_DISP1_DAT_16 0x5
643 MX53_PAD_EIM_A22__IPU_DISP1_DAT_17 0x5
644 MX53_PAD_EIM_A23__IPU_DISP1_DAT_18 0x5
645 MX53_PAD_EIM_A24__IPU_DISP1_DAT_19 0x5
646 MX53_PAD_EIM_D31__IPU_DISP1_DAT_20 0x5
647 MX53_PAD_EIM_D30__IPU_DISP1_DAT_21 0x5
648 MX53_PAD_EIM_D26__IPU_DISP1_DAT_22 0x5
649 MX53_PAD_EIM_D27__IPU_DISP1_DAT_23 0x5
650 MX53_PAD_EIM_A16__IPU_DI1_DISP_CLK 0x5
651 MX53_PAD_EIM_DA13__IPU_DI1_D0_CS 0x5
652 MX53_PAD_EIM_DA14__IPU_DI1_D1_CS 0x5
653 MX53_PAD_EIM_DA15__IPU_DI1_PIN1 0x5
654 MX53_PAD_EIM_DA11__IPU_DI1_PIN2 0x5
655 MX53_PAD_EIM_DA12__IPU_DI1_PIN3 0x5
656 MX53_PAD_EIM_A25__IPU_DI1_PIN12 0x5
657 MX53_PAD_EIM_DA10__IPU_DI1_PIN15 0x5
658 >;
659 };
660 };
661
662 ipu_disp2 {
663 pinctrl_ipu_disp2_1: ipudisp2grp-1 {
664 fsl,pins = <
665 MX53_PAD_LVDS0_TX0_P__LDB_LVDS0_TX0 0x80000000
666 MX53_PAD_LVDS0_TX1_P__LDB_LVDS0_TX1 0x80000000
667 MX53_PAD_LVDS0_TX2_P__LDB_LVDS0_TX2 0x80000000
668 MX53_PAD_LVDS0_TX3_P__LDB_LVDS0_TX3 0x80000000
669 MX53_PAD_LVDS0_CLK_P__LDB_LVDS0_CLK 0x80000000
670 MX53_PAD_LVDS1_TX0_P__LDB_LVDS1_TX0 0x80000000
671 MX53_PAD_LVDS1_TX1_P__LDB_LVDS1_TX1 0x80000000
672 MX53_PAD_LVDS1_TX2_P__LDB_LVDS1_TX2 0x80000000
673 MX53_PAD_LVDS1_TX3_P__LDB_LVDS1_TX3 0x80000000
674 MX53_PAD_LVDS1_CLK_P__LDB_LVDS1_CLK 0x80000000
675 >;
676 };
677 };
678
679 nand {
680 pinctrl_nand_1: nandgrp-1 {
681 fsl,pins = <
682 MX53_PAD_NANDF_WE_B__EMI_NANDF_WE_B 0x4
683 MX53_PAD_NANDF_RE_B__EMI_NANDF_RE_B 0x4
684 MX53_PAD_NANDF_CLE__EMI_NANDF_CLE 0x4
685 MX53_PAD_NANDF_ALE__EMI_NANDF_ALE 0x4
686 MX53_PAD_NANDF_WP_B__EMI_NANDF_WP_B 0xe0
687 MX53_PAD_NANDF_RB0__EMI_NANDF_RB_0 0xe0
688 MX53_PAD_NANDF_CS0__EMI_NANDF_CS_0 0x4
689 MX53_PAD_PATA_DATA0__EMI_NANDF_D_0 0xa4
690 MX53_PAD_PATA_DATA1__EMI_NANDF_D_1 0xa4
691 MX53_PAD_PATA_DATA2__EMI_NANDF_D_2 0xa4
692 MX53_PAD_PATA_DATA3__EMI_NANDF_D_3 0xa4
693 MX53_PAD_PATA_DATA4__EMI_NANDF_D_4 0xa4
694 MX53_PAD_PATA_DATA5__EMI_NANDF_D_5 0xa4
695 MX53_PAD_PATA_DATA6__EMI_NANDF_D_6 0xa4
696 MX53_PAD_PATA_DATA7__EMI_NANDF_D_7 0xa4
697 >;
698 };
699 };
700
447 owire { 701 owire {
448 pinctrl_owire_1: owiregrp-1 { 702 pinctrl_owire_1: owiregrp-1 {
449 fsl,pins = < 703 fsl,pins = <
@@ -452,18 +706,41 @@
452 }; 706 };
453 }; 707 };
454 708
709 pwm1 {
710 pinctrl_pwm1_1: pwm1grp-1 {
711 fsl,pins = <
712 MX53_PAD_DISP0_DAT8__PWM1_PWMO 0x5
713 >;
714 };
715 };
716
717 pwm2 {
718 pinctrl_pwm2_1: pwm2grp-1 {
719 fsl,pins = <
720 MX53_PAD_GPIO_1__PWM2_PWMO 0x80000000
721 >;
722 };
723 };
724
455 uart1 { 725 uart1 {
456 pinctrl_uart1_1: uart1grp-1 { 726 pinctrl_uart1_1: uart1grp-1 {
457 fsl,pins = < 727 fsl,pins = <
458 MX53_PAD_CSI0_DAT10__UART1_TXD_MUX 0x1c5 728 MX53_PAD_CSI0_DAT10__UART1_TXD_MUX 0x1e4
459 MX53_PAD_CSI0_DAT11__UART1_RXD_MUX 0x1c5 729 MX53_PAD_CSI0_DAT11__UART1_RXD_MUX 0x1e4
460 >; 730 >;
461 }; 731 };
462 732
463 pinctrl_uart1_2: uart1grp-2 { 733 pinctrl_uart1_2: uart1grp-2 {
464 fsl,pins = < 734 fsl,pins = <
465 MX53_PAD_PATA_DIOW__UART1_TXD_MUX 0x1c5 735 MX53_PAD_PATA_DIOW__UART1_TXD_MUX 0x1e4
466 MX53_PAD_PATA_DMACK__UART1_RXD_MUX 0x1c5 736 MX53_PAD_PATA_DMACK__UART1_RXD_MUX 0x1e4
737 >;
738 };
739
740 pinctrl_uart1_3: uart1grp-3 {
741 fsl,pins = <
742 MX53_PAD_PATA_RESET_B__UART1_CTS 0x1c5
743 MX53_PAD_PATA_IORDY__UART1_RTS 0x1c5
467 >; 744 >;
468 }; 745 };
469 }; 746 };
@@ -471,8 +748,17 @@
471 uart2 { 748 uart2 {
472 pinctrl_uart2_1: uart2grp-1 { 749 pinctrl_uart2_1: uart2grp-1 {
473 fsl,pins = < 750 fsl,pins = <
474 MX53_PAD_PATA_BUFFER_EN__UART2_RXD_MUX 0x1c5 751 MX53_PAD_PATA_BUFFER_EN__UART2_RXD_MUX 0x1e4
475 MX53_PAD_PATA_DMARQ__UART2_TXD_MUX 0x1c5 752 MX53_PAD_PATA_DMARQ__UART2_TXD_MUX 0x1e4
753 >;
754 };
755
756 pinctrl_uart2_2: uart2grp-2 {
757 fsl,pins = <
758 MX53_PAD_PATA_BUFFER_EN__UART2_RXD_MUX 0x1c5
759 MX53_PAD_PATA_DMARQ__UART2_TXD_MUX 0x1c5
760 MX53_PAD_PATA_DIOR__UART2_RTS 0x1c5
761 MX53_PAD_PATA_INTRQ__UART2_CTS 0x1c5
476 >; 762 >;
477 }; 763 };
478 }; 764 };
@@ -480,17 +766,17 @@
480 uart3 { 766 uart3 {
481 pinctrl_uart3_1: uart3grp-1 { 767 pinctrl_uart3_1: uart3grp-1 {
482 fsl,pins = < 768 fsl,pins = <
483 MX53_PAD_PATA_CS_0__UART3_TXD_MUX 0x1c5 769 MX53_PAD_PATA_CS_0__UART3_TXD_MUX 0x1e4
484 MX53_PAD_PATA_CS_1__UART3_RXD_MUX 0x1c5 770 MX53_PAD_PATA_CS_1__UART3_RXD_MUX 0x1e4
485 MX53_PAD_PATA_DA_1__UART3_CTS 0x1c5 771 MX53_PAD_PATA_DA_1__UART3_CTS 0x1e4
486 MX53_PAD_PATA_DA_2__UART3_RTS 0x1c5 772 MX53_PAD_PATA_DA_2__UART3_RTS 0x1e4
487 >; 773 >;
488 }; 774 };
489 775
490 pinctrl_uart3_2: uart3grp-2 { 776 pinctrl_uart3_2: uart3grp-2 {
491 fsl,pins = < 777 fsl,pins = <
492 MX53_PAD_PATA_CS_0__UART3_TXD_MUX 0x1c5 778 MX53_PAD_PATA_CS_0__UART3_TXD_MUX 0x1e4
493 MX53_PAD_PATA_CS_1__UART3_RXD_MUX 0x1c5 779 MX53_PAD_PATA_CS_1__UART3_RXD_MUX 0x1e4
494 >; 780 >;
495 }; 781 };
496 782
@@ -499,8 +785,8 @@
499 uart4 { 785 uart4 {
500 pinctrl_uart4_1: uart4grp-1 { 786 pinctrl_uart4_1: uart4grp-1 {
501 fsl,pins = < 787 fsl,pins = <
502 MX53_PAD_KEY_COL0__UART4_TXD_MUX 0x1c5 788 MX53_PAD_KEY_COL0__UART4_TXD_MUX 0x1e4
503 MX53_PAD_KEY_ROW0__UART4_RXD_MUX 0x1c5 789 MX53_PAD_KEY_ROW0__UART4_RXD_MUX 0x1e4
504 >; 790 >;
505 }; 791 };
506 }; 792 };
@@ -508,12 +794,11 @@
508 uart5 { 794 uart5 {
509 pinctrl_uart5_1: uart5grp-1 { 795 pinctrl_uart5_1: uart5grp-1 {
510 fsl,pins = < 796 fsl,pins = <
511 MX53_PAD_KEY_COL1__UART5_TXD_MUX 0x1c5 797 MX53_PAD_KEY_COL1__UART5_TXD_MUX 0x1e4
512 MX53_PAD_KEY_ROW1__UART5_RXD_MUX 0x1c5 798 MX53_PAD_KEY_ROW1__UART5_RXD_MUX 0x1e4
513 >; 799 >;
514 }; 800 };
515 }; 801 };
516
517 }; 802 };
518 803
519 gpr: iomuxc-gpr@53fa8000 { 804 gpr: iomuxc-gpr@53fa8000 {
@@ -781,6 +1066,16 @@
781 clock-names = "ipg", "ahb", "ptp"; 1066 clock-names = "ipg", "ahb", "ptp";
782 status = "disabled"; 1067 status = "disabled";
783 }; 1068 };
1069
1070 tve: tve@63ff0000 {
1071 compatible = "fsl,imx53-tve";
1072 reg = <0x63ff0000 0x1000>;
1073 interrupts = <92>;
1074 clocks = <&clks 69>, <&clks 116>;
1075 clock-names = "tve", "di_sel";
1076 crtcs = <&ipu 1>;
1077 status = "disabled";
1078 };
784 }; 1079 };
785 }; 1080 };
786}; 1081};
diff --git a/arch/arm/boot/dts/imx6dl-sabreauto.dts b/arch/arm/boot/dts/imx6dl-sabreauto.dts
index 7adcec360213..95da71185a4a 100644
--- a/arch/arm/boot/dts/imx6dl-sabreauto.dts
+++ b/arch/arm/boot/dts/imx6dl-sabreauto.dts
@@ -28,4 +28,12 @@
28 >; 28 >;
29 }; 29 };
30 }; 30 };
31
32 ecspi1 {
33 pinctrl_ecspi1_sabreauto: ecspi1-sabreauto {
34 fsl,pins = <
35 MX6DL_PAD_EIM_D19__GPIO3_IO19 0x80000000
36 >;
37 };
38 };
31}; 39};
diff --git a/arch/arm/boot/dts/imx6dl-sabresd.dts b/arch/arm/boot/dts/imx6dl-sabresd.dts
index 7efb05db4783..8989df2b89e5 100644
--- a/arch/arm/boot/dts/imx6dl-sabresd.dts
+++ b/arch/arm/boot/dts/imx6dl-sabresd.dts
@@ -29,6 +29,7 @@
29 MX6DL_PAD_NANDF_D1__GPIO2_IO01 0x80000000 29 MX6DL_PAD_NANDF_D1__GPIO2_IO01 0x80000000
30 MX6DL_PAD_NANDF_D2__GPIO2_IO02 0x80000000 30 MX6DL_PAD_NANDF_D2__GPIO2_IO02 0x80000000
31 MX6DL_PAD_NANDF_D3__GPIO2_IO03 0x80000000 31 MX6DL_PAD_NANDF_D3__GPIO2_IO03 0x80000000
32 MX6DL_PAD_GPIO_0__CCM_CLKO1 0x130b0
32 >; 33 >;
33 }; 34 };
34 }; 35 };
diff --git a/arch/arm/boot/dts/imx6dl.dtsi b/arch/arm/boot/dts/imx6dl.dtsi
index 5bcdf3a90bb3..2b3ecd679350 100644
--- a/arch/arm/boot/dts/imx6dl.dtsi
+++ b/arch/arm/boot/dts/imx6dl.dtsi
@@ -18,12 +18,14 @@
18 18
19 cpu@0 { 19 cpu@0 {
20 compatible = "arm,cortex-a9"; 20 compatible = "arm,cortex-a9";
21 device_type = "cpu";
21 reg = <0>; 22 reg = <0>;
22 next-level-cache = <&L2>; 23 next-level-cache = <&L2>;
23 }; 24 };
24 25
25 cpu@1 { 26 cpu@1 {
26 compatible = "arm,cortex-a9"; 27 compatible = "arm,cortex-a9";
28 device_type = "cpu";
27 reg = <1>; 29 reg = <1>;
28 next-level-cache = <&L2>; 30 next-level-cache = <&L2>;
29 }; 31 };
@@ -35,6 +37,27 @@
35 compatible = "fsl,imx6dl-iomuxc"; 37 compatible = "fsl,imx6dl-iomuxc";
36 reg = <0x020e0000 0x4000>; 38 reg = <0x020e0000 0x4000>;
37 39
40 audmux {
41 pinctrl_audmux_2: audmux-2 {
42 fsl,pins = <
43 MX6DL_PAD_CSI0_DAT7__AUD3_RXD 0x80000000
44 MX6DL_PAD_CSI0_DAT4__AUD3_TXC 0x80000000
45 MX6DL_PAD_CSI0_DAT5__AUD3_TXD 0x80000000
46 MX6DL_PAD_CSI0_DAT6__AUD3_TXFS 0x80000000
47 >;
48 };
49 };
50
51 ecspi1 {
52 pinctrl_ecspi1_1: ecspi1grp-1 {
53 fsl,pins = <
54 MX6DL_PAD_EIM_D17__ECSPI1_MISO 0x100b1
55 MX6DL_PAD_EIM_D18__ECSPI1_MOSI 0x100b1
56 MX6DL_PAD_EIM_D16__ECSPI1_SCLK 0x100b1
57 >;
58 };
59 };
60
38 enet { 61 enet {
39 pinctrl_enet_1: enetgrp-1 { 62 pinctrl_enet_1: enetgrp-1 {
40 fsl,pins = < 63 fsl,pins = <
@@ -78,6 +101,39 @@
78 }; 101 };
79 }; 102 };
80 103
104 gpmi-nand {
105 pinctrl_gpmi_nand_1: gpmi-nand-1 {
106 fsl,pins = <
107 MX6DL_PAD_NANDF_CLE__NAND_CLE 0xb0b1
108 MX6DL_PAD_NANDF_ALE__NAND_ALE 0xb0b1
109 MX6DL_PAD_NANDF_WP_B__NAND_WP_B 0xb0b1
110 MX6DL_PAD_NANDF_RB0__NAND_READY_B 0xb000
111 MX6DL_PAD_NANDF_CS0__NAND_CE0_B 0xb0b1
112 MX6DL_PAD_NANDF_CS1__NAND_CE1_B 0xb0b1
113 MX6DL_PAD_SD4_CMD__NAND_RE_B 0xb0b1
114 MX6DL_PAD_SD4_CLK__NAND_WE_B 0xb0b1
115 MX6DL_PAD_NANDF_D0__NAND_DATA00 0xb0b1
116 MX6DL_PAD_NANDF_D1__NAND_DATA01 0xb0b1
117 MX6DL_PAD_NANDF_D2__NAND_DATA02 0xb0b1
118 MX6DL_PAD_NANDF_D3__NAND_DATA03 0xb0b1
119 MX6DL_PAD_NANDF_D4__NAND_DATA04 0xb0b1
120 MX6DL_PAD_NANDF_D5__NAND_DATA05 0xb0b1
121 MX6DL_PAD_NANDF_D6__NAND_DATA06 0xb0b1
122 MX6DL_PAD_NANDF_D7__NAND_DATA07 0xb0b1
123 MX6DL_PAD_SD4_DAT0__NAND_DQS 0x00b1
124 >;
125 };
126 };
127
128 i2c1 {
129 pinctrl_i2c1_2: i2c1grp-2 {
130 fsl,pins = <
131 MX6DL_PAD_CSI0_DAT8__I2C1_SDA 0x4001b8b1
132 MX6DL_PAD_CSI0_DAT9__I2C1_SCL 0x4001b8b1
133 >;
134 };
135 };
136
81 uart1 { 137 uart1 {
82 pinctrl_uart1_1: uart1grp-1 { 138 pinctrl_uart1_1: uart1grp-1 {
83 fsl,pins = < 139 fsl,pins = <
@@ -149,6 +205,64 @@
149 }; 205 };
150 }; 206 };
151 207
208 weim {
209 pinctrl_weim_cs0_1: weim_cs0grp-1 {
210 fsl,pins = <
211 MX6DL_PAD_EIM_CS0__EIM_CS0_B 0xb0b1
212 >;
213 };
214
215 pinctrl_weim_nor_1: weim_norgrp-1 {
216 fsl,pins = <
217 MX6DL_PAD_EIM_OE__EIM_OE_B 0xb0b1
218 MX6DL_PAD_EIM_RW__EIM_RW 0xb0b1
219 MX6DL_PAD_EIM_WAIT__EIM_WAIT_B 0xb060
220 /* data */
221 MX6DL_PAD_EIM_D16__EIM_DATA16 0x1b0b0
222 MX6DL_PAD_EIM_D17__EIM_DATA17 0x1b0b0
223 MX6DL_PAD_EIM_D18__EIM_DATA18 0x1b0b0
224 MX6DL_PAD_EIM_D19__EIM_DATA19 0x1b0b0
225 MX6DL_PAD_EIM_D20__EIM_DATA20 0x1b0b0
226 MX6DL_PAD_EIM_D21__EIM_DATA21 0x1b0b0
227 MX6DL_PAD_EIM_D22__EIM_DATA22 0x1b0b0
228 MX6DL_PAD_EIM_D23__EIM_DATA23 0x1b0b0
229 MX6DL_PAD_EIM_D24__EIM_DATA24 0x1b0b0
230 MX6DL_PAD_EIM_D25__EIM_DATA25 0x1b0b0
231 MX6DL_PAD_EIM_D26__EIM_DATA26 0x1b0b0
232 MX6DL_PAD_EIM_D27__EIM_DATA27 0x1b0b0
233 MX6DL_PAD_EIM_D28__EIM_DATA28 0x1b0b0
234 MX6DL_PAD_EIM_D29__EIM_DATA29 0x1b0b0
235 MX6DL_PAD_EIM_D30__EIM_DATA30 0x1b0b0
236 MX6DL_PAD_EIM_D31__EIM_DATA31 0x1b0b0
237 /* address */
238 MX6DL_PAD_EIM_A23__EIM_ADDR23 0xb0b1
239 MX6DL_PAD_EIM_A22__EIM_ADDR22 0xb0b1
240 MX6DL_PAD_EIM_A21__EIM_ADDR21 0xb0b1
241 MX6DL_PAD_EIM_A20__EIM_ADDR20 0xb0b1
242 MX6DL_PAD_EIM_A19__EIM_ADDR19 0xb0b1
243 MX6DL_PAD_EIM_A18__EIM_ADDR18 0xb0b1
244 MX6DL_PAD_EIM_A17__EIM_ADDR17 0xb0b1
245 MX6DL_PAD_EIM_A16__EIM_ADDR16 0xb0b1
246 MX6DL_PAD_EIM_DA15__EIM_AD15 0xb0b1
247 MX6DL_PAD_EIM_DA14__EIM_AD14 0xb0b1
248 MX6DL_PAD_EIM_DA13__EIM_AD13 0xb0b1
249 MX6DL_PAD_EIM_DA12__EIM_AD12 0xb0b1
250 MX6DL_PAD_EIM_DA11__EIM_AD11 0xb0b1
251 MX6DL_PAD_EIM_DA10__EIM_AD10 0xb0b1
252 MX6DL_PAD_EIM_DA9__EIM_AD09 0xb0b1
253 MX6DL_PAD_EIM_DA8__EIM_AD08 0xb0b1
254 MX6DL_PAD_EIM_DA7__EIM_AD07 0xb0b1
255 MX6DL_PAD_EIM_DA6__EIM_AD06 0xb0b1
256 MX6DL_PAD_EIM_DA5__EIM_AD05 0xb0b1
257 MX6DL_PAD_EIM_DA4__EIM_AD04 0xb0b1
258 MX6DL_PAD_EIM_DA3__EIM_AD03 0xb0b1
259 MX6DL_PAD_EIM_DA2__EIM_AD02 0xb0b1
260 MX6DL_PAD_EIM_DA1__EIM_AD01 0xb0b1
261 MX6DL_PAD_EIM_DA0__EIM_AD00 0xb0b1
262 >;
263 };
264
265 };
152 266
153 }; 267 };
154 268
diff --git a/arch/arm/boot/dts/imx6q-phytec-pbab01.dts b/arch/arm/boot/dts/imx6q-phytec-pbab01.dts
new file mode 100644
index 000000000000..7d37ec60d58d
--- /dev/null
+++ b/arch/arm/boot/dts/imx6q-phytec-pbab01.dts
@@ -0,0 +1,34 @@
1/*
2 * Copyright 2013 Christian Hemp, Phytec Messtechnik GmbH
3 *
4 * The code contained herein is licensed under the GNU General Public
5 * License. You may obtain a copy of the GNU General Public License
6 * Version 2 or later at the following locations:
7 *
8 * http://www.opensource.org/licenses/gpl-license.html
9 * http://www.gnu.org/copyleft/gpl.html
10 */
11
12/dts-v1/;
13#include "imx6q-phytec-pfla02.dtsi"
14
15/ {
16 model = "Phytec phyFLEX-i.MX6 Quad Carrier-Board";
17 compatible = "phytec,imx6q-pbab01", "phytec,imx6q-pfla02", "fsl,imx6q";
18};
19
20&fec {
21 status = "okay";
22};
23
24&uart4 {
25 status = "okay";
26};
27
28&usdhc2 {
29 status = "okay";
30};
31
32&usdhc3 {
33 status = "okay";
34};
diff --git a/arch/arm/boot/dts/imx6q-phytec-pfla02.dtsi b/arch/arm/boot/dts/imx6q-phytec-pfla02.dtsi
new file mode 100644
index 000000000000..f5e1981025ed
--- /dev/null
+++ b/arch/arm/boot/dts/imx6q-phytec-pfla02.dtsi
@@ -0,0 +1,74 @@
1/*
2 * Copyright 2013 Christian Hemp, Phytec Messtechnik GmbH
3 *
4 * The code contained herein is licensed under the GNU General Public
5 * License. You may obtain a copy of the GNU General Public License
6 * Version 2 or later at the following locations:
7 *
8 * http://www.opensource.org/licenses/gpl-license.html
9 * http://www.gnu.org/copyleft/gpl.html
10 */
11
12#include "imx6q.dtsi"
13
14/ {
15 model = "Phytec phyFLEX-i.MX6 Ouad";
16 compatible = "phytec,imx6q-pfla02", "fsl,imx6q";
17
18 memory {
19 reg = <0x10000000 0x80000000>;
20 };
21};
22
23&iomuxc {
24 pinctrl-names = "default";
25 pinctrl-0 = <&pinctrl_hog>;
26
27 hog {
28 pinctrl_hog: hoggrp {
29 fsl,pins = <
30 MX6Q_PAD_EIM_D23__GPIO3_IO23 0x80000000
31 >;
32 };
33 };
34
35 pfla02 {
36 pinctrl_usdhc3_pfla02: usdhc3grp-pfla02 {
37 fsl,pins = <
38 MX6Q_PAD_ENET_RXD0__GPIO1_IO27 0x80000000
39 MX6Q_PAD_ENET_TXD1__GPIO1_IO29 0x80000000
40 >;
41 };
42 };
43};
44
45&fec {
46 pinctrl-names = "default";
47 pinctrl-0 = <&pinctrl_enet_3>;
48 phy-mode = "rgmii";
49 phy-reset-gpios = <&gpio3 23 0>;
50 status = "disabled";
51};
52
53&uart4 {
54 pinctrl-names = "default";
55 pinctrl-0 = <&pinctrl_uart4_1>;
56 status = "disabled";
57};
58
59&usdhc2 {
60 pinctrl-names = "default";
61 pinctrl-0 = <&pinctrl_usdhc2_2>;
62 cd-gpios = <&gpio1 4 0>;
63 wp-gpios = <&gpio1 2 0>;
64 status = "disabled";
65};
66
67&usdhc3 {
68 pinctrl-names = "default";
69 pinctrl-0 = <&pinctrl_usdhc3_2
70 &pinctrl_usdhc3_pfla02>;
71 cd-gpios = <&gpio1 27 0>;
72 wp-gpios = <&gpio1 29 0>;
73 status = "disabled";
74};
diff --git a/arch/arm/boot/dts/imx6q-sabreauto.dts b/arch/arm/boot/dts/imx6q-sabreauto.dts
index 49d6f2831ec9..09a75807bc6d 100644
--- a/arch/arm/boot/dts/imx6q-sabreauto.dts
+++ b/arch/arm/boot/dts/imx6q-sabreauto.dts
@@ -32,4 +32,12 @@
32 >; 32 >;
33 }; 33 };
34 }; 34 };
35
36 ecspi1 {
37 pinctrl_ecspi1_sabreauto: ecspi1-sabreauto {
38 fsl,pins = <
39 MX6Q_PAD_EIM_D19__GPIO3_IO19 0x80000000
40 >;
41 };
42 };
35}; 43};
diff --git a/arch/arm/boot/dts/imx6q-sabresd.dts b/arch/arm/boot/dts/imx6q-sabresd.dts
index 442051350225..0038228c508c 100644
--- a/arch/arm/boot/dts/imx6q-sabresd.dts
+++ b/arch/arm/boot/dts/imx6q-sabresd.dts
@@ -33,6 +33,7 @@
33 MX6Q_PAD_NANDF_D1__GPIO2_IO01 0x80000000 33 MX6Q_PAD_NANDF_D1__GPIO2_IO01 0x80000000
34 MX6Q_PAD_NANDF_D2__GPIO2_IO02 0x80000000 34 MX6Q_PAD_NANDF_D2__GPIO2_IO02 0x80000000
35 MX6Q_PAD_NANDF_D3__GPIO2_IO03 0x80000000 35 MX6Q_PAD_NANDF_D3__GPIO2_IO03 0x80000000
36 MX6Q_PAD_GPIO_0__CCM_CLKO1 0x130b0
36 >; 37 >;
37 }; 38 };
38 }; 39 };
diff --git a/arch/arm/boot/dts/imx6q.dtsi b/arch/arm/boot/dts/imx6q.dtsi
index 21e675848bd1..ba09dc32324e 100644
--- a/arch/arm/boot/dts/imx6q.dtsi
+++ b/arch/arm/boot/dts/imx6q.dtsi
@@ -18,6 +18,7 @@
18 18
19 cpu@0 { 19 cpu@0 {
20 compatible = "arm,cortex-a9"; 20 compatible = "arm,cortex-a9";
21 device_type = "cpu";
21 reg = <0>; 22 reg = <0>;
22 next-level-cache = <&L2>; 23 next-level-cache = <&L2>;
23 operating-points = < 24 operating-points = <
@@ -39,18 +40,21 @@
39 40
40 cpu@1 { 41 cpu@1 {
41 compatible = "arm,cortex-a9"; 42 compatible = "arm,cortex-a9";
43 device_type = "cpu";
42 reg = <1>; 44 reg = <1>;
43 next-level-cache = <&L2>; 45 next-level-cache = <&L2>;
44 }; 46 };
45 47
46 cpu@2 { 48 cpu@2 {
47 compatible = "arm,cortex-a9"; 49 compatible = "arm,cortex-a9";
50 device_type = "cpu";
48 reg = <2>; 51 reg = <2>;
49 next-level-cache = <&L2>; 52 next-level-cache = <&L2>;
50 }; 53 };
51 54
52 cpu@3 { 55 cpu@3 {
53 compatible = "arm,cortex-a9"; 56 compatible = "arm,cortex-a9";
57 device_type = "cpu";
54 reg = <3>; 58 reg = <3>;
55 next-level-cache = <&L2>; 59 next-level-cache = <&L2>;
56 }; 60 };
@@ -157,6 +161,27 @@
157 MX6Q_PAD_RGMII_RX_CTL__RGMII_RX_CTL 0x1b0b0 161 MX6Q_PAD_RGMII_RX_CTL__RGMII_RX_CTL 0x1b0b0
158 >; 162 >;
159 }; 163 };
164
165 pinctrl_enet_3: enetgrp-3 {
166 fsl,pins = <
167 MX6Q_PAD_ENET_MDIO__ENET_MDIO 0x1b0b0
168 MX6Q_PAD_ENET_MDC__ENET_MDC 0x1b0b0
169 MX6Q_PAD_RGMII_TXC__RGMII_TXC 0x1b0b0
170 MX6Q_PAD_RGMII_TD0__RGMII_TD0 0x1b0b0
171 MX6Q_PAD_RGMII_TD1__RGMII_TD1 0x1b0b0
172 MX6Q_PAD_RGMII_TD2__RGMII_TD2 0x1b0b0
173 MX6Q_PAD_RGMII_TD3__RGMII_TD3 0x1b0b0
174 MX6Q_PAD_RGMII_TX_CTL__RGMII_TX_CTL 0x1b0b0
175 MX6Q_PAD_ENET_REF_CLK__ENET_TX_CLK 0x1b0b0
176 MX6Q_PAD_RGMII_RXC__RGMII_RXC 0x1b0b0
177 MX6Q_PAD_RGMII_RD0__RGMII_RD0 0x1b0b0
178 MX6Q_PAD_RGMII_RD1__RGMII_RD1 0x1b0b0
179 MX6Q_PAD_RGMII_RD2__RGMII_RD2 0x1b0b0
180 MX6Q_PAD_RGMII_RD3__RGMII_RD3 0x1b0b0
181 MX6Q_PAD_RGMII_RX_CTL__RGMII_RX_CTL 0x1b0b0
182 MX6Q_PAD_ENET_TX_EN__ENET_TX_EN 0x1b0b0
183 >;
184 };
160 }; 185 };
161 186
162 gpmi-nand { 187 gpmi-nand {
@@ -168,8 +193,6 @@
168 MX6Q_PAD_NANDF_RB0__NAND_READY_B 0xb000 193 MX6Q_PAD_NANDF_RB0__NAND_READY_B 0xb000
169 MX6Q_PAD_NANDF_CS0__NAND_CE0_B 0xb0b1 194 MX6Q_PAD_NANDF_CS0__NAND_CE0_B 0xb0b1
170 MX6Q_PAD_NANDF_CS1__NAND_CE1_B 0xb0b1 195 MX6Q_PAD_NANDF_CS1__NAND_CE1_B 0xb0b1
171 MX6Q_PAD_NANDF_CS2__NAND_CE2_B 0xb0b1
172 MX6Q_PAD_NANDF_CS3__NAND_CE3_B 0xb0b1
173 MX6Q_PAD_SD4_CMD__NAND_RE_B 0xb0b1 196 MX6Q_PAD_SD4_CMD__NAND_RE_B 0xb0b1
174 MX6Q_PAD_SD4_CLK__NAND_WE_B 0xb0b1 197 MX6Q_PAD_SD4_CLK__NAND_WE_B 0xb0b1
175 MX6Q_PAD_NANDF_D0__NAND_DATA00 0xb0b1 198 MX6Q_PAD_NANDF_D0__NAND_DATA00 0xb0b1
@@ -192,6 +215,13 @@
192 MX6Q_PAD_EIM_D28__I2C1_SDA 0x4001b8b1 215 MX6Q_PAD_EIM_D28__I2C1_SDA 0x4001b8b1
193 >; 216 >;
194 }; 217 };
218
219 pinctrl_i2c1_2: i2c1grp-2 {
220 fsl,pins = <
221 MX6Q_PAD_CSI0_DAT8__I2C1_SDA 0x4001b8b1
222 MX6Q_PAD_CSI0_DAT9__I2C1_SCL 0x4001b8b1
223 >;
224 };
195 }; 225 };
196 226
197 i2c2 { 227 i2c2 {
@@ -268,6 +298,17 @@
268 MX6Q_PAD_NANDF_D7__SD2_DATA7 0x17059 298 MX6Q_PAD_NANDF_D7__SD2_DATA7 0x17059
269 >; 299 >;
270 }; 300 };
301
302 pinctrl_usdhc2_2: usdhc2grp-2 {
303 fsl,pins = <
304 MX6Q_PAD_SD2_CMD__SD2_CMD 0x17059
305 MX6Q_PAD_SD2_CLK__SD2_CLK 0x10059
306 MX6Q_PAD_SD2_DAT0__SD2_DATA0 0x17059
307 MX6Q_PAD_SD2_DAT1__SD2_DATA1 0x17059
308 MX6Q_PAD_SD2_DAT2__SD2_DATA2 0x17059
309 MX6Q_PAD_SD2_DAT3__SD2_DATA3 0x17059
310 >;
311 };
271 }; 312 };
272 313
273 usdhc3 { 314 usdhc3 {
@@ -325,6 +366,65 @@
325 >; 366 >;
326 }; 367 };
327 }; 368 };
369
370 weim {
371 pinctrl_weim_cs0_1: weim_cs0grp-1 {
372 fsl,pins = <
373 MX6Q_PAD_EIM_CS0__EIM_CS0_B 0xb0b1
374 >;
375 };
376
377 pinctrl_weim_nor_1: weimnorgrp-1 {
378 fsl,pins = <
379 MX6Q_PAD_EIM_OE__EIM_OE_B 0xb0b1
380 MX6Q_PAD_EIM_RW__EIM_RW 0xb0b1
381 MX6Q_PAD_EIM_WAIT__EIM_WAIT_B 0xb060
382 /* data */
383 MX6Q_PAD_EIM_D16__EIM_DATA16 0x1b0b0
384 MX6Q_PAD_EIM_D17__EIM_DATA17 0x1b0b0
385 MX6Q_PAD_EIM_D18__EIM_DATA18 0x1b0b0
386 MX6Q_PAD_EIM_D19__EIM_DATA19 0x1b0b0
387 MX6Q_PAD_EIM_D20__EIM_DATA20 0x1b0b0
388 MX6Q_PAD_EIM_D21__EIM_DATA21 0x1b0b0
389 MX6Q_PAD_EIM_D22__EIM_DATA22 0x1b0b0
390 MX6Q_PAD_EIM_D23__EIM_DATA23 0x1b0b0
391 MX6Q_PAD_EIM_D24__EIM_DATA24 0x1b0b0
392 MX6Q_PAD_EIM_D25__EIM_DATA25 0x1b0b0
393 MX6Q_PAD_EIM_D26__EIM_DATA26 0x1b0b0
394 MX6Q_PAD_EIM_D27__EIM_DATA27 0x1b0b0
395 MX6Q_PAD_EIM_D28__EIM_DATA28 0x1b0b0
396 MX6Q_PAD_EIM_D29__EIM_DATA29 0x1b0b0
397 MX6Q_PAD_EIM_D30__EIM_DATA30 0x1b0b0
398 MX6Q_PAD_EIM_D31__EIM_DATA31 0x1b0b0
399 /* address */
400 MX6Q_PAD_EIM_A23__EIM_ADDR23 0xb0b1
401 MX6Q_PAD_EIM_A22__EIM_ADDR22 0xb0b1
402 MX6Q_PAD_EIM_A21__EIM_ADDR21 0xb0b1
403 MX6Q_PAD_EIM_A20__EIM_ADDR20 0xb0b1
404 MX6Q_PAD_EIM_A19__EIM_ADDR19 0xb0b1
405 MX6Q_PAD_EIM_A18__EIM_ADDR18 0xb0b1
406 MX6Q_PAD_EIM_A17__EIM_ADDR17 0xb0b1
407 MX6Q_PAD_EIM_A16__EIM_ADDR16 0xb0b1
408 MX6Q_PAD_EIM_DA15__EIM_AD15 0xb0b1
409 MX6Q_PAD_EIM_DA14__EIM_AD14 0xb0b1
410 MX6Q_PAD_EIM_DA13__EIM_AD13 0xb0b1
411 MX6Q_PAD_EIM_DA12__EIM_AD12 0xb0b1
412 MX6Q_PAD_EIM_DA11__EIM_AD11 0xb0b1
413 MX6Q_PAD_EIM_DA10__EIM_AD10 0xb0b1
414 MX6Q_PAD_EIM_DA9__EIM_AD09 0xb0b1
415 MX6Q_PAD_EIM_DA8__EIM_AD08 0xb0b1
416 MX6Q_PAD_EIM_DA7__EIM_AD07 0xb0b1
417 MX6Q_PAD_EIM_DA6__EIM_AD06 0xb0b1
418 MX6Q_PAD_EIM_DA5__EIM_AD05 0xb0b1
419 MX6Q_PAD_EIM_DA4__EIM_AD04 0xb0b1
420 MX6Q_PAD_EIM_DA3__EIM_AD03 0xb0b1
421 MX6Q_PAD_EIM_DA2__EIM_AD02 0xb0b1
422 MX6Q_PAD_EIM_DA1__EIM_AD01 0xb0b1
423 MX6Q_PAD_EIM_DA0__EIM_AD00 0xb0b1
424 >;
425 };
426
427 };
328 }; 428 };
329 }; 429 };
330 430
diff --git a/arch/arm/boot/dts/imx6qdl-sabreauto.dtsi b/arch/arm/boot/dts/imx6qdl-sabreauto.dtsi
index 4d237cffcc41..e994011220e7 100644
--- a/arch/arm/boot/dts/imx6qdl-sabreauto.dtsi
+++ b/arch/arm/boot/dts/imx6qdl-sabreauto.dtsi
@@ -16,6 +16,22 @@
16 }; 16 };
17}; 17};
18 18
19&ecspi1 {
20 fsl,spi-num-chipselects = <1>;
21 cs-gpios = <&gpio3 19 0>;
22 pinctrl-names = "default";
23 pinctrl-0 = <&pinctrl_ecspi1_1 &pinctrl_ecspi1_sabreauto>;
24 status = "disabled"; /* pin conflict with WEIM NOR */
25
26 flash: m25p80@0 {
27 #address-cells = <1>;
28 #size-cells = <1>;
29 compatible = "st,m25p32";
30 spi-max-frequency = <20000000>;
31 reg = <0>;
32 };
33};
34
19&fec { 35&fec {
20 pinctrl-names = "default"; 36 pinctrl-names = "default";
21 pinctrl-0 = <&pinctrl_enet_2>; 37 pinctrl-0 = <&pinctrl_enet_2>;
@@ -23,6 +39,12 @@
23 status = "okay"; 39 status = "okay";
24}; 40};
25 41
42&gpmi {
43 pinctrl-names = "default";
44 pinctrl-0 = <&pinctrl_gpmi_nand_1>;
45 status = "okay";
46};
47
26&uart4 { 48&uart4 {
27 pinctrl-names = "default"; 49 pinctrl-names = "default";
28 pinctrl-0 = <&pinctrl_uart4_1>; 50 pinctrl-0 = <&pinctrl_uart4_1>;
@@ -36,3 +58,22 @@
36 wp-gpios = <&gpio1 13 0>; 58 wp-gpios = <&gpio1 13 0>;
37 status = "okay"; 59 status = "okay";
38}; 60};
61
62&weim {
63 pinctrl-names = "default";
64 pinctrl-0 = <&pinctrl_weim_nor_1 &pinctrl_weim_cs0_1>;
65 #address-cells = <2>;
66 #size-cells = <1>;
67 ranges = <0 0 0x08000000 0x08000000>;
68 status = "disabled"; /* pin conflict with SPI NOR */
69
70 nor@0,0 {
71 compatible = "cfi-flash";
72 reg = <0 0 0x02000000>;
73 #address-cells = <1>;
74 #size-cells = <1>;
75 bank-width = <2>;
76 fsl,weim-cs-timing = <0x00620081 0x00000001 0x1c022000
77 0x0000c000 0x1404a38e 0x00000000>;
78 };
79};
diff --git a/arch/arm/boot/dts/imx6qdl-sabresd.dtsi b/arch/arm/boot/dts/imx6qdl-sabresd.dtsi
index e21f6a89cf0f..6e5dfdb32416 100644
--- a/arch/arm/boot/dts/imx6qdl-sabresd.dtsi
+++ b/arch/arm/boot/dts/imx6qdl-sabresd.dtsi
@@ -26,6 +26,13 @@
26 gpio = <&gpio3 22 0>; 26 gpio = <&gpio3 22 0>;
27 enable-active-high; 27 enable-active-high;
28 }; 28 };
29
30 reg_audio: wm8962_supply {
31 compatible = "regulator-fixed";
32 regulator-name = "wm8962-supply";
33 gpio = <&gpio4 10 0>;
34 enable-active-high;
35 };
29 }; 36 };
30 37
31 gpio-keys { 38 gpio-keys {
@@ -43,6 +50,31 @@
43 linux,code = <114>; /* KEY_VOLUMEDOWN */ 50 linux,code = <114>; /* KEY_VOLUMEDOWN */
44 }; 51 };
45 }; 52 };
53
54 sound {
55 compatible = "fsl,imx6q-sabresd-wm8962",
56 "fsl,imx-audio-wm8962";
57 model = "wm8962-audio";
58 ssi-controller = <&ssi2>;
59 audio-codec = <&codec>;
60 audio-routing =
61 "Headphone Jack", "HPOUTL",
62 "Headphone Jack", "HPOUTR",
63 "Ext Spk", "SPKOUTL",
64 "Ext Spk", "SPKOUTR",
65 "MICBIAS", "AMIC",
66 "IN3R", "MICBIAS",
67 "DMIC", "MICBIAS",
68 "DMICDAT", "DMIC";
69 mux-int-port = <2>;
70 mux-ext-port = <3>;
71 };
72};
73
74&audmux {
75 pinctrl-names = "default";
76 pinctrl-0 = <&pinctrl_audmux_2>;
77 status = "okay";
46}; 78};
47 79
48&fec { 80&fec {
@@ -52,6 +84,40 @@
52 status = "okay"; 84 status = "okay";
53}; 85};
54 86
87&i2c1 {
88 clock-frequency = <100000>;
89 pinctrl-names = "default";
90 pinctrl-0 = <&pinctrl_i2c1_2>;
91 status = "okay";
92
93 codec: wm8962@1a {
94 compatible = "wlf,wm8962";
95 reg = <0x1a>;
96 clocks = <&clks 169>;
97 DCVDD-supply = <&reg_audio>;
98 DBVDD-supply = <&reg_audio>;
99 AVDD-supply = <&reg_audio>;
100 CPVDD-supply = <&reg_audio>;
101 MICVDD-supply = <&reg_audio>;
102 PLLVDD-supply = <&reg_audio>;
103 SPKVDD1-supply = <&reg_audio>;
104 SPKVDD2-supply = <&reg_audio>;
105 gpio-cfg = <
106 0x0000 /* 0:Default */
107 0x0000 /* 1:Default */
108 0x0013 /* 2:FN_DMICCLK */
109 0x0000 /* 3:Default */
110 0x8014 /* 4:FN_DMICCDAT */
111 0x0000 /* 5:Default */
112 >;
113 };
114};
115
116&ssi2 {
117 fsl,mode = "i2s-slave";
118 status = "okay";
119};
120
55&uart1 { 121&uart1 {
56 pinctrl-names = "default"; 122 pinctrl-names = "default";
57 pinctrl-0 = <&pinctrl_uart1_1>; 123 pinctrl-0 = <&pinctrl_uart1_1>;
diff --git a/arch/arm/boot/dts/imx6qdl.dtsi b/arch/arm/boot/dts/imx6qdl.dtsi
index 9e8296e4c343..f21d259080fd 100644
--- a/arch/arm/boot/dts/imx6qdl.dtsi
+++ b/arch/arm/boot/dts/imx6qdl.dtsi
@@ -106,6 +106,8 @@
106 interrupts = <0 92 0x04>; 106 interrupts = <0 92 0x04>;
107 cache-unified; 107 cache-unified;
108 cache-level = <2>; 108 cache-level = <2>;
109 arm,tag-latency = <4 2 3>;
110 arm,data-latency = <4 2 3>;
109 }; 111 };
110 112
111 pmu { 113 pmu {
@@ -638,7 +640,7 @@
638 status = "disabled"; 640 status = "disabled";
639 }; 641 };
640 642
641 usbmisc: usbmisc: usbmisc@02184800 { 643 usbmisc: usbmisc@02184800 {
642 #index-cells = <1>; 644 #index-cells = <1>;
643 compatible = "fsl,imx6q-usbmisc"; 645 compatible = "fsl,imx6q-usbmisc";
644 reg = <0x02184800 0x200>; 646 reg = <0x02184800 0x200>;
@@ -742,9 +744,11 @@
742 reg = <0x021b4000 0x4000>; 744 reg = <0x021b4000 0x4000>;
743 }; 745 };
744 746
745 weim@021b8000 { 747 weim: weim@021b8000 {
748 compatible = "fsl,imx6q-weim";
746 reg = <0x021b8000 0x4000>; 749 reg = <0x021b8000 0x4000>;
747 interrupts = <0 14 0x04>; 750 interrupts = <0 14 0x04>;
751 clocks = <&clks 196>;
748 }; 752 };
749 753
750 ocotp@021bc000 { 754 ocotp@021bc000 {
@@ -752,11 +756,6 @@
752 reg = <0x021bc000 0x4000>; 756 reg = <0x021bc000 0x4000>;
753 }; 757 };
754 758
755 ocotp@021c0000 {
756 reg = <0x021c0000 0x4000>;
757 interrupts = <0 21 0x04>;
758 };
759
760 tzasc@021d0000 { /* TZASC1 */ 759 tzasc@021d0000 { /* TZASC1 */
761 reg = <0x021d0000 0x4000>; 760 reg = <0x021d0000 0x4000>;
762 interrupts = <0 108 0x04>; 761 interrupts = <0 108 0x04>;
diff --git a/arch/arm/boot/dts/imx6sl-evk.dts b/arch/arm/boot/dts/imx6sl-evk.dts
new file mode 100644
index 000000000000..2886a590823d
--- /dev/null
+++ b/arch/arm/boot/dts/imx6sl-evk.dts
@@ -0,0 +1,74 @@
1/*
2 * Copyright (C) 2013 Freescale Semiconductor, Inc.
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/dts-v1/;
10
11#include "imx6sl.dtsi"
12
13/ {
14 model = "Freescale i.MX6 SoloLite EVK Board";
15 compatible = "fsl,imx6sl-evk", "fsl,imx6sl";
16
17 memory {
18 reg = <0x80000000 0x40000000>;
19 };
20};
21
22&fec {
23 pinctrl-names = "default";
24 pinctrl-0 = <&pinctrl_fec_1>;
25 phy-mode = "rmii";
26 status = "okay";
27};
28
29&iomuxc {
30 pinctrl-names = "default";
31 pinctrl-0 = <&pinctrl_hog>;
32
33 hog {
34 pinctrl_hog: hoggrp {
35 fsl,pins = <
36 MX6SL_PAD_KEY_ROW7__GPIO4_IO07 0x17059
37 MX6SL_PAD_KEY_COL7__GPIO4_IO06 0x17059
38 MX6SL_PAD_SD2_DAT7__GPIO5_IO00 0x17059
39 MX6SL_PAD_SD2_DAT6__GPIO4_IO29 0x17059
40 MX6SL_PAD_REF_CLK_32K__GPIO3_IO22 0x17059
41 >;
42 };
43 };
44};
45
46&uart1 {
47 pinctrl-names = "default";
48 pinctrl-0 = <&pinctrl_uart1_1>;
49 status = "okay";
50};
51
52&usdhc1 {
53 pinctrl-names = "default";
54 pinctrl-0 = <&pinctrl_usdhc1_1>;
55 bus-width = <8>;
56 cd-gpios = <&gpio4 7 0>;
57 wp-gpios = <&gpio4 6 0>;
58 status = "okay";
59};
60
61&usdhc2 {
62 pinctrl-names = "default";
63 pinctrl-0 = <&pinctrl_usdhc2_1>;
64 cd-gpios = <&gpio5 0 0>;
65 wp-gpios = <&gpio4 29 0>;
66 status = "okay";
67};
68
69&usdhc3 {
70 pinctrl-names = "default";
71 pinctrl-0 = <&pinctrl_usdhc3_1>;
72 cd-gpios = <&gpio3 22 0>;
73 status = "okay";
74};
diff --git a/arch/arm/boot/dts/imx6sl.dtsi b/arch/arm/boot/dts/imx6sl.dtsi
new file mode 100644
index 000000000000..c5e5da02d7e3
--- /dev/null
+++ b/arch/arm/boot/dts/imx6sl.dtsi
@@ -0,0 +1,779 @@
1/*
2 * Copyright 2013 Freescale Semiconductor, Inc.
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
10#include "skeleton.dtsi"
11#include "imx6sl-pinfunc.h"
12#include <dt-bindings/clock/imx6sl-clock.h>
13
14/ {
15 aliases {
16 serial0 = &uart1;
17 serial1 = &uart2;
18 serial2 = &uart3;
19 serial3 = &uart4;
20 serial4 = &uart5;
21 gpio0 = &gpio1;
22 gpio1 = &gpio2;
23 gpio2 = &gpio3;
24 gpio3 = &gpio4;
25 gpio4 = &gpio5;
26 };
27
28 cpus {
29 #address-cells = <1>;
30 #size-cells = <0>;
31
32 cpu@0 {
33 compatible = "arm,cortex-a9";
34 device_type = "cpu";
35 reg = <0x0>;
36 next-level-cache = <&L2>;
37 };
38 };
39
40 intc: interrupt-controller@00a01000 {
41 compatible = "arm,cortex-a9-gic";
42 #interrupt-cells = <3>;
43 #address-cells = <1>;
44 #size-cells = <1>;
45 interrupt-controller;
46 reg = <0x00a01000 0x1000>,
47 <0x00a00100 0x100>;
48 };
49
50 clocks {
51 #address-cells = <1>;
52 #size-cells = <0>;
53
54 ckil {
55 compatible = "fixed-clock";
56 clock-frequency = <32768>;
57 };
58
59 osc {
60 compatible = "fixed-clock";
61 clock-frequency = <24000000>;
62 };
63 };
64
65 soc {
66 #address-cells = <1>;
67 #size-cells = <1>;
68 compatible = "simple-bus";
69 interrupt-parent = <&intc>;
70 ranges;
71
72 L2: l2-cache@00a02000 {
73 compatible = "arm,pl310-cache";
74 reg = <0x00a02000 0x1000>;
75 interrupts = <0 92 0x04>;
76 cache-unified;
77 cache-level = <2>;
78 arm,tag-latency = <4 2 3>;
79 arm,data-latency = <4 2 3>;
80 };
81
82 pmu {
83 compatible = "arm,cortex-a9-pmu";
84 interrupts = <0 94 0x04>;
85 };
86
87 aips1: aips-bus@02000000 {
88 compatible = "fsl,aips-bus", "simple-bus";
89 #address-cells = <1>;
90 #size-cells = <1>;
91 reg = <0x02000000 0x100000>;
92 ranges;
93
94 spba: spba-bus@02000000 {
95 compatible = "fsl,spba-bus", "simple-bus";
96 #address-cells = <1>;
97 #size-cells = <1>;
98 reg = <0x02000000 0x40000>;
99 ranges;
100
101 spdif: spdif@02004000 {
102 reg = <0x02004000 0x4000>;
103 interrupts = <0 52 0x04>;
104 };
105
106 ecspi1: ecspi@02008000 {
107 #address-cells = <1>;
108 #size-cells = <0>;
109 compatible = "fsl,imx6sl-ecspi", "fsl,imx51-ecspi";
110 reg = <0x02008000 0x4000>;
111 interrupts = <0 31 0x04>;
112 clocks = <&clks IMX6SL_CLK_ECSPI1>,
113 <&clks IMX6SL_CLK_ECSPI1>;
114 clock-names = "ipg", "per";
115 status = "disabled";
116 };
117
118 ecspi2: ecspi@0200c000 {
119 #address-cells = <1>;
120 #size-cells = <0>;
121 compatible = "fsl,imx6sl-ecspi", "fsl,imx51-ecspi";
122 reg = <0x0200c000 0x4000>;
123 interrupts = <0 32 0x04>;
124 clocks = <&clks IMX6SL_CLK_ECSPI2>,
125 <&clks IMX6SL_CLK_ECSPI2>;
126 clock-names = "ipg", "per";
127 status = "disabled";
128 };
129
130 ecspi3: ecspi@02010000 {
131 #address-cells = <1>;
132 #size-cells = <0>;
133 compatible = "fsl,imx6sl-ecspi", "fsl,imx51-ecspi";
134 reg = <0x02010000 0x4000>;
135 interrupts = <0 33 0x04>;
136 clocks = <&clks IMX6SL_CLK_ECSPI3>,
137 <&clks IMX6SL_CLK_ECSPI3>;
138 clock-names = "ipg", "per";
139 status = "disabled";
140 };
141
142 ecspi4: ecspi@02014000 {
143 #address-cells = <1>;
144 #size-cells = <0>;
145 compatible = "fsl,imx6sl-ecspi", "fsl,imx51-ecspi";
146 reg = <0x02014000 0x4000>;
147 interrupts = <0 34 0x04>;
148 clocks = <&clks IMX6SL_CLK_ECSPI4>,
149 <&clks IMX6SL_CLK_ECSPI4>;
150 clock-names = "ipg", "per";
151 status = "disabled";
152 };
153
154 uart5: serial@02018000 {
155 compatible = "fsl,imx6sl-uart", "fsl,imx21-uart";
156 reg = <0x02018000 0x4000>;
157 interrupts = <0 30 0x04>;
158 clocks = <&clks IMX6SL_CLK_UART>,
159 <&clks IMX6SL_CLK_UART_SERIAL>;
160 clock-names = "ipg", "per";
161 status = "disabled";
162 };
163
164 uart1: serial@02020000 {
165 compatible = "fsl,imx6sl-uart", "fsl,imx21-uart";
166 reg = <0x02020000 0x4000>;
167 interrupts = <0 26 0x04>;
168 clocks = <&clks IMX6SL_CLK_UART>,
169 <&clks IMX6SL_CLK_UART_SERIAL>;
170 clock-names = "ipg", "per";
171 status = "disabled";
172 };
173
174 uart2: serial@02024000 {
175 compatible = "fsl,imx6sl-uart", "fsl,imx21-uart";
176 reg = <0x02024000 0x4000>;
177 interrupts = <0 27 0x04>;
178 clocks = <&clks IMX6SL_CLK_UART>,
179 <&clks IMX6SL_CLK_UART_SERIAL>;
180 clock-names = "ipg", "per";
181 status = "disabled";
182 };
183
184 ssi1: ssi@02028000 {
185 compatible = "fsl,imx6sl-ssi","fsl,imx21-ssi";
186 reg = <0x02028000 0x4000>;
187 interrupts = <0 46 0x04>;
188 clocks = <&clks IMX6SL_CLK_SSI1>;
189 fsl,fifo-depth = <15>;
190 status = "disabled";
191 };
192
193 ssi2: ssi@0202c000 {
194 compatible = "fsl,imx6sl-ssi","fsl,imx21-ssi";
195 reg = <0x0202c000 0x4000>;
196 interrupts = <0 47 0x04>;
197 clocks = <&clks IMX6SL_CLK_SSI2>;
198 fsl,fifo-depth = <15>;
199 status = "disabled";
200 };
201
202 ssi3: ssi@02030000 {
203 compatible = "fsl,imx6sl-ssi","fsl,imx21-ssi";
204 reg = <0x02030000 0x4000>;
205 interrupts = <0 48 0x04>;
206 clocks = <&clks IMX6SL_CLK_SSI3>;
207 fsl,fifo-depth = <15>;
208 status = "disabled";
209 };
210
211 uart3: serial@02034000 {
212 compatible = "fsl,imx6sl-uart", "fsl,imx21-uart";
213 reg = <0x02034000 0x4000>;
214 interrupts = <0 28 0x04>;
215 clocks = <&clks IMX6SL_CLK_UART>,
216 <&clks IMX6SL_CLK_UART_SERIAL>;
217 clock-names = "ipg", "per";
218 status = "disabled";
219 };
220
221 uart4: serial@02038000 {
222 compatible = "fsl,imx6sl-uart", "fsl,imx21-uart";
223 reg = <0x02038000 0x4000>;
224 interrupts = <0 29 0x04>;
225 clocks = <&clks IMX6SL_CLK_UART>,
226 <&clks IMX6SL_CLK_UART_SERIAL>;
227 clock-names = "ipg", "per";
228 status = "disabled";
229 };
230 };
231
232 pwm1: pwm@02080000 {
233 #pwm-cells = <2>;
234 compatible = "fsl,imx6sl-pwm", "fsl,imx27-pwm";
235 reg = <0x02080000 0x4000>;
236 interrupts = <0 83 0x04>;
237 clocks = <&clks IMX6SL_CLK_PWM1>,
238 <&clks IMX6SL_CLK_PWM1>;
239 clock-names = "ipg", "per";
240 };
241
242 pwm2: pwm@02084000 {
243 #pwm-cells = <2>;
244 compatible = "fsl,imx6sl-pwm", "fsl,imx27-pwm";
245 reg = <0x02084000 0x4000>;
246 interrupts = <0 84 0x04>;
247 clocks = <&clks IMX6SL_CLK_PWM2>,
248 <&clks IMX6SL_CLK_PWM2>;
249 clock-names = "ipg", "per";
250 };
251
252 pwm3: pwm@02088000 {
253 #pwm-cells = <2>;
254 compatible = "fsl,imx6sl-pwm", "fsl,imx27-pwm";
255 reg = <0x02088000 0x4000>;
256 interrupts = <0 85 0x04>;
257 clocks = <&clks IMX6SL_CLK_PWM3>,
258 <&clks IMX6SL_CLK_PWM3>;
259 clock-names = "ipg", "per";
260 };
261
262 pwm4: pwm@0208c000 {
263 #pwm-cells = <2>;
264 compatible = "fsl,imx6sl-pwm", "fsl,imx27-pwm";
265 reg = <0x0208c000 0x4000>;
266 interrupts = <0 86 0x04>;
267 clocks = <&clks IMX6SL_CLK_PWM4>,
268 <&clks IMX6SL_CLK_PWM4>;
269 clock-names = "ipg", "per";
270 };
271
272 gpt: gpt@02098000 {
273 compatible = "fsl,imx6sl-gpt";
274 reg = <0x02098000 0x4000>;
275 interrupts = <0 55 0x04>;
276 clocks = <&clks IMX6SL_CLK_GPT>,
277 <&clks IMX6SL_CLK_GPT_SERIAL>;
278 clock-names = "ipg", "per";
279 };
280
281 gpio1: gpio@0209c000 {
282 compatible = "fsl,imx6sl-gpio", "fsl,imx35-gpio";
283 reg = <0x0209c000 0x4000>;
284 interrupts = <0 66 0x04 0 67 0x04>;
285 gpio-controller;
286 #gpio-cells = <2>;
287 interrupt-controller;
288 #interrupt-cells = <2>;
289 };
290
291 gpio2: gpio@020a0000 {
292 compatible = "fsl,imx6sl-gpio", "fsl,imx35-gpio";
293 reg = <0x020a0000 0x4000>;
294 interrupts = <0 68 0x04 0 69 0x04>;
295 gpio-controller;
296 #gpio-cells = <2>;
297 interrupt-controller;
298 #interrupt-cells = <2>;
299 };
300
301 gpio3: gpio@020a4000 {
302 compatible = "fsl,imx6sl-gpio", "fsl,imx35-gpio";
303 reg = <0x020a4000 0x4000>;
304 interrupts = <0 70 0x04 0 71 0x04>;
305 gpio-controller;
306 #gpio-cells = <2>;
307 interrupt-controller;
308 #interrupt-cells = <2>;
309 };
310
311 gpio4: gpio@020a8000 {
312 compatible = "fsl,imx6sl-gpio", "fsl,imx35-gpio";
313 reg = <0x020a8000 0x4000>;
314 interrupts = <0 72 0x04 0 73 0x04>;
315 gpio-controller;
316 #gpio-cells = <2>;
317 interrupt-controller;
318 #interrupt-cells = <2>;
319 };
320
321 gpio5: gpio@020ac000 {
322 compatible = "fsl,imx6sl-gpio", "fsl,imx35-gpio";
323 reg = <0x020ac000 0x4000>;
324 interrupts = <0 74 0x04 0 75 0x04>;
325 gpio-controller;
326 #gpio-cells = <2>;
327 interrupt-controller;
328 #interrupt-cells = <2>;
329 };
330
331 kpp: kpp@020b8000 {
332 reg = <0x020b8000 0x4000>;
333 interrupts = <0 82 0x04>;
334 };
335
336 wdog1: wdog@020bc000 {
337 compatible = "fsl,imx6sl-wdt", "fsl,imx21-wdt";
338 reg = <0x020bc000 0x4000>;
339 interrupts = <0 80 0x04>;
340 clocks = <&clks IMX6SL_CLK_DUMMY>;
341 };
342
343 wdog2: wdog@020c0000 {
344 compatible = "fsl,imx6sl-wdt", "fsl,imx21-wdt";
345 reg = <0x020c0000 0x4000>;
346 interrupts = <0 81 0x04>;
347 clocks = <&clks IMX6SL_CLK_DUMMY>;
348 status = "disabled";
349 };
350
351 clks: ccm@020c4000 {
352 compatible = "fsl,imx6sl-ccm";
353 reg = <0x020c4000 0x4000>;
354 interrupts = <0 87 0x04 0 88 0x04>;
355 #clock-cells = <1>;
356 };
357
358 anatop: anatop@020c8000 {
359 compatible = "fsl,imx6sl-anatop", "syscon", "simple-bus";
360 reg = <0x020c8000 0x1000>;
361 interrupts = <0 49 0x04 0 54 0x04 0 127 0x04>;
362
363 regulator-1p1@110 {
364 compatible = "fsl,anatop-regulator";
365 regulator-name = "vdd1p1";
366 regulator-min-microvolt = <800000>;
367 regulator-max-microvolt = <1375000>;
368 regulator-always-on;
369 anatop-reg-offset = <0x110>;
370 anatop-vol-bit-shift = <8>;
371 anatop-vol-bit-width = <5>;
372 anatop-min-bit-val = <4>;
373 anatop-min-voltage = <800000>;
374 anatop-max-voltage = <1375000>;
375 };
376
377 regulator-3p0@120 {
378 compatible = "fsl,anatop-regulator";
379 regulator-name = "vdd3p0";
380 regulator-min-microvolt = <2800000>;
381 regulator-max-microvolt = <3150000>;
382 regulator-always-on;
383 anatop-reg-offset = <0x120>;
384 anatop-vol-bit-shift = <8>;
385 anatop-vol-bit-width = <5>;
386 anatop-min-bit-val = <0>;
387 anatop-min-voltage = <2625000>;
388 anatop-max-voltage = <3400000>;
389 };
390
391 regulator-2p5@130 {
392 compatible = "fsl,anatop-regulator";
393 regulator-name = "vdd2p5";
394 regulator-min-microvolt = <2100000>;
395 regulator-max-microvolt = <2850000>;
396 regulator-always-on;
397 anatop-reg-offset = <0x130>;
398 anatop-vol-bit-shift = <8>;
399 anatop-vol-bit-width = <5>;
400 anatop-min-bit-val = <0>;
401 anatop-min-voltage = <2100000>;
402 anatop-max-voltage = <2850000>;
403 };
404
405 reg_arm: regulator-vddcore@140 {
406 compatible = "fsl,anatop-regulator";
407 regulator-name = "cpu";
408 regulator-min-microvolt = <725000>;
409 regulator-max-microvolt = <1450000>;
410 regulator-always-on;
411 anatop-reg-offset = <0x140>;
412 anatop-vol-bit-shift = <0>;
413 anatop-vol-bit-width = <5>;
414 anatop-delay-reg-offset = <0x170>;
415 anatop-delay-bit-shift = <24>;
416 anatop-delay-bit-width = <2>;
417 anatop-min-bit-val = <1>;
418 anatop-min-voltage = <725000>;
419 anatop-max-voltage = <1450000>;
420 };
421
422 reg_pu: regulator-vddpu@140 {
423 compatible = "fsl,anatop-regulator";
424 regulator-name = "vddpu";
425 regulator-min-microvolt = <725000>;
426 regulator-max-microvolt = <1450000>;
427 regulator-always-on;
428 anatop-reg-offset = <0x140>;
429 anatop-vol-bit-shift = <9>;
430 anatop-vol-bit-width = <5>;
431 anatop-delay-reg-offset = <0x170>;
432 anatop-delay-bit-shift = <26>;
433 anatop-delay-bit-width = <2>;
434 anatop-min-bit-val = <1>;
435 anatop-min-voltage = <725000>;
436 anatop-max-voltage = <1450000>;
437 };
438
439 reg_soc: regulator-vddsoc@140 {
440 compatible = "fsl,anatop-regulator";
441 regulator-name = "vddsoc";
442 regulator-min-microvolt = <725000>;
443 regulator-max-microvolt = <1450000>;
444 regulator-always-on;
445 anatop-reg-offset = <0x140>;
446 anatop-vol-bit-shift = <18>;
447 anatop-vol-bit-width = <5>;
448 anatop-delay-reg-offset = <0x170>;
449 anatop-delay-bit-shift = <28>;
450 anatop-delay-bit-width = <2>;
451 anatop-min-bit-val = <1>;
452 anatop-min-voltage = <725000>;
453 anatop-max-voltage = <1450000>;
454 };
455 };
456
457 usbphy1: usbphy@020c9000 {
458 compatible = "fsl,imx6sl-usbphy", "fsl,imx23-usbphy";
459 reg = <0x020c9000 0x1000>;
460 interrupts = <0 44 0x04>;
461 clocks = <&clks IMX6SL_CLK_USBPHY1>;
462 };
463
464 usbphy2: usbphy@020ca000 {
465 compatible = "fsl,imx6sl-usbphy", "fsl,imx23-usbphy";
466 reg = <0x020ca000 0x1000>;
467 interrupts = <0 45 0x04>;
468 clocks = <&clks IMX6SL_CLK_USBPHY2>;
469 };
470
471 snvs@020cc000 {
472 compatible = "fsl,sec-v4.0-mon", "simple-bus";
473 #address-cells = <1>;
474 #size-cells = <1>;
475 ranges = <0 0x020cc000 0x4000>;
476
477 snvs-rtc-lp@34 {
478 compatible = "fsl,sec-v4.0-mon-rtc-lp";
479 reg = <0x34 0x58>;
480 interrupts = <0 19 0x04 0 20 0x04>;
481 };
482 };
483
484 epit1: epit@020d0000 {
485 reg = <0x020d0000 0x4000>;
486 interrupts = <0 56 0x04>;
487 };
488
489 epit2: epit@020d4000 {
490 reg = <0x020d4000 0x4000>;
491 interrupts = <0 57 0x04>;
492 };
493
494 src: src@020d8000 {
495 compatible = "fsl,imx6sl-src", "fsl,imx51-src";
496 reg = <0x020d8000 0x4000>;
497 interrupts = <0 91 0x04 0 96 0x04>;
498 #reset-cells = <1>;
499 };
500
501 gpc: gpc@020dc000 {
502 compatible = "fsl,imx6sl-gpc", "fsl,imx6q-gpc";
503 reg = <0x020dc000 0x4000>;
504 interrupts = <0 89 0x04>;
505 };
506
507 iomuxc: iomuxc@020e0000 {
508 compatible = "fsl,imx6sl-iomuxc";
509 reg = <0x020e0000 0x4000>;
510
511 fec {
512 pinctrl_fec_1: fecgrp-1 {
513 fsl,pins = <
514 MX6SL_PAD_FEC_MDC__FEC_MDC 0x1b0b0
515 MX6SL_PAD_FEC_MDIO__FEC_MDIO 0x1b0b0
516 MX6SL_PAD_FEC_CRS_DV__FEC_RX_DV 0x1b0b0
517 MX6SL_PAD_FEC_RXD0__FEC_RX_DATA0 0x1b0b0
518 MX6SL_PAD_FEC_RXD1__FEC_RX_DATA1 0x1b0b0
519 MX6SL_PAD_FEC_TX_EN__FEC_TX_EN 0x1b0b0
520 MX6SL_PAD_FEC_TXD0__FEC_TX_DATA0 0x1b0b0
521 MX6SL_PAD_FEC_TXD1__FEC_TX_DATA1 0x1b0b0
522 MX6SL_PAD_FEC_REF_CLK__FEC_REF_OUT 0x4001b0a8
523 >;
524 };
525 };
526
527 uart1 {
528 pinctrl_uart1_1: uart1grp-1 {
529 fsl,pins = <
530 MX6SL_PAD_UART1_RXD__UART1_RX_DATA 0x1b0b1
531 MX6SL_PAD_UART1_TXD__UART1_TX_DATA 0x1b0b1
532 >;
533 };
534 };
535
536 usdhc1 {
537 pinctrl_usdhc1_1: usdhc1grp-1 {
538 fsl,pins = <
539 MX6SL_PAD_SD1_CMD__SD1_CMD 0x17059
540 MX6SL_PAD_SD1_CLK__SD1_CLK 0x10059
541 MX6SL_PAD_SD1_DAT0__SD1_DATA0 0x17059
542 MX6SL_PAD_SD1_DAT1__SD1_DATA1 0x17059
543 MX6SL_PAD_SD1_DAT2__SD1_DATA2 0x17059
544 MX6SL_PAD_SD1_DAT3__SD1_DATA3 0x17059
545 MX6SL_PAD_SD1_DAT4__SD1_DATA4 0x17059
546 MX6SL_PAD_SD1_DAT5__SD1_DATA5 0x17059
547 MX6SL_PAD_SD1_DAT6__SD1_DATA6 0x17059
548 MX6SL_PAD_SD1_DAT7__SD1_DATA7 0x17059
549 >;
550 };
551 };
552
553 usdhc2 {
554 pinctrl_usdhc2_1: usdhc2grp-1 {
555 fsl,pins = <
556 MX6SL_PAD_SD2_CMD__SD2_CMD 0x17059
557 MX6SL_PAD_SD2_CLK__SD2_CLK 0x10059
558 MX6SL_PAD_SD2_DAT0__SD2_DATA0 0x17059
559 MX6SL_PAD_SD2_DAT1__SD2_DATA1 0x17059
560 MX6SL_PAD_SD2_DAT2__SD2_DATA2 0x17059
561 MX6SL_PAD_SD2_DAT3__SD2_DATA3 0x17059
562 >;
563 };
564 };
565
566 usdhc3 {
567 pinctrl_usdhc3_1: usdhc3grp-1 {
568 fsl,pins = <
569 MX6SL_PAD_SD3_CMD__SD3_CMD 0x17059
570 MX6SL_PAD_SD3_CLK__SD3_CLK 0x10059
571 MX6SL_PAD_SD3_DAT0__SD3_DATA0 0x17059
572 MX6SL_PAD_SD3_DAT1__SD3_DATA1 0x17059
573 MX6SL_PAD_SD3_DAT2__SD3_DATA2 0x17059
574 MX6SL_PAD_SD3_DAT3__SD3_DATA3 0x17059
575 >;
576 };
577 };
578 };
579
580 csi: csi@020e4000 {
581 reg = <0x020e4000 0x4000>;
582 interrupts = <0 7 0x04>;
583 };
584
585 spdc: spdc@020e8000 {
586 reg = <0x020e8000 0x4000>;
587 interrupts = <0 6 0x04>;
588 };
589
590 sdma: sdma@020ec000 {
591 compatible = "fsl,imx6sl-sdma", "fsl,imx35-sdma";
592 reg = <0x020ec000 0x4000>;
593 interrupts = <0 2 0x04>;
594 clocks = <&clks IMX6SL_CLK_SDMA>,
595 <&clks IMX6SL_CLK_SDMA>;
596 clock-names = "ipg", "ahb";
597 fsl,sdma-ram-script-name = "imx/sdma/sdma-imx6sl.bin";
598 };
599
600 pxp: pxp@020f0000 {
601 reg = <0x020f0000 0x4000>;
602 interrupts = <0 98 0x04>;
603 };
604
605 epdc: epdc@020f4000 {
606 reg = <0x020f4000 0x4000>;
607 interrupts = <0 97 0x04>;
608 };
609
610 lcdif: lcdif@020f8000 {
611 reg = <0x020f8000 0x4000>;
612 interrupts = <0 39 0x04>;
613 };
614
615 dcp: dcp@020fc000 {
616 reg = <0x020fc000 0x4000>;
617 interrupts = <0 99 0x04>;
618 };
619 };
620
621 aips2: aips-bus@02100000 {
622 compatible = "fsl,aips-bus", "simple-bus";
623 #address-cells = <1>;
624 #size-cells = <1>;
625 reg = <0x02100000 0x100000>;
626 ranges;
627
628 usbotg1: usb@02184000 {
629 compatible = "fsl,imx6sl-usb", "fsl,imx27-usb";
630 reg = <0x02184000 0x200>;
631 interrupts = <0 43 0x04>;
632 clocks = <&clks IMX6SL_CLK_USBOH3>;
633 fsl,usbphy = <&usbphy1>;
634 fsl,usbmisc = <&usbmisc 0>;
635 status = "disabled";
636 };
637
638 usbotg2: usb@02184200 {
639 compatible = "fsl,imx6sl-usb", "fsl,imx27-usb";
640 reg = <0x02184200 0x200>;
641 interrupts = <0 40 0x04>;
642 clocks = <&clks IMX6SL_CLK_USBOH3>;
643 fsl,usbphy = <&usbphy2>;
644 fsl,usbmisc = <&usbmisc 1>;
645 status = "disabled";
646 };
647
648 usbh: usb@02184400 {
649 compatible = "fsl,imx6sl-usb", "fsl,imx27-usb";
650 reg = <0x02184400 0x200>;
651 interrupts = <0 42 0x04>;
652 clocks = <&clks IMX6SL_CLK_USBOH3>;
653 fsl,usbmisc = <&usbmisc 2>;
654 status = "disabled";
655 };
656
657 usbmisc: usbmisc@02184800 {
658 #index-cells = <1>;
659 compatible = "fsl,imx6sl-usbmisc", "fsl,imx6q-usbmisc";
660 reg = <0x02184800 0x200>;
661 clocks = <&clks IMX6SL_CLK_USBOH3>;
662 };
663
664 fec: ethernet@02188000 {
665 compatible = "fsl,imx6sl-fec", "fsl,imx25-fec";
666 reg = <0x02188000 0x4000>;
667 interrupts = <0 114 0x04>;
668 clocks = <&clks IMX6SL_CLK_ENET_REF>,
669 <&clks IMX6SL_CLK_ENET_REF>;
670 clock-names = "ipg", "ahb";
671 status = "disabled";
672 };
673
674 usdhc1: usdhc@02190000 {
675 compatible = "fsl,imx6sl-usdhc", "fsl,imx6q-usdhc";
676 reg = <0x02190000 0x4000>;
677 interrupts = <0 22 0x04>;
678 clocks = <&clks IMX6SL_CLK_USDHC1>,
679 <&clks IMX6SL_CLK_USDHC1>,
680 <&clks IMX6SL_CLK_USDHC1>;
681 clock-names = "ipg", "ahb", "per";
682 bus-width = <4>;
683 status = "disabled";
684 };
685
686 usdhc2: usdhc@02194000 {
687 compatible = "fsl,imx6sl-usdhc", "fsl,imx6q-usdhc";
688 reg = <0x02194000 0x4000>;
689 interrupts = <0 23 0x04>;
690 clocks = <&clks IMX6SL_CLK_USDHC2>,
691 <&clks IMX6SL_CLK_USDHC2>,
692 <&clks IMX6SL_CLK_USDHC2>;
693 clock-names = "ipg", "ahb", "per";
694 bus-width = <4>;
695 status = "disabled";
696 };
697
698 usdhc3: usdhc@02198000 {
699 compatible = "fsl,imx6sl-usdhc", "fsl,imx6q-usdhc";
700 reg = <0x02198000 0x4000>;
701 interrupts = <0 24 0x04>;
702 clocks = <&clks IMX6SL_CLK_USDHC3>,
703 <&clks IMX6SL_CLK_USDHC3>,
704 <&clks IMX6SL_CLK_USDHC3>;
705 clock-names = "ipg", "ahb", "per";
706 bus-width = <4>;
707 status = "disabled";
708 };
709
710 usdhc4: usdhc@0219c000 {
711 compatible = "fsl,imx6sl-usdhc", "fsl,imx6q-usdhc";
712 reg = <0x0219c000 0x4000>;
713 interrupts = <0 25 0x04>;
714 clocks = <&clks IMX6SL_CLK_USDHC4>,
715 <&clks IMX6SL_CLK_USDHC4>,
716 <&clks IMX6SL_CLK_USDHC4>;
717 clock-names = "ipg", "ahb", "per";
718 bus-width = <4>;
719 status = "disabled";
720 };
721
722 i2c1: i2c@021a0000 {
723 #address-cells = <1>;
724 #size-cells = <0>;
725 compatible = "fsl,imx6sl-i2c", "fsl,imx21-i2c";
726 reg = <0x021a0000 0x4000>;
727 interrupts = <0 36 0x04>;
728 clocks = <&clks IMX6SL_CLK_I2C1>;
729 status = "disabled";
730 };
731
732 i2c2: i2c@021a4000 {
733 #address-cells = <1>;
734 #size-cells = <0>;
735 compatible = "fsl,imx6sl-i2c", "fsl,imx21-i2c";
736 reg = <0x021a4000 0x4000>;
737 interrupts = <0 37 0x04>;
738 clocks = <&clks IMX6SL_CLK_I2C2>;
739 status = "disabled";
740 };
741
742 i2c3: i2c@021a8000 {
743 #address-cells = <1>;
744 #size-cells = <0>;
745 compatible = "fsl,imx6sl-i2c", "fsl,imx21-i2c";
746 reg = <0x021a8000 0x4000>;
747 interrupts = <0 38 0x04>;
748 clocks = <&clks IMX6SL_CLK_I2C3>;
749 status = "disabled";
750 };
751
752 mmdc: mmdc@021b0000 {
753 compatible = "fsl,imx6sl-mmdc", "fsl,imx6q-mmdc";
754 reg = <0x021b0000 0x4000>;
755 };
756
757 rngb: rngb@021b4000 {
758 reg = <0x021b4000 0x4000>;
759 interrupts = <0 5 0x04>;
760 };
761
762 weim: weim@021b8000 {
763 reg = <0x021b8000 0x4000>;
764 interrupts = <0 14 0x04>;
765 };
766
767 ocotp: ocotp@021bc000 {
768 compatible = "fsl,imx6sl-ocotp";
769 reg = <0x021bc000 0x4000>;
770 };
771
772 audmux: audmux@021d8000 {
773 compatible = "fsl,imx6sl-audmux", "fsl,imx31-audmux";
774 reg = <0x021d8000 0x4000>;
775 status = "disabled";
776 };
777 };
778 };
779};
diff --git a/arch/arm/boot/dts/integratorap.dts b/arch/arm/boot/dts/integratorap.dts
index c9c3fa344647..b6b82eca8d1e 100644
--- a/arch/arm/boot/dts/integratorap.dts
+++ b/arch/arm/boot/dts/integratorap.dts
@@ -39,6 +39,47 @@
39 valid-mask = <0x003fffff>; 39 valid-mask = <0x003fffff>;
40 }; 40 };
41 41
42 pci: pciv3@62000000 {
43 compatible = "v3,v360epc-pci";
44 #interrupt-cells = <1>;
45 #size-cells = <2>;
46 #address-cells = <3>;
47 reg = <0x62000000 0x10000>;
48 interrupt-parent = <&pic>;
49 interrupts = <17>; /* Bus error IRQ */
50 ranges = <0x00000000 0 0x61000000 /* config space */
51 0x61000000 0 0x00100000 /* 16 MiB @ 61000000 */
52 0x01000000 0 0x0 /* I/O space */
53 0x60000000 0 0x00100000 /* 16 MiB @ 60000000 */
54 0x02000000 0 0x00000000 /* non-prefectable memory */
55 0x40000000 0 0x10000000 /* 256 MiB @ 40000000 */
56 0x42000000 0 0x10000000 /* prefetchable memory */
57 0x50000000 0 0x10000000>; /* 256 MiB @ 50000000 */
58 interrupt-map-mask = <0xf800 0 0 0x7>;
59 interrupt-map = <
60 /* IDSEL 9 */
61 0x4800 0 0 1 &pic 13 /* INT A on slot 9 is irq 13 */
62 0x4800 0 0 2 &pic 14 /* INT B on slot 9 is irq 14 */
63 0x4800 0 0 3 &pic 15 /* INT C on slot 9 is irq 15 */
64 0x4800 0 0 4 &pic 16 /* INT D on slot 9 is irq 16 */
65 /* IDSEL 10 */
66 0x5000 0 0 1 &pic 14 /* INT A on slot 10 is irq 14 */
67 0x5000 0 0 2 &pic 15 /* INT B on slot 10 is irq 15 */
68 0x5000 0 0 3 &pic 16 /* INT C on slot 10 is irq 16 */
69 0x5000 0 0 4 &pic 13 /* INT D on slot 10 is irq 13 */
70 /* IDSEL 11 */
71 0x5800 0 0 1 &pic 15 /* INT A on slot 11 is irq 15 */
72 0x5800 0 0 2 &pic 16 /* INT B on slot 11 is irq 16 */
73 0x5800 0 0 3 &pic 13 /* INT C on slot 11 is irq 13 */
74 0x5800 0 0 4 &pic 14 /* INT D on slot 11 is irq 14 */
75 /* IDSEL 12 */
76 0x6000 0 0 1 &pic 16 /* INT A on slot 12 is irq 16 */
77 0x6000 0 0 2 &pic 13 /* INT B on slot 12 is irq 13 */
78 0x6000 0 0 3 &pic 14 /* INT C on slot 12 is irq 14 */
79 0x6000 0 0 4 &pic 15 /* INT D on slot 12 is irq 15 */
80 >;
81 };
82
42 fpga { 83 fpga {
43 /* 84 /*
44 * The Integator/AP predates the idea to have magic numbers 85 * The Integator/AP predates the idea to have magic numbers
diff --git a/arch/arm/boot/dts/keystone.dts b/arch/arm/boot/dts/keystone.dts
new file mode 100644
index 000000000000..1334b42c6b77
--- /dev/null
+++ b/arch/arm/boot/dts/keystone.dts
@@ -0,0 +1,117 @@
1/*
2 * Copyright 2013 Texas Instruments, Inc.
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/dts-v1/;
10/include/ "skeleton.dtsi"
11
12/ {
13 model = "Texas Instruments Keystone 2 SoC";
14 compatible = "ti,keystone-evm";
15 #address-cells = <2>;
16 #size-cells = <2>;
17 interrupt-parent = <&gic>;
18
19 aliases {
20 serial0 = &uart0;
21 };
22
23 memory {
24 reg = <0x00000000 0x80000000 0x00000000 0x40000000>;
25 };
26
27 cpus {
28 #address-cells = <1>;
29 #size-cells = <0>;
30
31 interrupt-parent = <&gic>;
32
33 cpu@0 {
34 compatible = "arm,cortex-a15";
35 device_type = "cpu";
36 reg = <0>;
37 };
38
39 cpu@1 {
40 compatible = "arm,cortex-a15";
41 device_type = "cpu";
42 reg = <1>;
43 };
44
45 cpu@2 {
46 compatible = "arm,cortex-a15";
47 device_type = "cpu";
48 reg = <2>;
49 };
50
51 cpu@3 {
52 compatible = "arm,cortex-a15";
53 device_type = "cpu";
54 reg = <3>;
55 };
56 };
57
58 gic: interrupt-controller {
59 compatible = "arm,cortex-a15-gic";
60 #interrupt-cells = <3>;
61 #size-cells = <0>;
62 #address-cells = <1>;
63 interrupt-controller;
64 reg = <0x0 0x02561000 0x0 0x1000>,
65 <0x0 0x02562000 0x0 0x2000>;
66 };
67
68 timer {
69 compatible = "arm,armv7-timer";
70 interrupts = <1 13 0xf08>,
71 <1 14 0xf08>,
72 <1 11 0xf08>,
73 <1 10 0x308>;
74 };
75
76 pmu {
77 compatible = "arm,cortex-a15-pmu";
78 interrupts = <0 20 0xf01>,
79 <0 21 0xf01>,
80 <0 22 0xf01>,
81 <0 23 0xf01>;
82 };
83
84 soc {
85 #address-cells = <1>;
86 #size-cells = <1>;
87 compatible = "ti,keystone","simple-bus";
88 interrupt-parent = <&gic>;
89 ranges = <0x0 0x0 0x0 0xc0000000>;
90
91 rstctrl: reset-controller {
92 compatible = "ti,keystone-reset";
93 reg = <0x023100e8 4>; /* pll reset control reg */
94 };
95
96 uart0: serial@02530c00 {
97 compatible = "ns16550a";
98 current-speed = <115200>;
99 reg-shift = <2>;
100 reg-io-width = <4>;
101 reg = <0x02530c00 0x100>;
102 clock-frequency = <133120000>;
103 interrupts = <0 277 0xf01>;
104 };
105
106 uart1: serial@02531000 {
107 compatible = "ns16550a";
108 current-speed = <115200>;
109 reg-shift = <2>;
110 reg-io-width = <4>;
111 reg = <0x02531000 0x100>;
112 clock-frequency = <133120000>;
113 interrupts = <0 280 0xf01>;
114 };
115
116 };
117};
diff --git a/arch/arm/boot/dts/kirkwood-6281.dtsi b/arch/arm/boot/dts/kirkwood-6281.dtsi
index d6c9d65cbaeb..1e5bef0bead7 100644
--- a/arch/arm/boot/dts/kirkwood-6281.dtsi
+++ b/arch/arm/boot/dts/kirkwood-6281.dtsi
@@ -40,5 +40,64 @@
40 marvell,function = "sdio"; 40 marvell,function = "sdio";
41 }; 41 };
42 }; 42 };
43
44 pcie-controller {
45 compatible = "marvell,kirkwood-pcie";
46 status = "disabled";
47 device_type = "pci";
48
49 #address-cells = <3>;
50 #size-cells = <2>;
51
52 bus-range = <0x00 0xff>;
53
54 ranges = <0x82000000 0 0x00040000 0x00040000 0 0x00002000 /* Port 0.0 registers */
55 0x82000000 0 0xe0000000 0xe0000000 0 0x08000000 /* non-prefetchable memory */
56 0x81000000 0 0 0xe8000000 0 0x00100000>; /* downstream I/O */
57
58 pcie@1,0 {
59 device_type = "pci";
60 assigned-addresses = <0x82000800 0 0x00040000 0 0x2000>;
61 reg = <0x0800 0 0 0 0>;
62 #address-cells = <3>;
63 #size-cells = <2>;
64 #interrupt-cells = <1>;
65 ranges;
66 interrupt-map-mask = <0 0 0 0>;
67 interrupt-map = <0 0 0 0 &intc 9>;
68 marvell,pcie-port = <0>;
69 marvell,pcie-lane = <0>;
70 clocks = <&gate_clk 2>;
71 status = "disabled";
72 };
73 };
74
75 rtc@10300 {
76 compatible = "marvell,kirkwood-rtc", "marvell,orion-rtc";
77 reg = <0x10300 0x20>;
78 interrupts = <53>;
79 clocks = <&gate_clk 7>;
80 };
81
82 sata@80000 {
83 compatible = "marvell,orion-sata";
84 reg = <0x80000 0x5000>;
85 interrupts = <21>;
86 clocks = <&gate_clk 14>, <&gate_clk 15>;
87 clock-names = "0", "1";
88 status = "disabled";
89 };
90
91 mvsdio@90000 {
92 compatible = "marvell,orion-sdio";
93 reg = <0x90000 0x200>;
94 interrupts = <28>;
95 clocks = <&gate_clk 4>;
96 bus-width = <4>;
97 cap-sdio-irq;
98 cap-sd-highspeed;
99 cap-mmc-highspeed;
100 status = "disabled";
101 };
43 }; 102 };
44}; 103};
diff --git a/arch/arm/boot/dts/kirkwood-6282.dtsi b/arch/arm/boot/dts/kirkwood-6282.dtsi
index 23991e45bc55..a63a11137262 100644
--- a/arch/arm/boot/dts/kirkwood-6282.dtsi
+++ b/arch/arm/boot/dts/kirkwood-6282.dtsi
@@ -49,6 +49,34 @@
49 }; 49 };
50 }; 50 };
51 51
52 rtc@10300 {
53 compatible = "marvell,kirkwood-rtc", "marvell,orion-rtc";
54 reg = <0x10300 0x20>;
55 interrupts = <53>;
56 clocks = <&gate_clk 7>;
57 };
58
59 sata@80000 {
60 compatible = "marvell,orion-sata";
61 reg = <0x80000 0x5000>;
62 interrupts = <21>;
63 clocks = <&gate_clk 14>, <&gate_clk 15>;
64 clock-names = "0", "1";
65 status = "disabled";
66 };
67
68 mvsdio@90000 {
69 compatible = "marvell,orion-sdio";
70 reg = <0x90000 0x200>;
71 interrupts = <28>;
72 clocks = <&gate_clk 4>;
73 bus-width = <4>;
74 cap-sdio-irq;
75 cap-sd-highspeed;
76 cap-mmc-highspeed;
77 status = "disabled";
78 };
79
52 thermal@10078 { 80 thermal@10078 {
53 compatible = "marvell,kirkwood-thermal"; 81 compatible = "marvell,kirkwood-thermal";
54 reg = <0x10078 0x4>; 82 reg = <0x10078 0x4>;
@@ -65,5 +93,53 @@
65 clocks = <&gate_clk 7>; 93 clocks = <&gate_clk 7>;
66 status = "disabled"; 94 status = "disabled";
67 }; 95 };
96
97 pcie-controller {
98 compatible = "marvell,kirkwood-pcie";
99 status = "disabled";
100 device_type = "pci";
101
102 #address-cells = <3>;
103 #size-cells = <2>;
104
105 bus-range = <0x00 0xff>;
106
107 ranges = <0x82000000 0 0x00040000 0x00040000 0 0x00002000 /* Port 0.0 registers */
108 0x82000000 0 0x00044000 0x00044000 0 0x00002000 /* Port 1.0 registers */
109 0x82000000 0 0xe0000000 0xe0000000 0 0x08000000 /* non-prefetchable memory */
110 0x81000000 0 0 0xe8000000 0 0x00100000>; /* downstream I/O */
111
112 pcie@1,0 {
113 device_type = "pci";
114 assigned-addresses = <0x82000800 0 0x00040000 0 0x2000>;
115 reg = <0x0800 0 0 0 0>;
116 #address-cells = <3>;
117 #size-cells = <2>;
118 #interrupt-cells = <1>;
119 ranges;
120 interrupt-map-mask = <0 0 0 0>;
121 interrupt-map = <0 0 0 0 &intc 9>;
122 marvell,pcie-port = <0>;
123 marvell,pcie-lane = <0>;
124 clocks = <&gate_clk 2>;
125 status = "disabled";
126 };
127
128 pcie@2,0 {
129 device_type = "pci";
130 assigned-addresses = <0x82001000 0 0x00044000 0 0x2000>;
131 reg = <0x1000 0 0 0 0>;
132 #address-cells = <3>;
133 #size-cells = <2>;
134 #interrupt-cells = <1>;
135 ranges;
136 interrupt-map-mask = <0 0 0 0>;
137 interrupt-map = <0 0 0 0 &intc 10>;
138 marvell,pcie-port = <1>;
139 marvell,pcie-lane = <0>;
140 clocks = <&gate_clk 18>;
141 status = "disabled";
142 };
143 };
68 }; 144 };
69}; 145};
diff --git a/arch/arm/boot/dts/kirkwood-cloudbox.dts b/arch/arm/boot/dts/kirkwood-cloudbox.dts
index 5f21d4e427b0..00c48d26de68 100644
--- a/arch/arm/boot/dts/kirkwood-cloudbox.dts
+++ b/arch/arm/boot/dts/kirkwood-cloudbox.dts
@@ -18,10 +18,6 @@
18 18
19 ocp@f1000000 { 19 ocp@f1000000 {
20 pinctrl: pinctrl@10000 { 20 pinctrl: pinctrl@10000 {
21 pinctrl-0 = < &pmx_spi &pmx_uart0
22 &pmx_cloudbox_sata0 >;
23 pinctrl-names = "default";
24
25 pmx_cloudbox_sata0: pmx-cloudbox-sata0 { 21 pmx_cloudbox_sata0: pmx-cloudbox-sata0 {
26 marvell,pins = "mpp15"; 22 marvell,pins = "mpp15";
27 marvell,function = "sata0"; 23 marvell,function = "sata0";
@@ -29,16 +25,22 @@
29 }; 25 };
30 26
31 serial@12000 { 27 serial@12000 {
28 pinctrl-0 = <&pmx_uart0>;
29 pinctrl-names = "default";
32 clock-frequency = <166666667>; 30 clock-frequency = <166666667>;
33 status = "okay"; 31 status = "okay";
34 }; 32 };
35 33
36 sata@80000 { 34 sata@80000 {
35 pinctrl-0 = <&pmx_cloudbox_sata0>;
36 pinctrl-names = "default";
37 status = "okay"; 37 status = "okay";
38 nr-ports = <1>; 38 nr-ports = <1>;
39 }; 39 };
40 40
41 spi@10600 { 41 spi@10600 {
42 pinctrl-0 = <&pmx_spi>;
43 pinctrl-names = "default";
42 status = "okay"; 44 status = "okay";
43 45
44 flash@0 { 46 flash@0 {
diff --git a/arch/arm/boot/dts/kirkwood-db-88f6281.dts b/arch/arm/boot/dts/kirkwood-db-88f6281.dts
new file mode 100644
index 000000000000..9d777edd1f36
--- /dev/null
+++ b/arch/arm/boot/dts/kirkwood-db-88f6281.dts
@@ -0,0 +1,30 @@
1/*
2 * Marvell DB-88F6281-BP Development Board Setup
3 *
4 * Saeed Bishara <saeed@marvell.com>
5 * Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
6 *
7 * This file is licensed under the terms of the GNU General Public
8 * License version 2. This program is licensed "as is" without any
9 * warranty of any kind, whether express or implied.
10 */
11
12/dts-v1/;
13
14/include/ "kirkwood-db.dtsi"
15/include/ "kirkwood-6281.dtsi"
16
17/ {
18 model = "Marvell DB-88F6281-BP Development Board";
19 compatible = "marvell,db-88f6281-bp", "marvell,kirkwood-88f6281", "marvell,kirkwood";
20
21 ocp@f1000000 {
22 pcie-controller {
23 status = "okay";
24
25 pcie@1,0 {
26 status = "okay";
27 };
28 };
29 };
30};
diff --git a/arch/arm/boot/dts/kirkwood-db-88f6282.dts b/arch/arm/boot/dts/kirkwood-db-88f6282.dts
new file mode 100644
index 000000000000..f4c852886d23
--- /dev/null
+++ b/arch/arm/boot/dts/kirkwood-db-88f6282.dts
@@ -0,0 +1,34 @@
1/*
2 * Marvell DB-88F6282-BP Development Board Setup
3 *
4 * Saeed Bishara <saeed@marvell.com>
5 * Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
6 *
7 * This file is licensed under the terms of the GNU General Public
8 * License version 2. This program is licensed "as is" without any
9 * warranty of any kind, whether express or implied.
10 */
11
12/dts-v1/;
13
14/include/ "kirkwood-db.dtsi"
15/include/ "kirkwood-6282.dtsi"
16
17/ {
18 model = "Marvell DB-88F6282-BP Development Board";
19 compatible = "marvell,db-88f6282-bp", "marvell,kirkwood-88f6282", "marvell,kirkwood";
20
21 ocp@f1000000 {
22 pcie-controller {
23 status = "okay";
24
25 pcie@1,0 {
26 status = "okay";
27 };
28
29 pcie@2,0 {
30 status = "okay";
31 };
32 };
33 };
34};
diff --git a/arch/arm/boot/dts/kirkwood-db.dtsi b/arch/arm/boot/dts/kirkwood-db.dtsi
new file mode 100644
index 000000000000..c87cfb816120
--- /dev/null
+++ b/arch/arm/boot/dts/kirkwood-db.dtsi
@@ -0,0 +1,89 @@
1/*
2 * Marvell DB-{88F6281,88F6282}-BP Development Board Setup
3 *
4 * Saeed Bishara <saeed@marvell.com>
5 * Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
6 *
7 * This file is licensed under the terms of the GNU General Public
8 * License version 2. This program is licensed "as is" without any
9 * warranty of any kind, whether express or implied.
10 *
11 * This file contains the definitions that are common between the 6281
12 * and 6282 variants of the Marvell Kirkwood Development Board.
13 */
14
15/include/ "kirkwood.dtsi"
16
17/ {
18 memory {
19 device_type = "memory";
20 reg = <0x00000000 0x20000000>; /* 512 MB */
21 };
22
23 chosen {
24 bootargs = "console=ttyS0,115200n8 earlyprintk";
25 };
26
27 ocp@f1000000 {
28 pinctrl@10000 {
29 pmx_sdio_gpios: pmx-sdio-gpios {
30 marvell,pins = "mpp37", "mpp38";
31 marvell,function = "gpio";
32 };
33 };
34
35 serial@12000 {
36 pinctrl-0 = <&pmx_uart0>;
37 pinctrl-names = "default";
38 clock-frequency = <200000000>;
39 status = "ok";
40 };
41
42 nand@3000000 {
43 pinctrl-0 = <&pmx_nand>;
44 pinctrl-names = "default";
45 chip-delay = <25>;
46 status = "okay";
47
48 partition@0 {
49 label = "uboot";
50 reg = <0x0 0x100000>;
51 };
52
53 partition@100000 {
54 label = "uImage";
55 reg = <0x100000 0x400000>;
56 };
57
58 partition@500000 {
59 label = "root";
60 reg = <0x500000 0x1fb00000>;
61 };
62 };
63
64 sata@80000 {
65 nr-ports = <2>;
66 status = "okay";
67 };
68
69 ehci@50000 {
70 status = "okay";
71 };
72
73 mvsdio@90000 {
74 pinctrl-0 = <&pmx_sdio_gpios>;
75 pinctrl-names = "default";
76 wp-gpios = <&gpio1 5 0>;
77 cd-gpios = <&gpio1 6 0>;
78 status = "okay";
79 };
80
81 pcie-controller {
82 status = "okay";
83
84 pcie@1,0 {
85 status = "okay";
86 };
87 };
88 };
89};
diff --git a/arch/arm/boot/dts/kirkwood-dns320.dts b/arch/arm/boot/dts/kirkwood-dns320.dts
index c9c44b2f62d7..14d4ceea3057 100644
--- a/arch/arm/boot/dts/kirkwood-dns320.dts
+++ b/arch/arm/boot/dts/kirkwood-dns320.dts
@@ -17,6 +17,11 @@
17 17
18 gpio-leds { 18 gpio-leds {
19 compatible = "gpio-leds"; 19 compatible = "gpio-leds";
20 pinctrl-0 = <&pmx_led_power &pmx_led_red_usb_320
21 &pmx_led_red_left_hdd &pmx_led_red_right_hdd
22 &pmx_led_white_usb>;
23 pinctrl-names = "default";
24
20 blue-power { 25 blue-power {
21 label = "dns320:blue:power"; 26 label = "dns320:blue:power";
22 gpios = <&gpio0 26 1>; /* GPIO 26 Active Low */ 27 gpios = <&gpio0 26 1>; /* GPIO 26 Active Low */
@@ -46,6 +51,8 @@
46 }; 51 };
47 52
48 serial@12100 { 53 serial@12100 {
54 pinctrl-0 = <&pmx_uart1>;
55 pinctrl-names = "default";
49 status = "okay"; 56 status = "okay";
50 }; 57 };
51 }; 58 };
diff --git a/arch/arm/boot/dts/kirkwood-dns325.dts b/arch/arm/boot/dts/kirkwood-dns325.dts
index e4e4930dc5cf..63872570e6ce 100644
--- a/arch/arm/boot/dts/kirkwood-dns325.dts
+++ b/arch/arm/boot/dts/kirkwood-dns325.dts
@@ -17,6 +17,11 @@
17 17
18 gpio-leds { 18 gpio-leds {
19 compatible = "gpio-leds"; 19 compatible = "gpio-leds";
20 pinctrl-0 = <&pmx_led_power &pmx_led_red_usb_325
21 &pmx_led_red_left_hdd &pmx_led_red_right_hdd
22 &pmx_led_white_usb>;
23 pinctrl-names = "default";
24
20 white-power { 25 white-power {
21 label = "dns325:white:power"; 26 label = "dns325:white:power";
22 gpios = <&gpio0 26 1>; /* GPIO 26 Active Low */ 27 gpios = <&gpio0 26 1>; /* GPIO 26 Active Low */
diff --git a/arch/arm/boot/dts/kirkwood-dnskw.dtsi b/arch/arm/boot/dts/kirkwood-dnskw.dtsi
index 6875ac00c174..0afe1d07c803 100644
--- a/arch/arm/boot/dts/kirkwood-dnskw.dtsi
+++ b/arch/arm/boot/dts/kirkwood-dnskw.dtsi
@@ -9,6 +9,10 @@
9 compatible = "gpio-keys"; 9 compatible = "gpio-keys";
10 #address-cells = <1>; 10 #address-cells = <1>;
11 #size-cells = <0>; 11 #size-cells = <0>;
12 pinctrl-0 = <&pmx_button_power &pmx_button_unmount
13 &pmx_button_reset>;
14 pinctrl-names = "default";
15
12 button@1 { 16 button@1 {
13 label = "Power button"; 17 label = "Power button";
14 linux,code = <116>; 18 linux,code = <116>;
@@ -29,6 +33,8 @@
29 gpio_fan { 33 gpio_fan {
30 /* Fan: ADDA AD045HB-G73 40mm 6000rpm@5v */ 34 /* Fan: ADDA AD045HB-G73 40mm 6000rpm@5v */
31 compatible = "gpio-fan"; 35 compatible = "gpio-fan";
36 pinctrl-0 = <&pmx_fan_high_speed &pmx_fan_low_speed>;
37 pinctrl-names = "default";
32 gpios = <&gpio1 14 1 38 gpios = <&gpio1 14 1
33 &gpio1 13 1>; 39 &gpio1 13 1>;
34 gpio-fan,speed-map = <0 0 40 gpio-fan,speed-map = <0 0
@@ -38,27 +44,17 @@
38 44
39 gpio_poweroff { 45 gpio_poweroff {
40 compatible = "gpio-poweroff"; 46 compatible = "gpio-poweroff";
47 pinctrl-0 = <&pmx_power_off>;
48 pinctrl-names = "default";
41 gpios = <&gpio1 4 0>; 49 gpios = <&gpio1 4 0>;
42 }; 50 };
43 51
44 ocp@f1000000 { 52 ocp@f1000000 {
45 pinctrl: pinctrl@10000 { 53 pinctrl: pinctrl@10000 {
46 54
47 pinctrl-0 = < &pmx_nand &pmx_uart1 55 pinctrl-0 = <&pmx_power_back_on &pmx_present_sata0
48 &pmx_sata0 &pmx_sata1 56 &pmx_present_sata1 &pmx_fan_tacho
49 &pmx_led_power 57 &pmx_temp_alarm>;
50 &pmx_led_red_right_hdd
51 &pmx_led_red_left_hdd
52 &pmx_led_red_usb_325
53 &pmx_button_power
54 &pmx_led_red_usb_320
55 &pmx_power_off &pmx_power_back_on
56 &pmx_power_sata0 &pmx_power_sata1
57 &pmx_present_sata0 &pmx_present_sata1
58 &pmx_led_white_usb &pmx_fan_tacho
59 &pmx_fan_high_speed &pmx_fan_low_speed
60 &pmx_button_unmount &pmx_button_reset
61 &pmx_temp_alarm >;
62 pinctrl-names = "default"; 58 pinctrl-names = "default";
63 59
64 pmx_sata0: pmx-sata0 { 60 pmx_sata0: pmx-sata0 {
@@ -147,11 +143,15 @@
147 }; 143 };
148 }; 144 };
149 sata@80000 { 145 sata@80000 {
146 pinctrl-0 = <&pmx_sata0 &pmx_sata1>;
147 pinctrl-names = "default";
150 status = "okay"; 148 status = "okay";
151 nr-ports = <2>; 149 nr-ports = <2>;
152 }; 150 };
153 151
154 nand@3000000 { 152 nand@3000000 {
153 pinctrl-0 = <&pmx_nand>;
154 pinctrl-names = "default";
155 status = "okay"; 155 status = "okay";
156 chip-delay = <35>; 156 chip-delay = <35>;
157 157
@@ -192,6 +192,8 @@
192 compatible = "simple-bus"; 192 compatible = "simple-bus";
193 #address-cells = <1>; 193 #address-cells = <1>;
194 #size-cells = <0>; 194 #size-cells = <0>;
195 pinctrl-0 = <&pmx_power_sata0 &pmx_power_sata1>;
196 pinctrl-names = "default";
195 197
196 sata0_power: regulator@1 { 198 sata0_power: regulator@1 {
197 compatible = "regulator-fixed"; 199 compatible = "regulator-fixed";
diff --git a/arch/arm/boot/dts/kirkwood-dockstar.dts b/arch/arm/boot/dts/kirkwood-dockstar.dts
index 0196cf6b0ef2..7714742bb8d8 100644
--- a/arch/arm/boot/dts/kirkwood-dockstar.dts
+++ b/arch/arm/boot/dts/kirkwood-dockstar.dts
@@ -18,11 +18,6 @@
18 18
19 ocp@f1000000 { 19 ocp@f1000000 {
20 pinctrl: pinctrl@10000 { 20 pinctrl: pinctrl@10000 {
21
22 pinctrl-0 = < &pmx_usb_power_enable
23 &pmx_led_green &pmx_led_orange >;
24 pinctrl-names = "default";
25
26 pmx_usb_power_enable: pmx-usb-power-enable { 21 pmx_usb_power_enable: pmx-usb-power-enable {
27 marvell,pins = "mpp29"; 22 marvell,pins = "mpp29";
28 marvell,function = "gpio"; 23 marvell,function = "gpio";
@@ -62,6 +57,8 @@
62 }; 57 };
63 gpio-leds { 58 gpio-leds {
64 compatible = "gpio-leds"; 59 compatible = "gpio-leds";
60 pinctrl-0 = <&pmx_led_green &pmx_led_orange>;
61 pinctrl-names = "default";
65 62
66 health { 63 health {
67 label = "status:green:health"; 64 label = "status:green:health";
@@ -77,6 +74,8 @@
77 compatible = "simple-bus"; 74 compatible = "simple-bus";
78 #address-cells = <1>; 75 #address-cells = <1>;
79 #size-cells = <0>; 76 #size-cells = <0>;
77 pinctrl-0 = <&pmx_usb_power_enable>;
78 pinctrl-names = "default";
80 79
81 usb_power: regulator@1 { 80 usb_power: regulator@1 {
82 compatible = "regulator-fixed"; 81 compatible = "regulator-fixed";
diff --git a/arch/arm/boot/dts/kirkwood-dreamplug.dts b/arch/arm/boot/dts/kirkwood-dreamplug.dts
index 289e51d86372..36c7ba38d500 100644
--- a/arch/arm/boot/dts/kirkwood-dreamplug.dts
+++ b/arch/arm/boot/dts/kirkwood-dreamplug.dts
@@ -18,12 +18,6 @@
18 18
19 ocp@f1000000 { 19 ocp@f1000000 {
20 pinctrl: pinctrl@10000 { 20 pinctrl: pinctrl@10000 {
21
22 pinctrl-0 = < &pmx_spi
23 &pmx_led_bluetooth &pmx_led_wifi
24 &pmx_led_wifi_ap >;
25 pinctrl-names = "default";
26
27 pmx_led_bluetooth: pmx-led-bluetooth { 21 pmx_led_bluetooth: pmx-led-bluetooth {
28 marvell,pins = "mpp47"; 22 marvell,pins = "mpp47";
29 marvell,function = "gpio"; 23 marvell,function = "gpio";
@@ -43,6 +37,8 @@
43 37
44 spi@10600 { 38 spi@10600 {
45 status = "okay"; 39 status = "okay";
40 pinctrl-0 = <&pmx_spi>;
41 pinctrl-names = "default";
46 42
47 m25p40@0 { 43 m25p40@0 {
48 #address-cells = <1>; 44 #address-cells = <1>;
@@ -79,11 +75,15 @@
79 pinctrl-names = "default"; 75 pinctrl-names = "default";
80 status = "okay"; 76 status = "okay";
81 /* No CD or WP GPIOs */ 77 /* No CD or WP GPIOs */
78 broken-cd;
82 }; 79 };
83 }; 80 };
84 81
85 gpio-leds { 82 gpio-leds {
86 compatible = "gpio-leds"; 83 compatible = "gpio-leds";
84 pinctrl-0 = <&pmx_led_bluetooth &pmx_led_wifi
85 &pmx_led_wifi_ap >;
86 pinctrl-names = "default";
87 87
88 bluetooth { 88 bluetooth {
89 label = "dreamplug:blue:bluetooth"; 89 label = "dreamplug:blue:bluetooth";
diff --git a/arch/arm/boot/dts/kirkwood-goflexnet.dts b/arch/arm/boot/dts/kirkwood-goflexnet.dts
index c3573be7b92c..31caa6405065 100644
--- a/arch/arm/boot/dts/kirkwood-goflexnet.dts
+++ b/arch/arm/boot/dts/kirkwood-goflexnet.dts
@@ -18,15 +18,6 @@
18 18
19 ocp@f1000000 { 19 ocp@f1000000 {
20 pinctrl: pinctrl@10000 { 20 pinctrl: pinctrl@10000 {
21
22 pinctrl-0 = < &pmx_usb_power_enable &pmx_led_orange
23 &pmx_led_left_cap_0 &pmx_led_left_cap_1
24 &pmx_led_left_cap_2 &pmx_led_left_cap_3
25 &pmx_led_right_cap_0 &pmx_led_right_cap_1
26 &pmx_led_right_cap_2 &pmx_led_right_cap_3
27 >;
28 pinctrl-names = "default";
29
30 pmx_usb_power_enable: pmx-usb-power-enable { 21 pmx_usb_power_enable: pmx-usb-power-enable {
31 marvell,pins = "mpp29"; 22 marvell,pins = "mpp29";
32 marvell,function = "gpio"; 23 marvell,function = "gpio";
@@ -109,6 +100,13 @@
109 }; 100 };
110 gpio-leds { 101 gpio-leds {
111 compatible = "gpio-leds"; 102 compatible = "gpio-leds";
103 pinctrl-0 = < &pmx_led_orange
104 &pmx_led_left_cap_0 &pmx_led_left_cap_1
105 &pmx_led_left_cap_2 &pmx_led_left_cap_3
106 &pmx_led_right_cap_0 &pmx_led_right_cap_1
107 &pmx_led_right_cap_2 &pmx_led_right_cap_3
108 >;
109 pinctrl-names = "default";
112 110
113 health { 111 health {
114 label = "status:green:health"; 112 label = "status:green:health";
@@ -156,6 +154,8 @@
156 compatible = "simple-bus"; 154 compatible = "simple-bus";
157 #address-cells = <1>; 155 #address-cells = <1>;
158 #size-cells = <0>; 156 #size-cells = <0>;
157 pinctrl-0 = <&pmx_usb_power_enable>;
158 pinctrl-names = "default";
159 159
160 usb_power: regulator@1 { 160 usb_power: regulator@1 {
161 compatible = "regulator-fixed"; 161 compatible = "regulator-fixed";
diff --git a/arch/arm/boot/dts/kirkwood-guruplug-server-plus.dts b/arch/arm/boot/dts/kirkwood-guruplug-server-plus.dts
index 44fd97dfc1f3..1e642f39b154 100644
--- a/arch/arm/boot/dts/kirkwood-guruplug-server-plus.dts
+++ b/arch/arm/boot/dts/kirkwood-guruplug-server-plus.dts
@@ -18,11 +18,6 @@
18 18
19 ocp@f1000000 { 19 ocp@f1000000 {
20 pinctrl: pinctrl@10000 { 20 pinctrl: pinctrl@10000 {
21
22 pinctrl-0 = < &pmx_led_health_r &pmx_led_health_g
23 &pmx_led_wmode_r &pmx_led_wmode_g >;
24 pinctrl-names = "default";
25
26 pmx_led_health_r: pmx-led-health-r { 21 pmx_led_health_r: pmx-led-health-r {
27 marvell,pins = "mpp46"; 22 marvell,pins = "mpp46";
28 marvell,function = "gpio"; 23 marvell,function = "gpio";
@@ -72,11 +67,16 @@
72 67
73 mvsdio@90000 { 68 mvsdio@90000 {
74 status = "okay"; 69 status = "okay";
70 /* No CD or WP GPIOs */
71 broken-cd;
75 }; 72 };
76 }; 73 };
77 74
78 gpio-leds { 75 gpio-leds {
79 compatible = "gpio-leds"; 76 compatible = "gpio-leds";
77 pinctrl-0 = < &pmx_led_health_r &pmx_led_health_g
78 &pmx_led_wmode_r &pmx_led_wmode_g >;
79 pinctrl-names = "default";
80 80
81 health-r { 81 health-r {
82 label = "guruplug:red:health"; 82 label = "guruplug:red:health";
diff --git a/arch/arm/boot/dts/kirkwood-ib62x0.dts b/arch/arm/boot/dts/kirkwood-ib62x0.dts
index 5335b1aa8601..20c4b081f420 100644
--- a/arch/arm/boot/dts/kirkwood-ib62x0.dts
+++ b/arch/arm/boot/dts/kirkwood-ib62x0.dts
@@ -18,13 +18,6 @@
18 18
19 ocp@f1000000 { 19 ocp@f1000000 {
20 pinctrl: pinctrl@10000 { 20 pinctrl: pinctrl@10000 {
21
22 pinctrl-0 = < &pmx_nand
23 &pmx_led_os_red &pmx_power_off
24 &pmx_led_os_green &pmx_led_usb_transfer
25 &pmx_button_reset &pmx_button_usb_copy >;
26 pinctrl-names = "default";
27
28 pmx_led_os_red: pmx-led-os-red { 21 pmx_led_os_red: pmx-led-os-red {
29 marvell,pins = "mpp22"; 22 marvell,pins = "mpp22";
30 marvell,function = "gpio"; 23 marvell,function = "gpio";
@@ -61,6 +54,8 @@
61 54
62 nand@3000000 { 55 nand@3000000 {
63 status = "okay"; 56 status = "okay";
57 pinctrl-0 = <&pmx_nand>;
58 pinctrl-names = "default";
64 59
65 partition@0 { 60 partition@0 {
66 label = "u-boot"; 61 label = "u-boot";
@@ -84,6 +79,9 @@
84 compatible = "gpio-keys"; 79 compatible = "gpio-keys";
85 #address-cells = <1>; 80 #address-cells = <1>;
86 #size-cells = <0>; 81 #size-cells = <0>;
82 pinctrl-0 = <&pmx_button_reset &pmx_button_usb_copy>;
83 pinctrl-names = "default";
84
87 button@1 { 85 button@1 {
88 label = "USB Copy"; 86 label = "USB Copy";
89 linux,code = <133>; 87 linux,code = <133>;
@@ -97,6 +95,9 @@
97 }; 95 };
98 gpio-leds { 96 gpio-leds {
99 compatible = "gpio-leds"; 97 compatible = "gpio-leds";
98 pinctrl-0 = <&pmx_led_os_red &pmx_led_os_green
99 &pmx_led_usb_transfer>;
100 pinctrl-names = "default";
100 101
101 green-os { 102 green-os {
102 label = "ib62x0:green:os"; 103 label = "ib62x0:green:os";
@@ -114,6 +115,8 @@
114 }; 115 };
115 gpio_poweroff { 116 gpio_poweroff {
116 compatible = "gpio-poweroff"; 117 compatible = "gpio-poweroff";
118 pinctrl-0 = <&pmx_power_off>;
119 pinctrl-names = "default";
117 gpios = <&gpio0 24 0>; 120 gpios = <&gpio0 24 0>;
118 }; 121 };
119 122
diff --git a/arch/arm/boot/dts/kirkwood-iconnect.dts b/arch/arm/boot/dts/kirkwood-iconnect.dts
index 12ccf74ac3c4..441204e8abc6 100644
--- a/arch/arm/boot/dts/kirkwood-iconnect.dts
+++ b/arch/arm/boot/dts/kirkwood-iconnect.dts
@@ -20,51 +20,43 @@
20 20
21 ocp@f1000000 { 21 ocp@f1000000 {
22 pinctrl: pinctrl@10000 { 22 pinctrl: pinctrl@10000 {
23 23 pmx_button_reset: pmx-button-reset {
24 pinctrl-0 = < &pmx_gpio_12 &pmx_gpio_35
25 &pmx_gpio_41 &pmx_gpio_42
26 &pmx_gpio_43 &pmx_gpio_44
27 &pmx_gpio_45 &pmx_gpio_46
28 &pmx_gpio_47 &pmx_gpio_48 >;
29 pinctrl-names = "default";
30
31 pmx_gpio_12: pmx-gpio-12 {
32 marvell,pins = "mpp12"; 24 marvell,pins = "mpp12";
33 marvell,function = "gpio"; 25 marvell,function = "gpio";
34 }; 26 };
35 pmx_gpio_35: pmx-gpio-35 { 27 pmx_button_otb: pmx-button-otb {
36 marvell,pins = "mpp35"; 28 marvell,pins = "mpp35";
37 marvell,function = "gpio"; 29 marvell,function = "gpio";
38 }; 30 };
39 pmx_gpio_41: pmx-gpio-41 { 31 pmx_led_level: pmx-led-level {
40 marvell,pins = "mpp41"; 32 marvell,pins = "mpp41";
41 marvell,function = "gpio"; 33 marvell,function = "gpio";
42 }; 34 };
43 pmx_gpio_42: pmx-gpio-42 { 35 pmx_led_power_blue: pmx-led-power-blue {
44 marvell,pins = "mpp42"; 36 marvell,pins = "mpp42";
45 marvell,function = "gpio"; 37 marvell,function = "gpio";
46 }; 38 };
47 pmx_gpio_43: pmx-gpio-43 { 39 pmx_led_power_red: pmx-power-red {
48 marvell,pins = "mpp43"; 40 marvell,pins = "mpp43";
49 marvell,function = "gpio"; 41 marvell,function = "gpio";
50 }; 42 };
51 pmx_gpio_44: pmx-gpio-44 { 43 pmx_led_usb1: pmx-led-usb1 {
52 marvell,pins = "mpp44"; 44 marvell,pins = "mpp44";
53 marvell,function = "gpio"; 45 marvell,function = "gpio";
54 }; 46 };
55 pmx_gpio_45: pmx-gpio-45 { 47 pmx_led_usb2: pmx-led-usb2 {
56 marvell,pins = "mpp45"; 48 marvell,pins = "mpp45";
57 marvell,function = "gpio"; 49 marvell,function = "gpio";
58 }; 50 };
59 pmx_gpio_46: pmx-gpio-46 { 51 pmx_led_usb3: pmx-led-usb3 {
60 marvell,pins = "mpp46"; 52 marvell,pins = "mpp46";
61 marvell,function = "gpio"; 53 marvell,function = "gpio";
62 }; 54 };
63 pmx_gpio_47: pmx-gpio-47 { 55 pmx_led_usb4: pmx-led-usb4 {
64 marvell,pins = "mpp47"; 56 marvell,pins = "mpp47";
65 marvell,function = "gpio"; 57 marvell,function = "gpio";
66 }; 58 };
67 pmx_gpio_48: pmx-gpio-48 { 59 pmx_led_otb: pmx-led-otb {
68 marvell,pins = "mpp48"; 60 marvell,pins = "mpp48";
69 marvell,function = "gpio"; 61 marvell,function = "gpio";
70 }; 62 };
@@ -109,10 +101,23 @@
109 reg = <0x980000 0x1f400000>; 101 reg = <0x980000 0x1f400000>;
110 }; 102 };
111 }; 103 };
104
105 pcie-controller {
106 status = "okay";
107
108 pcie@1,0 {
109 status = "okay";
110 };
111 };
112 }; 112 };
113 113
114 gpio-leds { 114 gpio-leds {
115 compatible = "gpio-leds"; 115 compatible = "gpio-leds";
116 pinctrl-0 = < &pmx_led_level &pmx_led_power_blue
117 &pmx_led_power_red &pmx_led_usb1
118 &pmx_led_usb2 &pmx_led_usb3
119 &pmx_led_usb4 &pmx_led_otb >;
120 pinctrl-names = "default";
116 121
117 led-level { 122 led-level {
118 label = "led_level"; 123 label = "led_level";
@@ -154,6 +159,9 @@
154 compatible = "gpio-keys"; 159 compatible = "gpio-keys";
155 #address-cells = <1>; 160 #address-cells = <1>;
156 #size-cells = <0>; 161 #size-cells = <0>;
162 pinctrl-0 = < &pmx_button_reset &pmx_button_otb >;
163 pinctrl-names = "default";
164
157 button@1 { 165 button@1 {
158 label = "OTB Button"; 166 label = "OTB Button";
159 linux,code = <133>; 167 linux,code = <133>;
diff --git a/arch/arm/boot/dts/kirkwood-iomega_ix2_200.dts b/arch/arm/boot/dts/kirkwood-iomega_ix2_200.dts
index 3694e94f6e99..00a7bfe5e83b 100644
--- a/arch/arm/boot/dts/kirkwood-iomega_ix2_200.dts
+++ b/arch/arm/boot/dts/kirkwood-iomega_ix2_200.dts
@@ -18,12 +18,7 @@
18 18
19 ocp@f1000000 { 19 ocp@f1000000 {
20 pinctrl: pinctrl@10000 { 20 pinctrl: pinctrl@10000 {
21 21 pinctrl-0 = < &pmx_led_sata_brt_ctrl_1
22 pinctrl-0 = < &pmx_button_reset &pmx_button_power
23 &pmx_led_backup &pmx_led_power
24 &pmx_button_otb &pmx_led_rebuild
25 &pmx_led_health
26 &pmx_led_sata_brt_ctrl_1
27 &pmx_led_sata_brt_ctrl_2 22 &pmx_led_sata_brt_ctrl_2
28 &pmx_led_backup_brt_ctrl_1 23 &pmx_led_backup_brt_ctrl_1
29 &pmx_led_backup_brt_ctrl_2 24 &pmx_led_backup_brt_ctrl_2
@@ -151,6 +146,9 @@
151 }; 146 };
152 gpio-leds { 147 gpio-leds {
153 compatible = "gpio-leds"; 148 compatible = "gpio-leds";
149 pinctrl-0 = < &pmx_led_backup &pmx_led_power
150 &pmx_led_rebuild &pmx_led_health >;
151 pinctrl-names = "default";
154 152
155 power_led { 153 power_led {
156 label = "status:white:power_led"; 154 label = "status:white:power_led";
@@ -174,6 +172,11 @@
174 compatible = "gpio-keys"; 172 compatible = "gpio-keys";
175 #address-cells = <1>; 173 #address-cells = <1>;
176 #size-cells = <0>; 174 #size-cells = <0>;
175 pinctrl-0 = <&pmx_button_reset &pmx_button_power
176 &pmx_button_otb>;
177 pinctrl-names = "default";
178
179
177 Power { 180 Power {
178 label = "Power Button"; 181 label = "Power Button";
179 linux,code = <116>; 182 linux,code = <116>;
diff --git a/arch/arm/boot/dts/kirkwood-is2.dts b/arch/arm/boot/dts/kirkwood-is2.dts
index 0bdce0ad7277..c3f036b86cca 100644
--- a/arch/arm/boot/dts/kirkwood-is2.dts
+++ b/arch/arm/boot/dts/kirkwood-is2.dts
@@ -13,6 +13,8 @@
13 13
14 ocp@f1000000 { 14 ocp@f1000000 {
15 sata@80000 { 15 sata@80000 {
16 pinctrl-0 = <&pmx_ns2_sata0>;
17 pinctrl-names = "default";
16 status = "okay"; 18 status = "okay";
17 nr-ports = <1>; 19 nr-ports = <1>;
18 }; 20 };
diff --git a/arch/arm/boot/dts/kirkwood-km_kirkwood.dts b/arch/arm/boot/dts/kirkwood-km_kirkwood.dts
index 5bbd0542cdd3..5d9f5ea78700 100644
--- a/arch/arm/boot/dts/kirkwood-km_kirkwood.dts
+++ b/arch/arm/boot/dts/kirkwood-km_kirkwood.dts
@@ -18,9 +18,7 @@
18 18
19 ocp@f1000000 { 19 ocp@f1000000 {
20 pinctrl: pinctrl@10000 { 20 pinctrl: pinctrl@10000 {
21 21 pinctrl-0 = < &pmx_i2c_gpio_sda &pmx_i2c_gpio_scl >;
22 pinctrl-0 = < &pmx_nand &pmx_i2c_gpio_sda
23 &pmx_i2c_gpio_scl >;
24 pinctrl-names = "default"; 22 pinctrl-names = "default";
25 23
26 pmx_i2c_gpio_sda: pmx-gpio-sda { 24 pmx_i2c_gpio_sda: pmx-gpio-sda {
@@ -38,8 +36,17 @@
38 }; 36 };
39 37
40 nand@3000000 { 38 nand@3000000 {
39 pinctrl-0 = <&pmx_nand>;
40 pinctrl-names = "default";
41 status = "ok"; 41 status = "ok";
42 chip-delay = <25>; 42 chip-delay = <25>;
43 }; 43 };
44 }; 44 };
45
46 i2c@0 {
47 compatible = "i2c-gpio";
48 gpios = < &gpio0 8 0 /* sda */
49 &gpio0 9 0 >; /* scl */
50 i2c-gpio,delay-us = <2>; /* ~100 kHz */
51 };
45}; 52};
diff --git a/arch/arm/boot/dts/kirkwood-lsxl.dtsi b/arch/arm/boot/dts/kirkwood-lsxl.dtsi
index 37d45c4f88fb..31b17f5b9d28 100644
--- a/arch/arm/boot/dts/kirkwood-lsxl.dtsi
+++ b/arch/arm/boot/dts/kirkwood-lsxl.dtsi
@@ -8,16 +8,6 @@
8 8
9 ocp@f1000000 { 9 ocp@f1000000 {
10 pinctrl: pinctrl@10000 { 10 pinctrl: pinctrl@10000 {
11
12 pinctrl-0 = < &pmx_power_hdd &pmx_usb_vbus
13 &pmx_fan_low &pmx_fan_high
14 &pmx_led_function_red &pmx_led_alarm
15 &pmx_led_info &pmx_led_power
16 &pmx_fan_lock &pmx_button_function
17 &pmx_power_switch &pmx_power_auto_switch
18 &pmx_led_function_blue >;
19 pinctrl-names = "default";
20
21 pmx_power_hdd: pmx-power-hdd { 11 pmx_power_hdd: pmx-power-hdd {
22 marvell,pins = "mpp10"; 12 marvell,pins = "mpp10";
23 marvell,function = "gpo"; 13 marvell,function = "gpo";
@@ -112,6 +102,10 @@
112 compatible = "gpio-keys"; 102 compatible = "gpio-keys";
113 #address-cells = <1>; 103 #address-cells = <1>;
114 #size-cells = <0>; 104 #size-cells = <0>;
105 pinctrl-0 = <&pmx_button_function &pmx_power_switch
106 &pmx_power_auto_switch>;
107 pinctrl-names = "default";
108
115 button@1 { 109 button@1 {
116 label = "Function Button"; 110 label = "Function Button";
117 linux,code = <357>; 111 linux,code = <357>;
@@ -133,6 +127,10 @@
133 127
134 gpio_leds { 128 gpio_leds {
135 compatible = "gpio-leds"; 129 compatible = "gpio-leds";
130 pinctrl-0 = <&pmx_led_function_red &pmx_led_alarm
131 &pmx_led_info &pmx_led_power
132 &pmx_led_function_blue>;
133 pinctrl-names = "default";
136 134
137 led@1 { 135 led@1 {
138 label = "lsxl:blue:func"; 136 label = "lsxl:blue:func";
@@ -163,6 +161,8 @@
163 161
164 gpio_fan { 162 gpio_fan {
165 compatible = "gpio-fan"; 163 compatible = "gpio-fan";
164 pinctrl-0 = <&pmx_fan_low &pmx_fan_high &pmx_fan_lock>;
165 pinctrl-names = "default";
166 gpios = <&gpio0 19 1 166 gpios = <&gpio0 19 1
167 &gpio0 18 1>; 167 &gpio0 18 1>;
168 gpio-fan,speed-map = <0 3 168 gpio-fan,speed-map = <0 3
@@ -172,10 +172,16 @@
172 alarm-gpios = <&gpio1 8 0>; 172 alarm-gpios = <&gpio1 8 0>;
173 }; 173 };
174 174
175 restart_poweroff {
176 compatible = "restart-poweroff";
177 };
178
175 regulators { 179 regulators {
176 compatible = "simple-bus"; 180 compatible = "simple-bus";
177 #address-cells = <1>; 181 #address-cells = <1>;
178 #size-cells = <0>; 182 #size-cells = <0>;
183 pinctrl-0 = <&pmx_power_hdd &pmx_usb_vbus>;
184 pinctrl-names = "default";
179 185
180 usb_power: regulator@1 { 186 usb_power: regulator@1 {
181 compatible = "regulator-fixed"; 187 compatible = "regulator-fixed";
diff --git a/arch/arm/boot/dts/kirkwood-mplcec4.dts b/arch/arm/boot/dts/kirkwood-mplcec4.dts
index 758824118a9a..6179333fd71f 100644
--- a/arch/arm/boot/dts/kirkwood-mplcec4.dts
+++ b/arch/arm/boot/dts/kirkwood-mplcec4.dts
@@ -18,16 +18,6 @@
18 18
19 ocp@f1000000 { 19 ocp@f1000000 {
20 pinctrl: pinctrl@10000 { 20 pinctrl: pinctrl@10000 {
21
22 pinctrl-0 = < &pmx_nand &pmx_uart0
23 &pmx_led_health
24 &pmx_sata0 &pmx_sata1
25 &pmx_led_user1o
26 &pmx_led_user1g &pmx_led_user0o
27 &pmx_led_user0g &pmx_led_misc
28 >;
29 pinctrl-names = "default";
30
31 pmx_led_health: pmx-led-health { 21 pmx_led_health: pmx-led-health {
32 marvell,pins = "mpp7"; 22 marvell,pins = "mpp7";
33 marvell,function = "gpo"; 23 marvell,function = "gpo";
@@ -91,9 +81,13 @@
91 81
92 serial@12000 { 82 serial@12000 {
93 status = "ok"; 83 status = "ok";
84 pinctrl-0 = <&pmx_uart0>;
85 pinctrl-names = "default";
94 }; 86 };
95 87
96 nand@3000000 { 88 nand@3000000 {
89 pinctrl-0 = <&pmx_nand>;
90 pinctrl-names = "default";
97 status = "okay"; 91 status = "okay";
98 92
99 partition@0 { 93 partition@0 {
@@ -127,22 +121,37 @@
127 }; 121 };
128 122
129 sata@80000 { 123 sata@80000 {
124 pinctrl-0 = <&pmx_sata0 &pmx_sata1>;
125 pinctrl-names = "default";
130 nr-ports = <2>; 126 nr-ports = <2>;
131 status = "okay"; 127 status = "okay";
132
133 }; 128 };
134 129
135 mvsdio@90000 { 130 mvsdio@90000 {
136 pinctrl-0 = <&pmx_sdio &pmx_sdio_cd>; 131 pinctrl-0 = <&pmx_sdio &pmx_sdio_cd>;
137 pinctrl-names = "default"; 132 pinctrl-names = "default";
138 status = "okay"; 133 status = "okay";
139 cd-gpios = <&gpio1 15 0>; 134 cd-gpios = <&gpio1 15 1>;
140 /* No WP GPIO */ 135 /* No WP GPIO */
141 }; 136 };
137
138 pcie-controller {
139 status = "okay";
140
141 pcie@1,0 {
142 status = "okay";
143 };
144 };
142 }; 145 };
143 146
144 gpio-leds { 147 gpio-leds {
145 compatible = "gpio-leds"; 148 compatible = "gpio-leds";
149 pinctrl-0 = < &pmx_led_health
150 &pmx_led_user1o
151 &pmx_led_user1g &pmx_led_user0o
152 &pmx_led_user0g &pmx_led_misc
153 >;
154 pinctrl-names = "default";
146 155
147 health { 156 health {
148 label = "status:green:health"; 157 label = "status:green:health";
diff --git a/arch/arm/boot/dts/kirkwood-netgear_readynas_duo_v2.dts b/arch/arm/boot/dts/kirkwood-netgear_readynas_duo_v2.dts
index 1ca66ab83ad6..ad6ade7d9191 100644
--- a/arch/arm/boot/dts/kirkwood-netgear_readynas_duo_v2.dts
+++ b/arch/arm/boot/dts/kirkwood-netgear_readynas_duo_v2.dts
@@ -18,18 +18,6 @@
18 18
19 ocp@f1000000 { 19 ocp@f1000000 {
20 pinctrl: pinctrl@10000 { 20 pinctrl: pinctrl@10000 {
21
22 pinctrl-0 = < &pmx_uart0
23 &pmx_button_power
24 &pmx_button_backup
25 &pmx_button_reset
26 &pmx_led_blue_power
27 &pmx_led_blue_activity
28 &pmx_led_blue_disk1
29 &pmx_led_blue_disk2
30 &pmx_led_blue_backup >;
31 pinctrl-names = "default";
32
33 pmx_button_power: pmx-button-power { 21 pmx_button_power: pmx-button-power {
34 marvell,pins = "mpp47"; 22 marvell,pins = "mpp47";
35 marvell,function = "gpio"; 23 marvell,function = "gpio";
@@ -74,6 +62,8 @@
74 }; 62 };
75 63
76 serial@12000 { 64 serial@12000 {
65 pinctrl-0 = <&pmx_uart0>;
66 pinctrl-names = "default";
77 status = "okay"; 67 status = "okay";
78 }; 68 };
79 69
@@ -111,10 +101,22 @@
111 status = "okay"; 101 status = "okay";
112 nr-ports = <2>; 102 nr-ports = <2>;
113 }; 103 };
104
105 pcie-controller {
106 status = "okay";
107
108 pcie@1,0 {
109 status = "okay";
110 };
111 };
114 }; 112 };
115 113
116 gpio-leds { 114 gpio-leds {
117 compatible = "gpio-leds"; 115 compatible = "gpio-leds";
116 pinctrl-0 = < &pmx_led_blue_power &pmx_led_blue_activity
117 &pmx_led_blue_disk1 &pmx_led_blue_disk2
118 &pmx_led_blue_backup >;
119 pinctrl-names = "default";
118 120
119 power_led { 121 power_led {
120 label = "status:blue:power_led"; 122 label = "status:blue:power_led";
@@ -143,6 +145,10 @@
143 compatible = "gpio-keys"; 145 compatible = "gpio-keys";
144 #address-cells = <1>; 146 #address-cells = <1>;
145 #size-cells = <0>; 147 #size-cells = <0>;
148 pinctrl-0 = <&pmx_button_power &pmx_button_backup
149 &pmx_button_reset>;
150 pinctrl-names = "default";
151
146 button@1 { 152 button@1 {
147 label = "Power Button"; 153 label = "Power Button";
148 linux,code = <116>; /* KEY_POWER */ 154 linux,code = <116>; /* KEY_POWER */
diff --git a/arch/arm/boot/dts/kirkwood-ns2-common.dtsi b/arch/arm/boot/dts/kirkwood-ns2-common.dtsi
index 6affd924fe11..2afac0405816 100644
--- a/arch/arm/boot/dts/kirkwood-ns2-common.dtsi
+++ b/arch/arm/boot/dts/kirkwood-ns2-common.dtsi
@@ -8,10 +8,6 @@
8 8
9 ocp@f1000000 { 9 ocp@f1000000 {
10 pinctrl: pinctrl@10000 { 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 { 11 pmx_ns2_sata0: pmx-ns2-sata0 {
16 marvell,pins = "mpp21"; 12 marvell,pins = "mpp21";
17 marvell,function = "sata0"; 13 marvell,function = "sata0";
@@ -23,10 +19,14 @@
23 }; 19 };
24 20
25 serial@12000 { 21 serial@12000 {
22 pinctrl-0 = <&pmx_uart0>;
23 pinctrl-names = "default";
26 status = "okay"; 24 status = "okay";
27 }; 25 };
28 26
29 spi@10600 { 27 spi@10600 {
28 pinctrl-0 = <&pmx_spi>;
29 pinctrl-names = "default";
30 status = "okay"; 30 status = "okay";
31 31
32 flash@0 { 32 flash@0 {
@@ -45,6 +45,8 @@
45 }; 45 };
46 46
47 i2c@11000 { 47 i2c@11000 {
48 pinctrl-0 = <&pmx_twsi0>;
49 pinctrl-names = "default";
48 status = "okay"; 50 status = "okay";
49 51
50 eeprom@50 { 52 eeprom@50 {
diff --git a/arch/arm/boot/dts/kirkwood-ns2.dts b/arch/arm/boot/dts/kirkwood-ns2.dts
index f2d36ecf36d8..b50e93d7796c 100644
--- a/arch/arm/boot/dts/kirkwood-ns2.dts
+++ b/arch/arm/boot/dts/kirkwood-ns2.dts
@@ -13,6 +13,8 @@
13 13
14 ocp@f1000000 { 14 ocp@f1000000 {
15 sata@80000 { 15 sata@80000 {
16 pinctrl-0 = <&pmx_ns2_sata0>;
17 pinctrl-names = "default";
16 status = "okay"; 18 status = "okay";
17 nr-ports = <1>; 19 nr-ports = <1>;
18 }; 20 };
diff --git a/arch/arm/boot/dts/kirkwood-ns2lite.dts b/arch/arm/boot/dts/kirkwood-ns2lite.dts
index b02eb4ea1bb4..af8259fe8955 100644
--- a/arch/arm/boot/dts/kirkwood-ns2lite.dts
+++ b/arch/arm/boot/dts/kirkwood-ns2lite.dts
@@ -13,6 +13,8 @@
13 13
14 ocp@f1000000 { 14 ocp@f1000000 {
15 sata@80000 { 15 sata@80000 {
16 pinctrl-0 = <&pmx_ns2_sata0>;
17 pinctrl-names = "default";
16 status = "okay"; 18 status = "okay";
17 nr-ports = <1>; 19 nr-ports = <1>;
18 }; 20 };
diff --git a/arch/arm/boot/dts/kirkwood-ns2max.dts b/arch/arm/boot/dts/kirkwood-ns2max.dts
index bcec4d6cada7..85f24d227e17 100644
--- a/arch/arm/boot/dts/kirkwood-ns2max.dts
+++ b/arch/arm/boot/dts/kirkwood-ns2max.dts
@@ -13,6 +13,8 @@
13 13
14 ocp@f1000000 { 14 ocp@f1000000 {
15 sata@80000 { 15 sata@80000 {
16 pinctrl-0 = <&pmx_ns2_sata0 &pmx_ns2_sata1>;
17 pinctrl-names = "default";
16 status = "okay"; 18 status = "okay";
17 nr-ports = <2>; 19 nr-ports = <2>;
18 }; 20 };
diff --git a/arch/arm/boot/dts/kirkwood-ns2mini.dts b/arch/arm/boot/dts/kirkwood-ns2mini.dts
index adab1ab25733..329e530bffe7 100644
--- a/arch/arm/boot/dts/kirkwood-ns2mini.dts
+++ b/arch/arm/boot/dts/kirkwood-ns2mini.dts
@@ -14,6 +14,8 @@
14 14
15 ocp@f1000000 { 15 ocp@f1000000 {
16 sata@80000 { 16 sata@80000 {
17 pinctrl-0 = <&pmx_ns2_sata0>;
18 pinctrl-names = "default";
17 status = "okay"; 19 status = "okay";
18 nr-ports = <1>; 20 nr-ports = <1>;
19 }; 21 };
diff --git a/arch/arm/boot/dts/kirkwood-nsa310.dts b/arch/arm/boot/dts/kirkwood-nsa310.dts
index a7412b937a8a..69003598f5fa 100644
--- a/arch/arm/boot/dts/kirkwood-nsa310.dts
+++ b/arch/arm/boot/dts/kirkwood-nsa310.dts
@@ -1,6 +1,7 @@
1/dts-v1/; 1/dts-v1/;
2 2
3/include/ "kirkwood.dtsi" 3/include/ "kirkwood.dtsi"
4/include/ "kirkwood-6281.dtsi"
4 5
5/ { 6/ {
6 model = "ZyXEL NSA310"; 7 model = "ZyXEL NSA310";
@@ -17,22 +18,7 @@
17 18
18 ocp@f1000000 { 19 ocp@f1000000 {
19 pinctrl: pinctrl@10000 { 20 pinctrl: pinctrl@10000 {
20 pinctrl-0 = < &pmx_led_esata_green 21 pinctrl-0 = <&pmx_unknown>;
21 &pmx_led_esata_red
22 &pmx_led_usb_green
23 &pmx_led_usb_red
24 &pmx_usb_power_off
25 &pmx_led_sys_green
26 &pmx_led_sys_red
27 &pmx_btn_reset
28 &pmx_btn_copy
29 &pmx_led_copy_green
30 &pmx_led_copy_red
31 &pmx_led_hdd_green
32 &pmx_led_hdd_red
33 &pmx_unknown
34 &pmx_btn_power
35 &pmx_pwr_off >;
36 pinctrl-names = "default"; 22 pinctrl-names = "default";
37 23
38 pmx_led_esata_green: pmx-led-esata-green { 24 pmx_led_esata_green: pmx-led-esata-green {
@@ -176,12 +162,22 @@
176 reg = <0x5040000 0x2fc0000>; 162 reg = <0x5040000 0x2fc0000>;
177 }; 163 };
178 }; 164 };
165
166 pcie-controller {
167 status = "okay";
168
169 pcie@1,0 {
170 status = "okay";
171 };
172 };
179 }; 173 };
180 174
181 gpio_keys { 175 gpio_keys {
182 compatible = "gpio-keys"; 176 compatible = "gpio-keys";
183 #address-cells = <1>; 177 #address-cells = <1>;
184 #size-cells = <0>; 178 #size-cells = <0>;
179 pinctrl-0 = <&pmx_btn_reset &pmx_btn_copy &pmx_btn_power>;
180 pinctrl-names = "default";
185 181
186 button@1 { 182 button@1 {
187 label = "Power Button"; 183 label = "Power Button";
@@ -202,6 +198,12 @@
202 198
203 gpio-leds { 199 gpio-leds {
204 compatible = "gpio-leds"; 200 compatible = "gpio-leds";
201 pinctrl-0 = <&pmx_led_esata_green &pmx_led_esata_red
202 &pmx_led_usb_green &pmx_led_usb_red
203 &pmx_led_sys_green &pmx_led_sys_red
204 &pmx_led_copy_green &pmx_led_copy_red
205 &pmx_led_hdd_green &pmx_led_hdd_red>;
206 pinctrl-names = "default";
205 207
206 green-sys { 208 green-sys {
207 label = "nsa310:green:sys"; 209 label = "nsa310:green:sys";
@@ -247,6 +249,8 @@
247 249
248 gpio_poweroff { 250 gpio_poweroff {
249 compatible = "gpio-poweroff"; 251 compatible = "gpio-poweroff";
252 pinctrl-0 = <&pmx_pwr_off>;
253 pinctrl-names = "default";
250 gpios = <&gpio1 16 0>; 254 gpios = <&gpio1 16 0>;
251 }; 255 };
252 256
@@ -254,6 +258,8 @@
254 compatible = "simple-bus"; 258 compatible = "simple-bus";
255 #address-cells = <1>; 259 #address-cells = <1>;
256 #size-cells = <0>; 260 #size-cells = <0>;
261 pinctrl-0 = <&pmx_usb_power_off>;
262 pinctrl-names = "default";
257 263
258 usb0_power_off: regulator@1 { 264 usb0_power_off: regulator@1 {
259 compatible = "regulator-fixed"; 265 compatible = "regulator-fixed";
diff --git a/arch/arm/boot/dts/kirkwood-openblocks_a6.dts b/arch/arm/boot/dts/kirkwood-openblocks_a6.dts
index d27f7245f8e7..38dc8517d777 100644
--- a/arch/arm/boot/dts/kirkwood-openblocks_a6.dts
+++ b/arch/arm/boot/dts/kirkwood-openblocks_a6.dts
@@ -19,15 +19,21 @@
19 ocp@f1000000 { 19 ocp@f1000000 {
20 serial@12000 { 20 serial@12000 {
21 status = "ok"; 21 status = "ok";
22 pinctrl-0 = <&pmx_uart0>;
23 pinctrl-names = "default";
22 }; 24 };
23 25
24 serial@12100 { 26 serial@12100 {
25 status = "ok"; 27 status = "ok";
28 pinctrl-0 = <&pmx_uart1>;
29 pinctrl-names = "default";
26 }; 30 };
27 31
28 nand@3000000 { 32 nand@3000000 {
29 chip-delay = <25>; 33 chip-delay = <25>;
30 status = "okay"; 34 status = "okay";
35 pinctrl-0 = <&pmx_nand>;
36 pinctrl-names = "default";
31 37
32 partition@0 { 38 partition@0 {
33 label = "uboot"; 39 label = "uboot";
@@ -67,6 +73,8 @@
67 73
68 i2c@11100 { 74 i2c@11100 {
69 status = "okay"; 75 status = "okay";
76 pinctrl-0 = <&pmx_twsi1>;
77 pinctrl-names = "default";
70 78
71 s35390a: s35390a@30 { 79 s35390a: s35390a@30 {
72 compatible = "s35390a"; 80 compatible = "s35390a";
@@ -75,16 +83,7 @@
75 }; 83 };
76 84
77 pinctrl: pinctrl@10000 { 85 pinctrl: pinctrl@10000 {
78 pinctrl-0 = < &pmx_nand &pmx_uart0 86 pinctrl-0 = <&pmx_dip_switches &pmx_gpio_header>;
79 &pmx_uart1 &pmx_twsi1
80 &pmx_dip_sw0 &pmx_dip_sw1
81 &pmx_dip_sw2 &pmx_dip_sw3
82 &pmx_gpio_0 &pmx_gpio_1
83 &pmx_gpio_2 &pmx_gpio_3
84 &pmx_gpio_4 &pmx_gpio_5
85 &pmx_gpio_6 &pmx_gpio_7
86 &pmx_led_red &pmx_led_green
87 &pmx_led_yellow >;
88 pinctrl-names = "default"; 87 pinctrl-names = "default";
89 88
90 pmx_uart0: pmx-uart0 { 89 pmx_uart0: pmx-uart0 {
@@ -104,63 +103,14 @@
104 marvell,function = "sysrst"; 103 marvell,function = "sysrst";
105 }; 104 };
106 105
107 pmx_dip_sw0: pmx-dip-sw0 { 106 pmx_dip_switches: pmx-dip-switches {
108 marvell,pins = "mpp20"; 107 marvell,pins = "mpp20", "mpp21", "mpp22", "mpp23";
109 marvell,function = "gpio";
110 };
111
112 pmx_dip_sw1: pmx-dip-sw1 {
113 marvell,pins = "mpp21";
114 marvell,function = "gpio";
115 };
116
117 pmx_dip_sw2: pmx-dip-sw2 {
118 marvell,pins = "mpp22";
119 marvell,function = "gpio";
120 };
121
122 pmx_dip_sw3: pmx-dip-sw3 {
123 marvell,pins = "mpp23";
124 marvell,function = "gpio";
125 };
126
127 pmx_gpio_0: pmx-gpio-0 {
128 marvell,pins = "mpp24";
129 marvell,function = "gpio";
130 };
131
132 pmx_gpio_1: pmx-gpio-1 {
133 marvell,pins = "mpp25";
134 marvell,function = "gpio";
135 };
136
137 pmx_gpio_2: pmx-gpio-2 {
138 marvell,pins = "mpp26";
139 marvell,function = "gpio"; 108 marvell,function = "gpio";
140 }; 109 };
141 110
142 pmx_gpio_3: pmx-gpio-3 { 111 pmx_gpio_header: pmx-gpio-header {
143 marvell,pins = "mpp27"; 112 marvell,pins = "mpp24", "mpp25", "mpp26", "mpp27",
144 marvell,function = "gpio"; 113 "mpp28", "mpp29", "mpp30", "mpp31";
145 };
146
147 pmx_gpio_4: pmx-gpio-4 {
148 marvell,pins = "mpp28";
149 marvell,function = "gpio";
150 };
151
152 pmx_gpio_5: pmx-gpio-5 {
153 marvell,pins = "mpp29";
154 marvell,function = "gpio";
155 };
156
157 pmx_gpio_6: pmx-gpio-6 {
158 marvell,pins = "mpp30";
159 marvell,function = "gpio";
160 };
161
162 pmx_gpio_7: pmx-gpio-7 {
163 marvell,pins = "mpp31";
164 marvell,function = "gpio"; 114 marvell,function = "gpio";
165 }; 115 };
166 116
@@ -174,18 +124,8 @@
174 marvell,function = "gpio"; 124 marvell,function = "gpio";
175 }; 125 };
176 126
177 pmx_led_red: pmx-led-red { 127 pmx_leds: pmx-leds {
178 marvell,pins = "mpp41"; 128 marvell,pins = "mpp41", "mpp42", "mpp43";
179 marvell,function = "gpio";
180 };
181
182 pmx_led_green: pmx-led-green {
183 marvell,pins = "mpp42";
184 marvell,function = "gpio";
185 };
186
187 pmx_led_yellow: pmx-led-yellow {
188 marvell,pins = "mpp43";
189 marvell,function = "gpio"; 129 marvell,function = "gpio";
190 }; 130 };
191 }; 131 };
@@ -193,6 +133,8 @@
193 133
194 gpio-leds { 134 gpio-leds {
195 compatible = "gpio-leds"; 135 compatible = "gpio-leds";
136 pinctrl-0 = <&pmx_leds>;
137 pinctrl-names = "default";
196 138
197 led-red { 139 led-red {
198 label = "obsa6:red:stat"; 140 label = "obsa6:red:stat";
@@ -209,4 +151,18 @@
209 gpios = <&gpio1 11 1>; 151 gpios = <&gpio1 11 1>;
210 }; 152 };
211 }; 153 };
154
155 gpio_keys {
156 compatible = "gpio-keys";
157 pinctrl-0 = <&pmx_gpio_init>;
158 pinctrl-names = "default";
159 #address-cells = <1>;
160 #size-cells = <0>;
161
162 button@1 {
163 label = "Init Button";
164 linux,code = <116>;
165 gpios = <&gpio1 6 0>;
166 };
167 };
212}; 168};
diff --git a/arch/arm/boot/dts/kirkwood-sheevaplug-common.dtsi b/arch/arm/boot/dts/kirkwood-sheevaplug-common.dtsi
new file mode 100644
index 000000000000..f7143f128504
--- /dev/null
+++ b/arch/arm/boot/dts/kirkwood-sheevaplug-common.dtsi
@@ -0,0 +1,93 @@
1/*
2 * kirkwood-sheevaplug-common.dts - Common parts for Sheevaplugs
3 *
4 * Copyright (C) 2013 Simon Baatz <gmbnomis@gmail.com>
5 *
6 * Licensed under GPLv2
7 */
8
9/include/ "kirkwood.dtsi"
10/include/ "kirkwood-6281.dtsi"
11
12/ {
13 memory {
14 device_type = "memory";
15 reg = <0x00000000 0x20000000>;
16 };
17
18 chosen {
19 bootargs = "console=ttyS0,115200n8 earlyprintk";
20 };
21
22 ocp@f1000000 {
23 pinctrl: pinctrl@10000 {
24
25 pmx_usb_power_enable: pmx-usb-power-enable {
26 marvell,pins = "mpp29";
27 marvell,function = "gpio";
28 };
29 pmx_led_red: pmx-led-red {
30 marvell,pins = "mpp46";
31 marvell,function = "gpio";
32 };
33 pmx_led_blue: pmx-led-blue {
34 marvell,pins = "mpp49";
35 marvell,function = "gpio";
36 };
37 pmx_sdio_cd: pmx-sdio-cd {
38 marvell,pins = "mpp44";
39 marvell,function = "gpio";
40 };
41 pmx_sdio_wp: pmx-sdio-wp {
42 marvell,pins = "mpp47";
43 marvell,function = "gpio";
44 };
45 };
46 serial@12000 {
47 pinctrl-0 = <&pmx_uart0>;
48 pinctrl-names = "default";
49 status = "okay";
50 };
51
52 nand@3000000 {
53 pinctrl-0 = <&pmx_nand>;
54 pinctrl-names = "default";
55 status = "okay";
56
57 partition@0 {
58 label = "u-boot";
59 reg = <0x0000000 0x100000>;
60 };
61
62 partition@100000 {
63 label = "uImage";
64 reg = <0x0100000 0x400000>;
65 };
66
67 partition@500000 {
68 label = "root";
69 reg = <0x0500000 0x1fb00000>;
70 };
71 };
72 };
73
74 regulators {
75 compatible = "simple-bus";
76 #address-cells = <1>;
77 #size-cells = <0>;
78 pinctrl-0 = <&pmx_usb_power_enable>;
79 pinctrl-names = "default";
80
81 usb_power: regulator@1 {
82 compatible = "regulator-fixed";
83 reg = <1>;
84 regulator-name = "USB Power";
85 regulator-min-microvolt = <5000000>;
86 regulator-max-microvolt = <5000000>;
87 enable-active-high;
88 regulator-always-on;
89 regulator-boot-on;
90 gpio = <&gpio0 29 0>;
91 };
92 };
93};
diff --git a/arch/arm/boot/dts/kirkwood-sheevaplug-esata.dts b/arch/arm/boot/dts/kirkwood-sheevaplug-esata.dts
new file mode 100644
index 000000000000..f620ce48de97
--- /dev/null
+++ b/arch/arm/boot/dts/kirkwood-sheevaplug-esata.dts
@@ -0,0 +1,43 @@
1/*
2 * kirkwood-sheevaplug-esata.dts - Device tree file for eSATA Sheevaplug
3 *
4 * Copyright (C) 2013 Simon Baatz <gmbnomis@gmail.com>
5 *
6 * Licensed under GPLv2
7 */
8
9/dts-v1/;
10
11/include/ "kirkwood-sheevaplug-common.dtsi"
12
13/ {
14 model = "Globalscale Technologies eSATA SheevaPlug";
15 compatible = "globalscale,sheevaplug-esata-rev13", "globalscale,sheevaplug-esata", "globalscale,sheevaplug", "marvell,kirkwood-88f6281", "marvell,kirkwood";
16
17 ocp@f1000000 {
18 sata@80000 {
19 status = "okay";
20 nr-ports = <2>;
21 };
22
23 mvsdio@90000 {
24 pinctrl-0 = <&pmx_sdio &pmx_sdio_cd &pmx_sdio_wp>;
25 pinctrl-names = "default";
26 status = "okay";
27 cd-gpios = <&gpio1 12 1>;
28 wp-gpios = <&gpio1 15 0>;
29 };
30 };
31
32 gpio-leds {
33 compatible = "gpio-leds";
34 pinctrl-0 = <&pmx_led_blue>;
35 pinctrl-names = "default";
36
37 health {
38 label = "sheevaplug:blue:health";
39 gpios = <&gpio1 17 1>;
40 linux,default-trigger = "default-on";
41 };
42 };
43};
diff --git a/arch/arm/boot/dts/kirkwood-sheevaplug.dts b/arch/arm/boot/dts/kirkwood-sheevaplug.dts
new file mode 100644
index 000000000000..bf1dff251432
--- /dev/null
+++ b/arch/arm/boot/dts/kirkwood-sheevaplug.dts
@@ -0,0 +1,43 @@
1/*
2 * kirkwood-sheevaplug-esata.dts - Device tree file for Sheevaplug
3 *
4 * Copyright (C) 2013 Simon Baatz <gmbnomis@gmail.com>
5 *
6 * Licensed under GPLv2
7 */
8
9/dts-v1/;
10
11/include/ "kirkwood-sheevaplug-common.dtsi"
12
13/ {
14 model = "Globalscale Technologies SheevaPlug";
15 compatible = "globalscale,sheevaplug", "marvell,kirkwood-88f6281", "marvell,kirkwood";
16
17 ocp@f1000000 {
18 mvsdio@90000 {
19 pinctrl-0 = <&pmx_sdio>;
20 pinctrl-names = "default";
21 status = "okay";
22 /* No CD or WP GPIOs */
23 broken-cd;
24 };
25 };
26
27 gpio-leds {
28 compatible = "gpio-leds";
29 pinctrl-0 = <&pmx_led_blue &pmx_led_red>;
30 pinctrl-names = "default";
31
32 health {
33 label = "sheevaplug:blue:health";
34 gpios = <&gpio1 17 1>;
35 linux,default-trigger = "default-on";
36 };
37
38 misc {
39 label = "sheevaplug:red:misc";
40 gpios = <&gpio1 14 1>;
41 };
42 };
43};
diff --git a/arch/arm/boot/dts/kirkwood-topkick.dts b/arch/arm/boot/dts/kirkwood-topkick.dts
index 66eb45b00b25..f2052d7bc10f 100644
--- a/arch/arm/boot/dts/kirkwood-topkick.dts
+++ b/arch/arm/boot/dts/kirkwood-topkick.dts
@@ -19,18 +19,6 @@
19 ocp@f1000000 { 19 ocp@f1000000 {
20 pinctrl: pinctrl@10000 { 20 pinctrl: pinctrl@10000 {
21 /* 21 /*
22 * GPIO LED layout
23 *
24 * /-SYS_LED(2)
25 * |
26 * | /-DISK_LED
27 * | |
28 * | | /-WLAN_LED(2)
29 * | | |
30 * [SW] [*] [*] [*]
31 */
32
33 /*
34 * Switch positions 22 * Switch positions
35 * 23 *
36 * /-SW_LEFT(2) 24 * /-SW_LEFT(2)
@@ -41,19 +29,8 @@
41 * | | | 29 * | | |
42 * PS [L] [I] [R] LEDS 30 * PS [L] [I] [R] LEDS
43 */ 31 */
44 pinctrl-0 = < &pmx_led_disk_yellow 32 pinctrl-0 = <&pmx_sw_left &pmx_sw_right
45 &pmx_sata0_pwr_enable 33 &pmx_sw_idle &pmx_sw_left2>;
46 &pmx_led_sys_red
47 &pmx_led_sys_blue
48 &pmx_led_wifi_green
49 &pmx_sw_left
50 &pmx_sw_right
51 &pmx_sw_idle
52 &pmx_sw_left2
53 &pmx_led_wifi_yellow
54 &pmx_uart0
55 &pmx_nand
56 &pmx_twsi0 >;
57 pinctrl-names = "default"; 34 pinctrl-names = "default";
58 35
59 pmx_led_disk_yellow: pmx-led-disk-yellow { 36 pmx_led_disk_yellow: pmx-led-disk-yellow {
@@ -109,10 +86,14 @@
109 86
110 serial@12000 { 87 serial@12000 {
111 status = "ok"; 88 status = "ok";
89 pinctrl-0 = <&pmx_uart0>;
90 pinctrl-names = "default";
112 }; 91 };
113 92
114 nand@3000000 { 93 nand@3000000 {
115 status = "okay"; 94 status = "okay";
95 pinctrl-0 = <&pmx_nand>;
96 pinctrl-names = "default";
116 97
117 partition@0 { 98 partition@0 {
118 label = "u-boot"; 99 label = "u-boot";
@@ -147,6 +128,8 @@
147 128
148 i2c@11000 { 129 i2c@11000 {
149 status = "ok"; 130 status = "ok";
131 pinctrl-0 = <&pmx_twsi0>;
132 pinctrl-names = "default";
150 }; 133 };
151 134
152 mvsdio@90000 { 135 mvsdio@90000 {
@@ -154,11 +137,28 @@
154 pinctrl-names = "default"; 137 pinctrl-names = "default";
155 status = "okay"; 138 status = "okay";
156 /* No CD or WP GPIOs */ 139 /* No CD or WP GPIOs */
140 broken-cd;
157 }; 141 };
158 }; 142 };
159 143
160 gpio-leds { 144 gpio-leds {
145 /*
146 * GPIO LED layout
147 *
148 * /-SYS_LED(2)
149 * |
150 * | /-DISK_LED
151 * | |
152 * | | /-WLAN_LED(2)
153 * | | |
154 * [SW] [*] [*] [*]
155 */
156
161 compatible = "gpio-leds"; 157 compatible = "gpio-leds";
158 pinctrl-0 = <&pmx_led_disk_yellow &pmx_led_sys_red
159 &pmx_led_sys_blue &pmx_led_wifi_green
160 &pmx_led_wifi_yellow>;
161 pinctrl-names = "default";
162 162
163 disk { 163 disk {
164 label = "topkick:yellow:disk"; 164 label = "topkick:yellow:disk";
@@ -187,6 +187,8 @@
187 compatible = "simple-bus"; 187 compatible = "simple-bus";
188 #address-cells = <1>; 188 #address-cells = <1>;
189 #size-cells = <0>; 189 #size-cells = <0>;
190 pinctrl-0 = <&pmx_sata0_pwr_enable>;
191 pinctrl-names = "default";
190 192
191 sata0_power: regulator@1 { 193 sata0_power: regulator@1 {
192 compatible = "regulator-fixed"; 194 compatible = "regulator-fixed";
diff --git a/arch/arm/boot/dts/kirkwood-ts219-6281.dts b/arch/arm/boot/dts/kirkwood-ts219-6281.dts
index 8295c833887f..6dd1038e4de4 100644
--- a/arch/arm/boot/dts/kirkwood-ts219-6281.dts
+++ b/arch/arm/boot/dts/kirkwood-ts219-6281.dts
@@ -1,16 +1,14 @@
1/dts-v1/; 1/dts-v1/;
2 2
3/include/ "kirkwood-ts219.dtsi" 3/include/ "kirkwood.dtsi"
4/include/ "kirkwood-6281.dtsi" 4/include/ "kirkwood-6281.dtsi"
5/include/ "kirkwood-ts219.dtsi"
5 6
6/ { 7/ {
7 ocp@f1000000 { 8 ocp@f1000000 {
8 pinctrl: pinctrl@10000 { 9 pinctrl: pinctrl@10000 {
9 10
10 pinctrl-0 = < &pmx_uart0 &pmx_uart1 &pmx_spi 11 pinctrl-0 = <&pmx_ram_size &pmx_board_id>;
11 &pmx_twsi0 &pmx_sata0 &pmx_sata1
12 &pmx_ram_size &pmx_reset_button
13 &pmx_USB_copy_button &pmx_board_id>;
14 pinctrl-names = "default"; 12 pinctrl-names = "default";
15 13
16 pmx_ram_size: pmx-ram-size { 14 pmx_ram_size: pmx-ram-size {
@@ -38,6 +36,9 @@
38 compatible = "gpio-keys"; 36 compatible = "gpio-keys";
39 #address-cells = <1>; 37 #address-cells = <1>;
40 #size-cells = <0>; 38 #size-cells = <0>;
39 pinctrl-0 = <&pmx_reset_button &pmx_USB_copy_button>;
40 pinctrl-names = "default";
41
41 button@1 { 42 button@1 {
42 label = "USB Copy"; 43 label = "USB Copy";
43 linux,code = <133>; 44 linux,code = <133>;
diff --git a/arch/arm/boot/dts/kirkwood-ts219-6282.dts b/arch/arm/boot/dts/kirkwood-ts219-6282.dts
index df3f95dfba33..6fdc5ffcaae5 100644
--- a/arch/arm/boot/dts/kirkwood-ts219-6282.dts
+++ b/arch/arm/boot/dts/kirkwood-ts219-6282.dts
@@ -1,16 +1,14 @@
1/dts-v1/; 1/dts-v1/;
2 2
3/include/ "kirkwood-ts219.dtsi" 3/include/ "kirkwood.dtsi"
4/include/ "kirkwood-6282.dtsi" 4/include/ "kirkwood-6282.dtsi"
5/include/ "kirkwood-ts219.dtsi"
5 6
6/ { 7/ {
7 ocp@f1000000 { 8 ocp@f1000000 {
8 pinctrl: pinctrl@10000 { 9 pinctrl: pinctrl@10000 {
9 10
10 pinctrl-0 = < &pmx_uart0 &pmx_uart1 &pmx_spi 11 pinctrl-0 = <&pmx_ram_size &pmx_board_id>;
11 &pmx_twsi0 &pmx_sata0 &pmx_sata1
12 &pmx_ram_size &pmx_reset_button
13 &pmx_USB_copy_button &pmx_board_id>;
14 pinctrl-names = "default"; 12 pinctrl-names = "default";
15 13
16 pmx_ram_size: pmx-ram-size { 14 pmx_ram_size: pmx-ram-size {
@@ -32,12 +30,23 @@
32 marvell,function = "gpio"; 30 marvell,function = "gpio";
33 }; 31 };
34 }; 32 };
33 pcie-controller {
34 status = "okay";
35
36 pcie@2,0 {
37 status = "okay";
38 };
39 };
40
35 }; 41 };
36 42
37 gpio_keys { 43 gpio_keys {
38 compatible = "gpio-keys"; 44 compatible = "gpio-keys";
39 #address-cells = <1>; 45 #address-cells = <1>;
40 #size-cells = <0>; 46 #size-cells = <0>;
47 pinctrl-0 = <&pmx_reset_button &pmx_USB_copy_button>;
48 pinctrl-names = "default";
49
41 button@1 { 50 button@1 {
42 label = "USB Copy"; 51 label = "USB Copy";
43 linux,code = <133>; 52 linux,code = <133>;
diff --git a/arch/arm/boot/dts/kirkwood-ts219.dtsi b/arch/arm/boot/dts/kirkwood-ts219.dtsi
index 64ea27cb3298..0c9a94cd666c 100644
--- a/arch/arm/boot/dts/kirkwood-ts219.dtsi
+++ b/arch/arm/boot/dts/kirkwood-ts219.dtsi
@@ -1,5 +1,3 @@
1/include/ "kirkwood.dtsi"
2
3/ { 1/ {
4 model = "QNAP TS219 family"; 2 model = "QNAP TS219 family";
5 compatible = "qnap,ts219", "marvell,kirkwood"; 3 compatible = "qnap,ts219", "marvell,kirkwood";
@@ -17,6 +15,8 @@
17 i2c@11000 { 15 i2c@11000 {
18 status = "okay"; 16 status = "okay";
19 clock-frequency = <400000>; 17 clock-frequency = <400000>;
18 pinctrl-0 = <&pmx_twsi0>;
19 pinctrl-names = "default";
20 20
21 s35390a: s35390a@30 { 21 s35390a: s35390a@30 {
22 compatible = "s35390a"; 22 compatible = "s35390a";
@@ -26,13 +26,24 @@
26 serial@12000 { 26 serial@12000 {
27 clock-frequency = <200000000>; 27 clock-frequency = <200000000>;
28 status = "okay"; 28 status = "okay";
29 pinctrl-0 = <&pmx_uart0>;
30 pinctrl-names = "default";
29 }; 31 };
30 serial@12100 { 32 serial@12100 {
31 clock-frequency = <200000000>; 33 clock-frequency = <200000000>;
32 status = "okay"; 34 status = "okay";
35 pinctrl-0 = <&pmx_uart1>;
36 pinctrl-names = "default";
37 };
38 poweroff@12100 {
39 compatible = "qnap,power-off";
40 reg = <0x12000 0x100>;
41 clocks = <&gate_clk 7>;
33 }; 42 };
34 spi@10600 { 43 spi@10600 {
35 status = "okay"; 44 status = "okay";
45 pinctrl-0 = <&pmx_spi>;
46 pinctrl-names = "default";
36 47
37 m25p128@0 { 48 m25p128@0 {
38 #address-cells = <1>; 49 #address-cells = <1>;
@@ -71,8 +82,17 @@
71 }; 82 };
72 }; 83 };
73 sata@80000 { 84 sata@80000 {
85 pinctrl-0 = <&pmx_sata0 &pmx_sata1>;
86 pinctrl-names = "default";
74 status = "okay"; 87 status = "okay";
75 nr-ports = <2>; 88 nr-ports = <2>;
76 }; 89 };
90 pcie-controller {
91 status = "okay";
92
93 pcie@1,0 {
94 status = "okay";
95 };
96 };
77 }; 97 };
78}; 98};
diff --git a/arch/arm/boot/dts/kirkwood.dtsi b/arch/arm/boot/dts/kirkwood.dtsi
index fada7e6d24d8..9809fc1f105c 100644
--- a/arch/arm/boot/dts/kirkwood.dtsi
+++ b/arch/arm/boot/dts/kirkwood.dtsi
@@ -4,6 +4,18 @@
4 compatible = "marvell,kirkwood"; 4 compatible = "marvell,kirkwood";
5 interrupt-parent = <&intc>; 5 interrupt-parent = <&intc>;
6 6
7 cpus {
8 #address-cells = <1>;
9 #size-cells = <0>;
10
11 cpu@0 {
12 device_type = "cpu";
13 compatible = "marvell,feroceon";
14 clocks = <&core_clk 1>, <&core_clk 3>, <&gate_clk 11>;
15 clock-names = "cpu_clk", "ddrclk", "powersave";
16 };
17 };
18
7 aliases { 19 aliases {
8 gpio0 = &gpio0; 20 gpio0 = &gpio0;
9 gpio1 = &gpio1; 21 gpio1 = &gpio1;
@@ -18,7 +30,9 @@
18 30
19 ocp@f1000000 { 31 ocp@f1000000 {
20 compatible = "simple-bus"; 32 compatible = "simple-bus";
21 ranges = <0x00000000 0xf1000000 0x4000000 33 ranges = <0x00000000 0xf1000000 0x0100000
34 0xe0000000 0xe0000000 0x8100000 /* PCIE */
35 0xf4000000 0xf4000000 0x0000400
22 0xf5000000 0xf5000000 0x0000400>; 36 0xf5000000 0xf5000000 0x0000400>;
23 #address-cells = <1>; 37 #address-cells = <1>;
24 #size-cells = <1>; 38 #size-cells = <1>;
@@ -71,13 +85,6 @@
71 status = "disabled"; 85 status = "disabled";
72 }; 86 };
73 87
74 rtc@10300 {
75 compatible = "marvell,kirkwood-rtc", "marvell,orion-rtc";
76 reg = <0x10300 0x20>;
77 interrupts = <53>;
78 clocks = <&gate_clk 7>;
79 };
80
81 spi@10600 { 88 spi@10600 {
82 compatible = "marvell,orion-spi"; 89 compatible = "marvell,orion-spi";
83 #address-cells = <1>; 90 #address-cells = <1>;
@@ -151,15 +158,6 @@
151 status = "okay"; 158 status = "okay";
152 }; 159 };
153 160
154 sata@80000 {
155 compatible = "marvell,orion-sata";
156 reg = <0x80000 0x5000>;
157 interrupts = <21>;
158 clocks = <&gate_clk 14>, <&gate_clk 15>;
159 clock-names = "0", "1";
160 status = "disabled";
161 };
162
163 nand@3000000 { 161 nand@3000000 {
164 #address-cells = <1>; 162 #address-cells = <1>;
165 #size-cells = <1>; 163 #size-cells = <1>;
@@ -167,7 +165,7 @@
167 ale = <1>; 165 ale = <1>;
168 bank-width = <1>; 166 bank-width = <1>;
169 compatible = "marvell,orion-nand"; 167 compatible = "marvell,orion-nand";
170 reg = <0x3000000 0x400>; 168 reg = <0xf4000000 0x400>;
171 chip-delay = <25>; 169 chip-delay = <25>;
172 /* set partition map and/or chip-delay in board dts */ 170 /* set partition map and/or chip-delay in board dts */
173 clocks = <&gate_clk 7>; 171 clocks = <&gate_clk 7>;
@@ -194,13 +192,5 @@
194 clocks = <&gate_clk 17>; 192 clocks = <&gate_clk 17>;
195 status = "okay"; 193 status = "okay";
196 }; 194 };
197
198 mvsdio@90000 {
199 compatible = "marvell,orion-sdio";
200 reg = <0x90000 0x200>;
201 interrupts = <28>;
202 clocks = <&gate_clk 4>;
203 status = "disabled";
204 };
205 }; 195 };
206}; 196};
diff --git a/arch/arm/boot/dts/kizbox.dts b/arch/arm/boot/dts/kizbox.dts
index b4dc3ed9a3ec..02df1914a47c 100644
--- a/arch/arm/boot/dts/kizbox.dts
+++ b/arch/arm/boot/dts/kizbox.dts
@@ -6,7 +6,7 @@
6 * Licensed under GPLv2. 6 * Licensed under GPLv2.
7 */ 7 */
8/dts-v1/; 8/dts-v1/;
9/include/ "at91sam9g20.dtsi" 9#include "at91sam9g20.dtsi"
10 10
11/ { 11/ {
12 12
@@ -94,26 +94,26 @@
94 94
95 led1g { 95 led1g {
96 label = "led1:green"; 96 label = "led1:green";
97 gpios = <&pioB 0 1>; 97 gpios = <&pioB 0 GPIO_ACTIVE_LOW>;
98 linux,default-trigger = "none"; 98 linux,default-trigger = "none";
99 }; 99 };
100 100
101 led1r { 101 led1r {
102 label = "led1:red"; 102 label = "led1:red";
103 gpios = <&pioB 1 1>; 103 gpios = <&pioB 1 GPIO_ACTIVE_LOW>;
104 linux,default-trigger = "none"; 104 linux,default-trigger = "none";
105 }; 105 };
106 106
107 led2g { 107 led2g {
108 label = "led2:green"; 108 label = "led2:green";
109 gpios = <&pioB 2 1>; 109 gpios = <&pioB 2 GPIO_ACTIVE_LOW>;
110 linux,default-trigger = "none"; 110 linux,default-trigger = "none";
111 default-state = "on"; 111 default-state = "on";
112 }; 112 };
113 113
114 led2r { 114 led2r {
115 label = "led2:red"; 115 label = "led2:red";
116 gpios = <&pioB 3 1>; 116 gpios = <&pioB 3 GPIO_ACTIVE_LOW>;
117 linux,default-trigger = "none"; 117 linux,default-trigger = "none";
118 }; 118 };
119 }; 119 };
@@ -125,16 +125,16 @@
125 125
126 reset { 126 reset {
127 label = "reset"; 127 label = "reset";
128 gpios = <&pioB 30 1>; 128 gpios = <&pioB 30 GPIO_ACTIVE_LOW>;
129 linux,code = <0x100>; 129 linux,code = <0x100>;
130 gpio-key,wakeup; 130 gpio-key,wakeup;
131 }; 131 };
132 132
133 mode { 133 mode {
134 label = "mode"; 134 label = "mode";
135 gpios = <&pioB 31 1>; 135 gpios = <&pioB 31 GPIO_ACTIVE_LOW>;
136 linux,code = <0x101>; 136 linux,code = <0x101>;
137 gpio-key,wakeup; 137 gpio-key,wakeup;
138 }; 138 };
139 }; 139 };
140}; \ No newline at end of file 140};
diff --git a/arch/arm/boot/dts/lpc32xx.dtsi b/arch/arm/boot/dts/lpc32xx.dtsi
index 1582f484a867..3abebb75fc57 100644
--- a/arch/arm/boot/dts/lpc32xx.dtsi
+++ b/arch/arm/boot/dts/lpc32xx.dtsi
@@ -18,8 +18,12 @@
18 interrupt-parent = <&mic>; 18 interrupt-parent = <&mic>;
19 19
20 cpus { 20 cpus {
21 cpu@0 { 21 #address-cells = <0>;
22 compatible = "arm,arm926ejs"; 22 #size-cells = <0>;
23
24 cpu {
25 compatible = "arm,arm926ej-s";
26 device_type = "cpu";
23 }; 27 };
24 }; 28 };
25 29
diff --git a/arch/arm/boot/dts/mpa1600.dts b/arch/arm/boot/dts/mpa1600.dts
index 317300875f34..ccf9ea242f72 100644
--- a/arch/arm/boot/dts/mpa1600.dts
+++ b/arch/arm/boot/dts/mpa1600.dts
@@ -6,7 +6,7 @@
6 * Licensed under GPLv2 only 6 * Licensed under GPLv2 only
7 */ 7 */
8/dts-v1/; 8/dts-v1/;
9/include/ "at91rm9200.dtsi" 9#include "at91rm9200.dtsi"
10 10
11/ { 11/ {
12 model = "Phontech MPA 1600"; 12 model = "Phontech MPA 1600";
@@ -62,7 +62,7 @@
62 62
63 monitor_mute { 63 monitor_mute {
64 label = "Monitor mute"; 64 label = "Monitor mute";
65 gpios = <&pioC 1 1>; 65 gpios = <&pioC 1 GPIO_ACTIVE_LOW>;
66 linux,code = <113>; 66 linux,code = <113>;
67 }; 67 };
68 }; 68 };
diff --git a/arch/arm/boot/dts/msm8660-surf.dts b/arch/arm/boot/dts/msm8660-surf.dts
index 9bf49b3826ea..cdc010e0f93e 100644
--- a/arch/arm/boot/dts/msm8660-surf.dts
+++ b/arch/arm/boot/dts/msm8660-surf.dts
@@ -15,7 +15,7 @@
15 < 0x02081000 0x1000 >; 15 < 0x02081000 0x1000 >;
16 }; 16 };
17 17
18 timer@2000004 { 18 timer@2000000 {
19 compatible = "qcom,scss-timer", "qcom,msm-timer"; 19 compatible = "qcom,scss-timer", "qcom,msm-timer";
20 interrupts = <1 0 0x301>, 20 interrupts = <1 0 0x301>,
21 <1 1 0x301>, 21 <1 1 0x301>,
@@ -26,7 +26,18 @@
26 cpu-offset = <0x40000>; 26 cpu-offset = <0x40000>;
27 }; 27 };
28 28
29 serial@19c400000 { 29 msmgpio: gpio@800000 {
30 compatible = "qcom,msm-gpio";
31 reg = <0x00800000 0x1000>;
32 gpio-controller;
33 #gpio-cells = <2>;
34 ngpio = <173>;
35 interrupts = <0 32 0x4>;
36 interrupt-controller;
37 #interrupt-cells = <2>;
38 };
39
40 serial@19c40000 {
30 compatible = "qcom,msm-hsuart", "qcom,msm-uart"; 41 compatible = "qcom,msm-hsuart", "qcom,msm-uart";
31 reg = <0x19c40000 0x1000>, 42 reg = <0x19c40000 0x1000>,
32 <0x19c00000 0x1000>; 43 <0x19c00000 0x1000>;
diff --git a/arch/arm/boot/dts/msm8960-cdp.dts b/arch/arm/boot/dts/msm8960-cdp.dts
index 2e4d87a125d6..9c1167b0459b 100644
--- a/arch/arm/boot/dts/msm8960-cdp.dts
+++ b/arch/arm/boot/dts/msm8960-cdp.dts
@@ -26,7 +26,18 @@
26 cpu-offset = <0x80000>; 26 cpu-offset = <0x80000>;
27 }; 27 };
28 28
29 serial@19c400000 { 29 msmgpio: gpio@800000 {
30 compatible = "qcom,msm-gpio";
31 gpio-controller;
32 #gpio-cells = <2>;
33 ngpio = <150>;
34 interrupts = <0 32 0x4>;
35 interrupt-controller;
36 #interrupt-cells = <2>;
37 reg = <0x800000 0x4000>;
38 };
39
40 serial@16440000 {
30 compatible = "qcom,msm-hsuart", "qcom,msm-uart"; 41 compatible = "qcom,msm-hsuart", "qcom,msm-uart";
31 reg = <0x16440000 0x1000>, 42 reg = <0x16440000 0x1000>,
32 <0x16400000 0x1000>; 43 <0x16400000 0x1000>;
diff --git a/arch/arm/boot/dts/nspire-classic.dtsi b/arch/arm/boot/dts/nspire-classic.dtsi
new file mode 100644
index 000000000000..9565199bce7a
--- /dev/null
+++ b/arch/arm/boot/dts/nspire-classic.dtsi
@@ -0,0 +1,74 @@
1/*
2 * linux/arch/arm/boot/nspire-classic.dts
3 *
4 * Copyright (C) 2013 Daniel Tang <tangrs@tangrs.id.au>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2, as
8 * published by the Free Software Foundation.
9 *
10 */
11
12/include/ "nspire.dtsi"
13
14&lcd {
15 lcd-type = "classic";
16};
17
18&fast_timer {
19 /* compatible = "lsi,zevio-timer"; */
20 reg = <0x90010000 0x1000>, <0x900A0010 0x8>;
21};
22
23&uart {
24 compatible = "ns16550";
25 reg-shift = <2>;
26 reg-io-width = <4>;
27 clocks = <&apb_pclk>;
28 no-loopback-test;
29};
30
31&timer0 {
32 /* compatible = "lsi,zevio-timer"; */
33 reg = <0x900C0000 0x1000>, <0x900A0018 0x8>;
34};
35
36&timer1 {
37 compatible = "lsi,zevio-timer";
38 reg = <0x900D0000 0x1000>, <0x900A0020 0x8>;
39};
40
41&keypad {
42 active-low;
43
44};
45
46&base_clk {
47 compatible = "lsi,nspire-classic-clock";
48};
49
50&ahb_clk {
51 compatible = "lsi,nspire-classic-ahb-divider";
52};
53
54/ {
55 memory {
56 device_type = "memory";
57 reg = <0x10000000 0x2000000>; /* 32 MB */
58 };
59
60 ahb {
61 #address-cells = <1>;
62 #size-cells = <1>;
63
64 intc: interrupt-controller@DC000000 {
65 compatible = "lsi,zevio-intc";
66 interrupt-controller;
67 reg = <0xDC000000 0x1000>;
68 #interrupt-cells = <1>;
69 };
70 };
71 chosen {
72 bootargs = "debug earlyprintk console=tty0 console=ttyS0,115200n8 root=/dev/ram0";
73 };
74};
diff --git a/arch/arm/boot/dts/nspire-clp.dts b/arch/arm/boot/dts/nspire-clp.dts
new file mode 100644
index 000000000000..fa5a044656de
--- /dev/null
+++ b/arch/arm/boot/dts/nspire-clp.dts
@@ -0,0 +1,45 @@
1/*
2 * linux/arch/arm/boot/nspire-clp.dts
3 *
4 * Copyright (C) 2013 Daniel Tang <tangrs@tangrs.id.au>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2, as
8 * published by the Free Software Foundation.
9 *
10 */
11/dts-v1/;
12
13/include/ "nspire-classic.dtsi"
14
15&keypad {
16 linux,keymap = <
17 0x0000001c 0x0001001c 0x00020039
18 0x0004002c 0x00050034 0x00060015
19 0x0007000b 0x0008002d 0x01000033
20 0x0101004e 0x01020011 0x01030004
21 0x0104002f 0x01050003 0x01060016
22 0x01070002 0x01080014 0x02000062
23 0x0201000c 0x0202001f 0x02030007
24 0x02040013 0x02050006 0x02060010
25 0x02070005 0x02080019 0x03000027
26 0x03010037 0x03020018 0x0303000a
27 0x03040031 0x03050009 0x03060032
28 0x03070008 0x03080026 0x04000028
29 0x04010035 0x04020025 0x04040024
30 0x04060017 0x04080023 0x05000028
31 0x05020022 0x0503001b 0x05040021
32 0x0505001a 0x05060012 0x0507006f
33 0x05080020 0x0509002a 0x0601001c
34 0x0602002e 0x06030068 0x06040030
35 0x0605006d 0x0606001e 0x06070001
36 0x0608002b 0x0609000f 0x07000067
37 0x0702006a 0x0704006c 0x07060069
38 0x0707000e 0x0708001d 0x070a000d
39 >;
40};
41
42/ {
43 model = "TI-NSPIRE Clickpad";
44 compatible = "ti,nspire-clp";
45};
diff --git a/arch/arm/boot/dts/nspire-cx.dts b/arch/arm/boot/dts/nspire-cx.dts
new file mode 100644
index 000000000000..375b924f60d8
--- /dev/null
+++ b/arch/arm/boot/dts/nspire-cx.dts
@@ -0,0 +1,112 @@
1/*
2 * linux/arch/arm/boot/nspire-cx.dts
3 *
4 * Copyright (C) 2013 Daniel Tang <tangrs@tangrs.id.au>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2, as
8 * published by the Free Software Foundation.
9 *
10 */
11/dts-v1/;
12
13/include/ "nspire.dtsi"
14
15&lcd {
16 lcd-type = "cx";
17};
18
19&fast_timer {
20 /* compatible = "arm,sp804", "arm,primecell"; */
21};
22
23&uart {
24 compatible = "arm,pl011", "arm,primecell";
25
26 clocks = <&uart_clk>, <&apb_pclk>;
27 clock-names = "uart_clk", "apb_pclk";
28};
29
30&timer0 {
31 compatible = "arm,sp804", "arm,primecell";
32};
33
34&timer1 {
35 compatible = "arm,sp804", "arm,primecell";
36};
37
38&base_clk {
39 compatible = "lsi,nspire-cx-clock";
40};
41
42&ahb_clk {
43 compatible = "lsi,nspire-cx-ahb-divider";
44};
45
46&keypad {
47 linux,keymap = <
48 0x0000001c 0x0001001c 0x00040039
49 0x0005002c 0x00060015 0x0007000b
50 0x0008000f 0x0100002d 0x01010011
51 0x0102002f 0x01030004 0x01040016
52 0x01050014 0x0106001f 0x01070002
53 0x010a006a 0x02000013 0x02010010
54 0x02020019 0x02030007 0x02040018
55 0x02050031 0x02060032 0x02070005
56 0x02080028 0x0209006c 0x03000026
57 0x03010025 0x03020024 0x0303000a
58 0x03040017 0x03050023 0x03060022
59 0x03070008 0x03080035 0x03090069
60 0x04000021 0x04010012 0x04020020
61 0x0404002e 0x04050030 0x0406001e
62 0x0407000d 0x04080037 0x04090067
63 0x05010038 0x0502000c 0x0503001b
64 0x05040034 0x0505001a 0x05060006
65 0x05080027 0x0509000e 0x050a006f
66 0x0600002b 0x0602004e 0x06030068
67 0x06040003 0x0605006d 0x06060009
68 0x06070001 0x0609000f 0x0708002a
69 0x0709001d 0x070a0033 >;
70};
71
72/ {
73 model = "TI-NSPIRE CX";
74 compatible = "ti,nspire-cx";
75
76 memory {
77 device_type = "memory";
78 reg = <0x10000000 0x4000000>; /* 64 MB */
79 };
80
81 uart_clk: uart_clk {
82 #clock-cells = <0>;
83 compatible = "fixed-clock";
84 clock-frequency = <12000000>;
85 };
86
87 ahb {
88 #address-cells = <1>;
89 #size-cells = <1>;
90
91 intc: interrupt-controller@DC000000 {
92 compatible = "arm,pl190-vic";
93 interrupt-controller;
94 reg = <0xDC000000 0x1000>;
95 #interrupt-cells = <1>;
96 };
97
98 apb@90000000 {
99 #address-cells = <1>;
100 #size-cells = <1>;
101
102 i2c@90050000 {
103 compatible = "snps,designware-i2c";
104 reg = <0x90050000 0x1000>;
105 interrupts = <20>;
106 };
107 };
108 };
109 chosen {
110 bootargs = "debug earlyprintk console=tty0 console=ttyAMA0,115200n8 root=/dev/ram0";
111 };
112};
diff --git a/arch/arm/boot/dts/nspire-tp.dts b/arch/arm/boot/dts/nspire-tp.dts
new file mode 100644
index 000000000000..621391ce6ed6
--- /dev/null
+++ b/arch/arm/boot/dts/nspire-tp.dts
@@ -0,0 +1,44 @@
1/*
2 * linux/arch/arm/boot/nspire-tp.dts
3 *
4 * Copyright (C) 2013 Daniel Tang <tangrs@tangrs.id.au>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2, as
8 * published by the Free Software Foundation.
9 *
10 */
11/dts-v1/;
12
13/include/ "nspire-classic.dtsi"
14
15&keypad {
16 linux,keymap = <
17 0x0000001c 0x0001001c 0x00040039
18 0x0005002c 0x00060015 0x0007000b
19 0x0008000f 0x0100002d 0x01010011
20 0x0102002f 0x01030004 0x01040016
21 0x01050014 0x0106001f 0x01070002
22 0x010a006a 0x02000013 0x02010010
23 0x02020019 0x02030007 0x02040018
24 0x02050031 0x02060032 0x02070005
25 0x02080028 0x0209006c 0x03000026
26 0x03010025 0x03020024 0x0303000a
27 0x03040017 0x03050023 0x03060022
28 0x03070008 0x03080035 0x03090069
29 0x04000021 0x04010012 0x04020020
30 0x0404002e 0x04050030 0x0406001e
31 0x0407000d 0x04080037 0x04090067
32 0x05010038 0x0502000c 0x0503001b
33 0x05040034 0x0505001a 0x05060006
34 0x05080027 0x0509000e 0x050a006f
35 0x0600002b 0x0602004e 0x06030068
36 0x06040003 0x0605006d 0x06060009
37 0x06070001 0x0609000f 0x0708002a
38 0x0709001d 0x070a0033 >;
39};
40
41/ {
42 model = "TI-NSPIRE Touchpad";
43 compatible = "ti,nspire-tp";
44};
diff --git a/arch/arm/boot/dts/nspire.dtsi b/arch/arm/boot/dts/nspire.dtsi
new file mode 100644
index 000000000000..a22ffe633b49
--- /dev/null
+++ b/arch/arm/boot/dts/nspire.dtsi
@@ -0,0 +1,175 @@
1/*
2 * linux/arch/arm/boot/nspire.dtsi
3 *
4 * Copyright (C) 2013 Daniel Tang <tangrs@tangrs.id.au>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2, as
8 * published by the Free Software Foundation.
9 *
10 */
11
12/include/ "skeleton.dtsi"
13
14/ {
15 interrupt-parent = <&intc>;
16
17 cpus {
18 cpu@0 {
19 compatible = "arm,arm926ejs";
20 };
21 };
22
23 bootrom: bootrom@00000000 {
24 reg = <0x00000000 0x80000>;
25 };
26
27 sram: sram@A4000000 {
28 device = "memory";
29 reg = <0xA4000000 0x20000>;
30 };
31
32 timer_clk: timer_clk {
33 #clock-cells = <0>;
34 compatible = "fixed-clock";
35 clock-frequency = <32768>;
36 };
37
38 base_clk: base_clk {
39 #clock-cells = <0>;
40 reg = <0x900B0024 0x4>;
41 };
42
43 ahb_clk: ahb_clk {
44 #clock-cells = <0>;
45 reg = <0x900B0024 0x4>;
46 clocks = <&base_clk>;
47 };
48
49 apb_pclk: apb_pclk {
50 #clock-cells = <0>;
51 compatible = "fixed-factor-clock";
52 clock-div = <2>;
53 clock-mult = <1>;
54 clocks = <&ahb_clk>;
55 };
56
57 ahb {
58 compatible = "simple-bus";
59 #address-cells = <1>;
60 #size-cells = <1>;
61 ranges;
62
63 spi: spi@A9000000 {
64 reg = <0xA9000000 0x1000>;
65 };
66
67 usb0: usb@B0000000 {
68 reg = <0xB0000000 0x1000>;
69 interrupts = <8>;
70 };
71
72 usb1: usb@B4000000 {
73 reg = <0xB4000000 0x1000>;
74 interrupts = <9>;
75 status = "disabled";
76 };
77
78 lcd: lcd@C0000000 {
79 compatible = "arm,pl111", "arm,primecell";
80 reg = <0xC0000000 0x1000>;
81 interrupts = <21>;
82
83 clocks = <&apb_pclk>;
84 clock-names = "apb_pclk";
85 };
86
87 adc: adc@C4000000 {
88 reg = <0xC4000000 0x1000>;
89 interrupts = <11>;
90 };
91
92 tdes: crypto@C8010000 {
93 reg = <0xC8010000 0x1000>;
94 };
95
96 sha256: crypto@CC000000 {
97 reg = <0xCC000000 0x1000>;
98 };
99
100 apb@90000000 {
101 compatible = "simple-bus";
102 #address-cells = <1>;
103 #size-cells = <1>;
104 clock-ranges;
105 ranges;
106
107 gpio: gpio@90000000 {
108 reg = <0x90000000 0x1000>;
109 interrupts = <7>;
110 };
111
112 fast_timer: timer@90010000 {
113 reg = <0x90010000 0x1000>;
114 interrupts = <17>;
115 };
116
117 uart: serial@90020000 {
118 reg = <0x90020000 0x1000>;
119 interrupts = <1>;
120 };
121
122 timer0: timer@900C0000 {
123 reg = <0x900C0000 0x1000>;
124
125 clocks = <&timer_clk>;
126 };
127
128 timer1: timer@900D0000 {
129 reg = <0x900D0000 0x1000>;
130 interrupts = <19>;
131
132 clocks = <&timer_clk>;
133 };
134
135 watchdog: watchdog@90060000 {
136 compatible = "arm,amba-primecell";
137 reg = <0x90060000 0x1000>;
138 interrupts = <3>;
139 };
140
141 rtc: rtc@90090000 {
142 reg = <0x90090000 0x1000>;
143 interrupts = <4>;
144 };
145
146 misc: misc@900A0000 {
147 reg = <0x900A0000 0x1000>;
148 };
149
150 pwr: pwr@900B0000 {
151 reg = <0x900B0000 0x1000>;
152 interrupts = <15>;
153 };
154
155 keypad: input@900E0000 {
156 compatible = "ti,nspire-keypad";
157 reg = <0x900E0000 0x1000>;
158 interrupts = <16>;
159
160 scan-interval = <1000>;
161 row-delay = <200>;
162
163 clocks = <&apb_pclk>;
164 };
165
166 contrast: contrast@900F0000 {
167 reg = <0x900F0000 0x1000>;
168 };
169
170 led: led@90110000 {
171 reg = <0x90110000 0x1000>;
172 };
173 };
174 };
175};
diff --git a/arch/arm/boot/dts/omap2.dtsi b/arch/arm/boot/dts/omap2.dtsi
index 37aa7487d4d8..a2bfcde858a6 100644
--- a/arch/arm/boot/dts/omap2.dtsi
+++ b/arch/arm/boot/dts/omap2.dtsi
@@ -8,7 +8,10 @@
8 * kind, whether express or implied. 8 * kind, whether express or implied.
9 */ 9 */
10 10
11/include/ "skeleton.dtsi" 11#include <dt-bindings/gpio/gpio.h>
12#include <dt-bindings/pinctrl/omap.h>
13
14#include "skeleton.dtsi"
12 15
13/ { 16/ {
14 compatible = "ti,omap2430", "ti,omap2420", "ti,omap2"; 17 compatible = "ti,omap2430", "ti,omap2420", "ti,omap2";
@@ -21,8 +24,12 @@
21 }; 24 };
22 25
23 cpus { 26 cpus {
24 cpu@0 { 27 #address-cells = <0>;
28 #size-cells = <0>;
29
30 cpu {
25 compatible = "arm,arm1136jf-s"; 31 compatible = "arm,arm1136jf-s";
32 device_type = "cpu";
26 }; 33 };
27 }; 34 };
28 35
diff --git a/arch/arm/boot/dts/omap2420-h4.dts b/arch/arm/boot/dts/omap2420-h4.dts
index 68282ee13e26..224c08f472f4 100644
--- a/arch/arm/boot/dts/omap2420-h4.dts
+++ b/arch/arm/boot/dts/omap2420-h4.dts
@@ -7,7 +7,7 @@
7 */ 7 */
8/dts-v1/; 8/dts-v1/;
9 9
10/include/ "omap2420.dtsi" 10#include "omap2420.dtsi"
11 11
12/ { 12/ {
13 model = "TI OMAP2420 H4 board"; 13 model = "TI OMAP2420 H4 board";
diff --git a/arch/arm/boot/dts/omap2420.dtsi b/arch/arm/boot/dts/omap2420.dtsi
index da5b285b73be..c8f9c55169ea 100644
--- a/arch/arm/boot/dts/omap2420.dtsi
+++ b/arch/arm/boot/dts/omap2420.dtsi
@@ -8,7 +8,7 @@
8 * kind, whether express or implied. 8 * kind, whether express or implied.
9 */ 9 */
10 10
11/include/ "omap2.dtsi" 11#include "omap2.dtsi"
12 12
13/ { 13/ {
14 compatible = "ti,omap2420", "ti,omap2"; 14 compatible = "ti,omap2420", "ti,omap2";
diff --git a/arch/arm/boot/dts/omap2430.dtsi b/arch/arm/boot/dts/omap2430.dtsi
index 054bc4439568..c535a5a2b27f 100644
--- a/arch/arm/boot/dts/omap2430.dtsi
+++ b/arch/arm/boot/dts/omap2430.dtsi
@@ -8,7 +8,7 @@
8 * kind, whether express or implied. 8 * kind, whether express or implied.
9 */ 9 */
10 10
11/include/ "omap2.dtsi" 11#include "omap2.dtsi"
12 12
13/ { 13/ {
14 compatible = "ti,omap2430", "ti,omap2"; 14 compatible = "ti,omap2430", "ti,omap2";
diff --git a/arch/arm/boot/dts/omap3-beagle-xm.dts b/arch/arm/boot/dts/omap3-beagle-xm.dts
index 3046d1f81be0..afdb16417d4e 100644
--- a/arch/arm/boot/dts/omap3-beagle-xm.dts
+++ b/arch/arm/boot/dts/omap3-beagle-xm.dts
@@ -7,7 +7,7 @@
7 */ 7 */
8/dts-v1/; 8/dts-v1/;
9 9
10/include/ "omap36xx.dtsi" 10#include "omap36xx.dtsi"
11 11
12/ { 12/ {
13 model = "TI OMAP3 BeagleBoard xM"; 13 model = "TI OMAP3 BeagleBoard xM";
@@ -29,13 +29,13 @@
29 29
30 heartbeat { 30 heartbeat {
31 label = "beagleboard::usr0"; 31 label = "beagleboard::usr0";
32 gpios = <&gpio5 22 0>; /* 150 -> D6 LED */ 32 gpios = <&gpio5 22 GPIO_ACTIVE_HIGH>; /* 150 -> D6 LED */
33 linux,default-trigger = "heartbeat"; 33 linux,default-trigger = "heartbeat";
34 }; 34 };
35 35
36 mmc { 36 mmc {
37 label = "beagleboard::usr1"; 37 label = "beagleboard::usr1";
38 gpios = <&gpio5 21 0>; /* 149 -> D7 LED */ 38 gpios = <&gpio5 21 GPIO_ACTIVE_HIGH>; /* 149 -> D7 LED */
39 linux,default-trigger = "mmc0"; 39 linux,default-trigger = "mmc0";
40 }; 40 };
41 }; 41 };
@@ -57,6 +57,26 @@
57 ti,mcbsp = <&mcbsp2>; 57 ti,mcbsp = <&mcbsp2>;
58 ti,codec = <&twl_audio>; 58 ti,codec = <&twl_audio>;
59 }; 59 };
60
61 gpio_keys {
62 compatible = "gpio-keys";
63
64 user {
65 label = "user";
66 gpios = <&gpio1 4 GPIO_ACTIVE_HIGH>;
67 linux,code = <0x114>;
68 gpio-key,wakeup;
69 };
70
71 };
72};
73
74&omap3_pmx_wkup {
75 gpio1_pins: pinmux_gpio1_pins {
76 pinctrl-single,pins = <
77 0x0e (PIN_INPUT | PIN_OFF_WAKEUPENABLE | MUX_MODE4) /* sys_boot2.gpio_4 */
78 >;
79 };
60}; 80};
61 81
62&i2c1 { 82&i2c1 {
@@ -75,7 +95,8 @@
75 }; 95 };
76}; 96};
77 97
78/include/ "twl4030.dtsi" 98#include "twl4030.dtsi"
99#include "twl4030_omap3.dtsi"
79 100
80&i2c2 { 101&i2c2 {
81 clock-frequency = <400000>; 102 clock-frequency = <400000>;
@@ -126,3 +147,22 @@
126 mode = <3>; 147 mode = <3>;
127 power = <50>; 148 power = <50>;
128}; 149};
150
151&omap3_pmx_core {
152 uart3_pins: pinmux_uart3_pins {
153 pinctrl-single,pins = <
154 0x16e (PIN_INPUT | PIN_OFF_WAKEUPENABLE | MUX_MODE0) /* uart3_rx_irrx.uart3_rx_irrx */
155 0x170 (PIN_OUTPUT | MUX_MODE0) /* uart3_tx_irtx.uart3_tx_irtx OUTPUT | MODE0 */
156 >;
157 };
158};
159
160&uart3 {
161 pinctrl-names = "default";
162 pinctrl-0 = <&uart3_pins>;
163};
164
165&gpio1 {
166 pinctrl-names = "default";
167 pinctrl-0 = <&gpio1_pins>;
168};
diff --git a/arch/arm/boot/dts/omap3-beagle.dts b/arch/arm/boot/dts/omap3-beagle.dts
index 6eec69997607..dfd83103657a 100644
--- a/arch/arm/boot/dts/omap3-beagle.dts
+++ b/arch/arm/boot/dts/omap3-beagle.dts
@@ -7,7 +7,7 @@
7 */ 7 */
8/dts-v1/; 8/dts-v1/;
9 9
10/include/ "omap34xx.dtsi" 10#include "omap34xx.dtsi"
11 11
12/ { 12/ {
13 model = "TI OMAP3 BeagleBoard"; 13 model = "TI OMAP3 BeagleBoard";
@@ -28,18 +28,18 @@
28 compatible = "gpio-leds"; 28 compatible = "gpio-leds";
29 pmu_stat { 29 pmu_stat {
30 label = "beagleboard::pmu_stat"; 30 label = "beagleboard::pmu_stat";
31 gpios = <&twl_gpio 19 0>; /* LEDB */ 31 gpios = <&twl_gpio 19 GPIO_ACTIVE_HIGH>; /* LEDB */
32 }; 32 };
33 33
34 heartbeat { 34 heartbeat {
35 label = "beagleboard::usr0"; 35 label = "beagleboard::usr0";
36 gpios = <&gpio5 22 0>; /* 150 -> D6 LED */ 36 gpios = <&gpio5 22 GPIO_ACTIVE_HIGH>; /* 150 -> D6 LED */
37 linux,default-trigger = "heartbeat"; 37 linux,default-trigger = "heartbeat";
38 }; 38 };
39 39
40 mmc { 40 mmc {
41 label = "beagleboard::usr1"; 41 label = "beagleboard::usr1";
42 gpios = <&gpio5 21 0>; /* 149 -> D7 LED */ 42 gpios = <&gpio5 21 GPIO_ACTIVE_HIGH>; /* 149 -> D7 LED */
43 linux,default-trigger = "mmc0"; 43 linux,default-trigger = "mmc0";
44 }; 44 };
45 }; 45 };
@@ -71,6 +71,26 @@
71 reset-supply = <&hsusb2_reset>; 71 reset-supply = <&hsusb2_reset>;
72 vcc-supply = <&hsusb2_power>; 72 vcc-supply = <&hsusb2_power>;
73 }; 73 };
74
75 gpio_keys {
76 compatible = "gpio-keys";
77
78 user {
79 label = "user";
80 gpios = <&gpio1 7 GPIO_ACTIVE_HIGH>;
81 linux,code = <0x114>;
82 gpio-key,wakeup;
83 };
84
85 };
86};
87
88&omap3_pmx_wkup {
89 gpio1_pins: pinmux_gpio1_pins {
90 pinctrl-single,pins = <
91 0x14 (PIN_INPUT | PIN_OFF_WAKEUPENABLE | MUX_MODE4) /* sys_boot5.gpio_7 */
92 >;
93 };
74}; 94};
75 95
76&omap3_pmx_core { 96&omap3_pmx_core {
@@ -81,18 +101,25 @@
81 101
82 hsusbb2_pins: pinmux_hsusbb2_pins { 102 hsusbb2_pins: pinmux_hsusbb2_pins {
83 pinctrl-single,pins = < 103 pinctrl-single,pins = <
84 0x5c0 0x3 /* USBB2_ULPITLL_CLK_MUXMODE.usbb1_ulpiphy_clk OUTPUT */ 104 0x5c0 (PIN_OUTPUT | MUX_MODE3) /* usbb2_ulpitll_clk.usbb1_ulpiphy_clk */
85 0x5c2 0x3 /* USBB2_ULPITLL_CLK_MUXMODE.usbb1_ulpiphy_stp OUTPUT */ 105 0x5c2 (PIN_OUTPUT | MUX_MODE3) /* usbb2_ulpitll_clk.usbb1_ulpiphy_stp */
86 0x5c4 0x10b /* USBB2_ULPITLL_CLK_MUXMODE.usbb1_ulpiphy_dir INPUT | PULLDOWN */ 106 0x5c4 (PIN_INPUT_PULLDOWN | MUX_MODE3) /* usbb2_ulpitll_clk.usbb1_ulpiphy_dir */
87 0x5c6 0x10b /* USBB2_ULPITLL_CLK_MUXMODE.usbb1_ulpiphy_nxt INPUT | PULLDOWN */ 107 0x5c6 (PIN_INPUT_PULLDOWN | MUX_MODE3) /* usbb2_ulpitll_clk.usbb1_ulpiphy_nxt */
88 0x5c8 0x10b /* USBB2_ULPITLL_CLK_MUXMODE.usbb1_ulpiphy_dat0 INPUT | PULLDOWN */ 108 0x5c8 (PIN_INPUT_PULLDOWN | MUX_MODE3) /* usbb2_ulpitll_clk.usbb1_ulpiphy_dat0 */
89 0x5cA 0x10b /* USBB2_ULPITLL_CLK_MUXMODE.usbb1_ulpiphy_dat1 INPUT | PULLDOWN */ 109 0x5cA (PIN_INPUT_PULLDOWN | MUX_MODE3) /* usbb2_ulpitll_clk.usbb1_ulpiphy_dat1 */
90 0x1a4 0x10b /* USBB2_ULPITLL_CLK_MUXMODE.usbb1_ulpiphy_dat2 INPUT | PULLDOWN */ 110 0x1a4 (PIN_INPUT_PULLDOWN | MUX_MODE3) /* usbb2_ulpitll_clk.usbb1_ulpiphy_dat2 */
91 0x1a6 0x10b /* USBB2_ULPITLL_CLK_MUXMODE.usbb1_ulpiphy_dat3 INPUT | PULLDOWN */ 111 0x1a6 (PIN_INPUT_PULLDOWN | MUX_MODE3) /* usbb2_ulpitll_clk.usbb1_ulpiphy_dat3 */
92 0x1a8 0x10b /* USBB2_ULPITLL_CLK_MUXMODE.usbb1_ulpiphy_dat4 INPUT | PULLDOWN */ 112 0x1a8 (PIN_INPUT_PULLDOWN | MUX_MODE3) /* usbb2_ulpitll_clk.usbb1_ulpiphy_dat4 */
93 0x1aa 0x10b /* USBB2_ULPITLL_CLK_MUXMODE.usbb1_ulpiphy_dat5 INPUT | PULLDOWN */ 113 0x1aa (PIN_INPUT_PULLDOWN | MUX_MODE3) /* usbb2_ulpitll_clk.usbb1_ulpiphy_dat5 */
94 0x1ac 0x10b /* USBB2_ULPITLL_CLK_MUXMODE.usbb1_ulpiphy_dat6 INPUT | PULLDOWN */ 114 0x1ac (PIN_INPUT_PULLDOWN | MUX_MODE3) /* usbb2_ulpitll_clk.usbb1_ulpiphy_dat6 */
95 0x1ae 0x10b /* USBB2_ULPITLL_CLK_MUXMODE.usbb1_ulpiphy_dat7 INPUT | PULLDOWN */ 115 0x1ae (PIN_INPUT_PULLDOWN | MUX_MODE3) /* usbb2_ulpitll_clk.usbb1_ulpiphy_dat7 */
116 >;
117 };
118
119 uart3_pins: pinmux_uart3_pins {
120 pinctrl-single,pins = <
121 0x16e (PIN_INPUT | PIN_OFF_WAKEUPENABLE | MUX_MODE0) /* uart3_rx_irrx.uart3_rx_irrx */
122 0x170 (PIN_OUTPUT | MUX_MODE0) /* uart3_tx_irtx.uart3_tx_irtx */
96 >; 123 >;
97 }; 124 };
98}; 125};
@@ -107,7 +134,8 @@
107 }; 134 };
108}; 135};
109 136
110/include/ "twl4030.dtsi" 137#include "twl4030.dtsi"
138#include "twl4030_omap3.dtsi"
111 139
112&mmc1 { 140&mmc1 {
113 vmmc-supply = <&vmmc1>; 141 vmmc-supply = <&vmmc1>;
@@ -142,3 +170,13 @@
142 */ 170 */
143 ti,pulldowns = <0x03a1c4>; 171 ti,pulldowns = <0x03a1c4>;
144}; 172};
173
174&uart3 {
175 pinctrl-names = "default";
176 pinctrl-0 = <&uart3_pins>;
177};
178
179&gpio1 {
180 pinctrl-names = "default";
181 pinctrl-0 = <&gpio1_pins>;
182};
diff --git a/arch/arm/boot/dts/omap3-devkit8000.dts b/arch/arm/boot/dts/omap3-devkit8000.dts
index 8a5cdcc6debd..7ef282795dd4 100644
--- a/arch/arm/boot/dts/omap3-devkit8000.dts
+++ b/arch/arm/boot/dts/omap3-devkit8000.dts
@@ -7,7 +7,7 @@
7 */ 7 */
8/dts-v1/; 8/dts-v1/;
9 9
10/include/ "omap34xx.dtsi" 10#include "omap34xx.dtsi"
11/ { 11/ {
12 model = "TimLL OMAP3 Devkit8000"; 12 model = "TimLL OMAP3 Devkit8000";
13 compatible = "timll,omap3-devkit8000", "ti,omap3"; 13 compatible = "timll,omap3-devkit8000", "ti,omap3";
@@ -22,21 +22,21 @@
22 22
23 heartbeat { 23 heartbeat {
24 label = "devkit8000::led1"; 24 label = "devkit8000::led1";
25 gpios = <&gpio6 26 0>; /* 186 -> LED1 */ 25 gpios = <&gpio6 26 GPIO_ACTIVE_HIGH>; /* 186 -> LED1 */
26 default-state = "on"; 26 default-state = "on";
27 linux,default-trigger = "heartbeat"; 27 linux,default-trigger = "heartbeat";
28 }; 28 };
29 29
30 mmc { 30 mmc {
31 label = "devkit8000::led2"; 31 label = "devkit8000::led2";
32 gpios = <&gpio6 3 0>; /* 163 -> LED2 */ 32 gpios = <&gpio6 3 GPIO_ACTIVE_HIGH>; /* 163 -> LED2 */
33 default-state = "on"; 33 default-state = "on";
34 linux,default-trigger = "none"; 34 linux,default-trigger = "none";
35 }; 35 };
36 36
37 usr { 37 usr {
38 label = "devkit8000::led3"; 38 label = "devkit8000::led3";
39 gpios = <&gpio6 4 0>; /* 164 -> LED3 */ 39 gpios = <&gpio6 4 GPIO_ACTIVE_HIGH>; /* 164 -> LED3 */
40 default-state = "on"; 40 default-state = "on";
41 linux,default-trigger = "usr"; 41 linux,default-trigger = "usr";
42 }; 42 };
@@ -80,7 +80,8 @@
80 status = "disabled"; 80 status = "disabled";
81}; 81};
82 82
83/include/ "twl4030.dtsi" 83#include "twl4030.dtsi"
84#include "twl4030_omap3.dtsi"
84 85
85&mmc1 { 86&mmc1 {
86 vmmc-supply = <&vmmc1>; 87 vmmc-supply = <&vmmc1>;
@@ -123,20 +124,21 @@
123 reg = <0 0 0>; /* CS0, offset 0 */ 124 reg = <0 0 0>; /* CS0, offset 0 */
124 nand-bus-width = <16>; 125 nand-bus-width = <16>;
125 126
126 gpmc,sync-clk = <0>; 127 gpmc,device-nand;
127 gpmc,cs-on = <0>; 128 gpmc,sync-clki-ps = <0>;
128 gpmc,cs-rd-off = <44>; 129 gpmc,cs-on-ns = <0>;
129 gpmc,cs-wr-off = <44>; 130 gpmc,cs-rd-off-ns = <44>;
130 gpmc,adv-on = <6>; 131 gpmc,cs-wr-off-ns = <44>;
131 gpmc,adv-rd-off = <34>; 132 gpmc,adv-on-ns = <6>;
132 gpmc,adv-wr-off = <44>; 133 gpmc,adv-rd-off-ns = <34>;
133 gpmc,we-off = <40>; 134 gpmc,adv-wr-off-ns = <44>;
134 gpmc,oe-off = <54>; 135 gpmc,we-off-ns = <40>;
135 gpmc,access = <64>; 136 gpmc,oe-off-ns = <54>;
136 gpmc,rd-cycle = <82>; 137 gpmc,access-ns = <64>;
137 gpmc,wr-cycle = <82>; 138 gpmc,rd-cycle-ns = <82>;
138 gpmc,wr-access = <40>; 139 gpmc,wr-cycle-ns = <82>;
139 gpmc,wr-data-mux-bus = <0>; 140 gpmc,wr-access-ns = <40>;
141 gpmc,wr-data-mux-bus-ns = <0>;
140 142
141 #address-cells = <1>; 143 #address-cells = <1>;
142 #size-cells = <1>; 144 #size-cells = <1>;
diff --git a/arch/arm/boot/dts/omap3-evm.dts b/arch/arm/boot/dts/omap3-evm.dts
index 96d1c206a57b..7d4329d179c4 100644
--- a/arch/arm/boot/dts/omap3-evm.dts
+++ b/arch/arm/boot/dts/omap3-evm.dts
@@ -7,7 +7,7 @@
7 */ 7 */
8/dts-v1/; 8/dts-v1/;
9 9
10/include/ "omap34xx.dtsi" 10#include "omap34xx.dtsi"
11 11
12/ { 12/ {
13 model = "TI OMAP3 EVM (OMAP3530, AM/DM37x)"; 13 model = "TI OMAP3 EVM (OMAP3530, AM/DM37x)";
@@ -28,7 +28,7 @@
28 compatible = "gpio-leds"; 28 compatible = "gpio-leds";
29 ledb { 29 ledb {
30 label = "omap3evm::ledb"; 30 label = "omap3evm::ledb";
31 gpios = <&twl_gpio 19 0>; /* LEDB */ 31 gpios = <&twl_gpio 19 GPIO_ACTIVE_HIGH>; /* LEDB */
32 linux,default-trigger = "default-on"; 32 linux,default-trigger = "default-on";
33 }; 33 };
34 }; 34 };
@@ -44,7 +44,8 @@
44 }; 44 };
45}; 45};
46 46
47/include/ "twl4030.dtsi" 47#include "twl4030.dtsi"
48#include "twl4030_omap3.dtsi"
48 49
49&i2c2 { 50&i2c2 {
50 clock-frequency = <400000>; 51 clock-frequency = <400000>;
diff --git a/arch/arm/boot/dts/omap3-igep.dtsi b/arch/arm/boot/dts/omap3-igep.dtsi
index f8fe3b748c3e..bc48b114eae6 100644
--- a/arch/arm/boot/dts/omap3-igep.dtsi
+++ b/arch/arm/boot/dts/omap3-igep.dtsi
@@ -10,7 +10,7 @@
10 */ 10 */
11/dts-v1/; 11/dts-v1/;
12 12
13/include/ "omap34xx.dtsi" 13#include "omap34xx.dtsi"
14 14
15/ { 15/ {
16 memory { 16 memory {
@@ -29,37 +29,43 @@
29&omap3_pmx_core { 29&omap3_pmx_core {
30 uart1_pins: pinmux_uart1_pins { 30 uart1_pins: pinmux_uart1_pins {
31 pinctrl-single,pins = < 31 pinctrl-single,pins = <
32 0x152 0x100 /* uart1_rx.uart1_rx INPUT | MODE0 */ 32 0x152 (PIN_INPUT | MUX_MODE0) /* uart1_rx.uart1_rx */
33 0x14c 0 /* uart1_tx.uart1_tx OUTPUT | MODE0 */ 33 0x14c (PIN_OUTPUT |MUX_MODE0) /* uart1_tx.uart1_tx */
34 >; 34 >;
35 }; 35 };
36 36
37 uart2_pins: pinmux_uart2_pins { 37 uart2_pins: pinmux_uart2_pins {
38 pinctrl-single,pins = < 38 pinctrl-single,pins = <
39 0x14a 0x100 /* uart2_rx.uart2_rx INPUT | MODE0 */ 39 0x14a (PIN_INPUT | MUX_MODE0) /* uart2_rx.uart2_rx */
40 0x148 0 /* uart2_tx.uart2_tx OUTPUT | MODE0 */ 40 0x148 (PIN_OUTPUT | MUX_MODE0) /* uart2_tx.uart2_tx */
41 >; 41 >;
42 }; 42 };
43 43
44 uart3_pins: pinmux_uart3_pins { 44 uart3_pins: pinmux_uart3_pins {
45 pinctrl-single,pins = < 45 pinctrl-single,pins = <
46 0x16e 0x100 /* uart3_rx.uart3_rx INPUT | MODE0 */ 46 0x16e (PIN_INPUT | MUX_MODE0) /* uart3_rx.uart3_rx */
47 0x170 0 /* uart3_tx.uart3_tx OUTPUT | MODE0 */ 47 0x170 (PIN_OUTPUT | MUX_MODE0) /* uart3_tx.uart3_tx */
48 >; 48 >;
49 }; 49 };
50 50
51 mmc1_pins: pinmux_mmc1_pins { 51 mmc1_pins: pinmux_mmc1_pins {
52 pinctrl-single,pins = < 52 pinctrl-single,pins = <
53 0x114 0x0118 /* sdmmc1_clk.sdmmc1_clk INPUT PULLUP | MODE 0 */ 53 0x114 (PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc1_clk.sdmmc1_clk */
54 0x116 0x0118 /* sdmmc1_cmd.sdmmc1_cmd INPUT PULLUP | MODE 0 */ 54 0x116 (PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc1_cmd.sdmmc1_cmd */
55 0x118 0x0118 /* sdmmc1_dat0.sdmmc1_dat0 INPUT PULLUP | MODE 0 */ 55 0x118 (PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc1_dat0.sdmmc1_dat0 */
56 0x11a 0x0118 /* sdmmc1_dat1.sdmmc1_dat1 INPUT PULLUP | MODE 0 */ 56 0x11a (PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc1_dat1.sdmmc1_dat1 */
57 0x11c 0x0118 /* sdmmc1_dat2.sdmmc1_dat2 INPUT PULLUP | MODE 0 */ 57 0x11c (PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc1_dat2.sdmmc1_dat2 */
58 0x11e 0x0118 /* sdmmc1_dat3.sdmmc1_dat3 INPUT PULLUP | MODE 0 */ 58 0x11e (PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc1_dat3.sdmmc1_dat3 */
59 0x120 0x0100 /* sdmmc1_dat4.sdmmc1_dat4 INPUT | MODE 0 */ 59 0x120 (PIN_INPUT | MUX_MODE0) /* sdmmc1_dat4.sdmmc1_dat4 */
60 0x122 0x0100 /* sdmmc1_dat5.sdmmc1_dat5 INPUT | MODE 0 */ 60 0x122 (PIN_INPUT | MUX_MODE0) /* sdmmc1_dat5.sdmmc1_dat5 */
61 0x124 0x0100 /* sdmmc1_dat6.sdmmc1_dat6 INPUT | MODE 0 */ 61 0x124 (PIN_INPUT | MUX_MODE0) /* sdmmc1_dat6.sdmmc1_dat6 */
62 0x126 0x0100 /* sdmmc1_dat7.sdmmc1_dat7 INPUT | MODE 0 */ 62 0x126 (PIN_INPUT | MUX_MODE0) /* sdmmc1_dat7.sdmmc1_dat7 */
63 >;
64 };
65
66 smsc911x_pins: pinmux_smsc911x_pins {
67 pinctrl-single,pins = <
68 0x1a2 (PIN_INPUT | MUX_MODE4) /* mcspi1_cs2.gpio_176 */
63 >; 69 >;
64 }; 70 };
65}; 71};
@@ -80,7 +86,8 @@
80 }; 86 };
81}; 87};
82 88
83/include/ "twl4030.dtsi" 89#include "twl4030.dtsi"
90#include "twl4030_omap3.dtsi"
84 91
85&i2c2 { 92&i2c2 {
86 clock-frequency = <400000>; 93 clock-frequency = <400000>;
diff --git a/arch/arm/boot/dts/omap3-igep0020.dts b/arch/arm/boot/dts/omap3-igep0020.dts
index e2b98490cc9a..e8c48284587c 100644
--- a/arch/arm/boot/dts/omap3-igep0020.dts
+++ b/arch/arm/boot/dts/omap3-igep0020.dts
@@ -9,7 +9,7 @@
9 * published by the Free Software Foundation. 9 * published by the Free Software Foundation.
10 */ 10 */
11 11
12/include/ "omap3-igep.dtsi" 12#include "omap3-igep.dtsi"
13 13
14/ { 14/ {
15 model = "IGEPv2"; 15 model = "IGEPv2";
@@ -19,27 +19,39 @@
19 compatible = "gpio-leds"; 19 compatible = "gpio-leds";
20 boot { 20 boot {
21 label = "omap3:green:boot"; 21 label = "omap3:green:boot";
22 gpios = <&gpio1 26 0>; 22 gpios = <&gpio1 26 GPIO_ACTIVE_HIGH>;
23 default-state = "on"; 23 default-state = "on";
24 }; 24 };
25 25
26 user0 { 26 user0 {
27 label = "omap3:red:user0"; 27 label = "omap3:red:user0";
28 gpios = <&gpio1 27 0>; 28 gpios = <&gpio1 27 GPIO_ACTIVE_HIGH>;
29 default-state = "off"; 29 default-state = "off";
30 }; 30 };
31 31
32 user1 { 32 user1 {
33 label = "omap3:red:user1"; 33 label = "omap3:red:user1";
34 gpios = <&gpio1 28 0>; 34 gpios = <&gpio1 28 GPIO_ACTIVE_HIGH>;
35 default-state = "off"; 35 default-state = "off";
36 }; 36 };
37 37
38 user2 { 38 user2 {
39 label = "omap3:green:user1"; 39 label = "omap3:green:user1";
40 gpios = <&twl_gpio 19 1>; 40 gpios = <&twl_gpio 19 GPIO_ACTIVE_LOW>;
41 }; 41 };
42 }; 42 };
43
44 vddvario: regulator-vddvario {
45 compatible = "regulator-fixed";
46 regulator-name = "vddvario";
47 regulator-always-on;
48 };
49
50 vdd33a: regulator-vdd33a {
51 compatible = "regulator-fixed";
52 regulator-name = "vdd33a";
53 regulator-always-on;
54 };
43}; 55};
44 56
45&i2c3 { 57&i2c3 {
@@ -54,3 +66,92 @@
54 reg = <0x50>; 66 reg = <0x50>;
55 }; 67 };
56}; 68};
69
70&gpmc {
71 ranges = <0 0 0x00000000 0x20000000>,
72 <5 0 0x2c000000 0x01000000>;
73
74 nand@0,0 {
75 linux,mtd-name= "micron,mt29c4g96maz";
76 reg = <0 0 0>;
77 nand-bus-width = <16>;
78 ti,nand-ecc-opt = "bch8";
79
80 gpmc,sync-clk-ps = <0>;
81 gpmc,cs-on-ns = <0>;
82 gpmc,cs-rd-off-ns = <44>;
83 gpmc,cs-wr-off-ns = <44>;
84 gpmc,adv-on-ns = <6>;
85 gpmc,adv-rd-off-ns = <34>;
86 gpmc,adv-wr-off-ns = <44>;
87 gpmc,we-off-ns = <40>;
88 gpmc,oe-off-ns = <54>;
89 gpmc,access-ns = <64>;
90 gpmc,rd-cycle-ns = <82>;
91 gpmc,wr-cycle-ns = <82>;
92 gpmc,wr-access-ns = <40>;
93 gpmc,wr-data-mux-bus-ns = <0>;
94
95 #address-cells = <1>;
96 #size-cells = <1>;
97
98 partition@0 {
99 label = "SPL";
100 reg = <0 0x100000>;
101 };
102 partition@0x80000 {
103 label = "U-Boot";
104 reg = <0x100000 0x180000>;
105 };
106 partition@0x1c0000 {
107 label = "Environment";
108 reg = <0x280000 0x100000>;
109 };
110 partition@0x280000 {
111 label = "Kernel";
112 reg = <0x380000 0x300000>;
113 };
114 partition@0x780000 {
115 label = "Filesystem";
116 reg = <0x680000 0x1f980000>;
117 };
118 };
119
120 ethernet@5,0 {
121 pinctrl-names = "default";
122 pinctrl-0 = <&smsc911x_pins>;
123 compatible = "smsc,lan9221", "smsc,lan9115";
124 reg = <5 0 0xff>;
125 bank-width = <2>;
126
127 gpmc,mux-add-data;
128 gpmc,cs-on-ns = <0>;
129 gpmc,cs-rd-off-ns = <186>;
130 gpmc,cs-wr-off-ns = <186>;
131 gpmc,adv-on-ns = <12>;
132 gpmc,adv-rd-off-ns = <48>;
133 gpmc,adv-wr-off-ns = <48>;
134 gpmc,oe-on-ns = <54>;
135 gpmc,oe-off-ns = <168>;
136 gpmc,we-on-ns = <54>;
137 gpmc,we-off-ns = <168>;
138 gpmc,rd-cycle-ns = <186>;
139 gpmc,wr-cycle-ns = <186>;
140 gpmc,access-ns = <114>;
141 gpmc,page-burst-access-ns = <6>;
142 gpmc,bus-turnaround-ns = <12>;
143 gpmc,cycle2cycle-delay-ns = <18>;
144 gpmc,wr-data-mux-bus-ns = <90>;
145 gpmc,wr-access-ns = <186>;
146 gpmc,cycle2cycle-samecsen;
147 gpmc,cycle2cycle-diffcsen;
148
149 interrupt-parent = <&gpio6>;
150 interrupts = <16 8>;
151 vmmc-supply = <&vddvario>;
152 vmmc_aux-supply = <&vdd33a>;
153 reg-io-width = <4>;
154
155 smsc,save-mac-address;
156 };
157};
diff --git a/arch/arm/boot/dts/omap3-igep0030.dts b/arch/arm/boot/dts/omap3-igep0030.dts
index 9dc48d262ffb..644d05383836 100644
--- a/arch/arm/boot/dts/omap3-igep0030.dts
+++ b/arch/arm/boot/dts/omap3-igep0030.dts
@@ -9,7 +9,7 @@
9 * published by the Free Software Foundation. 9 * published by the Free Software Foundation.
10 */ 10 */
11 11
12/include/ "omap3-igep.dtsi" 12#include "omap3-igep.dtsi"
13 13
14/ { 14/ {
15 model = "IGEP COM Module"; 15 model = "IGEP COM Module";
@@ -19,26 +19,76 @@
19 compatible = "gpio-leds"; 19 compatible = "gpio-leds";
20 boot { 20 boot {
21 label = "omap3:green:boot"; 21 label = "omap3:green:boot";
22 gpios = <&twl_gpio 13 1>; 22 gpios = <&twl_gpio 13 GPIO_ACTIVE_LOW>;
23 default-state = "on"; 23 default-state = "on";
24 }; 24 };
25 25
26 user0 { 26 user0 {
27 label = "omap3:red:user0"; 27 label = "omap3:red:user0";
28 gpios = <&twl_gpio 18 1>; /* LEDA */ 28 gpios = <&twl_gpio 18 GPIO_ACTIVE_LOW>; /* LEDA */
29 default-state = "off"; 29 default-state = "off";
30 }; 30 };
31 31
32 user1 { 32 user1 {
33 label = "omap3:green:user1"; 33 label = "omap3:green:user1";
34 gpios = <&twl_gpio 19 1>; /* LEDB */ 34 gpios = <&twl_gpio 19 GPIO_ACTIVE_LOW>; /* LEDB */
35 default-state = "off"; 35 default-state = "off";
36 }; 36 };
37 37
38 user2 { 38 user2 {
39 label = "omap3:red:user1"; 39 label = "omap3:red:user1";
40 gpios = <&gpio1 16 1>; 40 gpios = <&gpio1 16 GPIO_ACTIVE_LOW>;
41 default-state = "off"; 41 default-state = "off";
42 }; 42 };
43 }; 43 };
44}; 44};
45
46&gpmc {
47 ranges = <0 0 0x00000000 0x20000000>;
48
49 nand@0,0 {
50 linux,mtd-name= "micron,mt29c4g96maz";
51 reg = <0 0 0>;
52 nand-bus-width = <16>;
53 ti,nand-ecc-opt = "bch8";
54
55 gpmc,sync-clk-ps = <0>;
56 gpmc,cs-on-ns = <0>;
57 gpmc,cs-rd-off-ns = <44>;
58 gpmc,cs-wr-off-ns = <44>;
59 gpmc,adv-on-ns = <6>;
60 gpmc,adv-rd-off-ns = <34>;
61 gpmc,adv-wr-off-ns = <44>;
62 gpmc,we-off-ns = <40>;
63 gpmc,oe-off-ns = <54>;
64 gpmc,access-ns = <64>;
65 gpmc,rd-cycle-ns = <82>;
66 gpmc,wr-cycle-ns = <82>;
67 gpmc,wr-access-ns = <40>;
68 gpmc,wr-data-mux-bus-ns = <0>;
69
70 #address-cells = <1>;
71 #size-cells = <1>;
72
73 partition@0 {
74 label = "SPL";
75 reg = <0 0x100000>;
76 };
77 partition@0x80000 {
78 label = "U-Boot";
79 reg = <0x100000 0x180000>;
80 };
81 partition@0x1c0000 {
82 label = "Environment";
83 reg = <0x280000 0x100000>;
84 };
85 partition@0x280000 {
86 label = "Kernel";
87 reg = <0x380000 0x300000>;
88 };
89 partition@0x780000 {
90 label = "Filesystem";
91 reg = <0x680000 0x1f980000>;
92 };
93 };
94};
diff --git a/arch/arm/boot/dts/omap3-overo.dtsi b/arch/arm/boot/dts/omap3-overo.dtsi
index a626c50041f6..8f1abec78275 100644
--- a/arch/arm/boot/dts/omap3-overo.dtsi
+++ b/arch/arm/boot/dts/omap3-overo.dtsi
@@ -11,7 +11,7 @@
11 */ 11 */
12/dts-v1/; 12/dts-v1/;
13 13
14/include/ "omap34xx.dtsi" 14#include "omap34xx.dtsi"
15 15
16/ { 16/ {
17 pwmleds { 17 pwmleds {
@@ -21,6 +21,7 @@
21 label = "overo:blue:COM"; 21 label = "overo:blue:COM";
22 pwms = <&twl_pwmled 1 7812500>; 22 pwms = <&twl_pwmled 1 7812500>;
23 max-brightness = <127>; 23 max-brightness = <127>;
24 linux,default-trigger = "mmc0";
24 }; 25 };
25 }; 26 };
26 27
@@ -49,7 +50,8 @@
49 }; 50 };
50}; 51};
51 52
52/include/ "twl4030.dtsi" 53#include "twl4030.dtsi"
54#include "twl4030_omap3.dtsi"
53 55
54/* i2c2 pins are used for gpio */ 56/* i2c2 pins are used for gpio */
55&i2c2 { 57&i2c2 {
@@ -77,3 +79,17 @@
77 mode = <3>; 79 mode = <3>;
78 power = <50>; 80 power = <50>;
79}; 81};
82
83&omap3_pmx_core {
84 uart3_pins: pinmux_uart3_pins {
85 pinctrl-single,pins = <
86 0x16e (PIN_INPUT | PIN_OFF_WAKEUPENABLE | MUX_MODE0) /* uart3_rx_irrx.uart3_rx_irrx */
87 0x170 (PIN_OUTPUT | MUX_MODE0) /* uart3_tx_irtx.uart3_tx_irtx */
88 >;
89 };
90};
91
92&uart3 {
93 pinctrl-names = "default";
94 pinctrl-0 = <&uart3_pins>;
95};
diff --git a/arch/arm/boot/dts/omap3-tobi.dts b/arch/arm/boot/dts/omap3-tobi.dts
index a13d12de77ff..7e4ad2aec37a 100644
--- a/arch/arm/boot/dts/omap3-tobi.dts
+++ b/arch/arm/boot/dts/omap3-tobi.dts
@@ -10,7 +10,7 @@
10 * Tobi expansion board is manufactured by Gumstix Inc. 10 * Tobi expansion board is manufactured by Gumstix Inc.
11 */ 11 */
12 12
13/include/ "omap3-overo.dtsi" 13#include "omap3-overo.dtsi"
14 14
15/ { 15/ {
16 model = "TI OMAP3 Gumstix Overo on Tobi"; 16 model = "TI OMAP3 Gumstix Overo on Tobi";
@@ -20,10 +20,58 @@
20 compatible = "gpio-leds"; 20 compatible = "gpio-leds";
21 heartbeat { 21 heartbeat {
22 label = "overo:red:gpio21"; 22 label = "overo:red:gpio21";
23 gpios = <&gpio1 21 0>; 23 gpios = <&gpio1 21 GPIO_ACTIVE_LOW>;
24 linux,default-trigger = "heartbeat"; 24 linux,default-trigger = "heartbeat";
25 }; 25 };
26 }; 26 };
27
28 vddvario: regulator-vddvario {
29 compatible = "regulator-fixed";
30 regulator-name = "vddvario";
31 regulator-always-on;
32 };
33
34 vdd33a: regulator-vdd33a {
35 compatible = "regulator-fixed";
36 regulator-name = "vdd33a";
37 regulator-always-on;
38 };
39};
40
41&gpmc {
42 ranges = <5 0 0x2c000000 0x1000000>; /* CS5 */
43
44 ethernet@5,0 {
45 compatible = "smsc,lan9221", "smsc,lan9115";
46 reg = <5 0 0xff>;
47 bank-width = <2>;
48
49 gpmc,mux-add-data;
50 gpmc,cs-on-ns = <0>;
51 gpmc,cs-rd-off-ns = <42>;
52 gpmc,cs-wr-off-ns = <36>;
53 gpmc,adv-on-ns = <6>;
54 gpmc,adv-rd-off-ns = <12>;
55 gpmc,adv-wr-off-ns = <12>;
56 gpmc,oe-on-ns = <0>;
57 gpmc,oe-off-ns = <42>;
58 gpmc,we-on-ns = <0>;
59 gpmc,we-off-ns = <36>;
60 gpmc,rd-cycle-ns = <60>;
61 gpmc,wr-cycle-ns = <54>;
62 gpmc,access-ns = <36>;
63 gpmc,page-burst-access-ns = <0>;
64 gpmc,bus-turnaround-ns = <0>;
65 gpmc,cycle2cycle-delay-ns = <0>;
66 gpmc,wr-data-mux-bus-ns = <18>;
67 gpmc,wr-access-ns = <42>;
68 gpmc,cycle2cycle-samecsen;
69 gpmc,cycle2cycle-diffcsen;
70
71 interrupt-parent = <&gpio6>;
72 interrupts = <16 IRQ_TYPE_LEVEL_LOW>; /* GPIO 176 */
73 reg-io-width = <4>;
74 };
27}; 75};
28 76
29&i2c3 { 77&i2c3 {
diff --git a/arch/arm/boot/dts/omap3.dtsi b/arch/arm/boot/dts/omap3.dtsi
index 99ba6e14ebf3..7d95cda1fae4 100644
--- a/arch/arm/boot/dts/omap3.dtsi
+++ b/arch/arm/boot/dts/omap3.dtsi
@@ -8,7 +8,11 @@
8 * kind, whether express or implied. 8 * kind, whether express or implied.
9 */ 9 */
10 10
11/include/ "skeleton.dtsi" 11#include <dt-bindings/gpio/gpio.h>
12#include <dt-bindings/interrupt-controller/irq.h>
13#include <dt-bindings/pinctrl/omap.h>
14
15#include "skeleton.dtsi"
12 16
13/ { 17/ {
14 compatible = "ti,omap3430", "ti,omap3"; 18 compatible = "ti,omap3430", "ti,omap3";
@@ -21,8 +25,13 @@
21 }; 25 };
22 26
23 cpus { 27 cpus {
28 #address-cells = <1>;
29 #size-cells = <0>;
30
24 cpu@0 { 31 cpu@0 {
25 compatible = "arm,cortex-a8"; 32 compatible = "arm,cortex-a8";
33 device_type = "cpu";
34 reg = <0x0>;
26 }; 35 };
27 }; 36 };
28 37
diff --git a/arch/arm/boot/dts/omap3430-sdp.dts b/arch/arm/boot/dts/omap3430-sdp.dts
index 144ae43453c4..e2249bcc3e63 100644
--- a/arch/arm/boot/dts/omap3430-sdp.dts
+++ b/arch/arm/boot/dts/omap3430-sdp.dts
@@ -7,7 +7,7 @@
7 */ 7 */
8/dts-v1/; 8/dts-v1/;
9 9
10/include/ "omap34xx.dtsi" 10#include "omap34xx.dtsi"
11 11
12/ { 12/ {
13 model = "TI OMAP3430 SDP"; 13 model = "TI OMAP3430 SDP";
@@ -28,7 +28,8 @@
28 }; 28 };
29}; 29};
30 30
31/include/ "twl4030.dtsi" 31#include "twl4030.dtsi"
32#include "twl4030_omap3.dtsi"
32 33
33&mmc1 { 34&mmc1 {
34 vmmc-supply = <&vmmc1>; 35 vmmc-supply = <&vmmc1>;
@@ -105,7 +106,6 @@
105 nand-bus-width = <8>; 106 nand-bus-width = <8>;
106 107
107 ti,nand-ecc-opt = "sw"; 108 ti,nand-ecc-opt = "sw";
108 gpmc,device-nand;
109 gpmc,cs-on-ns = <0>; 109 gpmc,cs-on-ns = <0>;
110 gpmc,cs-rd-off-ns = <36>; 110 gpmc,cs-rd-off-ns = <36>;
111 gpmc,cs-wr-off-ns = <36>; 111 gpmc,cs-wr-off-ns = <36>;
diff --git a/arch/arm/boot/dts/omap34xx.dtsi b/arch/arm/boot/dts/omap34xx.dtsi
index 75ed4ae2e631..5355d6173748 100644
--- a/arch/arm/boot/dts/omap34xx.dtsi
+++ b/arch/arm/boot/dts/omap34xx.dtsi
@@ -8,7 +8,7 @@
8 * kind, whether express or implied. 8 * kind, whether express or implied.
9 */ 9 */
10 10
11/include/ "omap3.dtsi" 11#include "omap3.dtsi"
12 12
13/ { 13/ {
14 cpus { 14 cpus {
diff --git a/arch/arm/boot/dts/omap36xx.dtsi b/arch/arm/boot/dts/omap36xx.dtsi
index f3447bc1b032..f8b3765eb9be 100644
--- a/arch/arm/boot/dts/omap36xx.dtsi
+++ b/arch/arm/boot/dts/omap36xx.dtsi
@@ -8,7 +8,7 @@
8 * kind, whether express or implied. 8 * kind, whether express or implied.
9 */ 9 */
10 10
11/include/ "omap3.dtsi" 11#include "omap3.dtsi"
12 12
13/ { 13/ {
14 aliases { 14 aliases {
diff --git a/arch/arm/boot/dts/omap4-panda-a4.dts b/arch/arm/boot/dts/omap4-panda-a4.dts
index e30cdf0f5ac1..133f1b74e8ae 100644
--- a/arch/arm/boot/dts/omap4-panda-a4.dts
+++ b/arch/arm/boot/dts/omap4-panda-a4.dts
@@ -7,14 +7,14 @@
7 */ 7 */
8/dts-v1/; 8/dts-v1/;
9 9
10/include/ "omap443x.dtsi" 10#include "omap443x.dtsi"
11/include/ "omap4-panda-common.dtsi" 11#include "omap4-panda-common.dtsi"
12 12
13/* Pandaboard Rev A4+ have external pullups on SCL & SDA */ 13/* Pandaboard Rev A4+ have external pullups on SCL & SDA */
14&dss_hdmi_pins { 14&dss_hdmi_pins {
15 pinctrl-single,pins = < 15 pinctrl-single,pins = <
16 0x5a 0x118 /* hdmi_cec.hdmi_cec INPUT PULLUP | MODE 0 */ 16 0x5a (PIN_INPUT_PULLUP | MUX_MODE0) /* hdmi_cec.hdmi_cec */
17 0x5c 0x100 /* hdmi_scl.hdmi_scl INPUT | MODE 0 */ 17 0x5c (PIN_INPUT | MUX_MODE0) /* hdmi_scl.hdmi_scl */
18 0x5e 0x100 /* hdmi_sda.hdmi_sda INPUT | MODE 0 */ 18 0x5e (PIN_INPUT | MUX_MODE0) /* hdmi_sda.hdmi_sda */
19 >; 19 >;
20}; 20};
diff --git a/arch/arm/boot/dts/omap4-panda-common.dtsi b/arch/arm/boot/dts/omap4-panda-common.dtsi
index eeb734e25709..faa95b5b242e 100644
--- a/arch/arm/boot/dts/omap4-panda-common.dtsi
+++ b/arch/arm/boot/dts/omap4-panda-common.dtsi
@@ -5,7 +5,7 @@
5 * it under the terms of the GNU General Public License version 2 as 5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation. 6 * published by the Free Software Foundation.
7 */ 7 */
8/include/ "elpida_ecb240abacn.dtsi" 8#include "elpida_ecb240abacn.dtsi"
9 9
10/ { 10/ {
11 model = "TI OMAP4 PandaBoard"; 11 model = "TI OMAP4 PandaBoard";
@@ -16,17 +16,22 @@
16 reg = <0x80000000 0x40000000>; /* 1 GB */ 16 reg = <0x80000000 0x40000000>; /* 1 GB */
17 }; 17 };
18 18
19 leds { 19 leds: leds {
20 compatible = "gpio-leds"; 20 compatible = "gpio-leds";
21 pinctrl-names = "default";
22 pinctrl-0 = <
23 &led_wkgpio_pins
24 >;
25
21 heartbeat { 26 heartbeat {
22 label = "pandaboard::status1"; 27 label = "pandaboard::status1";
23 gpios = <&gpio1 7 0>; 28 gpios = <&gpio1 7 GPIO_ACTIVE_HIGH>;
24 linux,default-trigger = "heartbeat"; 29 linux,default-trigger = "heartbeat";
25 }; 30 };
26 31
27 mmc { 32 mmc {
28 label = "pandaboard::status2"; 33 label = "pandaboard::status2";
29 gpios = <&gpio1 8 0>; 34 gpios = <&gpio1 8 GPIO_ACTIVE_HIGH>;
30 linux,default-trigger = "mmc0"; 35 linux,default-trigger = "mmc0";
31 }; 36 };
32 }; 37 };
@@ -54,6 +59,54 @@
54 "AFML", "Line In", 59 "AFML", "Line In",
55 "AFMR", "Line In"; 60 "AFMR", "Line In";
56 }; 61 };
62
63 /*
64 * Temp hack: Need to be replaced with the proper gpio-controlled
65 * reset driver as soon it will be merged.
66 * http://thread.gmane.org/gmane.linux.drivers.devicetree/36830
67 */
68 /* HS USB Port 1 RESET */
69 hsusb1_reset: hsusb1_reset_reg {
70 compatible = "regulator-fixed";
71 regulator-name = "hsusb1_reset";
72 regulator-min-microvolt = <3300000>;
73 regulator-max-microvolt = <3300000>;
74 gpio = <&gpio2 30 0>; /* gpio_62 */
75 startup-delay-us = <70000>;
76 enable-active-high;
77 };
78
79 /* HS USB Port 1 Power */
80 hsusb1_power: hsusb1_power_reg {
81 compatible = "regulator-fixed";
82 regulator-name = "hsusb1_vbus";
83 regulator-min-microvolt = <3300000>;
84 regulator-max-microvolt = <3300000>;
85 gpio = <&gpio1 1 0>; /* gpio_1 */
86 startup-delay-us = <70000>;
87 enable-active-high;
88 /*
89 * boot-on is required along with always-on as the
90 * regulator framework doesn't enable the regulator
91 * if boot-on is not there.
92 */
93 regulator-always-on;
94 regulator-boot-on;
95 };
96
97 /* HS USB Host PHY on PORT 1 */
98 hsusb1_phy: hsusb1_phy {
99 compatible = "usb-nop-xceiv";
100 reset-supply = <&hsusb1_reset>;
101 vcc-supply = <&hsusb1_power>;
102 /**
103 * FIXME:
104 * put the right clock phandle here when available
105 * clocks = <&auxclk3>;
106 * clock-names = "main_clk";
107 */
108 clock-frequency = <19200000>;
109 };
57}; 110};
58 111
59&omap4_pmx_wkup { 112&omap4_pmx_wkup {
@@ -64,7 +117,7 @@
64 117
65 twl6030_wkup_pins: pinmux_twl6030_wkup_pins { 118 twl6030_wkup_pins: pinmux_twl6030_wkup_pins {
66 pinctrl-single,pins = < 119 pinctrl-single,pins = <
67 0x14 0x2 /* fref_clk0_out.sys_drm_msecure OUTPUT | MODE2 */ 120 0x14 (PIN_OUTPUT | MUX_MODE2) /* fref_clk0_out.sys_drm_msecure */
68 >; 121 >;
69 }; 122 };
70}; 123};
@@ -78,81 +131,108 @@
78 &mcbsp1_pins 131 &mcbsp1_pins
79 &dss_hdmi_pins 132 &dss_hdmi_pins
80 &tpd12s015_pins 133 &tpd12s015_pins
134 &hsusbb1_pins
81 >; 135 >;
82 136
83 twl6030_pins: pinmux_twl6030_pins { 137 twl6030_pins: pinmux_twl6030_pins {
84 pinctrl-single,pins = < 138 pinctrl-single,pins = <
85 0x15e 0x4118 /* sys_nirq1.sys_nirq1 OMAP_WAKEUP_EN | INPUT_PULLUP | MODE0 */ 139 0x15e (WAKEUP_EN | PIN_INPUT_PULLUP | MUX_MODE0) /* sys_nirq1.sys_nirq1 */
86 >; 140 >;
87 }; 141 };
88 142
89 twl6040_pins: pinmux_twl6040_pins { 143 twl6040_pins: pinmux_twl6040_pins {
90 pinctrl-single,pins = < 144 pinctrl-single,pins = <
91 0xe0 0x3 /* hdq_sio.gpio_127 OUTPUT | MODE3 */ 145 0xe0 (PIN_OUTPUT | MUX_MODE3) /* hdq_sio.gpio_127 */
92 0x160 0x100 /* sys_nirq2.sys_nirq2 INPUT | MODE0 */ 146 0x160 (PIN_INPUT | MUX_MODE0) /* sys_nirq2.sys_nirq2 */
93 >; 147 >;
94 }; 148 };
95 149
96 mcpdm_pins: pinmux_mcpdm_pins { 150 mcpdm_pins: pinmux_mcpdm_pins {
97 pinctrl-single,pins = < 151 pinctrl-single,pins = <
98 0xc6 0x108 /* abe_pdm_ul_data.abe_pdm_ul_data INPUT PULLDOWN | MODE0 */ 152 0xc6 (PIN_INPUT_PULLDOWN | MUX_MODE0) /* abe_pdm_ul_data.abe_pdm_ul_data */
99 0xc8 0x108 /* abe_pdm_dl_data.abe_pdm_dl_data INPUT PULLDOWN | MODE0 */ 153 0xc8 (PIN_INPUT_PULLDOWN | MUX_MODE0) /* abe_pdm_dl_data.abe_pdm_dl_data */
100 0xca 0x118 /* abe_pdm_frame.abe_pdm_frame INPUT PULLUP | MODE0 */ 154 0xca (PIN_INPUT_PULLUP | MUX_MODE0) /* abe_pdm_frame.abe_pdm_frame */
101 0xcc 0x108 /* abe_pdm_lb_clk.abe_pdm_lb_clk INPUT PULLDOWN | MODE0 */ 155 0xcc (PIN_INPUT_PULLDOWN | MUX_MODE0) /* abe_pdm_lb_clk.abe_pdm_lb_clk */
102 0xce 0x108 /* abe_clks.abe_clks INPUT PULLDOWN | MODE0 */ 156 0xce (PIN_INPUT_PULLDOWN | MUX_MODE0) /* abe_clks.abe_clks */
103 >; 157 >;
104 }; 158 };
105 159
106 mcbsp1_pins: pinmux_mcbsp1_pins { 160 mcbsp1_pins: pinmux_mcbsp1_pins {
107 pinctrl-single,pins = < 161 pinctrl-single,pins = <
108 0xbe 0x100 /* abe_mcbsp1_clkx.abe_mcbsp1_clkx INPUT | MODE0 */ 162 0xbe (PIN_INPUT | MUX_MODE0) /* abe_mcbsp1_clkx.abe_mcbsp1_clkx */
109 0xc0 0x108 /* abe_mcbsp1_dr.abe_mcbsp1_dr INPUT PULLDOWN | MODE0 */ 163 0xc0 (PIN_INPUT_PULLDOWN | MUX_MODE0) /* abe_mcbsp1_dr.abe_mcbsp1_dr */
110 0xc2 0x8 /* abe_mcbsp1_dx.abe_mcbsp1_dx OUTPUT PULLDOWN | MODE0 */ 164 0xc2 (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* abe_mcbsp1_dx.abe_mcbsp1_dx */
111 0xc4 0x100 /* abe_mcbsp1_fsx.abe_mcbsp1_fsx INPUT | MODE0 */ 165 0xc4 (PIN_INPUT | MUX_MODE0) /* abe_mcbsp1_fsx.abe_mcbsp1_fsx */
112 >; 166 >;
113 }; 167 };
114 168
115 dss_hdmi_pins: pinmux_dss_hdmi_pins { 169 dss_hdmi_pins: pinmux_dss_hdmi_pins {
116 pinctrl-single,pins = < 170 pinctrl-single,pins = <
117 0x5a 0x118 /* hdmi_cec.hdmi_cec INPUT PULLUP | MODE 0 */ 171 0x5a (PIN_INPUT_PULLUP | MUX_MODE0) /* hdmi_cec.hdmi_cec */
118 0x5c 0x118 /* hdmi_scl.hdmi_scl INPUT PULLUP | MODE 0 */ 172 0x5c (PIN_INPUT_PULLUP | MUX_MODE0) /* hdmi_scl.hdmi_scl */
119 0x5e 0x118 /* hdmi_sda.hdmi_sda INPUT PULLUP | MODE 0 */ 173 0x5e (PIN_INPUT_PULLUP | MUX_MODE0) /* hdmi_sda.hdmi_sda */
120 >; 174 >;
121 }; 175 };
122 176
123 tpd12s015_pins: pinmux_tpd12s015_pins { 177 tpd12s015_pins: pinmux_tpd12s015_pins {
124 pinctrl-single,pins = < 178 pinctrl-single,pins = <
125 0x22 0x3 /* gpmc_a17.gpio_41 OUTPUT | MODE3 */ 179 0x22 (PIN_OUTPUT | MUX_MODE3) /* gpmc_a17.gpio_41 */
126 0x48 0x3 /* gpmc_nbe1.gpio_60 OUTPUT | MODE3 */ 180 0x48 (PIN_OUTPUT | MUX_MODE3) /* gpmc_nbe1.gpio_60 */
127 0x58 0x10b /* hdmi_hpd.gpio_63 INPUT PULLDOWN | MODE3 */ 181 0x58 (PIN_INPUT_PULLDOWN | MUX_MODE3) /* hdmi_hpd.gpio_63 */
182 >;
183 };
184
185 hsusbb1_pins: pinmux_hsusbb1_pins {
186 pinctrl-single,pins = <
187 0x82 (PIN_INPUT_PULLDOWN | MUX_MODE4) /* usbb1_ulpitll_clk.usbb1_ulpiphy_clk */
188 0x84 (PIN_OUTPUT | MUX_MODE4) /* usbb1_ulpitll_stp.usbb1_ulpiphy_stp */
189 0x86 (PIN_INPUT_PULLDOWN | MUX_MODE4) /* usbb1_ulpitll_dir.usbb1_ulpiphy_dir */
190 0x88 (PIN_INPUT_PULLDOWN | MUX_MODE4) /* usbb1_ulpitll_nxt.usbb1_ulpiphy_nxt */
191 0x8a (PIN_INPUT_PULLDOWN | MUX_MODE4) /* usbb1_ulpitll_dat0.usbb1_ulpiphy_dat0 */
192 0x8c (PIN_INPUT_PULLDOWN | MUX_MODE4) /* usbb1_ulpitll_dat1.usbb1_ulpiphy_dat1 */
193 0x8e (PIN_INPUT_PULLDOWN | MUX_MODE4) /* usbb1_ulpitll_dat2.usbb1_ulpiphy_dat2 */
194 0x90 (PIN_INPUT_PULLDOWN | MUX_MODE4) /* usbb1_ulpitll_dat3.usbb1_ulpiphy_dat3 */
195 0x92 (PIN_INPUT_PULLDOWN | MUX_MODE4) /* usbb1_ulpitll_dat4.usbb1_ulpiphy_dat4 */
196 0x94 (PIN_INPUT_PULLDOWN | MUX_MODE4) /* usbb1_ulpitll_dat5.usbb1_ulpiphy_dat5 */
197 0x96 (PIN_INPUT_PULLDOWN | MUX_MODE4) /* usbb1_ulpitll_dat6.usbb1_ulpiphy_dat6 */
198 0x98 (PIN_INPUT_PULLDOWN | MUX_MODE4) /* usbb1_ulpitll_dat7.usbb1_ulpiphy_dat7 */
128 >; 199 >;
129 }; 200 };
130 201
131 i2c1_pins: pinmux_i2c1_pins { 202 i2c1_pins: pinmux_i2c1_pins {
132 pinctrl-single,pins = < 203 pinctrl-single,pins = <
133 0xe2 0x118 /* i2c1_scl PULLUP | INPUTENABLE | MODE0 */ 204 0xe2 (PIN_INPUT_PULLUP | MUX_MODE0) /* i2c1_scl */
134 0xe4 0x118 /* i2c1_sda PULLUP | INPUTENABLE | MODE0 */ 205 0xe4 (PIN_INPUT_PULLUP | MUX_MODE0) /* i2c1_sda */
135 >; 206 >;
136 }; 207 };
137 208
138 i2c2_pins: pinmux_i2c2_pins { 209 i2c2_pins: pinmux_i2c2_pins {
139 pinctrl-single,pins = < 210 pinctrl-single,pins = <
140 0xe6 0x118 /* i2c2_scl PULLUP | INPUTENABLE | MODE0 */ 211 0xe6 (PIN_INPUT_PULLUP | MUX_MODE0) /* i2c2_scl */
141 0xe8 0x118 /* i2c2_sda PULLUP | INPUTENABLE | MODE0 */ 212 0xe8 (PIN_INPUT_PULLUP | MUX_MODE0) /* i2c2_sda */
142 >; 213 >;
143 }; 214 };
144 215
145 i2c3_pins: pinmux_i2c3_pins { 216 i2c3_pins: pinmux_i2c3_pins {
146 pinctrl-single,pins = < 217 pinctrl-single,pins = <
147 0xea 0x118 /* i2c3_scl PULLUP | INPUTENABLE | MODE0 */ 218 0xea (PIN_INPUT_PULLUP | MUX_MODE0) /* i2c3_scl */
148 0xec 0x118 /* i2c3_sda PULLUP | INPUTENABLE | MODE0 */ 219 0xec (PIN_INPUT_PULLUP | MUX_MODE0) /* i2c3_sda */
149 >; 220 >;
150 }; 221 };
151 222
152 i2c4_pins: pinmux_i2c4_pins { 223 i2c4_pins: pinmux_i2c4_pins {
153 pinctrl-single,pins = < 224 pinctrl-single,pins = <
154 0xee 0x118 /* i2c4_scl PULLUP | INPUTENABLE | MODE0 */ 225 0xee (PIN_INPUT_PULLUP | MUX_MODE0) /* i2c4_scl */
155 0xf0 0x118 /* i2c4_sda PULLUP | INPUTENABLE | MODE0 */ 226 0xf0 (PIN_INPUT_PULLUP | MUX_MODE0) /* i2c4_sda */
227 >;
228 };
229};
230
231&omap4_pmx_wkup {
232 led_wkgpio_pins: pinmux_leds_wkpins {
233 pinctrl-single,pins = <
234 0x1a (PIN_OUTPUT | MUX_MODE3) /* gpio_wk7 */
235 0x1c (PIN_OUTPUT | MUX_MODE3) /* gpio_wk8 */
156 >; 236 >;
157 }; 237 };
158}; 238};
@@ -165,18 +245,18 @@
165 245
166 twl: twl@48 { 246 twl: twl@48 {
167 reg = <0x48>; 247 reg = <0x48>;
168 /* SPI = 0, IRQ# = 7, 4 = active high level-sensitive */ 248 /* IRQ# = 7 */
169 interrupts = <0 7 4>; /* IRQ_SYS_1N cascaded to gic */ 249 interrupts = <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>; /* IRQ_SYS_1N cascaded to gic */
170 interrupt-parent = <&gic>; 250 interrupt-parent = <&gic>;
171 }; 251 };
172 252
173 twl6040: twl@4b { 253 twl6040: twl@4b {
174 compatible = "ti,twl6040"; 254 compatible = "ti,twl6040";
175 reg = <0x4b>; 255 reg = <0x4b>;
176 /* SPI = 0, IRQ# = 119, 4 = active high level-sensitive */ 256 /* IRQ# = 119 */
177 interrupts = <0 119 4>; /* IRQ_SYS_2N cascaded to gic */ 257 interrupts = <GIC_SPI 119 IRQ_TYPE_LEVEL_HIGH>; /* IRQ_SYS_2N cascaded to gic */
178 interrupt-parent = <&gic>; 258 interrupt-parent = <&gic>;
179 ti,audpwron-gpio = <&gpio4 31 0>; /* gpio line 127 */ 259 ti,audpwron-gpio = <&gpio4 31 GPIO_ACTIVE_HIGH>; /* gpio line 127 */
180 260
181 vio-supply = <&v1v8>; 261 vio-supply = <&v1v8>;
182 v2v1-supply = <&v2v1>; 262 v2v1-supply = <&v2v1>;
@@ -184,7 +264,7 @@
184 }; 264 };
185}; 265};
186 266
187/include/ "twl6030.dtsi" 267#include "twl6030.dtsi"
188 268
189&i2c2 { 269&i2c2 {
190 pinctrl-names = "default"; 270 pinctrl-names = "default";
@@ -269,3 +349,11 @@
269 mode = <3>; 349 mode = <3>;
270 power = <50>; 350 power = <50>;
271}; 351};
352
353&usbhshost {
354 port1-mode = "ehci-phy";
355};
356
357&usbhsehci {
358 phys = <&hsusb1_phy>;
359};
diff --git a/arch/arm/boot/dts/omap4-panda-es.dts b/arch/arm/boot/dts/omap4-panda-es.dts
index f1d8c217ce12..56c435468e94 100644
--- a/arch/arm/boot/dts/omap4-panda-es.dts
+++ b/arch/arm/boot/dts/omap4-panda-es.dts
@@ -7,8 +7,8 @@
7 */ 7 */
8/dts-v1/; 8/dts-v1/;
9 9
10/include/ "omap4460.dtsi" 10#include "omap4460.dtsi"
11/include/ "omap4-panda-common.dtsi" 11#include "omap4-panda-common.dtsi"
12 12
13/* Audio routing is differnet between PandaBoard4430 and PandaBoardES */ 13/* Audio routing is differnet between PandaBoard4430 and PandaBoardES */
14&sound { 14&sound {
@@ -29,8 +29,36 @@
29/* PandaboardES has external pullups on SCL & SDA */ 29/* PandaboardES has external pullups on SCL & SDA */
30&dss_hdmi_pins { 30&dss_hdmi_pins {
31 pinctrl-single,pins = < 31 pinctrl-single,pins = <
32 0x5a 0x118 /* hdmi_cec.hdmi_cec INPUT PULLUP | MODE 0 */ 32 0x5a (PIN_INPUT_PULLUP | MUX_MODE0) /* hdmi_cec.hdmi_cec */
33 0x5c 0x100 /* hdmi_scl.hdmi_scl INPUT | MODE 0 */ 33 0x5c (PIN_INPUT | MUX_MODE0) /* hdmi_scl.hdmi_scl */
34 0x5e 0x100 /* hdmi_sda.hdmi_sda INPUT | MODE 0 */ 34 0x5e (PIN_INPUT | MUX_MODE0) /* hdmi_sda.hdmi_sda */
35 >; 35 >;
36}; 36};
37
38&omap4_pmx_core {
39 led_gpio_pins: gpio_led_pmx {
40 pinctrl-single,pins = <
41 0xb6 (PIN_OUTPUT | MUX_MODE3) /* gpio_110 */
42 >;
43 };
44};
45
46&led_wkgpio_pins {
47 pinctrl-single,pins = <
48 0x1c (PIN_OUTPUT | MUX_MODE3) /* gpio_wk8 */
49 >;
50};
51
52&leds {
53 pinctrl-0 = <
54 &led_gpio_pins
55 &led_wkgpio_pins
56 >;
57
58 heartbeat {
59 gpios = <&gpio4 14 GPIO_ACTIVE_HIGH>;
60 };
61 mmc {
62 gpios = <&gpio1 8 GPIO_ACTIVE_HIGH>;
63 };
64};
diff --git a/arch/arm/boot/dts/omap4-panda.dts b/arch/arm/boot/dts/omap4-panda.dts
index f8b221f0168e..6189a8b77d7f 100644
--- a/arch/arm/boot/dts/omap4-panda.dts
+++ b/arch/arm/boot/dts/omap4-panda.dts
@@ -7,5 +7,5 @@
7 */ 7 */
8/dts-v1/; 8/dts-v1/;
9 9
10/include/ "omap443x.dtsi" 10#include "omap443x.dtsi"
11/include/ "omap4-panda-common.dtsi" 11#include "omap4-panda-common.dtsi"
diff --git a/arch/arm/boot/dts/omap4-sdp-es23plus.dts b/arch/arm/boot/dts/omap4-sdp-es23plus.dts
index b4a40ffbce31..aad5dda0f469 100644
--- a/arch/arm/boot/dts/omap4-sdp-es23plus.dts
+++ b/arch/arm/boot/dts/omap4-sdp-es23plus.dts
@@ -5,13 +5,13 @@
5 * it under the terms of the GNU General Public License version 2 as 5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation. 6 * published by the Free Software Foundation.
7 */ 7 */
8/include/ "omap4-sdp.dts" 8#include "omap4-sdp.dts"
9 9
10/* SDP boards with 4430 ES2.3+ or 4460 have external pullups on SCL & SDA */ 10/* SDP boards with 4430 ES2.3+ or 4460 have external pullups on SCL & SDA */
11&dss_hdmi_pins { 11&dss_hdmi_pins {
12 pinctrl-single,pins = < 12 pinctrl-single,pins = <
13 0x5a 0x118 /* hdmi_cec.hdmi_cec INPUT PULLUP | MODE 0 */ 13 0x5a (PIN_INPUT_PULLUP | MUX_MODE0) /* hdmi_cec.hdmi_cec */
14 0x5c 0x100 /* hdmi_scl.hdmi_scl INPUT | MODE 0 */ 14 0x5c (PIN_INPUT | MUX_MODE0) /* hdmi_scl.hdmi_scl */
15 0x5e 0x100 /* hdmi_sda.hdmi_sda INPUT | MODE 0 */ 15 0x5e (PIN_INPUT | MUX_MODE0) /* hdmi_sda.hdmi_sda */
16 >; 16 >;
17}; 17};
diff --git a/arch/arm/boot/dts/omap4-sdp.dts b/arch/arm/boot/dts/omap4-sdp.dts
index 98505a2ef162..7951b4ea500a 100644
--- a/arch/arm/boot/dts/omap4-sdp.dts
+++ b/arch/arm/boot/dts/omap4-sdp.dts
@@ -7,8 +7,8 @@
7 */ 7 */
8/dts-v1/; 8/dts-v1/;
9 9
10/include/ "omap443x.dtsi" 10#include "omap443x.dtsi"
11/include/ "elpida_ecb240abacn.dtsi" 11#include "elpida_ecb240abacn.dtsi"
12 12
13/ { 13/ {
14 model = "TI OMAP4 SDP board"; 14 model = "TI OMAP4 SDP board";
@@ -41,42 +41,42 @@
41 compatible = "gpio-leds"; 41 compatible = "gpio-leds";
42 debug0 { 42 debug0 {
43 label = "omap4:green:debug0"; 43 label = "omap4:green:debug0";
44 gpios = <&gpio2 29 0>; /* 61 */ 44 gpios = <&gpio2 29 GPIO_ACTIVE_HIGH>; /* 61 */
45 }; 45 };
46 46
47 debug1 { 47 debug1 {
48 label = "omap4:green:debug1"; 48 label = "omap4:green:debug1";
49 gpios = <&gpio1 30 0>; /* 30 */ 49 gpios = <&gpio1 30 GPIO_ACTIVE_HIGH>; /* 30 */
50 }; 50 };
51 51
52 debug2 { 52 debug2 {
53 label = "omap4:green:debug2"; 53 label = "omap4:green:debug2";
54 gpios = <&gpio1 7 0>; /* 7 */ 54 gpios = <&gpio1 7 GPIO_ACTIVE_HIGH>; /* 7 */
55 }; 55 };
56 56
57 debug3 { 57 debug3 {
58 label = "omap4:green:debug3"; 58 label = "omap4:green:debug3";
59 gpios = <&gpio1 8 0>; /* 8 */ 59 gpios = <&gpio1 8 GPIO_ACTIVE_HIGH>; /* 8 */
60 }; 60 };
61 61
62 debug4 { 62 debug4 {
63 label = "omap4:green:debug4"; 63 label = "omap4:green:debug4";
64 gpios = <&gpio2 18 0>; /* 50 */ 64 gpios = <&gpio2 18 GPIO_ACTIVE_HIGH>; /* 50 */
65 }; 65 };
66 66
67 user1 { 67 user1 {
68 label = "omap4:blue:user"; 68 label = "omap4:blue:user";
69 gpios = <&gpio6 9 0>; /* 169 */ 69 gpios = <&gpio6 9 GPIO_ACTIVE_HIGH>; /* 169 */
70 }; 70 };
71 71
72 user2 { 72 user2 {
73 label = "omap4:red:user"; 73 label = "omap4:red:user";
74 gpios = <&gpio6 10 0>; /* 170 */ 74 gpios = <&gpio6 10 GPIO_ACTIVE_HIGH>; /* 170 */
75 }; 75 };
76 76
77 user3 { 77 user3 {
78 label = "omap4:green:user"; 78 label = "omap4:green:user";
79 gpios = <&gpio5 11 0>; /* 139 */ 79 gpios = <&gpio5 11 GPIO_ACTIVE_HIGH>; /* 139 */
80 }; 80 };
81 }; 81 };
82 82
@@ -150,7 +150,7 @@
150 150
151 twl6030_wkup_pins: pinmux_twl6030_wkup_pins { 151 twl6030_wkup_pins: pinmux_twl6030_wkup_pins {
152 pinctrl-single,pins = < 152 pinctrl-single,pins = <
153 0x14 0x2 /* fref_clk0_out.sys_drm_msecure OUTPUT | MODE2 */ 153 0x14 (PIN_OUTPUT | MUX_MODE2) /* fref_clk0_out.sys_drm_msecure */
154 >; 154 >;
155 }; 155 };
156}; 156};
@@ -170,129 +170,129 @@
170 170
171 uart2_pins: pinmux_uart2_pins { 171 uart2_pins: pinmux_uart2_pins {
172 pinctrl-single,pins = < 172 pinctrl-single,pins = <
173 0xd8 0x118 /* uart2_cts.uart2_cts INPUT_PULLUP | MODE0 */ 173 0xd8 (PIN_INPUT_PULLUP | MUX_MODE0) /* uart2_cts.uart2_cts */
174 0xda 0 /* uart2_rts.uart2_rts OUTPUT | MODE0 */ 174 0xda (PIN_OUTPUT | MUX_MODE0) /* uart2_rts.uart2_rts */
175 0xdc 0x118 /* uart2_rx.uart2_rx INPUT_PULLUP | MODE0 */ 175 0xdc (PIN_INPUT_PULLUP | MUX_MODE0) /* uart2_rx.uart2_rx */
176 0xde 0 /* uart2_tx.uart2_tx OUTPUT | MODE0 */ 176 0xde (PIN_OUTPUT | MUX_MODE0) /* uart2_tx.uart2_tx */
177 >; 177 >;
178 }; 178 };
179 179
180 uart3_pins: pinmux_uart3_pins { 180 uart3_pins: pinmux_uart3_pins {
181 pinctrl-single,pins = < 181 pinctrl-single,pins = <
182 0x100 0x118 /* uart3_cts_rctx.uart3_cts_rctx INPUT_PULLUP | MODE0 */ 182 0x100 (PIN_INPUT_PULLUP | MUX_MODE0) /* uart3_cts_rctx.uart3_cts_rctx */
183 0x102 0 /* uart3_rts_sd.uart3_rts_sd OUTPUT | MODE0 */ 183 0x102 (PIN_OUTPUT | MUX_MODE0) /* uart3_rts_sd.uart3_rts_sd */
184 0x104 0x100 /* uart3_rx_irrx.uart3_rx_irrx INPUT | MODE0 */ 184 0x104 (PIN_INPUT | MUX_MODE0) /* uart3_rx_irrx.uart3_rx_irrx */
185 0x106 0 /* uart3_tx_irtx.uart3_tx_irtx OUTPUT | MODE0 */ 185 0x106 (PIN_OUTPUT | MUX_MODE0) /* uart3_tx_irtx.uart3_tx_irtx */
186 >; 186 >;
187 }; 187 };
188 188
189 uart4_pins: pinmux_uart4_pins { 189 uart4_pins: pinmux_uart4_pins {
190 pinctrl-single,pins = < 190 pinctrl-single,pins = <
191 0x11c 0x100 /* uart4_rx.uart4_rx INPUT | MODE0 */ 191 0x11c (PIN_INPUT | MUX_MODE0) /* uart4_rx.uart4_rx */
192 0x11e 0 /* uart4_tx.uart4_tx OUTPUT | MODE0 */ 192 0x11e (PIN_OUTPUT | MUX_MODE0) /* uart4_tx.uart4_tx */
193 >; 193 >;
194 }; 194 };
195 195
196 twl6030_pins: pinmux_twl6030_pins { 196 twl6030_pins: pinmux_twl6030_pins {
197 pinctrl-single,pins = < 197 pinctrl-single,pins = <
198 0x15e 0x4118 /* sys_nirq1.sys_nirq1 OMAP_WAKEUP_EN | INPUT_PULLUP | MODE0 */ 198 0x15e (WAKEUP_EN | PIN_INPUT_PULLUP | MUX_MODE0) /* sys_nirq1.sys_nirq1 */
199 >; 199 >;
200 }; 200 };
201 201
202 twl6040_pins: pinmux_twl6040_pins { 202 twl6040_pins: pinmux_twl6040_pins {
203 pinctrl-single,pins = < 203 pinctrl-single,pins = <
204 0xe0 0x3 /* hdq_sio.gpio_127 OUTPUT | MODE3 */ 204 0xe0 (PIN_OUTPUT | MUX_MODE3) /* hdq_sio.gpio_127 */
205 0x160 0x100 /* sys_nirq2.sys_nirq2 INPUT | MODE0 */ 205 0x160 (PIN_INPUT | MUX_MODE0) /* sys_nirq2.sys_nirq2 */
206 >; 206 >;
207 }; 207 };
208 208
209 mcpdm_pins: pinmux_mcpdm_pins { 209 mcpdm_pins: pinmux_mcpdm_pins {
210 pinctrl-single,pins = < 210 pinctrl-single,pins = <
211 0xc6 0x108 /* abe_pdm_ul_data.abe_pdm_ul_data INPUT PULLDOWN | MODE0 */ 211 0xc6 (PIN_INPUT_PULLDOWN | MUX_MODE0) /* abe_pdm_ul_data.abe_pdm_ul_data */
212 0xc8 0x108 /* abe_pdm_dl_data.abe_pdm_dl_data INPUT PULLDOWN | MODE0 */ 212 0xc8 (PIN_INPUT_PULLDOWN | MUX_MODE0) /* abe_pdm_dl_data.abe_pdm_dl_data */
213 0xca 0x118 /* abe_pdm_frame.abe_pdm_frame INPUT PULLUP | MODE0 */ 213 0xca (PIN_INPUT_PULLUP | MUX_MODE0) /* abe_pdm_frame.abe_pdm_frame */
214 0xcc 0x108 /* abe_pdm_lb_clk.abe_pdm_lb_clk INPUT PULLDOWN | MODE0 */ 214 0xcc (PIN_INPUT_PULLDOWN | MUX_MODE0) /* abe_pdm_lb_clk.abe_pdm_lb_clk */
215 0xce 0x108 /* abe_clks.abe_clks INPUT PULLDOWN | MODE0 */ 215 0xce (PIN_INPUT_PULLDOWN | MUX_MODE0) /* abe_clks.abe_clks */
216 >; 216 >;
217 }; 217 };
218 218
219 dmic_pins: pinmux_dmic_pins { 219 dmic_pins: pinmux_dmic_pins {
220 pinctrl-single,pins = < 220 pinctrl-single,pins = <
221 0xd0 0 /* abe_dmic_clk1.abe_dmic_clk1 OUTPUT | MODE0 */ 221 0xd0 (PIN_OUTPUT | MUX_MODE0) /* abe_dmic_clk1.abe_dmic_clk1 */
222 0xd2 0x100 /* abe_dmic_din1.abe_dmic_din1 INPUT | MODE0 */ 222 0xd2 (PIN_INPUT | MUX_MODE0) /* abe_dmic_din1.abe_dmic_din1 */
223 0xd4 0x100 /* abe_dmic_din2.abe_dmic_din2 INPUT | MODE0 */ 223 0xd4 (PIN_INPUT | MUX_MODE0) /* abe_dmic_din2.abe_dmic_din2 */
224 0xd6 0x100 /* abe_dmic_din3.abe_dmic_din3 INPUT | MODE0 */ 224 0xd6 (PIN_INPUT | MUX_MODE0) /* abe_dmic_din3.abe_dmic_din3 */
225 >; 225 >;
226 }; 226 };
227 227
228 mcbsp1_pins: pinmux_mcbsp1_pins { 228 mcbsp1_pins: pinmux_mcbsp1_pins {
229 pinctrl-single,pins = < 229 pinctrl-single,pins = <
230 0xbe 0x100 /* abe_mcbsp1_clkx.abe_mcbsp1_clkx INPUT | MODE0 */ 230 0xbe (PIN_INPUT | MUX_MODE0) /* abe_mcbsp1_clkx.abe_mcbsp1_clkx */
231 0xc0 0x108 /* abe_mcbsp1_dr.abe_mcbsp1_dr INPUT PULLDOWN | MODE0 */ 231 0xc0 (PIN_INPUT_PULLDOWN | MUX_MODE0) /* abe_mcbsp1_dr.abe_mcbsp1_dr */
232 0xc2 0x8 /* abe_mcbsp1_dx.abe_mcbsp1_dx OUTPUT PULLDOWN | MODE0 */ 232 0xc2 (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* abe_mcbsp1_dx.abe_mcbsp1_dx */
233 0xc4 0x100 /* abe_mcbsp1_fsx.abe_mcbsp1_fsx INPUT | MODE0 */ 233 0xc4 (PIN_INPUT | MUX_MODE0) /* abe_mcbsp1_fsx.abe_mcbsp1_fsx */
234 >; 234 >;
235 }; 235 };
236 236
237 mcbsp2_pins: pinmux_mcbsp2_pins { 237 mcbsp2_pins: pinmux_mcbsp2_pins {
238 pinctrl-single,pins = < 238 pinctrl-single,pins = <
239 0xb6 0x100 /* abe_mcbsp2_clkx.abe_mcbsp2_clkx INPUT | MODE0 */ 239 0xb6 (PIN_INPUT | MUX_MODE0) /* abe_mcbsp2_clkx.abe_mcbsp2_clkx */
240 0xb8 0x108 /* abe_mcbsp2_dr.abe_mcbsp2_dr INPUT PULLDOWN | MODE0 */ 240 0xb8 (PIN_INPUT_PULLDOWN | MUX_MODE0) /* abe_mcbsp2_dr.abe_mcbsp2_dr */
241 0xba 0x8 /* abe_mcbsp2_dx.abe_mcbsp2_dx OUTPUT PULLDOWN | MODE0 */ 241 0xba (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* abe_mcbsp2_dx.abe_mcbsp2_dx */
242 0xbc 0x100 /* abe_mcbsp2_fsx.abe_mcbsp2_fsx INPUT | MODE0 */ 242 0xbc (PIN_INPUT | MUX_MODE0) /* abe_mcbsp2_fsx.abe_mcbsp2_fsx */
243 >; 243 >;
244 }; 244 };
245 245
246 mcspi1_pins: pinmux_mcspi1_pins { 246 mcspi1_pins: pinmux_mcspi1_pins {
247 pinctrl-single,pins = < 247 pinctrl-single,pins = <
248 0xf2 0x100 /* mcspi1_clk.mcspi1_clk INPUT | MODE0 */ 248 0xf2 (PIN_INPUT | MUX_MODE0) /* mcspi1_clk.mcspi1_clk */
249 0xf4 0x100 /* mcspi1_somi.mcspi1_somi INPUT | MODE0 */ 249 0xf4 (PIN_INPUT | MUX_MODE0) /* mcspi1_somi.mcspi1_somi */
250 0xf6 0x100 /* mcspi1_simo.mcspi1_simo INPUT | MODE0 */ 250 0xf6 (PIN_INPUT | MUX_MODE0) /* mcspi1_simo.mcspi1_simo */
251 0xf8 0x100 /* mcspi1_cs0.mcspi1_cs0 INPUT | MODE0*/ 251 0xf8 (PIN_INPUT | MUX_MODE0) /* mcspi1_cs0.mcspi1_cs0 */
252 >; 252 >;
253 }; 253 };
254 254
255 dss_hdmi_pins: pinmux_dss_hdmi_pins { 255 dss_hdmi_pins: pinmux_dss_hdmi_pins {
256 pinctrl-single,pins = < 256 pinctrl-single,pins = <
257 0x5a 0x118 /* hdmi_cec.hdmi_cec INPUT PULLUP | MODE 0 */ 257 0x5a (PIN_INPUT_PULLUP | MUX_MODE0) /* hdmi_cec.hdmi_cec */
258 0x5c 0x118 /* hdmi_scl.hdmi_scl INPUT PULLUP | MODE 0 */ 258 0x5c (PIN_INPUT_PULLUP | MUX_MODE0) /* hdmi_scl.hdmi_scl */
259 0x5e 0x118 /* hdmi_sda.hdmi_sda INPUT PULLUP | MODE 0 */ 259 0x5e (PIN_INPUT_PULLUP | MUX_MODE0) /* hdmi_sda.hdmi_sda */
260 >; 260 >;
261 }; 261 };
262 262
263 tpd12s015_pins: pinmux_tpd12s015_pins { 263 tpd12s015_pins: pinmux_tpd12s015_pins {
264 pinctrl-single,pins = < 264 pinctrl-single,pins = <
265 0x22 0x3 /* gpmc_a17.gpio_41 OUTPUT | MODE3 */ 265 0x22 (PIN_OUTPUT | MUX_MODE3) /* gpmc_a17.gpio_41 */
266 0x48 0x3 /* gpmc_nbe1.gpio_60 OUTPUT | MODE3 */ 266 0x48 (PIN_OUTPUT | MUX_MODE3) /* gpmc_nbe1.gpio_60 */
267 0x58 0x10b /* hdmi_hpd.gpio_63 INPUT PULLDOWN | MODE3 */ 267 0x58 (PIN_INPUT_PULLDOWN | MUX_MODE3) /* hdmi_hpd.gpio_63 */
268 >; 268 >;
269 }; 269 };
270 270
271 i2c1_pins: pinmux_i2c1_pins { 271 i2c1_pins: pinmux_i2c1_pins {
272 pinctrl-single,pins = < 272 pinctrl-single,pins = <
273 0xe2 0x118 /* i2c1_scl PULLUP | INPUTENABLE | MODE0 */ 273 0xe2 (PIN_INPUT_PULLUP | MUX_MODE0) /* i2c1_scl */
274 0xe4 0x118 /* i2c1_sda PULLUP | INPUTENABLE | MODE0 */ 274 0xe4 (PIN_INPUT_PULLUP | MUX_MODE0) /* i2c1_sda */
275 >; 275 >;
276 }; 276 };
277 277
278 i2c2_pins: pinmux_i2c2_pins { 278 i2c2_pins: pinmux_i2c2_pins {
279 pinctrl-single,pins = < 279 pinctrl-single,pins = <
280 0xe6 0x118 /* i2c2_scl PULLUP | INPUTENABLE | MODE0 */ 280 0xe6 (PIN_INPUT_PULLUP | MUX_MODE0) /* i2c2_scl */
281 0xe8 0x118 /* i2c2_sda PULLUP | INPUTENABLE | MODE0 */ 281 0xe8 (PIN_INPUT_PULLUP | MUX_MODE0) /* i2c2_sda */
282 >; 282 >;
283 }; 283 };
284 284
285 i2c3_pins: pinmux_i2c3_pins { 285 i2c3_pins: pinmux_i2c3_pins {
286 pinctrl-single,pins = < 286 pinctrl-single,pins = <
287 0xea 0x118 /* i2c3_scl PULLUP | INPUTENABLE | MODE0 */ 287 0xea (PIN_INPUT_PULLUP | MUX_MODE0) /* i2c3_scl */
288 0xec 0x118 /* i2c3_sda PULLUP | INPUTENABLE | MODE0 */ 288 0xec (PIN_INPUT_PULLUP | MUX_MODE0) /* i2c3_sda */
289 >; 289 >;
290 }; 290 };
291 291
292 i2c4_pins: pinmux_i2c4_pins { 292 i2c4_pins: pinmux_i2c4_pins {
293 pinctrl-single,pins = < 293 pinctrl-single,pins = <
294 0xee 0x118 /* i2c4_scl PULLUP | INPUTENABLE | MODE0 */ 294 0xee (PIN_INPUT_PULLUP | MUX_MODE0) /* i2c4_scl */
295 0xf0 0x118 /* i2c4_sda PULLUP | INPUTENABLE | MODE0 */ 295 0xf0 (PIN_INPUT_PULLUP | MUX_MODE0) /* i2c4_sda */
296 >; 296 >;
297 }; 297 };
298}; 298};
@@ -306,7 +306,7 @@
306 twl: twl@48 { 306 twl: twl@48 {
307 reg = <0x48>; 307 reg = <0x48>;
308 /* SPI = 0, IRQ# = 7, 4 = active high level-sensitive */ 308 /* SPI = 0, IRQ# = 7, 4 = active high level-sensitive */
309 interrupts = <0 7 4>; /* IRQ_SYS_1N cascaded to gic */ 309 interrupts = <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>; /* IRQ_SYS_1N cascaded to gic */
310 interrupt-parent = <&gic>; 310 interrupt-parent = <&gic>;
311 }; 311 };
312 312
@@ -314,7 +314,7 @@
314 compatible = "ti,twl6040"; 314 compatible = "ti,twl6040";
315 reg = <0x4b>; 315 reg = <0x4b>;
316 /* SPI = 0, IRQ# = 119, 4 = active high level-sensitive */ 316 /* SPI = 0, IRQ# = 119, 4 = active high level-sensitive */
317 interrupts = <0 119 4>; /* IRQ_SYS_2N cascaded to gic */ 317 interrupts = <GIC_SPI 119 IRQ_TYPE_LEVEL_HIGH>; /* IRQ_SYS_2N cascaded to gic */
318 interrupt-parent = <&gic>; 318 interrupt-parent = <&gic>;
319 ti,audpwron-gpio = <&gpio4 31 0>; /* gpio line 127 */ 319 ti,audpwron-gpio = <&gpio4 31 0>; /* gpio line 127 */
320 320
@@ -336,7 +336,7 @@
336 }; 336 };
337}; 337};
338 338
339/include/ "twl6030.dtsi" 339#include "twl6030.dtsi"
340 340
341&i2c2 { 341&i2c2 {
342 pinctrl-names = "default"; 342 pinctrl-names = "default";
@@ -395,7 +395,7 @@
395 spi-max-frequency = <24000000>; 395 spi-max-frequency = <24000000>;
396 reg = <0>; 396 reg = <0>;
397 interrupt-parent = <&gpio2>; 397 interrupt-parent = <&gpio2>;
398 interrupts = <2 8>; /* gpio line 34, low triggered */ 398 interrupts = <2 IRQ_TYPE_LEVEL_LOW>; /* gpio line 34 */
399 vdd-supply = <&vdd_eth>; 399 vdd-supply = <&vdd_eth>;
400 }; 400 };
401}; 401};
diff --git a/arch/arm/boot/dts/omap4-var-som.dts b/arch/arm/boot/dts/omap4-var-som.dts
index 7e04103779c4..b41269e871dd 100644
--- a/arch/arm/boot/dts/omap4-var-som.dts
+++ b/arch/arm/boot/dts/omap4-var-som.dts
@@ -7,7 +7,7 @@
7 */ 7 */
8/dts-v1/; 8/dts-v1/;
9 9
10/include/ "omap443x.dtsi" 10#include "omap443x.dtsi"
11 11
12/ { 12/ {
13 model = "Variscite OMAP4 SOM"; 13 model = "Variscite OMAP4 SOM";
@@ -34,12 +34,12 @@
34 twl: twl@48 { 34 twl: twl@48 {
35 reg = <0x48>; 35 reg = <0x48>;
36 /* SPI = 0, IRQ# = 7, 4 = active high level-sensitive */ 36 /* SPI = 0, IRQ# = 7, 4 = active high level-sensitive */
37 interrupts = <0 7 4>; /* IRQ_SYS_1N cascaded to gic */ 37 interrupts = <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>; /* IRQ_SYS_1N cascaded to gic */
38 interrupt-parent = <&gic>; 38 interrupt-parent = <&gic>;
39 }; 39 };
40}; 40};
41 41
42/include/ "twl6030.dtsi" 42#include "twl6030.dtsi"
43 43
44&i2c2 { 44&i2c2 {
45 clock-frequency = <400000>; 45 clock-frequency = <400000>;
@@ -68,7 +68,7 @@
68 spi-max-frequency = <24000000>; 68 spi-max-frequency = <24000000>;
69 reg = <0>; 69 reg = <0>;
70 interrupt-parent = <&gpio6>; 70 interrupt-parent = <&gpio6>;
71 interrupts = <11 8>; /* gpio line 171, low triggered */ 71 interrupts = <11 IRQ_TYPE_LEVEL_LOW>; /* gpio line 171 */
72 vdd-supply = <&vdd_eth>; 72 vdd-supply = <&vdd_eth>;
73 }; 73 };
74}; 74};
diff --git a/arch/arm/boot/dts/omap4.dtsi b/arch/arm/boot/dts/omap4.dtsi
index 2a5642882c8a..22d9f2b593d4 100644
--- a/arch/arm/boot/dts/omap4.dtsi
+++ b/arch/arm/boot/dts/omap4.dtsi
@@ -6,15 +6,11 @@
6 * published by the Free Software Foundation. 6 * published by the Free Software Foundation.
7 */ 7 */
8 8
9/* 9#include <dt-bindings/gpio/gpio.h>
10 * Carveout for multimedia usecases 10#include <dt-bindings/interrupt-controller/arm-gic.h>
11 * It should be the last 48MB of the first 512MB memory part 11#include <dt-bindings/pinctrl/omap.h>
12 * In theory, it should not even exist. That zone should be reserved
13 * dynamically during the .reserve callback.
14 */
15/memreserve/ 0x9d000000 0x03000000;
16 12
17/include/ "skeleton.dtsi" 13#include "skeleton.dtsi"
18 14
19/ { 15/ {
20 compatible = "ti,omap4430", "ti,omap4"; 16 compatible = "ti,omap4430", "ti,omap4";
@@ -28,13 +24,20 @@
28 }; 24 };
29 25
30 cpus { 26 cpus {
27 #address-cells = <1>;
28 #size-cells = <0>;
29
31 cpu@0 { 30 cpu@0 {
32 compatible = "arm,cortex-a9"; 31 compatible = "arm,cortex-a9";
32 device_type = "cpu";
33 next-level-cache = <&L2>; 33 next-level-cache = <&L2>;
34 reg = <0x0>;
34 }; 35 };
35 cpu@1 { 36 cpu@1 {
36 compatible = "arm,cortex-a9"; 37 compatible = "arm,cortex-a9";
38 device_type = "cpu";
37 next-level-cache = <&L2>; 39 next-level-cache = <&L2>;
40 reg = <0x1>;
38 }; 41 };
39 }; 42 };
40 43
@@ -56,7 +59,7 @@
56 local-timer@0x48240600 { 59 local-timer@0x48240600 {
57 compatible = "arm,cortex-a9-twd-timer"; 60 compatible = "arm,cortex-a9-twd-timer";
58 reg = <0x48240600 0x20>; 61 reg = <0x48240600 0x20>;
59 interrupts = <1 13 0x304>; 62 interrupts = <GIC_PPI 13 (GIC_CPU_MASK_RAW(3) | IRQ_TYPE_LEVEL_HIGH)>;
60 }; 63 };
61 64
62 /* 65 /*
@@ -97,8 +100,8 @@
97 reg = <0x44000000 0x1000>, 100 reg = <0x44000000 0x1000>,
98 <0x44800000 0x2000>, 101 <0x44800000 0x2000>,
99 <0x45000000 0x1000>; 102 <0x45000000 0x1000>;
100 interrupts = <0 9 0x4>, 103 interrupts = <GIC_SPI 9 IRQ_TYPE_LEVEL_HIGH>,
101 <0 10 0x4>; 104 <GIC_SPI 10 IRQ_TYPE_LEVEL_HIGH>;
102 105
103 counter32k: counter@4a304000 { 106 counter32k: counter@4a304000 {
104 compatible = "ti,omap-counter32k"; 107 compatible = "ti,omap-counter32k";
@@ -126,10 +129,10 @@
126 sdma: dma-controller@4a056000 { 129 sdma: dma-controller@4a056000 {
127 compatible = "ti,omap4430-sdma"; 130 compatible = "ti,omap4430-sdma";
128 reg = <0x4a056000 0x1000>; 131 reg = <0x4a056000 0x1000>;
129 interrupts = <0 12 0x4>, 132 interrupts = <GIC_SPI 12 IRQ_TYPE_LEVEL_HIGH>,
130 <0 13 0x4>, 133 <GIC_SPI 13 IRQ_TYPE_LEVEL_HIGH>,
131 <0 14 0x4>, 134 <GIC_SPI 14 IRQ_TYPE_LEVEL_HIGH>,
132 <0 15 0x4>; 135 <GIC_SPI 15 IRQ_TYPE_LEVEL_HIGH>;
133 #dma-cells = <1>; 136 #dma-cells = <1>;
134 #dma-channels = <32>; 137 #dma-channels = <32>;
135 #dma-requests = <127>; 138 #dma-requests = <127>;
@@ -138,7 +141,7 @@
138 gpio1: gpio@4a310000 { 141 gpio1: gpio@4a310000 {
139 compatible = "ti,omap4-gpio"; 142 compatible = "ti,omap4-gpio";
140 reg = <0x4a310000 0x200>; 143 reg = <0x4a310000 0x200>;
141 interrupts = <0 29 0x4>; 144 interrupts = <GIC_SPI 29 IRQ_TYPE_LEVEL_HIGH>;
142 ti,hwmods = "gpio1"; 145 ti,hwmods = "gpio1";
143 ti,gpio-always-on; 146 ti,gpio-always-on;
144 gpio-controller; 147 gpio-controller;
@@ -150,7 +153,7 @@
150 gpio2: gpio@48055000 { 153 gpio2: gpio@48055000 {
151 compatible = "ti,omap4-gpio"; 154 compatible = "ti,omap4-gpio";
152 reg = <0x48055000 0x200>; 155 reg = <0x48055000 0x200>;
153 interrupts = <0 30 0x4>; 156 interrupts = <GIC_SPI 30 IRQ_TYPE_LEVEL_HIGH>;
154 ti,hwmods = "gpio2"; 157 ti,hwmods = "gpio2";
155 gpio-controller; 158 gpio-controller;
156 #gpio-cells = <2>; 159 #gpio-cells = <2>;
@@ -161,7 +164,7 @@
161 gpio3: gpio@48057000 { 164 gpio3: gpio@48057000 {
162 compatible = "ti,omap4-gpio"; 165 compatible = "ti,omap4-gpio";
163 reg = <0x48057000 0x200>; 166 reg = <0x48057000 0x200>;
164 interrupts = <0 31 0x4>; 167 interrupts = <GIC_SPI 31 IRQ_TYPE_LEVEL_HIGH>;
165 ti,hwmods = "gpio3"; 168 ti,hwmods = "gpio3";
166 gpio-controller; 169 gpio-controller;
167 #gpio-cells = <2>; 170 #gpio-cells = <2>;
@@ -172,7 +175,7 @@
172 gpio4: gpio@48059000 { 175 gpio4: gpio@48059000 {
173 compatible = "ti,omap4-gpio"; 176 compatible = "ti,omap4-gpio";
174 reg = <0x48059000 0x200>; 177 reg = <0x48059000 0x200>;
175 interrupts = <0 32 0x4>; 178 interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>;
176 ti,hwmods = "gpio4"; 179 ti,hwmods = "gpio4";
177 gpio-controller; 180 gpio-controller;
178 #gpio-cells = <2>; 181 #gpio-cells = <2>;
@@ -183,7 +186,7 @@
183 gpio5: gpio@4805b000 { 186 gpio5: gpio@4805b000 {
184 compatible = "ti,omap4-gpio"; 187 compatible = "ti,omap4-gpio";
185 reg = <0x4805b000 0x200>; 188 reg = <0x4805b000 0x200>;
186 interrupts = <0 33 0x4>; 189 interrupts = <GIC_SPI 33 IRQ_TYPE_LEVEL_HIGH>;
187 ti,hwmods = "gpio5"; 190 ti,hwmods = "gpio5";
188 gpio-controller; 191 gpio-controller;
189 #gpio-cells = <2>; 192 #gpio-cells = <2>;
@@ -194,7 +197,7 @@
194 gpio6: gpio@4805d000 { 197 gpio6: gpio@4805d000 {
195 compatible = "ti,omap4-gpio"; 198 compatible = "ti,omap4-gpio";
196 reg = <0x4805d000 0x200>; 199 reg = <0x4805d000 0x200>;
197 interrupts = <0 34 0x4>; 200 interrupts = <GIC_SPI 34 IRQ_TYPE_LEVEL_HIGH>;
198 ti,hwmods = "gpio6"; 201 ti,hwmods = "gpio6";
199 gpio-controller; 202 gpio-controller;
200 #gpio-cells = <2>; 203 #gpio-cells = <2>;
@@ -207,7 +210,7 @@
207 reg = <0x50000000 0x1000>; 210 reg = <0x50000000 0x1000>;
208 #address-cells = <2>; 211 #address-cells = <2>;
209 #size-cells = <1>; 212 #size-cells = <1>;
210 interrupts = <0 20 0x4>; 213 interrupts = <GIC_SPI 20 IRQ_TYPE_LEVEL_HIGH>;
211 gpmc,num-cs = <8>; 214 gpmc,num-cs = <8>;
212 gpmc,num-waitpins = <4>; 215 gpmc,num-waitpins = <4>;
213 ti,hwmods = "gpmc"; 216 ti,hwmods = "gpmc";
@@ -216,7 +219,7 @@
216 uart1: serial@4806a000 { 219 uart1: serial@4806a000 {
217 compatible = "ti,omap4-uart"; 220 compatible = "ti,omap4-uart";
218 reg = <0x4806a000 0x100>; 221 reg = <0x4806a000 0x100>;
219 interrupts = <0 72 0x4>; 222 interrupts = <GIC_SPI 72 IRQ_TYPE_LEVEL_HIGH>;
220 ti,hwmods = "uart1"; 223 ti,hwmods = "uart1";
221 clock-frequency = <48000000>; 224 clock-frequency = <48000000>;
222 }; 225 };
@@ -224,7 +227,7 @@
224 uart2: serial@4806c000 { 227 uart2: serial@4806c000 {
225 compatible = "ti,omap4-uart"; 228 compatible = "ti,omap4-uart";
226 reg = <0x4806c000 0x100>; 229 reg = <0x4806c000 0x100>;
227 interrupts = <0 73 0x4>; 230 interrupts = <GIC_SPI 73 IRQ_TYPE_LEVEL_HIGH>;
228 ti,hwmods = "uart2"; 231 ti,hwmods = "uart2";
229 clock-frequency = <48000000>; 232 clock-frequency = <48000000>;
230 }; 233 };
@@ -232,7 +235,7 @@
232 uart3: serial@48020000 { 235 uart3: serial@48020000 {
233 compatible = "ti,omap4-uart"; 236 compatible = "ti,omap4-uart";
234 reg = <0x48020000 0x100>; 237 reg = <0x48020000 0x100>;
235 interrupts = <0 74 0x4>; 238 interrupts = <GIC_SPI 74 IRQ_TYPE_LEVEL_HIGH>;
236 ti,hwmods = "uart3"; 239 ti,hwmods = "uart3";
237 clock-frequency = <48000000>; 240 clock-frequency = <48000000>;
238 }; 241 };
@@ -240,7 +243,7 @@
240 uart4: serial@4806e000 { 243 uart4: serial@4806e000 {
241 compatible = "ti,omap4-uart"; 244 compatible = "ti,omap4-uart";
242 reg = <0x4806e000 0x100>; 245 reg = <0x4806e000 0x100>;
243 interrupts = <0 70 0x4>; 246 interrupts = <GIC_SPI 70 IRQ_TYPE_LEVEL_HIGH>;
244 ti,hwmods = "uart4"; 247 ti,hwmods = "uart4";
245 clock-frequency = <48000000>; 248 clock-frequency = <48000000>;
246 }; 249 };
@@ -248,7 +251,7 @@
248 i2c1: i2c@48070000 { 251 i2c1: i2c@48070000 {
249 compatible = "ti,omap4-i2c"; 252 compatible = "ti,omap4-i2c";
250 reg = <0x48070000 0x100>; 253 reg = <0x48070000 0x100>;
251 interrupts = <0 56 0x4>; 254 interrupts = <GIC_SPI 56 IRQ_TYPE_LEVEL_HIGH>;
252 #address-cells = <1>; 255 #address-cells = <1>;
253 #size-cells = <0>; 256 #size-cells = <0>;
254 ti,hwmods = "i2c1"; 257 ti,hwmods = "i2c1";
@@ -257,7 +260,7 @@
257 i2c2: i2c@48072000 { 260 i2c2: i2c@48072000 {
258 compatible = "ti,omap4-i2c"; 261 compatible = "ti,omap4-i2c";
259 reg = <0x48072000 0x100>; 262 reg = <0x48072000 0x100>;
260 interrupts = <0 57 0x4>; 263 interrupts = <GIC_SPI 57 IRQ_TYPE_LEVEL_HIGH>;
261 #address-cells = <1>; 264 #address-cells = <1>;
262 #size-cells = <0>; 265 #size-cells = <0>;
263 ti,hwmods = "i2c2"; 266 ti,hwmods = "i2c2";
@@ -266,7 +269,7 @@
266 i2c3: i2c@48060000 { 269 i2c3: i2c@48060000 {
267 compatible = "ti,omap4-i2c"; 270 compatible = "ti,omap4-i2c";
268 reg = <0x48060000 0x100>; 271 reg = <0x48060000 0x100>;
269 interrupts = <0 61 0x4>; 272 interrupts = <GIC_SPI 61 IRQ_TYPE_LEVEL_HIGH>;
270 #address-cells = <1>; 273 #address-cells = <1>;
271 #size-cells = <0>; 274 #size-cells = <0>;
272 ti,hwmods = "i2c3"; 275 ti,hwmods = "i2c3";
@@ -275,7 +278,7 @@
275 i2c4: i2c@48350000 { 278 i2c4: i2c@48350000 {
276 compatible = "ti,omap4-i2c"; 279 compatible = "ti,omap4-i2c";
277 reg = <0x48350000 0x100>; 280 reg = <0x48350000 0x100>;
278 interrupts = <0 62 0x4>; 281 interrupts = <GIC_SPI 62 IRQ_TYPE_LEVEL_HIGH>;
279 #address-cells = <1>; 282 #address-cells = <1>;
280 #size-cells = <0>; 283 #size-cells = <0>;
281 ti,hwmods = "i2c4"; 284 ti,hwmods = "i2c4";
@@ -284,7 +287,7 @@
284 mcspi1: spi@48098000 { 287 mcspi1: spi@48098000 {
285 compatible = "ti,omap4-mcspi"; 288 compatible = "ti,omap4-mcspi";
286 reg = <0x48098000 0x200>; 289 reg = <0x48098000 0x200>;
287 interrupts = <0 65 0x4>; 290 interrupts = <GIC_SPI 65 IRQ_TYPE_LEVEL_HIGH>;
288 #address-cells = <1>; 291 #address-cells = <1>;
289 #size-cells = <0>; 292 #size-cells = <0>;
290 ti,hwmods = "mcspi1"; 293 ti,hwmods = "mcspi1";
@@ -304,7 +307,7 @@
304 mcspi2: spi@4809a000 { 307 mcspi2: spi@4809a000 {
305 compatible = "ti,omap4-mcspi"; 308 compatible = "ti,omap4-mcspi";
306 reg = <0x4809a000 0x200>; 309 reg = <0x4809a000 0x200>;
307 interrupts = <0 66 0x4>; 310 interrupts = <GIC_SPI 66 IRQ_TYPE_LEVEL_HIGH>;
308 #address-cells = <1>; 311 #address-cells = <1>;
309 #size-cells = <0>; 312 #size-cells = <0>;
310 ti,hwmods = "mcspi2"; 313 ti,hwmods = "mcspi2";
@@ -319,7 +322,7 @@
319 mcspi3: spi@480b8000 { 322 mcspi3: spi@480b8000 {
320 compatible = "ti,omap4-mcspi"; 323 compatible = "ti,omap4-mcspi";
321 reg = <0x480b8000 0x200>; 324 reg = <0x480b8000 0x200>;
322 interrupts = <0 91 0x4>; 325 interrupts = <GIC_SPI 91 IRQ_TYPE_LEVEL_HIGH>;
323 #address-cells = <1>; 326 #address-cells = <1>;
324 #size-cells = <0>; 327 #size-cells = <0>;
325 ti,hwmods = "mcspi3"; 328 ti,hwmods = "mcspi3";
@@ -331,7 +334,7 @@
331 mcspi4: spi@480ba000 { 334 mcspi4: spi@480ba000 {
332 compatible = "ti,omap4-mcspi"; 335 compatible = "ti,omap4-mcspi";
333 reg = <0x480ba000 0x200>; 336 reg = <0x480ba000 0x200>;
334 interrupts = <0 48 0x4>; 337 interrupts = <GIC_SPI 48 IRQ_TYPE_LEVEL_HIGH>;
335 #address-cells = <1>; 338 #address-cells = <1>;
336 #size-cells = <0>; 339 #size-cells = <0>;
337 ti,hwmods = "mcspi4"; 340 ti,hwmods = "mcspi4";
@@ -343,7 +346,7 @@
343 mmc1: mmc@4809c000 { 346 mmc1: mmc@4809c000 {
344 compatible = "ti,omap4-hsmmc"; 347 compatible = "ti,omap4-hsmmc";
345 reg = <0x4809c000 0x400>; 348 reg = <0x4809c000 0x400>;
346 interrupts = <0 83 0x4>; 349 interrupts = <GIC_SPI 83 IRQ_TYPE_LEVEL_HIGH>;
347 ti,hwmods = "mmc1"; 350 ti,hwmods = "mmc1";
348 ti,dual-volt; 351 ti,dual-volt;
349 ti,needs-special-reset; 352 ti,needs-special-reset;
@@ -354,7 +357,7 @@
354 mmc2: mmc@480b4000 { 357 mmc2: mmc@480b4000 {
355 compatible = "ti,omap4-hsmmc"; 358 compatible = "ti,omap4-hsmmc";
356 reg = <0x480b4000 0x400>; 359 reg = <0x480b4000 0x400>;
357 interrupts = <0 86 0x4>; 360 interrupts = <GIC_SPI 86 IRQ_TYPE_LEVEL_HIGH>;
358 ti,hwmods = "mmc2"; 361 ti,hwmods = "mmc2";
359 ti,needs-special-reset; 362 ti,needs-special-reset;
360 dmas = <&sdma 47>, <&sdma 48>; 363 dmas = <&sdma 47>, <&sdma 48>;
@@ -364,7 +367,7 @@
364 mmc3: mmc@480ad000 { 367 mmc3: mmc@480ad000 {
365 compatible = "ti,omap4-hsmmc"; 368 compatible = "ti,omap4-hsmmc";
366 reg = <0x480ad000 0x400>; 369 reg = <0x480ad000 0x400>;
367 interrupts = <0 94 0x4>; 370 interrupts = <GIC_SPI 94 IRQ_TYPE_LEVEL_HIGH>;
368 ti,hwmods = "mmc3"; 371 ti,hwmods = "mmc3";
369 ti,needs-special-reset; 372 ti,needs-special-reset;
370 dmas = <&sdma 77>, <&sdma 78>; 373 dmas = <&sdma 77>, <&sdma 78>;
@@ -374,7 +377,7 @@
374 mmc4: mmc@480d1000 { 377 mmc4: mmc@480d1000 {
375 compatible = "ti,omap4-hsmmc"; 378 compatible = "ti,omap4-hsmmc";
376 reg = <0x480d1000 0x400>; 379 reg = <0x480d1000 0x400>;
377 interrupts = <0 96 0x4>; 380 interrupts = <GIC_SPI 96 IRQ_TYPE_LEVEL_HIGH>;
378 ti,hwmods = "mmc4"; 381 ti,hwmods = "mmc4";
379 ti,needs-special-reset; 382 ti,needs-special-reset;
380 dmas = <&sdma 57>, <&sdma 58>; 383 dmas = <&sdma 57>, <&sdma 58>;
@@ -384,7 +387,7 @@
384 mmc5: mmc@480d5000 { 387 mmc5: mmc@480d5000 {
385 compatible = "ti,omap4-hsmmc"; 388 compatible = "ti,omap4-hsmmc";
386 reg = <0x480d5000 0x400>; 389 reg = <0x480d5000 0x400>;
387 interrupts = <0 59 0x4>; 390 interrupts = <GIC_SPI 59 IRQ_TYPE_LEVEL_HIGH>;
388 ti,hwmods = "mmc5"; 391 ti,hwmods = "mmc5";
389 ti,needs-special-reset; 392 ti,needs-special-reset;
390 dmas = <&sdma 59>, <&sdma 60>; 393 dmas = <&sdma 59>, <&sdma 60>;
@@ -394,7 +397,7 @@
394 wdt2: wdt@4a314000 { 397 wdt2: wdt@4a314000 {
395 compatible = "ti,omap4-wdt", "ti,omap3-wdt"; 398 compatible = "ti,omap4-wdt", "ti,omap3-wdt";
396 reg = <0x4a314000 0x80>; 399 reg = <0x4a314000 0x80>;
397 interrupts = <0 80 0x4>; 400 interrupts = <GIC_SPI 80 IRQ_TYPE_LEVEL_HIGH>;
398 ti,hwmods = "wd_timer2"; 401 ti,hwmods = "wd_timer2";
399 }; 402 };
400 403
@@ -403,7 +406,7 @@
403 reg = <0x40132000 0x7f>, /* MPU private access */ 406 reg = <0x40132000 0x7f>, /* MPU private access */
404 <0x49032000 0x7f>; /* L3 Interconnect */ 407 <0x49032000 0x7f>; /* L3 Interconnect */
405 reg-names = "mpu", "dma"; 408 reg-names = "mpu", "dma";
406 interrupts = <0 112 0x4>; 409 interrupts = <GIC_SPI 112 IRQ_TYPE_LEVEL_HIGH>;
407 ti,hwmods = "mcpdm"; 410 ti,hwmods = "mcpdm";
408 dmas = <&sdma 65>, 411 dmas = <&sdma 65>,
409 <&sdma 66>; 412 <&sdma 66>;
@@ -415,7 +418,7 @@
415 reg = <0x4012e000 0x7f>, /* MPU private access */ 418 reg = <0x4012e000 0x7f>, /* MPU private access */
416 <0x4902e000 0x7f>; /* L3 Interconnect */ 419 <0x4902e000 0x7f>; /* L3 Interconnect */
417 reg-names = "mpu", "dma"; 420 reg-names = "mpu", "dma";
418 interrupts = <0 114 0x4>; 421 interrupts = <GIC_SPI 114 IRQ_TYPE_LEVEL_HIGH>;
419 ti,hwmods = "dmic"; 422 ti,hwmods = "dmic";
420 dmas = <&sdma 67>; 423 dmas = <&sdma 67>;
421 dma-names = "up_link"; 424 dma-names = "up_link";
@@ -426,7 +429,7 @@
426 reg = <0x40122000 0xff>, /* MPU private access */ 429 reg = <0x40122000 0xff>, /* MPU private access */
427 <0x49022000 0xff>; /* L3 Interconnect */ 430 <0x49022000 0xff>; /* L3 Interconnect */
428 reg-names = "mpu", "dma"; 431 reg-names = "mpu", "dma";
429 interrupts = <0 17 0x4>; 432 interrupts = <GIC_SPI 17 IRQ_TYPE_LEVEL_HIGH>;
430 interrupt-names = "common"; 433 interrupt-names = "common";
431 ti,buffer-size = <128>; 434 ti,buffer-size = <128>;
432 ti,hwmods = "mcbsp1"; 435 ti,hwmods = "mcbsp1";
@@ -440,7 +443,7 @@
440 reg = <0x40124000 0xff>, /* MPU private access */ 443 reg = <0x40124000 0xff>, /* MPU private access */
441 <0x49024000 0xff>; /* L3 Interconnect */ 444 <0x49024000 0xff>; /* L3 Interconnect */
442 reg-names = "mpu", "dma"; 445 reg-names = "mpu", "dma";
443 interrupts = <0 22 0x4>; 446 interrupts = <GIC_SPI 22 IRQ_TYPE_LEVEL_HIGH>;
444 interrupt-names = "common"; 447 interrupt-names = "common";
445 ti,buffer-size = <128>; 448 ti,buffer-size = <128>;
446 ti,hwmods = "mcbsp2"; 449 ti,hwmods = "mcbsp2";
@@ -454,7 +457,7 @@
454 reg = <0x40126000 0xff>, /* MPU private access */ 457 reg = <0x40126000 0xff>, /* MPU private access */
455 <0x49026000 0xff>; /* L3 Interconnect */ 458 <0x49026000 0xff>; /* L3 Interconnect */
456 reg-names = "mpu", "dma"; 459 reg-names = "mpu", "dma";
457 interrupts = <0 23 0x4>; 460 interrupts = <GIC_SPI 23 IRQ_TYPE_LEVEL_HIGH>;
458 interrupt-names = "common"; 461 interrupt-names = "common";
459 ti,buffer-size = <128>; 462 ti,buffer-size = <128>;
460 ti,hwmods = "mcbsp3"; 463 ti,hwmods = "mcbsp3";
@@ -467,7 +470,7 @@
467 compatible = "ti,omap4-mcbsp"; 470 compatible = "ti,omap4-mcbsp";
468 reg = <0x48096000 0xff>; /* L4 Interconnect */ 471 reg = <0x48096000 0xff>; /* L4 Interconnect */
469 reg-names = "mpu"; 472 reg-names = "mpu";
470 interrupts = <0 16 0x4>; 473 interrupts = <GIC_SPI 16 IRQ_TYPE_LEVEL_HIGH>;
471 interrupt-names = "common"; 474 interrupt-names = "common";
472 ti,buffer-size = <128>; 475 ti,buffer-size = <128>;
473 ti,hwmods = "mcbsp4"; 476 ti,hwmods = "mcbsp4";
@@ -479,7 +482,7 @@
479 keypad: keypad@4a31c000 { 482 keypad: keypad@4a31c000 {
480 compatible = "ti,omap4-keypad"; 483 compatible = "ti,omap4-keypad";
481 reg = <0x4a31c000 0x80>; 484 reg = <0x4a31c000 0x80>;
482 interrupts = <0 120 0x4>; 485 interrupts = <GIC_SPI 120 IRQ_TYPE_LEVEL_HIGH>;
483 reg-names = "mpu"; 486 reg-names = "mpu";
484 ti,hwmods = "kbd"; 487 ti,hwmods = "kbd";
485 }; 488 };
@@ -487,7 +490,7 @@
487 emif1: emif@4c000000 { 490 emif1: emif@4c000000 {
488 compatible = "ti,emif-4d"; 491 compatible = "ti,emif-4d";
489 reg = <0x4c000000 0x100>; 492 reg = <0x4c000000 0x100>;
490 interrupts = <0 110 0x4>; 493 interrupts = <GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH>;
491 ti,hwmods = "emif1"; 494 ti,hwmods = "emif1";
492 phy-type = <1>; 495 phy-type = <1>;
493 hw-caps-read-idle-ctrl; 496 hw-caps-read-idle-ctrl;
@@ -498,7 +501,7 @@
498 emif2: emif@4d000000 { 501 emif2: emif@4d000000 {
499 compatible = "ti,emif-4d"; 502 compatible = "ti,emif-4d";
500 reg = <0x4d000000 0x100>; 503 reg = <0x4d000000 0x100>;
501 interrupts = <0 111 0x4>; 504 interrupts = <GIC_SPI 111 IRQ_TYPE_LEVEL_HIGH>;
502 ti,hwmods = "emif2"; 505 ti,hwmods = "emif2";
503 phy-type = <1>; 506 phy-type = <1>;
504 hw-caps-read-idle-ctrl; 507 hw-caps-read-idle-ctrl;
@@ -523,7 +526,7 @@
523 timer1: timer@4a318000 { 526 timer1: timer@4a318000 {
524 compatible = "ti,omap3430-timer"; 527 compatible = "ti,omap3430-timer";
525 reg = <0x4a318000 0x80>; 528 reg = <0x4a318000 0x80>;
526 interrupts = <0 37 0x4>; 529 interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>;
527 ti,hwmods = "timer1"; 530 ti,hwmods = "timer1";
528 ti,timer-alwon; 531 ti,timer-alwon;
529 }; 532 };
@@ -531,21 +534,21 @@
531 timer2: timer@48032000 { 534 timer2: timer@48032000 {
532 compatible = "ti,omap3430-timer"; 535 compatible = "ti,omap3430-timer";
533 reg = <0x48032000 0x80>; 536 reg = <0x48032000 0x80>;
534 interrupts = <0 38 0x4>; 537 interrupts = <GIC_SPI 38 IRQ_TYPE_LEVEL_HIGH>;
535 ti,hwmods = "timer2"; 538 ti,hwmods = "timer2";
536 }; 539 };
537 540
538 timer3: timer@48034000 { 541 timer3: timer@48034000 {
539 compatible = "ti,omap4430-timer"; 542 compatible = "ti,omap4430-timer";
540 reg = <0x48034000 0x80>; 543 reg = <0x48034000 0x80>;
541 interrupts = <0 39 0x4>; 544 interrupts = <GIC_SPI 39 IRQ_TYPE_LEVEL_HIGH>;
542 ti,hwmods = "timer3"; 545 ti,hwmods = "timer3";
543 }; 546 };
544 547
545 timer4: timer@48036000 { 548 timer4: timer@48036000 {
546 compatible = "ti,omap4430-timer"; 549 compatible = "ti,omap4430-timer";
547 reg = <0x48036000 0x80>; 550 reg = <0x48036000 0x80>;
548 interrupts = <0 40 0x4>; 551 interrupts = <GIC_SPI 40 IRQ_TYPE_LEVEL_HIGH>;
549 ti,hwmods = "timer4"; 552 ti,hwmods = "timer4";
550 }; 553 };
551 554
@@ -553,7 +556,7 @@
553 compatible = "ti,omap4430-timer"; 556 compatible = "ti,omap4430-timer";
554 reg = <0x40138000 0x80>, 557 reg = <0x40138000 0x80>,
555 <0x49038000 0x80>; 558 <0x49038000 0x80>;
556 interrupts = <0 41 0x4>; 559 interrupts = <GIC_SPI 41 IRQ_TYPE_LEVEL_HIGH>;
557 ti,hwmods = "timer5"; 560 ti,hwmods = "timer5";
558 ti,timer-dsp; 561 ti,timer-dsp;
559 }; 562 };
@@ -562,7 +565,7 @@
562 compatible = "ti,omap4430-timer"; 565 compatible = "ti,omap4430-timer";
563 reg = <0x4013a000 0x80>, 566 reg = <0x4013a000 0x80>,
564 <0x4903a000 0x80>; 567 <0x4903a000 0x80>;
565 interrupts = <0 42 0x4>; 568 interrupts = <GIC_SPI 42 IRQ_TYPE_LEVEL_HIGH>;
566 ti,hwmods = "timer6"; 569 ti,hwmods = "timer6";
567 ti,timer-dsp; 570 ti,timer-dsp;
568 }; 571 };
@@ -571,7 +574,7 @@
571 compatible = "ti,omap4430-timer"; 574 compatible = "ti,omap4430-timer";
572 reg = <0x4013c000 0x80>, 575 reg = <0x4013c000 0x80>,
573 <0x4903c000 0x80>; 576 <0x4903c000 0x80>;
574 interrupts = <0 43 0x4>; 577 interrupts = <GIC_SPI 43 IRQ_TYPE_LEVEL_HIGH>;
575 ti,hwmods = "timer7"; 578 ti,hwmods = "timer7";
576 ti,timer-dsp; 579 ti,timer-dsp;
577 }; 580 };
@@ -580,7 +583,7 @@
580 compatible = "ti,omap4430-timer"; 583 compatible = "ti,omap4430-timer";
581 reg = <0x4013e000 0x80>, 584 reg = <0x4013e000 0x80>,
582 <0x4903e000 0x80>; 585 <0x4903e000 0x80>;
583 interrupts = <0 44 0x4>; 586 interrupts = <GIC_SPI 44 IRQ_TYPE_LEVEL_HIGH>;
584 ti,hwmods = "timer8"; 587 ti,hwmods = "timer8";
585 ti,timer-pwm; 588 ti,timer-pwm;
586 ti,timer-dsp; 589 ti,timer-dsp;
@@ -589,7 +592,7 @@
589 timer9: timer@4803e000 { 592 timer9: timer@4803e000 {
590 compatible = "ti,omap4430-timer"; 593 compatible = "ti,omap4430-timer";
591 reg = <0x4803e000 0x80>; 594 reg = <0x4803e000 0x80>;
592 interrupts = <0 45 0x4>; 595 interrupts = <GIC_SPI 45 IRQ_TYPE_LEVEL_HIGH>;
593 ti,hwmods = "timer9"; 596 ti,hwmods = "timer9";
594 ti,timer-pwm; 597 ti,timer-pwm;
595 }; 598 };
@@ -597,7 +600,7 @@
597 timer10: timer@48086000 { 600 timer10: timer@48086000 {
598 compatible = "ti,omap3430-timer"; 601 compatible = "ti,omap3430-timer";
599 reg = <0x48086000 0x80>; 602 reg = <0x48086000 0x80>;
600 interrupts = <0 46 0x4>; 603 interrupts = <GIC_SPI 46 IRQ_TYPE_LEVEL_HIGH>;
601 ti,hwmods = "timer10"; 604 ti,hwmods = "timer10";
602 ti,timer-pwm; 605 ti,timer-pwm;
603 }; 606 };
@@ -605,7 +608,7 @@
605 timer11: timer@48088000 { 608 timer11: timer@48088000 {
606 compatible = "ti,omap4430-timer"; 609 compatible = "ti,omap4430-timer";
607 reg = <0x48088000 0x80>; 610 reg = <0x48088000 0x80>;
608 interrupts = <0 47 0x4>; 611 interrupts = <GIC_SPI 47 IRQ_TYPE_LEVEL_HIGH>;
609 ti,hwmods = "timer11"; 612 ti,hwmods = "timer11";
610 ti,timer-pwm; 613 ti,timer-pwm;
611 }; 614 };
@@ -613,7 +616,7 @@
613 usbhstll: usbhstll@4a062000 { 616 usbhstll: usbhstll@4a062000 {
614 compatible = "ti,usbhs-tll"; 617 compatible = "ti,usbhs-tll";
615 reg = <0x4a062000 0x1000>; 618 reg = <0x4a062000 0x1000>;
616 interrupts = <0 78 0x4>; 619 interrupts = <GIC_SPI 78 IRQ_TYPE_LEVEL_HIGH>;
617 ti,hwmods = "usb_tll_hs"; 620 ti,hwmods = "usb_tll_hs";
618 }; 621 };
619 622
@@ -629,14 +632,14 @@
629 compatible = "ti,ohci-omap3", "usb-ohci"; 632 compatible = "ti,ohci-omap3", "usb-ohci";
630 reg = <0x4a064800 0x400>; 633 reg = <0x4a064800 0x400>;
631 interrupt-parent = <&gic>; 634 interrupt-parent = <&gic>;
632 interrupts = <0 76 0x4>; 635 interrupts = <GIC_SPI 76 IRQ_TYPE_LEVEL_HIGH>;
633 }; 636 };
634 637
635 usbhsehci: ehci@4a064c00 { 638 usbhsehci: ehci@4a064c00 {
636 compatible = "ti,ehci-omap", "usb-ehci"; 639 compatible = "ti,ehci-omap", "usb-ehci";
637 reg = <0x4a064c00 0x400>; 640 reg = <0x4a064c00 0x400>;
638 interrupt-parent = <&gic>; 641 interrupt-parent = <&gic>;
639 interrupts = <0 77 0x4>; 642 interrupts = <GIC_SPI 77 IRQ_TYPE_LEVEL_HIGH>;
640 }; 643 };
641 }; 644 };
642 645
@@ -651,7 +654,7 @@
651 usb_otg_hs: usb_otg_hs@4a0ab000 { 654 usb_otg_hs: usb_otg_hs@4a0ab000 {
652 compatible = "ti,omap4-musb"; 655 compatible = "ti,omap4-musb";
653 reg = <0x4a0ab000 0x7ff>; 656 reg = <0x4a0ab000 0x7ff>;
654 interrupts = <0 92 0x4>, <0 93 0x4>; 657 interrupts = <GIC_SPI 92 IRQ_TYPE_LEVEL_HIGH>, <GIC_SPI 93 IRQ_TYPE_LEVEL_HIGH>;
655 interrupt-names = "mc", "dma"; 658 interrupt-names = "mc", "dma";
656 ti,hwmods = "usb_otg_hs"; 659 ti,hwmods = "usb_otg_hs";
657 usb-phy = <&usb2_phy>; 660 usb-phy = <&usb2_phy>;
diff --git a/arch/arm/boot/dts/omap443x.dtsi b/arch/arm/boot/dts/omap443x.dtsi
index cccf39af4925..bcf455efe18d 100644
--- a/arch/arm/boot/dts/omap443x.dtsi
+++ b/arch/arm/boot/dts/omap443x.dtsi
@@ -8,7 +8,7 @@
8 * kind, whether express or implied. 8 * kind, whether express or implied.
9 */ 9 */
10 10
11/include/ "omap4.dtsi" 11#include "omap4.dtsi"
12 12
13/ { 13/ {
14 cpus { 14 cpus {
@@ -24,4 +24,10 @@
24 clock-latency = <300000>; /* From legacy driver */ 24 clock-latency = <300000>; /* From legacy driver */
25 }; 25 };
26 }; 26 };
27
28 bandgap {
29 reg = <0x4a002260 0x4
30 0x4a00232C 0x4>;
31 compatible = "ti,omap4430-bandgap";
32 };
27}; 33};
diff --git a/arch/arm/boot/dts/omap4460.dtsi b/arch/arm/boot/dts/omap4460.dtsi
index 2cf227c86099..c2f0f39b5a24 100644
--- a/arch/arm/boot/dts/omap4460.dtsi
+++ b/arch/arm/boot/dts/omap4460.dtsi
@@ -7,7 +7,7 @@
7 * version 2. This program is licensed "as is" without any warranty of any 7 * version 2. This program is licensed "as is" without any warranty of any
8 * kind, whether express or implied. 8 * kind, whether express or implied.
9 */ 9 */
10/include/ "omap4.dtsi" 10#include "omap4.dtsi"
11 11
12/ { 12/ {
13 cpus { 13 cpus {
@@ -25,8 +25,17 @@
25 25
26 pmu { 26 pmu {
27 compatible = "arm,cortex-a9-pmu"; 27 compatible = "arm,cortex-a9-pmu";
28 interrupts = <0 54 0x4>, 28 interrupts = <GIC_SPI 54 IRQ_TYPE_LEVEL_HIGH>,
29 <0 55 0x4>; 29 <GIC_SPI 55 IRQ_TYPE_LEVEL_HIGH>;
30 ti,hwmods = "debugss"; 30 ti,hwmods = "debugss";
31 }; 31 };
32
33 bandgap {
34 reg = <0x4a002260 0x4
35 0x4a00232C 0x4
36 0x4a002378 0x18>;
37 compatible = "ti,omap4460-bandgap";
38 interrupts = <0 126 IRQ_TYPE_LEVEL_HIGH>; /* talert */
39 gpios = <&gpio3 22 0>; /* tshut */
40 };
32}; 41};
diff --git a/arch/arm/boot/dts/omap5-evm.dts b/arch/arm/boot/dts/omap5-evm.dts
deleted file mode 100644
index 982acd19477d..000000000000
--- a/arch/arm/boot/dts/omap5-evm.dts
+++ /dev/null
@@ -1,261 +0,0 @@
1/*
2 * Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com/
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/dts-v1/;
9
10/include/ "omap5.dtsi"
11/include/ "samsung_k3pe0e000b.dtsi"
12
13/ {
14 model = "TI OMAP5 EVM board";
15 compatible = "ti,omap5-evm", "ti,omap5";
16
17 memory {
18 device_type = "memory";
19 reg = <0x80000000 0x7F000000>; /* 2032 MB */
20 };
21
22 vmmcsd_fixed: fixedregulator-mmcsd {
23 compatible = "regulator-fixed";
24 regulator-name = "vmmcsd_fixed";
25 regulator-min-microvolt = <3000000>;
26 regulator-max-microvolt = <3000000>;
27 };
28
29};
30
31&omap5_pmx_core {
32 pinctrl-names = "default";
33 pinctrl-0 = <
34 &twl6040_pins
35 &mcpdm_pins
36 &dmic_pins
37 &mcbsp1_pins
38 &mcbsp2_pins
39 >;
40
41 twl6040_pins: pinmux_twl6040_pins {
42 pinctrl-single,pins = <
43 0x18a 0x6 /* perslimbus2_clock.gpio5_145 OUTPUT | MODE6 */
44 >;
45 };
46
47 mcpdm_pins: pinmux_mcpdm_pins {
48 pinctrl-single,pins = <
49 0x142 0x108 /* abe_clks.abe_clks INPUT PULLDOWN | MODE0 */
50 0x15c 0x108 /* abemcpdm_ul_data.abemcpdm_ul_data INPUT PULLDOWN | MODE0 */
51 0x15e 0x108 /* abemcpdm_dl_data.abemcpdm_dl_data INPUT PULLDOWN | MODE0 */
52 0x160 0x118 /* abemcpdm_frame.abemcpdm_frame INPUT PULLUP | MODE0 */
53 0x162 0x108 /* abemcpdm_lb_clk.abemcpdm_lb_clk INPUT PULLDOWN | MODE0 */
54 >;
55 };
56
57 dmic_pins: pinmux_dmic_pins {
58 pinctrl-single,pins = <
59 0x144 0x100 /* abedmic_din1.abedmic_din1 INPUT | MODE0 */
60 0x146 0x100 /* abedmic_din2.abedmic_din2 INPUT | MODE0 */
61 0x148 0x100 /* abedmic_din3.abedmic_din3 INPUT | MODE0 */
62 0x14a 0 /* abedmic_clk1.abedmic_clk1 OUTPUT | MODE0 */
63 >;
64 };
65
66 mcbsp1_pins: pinmux_mcbsp1_pins {
67 pinctrl-single,pins = <
68 0x14c 0x101 /* abedmic_clk2.abemcbsp1_fsx INPUT | MODE1 */
69 0x14e 0x9 /* abedmic_clk3.abemcbsp1_dx OUTPUT PULLDOWN | MODE1 */
70 0x150 0x101 /* abeslimbus1_clock.abemcbsp1_clkx INPUT | MODE0 */
71 0x152 0x109 /* abeslimbus1_data.abemcbsp1_dr INPUT PULLDOWN | MODE1 */
72 >;
73 };
74
75 mcbsp2_pins: pinmux_mcbsp2_pins {
76 pinctrl-single,pins = <
77 0x154 0x108 /* abemcbsp2_dr.abemcbsp2_dr INPUT PULLDOWN | MODE0 */
78 0x156 0x8 /* abemcbsp2_dx.abemcbsp2_dx OUTPUT PULLDOWN | MODE0 */
79 0x158 0x100 /* abemcbsp2_fsx.abemcbsp2_fsx INPUT | MODE0 */
80 0x15a 0x100 /* abemcbsp2_clkx.abemcbsp2_clkx INPUT | MODE0 */
81 >;
82 };
83
84 i2c1_pins: pinmux_i2c1_pins {
85 pinctrl-single,pins = <
86 0x1b2 0x118 /* i2c1_scl PULLUP | INPUTENABLE | MODE0 */
87 0x1b4 0x118 /* i2c1_sda PULLUP | INPUTENABLE | MODE0 */
88 >;
89 };
90
91 i2c2_pins: pinmux_i2c2_pins {
92 pinctrl-single,pins = <
93 0x178 0x100 /* i2c2_scl INPUTENABLE | MODE0 */
94 0x17a 0x100 /* i2c2_sda INPUTENABLE | MODE0 */
95 >;
96 };
97
98 i2c3_pins: pinmux_i2c3_pins {
99 pinctrl-single,pins = <
100 0x13a 0x100 /* i2c3_scl INPUTENABLE | MODE0 */
101 0x13c 0x100 /* i2c3_sda INPUTENABLE | MODE0 */
102 >;
103 };
104
105 i2c4_pins: pinmux_i2c4_pins {
106 pinctrl-single,pins = <
107 0xb8 0x100 /* i2c4_scl INPUTENABLE | MODE0 */
108 0xba 0x100 /* i2c4_sda INPUTENABLE | MODE0 */
109 >;
110 };
111
112 i2c5_pins: pinmux_i2c5_pins {
113 pinctrl-single,pins = <
114 0x184 0x100 /* i2c5_scl INPUTENABLE | MODE0 */
115 0x186 0x100 /* i2c5_sda INPUTENABLE | MODE0 */
116 >;
117 };
118
119 mcspi2_pins: pinmux_mcspi2_pins {
120 pinctrl-single,pins = <
121 0xbc 0x100 /* MCSPI2_CLK INPUTENABLE | MODE0 */
122 0xbe 0x100 /* MCSPI2_SIMO INPUTENABLE | MODE0 */
123 0xc0 0x118 /* MCSPI2_SOMI PULLUP | INPUTENABLE | MODE0*/
124 0xc2 0x0 /* MCSPI2_CS MODE0*/
125 >;
126 };
127
128 mcspi3_pins: pinmux_mcspi3_pins {
129 pinctrl-single,pins = <
130 0x78 0x101 /* MCSPI2_SOMI INPUTENABLE | MODE1 */
131 0x7a 0x101 /* MCSPI2_CS INPUTENABLE | MODE1 */
132 0x7c 0x101 /* MCSPI2_SIMO INPUTENABLE | MODE1 */
133 0x7e 0x101 /* MCSPI2_CLK INPUTENABLE | MODE1 */
134 >;
135 };
136
137 mcspi4_pins: pinmux_mcspi4_pins {
138 pinctrl-single,pins = <
139 0x164 0x101 /* MCSPI2_CLK INPUTENABLE | MODE1 */
140 0x168 0x101 /* MCSPI2_SIMO INPUTENABLE | MODE1 */
141 0x16a 0x101 /* MCSPI2_SOMI INPUTENABLE | MODE1 */
142 0x16c 0x101 /* MCSPI2_CS INPUTENABLE | MODE1 */
143 >;
144 };
145};
146
147&mmc1 {
148 vmmc-supply = <&vmmcsd_fixed>;
149 bus-width = <4>;
150};
151
152&mmc2 {
153 vmmc-supply = <&vmmcsd_fixed>;
154 bus-width = <8>;
155 ti,non-removable;
156};
157
158&mmc3 {
159 bus-width = <4>;
160 ti,non-removable;
161};
162
163&mmc4 {
164 status = "disabled";
165};
166
167&mmc5 {
168 status = "disabled";
169};
170
171&i2c1 {
172 pinctrl-names = "default";
173 pinctrl-0 = <&i2c1_pins>;
174
175 clock-frequency = <400000>;
176};
177
178&i2c2 {
179 pinctrl-names = "default";
180 pinctrl-0 = <&i2c2_pins>;
181
182 clock-frequency = <400000>;
183
184 /* Pressure Sensor */
185 bmp085@77 {
186 compatible = "bosch,bmp085";
187 reg = <0x77>;
188 };
189};
190
191&i2c3 {
192 pinctrl-names = "default";
193 pinctrl-0 = <&i2c3_pins>;
194
195 clock-frequency = <400000>;
196};
197
198&i2c4 {
199 pinctrl-names = "default";
200 pinctrl-0 = <&i2c4_pins>;
201
202 clock-frequency = <400000>;
203
204 /* Temperature Sensor */
205 tmp102@48{
206 compatible = "ti,tmp102";
207 reg = <0x48>;
208 };
209};
210
211&i2c5 {
212 pinctrl-names = "default";
213 pinctrl-0 = <&i2c5_pins>;
214
215 clock-frequency = <400000>;
216};
217
218&keypad {
219 keypad,num-rows = <8>;
220 keypad,num-columns = <8>;
221 linux,keymap = <0x02020073 /* VOLUP */
222 0x02030072 /* VOLDOWM */
223 0x020400e7 /* SEND */
224 0x02050066 /* HOME */
225 0x0206006b /* END */
226 0x020700d9>; /* SEARCH */
227 linux,input-no-autorepeat;
228};
229
230&mcbsp3 {
231 status = "disabled";
232};
233
234&emif1 {
235 cs1-used;
236 device-handle = <&samsung_K3PE0E000B>;
237};
238
239&emif2 {
240 cs1-used;
241 device-handle = <&samsung_K3PE0E000B>;
242};
243
244&mcspi1 {
245
246};
247
248&mcspi2 {
249 pinctrl-names = "default";
250 pinctrl-0 = <&mcspi2_pins>;
251};
252
253&mcspi3 {
254 pinctrl-names = "default";
255 pinctrl-0 = <&mcspi3_pins>;
256};
257
258&mcspi4 {
259 pinctrl-names = "default";
260 pinctrl-0 = <&mcspi4_pins>;
261};
diff --git a/arch/arm/boot/dts/omap5-uevm.dts b/arch/arm/boot/dts/omap5-uevm.dts
new file mode 100644
index 000000000000..65d7b601651c
--- /dev/null
+++ b/arch/arm/boot/dts/omap5-uevm.dts
@@ -0,0 +1,505 @@
1/*
2 * Copyright (C) 2013 Texas Instruments Incorporated - http://www.ti.com/
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/dts-v1/;
9
10#include "omap5.dtsi"
11#include <dt-bindings/interrupt-controller/irq.h>
12#include <dt-bindings/interrupt-controller/arm-gic.h>
13
14/ {
15 model = "TI OMAP5 uEVM board";
16 compatible = "ti,omap5-uevm", "ti,omap5";
17
18 memory {
19 device_type = "memory";
20 reg = <0x80000000 0x7F000000>; /* 2032 MB */
21 };
22
23 vmmcsd_fixed: fixedregulator-mmcsd {
24 compatible = "regulator-fixed";
25 regulator-name = "vmmcsd_fixed";
26 regulator-min-microvolt = <3000000>;
27 regulator-max-microvolt = <3000000>;
28 };
29
30 /* HS USB Port 2 RESET */
31 hsusb2_reset: hsusb2_reset_reg {
32 compatible = "regulator-fixed";
33 regulator-name = "hsusb2_reset";
34 regulator-min-microvolt = <3300000>;
35 regulator-max-microvolt = <3300000>;
36 gpio = <&gpio3 16 GPIO_ACTIVE_HIGH>; /* gpio3_80 HUB_NRESET */
37 startup-delay-us = <70000>;
38 enable-active-high;
39 };
40
41 /* HS USB Host PHY on PORT 2 */
42 hsusb2_phy: hsusb2_phy {
43 compatible = "usb-nop-xceiv";
44 reset-supply = <&hsusb2_reset>;
45 /**
46 * FIXME
47 * Put the right clock phandle here when available
48 * clocks = <&auxclk1>;
49 * clock-names = "main_clk";
50 */
51 clock-frequency = <19200000>;
52 };
53
54 /* HS USB Port 3 RESET */
55 hsusb3_reset: hsusb3_reset_reg {
56 compatible = "regulator-fixed";
57 regulator-name = "hsusb3_reset";
58 regulator-min-microvolt = <3300000>;
59 regulator-max-microvolt = <3300000>;
60 gpio = <&gpio3 15 GPIO_ACTIVE_HIGH>; /* gpio3_79 ETH_NRESET */
61 startup-delay-us = <70000>;
62 enable-active-high;
63 };
64
65 /* HS USB Host PHY on PORT 3 */
66 hsusb3_phy: hsusb3_phy {
67 compatible = "usb-nop-xceiv";
68 reset-supply = <&hsusb3_reset>;
69 };
70
71 leds {
72 compatible = "gpio-leds";
73 led@1 {
74 label = "omap5:blue:usr1";
75 gpios = <&gpio5 25 GPIO_ACTIVE_HIGH>; /* gpio5_153 D1 LED */
76 linux,default-trigger = "heartbeat";
77 default-state = "off";
78 };
79 };
80};
81
82&omap5_pmx_core {
83 pinctrl-names = "default";
84 pinctrl-0 = <
85 &twl6040_pins
86 &mcpdm_pins
87 &dmic_pins
88 &mcbsp1_pins
89 &mcbsp2_pins
90 &usbhost_pins
91 &led_gpio_pins
92 >;
93
94 twl6040_pins: pinmux_twl6040_pins {
95 pinctrl-single,pins = <
96 0x18a (PIN_OUTPUT | MUX_MODE6) /* perslimbus2_clock.gpio5_145 */
97 >;
98 };
99
100 mcpdm_pins: pinmux_mcpdm_pins {
101 pinctrl-single,pins = <
102 0x142 (PIN_INPUT_PULLDOWN | MUX_MODE0) /* abe_clks.abe_clks */
103 0x15c (PIN_INPUT_PULLDOWN | MUX_MODE0) /* abemcpdm_ul_data.abemcpdm_ul_data */
104 0x15e (PIN_INPUT_PULLDOWN | MUX_MODE0) /* abemcpdm_dl_data.abemcpdm_dl_data */
105 0x160 (PIN_INPUT_PULLUP | MUX_MODE0) /* abemcpdm_frame.abemcpdm_frame */
106 0x162 (PIN_INPUT_PULLDOWN | MUX_MODE0) /* abemcpdm_lb_clk.abemcpdm_lb_clk */
107 >;
108 };
109
110 dmic_pins: pinmux_dmic_pins {
111 pinctrl-single,pins = <
112 0x144 (PIN_INPUT | MUX_MODE0) /* abedmic_din1.abedmic_din1 */
113 0x146 (PIN_INPUT | MUX_MODE0) /* abedmic_din2.abedmic_din2 */
114 0x148 (PIN_INPUT | MUX_MODE0) /* abedmic_din3.abedmic_din3 */
115 0x14a (PIN_OUTPUT | MUX_MODE0) /* abedmic_clk1.abedmic_clk1 */
116 >;
117 };
118
119 mcbsp1_pins: pinmux_mcbsp1_pins {
120 pinctrl-single,pins = <
121 0x14c (PIN_INPUT | MUX_MODE1) /* abedmic_clk2.abemcbsp1_fsx */
122 0x14e (PIN_OUTPUT_PULLDOWN | MUX_MODE1) /* abedmic_clk3.abemcbsp1_dx */
123 0x150 (PIN_INPUT | MUX_MODE1) /* abeslimbus1_clock.abemcbsp1_clkx */
124 0x152 (PIN_INPUT_PULLDOWN | MUX_MODE1) /* abeslimbus1_data.abemcbsp1_dr */
125 >;
126 };
127
128 mcbsp2_pins: pinmux_mcbsp2_pins {
129 pinctrl-single,pins = <
130 0x154 (PIN_INPUT_PULLDOWN | MUX_MODE0) /* abemcbsp2_dr.abemcbsp2_dr */
131 0x156 (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* abemcbsp2_dx.abemcbsp2_dx */
132 0x158 (PIN_INPUT | MUX_MODE0) /* abemcbsp2_fsx.abemcbsp2_fsx */
133 0x15a (PIN_INPUT | MUX_MODE0) /* abemcbsp2_clkx.abemcbsp2_clkx */
134 >;
135 };
136
137 i2c1_pins: pinmux_i2c1_pins {
138 pinctrl-single,pins = <
139 0x1b2 (PIN_INPUT_PULLUP | MUX_MODE0) /* i2c1_scl */
140 0x1b4 (PIN_INPUT_PULLUP | MUX_MODE0) /* i2c1_sda */
141 >;
142 };
143
144 i2c5_pins: pinmux_i2c5_pins {
145 pinctrl-single,pins = <
146 0x184 (PIN_INPUT | MUX_MODE0) /* i2c5_scl */
147 0x186 (PIN_INPUT | MUX_MODE0) /* i2c5_sda */
148 >;
149 };
150
151 mcspi2_pins: pinmux_mcspi2_pins {
152 pinctrl-single,pins = <
153 0xbc (PIN_INPUT | MUX_MODE0) /* mcspi2_clk */
154 0xbe (PIN_INPUT | MUX_MODE0) /* mcspi2_simo */
155 0xc0 (PIN_INPUT_PULLUP | MUX_MODE0) /* mcspi2_somi */
156 0xc2 (PIN_OUTPUT | MUX_MODE0) /* mcspi2_cs */
157 >;
158 };
159
160 mcspi3_pins: pinmux_mcspi3_pins {
161 pinctrl-single,pins = <
162 0x78 (PIN_INPUT | MUX_MODE1) /* mcspi2_somi */
163 0x7a (PIN_INPUT | MUX_MODE1) /* mcspi2_cs */
164 0x7c (PIN_INPUT | MUX_MODE1) /* mcspi2_simo */
165 0x7e (PIN_INPUT | MUX_MODE1) /* mcspi2_clk */
166 >;
167 };
168
169 mcspi4_pins: pinmux_mcspi4_pins {
170 pinctrl-single,pins = <
171 0x164 (PIN_INPUT | MUX_MODE1) /* mcspi2_clk */
172 0x168 (PIN_INPUT | MUX_MODE1) /* mcspi2_simo */
173 0x16a (PIN_INPUT | MUX_MODE1) /* mcspi2_somi */
174 0x16c (PIN_INPUT | MUX_MODE1) /* mcspi2_cs */
175 >;
176 };
177
178 usbhost_pins: pinmux_usbhost_pins {
179 pinctrl-single,pins = <
180 0x84 (PIN_INPUT | MUX_MODE0) /* usbb2_hsic_strobe */
181 0x86 (PIN_INPUT | MUX_MODE0) /* usbb2_hsic_data */
182
183 0x19e (PIN_INPUT | MUX_MODE0) /* usbb3_hsic_strobe */
184 0x1a0 (PIN_INPUT | MUX_MODE0) /* usbb3_hsic_data */
185
186 0x70 (PIN_OUTPUT | MUX_MODE6) /* gpio3_80 HUB_NRESET */
187 0x6e (PIN_OUTPUT | MUX_MODE6) /* gpio3_79 ETH_NRESET */
188 >;
189 };
190
191 led_gpio_pins: pinmux_led_gpio_pins {
192 pinctrl-single,pins = <
193 0x196 (PIN_OUTPUT | MUX_MODE6) /* uart3_cts_rctx.gpio5_153 */
194 >;
195 };
196
197 uart1_pins: pinmux_uart1_pins {
198 pinctrl-single,pins = <
199 0x60 (PIN_OUTPUT | MUX_MODE0) /* uart1_tx.uart1_cts */
200 0x62 (PIN_INPUT_PULLUP | MUX_MODE0) /* uart1_tx.uart1_cts */
201 0x64 (PIN_INPUT_PULLUP | MUX_MODE0) /* uart1_rx.uart1_rts */
202 0x66 (PIN_OUTPUT | MUX_MODE0) /* uart1_rx.uart1_rts */
203 >;
204 };
205
206 uart3_pins: pinmux_uart3_pins {
207 pinctrl-single,pins = <
208 0x19a (PIN_OUTPUT | MUX_MODE0) /* uart3_rts_irsd.uart3_tx_irtx */
209 0x19c (PIN_INPUT_PULLUP | MUX_MODE0) /* uart3_rx_irrx.uart3_usbb3_hsic */
210 >;
211 };
212
213 uart5_pins: pinmux_uart5_pins {
214 pinctrl-single,pins = <
215 0x170 (PIN_INPUT_PULLUP | MUX_MODE0) /* uart5_rx.uart5_rx */
216 0x172 (PIN_OUTPUT | MUX_MODE0) /* uart5_tx.uart5_tx */
217 0x174 (PIN_INPUT_PULLUP | MUX_MODE0) /* uart5_cts.uart5_rts */
218 0x176 (PIN_OUTPUT | MUX_MODE0) /* uart5_cts.uart5_rts */
219 >;
220 };
221
222};
223
224&omap5_pmx_wkup {
225 pinctrl-names = "default";
226 pinctrl-0 = <
227 &usbhost_wkup_pins
228 >;
229
230 usbhost_wkup_pins: pinmux_usbhost_wkup_pins {
231 pinctrl-single,pins = <
232 0x1A (PIN_OUTPUT | MUX_MODE0) /* fref_clk1_out, USB hub clk */
233 >;
234 };
235};
236
237&mmc1 {
238 vmmc-supply = <&ldo9_reg>;
239 bus-width = <4>;
240};
241
242&mmc2 {
243 vmmc-supply = <&vmmcsd_fixed>;
244 bus-width = <8>;
245 ti,non-removable;
246};
247
248&mmc3 {
249 bus-width = <4>;
250 ti,non-removable;
251};
252
253&mmc4 {
254 status = "disabled";
255};
256
257&mmc5 {
258 status = "disabled";
259};
260
261&i2c1 {
262 pinctrl-names = "default";
263 pinctrl-0 = <&i2c1_pins>;
264
265 clock-frequency = <400000>;
266
267 palmas: palmas@48 {
268 compatible = "ti,palmas";
269 interrupts = <GIC_SPI 7 IRQ_TYPE_NONE>; /* IRQ_SYS_1N */
270 interrupt-parent = <&gic>;
271 reg = <0x48>;
272 interrupt-controller;
273 #interrupt-cells = <2>;
274
275 palmas_pmic {
276 compatible = "ti,palmas-pmic";
277 interrupt-parent = <&palmas>;
278 interrupts = <14 IRQ_TYPE_NONE>;
279 interrupt-name = "short-irq";
280
281 ti,ldo6-vibrator;
282
283 regulators {
284 smps123_reg: smps123 {
285 /* VDD_OPP_MPU */
286 regulator-name = "smps123";
287 regulator-min-microvolt = < 600000>;
288 regulator-max-microvolt = <1500000>;
289 regulator-always-on;
290 regulator-boot-on;
291 };
292
293 smps45_reg: smps45 {
294 /* VDD_OPP_MM */
295 regulator-name = "smps45";
296 regulator-min-microvolt = < 600000>;
297 regulator-max-microvolt = <1310000>;
298 regulator-always-on;
299 regulator-boot-on;
300 };
301
302 smps6_reg: smps6 {
303 /* VDD_DDR3 - over VDD_SMPS6 */
304 regulator-name = "smps6";
305 regulator-min-microvolt = <1200000>;
306 regulator-max-microvolt = <1200000>;
307 regulator-always-on;
308 regulator-boot-on;
309 };
310
311 smps7_reg: smps7 {
312 /* VDDS_1v8_OMAP over VDDS_1v8_MAIN */
313 regulator-name = "smps7";
314 regulator-min-microvolt = <1800000>;
315 regulator-max-microvolt = <1800000>;
316 regulator-always-on;
317 regulator-boot-on;
318 };
319
320 smps8_reg: smps8 {
321 /* VDD_OPP_CORE */
322 regulator-name = "smps8";
323 regulator-min-microvolt = < 600000>;
324 regulator-max-microvolt = <1310000>;
325 regulator-always-on;
326 regulator-boot-on;
327 };
328
329 smps9_reg: smps9 {
330 /* VDDA_2v1_AUD over VDD_2v1 */
331 regulator-name = "smps9";
332 regulator-min-microvolt = <2100000>;
333 regulator-max-microvolt = <2100000>;
334 ti,smps-range = <0x80>;
335 };
336
337 smps10_reg: smps10 {
338 /* VBUS_5V_OTG */
339 regulator-name = "smps10";
340 regulator-min-microvolt = <5000000>;
341 regulator-max-microvolt = <5000000>;
342 regulator-always-on;
343 regulator-boot-on;
344 };
345
346 ldo1_reg: ldo1 {
347 /* VDDAPHY_CAM: vdda_csiport */
348 regulator-name = "ldo1";
349 regulator-min-microvolt = <1500000>;
350 regulator-max-microvolt = <1800000>;
351 };
352
353 ldo2_reg: ldo2 {
354 /* VCC_2V8_DISP: Does not go anywhere */
355 regulator-name = "ldo2";
356 regulator-min-microvolt = <2800000>;
357 regulator-max-microvolt = <2800000>;
358 /* Unused */
359 status = "disabled";
360 };
361
362 ldo3_reg: ldo3 {
363 /* VDDAPHY_MDM: vdda_lli */
364 regulator-name = "ldo3";
365 regulator-min-microvolt = <1500000>;
366 regulator-max-microvolt = <1500000>;
367 regulator-boot-on;
368 /* Only if Modem is used */
369 status = "disabled";
370 };
371
372 ldo4_reg: ldo4 {
373 /* VDDAPHY_DISP: vdda_dsiport/hdmi */
374 regulator-name = "ldo4";
375 regulator-min-microvolt = <1500000>;
376 regulator-max-microvolt = <1800000>;
377 };
378
379 ldo5_reg: ldo5 {
380 /* VDDA_1V8_PHY: usb/sata/hdmi.. */
381 regulator-name = "ldo5";
382 regulator-min-microvolt = <1800000>;
383 regulator-max-microvolt = <1800000>;
384 regulator-always-on;
385 regulator-boot-on;
386 };
387
388 ldo6_reg: ldo6 {
389 /* VDDS_1V2_WKUP: hsic/ldo_emu_wkup */
390 regulator-name = "ldo6";
391 regulator-min-microvolt = <1200000>;
392 regulator-max-microvolt = <1200000>;
393 regulator-always-on;
394 regulator-boot-on;
395 };
396
397 ldo7_reg: ldo7 {
398 /* VDD_VPP: vpp1 */
399 regulator-name = "ldo7";
400 regulator-min-microvolt = <2000000>;
401 regulator-max-microvolt = <2000000>;
402 /* Only for efuse reprograming! */
403 status = "disabled";
404 };
405
406 ldo8_reg: ldo8 {
407 /* VDD_3v0: Does not go anywhere */
408 regulator-name = "ldo8";
409 regulator-min-microvolt = <3000000>;
410 regulator-max-microvolt = <3000000>;
411 regulator-boot-on;
412 /* Unused */
413 status = "disabled";
414 };
415
416 ldo9_reg: ldo9 {
417 /* VCC_DV_SDIO: vdds_sdcard */
418 regulator-name = "ldo9";
419 regulator-min-microvolt = <1800000>;
420 regulator-max-microvolt = <3000000>;
421 regulator-boot-on;
422 };
423
424 ldoln_reg: ldoln {
425 /* VDDA_1v8_REF: vdds_osc/mm_l4per.. */
426 regulator-name = "ldoln";
427 regulator-min-microvolt = <1800000>;
428 regulator-max-microvolt = <1800000>;
429 regulator-always-on;
430 regulator-boot-on;
431 };
432
433 ldousb_reg: ldousb {
434 /* VDDA_3V_USB: VDDA_USBHS33 */
435 regulator-name = "ldousb";
436 regulator-min-microvolt = <3250000>;
437 regulator-max-microvolt = <3250000>;
438 regulator-always-on;
439 regulator-boot-on;
440 };
441
442 regen3_reg: regen3 {
443 /* REGEN3 controls LDO9 supply to card */
444 regulator-name = "regen3";
445 regulator-always-on;
446 regulator-boot-on;
447 };
448 };
449 };
450 };
451};
452
453&i2c5 {
454 pinctrl-names = "default";
455 pinctrl-0 = <&i2c5_pins>;
456
457 clock-frequency = <400000>;
458};
459
460&mcbsp3 {
461 status = "disabled";
462};
463
464&usbhshost {
465 port2-mode = "ehci-hsic";
466 port3-mode = "ehci-hsic";
467};
468
469&usbhsehci {
470 phys = <0 &hsusb2_phy &hsusb3_phy>;
471};
472
473&mcspi1 {
474
475};
476
477&mcspi2 {
478 pinctrl-names = "default";
479 pinctrl-0 = <&mcspi2_pins>;
480};
481
482&mcspi3 {
483 pinctrl-names = "default";
484 pinctrl-0 = <&mcspi3_pins>;
485};
486
487&mcspi4 {
488 pinctrl-names = "default";
489 pinctrl-0 = <&mcspi4_pins>;
490};
491
492&uart1 {
493 pinctrl-names = "default";
494 pinctrl-0 = <&uart1_pins>;
495};
496
497&uart3 {
498 pinctrl-names = "default";
499 pinctrl-0 = <&uart3_pins>;
500};
501
502&uart5 {
503 pinctrl-names = "default";
504 pinctrl-0 = <&uart5_pins>;
505};
diff --git a/arch/arm/boot/dts/omap5.dtsi b/arch/arm/boot/dts/omap5.dtsi
index 635cae283011..e643620417a9 100644
--- a/arch/arm/boot/dts/omap5.dtsi
+++ b/arch/arm/boot/dts/omap5.dtsi
@@ -7,15 +7,11 @@
7 * Based on "omap4.dtsi" 7 * Based on "omap4.dtsi"
8 */ 8 */
9 9
10/* 10#include <dt-bindings/gpio/gpio.h>
11 * Carveout for multimedia usecases 11#include <dt-bindings/interrupt-controller/arm-gic.h>
12 * It should be the last 48MB of the first 512MB memory part 12#include <dt-bindings/pinctrl/omap.h>
13 * In theory, it should not even exist. That zone should be reserved
14 * dynamically during the .reserve callback.
15 */
16/memreserve/ 0x9d000000 0x03000000;
17 13
18/include/ "skeleton.dtsi" 14#include "skeleton.dtsi"
19 15
20/ { 16/ {
21 #address-cells = <1>; 17 #address-cells = <1>;
@@ -34,21 +30,28 @@
34 }; 30 };
35 31
36 cpus { 32 cpus {
33 #address-cells = <1>;
34 #size-cells = <0>;
35
37 cpu@0 { 36 cpu@0 {
37 device_type = "cpu";
38 compatible = "arm,cortex-a15"; 38 compatible = "arm,cortex-a15";
39 reg = <0x0>;
39 }; 40 };
40 cpu@1 { 41 cpu@1 {
42 device_type = "cpu";
41 compatible = "arm,cortex-a15"; 43 compatible = "arm,cortex-a15";
44 reg = <0x1>;
42 }; 45 };
43 }; 46 };
44 47
45 timer { 48 timer {
46 compatible = "arm,armv7-timer"; 49 compatible = "arm,armv7-timer";
47 /* PPI secure/nonsecure IRQ, active low level-sensitive */ 50 /* PPI secure/nonsecure IRQ */
48 interrupts = <1 13 0x308>, 51 interrupts = <GIC_PPI 13 (GIC_CPU_MASK_RAW(3) | IRQ_TYPE_LEVEL_LOW)>,
49 <1 14 0x308>, 52 <GIC_PPI 14 (GIC_CPU_MASK_RAW(3) | IRQ_TYPE_LEVEL_LOW)>,
50 <1 11 0x308>, 53 <GIC_PPI 11 (GIC_CPU_MASK_RAW(3) | IRQ_TYPE_LEVEL_LOW)>,
51 <1 10 0x308>; 54 <GIC_PPI 10 (GIC_CPU_MASK_RAW(3) | IRQ_TYPE_LEVEL_LOW)>;
52 clock-frequency = <6144000>; 55 clock-frequency = <6144000>;
53 }; 56 };
54 57
@@ -90,8 +93,8 @@
90 reg = <0x44000000 0x2000>, 93 reg = <0x44000000 0x2000>,
91 <0x44800000 0x3000>, 94 <0x44800000 0x3000>,
92 <0x45000000 0x4000>; 95 <0x45000000 0x4000>;
93 interrupts = <0 9 0x4>, 96 interrupts = <GIC_SPI 9 IRQ_TYPE_LEVEL_HIGH>,
94 <0 10 0x4>; 97 <GIC_SPI 10 IRQ_TYPE_LEVEL_HIGH>;
95 98
96 counter32k: counter@4ae04000 { 99 counter32k: counter@4ae04000 {
97 compatible = "ti,omap-counter32k"; 100 compatible = "ti,omap-counter32k";
@@ -119,10 +122,10 @@
119 sdma: dma-controller@4a056000 { 122 sdma: dma-controller@4a056000 {
120 compatible = "ti,omap4430-sdma"; 123 compatible = "ti,omap4430-sdma";
121 reg = <0x4a056000 0x1000>; 124 reg = <0x4a056000 0x1000>;
122 interrupts = <0 12 0x4>, 125 interrupts = <GIC_SPI 12 IRQ_TYPE_LEVEL_HIGH>,
123 <0 13 0x4>, 126 <GIC_SPI 13 IRQ_TYPE_LEVEL_HIGH>,
124 <0 14 0x4>, 127 <GIC_SPI 14 IRQ_TYPE_LEVEL_HIGH>,
125 <0 15 0x4>; 128 <GIC_SPI 15 IRQ_TYPE_LEVEL_HIGH>;
126 #dma-cells = <1>; 129 #dma-cells = <1>;
127 #dma-channels = <32>; 130 #dma-channels = <32>;
128 #dma-requests = <127>; 131 #dma-requests = <127>;
@@ -131,7 +134,7 @@
131 gpio1: gpio@4ae10000 { 134 gpio1: gpio@4ae10000 {
132 compatible = "ti,omap4-gpio"; 135 compatible = "ti,omap4-gpio";
133 reg = <0x4ae10000 0x200>; 136 reg = <0x4ae10000 0x200>;
134 interrupts = <0 29 0x4>; 137 interrupts = <GIC_SPI 29 IRQ_TYPE_LEVEL_HIGH>;
135 ti,hwmods = "gpio1"; 138 ti,hwmods = "gpio1";
136 ti,gpio-always-on; 139 ti,gpio-always-on;
137 gpio-controller; 140 gpio-controller;
@@ -143,7 +146,7 @@
143 gpio2: gpio@48055000 { 146 gpio2: gpio@48055000 {
144 compatible = "ti,omap4-gpio"; 147 compatible = "ti,omap4-gpio";
145 reg = <0x48055000 0x200>; 148 reg = <0x48055000 0x200>;
146 interrupts = <0 30 0x4>; 149 interrupts = <GIC_SPI 30 IRQ_TYPE_LEVEL_HIGH>;
147 ti,hwmods = "gpio2"; 150 ti,hwmods = "gpio2";
148 gpio-controller; 151 gpio-controller;
149 #gpio-cells = <2>; 152 #gpio-cells = <2>;
@@ -154,7 +157,7 @@
154 gpio3: gpio@48057000 { 157 gpio3: gpio@48057000 {
155 compatible = "ti,omap4-gpio"; 158 compatible = "ti,omap4-gpio";
156 reg = <0x48057000 0x200>; 159 reg = <0x48057000 0x200>;
157 interrupts = <0 31 0x4>; 160 interrupts = <GIC_SPI 31 IRQ_TYPE_LEVEL_HIGH>;
158 ti,hwmods = "gpio3"; 161 ti,hwmods = "gpio3";
159 gpio-controller; 162 gpio-controller;
160 #gpio-cells = <2>; 163 #gpio-cells = <2>;
@@ -165,7 +168,7 @@
165 gpio4: gpio@48059000 { 168 gpio4: gpio@48059000 {
166 compatible = "ti,omap4-gpio"; 169 compatible = "ti,omap4-gpio";
167 reg = <0x48059000 0x200>; 170 reg = <0x48059000 0x200>;
168 interrupts = <0 32 0x4>; 171 interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>;
169 ti,hwmods = "gpio4"; 172 ti,hwmods = "gpio4";
170 gpio-controller; 173 gpio-controller;
171 #gpio-cells = <2>; 174 #gpio-cells = <2>;
@@ -176,7 +179,7 @@
176 gpio5: gpio@4805b000 { 179 gpio5: gpio@4805b000 {
177 compatible = "ti,omap4-gpio"; 180 compatible = "ti,omap4-gpio";
178 reg = <0x4805b000 0x200>; 181 reg = <0x4805b000 0x200>;
179 interrupts = <0 33 0x4>; 182 interrupts = <GIC_SPI 33 IRQ_TYPE_LEVEL_HIGH>;
180 ti,hwmods = "gpio5"; 183 ti,hwmods = "gpio5";
181 gpio-controller; 184 gpio-controller;
182 #gpio-cells = <2>; 185 #gpio-cells = <2>;
@@ -187,7 +190,7 @@
187 gpio6: gpio@4805d000 { 190 gpio6: gpio@4805d000 {
188 compatible = "ti,omap4-gpio"; 191 compatible = "ti,omap4-gpio";
189 reg = <0x4805d000 0x200>; 192 reg = <0x4805d000 0x200>;
190 interrupts = <0 34 0x4>; 193 interrupts = <GIC_SPI 34 IRQ_TYPE_LEVEL_HIGH>;
191 ti,hwmods = "gpio6"; 194 ti,hwmods = "gpio6";
192 gpio-controller; 195 gpio-controller;
193 #gpio-cells = <2>; 196 #gpio-cells = <2>;
@@ -198,7 +201,7 @@
198 gpio7: gpio@48051000 { 201 gpio7: gpio@48051000 {
199 compatible = "ti,omap4-gpio"; 202 compatible = "ti,omap4-gpio";
200 reg = <0x48051000 0x200>; 203 reg = <0x48051000 0x200>;
201 interrupts = <0 35 0x4>; 204 interrupts = <GIC_SPI 35 IRQ_TYPE_LEVEL_HIGH>;
202 ti,hwmods = "gpio7"; 205 ti,hwmods = "gpio7";
203 gpio-controller; 206 gpio-controller;
204 #gpio-cells = <2>; 207 #gpio-cells = <2>;
@@ -209,7 +212,7 @@
209 gpio8: gpio@48053000 { 212 gpio8: gpio@48053000 {
210 compatible = "ti,omap4-gpio"; 213 compatible = "ti,omap4-gpio";
211 reg = <0x48053000 0x200>; 214 reg = <0x48053000 0x200>;
212 interrupts = <0 121 0x4>; 215 interrupts = <GIC_SPI 121 IRQ_TYPE_LEVEL_HIGH>;
213 ti,hwmods = "gpio8"; 216 ti,hwmods = "gpio8";
214 gpio-controller; 217 gpio-controller;
215 #gpio-cells = <2>; 218 #gpio-cells = <2>;
@@ -222,7 +225,7 @@
222 reg = <0x50000000 0x1000>; 225 reg = <0x50000000 0x1000>;
223 #address-cells = <2>; 226 #address-cells = <2>;
224 #size-cells = <1>; 227 #size-cells = <1>;
225 interrupts = <0 20 0x4>; 228 interrupts = <GIC_SPI 20 IRQ_TYPE_LEVEL_HIGH>;
226 gpmc,num-cs = <8>; 229 gpmc,num-cs = <8>;
227 gpmc,num-waitpins = <4>; 230 gpmc,num-waitpins = <4>;
228 ti,hwmods = "gpmc"; 231 ti,hwmods = "gpmc";
@@ -231,7 +234,7 @@
231 i2c1: i2c@48070000 { 234 i2c1: i2c@48070000 {
232 compatible = "ti,omap4-i2c"; 235 compatible = "ti,omap4-i2c";
233 reg = <0x48070000 0x100>; 236 reg = <0x48070000 0x100>;
234 interrupts = <0 56 0x4>; 237 interrupts = <GIC_SPI 56 IRQ_TYPE_LEVEL_HIGH>;
235 #address-cells = <1>; 238 #address-cells = <1>;
236 #size-cells = <0>; 239 #size-cells = <0>;
237 ti,hwmods = "i2c1"; 240 ti,hwmods = "i2c1";
@@ -240,7 +243,7 @@
240 i2c2: i2c@48072000 { 243 i2c2: i2c@48072000 {
241 compatible = "ti,omap4-i2c"; 244 compatible = "ti,omap4-i2c";
242 reg = <0x48072000 0x100>; 245 reg = <0x48072000 0x100>;
243 interrupts = <0 57 0x4>; 246 interrupts = <GIC_SPI 57 IRQ_TYPE_LEVEL_HIGH>;
244 #address-cells = <1>; 247 #address-cells = <1>;
245 #size-cells = <0>; 248 #size-cells = <0>;
246 ti,hwmods = "i2c2"; 249 ti,hwmods = "i2c2";
@@ -249,7 +252,7 @@
249 i2c3: i2c@48060000 { 252 i2c3: i2c@48060000 {
250 compatible = "ti,omap4-i2c"; 253 compatible = "ti,omap4-i2c";
251 reg = <0x48060000 0x100>; 254 reg = <0x48060000 0x100>;
252 interrupts = <0 61 0x4>; 255 interrupts = <GIC_SPI 61 IRQ_TYPE_LEVEL_HIGH>;
253 #address-cells = <1>; 256 #address-cells = <1>;
254 #size-cells = <0>; 257 #size-cells = <0>;
255 ti,hwmods = "i2c3"; 258 ti,hwmods = "i2c3";
@@ -258,7 +261,7 @@
258 i2c4: i2c@4807a000 { 261 i2c4: i2c@4807a000 {
259 compatible = "ti,omap4-i2c"; 262 compatible = "ti,omap4-i2c";
260 reg = <0x4807a000 0x100>; 263 reg = <0x4807a000 0x100>;
261 interrupts = <0 62 0x4>; 264 interrupts = <GIC_SPI 62 IRQ_TYPE_LEVEL_HIGH>;
262 #address-cells = <1>; 265 #address-cells = <1>;
263 #size-cells = <0>; 266 #size-cells = <0>;
264 ti,hwmods = "i2c4"; 267 ti,hwmods = "i2c4";
@@ -267,7 +270,7 @@
267 i2c5: i2c@4807c000 { 270 i2c5: i2c@4807c000 {
268 compatible = "ti,omap4-i2c"; 271 compatible = "ti,omap4-i2c";
269 reg = <0x4807c000 0x100>; 272 reg = <0x4807c000 0x100>;
270 interrupts = <0 60 0x4>; 273 interrupts = <GIC_SPI 60 IRQ_TYPE_LEVEL_HIGH>;
271 #address-cells = <1>; 274 #address-cells = <1>;
272 #size-cells = <0>; 275 #size-cells = <0>;
273 ti,hwmods = "i2c5"; 276 ti,hwmods = "i2c5";
@@ -276,7 +279,7 @@
276 mcspi1: spi@48098000 { 279 mcspi1: spi@48098000 {
277 compatible = "ti,omap4-mcspi"; 280 compatible = "ti,omap4-mcspi";
278 reg = <0x48098000 0x200>; 281 reg = <0x48098000 0x200>;
279 interrupts = <0 65 0x4>; 282 interrupts = <GIC_SPI 65 IRQ_TYPE_LEVEL_HIGH>;
280 #address-cells = <1>; 283 #address-cells = <1>;
281 #size-cells = <0>; 284 #size-cells = <0>;
282 ti,hwmods = "mcspi1"; 285 ti,hwmods = "mcspi1";
@@ -296,7 +299,7 @@
296 mcspi2: spi@4809a000 { 299 mcspi2: spi@4809a000 {
297 compatible = "ti,omap4-mcspi"; 300 compatible = "ti,omap4-mcspi";
298 reg = <0x4809a000 0x200>; 301 reg = <0x4809a000 0x200>;
299 interrupts = <0 66 0x4>; 302 interrupts = <GIC_SPI 66 IRQ_TYPE_LEVEL_HIGH>;
300 #address-cells = <1>; 303 #address-cells = <1>;
301 #size-cells = <0>; 304 #size-cells = <0>;
302 ti,hwmods = "mcspi2"; 305 ti,hwmods = "mcspi2";
@@ -311,7 +314,7 @@
311 mcspi3: spi@480b8000 { 314 mcspi3: spi@480b8000 {
312 compatible = "ti,omap4-mcspi"; 315 compatible = "ti,omap4-mcspi";
313 reg = <0x480b8000 0x200>; 316 reg = <0x480b8000 0x200>;
314 interrupts = <0 91 0x4>; 317 interrupts = <GIC_SPI 91 IRQ_TYPE_LEVEL_HIGH>;
315 #address-cells = <1>; 318 #address-cells = <1>;
316 #size-cells = <0>; 319 #size-cells = <0>;
317 ti,hwmods = "mcspi3"; 320 ti,hwmods = "mcspi3";
@@ -323,7 +326,7 @@
323 mcspi4: spi@480ba000 { 326 mcspi4: spi@480ba000 {
324 compatible = "ti,omap4-mcspi"; 327 compatible = "ti,omap4-mcspi";
325 reg = <0x480ba000 0x200>; 328 reg = <0x480ba000 0x200>;
326 interrupts = <0 48 0x4>; 329 interrupts = <GIC_SPI 48 IRQ_TYPE_LEVEL_HIGH>;
327 #address-cells = <1>; 330 #address-cells = <1>;
328 #size-cells = <0>; 331 #size-cells = <0>;
329 ti,hwmods = "mcspi4"; 332 ti,hwmods = "mcspi4";
@@ -335,7 +338,7 @@
335 uart1: serial@4806a000 { 338 uart1: serial@4806a000 {
336 compatible = "ti,omap4-uart"; 339 compatible = "ti,omap4-uart";
337 reg = <0x4806a000 0x100>; 340 reg = <0x4806a000 0x100>;
338 interrupts = <0 72 0x4>; 341 interrupts = <GIC_SPI 72 IRQ_TYPE_LEVEL_HIGH>;
339 ti,hwmods = "uart1"; 342 ti,hwmods = "uart1";
340 clock-frequency = <48000000>; 343 clock-frequency = <48000000>;
341 }; 344 };
@@ -343,7 +346,7 @@
343 uart2: serial@4806c000 { 346 uart2: serial@4806c000 {
344 compatible = "ti,omap4-uart"; 347 compatible = "ti,omap4-uart";
345 reg = <0x4806c000 0x100>; 348 reg = <0x4806c000 0x100>;
346 interrupts = <0 73 0x4>; 349 interrupts = <GIC_SPI 73 IRQ_TYPE_LEVEL_HIGH>;
347 ti,hwmods = "uart2"; 350 ti,hwmods = "uart2";
348 clock-frequency = <48000000>; 351 clock-frequency = <48000000>;
349 }; 352 };
@@ -351,7 +354,7 @@
351 uart3: serial@48020000 { 354 uart3: serial@48020000 {
352 compatible = "ti,omap4-uart"; 355 compatible = "ti,omap4-uart";
353 reg = <0x48020000 0x100>; 356 reg = <0x48020000 0x100>;
354 interrupts = <0 74 0x4>; 357 interrupts = <GIC_SPI 74 IRQ_TYPE_LEVEL_HIGH>;
355 ti,hwmods = "uart3"; 358 ti,hwmods = "uart3";
356 clock-frequency = <48000000>; 359 clock-frequency = <48000000>;
357 }; 360 };
@@ -359,7 +362,7 @@
359 uart4: serial@4806e000 { 362 uart4: serial@4806e000 {
360 compatible = "ti,omap4-uart"; 363 compatible = "ti,omap4-uart";
361 reg = <0x4806e000 0x100>; 364 reg = <0x4806e000 0x100>;
362 interrupts = <0 70 0x4>; 365 interrupts = <GIC_SPI 70 IRQ_TYPE_LEVEL_HIGH>;
363 ti,hwmods = "uart4"; 366 ti,hwmods = "uart4";
364 clock-frequency = <48000000>; 367 clock-frequency = <48000000>;
365 }; 368 };
@@ -367,7 +370,7 @@
367 uart5: serial@48066000 { 370 uart5: serial@48066000 {
368 compatible = "ti,omap4-uart"; 371 compatible = "ti,omap4-uart";
369 reg = <0x48066000 0x100>; 372 reg = <0x48066000 0x100>;
370 interrupts = <0 105 0x4>; 373 interrupts = <GIC_SPI 105 IRQ_TYPE_LEVEL_HIGH>;
371 ti,hwmods = "uart5"; 374 ti,hwmods = "uart5";
372 clock-frequency = <48000000>; 375 clock-frequency = <48000000>;
373 }; 376 };
@@ -375,7 +378,7 @@
375 uart6: serial@48068000 { 378 uart6: serial@48068000 {
376 compatible = "ti,omap4-uart"; 379 compatible = "ti,omap4-uart";
377 reg = <0x48068000 0x100>; 380 reg = <0x48068000 0x100>;
378 interrupts = <0 106 0x4>; 381 interrupts = <GIC_SPI 106 IRQ_TYPE_LEVEL_HIGH>;
379 ti,hwmods = "uart6"; 382 ti,hwmods = "uart6";
380 clock-frequency = <48000000>; 383 clock-frequency = <48000000>;
381 }; 384 };
@@ -383,7 +386,7 @@
383 mmc1: mmc@4809c000 { 386 mmc1: mmc@4809c000 {
384 compatible = "ti,omap4-hsmmc"; 387 compatible = "ti,omap4-hsmmc";
385 reg = <0x4809c000 0x400>; 388 reg = <0x4809c000 0x400>;
386 interrupts = <0 83 0x4>; 389 interrupts = <GIC_SPI 83 IRQ_TYPE_LEVEL_HIGH>;
387 ti,hwmods = "mmc1"; 390 ti,hwmods = "mmc1";
388 ti,dual-volt; 391 ti,dual-volt;
389 ti,needs-special-reset; 392 ti,needs-special-reset;
@@ -394,7 +397,7 @@
394 mmc2: mmc@480b4000 { 397 mmc2: mmc@480b4000 {
395 compatible = "ti,omap4-hsmmc"; 398 compatible = "ti,omap4-hsmmc";
396 reg = <0x480b4000 0x400>; 399 reg = <0x480b4000 0x400>;
397 interrupts = <0 86 0x4>; 400 interrupts = <GIC_SPI 86 IRQ_TYPE_LEVEL_HIGH>;
398 ti,hwmods = "mmc2"; 401 ti,hwmods = "mmc2";
399 ti,needs-special-reset; 402 ti,needs-special-reset;
400 dmas = <&sdma 47>, <&sdma 48>; 403 dmas = <&sdma 47>, <&sdma 48>;
@@ -404,7 +407,7 @@
404 mmc3: mmc@480ad000 { 407 mmc3: mmc@480ad000 {
405 compatible = "ti,omap4-hsmmc"; 408 compatible = "ti,omap4-hsmmc";
406 reg = <0x480ad000 0x400>; 409 reg = <0x480ad000 0x400>;
407 interrupts = <0 94 0x4>; 410 interrupts = <GIC_SPI 94 IRQ_TYPE_LEVEL_HIGH>;
408 ti,hwmods = "mmc3"; 411 ti,hwmods = "mmc3";
409 ti,needs-special-reset; 412 ti,needs-special-reset;
410 dmas = <&sdma 77>, <&sdma 78>; 413 dmas = <&sdma 77>, <&sdma 78>;
@@ -414,7 +417,7 @@
414 mmc4: mmc@480d1000 { 417 mmc4: mmc@480d1000 {
415 compatible = "ti,omap4-hsmmc"; 418 compatible = "ti,omap4-hsmmc";
416 reg = <0x480d1000 0x400>; 419 reg = <0x480d1000 0x400>;
417 interrupts = <0 96 0x4>; 420 interrupts = <GIC_SPI 96 IRQ_TYPE_LEVEL_HIGH>;
418 ti,hwmods = "mmc4"; 421 ti,hwmods = "mmc4";
419 ti,needs-special-reset; 422 ti,needs-special-reset;
420 dmas = <&sdma 57>, <&sdma 58>; 423 dmas = <&sdma 57>, <&sdma 58>;
@@ -424,7 +427,7 @@
424 mmc5: mmc@480d5000 { 427 mmc5: mmc@480d5000 {
425 compatible = "ti,omap4-hsmmc"; 428 compatible = "ti,omap4-hsmmc";
426 reg = <0x480d5000 0x400>; 429 reg = <0x480d5000 0x400>;
427 interrupts = <0 59 0x4>; 430 interrupts = <GIC_SPI 59 IRQ_TYPE_LEVEL_HIGH>;
428 ti,hwmods = "mmc5"; 431 ti,hwmods = "mmc5";
429 ti,needs-special-reset; 432 ti,needs-special-reset;
430 dmas = <&sdma 59>, <&sdma 60>; 433 dmas = <&sdma 59>, <&sdma 60>;
@@ -442,7 +445,7 @@
442 reg = <0x40132000 0x7f>, /* MPU private access */ 445 reg = <0x40132000 0x7f>, /* MPU private access */
443 <0x49032000 0x7f>; /* L3 Interconnect */ 446 <0x49032000 0x7f>; /* L3 Interconnect */
444 reg-names = "mpu", "dma"; 447 reg-names = "mpu", "dma";
445 interrupts = <0 112 0x4>; 448 interrupts = <GIC_SPI 112 IRQ_TYPE_LEVEL_HIGH>;
446 ti,hwmods = "mcpdm"; 449 ti,hwmods = "mcpdm";
447 dmas = <&sdma 65>, 450 dmas = <&sdma 65>,
448 <&sdma 66>; 451 <&sdma 66>;
@@ -454,7 +457,7 @@
454 reg = <0x4012e000 0x7f>, /* MPU private access */ 457 reg = <0x4012e000 0x7f>, /* MPU private access */
455 <0x4902e000 0x7f>; /* L3 Interconnect */ 458 <0x4902e000 0x7f>; /* L3 Interconnect */
456 reg-names = "mpu", "dma"; 459 reg-names = "mpu", "dma";
457 interrupts = <0 114 0x4>; 460 interrupts = <GIC_SPI 114 IRQ_TYPE_LEVEL_HIGH>;
458 ti,hwmods = "dmic"; 461 ti,hwmods = "dmic";
459 dmas = <&sdma 67>; 462 dmas = <&sdma 67>;
460 dma-names = "up_link"; 463 dma-names = "up_link";
@@ -465,7 +468,7 @@
465 reg = <0x40122000 0xff>, /* MPU private access */ 468 reg = <0x40122000 0xff>, /* MPU private access */
466 <0x49022000 0xff>; /* L3 Interconnect */ 469 <0x49022000 0xff>; /* L3 Interconnect */
467 reg-names = "mpu", "dma"; 470 reg-names = "mpu", "dma";
468 interrupts = <0 17 0x4>; 471 interrupts = <GIC_SPI 17 IRQ_TYPE_LEVEL_HIGH>;
469 interrupt-names = "common"; 472 interrupt-names = "common";
470 ti,buffer-size = <128>; 473 ti,buffer-size = <128>;
471 ti,hwmods = "mcbsp1"; 474 ti,hwmods = "mcbsp1";
@@ -479,7 +482,7 @@
479 reg = <0x40124000 0xff>, /* MPU private access */ 482 reg = <0x40124000 0xff>, /* MPU private access */
480 <0x49024000 0xff>; /* L3 Interconnect */ 483 <0x49024000 0xff>; /* L3 Interconnect */
481 reg-names = "mpu", "dma"; 484 reg-names = "mpu", "dma";
482 interrupts = <0 22 0x4>; 485 interrupts = <GIC_SPI 22 IRQ_TYPE_LEVEL_HIGH>;
483 interrupt-names = "common"; 486 interrupt-names = "common";
484 ti,buffer-size = <128>; 487 ti,buffer-size = <128>;
485 ti,hwmods = "mcbsp2"; 488 ti,hwmods = "mcbsp2";
@@ -493,7 +496,7 @@
493 reg = <0x40126000 0xff>, /* MPU private access */ 496 reg = <0x40126000 0xff>, /* MPU private access */
494 <0x49026000 0xff>; /* L3 Interconnect */ 497 <0x49026000 0xff>; /* L3 Interconnect */
495 reg-names = "mpu", "dma"; 498 reg-names = "mpu", "dma";
496 interrupts = <0 23 0x4>; 499 interrupts = <GIC_SPI 23 IRQ_TYPE_LEVEL_HIGH>;
497 interrupt-names = "common"; 500 interrupt-names = "common";
498 ti,buffer-size = <128>; 501 ti,buffer-size = <128>;
499 ti,hwmods = "mcbsp3"; 502 ti,hwmods = "mcbsp3";
@@ -505,7 +508,7 @@
505 timer1: timer@4ae18000 { 508 timer1: timer@4ae18000 {
506 compatible = "ti,omap5430-timer"; 509 compatible = "ti,omap5430-timer";
507 reg = <0x4ae18000 0x80>; 510 reg = <0x4ae18000 0x80>;
508 interrupts = <0 37 0x4>; 511 interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>;
509 ti,hwmods = "timer1"; 512 ti,hwmods = "timer1";
510 ti,timer-alwon; 513 ti,timer-alwon;
511 }; 514 };
@@ -513,21 +516,21 @@
513 timer2: timer@48032000 { 516 timer2: timer@48032000 {
514 compatible = "ti,omap5430-timer"; 517 compatible = "ti,omap5430-timer";
515 reg = <0x48032000 0x80>; 518 reg = <0x48032000 0x80>;
516 interrupts = <0 38 0x4>; 519 interrupts = <GIC_SPI 38 IRQ_TYPE_LEVEL_HIGH>;
517 ti,hwmods = "timer2"; 520 ti,hwmods = "timer2";
518 }; 521 };
519 522
520 timer3: timer@48034000 { 523 timer3: timer@48034000 {
521 compatible = "ti,omap5430-timer"; 524 compatible = "ti,omap5430-timer";
522 reg = <0x48034000 0x80>; 525 reg = <0x48034000 0x80>;
523 interrupts = <0 39 0x4>; 526 interrupts = <GIC_SPI 39 IRQ_TYPE_LEVEL_HIGH>;
524 ti,hwmods = "timer3"; 527 ti,hwmods = "timer3";
525 }; 528 };
526 529
527 timer4: timer@48036000 { 530 timer4: timer@48036000 {
528 compatible = "ti,omap5430-timer"; 531 compatible = "ti,omap5430-timer";
529 reg = <0x48036000 0x80>; 532 reg = <0x48036000 0x80>;
530 interrupts = <0 40 0x4>; 533 interrupts = <GIC_SPI 40 IRQ_TYPE_LEVEL_HIGH>;
531 ti,hwmods = "timer4"; 534 ti,hwmods = "timer4";
532 }; 535 };
533 536
@@ -535,7 +538,7 @@
535 compatible = "ti,omap5430-timer"; 538 compatible = "ti,omap5430-timer";
536 reg = <0x40138000 0x80>, 539 reg = <0x40138000 0x80>,
537 <0x49038000 0x80>; 540 <0x49038000 0x80>;
538 interrupts = <0 41 0x4>; 541 interrupts = <GIC_SPI 41 IRQ_TYPE_LEVEL_HIGH>;
539 ti,hwmods = "timer5"; 542 ti,hwmods = "timer5";
540 ti,timer-dsp; 543 ti,timer-dsp;
541 ti,timer-pwm; 544 ti,timer-pwm;
@@ -545,7 +548,7 @@
545 compatible = "ti,omap5430-timer"; 548 compatible = "ti,omap5430-timer";
546 reg = <0x4013a000 0x80>, 549 reg = <0x4013a000 0x80>,
547 <0x4903a000 0x80>; 550 <0x4903a000 0x80>;
548 interrupts = <0 42 0x4>; 551 interrupts = <GIC_SPI 42 IRQ_TYPE_LEVEL_HIGH>;
549 ti,hwmods = "timer6"; 552 ti,hwmods = "timer6";
550 ti,timer-dsp; 553 ti,timer-dsp;
551 ti,timer-pwm; 554 ti,timer-pwm;
@@ -555,7 +558,7 @@
555 compatible = "ti,omap5430-timer"; 558 compatible = "ti,omap5430-timer";
556 reg = <0x4013c000 0x80>, 559 reg = <0x4013c000 0x80>,
557 <0x4903c000 0x80>; 560 <0x4903c000 0x80>;
558 interrupts = <0 43 0x4>; 561 interrupts = <GIC_SPI 43 IRQ_TYPE_LEVEL_HIGH>;
559 ti,hwmods = "timer7"; 562 ti,hwmods = "timer7";
560 ti,timer-dsp; 563 ti,timer-dsp;
561 }; 564 };
@@ -564,7 +567,7 @@
564 compatible = "ti,omap5430-timer"; 567 compatible = "ti,omap5430-timer";
565 reg = <0x4013e000 0x80>, 568 reg = <0x4013e000 0x80>,
566 <0x4903e000 0x80>; 569 <0x4903e000 0x80>;
567 interrupts = <0 44 0x4>; 570 interrupts = <GIC_SPI 44 IRQ_TYPE_LEVEL_HIGH>;
568 ti,hwmods = "timer8"; 571 ti,hwmods = "timer8";
569 ti,timer-dsp; 572 ti,timer-dsp;
570 ti,timer-pwm; 573 ti,timer-pwm;
@@ -573,7 +576,7 @@
573 timer9: timer@4803e000 { 576 timer9: timer@4803e000 {
574 compatible = "ti,omap5430-timer"; 577 compatible = "ti,omap5430-timer";
575 reg = <0x4803e000 0x80>; 578 reg = <0x4803e000 0x80>;
576 interrupts = <0 45 0x4>; 579 interrupts = <GIC_SPI 45 IRQ_TYPE_LEVEL_HIGH>;
577 ti,hwmods = "timer9"; 580 ti,hwmods = "timer9";
578 ti,timer-pwm; 581 ti,timer-pwm;
579 }; 582 };
@@ -581,7 +584,7 @@
581 timer10: timer@48086000 { 584 timer10: timer@48086000 {
582 compatible = "ti,omap5430-timer"; 585 compatible = "ti,omap5430-timer";
583 reg = <0x48086000 0x80>; 586 reg = <0x48086000 0x80>;
584 interrupts = <0 46 0x4>; 587 interrupts = <GIC_SPI 46 IRQ_TYPE_LEVEL_HIGH>;
585 ti,hwmods = "timer10"; 588 ti,hwmods = "timer10";
586 ti,timer-pwm; 589 ti,timer-pwm;
587 }; 590 };
@@ -589,7 +592,7 @@
589 timer11: timer@48088000 { 592 timer11: timer@48088000 {
590 compatible = "ti,omap5430-timer"; 593 compatible = "ti,omap5430-timer";
591 reg = <0x48088000 0x80>; 594 reg = <0x48088000 0x80>;
592 interrupts = <0 47 0x4>; 595 interrupts = <GIC_SPI 47 IRQ_TYPE_LEVEL_HIGH>;
593 ti,hwmods = "timer11"; 596 ti,hwmods = "timer11";
594 ti,timer-pwm; 597 ti,timer-pwm;
595 }; 598 };
@@ -597,7 +600,7 @@
597 wdt2: wdt@4ae14000 { 600 wdt2: wdt@4ae14000 {
598 compatible = "ti,omap5-wdt", "ti,omap3-wdt"; 601 compatible = "ti,omap5-wdt", "ti,omap3-wdt";
599 reg = <0x4ae14000 0x80>; 602 reg = <0x4ae14000 0x80>;
600 interrupts = <0 80 0x4>; 603 interrupts = <GIC_SPI 80 IRQ_TYPE_LEVEL_HIGH>;
601 ti,hwmods = "wd_timer2"; 604 ti,hwmods = "wd_timer2";
602 }; 605 };
603 606
@@ -606,7 +609,7 @@
606 ti,hwmods = "emif1"; 609 ti,hwmods = "emif1";
607 phy-type = <2>; /* DDR PHY type: Intelli PHY */ 610 phy-type = <2>; /* DDR PHY type: Intelli PHY */
608 reg = <0x4c000000 0x400>; 611 reg = <0x4c000000 0x400>;
609 interrupts = <0 110 0x4>; 612 interrupts = <GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH>;
610 hw-caps-read-idle-ctrl; 613 hw-caps-read-idle-ctrl;
611 hw-caps-ll-interface; 614 hw-caps-ll-interface;
612 hw-caps-temp-alert; 615 hw-caps-temp-alert;
@@ -617,7 +620,7 @@
617 ti,hwmods = "emif2"; 620 ti,hwmods = "emif2";
618 phy-type = <2>; /* DDR PHY type: Intelli PHY */ 621 phy-type = <2>; /* DDR PHY type: Intelli PHY */
619 reg = <0x4d000000 0x400>; 622 reg = <0x4d000000 0x400>;
620 interrupts = <0 111 0x4>; 623 interrupts = <GIC_SPI 111 IRQ_TYPE_LEVEL_HIGH>;
621 hw-caps-read-idle-ctrl; 624 hw-caps-read-idle-ctrl;
622 hw-caps-ll-interface; 625 hw-caps-ll-interface;
623 hw-caps-temp-alert; 626 hw-caps-temp-alert;
@@ -635,7 +638,7 @@
635 compatible = "ti,dwc3"; 638 compatible = "ti,dwc3";
636 ti,hwmods = "usb_otg_ss"; 639 ti,hwmods = "usb_otg_ss";
637 reg = <0x4a020000 0x1000>; 640 reg = <0x4a020000 0x1000>;
638 interrupts = <0 93 4>; 641 interrupts = <GIC_SPI 93 IRQ_TYPE_LEVEL_HIGH>;
639 #address-cells = <1>; 642 #address-cells = <1>;
640 #size-cells = <1>; 643 #size-cells = <1>;
641 utmi-mode = <2>; 644 utmi-mode = <2>;
@@ -643,7 +646,7 @@
643 dwc3@4a030000 { 646 dwc3@4a030000 {
644 compatible = "synopsys,dwc3"; 647 compatible = "synopsys,dwc3";
645 reg = <0x4a030000 0x1000>; 648 reg = <0x4a030000 0x1000>;
646 interrupts = <0 92 4>; 649 interrupts = <GIC_SPI 92 IRQ_TYPE_LEVEL_HIGH>;
647 usb-phy = <&usb2_phy>, <&usb3_phy>; 650 usb-phy = <&usb2_phy>, <&usb3_phy>;
648 tx-fifo-resize; 651 tx-fifo-resize;
649 }; 652 };
@@ -670,5 +673,44 @@
670 ctrl-module = <&omap_control_usb>; 673 ctrl-module = <&omap_control_usb>;
671 }; 674 };
672 }; 675 };
676
677 usbhstll: usbhstll@4a062000 {
678 compatible = "ti,usbhs-tll";
679 reg = <0x4a062000 0x1000>;
680 interrupts = <GIC_SPI 78 IRQ_TYPE_LEVEL_HIGH>;
681 ti,hwmods = "usb_tll_hs";
682 };
683
684 usbhshost: usbhshost@4a064000 {
685 compatible = "ti,usbhs-host";
686 reg = <0x4a064000 0x800>;
687 ti,hwmods = "usb_host_hs";
688 #address-cells = <1>;
689 #size-cells = <1>;
690 ranges;
691
692 usbhsohci: ohci@4a064800 {
693 compatible = "ti,ohci-omap3", "usb-ohci";
694 reg = <0x4a064800 0x400>;
695 interrupt-parent = <&gic>;
696 interrupts = <GIC_SPI 76 IRQ_TYPE_LEVEL_HIGH>;
697 };
698
699 usbhsehci: ehci@4a064c00 {
700 compatible = "ti,ehci-omap", "usb-ehci";
701 reg = <0x4a064c00 0x400>;
702 interrupt-parent = <&gic>;
703 interrupts = <GIC_SPI 77 IRQ_TYPE_LEVEL_HIGH>;
704 };
705 };
706
707 bandgap@4a0021e0 {
708 reg = <0x4a0021e0 0xc
709 0x4a00232c 0xc
710 0x4a002380 0x2c
711 0x4a0023C0 0x3c>;
712 interrupts = <GIC_SPI 126 IRQ_TYPE_LEVEL_HIGH>;
713 compatible = "ti,omap5430-bandgap";
714 };
673 }; 715 };
674}; 716};
diff --git a/arch/arm/boot/dts/picoxcell-pc3x2.dtsi b/arch/arm/boot/dts/picoxcell-pc3x2.dtsi
index f0a8c2068ea7..533919e96eae 100644
--- a/arch/arm/boot/dts/picoxcell-pc3x2.dtsi
+++ b/arch/arm/boot/dts/picoxcell-pc3x2.dtsi
@@ -18,13 +18,13 @@
18 #size-cells = <1>; 18 #size-cells = <1>;
19 19
20 cpus { 20 cpus {
21 #address-cells = <1>; 21 #address-cells = <0>;
22 #size-cells = <0>; 22 #size-cells = <0>;
23 23
24 cpu@0 { 24 cpu {
25 compatible = "arm,1176jz-s"; 25 compatible = "arm,arm1176jz-s";
26 device_type = "cpu";
26 clock-frequency = <400000000>; 27 clock-frequency = <400000000>;
27 reg = <0>;
28 d-cache-line-size = <32>; 28 d-cache-line-size = <32>;
29 d-cache-size = <32768>; 29 d-cache-size = <32768>;
30 i-cache-line-size = <32>; 30 i-cache-line-size = <32>;
diff --git a/arch/arm/boot/dts/picoxcell-pc3x3.dtsi b/arch/arm/boot/dts/picoxcell-pc3x3.dtsi
index daa962d191e6..ab3e80085511 100644
--- a/arch/arm/boot/dts/picoxcell-pc3x3.dtsi
+++ b/arch/arm/boot/dts/picoxcell-pc3x3.dtsi
@@ -18,13 +18,13 @@
18 #size-cells = <1>; 18 #size-cells = <1>;
19 19
20 cpus { 20 cpus {
21 #address-cells = <1>; 21 #address-cells = <0>;
22 #size-cells = <0>; 22 #size-cells = <0>;
23 23
24 cpu@0 { 24 cpu {
25 compatible = "arm,1176jz-s"; 25 compatible = "arm,arm1176jz-s";
26 device_type = "cpu";
26 cpu-clock = <&arm_clk>, "cpu"; 27 cpu-clock = <&arm_clk>, "cpu";
27 reg = <0>;
28 d-cache-line-size = <32>; 28 d-cache-line-size = <32>;
29 d-cache-size = <32768>; 29 d-cache-size = <32768>;
30 i-cache-line-size = <32>; 30 i-cache-line-size = <32>;
diff --git a/arch/arm/boot/dts/pm9g45.dts b/arch/arm/boot/dts/pm9g45.dts
index 387fedb58988..33ffabe9c4c8 100644
--- a/arch/arm/boot/dts/pm9g45.dts
+++ b/arch/arm/boot/dts/pm9g45.dts
@@ -6,7 +6,7 @@
6 * Licensed under GPLv2. 6 * Licensed under GPLv2.
7 */ 7 */
8/dts-v1/; 8/dts-v1/;
9/include/ "at91sam9g45.dtsi" 9#include "at91sam9g45.dtsi"
10 10
11/ { 11/ {
12 model = "Ronetix pm9g45"; 12 model = "Ronetix pm9g45";
@@ -42,15 +42,15 @@
42 board { 42 board {
43 pinctrl_board_nand: nand0-board { 43 pinctrl_board_nand: nand0-board {
44 atmel,pins = 44 atmel,pins =
45 <3 3 0x0 0x1 /* PD3 gpio RDY pin pull_up*/ 45 <AT91_PIOD 3 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP /* PD3 gpio RDY pin pull_up*/
46 2 14 0x0 0x1>; /* PC14 gpio enable pin pull_up */ 46 AT91_PIOC 14 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP>; /* PC14 gpio enable pin pull_up */
47 }; 47 };
48 }; 48 };
49 49
50 mmc { 50 mmc {
51 pinctrl_board_mmc: mmc0-board { 51 pinctrl_board_mmc: mmc0-board {
52 atmel,pins = 52 atmel,pins =
53 <3 6 0x0 0x5>; /* PD6 gpio CD pin pull_up and deglitch */ 53 <AT91_PIOD 6 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP_DEGLITCH>; /* PD6 gpio CD pin pull_up and deglitch */
54 }; 54 };
55 }; 55 };
56 }; 56 };
@@ -64,7 +64,7 @@
64 slot@0 { 64 slot@0 {
65 reg = <0>; 65 reg = <0>;
66 bus-width = <4>; 66 bus-width = <4>;
67 cd-gpios = <&pioD 6 0>; 67 cd-gpios = <&pioD 6 GPIO_ACTIVE_HIGH>;
68 }; 68 };
69 }; 69 };
70 70
@@ -81,8 +81,8 @@
81 nand-on-flash-bbt; 81 nand-on-flash-bbt;
82 pinctrl-0 = <&pinctrl_board_nand>; 82 pinctrl-0 = <&pinctrl_board_nand>;
83 83
84 gpios = <&pioD 3 0 84 gpios = <&pioD 3 GPIO_ACTIVE_HIGH
85 &pioC 14 0 85 &pioC 14 GPIO_ACTIVE_HIGH
86 0 86 0
87 >; 87 >;
88 88
@@ -134,13 +134,13 @@
134 134
135 led0 { 135 led0 {
136 label = "led0"; 136 label = "led0";
137 gpios = <&pioD 0 1>; 137 gpios = <&pioD 0 GPIO_ACTIVE_LOW>;
138 linux,default-trigger = "nand-disk"; 138 linux,default-trigger = "nand-disk";
139 }; 139 };
140 140
141 led1 { 141 led1 {
142 label = "led1"; 142 label = "led1";
143 gpios = <&pioD 31 0>; 143 gpios = <&pioD 31 GPIO_ACTIVE_HIGH>;
144 linux,default-trigger = "heartbeat"; 144 linux,default-trigger = "heartbeat";
145 }; 145 };
146 }; 146 };
@@ -152,13 +152,13 @@
152 152
153 right { 153 right {
154 label = "SW4"; 154 label = "SW4";
155 gpios = <&pioE 7 1>; 155 gpios = <&pioE 7 GPIO_ACTIVE_LOW>;
156 linux,code = <106>; 156 linux,code = <106>;
157 }; 157 };
158 158
159 up { 159 up {
160 label = "SW3"; 160 label = "SW3";
161 gpios = <&pioE 8 1>; 161 gpios = <&pioE 8 GPIO_ACTIVE_LOW>;
162 linux,code = <103>; 162 linux,code = <103>;
163 }; 163 };
164 }; 164 };
diff --git a/arch/arm/boot/dts/prima2.dtsi b/arch/arm/boot/dts/prima2.dtsi
index 3329719a9412..bbeb623fc2c6 100644
--- a/arch/arm/boot/dts/prima2.dtsi
+++ b/arch/arm/boot/dts/prima2.dtsi
@@ -18,6 +18,8 @@
18 #size-cells = <0>; 18 #size-cells = <0>;
19 19
20 cpu@0 { 20 cpu@0 {
21 compatible = "arm,cortex-a9";
22 device_type = "cpu";
21 reg = <0x0>; 23 reg = <0x0>;
22 d-cache-line-size = <32>; 24 d-cache-line-size = <32>;
23 i-cache-line-size = <32>; 25 i-cache-line-size = <32>;
@@ -513,16 +515,16 @@
513 sirf,function = "pulse_count"; 515 sirf,function = "pulse_count";
514 }; 516 };
515 }; 517 };
516 cko0_rst_pins_a: cko0_rst@0 { 518 cko0_pins_a: cko0@0 {
517 cko0_rst { 519 cko0 {
518 sirf,pins = "cko0_rstgrp"; 520 sirf,pins = "cko0grp";
519 sirf,function = "cko0_rst"; 521 sirf,function = "cko0";
520 }; 522 };
521 }; 523 };
522 cko1_rst_pins_a: cko1_rst@0 { 524 cko1_pins_a: cko1@0 {
523 cko1_rst { 525 cko1 {
524 sirf,pins = "cko1_rstgrp"; 526 sirf,pins = "cko1grp";
525 sirf,function = "cko1_rst"; 527 sirf,function = "cko1";
526 }; 528 };
527 }; 529 };
528 }; 530 };
@@ -608,7 +610,7 @@
608 }; 610 };
609 611
610 rtc-iobg { 612 rtc-iobg {
611 compatible = "sirf,prima2-rtciobg", "sirf-prima2-rtciobg-bus"; 613 compatible = "sirf,prima2-rtciobg", "sirf-prima2-rtciobg-bus", "simple-bus";
612 #address-cells = <1>; 614 #address-cells = <1>;
613 #size-cells = <1>; 615 #size-cells = <1>;
614 reg = <0x80030000 0x10000>; 616 reg = <0x80030000 0x10000>;
diff --git a/arch/arm/boot/dts/pxa2xx.dtsi b/arch/arm/boot/dts/pxa2xx.dtsi
index f18aad35e8b3..a5e90f078aa9 100644
--- a/arch/arm/boot/dts/pxa2xx.dtsi
+++ b/arch/arm/boot/dts/pxa2xx.dtsi
@@ -23,8 +23,11 @@
23 }; 23 };
24 24
25 cpus { 25 cpus {
26 cpu@0 { 26 #address-cells = <0>;
27 compatible = "arm,xscale"; 27 #size-cells = <0>;
28 cpu {
29 compatible = "marvell,xscale";
30 device_type = "cpu";
28 }; 31 };
29 }; 32 };
30 33
diff --git a/arch/arm/boot/dts/r8a73a4.dtsi b/arch/arm/boot/dts/r8a73a4.dtsi
index fde2a337d1ff..4ff2019c0e30 100644
--- a/arch/arm/boot/dts/r8a73a4.dtsi
+++ b/arch/arm/boot/dts/r8a73a4.dtsi
@@ -37,12 +37,6 @@
37 <0 0xf1004000 0 0x2000>, 37 <0 0xf1004000 0 0x2000>,
38 <0 0xf1006000 0 0x2000>; 38 <0 0xf1006000 0 0x2000>;
39 interrupts = <1 9 0xf04>; 39 interrupts = <1 9 0xf04>;
40
41 gic-cpuif@4 {
42 compatible = "arm,gic-cpuif";
43 cpuif-id = <4>;
44 cpu = <&cpu0>;
45 };
46 }; 40 };
47 41
48 timer { 42 timer {
diff --git a/arch/arm/boot/dts/r8a7740-armadillo800eva-reference.dts b/arch/arm/boot/dts/r8a7740-armadillo800eva-reference.dts
new file mode 100644
index 000000000000..09ea22c26359
--- /dev/null
+++ b/arch/arm/boot/dts/r8a7740-armadillo800eva-reference.dts
@@ -0,0 +1,45 @@
1/*
2 * Reference Device Tree Source for the armadillo 800 eva board
3 *
4 * Copyright (C) 2012 Renesas Solutions Corp.
5 *
6 * This file is licensed under the terms of the GNU General Public License
7 * version 2. This program is licensed "as is" without any warranty of any
8 * kind, whether express or implied.
9 */
10
11/dts-v1/;
12/include/ "r8a7740.dtsi"
13
14/ {
15 model = "armadillo 800 eva reference";
16 compatible = "renesas,armadillo800eva-reference", "renesas,r8a7740";
17
18 chosen {
19 bootargs = "console=tty0 console=ttySC1,115200 earlyprintk=sh-sci.1,115200 ignore_loglevel root=/dev/nfs ip=dhcp nfsroot=,rsize=4096,wsize=4096 rw";
20 };
21
22 memory {
23 device_type = "memory";
24 reg = <0x40000000 0x20000000>;
25 };
26
27 reg_3p3v: regulator@0 {
28 compatible = "regulator-fixed";
29 regulator-name = "fixed-3.3V";
30 regulator-min-microvolt = <3300000>;
31 regulator-max-microvolt = <3300000>;
32 regulator-always-on;
33 regulator-boot-on;
34 };
35
36};
37
38&i2c0 {
39 touchscreen: st1232@55 {
40 compatible = "sitronix,st1232";
41 reg = <0x55>;
42 interrupt-parent = <&irqpin1>;
43 interrupts = <2 0>; /* IRQ10: hwirq 2 on irqpin1 */
44 };
45};
diff --git a/arch/arm/boot/dts/r8a7740.dtsi b/arch/arm/boot/dts/r8a7740.dtsi
index 798fa35c0005..24e930643821 100644
--- a/arch/arm/boot/dts/r8a7740.dtsi
+++ b/arch/arm/boot/dts/r8a7740.dtsi
@@ -14,8 +14,129 @@
14 compatible = "renesas,r8a7740"; 14 compatible = "renesas,r8a7740";
15 15
16 cpus { 16 cpus {
17 #address-cells = <1>;
18 #size-cells = <0>;
17 cpu@0 { 19 cpu@0 {
18 compatible = "arm,cortex-a9"; 20 compatible = "arm,cortex-a9";
21 device_type = "cpu";
22 reg = <0x0>;
19 }; 23 };
20 }; 24 };
25
26 gic: interrupt-controller@c2800000 {
27 compatible = "arm,cortex-a9-gic";
28 #interrupt-cells = <3>;
29 #address-cells = <1>;
30 interrupt-controller;
31 reg = <0xc2800000 0x1000>,
32 <0xc2000000 0x1000>;
33 };
34
35 /* irqpin0: IRQ0 - IRQ7 */
36 irqpin0: irqpin@e6900000 {
37 compatible = "renesas,intc-irqpin";
38 #interrupt-cells = <2>;
39 interrupt-controller;
40 reg = <0xe6900000 4>,
41 <0xe6900010 4>,
42 <0xe6900020 1>,
43 <0xe6900040 1>,
44 <0xe6900060 1>;
45 interrupt-parent = <&gic>;
46 interrupts = <0 149 0x4
47 0 149 0x4
48 0 149 0x4
49 0 149 0x4
50 0 149 0x4
51 0 149 0x4
52 0 149 0x4
53 0 149 0x4>;
54 };
55
56 /* irqpin1: IRQ8 - IRQ15 */
57 irqpin1: irqpin@e6900004 {
58 compatible = "renesas,intc-irqpin";
59 #interrupt-cells = <2>;
60 interrupt-controller;
61 reg = <0xe6900004 4>,
62 <0xe6900014 4>,
63 <0xe6900024 1>,
64 <0xe6900044 1>,
65 <0xe6900064 1>;
66 interrupt-parent = <&gic>;
67 interrupts = <0 149 0x4
68 0 149 0x4
69 0 149 0x4
70 0 149 0x4
71 0 149 0x4
72 0 149 0x4
73 0 149 0x4
74 0 149 0x4>;
75 };
76
77 /* irqpin2: IRQ16 - IRQ23 */
78 irqpin2: irqpin@e6900008 {
79 compatible = "renesas,intc-irqpin";
80 #interrupt-cells = <2>;
81 interrupt-controller;
82 reg = <0xe6900008 4>,
83 <0xe6900018 4>,
84 <0xe6900028 1>,
85 <0xe6900048 1>,
86 <0xe6900068 1>;
87 interrupt-parent = <&gic>;
88 interrupts = <0 149 0x4
89 0 149 0x4
90 0 149 0x4
91 0 149 0x4
92 0 149 0x4
93 0 149 0x4
94 0 149 0x4
95 0 149 0x4>;
96 };
97
98 /* irqpin3: IRQ24 - IRQ31 */
99 irqpin3: irqpin@e690000c {
100 compatible = "renesas,intc-irqpin";
101 #interrupt-cells = <2>;
102 interrupt-controller;
103 reg = <0xe690000c 4>,
104 <0xe690001c 4>,
105 <0xe690002c 1>,
106 <0xe690004c 1>,
107 <0xe690006c 1>;
108 interrupt-parent = <&gic>;
109 interrupts = <0 149 0x4
110 0 149 0x4
111 0 149 0x4
112 0 149 0x4
113 0 149 0x4
114 0 149 0x4
115 0 149 0x4
116 0 149 0x4>;
117 };
118
119 i2c0: i2c@fff20000 {
120 #address-cells = <1>;
121 #size-cells = <0>;
122 compatible = "renesas,rmobile-iic";
123 reg = <0xfff20000 0x425>;
124 interrupt-parent = <&gic>;
125 interrupts = <0 201 0x4
126 0 202 0x4
127 0 203 0x4
128 0 204 0x4>;
129 };
130
131 i2c1: i2c@e6c20000 {
132 #address-cells = <1>;
133 #size-cells = <0>;
134 compatible = "renesas,rmobile-iic";
135 reg = <0xe6c20000 0x425>;
136 interrupt-parent = <&gic>;
137 interrupts = <0 70 0x4
138 0 71 0x4
139 0 72 0x4
140 0 73 0x4>;
141 };
21}; 142};
diff --git a/arch/arm/boot/dts/r8a7779.dtsi b/arch/arm/boot/dts/r8a7779.dtsi
index fe5c6f213271..7f146c6bf756 100644
--- a/arch/arm/boot/dts/r8a7779.dtsi
+++ b/arch/arm/boot/dts/r8a7779.dtsi
@@ -48,6 +48,23 @@
48 <0xf0000100 0x100>; 48 <0xf0000100 0x100>;
49 }; 49 };
50 50
51 irqpin0: irqpin@fe780010 {
52 compatible = "renesas,intc-irqpin";
53 #interrupt-cells = <2>;
54 interrupt-controller;
55 reg = <0xfe78001c 4>,
56 <0xfe780010 4>,
57 <0xfe780024 4>,
58 <0xfe780044 4>,
59 <0xfe780064 4>;
60 interrupt-parent = <&gic>;
61 interrupts = <0 27 0x4
62 0 28 0x4
63 0 29 0x4
64 0 30 0x4>;
65 sense-bitfield-width = <2>;
66 };
67
51 i2c0: i2c@0xffc70000 { 68 i2c0: i2c@0xffc70000 {
52 #address-cells = <1>; 69 #address-cells = <1>;
53 #size-cells = <0>; 70 #size-cells = <0>;
diff --git a/arch/arm/boot/dts/r8a7790.dtsi b/arch/arm/boot/dts/r8a7790.dtsi
index 7a1711027e41..339d9b11721c 100644
--- a/arch/arm/boot/dts/r8a7790.dtsi
+++ b/arch/arm/boot/dts/r8a7790.dtsi
@@ -36,12 +36,6 @@
36 <0 0xf1004000 0 0x2000>, 36 <0 0xf1004000 0 0x2000>,
37 <0 0xf1006000 0 0x2000>; 37 <0 0xf1006000 0 0x2000>;
38 interrupts = <1 9 0xf04>; 38 interrupts = <1 9 0xf04>;
39
40 gic-cpuif@4 {
41 compatible = "arm,gic-cpuif";
42 cpuif-id = <4>;
43 cpu = <&cpu0>;
44 };
45 }; 39 };
46 40
47 timer { 41 timer {
diff --git a/arch/arm/boot/dts/rk3066a-clocks.dtsi b/arch/arm/boot/dts/rk3066a-clocks.dtsi
new file mode 100644
index 000000000000..6e307fc4c451
--- /dev/null
+++ b/arch/arm/boot/dts/rk3066a-clocks.dtsi
@@ -0,0 +1,299 @@
1/*
2 * Copyright (c) 2013 MundoReader S.L.
3 * Author: Heiko Stuebner <heiko@sntech.de>
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 */
15
16/ {
17 clocks {
18 #address-cells = <1>;
19 #size-cells = <1>;
20 ranges;
21
22 /*
23 * This is a dummy clock, to be used as placeholder on
24 * other mux clocks when a specific parent clock is not
25 * yet implemented. It should be dropped when the driver
26 * is complete.
27 */
28 dummy: dummy {
29 compatible = "fixed-clock";
30 clock-frequency = <0>;
31 #clock-cells = <0>;
32 };
33
34 xin24m: xin24m {
35 compatible = "fixed-clock";
36 clock-frequency = <24000000>;
37 #clock-cells = <0>;
38 };
39
40 dummy48m: dummy48m {
41 compatible = "fixed-clock";
42 clock-frequency = <48000000>;
43 #clock-cells = <0>;
44 };
45
46 dummy150m: dummy150m {
47 compatible = "fixed-clock";
48 clock-frequency = <150000000>;
49 #clock-cells = <0>;
50 };
51
52 clk_gates0: gate-clk@200000d0 {
53 compatible = "rockchip,rk2928-gate-clk";
54 reg = <0x200000d0 0x4>;
55 clocks = <&dummy>, <&dummy>,
56 <&dummy>, <&dummy>,
57 <&dummy>, <&dummy>,
58 <&dummy>, <&dummy>,
59 <&dummy>, <&dummy>,
60 <&dummy>, <&dummy>,
61 <&dummy>, <&dummy>,
62 <&dummy>, <&dummy>;
63
64 clock-output-names =
65 "gate_core_periph", "gate_cpu_gpll",
66 "gate_ddrphy", "gate_aclk_cpu",
67 "gate_hclk_cpu", "gate_pclk_cpu",
68 "gate_atclk_cpu", "gate_i2s0",
69 "gate_i2s0_frac", "gate_i2s1",
70 "gate_i2s1_frac", "gate_i2s2",
71 "gate_i2s2_frac", "gate_spdif",
72 "gate_spdif_frac", "gate_testclk";
73
74 #clock-cells = <1>;
75 };
76
77 clk_gates1: gate-clk@200000d4 {
78 compatible = "rockchip,rk2928-gate-clk";
79 reg = <0x200000d4 0x4>;
80 clocks = <&xin24m>, <&xin24m>,
81 <&xin24m>, <&dummy>,
82 <&dummy>, <&xin24m>,
83 <&xin24m>, <&dummy>,
84 <&xin24m>, <&dummy>,
85 <&xin24m>, <&dummy>,
86 <&xin24m>, <&dummy>,
87 <&xin24m>, <&dummy>;
88
89 clock-output-names =
90 "gate_timer0", "gate_timer1",
91 "gate_timer2", "gate_jtag",
92 "gate_aclk_lcdc1_src", "gate_otgphy0",
93 "gate_otgphy1", "gate_ddr_gpll",
94 "gate_uart0", "gate_frac_uart0",
95 "gate_uart1", "gate_frac_uart1",
96 "gate_uart2", "gate_frac_uart2",
97 "gate_uart3", "gate_frac_uart3";
98
99 #clock-cells = <1>;
100 };
101
102 clk_gates2: gate-clk@200000d8 {
103 compatible = "rockchip,rk2928-gate-clk";
104 reg = <0x200000d8 0x4>;
105 clocks = <&clk_gates2 1>, <&dummy>,
106 <&dummy>, <&dummy>,
107 <&dummy>, <&dummy>,
108 <&clk_gates2 3>, <&dummy>,
109 <&dummy>, <&dummy>,
110 <&dummy>, <&dummy48m>,
111 <&dummy>, <&dummy48m>,
112 <&dummy>, <&dummy>;
113
114 clock-output-names =
115 "gate_periph_src", "gate_aclk_periph",
116 "gate_hclk_periph", "gate_pclk_periph",
117 "gate_smc", "gate_mac",
118 "gate_hsadc", "gate_hsadc_frac",
119 "gate_saradc", "gate_spi0",
120 "gate_spi1", "gate_mmc0",
121 "gate_mac_lbtest", "gate_mmc1",
122 "gate_emmc", "gate_tsadc";
123
124 #clock-cells = <1>;
125 };
126
127 clk_gates3: gate-clk@200000dc {
128 compatible = "rockchip,rk2928-gate-clk";
129 reg = <0x200000dc 0x4>;
130 clocks = <&dummy>, <&dummy>,
131 <&dummy>, <&dummy>,
132 <&dummy>, <&dummy>,
133 <&dummy>, <&dummy>,
134 <&dummy>, <&dummy>,
135 <&dummy>, <&dummy>,
136 <&dummy>, <&dummy>,
137 <&dummy>, <&dummy>;
138
139 clock-output-names =
140 "gate_aclk_lcdc0_src", "gate_dclk_lcdc0",
141 "gate_dclk_lcdc1", "gate_pclkin_cif0",
142 "gate_pclkin_cif1", "reserved",
143 "reserved", "gate_cif0_out",
144 "gate_cif1_out", "gate_aclk_vepu",
145 "gate_hclk_vepu", "gate_aclk_vdpu",
146 "gate_hclk_vdpu", "gate_gpu_src",
147 "reserved", "gate_xin27m";
148
149 #clock-cells = <1>;
150 };
151
152 clk_gates4: gate-clk@200000e0 {
153 compatible = "rockchip,rk2928-gate-clk";
154 reg = <0x200000e0 0x4>;
155 clocks = <&clk_gates2 2>, <&clk_gates2 3>,
156 <&clk_gates2 1>, <&clk_gates2 1>,
157 <&clk_gates2 1>, <&clk_gates2 2>,
158 <&clk_gates2 2>, <&clk_gates2 2>,
159 <&clk_gates0 4>, <&clk_gates0 4>,
160 <&clk_gates0 3>, <&clk_gates0 3>,
161 <&clk_gates0 3>, <&clk_gates2 3>,
162 <&clk_gates0 4>;
163
164 clock-output-names =
165 "gate_hclk_peri_axi_matrix", "gate_pclk_peri_axi_matrix",
166 "gate_aclk_cpu_peri", "gate_aclk_peri_axi_matrix",
167 "gate_aclk_pei_niu", "gate_hclk_usb_peri",
168 "gate_hclk_peri_ahb_arbi", "gate_hclk_emem_peri",
169 "gate_hclk_cpubus", "gate_hclk_ahb2apb",
170 "gate_aclk_strc_sys", "gate_aclk_l2mem_con",
171 "gate_aclk_intmem", "gate_pclk_tsadc",
172 "gate_hclk_hdmi";
173
174 #clock-cells = <1>;
175 };
176
177 clk_gates5: gate-clk@200000e4 {
178 compatible = "rockchip,rk2928-gate-clk";
179 reg = <0x200000e4 0x4>;
180 clocks = <&clk_gates0 3>, <&clk_gates2 1>,
181 <&clk_gates0 5>, <&clk_gates0 5>,
182 <&clk_gates0 5>, <&clk_gates0 5>,
183 <&clk_gates0 4>, <&clk_gates0 5>,
184 <&clk_gates2 1>, <&clk_gates2 2>,
185 <&clk_gates2 2>, <&clk_gates2 2>,
186 <&clk_gates2 2>, <&clk_gates4 5>,
187 <&clk_gates4 5>, <&dummy>;
188
189 clock-output-names =
190 "gate_aclk_dmac1", "gate_aclk_dmac2",
191 "gate_pclk_efuse", "gate_pclk_tzpc",
192 "gate_pclk_grf", "gate_pclk_pmu",
193 "gate_hclk_rom", "gate_pclk_ddrupctl",
194 "gate_aclk_smc", "gate_hclk_nandc",
195 "gate_hclk_mmc0", "gate_hclk_mmc1",
196 "gate_hclk_emmc", "gate_hclk_otg0",
197 "gate_hclk_otg1", "gate_aclk_gpu";
198
199 #clock-cells = <1>;
200 };
201
202 clk_gates6: gate-clk@200000e8 {
203 compatible = "rockchip,rk2928-gate-clk";
204 reg = <0x200000e8 0x4>;
205 clocks = <&clk_gates3 0>, <&clk_gates0 4>,
206 <&clk_gates0 4>, <&clk_gates1 4>,
207 <&clk_gates0 4>, <&clk_gates3 0>,
208 <&clk_gates0 4>, <&clk_gates1 4>,
209 <&clk_gates3 0>, <&clk_gates0 4>,
210 <&clk_gates0 4>, <&clk_gates1 4>,
211 <&clk_gates0 4>, <&clk_gates3 0>,
212 <&dummy>, <&dummy>;
213
214 clock-output-names =
215 "gate_aclk_lcdc0", "gate_hclk_lcdc0",
216 "gate_hclk_lcdc1", "gate_aclk_lcdc1",
217 "gate_hclk_cif0", "gate_aclk_cif0",
218 "gate_hclk_cif1", "gate_aclk_cif1",
219 "gate_aclk_ipp", "gate_hclk_ipp",
220 "gate_hclk_rga", "gate_aclk_rga",
221 "gate_hclk_vio_bus", "gate_aclk_vio0",
222 "gate_aclk_vcodec", "gate_shclk_vio_h2h";
223
224 #clock-cells = <1>;
225 };
226
227 clk_gates7: gate-clk@200000ec {
228 compatible = "rockchip,rk2928-gate-clk";
229 reg = <0x200000ec 0x4>;
230 clocks = <&clk_gates2 2>, <&clk_gates0 4>,
231 <&clk_gates0 4>, <&clk_gates0 4>,
232 <&clk_gates0 4>, <&clk_gates2 2>,
233 <&clk_gates2 2>, <&clk_gates0 5>,
234 <&clk_gates0 5>, <&clk_gates0 5>,
235 <&clk_gates0 5>, <&clk_gates2 3>,
236 <&clk_gates2 3>, <&clk_gates2 3>,
237 <&clk_gates2 3>, <&clk_gates2 3>;
238
239 clock-output-names =
240 "gate_hclk_emac", "gate_hclk_spdif",
241 "gate_hclk_i2s0_2ch", "gate_hclk_i2s1_2ch",
242 "gate_hclk_i2s_8ch", "gate_hclk_hsadc",
243 "gate_hclk_pidf", "gate_pclk_timer0",
244 "gate_pclk_timer1", "gate_pclk_timer2",
245 "gate_pclk_pwm01", "gate_pclk_pwm23",
246 "gate_pclk_spi0", "gate_pclk_spi1",
247 "gate_pclk_saradc", "gate_pclk_wdt";
248
249 #clock-cells = <1>;
250 };
251
252 clk_gates8: gate-clk@200000f0 {
253 compatible = "rockchip,rk2928-gate-clk";
254 reg = <0x200000f0 0x4>;
255 clocks = <&clk_gates0 5>, <&clk_gates0 5>,
256 <&clk_gates2 3>, <&clk_gates2 3>,
257 <&clk_gates0 5>, <&clk_gates0 5>,
258 <&clk_gates2 3>, <&clk_gates2 3>,
259 <&clk_gates2 3>, <&clk_gates0 5>,
260 <&clk_gates0 5>, <&clk_gates0 5>,
261 <&clk_gates2 3>, <&clk_gates2 3>,
262 <&dummy>, <&clk_gates0 5>;
263
264 clock-output-names =
265 "gate_pclk_uart0", "gate_pclk_uart1",
266 "gate_pclk_uart2", "gate_pclk_uart3",
267 "gate_pclk_i2c0", "gate_pclk_i2c1",
268 "gate_pclk_i2c2", "gate_pclk_i2c3",
269 "gate_pclk_i2c4", "gate_pclk_gpio0",
270 "gate_pclk_gpio1", "gate_pclk_gpio2",
271 "gate_pclk_gpio3", "gate_pclk_gpio4",
272 "reserved", "gate_pclk_gpio6";
273
274 #clock-cells = <1>;
275 };
276
277 clk_gates9: gate-clk@200000f4 {
278 compatible = "rockchip,rk2928-gate-clk";
279 reg = <0x200000f4 0x4>;
280 clocks = <&dummy>, <&clk_gates0 5>,
281 <&dummy>, <&dummy>,
282 <&dummy>, <&clk_gates1 4>,
283 <&clk_gates0 5>, <&dummy>,
284 <&dummy>, <&dummy>,
285 <&dummy>;
286
287 clock-output-names =
288 "gate_clk_core_dbg", "gate_pclk_dbg",
289 "gate_clk_trace", "gate_atclk",
290 "gate_clk_l2c", "gate_aclk_vio1",
291 "gate_pclk_publ", "gate_aclk_intmem0",
292 "gate_aclk_intmem1", "gate_aclk_intmem2",
293 "gate_aclk_intmem3";
294
295 #clock-cells = <1>;
296 };
297 };
298
299};
diff --git a/arch/arm/boot/dts/rk3066a.dtsi b/arch/arm/boot/dts/rk3066a.dtsi
new file mode 100644
index 000000000000..56bfac93d3f6
--- /dev/null
+++ b/arch/arm/boot/dts/rk3066a.dtsi
@@ -0,0 +1,390 @@
1/*
2 * Copyright (c) 2013 MundoReader S.L.
3 * Author: Heiko Stuebner <heiko@sntech.de>
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 */
15
16#include <dt-bindings/gpio/gpio.h>
17#include <dt-bindings/interrupt-controller/irq.h>
18#include <dt-bindings/interrupt-controller/arm-gic.h>
19#include <dt-bindings/pinctrl/rockchip.h>
20#include "skeleton.dtsi"
21#include "rk3066a-clocks.dtsi"
22
23/ {
24 compatible = "rockchip,rk3066a";
25 interrupt-parent = <&gic>;
26
27 cpus {
28 #address-cells = <1>;
29 #size-cells = <0>;
30
31 cpu@0 {
32 device_type = "cpu";
33 compatible = "arm,cortex-a9";
34 next-level-cache = <&L2>;
35 reg = <0x0>;
36 };
37 cpu@1 {
38 device_type = "cpu";
39 compatible = "arm,cortex-a9";
40 next-level-cache = <&L2>;
41 reg = <0x1>;
42 };
43 };
44
45 soc {
46 #address-cells = <1>;
47 #size-cells = <1>;
48 compatible = "simple-bus";
49 ranges;
50
51 gic: interrupt-controller@1013d000 {
52 compatible = "arm,cortex-a9-gic";
53 interrupt-controller;
54 #interrupt-cells = <3>;
55 reg = <0x1013d000 0x1000>,
56 <0x1013c100 0x0100>;
57 };
58
59 L2: l2-cache-controller@10138000 {
60 compatible = "arm,pl310-cache";
61 reg = <0x10138000 0x1000>;
62 cache-unified;
63 cache-level = <2>;
64 };
65
66 local-timer@1013c600 {
67 compatible = "arm,cortex-a9-twd-timer";
68 reg = <0x1013c600 0x20>;
69 interrupts = <GIC_PPI 13 0x304>;
70 clocks = <&dummy150m>;
71 };
72
73 timer@20038000 {
74 compatible = "snps,dw-apb-timer-osc";
75 reg = <0x20038000 0x100>;
76 interrupts = <GIC_SPI 44 IRQ_TYPE_LEVEL_HIGH>;
77 clocks = <&clk_gates1 0>, <&clk_gates7 7>;
78 clock-names = "timer", "pclk";
79 };
80
81 timer@2003a000 {
82 compatible = "snps,dw-apb-timer-osc";
83 reg = <0x2003a000 0x100>;
84 interrupts = <GIC_SPI 45 IRQ_TYPE_LEVEL_HIGH>;
85 clocks = <&clk_gates1 1>, <&clk_gates7 8>;
86 clock-names = "timer", "pclk";
87 };
88
89 timer@2000e000 {
90 compatible = "snps,dw-apb-timer-osc";
91 reg = <0x2000e000 0x100>;
92 interrupts = <GIC_SPI 46 IRQ_TYPE_LEVEL_HIGH>;
93 clocks = <&clk_gates1 2>, <&clk_gates7 9>;
94 clock-names = "timer", "pclk";
95 };
96
97 pinctrl@20008000 {
98 compatible = "rockchip,rk3066a-pinctrl";
99 reg = <0x20008000 0x150>;
100 #address-cells = <1>;
101 #size-cells = <1>;
102 ranges;
103
104 gpio0: gpio0@20034000 {
105 compatible = "rockchip,gpio-bank";
106 reg = <0x20034000 0x100>;
107 interrupts = <GIC_SPI 54 IRQ_TYPE_LEVEL_HIGH>;
108 clocks = <&clk_gates8 9>;
109
110 gpio-controller;
111 #gpio-cells = <2>;
112
113 interrupt-controller;
114 #interrupt-cells = <2>;
115 };
116
117 gpio1: gpio1@2003c000 {
118 compatible = "rockchip,gpio-bank";
119 reg = <0x2003c000 0x100>;
120 interrupts = <GIC_SPI 55 IRQ_TYPE_LEVEL_HIGH>;
121 clocks = <&clk_gates8 10>;
122
123 gpio-controller;
124 #gpio-cells = <2>;
125
126 interrupt-controller;
127 #interrupt-cells = <2>;
128 };
129
130 gpio2: gpio2@2003e000 {
131 compatible = "rockchip,gpio-bank";
132 reg = <0x2003e000 0x100>;
133 interrupts = <GIC_SPI 56 IRQ_TYPE_LEVEL_HIGH>;
134 clocks = <&clk_gates8 11>;
135
136 gpio-controller;
137 #gpio-cells = <2>;
138
139 interrupt-controller;
140 #interrupt-cells = <2>;
141 };
142
143 gpio3: gpio3@20080000 {
144 compatible = "rockchip,gpio-bank";
145 reg = <0x20080000 0x100>;
146 interrupts = <GIC_SPI 57 IRQ_TYPE_LEVEL_HIGH>;
147 clocks = <&clk_gates8 12>;
148
149 gpio-controller;
150 #gpio-cells = <2>;
151
152 interrupt-controller;
153 #interrupt-cells = <2>;
154 };
155
156 gpio4: gpio4@20084000 {
157 compatible = "rockchip,gpio-bank";
158 reg = <0x20084000 0x100>;
159 interrupts = <GIC_SPI 58 IRQ_TYPE_LEVEL_HIGH>;
160 clocks = <&clk_gates8 13>;
161
162 gpio-controller;
163 #gpio-cells = <2>;
164
165 interrupt-controller;
166 #interrupt-cells = <2>;
167 };
168
169 gpio6: gpio6@2000a000 {
170 compatible = "rockchip,gpio-bank";
171 reg = <0x2000a000 0x100>;
172 interrupts = <GIC_SPI 60 IRQ_TYPE_LEVEL_HIGH>;
173 clocks = <&clk_gates8 15>;
174
175 gpio-controller;
176 #gpio-cells = <2>;
177
178 interrupt-controller;
179 #interrupt-cells = <2>;
180 };
181
182 pcfg_pull_default: pcfg_pull_default {
183 bias-pull-pin-default;
184 };
185
186 pcfg_pull_none: pcfg_pull_none {
187 bias-disable;
188 };
189
190 uart0 {
191 uart0_xfer: uart0-xfer {
192 rockchip,pins = <RK_GPIO1 0 RK_FUNC_1 &pcfg_pull_default>,
193 <RK_GPIO1 1 RK_FUNC_1 &pcfg_pull_default>;
194 rockchip,config = <&pcfg_pull_default>;
195 };
196
197 uart0_cts: uart0-cts {
198 rockchip,pins = <RK_GPIO1 2 RK_FUNC_1 &pcfg_pull_default>;
199 rockchip,config = <&pcfg_pull_default>;
200 };
201
202 uart0_rts: uart0-rts {
203 rockchip,pins = <RK_GPIO1 3 RK_FUNC_1 &pcfg_pull_default>;
204 rockchip,config = <&pcfg_pull_default>;
205 };
206 };
207
208 uart1 {
209 uart1_xfer: uart1-xfer {
210 rockchip,pins = <RK_GPIO1 4 RK_FUNC_1 &pcfg_pull_default>,
211 <RK_GPIO1 5 RK_FUNC_1 &pcfg_pull_default>;
212 rockchip,config = <&pcfg_pull_default>;
213 };
214
215 uart1_cts: uart1-cts {
216 rockchip,pins = <RK_GPIO1 6 RK_FUNC_1 &pcfg_pull_default>;
217 rockchip,config = <&pcfg_pull_default>;
218 };
219
220 uart1_rts: uart1-rts {
221 rockchip,pins = <RK_GPIO1 7 RK_FUNC_1 &pcfg_pull_default>;
222 rockchip,config = <&pcfg_pull_default>;
223 };
224 };
225
226 uart2 {
227 uart2_xfer: uart2-xfer {
228 rockchip,pins = <RK_GPIO1 8 RK_FUNC_1 &pcfg_pull_default>,
229 <RK_GPIO1 9 RK_FUNC_1 &pcfg_pull_default>;
230 rockchip,config = <&pcfg_pull_default>;
231 };
232 /* no rts / cts for uart2 */
233 };
234
235 uart3 {
236 uart3_xfer: uart3-xfer {
237 rockchip,pins = <RK_GPIO3 27 RK_FUNC_1 &pcfg_pull_default>,
238 <RK_GPIO3 28 RK_FUNC_1 &pcfg_pull_default>;
239 rockchip,config = <&pcfg_pull_default>;
240 };
241
242 uart3_cts: uart3-cts {
243 rockchip,pins = <RK_GPIO3 29 RK_FUNC_1 &pcfg_pull_default>;
244 rockchip,config = <&pcfg_pull_default>;
245 };
246
247 uart3_rts: uart3-rts {
248 rockchip,pins = <RK_GPIO3 30 RK_FUNC_1 &pcfg_pull_default>;
249 rockchip,config = <&pcfg_pull_default>;
250 };
251 };
252
253 sd0 {
254 sd0_clk: sd0-clk {
255 rockchip,pins = <RK_GPIO3 8 RK_FUNC_1 &pcfg_pull_default>;
256 rockchip,config = <&pcfg_pull_default>;
257 };
258
259 sd0_cmd: sd0-cmd {
260 rockchip,pins = <RK_GPIO3 9 RK_FUNC_1 &pcfg_pull_default>;
261 rockchip,config = <&pcfg_pull_default>;
262 };
263
264 sd0_cd: sd0-cd {
265 rockchip,pins = <RK_GPIO3 14 RK_FUNC_1 &pcfg_pull_default>;
266 rockchip,config = <&pcfg_pull_default>;
267 };
268
269 sd0_wp: sd0-wp {
270 rockchip,pins = <RK_GPIO3 15 RK_FUNC_1 &pcfg_pull_default>;
271 rockchip,config = <&pcfg_pull_default>;
272 };
273
274 sd0_bus1: sd0-bus-width1 {
275 rockchip,pins = <RK_GPIO3 10 RK_FUNC_1 &pcfg_pull_default>;
276 rockchip,config = <&pcfg_pull_default>;
277 };
278
279 sd0_bus4: sd0-bus-width4 {
280 rockchip,pins = <RK_GPIO3 10 RK_FUNC_1 &pcfg_pull_default>,
281 <RK_GPIO3 11 RK_FUNC_1 &pcfg_pull_default>,
282 <RK_GPIO3 12 RK_FUNC_1 &pcfg_pull_default>,
283 <RK_GPIO3 13 RK_FUNC_1 &pcfg_pull_default>;
284 rockchip,config = <&pcfg_pull_default>;
285 };
286 };
287
288 sd1 {
289 sd1_clk: sd1-clk {
290 rockchip,pins = <RK_GPIO3 21 RK_FUNC_1 &pcfg_pull_default>;
291 rockchip,config = <&pcfg_pull_default>;
292 };
293
294 sd1_cmd: sd1-cmd {
295 rockchip,pins = <RK_GPIO3 16 RK_FUNC_1 &pcfg_pull_default>;
296 rockchip,config = <&pcfg_pull_default>;
297 };
298
299 sd1_cd: sd1-cd {
300 rockchip,pins = <RK_GPIO3 22 RK_FUNC_1 &pcfg_pull_default>;
301 rockchip,config = <&pcfg_pull_default>;
302 };
303
304 sd1_wp: sd1-wp {
305 rockchip,pins = <RK_GPIO3 23 RK_FUNC_1 &pcfg_pull_default>;
306 rockchip,config = <&pcfg_pull_default>;
307 };
308
309 sd1_bus1: sd1-bus-width1 {
310 rockchip,pins = <RK_GPIO3 17 RK_FUNC_1 &pcfg_pull_default>;
311 rockchip,config = <&pcfg_pull_default>;
312 };
313
314 sd1_bus4: sd1-bus-width4 {
315 rockchip,pins = <RK_GPIO3 17 RK_FUNC_1 &pcfg_pull_default>,
316 <RK_GPIO3 18 RK_FUNC_1 &pcfg_pull_default>,
317 <RK_GPIO3 19 RK_FUNC_1 &pcfg_pull_default>,
318 <RK_GPIO3 20 RK_FUNC_1 &pcfg_pull_default>;
319 rockchip,config = <&pcfg_pull_default>;
320 };
321 };
322 };
323
324 uart0: serial@10124000 {
325 compatible = "snps,dw-apb-uart";
326 reg = <0x10124000 0x400>;
327 interrupts = <GIC_SPI 34 IRQ_TYPE_LEVEL_HIGH>;
328 reg-shift = <2>;
329 reg-io-width = <1>;
330 clocks = <&clk_gates1 8>;
331 status = "disabled";
332 };
333
334 uart1: serial@10126000 {
335 compatible = "snps,dw-apb-uart";
336 reg = <0x10126000 0x400>;
337 interrupts = <GIC_SPI 35 IRQ_TYPE_LEVEL_HIGH>;
338 reg-shift = <2>;
339 reg-io-width = <1>;
340 clocks = <&clk_gates1 10>;
341 status = "disabled";
342 };
343
344 uart2: serial@20064000 {
345 compatible = "snps,dw-apb-uart";
346 reg = <0x20064000 0x400>;
347 interrupts = <GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH>;
348 reg-shift = <2>;
349 reg-io-width = <1>;
350 clocks = <&clk_gates1 12>;
351 status = "disabled";
352 };
353
354 uart3: serial@20068000 {
355 compatible = "snps,dw-apb-uart";
356 reg = <0x20068000 0x400>;
357 interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>;
358 reg-shift = <2>;
359 reg-io-width = <1>;
360 clocks = <&clk_gates1 14>;
361 status = "disabled";
362 };
363
364 dwmmc@10214000 {
365 compatible = "rockchip,rk2928-dw-mshc";
366 reg = <0x10214000 0x1000>;
367 interrupts = <GIC_SPI 23 IRQ_TYPE_LEVEL_HIGH>;
368 #address-cells = <1>;
369 #size-cells = <0>;
370
371 clocks = <&clk_gates5 10>, <&clk_gates2 11>;
372 clock-names = "biu", "ciu";
373
374 status = "disabled";
375 };
376
377 dwmmc@10218000 {
378 compatible = "rockchip,rk2928-dw-mshc";
379 reg = <0x10218000 0x1000>;
380 interrupts = <GIC_SPI 24 IRQ_TYPE_LEVEL_HIGH>;
381 #address-cells = <1>;
382 #size-cells = <0>;
383
384 clocks = <&clk_gates5 11>, <&clk_gates2 13>;
385 clock-names = "biu", "ciu";
386
387 status = "disabled";
388 };
389 };
390};
diff --git a/arch/arm/boot/dts/s3c2416-pinctrl.dtsi b/arch/arm/boot/dts/s3c2416-pinctrl.dtsi
new file mode 100644
index 000000000000..527e3193817f
--- /dev/null
+++ b/arch/arm/boot/dts/s3c2416-pinctrl.dtsi
@@ -0,0 +1,173 @@
1/*
2 * Samsung S3C2416 pinctrl settings
3 *
4 * Copyright (c) 2013 Heiko Stuebner <heiko@sntech.de>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
10
11&pinctrl_0 {
12 /*
13 * Pin banks
14 */
15
16 gpa: gpa {
17 gpio-controller;
18 #gpio-cells = <2>;
19 };
20
21 gpb: gpb {
22 gpio-controller;
23 #gpio-cells = <2>;
24 };
25
26 gpc: gpc {
27 gpio-controller;
28 #gpio-cells = <2>;
29 };
30
31 gpd: gpd {
32 gpio-controller;
33 #gpio-cells = <2>;
34 };
35
36 gpe: gpe {
37 gpio-controller;
38 #gpio-cells = <2>;
39 };
40
41 gpf: gpf {
42 gpio-controller;
43 #gpio-cells = <2>;
44 interrupt-controller;
45 #interrupt-cells = <2>;
46 };
47
48 gpg: gpg {
49 gpio-controller;
50 #gpio-cells = <2>;
51 interrupt-controller;
52 #interrupt-cells = <2>;
53 };
54
55 gph: gph {
56 gpio-controller;
57 #gpio-cells = <2>;
58 };
59
60 gpj: gpj {
61 gpio-controller;
62 #gpio-cells = <2>;
63 };
64
65 gpk: gpk {
66 gpio-controller;
67 #gpio-cells = <2>;
68 };
69
70 gpl: gpl {
71 gpio-controller;
72 #gpio-cells = <2>;
73 };
74
75 gpm: gpm {
76 gpio-controller;
77 #gpio-cells = <2>;
78 };
79
80 /*
81 * Pin groups
82 */
83
84 uart0_data: uart0-data {
85 samsung,pins = "gph-0", "gph-1";
86 samsung,pin-function = <2>;
87 };
88
89 uart0_fctl: uart0-fctl {
90 samsung,pins = "gph-8", "gph-9";
91 samsung,pin-function = <2>;
92 };
93
94 uart1_data: uart1-data {
95 samsung,pins = "gph-2", "gph-3";
96 samsung,pin-function = <2>;
97 };
98
99 uart1_fctl: uart1-fctl {
100 samsung,pins = "gph-10", "gph-11";
101 samsung,pin-function = <2>;
102 };
103
104 uart2_data: uart2-data {
105 samsung,pins = "gph-4", "gph-5";
106 samsung,pin-function = <2>;
107 };
108
109 uart2_fctl: uart2-fctl {
110 samsung,pins = "gph-6", "gph-7";
111 samsung,pin-function = <2>;
112 };
113
114 uart3_data: uart3-data {
115 samsung,pins = "gph-6", "gph-7";
116 samsung,pin-function = <2>;
117 };
118
119 extuart_clk: extuart-clk {
120 samsung,pins = "gph-12";
121 samsung,pin-function = <2>;
122 };
123
124 i2c0_bus: i2c0-bus {
125 samsung,pins = "gpe-14", "gpe-15";
126 samsung,pin-function = <2>;
127 };
128
129 spi0_bus: spi0-bus {
130 samsung,pins = "gpe-11", "gpe-12", "gpe-13";
131 samsung,pin-function = <2>;
132 };
133
134 sd0_clk: sd0-clk {
135 samsung,pins = "gpe-5";
136 samsung,pin-function = <2>;
137 };
138
139 sd0_cmd: sd0-cmd {
140 samsung,pins = "gpe-6";
141 samsung,pin-function = <2>;
142 };
143
144 sd0_bus1: sd0-bus1 {
145 samsung,pins = "gpe-7";
146 samsung,pin-function = <2>;
147 };
148
149 sd0_bus4: sd0-bus4 {
150 samsung,pins = "gpe-8", "gpe-9", "gpe-10";
151 samsung,pin-function = <2>;
152 };
153
154 sd1_cmd: sd1-cmd {
155 samsung,pins = "gpl-8";
156 samsung,pin-function = <2>;
157 };
158
159 sd1_clk: sd1-clk {
160 samsung,pins = "gpl-9";
161 samsung,pin-function = <2>;
162 };
163
164 sd1_bus1: sd1-bus1 {
165 samsung,pins = "gpl-0";
166 samsung,pin-function = <2>;
167 };
168
169 sd1_bus4: sd1-bus4 {
170 samsung,pins = "gpl-1", "gpl-2", "gpl-3";
171 samsung,pin-function = <2>;
172 };
173};
diff --git a/arch/arm/boot/dts/s3c2416-smdk2416.dts b/arch/arm/boot/dts/s3c2416-smdk2416.dts
new file mode 100644
index 000000000000..59594cf15998
--- /dev/null
+++ b/arch/arm/boot/dts/s3c2416-smdk2416.dts
@@ -0,0 +1,72 @@
1/*
2 * SAMSUNG SMDK2416 board device tree source
3 *
4 * Copyright (c) 2013 Heiko Stuebner <heiko@sntech.de>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
10
11/dts-v1/;
12#include "s3c2416.dtsi"
13
14/ {
15 model = "SMDK2416";
16 compatible = "samsung,s3c2416";
17
18 memory {
19 reg = <0x30000000 0x4000000>;
20 };
21
22 serial@50000000 {
23 status = "okay";
24 pinctrl-names = "default";
25 pinctrl-0 = <&uart0_data>, <&uart0_fctl>;
26 };
27
28 serial@50004000 {
29 status = "okay";
30 pinctrl-names = "default";
31 pinctrl-0 = <&uart1_data>, <&uart1_fctl>;
32 };
33
34 serial@50008000 {
35 status = "okay";
36 pinctrl-names = "default";
37 pinctrl-0 = <&uart2_data>;
38 };
39
40 serial@5000C000 {
41 status = "okay";
42 pinctrl-names = "default";
43 pinctrl-0 = <&uart3_data>;
44 };
45
46 watchdog@53000000 {
47 status = "okay";
48 };
49
50 rtc@57000000 {
51 status = "okay";
52 };
53
54 sdhci@4AC00000 {
55 pinctrl-names = "default";
56 pinctrl-0 = <&sd0_clk>, <&sd0_cmd>,
57 <&sd0_bus1>, <&sd0_bus4>;
58 bus-width = <4>;
59 cd-gpios = <&gpf 1 0>;
60 cd-inverted;
61 status = "okay";
62 };
63
64 sdhci@4A800000 {
65 pinctrl-names = "default";
66 pinctrl-0 = <&sd1_clk>, <&sd1_cmd>,
67 <&sd1_bus1>, <&sd1_bus4>;
68 bus-width = <4>;
69 broken-cd;
70 status = "okay";
71 };
72};
diff --git a/arch/arm/boot/dts/s3c2416.dtsi b/arch/arm/boot/dts/s3c2416.dtsi
new file mode 100644
index 000000000000..e6555bdd81b8
--- /dev/null
+++ b/arch/arm/boot/dts/s3c2416.dtsi
@@ -0,0 +1,79 @@
1/*
2 * Samsung's S3C2416 SoC device tree source
3 *
4 * Copyright (c) 2013 Heiko Stuebner <heiko@sntech.de>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
10
11#include "s3c24xx.dtsi"
12#include "s3c2416-pinctrl.dtsi"
13
14/ {
15 model = "Samsung S3C2416 SoC";
16 compatible = "samsung,s3c2416";
17
18 cpus {
19 #address-cells = <1>;
20 #size-cells = <0>;
21
22 cpu {
23 compatible = "arm,arm926ejs";
24 };
25 };
26
27 interrupt-controller@4a000000 {
28 compatible = "samsung,s3c2416-irq";
29 };
30
31 pinctrl@56000000 {
32 compatible = "samsung,s3c2416-pinctrl";
33 };
34
35 serial@50000000 {
36 compatible = "samsung,s3c2440-uart";
37 };
38
39 serial@50004000 {
40 compatible = "samsung,s3c2440-uart";
41 };
42
43 serial@50008000 {
44 compatible = "samsung,s3c2440-uart";
45 };
46
47 serial@5000C000 {
48 compatible = "samsung,s3c2440-uart";
49 reg = <0x5000C000 0x4000>;
50 interrupts = <1 18 24 4>, <1 18 25 4>;
51 status = "disabled";
52 };
53
54 sdhci@4AC00000 {
55 compatible = "samsung,s3c6410-sdhci";
56 reg = <0x4AC00000 0x100>;
57 interrupts = <0 0 21 3>;
58 status = "disabled";
59 };
60
61 sdhci@4A800000 {
62 compatible = "samsung,s3c6410-sdhci";
63 reg = <0x4A800000 0x100>;
64 interrupts = <0 0 20 3>;
65 status = "disabled";
66 };
67
68 watchdog@53000000 {
69 interrupts = <1 9 27 3>;
70 };
71
72 rtc@57000000 {
73 compatible = "samsung,s3c2416-rtc";
74 };
75
76 i2c@54000000 {
77 compatible = "samsung,s3c2440-i2c";
78 };
79};
diff --git a/arch/arm/boot/dts/s3c24xx.dtsi b/arch/arm/boot/dts/s3c24xx.dtsi
new file mode 100644
index 000000000000..2d1d7dc9418a
--- /dev/null
+++ b/arch/arm/boot/dts/s3c24xx.dtsi
@@ -0,0 +1,92 @@
1/*
2 * Samsung's S3C24XX family device tree source
3 *
4 * Copyright (c) 2013 Heiko Stuebner <heiko@sntech.de>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
10
11#include "skeleton.dtsi"
12
13/ {
14 compatible = "samsung,s3c24xx";
15 interrupt-parent = <&intc>;
16
17 aliases {
18 pinctrl0 = &pinctrl_0;
19 };
20
21 intc:interrupt-controller@4a000000 {
22 compatible = "samsung,s3c2410-irq";
23 reg = <0x4a000000 0x100>;
24 interrupt-controller;
25 #interrupt-cells = <4>;
26 };
27
28 pinctrl_0: pinctrl@56000000 {
29 reg = <0x56000000 0x1000>;
30
31 wakeup-interrupt-controller {
32 compatible = "samsung,s3c2410-wakeup-eint";
33 interrupts = <0 0 0 3>,
34 <0 0 1 3>,
35 <0 0 2 3>,
36 <0 0 3 3>,
37 <0 0 4 4>,
38 <0 0 5 4>;
39 };
40 };
41
42 timer@51000000 {
43 compatible = "samsung,s3c2410-pwm";
44 reg = <0x51000000 0x1000>;
45 interrupts = <0 0 10 3>, <0 0 11 3>, <0 0 12 3>, <0 0 13 3>, <0 0 14 3>;
46 #pwm-cells = <4>;
47 };
48
49 serial@50000000 {
50 compatible = "samsung,s3c2410-uart";
51 reg = <0x50000000 0x4000>;
52 interrupts = <1 28 0 4>, <1 28 1 4>;
53 status = "disabled";
54 };
55
56 serial@50004000 {
57 compatible = "samsung,s3c2410-uart";
58 reg = <0x50004000 0x4000>;
59 interrupts = <1 23 3 4>, <1 23 4 4>;
60 status = "disabled";
61 };
62
63 serial@50008000 {
64 compatible = "samsung,s3c2410-uart";
65 reg = <0x50008000 0x4000>;
66 interrupts = <1 15 6 4>, <1 15 7 4>;
67 status = "disabled";
68 };
69
70 watchdog@53000000 {
71 compatible = "samsung,s3c2410-wdt";
72 reg = <0x53000000 0x100>;
73 interrupts = <0 0 9 3>;
74 status = "disabled";
75 };
76
77 rtc@57000000 {
78 compatible = "samsung,s3c2410-rtc";
79 reg = <0x57000000 0x100>;
80 interrupts = <0 0 30 3>, <0 0 8 3>;
81 status = "disabled";
82 };
83
84 i2c@54000000 {
85 compatible = "samsung,s3c2410-i2c";
86 reg = <0x54000000 0x100>;
87 interrupts = <0 0 27 3>;
88 #address-cells = <1>;
89 #size-cells = <0>;
90 status = "disabled";
91 };
92};
diff --git a/arch/arm/boot/dts/sama5d3.dtsi b/arch/arm/boot/dts/sama5d3.dtsi
index 5000e0d42849..a1d5e25a6698 100644
--- a/arch/arm/boot/dts/sama5d3.dtsi
+++ b/arch/arm/boot/dts/sama5d3.dtsi
@@ -8,7 +8,11 @@
8 * Licensed under GPLv2 or later. 8 * Licensed under GPLv2 or later.
9 */ 9 */
10 10
11/include/ "skeleton.dtsi" 11#include "skeleton.dtsi"
12#include <dt-bindings/dma/at91.h>
13#include <dt-bindings/pinctrl/at91.h>
14#include <dt-bindings/interrupt-controller/irq.h>
15#include <dt-bindings/gpio/gpio.h>
12 16
13/ { 17/ {
14 model = "Atmel SAMA5D3 family SoC"; 18 model = "Atmel SAMA5D3 family SoC";
@@ -35,8 +39,12 @@
35 ssc1 = &ssc1; 39 ssc1 = &ssc1;
36 }; 40 };
37 cpus { 41 cpus {
42 #address-cells = <1>;
43 #size-cells = <0>;
38 cpu@0 { 44 cpu@0 {
45 device_type = "cpu";
39 compatible = "arm,cortex-a5"; 46 compatible = "arm,cortex-a5";
47 reg = <0x0>;
40 }; 48 };
41 }; 49 };
42 50
@@ -59,8 +67,8 @@
59 mmc0: mmc@f0000000 { 67 mmc0: mmc@f0000000 {
60 compatible = "atmel,hsmci"; 68 compatible = "atmel,hsmci";
61 reg = <0xf0000000 0x600>; 69 reg = <0xf0000000 0x600>;
62 interrupts = <21 4 0>; 70 interrupts = <21 IRQ_TYPE_LEVEL_HIGH 0>;
63 dmas = <&dma0 2 0>; 71 dmas = <&dma0 2 AT91_DMA_CFG_PER_ID(0)>;
64 dma-names = "rxtx"; 72 dma-names = "rxtx";
65 pinctrl-names = "default"; 73 pinctrl-names = "default";
66 pinctrl-0 = <&pinctrl_mmc0_clk_cmd_dat0 &pinctrl_mmc0_dat1_3 &pinctrl_mmc0_dat4_7>; 74 pinctrl-0 = <&pinctrl_mmc0_clk_cmd_dat0 &pinctrl_mmc0_dat1_3 &pinctrl_mmc0_dat4_7>;
@@ -72,9 +80,12 @@
72 spi0: spi@f0004000 { 80 spi0: spi@f0004000 {
73 #address-cells = <1>; 81 #address-cells = <1>;
74 #size-cells = <0>; 82 #size-cells = <0>;
75 compatible = "atmel,at91sam9x5-spi"; 83 compatible = "atmel,at91rm9200-spi";
76 reg = <0xf0004000 0x100>; 84 reg = <0xf0004000 0x100>;
77 interrupts = <24 4 3>; 85 interrupts = <24 IRQ_TYPE_LEVEL_HIGH 3>;
86 dmas = <&dma0 2 AT91_DMA_CFG_PER_ID(1)>,
87 <&dma0 2 AT91_DMA_CFG_PER_ID(2)>;
88 dma-names = "tx", "rx";
78 pinctrl-names = "default"; 89 pinctrl-names = "default";
79 pinctrl-0 = <&pinctrl_spi0>; 90 pinctrl-0 = <&pinctrl_spi0>;
80 status = "disabled"; 91 status = "disabled";
@@ -83,7 +94,7 @@
83 ssc0: ssc@f0008000 { 94 ssc0: ssc@f0008000 {
84 compatible = "atmel,at91sam9g45-ssc"; 95 compatible = "atmel,at91sam9g45-ssc";
85 reg = <0xf0008000 0x4000>; 96 reg = <0xf0008000 0x4000>;
86 interrupts = <38 4 4>; 97 interrupts = <38 IRQ_TYPE_LEVEL_HIGH 4>;
87 pinctrl-names = "default"; 98 pinctrl-names = "default";
88 pinctrl-0 = <&pinctrl_ssc0_tx &pinctrl_ssc0_rx>; 99 pinctrl-0 = <&pinctrl_ssc0_tx &pinctrl_ssc0_rx>;
89 status = "disabled"; 100 status = "disabled";
@@ -92,7 +103,7 @@
92 can0: can@f000c000 { 103 can0: can@f000c000 {
93 compatible = "atmel,at91sam9x5-can"; 104 compatible = "atmel,at91sam9x5-can";
94 reg = <0xf000c000 0x300>; 105 reg = <0xf000c000 0x300>;
95 interrupts = <40 4 3>; 106 interrupts = <40 IRQ_TYPE_LEVEL_HIGH 3>;
96 pinctrl-names = "default"; 107 pinctrl-names = "default";
97 pinctrl-0 = <&pinctrl_can0_rx_tx>; 108 pinctrl-0 = <&pinctrl_can0_rx_tx>;
98 status = "disabled"; 109 status = "disabled";
@@ -101,15 +112,15 @@
101 tcb0: timer@f0010000 { 112 tcb0: timer@f0010000 {
102 compatible = "atmel,at91sam9x5-tcb"; 113 compatible = "atmel,at91sam9x5-tcb";
103 reg = <0xf0010000 0x100>; 114 reg = <0xf0010000 0x100>;
104 interrupts = <26 4 0>; 115 interrupts = <26 IRQ_TYPE_LEVEL_HIGH 0>;
105 }; 116 };
106 117
107 i2c0: i2c@f0014000 { 118 i2c0: i2c@f0014000 {
108 compatible = "atmel,at91sam9x5-i2c"; 119 compatible = "atmel,at91sam9x5-i2c";
109 reg = <0xf0014000 0x4000>; 120 reg = <0xf0014000 0x4000>;
110 interrupts = <18 4 6>; 121 interrupts = <18 IRQ_TYPE_LEVEL_HIGH 6>;
111 dmas = <&dma0 2 7>, 122 dmas = <&dma0 2 AT91_DMA_CFG_PER_ID(7)>,
112 <&dma0 2 8>; 123 <&dma0 2 AT91_DMA_CFG_PER_ID(8)>;
113 dma-names = "tx", "rx"; 124 dma-names = "tx", "rx";
114 pinctrl-names = "default"; 125 pinctrl-names = "default";
115 pinctrl-0 = <&pinctrl_i2c0>; 126 pinctrl-0 = <&pinctrl_i2c0>;
@@ -121,9 +132,9 @@
121 i2c1: i2c@f0018000 { 132 i2c1: i2c@f0018000 {
122 compatible = "atmel,at91sam9x5-i2c"; 133 compatible = "atmel,at91sam9x5-i2c";
123 reg = <0xf0018000 0x4000>; 134 reg = <0xf0018000 0x4000>;
124 interrupts = <19 4 6>; 135 interrupts = <19 IRQ_TYPE_LEVEL_HIGH 6>;
125 dmas = <&dma0 2 9>, 136 dmas = <&dma0 2 AT91_DMA_CFG_PER_ID(9)>,
126 <&dma0 2 10>; 137 <&dma0 2 AT91_DMA_CFG_PER_ID(10)>;
127 dma-names = "tx", "rx"; 138 dma-names = "tx", "rx";
128 pinctrl-names = "default"; 139 pinctrl-names = "default";
129 pinctrl-0 = <&pinctrl_i2c1>; 140 pinctrl-0 = <&pinctrl_i2c1>;
@@ -135,7 +146,7 @@
135 usart0: serial@f001c000 { 146 usart0: serial@f001c000 {
136 compatible = "atmel,at91sam9260-usart"; 147 compatible = "atmel,at91sam9260-usart";
137 reg = <0xf001c000 0x100>; 148 reg = <0xf001c000 0x100>;
138 interrupts = <12 4 5>; 149 interrupts = <12 IRQ_TYPE_LEVEL_HIGH 5>;
139 pinctrl-names = "default"; 150 pinctrl-names = "default";
140 pinctrl-0 = <&pinctrl_usart0>; 151 pinctrl-0 = <&pinctrl_usart0>;
141 status = "disabled"; 152 status = "disabled";
@@ -144,7 +155,7 @@
144 usart1: serial@f0020000 { 155 usart1: serial@f0020000 {
145 compatible = "atmel,at91sam9260-usart"; 156 compatible = "atmel,at91sam9260-usart";
146 reg = <0xf0020000 0x100>; 157 reg = <0xf0020000 0x100>;
147 interrupts = <13 4 5>; 158 interrupts = <13 IRQ_TYPE_LEVEL_HIGH 5>;
148 pinctrl-names = "default"; 159 pinctrl-names = "default";
149 pinctrl-0 = <&pinctrl_usart1>; 160 pinctrl-0 = <&pinctrl_usart1>;
150 status = "disabled"; 161 status = "disabled";
@@ -153,7 +164,7 @@
153 macb0: ethernet@f0028000 { 164 macb0: ethernet@f0028000 {
154 compatible = "cdns,pc302-gem", "cdns,gem"; 165 compatible = "cdns,pc302-gem", "cdns,gem";
155 reg = <0xf0028000 0x100>; 166 reg = <0xf0028000 0x100>;
156 interrupts = <34 4 3>; 167 interrupts = <34 IRQ_TYPE_LEVEL_HIGH 3>;
157 pinctrl-names = "default"; 168 pinctrl-names = "default";
158 pinctrl-0 = <&pinctrl_macb0_data_rgmii &pinctrl_macb0_signal_rgmii>; 169 pinctrl-0 = <&pinctrl_macb0_data_rgmii &pinctrl_macb0_signal_rgmii>;
159 status = "disabled"; 170 status = "disabled";
@@ -162,15 +173,15 @@
162 isi: isi@f0034000 { 173 isi: isi@f0034000 {
163 compatible = "atmel,at91sam9g45-isi"; 174 compatible = "atmel,at91sam9g45-isi";
164 reg = <0xf0034000 0x4000>; 175 reg = <0xf0034000 0x4000>;
165 interrupts = <37 4 5>; 176 interrupts = <37 IRQ_TYPE_LEVEL_HIGH 5>;
166 status = "disabled"; 177 status = "disabled";
167 }; 178 };
168 179
169 mmc1: mmc@f8000000 { 180 mmc1: mmc@f8000000 {
170 compatible = "atmel,hsmci"; 181 compatible = "atmel,hsmci";
171 reg = <0xf8000000 0x600>; 182 reg = <0xf8000000 0x600>;
172 interrupts = <22 4 0>; 183 interrupts = <22 IRQ_TYPE_LEVEL_HIGH 0>;
173 dmas = <&dma1 2 0>; 184 dmas = <&dma1 2 AT91_DMA_CFG_PER_ID(0)>;
174 dma-names = "rxtx"; 185 dma-names = "rxtx";
175 pinctrl-names = "default"; 186 pinctrl-names = "default";
176 pinctrl-0 = <&pinctrl_mmc1_clk_cmd_dat0 &pinctrl_mmc1_dat1_3>; 187 pinctrl-0 = <&pinctrl_mmc1_clk_cmd_dat0 &pinctrl_mmc1_dat1_3>;
@@ -182,8 +193,8 @@
182 mmc2: mmc@f8004000 { 193 mmc2: mmc@f8004000 {
183 compatible = "atmel,hsmci"; 194 compatible = "atmel,hsmci";
184 reg = <0xf8004000 0x600>; 195 reg = <0xf8004000 0x600>;
185 interrupts = <23 4 0>; 196 interrupts = <23 IRQ_TYPE_LEVEL_HIGH 0>;
186 dmas = <&dma1 2 1>; 197 dmas = <&dma1 2 AT91_DMA_CFG_PER_ID(1)>;
187 dma-names = "rxtx"; 198 dma-names = "rxtx";
188 pinctrl-names = "default"; 199 pinctrl-names = "default";
189 pinctrl-0 = <&pinctrl_mmc2_clk_cmd_dat0 &pinctrl_mmc2_dat1_3>; 200 pinctrl-0 = <&pinctrl_mmc2_clk_cmd_dat0 &pinctrl_mmc2_dat1_3>;
@@ -195,9 +206,12 @@
195 spi1: spi@f8008000 { 206 spi1: spi@f8008000 {
196 #address-cells = <1>; 207 #address-cells = <1>;
197 #size-cells = <0>; 208 #size-cells = <0>;
198 compatible = "atmel,at91sam9x5-spi"; 209 compatible = "atmel,at91rm9200-spi";
199 reg = <0xf8008000 0x100>; 210 reg = <0xf8008000 0x100>;
200 interrupts = <25 4 3>; 211 interrupts = <25 IRQ_TYPE_LEVEL_HIGH 3>;
212 dmas = <&dma1 2 AT91_DMA_CFG_PER_ID(15)>,
213 <&dma1 2 AT91_DMA_CFG_PER_ID(16)>;
214 dma-names = "tx", "rx";
201 pinctrl-names = "default"; 215 pinctrl-names = "default";
202 pinctrl-0 = <&pinctrl_spi1>; 216 pinctrl-0 = <&pinctrl_spi1>;
203 status = "disabled"; 217 status = "disabled";
@@ -206,7 +220,7 @@
206 ssc1: ssc@f800c000 { 220 ssc1: ssc@f800c000 {
207 compatible = "atmel,at91sam9g45-ssc"; 221 compatible = "atmel,at91sam9g45-ssc";
208 reg = <0xf800c000 0x4000>; 222 reg = <0xf800c000 0x4000>;
209 interrupts = <39 4 4>; 223 interrupts = <39 IRQ_TYPE_LEVEL_HIGH 4>;
210 pinctrl-names = "default"; 224 pinctrl-names = "default";
211 pinctrl-0 = <&pinctrl_ssc1_tx &pinctrl_ssc1_rx>; 225 pinctrl-0 = <&pinctrl_ssc1_tx &pinctrl_ssc1_rx>;
212 status = "disabled"; 226 status = "disabled";
@@ -215,7 +229,7 @@
215 can1: can@f8010000 { 229 can1: can@f8010000 {
216 compatible = "atmel,at91sam9x5-can"; 230 compatible = "atmel,at91sam9x5-can";
217 reg = <0xf8010000 0x300>; 231 reg = <0xf8010000 0x300>;
218 interrupts = <41 4 3>; 232 interrupts = <41 IRQ_TYPE_LEVEL_HIGH 3>;
219 pinctrl-names = "default"; 233 pinctrl-names = "default";
220 pinctrl-0 = <&pinctrl_can1_rx_tx>; 234 pinctrl-0 = <&pinctrl_can1_rx_tx>;
221 }; 235 };
@@ -223,13 +237,13 @@
223 tcb1: timer@f8014000 { 237 tcb1: timer@f8014000 {
224 compatible = "atmel,at91sam9x5-tcb"; 238 compatible = "atmel,at91sam9x5-tcb";
225 reg = <0xf8014000 0x100>; 239 reg = <0xf8014000 0x100>;
226 interrupts = <27 4 0>; 240 interrupts = <27 IRQ_TYPE_LEVEL_HIGH 0>;
227 }; 241 };
228 242
229 adc0: adc@f8018000 { 243 adc0: adc@f8018000 {
230 compatible = "atmel,at91sam9260-adc"; 244 compatible = "atmel,at91sam9260-adc";
231 reg = <0xf8018000 0x100>; 245 reg = <0xf8018000 0x100>;
232 interrupts = <29 4 5>; 246 interrupts = <29 IRQ_TYPE_LEVEL_HIGH 5>;
233 pinctrl-names = "default"; 247 pinctrl-names = "default";
234 pinctrl-0 = < 248 pinctrl-0 = <
235 &pinctrl_adc0_adtrg 249 &pinctrl_adc0_adtrg
@@ -283,7 +297,7 @@
283 tsadcc: tsadcc@f8018000 { 297 tsadcc: tsadcc@f8018000 {
284 compatible = "atmel,at91sam9x5-tsadcc"; 298 compatible = "atmel,at91sam9x5-tsadcc";
285 reg = <0xf8018000 0x4000>; 299 reg = <0xf8018000 0x4000>;
286 interrupts = <29 4 5>; 300 interrupts = <29 IRQ_TYPE_LEVEL_HIGH 5>;
287 atmel,tsadcc_clock = <300000>; 301 atmel,tsadcc_clock = <300000>;
288 atmel,filtering_average = <0x03>; 302 atmel,filtering_average = <0x03>;
289 atmel,pendet_debounce = <0x08>; 303 atmel,pendet_debounce = <0x08>;
@@ -295,9 +309,9 @@
295 i2c2: i2c@f801c000 { 309 i2c2: i2c@f801c000 {
296 compatible = "atmel,at91sam9x5-i2c"; 310 compatible = "atmel,at91sam9x5-i2c";
297 reg = <0xf801c000 0x4000>; 311 reg = <0xf801c000 0x4000>;
298 interrupts = <20 4 6>; 312 interrupts = <20 IRQ_TYPE_LEVEL_HIGH 6>;
299 dmas = <&dma1 2 11>, 313 dmas = <&dma1 2 AT91_DMA_CFG_PER_ID(11)>,
300 <&dma1 2 12>; 314 <&dma1 2 AT91_DMA_CFG_PER_ID(12)>;
301 dma-names = "tx", "rx"; 315 dma-names = "tx", "rx";
302 #address-cells = <1>; 316 #address-cells = <1>;
303 #size-cells = <0>; 317 #size-cells = <0>;
@@ -307,7 +321,7 @@
307 usart2: serial@f8020000 { 321 usart2: serial@f8020000 {
308 compatible = "atmel,at91sam9260-usart"; 322 compatible = "atmel,at91sam9260-usart";
309 reg = <0xf8020000 0x100>; 323 reg = <0xf8020000 0x100>;
310 interrupts = <14 4 5>; 324 interrupts = <14 IRQ_TYPE_LEVEL_HIGH 5>;
311 pinctrl-names = "default"; 325 pinctrl-names = "default";
312 pinctrl-0 = <&pinctrl_usart2>; 326 pinctrl-0 = <&pinctrl_usart2>;
313 status = "disabled"; 327 status = "disabled";
@@ -316,7 +330,7 @@
316 usart3: serial@f8024000 { 330 usart3: serial@f8024000 {
317 compatible = "atmel,at91sam9260-usart"; 331 compatible = "atmel,at91sam9260-usart";
318 reg = <0xf8024000 0x100>; 332 reg = <0xf8024000 0x100>;
319 interrupts = <15 4 5>; 333 interrupts = <15 IRQ_TYPE_LEVEL_HIGH 5>;
320 pinctrl-names = "default"; 334 pinctrl-names = "default";
321 pinctrl-0 = <&pinctrl_usart3>; 335 pinctrl-0 = <&pinctrl_usart3>;
322 status = "disabled"; 336 status = "disabled";
@@ -325,7 +339,7 @@
325 macb1: ethernet@f802c000 { 339 macb1: ethernet@f802c000 {
326 compatible = "cdns,at32ap7000-macb", "cdns,macb"; 340 compatible = "cdns,at32ap7000-macb", "cdns,macb";
327 reg = <0xf802c000 0x100>; 341 reg = <0xf802c000 0x100>;
328 interrupts = <35 4 3>; 342 interrupts = <35 IRQ_TYPE_LEVEL_HIGH 3>;
329 pinctrl-names = "default"; 343 pinctrl-names = "default";
330 pinctrl-0 = <&pinctrl_macb1_rmii>; 344 pinctrl-0 = <&pinctrl_macb1_rmii>;
331 status = "disabled"; 345 status = "disabled";
@@ -334,7 +348,7 @@
334 sha@f8034000 { 348 sha@f8034000 {
335 compatible = "atmel,sam9g46-sha"; 349 compatible = "atmel,sam9g46-sha";
336 reg = <0xf8034000 0x100>; 350 reg = <0xf8034000 0x100>;
337 interrupts = <42 4 0>; 351 interrupts = <42 IRQ_TYPE_LEVEL_HIGH 0>;
338 }; 352 };
339 353
340 aes@f8038000 { 354 aes@f8038000 {
@@ -346,20 +360,20 @@
346 tdes@f803c000 { 360 tdes@f803c000 {
347 compatible = "atmel,sam9g46-tdes"; 361 compatible = "atmel,sam9g46-tdes";
348 reg = <0xf803c000 0x100>; 362 reg = <0xf803c000 0x100>;
349 interrupts = <44 4 0>; 363 interrupts = <44 IRQ_TYPE_LEVEL_HIGH 0>;
350 }; 364 };
351 365
352 dma0: dma-controller@ffffe600 { 366 dma0: dma-controller@ffffe600 {
353 compatible = "atmel,at91sam9g45-dma"; 367 compatible = "atmel,at91sam9g45-dma";
354 reg = <0xffffe600 0x200>; 368 reg = <0xffffe600 0x200>;
355 interrupts = <30 4 0>; 369 interrupts = <30 IRQ_TYPE_LEVEL_HIGH 0>;
356 #dma-cells = <2>; 370 #dma-cells = <2>;
357 }; 371 };
358 372
359 dma1: dma-controller@ffffe800 { 373 dma1: dma-controller@ffffe800 {
360 compatible = "atmel,at91sam9g45-dma"; 374 compatible = "atmel,at91sam9g45-dma";
361 reg = <0xffffe800 0x200>; 375 reg = <0xffffe800 0x200>;
362 interrupts = <31 4 0>; 376 interrupts = <31 IRQ_TYPE_LEVEL_HIGH 0>;
363 #dma-cells = <2>; 377 #dma-cells = <2>;
364 }; 378 };
365 379
@@ -371,7 +385,7 @@
371 dbgu: serial@ffffee00 { 385 dbgu: serial@ffffee00 {
372 compatible = "atmel,at91sam9260-usart"; 386 compatible = "atmel,at91sam9260-usart";
373 reg = <0xffffee00 0x200>; 387 reg = <0xffffee00 0x200>;
374 interrupts = <2 4 7>; 388 interrupts = <2 IRQ_TYPE_LEVEL_HIGH 7>;
375 pinctrl-names = "default"; 389 pinctrl-names = "default";
376 pinctrl-0 = <&pinctrl_dbgu>; 390 pinctrl-0 = <&pinctrl_dbgu>;
377 status = "disabled"; 391 status = "disabled";
@@ -403,202 +417,202 @@
403 adc0 { 417 adc0 {
404 pinctrl_adc0_adtrg: adc0_adtrg { 418 pinctrl_adc0_adtrg: adc0_adtrg {
405 atmel,pins = 419 atmel,pins =
406 <3 19 0x1 0x0>; /* PD19 periph A ADTRG */ 420 <AT91_PIOD 19 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PD19 periph A ADTRG */
407 }; 421 };
408 pinctrl_adc0_ad0: adc0_ad0 { 422 pinctrl_adc0_ad0: adc0_ad0 {
409 atmel,pins = 423 atmel,pins =
410 <3 20 0x1 0x0>; /* PD20 periph A AD0 */ 424 <AT91_PIOD 20 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PD20 periph A AD0 */
411 }; 425 };
412 pinctrl_adc0_ad1: adc0_ad1 { 426 pinctrl_adc0_ad1: adc0_ad1 {
413 atmel,pins = 427 atmel,pins =
414 <3 21 0x1 0x0>; /* PD21 periph A AD1 */ 428 <AT91_PIOD 21 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PD21 periph A AD1 */
415 }; 429 };
416 pinctrl_adc0_ad2: adc0_ad2 { 430 pinctrl_adc0_ad2: adc0_ad2 {
417 atmel,pins = 431 atmel,pins =
418 <3 22 0x1 0x0>; /* PD22 periph A AD2 */ 432 <AT91_PIOD 22 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PD22 periph A AD2 */
419 }; 433 };
420 pinctrl_adc0_ad3: adc0_ad3 { 434 pinctrl_adc0_ad3: adc0_ad3 {
421 atmel,pins = 435 atmel,pins =
422 <3 23 0x1 0x0>; /* PD23 periph A AD3 */ 436 <AT91_PIOD 23 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PD23 periph A AD3 */
423 }; 437 };
424 pinctrl_adc0_ad4: adc0_ad4 { 438 pinctrl_adc0_ad4: adc0_ad4 {
425 atmel,pins = 439 atmel,pins =
426 <3 24 0x1 0x0>; /* PD24 periph A AD4 */ 440 <AT91_PIOD 24 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PD24 periph A AD4 */
427 }; 441 };
428 pinctrl_adc0_ad5: adc0_ad5 { 442 pinctrl_adc0_ad5: adc0_ad5 {
429 atmel,pins = 443 atmel,pins =
430 <3 25 0x1 0x0>; /* PD25 periph A AD5 */ 444 <AT91_PIOD 25 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PD25 periph A AD5 */
431 }; 445 };
432 pinctrl_adc0_ad6: adc0_ad6 { 446 pinctrl_adc0_ad6: adc0_ad6 {
433 atmel,pins = 447 atmel,pins =
434 <3 26 0x1 0x0>; /* PD26 periph A AD6 */ 448 <AT91_PIOD 26 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PD26 periph A AD6 */
435 }; 449 };
436 pinctrl_adc0_ad7: adc0_ad7 { 450 pinctrl_adc0_ad7: adc0_ad7 {
437 atmel,pins = 451 atmel,pins =
438 <3 27 0x1 0x0>; /* PD27 periph A AD7 */ 452 <AT91_PIOD 27 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PD27 periph A AD7 */
439 }; 453 };
440 pinctrl_adc0_ad8: adc0_ad8 { 454 pinctrl_adc0_ad8: adc0_ad8 {
441 atmel,pins = 455 atmel,pins =
442 <3 28 0x1 0x0>; /* PD28 periph A AD8 */ 456 <AT91_PIOD 28 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PD28 periph A AD8 */
443 }; 457 };
444 pinctrl_adc0_ad9: adc0_ad9 { 458 pinctrl_adc0_ad9: adc0_ad9 {
445 atmel,pins = 459 atmel,pins =
446 <3 29 0x1 0x0>; /* PD29 periph A AD9 */ 460 <AT91_PIOD 29 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PD29 periph A AD9 */
447 }; 461 };
448 pinctrl_adc0_ad10: adc0_ad10 { 462 pinctrl_adc0_ad10: adc0_ad10 {
449 atmel,pins = 463 atmel,pins =
450 <3 30 0x1 0x0>; /* PD30 periph A AD10, conflicts with PCK0 */ 464 <AT91_PIOD 30 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PD30 periph A AD10, conflicts with PCK0 */
451 }; 465 };
452 pinctrl_adc0_ad11: adc0_ad11 { 466 pinctrl_adc0_ad11: adc0_ad11 {
453 atmel,pins = 467 atmel,pins =
454 <3 31 0x1 0x0>; /* PD31 periph A AD11, conflicts with PCK1 */ 468 <AT91_PIOD 31 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PD31 periph A AD11, conflicts with PCK1 */
455 }; 469 };
456 }; 470 };
457 471
458 can0 { 472 can0 {
459 pinctrl_can0_rx_tx: can0_rx_tx { 473 pinctrl_can0_rx_tx: can0_rx_tx {
460 atmel,pins = 474 atmel,pins =
461 <3 14 0x3 0x0 /* PD14 periph C RX, conflicts with SCK0, SPI0_NPCS1 */ 475 <AT91_PIOD 14 AT91_PERIPH_C AT91_PINCTRL_NONE /* PD14 periph C RX, conflicts with SCK0, SPI0_NPCS1 */
462 3 15 0x3 0x0>; /* PD15 periph C TX, conflicts with CTS0, SPI0_NPCS2 */ 476 AT91_PIOD 15 AT91_PERIPH_C AT91_PINCTRL_NONE>; /* PD15 periph C TX, conflicts with CTS0, SPI0_NPCS2 */
463 }; 477 };
464 }; 478 };
465 479
466 can1 { 480 can1 {
467 pinctrl_can1_rx_tx: can1_rx_tx { 481 pinctrl_can1_rx_tx: can1_rx_tx {
468 atmel,pins = 482 atmel,pins =
469 <1 14 0x2 0x0 /* PB14 periph B RX, conflicts with GCRS */ 483 <AT91_PIOB 14 AT91_PERIPH_B AT91_PINCTRL_NONE /* PB14 periph B RX, conflicts with GCRS */
470 1 15 0x2 0x0>; /* PB15 periph B TX, conflicts with GCOL */ 484 AT91_PIOB 15 AT91_PERIPH_B AT91_PINCTRL_NONE>; /* PB15 periph B TX, conflicts with GCOL */
471 }; 485 };
472 }; 486 };
473 487
474 dbgu { 488 dbgu {
475 pinctrl_dbgu: dbgu-0 { 489 pinctrl_dbgu: dbgu-0 {
476 atmel,pins = 490 atmel,pins =
477 <1 30 0x1 0x0 /* PB30 periph A */ 491 <AT91_PIOB 30 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB30 periph A */
478 1 31 0x1 0x1>; /* PB31 periph A with pullup */ 492 AT91_PIOB 31 AT91_PERIPH_A AT91_PINCTRL_PULL_UP>; /* PB31 periph A with pullup */
479 }; 493 };
480 }; 494 };
481 495
482 i2c0 { 496 i2c0 {
483 pinctrl_i2c0: i2c0-0 { 497 pinctrl_i2c0: i2c0-0 {
484 atmel,pins = 498 atmel,pins =
485 <0 30 0x1 0x0 /* PA30 periph A TWD0 pin, conflicts with URXD1, ISI_VSYNC */ 499 <AT91_PIOA 30 AT91_PERIPH_A AT91_PINCTRL_NONE /* PA30 periph A TWD0 pin, conflicts with URXD1, ISI_VSYNC */
486 0 31 0x1 0x0>; /* PA31 periph A TWCK0 pin, conflicts with UTXD1, ISI_HSYNC */ 500 AT91_PIOA 31 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PA31 periph A TWCK0 pin, conflicts with UTXD1, ISI_HSYNC */
487 }; 501 };
488 }; 502 };
489 503
490 i2c1 { 504 i2c1 {
491 pinctrl_i2c1: i2c1-0 { 505 pinctrl_i2c1: i2c1-0 {
492 atmel,pins = 506 atmel,pins =
493 <2 26 0x2 0x0 /* PC26 periph B TWD1 pin, conflicts with SPI1_NPCS1, ISI_D11 */ 507 <AT91_PIOC 26 AT91_PERIPH_B AT91_PINCTRL_NONE /* PC26 periph B TWD1 pin, conflicts with SPI1_NPCS1, ISI_D11 */
494 2 27 0x2 0x0>; /* PC27 periph B TWCK1 pin, conflicts with SPI1_NPCS2, ISI_D10 */ 508 AT91_PIOC 27 AT91_PERIPH_B AT91_PINCTRL_NONE>; /* PC27 periph B TWCK1 pin, conflicts with SPI1_NPCS2, ISI_D10 */
495 }; 509 };
496 }; 510 };
497 511
498 isi { 512 isi {
499 pinctrl_isi: isi-0 { 513 pinctrl_isi: isi-0 {
500 atmel,pins = 514 atmel,pins =
501 <0 16 0x3 0x0 /* PA16 periph C ISI_D0, conflicts with LCDDAT16 */ 515 <AT91_PIOA 16 AT91_PERIPH_C AT91_PINCTRL_NONE /* PA16 periph C ISI_D0, conflicts with LCDDAT16 */
502 0 17 0x3 0x0 /* PA17 periph C ISI_D1, conflicts with LCDDAT17 */ 516 AT91_PIOA 17 AT91_PERIPH_C AT91_PINCTRL_NONE /* PA17 periph C ISI_D1, conflicts with LCDDAT17 */
503 0 18 0x3 0x0 /* PA18 periph C ISI_D2, conflicts with LCDDAT18, TWD2 */ 517 AT91_PIOA 18 AT91_PERIPH_C AT91_PINCTRL_NONE /* PA18 periph C ISI_D2, conflicts with LCDDAT18, TWD2 */
504 0 19 0x3 0x0 /* PA19 periph C ISI_D3, conflicts with LCDDAT19, TWCK2 */ 518 AT91_PIOA 19 AT91_PERIPH_C AT91_PINCTRL_NONE /* PA19 periph C ISI_D3, conflicts with LCDDAT19, TWCK2 */
505 0 20 0x3 0x0 /* PA20 periph C ISI_D4, conflicts with LCDDAT20, PWMH0 */ 519 AT91_PIOA 20 AT91_PERIPH_C AT91_PINCTRL_NONE /* PA20 periph C ISI_D4, conflicts with LCDDAT20, PWMH0 */
506 0 21 0x3 0x0 /* PA21 periph C ISI_D5, conflicts with LCDDAT21, PWML0 */ 520 AT91_PIOA 21 AT91_PERIPH_C AT91_PINCTRL_NONE /* PA21 periph C ISI_D5, conflicts with LCDDAT21, PWML0 */
507 0 22 0x3 0x0 /* PA22 periph C ISI_D6, conflicts with LCDDAT22, PWMH1 */ 521 AT91_PIOA 22 AT91_PERIPH_C AT91_PINCTRL_NONE /* PA22 periph C ISI_D6, conflicts with LCDDAT22, PWMH1 */
508 0 23 0x3 0x0 /* PA23 periph C ISI_D7, conflicts with LCDDAT23, PWML1 */ 522 AT91_PIOA 23 AT91_PERIPH_C AT91_PINCTRL_NONE /* PA23 periph C ISI_D7, conflicts with LCDDAT23, PWML1 */
509 2 30 0x3 0x0 /* PC30 periph C ISI_PCK, conflicts with UTXD0 */ 523 AT91_PIOC 30 AT91_PERIPH_C AT91_PINCTRL_NONE /* PC30 periph C ISI_PCK, conflicts with UTXD0 */
510 0 31 0x3 0x0 /* PA31 periph C ISI_HSYNC, conflicts with TWCK0, UTXD1 */ 524 AT91_PIOA 31 AT91_PERIPH_C AT91_PINCTRL_NONE /* PA31 periph C ISI_HSYNC, conflicts with TWCK0, UTXD1 */
511 0 30 0x3 0x0 /* PA30 periph C ISI_VSYNC, conflicts with TWD0, URXD1 */ 525 AT91_PIOA 30 AT91_PERIPH_C AT91_PINCTRL_NONE /* PA30 periph C ISI_VSYNC, conflicts with TWD0, URXD1 */
512 2 29 0x3 0x0 /* PC29 periph C ISI_PD8, conflicts with URXD0, PWMFI2 */ 526 AT91_PIOC 29 AT91_PERIPH_C AT91_PINCTRL_NONE /* PC29 periph C ISI_PD8, conflicts with URXD0, PWMFI2 */
513 2 28 0x3 0x0>; /* PC28 periph C ISI_PD9, conflicts with SPI1_NPCS3, PWMFI0 */ 527 AT91_PIOC 28 AT91_PERIPH_C AT91_PINCTRL_NONE>; /* PC28 periph C ISI_PD9, conflicts with SPI1_NPCS3, PWMFI0 */
514 }; 528 };
515 pinctrl_isi_pck_as_mck: isi_pck_as_mck-0 { 529 pinctrl_isi_pck_as_mck: isi_pck_as_mck-0 {
516 atmel,pins = 530 atmel,pins =
517 <3 31 0x2 0x0>; /* PD31 periph B ISI_MCK */ 531 <AT91_PIOD 31 AT91_PERIPH_B AT91_PINCTRL_NONE>; /* PD31 periph B ISI_MCK */
518 }; 532 };
519 }; 533 };
520 534
521 lcd { 535 lcd {
522 pinctrl_lcd: lcd-0 { 536 pinctrl_lcd: lcd-0 {
523 atmel,pins = 537 atmel,pins =
524 <0 24 0x1 0x0 /* PA24 periph A LCDPWM */ 538 <AT91_PIOA 24 AT91_PERIPH_A AT91_PINCTRL_NONE /* PA24 periph A LCDPWM */
525 0 26 0x1 0x0 /* PA26 periph A LCDVSYNC */ 539 AT91_PIOA 26 AT91_PERIPH_A AT91_PINCTRL_NONE /* PA26 periph A LCDVSYNC */
526 0 27 0x1 0x0 /* PA27 periph A LCDHSYNC */ 540 AT91_PIOA 27 AT91_PERIPH_A AT91_PINCTRL_NONE /* PA27 periph A LCDHSYNC */
527 0 25 0x1 0x0 /* PA25 periph A LCDDISP */ 541 AT91_PIOA 25 AT91_PERIPH_A AT91_PINCTRL_NONE /* PA25 periph A LCDDISP */
528 0 29 0x1 0x0 /* PA29 periph A LCDDEN */ 542 AT91_PIOA 29 AT91_PERIPH_A AT91_PINCTRL_NONE /* PA29 periph A LCDDEN */
529 0 28 0x1 0x0 /* PA28 periph A LCDPCK */ 543 AT91_PIOA 28 AT91_PERIPH_A AT91_PINCTRL_NONE /* PA28 periph A LCDPCK */
530 0 0 0x1 0x0 /* PA0 periph A LCDD0 pin */ 544 AT91_PIOA 0 AT91_PERIPH_A AT91_PINCTRL_NONE /* PA0 periph A LCDD0 pin */
531 0 1 0x1 0x0 /* PA1 periph A LCDD1 pin */ 545 AT91_PIOA 1 AT91_PERIPH_A AT91_PINCTRL_NONE /* PA1 periph A LCDD1 pin */
532 0 2 0x1 0x0 /* PA2 periph A LCDD2 pin */ 546 AT91_PIOA 2 AT91_PERIPH_A AT91_PINCTRL_NONE /* PA2 periph A LCDD2 pin */
533 0 3 0x1 0x0 /* PA3 periph A LCDD3 pin */ 547 AT91_PIOA 3 AT91_PERIPH_A AT91_PINCTRL_NONE /* PA3 periph A LCDD3 pin */
534 0 4 0x1 0x0 /* PA4 periph A LCDD4 pin */ 548 AT91_PIOA 4 AT91_PERIPH_A AT91_PINCTRL_NONE /* PA4 periph A LCDD4 pin */
535 0 5 0x1 0x0 /* PA5 periph A LCDD5 pin */ 549 AT91_PIOA 5 AT91_PERIPH_A AT91_PINCTRL_NONE /* PA5 periph A LCDD5 pin */
536 0 6 0x1 0x0 /* PA6 periph A LCDD6 pin */ 550 AT91_PIOA 6 AT91_PERIPH_A AT91_PINCTRL_NONE /* PA6 periph A LCDD6 pin */
537 0 7 0x1 0x0 /* PA7 periph A LCDD7 pin */ 551 AT91_PIOA 7 AT91_PERIPH_A AT91_PINCTRL_NONE /* PA7 periph A LCDD7 pin */
538 0 8 0x1 0x0 /* PA8 periph A LCDD8 pin */ 552 AT91_PIOA 8 AT91_PERIPH_A AT91_PINCTRL_NONE /* PA8 periph A LCDD8 pin */
539 0 9 0x1 0x0 /* PA9 periph A LCDD9 pin */ 553 AT91_PIOA 9 AT91_PERIPH_A AT91_PINCTRL_NONE /* PA9 periph A LCDD9 pin */
540 0 10 0x1 0x0 /* PA10 periph A LCDD10 pin */ 554 AT91_PIOA 10 AT91_PERIPH_A AT91_PINCTRL_NONE /* PA10 periph A LCDD10 pin */
541 0 11 0x1 0x0 /* PA11 periph A LCDD11 pin */ 555 AT91_PIOA 11 AT91_PERIPH_A AT91_PINCTRL_NONE /* PA11 periph A LCDD11 pin */
542 0 12 0x1 0x0 /* PA12 periph A LCDD12 pin */ 556 AT91_PIOA 12 AT91_PERIPH_A AT91_PINCTRL_NONE /* PA12 periph A LCDD12 pin */
543 0 13 0x1 0x0 /* PA13 periph A LCDD13 pin */ 557 AT91_PIOA 13 AT91_PERIPH_A AT91_PINCTRL_NONE /* PA13 periph A LCDD13 pin */
544 0 14 0x1 0x0 /* PA14 periph A LCDD14 pin */ 558 AT91_PIOA 14 AT91_PERIPH_A AT91_PINCTRL_NONE /* PA14 periph A LCDD14 pin */
545 0 15 0x1 0x0 /* PA15 periph A LCDD15 pin */ 559 AT91_PIOA 15 AT91_PERIPH_A AT91_PINCTRL_NONE /* PA15 periph A LCDD15 pin */
546 2 14 0x3 0x0 /* PC14 periph C LCDD16 pin */ 560 AT91_PIOC 14 AT91_PERIPH_C AT91_PINCTRL_NONE /* PC14 periph C LCDD16 pin */
547 2 13 0x3 0x0 /* PC13 periph C LCDD17 pin */ 561 AT91_PIOC 13 AT91_PERIPH_C AT91_PINCTRL_NONE /* PC13 periph C LCDD17 pin */
548 2 12 0x3 0x0 /* PC12 periph C LCDD18 pin */ 562 AT91_PIOC 12 AT91_PERIPH_C AT91_PINCTRL_NONE /* PC12 periph C LCDD18 pin */
549 2 11 0x3 0x0 /* PC11 periph C LCDD19 pin */ 563 AT91_PIOC 11 AT91_PERIPH_C AT91_PINCTRL_NONE /* PC11 periph C LCDD19 pin */
550 2 10 0x3 0x0 /* PC10 periph C LCDD20 pin */ 564 AT91_PIOC 10 AT91_PERIPH_C AT91_PINCTRL_NONE /* PC10 periph C LCDD20 pin */
551 2 15 0x3 0x0 /* PC15 periph C LCDD21 pin */ 565 AT91_PIOC 15 AT91_PERIPH_C AT91_PINCTRL_NONE /* PC15 periph C LCDD21 pin */
552 4 27 0x3 0x0 /* PE27 periph C LCDD22 pin */ 566 AT91_PIOE 27 AT91_PERIPH_C AT91_PINCTRL_NONE /* PE27 periph C LCDD22 pin */
553 4 28 0x3 0x0>; /* PE28 periph C LCDD23 pin */ 567 AT91_PIOE 28 AT91_PERIPH_C AT91_PINCTRL_NONE>; /* PE28 periph C LCDD23 pin */
554 }; 568 };
555 }; 569 };
556 570
557 macb0 { 571 macb0 {
558 pinctrl_macb0_data_rgmii: macb0_data_rgmii { 572 pinctrl_macb0_data_rgmii: macb0_data_rgmii {
559 atmel,pins = 573 atmel,pins =
560 <1 0 0x1 0x0 /* PB0 periph A GTX0, conflicts with PWMH0 */ 574 <AT91_PIOB 0 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB0 periph A GTX0, conflicts with PWMH0 */
561 1 1 0x1 0x0 /* PB1 periph A GTX1, conflicts with PWML0 */ 575 AT91_PIOB 1 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB1 periph A GTX1, conflicts with PWML0 */
562 1 2 0x1 0x0 /* PB2 periph A GTX2, conflicts with TK1 */ 576 AT91_PIOB 2 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB2 periph A GTX2, conflicts with TK1 */
563 1 3 0x1 0x0 /* PB3 periph A GTX3, conflicts with TF1 */ 577 AT91_PIOB 3 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB3 periph A GTX3, conflicts with TF1 */
564 1 4 0x1 0x0 /* PB4 periph A GRX0, conflicts with PWMH1 */ 578 AT91_PIOB 4 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB4 periph A GRX0, conflicts with PWMH1 */
565 1 5 0x1 0x0 /* PB5 periph A GRX1, conflicts with PWML1 */ 579 AT91_PIOB 5 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB5 periph A GRX1, conflicts with PWML1 */
566 1 6 0x1 0x0 /* PB6 periph A GRX2, conflicts with TD1 */ 580 AT91_PIOB 6 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB6 periph A GRX2, conflicts with TD1 */
567 1 7 0x1 0x0>; /* PB7 periph A GRX3, conflicts with RK1 */ 581 AT91_PIOB 7 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PB7 periph A GRX3, conflicts with RK1 */
568 }; 582 };
569 pinctrl_macb0_data_gmii: macb0_data_gmii { 583 pinctrl_macb0_data_gmii: macb0_data_gmii {
570 atmel,pins = 584 atmel,pins =
571 <1 19 0x2 0x0 /* PB19 periph B GTX4, conflicts with MCI1_CDA */ 585 <AT91_PIOB 19 AT91_PERIPH_B AT91_PINCTRL_NONE /* PB19 periph B GTX4, conflicts with MCI1_CDA */
572 1 20 0x2 0x0 /* PB20 periph B GTX5, conflicts with MCI1_DA0 */ 586 AT91_PIOB 20 AT91_PERIPH_B AT91_PINCTRL_NONE /* PB20 periph B GTX5, conflicts with MCI1_DA0 */
573 1 21 0x2 0x0 /* PB21 periph B GTX6, conflicts with MCI1_DA1 */ 587 AT91_PIOB 21 AT91_PERIPH_B AT91_PINCTRL_NONE /* PB21 periph B GTX6, conflicts with MCI1_DA1 */
574 1 22 0x2 0x0 /* PB22 periph B GTX7, conflicts with MCI1_DA2 */ 588 AT91_PIOB 22 AT91_PERIPH_B AT91_PINCTRL_NONE /* PB22 periph B GTX7, conflicts with MCI1_DA2 */
575 1 23 0x2 0x0 /* PB23 periph B GRX4, conflicts with MCI1_DA3 */ 589 AT91_PIOB 23 AT91_PERIPH_B AT91_PINCTRL_NONE /* PB23 periph B GRX4, conflicts with MCI1_DA3 */
576 1 24 0x2 0x0 /* PB24 periph B GRX5, conflicts with MCI1_CK */ 590 AT91_PIOB 24 AT91_PERIPH_B AT91_PINCTRL_NONE /* PB24 periph B GRX5, conflicts with MCI1_CK */
577 1 25 0x2 0x0 /* PB25 periph B GRX6, conflicts with SCK1 */ 591 AT91_PIOB 25 AT91_PERIPH_B AT91_PINCTRL_NONE /* PB25 periph B GRX6, conflicts with SCK1 */
578 1 26 0x2 0x0>; /* PB26 periph B GRX7, conflicts with CTS1 */ 592 AT91_PIOB 26 AT91_PERIPH_B AT91_PINCTRL_NONE>; /* PB26 periph B GRX7, conflicts with CTS1 */
579 }; 593 };
580 pinctrl_macb0_signal_rgmii: macb0_signal_rgmii { 594 pinctrl_macb0_signal_rgmii: macb0_signal_rgmii {
581 atmel,pins = 595 atmel,pins =
582 <1 8 0x1 0x0 /* PB8 periph A GTXCK, conflicts with PWMH2 */ 596 <AT91_PIOB 8 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB8 periph A GTXCK, conflicts with PWMH2 */
583 1 9 0x1 0x0 /* PB9 periph A GTXEN, conflicts with PWML2 */ 597 AT91_PIOB 9 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB9 periph A GTXEN, conflicts with PWML2 */
584 1 11 0x1 0x0 /* PB11 periph A GRXCK, conflicts with RD1 */ 598 AT91_PIOB 11 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB11 periph A GRXCK, conflicts with RD1 */
585 1 13 0x1 0x0 /* PB13 periph A GRXER, conflicts with PWML3 */ 599 AT91_PIOB 13 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB13 periph A GRXER, conflicts with PWML3 */
586 1 16 0x1 0x0 /* PB16 periph A GMDC */ 600 AT91_PIOB 16 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB16 periph A GMDC */
587 1 17 0x1 0x0 /* PB17 periph A GMDIO */ 601 AT91_PIOB 17 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB17 periph A GMDIO */
588 1 18 0x1 0x0>; /* PB18 periph A G125CK */ 602 AT91_PIOB 18 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PB18 periph A G125CK */
589 }; 603 };
590 pinctrl_macb0_signal_gmii: macb0_signal_gmii { 604 pinctrl_macb0_signal_gmii: macb0_signal_gmii {
591 atmel,pins = 605 atmel,pins =
592 <1 9 0x1 0x0 /* PB9 periph A GTXEN, conflicts with PWML2 */ 606 <AT91_PIOB 9 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB9 periph A GTXEN, conflicts with PWML2 */
593 1 10 0x1 0x0 /* PB10 periph A GTXER, conflicts with RF1 */ 607 AT91_PIOB 10 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB10 periph A GTXER, conflicts with RF1 */
594 1 11 0x1 0x0 /* PB11 periph A GRXCK, conflicts with RD1 */ 608 AT91_PIOB 11 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB11 periph A GRXCK, conflicts with RD1 */
595 1 12 0x1 0x0 /* PB12 periph A GRXDV, conflicts with PWMH3 */ 609 AT91_PIOB 12 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB12 periph A GRXDV, conflicts with PWMH3 */
596 1 13 0x1 0x0 /* PB13 periph A GRXER, conflicts with PWML3 */ 610 AT91_PIOB 13 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB13 periph A GRXER, conflicts with PWML3 */
597 1 14 0x1 0x0 /* PB14 periph A GCRS, conflicts with CANRX1 */ 611 AT91_PIOB 14 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB14 periph A GCRS, conflicts with CANRX1 */
598 1 15 0x1 0x0 /* PB15 periph A GCOL, conflicts with CANTX1 */ 612 AT91_PIOB 15 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB15 periph A GCOL, conflicts with CANTX1 */
599 1 16 0x1 0x0 /* PB16 periph A GMDC */ 613 AT91_PIOB 16 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB16 periph A GMDC */
600 1 17 0x1 0x0 /* PB17 periph A GMDIO */ 614 AT91_PIOB 17 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB17 periph A GMDIO */
601 1 27 0x2 0x0>; /* PB27 periph B G125CKO */ 615 AT91_PIOB 27 AT91_PERIPH_B AT91_PINCTRL_NONE>; /* PB27 periph B G125CKO */
602 }; 616 };
603 617
604 }; 618 };
@@ -606,252 +620,251 @@
606 macb1 { 620 macb1 {
607 pinctrl_macb1_rmii: macb1_rmii-0 { 621 pinctrl_macb1_rmii: macb1_rmii-0 {
608 atmel,pins = 622 atmel,pins =
609 <2 0 0x1 0x0 /* PC0 periph A ETX0, conflicts with TIOA3 */ 623 <AT91_PIOC 0 AT91_PERIPH_A AT91_PINCTRL_NONE /* PC0 periph A ETX0, conflicts with TIOA3 */
610 2 1 0x1 0x0 /* PC1 periph A ETX1, conflicts with TIOB3 */ 624 AT91_PIOC 1 AT91_PERIPH_A AT91_PINCTRL_NONE /* PC1 periph A ETX1, conflicts with TIOB3 */
611 2 2 0x1 0x0 /* PC2 periph A ERX0, conflicts with TCLK3 */ 625 AT91_PIOC 2 AT91_PERIPH_A AT91_PINCTRL_NONE /* PC2 periph A ERX0, conflicts with TCLK3 */
612 2 3 0x1 0x0 /* PC3 periph A ERX1, conflicts with TIOA4 */ 626 AT91_PIOC 3 AT91_PERIPH_A AT91_PINCTRL_NONE /* PC3 periph A ERX1, conflicts with TIOA4 */
613 2 4 0x1 0x0 /* PC4 periph A ETXEN, conflicts with TIOB4 */ 627 AT91_PIOC 4 AT91_PERIPH_A AT91_PINCTRL_NONE /* PC4 periph A ETXEN, conflicts with TIOB4 */
614 2 5 0x1 0x0 /* PC5 periph A ECRSDV,conflicts with TCLK4 */ 628 AT91_PIOC 5 AT91_PERIPH_A AT91_PINCTRL_NONE /* PC5 periph A ECRSDV,conflicts with TCLK4 */
615 2 6 0x1 0x0 /* PC6 periph A ERXER, conflicts with TIOA5 */ 629 AT91_PIOC 6 AT91_PERIPH_A AT91_PINCTRL_NONE /* PC6 periph A ERXER, conflicts with TIOA5 */
616 2 7 0x1 0x0 /* PC7 periph A EREFCK, conflicts with TIOB5 */ 630 AT91_PIOC 7 AT91_PERIPH_A AT91_PINCTRL_NONE /* PC7 periph A EREFCK, conflicts with TIOB5 */
617 2 8 0x1 0x0 /* PC8 periph A EMDC, conflicts with TCLK5 */ 631 AT91_PIOC 8 AT91_PERIPH_A AT91_PINCTRL_NONE /* PC8 periph A EMDC, conflicts with TCLK5 */
618 2 9 0x1 0x0>; /* PC9 periph A EMDIO */ 632 AT91_PIOC 9 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PC9 periph A EMDIO */
619 }; 633 };
620 }; 634 };
621 635
622 mmc0 { 636 mmc0 {
623 pinctrl_mmc0_clk_cmd_dat0: mmc0_clk_cmd_dat0 { 637 pinctrl_mmc0_clk_cmd_dat0: mmc0_clk_cmd_dat0 {
624 atmel,pins = 638 atmel,pins =
625 <3 9 0x1 0x0 /* PD9 periph A MCI0_CK */ 639 <AT91_PIOD 9 AT91_PERIPH_A AT91_PINCTRL_NONE /* PD9 periph A MCI0_CK */
626 3 0 0x1 0x1 /* PD0 periph A MCI0_CDA with pullup */ 640 AT91_PIOD 0 AT91_PERIPH_A AT91_PINCTRL_PULL_UP /* PD0 periph A MCI0_CDA with pullup */
627 3 1 0x1 0x1>; /* PD1 periph A MCI0_DA0 with pullup */ 641 AT91_PIOD 1 AT91_PERIPH_A AT91_PINCTRL_PULL_UP>; /* PD1 periph A MCI0_DA0 with pullup */
628 }; 642 };
629 pinctrl_mmc0_dat1_3: mmc0_dat1_3 { 643 pinctrl_mmc0_dat1_3: mmc0_dat1_3 {
630 atmel,pins = 644 atmel,pins =
631 <3 2 0x1 0x1 /* PD2 periph A MCI0_DA1 with pullup */ 645 <AT91_PIOD 2 AT91_PERIPH_A AT91_PINCTRL_PULL_UP /* PD2 periph A MCI0_DA1 with pullup */
632 3 3 0x1 0x1 /* PD3 periph A MCI0_DA2 with pullup */ 646 AT91_PIOD 3 AT91_PERIPH_A AT91_PINCTRL_PULL_UP /* PD3 periph A MCI0_DA2 with pullup */
633 3 4 0x1 0x1>; /* PD4 periph A MCI0_DA3 with pullup */ 647 AT91_PIOD 4 AT91_PERIPH_A AT91_PINCTRL_PULL_UP>; /* PD4 periph A MCI0_DA3 with pullup */
634 }; 648 };
635 pinctrl_mmc0_dat4_7: mmc0_dat4_7 { 649 pinctrl_mmc0_dat4_7: mmc0_dat4_7 {
636 atmel,pins = 650 atmel,pins =
637 <3 5 0x1 0x1 /* PD5 periph A MCI0_DA4 with pullup, conflicts with TIOA0, PWMH2 */ 651 <AT91_PIOD 5 AT91_PERIPH_A AT91_PINCTRL_PULL_UP /* PD5 periph A MCI0_DA4 with pullup, conflicts with TIOA0, PWMH2 */
638 3 6 0x1 0x1 /* PD6 periph A MCI0_DA5 with pullup, conflicts with TIOB0, PWML2 */ 652 AT91_PIOD 6 AT91_PERIPH_A AT91_PINCTRL_PULL_UP /* PD6 periph A MCI0_DA5 with pullup, conflicts with TIOB0, PWML2 */
639 3 7 0x1 0x1 /* PD7 periph A MCI0_DA6 with pullup, conlicts with TCLK0, PWMH3 */ 653 AT91_PIOD 7 AT91_PERIPH_A AT91_PINCTRL_PULL_UP /* PD7 periph A MCI0_DA6 with pullup, conlicts with TCLK0, PWMH3 */
640 3 8 0x1 0x1>; /* PD8 periph A MCI0_DA7 with pullup, conflicts with PWML3 */ 654 AT91_PIOD 8 AT91_PERIPH_A AT91_PINCTRL_PULL_UP>; /* PD8 periph A MCI0_DA7 with pullup, conflicts with PWML3 */
641 }; 655 };
642 }; 656 };
643 657
644 mmc1 { 658 mmc1 {
645 pinctrl_mmc1_clk_cmd_dat0: mmc1_clk_cmd_dat0 { 659 pinctrl_mmc1_clk_cmd_dat0: mmc1_clk_cmd_dat0 {
646 atmel,pins = 660 atmel,pins =
647 <1 24 0x1 0x0 /* PB24 periph A MCI1_CK, conflicts with GRX5 */ 661 <AT91_PIOB 24 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB24 periph A MCI1_CK, conflicts with GRX5 */
648 1 19 0x1 0x1 /* PB19 periph A MCI1_CDA with pullup, conflicts with GTX4 */ 662 AT91_PIOB 19 AT91_PERIPH_A AT91_PINCTRL_PULL_UP /* PB19 periph A MCI1_CDA with pullup, conflicts with GTX4 */
649 1 20 0x1 0x1>; /* PB20 periph A MCI1_DA0 with pullup, conflicts with GTX5 */ 663 AT91_PIOB 20 AT91_PERIPH_A AT91_PINCTRL_PULL_UP>; /* PB20 periph A MCI1_DA0 with pullup, conflicts with GTX5 */
650 }; 664 };
651 pinctrl_mmc1_dat1_3: mmc1_dat1_3 { 665 pinctrl_mmc1_dat1_3: mmc1_dat1_3 {
652 atmel,pins = 666 atmel,pins =
653 <1 21 0x1 0x1 /* PB21 periph A MCI1_DA1 with pullup, conflicts with GTX6 */ 667 <AT91_PIOB 21 AT91_PERIPH_A AT91_PINCTRL_PULL_UP /* PB21 periph A MCI1_DA1 with pullup, conflicts with GTX6 */
654 1 22 0x1 0x1 /* PB22 periph A MCI1_DA2 with pullup, conflicts with GTX7 */ 668 AT91_PIOB 22 AT91_PERIPH_A AT91_PINCTRL_PULL_UP /* PB22 periph A MCI1_DA2 with pullup, conflicts with GTX7 */
655 1 23 0x1 0x1>; /* PB23 periph A MCI1_DA3 with pullup, conflicts with GRX4 */ 669 AT91_PIOB 23 AT91_PERIPH_A AT91_PINCTRL_PULL_UP>; /* PB23 periph A MCI1_DA3 with pullup, conflicts with GRX4 */
656 }; 670 };
657 }; 671 };
658 672
659 mmc2 { 673 mmc2 {
660 pinctrl_mmc2_clk_cmd_dat0: mmc2_clk_cmd_dat0 { 674 pinctrl_mmc2_clk_cmd_dat0: mmc2_clk_cmd_dat0 {
661 atmel,pins = 675 atmel,pins =
662 <2 15 0x1 0x0 /* PC15 periph A MCI2_CK, conflicts with PCK2 */ 676 <AT91_PIOC 15 AT91_PERIPH_A AT91_PINCTRL_NONE /* PC15 periph A MCI2_CK, conflicts with PCK2 */
663 2 10 0x1 0x1 /* PC10 periph A MCI2_CDA with pullup */ 677 AT91_PIOC 10 AT91_PERIPH_A AT91_PINCTRL_PULL_UP /* PC10 periph A MCI2_CDA with pullup */
664 2 11 0x1 0x1>; /* PC11 periph A MCI2_DA0 with pullup */ 678 AT91_PIOC 11 AT91_PERIPH_A AT91_PINCTRL_PULL_UP>; /* PC11 periph A MCI2_DA0 with pullup */
665 }; 679 };
666 pinctrl_mmc2_dat1_3: mmc2_dat1_3 { 680 pinctrl_mmc2_dat1_3: mmc2_dat1_3 {
667 atmel,pins = 681 atmel,pins =
668 <2 12 0x1 0x0 /* PC12 periph A MCI2_DA1 with pullup, conflicts with TIOA1 */ 682 <AT91_PIOC 12 AT91_PERIPH_A AT91_PINCTRL_NONE /* PC12 periph A MCI2_DA1 with pullup, conflicts with TIOA1 */
669 2 13 0x1 0x0 /* PC13 periph A MCI2_DA2 with pullup, conflicts with TIOB1 */ 683 AT91_PIOC 13 AT91_PERIPH_A AT91_PINCTRL_NONE /* PC13 periph A MCI2_DA2 with pullup, conflicts with TIOB1 */
670 2 14 0x1 0x0>; /* PC14 periph A MCI2_DA3 with pullup, conflicts with TCLK1 */ 684 AT91_PIOC 14 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PC14 periph A MCI2_DA3 with pullup, conflicts with TCLK1 */
671 }; 685 };
672 }; 686 };
673 687
674 nand0 { 688 nand0 {
675 pinctrl_nand0_ale_cle: nand0_ale_cle-0 { 689 pinctrl_nand0_ale_cle: nand0_ale_cle-0 {
676 atmel,pins = 690 atmel,pins =
677 <4 21 0x1 0x1 /* PE21 periph A with pullup */ 691 <AT91_PIOE 21 AT91_PERIPH_A AT91_PINCTRL_PULL_UP /* PE21 periph A with pullup */
678 4 22 0x1 0x1>; /* PE22 periph A with pullup */ 692 AT91_PIOE 22 AT91_PERIPH_A AT91_PINCTRL_PULL_UP>; /* PE22 periph A with pullup */
679 }; 693 };
680 }; 694 };
681 695
682 pioA: gpio@fffff200 {
683 compatible = "atmel,at91sam9x5-gpio", "atmel,at91rm9200-gpio";
684 reg = <0xfffff200 0x100>;
685 interrupts = <6 4 1>;
686 #gpio-cells = <2>;
687 gpio-controller;
688 interrupt-controller;
689 #interrupt-cells = <2>;
690 };
691
692 pioB: gpio@fffff400 {
693 compatible = "atmel,at91sam9x5-gpio", "atmel,at91rm9200-gpio";
694 reg = <0xfffff400 0x100>;
695 interrupts = <7 4 1>;
696 #gpio-cells = <2>;
697 gpio-controller;
698 interrupt-controller;
699 #interrupt-cells = <2>;
700 };
701
702 pioC: gpio@fffff600 {
703 compatible = "atmel,at91sam9x5-gpio", "atmel,at91rm9200-gpio";
704 reg = <0xfffff600 0x100>;
705 interrupts = <8 4 1>;
706 #gpio-cells = <2>;
707 gpio-controller;
708 interrupt-controller;
709 #interrupt-cells = <2>;
710 };
711
712 pioD: gpio@fffff800 {
713 compatible = "atmel,at91sam9x5-gpio", "atmel,at91rm9200-gpio";
714 reg = <0xfffff800 0x100>;
715 interrupts = <9 4 1>;
716 #gpio-cells = <2>;
717 gpio-controller;
718 interrupt-controller;
719 #interrupt-cells = <2>;
720 };
721
722 pioE: gpio@fffffa00 {
723 compatible = "atmel,at91sam9x5-gpio", "atmel,at91rm9200-gpio";
724 reg = <0xfffffa00 0x100>;
725 interrupts = <10 4 1>;
726 #gpio-cells = <2>;
727 gpio-controller;
728 interrupt-controller;
729 #interrupt-cells = <2>;
730 };
731
732 spi0 { 696 spi0 {
733 pinctrl_spi0: spi0-0 { 697 pinctrl_spi0: spi0-0 {
734 atmel,pins = 698 atmel,pins =
735 <3 10 0x1 0x0 /* PD10 periph A SPI0_MISO pin */ 699 <AT91_PIOD 10 AT91_PERIPH_A AT91_PINCTRL_NONE /* PD10 periph A SPI0_MISO pin */
736 3 11 0x1 0x0 /* PD11 periph A SPI0_MOSI pin */ 700 AT91_PIOD 11 AT91_PERIPH_A AT91_PINCTRL_NONE /* PD11 periph A SPI0_MOSI pin */
737 3 12 0x1 0x0 /* PD12 periph A SPI0_SPCK pin */ 701 AT91_PIOD 12 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PD12 periph A SPI0_SPCK pin */
738 3 13 0x0 0x0>; /* PD13 GPIO SPI0_NPCS0 pin */
739 }; 702 };
740 }; 703 };
741 704
742 spi1 { 705 spi1 {
743 pinctrl_spi1: spi1-0 { 706 pinctrl_spi1: spi1-0 {
744 atmel,pins = 707 atmel,pins =
745 <2 22 0x1 0x0 /* PC22 periph A SPI1_MISO pin */ 708 <AT91_PIOC 22 AT91_PERIPH_A AT91_PINCTRL_NONE /* PC22 periph A SPI1_MISO pin */
746 2 23 0x1 0x0 /* PC23 periph A SPI1_MOSI pin */ 709 AT91_PIOC 23 AT91_PERIPH_A AT91_PINCTRL_NONE /* PC23 periph A SPI1_MOSI pin */
747 2 24 0x1 0x0 /* PC24 periph A SPI1_SPCK pin */ 710 AT91_PIOC 24 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PC24 periph A SPI1_SPCK pin */
748 2 25 0x0 0x0>; /* PC25 GPIO SPI1_NPCS0 pin */
749 }; 711 };
750 }; 712 };
751 713
752 ssc0 { 714 ssc0 {
753 pinctrl_ssc0_tx: ssc0_tx { 715 pinctrl_ssc0_tx: ssc0_tx {
754 atmel,pins = 716 atmel,pins =
755 <2 16 0x1 0x0 /* PC16 periph A TK0 */ 717 <AT91_PIOC 16 AT91_PERIPH_A AT91_PINCTRL_NONE /* PC16 periph A TK0 */
756 2 17 0x1 0x0 /* PC17 periph A TF0 */ 718 AT91_PIOC 17 AT91_PERIPH_A AT91_PINCTRL_NONE /* PC17 periph A TF0 */
757 2 18 0x1 0x0>; /* PC18 periph A TD0 */ 719 AT91_PIOC 18 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PC18 periph A TD0 */
758 }; 720 };
759 721
760 pinctrl_ssc0_rx: ssc0_rx { 722 pinctrl_ssc0_rx: ssc0_rx {
761 atmel,pins = 723 atmel,pins =
762 <2 19 0x1 0x0 /* PC19 periph A RK0 */ 724 <AT91_PIOC 19 AT91_PERIPH_A AT91_PINCTRL_NONE /* PC19 periph A RK0 */
763 2 20 0x1 0x0 /* PC20 periph A RF0 */ 725 AT91_PIOC 20 AT91_PERIPH_A AT91_PINCTRL_NONE /* PC20 periph A RF0 */
764 2 21 0x1 0x0>; /* PC21 periph A RD0 */ 726 AT91_PIOC 21 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PC21 periph A RD0 */
765 }; 727 };
766 }; 728 };
767 729
768 ssc1 { 730 ssc1 {
769 pinctrl_ssc1_tx: ssc1_tx { 731 pinctrl_ssc1_tx: ssc1_tx {
770 atmel,pins = 732 atmel,pins =
771 <1 2 0x2 0x0 /* PB2 periph B TK1, conflicts with GTX2 */ 733 <AT91_PIOB 2 AT91_PERIPH_B AT91_PINCTRL_NONE /* PB2 periph B TK1, conflicts with GTX2 */
772 1 3 0x2 0x0 /* PB3 periph B TF1, conflicts with GTX3 */ 734 AT91_PIOB 3 AT91_PERIPH_B AT91_PINCTRL_NONE /* PB3 periph B TF1, conflicts with GTX3 */
773 1 6 0x2 0x0>; /* PB6 periph B TD1, conflicts with TD1 */ 735 AT91_PIOB 6 AT91_PERIPH_B AT91_PINCTRL_NONE>; /* PB6 periph B TD1, conflicts with TD1 */
774 }; 736 };
775 737
776 pinctrl_ssc1_rx: ssc1_rx { 738 pinctrl_ssc1_rx: ssc1_rx {
777 atmel,pins = 739 atmel,pins =
778 <1 7 0x2 0x0 /* PB7 periph B RK1, conflicts with EREFCK */ 740 <AT91_PIOB 7 AT91_PERIPH_B AT91_PINCTRL_NONE /* PB7 periph B RK1, conflicts with EREFCK */
779 1 10 0x2 0x0 /* PB10 periph B RF1, conflicts with GTXER */ 741 AT91_PIOB 10 AT91_PERIPH_B AT91_PINCTRL_NONE /* PB10 periph B RF1, conflicts with GTXER */
780 1 11 0x2 0x0>; /* PB11 periph B RD1, conflicts with GRXCK */ 742 AT91_PIOB 11 AT91_PERIPH_B AT91_PINCTRL_NONE>; /* PB11 periph B RD1, conflicts with GRXCK */
781 }; 743 };
782 }; 744 };
783 745
784 uart0 { 746 uart0 {
785 pinctrl_uart0: uart0-0 { 747 pinctrl_uart0: uart0-0 {
786 atmel,pins = 748 atmel,pins =
787 <2 29 0x1 0x0 /* PC29 periph A, conflicts with PWMFI2, ISI_D8 */ 749 <AT91_PIOC 29 AT91_PERIPH_A AT91_PINCTRL_NONE /* PC29 periph A, conflicts with PWMFI2, ISI_D8 */
788 2 30 0x1 0x1>; /* PC30 periph A with pullup, conflicts with ISI_PCK */ 750 AT91_PIOC 30 AT91_PERIPH_A AT91_PINCTRL_PULL_UP>; /* PC30 periph A with pullup, conflicts with ISI_PCK */
789 }; 751 };
790 }; 752 };
791 753
792 uart1 { 754 uart1 {
793 pinctrl_uart1: uart1-0 { 755 pinctrl_uart1: uart1-0 {
794 atmel,pins = 756 atmel,pins =
795 <0 30 0x2 0x0 /* PA30 periph B, conflicts with TWD0, ISI_VSYNC */ 757 <AT91_PIOA 30 AT91_PERIPH_B AT91_PINCTRL_NONE /* PA30 periph B, conflicts with TWD0, ISI_VSYNC */
796 0 31 0x2 0x1>; /* PA31 periph B with pullup, conflicts with TWCK0, ISI_HSYNC */ 758 AT91_PIOA 31 AT91_PERIPH_B AT91_PINCTRL_PULL_UP>; /* PA31 periph B with pullup, conflicts with TWCK0, ISI_HSYNC */
797 }; 759 };
798 }; 760 };
799 761
800 usart0 { 762 usart0 {
801 pinctrl_usart0: usart0-0 { 763 pinctrl_usart0: usart0-0 {
802 atmel,pins = 764 atmel,pins =
803 <3 17 0x1 0x0 /* PD17 periph A */ 765 <AT91_PIOD 17 AT91_PERIPH_A AT91_PINCTRL_NONE /* PD17 periph A */
804 3 18 0x1 0x1>; /* PD18 periph A with pullup */ 766 AT91_PIOD 18 AT91_PERIPH_A AT91_PINCTRL_PULL_UP>; /* PD18 periph A with pullup */
805 }; 767 };
806 768
807 pinctrl_usart0_rts_cts: usart0_rts_cts-0 { 769 pinctrl_usart0_rts_cts: usart0_rts_cts-0 {
808 atmel,pins = 770 atmel,pins =
809 <3 15 0x1 0x0 /* PD15 periph A, conflicts with SPI0_NPCS2, CANTX0 */ 771 <AT91_PIOD 15 AT91_PERIPH_A AT91_PINCTRL_NONE /* PD15 periph A, conflicts with SPI0_NPCS2, CANTX0 */
810 3 16 0x1 0x0>; /* PD16 periph A, conflicts with SPI0_NPCS3, PWMFI3 */ 772 AT91_PIOD 16 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PD16 periph A, conflicts with SPI0_NPCS3, PWMFI3 */
811 }; 773 };
812 }; 774 };
813 775
814 usart1 { 776 usart1 {
815 pinctrl_usart1: usart1-0 { 777 pinctrl_usart1: usart1-0 {
816 atmel,pins = 778 atmel,pins =
817 <1 28 0x1 0x0 /* PB28 periph A */ 779 <AT91_PIOB 28 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB28 periph A */
818 1 29 0x1 0x1>; /* PB29 periph A with pullup */ 780 AT91_PIOB 29 AT91_PERIPH_A AT91_PINCTRL_PULL_UP>; /* PB29 periph A with pullup */
819 }; 781 };
820 782
821 pinctrl_usart1_rts_cts: usart1_rts_cts-0 { 783 pinctrl_usart1_rts_cts: usart1_rts_cts-0 {
822 atmel,pins = 784 atmel,pins =
823 <1 26 0x1 0x0 /* PB26 periph A, conflicts with GRX7 */ 785 <AT91_PIOB 26 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB26 periph A, conflicts with GRX7 */
824 1 27 0x1 0x0>; /* PB27 periph A, conflicts with G125CKO */ 786 AT91_PIOB 27 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PB27 periph A, conflicts with G125CKO */
825 }; 787 };
826 }; 788 };
827 789
828 usart2 { 790 usart2 {
829 pinctrl_usart2: usart2-0 { 791 pinctrl_usart2: usart2-0 {
830 atmel,pins = 792 atmel,pins =
831 <4 25 0x2 0x0 /* PE25 periph B, conflicts with A25 */ 793 <AT91_PIOE 25 AT91_PERIPH_B AT91_PINCTRL_NONE /* PE25 periph B, conflicts with A25 */
832 4 26 0x2 0x1>; /* PE26 periph B with pullup, conflicts NCS0 */ 794 AT91_PIOE 26 AT91_PERIPH_B AT91_PINCTRL_PULL_UP>; /* PE26 periph B with pullup, conflicts NCS0 */
833 }; 795 };
834 796
835 pinctrl_usart2_rts_cts: usart2_rts_cts-0 { 797 pinctrl_usart2_rts_cts: usart2_rts_cts-0 {
836 atmel,pins = 798 atmel,pins =
837 <4 23 0x2 0x0 /* PE23 periph B, conflicts with A23 */ 799 <AT91_PIOE 23 AT91_PERIPH_B AT91_PINCTRL_NONE /* PE23 periph B, conflicts with A23 */
838 4 24 0x2 0x0>; /* PE24 periph B, conflicts with A24 */ 800 AT91_PIOE 24 AT91_PERIPH_B AT91_PINCTRL_NONE>; /* PE24 periph B, conflicts with A24 */
839 }; 801 };
840 }; 802 };
841 803
842 usart3 { 804 usart3 {
843 pinctrl_usart3: usart3-0 { 805 pinctrl_usart3: usart3-0 {
844 atmel,pins = 806 atmel,pins =
845 <4 18 0x2 0x0 /* PE18 periph B, conflicts with A18 */ 807 <AT91_PIOE 18 AT91_PERIPH_B AT91_PINCTRL_NONE /* PE18 periph B, conflicts with A18 */
846 4 19 0x2 0x1>; /* PE19 periph B with pullup, conflicts with A19 */ 808 AT91_PIOE 19 AT91_PERIPH_B AT91_PINCTRL_PULL_UP>; /* PE19 periph B with pullup, conflicts with A19 */
847 }; 809 };
848 810
849 pinctrl_usart3_rts_cts: usart3_rts_cts-0 { 811 pinctrl_usart3_rts_cts: usart3_rts_cts-0 {
850 atmel,pins = 812 atmel,pins =
851 <4 16 0x2 0x0 /* PE16 periph B, conflicts with A16 */ 813 <AT91_PIOE 16 AT91_PERIPH_B AT91_PINCTRL_NONE /* PE16 periph B, conflicts with A16 */
852 4 17 0x2 0x0>; /* PE17 periph B, conflicts with A17 */ 814 AT91_PIOE 17 AT91_PERIPH_B AT91_PINCTRL_NONE>; /* PE17 periph B, conflicts with A17 */
853 }; 815 };
854 }; 816 };
817
818
819 pioA: gpio@fffff200 {
820 compatible = "atmel,at91sam9x5-gpio", "atmel,at91rm9200-gpio";
821 reg = <0xfffff200 0x100>;
822 interrupts = <6 IRQ_TYPE_LEVEL_HIGH 1>;
823 #gpio-cells = <2>;
824 gpio-controller;
825 interrupt-controller;
826 #interrupt-cells = <2>;
827 };
828
829 pioB: gpio@fffff400 {
830 compatible = "atmel,at91sam9x5-gpio", "atmel,at91rm9200-gpio";
831 reg = <0xfffff400 0x100>;
832 interrupts = <7 IRQ_TYPE_LEVEL_HIGH 1>;
833 #gpio-cells = <2>;
834 gpio-controller;
835 interrupt-controller;
836 #interrupt-cells = <2>;
837 };
838
839 pioC: gpio@fffff600 {
840 compatible = "atmel,at91sam9x5-gpio", "atmel,at91rm9200-gpio";
841 reg = <0xfffff600 0x100>;
842 interrupts = <8 IRQ_TYPE_LEVEL_HIGH 1>;
843 #gpio-cells = <2>;
844 gpio-controller;
845 interrupt-controller;
846 #interrupt-cells = <2>;
847 };
848
849 pioD: gpio@fffff800 {
850 compatible = "atmel,at91sam9x5-gpio", "atmel,at91rm9200-gpio";
851 reg = <0xfffff800 0x100>;
852 interrupts = <9 IRQ_TYPE_LEVEL_HIGH 1>;
853 #gpio-cells = <2>;
854 gpio-controller;
855 interrupt-controller;
856 #interrupt-cells = <2>;
857 };
858
859 pioE: gpio@fffffa00 {
860 compatible = "atmel,at91sam9x5-gpio", "atmel,at91rm9200-gpio";
861 reg = <0xfffffa00 0x100>;
862 interrupts = <10 IRQ_TYPE_LEVEL_HIGH 1>;
863 #gpio-cells = <2>;
864 gpio-controller;
865 interrupt-controller;
866 #interrupt-cells = <2>;
867 };
855 }; 868 };
856 869
857 pmc: pmc@fffffc00 { 870 pmc: pmc@fffffc00 {
@@ -867,7 +880,7 @@
867 pit: timer@fffffe30 { 880 pit: timer@fffffe30 {
868 compatible = "atmel,at91sam9260-pit"; 881 compatible = "atmel,at91sam9260-pit";
869 reg = <0xfffffe30 0xf>; 882 reg = <0xfffffe30 0xf>;
870 interrupts = <3 4 5>; 883 interrupts = <3 IRQ_TYPE_LEVEL_HIGH 5>;
871 }; 884 };
872 885
873 watchdog@fffffe40 { 886 watchdog@fffffe40 {
@@ -879,7 +892,7 @@
879 rtc@fffffeb0 { 892 rtc@fffffeb0 {
880 compatible = "atmel,at91rm9200-rtc"; 893 compatible = "atmel,at91rm9200-rtc";
881 reg = <0xfffffeb0 0x30>; 894 reg = <0xfffffeb0 0x30>;
882 interrupts = <1 4 7>; 895 interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>;
883 }; 896 };
884 }; 897 };
885 898
@@ -889,7 +902,7 @@
889 compatible = "atmel,at91sam9rl-udc"; 902 compatible = "atmel,at91sam9rl-udc";
890 reg = <0x00500000 0x100000 903 reg = <0x00500000 0x100000
891 0xf8030000 0x4000>; 904 0xf8030000 0x4000>;
892 interrupts = <33 4 2>; 905 interrupts = <33 IRQ_TYPE_LEVEL_HIGH 2>;
893 status = "disabled"; 906 status = "disabled";
894 907
895 ep0 { 908 ep0 {
@@ -1001,14 +1014,14 @@
1001 usb1: ohci@00600000 { 1014 usb1: ohci@00600000 {
1002 compatible = "atmel,at91rm9200-ohci", "usb-ohci"; 1015 compatible = "atmel,at91rm9200-ohci", "usb-ohci";
1003 reg = <0x00600000 0x100000>; 1016 reg = <0x00600000 0x100000>;
1004 interrupts = <32 4 2>; 1017 interrupts = <32 IRQ_TYPE_LEVEL_HIGH 2>;
1005 status = "disabled"; 1018 status = "disabled";
1006 }; 1019 };
1007 1020
1008 usb2: ehci@00700000 { 1021 usb2: ehci@00700000 {
1009 compatible = "atmel,at91sam9g45-ehci", "usb-ehci"; 1022 compatible = "atmel,at91sam9g45-ehci", "usb-ehci";
1010 reg = <0x00700000 0x100000>; 1023 reg = <0x00700000 0x100000>;
1011 interrupts = <32 4 2>; 1024 interrupts = <32 IRQ_TYPE_LEVEL_HIGH 2>;
1012 status = "disabled"; 1025 status = "disabled";
1013 }; 1026 };
1014 1027
@@ -1024,7 +1037,7 @@
1024 0xffffc000 0x00000070 /* NFC HSMC regs */ 1037 0xffffc000 0x00000070 /* NFC HSMC regs */
1025 0x00200000 0x00100000 /* NFC SRAM banks */ 1038 0x00200000 0x00100000 /* NFC SRAM banks */
1026 >; 1039 >;
1027 interrupts = <5 4 6>; 1040 interrupts = <5 IRQ_TYPE_LEVEL_HIGH 6>;
1028 atmel,nand-addr-offset = <21>; 1041 atmel,nand-addr-offset = <21>;
1029 atmel,nand-cmd-offset = <22>; 1042 atmel,nand-cmd-offset = <22>;
1030 pinctrl-names = "default"; 1043 pinctrl-names = "default";
diff --git a/arch/arm/boot/dts/sama5d31ek.dts b/arch/arm/boot/dts/sama5d31ek.dts
index fa5d216f1db7..027bac7510b6 100644
--- a/arch/arm/boot/dts/sama5d31ek.dts
+++ b/arch/arm/boot/dts/sama5d31ek.dts
@@ -7,8 +7,8 @@
7 * Licensed under GPLv2 or later. 7 * Licensed under GPLv2 or later.
8 */ 8 */
9/dts-v1/; 9/dts-v1/;
10/include/ "sama5d3xmb.dtsi" 10#include "sama5d3xmb.dtsi"
11/include/ "sama5d3xdm.dtsi" 11#include "sama5d3xdm.dtsi"
12 12
13/ { 13/ {
14 model = "Atmel SAMA5D31-EK"; 14 model = "Atmel SAMA5D31-EK";
@@ -41,7 +41,7 @@
41 leds { 41 leds {
42 d3 { 42 d3 {
43 label = "d3"; 43 label = "d3";
44 gpios = <&pioE 24 0>; 44 gpios = <&pioE 24 GPIO_ACTIVE_HIGH>;
45 }; 45 };
46 }; 46 };
47 47
diff --git a/arch/arm/boot/dts/sama5d33ek.dts b/arch/arm/boot/dts/sama5d33ek.dts
index c38c9433d7a5..99bd0c8e0471 100644
--- a/arch/arm/boot/dts/sama5d33ek.dts
+++ b/arch/arm/boot/dts/sama5d33ek.dts
@@ -7,8 +7,8 @@
7 * Licensed under GPLv2 or later. 7 * Licensed under GPLv2 or later.
8 */ 8 */
9/dts-v1/; 9/dts-v1/;
10/include/ "sama5d3xmb.dtsi" 10#include "sama5d3xmb.dtsi"
11/include/ "sama5d3xdm.dtsi" 11#include "sama5d3xdm.dtsi"
12 12
13/ { 13/ {
14 model = "Atmel SAMA5D33-EK"; 14 model = "Atmel SAMA5D33-EK";
diff --git a/arch/arm/boot/dts/sama5d34ek.dts b/arch/arm/boot/dts/sama5d34ek.dts
index 6bebfcdcb1d1..fb8ee11cf282 100644
--- a/arch/arm/boot/dts/sama5d34ek.dts
+++ b/arch/arm/boot/dts/sama5d34ek.dts
@@ -7,8 +7,8 @@
7 * Licensed under GPLv2 or later. 7 * Licensed under GPLv2 or later.
8 */ 8 */
9/dts-v1/; 9/dts-v1/;
10/include/ "sama5d3xmb.dtsi" 10#include "sama5d3xmb.dtsi"
11/include/ "sama5d3xdm.dtsi" 11#include "sama5d3xdm.dtsi"
12 12
13/ { 13/ {
14 model = "Atmel SAMA5D34-EK"; 14 model = "Atmel SAMA5D34-EK";
@@ -51,7 +51,7 @@
51 leds { 51 leds {
52 d3 { 52 d3 {
53 label = "d3"; 53 label = "d3";
54 gpios = <&pioE 24 0>; 54 gpios = <&pioE 24 GPIO_ACTIVE_HIGH>;
55 }; 55 };
56 }; 56 };
57 57
diff --git a/arch/arm/boot/dts/sama5d35ek.dts b/arch/arm/boot/dts/sama5d35ek.dts
index a488fc4e9777..509a53d9cc7b 100644
--- a/arch/arm/boot/dts/sama5d35ek.dts
+++ b/arch/arm/boot/dts/sama5d35ek.dts
@@ -7,7 +7,7 @@
7 * Licensed under GPLv2 or later. 7 * Licensed under GPLv2 or later.
8 */ 8 */
9/dts-v1/; 9/dts-v1/;
10/include/ "sama5d3xmb.dtsi" 10#include "sama5d3xmb.dtsi"
11 11
12/ { 12/ {
13 model = "Atmel SAMA5D35-EK"; 13 model = "Atmel SAMA5D35-EK";
@@ -48,7 +48,7 @@
48 48
49 pb_user1 { 49 pb_user1 {
50 label = "pb_user1"; 50 label = "pb_user1";
51 gpios = <&pioE 27 0>; 51 gpios = <&pioE 27 GPIO_ACTIVE_HIGH>;
52 linux,code = <0x100>; 52 linux,code = <0x100>;
53 gpio-key,wakeup; 53 gpio-key,wakeup;
54 }; 54 };
diff --git a/arch/arm/boot/dts/sama5d3xcm.dtsi b/arch/arm/boot/dts/sama5d3xcm.dtsi
index b336e7787cb3..1f8050813a54 100644
--- a/arch/arm/boot/dts/sama5d3xcm.dtsi
+++ b/arch/arm/boot/dts/sama5d3xcm.dtsi
@@ -6,7 +6,7 @@
6 * 6 *
7 * Licensed under GPLv2 or later. 7 * Licensed under GPLv2 or later.
8 */ 8 */
9/include/ "sama5d3.dtsi" 9#include "sama5d3.dtsi"
10 10
11/ { 11/ {
12 compatible = "atmel,samad3xcm", "atmel,sama5d3", "atmel,sama5"; 12 compatible = "atmel,samad3xcm", "atmel,sama5d3", "atmel,sama5";
@@ -89,7 +89,7 @@
89 89
90 d2 { 90 d2 {
91 label = "d2"; 91 label = "d2";
92 gpios = <&pioE 25 1>; /* PE25, conflicts with A25, RXD2 */ 92 gpios = <&pioE 25 GPIO_ACTIVE_LOW>; /* PE25, conflicts with A25, RXD2 */
93 }; 93 };
94 }; 94 };
95}; 95};
diff --git a/arch/arm/boot/dts/sama5d3xdm.dtsi b/arch/arm/boot/dts/sama5d3xdm.dtsi
index 4b8830eb2060..1c296d6b2f2a 100644
--- a/arch/arm/boot/dts/sama5d3xdm.dtsi
+++ b/arch/arm/boot/dts/sama5d3xdm.dtsi
@@ -33,7 +33,7 @@
33 board { 33 board {
34 pinctrl_qt1070_irq: qt1070_irq { 34 pinctrl_qt1070_irq: qt1070_irq {
35 atmel,pins = 35 atmel,pins =
36 <4 31 0x0 0x5>; /* PE31 GPIO with pull up deglith */ 36 <AT91_PIOE 31 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP_DEGLITCH>; /* PE31 GPIO with pull up deglith */
37 }; 37 };
38 }; 38 };
39 }; 39 };
diff --git a/arch/arm/boot/dts/sama5d3xmb.dtsi b/arch/arm/boot/dts/sama5d3xmb.dtsi
index 661d7ca9c309..8a9e05d8a4b8 100644
--- a/arch/arm/boot/dts/sama5d3xmb.dtsi
+++ b/arch/arm/boot/dts/sama5d3xmb.dtsi
@@ -6,7 +6,7 @@
6 * 6 *
7 * Licensed under GPLv2 or later. 7 * Licensed under GPLv2 or later.
8 */ 8 */
9/include/ "sama5d3xcm.dtsi" 9#include "sama5d3xcm.dtsi"
10 10
11/ { 11/ {
12 compatible = "atmel,sama5d3xmb", "atmel,sama5d3xcm", "atmel,sama5d3", "atmel,sama5"; 12 compatible = "atmel,sama5d3xmb", "atmel,sama5d3xcm", "atmel,sama5d3", "atmel,sama5";
@@ -20,7 +20,7 @@
20 slot@0 { 20 slot@0 {
21 reg = <0>; 21 reg = <0>;
22 bus-width = <4>; 22 bus-width = <4>;
23 cd-gpios = <&pioD 17 0>; 23 cd-gpios = <&pioD 17 GPIO_ACTIVE_HIGH>;
24 }; 24 };
25 }; 25 };
26 26
@@ -62,7 +62,7 @@
62 slot@0 { 62 slot@0 {
63 reg = <0>; 63 reg = <0>;
64 bus-width = <4>; 64 bus-width = <4>;
65 cd-gpios = <&pioD 18 0>; 65 cd-gpios = <&pioD 18 GPIO_ACTIVE_HIGH>;
66 }; 66 };
67 }; 67 };
68 68
@@ -87,32 +87,32 @@
87 board { 87 board {
88 pinctrl_mmc0_cd: mmc0_cd { 88 pinctrl_mmc0_cd: mmc0_cd {
89 atmel,pins = 89 atmel,pins =
90 <3 17 0x0 0x5>; /* PD17 GPIO with pullup deglitch */ 90 <AT91_PIOD 17 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP_DEGLITCH>; /* PD17 GPIO with pullup deglitch */
91 }; 91 };
92 92
93 pinctrl_mmc1_cd: mmc1_cd { 93 pinctrl_mmc1_cd: mmc1_cd {
94 atmel,pins = 94 atmel,pins =
95 <3 18 0x0 0x5>; /* PD18 GPIO with pullup deglitch */ 95 <AT91_PIOD 18 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP_DEGLITCH>; /* PD18 GPIO with pullup deglitch */
96 }; 96 };
97 97
98 pinctrl_pck0_as_audio_mck: pck0_as_audio_mck { 98 pinctrl_pck0_as_audio_mck: pck0_as_audio_mck {
99 atmel,pins = 99 atmel,pins =
100 <3 30 0x2 0x0>; /* PD30 periph B */ 100 <AT91_PIOD 30 AT91_PERIPH_B AT91_PINCTRL_NONE>; /* PD30 periph B */
101 }; 101 };
102 102
103 pinctrl_isi_reset: isi_reset-0 { 103 pinctrl_isi_reset: isi_reset-0 {
104 atmel,pins = 104 atmel,pins =
105 <4 24 0x0 0x0>; /* PE24 gpio */ 105 <AT91_PIOE 24 AT91_PERIPH_GPIO AT91_PINCTRL_NONE>; /* PE24 gpio */
106 }; 106 };
107 107
108 pinctrl_isi_power: isi_power-0 { 108 pinctrl_isi_power: isi_power-0 {
109 atmel,pins = 109 atmel,pins =
110 <4 29 0x0 0x0>; /* PE29 gpio */ 110 <AT91_PIOE 29 AT91_PERIPH_GPIO AT91_PINCTRL_NONE>; /* PE29 gpio */
111 }; 111 };
112 112
113 pinctrl_usba_vbus: usba_vbus { 113 pinctrl_usba_vbus: usba_vbus {
114 atmel,pins = 114 atmel,pins =
115 <3 29 0x0 0x4>; /* PD29 GPIO with deglitch */ 115 <AT91_PIOD 29 AT91_PERIPH_GPIO AT91_PINCTRL_DEGLITCH>; /* PD29 GPIO with deglitch */
116 }; 116 };
117 }; 117 };
118 }; 118 };
@@ -127,7 +127,7 @@
127 }; 127 };
128 128
129 usb0: gadget@00500000 { 129 usb0: gadget@00500000 {
130 atmel,vbus-gpio = <&pioD 29 0>; 130 atmel,vbus-gpio = <&pioD 29 GPIO_ACTIVE_HIGH>;
131 pinctrl-names = "default"; 131 pinctrl-names = "default";
132 pinctrl-0 = <&pinctrl_usba_vbus>; 132 pinctrl-0 = <&pinctrl_usba_vbus>;
133 status = "okay"; 133 status = "okay";
@@ -135,9 +135,9 @@
135 135
136 usb1: ohci@00600000 { 136 usb1: ohci@00600000 {
137 num-ports = <3>; 137 num-ports = <3>;
138 atmel,vbus-gpio = <&pioD 25 0 138 atmel,vbus-gpio = <&pioD 25 GPIO_ACTIVE_HIGH
139 &pioD 26 1 139 &pioD 26 GPIO_ACTIVE_LOW
140 &pioD 27 1 140 &pioD 27 GPIO_ACTIVE_LOW
141 >; 141 >;
142 status = "okay"; 142 status = "okay";
143 }; 143 };
diff --git a/arch/arm/boot/dts/sh7372.dtsi b/arch/arm/boot/dts/sh7372.dtsi
index 677fc603f8b3..7bf020ecadf5 100644
--- a/arch/arm/boot/dts/sh7372.dtsi
+++ b/arch/arm/boot/dts/sh7372.dtsi
@@ -14,8 +14,13 @@
14 compatible = "renesas,sh7372"; 14 compatible = "renesas,sh7372";
15 15
16 cpus { 16 cpus {
17 #address-cells = <1>;
18 #size-cells = <0>;
19
17 cpu@0 { 20 cpu@0 {
18 compatible = "arm,cortex-a8"; 21 compatible = "arm,cortex-a8";
22 device_type = "cpu";
23 reg = <0x0>;
19 }; 24 };
20 }; 25 };
21}; 26};
diff --git a/arch/arm/boot/dts/sh73a0-kzm9g-reference.dts b/arch/arm/boot/dts/sh73a0-kzm9g-reference.dts
index 5972abb55f9c..b6f759e830ed 100644
--- a/arch/arm/boot/dts/sh73a0-kzm9g-reference.dts
+++ b/arch/arm/boot/dts/sh73a0-kzm9g-reference.dts
@@ -18,6 +18,19 @@
18 model = "KZM-A9-GT"; 18 model = "KZM-A9-GT";
19 compatible = "renesas,kzm9g-reference", "renesas,sh73a0"; 19 compatible = "renesas,kzm9g-reference", "renesas,sh73a0";
20 20
21 cpus {
22 cpu@0 {
23 cpu0-supply = <&vdd_dvfs>;
24 operating-points = <
25 /* kHz uV */
26 1196000 1315000
27 598000 1175000
28 398667 1065000
29 >;
30 voltage-tolerance = <1>; /* 1% */
31 };
32 };
33
21 chosen { 34 chosen {
22 bootargs = "console=tty0 console=ttySC4,115200 root=/dev/nfs ip=dhcp ignore_loglevel earlyprintk=sh-sci.4,115200"; 35 bootargs = "console=tty0 console=ttySC4,115200 root=/dev/nfs ip=dhcp ignore_loglevel earlyprintk=sh-sci.4,115200";
23 }; 36 };
@@ -59,6 +72,79 @@
59 }; 72 };
60}; 73};
61 74
75&i2c0 {
76 as3711@40 {
77 compatible = "ams,as3711";
78 reg = <0x40>;
79
80 regulators {
81 vdd_dvfs: sd1 {
82 regulator-name = "1.315V CPU";
83 regulator-min-microvolt = <1050000>;
84 regulator-max-microvolt = <1350000>;
85 regulator-always-on;
86 regulator-boot-on;
87 };
88 sd2 {
89 regulator-name = "1.8V";
90 regulator-min-microvolt = <1800000>;
91 regulator-max-microvolt = <1800000>;
92 regulator-always-on;
93 regulator-boot-on;
94 };
95 sd4 {
96 regulator-name = "1.215V";
97 regulator-min-microvolt = <1215000>;
98 regulator-max-microvolt = <1235000>;
99 regulator-always-on;
100 regulator-boot-on;
101 };
102 ldo2 {
103 regulator-name = "2.8V CPU";
104 regulator-min-microvolt = <2800000>;
105 regulator-max-microvolt = <2800000>;
106 regulator-always-on;
107 regulator-boot-on;
108 };
109 ldo3 {
110 regulator-name = "3.0V CPU";
111 regulator-min-microvolt = <3000000>;
112 regulator-max-microvolt = <3000000>;
113 regulator-always-on;
114 regulator-boot-on;
115 };
116 ldo4 {
117 regulator-name = "2.8V";
118 regulator-min-microvolt = <2800000>;
119 regulator-max-microvolt = <2800000>;
120 regulator-always-on;
121 regulator-boot-on;
122 };
123 ldo5 {
124 regulator-name = "2.8V #2";
125 regulator-min-microvolt = <2800000>;
126 regulator-max-microvolt = <2800000>;
127 regulator-always-on;
128 regulator-boot-on;
129 };
130 ldo7 {
131 regulator-name = "1.15V CPU";
132 regulator-min-microvolt = <1150000>;
133 regulator-max-microvolt = <1150000>;
134 regulator-always-on;
135 regulator-boot-on;
136 };
137 ldo8 {
138 regulator-name = "1.15V CPU #2";
139 regulator-min-microvolt = <1150000>;
140 regulator-max-microvolt = <1150000>;
141 regulator-always-on;
142 regulator-boot-on;
143 };
144 };
145 };
146};
147
62&mmcif { 148&mmcif {
63 bus-width = <8>; 149 bus-width = <8>;
64 vmmc-supply = <&reg_1p8v>; 150 vmmc-supply = <&reg_1p8v>;
diff --git a/arch/arm/boot/dts/sh73a0.dtsi b/arch/arm/boot/dts/sh73a0.dtsi
index ec40bf78289e..b97750256003 100644
--- a/arch/arm/boot/dts/sh73a0.dtsi
+++ b/arch/arm/boot/dts/sh73a0.dtsi
@@ -119,7 +119,7 @@
119 0 32 0x4>; 119 0 32 0x4>;
120 }; 120 };
121 121
122 i2c0: i2c@0xe6820000 { 122 i2c0: i2c@e6820000 {
123 #address-cells = <1>; 123 #address-cells = <1>;
124 #size-cells = <0>; 124 #size-cells = <0>;
125 compatible = "renesas,rmobile-iic"; 125 compatible = "renesas,rmobile-iic";
@@ -131,7 +131,7 @@
131 0 170 0x4>; 131 0 170 0x4>;
132 }; 132 };
133 133
134 i2c1: i2c@0xe6822000 { 134 i2c1: i2c@e6822000 {
135 #address-cells = <1>; 135 #address-cells = <1>;
136 #size-cells = <0>; 136 #size-cells = <0>;
137 compatible = "renesas,rmobile-iic"; 137 compatible = "renesas,rmobile-iic";
@@ -143,7 +143,7 @@
143 0 54 0x4>; 143 0 54 0x4>;
144 }; 144 };
145 145
146 i2c2: i2c@0xe6824000 { 146 i2c2: i2c@e6824000 {
147 #address-cells = <1>; 147 #address-cells = <1>;
148 #size-cells = <0>; 148 #size-cells = <0>;
149 compatible = "renesas,rmobile-iic"; 149 compatible = "renesas,rmobile-iic";
@@ -155,7 +155,7 @@
155 0 174 0x4>; 155 0 174 0x4>;
156 }; 156 };
157 157
158 i2c3: i2c@0xe6826000 { 158 i2c3: i2c@e6826000 {
159 #address-cells = <1>; 159 #address-cells = <1>;
160 #size-cells = <0>; 160 #size-cells = <0>;
161 compatible = "renesas,rmobile-iic"; 161 compatible = "renesas,rmobile-iic";
@@ -167,7 +167,7 @@
167 0 186 0x4>; 167 0 186 0x4>;
168 }; 168 };
169 169
170 i2c4: i2c@0xe6828000 { 170 i2c4: i2c@e6828000 {
171 #address-cells = <1>; 171 #address-cells = <1>;
172 #size-cells = <0>; 172 #size-cells = <0>;
173 compatible = "renesas,rmobile-iic"; 173 compatible = "renesas,rmobile-iic";
@@ -179,7 +179,7 @@
179 0 190 0x4>; 179 0 190 0x4>;
180 }; 180 };
181 181
182 mmcif: mmcif@0x10010000 { 182 mmcif: mmcif@e6bd0000 {
183 compatible = "renesas,sh-mmcif"; 183 compatible = "renesas,sh-mmcif";
184 reg = <0xe6bd0000 0x100>; 184 reg = <0xe6bd0000 0x100>;
185 interrupt-parent = <&gic>; 185 interrupt-parent = <&gic>;
@@ -189,7 +189,7 @@
189 status = "disabled"; 189 status = "disabled";
190 }; 190 };
191 191
192 sdhi0: sdhi@0xee100000 { 192 sdhi0: sdhi@ee100000 {
193 compatible = "renesas,r8a7740-sdhi"; 193 compatible = "renesas,r8a7740-sdhi";
194 reg = <0xee100000 0x100>; 194 reg = <0xee100000 0x100>;
195 interrupt-parent = <&gic>; 195 interrupt-parent = <&gic>;
@@ -201,7 +201,7 @@
201 }; 201 };
202 202
203 /* SDHI1 and SDHI2 have no CD pins, no need for CD IRQ */ 203 /* SDHI1 and SDHI2 have no CD pins, no need for CD IRQ */
204 sdhi1: sdhi@0xee120000 { 204 sdhi1: sdhi@ee120000 {
205 compatible = "renesas,r8a7740-sdhi"; 205 compatible = "renesas,r8a7740-sdhi";
206 reg = <0xee120000 0x100>; 206 reg = <0xee120000 0x100>;
207 interrupt-parent = <&gic>; 207 interrupt-parent = <&gic>;
@@ -212,7 +212,7 @@
212 status = "disabled"; 212 status = "disabled";
213 }; 213 };
214 214
215 sdhi2: sdhi@0xee140000 { 215 sdhi2: sdhi@ee140000 {
216 compatible = "renesas,r8a7740-sdhi"; 216 compatible = "renesas,r8a7740-sdhi";
217 reg = <0xee140000 0x100>; 217 reg = <0xee140000 0x100>;
218 interrupt-parent = <&gic>; 218 interrupt-parent = <&gic>;
diff --git a/arch/arm/boot/dts/snowball.dts b/arch/arm/boot/dts/snowball.dts
index db5db24fd544..49824be66845 100644
--- a/arch/arm/boot/dts/snowball.dts
+++ b/arch/arm/boot/dts/snowball.dts
@@ -10,7 +10,7 @@
10 */ 10 */
11 11
12/dts-v1/; 12/dts-v1/;
13/include/ "dbx5x0.dtsi" 13#include "dbx5x0.dtsi"
14 14
15/ { 15/ {
16 model = "Calao Systems Snowball platform with device tree"; 16 model = "Calao Systems Snowball platform with device tree";
@@ -22,12 +22,13 @@
22 22
23 en_3v3_reg: en_3v3 { 23 en_3v3_reg: en_3v3 {
24 compatible = "regulator-fixed"; 24 compatible = "regulator-fixed";
25 regulator-name = "en-3v3-fixed-supply"; 25 regulator-name = "en-3v3-fixed-supply";
26 regulator-min-microvolt = <3300000>; 26 regulator-min-microvolt = <3300000>;
27 regulator-max-microvolt = <3300000>; 27 regulator-max-microvolt = <3300000>;
28 gpios = <&gpio0 26 0x4>; // 26 28 /* AB8500 GPIOs start from 1 - offset 25 is GPIO26. */
29 startup-delay-us = <5000>; 29 gpio = <&ab8500_gpio 25 0x4>;
30 enable-active-high; 30 startup-delay-us = <5000>;
31 enable-active-high;
31 }; 32 };
32 33
33 gpio_keys { 34 gpio_keys {
@@ -82,7 +83,7 @@
82 }; 83 };
83 }; 84 };
84 85
85 soc-u9500 { 86 soc {
86 87
87 sound { 88 sound {
88 compatible = "stericsson,snd-soc-mop500"; 89 compatible = "stericsson,snd-soc-mop500";
@@ -99,40 +100,13 @@
99 status = "okay"; 100 status = "okay";
100 }; 101 };
101 102
102 prcmu@80157000 {
103 thermal@801573c0 {
104 num-trips = <4>;
105
106 trip0-temp = <70000>;
107 trip0-type = "active";
108 trip0-cdev-num = <1>;
109 trip0-cdev-name0 = "thermal-cpufreq-0";
110
111 trip1-temp = <75000>;
112 trip1-type = "active";
113 trip1-cdev-num = <1>;
114 trip1-cdev-name0 = "thermal-cpufreq-0";
115
116 trip2-temp = <80000>;
117 trip2-type = "active";
118 trip2-cdev-num = <1>;
119 trip2-cdev-name0 = "thermal-cpufreq-0";
120
121 trip3-temp = <85000>;
122 trip3-type = "critical";
123 trip3-cdev-num = <0>;
124
125 status = "okay";
126 };
127 };
128
129 external-bus@50000000 { 103 external-bus@50000000 {
130 status = "okay"; 104 status = "okay";
131 105
132 ethernet@0 { 106 ethernet@0 {
133 compatible = "smsc,lan9115"; 107 compatible = "smsc,lan9115";
134 reg = <0 0x10000>; 108 reg = <0 0x10000>;
135 interrupts = <12 0x1>; 109 interrupts = <12 IRQ_TYPE_EDGE_RISING>;
136 interrupt-parent = <&gpio4>; 110 interrupt-parent = <&gpio4>;
137 vdd33a-supply = <&en_3v3_reg>; 111 vdd33a-supply = <&en_3v3_reg>;
138 vddvario-supply = <&db8500_vape_reg>; 112 vddvario-supply = <&db8500_vape_reg>;
@@ -146,13 +120,21 @@
146 }; 120 };
147 }; 121 };
148 122
123 vmmci: regulator-gpio {
124 gpios = <&gpio6 25 0x4>;
125 enable-gpio = <&gpio7 4 0x4>;
126
127 status = "okay";
128 };
129
149 // External Micro SD slot 130 // External Micro SD slot
150 sdi0_per1@80126000 { 131 sdi0_per1@80126000 {
151 arm,primecell-periphid = <0x10480180>; 132 arm,primecell-periphid = <0x10480180>;
152 max-frequency = <50000000>; 133 max-frequency = <100000000>;
153 bus-width = <4>; 134 bus-width = <4>;
154 mmc-cap-mmc-highspeed; 135 mmc-cap-mmc-highspeed;
155 vmmc-supply = <&ab8500_ldo_aux3_reg>; 136 vmmc-supply = <&ab8500_ldo_aux3_reg>;
137 vqmmc-supply = <&vmmci>;
156 138
157 cd-gpios = <&gpio6 26 0x4>; // 218 139 cd-gpios = <&gpio6 26 0x4>; // 218
158 cd-inverted; 140 cd-inverted;
@@ -163,7 +145,7 @@
163 // On-board eMMC 145 // On-board eMMC
164 sdi4_per2@80114000 { 146 sdi4_per2@80114000 {
165 arm,primecell-periphid = <0x10480180>; 147 arm,primecell-periphid = <0x10480180>;
166 max-frequency = <50000000>; 148 max-frequency = <100000000>;
167 bus-width = <8>; 149 bus-width = <8>;
168 mmc-cap-mmc-highspeed; 150 mmc-cap-mmc-highspeed;
169 vmmc-supply = <&ab8500_ldo_aux2_reg>; 151 vmmc-supply = <&ab8500_ldo_aux2_reg>;
@@ -197,15 +179,15 @@
197 }; 179 };
198 180
199 i2c@80128000 { 181 i2c@80128000 {
200 lp5521@0x33 { 182 lp5521@33 {
201 // compatible = "lp5521"; 183 // compatible = "lp5521";
202 reg = <0x33>; 184 reg = <0x33>;
203 }; 185 };
204 lp5521@0x34 { 186 lp5521@34 {
205 // compatible = "lp5521"; 187 // compatible = "lp5521";
206 reg = <0x34>; 188 reg = <0x34>;
207 }; 189 };
208 bh1780@0x29 { 190 bh1780@29 {
209 // compatible = "rohm,bh1780gli"; 191 // compatible = "rohm,bh1780gli";
210 reg = <0x33>; 192 reg = <0x33>;
211 }; 193 };
@@ -298,6 +280,31 @@
298 }; 280 };
299 }; 281 };
300 282
283 thermal@801573c0 {
284 num-trips = <4>;
285
286 trip0-temp = <70000>;
287 trip0-type = "active";
288 trip0-cdev-num = <1>;
289 trip0-cdev-name0 = "thermal-cpufreq-0";
290
291 trip1-temp = <75000>;
292 trip1-type = "active";
293 trip1-cdev-num = <1>;
294 trip1-cdev-name0 = "thermal-cpufreq-0";
295
296 trip2-temp = <80000>;
297 trip2-type = "active";
298 trip2-cdev-num = <1>;
299 trip2-cdev-name0 = "thermal-cpufreq-0";
300
301 trip3-temp = <85000>;
302 trip3-type = "critical";
303 trip3-cdev-num = <0>;
304
305 status = "okay";
306 };
307
301 ab8500 { 308 ab8500 {
302 ab8500-gpio { 309 ab8500-gpio {
303 compatible = "stericsson,ab8500-gpio"; 310 compatible = "stericsson,ab8500-gpio";
@@ -316,7 +323,7 @@
316 regulator-name = "V-MMC-SD"; 323 regulator-name = "V-MMC-SD";
317 }; 324 };
318 325
319 ab8500_ldo_initcore_reg: ab8500_ldo_initcore { 326 ab8500_ldo_intcore_reg: ab8500_ldo_intcore {
320 regulator-name = "V-INTCORE"; 327 regulator-name = "V-INTCORE";
321 }; 328 };
322 329
@@ -336,7 +343,7 @@
336 regulator-name = "V-AMIC1"; 343 regulator-name = "V-AMIC1";
337 }; 344 };
338 345
339 ab8500_ldo_amamic2_reg: ab8500_ldo_amamic2 { 346 ab8500_ldo_anamic2_reg: ab8500_ldo_anamic2 {
340 regulator-name = "V-AMIC2"; 347 regulator-name = "V-AMIC2";
341 }; 348 };
342 349
diff --git a/arch/arm/boot/dts/socfpga.dtsi b/arch/arm/boot/dts/socfpga.dtsi
index 16a6e13e08b4..bee62a2cf6d6 100644
--- a/arch/arm/boot/dts/socfpga.dtsi
+++ b/arch/arm/boot/dts/socfpga.dtsi
@@ -23,6 +23,7 @@
23 23
24 aliases { 24 aliases {
25 ethernet0 = &gmac0; 25 ethernet0 = &gmac0;
26 ethernet1 = &gmac1;
26 serial0 = &uart0; 27 serial0 = &uart0;
27 serial1 = &uart1; 28 serial1 = &uart1;
28 timer0 = &timer0; 29 timer0 = &timer0;
@@ -94,6 +95,12 @@
94 compatible = "fixed-clock"; 95 compatible = "fixed-clock";
95 }; 96 };
96 97
98 f2s_periph_ref_clk: f2s_periph_ref_clk {
99 #clock-cells = <0>;
100 compatible = "fixed-clock";
101 clock-frequency = <10000000>;
102 };
103
97 main_pll: main_pll { 104 main_pll: main_pll {
98 #address-cells = <1>; 105 #address-cells = <1>;
99 #size-cells = <0>; 106 #size-cells = <0>;
@@ -235,16 +242,222 @@
235 reg = <0xD4>; 242 reg = <0xD4>;
236 }; 243 };
237 }; 244 };
245
246 mpu_periph_clk: mpu_periph_clk {
247 #clock-cells = <0>;
248 compatible = "altr,socfpga-gate-clk";
249 clocks = <&mpuclk>;
250 fixed-divider = <4>;
251 };
252
253 mpu_l2_ram_clk: mpu_l2_ram_clk {
254 #clock-cells = <0>;
255 compatible = "altr,socfpga-gate-clk";
256 clocks = <&mpuclk>;
257 fixed-divider = <2>;
258 };
259
260 l4_main_clk: l4_main_clk {
261 #clock-cells = <0>;
262 compatible = "altr,socfpga-gate-clk";
263 clocks = <&mainclk>;
264 clk-gate = <0x60 0>;
265 };
266
267 l3_main_clk: l3_main_clk {
268 #clock-cells = <0>;
269 compatible = "altr,socfpga-gate-clk";
270 clocks = <&mainclk>;
271 };
272
273 l3_mp_clk: l3_mp_clk {
274 #clock-cells = <0>;
275 compatible = "altr,socfpga-gate-clk";
276 clocks = <&mainclk>;
277 div-reg = <0x64 0 2>;
278 clk-gate = <0x60 1>;
279 };
280
281 l3_sp_clk: l3_sp_clk {
282 #clock-cells = <0>;
283 compatible = "altr,socfpga-gate-clk";
284 clocks = <&mainclk>;
285 div-reg = <0x64 2 2>;
286 };
287
288 l4_mp_clk: l4_mp_clk {
289 #clock-cells = <0>;
290 compatible = "altr,socfpga-gate-clk";
291 clocks = <&mainclk>, <&per_base_clk>;
292 div-reg = <0x64 4 3>;
293 clk-gate = <0x60 2>;
294 };
295
296 l4_sp_clk: l4_sp_clk {
297 #clock-cells = <0>;
298 compatible = "altr,socfpga-gate-clk";
299 clocks = <&mainclk>, <&per_base_clk>;
300 div-reg = <0x64 7 3>;
301 clk-gate = <0x60 3>;
302 };
303
304 dbg_at_clk: dbg_at_clk {
305 #clock-cells = <0>;
306 compatible = "altr,socfpga-gate-clk";
307 clocks = <&dbg_base_clk>;
308 div-reg = <0x68 0 2>;
309 clk-gate = <0x60 4>;
310 };
311
312 dbg_clk: dbg_clk {
313 #clock-cells = <0>;
314 compatible = "altr,socfpga-gate-clk";
315 clocks = <&dbg_base_clk>;
316 div-reg = <0x68 2 2>;
317 clk-gate = <0x60 5>;
318 };
319
320 dbg_trace_clk: dbg_trace_clk {
321 #clock-cells = <0>;
322 compatible = "altr,socfpga-gate-clk";
323 clocks = <&dbg_base_clk>;
324 div-reg = <0x6C 0 3>;
325 clk-gate = <0x60 6>;
326 };
327
328 dbg_timer_clk: dbg_timer_clk {
329 #clock-cells = <0>;
330 compatible = "altr,socfpga-gate-clk";
331 clocks = <&dbg_base_clk>;
332 clk-gate = <0x60 7>;
333 };
334
335 cfg_clk: cfg_clk {
336 #clock-cells = <0>;
337 compatible = "altr,socfpga-gate-clk";
338 clocks = <&cfg_s2f_usr0_clk>;
339 clk-gate = <0x60 8>;
340 };
341
342 s2f_user0_clk: s2f_user0_clk {
343 #clock-cells = <0>;
344 compatible = "altr,socfpga-gate-clk";
345 clocks = <&cfg_s2f_usr0_clk>;
346 clk-gate = <0x60 9>;
347 };
348
349 emac_0_clk: emac_0_clk {
350 #clock-cells = <0>;
351 compatible = "altr,socfpga-gate-clk";
352 clocks = <&emac0_clk>;
353 clk-gate = <0xa0 0>;
354 };
355
356 emac_1_clk: emac_1_clk {
357 #clock-cells = <0>;
358 compatible = "altr,socfpga-gate-clk";
359 clocks = <&emac1_clk>;
360 clk-gate = <0xa0 1>;
361 };
362
363 usb_mp_clk: usb_mp_clk {
364 #clock-cells = <0>;
365 compatible = "altr,socfpga-gate-clk";
366 clocks = <&per_base_clk>;
367 clk-gate = <0xa0 2>;
368 div-reg = <0xa4 0 3>;
369 };
370
371 spi_m_clk: spi_m_clk {
372 #clock-cells = <0>;
373 compatible = "altr,socfpga-gate-clk";
374 clocks = <&per_base_clk>;
375 clk-gate = <0xa0 3>;
376 div-reg = <0xa4 3 3>;
377 };
378
379 can0_clk: can0_clk {
380 #clock-cells = <0>;
381 compatible = "altr,socfpga-gate-clk";
382 clocks = <&per_base_clk>;
383 clk-gate = <0xa0 4>;
384 div-reg = <0xa4 6 3>;
385 };
386
387 can1_clk: can1_clk {
388 #clock-cells = <0>;
389 compatible = "altr,socfpga-gate-clk";
390 clocks = <&per_base_clk>;
391 clk-gate = <0xa0 5>;
392 div-reg = <0xa4 9 3>;
393 };
394
395 gpio_db_clk: gpio_db_clk {
396 #clock-cells = <0>;
397 compatible = "altr,socfpga-gate-clk";
398 clocks = <&per_base_clk>;
399 clk-gate = <0xa0 6>;
400 div-reg = <0xa8 0 24>;
401 };
402
403 s2f_user1_clk: s2f_user1_clk {
404 #clock-cells = <0>;
405 compatible = "altr,socfpga-gate-clk";
406 clocks = <&s2f_usr1_clk>;
407 clk-gate = <0xa0 7>;
408 };
409
410 sdmmc_clk: sdmmc_clk {
411 #clock-cells = <0>;
412 compatible = "altr,socfpga-gate-clk";
413 clocks = <&f2s_periph_ref_clk>, <&main_nand_sdmmc_clk>, <&per_nand_mmc_clk>;
414 clk-gate = <0xa0 8>;
415 };
416
417 nand_x_clk: nand_x_clk {
418 #clock-cells = <0>;
419 compatible = "altr,socfpga-gate-clk";
420 clocks = <&f2s_periph_ref_clk>, <&main_nand_sdmmc_clk>, <&per_nand_mmc_clk>;
421 clk-gate = <0xa0 9>;
422 };
423
424 nand_clk: nand_clk {
425 #clock-cells = <0>;
426 compatible = "altr,socfpga-gate-clk";
427 clocks = <&f2s_periph_ref_clk>, <&main_nand_sdmmc_clk>, <&per_nand_mmc_clk>;
428 clk-gate = <0xa0 10>;
429 fixed-divider = <4>;
430 };
431
432 qspi_clk: qspi_clk {
433 #clock-cells = <0>;
434 compatible = "altr,socfpga-gate-clk";
435 clocks = <&f2s_periph_ref_clk>, <&main_qspi_clk>, <&per_qspi_clk>;
436 clk-gate = <0xa0 11>;
437 };
238 }; 438 };
239 }; 439 };
240 440
241 gmac0: stmmac@ff700000 { 441 gmac0: ethernet@ff700000 {
242 compatible = "altr,socfpga-stmmac", "snps,dwmac-3.70a", "snps,dwmac"; 442 compatible = "altr,socfpga-stmmac", "snps,dwmac-3.70a", "snps,dwmac";
243 reg = <0xff700000 0x2000>; 443 reg = <0xff700000 0x2000>;
244 interrupts = <0 115 4>; 444 interrupts = <0 115 4>;
245 interrupt-names = "macirq"; 445 interrupt-names = "macirq";
246 mac-address = [00 00 00 00 00 00];/* Filled in by U-Boot */ 446 mac-address = [00 00 00 00 00 00];/* Filled in by U-Boot */
247 phy-mode = "gmii"; 447 clocks = <&emac0_clk>;
448 clock-names = "stmmaceth";
449 status = "disabled";
450 };
451
452 gmac1: ethernet@ff702000 {
453 compatible = "altr,socfpga-stmmac", "snps,dwmac-3.70a", "snps,dwmac";
454 reg = <0xff702000 0x2000>;
455 interrupts = <0 120 4>;
456 interrupt-names = "macirq";
457 mac-address = [00 00 00 00 00 00];/* Filled in by U-Boot */
458 clocks = <&emac1_clk>;
459 clock-names = "stmmaceth";
460 status = "disabled";
248 }; 461 };
249 462
250 L2: l2-cache@fffef000 { 463 L2: l2-cache@fffef000 {
diff --git a/arch/arm/boot/dts/socfpga_cyclone5.dts b/arch/arm/boot/dts/socfpga_cyclone5.dts
index 2495958f1016..973999d2c697 100644
--- a/arch/arm/boot/dts/socfpga_cyclone5.dts
+++ b/arch/arm/boot/dts/socfpga_cyclone5.dts
@@ -32,6 +32,13 @@
32 reg = <0x0 0x40000000>; /* 1GB */ 32 reg = <0x0 0x40000000>; /* 1GB */
33 }; 33 };
34 34
35 aliases {
36 /* this allow the ethaddr uboot environmnet variable contents
37 * to be added to the gmac1 device tree blob.
38 */
39 ethernet0 = &gmac1;
40 };
41
35 soc { 42 soc {
36 clkmgr@ffd04000 { 43 clkmgr@ffd04000 {
37 clocks { 44 clocks {
@@ -41,6 +48,12 @@
41 }; 48 };
42 }; 49 };
43 50
51 ethernet@ff702000 {
52 phy-mode = "rgmii";
53 phy-addr = <0xffffffff>; /* probe for phy addr */
54 status = "okay";
55 };
56
44 timer0@ffc08000 { 57 timer0@ffc08000 {
45 clock-frequency = <100000000>; 58 clock-frequency = <100000000>;
46 }; 59 };
diff --git a/arch/arm/boot/dts/socfpga_vt.dts b/arch/arm/boot/dts/socfpga_vt.dts
index 0bf035d607f0..d1ec0cab2dee 100644
--- a/arch/arm/boot/dts/socfpga_vt.dts
+++ b/arch/arm/boot/dts/socfpga_vt.dts
@@ -41,6 +41,11 @@
41 }; 41 };
42 }; 42 };
43 43
44 ethernet@ff700000 {
45 phy-mode = "gmii";
46 status = "okay";
47 };
48
44 timer0@ffc08000 { 49 timer0@ffc08000 {
45 clock-frequency = <7000000>; 50 clock-frequency = <7000000>;
46 }; 51 };
diff --git a/arch/arm/boot/dts/spear13xx.dtsi b/arch/arm/boot/dts/spear13xx.dtsi
index 45597fd91050..4382547df58a 100644
--- a/arch/arm/boot/dts/spear13xx.dtsi
+++ b/arch/arm/boot/dts/spear13xx.dtsi
@@ -22,12 +22,14 @@
22 22
23 cpu@0 { 23 cpu@0 {
24 compatible = "arm,cortex-a9"; 24 compatible = "arm,cortex-a9";
25 device_type = "cpu";
25 reg = <0>; 26 reg = <0>;
26 next-level-cache = <&L2>; 27 next-level-cache = <&L2>;
27 }; 28 };
28 29
29 cpu@1 { 30 cpu@1 {
30 compatible = "arm,cortex-a9"; 31 compatible = "arm,cortex-a9";
32 device_type = "cpu";
31 reg = <1>; 33 reg = <1>;
32 next-level-cache = <&L2>; 34 next-level-cache = <&L2>;
33 }; 35 };
diff --git a/arch/arm/boot/dts/spear3xx.dtsi b/arch/arm/boot/dts/spear3xx.dtsi
index c2a852d43c48..f0e3fcf8e323 100644
--- a/arch/arm/boot/dts/spear3xx.dtsi
+++ b/arch/arm/boot/dts/spear3xx.dtsi
@@ -17,8 +17,12 @@
17 interrupt-parent = <&vic>; 17 interrupt-parent = <&vic>;
18 18
19 cpus { 19 cpus {
20 cpu@0 { 20 #address-cells = <0>;
21 compatible = "arm,arm926ejs"; 21 #size-cells = <0>;
22
23 cpu {
24 compatible = "arm,arm926ej-s";
25 device_type = "cpu";
22 }; 26 };
23 }; 27 };
24 28
diff --git a/arch/arm/boot/dts/spear600.dtsi b/arch/arm/boot/dts/spear600.dtsi
index 19f99dc4115e..9f60a7b6a42b 100644
--- a/arch/arm/boot/dts/spear600.dtsi
+++ b/arch/arm/boot/dts/spear600.dtsi
@@ -15,8 +15,12 @@
15 compatible = "st,spear600"; 15 compatible = "st,spear600";
16 16
17 cpus { 17 cpus {
18 cpu@0 { 18 #address-cells = <0>;
19 compatible = "arm,arm926ejs"; 19 #size-cells = <0>;
20
21 cpu {
22 compatible = "arm,arm926ej-s";
23 device_type = "cpu";
20 }; 24 };
21 }; 25 };
22 26
diff --git a/arch/arm/boot/dts/st-pincfg.h b/arch/arm/boot/dts/st-pincfg.h
new file mode 100644
index 000000000000..8c45d85ac13e
--- /dev/null
+++ b/arch/arm/boot/dts/st-pincfg.h
@@ -0,0 +1,71 @@
1#ifndef _ST_PINCFG_H_
2#define _ST_PINCFG_H_
3
4/* Alternate functions */
5#define ALT1 1
6#define ALT2 2
7#define ALT3 3
8#define ALT4 4
9#define ALT5 5
10#define ALT6 6
11#define ALT7 7
12
13/* Output enable */
14#define OE (1 << 27)
15/* Pull Up */
16#define PU (1 << 26)
17/* Open Drain */
18#define OD (1 << 26)
19#define RT (1 << 23)
20#define INVERTCLK (1 << 22)
21#define CLKNOTDATA (1 << 21)
22#define DOUBLE_EDGE (1 << 20)
23#define CLK_A (0 << 18)
24#define CLK_B (1 << 18)
25#define CLK_C (2 << 18)
26#define CLK_D (3 << 18)
27
28/* User-frendly defines for Pin Direction */
29 /* oe = 0, pu = 0, od = 0 */
30#define IN (0)
31 /* oe = 0, pu = 1, od = 0 */
32#define IN_PU (PU)
33 /* oe = 1, pu = 0, od = 0 */
34#define OUT (OE)
35 /* oe = 1, pu = 0, od = 1 */
36#define BIDIR (OE | OD)
37 /* oe = 1, pu = 1, od = 1 */
38#define BIDIR_PU (OE | PU | OD)
39
40/* RETIME_TYPE */
41/*
42 * B Mode
43 * Bypass retime with optional delay parameter
44 */
45#define BYPASS (0)
46/*
47 * R0, R1, R0D, R1D modes
48 * single-edge data non inverted clock, retime data with clk
49 */
50#define SE_NICLK_IO (RT)
51/*
52 * RIV0, RIV1, RIV0D, RIV1D modes
53 * single-edge data inverted clock, retime data with clk
54 */
55#define SE_ICLK_IO (RT | INVERTCLK)
56/*
57 * R0E, R1E, R0ED, R1ED modes
58 * double-edge data, retime data with clk
59 */
60#define DE_IO (RT | DOUBLE_EDGE)
61/*
62 * CIV0, CIV1 modes with inverted clock
63 * Retiming the clk pins will park clock & reduce the noise within the core.
64 */
65#define ICLK (RT | CLKNOTDATA | INVERTCLK)
66/*
67 * CLK0, CLK1 modes with non-inverted clock
68 * Retiming the clk pins will park clock & reduce the noise within the core.
69 */
70#define NICLK (RT | CLKNOTDATA)
71#endif /* _ST_PINCFG_H_ */
diff --git a/arch/arm/boot/dts/ste-nomadik-s8815.dts b/arch/arm/boot/dts/ste-nomadik-s8815.dts
index 6f82d9368948..16c3888b7b15 100644
--- a/arch/arm/boot/dts/ste-nomadik-s8815.dts
+++ b/arch/arm/boot/dts/ste-nomadik-s8815.dts
@@ -22,6 +22,49 @@
22 }; 22 };
23 }; 23 };
24 24
25 src@101e0000 {
26 /* These chrystal drivers are not used on this board */
27 disable-sxtalo;
28 disable-mxtalo;
29 };
30
31 pinctrl {
32 /* Hog CD pins */
33 pinctrl-names = "default";
34 pinctrl-0 = <&cd_default_mode>;
35
36 mmcsd-cd {
37 cd_default_mode: cd_default {
38 cd_default_cfg1 {
39 /* CD input GPIO */
40 ste,pins = "GPIO111_H21";
41 ste,input = <0>;
42 };
43 cd_default_cfg2 {
44 /* CD GPIO biasing */
45 ste,pins = "GPIO112_J21";
46 ste,output = <0>;
47 };
48 };
49 };
50 user-led {
51 user_led_default_mode: user_led_default {
52 user_led_default_cfg {
53 ste,pins = "GPIO2_C5";
54 ste,output = <1>;
55 };
56 };
57 };
58 user-button {
59 user_button_default_mode: user_button_default {
60 user_button_default_cfg {
61 ste,pins = "GPIO3_A4";
62 ste,input = <0>;
63 };
64 };
65 };
66 };
67
25 /* Custom board node with GPIO pins to active etc */ 68 /* Custom board node with GPIO pins to active etc */
26 usb-s8815 { 69 usb-s8815 {
27 /* The S8815 is using this very GPIO pin for the SMSC91x IRQs */ 70 /* The S8815 is using this very GPIO pin for the SMSC91x IRQs */
@@ -33,4 +76,30 @@
33 gpios = <&gpio3 16 0x1>; 76 gpios = <&gpio3 16 0x1>;
34 }; 77 };
35 }; 78 };
79
80 /* The user LED on the board is set up to be used for heartbeat */
81 leds {
82 compatible = "gpio-leds";
83 user-led {
84 label = "user_led";
85 gpios = <&gpio0 2 0x1>;
86 default-state = "off";
87 linux,default-trigger = "heartbeat";
88 pinctrl-names = "default";
89 pinctrl-0 = <&user_led_default_mode>;
90 };
91 };
92
93 /* User key mapped in as "escape" */
94 gpio-keys {
95 compatible = "gpio-keys";
96 user-button {
97 label = "user_button";
98 gpios = <&gpio0 3 0x1>;
99 linux,code = <1>; /* KEY_ESC */
100 gpio-key,wakeup;
101 pinctrl-names = "default";
102 pinctrl-0 = <&user_button_default_mode>;
103 };
104 };
36}; 105};
diff --git a/arch/arm/boot/dts/ste-nomadik-stn8815.dtsi b/arch/arm/boot/dts/ste-nomadik-stn8815.dtsi
index 4a4aab395141..a3acfa7b3dc9 100644
--- a/arch/arm/boot/dts/ste-nomadik-stn8815.dtsi
+++ b/arch/arm/boot/dts/ste-nomadik-stn8815.dtsi
@@ -21,18 +21,23 @@
21 cache-level = <2>; 21 cache-level = <2>;
22 }; 22 };
23 23
24 mtu0 { 24 mtu0: mtu@101e2000 {
25 /* Nomadik system timer */ 25 /* Nomadik system timer */
26 compatible = "st,nomadik-mtu";
26 reg = <0x101e2000 0x1000>; 27 reg = <0x101e2000 0x1000>;
27 interrupt-parent = <&vica>; 28 interrupt-parent = <&vica>;
28 interrupts = <4>; 29 interrupts = <4>;
30 clocks = <&timclk>, <&pclk>;
31 clock-names = "timclk", "apb_pclk";
29 }; 32 };
30 33
31 mtu1 { 34 mtu1: mtu@101e3000 {
32 /* Secondary timer */ 35 /* Secondary timer */
33 reg = <0x101e3000 0x1000>; 36 reg = <0x101e3000 0x1000>;
34 interrupt-parent = <&vica>; 37 interrupt-parent = <&vica>;
35 interrupts = <5>; 38 interrupts = <5>;
39 clocks = <&timclk>, <&pclk>;
40 clock-names = "timclk", "apb_pclk";
36 }; 41 };
37 42
38 gpio0: gpio@101e4000 { 43 gpio0: gpio@101e4000 {
@@ -45,6 +50,7 @@
45 gpio-controller; 50 gpio-controller;
46 #gpio-cells = <2>; 51 #gpio-cells = <2>;
47 gpio-bank = <0>; 52 gpio-bank = <0>;
53 clocks = <&pclk>;
48 }; 54 };
49 55
50 gpio1: gpio@101e5000 { 56 gpio1: gpio@101e5000 {
@@ -57,6 +63,7 @@
57 gpio-controller; 63 gpio-controller;
58 #gpio-cells = <2>; 64 #gpio-cells = <2>;
59 gpio-bank = <1>; 65 gpio-bank = <1>;
66 clocks = <&pclk>;
60 }; 67 };
61 68
62 gpio2: gpio@101e6000 { 69 gpio2: gpio@101e6000 {
@@ -69,6 +76,7 @@
69 gpio-controller; 76 gpio-controller;
70 #gpio-cells = <2>; 77 #gpio-cells = <2>;
71 gpio-bank = <2>; 78 gpio-bank = <2>;
79 clocks = <&pclk>;
72 }; 80 };
73 81
74 gpio3: gpio@101e7000 { 82 gpio3: gpio@101e7000 {
@@ -81,10 +89,544 @@
81 gpio-controller; 89 gpio-controller;
82 #gpio-cells = <2>; 90 #gpio-cells = <2>;
83 gpio-bank = <3>; 91 gpio-bank = <3>;
92 clocks = <&pclk>;
84 }; 93 };
85 94
86 pinctrl { 95 pinctrl {
87 compatible = "stericsson,nmk-pinctrl-stn8815"; 96 compatible = "stericsson,stn8815-pinctrl";
97 /* Pin configurations */
98 uart0 {
99 uart0_default_mux: uart0_mux {
100 u0_default_mux {
101 ste,function = "u0";
102 ste,pins = "u0_a_1";
103 };
104 };
105 };
106 uart1 {
107 uart1_default_mux: uart1_mux {
108 u1_default_mux {
109 ste,function = "u1";
110 ste,pins = "u1_a_1";
111 };
112 };
113 };
114 mmcsd {
115 mmcsd_default_mux: mmcsd_mux {
116 mmcsd_default_mux {
117 ste,function = "mmcsd";
118 ste,pins = "mmcsd_a_1";
119 };
120 };
121 mmcsd_default_mode: mmcsd_default {
122 mmcsd_default_cfg1 {
123 /* MCCLK */
124 ste,pins = "GPIO8_B10";
125 ste,output = <0>;
126 };
127 mmcsd_default_cfg2 {
128 /* MCCMDDIR, MCDAT0DIR, MCDAT31DIR */
129 ste,pins = "GPIO10_C11", "GPIO15_A12",
130 "GPIO16_C13";
131 ste,output = <1>;
132 };
133 mmcsd_default_cfg3 {
134 /* MCCMD, MCDAT3-0, MCMSFBCLK */
135 ste,pins = "GPIO9_A10", "GPIO11_B11",
136 "GPIO12_A11", "GPIO13_C12",
137 "GPIO14_B12", "GPIO24_C15";
138 ste,input = <1>;
139 };
140 };
141 };
142 i2c0 {
143 i2c0_default_mode: i2c0_default {
144 i2c0_default_cfg {
145 ste,pins = "GPIO62_D3", "GPIO63_D2";
146 ste,input = <1>;
147 };
148 };
149 };
150 i2c1 {
151 i2c1_default_mode: i2c1_default {
152 i2c1_default_cfg {
153 ste,pins = "GPIO53_L4", "GPIO54_L3";
154 ste,input = <1>;
155 };
156 };
157 };
158 i2c2 {
159 i2c2_default_mode: i2c2_default {
160 i2c2_default_cfg {
161 ste,pins = "GPIO73_C21", "GPIO74_C20";
162 ste,input = <1>;
163 };
164 };
165 };
166 };
167
168 src: src@101e0000 {
169 compatible = "stericsson,nomadik-src";
170 reg = <0x101e0000 0x1000>;
171 disable-sxtalo;
172 disable-mxtalo;
173
174 /*
175 * MXTAL "Main Chrystal" is a chrystal oscillator @19.2 MHz
176 * that is parent of TIMCLK, PLL1 and PLL2
177 */
178 mxtal: mxtal@19.2M {
179 #clock-cells = <0>;
180 compatible = "fixed-clock";
181 clock-frequency = <19200000>;
182 };
183
184 /*
185 * The 2.4 MHz TIMCLK reference clock is active at
186 * boot time, this is actually the MXTALCLK @19.2 MHz
187 * divided by 8. This clock is used by the timers and
188 * watchdog. See page 105 ff.
189 */
190 timclk: timclk@2.4M {
191 #clock-cells = <0>;
192 compatible = "fixed-factor-clock";
193 clock-div = <8>;
194 clock-mult = <1>;
195 clocks = <&mxtal>;
196 };
197
198 /* PLL1 is locked to MXTALI and variable from 20.4 to 334 MHz */
199 pll1: pll1@0 {
200 #clock-cells = <0>;
201 compatible = "st,nomadik-pll-clock";
202 pll-id = <1>;
203 clocks = <&mxtal>;
204 };
205
206 /* HCLK divides the PLL1 with 1,2,3 or 4 */
207 hclk: hclk@0 {
208 #clock-cells = <0>;
209 compatible = "st,nomadik-hclk-clock";
210 clocks = <&pll1>;
211 };
212 /* The PCLK domain uses HCLK right off */
213 pclk: pclk@0 {
214 #clock-cells = <0>;
215 compatible = "fixed-factor-clock";
216 clock-div = <1>;
217 clock-mult = <1>;
218 clocks = <&hclk>;
219 };
220
221 /* PLL2 is usually 864 MHz and divided into a few fixed rates */
222 pll2: pll2@0 {
223 #clock-cells = <0>;
224 compatible = "st,nomadik-pll-clock";
225 pll-id = <2>;
226 clocks = <&mxtal>;
227 };
228 clk216: clk216@216M {
229 #clock-cells = <0>;
230 compatible = "fixed-factor-clock";
231 clock-div = <4>;
232 clock-mult = <1>;
233 clocks = <&pll2>;
234 };
235 clk108: clk108@108M {
236 #clock-cells = <0>;
237 compatible = "fixed-factor-clock";
238 clock-div = <2>;
239 clock-mult = <1>;
240 clocks = <&clk216>;
241 };
242 clk72: clk72@72M {
243 #clock-cells = <0>;
244 compatible = "fixed-factor-clock";
245 /* The data sheet does not say how this is derived */
246 clock-div = <12>;
247 clock-mult = <1>;
248 clocks = <&pll2>;
249 };
250 clk48: clk48@48M {
251 #clock-cells = <0>;
252 compatible = "fixed-factor-clock";
253 /* The data sheet does not say how this is derived */
254 clock-div = <18>;
255 clock-mult = <1>;
256 clocks = <&pll2>;
257 };
258 clk27: clk27@27M {
259 #clock-cells = <0>;
260 compatible = "fixed-factor-clock";
261 clock-div = <4>;
262 clock-mult = <1>;
263 clocks = <&clk108>;
264 };
265
266 /* This apparently exists as well */
267 ulpiclk: ulpiclk@60M {
268 #clock-cells = <0>;
269 compatible = "fixed-clock";
270 clock-frequency = <60000000>;
271 };
272
273 /*
274 * IP AMBA bus clocks, driving the bus side of the
275 * peripheral clocking, clock gates.
276 */
277
278 hclkdma0: hclkdma0@48M {
279 #clock-cells = <0>;
280 compatible = "st,nomadik-src-clock";
281 clock-id = <0>;
282 clocks = <&hclk>;
283 };
284 hclksmc: hclksmc@48M {
285 #clock-cells = <0>;
286 compatible = "st,nomadik-src-clock";
287 clock-id = <1>;
288 clocks = <&hclk>;
289 };
290 hclksdram: hclksdram@48M {
291 #clock-cells = <0>;
292 compatible = "st,nomadik-src-clock";
293 clock-id = <2>;
294 clocks = <&hclk>;
295 };
296 hclkdma1: hclkdma1@48M {
297 #clock-cells = <0>;
298 compatible = "st,nomadik-src-clock";
299 clock-id = <3>;
300 clocks = <&hclk>;
301 };
302 hclkclcd: hclkclcd@48M {
303 #clock-cells = <0>;
304 compatible = "st,nomadik-src-clock";
305 clock-id = <4>;
306 clocks = <&hclk>;
307 };
308 pclkirda: pclkirda@48M {
309 #clock-cells = <0>;
310 compatible = "st,nomadik-src-clock";
311 clock-id = <5>;
312 clocks = <&pclk>;
313 };
314 pclkssp: pclkssp@48M {
315 #clock-cells = <0>;
316 compatible = "st,nomadik-src-clock";
317 clock-id = <6>;
318 clocks = <&pclk>;
319 };
320 pclkuart0: pclkuart0@48M {
321 #clock-cells = <0>;
322 compatible = "st,nomadik-src-clock";
323 clock-id = <7>;
324 clocks = <&pclk>;
325 };
326 pclksdi: pclksdi@48M {
327 #clock-cells = <0>;
328 compatible = "st,nomadik-src-clock";
329 clock-id = <8>;
330 clocks = <&pclk>;
331 };
332 pclki2c0: pclki2c0@48M {
333 #clock-cells = <0>;
334 compatible = "st,nomadik-src-clock";
335 clock-id = <9>;
336 clocks = <&pclk>;
337 };
338 pclki2c1: pclki2c1@48M {
339 #clock-cells = <0>;
340 compatible = "st,nomadik-src-clock";
341 clock-id = <10>;
342 clocks = <&pclk>;
343 };
344 pclkuart1: pclkuart1@48M {
345 #clock-cells = <0>;
346 compatible = "st,nomadik-src-clock";
347 clock-id = <11>;
348 clocks = <&pclk>;
349 };
350 pclkmsp0: pclkmsp0@48M {
351 #clock-cells = <0>;
352 compatible = "st,nomadik-src-clock";
353 clock-id = <12>;
354 clocks = <&pclk>;
355 };
356 hclkusb: hclkusb@48M {
357 #clock-cells = <0>;
358 compatible = "st,nomadik-src-clock";
359 clock-id = <13>;
360 clocks = <&hclk>;
361 };
362 hclkdif: hclkdif@48M {
363 #clock-cells = <0>;
364 compatible = "st,nomadik-src-clock";
365 clock-id = <14>;
366 clocks = <&hclk>;
367 };
368 hclksaa: hclksaa@48M {
369 #clock-cells = <0>;
370 compatible = "st,nomadik-src-clock";
371 clock-id = <15>;
372 clocks = <&hclk>;
373 };
374 hclksva: hclksva@48M {
375 #clock-cells = <0>;
376 compatible = "st,nomadik-src-clock";
377 clock-id = <16>;
378 clocks = <&hclk>;
379 };
380 pclkhsi: pclkhsi@48M {
381 #clock-cells = <0>;
382 compatible = "st,nomadik-src-clock";
383 clock-id = <17>;
384 clocks = <&pclk>;
385 };
386 pclkxti: pclkxti@48M {
387 #clock-cells = <0>;
388 compatible = "st,nomadik-src-clock";
389 clock-id = <18>;
390 clocks = <&pclk>;
391 };
392 pclkuart2: pclkuart2@48M {
393 #clock-cells = <0>;
394 compatible = "st,nomadik-src-clock";
395 clock-id = <19>;
396 clocks = <&pclk>;
397 };
398 pclkmsp1: pclkmsp1@48M {
399 #clock-cells = <0>;
400 compatible = "st,nomadik-src-clock";
401 clock-id = <20>;
402 clocks = <&pclk>;
403 };
404 pclkmsp2: pclkmsp2@48M {
405 #clock-cells = <0>;
406 compatible = "st,nomadik-src-clock";
407 clock-id = <21>;
408 clocks = <&pclk>;
409 };
410 pclkowm: pclkowm@48M {
411 #clock-cells = <0>;
412 compatible = "st,nomadik-src-clock";
413 clock-id = <22>;
414 clocks = <&pclk>;
415 };
416 hclkhpi: hclkhpi@48M {
417 #clock-cells = <0>;
418 compatible = "st,nomadik-src-clock";
419 clock-id = <23>;
420 clocks = <&hclk>;
421 };
422 pclkske: pclkske@48M {
423 #clock-cells = <0>;
424 compatible = "st,nomadik-src-clock";
425 clock-id = <24>;
426 clocks = <&pclk>;
427 };
428 pclkhsem: pclkhsem@48M {
429 #clock-cells = <0>;
430 compatible = "st,nomadik-src-clock";
431 clock-id = <25>;
432 clocks = <&pclk>;
433 };
434 hclk3d: hclk3d@48M {
435 #clock-cells = <0>;
436 compatible = "st,nomadik-src-clock";
437 clock-id = <26>;
438 clocks = <&hclk>;
439 };
440 hclkhash: hclkhash@48M {
441 #clock-cells = <0>;
442 compatible = "st,nomadik-src-clock";
443 clock-id = <27>;
444 clocks = <&hclk>;
445 };
446 hclkcryp: hclkcryp@48M {
447 #clock-cells = <0>;
448 compatible = "st,nomadik-src-clock";
449 clock-id = <28>;
450 clocks = <&hclk>;
451 };
452 pclkmshc: pclkmshc@48M {
453 #clock-cells = <0>;
454 compatible = "st,nomadik-src-clock";
455 clock-id = <29>;
456 clocks = <&pclk>;
457 };
458 hclkusbm: hclkusbm@48M {
459 #clock-cells = <0>;
460 compatible = "st,nomadik-src-clock";
461 clock-id = <30>;
462 clocks = <&hclk>;
463 };
464 hclkrng: hclkrng@48M {
465 #clock-cells = <0>;
466 compatible = "st,nomadik-src-clock";
467 clock-id = <31>;
468 clocks = <&hclk>;
469 };
470
471 /* IP kernel clocks */
472 clcdclk: clcdclk@0 {
473 #clock-cells = <0>;
474 compatible = "st,nomadik-src-clock";
475 clock-id = <36>;
476 clocks = <&clk72 &clk48>;
477 };
478 irdaclk: irdaclk@48M {
479 #clock-cells = <0>;
480 compatible = "st,nomadik-src-clock";
481 clock-id = <37>;
482 clocks = <&clk48>;
483 };
484 sspiclk: sspiclk@48M {
485 #clock-cells = <0>;
486 compatible = "st,nomadik-src-clock";
487 clock-id = <38>;
488 clocks = <&clk48>;
489 };
490 uart0clk: uart0clk@48M {
491 #clock-cells = <0>;
492 compatible = "st,nomadik-src-clock";
493 clock-id = <39>;
494 clocks = <&clk48>;
495 };
496 sdiclk: sdiclk@48M {
497 /* Also called MCCLK in some documents */
498 #clock-cells = <0>;
499 compatible = "st,nomadik-src-clock";
500 clock-id = <40>;
501 clocks = <&clk48>;
502 };
503 i2c0clk: i2c0clk@48M {
504 #clock-cells = <0>;
505 compatible = "st,nomadik-src-clock";
506 clock-id = <41>;
507 clocks = <&clk48>;
508 };
509 i2c1clk: i2c1clk@48M {
510 #clock-cells = <0>;
511 compatible = "st,nomadik-src-clock";
512 clock-id = <42>;
513 clocks = <&clk48>;
514 };
515 uart1clk: uart1clk@48M {
516 #clock-cells = <0>;
517 compatible = "st,nomadik-src-clock";
518 clock-id = <43>;
519 clocks = <&clk48>;
520 };
521 mspclk0: mspclk0@48M {
522 #clock-cells = <0>;
523 compatible = "st,nomadik-src-clock";
524 clock-id = <44>;
525 clocks = <&clk48>;
526 };
527 usbclk: usbclk@48M {
528 #clock-cells = <0>;
529 compatible = "st,nomadik-src-clock";
530 clock-id = <45>;
531 clocks = <&clk48>; /* 48 MHz not ULPI */
532 };
533 difclk: difclk@72M {
534 #clock-cells = <0>;
535 compatible = "st,nomadik-src-clock";
536 clock-id = <46>;
537 clocks = <&clk72>;
538 };
539 ipi2cclk: ipi2cclk@48M {
540 #clock-cells = <0>;
541 compatible = "st,nomadik-src-clock";
542 clock-id = <47>;
543 clocks = <&clk48>; /* Guess */
544 };
545 ipbmcclk: ipbmcclk@48M {
546 #clock-cells = <0>;
547 compatible = "st,nomadik-src-clock";
548 clock-id = <48>;
549 clocks = <&clk48>; /* Guess */
550 };
551 hsiclkrx: hsiclkrx@216M {
552 #clock-cells = <0>;
553 compatible = "st,nomadik-src-clock";
554 clock-id = <49>;
555 clocks = <&clk216>;
556 };
557 hsiclktx: hsiclktx@108M {
558 #clock-cells = <0>;
559 compatible = "st,nomadik-src-clock";
560 clock-id = <50>;
561 clocks = <&clk108>;
562 };
563 uart2clk: uart2clk@48M {
564 #clock-cells = <0>;
565 compatible = "st,nomadik-src-clock";
566 clock-id = <51>;
567 clocks = <&clk48>;
568 };
569 mspclk1: mspclk1@48M {
570 #clock-cells = <0>;
571 compatible = "st,nomadik-src-clock";
572 clock-id = <52>;
573 clocks = <&clk48>;
574 };
575 mspclk2: mspclk2@48M {
576 #clock-cells = <0>;
577 compatible = "st,nomadik-src-clock";
578 clock-id = <53>;
579 clocks = <&clk48>;
580 };
581 owmclk: owmclk@48M {
582 #clock-cells = <0>;
583 compatible = "st,nomadik-src-clock";
584 clock-id = <54>;
585 clocks = <&clk48>; /* Guess */
586 };
587 skeclk: skeclk@48M {
588 #clock-cells = <0>;
589 compatible = "st,nomadik-src-clock";
590 clock-id = <56>;
591 clocks = <&clk48>; /* Guess */
592 };
593 x3dclk: x3dclk@48M {
594 #clock-cells = <0>;
595 compatible = "st,nomadik-src-clock";
596 clock-id = <58>;
597 clocks = <&clk48>; /* Guess */
598 };
599 pclkmsp3: pclkmsp3@48M {
600 #clock-cells = <0>;
601 compatible = "st,nomadik-src-clock";
602 clock-id = <59>;
603 clocks = <&pclk>;
604 };
605 mspclk3: mspclk3@48M {
606 #clock-cells = <0>;
607 compatible = "st,nomadik-src-clock";
608 clock-id = <60>;
609 clocks = <&clk48>;
610 };
611 mshcclk: mshcclk@48M {
612 #clock-cells = <0>;
613 compatible = "st,nomadik-src-clock";
614 clock-id = <61>;
615 clocks = <&clk48>; /* Guess */
616 };
617 usbmclk: usbmclk@48M {
618 #clock-cells = <0>;
619 compatible = "st,nomadik-src-clock";
620 clock-id = <62>;
621 /* Stated as "48 MHz not ULPI clock" */
622 clocks = <&clk48>;
623 };
624 rngcclk: rngcclk@48M {
625 #clock-cells = <0>;
626 compatible = "st,nomadik-src-clock";
627 clock-id = <63>;
628 clocks = <&clk48>; /* Guess */
629 };
88 }; 630 };
89 631
90 /* A NAND flash of 128 MiB */ 632 /* A NAND flash of 128 MiB */
@@ -97,6 +639,7 @@
97 <0x41000000 0x2000>, /* NAND Base ADDR */ 639 <0x41000000 0x2000>, /* NAND Base ADDR */
98 <0x40800000 0x2000>; /* NAND Base CMD */ 640 <0x40800000 0x2000>; /* NAND Base CMD */
99 reg-names = "fsmc_regs", "nand_data", "nand_addr", "nand_cmd"; 641 reg-names = "fsmc_regs", "nand_data", "nand_addr", "nand_cmd";
642 clocks = <&hclksmc>;
100 status = "okay"; 643 status = "okay";
101 644
102 partition@0 { 645 partition@0 {
@@ -144,6 +687,8 @@
144 <&gpio1 30 0>; /* scl */ 687 <&gpio1 30 0>; /* scl */
145 #address-cells = <1>; 688 #address-cells = <1>;
146 #size-cells = <0>; 689 #size-cells = <0>;
690 pinctrl-names = "default";
691 pinctrl-0 = <&i2c0_default_mode>;
147 692
148 stw4811@2d { 693 stw4811@2d {
149 compatible = "st,stw4811"; 694 compatible = "st,stw4811";
@@ -158,6 +703,8 @@
158 <&gpio1 21 0>; /* scl */ 703 <&gpio1 21 0>; /* scl */
159 #address-cells = <1>; 704 #address-cells = <1>;
160 #size-cells = <0>; 705 #size-cells = <0>;
706 pinctrl-names = "default";
707 pinctrl-0 = <&i2c1_default_mode>;
161 708
162 camera@2d { 709 camera@2d {
163 compatible = "st,camera"; 710 compatible = "st,camera";
@@ -180,6 +727,9 @@
180 <&gpio2 9 0>; /* scl */ 727 <&gpio2 9 0>; /* scl */
181 #address-cells = <1>; 728 #address-cells = <1>;
182 #size-cells = <0>; 729 #size-cells = <0>;
730 pinctrl-names = "default";
731 pinctrl-0 = <&i2c2_default_mode>;
732
183 stw4811@2d { 733 stw4811@2d {
184 compatible = "st,stw4811-usb"; 734 compatible = "st,stw4811-usb";
185 reg = <0x2d>; 735 reg = <0x2d>;
@@ -211,6 +761,10 @@
211 reg = <0x101fd000 0x1000>; 761 reg = <0x101fd000 0x1000>;
212 interrupt-parent = <&vica>; 762 interrupt-parent = <&vica>;
213 interrupts = <12>; 763 interrupts = <12>;
764 clocks = <&uart0clk>, <&pclkuart0>;
765 clock-names = "uartclk", "apb_pclk";
766 pinctrl-names = "default";
767 pinctrl-0 = <&uart0_default_mux>;
214 }; 768 };
215 769
216 uart1: uart@101fb000 { 770 uart1: uart@101fb000 {
@@ -218,6 +772,10 @@
218 reg = <0x101fb000 0x1000>; 772 reg = <0x101fb000 0x1000>;
219 interrupt-parent = <&vica>; 773 interrupt-parent = <&vica>;
220 interrupts = <17>; 774 interrupts = <17>;
775 clocks = <&uart1clk>, <&pclkuart1>;
776 clock-names = "uartclk", "apb_pclk";
777 pinctrl-names = "default";
778 pinctrl-0 = <&uart1_default_mux>;
221 }; 779 };
222 780
223 uart2: uart@101f2000 { 781 uart2: uart@101f2000 {
@@ -225,17 +783,23 @@
225 reg = <0x101f2000 0x1000>; 783 reg = <0x101f2000 0x1000>;
226 interrupt-parent = <&vica>; 784 interrupt-parent = <&vica>;
227 interrupts = <28>; 785 interrupts = <28>;
786 clocks = <&uart2clk>, <&pclkuart2>;
787 clock-names = "uartclk", "apb_pclk";
228 status = "disabled"; 788 status = "disabled";
229 }; 789 };
230 790
231 rng: rng@101b0000 { 791 rng: rng@101b0000 {
232 compatible = "arm,primecell"; 792 compatible = "arm,primecell";
233 reg = <0x101b0000 0x1000>; 793 reg = <0x101b0000 0x1000>;
794 clocks = <&rngcclk>, <&hclkrng>;
795 clock-names = "rng", "apb_pclk";
234 }; 796 };
235 797
236 rtc: rtc@101e8000 { 798 rtc: rtc@101e8000 {
237 compatible = "arm,pl031", "arm,primecell"; 799 compatible = "arm,pl031", "arm,primecell";
238 reg = <0x101e8000 0x1000>; 800 reg = <0x101e8000 0x1000>;
801 clocks = <&pclk>;
802 clock-names = "apb_pclk";
239 interrupt-parent = <&vica>; 803 interrupt-parent = <&vica>;
240 interrupts = <10>; 804 interrupts = <10>;
241 }; 805 };
@@ -243,6 +807,8 @@
243 mmcsd: sdi@101f6000 { 807 mmcsd: sdi@101f6000 {
244 compatible = "arm,pl18x", "arm,primecell"; 808 compatible = "arm,pl18x", "arm,primecell";
245 reg = <0x101f6000 0x1000>; 809 reg = <0x101f6000 0x1000>;
810 clocks = <&sdiclk>, <&pclksdi>;
811 clock-names = "mclk", "apb_pclk";
246 interrupt-parent = <&vica>; 812 interrupt-parent = <&vica>;
247 interrupts = <22>; 813 interrupts = <22>;
248 max-frequency = <48000000>; 814 max-frequency = <48000000>;
@@ -251,6 +817,8 @@
251 mmc-cap-sd-highspeed; 817 mmc-cap-sd-highspeed;
252 cd-gpios = <&gpio3 15 0x1>; 818 cd-gpios = <&gpio3 15 0x1>;
253 cd-inverted; 819 cd-inverted;
820 pinctrl-names = "default";
821 pinctrl-0 = <&mmcsd_default_mux>, <&mmcsd_default_mode>;
254 }; 822 };
255 }; 823 };
256}; 824};
diff --git a/arch/arm/boot/dts/ste-u300.dts b/arch/arm/boot/dts/ste-u300.dts
new file mode 100644
index 000000000000..8a1032c1ffc9
--- /dev/null
+++ b/arch/arm/boot/dts/ste-u300.dts
@@ -0,0 +1,473 @@
1/*
2 * Device Tree for the ST-Ericsson U300 Machine and SoC
3 */
4
5/dts-v1/;
6/include/ "skeleton.dtsi"
7
8/ {
9 model = "ST-Ericsson U300";
10 compatible = "stericsson,u300";
11 #address-cells = <1>;
12 #size-cells = <1>;
13
14 chosen {
15 bootargs = "root=/dev/ram0 console=ttyAMA0,115200n8 earlyprintk";
16 };
17
18 aliases {
19 serial0 = &uart0;
20 serial1 = &uart1;
21 };
22
23 memory {
24 reg = <0x48000000 0x03c00000>;
25 };
26
27 s365 {
28 compatible = "stericsson,s365";
29 vana15-supply = <&ab3100_ldo_d_reg>;
30 syscon = <&syscon>;
31 };
32
33 syscon: syscon@c0011000 {
34 compatible = "stericsson,u300-syscon", "syscon";
35 reg = <0xc0011000 0x1000>;
36 clk32: app_32_clk@32k {
37 #clock-cells = <0>;
38 compatible = "fixed-clock";
39 clock-frequency = <32768>;
40 };
41 pll13: pll13@13M {
42 #clock-cells = <0>;
43 compatible = "fixed-clock";
44 clock-frequency = <13000000>;
45 };
46 /* Slow bridge clocks under PLL13 */
47 slow_clk: slow_clk@13M {
48 #clock-cells = <0>;
49 compatible = "stericsson,u300-syscon-clk";
50 clock-type = <0>; /* Slow */
51 clock-id = <0>;
52 clocks = <&pll13>;
53 };
54 uart0_clk: uart0_clk@13M {
55 #clock-cells = <0>;
56 compatible = "stericsson,u300-syscon-clk";
57 clock-type = <0>; /* Slow */
58 clock-id = <1>;
59 clocks = <&slow_clk>;
60 };
61 gpio_clk: gpio_clk@13M {
62 #clock-cells = <0>;
63 compatible = "stericsson,u300-syscon-clk";
64 clock-type = <0>; /* Slow */
65 clock-id = <4>;
66 clocks = <&slow_clk>;
67 };
68 rtc_clk: rtc_clk@13M {
69 #clock-cells = <0>;
70 compatible = "stericsson,u300-syscon-clk";
71 clock-type = <0>; /* Slow */
72 clock-id = <6>;
73 clocks = <&slow_clk>;
74 };
75 apptimer_clk: app_tmr_clk@13M {
76 #clock-cells = <0>;
77 compatible = "stericsson,u300-syscon-clk";
78 clock-type = <0>; /* Slow */
79 clock-id = <7>;
80 clocks = <&slow_clk>;
81 };
82 acc_tmr_clk@13M {
83 #clock-cells = <0>;
84 compatible = "stericsson,u300-syscon-clk";
85 clock-type = <0>; /* Slow */
86 clock-id = <8>;
87 clocks = <&slow_clk>;
88 };
89 pll208: pll208@208M {
90 #clock-cells = <0>;
91 compatible = "fixed-clock";
92 clock-frequency = <208000000>;
93 };
94 app208: app_208_clk@208M {
95 #clock-cells = <0>;
96 compatible = "fixed-factor-clock";
97 clock-div = <1>;
98 clock-mult = <1>;
99 clocks = <&pll208>;
100 };
101 cpu_clk@208M {
102 #clock-cells = <0>;
103 compatible = "stericsson,u300-syscon-clk";
104 clock-type = <2>; /* Rest */
105 clock-id = <3>;
106 clocks = <&app208>;
107 };
108 app104: app_104_clk@104M {
109 #clock-cells = <0>;
110 compatible = "fixed-factor-clock";
111 clock-div = <2>;
112 clock-mult = <1>;
113 clocks = <&pll208>;
114 };
115 semi_clk@104M {
116 #clock-cells = <0>;
117 compatible = "stericsson,u300-syscon-clk";
118 clock-type = <2>; /* Rest */
119 clock-id = <9>;
120 clocks = <&app104>;
121 };
122 app52: app_52_clk@52M {
123 #clock-cells = <0>;
124 compatible = "fixed-factor-clock";
125 clock-div = <4>;
126 clock-mult = <1>;
127 clocks = <&pll208>;
128 };
129 /* AHB subsystem clocks */
130 ahb_clk: ahb_subsys_clk@52M {
131 #clock-cells = <0>;
132 compatible = "stericsson,u300-syscon-clk";
133 clock-type = <2>; /* Rest */
134 clock-id = <10>;
135 clocks = <&app52>;
136 };
137 intcon_clk@52M {
138 #clock-cells = <0>;
139 compatible = "stericsson,u300-syscon-clk";
140 clock-type = <2>; /* Rest */
141 clock-id = <12>;
142 clocks = <&ahb_clk>;
143 };
144 emif_clk@52M {
145 #clock-cells = <0>;
146 compatible = "stericsson,u300-syscon-clk";
147 clock-type = <2>; /* Rest */
148 clock-id = <5>;
149 clocks = <&ahb_clk>;
150 };
151 dmac_clk: dmac_clk@52M {
152 #clock-cells = <0>;
153 compatible = "stericsson,u300-syscon-clk";
154 clock-type = <2>; /* Rest */
155 clock-id = <4>;
156 clocks = <&app52>;
157 };
158 fsmc_clk: fsmc_clk@52M {
159 #clock-cells = <0>;
160 compatible = "stericsson,u300-syscon-clk";
161 clock-type = <2>; /* Rest */
162 clock-id = <6>;
163 clocks = <&app52>;
164 };
165 xgam_clk: xgam_clk@52M {
166 #clock-cells = <0>;
167 compatible = "stericsson,u300-syscon-clk";
168 clock-type = <2>; /* Rest */
169 clock-id = <8>;
170 clocks = <&app52>;
171 };
172 app26: app_26_clk@26M {
173 #clock-cells = <0>;
174 compatible = "fixed-factor-clock";
175 clock-div = <2>;
176 clock-mult = <1>;
177 clocks = <&app52>;
178 };
179 /* Fast bridge clocks */
180 fast_clk: fast_clk@26M {
181 #clock-cells = <0>;
182 compatible = "stericsson,u300-syscon-clk";
183 clock-type = <1>; /* Fast */
184 clock-id = <0>;
185 clocks = <&app26>;
186 };
187 i2c0_clk: i2c0_clk@26M {
188 #clock-cells = <0>;
189 compatible = "stericsson,u300-syscon-clk";
190 clock-type = <1>; /* Fast */
191 clock-id = <1>;
192 clocks = <&fast_clk>;
193 };
194 i2c1_clk: i2c1_clk@26M {
195 #clock-cells = <0>;
196 compatible = "stericsson,u300-syscon-clk";
197 clock-type = <1>; /* Fast */
198 clock-id = <2>;
199 clocks = <&fast_clk>;
200 };
201 mmc_pclk: mmc_p_clk@26M {
202 #clock-cells = <0>;
203 compatible = "stericsson,u300-syscon-clk";
204 clock-type = <1>; /* Fast */
205 clock-id = <5>;
206 clocks = <&fast_clk>;
207 };
208 mmc_mclk: mmc_mclk {
209 #clock-cells = <0>;
210 compatible = "stericsson,u300-syscon-mclk";
211 clocks = <&mmc_pclk>;
212 };
213 spi_clk: spi_p_clk@26M {
214 #clock-cells = <0>;
215 compatible = "stericsson,u300-syscon-clk";
216 clock-type = <1>; /* Fast */
217 clock-id = <6>;
218 clocks = <&fast_clk>;
219 };
220 };
221
222 timer: timer@c0014000 {
223 compatible = "stericsson,u300-apptimer";
224 reg = <0xc0014000 0x1000>;
225 interrupt-parent = <&vica>;
226 interrupts = <24 25 26 27>;
227 clocks = <&apptimer_clk>;
228 };
229
230 gpio: gpio@c0016000 {
231 compatible = "stericsson,gpio-coh901";
232 reg = <0xc0016000 0x1000>;
233 interrupt-parent = <&vicb>;
234 interrupts = <0 1 2 18 21 22 23>;
235 clocks = <&gpio_clk>;
236 interrupt-names = "gpio0", "gpio1", "gpio2", "gpio3",
237 "gpio4", "gpio5", "gpio6";
238 interrupt-controller;
239 #interrupt-cells = <2>;
240 gpio-controller;
241 #gpio-cells = <2>;
242 };
243
244 pinctrl: pinctrl@c0011000 {
245 compatible = "stericsson,pinctrl-u300";
246 reg = <0xc0011000 0x1000>;
247 };
248
249 watchdog: watchdog@c0012000 {
250 compatible = "stericsson,coh901327";
251 reg = <0xc0012000 0x1000>;
252 interrupt-parent = <&vicb>;
253 interrupts = <3>;
254 clocks = <&clk32>;
255 };
256
257 rtc: rtc@c0017000 {
258 compatible = "stericsson,coh901331";
259 reg = <0xc0017000 0x1000>;
260 interrupt-parent = <&vicb>;
261 interrupts = <10>;
262 clocks = <&rtc_clk>;
263 };
264
265 dmac: dma-controller@c00020000 {
266 compatible = "stericsson,coh901318";
267 reg = <0xc0020000 0x1000>;
268 interrupt-parent = <&vica>;
269 interrupts = <2>;
270 #dma-cells = <1>;
271 dma-channels = <40>;
272 clocks = <&dmac_clk>;
273 };
274
275 /* A NAND flash of 128 MiB */
276 fsmc: flash@40000000 {
277 compatible = "stericsson,fsmc-nand";
278 #address-cells = <1>;
279 #size-cells = <1>;
280 reg = <0x9f800000 0x1000>, /* FSMC Register*/
281 <0x80000000 0x4000>, /* NAND Base DATA */
282 <0x80020000 0x4000>, /* NAND Base ADDR */
283 <0x80010000 0x4000>; /* NAND Base CMD */
284 reg-names = "fsmc_regs", "nand_data", "nand_addr", "nand_cmd";
285 nand-skip-bbtscan;
286 clocks = <&fsmc_clk>;
287
288 partition@0 {
289 label = "boot records";
290 reg = <0x0 0x20000>;
291 };
292 partition@20000 {
293 label = "free";
294 reg = <0x20000 0x7e0000>;
295 };
296 partition@800000 {
297 label = "platform";
298 reg = <0x800000 0xf800000>;
299 };
300 };
301
302 i2c0: i2c@c0004000 {
303 compatible = "st,ddci2c";
304 reg = <0xc0004000 0x1000>;
305 interrupt-parent = <&vicb>;
306 interrupts = <8>;
307 clocks = <&i2c0_clk>;
308 #address-cells = <1>;
309 #size-cells = <0>;
310 ab3100: ab3100@0x48 {
311 compatible = "stericsson,ab3100";
312 reg = <0x48>;
313 interrupt-parent = <&vica>;
314 interrupts = <0>; /* EXT0 IRQ */
315 ab3100-regulators {
316 compatible = "stericsson,ab3100-regulators";
317 ab3100_ldo_a_reg: ab3100_ldo_a {
318 regulator-compatible = "ab3100_ldo_a";
319 startup-delay-us = <200>;
320 regulator-always-on;
321 regulator-boot-on;
322 };
323 ab3100_ldo_c_reg: ab3100_ldo_c {
324 regulator-compatible = "ab3100_ldo_c";
325 startup-delay-us = <200>;
326 };
327 ab3100_ldo_d_reg: ab3100_ldo_d {
328 regulator-compatible = "ab3100_ldo_d";
329 startup-delay-us = <200>;
330 };
331 ab3100_ldo_e_reg: ab3100_ldo_e {
332 regulator-compatible = "ab3100_ldo_e";
333 regulator-min-microvolt = <1800000>;
334 regulator-max-microvolt = <1800000>;
335 startup-delay-us = <200>;
336 regulator-always-on;
337 regulator-boot-on;
338 };
339 ab3100_ldo_f_reg: ab3100_ldo_f {
340 regulator-compatible = "ab3100_ldo_f";
341 regulator-min-microvolt = <2500000>;
342 regulator-max-microvolt = <2500000>;
343 startup-delay-us = <600>;
344 regulator-always-on;
345 regulator-boot-on;
346 };
347 ab3100_ldo_g_reg: ab3100_ldo_g {
348 regulator-compatible = "ab3100_ldo_g";
349 regulator-min-microvolt = <1500000>;
350 regulator-max-microvolt = <2850000>;
351 startup-delay-us = <400>;
352 };
353 ab3100_ldo_h_reg: ab3100_ldo_h {
354 regulator-compatible = "ab3100_ldo_h";
355 regulator-min-microvolt = <1200000>;
356 regulator-max-microvolt = <2750000>;
357 startup-delay-us = <200>;
358 };
359 ab3100_ldo_k_reg: ab3100_ldo_k {
360 regulator-compatible = "ab3100_ldo_k";
361 regulator-min-microvolt = <1800000>;
362 regulator-max-microvolt = <2750000>;
363 startup-delay-us = <200>;
364 };
365 ab3100_ext_reg: ab3100_ext {
366 regulator-compatible = "ab3100_ext";
367 };
368 ab3100_buck_reg: ab3100_buck {
369 regulator-compatible = "ab3100_buck";
370 regulator-min-microvolt = <1200000>;
371 regulator-max-microvolt = <1800000>;
372 startup-delay-us = <1000>;
373 regulator-always-on;
374 regulator-boot-on;
375 };
376 };
377 };
378 };
379
380 i2c1: i2c@c0005000 {
381 compatible = "st,ddci2c";
382 reg = <0xc0005000 0x1000>;
383 interrupt-parent = <&vicb>;
384 interrupts = <9>;
385 clocks = <&i2c1_clk>;
386 #address-cells = <1>;
387 #size-cells = <0>;
388 fwcam0: fwcam@0x10 {
389 reg = <0x10>;
390 };
391 fwcam1: fwcam@0x5d {
392 reg = <0x5d>;
393 };
394 };
395
396 amba {
397 compatible = "arm,amba-bus";
398 #address-cells = <1>;
399 #size-cells = <1>;
400 ranges;
401
402 vica: interrupt-controller@a0001000 {
403 compatible = "arm,versatile-vic";
404 interrupt-controller;
405 #interrupt-cells = <1>;
406 reg = <0xa0001000 0x20>;
407 };
408
409 vicb: interrupt-controller@a0002000 {
410 compatible = "arm,versatile-vic";
411 interrupt-controller;
412 #interrupt-cells = <1>;
413 reg = <0xa0002000 0x20>;
414 };
415
416 uart0: serial@c0013000 {
417 compatible = "arm,pl011", "arm,primecell";
418 reg = <0xc0013000 0x1000>;
419 interrupt-parent = <&vica>;
420 interrupts = <22>;
421 clocks = <&uart0_clk>, <&uart0_clk>;
422 clock-names = "apb_pclk", "uart0_clk";
423 dmas = <&dmac 17 &dmac 18>;
424 dma-names = "tx", "rx";
425 };
426
427 uart1: serial@c0007000 {
428 compatible = "arm,pl011", "arm,primecell";
429 reg = <0xc0007000 0x1000>;
430 interrupt-parent = <&vicb>;
431 interrupts = <20>;
432 dmas = <&dmac 38 &dmac 39>;
433 dma-names = "tx", "rx";
434 };
435
436 mmcsd: mmcsd@c0001000 {
437 compatible = "arm,pl18x", "arm,primecell";
438 reg = <0xc0001000 0x1000>;
439 interrupt-parent = <&vicb>;
440 interrupts = <6 7>;
441 clocks = <&mmc_pclk>, <&mmc_mclk>;
442 clock-names = "apb_pclk", "mclk";
443 max-frequency = <24000000>;
444 bus-width = <4>; // SD-card slot
445 mmc-cap-mmc-highspeed;
446 mmc-cap-sd-highspeed;
447 cd-gpios = <&gpio 12 0x4>;
448 cd-inverted;
449 vmmc-supply = <&ab3100_ldo_g_reg>;
450 dmas = <&dmac 14>;
451 dma-names = "rx";
452 };
453
454 spi: ssp@c0006000 {
455 compatible = "arm,pl022", "arm,primecell";
456 reg = <0xc0006000 0x1000>;
457 interrupt-parent = <&vica>;
458 interrupts = <23>;
459 clocks = <&spi_clk>, <&spi_clk>;
460 clock-names = "apb_pclk", "spi_clk";
461 dmas = <&dmac 27 &dmac 28>;
462 dma-names = "tx", "rx";
463 num-cs = <3>;
464 #address-cells = <1>;
465 #size-cells = <0>;
466 spi-dummy@1 {
467 compatible = "arm,pl022-dummy";
468 reg = <1>;
469 spi-max-frequency = <20000000>;
470 };
471 };
472 };
473};
diff --git a/arch/arm/boot/dts/stih415-b2000.dts b/arch/arm/boot/dts/stih415-b2000.dts
new file mode 100644
index 000000000000..d4af53160435
--- /dev/null
+++ b/arch/arm/boot/dts/stih415-b2000.dts
@@ -0,0 +1,15 @@
1/*
2 * Copyright (C) 2013 STMicroelectronics (R&D) Limited.
3 * Author: Srinivas Kandagatla <srinivas.kandagatla@st.com>
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 2 as
7 * publishhed by the Free Software Foundation.
8 */
9/dts-v1/;
10#include "stih415.dtsi"
11#include "stih41x-b2000.dtsi"
12/ {
13 model = "STiH415 B2000 Board";
14 compatible = "st,stih415", "st,stih415-b2000";
15};
diff --git a/arch/arm/boot/dts/stih415-b2020.dts b/arch/arm/boot/dts/stih415-b2020.dts
new file mode 100644
index 000000000000..442b019e9a3a
--- /dev/null
+++ b/arch/arm/boot/dts/stih415-b2020.dts
@@ -0,0 +1,15 @@
1/*
2 * Copyright (C) 2013 STMicroelectronics (R&D) Limited.
3 * Author: Srinivas Kandagatla <srinivas.kandagatla@st.com>
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 2 as
7 * publishhed by the Free Software Foundation.
8 */
9/dts-v1/;
10#include "stih415.dtsi"
11#include "stih41x-b2020.dtsi"
12/ {
13 model = "STiH415 B2020 Board";
14 compatible = "st,stih415", "st,stih415-b2020";
15};
diff --git a/arch/arm/boot/dts/stih415-clock.dtsi b/arch/arm/boot/dts/stih415-clock.dtsi
new file mode 100644
index 000000000000..174c799df741
--- /dev/null
+++ b/arch/arm/boot/dts/stih415-clock.dtsi
@@ -0,0 +1,38 @@
1/*
2 * Copyright (C) 2013 STMicroelectronics (R&D) Limited
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 clocks {
10 /*
11 * Fixed 30MHz oscillator input to SoC
12 */
13 CLK_SYSIN: CLK_SYSIN {
14 #clock-cells = <0>;
15 compatible = "fixed-clock";
16 clock-frequency = <30000000>;
17 };
18
19 /*
20 * ARM Peripheral clock for timers
21 */
22 arm_periph_clk: arm_periph_clk {
23 #clock-cells = <0>;
24 compatible = "fixed-clock";
25 clock-frequency = <500000000>;
26 };
27
28 /*
29 * Bootloader initialized system infrastructure clock for
30 * serial devices.
31 */
32 CLKS_ICN_REG_0: CLKS_ICN_REG_0 {
33 #clock-cells = <0>;
34 compatible = "fixed-clock";
35 clock-frequency = <100000000>;
36 };
37 };
38};
diff --git a/arch/arm/boot/dts/stih415-pinctrl.dtsi b/arch/arm/boot/dts/stih415-pinctrl.dtsi
new file mode 100644
index 000000000000..1d322b24d1e4
--- /dev/null
+++ b/arch/arm/boot/dts/stih415-pinctrl.dtsi
@@ -0,0 +1,268 @@
1/*
2 * Copyright (C) 2013 STMicroelectronics (R&D) Limited.
3 * Author: Srinivas Kandagatla <srinivas.kandagatla@st.com>
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 2 as
7 * publishhed by the Free Software Foundation.
8 */
9#include "st-pincfg.h"
10/ {
11
12 aliases {
13 gpio0 = &PIO0;
14 gpio1 = &PIO1;
15 gpio2 = &PIO2;
16 gpio3 = &PIO3;
17 gpio4 = &PIO4;
18 gpio5 = &PIO5;
19 gpio6 = &PIO6;
20 gpio7 = &PIO7;
21 gpio8 = &PIO8;
22 gpio9 = &PIO9;
23 gpio10 = &PIO10;
24 gpio11 = &PIO11;
25 gpio12 = &PIO12;
26 gpio13 = &PIO13;
27 gpio14 = &PIO14;
28 gpio15 = &PIO15;
29 gpio16 = &PIO16;
30 gpio17 = &PIO17;
31 gpio18 = &PIO18;
32 gpio19 = &PIO100;
33 gpio20 = &PIO101;
34 gpio21 = &PIO102;
35 gpio22 = &PIO103;
36 gpio23 = &PIO104;
37 gpio24 = &PIO105;
38 gpio25 = &PIO106;
39 gpio26 = &PIO107;
40 };
41
42 soc {
43 pin-controller-sbc {
44 #address-cells = <1>;
45 #size-cells = <1>;
46 compatible = "st,stih415-sbc-pinctrl";
47 st,syscfg = <&syscfg_sbc>;
48 ranges = <0 0xfe610000 0x5000>;
49
50 PIO0: gpio@fe610000 {
51 gpio-controller;
52 #gpio-cells = <1>;
53 reg = <0 0x100>;
54 st,bank-name = "PIO0";
55 };
56 PIO1: gpio@fe611000 {
57 gpio-controller;
58 #gpio-cells = <1>;
59 reg = <0x1000 0x100>;
60 st,bank-name = "PIO1";
61 };
62 PIO2: gpio@fe612000 {
63 gpio-controller;
64 #gpio-cells = <1>;
65 reg = <0x2000 0x100>;
66 st,bank-name = "PIO2";
67 };
68 PIO3: gpio@fe613000 {
69 gpio-controller;
70 #gpio-cells = <1>;
71 reg = <0x3000 0x100>;
72 st,bank-name = "PIO3";
73 };
74 PIO4: gpio@fe614000 {
75 gpio-controller;
76 #gpio-cells = <1>;
77 reg = <0x4000 0x100>;
78 st,bank-name = "PIO4";
79 };
80
81 sbc_serial1 {
82 pinctrl_sbc_serial1:sbc_serial1 {
83 st,pins {
84 tx = <&PIO2 6 ALT3 OUT>;
85 rx = <&PIO2 7 ALT3 IN>;
86 };
87 };
88 };
89 };
90
91 pin-controller-front {
92 #address-cells = <1>;
93 #size-cells = <1>;
94 compatible = "st,stih415-front-pinctrl";
95 st,syscfg = <&syscfg_front>;
96 ranges = <0 0xfee00000 0x8000>;
97
98 PIO5: gpio@fee00000 {
99 gpio-controller;
100 #gpio-cells = <1>;
101 reg = <0 0x100>;
102 st,bank-name = "PIO5";
103 };
104 PIO6: gpio@fee01000 {
105 gpio-controller;
106 #gpio-cells = <1>;
107 reg = <0x1000 0x100>;
108 st,bank-name = "PIO6";
109 };
110 PIO7: gpio@fee02000 {
111 gpio-controller;
112 #gpio-cells = <1>;
113 reg = <0x2000 0x100>;
114 st,bank-name = "PIO7";
115 };
116 PIO8: gpio@fee03000 {
117 gpio-controller;
118 #gpio-cells = <1>;
119 reg = <0x3000 0x100>;
120 st,bank-name = "PIO8";
121 };
122 PIO9: gpio@fee04000 {
123 gpio-controller;
124 #gpio-cells = <1>;
125 reg = <0x4000 0x100>;
126 st,bank-name = "PIO9";
127 };
128 PIO10: gpio@fee05000 {
129 gpio-controller;
130 #gpio-cells = <1>;
131 reg = <0x5000 0x100>;
132 st,bank-name = "PIO10";
133 };
134 PIO11: gpio@fee06000 {
135 gpio-controller;
136 #gpio-cells = <1>;
137 reg = <0x6000 0x100>;
138 st,bank-name = "PIO11";
139 };
140 PIO12: gpio@fee07000 {
141 gpio-controller;
142 #gpio-cells = <1>;
143 reg = <0x7000 0x100>;
144 st,bank-name = "PIO12";
145 };
146 };
147
148 pin-controller-rear {
149 #address-cells = <1>;
150 #size-cells = <1>;
151 compatible = "st,stih415-rear-pinctrl";
152 st,syscfg = <&syscfg_rear>;
153 ranges = <0 0xfe820000 0x8000>;
154
155 PIO13: gpio@fe820000 {
156 gpio-controller;
157 #gpio-cells = <1>;
158 reg = <0 0x100>;
159 st,bank-name = "PIO13";
160 };
161 PIO14: gpio@fe821000 {
162 gpio-controller;
163 #gpio-cells = <1>;
164 reg = <0x1000 0x100>;
165 st,bank-name = "PIO14";
166 };
167 PIO15: gpio@fe822000 {
168 gpio-controller;
169 #gpio-cells = <1>;
170 reg = <0x2000 0x100>;
171 st,bank-name = "PIO15";
172 };
173 PIO16: gpio@fe823000 {
174 gpio-controller;
175 #gpio-cells = <1>;
176 reg = <0x3000 0x100>;
177 st,bank-name = "PIO16";
178 };
179 PIO17: gpio@fe824000 {
180 gpio-controller;
181 #gpio-cells = <1>;
182 reg = <0x4000 0x100>;
183 st,bank-name = "PIO17";
184 };
185 PIO18: gpio@fe825000 {
186 gpio-controller;
187 #gpio-cells = <1>;
188 reg = <0x5000 0x100>;
189 st,bank-name = "PIO18";
190 };
191
192 serial2 {
193 pinctrl_serial2: serial2-0 {
194 st,pins {
195 tx = <&PIO17 4 ALT2 OUT>;
196 rx = <&PIO17 5 ALT2 IN>;
197 };
198 };
199 };
200 };
201
202 pin-controller-left {
203 #address-cells = <1>;
204 #size-cells = <1>;
205 compatible = "st,stih415-left-pinctrl";
206 st,syscfg = <&syscfg_left>;
207 ranges = <0 0xfd6b0000 0x3000>;
208
209 PIO100: gpio@fd6b0000 {
210 gpio-controller;
211 #gpio-cells = <1>;
212 reg = <0 0x100>;
213 st,bank-name = "PIO100";
214 };
215 PIO101: gpio@fd6b1000 {
216 gpio-controller;
217 #gpio-cells = <1>;
218 reg = <0x1000 0x100>;
219 st,bank-name = "PIO101";
220 };
221 PIO102: gpio@fd6b2000 {
222 gpio-controller;
223 #gpio-cells = <1>;
224 reg = <0x2000 0x100>;
225 st,bank-name = "PIO102";
226 };
227 };
228
229 pin-controller-right {
230 #address-cells = <1>;
231 #size-cells = <1>;
232 compatible = "st,stih415-right-pinctrl";
233 st,syscfg = <&syscfg_right>;
234 ranges = <0 0xfd330000 0x5000>;
235
236 PIO103: gpio@fd330000 {
237 gpio-controller;
238 #gpio-cells = <1>;
239 reg = <0 0x100>;
240 st,bank-name = "PIO103";
241 };
242 PIO104: gpio@fd331000 {
243 gpio-controller;
244 #gpio-cells = <1>;
245 reg = <0x1000 0x100>;
246 st,bank-name = "PIO104";
247 };
248 PIO105: gpio@fd332000 {
249 gpio-controller;
250 #gpio-cells = <1>;
251 reg = <0x2000 0x100>;
252 st,bank-name = "PIO105";
253 };
254 PIO106: gpio@fd333000 {
255 gpio-controller;
256 #gpio-cells = <1>;
257 reg = <0x3000 0x100>;
258 st,bank-name = "PIO106";
259 };
260 PIO107: gpio@fd334000 {
261 gpio-controller;
262 #gpio-cells = <1>;
263 reg = <0x4000 0x100>;
264 st,bank-name = "PIO107";
265 };
266 };
267 };
268};
diff --git a/arch/arm/boot/dts/stih415.dtsi b/arch/arm/boot/dts/stih415.dtsi
new file mode 100644
index 000000000000..74ab8ded4b49
--- /dev/null
+++ b/arch/arm/boot/dts/stih415.dtsi
@@ -0,0 +1,87 @@
1/*
2 * Copyright (C) 2013 STMicroelectronics (R&D) Limited.
3 * Author: Srinivas Kandagatla <srinivas.kandagatla@st.com>
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 2 as
7 * publishhed by the Free Software Foundation.
8 */
9#include "stih41x.dtsi"
10#include "stih415-clock.dtsi"
11#include "stih415-pinctrl.dtsi"
12/ {
13
14 L2: cache-controller {
15 compatible = "arm,pl310-cache";
16 reg = <0xfffe2000 0x1000>;
17 arm,data-latency = <3 2 2>;
18 arm,tag-latency = <1 1 1>;
19 cache-unified;
20 cache-level = <2>;
21 };
22
23 soc {
24 #address-cells = <1>;
25 #size-cells = <1>;
26 interrupt-parent = <&intc>;
27 ranges;
28 compatible = "simple-bus";
29
30 syscfg_sbc: sbc-syscfg@fe600000{
31 compatible = "st,stih415-sbc-syscfg", "syscon";
32 reg = <0xfe600000 0xb4>;
33 };
34
35 syscfg_front: front-syscfg@fee10000{
36 compatible = "st,stih415-front-syscfg", "syscon";
37 reg = <0xfee10000 0x194>;
38 };
39
40 syscfg_rear: rear-syscfg@fe830000{
41 compatible = "st,stih415-rear-syscfg", "syscon";
42 reg = <0xfe830000 0x190>;
43 };
44
45 /* MPE syscfgs */
46 syscfg_left: left-syscfg@fd690000{
47 compatible = "st,stih415-left-syscfg", "syscon";
48 reg = <0xfd690000 0x78>;
49 };
50
51 syscfg_right: right-syscfg@fd320000{
52 compatible = "st,stih415-right-syscfg", "syscon";
53 reg = <0xfd320000 0x180>;
54 };
55
56 syscfg_system: system-syscfg@fdde0000 {
57 compatible = "st,stih415-system-syscfg", "syscon";
58 reg = <0xfdde0000 0x15c>;
59 };
60
61 syscfg_lpm: lpm-syscfg@fe4b5100{
62 compatible = "st,stih415-lpm-syscfg", "syscon";
63 reg = <0xfe4b5100 0x08>;
64 };
65
66 serial2: serial@fed32000 {
67 compatible = "st,asc";
68 status = "disabled";
69 reg = <0xfed32000 0x2c>;
70 interrupts = <0 197 0>;
71 pinctrl-names = "default";
72 pinctrl-0 = <&pinctrl_serial2>;
73 clocks = <&CLKS_ICN_REG_0>;
74 };
75
76 /* SBC comms block ASCs in SASG1 */
77 sbc_serial1: serial@fe531000 {
78 compatible = "st,asc";
79 status = "disabled";
80 reg = <0xfe531000 0x2c>;
81 interrupts = <0 210 0>;
82 clocks = <&CLK_SYSIN>;
83 pinctrl-names = "default";
84 pinctrl-0 = <&pinctrl_sbc_serial1>;
85 };
86 };
87};
diff --git a/arch/arm/boot/dts/stih416-b2000.dts b/arch/arm/boot/dts/stih416-b2000.dts
new file mode 100644
index 000000000000..a5eb6eee10bf
--- /dev/null
+++ b/arch/arm/boot/dts/stih416-b2000.dts
@@ -0,0 +1,16 @@
1/*
2 * Copyright (C) 2013 STMicroelectronics (R&D) Limited.
3 * Author: Srinivas Kandagatla <srinivas.kandagatla@st.com>
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 2 as
7 * publishhed by the Free Software Foundation.
8 */
9/dts-v1/;
10#include "stih416.dtsi"
11#include "stih41x-b2000.dtsi"
12
13/ {
14 compatible = "st,stih416", "st,stih416-b2000";
15 model = "STiH416 B2000";
16};
diff --git a/arch/arm/boot/dts/stih416-b2020.dts b/arch/arm/boot/dts/stih416-b2020.dts
new file mode 100644
index 000000000000..276f28da573a
--- /dev/null
+++ b/arch/arm/boot/dts/stih416-b2020.dts
@@ -0,0 +1,16 @@
1/*
2 * Copyright (C) 2013 STMicroelectronics (R&D) Limited.
3 * Author: Srinivas Kandagatla <srinivas.kandagatla@st.com>
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 2 as
7 * publishhed by the Free Software Foundation.
8 */
9/dts-v1/;
10#include "stih416.dtsi"
11#include "stih41x-b2020.dtsi"
12/ {
13 model = "STiH416 B2020";
14 compatible = "st,stih416", "st,stih416-b2020";
15
16};
diff --git a/arch/arm/boot/dts/stih416-clock.dtsi b/arch/arm/boot/dts/stih416-clock.dtsi
new file mode 100644
index 000000000000..7026bf1158d8
--- /dev/null
+++ b/arch/arm/boot/dts/stih416-clock.dtsi
@@ -0,0 +1,41 @@
1/*
2 * Copyright (C) 2013 STMicroelectronics R&D Limited
3 * <stlinux-devel@stlinux.com>
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 2 as
7 * published by the Free Software Foundation.
8 */
9/ {
10 clocks {
11 /*
12 * Fixed 30MHz oscillator inputs to SoC
13 */
14 CLK_SYSIN: CLK_SYSIN {
15 #clock-cells = <0>;
16 compatible = "fixed-clock";
17 clock-frequency = <30000000>;
18 clock-output-names = "CLK_SYSIN";
19 };
20
21 /*
22 * ARM Peripheral clock for timers
23 */
24 arm_periph_clk: arm_periph_clk {
25 #clock-cells = <0>;
26 compatible = "fixed-clock";
27 clock-frequency = <600000000>;
28 };
29
30 /*
31 * Bootloader initialized system infrastructure clock for
32 * serial devices.
33 */
34 CLK_S_ICN_REG_0: clockgenA0@4 {
35 #clock-cells = <0>;
36 compatible = "fixed-clock";
37 clock-frequency = <100000000>;
38 clock-output-names = "CLK_S_ICN_REG_0";
39 };
40 };
41};
diff --git a/arch/arm/boot/dts/stih416-pinctrl.dtsi b/arch/arm/boot/dts/stih416-pinctrl.dtsi
new file mode 100644
index 000000000000..0f246c979262
--- /dev/null
+++ b/arch/arm/boot/dts/stih416-pinctrl.dtsi
@@ -0,0 +1,303 @@
1
2/*
3 * Copyright (C) 2013 STMicroelectronics Limited.
4 * Author: Srinivas Kandagatla <srinivas.kandagatla@st.com>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * publishhed by the Free Software Foundation.
9 */
10#include "st-pincfg.h"
11/ {
12
13 aliases {
14 gpio0 = &PIO0;
15 gpio1 = &PIO1;
16 gpio2 = &PIO2;
17 gpio3 = &PIO3;
18 gpio4 = &PIO4;
19 gpio5 = &PIO40;
20 gpio6 = &PIO5;
21 gpio7 = &PIO6;
22 gpio8 = &PIO7;
23 gpio9 = &PIO8;
24 gpio10 = &PIO9;
25 gpio11 = &PIO10;
26 gpio12 = &PIO11;
27 gpio13 = &PIO12;
28 gpio14 = &PIO30;
29 gpio15 = &PIO31;
30 gpio16 = &PIO13;
31 gpio17 = &PIO14;
32 gpio18 = &PIO15;
33 gpio19 = &PIO16;
34 gpio20 = &PIO17;
35 gpio21 = &PIO18;
36 gpio22 = &PIO100;
37 gpio23 = &PIO101;
38 gpio24 = &PIO102;
39 gpio25 = &PIO103;
40 gpio26 = &PIO104;
41 gpio27 = &PIO105;
42 gpio28 = &PIO106;
43 gpio29 = &PIO107;
44 };
45
46 soc {
47 pin-controller-sbc {
48 #address-cells = <1>;
49 #size-cells = <1>;
50 compatible = "st,stih416-sbc-pinctrl";
51 st,syscfg = <&syscfg_sbc>;
52 ranges = <0 0xfe610000 0x6000>;
53
54 PIO0: gpio@fe610000 {
55 gpio-controller;
56 #gpio-cells = <1>;
57 reg = <0 0x100>;
58 st,bank-name = "PIO0";
59 };
60 PIO1: gpio@fe611000 {
61 gpio-controller;
62 #gpio-cells = <1>;
63 reg = <0x1000 0x100>;
64 st,bank-name = "PIO1";
65 };
66 PIO2: gpio@fe612000 {
67 gpio-controller;
68 #gpio-cells = <1>;
69 reg = <0x2000 0x100>;
70 st,bank-name = "PIO2";
71 };
72 PIO3: gpio@fe613000 {
73 gpio-controller;
74 #gpio-cells = <1>;
75 reg = <0x3000 0x100>;
76 st,bank-name = "PIO3";
77 };
78 PIO4: gpio@fe614000 {
79 gpio-controller;
80 #gpio-cells = <1>;
81 reg = <0x4000 0x100>;
82 st,bank-name = "PIO4";
83 };
84 PIO40: gpio@fe615000 {
85 gpio-controller;
86 #gpio-cells = <1>;
87 reg = <0x5000 0x100>;
88 st,bank-name = "PIO40";
89 st,retime-pin-mask = <0x7f>;
90 };
91
92 sbc_serial1 {
93 pinctrl_sbc_serial1: sbc_serial1 {
94 st,pins {
95 tx = <&PIO2 6 ALT3 OUT>;
96 rx = <&PIO2 7 ALT3 IN>;
97 };
98 };
99 };
100 };
101
102 pin-controller-front {
103 #address-cells = <1>;
104 #size-cells = <1>;
105 compatible = "st,stih416-front-pinctrl";
106 st,syscfg = <&syscfg_front>;
107 ranges = <0 0xfee00000 0x10000>;
108
109 PIO5: gpio@fee00000 {
110 gpio-controller;
111 #gpio-cells = <1>;
112 reg = <0 0x100>;
113 st,bank-name = "PIO5";
114 };
115 PIO6: gpio@fee01000 {
116 gpio-controller;
117 #gpio-cells = <1>;
118 reg = <0x1000 0x100>;
119 st,bank-name = "PIO6";
120 };
121 PIO7: gpio@fee02000 {
122 gpio-controller;
123 #gpio-cells = <1>;
124 reg = <0x2000 0x100>;
125 st,bank-name = "PIO7";
126 };
127 PIO8: gpio@fee03000 {
128 gpio-controller;
129 #gpio-cells = <1>;
130 reg = <0x3000 0x100>;
131 st,bank-name = "PIO8";
132 };
133 PIO9: gpio@fee04000 {
134 gpio-controller;
135 #gpio-cells = <1>;
136 reg = <0x4000 0x100>;
137 st,bank-name = "PIO9";
138 };
139 PIO10: gpio@fee05000 {
140 gpio-controller;
141 #gpio-cells = <1>;
142 reg = <0x5000 0x100>;
143 st,bank-name = "PIO10";
144 };
145 PIO11: gpio@fee06000 {
146 gpio-controller;
147 #gpio-cells = <1>;
148 reg = <0x6000 0x100>;
149 st,bank-name = "PIO11";
150 };
151 PIO12: gpio@fee07000 {
152 gpio-controller;
153 #gpio-cells = <1>;
154 reg = <0x7000 0x100>;
155 st,bank-name = "PIO12";
156 };
157 PIO30: gpio@fee08000 {
158 gpio-controller;
159 #gpio-cells = <1>;
160 reg = <0x8000 0x100>;
161 st,bank-name = "PIO30";
162 };
163 PIO31: gpio@fee09000 {
164 gpio-controller;
165 #gpio-cells = <1>;
166 reg = <0x9000 0x100>;
167 st,bank-name = "PIO31";
168 };
169
170 serial2-oe {
171 pinctrl_serial2_oe: serial2-1 {
172 st,pins {
173 output-enable = <&PIO11 3 ALT2 OUT>;
174 };
175 };
176 };
177
178 };
179
180 pin-controller-rear {
181 #address-cells = <1>;
182 #size-cells = <1>;
183 compatible = "st,stih416-rear-pinctrl";
184 st,syscfg = <&syscfg_rear>;
185 ranges = <0 0xfe820000 0x6000>;
186
187 PIO13: gpio@fe820000 {
188 gpio-controller;
189 #gpio-cells = <1>;
190 reg = <0 0x100>;
191 st,bank-name = "PIO13";
192 };
193 PIO14: gpio@fe821000 {
194 gpio-controller;
195 #gpio-cells = <1>;
196 reg = <0x1000 0x100>;
197 st,bank-name = "PIO14";
198 };
199 PIO15: gpio@fe822000 {
200 gpio-controller;
201 #gpio-cells = <1>;
202 reg = <0x2000 0x100>;
203 st,bank-name = "PIO15";
204 };
205 PIO16: gpio@fe823000 {
206 gpio-controller;
207 #gpio-cells = <1>;
208 reg = <0x3000 0x100>;
209 st,bank-name = "PIO16";
210 };
211 PIO17: gpio@fe824000 {
212 gpio-controller;
213 #gpio-cells = <1>;
214 reg = <0x4000 0x100>;
215 st,bank-name = "PIO17";
216 };
217 PIO18: gpio@fe825000 {
218 gpio-controller;
219 #gpio-cells = <1>;
220 reg = <0x5000 0x100>;
221 st,bank-name = "PIO18";
222 st,retime-pin-mask = <0xf>;
223 };
224
225 serial2 {
226 pinctrl_serial2: serial2-0 {
227 st,pins {
228 tx = <&PIO17 4 ALT2 OUT>;
229 rx = <&PIO17 5 ALT2 IN>;
230 };
231 };
232 };
233 };
234
235 pin-controller-fvdp-fe {
236 #address-cells = <1>;
237 #size-cells = <1>;
238 compatible = "st,stih416-fvdp-fe-pinctrl";
239 st,syscfg = <&syscfg_fvdp_fe>;
240 ranges = <0 0xfd6b0000 0x3000>;
241
242 PIO100: gpio@fd6b0000 {
243 gpio-controller;
244 #gpio-cells = <1>;
245 reg = <0 0x100>;
246 st,bank-name = "PIO100";
247 };
248 PIO101: gpio@fd6b1000 {
249 gpio-controller;
250 #gpio-cells = <1>;
251 reg = <0x1000 0x100>;
252 st,bank-name = "PIO101";
253 };
254 PIO102: gpio@fd6b2000 {
255 gpio-controller;
256 #gpio-cells = <1>;
257 reg = <0x2000 0x100>;
258 st,bank-name = "PIO102";
259 };
260 };
261
262 pin-controller-fvdp-lite {
263 #address-cells = <1>;
264 #size-cells = <1>;
265 compatible = "st,stih416-fvdp-lite-pinctrl";
266 st,syscfg = <&syscfg_fvdp_lite>;
267 ranges = <0 0xfd330000 0x5000>;
268
269 PIO103: gpio@fd330000 {
270 gpio-controller;
271 #gpio-cells = <1>;
272 reg = <0 0x100>;
273 st,bank-name = "PIO103";
274 };
275 PIO104: gpio@fd331000 {
276 gpio-controller;
277 #gpio-cells = <1>;
278 reg = <0x1000 0x100>;
279 st,bank-name = "PIO104";
280 };
281 PIO105: gpio@fd332000 {
282 gpio-controller;
283 #gpio-cells = <1>;
284 reg = <0x2000 0x100>;
285 st,bank-name = "PIO105";
286 };
287 PIO106: gpio@fd333000 {
288 gpio-controller;
289 #gpio-cells = <1>;
290 reg = <0x3000 0x100>;
291 st,bank-name = "PIO106";
292 };
293
294 PIO107: gpio@fd334000 {
295 gpio-controller;
296 #gpio-cells = <1>;
297 reg = <0x4000 0x100>;
298 st,bank-name = "PIO107";
299 st,retime-pin-mask = <0xf>;
300 };
301 };
302 };
303};
diff --git a/arch/arm/boot/dts/stih416.dtsi b/arch/arm/boot/dts/stih416.dtsi
new file mode 100644
index 000000000000..1a0326ea7d07
--- /dev/null
+++ b/arch/arm/boot/dts/stih416.dtsi
@@ -0,0 +1,96 @@
1/*
2 * Copyright (C) 2012 STMicroelectronics Limited.
3 * Author: Srinivas Kandagatla <srinivas.kandagatla@st.com>
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 2 as
7 * publishhed by the Free Software Foundation.
8 */
9#include "stih41x.dtsi"
10#include "stih416-clock.dtsi"
11#include "stih416-pinctrl.dtsi"
12/ {
13 L2: cache-controller {
14 compatible = "arm,pl310-cache";
15 reg = <0xfffe2000 0x1000>;
16 arm,data-latency = <3 3 3>;
17 arm,tag-latency = <2 2 2>;
18 cache-unified;
19 cache-level = <2>;
20 };
21
22 soc {
23 #address-cells = <1>;
24 #size-cells = <1>;
25 interrupt-parent = <&intc>;
26 ranges;
27 compatible = "simple-bus";
28
29 syscfg_sbc:sbc-syscfg@fe600000{
30 compatible = "st,stih416-sbc-syscfg", "syscon";
31 reg = <0xfe600000 0x1000>;
32 };
33
34 syscfg_front:front-syscfg@fee10000{
35 compatible = "st,stih416-front-syscfg", "syscon";
36 reg = <0xfee10000 0x1000>;
37 };
38
39 syscfg_rear:rear-syscfg@fe830000{
40 compatible = "st,stih416-rear-syscfg", "syscon";
41 reg = <0xfe830000 0x1000>;
42 };
43
44 /* MPE */
45 syscfg_fvdp_fe:fvdp-fe-syscfg@fddf0000{
46 compatible = "st,stih416-fvdp-fe-syscfg", "syscon";
47 reg = <0xfddf0000 0x1000>;
48 };
49
50 syscfg_fvdp_lite:fvdp-lite-syscfg@fd6a0000{
51 compatible = "st,stih416-fvdp-lite-syscfg", "syscon";
52 reg = <0xfd6a0000 0x1000>;
53 };
54
55 syscfg_cpu:cpu-syscfg@fdde0000{
56 compatible = "st,stih416-cpu-syscfg", "syscon";
57 reg = <0xfdde0000 0x1000>;
58 };
59
60 syscfg_compo:compo-syscfg@fd320000{
61 compatible = "st,stih416-compo-syscfg", "syscon";
62 reg = <0xfd320000 0x1000>;
63 };
64
65 syscfg_transport:transport-syscfg@fd690000{
66 compatible = "st,stih416-transport-syscfg", "syscon";
67 reg = <0xfd690000 0x1000>;
68 };
69
70 syscfg_lpm:lpm-syscfg@fe4b5100{
71 compatible = "st,stih416-lpm-syscfg", "syscon";
72 reg = <0xfe4b5100 0x8>;
73 };
74
75 serial2: serial@fed32000{
76 compatible = "st,asc";
77 status = "disabled";
78 reg = <0xfed32000 0x2c>;
79 interrupts = <0 197 0>;
80 clocks = <&CLK_S_ICN_REG_0>;
81 pinctrl-names = "default";
82 pinctrl-0 = <&pinctrl_serial2 &pinctrl_serial2_oe>;
83 };
84
85 /* SBC_UART1 */
86 sbc_serial1: serial@fe531000 {
87 compatible = "st,asc";
88 status = "disabled";
89 reg = <0xfe531000 0x2c>;
90 interrupts = <0 210 0>;
91 pinctrl-names = "default";
92 pinctrl-0 = <&pinctrl_sbc_serial1>;
93 clocks = <&CLK_SYSIN>;
94 };
95 };
96};
diff --git a/arch/arm/boot/dts/stih41x-b2000.dtsi b/arch/arm/boot/dts/stih41x-b2000.dtsi
new file mode 100644
index 000000000000..8e694d2b8f5b
--- /dev/null
+++ b/arch/arm/boot/dts/stih41x-b2000.dtsi
@@ -0,0 +1,41 @@
1/*
2 * Copyright (C) 2013 STMicroelectronics (R&D) Limited.
3 * Author: Srinivas Kandagatla <srinivas.kandagatla@st.com>
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 2 as
7 * publishhed by the Free Software Foundation.
8 */
9/ {
10
11 memory{
12 device_type = "memory";
13 reg = <0x60000000 0x40000000>;
14 };
15
16 chosen {
17 bootargs = "console=ttyAS0,115200";
18 linux,stdout-path = &serial2;
19 };
20
21 aliases {
22 ttyAS0 = &serial2;
23 };
24
25 soc {
26 serial2: serial@fed32000 {
27 status = "okay";
28 };
29
30 leds {
31 compatible = "gpio-leds";
32 fp_led {
33 #gpio-cells = <1>;
34 label = "Front Panel LED";
35 gpios = <&PIO105 7>;
36 linux,default-trigger = "heartbeat";
37 };
38 };
39
40 };
41};
diff --git a/arch/arm/boot/dts/stih41x-b2020.dtsi b/arch/arm/boot/dts/stih41x-b2020.dtsi
new file mode 100644
index 000000000000..133e18143b1b
--- /dev/null
+++ b/arch/arm/boot/dts/stih41x-b2020.dtsi
@@ -0,0 +1,42 @@
1/*
2 * Copyright (C) 2013 STMicroelectronics (R&D) Limited.
3 * Author: Srinivas Kandagatla <srinivas.kandagatla@st.com>
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 2 as
7 * publishhed by the Free Software Foundation.
8 */
9/ {
10 memory{
11 device_type = "memory";
12 reg = <0x40000000 0x80000000>;
13 };
14
15 chosen {
16 bootargs = "console=ttyAS0,115200";
17 linux,stdout-path = &sbc_serial1;
18 };
19
20 aliases {
21 ttyAS0 = &sbc_serial1;
22 };
23 soc {
24 sbc_serial1: serial@fe531000 {
25 status = "okay";
26 };
27
28 leds {
29 compatible = "gpio-leds";
30 red {
31 #gpio-cells = <1>;
32 label = "Front Panel LED";
33 gpios = <&PIO4 1>;
34 linux,default-trigger = "heartbeat";
35 };
36 green {
37 gpios = <&PIO4 7>;
38 default-state = "off";
39 };
40 };
41 };
42};
diff --git a/arch/arm/boot/dts/stih41x.dtsi b/arch/arm/boot/dts/stih41x.dtsi
new file mode 100644
index 000000000000..f5b9898d9c6e
--- /dev/null
+++ b/arch/arm/boot/dts/stih41x.dtsi
@@ -0,0 +1,40 @@
1/ {
2 #address-cells = <1>;
3 #size-cells = <1>;
4
5 cpus {
6 #address-cells = <1>;
7 #size-cells = <0>;
8 cpu@0 {
9 device_type = "cpu";
10 compatible = "arm,cortex-a9";
11 reg = <0>;
12 };
13 cpu@1 {
14 device_type = "cpu";
15 compatible = "arm,cortex-a9";
16 reg = <1>;
17 };
18 };
19
20 intc: interrupt-controller@fffe1000 {
21 compatible = "arm,cortex-a9-gic";
22 #interrupt-cells = <3>;
23 interrupt-controller;
24 reg = <0xfffe1000 0x1000>,
25 <0xfffe0100 0x100>;
26 };
27
28 scu@fffe0000 {
29 compatible = "arm,cortex-a9-scu";
30 reg = <0xfffe0000 0x1000>;
31 };
32
33 timer@fffe0200 {
34 interrupt-parent = <&intc>;
35 compatible = "arm,cortex-a9-global-timer";
36 reg = <0xfffe0200 0x100>;
37 interrupts = <1 11 0x04>;
38 clocks = <&arm_periph_clk>;
39 };
40};
diff --git a/arch/arm/boot/dts/stuib.dtsi b/arch/arm/boot/dts/stuib.dtsi
index 615392a75676..524e33240ad4 100644
--- a/arch/arm/boot/dts/stuib.dtsi
+++ b/arch/arm/boot/dts/stuib.dtsi
@@ -9,13 +9,15 @@
9 * http://www.gnu.org/copyleft/gpl.html 9 * http://www.gnu.org/copyleft/gpl.html
10 */ 10 */
11 11
12#include <dt-bindings/interrupt-controller/irq.h>
13
12/ { 14/ {
13 soc-u9500 { 15 soc {
14 i2c@80004000 { 16 i2c@80004000 {
15 stmpe1601: stmpe1601@40 { 17 stmpe1601: stmpe1601@40 {
16 compatible = "st,stmpe1601"; 18 compatible = "st,stmpe1601";
17 reg = <0x40>; 19 reg = <0x40>;
18 interrupts = <26 0x2>; 20 interrupts = <26 IRQ_TYPE_EDGE_FALLING>;
19 interrupt-parent = <&gpio6>; 21 interrupt-parent = <&gpio6>;
20 interrupt-controller; 22 interrupt-controller;
21 23
@@ -52,26 +54,26 @@
52 }; 54 };
53 55
54 i2c@80110000 { 56 i2c@80110000 {
55 bu21013_tp@0x5c { 57 bu21013_tp@5c {
56 compatible = "rhom,bu21013_tp"; 58 compatible = "rohm,bu21013_tp";
57 reg = <0x5c>; 59 reg = <0x5c>;
58 touch-gpio = <&gpio2 20 0x4>; 60 touch-gpio = <&gpio2 20 0x4>;
59 avdd-supply = <&ab8500_ldo_aux1_reg>; 61 avdd-supply = <&ab8500_ldo_aux1_reg>;
60 62
61 rhom,touch-max-x = <384>; 63 rohm,touch-max-x = <384>;
62 rhom,touch-max-y = <704>; 64 rohm,touch-max-y = <704>;
63 rhom,flip-y; 65 rohm,flip-y;
64 }; 66 };
65 67
66 bu21013_tp@0x5d { 68 bu21013_tp@5d {
67 compatible = "rhom,bu21013_tp"; 69 compatible = "rohm,bu21013_tp";
68 reg = <0x5d>; 70 reg = <0x5d>;
69 touch-gpio = <&gpio2 20 0x4>; 71 touch-gpio = <&gpio2 20 0x4>;
70 avdd-supply = <&ab8500_ldo_aux1_reg>; 72 avdd-supply = <&ab8500_ldo_aux1_reg>;
71 73
72 rhom,touch-max-x = <384>; 74 rohm,touch-max-x = <384>;
73 rhom,touch-max-y = <704>; 75 rohm,touch-max-y = <704>;
74 rhom,flip-y; 76 rohm,flip-y;
75 }; 77 };
76 }; 78 };
77 }; 79 };
diff --git a/arch/arm/boot/dts/sun4i-a10-cubieboard.dts b/arch/arm/boot/dts/sun4i-a10-cubieboard.dts
index b70fe0db6bb7..757c4cd900ee 100644
--- a/arch/arm/boot/dts/sun4i-a10-cubieboard.dts
+++ b/arch/arm/boot/dts/sun4i-a10-cubieboard.dts
@@ -27,6 +27,21 @@
27 }; 27 };
28 28
29 soc@01c20000 { 29 soc@01c20000 {
30 emac: ethernet@01c0b000 {
31 pinctrl-names = "default";
32 pinctrl-0 = <&emac_pins_a>;
33 phy = <&phy1>;
34 status = "okay";
35 };
36
37 mdio@01c0b080 {
38 status = "okay";
39
40 phy1: ethernet-phy@1 {
41 reg = <1>;
42 };
43 };
44
30 pinctrl@01c20800 { 45 pinctrl@01c20800 {
31 led_pins_cubieboard: led_pins@0 { 46 led_pins_cubieboard: led_pins@0 {
32 allwinner,pins = "PH20", "PH21"; 47 allwinner,pins = "PH20", "PH21";
@@ -41,6 +56,18 @@
41 pinctrl-0 = <&uart0_pins_a>; 56 pinctrl-0 = <&uart0_pins_a>;
42 status = "okay"; 57 status = "okay";
43 }; 58 };
59
60 i2c0: i2c@01c2ac00 {
61 pinctrl-names = "default";
62 pinctrl-0 = <&i2c0_pins_a>;
63 status = "okay";
64 };
65
66 i2c1: i2c@01c2b000 {
67 pinctrl-names = "default";
68 pinctrl-0 = <&i2c1_pins_a>;
69 status = "okay";
70 };
44 }; 71 };
45 72
46 leds { 73 leds {
diff --git a/arch/arm/boot/dts/sun4i-a10-hackberry.dts b/arch/arm/boot/dts/sun4i-a10-hackberry.dts
index b9efac100c85..3514b37d66bc 100644
--- a/arch/arm/boot/dts/sun4i-a10-hackberry.dts
+++ b/arch/arm/boot/dts/sun4i-a10-hackberry.dts
@@ -23,10 +23,51 @@
23 }; 23 };
24 24
25 soc@01c20000 { 25 soc@01c20000 {
26 emac: ethernet@01c0b000 {
27 pinctrl-names = "default";
28 pinctrl-0 = <&emac_pins_a>;
29 phy = <&phy0>;
30 status = "okay";
31 };
32
33 mdio@01c0b080 {
34 phy-supply = <&reg_emac_3v3>;
35 status = "okay";
36
37 phy0: ethernet-phy@0 {
38 reg = <0>;
39 };
40 };
41
42 pio: pinctrl@01c20800 {
43 pinctrl-names = "default";
44 pinctrl-0 = <&hackberry_hogs>;
45
46 hackberry_hogs: hogs@0 {
47 allwinner,pins = "PH19";
48 allwinner,function = "gpio_out";
49 allwinner,drive = <0>;
50 allwinner,pull = <0>;
51 };
52 };
53
26 uart0: serial@01c28000 { 54 uart0: serial@01c28000 {
27 pinctrl-names = "default"; 55 pinctrl-names = "default";
28 pinctrl-0 = <&uart0_pins_a>; 56 pinctrl-0 = <&uart0_pins_a>;
29 status = "okay"; 57 status = "okay";
30 }; 58 };
31 }; 59 };
60
61 regulators {
62 compatible = "simple-bus";
63
64 reg_emac_3v3: emac-3v3 {
65 compatible = "regulator-fixed";
66 regulator-name = "emac-3v3";
67 regulator-min-microvolt = <3300000>;
68 regulator-max-microvolt = <3300000>;
69 enable-active-high;
70 gpio = <&pio 7 19 0>;
71 };
72 };
32}; 73};
diff --git a/arch/arm/boot/dts/sun4i-a10.dtsi b/arch/arm/boot/dts/sun4i-a10.dtsi
index e7ef619a70a2..b2bd6e124250 100644
--- a/arch/arm/boot/dts/sun4i-a10.dtsi
+++ b/arch/arm/boot/dts/sun4i-a10.dtsi
@@ -16,8 +16,12 @@
16 interrupt-parent = <&intc>; 16 interrupt-parent = <&intc>;
17 17
18 cpus { 18 cpus {
19 #address-cells = <1>;
20 #size-cells = <0>;
19 cpu@0 { 21 cpu@0 {
22 device_type = "cpu";
20 compatible = "arm,cortex-a8"; 23 compatible = "arm,cortex-a8";
24 reg = <0x0>;
21 }; 25 };
22 }; 26 };
23 27
@@ -163,6 +167,22 @@
163 reg = <0x01c20000 0x300000>; 167 reg = <0x01c20000 0x300000>;
164 ranges; 168 ranges;
165 169
170 emac: ethernet@01c0b000 {
171 compatible = "allwinner,sun4i-emac";
172 reg = <0x01c0b000 0x1000>;
173 interrupts = <55>;
174 clocks = <&ahb_gates 17>;
175 status = "disabled";
176 };
177
178 mdio@01c0b080 {
179 compatible = "allwinner,sun4i-mdio";
180 reg = <0x01c0b080 0x14>;
181 status = "disabled";
182 #address-cells = <1>;
183 #size-cells = <0>;
184 };
185
166 intc: interrupt-controller@01c20400 { 186 intc: interrupt-controller@01c20400 {
167 compatible = "allwinner,sun4i-ic"; 187 compatible = "allwinner,sun4i-ic";
168 reg = <0x01c20400 0x400>; 188 reg = <0x01c20400 0x400>;
@@ -173,8 +193,10 @@
173 pio: pinctrl@01c20800 { 193 pio: pinctrl@01c20800 {
174 compatible = "allwinner,sun4i-a10-pinctrl"; 194 compatible = "allwinner,sun4i-a10-pinctrl";
175 reg = <0x01c20800 0x400>; 195 reg = <0x01c20800 0x400>;
196 interrupts = <28>;
176 clocks = <&apb0_gates 5>; 197 clocks = <&apb0_gates 5>;
177 gpio-controller; 198 gpio-controller;
199 interrupt-controller;
178 #address-cells = <1>; 200 #address-cells = <1>;
179 #size-cells = <0>; 201 #size-cells = <0>;
180 #gpio-cells = <3>; 202 #gpio-cells = <3>;
@@ -199,6 +221,38 @@
199 allwinner,drive = <0>; 221 allwinner,drive = <0>;
200 allwinner,pull = <0>; 222 allwinner,pull = <0>;
201 }; 223 };
224
225 i2c0_pins_a: i2c0@0 {
226 allwinner,pins = "PB0", "PB1";
227 allwinner,function = "i2c0";
228 allwinner,drive = <0>;
229 allwinner,pull = <0>;
230 };
231
232 i2c1_pins_a: i2c1@0 {
233 allwinner,pins = "PB18", "PB19";
234 allwinner,function = "i2c1";
235 allwinner,drive = <0>;
236 allwinner,pull = <0>;
237 };
238
239 i2c2_pins_a: i2c2@0 {
240 allwinner,pins = "PB20", "PB21";
241 allwinner,function = "i2c2";
242 allwinner,drive = <0>;
243 allwinner,pull = <0>;
244 };
245
246 emac_pins_a: emac0@0 {
247 allwinner,pins = "PA0", "PA1", "PA2",
248 "PA3", "PA4", "PA5", "PA6",
249 "PA7", "PA8", "PA9", "PA10",
250 "PA11", "PA12", "PA13", "PA14",
251 "PA15", "PA16";
252 allwinner,function = "emac";
253 allwinner,drive = <0>;
254 allwinner,pull = <0>;
255 };
202 }; 256 };
203 257
204 timer@01c20c00 { 258 timer@01c20c00 {
@@ -292,5 +346,32 @@
292 clocks = <&apb1_gates 23>; 346 clocks = <&apb1_gates 23>;
293 status = "disabled"; 347 status = "disabled";
294 }; 348 };
349
350 i2c0: i2c@01c2ac00 {
351 compatible = "allwinner,sun4i-i2c";
352 reg = <0x01c2ac00 0x400>;
353 interrupts = <7>;
354 clocks = <&apb1_gates 0>;
355 clock-frequency = <100000>;
356 status = "disabled";
357 };
358
359 i2c1: i2c@01c2b000 {
360 compatible = "allwinner,sun4i-i2c";
361 reg = <0x01c2b000 0x400>;
362 interrupts = <8>;
363 clocks = <&apb1_gates 1>;
364 clock-frequency = <100000>;
365 status = "disabled";
366 };
367
368 i2c2: i2c@01c2b400 {
369 compatible = "allwinner,sun4i-i2c";
370 reg = <0x01c2b400 0x400>;
371 interrupts = <9>;
372 clocks = <&apb1_gates 2>;
373 clock-frequency = <100000>;
374 status = "disabled";
375 };
295 }; 376 };
296}; 377};
diff --git a/arch/arm/boot/dts/sun5i-a10s-olinuxino-micro.dts b/arch/arm/boot/dts/sun5i-a10s-olinuxino-micro.dts
new file mode 100644
index 000000000000..64dc0c42c43a
--- /dev/null
+++ b/arch/arm/boot/dts/sun5i-a10s-olinuxino-micro.dts
@@ -0,0 +1,76 @@
1/*
2 * Copyright 2013 Maxime Ripard
3 *
4 * Maxime Ripard <maxime.ripard@free-electrons.com>
5 *
6 * The code contained herein is licensed under the GNU General Public
7 * License. You may obtain a copy of the GNU General Public License
8 * Version 2 or later at the following locations:
9 *
10 * http://www.opensource.org/licenses/gpl-license.html
11 * http://www.gnu.org/copyleft/gpl.html
12 */
13
14/dts-v1/;
15/include/ "sun5i-a10s.dtsi"
16
17/ {
18 model = "Olimex A10s-Olinuxino Micro";
19 compatible = "olimex,a10s-olinuxino-micro", "allwinner,sun5i-a10s";
20
21 soc@01c20000 {
22 emac: ethernet@01c0b000 {
23 pinctrl-names = "default";
24 pinctrl-0 = <&emac_pins_a>;
25 phy = <&phy1>;
26 status = "okay";
27 };
28
29 mdio@01c0b080 {
30 status = "okay";
31
32 phy1: ethernet-phy@1 {
33 reg = <1>;
34 };
35 };
36
37 pinctrl@01c20800 {
38 led_pins_olinuxino: led_pins@0 {
39 allwinner,pins = "PE3";
40 allwinner,function = "gpio_out";
41 allwinner,drive = <1>;
42 allwinner,pull = <0>;
43 };
44 };
45
46 uart0: serial@01c28000 {
47 pinctrl-names = "default";
48 pinctrl-0 = <&uart0_pins_a>;
49 status = "okay";
50 };
51
52 uart2: serial@01c28800 {
53 pinctrl-names = "default";
54 pinctrl-0 = <&uart2_pins_a>;
55 status = "okay";
56 };
57
58 uart3: serial@01c28c00 {
59 pinctrl-names = "default";
60 pinctrl-0 = <&uart3_pins_a>;
61 status = "okay";
62 };
63 };
64
65 leds {
66 compatible = "gpio-leds";
67 pinctrl-names = "default";
68 pinctrl-0 = <&led_pins_olinuxino>;
69
70 green {
71 label = "a10s-olinuxino-micro:green:usr";
72 gpios = <&pio 4 3 0>;
73 default-state = "on";
74 };
75 };
76};
diff --git a/arch/arm/boot/dts/sun5i-a10s.dtsi b/arch/arm/boot/dts/sun5i-a10s.dtsi
new file mode 100644
index 000000000000..2307ce827ae0
--- /dev/null
+++ b/arch/arm/boot/dts/sun5i-a10s.dtsi
@@ -0,0 +1,286 @@
1/*
2 * Copyright 2013 Maxime Ripard
3 *
4 * Maxime Ripard <maxime.ripard@free-electrons.com>
5 *
6 * The code contained herein is licensed under the GNU General Public
7 * License. You may obtain a copy of the GNU General Public License
8 * Version 2 or later at the following locations:
9 *
10 * http://www.opensource.org/licenses/gpl-license.html
11 * http://www.gnu.org/copyleft/gpl.html
12 */
13
14/include/ "skeleton.dtsi"
15
16/ {
17 interrupt-parent = <&intc>;
18
19 cpus {
20 cpu@0 {
21 compatible = "arm,cortex-a8";
22 };
23 };
24
25 memory {
26 reg = <0x40000000 0x20000000>;
27 };
28
29 clocks {
30 #address-cells = <1>;
31 #size-cells = <1>;
32 ranges;
33
34 /*
35 * This is a dummy clock, to be used as placeholder on
36 * other mux clocks when a specific parent clock is not
37 * yet implemented. It should be dropped when the driver
38 * is complete.
39 */
40 dummy: dummy {
41 #clock-cells = <0>;
42 compatible = "fixed-clock";
43 clock-frequency = <0>;
44 };
45
46 osc24M: osc24M@01c20050 {
47 #clock-cells = <0>;
48 compatible = "allwinner,sun4i-osc-clk";
49 reg = <0x01c20050 0x4>;
50 clock-frequency = <24000000>;
51 };
52
53 osc32k: osc32k {
54 #clock-cells = <0>;
55 compatible = "fixed-clock";
56 clock-frequency = <32768>;
57 };
58
59 pll1: pll1@01c20000 {
60 #clock-cells = <0>;
61 compatible = "allwinner,sun4i-pll1-clk";
62 reg = <0x01c20000 0x4>;
63 clocks = <&osc24M>;
64 };
65
66 /* dummy is 200M */
67 cpu: cpu@01c20054 {
68 #clock-cells = <0>;
69 compatible = "allwinner,sun4i-cpu-clk";
70 reg = <0x01c20054 0x4>;
71 clocks = <&osc32k>, <&osc24M>, <&pll1>, <&dummy>;
72 };
73
74 axi: axi@01c20054 {
75 #clock-cells = <0>;
76 compatible = "allwinner,sun4i-axi-clk";
77 reg = <0x01c20054 0x4>;
78 clocks = <&cpu>;
79 };
80
81 axi_gates: axi_gates@01c2005c {
82 #clock-cells = <1>;
83 compatible = "allwinner,sun4i-axi-gates-clk";
84 reg = <0x01c2005c 0x4>;
85 clocks = <&axi>;
86 clock-output-names = "axi_dram";
87 };
88
89 ahb: ahb@01c20054 {
90 #clock-cells = <0>;
91 compatible = "allwinner,sun4i-ahb-clk";
92 reg = <0x01c20054 0x4>;
93 clocks = <&axi>;
94 };
95
96 ahb_gates: ahb_gates@01c20060 {
97 #clock-cells = <1>;
98 compatible = "allwinner,sun4i-ahb-gates-clk";
99 reg = <0x01c20060 0x8>;
100 clocks = <&ahb>;
101 clock-output-names = "ahb_usb0", "ahb_ehci0",
102 "ahb_ohci0", "ahb_ehci1", "ahb_ohci1", "ahb_ss",
103 "ahb_dma", "ahb_bist", "ahb_mmc0", "ahb_mmc1",
104 "ahb_mmc2", "ahb_mmc3", "ahb_ms", "ahb_nand",
105 "ahb_sdram", "ahb_ace", "ahb_emac", "ahb_ts",
106 "ahb_spi0", "ahb_spi1", "ahb_spi2", "ahb_spi3",
107 "ahb_pata", "ahb_sata", "ahb_gps", "ahb_ve",
108 "ahb_tvd", "ahb_tve0", "ahb_tve1", "ahb_lcd0",
109 "ahb_lcd1", "ahb_csi0", "ahb_csi1", "ahb_hdmi",
110 "ahb_de_be0", "ahb_de_be1", "ahb_de_fe0",
111 "ahb_de_fe1", "ahb_mp", "ahb_mali400";
112 };
113
114 apb0: apb0@01c20054 {
115 #clock-cells = <0>;
116 compatible = "allwinner,sun4i-apb0-clk";
117 reg = <0x01c20054 0x4>;
118 clocks = <&ahb>;
119 };
120
121 apb0_gates: apb0_gates@01c20068 {
122 #clock-cells = <1>;
123 compatible = "allwinner,sun4i-apb0-gates-clk";
124 reg = <0x01c20068 0x4>;
125 clocks = <&apb0>;
126 clock-output-names = "apb0_codec", "apb0_spdif",
127 "apb0_ac97", "apb0_iis", "apb0_pio", "apb0_ir0",
128 "apb0_ir1", "apb0_keypad";
129 };
130
131 /* dummy is pll62 */
132 apb1_mux: apb1_mux@01c20058 {
133 #clock-cells = <0>;
134 compatible = "allwinner,sun4i-apb1-mux-clk";
135 reg = <0x01c20058 0x4>;
136 clocks = <&osc24M>, <&dummy>, <&osc32k>;
137 };
138
139 apb1: apb1@01c20058 {
140 #clock-cells = <0>;
141 compatible = "allwinner,sun4i-apb1-clk";
142 reg = <0x01c20058 0x4>;
143 clocks = <&apb1_mux>;
144 };
145
146 apb1_gates: apb1_gates@01c2006c {
147 #clock-cells = <1>;
148 compatible = "allwinner,sun4i-apb1-gates-clk";
149 reg = <0x01c2006c 0x4>;
150 clocks = <&apb1>;
151 clock-output-names = "apb1_i2c0", "apb1_i2c1",
152 "apb1_i2c2", "apb1_can", "apb1_scr",
153 "apb1_ps20", "apb1_ps21", "apb1_uart0",
154 "apb1_uart1", "apb1_uart2", "apb1_uart3",
155 "apb1_uart4", "apb1_uart5", "apb1_uart6",
156 "apb1_uart7";
157 };
158 };
159
160 soc@01c20000 {
161 compatible = "simple-bus";
162 #address-cells = <1>;
163 #size-cells = <1>;
164 reg = <0x01c20000 0x300000>;
165 ranges;
166
167 emac: ethernet@01c0b000 {
168 compatible = "allwinner,sun4i-emac";
169 reg = <0x01c0b000 0x1000>;
170 interrupts = <55>;
171 clocks = <&ahb_gates 17>;
172 status = "disabled";
173 };
174
175 mdio@01c0b080 {
176 compatible = "allwinner,sun4i-mdio";
177 reg = <0x01c0b080 0x14>;
178 status = "disabled";
179 #address-cells = <1>;
180 #size-cells = <0>;
181 };
182
183 intc: interrupt-controller@01c20400 {
184 compatible = "allwinner,sun4i-ic";
185 reg = <0x01c20400 0x400>;
186 interrupt-controller;
187 #interrupt-cells = <1>;
188 };
189
190 pio: pinctrl@01c20800 {
191 compatible = "allwinner,sun5i-a10s-pinctrl";
192 reg = <0x01c20800 0x400>;
193 interrupts = <28>;
194 clocks = <&apb0_gates 5>;
195 gpio-controller;
196 interrupt-controller;
197 #address-cells = <1>;
198 #size-cells = <0>;
199 #gpio-cells = <3>;
200
201 uart0_pins_a: uart0@0 {
202 allwinner,pins = "PB19", "PB20";
203 allwinner,function = "uart0";
204 allwinner,drive = <0>;
205 allwinner,pull = <0>;
206 };
207
208 uart2_pins_a: uart2@0 {
209 allwinner,pins = "PC18", "PC19";
210 allwinner,function = "uart2";
211 allwinner,drive = <0>;
212 allwinner,pull = <0>;
213 };
214
215 uart3_pins_a: uart3@0 {
216 allwinner,pins = "PG9", "PG10";
217 allwinner,function = "uart3";
218 allwinner,drive = <0>;
219 allwinner,pull = <0>;
220 };
221
222 emac_pins_a: emac0@0 {
223 allwinner,pins = "PA0", "PA1", "PA2",
224 "PA3", "PA4", "PA5", "PA6",
225 "PA7", "PA8", "PA9", "PA10",
226 "PA11", "PA12", "PA13", "PA14",
227 "PA15", "PA16";
228 allwinner,function = "emac";
229 allwinner,drive = <0>;
230 allwinner,pull = <0>;
231 };
232 };
233
234 timer@01c20c00 {
235 compatible = "allwinner,sun4i-timer";
236 reg = <0x01c20c00 0x90>;
237 interrupts = <22>;
238 clocks = <&osc24M>;
239 };
240
241 wdt: watchdog@01c20c90 {
242 compatible = "allwinner,sun4i-wdt";
243 reg = <0x01c20c90 0x10>;
244 };
245
246 uart0: serial@01c28000 {
247 compatible = "snps,dw-apb-uart";
248 reg = <0x01c28000 0x400>;
249 interrupts = <1>;
250 reg-shift = <2>;
251 reg-io-width = <4>;
252 clocks = <&apb1_gates 16>;
253 status = "disabled";
254 };
255
256 uart1: serial@01c28400 {
257 compatible = "snps,dw-apb-uart";
258 reg = <0x01c28400 0x400>;
259 interrupts = <2>;
260 reg-shift = <2>;
261 reg-io-width = <4>;
262 clocks = <&apb1_gates 17>;
263 status = "disabled";
264 };
265
266 uart2: serial@01c28800 {
267 compatible = "snps,dw-apb-uart";
268 reg = <0x01c28800 0x400>;
269 interrupts = <3>;
270 reg-shift = <2>;
271 reg-io-width = <4>;
272 clocks = <&apb1_gates 18>;
273 status = "disabled";
274 };
275
276 uart3: serial@01c28c00 {
277 compatible = "snps,dw-apb-uart";
278 reg = <0x01c28c00 0x400>;
279 interrupts = <4>;
280 reg-shift = <2>;
281 reg-io-width = <4>;
282 clocks = <&apb1_gates 19>;
283 status = "disabled";
284 };
285 };
286};
diff --git a/arch/arm/boot/dts/sun5i-a13-olinuxino.dts b/arch/arm/boot/dts/sun5i-a13-olinuxino.dts
index 3ca55067f868..80497e376706 100644
--- a/arch/arm/boot/dts/sun5i-a13-olinuxino.dts
+++ b/arch/arm/boot/dts/sun5i-a13-olinuxino.dts
@@ -37,6 +37,24 @@
37 pinctrl-0 = <&uart1_pins_b>; 37 pinctrl-0 = <&uart1_pins_b>;
38 status = "okay"; 38 status = "okay";
39 }; 39 };
40
41 i2c0: i2c@01c2ac00 {
42 pinctrl-names = "default";
43 pinctrl-0 = <&i2c0_pins_a>;
44 status = "okay";
45 };
46
47 i2c1: i2c@01c2b000 {
48 pinctrl-names = "default";
49 pinctrl-0 = <&i2c1_pins_a>;
50 status = "okay";
51 };
52
53 i2c2: i2c@01c2b400 {
54 pinctrl-names = "default";
55 pinctrl-0 = <&i2c2_pins_a>;
56 status = "okay";
57 };
40 }; 58 };
41 59
42 leds { 60 leds {
diff --git a/arch/arm/boot/dts/sun5i-a13.dtsi b/arch/arm/boot/dts/sun5i-a13.dtsi
index 31fa38f8cc98..7363211daf84 100644
--- a/arch/arm/boot/dts/sun5i-a13.dtsi
+++ b/arch/arm/boot/dts/sun5i-a13.dtsi
@@ -17,8 +17,12 @@
17 interrupt-parent = <&intc>; 17 interrupt-parent = <&intc>;
18 18
19 cpus { 19 cpus {
20 #address-cells = <1>;
21 #size-cells = <0>;
20 cpu@0 { 22 cpu@0 {
23 device_type = "cpu";
21 compatible = "arm,cortex-a8"; 24 compatible = "arm,cortex-a8";
25 reg = <0x0>;
22 }; 26 };
23 }; 27 };
24 28
@@ -95,20 +99,15 @@
95 99
96 ahb_gates: ahb_gates@01c20060 { 100 ahb_gates: ahb_gates@01c20060 {
97 #clock-cells = <1>; 101 #clock-cells = <1>;
98 compatible = "allwinner,sun4i-ahb-gates-clk"; 102 compatible = "allwinner,sun5i-a13-ahb-gates-clk";
99 reg = <0x01c20060 0x8>; 103 reg = <0x01c20060 0x8>;
100 clocks = <&ahb>; 104 clocks = <&ahb>;
101 clock-output-names = "ahb_usb0", "ahb_ehci0", 105 clock-output-names = "ahb_usbotg", "ahb_ehci", "ahb_ohci",
102 "ahb_ohci0", "ahb_ehci1", "ahb_ohci1", "ahb_ss", 106 "ahb_ss", "ahb_dma", "ahb_bist", "ahb_mmc0",
103 "ahb_dma", "ahb_bist", "ahb_mmc0", "ahb_mmc1", 107 "ahb_mmc1", "ahb_mmc2", "ahb_nand", "ahb_sdram",
104 "ahb_mmc2", "ahb_mmc3", "ahb_ms", "ahb_nand", 108 "ahb_spi0", "ahb_spi1", "ahb_spi2", "ahb_stimer",
105 "ahb_sdram", "ahb_ace", "ahb_emac", "ahb_ts", 109 "ahb_ve", "ahb_lcd", "ahb_csi", "ahb_de_be",
106 "ahb_spi0", "ahb_spi1", "ahb_spi2", "ahb_spi3", 110 "ahb_de_fe", "ahb_iep", "ahb_mali400";
107 "ahb_pata", "ahb_sata", "ahb_gps", "ahb_ve",
108 "ahb_tvd", "ahb_tve0", "ahb_tve1", "ahb_lcd0",
109 "ahb_lcd1", "ahb_csi0", "ahb_csi1", "ahb_hdmi",
110 "ahb_de_be0", "ahb_de_be1", "ahb_de_fe0",
111 "ahb_de_fe1", "ahb_mp", "ahb_mali400";
112 }; 111 };
113 112
114 apb0: apb0@01c20054 { 113 apb0: apb0@01c20054 {
@@ -120,15 +119,13 @@
120 119
121 apb0_gates: apb0_gates@01c20068 { 120 apb0_gates: apb0_gates@01c20068 {
122 #clock-cells = <1>; 121 #clock-cells = <1>;
123 compatible = "allwinner,sun4i-apb0-gates-clk"; 122 compatible = "allwinner,sun5i-a13-apb0-gates-clk";
124 reg = <0x01c20068 0x4>; 123 reg = <0x01c20068 0x4>;
125 clocks = <&apb0>; 124 clocks = <&apb0>;
126 clock-output-names = "apb0_codec", "apb0_spdif", 125 clock-output-names = "apb0_codec", "apb0_pio", "apb0_ir";
127 "apb0_ac97", "apb0_iis", "apb0_pio", "apb0_ir0",
128 "apb0_ir1", "apb0_keypad";
129 }; 126 };
130 127
131 /* dummy is pll62 */ 128 /* dummy is pll6 */
132 apb1_mux: apb1_mux@01c20058 { 129 apb1_mux: apb1_mux@01c20058 {
133 #clock-cells = <0>; 130 #clock-cells = <0>;
134 compatible = "allwinner,sun4i-apb1-mux-clk"; 131 compatible = "allwinner,sun4i-apb1-mux-clk";
@@ -145,15 +142,11 @@
145 142
146 apb1_gates: apb1_gates@01c2006c { 143 apb1_gates: apb1_gates@01c2006c {
147 #clock-cells = <1>; 144 #clock-cells = <1>;
148 compatible = "allwinner,sun4i-apb1-gates-clk"; 145 compatible = "allwinner,sun5i-a13-apb1-gates-clk";
149 reg = <0x01c2006c 0x4>; 146 reg = <0x01c2006c 0x4>;
150 clocks = <&apb1>; 147 clocks = <&apb1>;
151 clock-output-names = "apb1_i2c0", "apb1_i2c1", 148 clock-output-names = "apb1_i2c0", "apb1_i2c1",
152 "apb1_i2c2", "apb1_can", "apb1_scr", 149 "apb1_i2c2", "apb1_uart1", "apb1_uart3";
153 "apb1_ps20", "apb1_ps21", "apb1_uart0",
154 "apb1_uart1", "apb1_uart2", "apb1_uart3",
155 "apb1_uart4", "apb1_uart5", "apb1_uart6",
156 "apb1_uart7";
157 }; 150 };
158 }; 151 };
159 152
@@ -174,8 +167,10 @@
174 pio: pinctrl@01c20800 { 167 pio: pinctrl@01c20800 {
175 compatible = "allwinner,sun5i-a13-pinctrl"; 168 compatible = "allwinner,sun5i-a13-pinctrl";
176 reg = <0x01c20800 0x400>; 169 reg = <0x01c20800 0x400>;
170 interrupts = <28>;
177 clocks = <&apb0_gates 5>; 171 clocks = <&apb0_gates 5>;
178 gpio-controller; 172 gpio-controller;
173 interrupt-controller;
179 #address-cells = <1>; 174 #address-cells = <1>;
180 #size-cells = <0>; 175 #size-cells = <0>;
181 #gpio-cells = <3>; 176 #gpio-cells = <3>;
@@ -193,6 +188,27 @@
193 allwinner,drive = <0>; 188 allwinner,drive = <0>;
194 allwinner,pull = <0>; 189 allwinner,pull = <0>;
195 }; 190 };
191
192 i2c0_pins_a: i2c0@0 {
193 allwinner,pins = "PB0", "PB1";
194 allwinner,function = "i2c0";
195 allwinner,drive = <0>;
196 allwinner,pull = <0>;
197 };
198
199 i2c1_pins_a: i2c1@0 {
200 allwinner,pins = "PB15", "PB16";
201 allwinner,function = "i2c1";
202 allwinner,drive = <0>;
203 allwinner,pull = <0>;
204 };
205
206 i2c2_pins_a: i2c2@0 {
207 allwinner,pins = "PB17", "PB18";
208 allwinner,function = "i2c2";
209 allwinner,drive = <0>;
210 allwinner,pull = <0>;
211 };
196 }; 212 };
197 213
198 timer@01c20c00 { 214 timer@01c20c00 {
@@ -226,5 +242,32 @@
226 clocks = <&apb1_gates 19>; 242 clocks = <&apb1_gates 19>;
227 status = "disabled"; 243 status = "disabled";
228 }; 244 };
245
246 i2c0: i2c@01c2ac00 {
247 compatible = "allwinner,sun4i-i2c";
248 reg = <0x01c2ac00 0x400>;
249 interrupts = <7>;
250 clocks = <&apb1_gates 0>;
251 clock-frequency = <100000>;
252 status = "disabled";
253 };
254
255 i2c1: i2c@01c2b000 {
256 compatible = "allwinner,sun4i-i2c";
257 reg = <0x01c2b000 0x400>;
258 interrupts = <8>;
259 clocks = <&apb1_gates 1>;
260 clock-frequency = <100000>;
261 status = "disabled";
262 };
263
264 i2c2: i2c@01c2b400 {
265 compatible = "allwinner,sun4i-i2c";
266 reg = <0x01c2b400 0x400>;
267 interrupts = <9>;
268 clocks = <&apb1_gates 2>;
269 clock-frequency = <100000>;
270 status = "disabled";
271 };
229 }; 272 };
230}; 273};
diff --git a/arch/arm/boot/dts/tegra114-dalmore.dts b/arch/arm/boot/dts/tegra114-dalmore.dts
index 72c1f27af7f3..cb640eb6c932 100644
--- a/arch/arm/boot/dts/tegra114-dalmore.dts
+++ b/arch/arm/boot/dts/tegra114-dalmore.dts
@@ -1,6 +1,6 @@
1/dts-v1/; 1/dts-v1/;
2 2
3/include/ "tegra114.dtsi" 3#include "tegra114.dtsi"
4 4
5/ { 5/ {
6 model = "NVIDIA Tegra114 Dalmore evaluation board"; 6 model = "NVIDIA Tegra114 Dalmore evaluation board";
@@ -727,6 +727,16 @@
727 battery-name = "battery"; 727 battery-name = "battery";
728 sbs,i2c-retry-count = <2>; 728 sbs,i2c-retry-count = <2>;
729 sbs,poll-retry-count = <100>; 729 sbs,poll-retry-count = <100>;
730 power-supplies = <&charger>;
731 };
732
733 rt5640: rt5640 {
734 compatible = "realtek,rt5640";
735 reg = <0x1c>;
736 interrupt-parent = <&gpio>;
737 interrupts = <TEGRA_GPIO(W, 3) GPIO_ACTIVE_HIGH>;
738 realtek,ldo1-en-gpios =
739 <&gpio TEGRA_GPIO(V, 3) GPIO_ACTIVE_HIGH>;
730 }; 740 };
731 }; 741 };
732 742
@@ -748,7 +758,7 @@
748 compatible = "ti,tps65090"; 758 compatible = "ti,tps65090";
749 reg = <0x48>; 759 reg = <0x48>;
750 interrupt-parent = <&gpio>; 760 interrupt-parent = <&gpio>;
751 interrupts = <72 0x04>; /* gpio PJ0 */ 761 interrupts = <TEGRA_GPIO(J, 0) IRQ_TYPE_LEVEL_HIGH>;
752 762
753 vsys1-supply = <&vdd_ac_bat_reg>; 763 vsys1-supply = <&vdd_ac_bat_reg>;
754 vsys2-supply = <&vdd_ac_bat_reg>; 764 vsys2-supply = <&vdd_ac_bat_reg>;
@@ -763,6 +773,11 @@
763 vsys-l1-supply = <&vdd_ac_bat_reg>; 773 vsys-l1-supply = <&vdd_ac_bat_reg>;
764 vsys-l2-supply = <&vdd_ac_bat_reg>; 774 vsys-l2-supply = <&vdd_ac_bat_reg>;
765 775
776 charger: charger {
777 compatible = "ti,tps65090-charger";
778 ti,enable-low-current-chrg;
779 };
780
766 regulators { 781 regulators {
767 tps65090_dcdc1_reg: dcdc1 { 782 tps65090_dcdc1_reg: dcdc1 {
768 regulator-name = "vdd-sys-5v0"; 783 regulator-name = "vdd-sys-5v0";
@@ -823,12 +838,28 @@
823 }; 838 };
824 }; 839 };
825 840
841 spi@7000da00 {
842 status = "okay";
843 spi-max-frequency = <25000000>;
844 spi-flash@0 {
845 compatible = "winbond,w25q32dw";
846 reg = <0>;
847 spi-max-frequency = <20000000>;
848 };
849 };
850
826 pmc { 851 pmc {
827 nvidia,invert-interrupt; 852 nvidia,invert-interrupt;
828 }; 853 };
829 854
855 ahub {
856 i2s@70080400 {
857 status = "okay";
858 };
859 };
860
830 sdhci@78000400 { 861 sdhci@78000400 {
831 cd-gpios = <&gpio 170 1>; /* gpio PV2 */ 862 cd-gpios = <&gpio TEGRA_GPIO(V, 2) GPIO_ACTIVE_LOW>;
832 bus-width = <4>; 863 bus-width = <4>;
833 status = "okay"; 864 status = "okay";
834 }; 865 };
@@ -873,7 +904,7 @@
873 regulator-min-microvolt = <1800000>; 904 regulator-min-microvolt = <1800000>;
874 regulator-max-microvolt = <1800000>; 905 regulator-max-microvolt = <1800000>;
875 enable-active-high; 906 enable-active-high;
876 gpio = <&gpio 61 0>; /* GPIO PH5 */ 907 gpio = <&gpio TEGRA_GPIO(H, 5) GPIO_ACTIVE_HIGH>;
877 }; 908 };
878 909
879 lcd_bl_en_reg: regulator@2 { 910 lcd_bl_en_reg: regulator@2 {
@@ -883,7 +914,7 @@
883 regulator-min-microvolt = <5000000>; 914 regulator-min-microvolt = <5000000>;
884 regulator-max-microvolt = <5000000>; 915 regulator-max-microvolt = <5000000>;
885 enable-active-high; 916 enable-active-high;
886 gpio = <&gpio 58 0>; /* GPIO PH2 */ 917 gpio = <&gpio TEGRA_GPIO(H, 2) GPIO_ACTIVE_HIGH>;
887 }; 918 };
888 919
889 usb1_vbus_reg: regulator@3 { 920 usb1_vbus_reg: regulator@3 {
@@ -893,7 +924,7 @@
893 regulator-min-microvolt = <5000000>; 924 regulator-min-microvolt = <5000000>;
894 regulator-max-microvolt = <5000000>; 925 regulator-max-microvolt = <5000000>;
895 enable-active-high; 926 enable-active-high;
896 gpio = <&gpio 108 0>; /* GPIO PN4 */ 927 gpio = <&gpio TEGRA_GPIO(N, 4) GPIO_ACTIVE_HIGH>;
897 gpio-open-drain; 928 gpio-open-drain;
898 vin-supply = <&tps65090_dcdc1_reg>; 929 vin-supply = <&tps65090_dcdc1_reg>;
899 }; 930 };
@@ -905,7 +936,7 @@
905 regulator-min-microvolt = <5000000>; 936 regulator-min-microvolt = <5000000>;
906 regulator-max-microvolt = <5000000>; 937 regulator-max-microvolt = <5000000>;
907 enable-active-high; 938 enable-active-high;
908 gpio = <&gpio 86 0>; /* GPIO PK6 */ 939 gpio = <&gpio TEGRA_GPIO(K, 6) GPIO_ACTIVE_HIGH>;
909 gpio-open-drain; 940 gpio-open-drain;
910 vin-supply = <&tps65090_dcdc1_reg>; 941 vin-supply = <&tps65090_dcdc1_reg>;
911 }; 942 };
@@ -917,8 +948,32 @@
917 regulator-min-microvolt = <5000000>; 948 regulator-min-microvolt = <5000000>;
918 regulator-max-microvolt = <5000000>; 949 regulator-max-microvolt = <5000000>;
919 enable-active-high; 950 enable-active-high;
920 gpio = <&gpio 81 0>; /* GPIO PK1 */ 951 gpio = <&gpio TEGRA_GPIO(K, 1) GPIO_ACTIVE_HIGH>;
921 vin-supply = <&tps65090_dcdc1_reg>; 952 vin-supply = <&tps65090_dcdc1_reg>;
922 }; 953 };
923 }; 954 };
955
956 sound {
957 compatible = "nvidia,tegra-audio-rt5640-dalmore",
958 "nvidia,tegra-audio-rt5640";
959 nvidia,model = "NVIDIA Tegra Dalmore";
960
961 nvidia,audio-routing =
962 "Headphones", "HPOR",
963 "Headphones", "HPOL",
964 "Speakers", "SPORP",
965 "Speakers", "SPORN",
966 "Speakers", "SPOLP",
967 "Speakers", "SPOLN";
968
969 nvidia,i2s-controller = <&tegra_i2s1>;
970 nvidia,audio-codec = <&rt5640>;
971
972 nvidia,hp-det-gpios = <&gpio TEGRA_GPIO(R, 7) GPIO_ACTIVE_HIGH>;
973
974 clocks = <&tegra_car TEGRA114_CLK_PLL_A>,
975 <&tegra_car TEGRA114_CLK_PLL_A_OUT0>,
976 <&tegra_car TEGRA114_CLK_EXTERN1>;
977 clock-names = "pll_a", "pll_a_out0", "mclk";
978 };
924}; 979};
diff --git a/arch/arm/boot/dts/tegra114-pluto.dts b/arch/arm/boot/dts/tegra114-pluto.dts
index 6bbc8efae9c0..d5f8d3e0bde2 100644
--- a/arch/arm/boot/dts/tegra114-pluto.dts
+++ b/arch/arm/boot/dts/tegra114-pluto.dts
@@ -1,6 +1,6 @@
1/dts-v1/; 1/dts-v1/;
2 2
3/include/ "tegra114.dtsi" 3#include "tegra114.dtsi"
4 4
5/ { 5/ {
6 model = "NVIDIA Tegra114 Pluto evaluation board"; 6 model = "NVIDIA Tegra114 Pluto evaluation board";
diff --git a/arch/arm/boot/dts/tegra114.dtsi b/arch/arm/boot/dts/tegra114.dtsi
index 629415ffd8dc..abf6c40d28c6 100644
--- a/arch/arm/boot/dts/tegra114.dtsi
+++ b/arch/arm/boot/dts/tegra114.dtsi
@@ -1,4 +1,8 @@
1/include/ "skeleton.dtsi" 1#include <dt-bindings/clock/tegra114-car.h>
2#include <dt-bindings/gpio/tegra-gpio.h>
3#include <dt-bindings/interrupt-controller/arm-gic.h>
4
5#include "skeleton.dtsi"
2 6
3/ { 7/ {
4 compatible = "nvidia,tegra114"; 8 compatible = "nvidia,tegra114";
@@ -19,19 +23,20 @@
19 <0x50042000 0x1000>, 23 <0x50042000 0x1000>,
20 <0x50044000 0x2000>, 24 <0x50044000 0x2000>,
21 <0x50046000 0x2000>; 25 <0x50046000 0x2000>;
22 interrupts = <1 9 0xf04>; 26 interrupts = <GIC_PPI 9
27 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>;
23 }; 28 };
24 29
25 timer@60005000 { 30 timer@60005000 {
26 compatible = "nvidia,tegra114-timer", "nvidia,tegra20-timer"; 31 compatible = "nvidia,tegra114-timer", "nvidia,tegra20-timer";
27 reg = <0x60005000 0x400>; 32 reg = <0x60005000 0x400>;
28 interrupts = <0 0 0x04 33 interrupts = <GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>,
29 0 1 0x04 34 <GIC_SPI 1 IRQ_TYPE_LEVEL_HIGH>,
30 0 41 0x04 35 <GIC_SPI 41 IRQ_TYPE_LEVEL_HIGH>,
31 0 42 0x04 36 <GIC_SPI 42 IRQ_TYPE_LEVEL_HIGH>,
32 0 121 0x04 37 <GIC_SPI 121 IRQ_TYPE_LEVEL_HIGH>,
33 0 122 0x04>; 38 <GIC_SPI 122 IRQ_TYPE_LEVEL_HIGH>;
34 clocks = <&tegra_car 5>; 39 clocks = <&tegra_car TEGRA114_CLK_TIMER>;
35 }; 40 };
36 41
37 tegra_car: clock { 42 tegra_car: clock {
@@ -43,39 +48,39 @@
43 apbdma: dma { 48 apbdma: dma {
44 compatible = "nvidia,tegra114-apbdma"; 49 compatible = "nvidia,tegra114-apbdma";
45 reg = <0x6000a000 0x1400>; 50 reg = <0x6000a000 0x1400>;
46 interrupts = <0 104 0x04 51 interrupts = <GIC_SPI 104 IRQ_TYPE_LEVEL_HIGH>,
47 0 105 0x04 52 <GIC_SPI 105 IRQ_TYPE_LEVEL_HIGH>,
48 0 106 0x04 53 <GIC_SPI 106 IRQ_TYPE_LEVEL_HIGH>,
49 0 107 0x04 54 <GIC_SPI 107 IRQ_TYPE_LEVEL_HIGH>,
50 0 108 0x04 55 <GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>,
51 0 109 0x04 56 <GIC_SPI 109 IRQ_TYPE_LEVEL_HIGH>,
52 0 110 0x04 57 <GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH>,
53 0 111 0x04 58 <GIC_SPI 111 IRQ_TYPE_LEVEL_HIGH>,
54 0 112 0x04 59 <GIC_SPI 112 IRQ_TYPE_LEVEL_HIGH>,
55 0 113 0x04 60 <GIC_SPI 113 IRQ_TYPE_LEVEL_HIGH>,
56 0 114 0x04 61 <GIC_SPI 114 IRQ_TYPE_LEVEL_HIGH>,
57 0 115 0x04 62 <GIC_SPI 115 IRQ_TYPE_LEVEL_HIGH>,
58 0 116 0x04 63 <GIC_SPI 116 IRQ_TYPE_LEVEL_HIGH>,
59 0 117 0x04 64 <GIC_SPI 117 IRQ_TYPE_LEVEL_HIGH>,
60 0 118 0x04 65 <GIC_SPI 118 IRQ_TYPE_LEVEL_HIGH>,
61 0 119 0x04 66 <GIC_SPI 119 IRQ_TYPE_LEVEL_HIGH>,
62 0 128 0x04 67 <GIC_SPI 128 IRQ_TYPE_LEVEL_HIGH>,
63 0 129 0x04 68 <GIC_SPI 129 IRQ_TYPE_LEVEL_HIGH>,
64 0 130 0x04 69 <GIC_SPI 130 IRQ_TYPE_LEVEL_HIGH>,
65 0 131 0x04 70 <GIC_SPI 131 IRQ_TYPE_LEVEL_HIGH>,
66 0 132 0x04 71 <GIC_SPI 132 IRQ_TYPE_LEVEL_HIGH>,
67 0 133 0x04 72 <GIC_SPI 133 IRQ_TYPE_LEVEL_HIGH>,
68 0 134 0x04 73 <GIC_SPI 134 IRQ_TYPE_LEVEL_HIGH>,
69 0 135 0x04 74 <GIC_SPI 135 IRQ_TYPE_LEVEL_HIGH>,
70 0 136 0x04 75 <GIC_SPI 136 IRQ_TYPE_LEVEL_HIGH>,
71 0 137 0x04 76 <GIC_SPI 137 IRQ_TYPE_LEVEL_HIGH>,
72 0 138 0x04 77 <GIC_SPI 138 IRQ_TYPE_LEVEL_HIGH>,
73 0 139 0x04 78 <GIC_SPI 139 IRQ_TYPE_LEVEL_HIGH>,
74 0 140 0x04 79 <GIC_SPI 140 IRQ_TYPE_LEVEL_HIGH>,
75 0 141 0x04 80 <GIC_SPI 141 IRQ_TYPE_LEVEL_HIGH>,
76 0 142 0x04 81 <GIC_SPI 142 IRQ_TYPE_LEVEL_HIGH>,
77 0 143 0x04>; 82 <GIC_SPI 143 IRQ_TYPE_LEVEL_HIGH>;
78 clocks = <&tegra_car 34>; 83 clocks = <&tegra_car TEGRA114_CLK_APBDMA>;
79 }; 84 };
80 85
81 ahb: ahb { 86 ahb: ahb {
@@ -86,14 +91,14 @@
86 gpio: gpio { 91 gpio: gpio {
87 compatible = "nvidia,tegra114-gpio", "nvidia,tegra30-gpio"; 92 compatible = "nvidia,tegra114-gpio", "nvidia,tegra30-gpio";
88 reg = <0x6000d000 0x1000>; 93 reg = <0x6000d000 0x1000>;
89 interrupts = <0 32 0x04 94 interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>,
90 0 33 0x04 95 <GIC_SPI 33 IRQ_TYPE_LEVEL_HIGH>,
91 0 34 0x04 96 <GIC_SPI 34 IRQ_TYPE_LEVEL_HIGH>,
92 0 35 0x04 97 <GIC_SPI 35 IRQ_TYPE_LEVEL_HIGH>,
93 0 55 0x04 98 <GIC_SPI 55 IRQ_TYPE_LEVEL_HIGH>,
94 0 87 0x04 99 <GIC_SPI 87 IRQ_TYPE_LEVEL_HIGH>,
95 0 89 0x04 100 <GIC_SPI 89 IRQ_TYPE_LEVEL_HIGH>,
96 0 125 0x04>; 101 <GIC_SPI 125 IRQ_TYPE_LEVEL_HIGH>;
97 #gpio-cells = <2>; 102 #gpio-cells = <2>;
98 gpio-controller; 103 gpio-controller;
99 #interrupt-cells = <2>; 104 #interrupt-cells = <2>;
@@ -118,57 +123,57 @@
118 compatible = "nvidia,tegra114-uart", "nvidia,tegra20-uart"; 123 compatible = "nvidia,tegra114-uart", "nvidia,tegra20-uart";
119 reg = <0x70006000 0x40>; 124 reg = <0x70006000 0x40>;
120 reg-shift = <2>; 125 reg-shift = <2>;
121 interrupts = <0 36 0x04>; 126 interrupts = <GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH>;
122 nvidia,dma-request-selector = <&apbdma 8>; 127 nvidia,dma-request-selector = <&apbdma 8>;
123 status = "disabled"; 128 status = "disabled";
124 clocks = <&tegra_car 6>; 129 clocks = <&tegra_car TEGRA114_CLK_UARTA>;
125 }; 130 };
126 131
127 uartb: serial@70006040 { 132 uartb: serial@70006040 {
128 compatible = "nvidia,tegra114-uart", "nvidia,tegra20-uart"; 133 compatible = "nvidia,tegra114-uart", "nvidia,tegra20-uart";
129 reg = <0x70006040 0x40>; 134 reg = <0x70006040 0x40>;
130 reg-shift = <2>; 135 reg-shift = <2>;
131 interrupts = <0 37 0x04>; 136 interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>;
132 nvidia,dma-request-selector = <&apbdma 9>; 137 nvidia,dma-request-selector = <&apbdma 9>;
133 status = "disabled"; 138 status = "disabled";
134 clocks = <&tegra_car 192>; 139 clocks = <&tegra_car TEGRA114_CLK_UARTB>;
135 }; 140 };
136 141
137 uartc: serial@70006200 { 142 uartc: serial@70006200 {
138 compatible = "nvidia,tegra114-uart", "nvidia,tegra20-uart"; 143 compatible = "nvidia,tegra114-uart", "nvidia,tegra20-uart";
139 reg = <0x70006200 0x100>; 144 reg = <0x70006200 0x100>;
140 reg-shift = <2>; 145 reg-shift = <2>;
141 interrupts = <0 46 0x04>; 146 interrupts = <GIC_SPI 46 IRQ_TYPE_LEVEL_HIGH>;
142 nvidia,dma-request-selector = <&apbdma 10>; 147 nvidia,dma-request-selector = <&apbdma 10>;
143 status = "disabled"; 148 status = "disabled";
144 clocks = <&tegra_car 55>; 149 clocks = <&tegra_car TEGRA114_CLK_UARTC>;
145 }; 150 };
146 151
147 uartd: serial@70006300 { 152 uartd: serial@70006300 {
148 compatible = "nvidia,tegra114-uart", "nvidia,tegra20-uart"; 153 compatible = "nvidia,tegra114-uart", "nvidia,tegra20-uart";
149 reg = <0x70006300 0x100>; 154 reg = <0x70006300 0x100>;
150 reg-shift = <2>; 155 reg-shift = <2>;
151 interrupts = <0 90 0x04>; 156 interrupts = <GIC_SPI 90 IRQ_TYPE_LEVEL_HIGH>;
152 nvidia,dma-request-selector = <&apbdma 19>; 157 nvidia,dma-request-selector = <&apbdma 19>;
153 status = "disabled"; 158 status = "disabled";
154 clocks = <&tegra_car 65>; 159 clocks = <&tegra_car TEGRA114_CLK_UARTD>;
155 }; 160 };
156 161
157 pwm: pwm { 162 pwm: pwm {
158 compatible = "nvidia,tegra114-pwm", "nvidia,tegra20-pwm"; 163 compatible = "nvidia,tegra114-pwm", "nvidia,tegra20-pwm";
159 reg = <0x7000a000 0x100>; 164 reg = <0x7000a000 0x100>;
160 #pwm-cells = <2>; 165 #pwm-cells = <2>;
161 clocks = <&tegra_car 17>; 166 clocks = <&tegra_car TEGRA114_CLK_PWM>;
162 status = "disabled"; 167 status = "disabled";
163 }; 168 };
164 169
165 i2c@7000c000 { 170 i2c@7000c000 {
166 compatible = "nvidia,tegra114-i2c"; 171 compatible = "nvidia,tegra114-i2c";
167 reg = <0x7000c000 0x100>; 172 reg = <0x7000c000 0x100>;
168 interrupts = <0 38 0x04>; 173 interrupts = <GIC_SPI 38 IRQ_TYPE_LEVEL_HIGH>;
169 #address-cells = <1>; 174 #address-cells = <1>;
170 #size-cells = <0>; 175 #size-cells = <0>;
171 clocks = <&tegra_car 12>; 176 clocks = <&tegra_car TEGRA114_CLK_I2C1>;
172 clock-names = "div-clk"; 177 clock-names = "div-clk";
173 status = "disabled"; 178 status = "disabled";
174 }; 179 };
@@ -176,10 +181,10 @@
176 i2c@7000c400 { 181 i2c@7000c400 {
177 compatible = "nvidia,tegra114-i2c"; 182 compatible = "nvidia,tegra114-i2c";
178 reg = <0x7000c400 0x100>; 183 reg = <0x7000c400 0x100>;
179 interrupts = <0 84 0x04>; 184 interrupts = <GIC_SPI 84 IRQ_TYPE_LEVEL_HIGH>;
180 #address-cells = <1>; 185 #address-cells = <1>;
181 #size-cells = <0>; 186 #size-cells = <0>;
182 clocks = <&tegra_car 54>; 187 clocks = <&tegra_car TEGRA114_CLK_I2C2>;
183 clock-names = "div-clk"; 188 clock-names = "div-clk";
184 status = "disabled"; 189 status = "disabled";
185 }; 190 };
@@ -187,10 +192,10 @@
187 i2c@7000c500 { 192 i2c@7000c500 {
188 compatible = "nvidia,tegra114-i2c"; 193 compatible = "nvidia,tegra114-i2c";
189 reg = <0x7000c500 0x100>; 194 reg = <0x7000c500 0x100>;
190 interrupts = <0 92 0x04>; 195 interrupts = <GIC_SPI 92 IRQ_TYPE_LEVEL_HIGH>;
191 #address-cells = <1>; 196 #address-cells = <1>;
192 #size-cells = <0>; 197 #size-cells = <0>;
193 clocks = <&tegra_car 67>; 198 clocks = <&tegra_car TEGRA114_CLK_I2C3>;
194 clock-names = "div-clk"; 199 clock-names = "div-clk";
195 status = "disabled"; 200 status = "disabled";
196 }; 201 };
@@ -198,10 +203,10 @@
198 i2c@7000c700 { 203 i2c@7000c700 {
199 compatible = "nvidia,tegra114-i2c"; 204 compatible = "nvidia,tegra114-i2c";
200 reg = <0x7000c700 0x100>; 205 reg = <0x7000c700 0x100>;
201 interrupts = <0 120 0x04>; 206 interrupts = <GIC_SPI 120 IRQ_TYPE_LEVEL_HIGH>;
202 #address-cells = <1>; 207 #address-cells = <1>;
203 #size-cells = <0>; 208 #size-cells = <0>;
204 clocks = <&tegra_car 103>; 209 clocks = <&tegra_car TEGRA114_CLK_I2C4>;
205 clock-names = "div-clk"; 210 clock-names = "div-clk";
206 status = "disabled"; 211 status = "disabled";
207 }; 212 };
@@ -209,10 +214,10 @@
209 i2c@7000d000 { 214 i2c@7000d000 {
210 compatible = "nvidia,tegra114-i2c"; 215 compatible = "nvidia,tegra114-i2c";
211 reg = <0x7000d000 0x100>; 216 reg = <0x7000d000 0x100>;
212 interrupts = <0 53 0x04>; 217 interrupts = <GIC_SPI 53 IRQ_TYPE_LEVEL_HIGH>;
213 #address-cells = <1>; 218 #address-cells = <1>;
214 #size-cells = <0>; 219 #size-cells = <0>;
215 clocks = <&tegra_car 47>; 220 clocks = <&tegra_car TEGRA114_CLK_I2C5>;
216 clock-names = "div-clk"; 221 clock-names = "div-clk";
217 status = "disabled"; 222 status = "disabled";
218 }; 223 };
@@ -220,11 +225,11 @@
220 spi@7000d400 { 225 spi@7000d400 {
221 compatible = "nvidia,tegra114-spi"; 226 compatible = "nvidia,tegra114-spi";
222 reg = <0x7000d400 0x200>; 227 reg = <0x7000d400 0x200>;
223 interrupts = <0 59 0x04>; 228 interrupts = <GIC_SPI 59 IRQ_TYPE_LEVEL_HIGH>;
224 nvidia,dma-request-selector = <&apbdma 15>; 229 nvidia,dma-request-selector = <&apbdma 15>;
225 #address-cells = <1>; 230 #address-cells = <1>;
226 #size-cells = <0>; 231 #size-cells = <0>;
227 clocks = <&tegra_car 41>; 232 clocks = <&tegra_car TEGRA114_CLK_SBC1>;
228 clock-names = "spi"; 233 clock-names = "spi";
229 status = "disabled"; 234 status = "disabled";
230 }; 235 };
@@ -232,11 +237,11 @@
232 spi@7000d600 { 237 spi@7000d600 {
233 compatible = "nvidia,tegra114-spi"; 238 compatible = "nvidia,tegra114-spi";
234 reg = <0x7000d600 0x200>; 239 reg = <0x7000d600 0x200>;
235 interrupts = <0 82 0x04>; 240 interrupts = <GIC_SPI 82 IRQ_TYPE_LEVEL_HIGH>;
236 nvidia,dma-request-selector = <&apbdma 16>; 241 nvidia,dma-request-selector = <&apbdma 16>;
237 #address-cells = <1>; 242 #address-cells = <1>;
238 #size-cells = <0>; 243 #size-cells = <0>;
239 clocks = <&tegra_car 44>; 244 clocks = <&tegra_car TEGRA114_CLK_SBC2>;
240 clock-names = "spi"; 245 clock-names = "spi";
241 status = "disabled"; 246 status = "disabled";
242 }; 247 };
@@ -244,11 +249,11 @@
244 spi@7000d800 { 249 spi@7000d800 {
245 compatible = "nvidia,tegra114-spi"; 250 compatible = "nvidia,tegra114-spi";
246 reg = <0x7000d800 0x200>; 251 reg = <0x7000d800 0x200>;
247 interrupts = <0 83 0x04>; 252 interrupts = <GIC_SPI 83 IRQ_TYPE_LEVEL_HIGH>;
248 nvidia,dma-request-selector = <&apbdma 17>; 253 nvidia,dma-request-selector = <&apbdma 17>;
249 #address-cells = <1>; 254 #address-cells = <1>;
250 #size-cells = <0>; 255 #size-cells = <0>;
251 clocks = <&tegra_car 46>; 256 clocks = <&tegra_car TEGRA114_CLK_SBC3>;
252 clock-names = "spi"; 257 clock-names = "spi";
253 status = "disabled"; 258 status = "disabled";
254 }; 259 };
@@ -256,11 +261,11 @@
256 spi@7000da00 { 261 spi@7000da00 {
257 compatible = "nvidia,tegra114-spi"; 262 compatible = "nvidia,tegra114-spi";
258 reg = <0x7000da00 0x200>; 263 reg = <0x7000da00 0x200>;
259 interrupts = <0 93 0x04>; 264 interrupts = <GIC_SPI 93 IRQ_TYPE_LEVEL_HIGH>;
260 nvidia,dma-request-selector = <&apbdma 18>; 265 nvidia,dma-request-selector = <&apbdma 18>;
261 #address-cells = <1>; 266 #address-cells = <1>;
262 #size-cells = <0>; 267 #size-cells = <0>;
263 clocks = <&tegra_car 68>; 268 clocks = <&tegra_car TEGRA114_CLK_SBC4>;
264 clock-names = "spi"; 269 clock-names = "spi";
265 status = "disabled"; 270 status = "disabled";
266 }; 271 };
@@ -268,11 +273,11 @@
268 spi@7000dc00 { 273 spi@7000dc00 {
269 compatible = "nvidia,tegra114-spi"; 274 compatible = "nvidia,tegra114-spi";
270 reg = <0x7000dc00 0x200>; 275 reg = <0x7000dc00 0x200>;
271 interrupts = <0 94 0x04>; 276 interrupts = <GIC_SPI 94 IRQ_TYPE_LEVEL_HIGH>;
272 nvidia,dma-request-selector = <&apbdma 27>; 277 nvidia,dma-request-selector = <&apbdma 27>;
273 #address-cells = <1>; 278 #address-cells = <1>;
274 #size-cells = <0>; 279 #size-cells = <0>;
275 clocks = <&tegra_car 104>; 280 clocks = <&tegra_car TEGRA114_CLK_SBC5>;
276 clock-names = "spi"; 281 clock-names = "spi";
277 status = "disabled"; 282 status = "disabled";
278 }; 283 };
@@ -280,11 +285,11 @@
280 spi@7000de00 { 285 spi@7000de00 {
281 compatible = "nvidia,tegra114-spi"; 286 compatible = "nvidia,tegra114-spi";
282 reg = <0x7000de00 0x200>; 287 reg = <0x7000de00 0x200>;
283 interrupts = <0 79 0x04>; 288 interrupts = <GIC_SPI 79 IRQ_TYPE_LEVEL_HIGH>;
284 nvidia,dma-request-selector = <&apbdma 28>; 289 nvidia,dma-request-selector = <&apbdma 28>;
285 #address-cells = <1>; 290 #address-cells = <1>;
286 #size-cells = <0>; 291 #size-cells = <0>;
287 clocks = <&tegra_car 105>; 292 clocks = <&tegra_car TEGRA114_CLK_SBC6>;
288 clock-names = "spi"; 293 clock-names = "spi";
289 status = "disabled"; 294 status = "disabled";
290 }; 295 };
@@ -292,22 +297,22 @@
292 rtc { 297 rtc {
293 compatible = "nvidia,tegra114-rtc", "nvidia,tegra20-rtc"; 298 compatible = "nvidia,tegra114-rtc", "nvidia,tegra20-rtc";
294 reg = <0x7000e000 0x100>; 299 reg = <0x7000e000 0x100>;
295 interrupts = <0 2 0x04>; 300 interrupts = <GIC_SPI 2 IRQ_TYPE_LEVEL_HIGH>;
296 clocks = <&tegra_car 4>; 301 clocks = <&tegra_car TEGRA114_CLK_RTC>;
297 }; 302 };
298 303
299 kbc { 304 kbc {
300 compatible = "nvidia,tegra114-kbc"; 305 compatible = "nvidia,tegra114-kbc";
301 reg = <0x7000e200 0x100>; 306 reg = <0x7000e200 0x100>;
302 interrupts = <0 85 0x04>; 307 interrupts = <GIC_SPI 85 IRQ_TYPE_LEVEL_HIGH>;
303 clocks = <&tegra_car 36>; 308 clocks = <&tegra_car TEGRA114_CLK_KBC>;
304 status = "disabled"; 309 status = "disabled";
305 }; 310 };
306 311
307 pmc { 312 pmc {
308 compatible = "nvidia,tegra114-pmc"; 313 compatible = "nvidia,tegra114-pmc";
309 reg = <0x7000e400 0x400>; 314 reg = <0x7000e400 0x400>;
310 clocks = <&tegra_car 261>, <&clk32k_in>; 315 clocks = <&tegra_car TEGRA114_CLK_PCLK>, <&clk32k_in>;
311 clock-names = "pclk", "clk32k_in"; 316 clock-names = "pclk", "clk32k_in";
312 }; 317 };
313 318
@@ -322,35 +327,106 @@
322 nvidia,ahb = <&ahb>; 327 nvidia,ahb = <&ahb>;
323 }; 328 };
324 329
330 ahub {
331 compatible = "nvidia,tegra114-ahub";
332 reg = <0x70080000 0x200>,
333 <0x70080200 0x100>,
334 <0x70081000 0x200>;
335 interrupts = <GIC_SPI 103 IRQ_TYPE_LEVEL_HIGH>;
336 nvidia,dma-request-selector = <&apbdma 1>, <&apbdma 2>,
337 <&apbdma 3>, <&apbdma 4>, <&apbdma 6>, <&apbdma 7>,
338 <&apbdma 12>, <&apbdma 13>, <&apbdma 14>,
339 <&apbdma 29>;
340 clocks = <&tegra_car TEGRA114_CLK_D_AUDIO>,
341 <&tegra_car TEGRA114_CLK_APBIF>,
342 <&tegra_car TEGRA114_CLK_I2S0>,
343 <&tegra_car TEGRA114_CLK_I2S1>,
344 <&tegra_car TEGRA114_CLK_I2S2>,
345 <&tegra_car TEGRA114_CLK_I2S3>,
346 <&tegra_car TEGRA114_CLK_I2S4>,
347 <&tegra_car TEGRA114_CLK_DAM0>,
348 <&tegra_car TEGRA114_CLK_DAM1>,
349 <&tegra_car TEGRA114_CLK_DAM2>,
350 <&tegra_car TEGRA114_CLK_SPDIF_IN>,
351 <&tegra_car TEGRA114_CLK_AMX>,
352 <&tegra_car TEGRA114_CLK_ADX>;
353 clock-names = "d_audio", "apbif", "i2s0", "i2s1", "i2s2",
354 "i2s3", "i2s4", "dam0", "dam1", "dam2",
355 "spdif_in", "amx", "adx";
356 ranges;
357 #address-cells = <1>;
358 #size-cells = <1>;
359
360 tegra_i2s0: i2s@70080300 {
361 compatible = "nvidia,tegra114-i2s", "nvidia,tegra30-i2s";
362 reg = <0x70080300 0x100>;
363 nvidia,ahub-cif-ids = <4 4>;
364 clocks = <&tegra_car TEGRA114_CLK_I2S0>;
365 status = "disabled";
366 };
367
368 tegra_i2s1: i2s@70080400 {
369 compatible = "nvidia,tegra114-i2s", "nvidia,tegra30-i2s";
370 reg = <0x70080400 0x100>;
371 nvidia,ahub-cif-ids = <5 5>;
372 clocks = <&tegra_car TEGRA114_CLK_I2S1>;
373 status = "disabled";
374 };
375
376 tegra_i2s2: i2s@70080500 {
377 compatible = "nvidia,tegra114-i2s", "nvidia,tegra30-i2s";
378 reg = <0x70080500 0x100>;
379 nvidia,ahub-cif-ids = <6 6>;
380 clocks = <&tegra_car TEGRA114_CLK_I2S2>;
381 status = "disabled";
382 };
383
384 tegra_i2s3: i2s@70080600 {
385 compatible = "nvidia,tegra114-i2s", "nvidia,tegra30-i2s";
386 reg = <0x70080600 0x100>;
387 nvidia,ahub-cif-ids = <7 7>;
388 clocks = <&tegra_car TEGRA114_CLK_I2S3>;
389 status = "disabled";
390 };
391
392 tegra_i2s4: i2s@70080700 {
393 compatible = "nvidia,tegra114-i2s", "nvidia,tegra30-i2s";
394 reg = <0x70080700 0x100>;
395 nvidia,ahub-cif-ids = <8 8>;
396 clocks = <&tegra_car TEGRA114_CLK_I2S4>;
397 status = "disabled";
398 };
399 };
400
325 sdhci@78000000 { 401 sdhci@78000000 {
326 compatible = "nvidia,tegra114-sdhci", "nvidia,tegra30-sdhci"; 402 compatible = "nvidia,tegra114-sdhci", "nvidia,tegra30-sdhci";
327 reg = <0x78000000 0x200>; 403 reg = <0x78000000 0x200>;
328 interrupts = <0 14 0x04>; 404 interrupts = <GIC_SPI 14 IRQ_TYPE_LEVEL_HIGH>;
329 clocks = <&tegra_car 14>; 405 clocks = <&tegra_car TEGRA114_CLK_SDMMC1>;
330 status = "disable"; 406 status = "disable";
331 }; 407 };
332 408
333 sdhci@78000200 { 409 sdhci@78000200 {
334 compatible = "nvidia,tegra114-sdhci", "nvidia,tegra30-sdhci"; 410 compatible = "nvidia,tegra114-sdhci", "nvidia,tegra30-sdhci";
335 reg = <0x78000200 0x200>; 411 reg = <0x78000200 0x200>;
336 interrupts = <0 15 0x04>; 412 interrupts = <GIC_SPI 15 IRQ_TYPE_LEVEL_HIGH>;
337 clocks = <&tegra_car 9>; 413 clocks = <&tegra_car TEGRA114_CLK_SDMMC2>;
338 status = "disable"; 414 status = "disable";
339 }; 415 };
340 416
341 sdhci@78000400 { 417 sdhci@78000400 {
342 compatible = "nvidia,tegra114-sdhci", "nvidia,tegra30-sdhci"; 418 compatible = "nvidia,tegra114-sdhci", "nvidia,tegra30-sdhci";
343 reg = <0x78000400 0x200>; 419 reg = <0x78000400 0x200>;
344 interrupts = <0 19 0x04>; 420 interrupts = <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>;
345 clocks = <&tegra_car 69>; 421 clocks = <&tegra_car TEGRA114_CLK_SDMMC3>;
346 status = "disable"; 422 status = "disable";
347 }; 423 };
348 424
349 sdhci@78000600 { 425 sdhci@78000600 {
350 compatible = "nvidia,tegra114-sdhci", "nvidia,tegra30-sdhci"; 426 compatible = "nvidia,tegra114-sdhci", "nvidia,tegra30-sdhci";
351 reg = <0x78000600 0x200>; 427 reg = <0x78000600 0x200>;
352 interrupts = <0 31 0x04>; 428 interrupts = <GIC_SPI 31 IRQ_TYPE_LEVEL_HIGH>;
353 clocks = <&tegra_car 15>; 429 clocks = <&tegra_car TEGRA114_CLK_SDMMC4>;
354 status = "disable"; 430 status = "disable";
355 }; 431 };
356 432
@@ -385,9 +461,14 @@
385 461
386 timer { 462 timer {
387 compatible = "arm,armv7-timer"; 463 compatible = "arm,armv7-timer";
388 interrupts = <1 13 0xf08>, 464 interrupts =
389 <1 14 0xf08>, 465 <GIC_PPI 13
390 <1 11 0xf08>, 466 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,
391 <1 10 0xf08>; 467 <GIC_PPI 14
468 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,
469 <GIC_PPI 11
470 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,
471 <GIC_PPI 10
472 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>;
392 }; 473 };
393}; 474};
diff --git a/arch/arm/boot/dts/tegra20-colibri-512.dtsi b/arch/arm/boot/dts/tegra20-colibri-512.dtsi
index a573b94b7c93..5592be6f2f7a 100644
--- a/arch/arm/boot/dts/tegra20-colibri-512.dtsi
+++ b/arch/arm/boot/dts/tegra20-colibri-512.dtsi
@@ -1,4 +1,4 @@
1/include/ "tegra20.dtsi" 1#include "tegra20.dtsi"
2 2
3/ { 3/ {
4 model = "Toradex Colibri T20 512MB"; 4 model = "Toradex Colibri T20 512MB";
@@ -14,7 +14,8 @@
14 pll-supply = <&hdmi_pll_reg>; 14 pll-supply = <&hdmi_pll_reg>;
15 15
16 nvidia,ddc-i2c-bus = <&i2c_ddc>; 16 nvidia,ddc-i2c-bus = <&i2c_ddc>;
17 nvidia,hpd-gpio = <&gpio 111 0>; /* PN7 */ 17 nvidia,hpd-gpio = <&gpio TEGRA_GPIO(N, 7)
18 GPIO_ACTIVE_HIGH>;
18 }; 19 };
19 }; 20 };
20 21
@@ -217,7 +218,7 @@
217 pmic: tps6586x@34 { 218 pmic: tps6586x@34 {
218 compatible = "ti,tps6586x"; 219 compatible = "ti,tps6586x";
219 reg = <0x34>; 220 reg = <0x34>;
220 interrupts = <0 86 0x4>; 221 interrupts = <GIC_SPI 86 IRQ_TYPE_LEVEL_HIGH>;
221 222
222 ti,system-power-controller; 223 ti,system-power-controller;
223 224
@@ -443,17 +444,26 @@
443 444
444 ac97: ac97 { 445 ac97: ac97 {
445 status = "okay"; 446 status = "okay";
446 nvidia,codec-reset-gpio = <&gpio 168 0>; /* gpio PV0 */ 447 nvidia,codec-reset-gpio = <&gpio TEGRA_GPIO(V, 0)
447 nvidia,codec-sync-gpio = <&gpio 120 0>; /* gpio PP0 */ 448 GPIO_ACTIVE_HIGH>;
449 nvidia,codec-sync-gpio = <&gpio TEGRA_GPIO(P, 0)
450 GPIO_ACTIVE_HIGH>;
448 }; 451 };
449 452
450 usb@c5004000 { 453 usb@c5004000 {
451 status = "okay"; 454 status = "okay";
452 nvidia,phy-reset-gpio = <&gpio 169 0>; /* gpio PV1 */ 455 nvidia,phy-reset-gpio = <&gpio TEGRA_GPIO(V, 1)
456 GPIO_ACTIVE_LOW>;
457 };
458
459 usb-phy@c5004000 {
460 status = "okay";
461 nvidia,phy-reset-gpio = <&gpio TEGRA_GPIO(V, 1)
462 GPIO_ACTIVE_LOW>;
453 }; 463 };
454 464
455 sdhci@c8000600 { 465 sdhci@c8000600 {
456 cd-gpios = <&gpio 23 1>; /* gpio PC7 */ 466 cd-gpios = <&gpio TEGRA_GPIO(C, 7) GPIO_ACTIVE_LOW>;
457 }; 467 };
458 468
459 clocks { 469 clocks {
@@ -483,7 +493,9 @@
483 493
484 nvidia,ac97-controller = <&ac97>; 494 nvidia,ac97-controller = <&ac97>;
485 495
486 clocks = <&tegra_car 112>, <&tegra_car 113>, <&tegra_car 94>; 496 clocks = <&tegra_car TEGRA20_CLK_PLL_A>,
497 <&tegra_car TEGRA20_CLK_PLL_A_OUT0>,
498 <&tegra_car TEGRA20_CLK_CDEV1>;
487 clock-names = "pll_a", "pll_a_out0", "mclk"; 499 clock-names = "pll_a", "pll_a_out0", "mclk";
488 }; 500 };
489 501
@@ -510,7 +522,7 @@
510 enable-active-high; 522 enable-active-high;
511 regulator-boot-on; 523 regulator-boot-on;
512 regulator-always-on; 524 regulator-always-on;
513 gpio = <&gpio 217 0>; 525 gpio = <&gpio TEGRA_GPIO(BB, 1) GPIO_ACTIVE_HIGH>;
514 }; 526 };
515 }; 527 };
516}; 528};
diff --git a/arch/arm/boot/dts/tegra20-harmony.dts b/arch/arm/boot/dts/tegra20-harmony.dts
index e7d5de4e00b9..d9f89cd879a7 100644
--- a/arch/arm/boot/dts/tegra20-harmony.dts
+++ b/arch/arm/boot/dts/tegra20-harmony.dts
@@ -1,6 +1,6 @@
1/dts-v1/; 1/dts-v1/;
2 2
3/include/ "tegra20.dtsi" 3#include "tegra20.dtsi"
4 4
5/ { 5/ {
6 model = "NVIDIA Tegra20 Harmony evaluation board"; 6 model = "NVIDIA Tegra20 Harmony evaluation board";
@@ -18,7 +18,8 @@
18 pll-supply = <&hdmi_pll_reg>; 18 pll-supply = <&hdmi_pll_reg>;
19 19
20 nvidia,ddc-i2c-bus = <&hdmi_ddc>; 20 nvidia,ddc-i2c-bus = <&hdmi_ddc>;
21 nvidia,hpd-gpio = <&gpio 111 0>; /* PN7 */ 21 nvidia,hpd-gpio = <&gpio TEGRA_GPIO(N, 7)
22 GPIO_ACTIVE_HIGH>;
22 }; 23 };
23 }; 24 };
24 25
@@ -262,7 +263,7 @@
262 compatible = "wlf,wm8903"; 263 compatible = "wlf,wm8903";
263 reg = <0x1a>; 264 reg = <0x1a>;
264 interrupt-parent = <&gpio>; 265 interrupt-parent = <&gpio>;
265 interrupts = <187 0x04>; 266 interrupts = <TEGRA_GPIO(X, 3) IRQ_TYPE_LEVEL_HIGH>;
266 267
267 gpio-controller; 268 gpio-controller;
268 #gpio-cells = <2>; 269 #gpio-cells = <2>;
@@ -290,7 +291,7 @@
290 pmic: tps6586x@34 { 291 pmic: tps6586x@34 {
291 compatible = "ti,tps6586x"; 292 compatible = "ti,tps6586x";
292 reg = <0x34>; 293 reg = <0x34>;
293 interrupts = <0 86 0x4>; 294 interrupts = <GIC_SPI 86 IRQ_TYPE_LEVEL_HIGH>;
294 295
295 ti,system-power-controller; 296 ti,system-power-controller;
296 297
@@ -428,32 +429,43 @@
428 status = "okay"; 429 status = "okay";
429 }; 430 };
430 431
432 usb-phy@c5000000 {
433 status = "okay";
434 };
435
431 usb@c5004000 { 436 usb@c5004000 {
432 status = "okay"; 437 status = "okay";
433 nvidia,phy-reset-gpio = <&gpio 169 0>; /* gpio PV1 */ 438 nvidia,phy-reset-gpio = <&gpio TEGRA_GPIO(V, 1)
439 GPIO_ACTIVE_LOW>;
440 };
441
442 usb-phy@c5004000 {
443 status = "okay";
444 nvidia,phy-reset-gpio = <&gpio TEGRA_GPIO(V, 1)
445 GPIO_ACTIVE_LOW>;
434 }; 446 };
435 447
436 usb@c5008000 { 448 usb@c5008000 {
437 status = "okay"; 449 status = "okay";
438 }; 450 };
439 451
440 usb-phy@c5004400 { 452 usb-phy@c5008000 {
441 nvidia,phy-reset-gpio = <&gpio 169 0>; /* gpio PV1 */ 453 status = "okay";
442 }; 454 };
443 455
444 sdhci@c8000200 { 456 sdhci@c8000200 {
445 status = "okay"; 457 status = "okay";
446 cd-gpios = <&gpio 69 1>; /* gpio PI5 */ 458 cd-gpios = <&gpio TEGRA_GPIO(I, 5) GPIO_ACTIVE_LOW>;
447 wp-gpios = <&gpio 57 0>; /* gpio PH1 */ 459 wp-gpios = <&gpio TEGRA_GPIO(H, 1) GPIO_ACTIVE_HIGH>;
448 power-gpios = <&gpio 155 0>; /* gpio PT3 */ 460 power-gpios = <&gpio TEGRA_GPIO(T, 3) GPIO_ACTIVE_HIGH>;
449 bus-width = <4>; 461 bus-width = <4>;
450 }; 462 };
451 463
452 sdhci@c8000600 { 464 sdhci@c8000600 {
453 status = "okay"; 465 status = "okay";
454 cd-gpios = <&gpio 58 1>; /* gpio PH2 */ 466 cd-gpios = <&gpio TEGRA_GPIO(H, 2) GPIO_ACTIVE_LOW>;
455 wp-gpios = <&gpio 59 0>; /* gpio PH3 */ 467 wp-gpios = <&gpio TEGRA_GPIO(H, 3) GPIO_ACTIVE_HIGH>;
456 power-gpios = <&gpio 70 0>; /* gpio PI6 */ 468 power-gpios = <&gpio TEGRA_GPIO(I, 6) GPIO_ACTIVE_HIGH>;
457 bus-width = <8>; 469 bus-width = <8>;
458 }; 470 };
459 471
@@ -475,7 +487,7 @@
475 487
476 power { 488 power {
477 label = "Power"; 489 label = "Power";
478 gpios = <&gpio 170 1>; /* gpio PV2, active low */ 490 gpios = <&gpio TEGRA_GPIO(V, 2) GPIO_ACTIVE_LOW>;
479 linux,code = <116>; /* KEY_POWER */ 491 linux,code = <116>; /* KEY_POWER */
480 gpio-key,wakeup; 492 gpio-key,wakeup;
481 }; 493 };
@@ -618,7 +630,7 @@
618 regulator-name = "vdd_1v5"; 630 regulator-name = "vdd_1v5";
619 regulator-min-microvolt = <1500000>; 631 regulator-min-microvolt = <1500000>;
620 regulator-max-microvolt = <1500000>; 632 regulator-max-microvolt = <1500000>;
621 gpio = <&pmic 0 0>; 633 gpio = <&pmic 0 GPIO_ACTIVE_HIGH>;
622 }; 634 };
623 635
624 regulator@2 { 636 regulator@2 {
@@ -627,7 +639,7 @@
627 regulator-name = "vdd_1v2"; 639 regulator-name = "vdd_1v2";
628 regulator-min-microvolt = <1200000>; 640 regulator-min-microvolt = <1200000>;
629 regulator-max-microvolt = <1200000>; 641 regulator-max-microvolt = <1200000>;
630 gpio = <&pmic 1 0>; 642 gpio = <&pmic 1 GPIO_ACTIVE_HIGH>;
631 enable-active-high; 643 enable-active-high;
632 }; 644 };
633 645
@@ -637,7 +649,7 @@
637 regulator-name = "vdd_1v05"; 649 regulator-name = "vdd_1v05";
638 regulator-min-microvolt = <1050000>; 650 regulator-min-microvolt = <1050000>;
639 regulator-max-microvolt = <1050000>; 651 regulator-max-microvolt = <1050000>;
640 gpio = <&pmic 2 0>; 652 gpio = <&pmic 2 GPIO_ACTIVE_HIGH>;
641 enable-active-high; 653 enable-active-high;
642 /* Hack until board-harmony-pcie.c is removed */ 654 /* Hack until board-harmony-pcie.c is removed */
643 status = "disabled"; 655 status = "disabled";
@@ -649,7 +661,7 @@
649 regulator-name = "vdd_pnl"; 661 regulator-name = "vdd_pnl";
650 regulator-min-microvolt = <2800000>; 662 regulator-min-microvolt = <2800000>;
651 regulator-max-microvolt = <2800000>; 663 regulator-max-microvolt = <2800000>;
652 gpio = <&gpio 22 0>; /* gpio PC6 */ 664 gpio = <&gpio TEGRA_GPIO(C, 6) GPIO_ACTIVE_HIGH>;
653 enable-active-high; 665 enable-active-high;
654 }; 666 };
655 667
@@ -659,7 +671,7 @@
659 regulator-name = "vdd_bl"; 671 regulator-name = "vdd_bl";
660 regulator-min-microvolt = <2800000>; 672 regulator-min-microvolt = <2800000>;
661 regulator-max-microvolt = <2800000>; 673 regulator-max-microvolt = <2800000>;
662 gpio = <&gpio 176 0>; /* gpio PW0 */ 674 gpio = <&gpio TEGRA_GPIO(W, 0) GPIO_ACTIVE_HIGH>;
663 enable-active-high; 675 enable-active-high;
664 }; 676 };
665 }; 677 };
@@ -682,12 +694,17 @@
682 nvidia,i2s-controller = <&tegra_i2s1>; 694 nvidia,i2s-controller = <&tegra_i2s1>;
683 nvidia,audio-codec = <&wm8903>; 695 nvidia,audio-codec = <&wm8903>;
684 696
685 nvidia,spkr-en-gpios = <&wm8903 2 0>; 697 nvidia,spkr-en-gpios = <&wm8903 2 GPIO_ACTIVE_HIGH>;
686 nvidia,hp-det-gpios = <&gpio 178 0>; /* gpio PW2 */ 698 nvidia,hp-det-gpios = <&gpio TEGRA_GPIO(W, 2)
687 nvidia,int-mic-en-gpios = <&gpio 184 0>; /*gpio PX0 */ 699 GPIO_ACTIVE_HIGH>;
688 nvidia,ext-mic-en-gpios = <&gpio 185 0>; /* gpio PX1 */ 700 nvidia,int-mic-en-gpios = <&gpio TEGRA_GPIO(X, 0)
689 701 GPIO_ACTIVE_HIGH>;
690 clocks = <&tegra_car 112>, <&tegra_car 113>, <&tegra_car 94>; 702 nvidia,ext-mic-en-gpios = <&gpio TEGRA_GPIO(X, 1)
703 GPIO_ACTIVE_HIGH>;
704
705 clocks = <&tegra_car TEGRA20_CLK_PLL_A>,
706 <&tegra_car TEGRA20_CLK_PLL_A_OUT0>,
707 <&tegra_car TEGRA20_CLK_CDEV1>;
691 clock-names = "pll_a", "pll_a_out0", "mclk"; 708 clock-names = "pll_a", "pll_a_out0", "mclk";
692 }; 709 };
693}; 710};
diff --git a/arch/arm/boot/dts/tegra20-iris-512.dts b/arch/arm/boot/dts/tegra20-iris-512.dts
index 52f1103907d7..f2222bd74eab 100644
--- a/arch/arm/boot/dts/tegra20-iris-512.dts
+++ b/arch/arm/boot/dts/tegra20-iris-512.dts
@@ -1,6 +1,6 @@
1/dts-v1/; 1/dts-v1/;
2 2
3/include/ "tegra20-colibri-512.dtsi" 3#include "tegra20-colibri-512.dtsi"
4 4
5/ { 5/ {
6 model = "Toradex Colibri T20 512MB on Iris"; 6 model = "Toradex Colibri T20 512MB on Iris";
@@ -38,13 +38,20 @@
38 38
39 usb@c5000000 { 39 usb@c5000000 {
40 status = "okay"; 40 status = "okay";
41 dr_mode = "otg"; 41 };
42
43 usb-phy@c5000000 {
44 status = "okay";
42 }; 45 };
43 46
44 usb@c5008000 { 47 usb@c5008000 {
45 status = "okay"; 48 status = "okay";
46 }; 49 };
47 50
51 usb-phy@c5008000 {
52 status = "okay";
53 };
54
48 serial@70006000 { 55 serial@70006000 {
49 status = "okay"; 56 status = "okay";
50 }; 57 };
@@ -73,7 +80,7 @@
73 regulator-max-microvolt = <5000000>; 80 regulator-max-microvolt = <5000000>;
74 regulator-boot-on; 81 regulator-boot-on;
75 regulator-always-on; 82 regulator-always-on;
76 gpio = <&gpio 178 0>; 83 gpio = <&gpio TEGRA_GPIO(W, 2) GPIO_ACTIVE_HIGH>;
77 }; 84 };
78 85
79 vcc_sd_reg: regulator@1 { 86 vcc_sd_reg: regulator@1 {
diff --git a/arch/arm/boot/dts/tegra20-medcom-wide.dts b/arch/arm/boot/dts/tegra20-medcom-wide.dts
index ace23437da89..7580578903cf 100644
--- a/arch/arm/boot/dts/tegra20-medcom-wide.dts
+++ b/arch/arm/boot/dts/tegra20-medcom-wide.dts
@@ -1,6 +1,6 @@
1/dts-v1/; 1/dts-v1/;
2 2
3/include/ "tegra20-tamonten.dtsi" 3#include "tegra20-tamonten.dtsi"
4 4
5/ { 5/ {
6 model = "Avionic Design Medcom-Wide board"; 6 model = "Avionic Design Medcom-Wide board";
@@ -15,7 +15,7 @@
15 compatible = "wlf,wm8903"; 15 compatible = "wlf,wm8903";
16 reg = <0x1a>; 16 reg = <0x1a>;
17 interrupt-parent = <&gpio>; 17 interrupt-parent = <&gpio>;
18 interrupts = <187 0x04>; 18 interrupts = <TEGRA_GPIO(X, 3) IRQ_TYPE_LEVEL_HIGH>;
19 19
20 gpio-controller; 20 gpio-controller;
21 #gpio-cells = <2>; 21 #gpio-cells = <2>;
@@ -56,10 +56,12 @@
56 nvidia,i2s-controller = <&tegra_i2s1>; 56 nvidia,i2s-controller = <&tegra_i2s1>;
57 nvidia,audio-codec = <&wm8903>; 57 nvidia,audio-codec = <&wm8903>;
58 58
59 nvidia,spkr-en-gpios = <&wm8903 2 0>; 59 nvidia,spkr-en-gpios = <&wm8903 2 GPIO_ACTIVE_HIGH>;
60 nvidia,hp-det-gpios = <&gpio 178 0>; /* gpio PW2 */ 60 nvidia,hp-det-gpios = <&gpio TEGRA_GPIO(W, 2) GPIO_ACTIVE_HIGH>;
61 61
62 clocks = <&tegra_car 112>, <&tegra_car 113>, <&tegra_car 94>; 62 clocks = <&tegra_car TEGRA20_CLK_PLL_A>,
63 <&tegra_car TEGRA20_CLK_PLL_A_OUT0>,
64 <&tegra_car TEGRA20_CLK_CDEV1>;
63 clock-names = "pll_a", "pll_a_out0", "mclk"; 65 clock-names = "pll_a", "pll_a_out0", "mclk";
64 }; 66 };
65}; 67};
diff --git a/arch/arm/boot/dts/tegra20-paz00.dts b/arch/arm/boot/dts/tegra20-paz00.dts
index e3e0c9977df4..cfd12763b1b2 100644
--- a/arch/arm/boot/dts/tegra20-paz00.dts
+++ b/arch/arm/boot/dts/tegra20-paz00.dts
@@ -1,6 +1,6 @@
1/dts-v1/; 1/dts-v1/;
2 2
3/include/ "tegra20.dtsi" 3#include "tegra20.dtsi"
4 4
5/ { 5/ {
6 model = "Toshiba AC100 / Dynabook AZ"; 6 model = "Toshiba AC100 / Dynabook AZ";
@@ -18,7 +18,8 @@
18 pll-supply = <&hdmi_pll_reg>; 18 pll-supply = <&hdmi_pll_reg>;
19 19
20 nvidia,ddc-i2c-bus = <&hdmi_ddc>; 20 nvidia,ddc-i2c-bus = <&hdmi_ddc>;
21 nvidia,hpd-gpio = <&gpio 111 0>; /* PN7 */ 21 nvidia,hpd-gpio = <&gpio TEGRA_GPIO(N, 7)
22 GPIO_ACTIVE_HIGH>;
22 }; 23 };
23 }; 24 };
24 25
@@ -270,13 +271,14 @@
270 nvec { 271 nvec {
271 compatible = "nvidia,nvec"; 272 compatible = "nvidia,nvec";
272 reg = <0x7000c500 0x100>; 273 reg = <0x7000c500 0x100>;
273 interrupts = <0 92 0x04>; 274 interrupts = <GIC_SPI 92 IRQ_TYPE_LEVEL_HIGH>;
274 #address-cells = <1>; 275 #address-cells = <1>;
275 #size-cells = <0>; 276 #size-cells = <0>;
276 clock-frequency = <80000>; 277 clock-frequency = <80000>;
277 request-gpios = <&gpio 170 0>; /* gpio PV2 */ 278 request-gpios = <&gpio TEGRA_GPIO(V, 2) GPIO_ACTIVE_HIGH>;
278 slave-addr = <138>; 279 slave-addr = <138>;
279 clocks = <&tegra_car 67>, <&tegra_car 124>; 280 clocks = <&tegra_car TEGRA20_CLK_I2C3>,
281 <&tegra_car TEGRA20_CLK_PLL_P_OUT3>;
280 clock-names = "div-clk", "fast-clk"; 282 clock-names = "div-clk", "fast-clk";
281 }; 283 };
282 284
@@ -287,7 +289,7 @@
287 pmic: tps6586x@34 { 289 pmic: tps6586x@34 {
288 compatible = "ti,tps6586x"; 290 compatible = "ti,tps6586x";
289 reg = <0x34>; 291 reg = <0x34>;
290 interrupts = <0 86 0x4>; 292 interrupts = <GIC_SPI 86 IRQ_TYPE_LEVEL_HIGH>;
291 293
292 #gpio-cells = <2>; 294 #gpio-cells = <2>;
293 gpio-controller; 295 gpio-controller;
@@ -427,24 +429,35 @@
427 status = "okay"; 429 status = "okay";
428 }; 430 };
429 431
432 usb-phy@c5000000 {
433 status = "okay";
434 };
435
430 usb@c5004000 { 436 usb@c5004000 {
431 status = "okay"; 437 status = "okay";
432 nvidia,phy-reset-gpio = <&gpio 168 0>; /* gpio PV0 */ 438 nvidia,phy-reset-gpio = <&gpio TEGRA_GPIO(V, 0)
439 GPIO_ACTIVE_LOW>;
440 };
441
442 usb-phy@c5004000 {
443 status = "okay";
444 nvidia,phy-reset-gpio = <&gpio TEGRA_GPIO(V, 0)
445 GPIO_ACTIVE_LOW>;
433 }; 446 };
434 447
435 usb@c5008000 { 448 usb@c5008000 {
436 status = "okay"; 449 status = "okay";
437 }; 450 };
438 451
439 usb-phy@c5004400 { 452 usb-phy@c5008000 {
440 nvidia,phy-reset-gpio = <&gpio 168 0>; /* gpio PV0 */ 453 status = "okay";
441 }; 454 };
442 455
443 sdhci@c8000000 { 456 sdhci@c8000000 {
444 status = "okay"; 457 status = "okay";
445 cd-gpios = <&gpio 173 1>; /* gpio PV5 */ 458 cd-gpios = <&gpio TEGRA_GPIO(V, 5) GPIO_ACTIVE_LOW>;
446 wp-gpios = <&gpio 57 0>; /* gpio PH1 */ 459 wp-gpios = <&gpio TEGRA_GPIO(H, 1) GPIO_ACTIVE_HIGH>;
447 power-gpios = <&gpio 169 0>; /* gpio PV1 */ 460 power-gpios = <&gpio TEGRA_GPIO(V, 1) GPIO_ACTIVE_HIGH>;
448 bus-width = <4>; 461 bus-width = <4>;
449 }; 462 };
450 463
@@ -472,7 +485,7 @@
472 485
473 power { 486 power {
474 label = "Power"; 487 label = "Power";
475 gpios = <&gpio 79 1>; /* gpio PJ7, active low */ 488 gpios = <&gpio TEGRA_GPIO(J, 7) GPIO_ACTIVE_LOW>;
476 linux,code = <116>; /* KEY_POWER */ 489 linux,code = <116>; /* KEY_POWER */
477 gpio-key,wakeup; 490 gpio-key,wakeup;
478 }; 491 };
@@ -483,7 +496,7 @@
483 496
484 wifi { 497 wifi {
485 label = "wifi-led"; 498 label = "wifi-led";
486 gpios = <&gpio 24 0>; /* gpio PD0 */ 499 gpios = <&gpio TEGRA_GPIO(D, 0) GPIO_ACTIVE_HIGH>;
487 linux,default-trigger = "rfkill0"; 500 linux,default-trigger = "rfkill0";
488 }; 501 };
489 }; 502 };
@@ -520,9 +533,12 @@
520 533
521 nvidia,audio-codec = <&alc5632>; 534 nvidia,audio-codec = <&alc5632>;
522 nvidia,i2s-controller = <&tegra_i2s1>; 535 nvidia,i2s-controller = <&tegra_i2s1>;
523 nvidia,hp-det-gpios = <&gpio 178 0>; /* gpio PW2 */ 536 nvidia,hp-det-gpios = <&gpio TEGRA_GPIO(W, 2)
537 GPIO_ACTIVE_HIGH>;
524 538
525 clocks = <&tegra_car 112>, <&tegra_car 113>, <&tegra_car 94>; 539 clocks = <&tegra_car TEGRA20_CLK_PLL_A>,
540 <&tegra_car TEGRA20_CLK_PLL_A_OUT0>,
541 <&tegra_car TEGRA20_CLK_CDEV1>;
526 clock-names = "pll_a", "pll_a_out0", "mclk"; 542 clock-names = "pll_a", "pll_a_out0", "mclk";
527 }; 543 };
528}; 544};
diff --git a/arch/arm/boot/dts/tegra20-plutux.dts b/arch/arm/boot/dts/tegra20-plutux.dts
index 1a17cc30bb9d..d7a358a6a647 100644
--- a/arch/arm/boot/dts/tegra20-plutux.dts
+++ b/arch/arm/boot/dts/tegra20-plutux.dts
@@ -1,6 +1,6 @@
1/dts-v1/; 1/dts-v1/;
2 2
3/include/ "tegra20-tamonten.dtsi" 3#include "tegra20-tamonten.dtsi"
4 4
5/ { 5/ {
6 model = "Avionic Design Plutux board"; 6 model = "Avionic Design Plutux board";
@@ -17,7 +17,7 @@
17 compatible = "wlf,wm8903"; 17 compatible = "wlf,wm8903";
18 reg = <0x1a>; 18 reg = <0x1a>;
19 interrupt-parent = <&gpio>; 19 interrupt-parent = <&gpio>;
20 interrupts = <187 0x04>; 20 interrupts = <TEGRA_GPIO(X, 3) IRQ_TYPE_LEVEL_HIGH>;
21 21
22 gpio-controller; 22 gpio-controller;
23 #gpio-cells = <2>; 23 #gpio-cells = <2>;
@@ -50,10 +50,12 @@
50 nvidia,i2s-controller = <&tegra_i2s1>; 50 nvidia,i2s-controller = <&tegra_i2s1>;
51 nvidia,audio-codec = <&wm8903>; 51 nvidia,audio-codec = <&wm8903>;
52 52
53 nvidia,spkr-en-gpios = <&wm8903 2 0>; 53 nvidia,spkr-en-gpios = <&wm8903 2 GPIO_ACTIVE_HIGH>;
54 nvidia,hp-det-gpios = <&gpio 178 0>; /* gpio PW2 */ 54 nvidia,hp-det-gpios = <&gpio TEGRA_GPIO(W, 2) GPIO_ACTIVE_HIGH>;
55 55
56 clocks = <&tegra_car 112>, <&tegra_car 113>, <&tegra_car 94>; 56 clocks = <&tegra_car TEGRA20_CLK_PLL_A>,
57 <&tegra_car TEGRA20_CLK_PLL_A_OUT0>,
58 <&tegra_car TEGRA20_CLK_CDEV1>;
57 clock-names = "pll_a", "pll_a_out0", "mclk"; 59 clock-names = "pll_a", "pll_a_out0", "mclk";
58 }; 60 };
59}; 61};
diff --git a/arch/arm/boot/dts/tegra20-seaboard.dts b/arch/arm/boot/dts/tegra20-seaboard.dts
index cee4c34010fe..365760b33a26 100644
--- a/arch/arm/boot/dts/tegra20-seaboard.dts
+++ b/arch/arm/boot/dts/tegra20-seaboard.dts
@@ -1,6 +1,6 @@
1/dts-v1/; 1/dts-v1/;
2 2
3/include/ "tegra20.dtsi" 3#include "tegra20.dtsi"
4 4
5/ { 5/ {
6 model = "NVIDIA Seaboard"; 6 model = "NVIDIA Seaboard";
@@ -18,7 +18,8 @@
18 pll-supply = <&hdmi_pll_reg>; 18 pll-supply = <&hdmi_pll_reg>;
19 19
20 nvidia,ddc-i2c-bus = <&hdmi_ddc>; 20 nvidia,ddc-i2c-bus = <&hdmi_ddc>;
21 nvidia,hpd-gpio = <&gpio 111 0>; /* PN7 */ 21 nvidia,hpd-gpio = <&gpio TEGRA_GPIO(N, 7)
22 GPIO_ACTIVE_HIGH>;
22 }; 23 };
23 }; 24 };
24 25
@@ -313,7 +314,7 @@
313 compatible = "wlf,wm8903"; 314 compatible = "wlf,wm8903";
314 reg = <0x1a>; 315 reg = <0x1a>;
315 interrupt-parent = <&gpio>; 316 interrupt-parent = <&gpio>;
316 interrupts = <187 0x04>; 317 interrupts = <TEGRA_GPIO(X, 3) IRQ_TYPE_LEVEL_HIGH>;
317 318
318 gpio-controller; 319 gpio-controller;
319 #gpio-cells = <2>; 320 #gpio-cells = <2>;
@@ -328,14 +329,14 @@
328 compatible = "isil,isl29018"; 329 compatible = "isil,isl29018";
329 reg = <0x44>; 330 reg = <0x44>;
330 interrupt-parent = <&gpio>; 331 interrupt-parent = <&gpio>;
331 interrupts = <202 0x04>; /* GPIO PZ2 */ 332 interrupts = <TEGRA_GPIO(Z, 2) IRQ_TYPE_LEVEL_HIGH>;
332 }; 333 };
333 334
334 gyrometer@68 { 335 gyrometer@68 {
335 compatible = "invn,mpu3050"; 336 compatible = "invn,mpu3050";
336 reg = <0x68>; 337 reg = <0x68>;
337 interrupt-parent = <&gpio>; 338 interrupt-parent = <&gpio>;
338 interrupts = <204 0x04>; /* gpio PZ4 */ 339 interrupts = <TEGRA_GPIO(Z, 4) IRQ_TYPE_LEVEL_HIGH>;
339 }; 340 };
340 }; 341 };
341 342
@@ -388,7 +389,7 @@
388 pmic: tps6586x@34 { 389 pmic: tps6586x@34 {
389 compatible = "ti,tps6586x"; 390 compatible = "ti,tps6586x";
390 reg = <0x34>; 391 reg = <0x34>;
391 interrupts = <0 86 0x4>; 392 interrupts = <GIC_SPI 86 IRQ_TYPE_LEVEL_HIGH>;
392 393
393 ti,system-power-controller; 394 ti,system-power-controller;
394 395
@@ -511,7 +512,7 @@
511 compatible = "ak,ak8975"; 512 compatible = "ak,ak8975";
512 reg = <0xc>; 513 reg = <0xc>;
513 interrupt-parent = <&gpio>; 514 interrupt-parent = <&gpio>;
514 interrupts = <109 0x04>; /* gpio PN5 */ 515 interrupts = <TEGRA_GPIO(N, 5) IRQ_TYPE_LEVEL_HIGH>;
515 }; 516 };
516 }; 517 };
517 518
@@ -565,35 +566,48 @@
565 566
566 usb@c5000000 { 567 usb@c5000000 {
567 status = "okay"; 568 status = "okay";
568 nvidia,vbus-gpio = <&gpio 24 0>; /* PD0 */ 569 nvidia,vbus-gpio = <&gpio TEGRA_GPIO(D, 0) GPIO_ACTIVE_HIGH>;
570 dr_mode = "otg";
571 };
572
573 usb-phy@c5000000 {
574 status = "okay";
575 vbus-supply = <&vbus_reg>;
569 dr_mode = "otg"; 576 dr_mode = "otg";
570 }; 577 };
571 578
572 usb@c5004000 { 579 usb@c5004000 {
573 status = "okay"; 580 status = "okay";
574 nvidia,phy-reset-gpio = <&gpio 169 0>; /* gpio PV1 */ 581 nvidia,phy-reset-gpio = <&gpio TEGRA_GPIO(V, 1)
582 GPIO_ACTIVE_LOW>;
583 };
584
585 usb-phy@c5004000 {
586 status = "okay";
587 nvidia,phy-reset-gpio = <&gpio TEGRA_GPIO(V, 1)
588 GPIO_ACTIVE_LOW>;
575 }; 589 };
576 590
577 usb@c5008000 { 591 usb@c5008000 {
578 status = "okay"; 592 status = "okay";
579 }; 593 };
580 594
581 usb-phy@c5004400 { 595 usb-phy@c5008000 {
582 nvidia,phy-reset-gpio = <&gpio 169 0>; /* gpio PV1 */ 596 status = "okay";
583 }; 597 };
584 598
585 sdhci@c8000000 { 599 sdhci@c8000000 {
586 status = "okay"; 600 status = "okay";
587 power-gpios = <&gpio 86 0>; /* gpio PK6 */ 601 power-gpios = <&gpio TEGRA_GPIO(K, 6) GPIO_ACTIVE_HIGH>;
588 bus-width = <4>; 602 bus-width = <4>;
589 keep-power-in-suspend; 603 keep-power-in-suspend;
590 }; 604 };
591 605
592 sdhci@c8000400 { 606 sdhci@c8000400 {
593 status = "okay"; 607 status = "okay";
594 cd-gpios = <&gpio 69 1>; /* gpio PI5 */ 608 cd-gpios = <&gpio TEGRA_GPIO(I, 5) GPIO_ACTIVE_LOW>;
595 wp-gpios = <&gpio 57 0>; /* gpio PH1 */ 609 wp-gpios = <&gpio TEGRA_GPIO(H, 1) GPIO_ACTIVE_HIGH>;
596 power-gpios = <&gpio 70 0>; /* gpio PI6 */ 610 power-gpios = <&gpio TEGRA_GPIO(I, 6) GPIO_ACTIVE_HIGH>;
597 bus-width = <4>; 611 bus-width = <4>;
598 }; 612 };
599 613
@@ -621,14 +635,14 @@
621 635
622 power { 636 power {
623 label = "Power"; 637 label = "Power";
624 gpios = <&gpio 170 1>; /* gpio PV2, active low */ 638 gpios = <&gpio TEGRA_GPIO(V, 2) GPIO_ACTIVE_LOW>;
625 linux,code = <116>; /* KEY_POWER */ 639 linux,code = <116>; /* KEY_POWER */
626 gpio-key,wakeup; 640 gpio-key,wakeup;
627 }; 641 };
628 642
629 lid { 643 lid {
630 label = "Lid"; 644 label = "Lid";
631 gpios = <&gpio 23 0>; /* gpio PC7 */ 645 gpios = <&gpio TEGRA_GPIO(C, 7) GPIO_ACTIVE_HIGH>;
632 linux,input-type = <5>; /* EV_SW */ 646 linux,input-type = <5>; /* EV_SW */
633 linux,code = <0>; /* SW_LID */ 647 linux,code = <0>; /* SW_LID */
634 debounce-interval = <1>; 648 debounce-interval = <1>;
@@ -795,7 +809,7 @@
795 regulator-name = "vdd_1v5"; 809 regulator-name = "vdd_1v5";
796 regulator-min-microvolt = <1500000>; 810 regulator-min-microvolt = <1500000>;
797 regulator-max-microvolt = <1500000>; 811 regulator-max-microvolt = <1500000>;
798 gpio = <&pmic 0 0>; 812 gpio = <&pmic 0 GPIO_ACTIVE_HIGH>;
799 }; 813 };
800 814
801 regulator@2 { 815 regulator@2 {
@@ -804,8 +818,18 @@
804 regulator-name = "vdd_1v2"; 818 regulator-name = "vdd_1v2";
805 regulator-min-microvolt = <1200000>; 819 regulator-min-microvolt = <1200000>;
806 regulator-max-microvolt = <1200000>; 820 regulator-max-microvolt = <1200000>;
807 gpio = <&pmic 1 0>; 821 gpio = <&pmic 1 GPIO_ACTIVE_HIGH>;
822 enable-active-high;
823 };
824
825 vbus_reg: regulator@3 {
826 compatible = "regulator-fixed";
827 reg = <3>;
828 regulator-name = "vdd_vbus_wup1";
829 regulator-min-microvolt = <5000000>;
830 regulator-max-microvolt = <5000000>;
808 enable-active-high; 831 enable-active-high;
832 gpio = <&gpio 24 0>; /* PD0 */
809 }; 833 };
810 }; 834 };
811 835
@@ -827,10 +851,12 @@
827 nvidia,i2s-controller = <&tegra_i2s1>; 851 nvidia,i2s-controller = <&tegra_i2s1>;
828 nvidia,audio-codec = <&wm8903>; 852 nvidia,audio-codec = <&wm8903>;
829 853
830 nvidia,spkr-en-gpios = <&wm8903 2 0>; 854 nvidia,spkr-en-gpios = <&wm8903 2 GPIO_ACTIVE_HIGH>;
831 nvidia,hp-det-gpios = <&gpio 185 0>; /* gpio PX1 */ 855 nvidia,hp-det-gpios = <&gpio TEGRA_GPIO(X, 1) GPIO_ACTIVE_HIGH>;
832 856
833 clocks = <&tegra_car 112>, <&tegra_car 113>, <&tegra_car 94>; 857 clocks = <&tegra_car TEGRA20_CLK_PLL_A>,
858 <&tegra_car TEGRA20_CLK_PLL_A_OUT0>,
859 <&tegra_car TEGRA20_CLK_CDEV1>;
834 clock-names = "pll_a", "pll_a_out0", "mclk"; 860 clock-names = "pll_a", "pll_a_out0", "mclk";
835 }; 861 };
836}; 862};
diff --git a/arch/arm/boot/dts/tegra20-tamonten.dtsi b/arch/arm/boot/dts/tegra20-tamonten.dtsi
index 50b3ec16b93a..c54faae7cfb3 100644
--- a/arch/arm/boot/dts/tegra20-tamonten.dtsi
+++ b/arch/arm/boot/dts/tegra20-tamonten.dtsi
@@ -1,4 +1,4 @@
1/include/ "tegra20.dtsi" 1#include "tegra20.dtsi"
2 2
3/ { 3/ {
4 model = "Avionic Design Tamonten SOM"; 4 model = "Avionic Design Tamonten SOM";
@@ -14,7 +14,8 @@
14 pll-supply = <&hdmi_pll_reg>; 14 pll-supply = <&hdmi_pll_reg>;
15 15
16 nvidia,ddc-i2c-bus = <&hdmi_ddc>; 16 nvidia,ddc-i2c-bus = <&hdmi_ddc>;
17 nvidia,hpd-gpio = <&gpio 111 0>; /* PN7 */ 17 nvidia,hpd-gpio = <&gpio TEGRA_GPIO(N, 7)
18 GPIO_ACTIVE_HIGH>;
18 }; 19 };
19 }; 20 };
20 21
@@ -321,7 +322,7 @@
321 pmic: tps6586x@34 { 322 pmic: tps6586x@34 {
322 compatible = "ti,tps6586x"; 323 compatible = "ti,tps6586x";
323 reg = <0x34>; 324 reg = <0x34>;
324 interrupts = <0 86 0x4>; 325 interrupts = <GIC_SPI 86 IRQ_TYPE_LEVEL_HIGH>;
325 326
326 ti,system-power-controller; 327 ti,system-power-controller;
327 328
@@ -470,9 +471,13 @@
470 status = "okay"; 471 status = "okay";
471 }; 472 };
472 473
474 usb-phy@c5008000 {
475 status = "okay";
476 };
477
473 sdhci@c8000600 { 478 sdhci@c8000600 {
474 cd-gpios = <&gpio 58 1>; /* gpio PH2 */ 479 cd-gpios = <&gpio TEGRA_GPIO(H, 2) GPIO_ACTIVE_LOW>;
475 wp-gpios = <&gpio 59 0>; /* gpio PH3 */ 480 wp-gpios = <&gpio TEGRA_GPIO(H, 3) GPIO_ACTIVE_HIGH>;
476 bus-width = <4>; 481 bus-width = <4>;
477 status = "okay"; 482 status = "okay";
478 }; 483 };
diff --git a/arch/arm/boot/dts/tegra20-tec.dts b/arch/arm/boot/dts/tegra20-tec.dts
index 742f0b38d21d..c572c43751b1 100644
--- a/arch/arm/boot/dts/tegra20-tec.dts
+++ b/arch/arm/boot/dts/tegra20-tec.dts
@@ -1,6 +1,6 @@
1/dts-v1/; 1/dts-v1/;
2 2
3/include/ "tegra20-tamonten.dtsi" 3#include "tegra20-tamonten.dtsi"
4 4
5/ { 5/ {
6 model = "Avionic Design Tamonten Evaluation Carrier"; 6 model = "Avionic Design Tamonten Evaluation Carrier";
@@ -17,7 +17,7 @@
17 compatible = "wlf,wm8903"; 17 compatible = "wlf,wm8903";
18 reg = <0x1a>; 18 reg = <0x1a>;
19 interrupt-parent = <&gpio>; 19 interrupt-parent = <&gpio>;
20 interrupts = <187 0x04>; 20 interrupts = <TEGRA_GPIO(X, 3) IRQ_TYPE_LEVEL_HIGH>;
21 21
22 gpio-controller; 22 gpio-controller;
23 #gpio-cells = <2>; 23 #gpio-cells = <2>;
@@ -50,10 +50,13 @@
50 nvidia,i2s-controller = <&tegra_i2s1>; 50 nvidia,i2s-controller = <&tegra_i2s1>;
51 nvidia,audio-codec = <&wm8903>; 51 nvidia,audio-codec = <&wm8903>;
52 52
53 nvidia,spkr-en-gpios = <&wm8903 2 0>; 53 nvidia,spkr-en-gpios = <&wm8903 2 GPIO_ACTIVE_HIGH>;
54 nvidia,hp-det-gpios = <&gpio 178 0>; /* gpio PW2 */ 54 nvidia,hp-det-gpios = <&gpio TEGRA_GPIO(W, 2)
55 GPIO_ACTIVE_HIGH>;
55 56
56 clocks = <&tegra_car 112>, <&tegra_car 113>, <&tegra_car 94>; 57 clocks = <&tegra_car TEGRA20_CLK_PLL_A>,
58 <&tegra_car TEGRA20_CLK_PLL_A_OUT0>,
59 <&tegra_car TEGRA20_CLK_CDEV1>;
57 clock-names = "pll_a", "pll_a_out0", "mclk"; 60 clock-names = "pll_a", "pll_a_out0", "mclk";
58 }; 61 };
59}; 62};
diff --git a/arch/arm/boot/dts/tegra20-trimslice.dts b/arch/arm/boot/dts/tegra20-trimslice.dts
index 9cc78a15d739..ed4b901b0227 100644
--- a/arch/arm/boot/dts/tegra20-trimslice.dts
+++ b/arch/arm/boot/dts/tegra20-trimslice.dts
@@ -1,6 +1,6 @@
1/dts-v1/; 1/dts-v1/;
2 2
3/include/ "tegra20.dtsi" 3#include "tegra20.dtsi"
4 4
5/ { 5/ {
6 model = "Compulab TrimSlice board"; 6 model = "Compulab TrimSlice board";
@@ -18,7 +18,8 @@
18 pll-supply = <&hdmi_pll_reg>; 18 pll-supply = <&hdmi_pll_reg>;
19 19
20 nvidia,ddc-i2c-bus = <&hdmi_ddc>; 20 nvidia,ddc-i2c-bus = <&hdmi_ddc>;
21 nvidia,hpd-gpio = <&gpio 111 0>; /* PN7 */ 21 nvidia,hpd-gpio = <&gpio TEGRA_GPIO(N, 7)
22 GPIO_ACTIVE_HIGH>;
22 }; 23 };
23 }; 24 };
24 25
@@ -311,20 +312,32 @@
311 312
312 usb@c5000000 { 313 usb@c5000000 {
313 status = "okay"; 314 status = "okay";
314 nvidia,vbus-gpio = <&gpio 170 0>; /* gpio PV2 */ 315 nvidia,vbus-gpio = <&gpio TEGRA_GPIO(V, 2) GPIO_ACTIVE_HIGH>;
316 };
317
318 usb-phy@c5000000 {
319 status = "okay";
320 vbus-supply = <&vbus_reg>;
315 }; 321 };
316 322
317 usb@c5004000 { 323 usb@c5004000 {
318 status = "okay"; 324 status = "okay";
319 nvidia,phy-reset-gpio = <&gpio 168 0>; /* gpio PV0 */ 325 nvidia,phy-reset-gpio = <&gpio TEGRA_GPIO(V, 0)
326 GPIO_ACTIVE_LOW>;
327 };
328
329 usb-phy@c5004000 {
330 status = "okay";
331 nvidia,phy-reset-gpio = <&gpio TEGRA_GPIO(V, 0)
332 GPIO_ACTIVE_LOW>;
320 }; 333 };
321 334
322 usb@c5008000 { 335 usb@c5008000 {
323 status = "okay"; 336 status = "okay";
324 }; 337 };
325 338
326 usb-phy@c5004400 { 339 usb-phy@c5008000 {
327 nvidia,phy-reset-gpio = <&gpio 168 0>; /* gpio PV0 */ 340 status = "okay";
328 }; 341 };
329 342
330 sdhci@c8000000 { 343 sdhci@c8000000 {
@@ -334,8 +347,8 @@
334 347
335 sdhci@c8000600 { 348 sdhci@c8000600 {
336 status = "okay"; 349 status = "okay";
337 cd-gpios = <&gpio 121 1>; /* gpio PP1 */ 350 cd-gpios = <&gpio TEGRA_GPIO(P, 1) GPIO_ACTIVE_LOW>;
338 wp-gpios = <&gpio 122 0>; /* gpio PP2 */ 351 wp-gpios = <&gpio TEGRA_GPIO(P, 2) GPIO_ACTIVE_HIGH>;
339 bus-width = <4>; 352 bus-width = <4>;
340 }; 353 };
341 354
@@ -357,7 +370,7 @@
357 370
358 power { 371 power {
359 label = "Power"; 372 label = "Power";
360 gpios = <&gpio 190 1>; /* gpio PX6, active low */ 373 gpios = <&gpio TEGRA_GPIO(X, 6) GPIO_ACTIVE_LOW>;
361 linux,code = <116>; /* KEY_POWER */ 374 linux,code = <116>; /* KEY_POWER */
362 gpio-key,wakeup; 375 gpio-key,wakeup;
363 }; 376 };
@@ -365,7 +378,7 @@
365 378
366 poweroff { 379 poweroff {
367 compatible = "gpio-poweroff"; 380 compatible = "gpio-poweroff";
368 gpios = <&gpio 191 1>; /* gpio PX7, active low */ 381 gpios = <&gpio TEGRA_GPIO(X, 7) GPIO_ACTIVE_LOW>;
369 }; 382 };
370 383
371 regulators { 384 regulators {
@@ -390,6 +403,16 @@
390 regulator-max-microvolt = <1800000>; 403 regulator-max-microvolt = <1800000>;
391 regulator-always-on; 404 regulator-always-on;
392 }; 405 };
406
407 vbus_reg: regulator@2 {
408 compatible = "regulator-fixed";
409 reg = <2>;
410 regulator-name = "usb1_vbus";
411 regulator-min-microvolt = <5000000>;
412 regulator-max-microvolt = <5000000>;
413 enable-active-high;
414 gpio = <&gpio 170 0>; /* PV2 */
415 };
393 }; 416 };
394 417
395 sound { 418 sound {
@@ -397,7 +420,9 @@
397 nvidia,i2s-controller = <&tegra_i2s1>; 420 nvidia,i2s-controller = <&tegra_i2s1>;
398 nvidia,audio-codec = <&codec>; 421 nvidia,audio-codec = <&codec>;
399 422
400 clocks = <&tegra_car 112>, <&tegra_car 113>, <&tegra_car 94>; 423 clocks = <&tegra_car TEGRA20_CLK_PLL_A>,
424 <&tegra_car TEGRA20_CLK_PLL_A_OUT0>,
425 <&tegra_car TEGRA20_CLK_CDEV1>;
401 clock-names = "pll_a", "pll_a_out0", "mclk"; 426 clock-names = "pll_a", "pll_a_out0", "mclk";
402 }; 427 };
403}; 428};
diff --git a/arch/arm/boot/dts/tegra20-ventana.dts b/arch/arm/boot/dts/tegra20-ventana.dts
index dd38f1f03834..7f8c28d1121f 100644
--- a/arch/arm/boot/dts/tegra20-ventana.dts
+++ b/arch/arm/boot/dts/tegra20-ventana.dts
@@ -1,6 +1,6 @@
1/dts-v1/; 1/dts-v1/;
2 2
3/include/ "tegra20.dtsi" 3#include "tegra20.dtsi"
4 4
5/ { 5/ {
6 model = "NVIDIA Tegra20 Ventana evaluation board"; 6 model = "NVIDIA Tegra20 Ventana evaluation board";
@@ -18,7 +18,8 @@
18 pll-supply = <&hdmi_pll_reg>; 18 pll-supply = <&hdmi_pll_reg>;
19 19
20 nvidia,ddc-i2c-bus = <&hdmi_ddc>; 20 nvidia,ddc-i2c-bus = <&hdmi_ddc>;
21 nvidia,hpd-gpio = <&gpio 111 0>; /* PN7 */ 21 nvidia,hpd-gpio = <&gpio TEGRA_GPIO(N, 7)
22 GPIO_ACTIVE_HIGH>;
22 }; 23 };
23 }; 24 };
24 25
@@ -310,7 +311,7 @@
310 compatible = "wlf,wm8903"; 311 compatible = "wlf,wm8903";
311 reg = <0x1a>; 312 reg = <0x1a>;
312 interrupt-parent = <&gpio>; 313 interrupt-parent = <&gpio>;
313 interrupts = <187 0x04>; 314 interrupts = <TEGRA_GPIO(X, 3) IRQ_TYPE_LEVEL_HIGH>;
314 315
315 gpio-controller; 316 gpio-controller;
316 #gpio-cells = <2>; 317 #gpio-cells = <2>;
@@ -325,7 +326,7 @@
325 compatible = "isil,isl29018"; 326 compatible = "isil,isl29018";
326 reg = <0x44>; 327 reg = <0x44>;
327 interrupt-parent = <&gpio>; 328 interrupt-parent = <&gpio>;
328 interrupts = <202 0x04>; /*gpio PZ2 */ 329 interrupts = <TEGRA_GPIO(Z, 2) IRQ_TYPE_LEVEL_HIGH>;
329 }; 330 };
330 }; 331 };
331 332
@@ -371,7 +372,7 @@
371 pmic: tps6586x@34 { 372 pmic: tps6586x@34 {
372 compatible = "ti,tps6586x"; 373 compatible = "ti,tps6586x";
373 reg = <0x34>; 374 reg = <0x34>;
374 interrupts = <0 86 0x4>; 375 interrupts = <GIC_SPI 86 IRQ_TYPE_LEVEL_HIGH>;
375 376
376 ti,system-power-controller; 377 ti,system-power-controller;
377 378
@@ -505,31 +506,42 @@
505 status = "okay"; 506 status = "okay";
506 }; 507 };
507 508
509 usb-phy@c5000000 {
510 status = "okay";
511 };
512
508 usb@c5004000 { 513 usb@c5004000 {
509 status = "okay"; 514 status = "okay";
510 nvidia,phy-reset-gpio = <&gpio 169 0>; /* gpio PV1 */ 515 nvidia,phy-reset-gpio = <&gpio TEGRA_GPIO(V, 1)
516 GPIO_ACTIVE_LOW>;
517 };
518
519 usb-phy@c5004000 {
520 status = "okay";
521 nvidia,phy-reset-gpio = <&gpio TEGRA_GPIO(V, 1)
522 GPIO_ACTIVE_LOW>;
511 }; 523 };
512 524
513 usb@c5008000 { 525 usb@c5008000 {
514 status = "okay"; 526 status = "okay";
515 }; 527 };
516 528
517 usb-phy@c5004400 { 529 usb-phy@c5008000 {
518 nvidia,phy-reset-gpio = <&gpio 169 0>; /* gpio PV1 */ 530 status = "okay";
519 }; 531 };
520 532
521 sdhci@c8000000 { 533 sdhci@c8000000 {
522 status = "okay"; 534 status = "okay";
523 power-gpios = <&gpio 86 0>; /* gpio PK6 */ 535 power-gpios = <&gpio TEGRA_GPIO(K, 6) GPIO_ACTIVE_HIGH>;
524 bus-width = <4>; 536 bus-width = <4>;
525 keep-power-in-suspend; 537 keep-power-in-suspend;
526 }; 538 };
527 539
528 sdhci@c8000400 { 540 sdhci@c8000400 {
529 status = "okay"; 541 status = "okay";
530 cd-gpios = <&gpio 69 1>; /* gpio PI5 */ 542 cd-gpios = <&gpio TEGRA_GPIO(I, 5) GPIO_ACTIVE_LOW>;
531 wp-gpios = <&gpio 57 0>; /* gpio PH1 */ 543 wp-gpios = <&gpio TEGRA_GPIO(H, 1) GPIO_ACTIVE_HIGH>;
532 power-gpios = <&gpio 70 0>; /* gpio PI6 */ 544 power-gpios = <&gpio TEGRA_GPIO(I, 6) GPIO_ACTIVE_HIGH>;
533 bus-width = <4>; 545 bus-width = <4>;
534 }; 546 };
535 547
@@ -557,7 +569,7 @@
557 569
558 power { 570 power {
559 label = "Power"; 571 label = "Power";
560 gpios = <&gpio 170 1>; /* gpio PV2, active low */ 572 gpios = <&gpio TEGRA_GPIO(V, 2) GPIO_ACTIVE_LOW>;
561 linux,code = <116>; /* KEY_POWER */ 573 linux,code = <116>; /* KEY_POWER */
562 gpio-key,wakeup; 574 gpio-key,wakeup;
563 }; 575 };
@@ -583,7 +595,7 @@
583 regulator-name = "vdd_1v5"; 595 regulator-name = "vdd_1v5";
584 regulator-min-microvolt = <1500000>; 596 regulator-min-microvolt = <1500000>;
585 regulator-max-microvolt = <1500000>; 597 regulator-max-microvolt = <1500000>;
586 gpio = <&pmic 0 0>; 598 gpio = <&pmic 0 GPIO_ACTIVE_HIGH>;
587 }; 599 };
588 600
589 regulator@2 { 601 regulator@2 {
@@ -592,7 +604,7 @@
592 regulator-name = "vdd_1v2"; 604 regulator-name = "vdd_1v2";
593 regulator-min-microvolt = <1200000>; 605 regulator-min-microvolt = <1200000>;
594 regulator-max-microvolt = <1200000>; 606 regulator-max-microvolt = <1200000>;
595 gpio = <&pmic 1 0>; 607 gpio = <&pmic 1 GPIO_ACTIVE_HIGH>;
596 enable-active-high; 608 enable-active-high;
597 }; 609 };
598 610
@@ -602,7 +614,7 @@
602 regulator-name = "vdd_pnl"; 614 regulator-name = "vdd_pnl";
603 regulator-min-microvolt = <2800000>; 615 regulator-min-microvolt = <2800000>;
604 regulator-max-microvolt = <2800000>; 616 regulator-max-microvolt = <2800000>;
605 gpio = <&gpio 22 0>; /* gpio PC6 */ 617 gpio = <&gpio TEGRA_GPIO(C, 6) GPIO_ACTIVE_HIGH>;
606 enable-active-high; 618 enable-active-high;
607 }; 619 };
608 620
@@ -612,7 +624,7 @@
612 regulator-name = "vdd_bl"; 624 regulator-name = "vdd_bl";
613 regulator-min-microvolt = <2800000>; 625 regulator-min-microvolt = <2800000>;
614 regulator-max-microvolt = <2800000>; 626 regulator-max-microvolt = <2800000>;
615 gpio = <&gpio 176 0>; /* gpio PW0 */ 627 gpio = <&gpio TEGRA_GPIO(W, 0) GPIO_ACTIVE_HIGH>;
616 enable-active-high; 628 enable-active-high;
617 }; 629 };
618 }; 630 };
@@ -635,12 +647,16 @@
635 nvidia,i2s-controller = <&tegra_i2s1>; 647 nvidia,i2s-controller = <&tegra_i2s1>;
636 nvidia,audio-codec = <&wm8903>; 648 nvidia,audio-codec = <&wm8903>;
637 649
638 nvidia,spkr-en-gpios = <&wm8903 2 0>; 650 nvidia,spkr-en-gpios = <&wm8903 2 GPIO_ACTIVE_HIGH>;
639 nvidia,hp-det-gpios = <&gpio 178 0>; /* gpio PW2 */ 651 nvidia,hp-det-gpios = <&gpio TEGRA_GPIO(W, 2) GPIO_ACTIVE_HIGH>;
640 nvidia,int-mic-en-gpios = <&gpio 184 0>; /* gpio PX0 */ 652 nvidia,int-mic-en-gpios = <&gpio TEGRA_GPIO(X, 0)
641 nvidia,ext-mic-en-gpios = <&gpio 185 0>; /* gpio PX1 */ 653 GPIO_ACTIVE_HIGH>;
654 nvidia,ext-mic-en-gpios = <&gpio TEGRA_GPIO(X, 1)
655 GPIO_ACTIVE_HIGH>;
642 656
643 clocks = <&tegra_car 112>, <&tegra_car 113>, <&tegra_car 94>; 657 clocks = <&tegra_car TEGRA20_CLK_PLL_A>,
658 <&tegra_car TEGRA20_CLK_PLL_A_OUT0>,
659 <&tegra_car TEGRA20_CLK_CDEV1>;
644 clock-names = "pll_a", "pll_a_out0", "mclk"; 660 clock-names = "pll_a", "pll_a_out0", "mclk";
645 }; 661 };
646}; 662};
diff --git a/arch/arm/boot/dts/tegra20-whistler.dts b/arch/arm/boot/dts/tegra20-whistler.dts
index d2567f83aaff..ab67c94db280 100644
--- a/arch/arm/boot/dts/tegra20-whistler.dts
+++ b/arch/arm/boot/dts/tegra20-whistler.dts
@@ -1,6 +1,6 @@
1/dts-v1/; 1/dts-v1/;
2 2
3/include/ "tegra20.dtsi" 3#include "tegra20.dtsi"
4 4
5/ { 5/ {
6 model = "NVIDIA Tegra20 Whistler evaluation board"; 6 model = "NVIDIA Tegra20 Whistler evaluation board";
@@ -18,7 +18,8 @@
18 pll-supply = <&hdmi_pll_reg>; 18 pll-supply = <&hdmi_pll_reg>;
19 19
20 nvidia,ddc-i2c-bus = <&hdmi_ddc>; 20 nvidia,ddc-i2c-bus = <&hdmi_ddc>;
21 nvidia,hpd-gpio = <&gpio 111 0>; /* PN7 */ 21 nvidia,hpd-gpio = <&gpio TEGRA_GPIO(N, 7)
22 GPIO_ACTIVE_HIGH>;
22 }; 23 };
23 }; 24 };
24 25
@@ -281,7 +282,7 @@
281 max8907@3c { 282 max8907@3c {
282 compatible = "maxim,max8907"; 283 compatible = "maxim,max8907";
283 reg = <0x3c>; 284 reg = <0x3c>;
284 interrupts = <0 86 0x4>; 285 interrupts = <GIC_SPI 86 IRQ_TYPE_LEVEL_HIGH>;
285 286
286 maxim,system-power-controller; 287 maxim,system-power-controller;
287 288
@@ -508,18 +509,28 @@
508 509
509 usb@c5000000 { 510 usb@c5000000 {
510 status = "okay"; 511 status = "okay";
511 nvidia,vbus-gpio = <&tca6416 0 0>; /* GPIO_PMU0 */ 512 nvidia,vbus-gpio = <&tca6416 0 GPIO_ACTIVE_HIGH>;
513 };
514
515 usb-phy@c5000000 {
516 status = "okay";
517 vbus-supply = <&vbus1_reg>;
512 }; 518 };
513 519
514 usb@c5008000 { 520 usb@c5008000 {
515 status = "okay"; 521 status = "okay";
516 nvidia,vbus-gpio = <&tca6416 1 0>; /* GPIO_PMU1 */ 522 nvidia,vbus-gpio = <&tca6416 1 GPIO_ACTIVE_HIGH>;
523 };
524
525 usb-phy@c5008000 {
526 status = "okay";
527 vbus-supply = <&vbus3_reg>;
517 }; 528 };
518 529
519 sdhci@c8000400 { 530 sdhci@c8000400 {
520 status = "okay"; 531 status = "okay";
521 cd-gpios = <&gpio 69 1>; /* gpio PI5 */ 532 cd-gpios = <&gpio TEGRA_GPIO(I, 5) GPIO_ACTIVE_LOW>;
522 wp-gpios = <&gpio 173 0>; /* gpio PV5 */ 533 wp-gpios = <&gpio TEGRA_GPIO(V, 5) GPIO_ACTIVE_HIGH>;
523 bus-width = <8>; 534 bus-width = <8>;
524 }; 535 };
525 536
@@ -568,6 +579,26 @@
568 regulator-max-microvolt = <5000000>; 579 regulator-max-microvolt = <5000000>;
569 regulator-always-on; 580 regulator-always-on;
570 }; 581 };
582
583 vbus1_reg: regulator@2 {
584 compatible = "regulator-fixed";
585 reg = <2>;
586 regulator-name = "vbus1";
587 regulator-min-microvolt = <5000000>;
588 regulator-max-microvolt = <5000000>;
589 enable-active-high;
590 gpio = <&tca6416 0 0>; /* GPIO_PMU0 */
591 };
592
593 vbus3_reg: regulator@3 {
594 compatible = "regulator-fixed";
595 reg = <3>;
596 regulator-name = "vbus3";
597 regulator-min-microvolt = <5000000>;
598 regulator-max-microvolt = <5000000>;
599 enable-active-high;
600 gpio = <&tca6416 1 0>; /* GPIO_PMU1 */
601 };
571 }; 602 };
572 603
573 sound { 604 sound {
@@ -584,7 +615,9 @@
584 nvidia,i2s-controller = <&tegra_i2s1>; 615 nvidia,i2s-controller = <&tegra_i2s1>;
585 nvidia,audio-codec = <&codec>; 616 nvidia,audio-codec = <&codec>;
586 617
587 clocks = <&tegra_car 112>, <&tegra_car 113>, <&tegra_car 94>; 618 clocks = <&tegra_car TEGRA20_CLK_PLL_A>,
619 <&tegra_car TEGRA20_CLK_PLL_A_OUT0>,
620 <&tegra_car TEGRA20_CLK_CDEV1>;
588 clock-names = "pll_a", "pll_a_out0", "mclk"; 621 clock-names = "pll_a", "pll_a_out0", "mclk";
589 }; 622 };
590}; 623};
diff --git a/arch/arm/boot/dts/tegra20.dtsi b/arch/arm/boot/dts/tegra20.dtsi
index 56a91106041b..9653fd8288d2 100644
--- a/arch/arm/boot/dts/tegra20.dtsi
+++ b/arch/arm/boot/dts/tegra20.dtsi
@@ -1,4 +1,8 @@
1/include/ "skeleton.dtsi" 1#include <dt-bindings/clock/tegra20-car.h>
2#include <dt-bindings/gpio/tegra-gpio.h>
3#include <dt-bindings/interrupt-controller/arm-gic.h>
4
5#include "skeleton.dtsi"
2 6
3/ { 7/ {
4 compatible = "nvidia,tegra20"; 8 compatible = "nvidia,tegra20";
@@ -15,9 +19,9 @@
15 host1x { 19 host1x {
16 compatible = "nvidia,tegra20-host1x", "simple-bus"; 20 compatible = "nvidia,tegra20-host1x", "simple-bus";
17 reg = <0x50000000 0x00024000>; 21 reg = <0x50000000 0x00024000>;
18 interrupts = <0 65 0x04 /* mpcore syncpt */ 22 interrupts = <GIC_SPI 65 IRQ_TYPE_LEVEL_HIGH>, /* syncpt */
19 0 67 0x04>; /* mpcore general */ 23 <GIC_SPI 67 IRQ_TYPE_LEVEL_HIGH>; /* general */
20 clocks = <&tegra_car 28>; 24 clocks = <&tegra_car TEGRA20_CLK_HOST1X>;
21 25
22 #address-cells = <1>; 26 #address-cells = <1>;
23 #size-cells = <1>; 27 #size-cells = <1>;
@@ -27,49 +31,50 @@
27 mpe { 31 mpe {
28 compatible = "nvidia,tegra20-mpe"; 32 compatible = "nvidia,tegra20-mpe";
29 reg = <0x54040000 0x00040000>; 33 reg = <0x54040000 0x00040000>;
30 interrupts = <0 68 0x04>; 34 interrupts = <GIC_SPI 68 IRQ_TYPE_LEVEL_HIGH>;
31 clocks = <&tegra_car 60>; 35 clocks = <&tegra_car TEGRA20_CLK_MPE>;
32 }; 36 };
33 37
34 vi { 38 vi {
35 compatible = "nvidia,tegra20-vi"; 39 compatible = "nvidia,tegra20-vi";
36 reg = <0x54080000 0x00040000>; 40 reg = <0x54080000 0x00040000>;
37 interrupts = <0 69 0x04>; 41 interrupts = <GIC_SPI 69 IRQ_TYPE_LEVEL_HIGH>;
38 clocks = <&tegra_car 100>; 42 clocks = <&tegra_car TEGRA20_CLK_VI>;
39 }; 43 };
40 44
41 epp { 45 epp {
42 compatible = "nvidia,tegra20-epp"; 46 compatible = "nvidia,tegra20-epp";
43 reg = <0x540c0000 0x00040000>; 47 reg = <0x540c0000 0x00040000>;
44 interrupts = <0 70 0x04>; 48 interrupts = <GIC_SPI 70 IRQ_TYPE_LEVEL_HIGH>;
45 clocks = <&tegra_car 19>; 49 clocks = <&tegra_car TEGRA20_CLK_EPP>;
46 }; 50 };
47 51
48 isp { 52 isp {
49 compatible = "nvidia,tegra20-isp"; 53 compatible = "nvidia,tegra20-isp";
50 reg = <0x54100000 0x00040000>; 54 reg = <0x54100000 0x00040000>;
51 interrupts = <0 71 0x04>; 55 interrupts = <GIC_SPI 71 IRQ_TYPE_LEVEL_HIGH>;
52 clocks = <&tegra_car 23>; 56 clocks = <&tegra_car TEGRA20_CLK_ISP>;
53 }; 57 };
54 58
55 gr2d { 59 gr2d {
56 compatible = "nvidia,tegra20-gr2d"; 60 compatible = "nvidia,tegra20-gr2d";
57 reg = <0x54140000 0x00040000>; 61 reg = <0x54140000 0x00040000>;
58 interrupts = <0 72 0x04>; 62 interrupts = <GIC_SPI 72 IRQ_TYPE_LEVEL_HIGH>;
59 clocks = <&tegra_car 21>; 63 clocks = <&tegra_car TEGRA20_CLK_GR2D>;
60 }; 64 };
61 65
62 gr3d { 66 gr3d {
63 compatible = "nvidia,tegra20-gr3d"; 67 compatible = "nvidia,tegra20-gr3d";
64 reg = <0x54180000 0x00040000>; 68 reg = <0x54180000 0x00040000>;
65 clocks = <&tegra_car 24>; 69 clocks = <&tegra_car TEGRA20_CLK_GR3D>;
66 }; 70 };
67 71
68 dc@54200000 { 72 dc@54200000 {
69 compatible = "nvidia,tegra20-dc"; 73 compatible = "nvidia,tegra20-dc";
70 reg = <0x54200000 0x00040000>; 74 reg = <0x54200000 0x00040000>;
71 interrupts = <0 73 0x04>; 75 interrupts = <GIC_SPI 73 IRQ_TYPE_LEVEL_HIGH>;
72 clocks = <&tegra_car 27>, <&tegra_car 121>; 76 clocks = <&tegra_car TEGRA20_CLK_DISP1>,
77 <&tegra_car TEGRA20_CLK_PLL_P>;
73 clock-names = "disp1", "parent"; 78 clock-names = "disp1", "parent";
74 79
75 rgb { 80 rgb {
@@ -80,8 +85,9 @@
80 dc@54240000 { 85 dc@54240000 {
81 compatible = "nvidia,tegra20-dc"; 86 compatible = "nvidia,tegra20-dc";
82 reg = <0x54240000 0x00040000>; 87 reg = <0x54240000 0x00040000>;
83 interrupts = <0 74 0x04>; 88 interrupts = <GIC_SPI 74 IRQ_TYPE_LEVEL_HIGH>;
84 clocks = <&tegra_car 26>, <&tegra_car 121>; 89 clocks = <&tegra_car TEGRA20_CLK_DISP2>,
90 <&tegra_car TEGRA20_CLK_PLL_P>;
85 clock-names = "disp2", "parent"; 91 clock-names = "disp2", "parent";
86 92
87 rgb { 93 rgb {
@@ -92,8 +98,9 @@
92 hdmi { 98 hdmi {
93 compatible = "nvidia,tegra20-hdmi"; 99 compatible = "nvidia,tegra20-hdmi";
94 reg = <0x54280000 0x00040000>; 100 reg = <0x54280000 0x00040000>;
95 interrupts = <0 75 0x04>; 101 interrupts = <GIC_SPI 75 IRQ_TYPE_LEVEL_HIGH>;
96 clocks = <&tegra_car 51>, <&tegra_car 117>; 102 clocks = <&tegra_car TEGRA20_CLK_HDMI>,
103 <&tegra_car TEGRA20_CLK_PLL_D_OUT0>;
97 clock-names = "hdmi", "parent"; 104 clock-names = "hdmi", "parent";
98 status = "disabled"; 105 status = "disabled";
99 }; 106 };
@@ -101,15 +108,15 @@
101 tvo { 108 tvo {
102 compatible = "nvidia,tegra20-tvo"; 109 compatible = "nvidia,tegra20-tvo";
103 reg = <0x542c0000 0x00040000>; 110 reg = <0x542c0000 0x00040000>;
104 interrupts = <0 76 0x04>; 111 interrupts = <GIC_SPI 76 IRQ_TYPE_LEVEL_HIGH>;
105 clocks = <&tegra_car 102>; 112 clocks = <&tegra_car TEGRA20_CLK_TVO>;
106 status = "disabled"; 113 status = "disabled";
107 }; 114 };
108 115
109 dsi { 116 dsi {
110 compatible = "nvidia,tegra20-dsi"; 117 compatible = "nvidia,tegra20-dsi";
111 reg = <0x54300000 0x00040000>; 118 reg = <0x54300000 0x00040000>;
112 clocks = <&tegra_car 48>; 119 clocks = <&tegra_car TEGRA20_CLK_DSI>;
113 status = "disabled"; 120 status = "disabled";
114 }; 121 };
115 }; 122 };
@@ -117,8 +124,9 @@
117 timer@50004600 { 124 timer@50004600 {
118 compatible = "arm,cortex-a9-twd-timer"; 125 compatible = "arm,cortex-a9-twd-timer";
119 reg = <0x50040600 0x20>; 126 reg = <0x50040600 0x20>;
120 interrupts = <1 13 0x304>; 127 interrupts = <GIC_PPI 13
121 clocks = <&tegra_car 132>; 128 (GIC_CPU_MASK_SIMPLE(2) | IRQ_TYPE_LEVEL_HIGH)>;
129 clocks = <&tegra_car TEGRA20_CLK_TWD>;
122 }; 130 };
123 131
124 intc: interrupt-controller { 132 intc: interrupt-controller {
@@ -141,11 +149,11 @@
141 timer@60005000 { 149 timer@60005000 {
142 compatible = "nvidia,tegra20-timer"; 150 compatible = "nvidia,tegra20-timer";
143 reg = <0x60005000 0x60>; 151 reg = <0x60005000 0x60>;
144 interrupts = <0 0 0x04 152 interrupts = <GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>,
145 0 1 0x04 153 <GIC_SPI 1 IRQ_TYPE_LEVEL_HIGH>,
146 0 41 0x04 154 <GIC_SPI 41 IRQ_TYPE_LEVEL_HIGH>,
147 0 42 0x04>; 155 <GIC_SPI 42 IRQ_TYPE_LEVEL_HIGH>;
148 clocks = <&tegra_car 5>; 156 clocks = <&tegra_car TEGRA20_CLK_TIMER>;
149 }; 157 };
150 158
151 tegra_car: clock { 159 tegra_car: clock {
@@ -157,23 +165,23 @@
157 apbdma: dma { 165 apbdma: dma {
158 compatible = "nvidia,tegra20-apbdma"; 166 compatible = "nvidia,tegra20-apbdma";
159 reg = <0x6000a000 0x1200>; 167 reg = <0x6000a000 0x1200>;
160 interrupts = <0 104 0x04 168 interrupts = <GIC_SPI 104 IRQ_TYPE_LEVEL_HIGH>,
161 0 105 0x04 169 <GIC_SPI 105 IRQ_TYPE_LEVEL_HIGH>,
162 0 106 0x04 170 <GIC_SPI 106 IRQ_TYPE_LEVEL_HIGH>,
163 0 107 0x04 171 <GIC_SPI 107 IRQ_TYPE_LEVEL_HIGH>,
164 0 108 0x04 172 <GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>,
165 0 109 0x04 173 <GIC_SPI 109 IRQ_TYPE_LEVEL_HIGH>,
166 0 110 0x04 174 <GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH>,
167 0 111 0x04 175 <GIC_SPI 111 IRQ_TYPE_LEVEL_HIGH>,
168 0 112 0x04 176 <GIC_SPI 112 IRQ_TYPE_LEVEL_HIGH>,
169 0 113 0x04 177 <GIC_SPI 113 IRQ_TYPE_LEVEL_HIGH>,
170 0 114 0x04 178 <GIC_SPI 114 IRQ_TYPE_LEVEL_HIGH>,
171 0 115 0x04 179 <GIC_SPI 115 IRQ_TYPE_LEVEL_HIGH>,
172 0 116 0x04 180 <GIC_SPI 116 IRQ_TYPE_LEVEL_HIGH>,
173 0 117 0x04 181 <GIC_SPI 117 IRQ_TYPE_LEVEL_HIGH>,
174 0 118 0x04 182 <GIC_SPI 118 IRQ_TYPE_LEVEL_HIGH>,
175 0 119 0x04>; 183 <GIC_SPI 119 IRQ_TYPE_LEVEL_HIGH>;
176 clocks = <&tegra_car 34>; 184 clocks = <&tegra_car TEGRA20_CLK_APBDMA>;
177 }; 185 };
178 186
179 ahb { 187 ahb {
@@ -184,13 +192,13 @@
184 gpio: gpio { 192 gpio: gpio {
185 compatible = "nvidia,tegra20-gpio"; 193 compatible = "nvidia,tegra20-gpio";
186 reg = <0x6000d000 0x1000>; 194 reg = <0x6000d000 0x1000>;
187 interrupts = <0 32 0x04 195 interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>,
188 0 33 0x04 196 <GIC_SPI 33 IRQ_TYPE_LEVEL_HIGH>,
189 0 34 0x04 197 <GIC_SPI 34 IRQ_TYPE_LEVEL_HIGH>,
190 0 35 0x04 198 <GIC_SPI 35 IRQ_TYPE_LEVEL_HIGH>,
191 0 55 0x04 199 <GIC_SPI 55 IRQ_TYPE_LEVEL_HIGH>,
192 0 87 0x04 200 <GIC_SPI 87 IRQ_TYPE_LEVEL_HIGH>,
193 0 89 0x04>; 201 <GIC_SPI 89 IRQ_TYPE_LEVEL_HIGH>;
194 #gpio-cells = <2>; 202 #gpio-cells = <2>;
195 gpio-controller; 203 gpio-controller;
196 #interrupt-cells = <2>; 204 #interrupt-cells = <2>;
@@ -213,27 +221,27 @@
213 tegra_ac97: ac97 { 221 tegra_ac97: ac97 {
214 compatible = "nvidia,tegra20-ac97"; 222 compatible = "nvidia,tegra20-ac97";
215 reg = <0x70002000 0x200>; 223 reg = <0x70002000 0x200>;
216 interrupts = <0 81 0x04>; 224 interrupts = <GIC_SPI 81 IRQ_TYPE_LEVEL_HIGH>;
217 nvidia,dma-request-selector = <&apbdma 12>; 225 nvidia,dma-request-selector = <&apbdma 12>;
218 clocks = <&tegra_car 3>; 226 clocks = <&tegra_car TEGRA20_CLK_AC97>;
219 status = "disabled"; 227 status = "disabled";
220 }; 228 };
221 229
222 tegra_i2s1: i2s@70002800 { 230 tegra_i2s1: i2s@70002800 {
223 compatible = "nvidia,tegra20-i2s"; 231 compatible = "nvidia,tegra20-i2s";
224 reg = <0x70002800 0x200>; 232 reg = <0x70002800 0x200>;
225 interrupts = <0 13 0x04>; 233 interrupts = <GIC_SPI 13 IRQ_TYPE_LEVEL_HIGH>;
226 nvidia,dma-request-selector = <&apbdma 2>; 234 nvidia,dma-request-selector = <&apbdma 2>;
227 clocks = <&tegra_car 11>; 235 clocks = <&tegra_car TEGRA20_CLK_I2S1>;
228 status = "disabled"; 236 status = "disabled";
229 }; 237 };
230 238
231 tegra_i2s2: i2s@70002a00 { 239 tegra_i2s2: i2s@70002a00 {
232 compatible = "nvidia,tegra20-i2s"; 240 compatible = "nvidia,tegra20-i2s";
233 reg = <0x70002a00 0x200>; 241 reg = <0x70002a00 0x200>;
234 interrupts = <0 3 0x04>; 242 interrupts = <GIC_SPI 3 IRQ_TYPE_LEVEL_HIGH>;
235 nvidia,dma-request-selector = <&apbdma 1>; 243 nvidia,dma-request-selector = <&apbdma 1>;
236 clocks = <&tegra_car 18>; 244 clocks = <&tegra_car TEGRA20_CLK_I2S2>;
237 status = "disabled"; 245 status = "disabled";
238 }; 246 };
239 247
@@ -248,9 +256,9 @@
248 compatible = "nvidia,tegra20-uart"; 256 compatible = "nvidia,tegra20-uart";
249 reg = <0x70006000 0x40>; 257 reg = <0x70006000 0x40>;
250 reg-shift = <2>; 258 reg-shift = <2>;
251 interrupts = <0 36 0x04>; 259 interrupts = <GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH>;
252 nvidia,dma-request-selector = <&apbdma 8>; 260 nvidia,dma-request-selector = <&apbdma 8>;
253 clocks = <&tegra_car 6>; 261 clocks = <&tegra_car TEGRA20_CLK_UARTA>;
254 status = "disabled"; 262 status = "disabled";
255 }; 263 };
256 264
@@ -258,9 +266,9 @@
258 compatible = "nvidia,tegra20-uart"; 266 compatible = "nvidia,tegra20-uart";
259 reg = <0x70006040 0x40>; 267 reg = <0x70006040 0x40>;
260 reg-shift = <2>; 268 reg-shift = <2>;
261 interrupts = <0 37 0x04>; 269 interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>;
262 nvidia,dma-request-selector = <&apbdma 9>; 270 nvidia,dma-request-selector = <&apbdma 9>;
263 clocks = <&tegra_car 96>; 271 clocks = <&tegra_car TEGRA20_CLK_UARTB>;
264 status = "disabled"; 272 status = "disabled";
265 }; 273 };
266 274
@@ -268,9 +276,9 @@
268 compatible = "nvidia,tegra20-uart"; 276 compatible = "nvidia,tegra20-uart";
269 reg = <0x70006200 0x100>; 277 reg = <0x70006200 0x100>;
270 reg-shift = <2>; 278 reg-shift = <2>;
271 interrupts = <0 46 0x04>; 279 interrupts = <GIC_SPI 46 IRQ_TYPE_LEVEL_HIGH>;
272 nvidia,dma-request-selector = <&apbdma 10>; 280 nvidia,dma-request-selector = <&apbdma 10>;
273 clocks = <&tegra_car 55>; 281 clocks = <&tegra_car TEGRA20_CLK_UARTC>;
274 status = "disabled"; 282 status = "disabled";
275 }; 283 };
276 284
@@ -278,9 +286,9 @@
278 compatible = "nvidia,tegra20-uart"; 286 compatible = "nvidia,tegra20-uart";
279 reg = <0x70006300 0x100>; 287 reg = <0x70006300 0x100>;
280 reg-shift = <2>; 288 reg-shift = <2>;
281 interrupts = <0 90 0x04>; 289 interrupts = <GIC_SPI 90 IRQ_TYPE_LEVEL_HIGH>;
282 nvidia,dma-request-selector = <&apbdma 19>; 290 nvidia,dma-request-selector = <&apbdma 19>;
283 clocks = <&tegra_car 65>; 291 clocks = <&tegra_car TEGRA20_CLK_UARTD>;
284 status = "disabled"; 292 status = "disabled";
285 }; 293 };
286 294
@@ -288,9 +296,9 @@
288 compatible = "nvidia,tegra20-uart"; 296 compatible = "nvidia,tegra20-uart";
289 reg = <0x70006400 0x100>; 297 reg = <0x70006400 0x100>;
290 reg-shift = <2>; 298 reg-shift = <2>;
291 interrupts = <0 91 0x04>; 299 interrupts = <GIC_SPI 91 IRQ_TYPE_LEVEL_HIGH>;
292 nvidia,dma-request-selector = <&apbdma 20>; 300 nvidia,dma-request-selector = <&apbdma 20>;
293 clocks = <&tegra_car 66>; 301 clocks = <&tegra_car TEGRA20_CLK_UARTE>;
294 status = "disabled"; 302 status = "disabled";
295 }; 303 };
296 304
@@ -298,24 +306,25 @@
298 compatible = "nvidia,tegra20-pwm"; 306 compatible = "nvidia,tegra20-pwm";
299 reg = <0x7000a000 0x100>; 307 reg = <0x7000a000 0x100>;
300 #pwm-cells = <2>; 308 #pwm-cells = <2>;
301 clocks = <&tegra_car 17>; 309 clocks = <&tegra_car TEGRA20_CLK_PWM>;
302 status = "disabled"; 310 status = "disabled";
303 }; 311 };
304 312
305 rtc { 313 rtc {
306 compatible = "nvidia,tegra20-rtc"; 314 compatible = "nvidia,tegra20-rtc";
307 reg = <0x7000e000 0x100>; 315 reg = <0x7000e000 0x100>;
308 interrupts = <0 2 0x04>; 316 interrupts = <GIC_SPI 2 IRQ_TYPE_LEVEL_HIGH>;
309 clocks = <&tegra_car 4>; 317 clocks = <&tegra_car TEGRA20_CLK_RTC>;
310 }; 318 };
311 319
312 i2c@7000c000 { 320 i2c@7000c000 {
313 compatible = "nvidia,tegra20-i2c"; 321 compatible = "nvidia,tegra20-i2c";
314 reg = <0x7000c000 0x100>; 322 reg = <0x7000c000 0x100>;
315 interrupts = <0 38 0x04>; 323 interrupts = <GIC_SPI 38 IRQ_TYPE_LEVEL_HIGH>;
316 #address-cells = <1>; 324 #address-cells = <1>;
317 #size-cells = <0>; 325 #size-cells = <0>;
318 clocks = <&tegra_car 12>, <&tegra_car 124>; 326 clocks = <&tegra_car TEGRA20_CLK_I2C1>,
327 <&tegra_car TEGRA20_CLK_PLL_P_OUT3>;
319 clock-names = "div-clk", "fast-clk"; 328 clock-names = "div-clk", "fast-clk";
320 status = "disabled"; 329 status = "disabled";
321 }; 330 };
@@ -323,21 +332,22 @@
323 spi@7000c380 { 332 spi@7000c380 {
324 compatible = "nvidia,tegra20-sflash"; 333 compatible = "nvidia,tegra20-sflash";
325 reg = <0x7000c380 0x80>; 334 reg = <0x7000c380 0x80>;
326 interrupts = <0 39 0x04>; 335 interrupts = <GIC_SPI 39 IRQ_TYPE_LEVEL_HIGH>;
327 nvidia,dma-request-selector = <&apbdma 11>; 336 nvidia,dma-request-selector = <&apbdma 11>;
328 #address-cells = <1>; 337 #address-cells = <1>;
329 #size-cells = <0>; 338 #size-cells = <0>;
330 clocks = <&tegra_car 43>; 339 clocks = <&tegra_car TEGRA20_CLK_SPI>;
331 status = "disabled"; 340 status = "disabled";
332 }; 341 };
333 342
334 i2c@7000c400 { 343 i2c@7000c400 {
335 compatible = "nvidia,tegra20-i2c"; 344 compatible = "nvidia,tegra20-i2c";
336 reg = <0x7000c400 0x100>; 345 reg = <0x7000c400 0x100>;
337 interrupts = <0 84 0x04>; 346 interrupts = <GIC_SPI 84 IRQ_TYPE_LEVEL_HIGH>;
338 #address-cells = <1>; 347 #address-cells = <1>;
339 #size-cells = <0>; 348 #size-cells = <0>;
340 clocks = <&tegra_car 54>, <&tegra_car 124>; 349 clocks = <&tegra_car TEGRA20_CLK_I2C2>,
350 <&tegra_car TEGRA20_CLK_PLL_P_OUT3>;
341 clock-names = "div-clk", "fast-clk"; 351 clock-names = "div-clk", "fast-clk";
342 status = "disabled"; 352 status = "disabled";
343 }; 353 };
@@ -345,10 +355,11 @@
345 i2c@7000c500 { 355 i2c@7000c500 {
346 compatible = "nvidia,tegra20-i2c"; 356 compatible = "nvidia,tegra20-i2c";
347 reg = <0x7000c500 0x100>; 357 reg = <0x7000c500 0x100>;
348 interrupts = <0 92 0x04>; 358 interrupts = <GIC_SPI 92 IRQ_TYPE_LEVEL_HIGH>;
349 #address-cells = <1>; 359 #address-cells = <1>;
350 #size-cells = <0>; 360 #size-cells = <0>;
351 clocks = <&tegra_car 67>, <&tegra_car 124>; 361 clocks = <&tegra_car TEGRA20_CLK_I2C3>,
362 <&tegra_car TEGRA20_CLK_PLL_P_OUT3>;
352 clock-names = "div-clk", "fast-clk"; 363 clock-names = "div-clk", "fast-clk";
353 status = "disabled"; 364 status = "disabled";
354 }; 365 };
@@ -356,10 +367,11 @@
356 i2c@7000d000 { 367 i2c@7000d000 {
357 compatible = "nvidia,tegra20-i2c-dvc"; 368 compatible = "nvidia,tegra20-i2c-dvc";
358 reg = <0x7000d000 0x200>; 369 reg = <0x7000d000 0x200>;
359 interrupts = <0 53 0x04>; 370 interrupts = <GIC_SPI 53 IRQ_TYPE_LEVEL_HIGH>;
360 #address-cells = <1>; 371 #address-cells = <1>;
361 #size-cells = <0>; 372 #size-cells = <0>;
362 clocks = <&tegra_car 47>, <&tegra_car 124>; 373 clocks = <&tegra_car TEGRA20_CLK_DVC>,
374 <&tegra_car TEGRA20_CLK_PLL_P_OUT3>;
363 clock-names = "div-clk", "fast-clk"; 375 clock-names = "div-clk", "fast-clk";
364 status = "disabled"; 376 status = "disabled";
365 }; 377 };
@@ -367,59 +379,59 @@
367 spi@7000d400 { 379 spi@7000d400 {
368 compatible = "nvidia,tegra20-slink"; 380 compatible = "nvidia,tegra20-slink";
369 reg = <0x7000d400 0x200>; 381 reg = <0x7000d400 0x200>;
370 interrupts = <0 59 0x04>; 382 interrupts = <GIC_SPI 59 IRQ_TYPE_LEVEL_HIGH>;
371 nvidia,dma-request-selector = <&apbdma 15>; 383 nvidia,dma-request-selector = <&apbdma 15>;
372 #address-cells = <1>; 384 #address-cells = <1>;
373 #size-cells = <0>; 385 #size-cells = <0>;
374 clocks = <&tegra_car 41>; 386 clocks = <&tegra_car TEGRA20_CLK_SBC1>;
375 status = "disabled"; 387 status = "disabled";
376 }; 388 };
377 389
378 spi@7000d600 { 390 spi@7000d600 {
379 compatible = "nvidia,tegra20-slink"; 391 compatible = "nvidia,tegra20-slink";
380 reg = <0x7000d600 0x200>; 392 reg = <0x7000d600 0x200>;
381 interrupts = <0 82 0x04>; 393 interrupts = <GIC_SPI 82 IRQ_TYPE_LEVEL_HIGH>;
382 nvidia,dma-request-selector = <&apbdma 16>; 394 nvidia,dma-request-selector = <&apbdma 16>;
383 #address-cells = <1>; 395 #address-cells = <1>;
384 #size-cells = <0>; 396 #size-cells = <0>;
385 clocks = <&tegra_car 44>; 397 clocks = <&tegra_car TEGRA20_CLK_SBC2>;
386 status = "disabled"; 398 status = "disabled";
387 }; 399 };
388 400
389 spi@7000d800 { 401 spi@7000d800 {
390 compatible = "nvidia,tegra20-slink"; 402 compatible = "nvidia,tegra20-slink";
391 reg = <0x7000d800 0x200>; 403 reg = <0x7000d800 0x200>;
392 interrupts = <0 83 0x04>; 404 interrupts = <GIC_SPI 83 IRQ_TYPE_LEVEL_HIGH>;
393 nvidia,dma-request-selector = <&apbdma 17>; 405 nvidia,dma-request-selector = <&apbdma 17>;
394 #address-cells = <1>; 406 #address-cells = <1>;
395 #size-cells = <0>; 407 #size-cells = <0>;
396 clocks = <&tegra_car 46>; 408 clocks = <&tegra_car TEGRA20_CLK_SBC3>;
397 status = "disabled"; 409 status = "disabled";
398 }; 410 };
399 411
400 spi@7000da00 { 412 spi@7000da00 {
401 compatible = "nvidia,tegra20-slink"; 413 compatible = "nvidia,tegra20-slink";
402 reg = <0x7000da00 0x200>; 414 reg = <0x7000da00 0x200>;
403 interrupts = <0 93 0x04>; 415 interrupts = <GIC_SPI 93 IRQ_TYPE_LEVEL_HIGH>;
404 nvidia,dma-request-selector = <&apbdma 18>; 416 nvidia,dma-request-selector = <&apbdma 18>;
405 #address-cells = <1>; 417 #address-cells = <1>;
406 #size-cells = <0>; 418 #size-cells = <0>;
407 clocks = <&tegra_car 68>; 419 clocks = <&tegra_car TEGRA20_CLK_SBC4>;
408 status = "disabled"; 420 status = "disabled";
409 }; 421 };
410 422
411 kbc { 423 kbc {
412 compatible = "nvidia,tegra20-kbc"; 424 compatible = "nvidia,tegra20-kbc";
413 reg = <0x7000e200 0x100>; 425 reg = <0x7000e200 0x100>;
414 interrupts = <0 85 0x04>; 426 interrupts = <GIC_SPI 85 IRQ_TYPE_LEVEL_HIGH>;
415 clocks = <&tegra_car 36>; 427 clocks = <&tegra_car TEGRA20_CLK_KBC>;
416 status = "disabled"; 428 status = "disabled";
417 }; 429 };
418 430
419 pmc { 431 pmc {
420 compatible = "nvidia,tegra20-pmc"; 432 compatible = "nvidia,tegra20-pmc";
421 reg = <0x7000e400 0x400>; 433 reg = <0x7000e400 0x400>;
422 clocks = <&tegra_car 110>, <&clk32k_in>; 434 clocks = <&tegra_car TEGRA20_CLK_PCLK>, <&clk32k_in>;
423 clock-names = "pclk", "clk32k_in"; 435 clock-names = "pclk", "clk32k_in";
424 }; 436 };
425 437
@@ -427,7 +439,7 @@
427 compatible = "nvidia,tegra20-mc"; 439 compatible = "nvidia,tegra20-mc";
428 reg = <0x7000f000 0x024 440 reg = <0x7000f000 0x024
429 0x7000f03c 0x3c4>; 441 0x7000f03c 0x3c4>;
430 interrupts = <0 77 0x04>; 442 interrupts = <GIC_SPI 77 IRQ_TYPE_LEVEL_HIGH>;
431 }; 443 };
432 444
433 iommu { 445 iommu {
@@ -446,89 +458,114 @@
446 usb@c5000000 { 458 usb@c5000000 {
447 compatible = "nvidia,tegra20-ehci", "usb-ehci"; 459 compatible = "nvidia,tegra20-ehci", "usb-ehci";
448 reg = <0xc5000000 0x4000>; 460 reg = <0xc5000000 0x4000>;
449 interrupts = <0 20 0x04>; 461 interrupts = <GIC_SPI 20 IRQ_TYPE_LEVEL_HIGH>;
450 phy_type = "utmi"; 462 phy_type = "utmi";
451 nvidia,has-legacy-mode; 463 nvidia,has-legacy-mode;
452 clocks = <&tegra_car 22>; 464 clocks = <&tegra_car TEGRA20_CLK_USBD>;
453 nvidia,needs-double-reset; 465 nvidia,needs-double-reset;
454 nvidia,phy = <&phy1>; 466 nvidia,phy = <&phy1>;
455 status = "disabled"; 467 status = "disabled";
456 }; 468 };
457 469
458 phy1: usb-phy@c5000400 { 470 phy1: usb-phy@c5000000 {
459 compatible = "nvidia,tegra20-usb-phy"; 471 compatible = "nvidia,tegra20-usb-phy";
460 reg = <0xc5000400 0x3c00>; 472 reg = <0xc5000000 0x4000 0xc5000000 0x4000>;
461 phy_type = "utmi"; 473 phy_type = "utmi";
474 clocks = <&tegra_car TEGRA20_CLK_USBD>,
475 <&tegra_car TEGRA20_CLK_PLL_U>,
476 <&tegra_car TEGRA20_CLK_CLK_M>,
477 <&tegra_car TEGRA20_CLK_USBD>;
478 clock-names = "reg", "pll_u", "timer", "utmi-pads";
462 nvidia,has-legacy-mode; 479 nvidia,has-legacy-mode;
463 clocks = <&tegra_car 22>, <&tegra_car 127>; 480 hssync_start_delay = <9>;
464 clock-names = "phy", "pll_u"; 481 idle_wait_delay = <17>;
482 elastic_limit = <16>;
483 term_range_adj = <6>;
484 xcvr_setup = <9>;
485 xcvr_lsfslew = <1>;
486 xcvr_lsrslew = <1>;
487 status = "disabled";
465 }; 488 };
466 489
467 usb@c5004000 { 490 usb@c5004000 {
468 compatible = "nvidia,tegra20-ehci", "usb-ehci"; 491 compatible = "nvidia,tegra20-ehci", "usb-ehci";
469 reg = <0xc5004000 0x4000>; 492 reg = <0xc5004000 0x4000>;
470 interrupts = <0 21 0x04>; 493 interrupts = <GIC_SPI 21 IRQ_TYPE_LEVEL_HIGH>;
471 phy_type = "ulpi"; 494 phy_type = "ulpi";
472 clocks = <&tegra_car 58>; 495 clocks = <&tegra_car TEGRA20_CLK_USB2>;
473 nvidia,phy = <&phy2>; 496 nvidia,phy = <&phy2>;
474 status = "disabled"; 497 status = "disabled";
475 }; 498 };
476 499
477 phy2: usb-phy@c5004400 { 500 phy2: usb-phy@c5004000 {
478 compatible = "nvidia,tegra20-usb-phy"; 501 compatible = "nvidia,tegra20-usb-phy";
479 reg = <0xc5004400 0x3c00>; 502 reg = <0xc5004000 0x4000>;
480 phy_type = "ulpi"; 503 phy_type = "ulpi";
481 clocks = <&tegra_car 93>, <&tegra_car 127>; 504 clocks = <&tegra_car TEGRA20_CLK_USB2>,
482 clock-names = "phy", "pll_u"; 505 <&tegra_car TEGRA20_CLK_PLL_U>,
506 <&tegra_car TEGRA20_CLK_CDEV2>;
507 clock-names = "reg", "pll_u", "ulpi-link";
508 status = "disabled";
483 }; 509 };
484 510
485 usb@c5008000 { 511 usb@c5008000 {
486 compatible = "nvidia,tegra20-ehci", "usb-ehci"; 512 compatible = "nvidia,tegra20-ehci", "usb-ehci";
487 reg = <0xc5008000 0x4000>; 513 reg = <0xc5008000 0x4000>;
488 interrupts = <0 97 0x04>; 514 interrupts = <GIC_SPI 97 IRQ_TYPE_LEVEL_HIGH>;
489 phy_type = "utmi"; 515 phy_type = "utmi";
490 clocks = <&tegra_car 59>; 516 clocks = <&tegra_car TEGRA20_CLK_USB3>;
491 nvidia,phy = <&phy3>; 517 nvidia,phy = <&phy3>;
492 status = "disabled"; 518 status = "disabled";
493 }; 519 };
494 520
495 phy3: usb-phy@c5008400 { 521 phy3: usb-phy@c5008000 {
496 compatible = "nvidia,tegra20-usb-phy"; 522 compatible = "nvidia,tegra20-usb-phy";
497 reg = <0xc5008400 0x3c00>; 523 reg = <0xc5008000 0x4000 0xc5000000 0x4000>;
498 phy_type = "utmi"; 524 phy_type = "utmi";
499 clocks = <&tegra_car 22>, <&tegra_car 127>; 525 clocks = <&tegra_car TEGRA20_CLK_USB3>,
500 clock-names = "phy", "pll_u"; 526 <&tegra_car TEGRA20_CLK_PLL_U>,
527 <&tegra_car TEGRA20_CLK_CLK_M>,
528 <&tegra_car TEGRA20_CLK_USBD>;
529 clock-names = "reg", "pll_u", "timer", "utmi-pads";
530 hssync_start_delay = <9>;
531 idle_wait_delay = <17>;
532 elastic_limit = <16>;
533 term_range_adj = <6>;
534 xcvr_setup = <9>;
535 xcvr_lsfslew = <2>;
536 xcvr_lsrslew = <2>;
537 status = "disabled";
501 }; 538 };
502 539
503 sdhci@c8000000 { 540 sdhci@c8000000 {
504 compatible = "nvidia,tegra20-sdhci"; 541 compatible = "nvidia,tegra20-sdhci";
505 reg = <0xc8000000 0x200>; 542 reg = <0xc8000000 0x200>;
506 interrupts = <0 14 0x04>; 543 interrupts = <GIC_SPI 14 IRQ_TYPE_LEVEL_HIGH>;
507 clocks = <&tegra_car 14>; 544 clocks = <&tegra_car TEGRA20_CLK_SDMMC1>;
508 status = "disabled"; 545 status = "disabled";
509 }; 546 };
510 547
511 sdhci@c8000200 { 548 sdhci@c8000200 {
512 compatible = "nvidia,tegra20-sdhci"; 549 compatible = "nvidia,tegra20-sdhci";
513 reg = <0xc8000200 0x200>; 550 reg = <0xc8000200 0x200>;
514 interrupts = <0 15 0x04>; 551 interrupts = <GIC_SPI 15 IRQ_TYPE_LEVEL_HIGH>;
515 clocks = <&tegra_car 9>; 552 clocks = <&tegra_car TEGRA20_CLK_SDMMC2>;
516 status = "disabled"; 553 status = "disabled";
517 }; 554 };
518 555
519 sdhci@c8000400 { 556 sdhci@c8000400 {
520 compatible = "nvidia,tegra20-sdhci"; 557 compatible = "nvidia,tegra20-sdhci";
521 reg = <0xc8000400 0x200>; 558 reg = <0xc8000400 0x200>;
522 interrupts = <0 19 0x04>; 559 interrupts = <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>;
523 clocks = <&tegra_car 69>; 560 clocks = <&tegra_car TEGRA20_CLK_SDMMC3>;
524 status = "disabled"; 561 status = "disabled";
525 }; 562 };
526 563
527 sdhci@c8000600 { 564 sdhci@c8000600 {
528 compatible = "nvidia,tegra20-sdhci"; 565 compatible = "nvidia,tegra20-sdhci";
529 reg = <0xc8000600 0x200>; 566 reg = <0xc8000600 0x200>;
530 interrupts = <0 31 0x04>; 567 interrupts = <GIC_SPI 31 IRQ_TYPE_LEVEL_HIGH>;
531 clocks = <&tegra_car 15>; 568 clocks = <&tegra_car TEGRA20_CLK_SDMMC4>;
532 status = "disabled"; 569 status = "disabled";
533 }; 570 };
534 571
@@ -551,7 +588,7 @@
551 588
552 pmu { 589 pmu {
553 compatible = "arm,cortex-a9-pmu"; 590 compatible = "arm,cortex-a9-pmu";
554 interrupts = <0 56 0x04 591 interrupts = <GIC_SPI 56 IRQ_TYPE_LEVEL_HIGH>,
555 0 57 0x04>; 592 <GIC_SPI 57 IRQ_TYPE_LEVEL_HIGH>;
556 }; 593 };
557}; 594};
diff --git a/arch/arm/boot/dts/tegra30-beaver.dts b/arch/arm/boot/dts/tegra30-beaver.dts
index b732f7c13a66..87c5f7b7c271 100644
--- a/arch/arm/boot/dts/tegra30-beaver.dts
+++ b/arch/arm/boot/dts/tegra30-beaver.dts
@@ -1,13 +1,13 @@
1/dts-v1/; 1/dts-v1/;
2 2
3/include/ "tegra30.dtsi" 3#include "tegra30.dtsi"
4 4
5/ { 5/ {
6 model = "NVIDIA Tegra30 Beaver evaluation board"; 6 model = "NVIDIA Tegra30 Beaver evaluation board";
7 compatible = "nvidia,beaver", "nvidia,tegra30"; 7 compatible = "nvidia,beaver", "nvidia,tegra30";
8 8
9 memory { 9 memory {
10 reg = <0x80000000 0x80000000>; 10 reg = <0x80000000 0x7ff00000>;
11 }; 11 };
12 12
13 pinmux { 13 pinmux {
@@ -116,6 +116,15 @@
116 status = "okay"; 116 status = "okay";
117 clock-frequency = <100000>; 117 clock-frequency = <100000>;
118 118
119 rt5640: rt5640 {
120 compatible = "realtek,rt5640";
121 reg = <0x1c>;
122 interrupt-parent = <&gpio>;
123 interrupts = <TEGRA_GPIO(X, 3) GPIO_ACTIVE_HIGH>;
124 realtek,ldo1-en-gpios =
125 <&gpio TEGRA_GPIO(X, 2) GPIO_ACTIVE_HIGH>;
126 };
127
119 tps62361 { 128 tps62361 {
120 compatible = "ti,tps62361"; 129 compatible = "ti,tps62361";
121 reg = <0x60>; 130 reg = <0x60>;
@@ -133,7 +142,7 @@
133 compatible = "ti,tps65911"; 142 compatible = "ti,tps65911";
134 reg = <0x2d>; 143 reg = <0x2d>;
135 144
136 interrupts = <0 86 0x4>; 145 interrupts = <GIC_SPI 86 IRQ_TYPE_LEVEL_HIGH>;
137 #interrupt-cells = <2>; 146 #interrupt-cells = <2>;
138 interrupt-controller; 147 interrupt-controller;
139 148
@@ -264,9 +273,9 @@
264 273
265 sdhci@78000000 { 274 sdhci@78000000 {
266 status = "okay"; 275 status = "okay";
267 cd-gpios = <&gpio 69 1>; /* gpio PI5 */ 276 cd-gpios = <&gpio TEGRA_GPIO(I, 5) GPIO_ACTIVE_LOW>;
268 wp-gpios = <&gpio 155 0>; /* gpio PT3 */ 277 wp-gpios = <&gpio TEGRA_GPIO(T, 3) GPIO_ACTIVE_HIGH>;
269 power-gpios = <&gpio 31 0>; /* gpio PD7 */ 278 power-gpios = <&gpio TEGRA_GPIO(D, 7) GPIO_ACTIVE_HIGH>;
270 bus-width = <4>; 279 bus-width = <4>;
271 }; 280 };
272 281
@@ -312,7 +321,7 @@
312 regulator-boot-on; 321 regulator-boot-on;
313 regulator-always-on; 322 regulator-always-on;
314 enable-active-high; 323 enable-active-high;
315 gpio = <&pmic 0 0>; /* PMIC TPS65911 GPIO0 */ 324 gpio = <&pmic 0 GPIO_ACTIVE_HIGH>;
316 }; 325 };
317 326
318 ddr_reg: regulator@2 { 327 ddr_reg: regulator@2 {
@@ -324,7 +333,7 @@
324 regulator-always-on; 333 regulator-always-on;
325 regulator-boot-on; 334 regulator-boot-on;
326 enable-active-high; 335 enable-active-high;
327 gpio = <&pmic 7 0>; /* PMIC TPS65911 GPIO7 */ 336 gpio = <&pmic 7 GPIO_ACTIVE_HIGH>;
328 vin-supply = <&vdd_5v_in_reg>; 337 vin-supply = <&vdd_5v_in_reg>;
329 }; 338 };
330 339
@@ -337,7 +346,7 @@
337 regulator-always-on; 346 regulator-always-on;
338 regulator-boot-on; 347 regulator-boot-on;
339 enable-active-high; 348 enable-active-high;
340 gpio = <&gpio 30 0>; /* gpio PD6 */ 349 gpio = <&gpio TEGRA_GPIO(D, 6) GPIO_ACTIVE_HIGH>;
341 vin-supply = <&vdd_5v_in_reg>; 350 vin-supply = <&vdd_5v_in_reg>;
342 }; 351 };
343 352
@@ -348,7 +357,7 @@
348 regulator-min-microvolt = <5000000>; 357 regulator-min-microvolt = <5000000>;
349 regulator-max-microvolt = <5000000>; 358 regulator-max-microvolt = <5000000>;
350 enable-active-high; 359 enable-active-high;
351 gpio = <&gpio 68 0>; /* GPIO PI4 */ 360 gpio = <&gpio TEGRA_GPIO(I, 4) GPIO_ACTIVE_HIGH>;
352 gpio-open-drain; 361 gpio-open-drain;
353 vin-supply = <&vdd_5v_in_reg>; 362 vin-supply = <&vdd_5v_in_reg>;
354 }; 363 };
@@ -360,7 +369,7 @@
360 regulator-min-microvolt = <5000000>; 369 regulator-min-microvolt = <5000000>;
361 regulator-max-microvolt = <5000000>; 370 regulator-max-microvolt = <5000000>;
362 enable-active-high; 371 enable-active-high;
363 gpio = <&gpio 63 0>; /* GPIO PH7 */ 372 gpio = <&gpio TEGRA_GPIO(H, 7) GPIO_ACTIVE_HIGH>;
364 gpio-open-drain; 373 gpio-open-drain;
365 vin-supply = <&vdd_5v_in_reg>; 374 vin-supply = <&vdd_5v_in_reg>;
366 }; 375 };
@@ -374,7 +383,7 @@
374 regulator-always-on; 383 regulator-always-on;
375 regulator-boot-on; 384 regulator-boot-on;
376 enable-active-high; 385 enable-active-high;
377 gpio = <&pmic 6 0>; /* PMIC TPS65911 GPIO6 */ 386 gpio = <&pmic 6 GPIO_ACTIVE_HIGH>;
378 vin-supply = <&vdd_5v_in_reg>; 387 vin-supply = <&vdd_5v_in_reg>;
379 }; 388 };
380 389
@@ -387,8 +396,41 @@
387 regulator-always-on; 396 regulator-always-on;
388 regulator-boot-on; 397 regulator-boot-on;
389 enable-active-high; 398 enable-active-high;
390 gpio = <&gpio 95 0>; /* gpio PL7 */ 399 gpio = <&gpio TEGRA_GPIO(L, 7) GPIO_ACTIVE_HIGH>;
391 vin-supply = <&sys_3v3_reg>; 400 vin-supply = <&sys_3v3_reg>;
392 }; 401 };
393 }; 402 };
403
404 gpio-leds {
405 compatible = "gpio-leds";
406
407 gpled1 {
408 label = "LED1"; /* CR5A1 (blue) */
409 gpios = <&gpio TEGRA_GPIO(L, 1) GPIO_ACTIVE_HIGH>;
410 };
411 gpled2 {
412 label = "LED2"; /* CR4A2 (green) */
413 gpios = <&gpio TEGRA_GPIO(L, 0) GPIO_ACTIVE_HIGH>;
414 };
415 };
416
417 sound {
418 compatible = "nvidia,tegra-audio-rt5640-beaver",
419 "nvidia,tegra-audio-rt5640";
420 nvidia,model = "NVIDIA Tegra Beaver";
421
422 nvidia,audio-routing =
423 "Headphones", "HPOR",
424 "Headphones", "HPOL";
425
426 nvidia,i2s-controller = <&tegra_i2s1>;
427 nvidia,audio-codec = <&rt5640>;
428
429 nvidia,hp-det-gpios = <&gpio TEGRA_GPIO(W, 2) GPIO_ACTIVE_HIGH>;
430
431 clocks = <&tegra_car TEGRA30_CLK_PLL_A>,
432 <&tegra_car TEGRA30_CLK_PLL_A_OUT0>,
433 <&tegra_car TEGRA30_CLK_EXTERN1>;
434 clock-names = "pll_a", "pll_a_out0", "mclk";
435 };
394}; 436};
diff --git a/arch/arm/boot/dts/tegra30-cardhu-a02.dts b/arch/arm/boot/dts/tegra30-cardhu-a02.dts
index e392bd2dab9b..1082c5ed90d1 100644
--- a/arch/arm/boot/dts/tegra30-cardhu-a02.dts
+++ b/arch/arm/boot/dts/tegra30-cardhu-a02.dts
@@ -1,6 +1,6 @@
1/dts-v1/; 1/dts-v1/;
2 2
3/include/ "tegra30-cardhu.dtsi" 3#include "tegra30-cardhu.dtsi"
4 4
5/* This dts file support the cardhu A02 version of board */ 5/* This dts file support the cardhu A02 version of board */
6 6
@@ -22,7 +22,7 @@
22 regulator-always-on; 22 regulator-always-on;
23 regulator-boot-on; 23 regulator-boot-on;
24 enable-active-high; 24 enable-active-high;
25 gpio = <&pmic 6 0>; 25 gpio = <&pmic 6 GPIO_ACTIVE_HIGH>;
26 }; 26 };
27 27
28 sys_3v3_reg: regulator@101 { 28 sys_3v3_reg: regulator@101 {
@@ -34,7 +34,7 @@
34 regulator-always-on; 34 regulator-always-on;
35 regulator-boot-on; 35 regulator-boot-on;
36 enable-active-high; 36 enable-active-high;
37 gpio = <&pmic 7 0>; 37 gpio = <&pmic 7 GPIO_ACTIVE_HIGH>;
38 }; 38 };
39 39
40 usb1_vbus_reg: regulator@102 { 40 usb1_vbus_reg: regulator@102 {
@@ -44,7 +44,7 @@
44 regulator-min-microvolt = <5000000>; 44 regulator-min-microvolt = <5000000>;
45 regulator-max-microvolt = <5000000>; 45 regulator-max-microvolt = <5000000>;
46 enable-active-high; 46 enable-active-high;
47 gpio = <&gpio 68 0>; /* GPIO PI4 */ 47 gpio = <&gpio TEGRA_GPIO(I, 4) GPIO_ACTIVE_HIGH>;
48 gpio-open-drain; 48 gpio-open-drain;
49 vin-supply = <&vdd_5v0_reg>; 49 vin-supply = <&vdd_5v0_reg>;
50 }; 50 };
@@ -56,7 +56,7 @@
56 regulator-min-microvolt = <5000000>; 56 regulator-min-microvolt = <5000000>;
57 regulator-max-microvolt = <5000000>; 57 regulator-max-microvolt = <5000000>;
58 enable-active-high; 58 enable-active-high;
59 gpio = <&gpio 63 0>; /* GPIO PH7 */ 59 gpio = <&gpio TEGRA_GPIO(H, 7) GPIO_ACTIVE_HIGH>;
60 gpio-open-drain; 60 gpio-open-drain;
61 vin-supply = <&vdd_5v0_reg>; 61 vin-supply = <&vdd_5v0_reg>;
62 }; 62 };
@@ -68,7 +68,7 @@
68 regulator-min-microvolt = <5000000>; 68 regulator-min-microvolt = <5000000>;
69 regulator-max-microvolt = <5000000>; 69 regulator-max-microvolt = <5000000>;
70 enable-active-high; 70 enable-active-high;
71 gpio = <&pmic 2 0>; 71 gpio = <&pmic 2 GPIO_ACTIVE_HIGH>;
72 }; 72 };
73 73
74 vdd_bl_reg: regulator@105 { 74 vdd_bl_reg: regulator@105 {
@@ -80,13 +80,13 @@
80 regulator-always-on; 80 regulator-always-on;
81 regulator-boot-on; 81 regulator-boot-on;
82 enable-active-high; 82 enable-active-high;
83 gpio = <&gpio 83 0>; /* GPIO PK3 */ 83 gpio = <&gpio TEGRA_GPIO(K, 3) GPIO_ACTIVE_HIGH>;
84 }; 84 };
85 }; 85 };
86 86
87 sdhci@78000400 { 87 sdhci@78000400 {
88 status = "okay"; 88 status = "okay";
89 power-gpios = <&gpio 28 0>; /* gpio PD4 */ 89 power-gpios = <&gpio TEGRA_GPIO(D, 4) GPIO_ACTIVE_HIGH>;
90 bus-width = <4>; 90 bus-width = <4>;
91 keep-power-in-suspend; 91 keep-power-in-suspend;
92 }; 92 };
diff --git a/arch/arm/boot/dts/tegra30-cardhu-a04.dts b/arch/arm/boot/dts/tegra30-cardhu-a04.dts
index d0db6c7e774f..bf012bddaafb 100644
--- a/arch/arm/boot/dts/tegra30-cardhu-a04.dts
+++ b/arch/arm/boot/dts/tegra30-cardhu-a04.dts
@@ -1,6 +1,6 @@
1/dts-v1/; 1/dts-v1/;
2 2
3/include/ "tegra30-cardhu.dtsi" 3#include "tegra30-cardhu.dtsi"
4 4
5/* This dts file support the cardhu A04 and later versions of board */ 5/* This dts file support the cardhu A04 and later versions of board */
6 6
@@ -22,7 +22,7 @@
22 regulator-always-on; 22 regulator-always-on;
23 regulator-boot-on; 23 regulator-boot-on;
24 enable-active-high; 24 enable-active-high;
25 gpio = <&pmic 7 0>; 25 gpio = <&pmic 7 GPIO_ACTIVE_HIGH>;
26 }; 26 };
27 27
28 sys_3v3_reg: regulator@101 { 28 sys_3v3_reg: regulator@101 {
@@ -34,7 +34,7 @@
34 regulator-always-on; 34 regulator-always-on;
35 regulator-boot-on; 35 regulator-boot-on;
36 enable-active-high; 36 enable-active-high;
37 gpio = <&pmic 6 0>; 37 gpio = <&pmic 6 GPIO_ACTIVE_HIGH>;
38 }; 38 };
39 39
40 usb1_vbus_reg: regulator@102 { 40 usb1_vbus_reg: regulator@102 {
@@ -44,7 +44,7 @@
44 regulator-min-microvolt = <5000000>; 44 regulator-min-microvolt = <5000000>;
45 regulator-max-microvolt = <5000000>; 45 regulator-max-microvolt = <5000000>;
46 enable-active-high; 46 enable-active-high;
47 gpio = <&gpio 238 0>; /* GPIO PDD6 */ 47 gpio = <&gpio TEGRA_GPIO(DD, 6) GPIO_ACTIVE_HIGH>;
48 gpio-open-drain; 48 gpio-open-drain;
49 vin-supply = <&vdd_5v0_reg>; 49 vin-supply = <&vdd_5v0_reg>;
50 }; 50 };
@@ -56,7 +56,7 @@
56 regulator-min-microvolt = <5000000>; 56 regulator-min-microvolt = <5000000>;
57 regulator-max-microvolt = <5000000>; 57 regulator-max-microvolt = <5000000>;
58 enable-active-high; 58 enable-active-high;
59 gpio = <&gpio 236 0>; /* GPIO PDD4 */ 59 gpio = <&gpio TEGRA_GPIO(DD, 4) GPIO_ACTIVE_HIGH>;
60 gpio-open-drain; 60 gpio-open-drain;
61 vin-supply = <&vdd_5v0_reg>; 61 vin-supply = <&vdd_5v0_reg>;
62 }; 62 };
@@ -68,7 +68,7 @@
68 regulator-min-microvolt = <5000000>; 68 regulator-min-microvolt = <5000000>;
69 regulator-max-microvolt = <5000000>; 69 regulator-max-microvolt = <5000000>;
70 enable-active-high; 70 enable-active-high;
71 gpio = <&pmic 8 0>; 71 gpio = <&pmic 8 GPIO_ACTIVE_HIGH>;
72 }; 72 };
73 73
74 vdd_bl_reg: regulator@105 { 74 vdd_bl_reg: regulator@105 {
@@ -80,7 +80,7 @@
80 regulator-always-on; 80 regulator-always-on;
81 regulator-boot-on; 81 regulator-boot-on;
82 enable-active-high; 82 enable-active-high;
83 gpio = <&gpio 234 0>; /* GPIO PDD2 */ 83 gpio = <&gpio TEGRA_GPIO(DD, 2) GPIO_ACTIVE_HIGH>;
84 }; 84 };
85 85
86 vdd_bl2_reg: regulator@106 { 86 vdd_bl2_reg: regulator@106 {
@@ -92,13 +92,13 @@
92 regulator-always-on; 92 regulator-always-on;
93 regulator-boot-on; 93 regulator-boot-on;
94 enable-active-high; 94 enable-active-high;
95 gpio = <&gpio 232 0>; /* GPIO PDD0 */ 95 gpio = <&gpio TEGRA_GPIO(DD, 0) GPIO_ACTIVE_HIGH>;
96 }; 96 };
97 }; 97 };
98 98
99 sdhci@78000400 { 99 sdhci@78000400 {
100 status = "okay"; 100 status = "okay";
101 power-gpios = <&gpio 27 0>; /* gpio PD3 */ 101 power-gpios = <&gpio TEGRA_GPIO(D, 3) GPIO_ACTIVE_HIGH>;
102 bus-width = <4>; 102 bus-width = <4>;
103 keep-power-in-suspend; 103 keep-power-in-suspend;
104 }; 104 };
diff --git a/arch/arm/boot/dts/tegra30-cardhu.dtsi b/arch/arm/boot/dts/tegra30-cardhu.dtsi
index 01b4c26fad96..f65b53d32416 100644
--- a/arch/arm/boot/dts/tegra30-cardhu.dtsi
+++ b/arch/arm/boot/dts/tegra30-cardhu.dtsi
@@ -1,4 +1,4 @@
1/include/ "tegra30.dtsi" 1#include "tegra30.dtsi"
2 2
3/** 3/**
4 * This file contains common DT entry for all fab version of Cardhu. 4 * This file contains common DT entry for all fab version of Cardhu.
@@ -146,7 +146,7 @@
146 compatible = "isil,isl29028"; 146 compatible = "isil,isl29028";
147 reg = <0x44>; 147 reg = <0x44>;
148 interrupt-parent = <&gpio>; 148 interrupt-parent = <&gpio>;
149 interrupts = <88 0x04>; /*gpio PL0 */ 149 interrupts = <TEGRA_GPIO(L, 0) IRQ_TYPE_LEVEL_HIGH>;
150 }; 150 };
151 }; 151 };
152 152
@@ -163,7 +163,7 @@
163 compatible = "wlf,wm8903"; 163 compatible = "wlf,wm8903";
164 reg = <0x1a>; 164 reg = <0x1a>;
165 interrupt-parent = <&gpio>; 165 interrupt-parent = <&gpio>;
166 interrupts = <179 0x04>; /* gpio PW3 */ 166 interrupts = <TEGRA_GPIO(W, 3) IRQ_TYPE_LEVEL_HIGH>;
167 167
168 gpio-controller; 168 gpio-controller;
169 #gpio-cells = <2>; 169 #gpio-cells = <2>;
@@ -190,7 +190,7 @@
190 compatible = "ti,tps65911"; 190 compatible = "ti,tps65911";
191 reg = <0x2d>; 191 reg = <0x2d>;
192 192
193 interrupts = <0 86 0x4>; 193 interrupts = <GIC_SPI 86 IRQ_TYPE_LEVEL_HIGH>;
194 #interrupt-cells = <2>; 194 #interrupt-cells = <2>;
195 interrupt-controller; 195 interrupt-controller;
196 196
@@ -318,9 +318,9 @@
318 318
319 sdhci@78000000 { 319 sdhci@78000000 {
320 status = "okay"; 320 status = "okay";
321 cd-gpios = <&gpio 69 1>; /* gpio PI5 */ 321 cd-gpios = <&gpio TEGRA_GPIO(I, 5) GPIO_ACTIVE_LOW>;
322 wp-gpios = <&gpio 155 0>; /* gpio PT3 */ 322 wp-gpios = <&gpio TEGRA_GPIO(T, 3) GPIO_ACTIVE_HIGH>;
323 power-gpios = <&gpio 31 0>; /* gpio PD7 */ 323 power-gpios = <&gpio TEGRA_GPIO(D, 7) GPIO_ACTIVE_HIGH>;
324 bus-width = <4>; 324 bus-width = <4>;
325 }; 325 };
326 326
@@ -364,7 +364,7 @@
364 regulator-min-microvolt = <1800000>; 364 regulator-min-microvolt = <1800000>;
365 regulator-max-microvolt = <1800000>; 365 regulator-max-microvolt = <1800000>;
366 enable-active-high; 366 enable-active-high;
367 gpio = <&gpio 220 0>; /* gpio PBB4 */ 367 gpio = <&gpio TEGRA_GPIO(BB, 4) GPIO_ACTIVE_HIGH>;
368 vin-supply = <&vio_reg>; 368 vin-supply = <&vio_reg>;
369 }; 369 };
370 370
@@ -377,7 +377,7 @@
377 regulator-boot-on; 377 regulator-boot-on;
378 regulator-always-on; 378 regulator-always-on;
379 enable-active-high; 379 enable-active-high;
380 gpio = <&pmic 0 0>; /* PMIC TPS65911 GPIO0 */ 380 gpio = <&pmic 0 GPIO_ACTIVE_HIGH>;
381 }; 381 };
382 382
383 emmc_3v3_reg: regulator@3 { 383 emmc_3v3_reg: regulator@3 {
@@ -389,7 +389,7 @@
389 regulator-always-on; 389 regulator-always-on;
390 regulator-boot-on; 390 regulator-boot-on;
391 enable-active-high; 391 enable-active-high;
392 gpio = <&gpio 25 0>; /* gpio PD1 */ 392 gpio = <&gpio TEGRA_GPIO(D, 1) GPIO_ACTIVE_HIGH>;
393 vin-supply = <&sys_3v3_reg>; 393 vin-supply = <&sys_3v3_reg>;
394 }; 394 };
395 395
@@ -400,7 +400,7 @@
400 regulator-min-microvolt = <3300000>; 400 regulator-min-microvolt = <3300000>;
401 regulator-max-microvolt = <3300000>; 401 regulator-max-microvolt = <3300000>;
402 enable-active-high; 402 enable-active-high;
403 gpio = <&gpio 30 0>; /* gpio PD6 */ 403 gpio = <&gpio TEGRA_GPIO(D, 6) GPIO_ACTIVE_HIGH>;
404 }; 404 };
405 405
406 pex_hvdd_3v3_reg: regulator@5 { 406 pex_hvdd_3v3_reg: regulator@5 {
@@ -410,7 +410,7 @@
410 regulator-min-microvolt = <3300000>; 410 regulator-min-microvolt = <3300000>;
411 regulator-max-microvolt = <3300000>; 411 regulator-max-microvolt = <3300000>;
412 enable-active-high; 412 enable-active-high;
413 gpio = <&gpio 95 0>; /* gpio PL7 */ 413 gpio = <&gpio TEGRA_GPIO(L, 7) GPIO_ACTIVE_HIGH>;
414 vin-supply = <&sys_3v3_reg>; 414 vin-supply = <&sys_3v3_reg>;
415 }; 415 };
416 416
@@ -421,7 +421,7 @@
421 regulator-min-microvolt = <2800000>; 421 regulator-min-microvolt = <2800000>;
422 regulator-max-microvolt = <2800000>; 422 regulator-max-microvolt = <2800000>;
423 enable-active-high; 423 enable-active-high;
424 gpio = <&gpio 142 0>; /* gpio PR6 */ 424 gpio = <&gpio TEGRA_GPIO(R, 6) GPIO_ACTIVE_HIGH>;
425 vin-supply = <&sys_3v3_reg>; 425 vin-supply = <&sys_3v3_reg>;
426 }; 426 };
427 427
@@ -432,7 +432,7 @@
432 regulator-min-microvolt = <2800000>; 432 regulator-min-microvolt = <2800000>;
433 regulator-max-microvolt = <2800000>; 433 regulator-max-microvolt = <2800000>;
434 enable-active-high; 434 enable-active-high;
435 gpio = <&gpio 143 0>; /* gpio PR7 */ 435 gpio = <&gpio TEGRA_GPIO(R, 7) GPIO_ACTIVE_HIGH>;
436 vin-supply = <&sys_3v3_reg>; 436 vin-supply = <&sys_3v3_reg>;
437 }; 437 };
438 438
@@ -443,7 +443,7 @@
443 regulator-min-microvolt = <3300000>; 443 regulator-min-microvolt = <3300000>;
444 regulator-max-microvolt = <3300000>; 444 regulator-max-microvolt = <3300000>;
445 enable-active-high; 445 enable-active-high;
446 gpio = <&gpio 144 0>; /* gpio PS0 */ 446 gpio = <&gpio TEGRA_GPIO(S, 0) GPIO_ACTIVE_HIGH>;
447 vin-supply = <&sys_3v3_reg>; 447 vin-supply = <&sys_3v3_reg>;
448 }; 448 };
449 449
@@ -456,7 +456,7 @@
456 regulator-always-on; 456 regulator-always-on;
457 regulator-boot-on; 457 regulator-boot-on;
458 enable-active-high; 458 enable-active-high;
459 gpio = <&gpio 24 0>; /* gpio PD0 */ 459 gpio = <&gpio TEGRA_GPIO(D, 0) GPIO_ACTIVE_HIGH>;
460 vin-supply = <&sys_3v3_reg>; 460 vin-supply = <&sys_3v3_reg>;
461 }; 461 };
462 462
@@ -467,7 +467,7 @@
467 regulator-min-microvolt = <3300000>; 467 regulator-min-microvolt = <3300000>;
468 regulator-max-microvolt = <3300000>; 468 regulator-max-microvolt = <3300000>;
469 enable-active-high; 469 enable-active-high;
470 gpio = <&gpio 94 0>; /* gpio PL6 */ 470 gpio = <&gpio TEGRA_GPIO(L, 6) GPIO_ACTIVE_HIGH>;
471 vin-supply = <&sys_3v3_reg>; 471 vin-supply = <&sys_3v3_reg>;
472 }; 472 };
473 473
@@ -480,7 +480,7 @@
480 regulator-always-on; 480 regulator-always-on;
481 regulator-boot-on; 481 regulator-boot-on;
482 enable-active-high; 482 enable-active-high;
483 gpio = <&gpio 92 0>; /* gpio PL4 */ 483 gpio = <&gpio TEGRA_GPIO(L, 4) GPIO_ACTIVE_HIGH>;
484 vin-supply = <&sys_3v3_reg>; 484 vin-supply = <&sys_3v3_reg>;
485 }; 485 };
486 486
@@ -491,7 +491,7 @@
491 regulator-min-microvolt = <5000000>; 491 regulator-min-microvolt = <5000000>;
492 regulator-max-microvolt = <5000000>; 492 regulator-max-microvolt = <5000000>;
493 enable-active-high; 493 enable-active-high;
494 gpio = <&gpio 152 0>; /* GPIO PT0 */ 494 gpio = <&gpio TEGRA_GPIO(T, 0) GPIO_ACTIVE_HIGH>;
495 gpio-open-drain; 495 gpio-open-drain;
496 vin-supply = <&vdd_5v0_reg>; 496 vin-supply = <&vdd_5v0_reg>;
497 }; 497 };
@@ -515,10 +515,13 @@
515 nvidia,i2s-controller = <&tegra_i2s1>; 515 nvidia,i2s-controller = <&tegra_i2s1>;
516 nvidia,audio-codec = <&wm8903>; 516 nvidia,audio-codec = <&wm8903>;
517 517
518 nvidia,spkr-en-gpios = <&wm8903 2 0>; 518 nvidia,spkr-en-gpios = <&wm8903 2 GPIO_ACTIVE_HIGH>;
519 nvidia,hp-det-gpios = <&gpio 178 0>; /* gpio PW2 */ 519 nvidia,hp-det-gpios = <&gpio TEGRA_GPIO(W, 2)
520 GPIO_ACTIVE_HIGH>;
520 521
521 clocks = <&tegra_car 184>, <&tegra_car 185>, <&tegra_car 120>; 522 clocks = <&tegra_car TEGRA30_CLK_PLL_A>,
523 <&tegra_car TEGRA30_CLK_PLL_A_OUT0>,
524 <&tegra_car TEGRA30_CLK_EXTERN1>;
522 clock-names = "pll_a", "pll_a_out0", "mclk"; 525 clock-names = "pll_a", "pll_a_out0", "mclk";
523 }; 526 };
524}; 527};
diff --git a/arch/arm/boot/dts/tegra30.dtsi b/arch/arm/boot/dts/tegra30.dtsi
index 15ded605142a..d8783f0fae63 100644
--- a/arch/arm/boot/dts/tegra30.dtsi
+++ b/arch/arm/boot/dts/tegra30.dtsi
@@ -1,4 +1,8 @@
1/include/ "skeleton.dtsi" 1#include <dt-bindings/clock/tegra30-car.h>
2#include <dt-bindings/gpio/tegra-gpio.h>
3#include <dt-bindings/interrupt-controller/arm-gic.h>
4
5#include "skeleton.dtsi"
2 6
3/ { 7/ {
4 compatible = "nvidia,tegra30"; 8 compatible = "nvidia,tegra30";
@@ -15,9 +19,9 @@
15 host1x { 19 host1x {
16 compatible = "nvidia,tegra30-host1x", "simple-bus"; 20 compatible = "nvidia,tegra30-host1x", "simple-bus";
17 reg = <0x50000000 0x00024000>; 21 reg = <0x50000000 0x00024000>;
18 interrupts = <0 65 0x04 /* mpcore syncpt */ 22 interrupts = <GIC_SPI 65 IRQ_TYPE_LEVEL_HIGH>, /* syncpt */
19 0 67 0x04>; /* mpcore general */ 23 <GIC_SPI 67 IRQ_TYPE_LEVEL_HIGH>; /* general */
20 clocks = <&tegra_car 28>; 24 clocks = <&tegra_car TEGRA30_CLK_HOST1X>;
21 25
22 #address-cells = <1>; 26 #address-cells = <1>;
23 #size-cells = <1>; 27 #size-cells = <1>;
@@ -27,36 +31,36 @@
27 mpe { 31 mpe {
28 compatible = "nvidia,tegra30-mpe"; 32 compatible = "nvidia,tegra30-mpe";
29 reg = <0x54040000 0x00040000>; 33 reg = <0x54040000 0x00040000>;
30 interrupts = <0 68 0x04>; 34 interrupts = <GIC_SPI 68 IRQ_TYPE_LEVEL_HIGH>;
31 clocks = <&tegra_car 60>; 35 clocks = <&tegra_car TEGRA30_CLK_MPE>;
32 }; 36 };
33 37
34 vi { 38 vi {
35 compatible = "nvidia,tegra30-vi"; 39 compatible = "nvidia,tegra30-vi";
36 reg = <0x54080000 0x00040000>; 40 reg = <0x54080000 0x00040000>;
37 interrupts = <0 69 0x04>; 41 interrupts = <GIC_SPI 69 IRQ_TYPE_LEVEL_HIGH>;
38 clocks = <&tegra_car 164>; 42 clocks = <&tegra_car TEGRA30_CLK_VI>;
39 }; 43 };
40 44
41 epp { 45 epp {
42 compatible = "nvidia,tegra30-epp"; 46 compatible = "nvidia,tegra30-epp";
43 reg = <0x540c0000 0x00040000>; 47 reg = <0x540c0000 0x00040000>;
44 interrupts = <0 70 0x04>; 48 interrupts = <GIC_SPI 70 IRQ_TYPE_LEVEL_HIGH>;
45 clocks = <&tegra_car 19>; 49 clocks = <&tegra_car TEGRA30_CLK_EPP>;
46 }; 50 };
47 51
48 isp { 52 isp {
49 compatible = "nvidia,tegra30-isp"; 53 compatible = "nvidia,tegra30-isp";
50 reg = <0x54100000 0x00040000>; 54 reg = <0x54100000 0x00040000>;
51 interrupts = <0 71 0x04>; 55 interrupts = <GIC_SPI 71 IRQ_TYPE_LEVEL_HIGH>;
52 clocks = <&tegra_car 23>; 56 clocks = <&tegra_car TEGRA30_CLK_ISP>;
53 }; 57 };
54 58
55 gr2d { 59 gr2d {
56 compatible = "nvidia,tegra30-gr2d"; 60 compatible = "nvidia,tegra30-gr2d";
57 reg = <0x54140000 0x00040000>; 61 reg = <0x54140000 0x00040000>;
58 interrupts = <0 72 0x04>; 62 interrupts = <GIC_SPI 72 IRQ_TYPE_LEVEL_HIGH>;
59 clocks = <&tegra_car 21>; 63 clocks = <&tegra_car TEGRA30_CLK_GR2D>;
60 }; 64 };
61 65
62 gr3d { 66 gr3d {
@@ -69,8 +73,9 @@
69 dc@54200000 { 73 dc@54200000 {
70 compatible = "nvidia,tegra30-dc"; 74 compatible = "nvidia,tegra30-dc";
71 reg = <0x54200000 0x00040000>; 75 reg = <0x54200000 0x00040000>;
72 interrupts = <0 73 0x04>; 76 interrupts = <GIC_SPI 73 IRQ_TYPE_LEVEL_HIGH>;
73 clocks = <&tegra_car 27>, <&tegra_car 179>; 77 clocks = <&tegra_car TEGRA30_CLK_DISP1>,
78 <&tegra_car TEGRA30_CLK_PLL_P>;
74 clock-names = "disp1", "parent"; 79 clock-names = "disp1", "parent";
75 80
76 rgb { 81 rgb {
@@ -81,8 +86,9 @@
81 dc@54240000 { 86 dc@54240000 {
82 compatible = "nvidia,tegra30-dc"; 87 compatible = "nvidia,tegra30-dc";
83 reg = <0x54240000 0x00040000>; 88 reg = <0x54240000 0x00040000>;
84 interrupts = <0 74 0x04>; 89 interrupts = <GIC_SPI 74 IRQ_TYPE_LEVEL_HIGH>;
85 clocks = <&tegra_car 26>, <&tegra_car 179>; 90 clocks = <&tegra_car TEGRA30_CLK_DISP2>,
91 <&tegra_car TEGRA30_CLK_PLL_P>;
86 clock-names = "disp2", "parent"; 92 clock-names = "disp2", "parent";
87 93
88 rgb { 94 rgb {
@@ -93,8 +99,9 @@
93 hdmi { 99 hdmi {
94 compatible = "nvidia,tegra30-hdmi"; 100 compatible = "nvidia,tegra30-hdmi";
95 reg = <0x54280000 0x00040000>; 101 reg = <0x54280000 0x00040000>;
96 interrupts = <0 75 0x04>; 102 interrupts = <GIC_SPI 75 IRQ_TYPE_LEVEL_HIGH>;
97 clocks = <&tegra_car 51>, <&tegra_car 189>; 103 clocks = <&tegra_car TEGRA30_CLK_HDMI>,
104 <&tegra_car TEGRA30_CLK_PLL_D2_OUT0>;
98 clock-names = "hdmi", "parent"; 105 clock-names = "hdmi", "parent";
99 status = "disabled"; 106 status = "disabled";
100 }; 107 };
@@ -102,15 +109,15 @@
102 tvo { 109 tvo {
103 compatible = "nvidia,tegra30-tvo"; 110 compatible = "nvidia,tegra30-tvo";
104 reg = <0x542c0000 0x00040000>; 111 reg = <0x542c0000 0x00040000>;
105 interrupts = <0 76 0x04>; 112 interrupts = <GIC_SPI 76 IRQ_TYPE_LEVEL_HIGH>;
106 clocks = <&tegra_car 169>; 113 clocks = <&tegra_car TEGRA30_CLK_TVO>;
107 status = "disabled"; 114 status = "disabled";
108 }; 115 };
109 116
110 dsi { 117 dsi {
111 compatible = "nvidia,tegra30-dsi"; 118 compatible = "nvidia,tegra30-dsi";
112 reg = <0x54300000 0x00040000>; 119 reg = <0x54300000 0x00040000>;
113 clocks = <&tegra_car 48>; 120 clocks = <&tegra_car TEGRA30_CLK_DSIA>;
114 status = "disabled"; 121 status = "disabled";
115 }; 122 };
116 }; 123 };
@@ -118,8 +125,9 @@
118 timer@50004600 { 125 timer@50004600 {
119 compatible = "arm,cortex-a9-twd-timer"; 126 compatible = "arm,cortex-a9-twd-timer";
120 reg = <0x50040600 0x20>; 127 reg = <0x50040600 0x20>;
121 interrupts = <1 13 0xf04>; 128 interrupts = <GIC_PPI 13
122 clocks = <&tegra_car 214>; 129 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>;
130 clocks = <&tegra_car TEGRA30_CLK_TWD>;
123 }; 131 };
124 132
125 intc: interrupt-controller { 133 intc: interrupt-controller {
@@ -142,13 +150,13 @@
142 timer@60005000 { 150 timer@60005000 {
143 compatible = "nvidia,tegra30-timer", "nvidia,tegra20-timer"; 151 compatible = "nvidia,tegra30-timer", "nvidia,tegra20-timer";
144 reg = <0x60005000 0x400>; 152 reg = <0x60005000 0x400>;
145 interrupts = <0 0 0x04 153 interrupts = <GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>,
146 0 1 0x04 154 <GIC_SPI 1 IRQ_TYPE_LEVEL_HIGH>,
147 0 41 0x04 155 <GIC_SPI 41 IRQ_TYPE_LEVEL_HIGH>,
148 0 42 0x04 156 <GIC_SPI 42 IRQ_TYPE_LEVEL_HIGH>,
149 0 121 0x04 157 <GIC_SPI 121 IRQ_TYPE_LEVEL_HIGH>,
150 0 122 0x04>; 158 <GIC_SPI 122 IRQ_TYPE_LEVEL_HIGH>;
151 clocks = <&tegra_car 5>; 159 clocks = <&tegra_car TEGRA30_CLK_TIMER>;
152 }; 160 };
153 161
154 tegra_car: clock { 162 tegra_car: clock {
@@ -160,39 +168,39 @@
160 apbdma: dma { 168 apbdma: dma {
161 compatible = "nvidia,tegra30-apbdma", "nvidia,tegra20-apbdma"; 169 compatible = "nvidia,tegra30-apbdma", "nvidia,tegra20-apbdma";
162 reg = <0x6000a000 0x1400>; 170 reg = <0x6000a000 0x1400>;
163 interrupts = <0 104 0x04 171 interrupts = <GIC_SPI 104 IRQ_TYPE_LEVEL_HIGH>,
164 0 105 0x04 172 <GIC_SPI 105 IRQ_TYPE_LEVEL_HIGH>,
165 0 106 0x04 173 <GIC_SPI 106 IRQ_TYPE_LEVEL_HIGH>,
166 0 107 0x04 174 <GIC_SPI 107 IRQ_TYPE_LEVEL_HIGH>,
167 0 108 0x04 175 <GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>,
168 0 109 0x04 176 <GIC_SPI 109 IRQ_TYPE_LEVEL_HIGH>,
169 0 110 0x04 177 <GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH>,
170 0 111 0x04 178 <GIC_SPI 111 IRQ_TYPE_LEVEL_HIGH>,
171 0 112 0x04 179 <GIC_SPI 112 IRQ_TYPE_LEVEL_HIGH>,
172 0 113 0x04 180 <GIC_SPI 113 IRQ_TYPE_LEVEL_HIGH>,
173 0 114 0x04 181 <GIC_SPI 114 IRQ_TYPE_LEVEL_HIGH>,
174 0 115 0x04 182 <GIC_SPI 115 IRQ_TYPE_LEVEL_HIGH>,
175 0 116 0x04 183 <GIC_SPI 116 IRQ_TYPE_LEVEL_HIGH>,
176 0 117 0x04 184 <GIC_SPI 117 IRQ_TYPE_LEVEL_HIGH>,
177 0 118 0x04 185 <GIC_SPI 118 IRQ_TYPE_LEVEL_HIGH>,
178 0 119 0x04 186 <GIC_SPI 119 IRQ_TYPE_LEVEL_HIGH>,
179 0 128 0x04 187 <GIC_SPI 128 IRQ_TYPE_LEVEL_HIGH>,
180 0 129 0x04 188 <GIC_SPI 129 IRQ_TYPE_LEVEL_HIGH>,
181 0 130 0x04 189 <GIC_SPI 130 IRQ_TYPE_LEVEL_HIGH>,
182 0 131 0x04 190 <GIC_SPI 131 IRQ_TYPE_LEVEL_HIGH>,
183 0 132 0x04 191 <GIC_SPI 132 IRQ_TYPE_LEVEL_HIGH>,
184 0 133 0x04 192 <GIC_SPI 133 IRQ_TYPE_LEVEL_HIGH>,
185 0 134 0x04 193 <GIC_SPI 134 IRQ_TYPE_LEVEL_HIGH>,
186 0 135 0x04 194 <GIC_SPI 135 IRQ_TYPE_LEVEL_HIGH>,
187 0 136 0x04 195 <GIC_SPI 136 IRQ_TYPE_LEVEL_HIGH>,
188 0 137 0x04 196 <GIC_SPI 137 IRQ_TYPE_LEVEL_HIGH>,
189 0 138 0x04 197 <GIC_SPI 138 IRQ_TYPE_LEVEL_HIGH>,
190 0 139 0x04 198 <GIC_SPI 139 IRQ_TYPE_LEVEL_HIGH>,
191 0 140 0x04 199 <GIC_SPI 140 IRQ_TYPE_LEVEL_HIGH>,
192 0 141 0x04 200 <GIC_SPI 141 IRQ_TYPE_LEVEL_HIGH>,
193 0 142 0x04 201 <GIC_SPI 142 IRQ_TYPE_LEVEL_HIGH>,
194 0 143 0x04>; 202 <GIC_SPI 143 IRQ_TYPE_LEVEL_HIGH>;
195 clocks = <&tegra_car 34>; 203 clocks = <&tegra_car TEGRA30_CLK_APBDMA>;
196 }; 204 };
197 205
198 ahb: ahb { 206 ahb: ahb {
@@ -203,14 +211,14 @@
203 gpio: gpio { 211 gpio: gpio {
204 compatible = "nvidia,tegra30-gpio"; 212 compatible = "nvidia,tegra30-gpio";
205 reg = <0x6000d000 0x1000>; 213 reg = <0x6000d000 0x1000>;
206 interrupts = <0 32 0x04 214 interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>,
207 0 33 0x04 215 <GIC_SPI 33 IRQ_TYPE_LEVEL_HIGH>,
208 0 34 0x04 216 <GIC_SPI 34 IRQ_TYPE_LEVEL_HIGH>,
209 0 35 0x04 217 <GIC_SPI 35 IRQ_TYPE_LEVEL_HIGH>,
210 0 55 0x04 218 <GIC_SPI 55 IRQ_TYPE_LEVEL_HIGH>,
211 0 87 0x04 219 <GIC_SPI 87 IRQ_TYPE_LEVEL_HIGH>,
212 0 89 0x04 220 <GIC_SPI 89 IRQ_TYPE_LEVEL_HIGH>,
213 0 125 0x04>; 221 <GIC_SPI 125 IRQ_TYPE_LEVEL_HIGH>;
214 #gpio-cells = <2>; 222 #gpio-cells = <2>;
215 gpio-controller; 223 gpio-controller;
216 #interrupt-cells = <2>; 224 #interrupt-cells = <2>;
@@ -235,9 +243,9 @@
235 compatible = "nvidia,tegra30-uart", "nvidia,tegra20-uart"; 243 compatible = "nvidia,tegra30-uart", "nvidia,tegra20-uart";
236 reg = <0x70006000 0x40>; 244 reg = <0x70006000 0x40>;
237 reg-shift = <2>; 245 reg-shift = <2>;
238 interrupts = <0 36 0x04>; 246 interrupts = <GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH>;
239 nvidia,dma-request-selector = <&apbdma 8>; 247 nvidia,dma-request-selector = <&apbdma 8>;
240 clocks = <&tegra_car 6>; 248 clocks = <&tegra_car TEGRA30_CLK_UARTA>;
241 status = "disabled"; 249 status = "disabled";
242 }; 250 };
243 251
@@ -245,9 +253,9 @@
245 compatible = "nvidia,tegra30-uart", "nvidia,tegra20-uart"; 253 compatible = "nvidia,tegra30-uart", "nvidia,tegra20-uart";
246 reg = <0x70006040 0x40>; 254 reg = <0x70006040 0x40>;
247 reg-shift = <2>; 255 reg-shift = <2>;
248 interrupts = <0 37 0x04>; 256 interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>;
249 nvidia,dma-request-selector = <&apbdma 9>; 257 nvidia,dma-request-selector = <&apbdma 9>;
250 clocks = <&tegra_car 160>; 258 clocks = <&tegra_car TEGRA30_CLK_UARTB>;
251 status = "disabled"; 259 status = "disabled";
252 }; 260 };
253 261
@@ -255,9 +263,9 @@
255 compatible = "nvidia,tegra30-uart", "nvidia,tegra20-uart"; 263 compatible = "nvidia,tegra30-uart", "nvidia,tegra20-uart";
256 reg = <0x70006200 0x100>; 264 reg = <0x70006200 0x100>;
257 reg-shift = <2>; 265 reg-shift = <2>;
258 interrupts = <0 46 0x04>; 266 interrupts = <GIC_SPI 46 IRQ_TYPE_LEVEL_HIGH>;
259 nvidia,dma-request-selector = <&apbdma 10>; 267 nvidia,dma-request-selector = <&apbdma 10>;
260 clocks = <&tegra_car 55>; 268 clocks = <&tegra_car TEGRA30_CLK_UARTC>;
261 status = "disabled"; 269 status = "disabled";
262 }; 270 };
263 271
@@ -265,9 +273,9 @@
265 compatible = "nvidia,tegra30-uart", "nvidia,tegra20-uart"; 273 compatible = "nvidia,tegra30-uart", "nvidia,tegra20-uart";
266 reg = <0x70006300 0x100>; 274 reg = <0x70006300 0x100>;
267 reg-shift = <2>; 275 reg-shift = <2>;
268 interrupts = <0 90 0x04>; 276 interrupts = <GIC_SPI 90 IRQ_TYPE_LEVEL_HIGH>;
269 nvidia,dma-request-selector = <&apbdma 19>; 277 nvidia,dma-request-selector = <&apbdma 19>;
270 clocks = <&tegra_car 65>; 278 clocks = <&tegra_car TEGRA30_CLK_UARTD>;
271 status = "disabled"; 279 status = "disabled";
272 }; 280 };
273 281
@@ -275,9 +283,9 @@
275 compatible = "nvidia,tegra30-uart", "nvidia,tegra20-uart"; 283 compatible = "nvidia,tegra30-uart", "nvidia,tegra20-uart";
276 reg = <0x70006400 0x100>; 284 reg = <0x70006400 0x100>;
277 reg-shift = <2>; 285 reg-shift = <2>;
278 interrupts = <0 91 0x04>; 286 interrupts = <GIC_SPI 91 IRQ_TYPE_LEVEL_HIGH>;
279 nvidia,dma-request-selector = <&apbdma 20>; 287 nvidia,dma-request-selector = <&apbdma 20>;
280 clocks = <&tegra_car 66>; 288 clocks = <&tegra_car TEGRA30_CLK_UARTE>;
281 status = "disabled"; 289 status = "disabled";
282 }; 290 };
283 291
@@ -285,24 +293,25 @@
285 compatible = "nvidia,tegra30-pwm", "nvidia,tegra20-pwm"; 293 compatible = "nvidia,tegra30-pwm", "nvidia,tegra20-pwm";
286 reg = <0x7000a000 0x100>; 294 reg = <0x7000a000 0x100>;
287 #pwm-cells = <2>; 295 #pwm-cells = <2>;
288 clocks = <&tegra_car 17>; 296 clocks = <&tegra_car TEGRA30_CLK_PWM>;
289 status = "disabled"; 297 status = "disabled";
290 }; 298 };
291 299
292 rtc { 300 rtc {
293 compatible = "nvidia,tegra30-rtc", "nvidia,tegra20-rtc"; 301 compatible = "nvidia,tegra30-rtc", "nvidia,tegra20-rtc";
294 reg = <0x7000e000 0x100>; 302 reg = <0x7000e000 0x100>;
295 interrupts = <0 2 0x04>; 303 interrupts = <GIC_SPI 2 IRQ_TYPE_LEVEL_HIGH>;
296 clocks = <&tegra_car 4>; 304 clocks = <&tegra_car TEGRA30_CLK_RTC>;
297 }; 305 };
298 306
299 i2c@7000c000 { 307 i2c@7000c000 {
300 compatible = "nvidia,tegra30-i2c", "nvidia,tegra20-i2c"; 308 compatible = "nvidia,tegra30-i2c", "nvidia,tegra20-i2c";
301 reg = <0x7000c000 0x100>; 309 reg = <0x7000c000 0x100>;
302 interrupts = <0 38 0x04>; 310 interrupts = <GIC_SPI 38 IRQ_TYPE_LEVEL_HIGH>;
303 #address-cells = <1>; 311 #address-cells = <1>;
304 #size-cells = <0>; 312 #size-cells = <0>;
305 clocks = <&tegra_car 12>, <&tegra_car 182>; 313 clocks = <&tegra_car TEGRA30_CLK_I2C1>,
314 <&tegra_car TEGRA30_CLK_PLL_P_OUT3>;
306 clock-names = "div-clk", "fast-clk"; 315 clock-names = "div-clk", "fast-clk";
307 status = "disabled"; 316 status = "disabled";
308 }; 317 };
@@ -310,10 +319,11 @@
310 i2c@7000c400 { 319 i2c@7000c400 {
311 compatible = "nvidia,tegra30-i2c", "nvidia,tegra20-i2c"; 320 compatible = "nvidia,tegra30-i2c", "nvidia,tegra20-i2c";
312 reg = <0x7000c400 0x100>; 321 reg = <0x7000c400 0x100>;
313 interrupts = <0 84 0x04>; 322 interrupts = <GIC_SPI 84 IRQ_TYPE_LEVEL_HIGH>;
314 #address-cells = <1>; 323 #address-cells = <1>;
315 #size-cells = <0>; 324 #size-cells = <0>;
316 clocks = <&tegra_car 54>, <&tegra_car 182>; 325 clocks = <&tegra_car TEGRA30_CLK_I2C2>,
326 <&tegra_car TEGRA30_CLK_PLL_P_OUT3>;
317 clock-names = "div-clk", "fast-clk"; 327 clock-names = "div-clk", "fast-clk";
318 status = "disabled"; 328 status = "disabled";
319 }; 329 };
@@ -321,10 +331,11 @@
321 i2c@7000c500 { 331 i2c@7000c500 {
322 compatible = "nvidia,tegra30-i2c", "nvidia,tegra20-i2c"; 332 compatible = "nvidia,tegra30-i2c", "nvidia,tegra20-i2c";
323 reg = <0x7000c500 0x100>; 333 reg = <0x7000c500 0x100>;
324 interrupts = <0 92 0x04>; 334 interrupts = <GIC_SPI 92 IRQ_TYPE_LEVEL_HIGH>;
325 #address-cells = <1>; 335 #address-cells = <1>;
326 #size-cells = <0>; 336 #size-cells = <0>;
327 clocks = <&tegra_car 67>, <&tegra_car 182>; 337 clocks = <&tegra_car TEGRA30_CLK_I2C3>,
338 <&tegra_car TEGRA30_CLK_PLL_P_OUT3>;
328 clock-names = "div-clk", "fast-clk"; 339 clock-names = "div-clk", "fast-clk";
329 status = "disabled"; 340 status = "disabled";
330 }; 341 };
@@ -332,10 +343,11 @@
332 i2c@7000c700 { 343 i2c@7000c700 {
333 compatible = "nvidia,tegra30-i2c", "nvidia,tegra20-i2c"; 344 compatible = "nvidia,tegra30-i2c", "nvidia,tegra20-i2c";
334 reg = <0x7000c700 0x100>; 345 reg = <0x7000c700 0x100>;
335 interrupts = <0 120 0x04>; 346 interrupts = <GIC_SPI 120 IRQ_TYPE_LEVEL_HIGH>;
336 #address-cells = <1>; 347 #address-cells = <1>;
337 #size-cells = <0>; 348 #size-cells = <0>;
338 clocks = <&tegra_car 103>, <&tegra_car 182>; 349 clocks = <&tegra_car TEGRA30_CLK_I2C4>,
350 <&tegra_car TEGRA30_CLK_PLL_P_OUT3>;
339 clock-names = "div-clk", "fast-clk"; 351 clock-names = "div-clk", "fast-clk";
340 status = "disabled"; 352 status = "disabled";
341 }; 353 };
@@ -343,10 +355,11 @@
343 i2c@7000d000 { 355 i2c@7000d000 {
344 compatible = "nvidia,tegra30-i2c", "nvidia,tegra20-i2c"; 356 compatible = "nvidia,tegra30-i2c", "nvidia,tegra20-i2c";
345 reg = <0x7000d000 0x100>; 357 reg = <0x7000d000 0x100>;
346 interrupts = <0 53 0x04>; 358 interrupts = <GIC_SPI 53 IRQ_TYPE_LEVEL_HIGH>;
347 #address-cells = <1>; 359 #address-cells = <1>;
348 #size-cells = <0>; 360 #size-cells = <0>;
349 clocks = <&tegra_car 47>, <&tegra_car 182>; 361 clocks = <&tegra_car TEGRA30_CLK_I2C5>,
362 <&tegra_car TEGRA30_CLK_PLL_P_OUT3>;
350 clock-names = "div-clk", "fast-clk"; 363 clock-names = "div-clk", "fast-clk";
351 status = "disabled"; 364 status = "disabled";
352 }; 365 };
@@ -354,81 +367,81 @@
354 spi@7000d400 { 367 spi@7000d400 {
355 compatible = "nvidia,tegra30-slink", "nvidia,tegra20-slink"; 368 compatible = "nvidia,tegra30-slink", "nvidia,tegra20-slink";
356 reg = <0x7000d400 0x200>; 369 reg = <0x7000d400 0x200>;
357 interrupts = <0 59 0x04>; 370 interrupts = <GIC_SPI 59 IRQ_TYPE_LEVEL_HIGH>;
358 nvidia,dma-request-selector = <&apbdma 15>; 371 nvidia,dma-request-selector = <&apbdma 15>;
359 #address-cells = <1>; 372 #address-cells = <1>;
360 #size-cells = <0>; 373 #size-cells = <0>;
361 clocks = <&tegra_car 41>; 374 clocks = <&tegra_car TEGRA30_CLK_SBC1>;
362 status = "disabled"; 375 status = "disabled";
363 }; 376 };
364 377
365 spi@7000d600 { 378 spi@7000d600 {
366 compatible = "nvidia,tegra30-slink", "nvidia,tegra20-slink"; 379 compatible = "nvidia,tegra30-slink", "nvidia,tegra20-slink";
367 reg = <0x7000d600 0x200>; 380 reg = <0x7000d600 0x200>;
368 interrupts = <0 82 0x04>; 381 interrupts = <GIC_SPI 82 IRQ_TYPE_LEVEL_HIGH>;
369 nvidia,dma-request-selector = <&apbdma 16>; 382 nvidia,dma-request-selector = <&apbdma 16>;
370 #address-cells = <1>; 383 #address-cells = <1>;
371 #size-cells = <0>; 384 #size-cells = <0>;
372 clocks = <&tegra_car 44>; 385 clocks = <&tegra_car TEGRA30_CLK_SBC2>;
373 status = "disabled"; 386 status = "disabled";
374 }; 387 };
375 388
376 spi@7000d800 { 389 spi@7000d800 {
377 compatible = "nvidia,tegra30-slink", "nvidia,tegra20-slink"; 390 compatible = "nvidia,tegra30-slink", "nvidia,tegra20-slink";
378 reg = <0x7000d800 0x200>; 391 reg = <0x7000d800 0x200>;
379 interrupts = <0 83 0x04>; 392 interrupts = <GIC_SPI 83 IRQ_TYPE_LEVEL_HIGH>;
380 nvidia,dma-request-selector = <&apbdma 17>; 393 nvidia,dma-request-selector = <&apbdma 17>;
381 #address-cells = <1>; 394 #address-cells = <1>;
382 #size-cells = <0>; 395 #size-cells = <0>;
383 clocks = <&tegra_car 46>; 396 clocks = <&tegra_car TEGRA30_CLK_SBC3>;
384 status = "disabled"; 397 status = "disabled";
385 }; 398 };
386 399
387 spi@7000da00 { 400 spi@7000da00 {
388 compatible = "nvidia,tegra30-slink", "nvidia,tegra20-slink"; 401 compatible = "nvidia,tegra30-slink", "nvidia,tegra20-slink";
389 reg = <0x7000da00 0x200>; 402 reg = <0x7000da00 0x200>;
390 interrupts = <0 93 0x04>; 403 interrupts = <GIC_SPI 93 IRQ_TYPE_LEVEL_HIGH>;
391 nvidia,dma-request-selector = <&apbdma 18>; 404 nvidia,dma-request-selector = <&apbdma 18>;
392 #address-cells = <1>; 405 #address-cells = <1>;
393 #size-cells = <0>; 406 #size-cells = <0>;
394 clocks = <&tegra_car 68>; 407 clocks = <&tegra_car TEGRA30_CLK_SBC4>;
395 status = "disabled"; 408 status = "disabled";
396 }; 409 };
397 410
398 spi@7000dc00 { 411 spi@7000dc00 {
399 compatible = "nvidia,tegra30-slink", "nvidia,tegra20-slink"; 412 compatible = "nvidia,tegra30-slink", "nvidia,tegra20-slink";
400 reg = <0x7000dc00 0x200>; 413 reg = <0x7000dc00 0x200>;
401 interrupts = <0 94 0x04>; 414 interrupts = <GIC_SPI 94 IRQ_TYPE_LEVEL_HIGH>;
402 nvidia,dma-request-selector = <&apbdma 27>; 415 nvidia,dma-request-selector = <&apbdma 27>;
403 #address-cells = <1>; 416 #address-cells = <1>;
404 #size-cells = <0>; 417 #size-cells = <0>;
405 clocks = <&tegra_car 104>; 418 clocks = <&tegra_car TEGRA30_CLK_SBC5>;
406 status = "disabled"; 419 status = "disabled";
407 }; 420 };
408 421
409 spi@7000de00 { 422 spi@7000de00 {
410 compatible = "nvidia,tegra30-slink", "nvidia,tegra20-slink"; 423 compatible = "nvidia,tegra30-slink", "nvidia,tegra20-slink";
411 reg = <0x7000de00 0x200>; 424 reg = <0x7000de00 0x200>;
412 interrupts = <0 79 0x04>; 425 interrupts = <GIC_SPI 79 IRQ_TYPE_LEVEL_HIGH>;
413 nvidia,dma-request-selector = <&apbdma 28>; 426 nvidia,dma-request-selector = <&apbdma 28>;
414 #address-cells = <1>; 427 #address-cells = <1>;
415 #size-cells = <0>; 428 #size-cells = <0>;
416 clocks = <&tegra_car 105>; 429 clocks = <&tegra_car TEGRA30_CLK_SBC6>;
417 status = "disabled"; 430 status = "disabled";
418 }; 431 };
419 432
420 kbc { 433 kbc {
421 compatible = "nvidia,tegra30-kbc", "nvidia,tegra20-kbc"; 434 compatible = "nvidia,tegra30-kbc", "nvidia,tegra20-kbc";
422 reg = <0x7000e200 0x100>; 435 reg = <0x7000e200 0x100>;
423 interrupts = <0 85 0x04>; 436 interrupts = <GIC_SPI 85 IRQ_TYPE_LEVEL_HIGH>;
424 clocks = <&tegra_car 36>; 437 clocks = <&tegra_car TEGRA30_CLK_KBC>;
425 status = "disabled"; 438 status = "disabled";
426 }; 439 };
427 440
428 pmc { 441 pmc {
429 compatible = "nvidia,tegra30-pmc"; 442 compatible = "nvidia,tegra30-pmc";
430 reg = <0x7000e400 0x400>; 443 reg = <0x7000e400 0x400>;
431 clocks = <&tegra_car 218>, <&clk32k_in>; 444 clocks = <&tegra_car TEGRA30_CLK_PCLK>, <&clk32k_in>;
432 clock-names = "pclk", "clk32k_in"; 445 clock-names = "pclk", "clk32k_in";
433 }; 446 };
434 447
@@ -438,7 +451,7 @@
438 0x7000f03c 0x1b4 451 0x7000f03c 0x1b4
439 0x7000f200 0x028 452 0x7000f200 0x028
440 0x7000f284 0x17c>; 453 0x7000f284 0x17c>;
441 interrupts = <0 77 0x04>; 454 interrupts = <GIC_SPI 77 IRQ_TYPE_LEVEL_HIGH>;
442 }; 455 };
443 456
444 iommu { 457 iommu {
@@ -455,12 +468,19 @@
455 compatible = "nvidia,tegra30-ahub"; 468 compatible = "nvidia,tegra30-ahub";
456 reg = <0x70080000 0x200 469 reg = <0x70080000 0x200
457 0x70080200 0x100>; 470 0x70080200 0x100>;
458 interrupts = <0 103 0x04>; 471 interrupts = <GIC_SPI 103 IRQ_TYPE_LEVEL_HIGH>;
459 nvidia,dma-request-selector = <&apbdma 1>; 472 nvidia,dma-request-selector = <&apbdma 1>;
460 clocks = <&tegra_car 106>, <&tegra_car 107>, <&tegra_car 30>, 473 clocks = <&tegra_car TEGRA30_CLK_D_AUDIO>,
461 <&tegra_car 11>, <&tegra_car 18>, <&tegra_car 101>, 474 <&tegra_car TEGRA30_CLK_APBIF>,
462 <&tegra_car 102>, <&tegra_car 108>, <&tegra_car 109>, 475 <&tegra_car TEGRA30_CLK_I2S0>,
463 <&tegra_car 110>, <&tegra_car 162>; 476 <&tegra_car TEGRA30_CLK_I2S1>,
477 <&tegra_car TEGRA30_CLK_I2S2>,
478 <&tegra_car TEGRA30_CLK_I2S3>,
479 <&tegra_car TEGRA30_CLK_I2S4>,
480 <&tegra_car TEGRA30_CLK_DAM0>,
481 <&tegra_car TEGRA30_CLK_DAM1>,
482 <&tegra_car TEGRA30_CLK_DAM2>,
483 <&tegra_car TEGRA30_CLK_SPDIF_IN>;
464 clock-names = "d_audio", "apbif", "i2s0", "i2s1", "i2s2", 484 clock-names = "d_audio", "apbif", "i2s0", "i2s1", "i2s2",
465 "i2s3", "i2s4", "dam0", "dam1", "dam2", 485 "i2s3", "i2s4", "dam0", "dam1", "dam2",
466 "spdif_in"; 486 "spdif_in";
@@ -472,7 +492,7 @@
472 compatible = "nvidia,tegra30-i2s"; 492 compatible = "nvidia,tegra30-i2s";
473 reg = <0x70080300 0x100>; 493 reg = <0x70080300 0x100>;
474 nvidia,ahub-cif-ids = <4 4>; 494 nvidia,ahub-cif-ids = <4 4>;
475 clocks = <&tegra_car 30>; 495 clocks = <&tegra_car TEGRA30_CLK_I2S0>;
476 status = "disabled"; 496 status = "disabled";
477 }; 497 };
478 498
@@ -480,7 +500,7 @@
480 compatible = "nvidia,tegra30-i2s"; 500 compatible = "nvidia,tegra30-i2s";
481 reg = <0x70080400 0x100>; 501 reg = <0x70080400 0x100>;
482 nvidia,ahub-cif-ids = <5 5>; 502 nvidia,ahub-cif-ids = <5 5>;
483 clocks = <&tegra_car 11>; 503 clocks = <&tegra_car TEGRA30_CLK_I2S1>;
484 status = "disabled"; 504 status = "disabled";
485 }; 505 };
486 506
@@ -488,7 +508,7 @@
488 compatible = "nvidia,tegra30-i2s"; 508 compatible = "nvidia,tegra30-i2s";
489 reg = <0x70080500 0x100>; 509 reg = <0x70080500 0x100>;
490 nvidia,ahub-cif-ids = <6 6>; 510 nvidia,ahub-cif-ids = <6 6>;
491 clocks = <&tegra_car 18>; 511 clocks = <&tegra_car TEGRA30_CLK_I2S2>;
492 status = "disabled"; 512 status = "disabled";
493 }; 513 };
494 514
@@ -496,7 +516,7 @@
496 compatible = "nvidia,tegra30-i2s"; 516 compatible = "nvidia,tegra30-i2s";
497 reg = <0x70080600 0x100>; 517 reg = <0x70080600 0x100>;
498 nvidia,ahub-cif-ids = <7 7>; 518 nvidia,ahub-cif-ids = <7 7>;
499 clocks = <&tegra_car 101>; 519 clocks = <&tegra_car TEGRA30_CLK_I2S3>;
500 status = "disabled"; 520 status = "disabled";
501 }; 521 };
502 522
@@ -504,7 +524,7 @@
504 compatible = "nvidia,tegra30-i2s"; 524 compatible = "nvidia,tegra30-i2s";
505 reg = <0x70080700 0x100>; 525 reg = <0x70080700 0x100>;
506 nvidia,ahub-cif-ids = <8 8>; 526 nvidia,ahub-cif-ids = <8 8>;
507 clocks = <&tegra_car 102>; 527 clocks = <&tegra_car TEGRA30_CLK_I2S4>;
508 status = "disabled"; 528 status = "disabled";
509 }; 529 };
510 }; 530 };
@@ -512,32 +532,32 @@
512 sdhci@78000000 { 532 sdhci@78000000 {
513 compatible = "nvidia,tegra30-sdhci", "nvidia,tegra20-sdhci"; 533 compatible = "nvidia,tegra30-sdhci", "nvidia,tegra20-sdhci";
514 reg = <0x78000000 0x200>; 534 reg = <0x78000000 0x200>;
515 interrupts = <0 14 0x04>; 535 interrupts = <GIC_SPI 14 IRQ_TYPE_LEVEL_HIGH>;
516 clocks = <&tegra_car 14>; 536 clocks = <&tegra_car TEGRA30_CLK_SDMMC1>;
517 status = "disabled"; 537 status = "disabled";
518 }; 538 };
519 539
520 sdhci@78000200 { 540 sdhci@78000200 {
521 compatible = "nvidia,tegra30-sdhci", "nvidia,tegra20-sdhci"; 541 compatible = "nvidia,tegra30-sdhci", "nvidia,tegra20-sdhci";
522 reg = <0x78000200 0x200>; 542 reg = <0x78000200 0x200>;
523 interrupts = <0 15 0x04>; 543 interrupts = <GIC_SPI 15 IRQ_TYPE_LEVEL_HIGH>;
524 clocks = <&tegra_car 9>; 544 clocks = <&tegra_car TEGRA30_CLK_SDMMC2>;
525 status = "disabled"; 545 status = "disabled";
526 }; 546 };
527 547
528 sdhci@78000400 { 548 sdhci@78000400 {
529 compatible = "nvidia,tegra30-sdhci", "nvidia,tegra20-sdhci"; 549 compatible = "nvidia,tegra30-sdhci", "nvidia,tegra20-sdhci";
530 reg = <0x78000400 0x200>; 550 reg = <0x78000400 0x200>;
531 interrupts = <0 19 0x04>; 551 interrupts = <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>;
532 clocks = <&tegra_car 69>; 552 clocks = <&tegra_car TEGRA30_CLK_SDMMC3>;
533 status = "disabled"; 553 status = "disabled";
534 }; 554 };
535 555
536 sdhci@78000600 { 556 sdhci@78000600 {
537 compatible = "nvidia,tegra30-sdhci", "nvidia,tegra20-sdhci"; 557 compatible = "nvidia,tegra30-sdhci", "nvidia,tegra20-sdhci";
538 reg = <0x78000600 0x200>; 558 reg = <0x78000600 0x200>;
539 interrupts = <0 31 0x04>; 559 interrupts = <GIC_SPI 31 IRQ_TYPE_LEVEL_HIGH>;
540 clocks = <&tegra_car 15>; 560 clocks = <&tegra_car TEGRA30_CLK_SDMMC4>;
541 status = "disabled"; 561 status = "disabled";
542 }; 562 };
543 563
@@ -572,9 +592,9 @@
572 592
573 pmu { 593 pmu {
574 compatible = "arm,cortex-a9-pmu"; 594 compatible = "arm,cortex-a9-pmu";
575 interrupts = <0 144 0x04 595 interrupts = <GIC_SPI 144 IRQ_TYPE_LEVEL_HIGH>,
576 0 145 0x04 596 <GIC_SPI 145 IRQ_TYPE_LEVEL_HIGH>,
577 0 146 0x04 597 <GIC_SPI 146 IRQ_TYPE_LEVEL_HIGH>,
578 0 147 0x04>; 598 <GIC_SPI 147 IRQ_TYPE_LEVEL_HIGH>;
579 }; 599 };
580}; 600};
diff --git a/arch/arm/boot/dts/tny_a9260.dts b/arch/arm/boot/dts/tny_a9260.dts
index 367a16dcd5ef..dabe232216b4 100644
--- a/arch/arm/boot/dts/tny_a9260.dts
+++ b/arch/arm/boot/dts/tny_a9260.dts
@@ -6,8 +6,8 @@
6 * Licensed under GPLv2. 6 * Licensed under GPLv2.
7 */ 7 */
8/dts-v1/; 8/dts-v1/;
9/include/ "at91sam9260.dtsi" 9#include "at91sam9260.dtsi"
10/include/ "tny_a9260_common.dtsi" 10#include "tny_a9260_common.dtsi"
11 11
12/ { 12/ {
13 model = "Calao TNY A9260"; 13 model = "Calao TNY A9260";
diff --git a/arch/arm/boot/dts/tny_a9263.dts b/arch/arm/boot/dts/tny_a9263.dts
index dee9c571306b..0751a6a979a8 100644
--- a/arch/arm/boot/dts/tny_a9263.dts
+++ b/arch/arm/boot/dts/tny_a9263.dts
@@ -6,7 +6,7 @@
6 * Licensed under GPLv2 only 6 * Licensed under GPLv2 only
7 */ 7 */
8/dts-v1/; 8/dts-v1/;
9/include/ "at91sam9263.dtsi" 9#include "at91sam9263.dtsi"
10 10
11/ { 11/ {
12 model = "Calao TNY A9263"; 12 model = "Calao TNY A9263";
@@ -38,7 +38,7 @@
38 }; 38 };
39 39
40 usb1: gadget@fff78000 { 40 usb1: gadget@fff78000 {
41 atmel,vbus-gpio = <&pioB 11 0>; 41 atmel,vbus-gpio = <&pioB 11 GPIO_ACTIVE_HIGH>;
42 status = "okay"; 42 status = "okay";
43 }; 43 };
44 }; 44 };
diff --git a/arch/arm/boot/dts/tny_a9g20.dts b/arch/arm/boot/dts/tny_a9g20.dts
index e1ab64c72dba..8456d70bb42b 100644
--- a/arch/arm/boot/dts/tny_a9g20.dts
+++ b/arch/arm/boot/dts/tny_a9g20.dts
@@ -6,8 +6,8 @@
6 * Licensed under GPLv2. 6 * Licensed under GPLv2.
7 */ 7 */
8/dts-v1/; 8/dts-v1/;
9/include/ "at91sam9g20.dtsi" 9#include "at91sam9g20.dtsi"
10/include/ "tny_a9260_common.dtsi" 10#include "tny_a9260_common.dtsi"
11 11
12/ { 12/ {
13 model = "Calao TNY A9G20"; 13 model = "Calao TNY A9G20";
diff --git a/arch/arm/boot/dts/twl4030.dtsi b/arch/arm/boot/dts/twl4030.dtsi
index b3034da00a37..ae6a17aed9ee 100644
--- a/arch/arm/boot/dts/twl4030.dtsi
+++ b/arch/arm/boot/dts/twl4030.dtsi
@@ -47,6 +47,12 @@
47 regulator-max-microvolt = <3150000>; 47 regulator-max-microvolt = <3150000>;
48 }; 48 };
49 49
50 vmmc2: regulator-vmmc2 {
51 compatible = "ti,twl4030-vmmc2";
52 regulator-min-microvolt = <1850000>;
53 regulator-max-microvolt = <3150000>;
54 };
55
50 vusb1v5: regulator-vusb1v5 { 56 vusb1v5: regulator-vusb1v5 {
51 compatible = "ti,twl4030-vusb1v5"; 57 compatible = "ti,twl4030-vusb1v5";
52 }; 58 };
diff --git a/arch/arm/boot/dts/twl4030_omap3.dtsi b/arch/arm/boot/dts/twl4030_omap3.dtsi
new file mode 100644
index 000000000000..c353ef0a6ac7
--- /dev/null
+++ b/arch/arm/boot/dts/twl4030_omap3.dtsi
@@ -0,0 +1,25 @@
1/*
2 * Copyright (C) 2013 Linaro, Ltd.
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&twl {
10 pinctrl-names = "default";
11 pinctrl-0 = <&twl4030_pins>;
12};
13
14&omap3_pmx_core {
15 /*
16 * On most OMAP3 platforms, the twl4030 IRQ line is connected
17 * to the SYS_NIRQ line on OMAP. Therefore, configure the
18 * defaults for the SYS_NIRQ pin here.
19 */
20 twl4030_pins: pinmux_twl4030_pins {
21 pinctrl-single,pins = <
22 0x1b0 (PIN_INPUT_PULLUP | PIN_OFF_WAKEUPENABLE | MUX_MODE0) /* sys_nirq.sys_nirq */
23 >;
24 };
25};
diff --git a/arch/arm/boot/dts/usb_a9260.dts b/arch/arm/boot/dts/usb_a9260.dts
index 296216058c11..de0c24f5210a 100644
--- a/arch/arm/boot/dts/usb_a9260.dts
+++ b/arch/arm/boot/dts/usb_a9260.dts
@@ -6,8 +6,8 @@
6 * Licensed under GPLv2 or later. 6 * Licensed under GPLv2 or later.
7 */ 7 */
8/dts-v1/; 8/dts-v1/;
9/include/ "at91sam9260.dtsi" 9#include "at91sam9260.dtsi"
10/include/ "usb_a9260_common.dtsi" 10#include "usb_a9260_common.dtsi"
11 11
12/ { 12/ {
13 model = "Calao USB A9260"; 13 model = "Calao USB A9260";
@@ -20,4 +20,13 @@
20 memory { 20 memory {
21 reg = <0x20000000 0x4000000>; 21 reg = <0x20000000 0x4000000>;
22 }; 22 };
23
24 ahb {
25 apb {
26 shdwc@fffffd10 {
27 atmel,wakeup-counter = <10>;
28 atmel,wakeup-rtt-timer;
29 };
30 };
31 };
23}; 32};
diff --git a/arch/arm/boot/dts/usb_a9260_common.dtsi b/arch/arm/boot/dts/usb_a9260_common.dtsi
index e70d229baef5..285977682cf3 100644
--- a/arch/arm/boot/dts/usb_a9260_common.dtsi
+++ b/arch/arm/boot/dts/usb_a9260_common.dtsi
@@ -30,7 +30,7 @@
30 }; 30 };
31 31
32 usb1: gadget@fffa4000 { 32 usb1: gadget@fffa4000 {
33 atmel,vbus-gpio = <&pioC 5 0>; 33 atmel,vbus-gpio = <&pioC 5 GPIO_ACTIVE_HIGH>;
34 status = "okay"; 34 status = "okay";
35 }; 35 };
36 }; 36 };
@@ -93,7 +93,7 @@
93 93
94 user_led { 94 user_led {
95 label = "user_led"; 95 label = "user_led";
96 gpios = <&pioB 21 1>; 96 gpios = <&pioB 21 GPIO_ACTIVE_LOW>;
97 linux,default-trigger = "heartbeat"; 97 linux,default-trigger = "heartbeat";
98 }; 98 };
99 }; 99 };
@@ -105,7 +105,7 @@
105 105
106 user_pb { 106 user_pb {
107 label = "user_pb"; 107 label = "user_pb";
108 gpios = <&pioB 10 1>; 108 gpios = <&pioB 10 GPIO_ACTIVE_LOW>;
109 linux,code = <28>; 109 linux,code = <28>;
110 gpio-key,wakeup; 110 gpio-key,wakeup;
111 }; 111 };
diff --git a/arch/arm/boot/dts/usb_a9263.dts b/arch/arm/boot/dts/usb_a9263.dts
index 6fe05ccb6203..290e60383baf 100644
--- a/arch/arm/boot/dts/usb_a9263.dts
+++ b/arch/arm/boot/dts/usb_a9263.dts
@@ -6,7 +6,7 @@
6 * Licensed under GPLv2 only 6 * Licensed under GPLv2 only
7 */ 7 */
8/dts-v1/; 8/dts-v1/;
9/include/ "at91sam9263.dtsi" 9#include "at91sam9263.dtsi"
10 10
11/ { 11/ {
12 model = "Calao USB A9263"; 12 model = "Calao USB A9263";
@@ -43,10 +43,24 @@
43 }; 43 };
44 44
45 usb1: gadget@fff78000 { 45 usb1: gadget@fff78000 {
46 atmel,vbus-gpio = <&pioB 11 0>; 46 atmel,vbus-gpio = <&pioB 11 GPIO_ACTIVE_HIGH>;
47 status = "okay"; 47 status = "okay";
48 }; 48 };
49 49
50 spi0: spi@fffa4000 {
51 cs-gpios = <&pioB 15 GPIO_ACTIVE_HIGH>;
52 status = "okay";
53 mtd_dataflash@0 {
54 compatible = "atmel,at45", "atmel,dataflash";
55 reg = <0>;
56 spi-max-frequency = <15000000>;
57 };
58 };
59
60 shdwc@fffffd10 {
61 atmel,wakeup-counter = <10>;
62 atmel,wakeup-rtt-timer;
63 };
50 }; 64 };
51 65
52 nand0: nand@40000000 { 66 nand0: nand@40000000 {
@@ -107,7 +121,7 @@
107 121
108 user_led { 122 user_led {
109 label = "user_led"; 123 label = "user_led";
110 gpios = <&pioB 21 0>; 124 gpios = <&pioB 21 GPIO_ACTIVE_HIGH>;
111 linux,default-trigger = "heartbeat"; 125 linux,default-trigger = "heartbeat";
112 }; 126 };
113 }; 127 };
@@ -119,7 +133,7 @@
119 133
120 user_pb { 134 user_pb {
121 label = "user_pb"; 135 label = "user_pb";
122 gpios = <&pioB 10 1>; 136 gpios = <&pioB 10 GPIO_ACTIVE_LOW>;
123 linux,code = <28>; 137 linux,code = <28>;
124 gpio-key,wakeup; 138 gpio-key,wakeup;
125 }; 139 };
diff --git a/arch/arm/boot/dts/usb_a9g20-dab-mmx.dtsi b/arch/arm/boot/dts/usb_a9g20-dab-mmx.dtsi
index ad3eca17c436..5b0ffc1a0b24 100644
--- a/arch/arm/boot/dts/usb_a9g20-dab-mmx.dtsi
+++ b/arch/arm/boot/dts/usb_a9g20-dab-mmx.dtsi
@@ -28,39 +28,39 @@
28 28
29 user_led1 { 29 user_led1 {
30 label = "user_led1"; 30 label = "user_led1";
31 gpios = <&pioB 20 1>; 31 gpios = <&pioB 20 GPIO_ACTIVE_LOW>;
32 }; 32 };
33 33
34/* 34/*
35* led already used by mother board but active as high 35* led already used by mother board but active as high
36* user_led2 { 36* user_led2 {
37* label = "user_led2"; 37* label = "user_led2";
38* gpios = <&pioB 21 1>; 38* gpios = <&pioB 21 GPIO_ACTIVE_LOW>;
39* }; 39* };
40*/ 40*/
41 user_led3 { 41 user_led3 {
42 label = "user_led3"; 42 label = "user_led3";
43 gpios = <&pioB 22 1>; 43 gpios = <&pioB 22 GPIO_ACTIVE_LOW>;
44 }; 44 };
45 45
46 user_led4 { 46 user_led4 {
47 label = "user_led4"; 47 label = "user_led4";
48 gpios = <&pioB 23 1>; 48 gpios = <&pioB 23 GPIO_ACTIVE_LOW>;
49 }; 49 };
50 50
51 red { 51 red {
52 label = "red"; 52 label = "red";
53 gpios = <&pioB 24 1>; 53 gpios = <&pioB 24 GPIO_ACTIVE_LOW>;
54 }; 54 };
55 55
56 orange { 56 orange {
57 label = "orange"; 57 label = "orange";
58 gpios = <&pioB 30 1>; 58 gpios = <&pioB 30 GPIO_ACTIVE_LOW>;
59 }; 59 };
60 60
61 green { 61 green {
62 label = "green"; 62 label = "green";
63 gpios = <&pioB 31 1>; 63 gpios = <&pioB 31 GPIO_ACTIVE_LOW>;
64 }; 64 };
65 }; 65 };
66 66
@@ -71,25 +71,25 @@
71 71
72 user_pb1 { 72 user_pb1 {
73 label = "user_pb1"; 73 label = "user_pb1";
74 gpios = <&pioB 25 1>; 74 gpios = <&pioB 25 GPIO_ACTIVE_LOW>;
75 linux,code = <0x100>; 75 linux,code = <0x100>;
76 }; 76 };
77 77
78 user_pb2 { 78 user_pb2 {
79 label = "user_pb2"; 79 label = "user_pb2";
80 gpios = <&pioB 13 1>; 80 gpios = <&pioB 13 GPIO_ACTIVE_LOW>;
81 linux,code = <0x101>; 81 linux,code = <0x101>;
82 }; 82 };
83 83
84 user_pb3 { 84 user_pb3 {
85 label = "user_pb3"; 85 label = "user_pb3";
86 gpios = <&pioA 26 1>; 86 gpios = <&pioA 26 GPIO_ACTIVE_LOW>;
87 linux,code = <0x102>; 87 linux,code = <0x102>;
88 }; 88 };
89 89
90 user_pb4 { 90 user_pb4 {
91 label = "user_pb4"; 91 label = "user_pb4";
92 gpios = <&pioC 9 1>; 92 gpios = <&pioC 9 GPIO_ACTIVE_LOW>;
93 linux,code = <0x103>; 93 linux,code = <0x103>;
94 }; 94 };
95 }; 95 };
diff --git a/arch/arm/boot/dts/usb_a9g20.dts b/arch/arm/boot/dts/usb_a9g20.dts
index 2dacb16ce4ae..ec77cf8f9695 100644
--- a/arch/arm/boot/dts/usb_a9g20.dts
+++ b/arch/arm/boot/dts/usb_a9g20.dts
@@ -6,25 +6,9 @@
6 * Licensed under GPLv2 or later. 6 * Licensed under GPLv2 or later.
7 */ 7 */
8/dts-v1/; 8/dts-v1/;
9/include/ "at91sam9g20.dtsi" 9#include "usb_a9g20_common.dtsi"
10/include/ "usb_a9260_common.dtsi"
11 10
12/ { 11/ {
13 model = "Calao USB A9G20"; 12 model = "Calao USB A9G20";
14 compatible = "calao,usb-a9g20", "atmel,at91sam9g20", "atmel,at91sam9"; 13 compatible = "calao,usb-a9g20", "atmel,at91sam9g20", "atmel,at91sam9";
15
16 chosen {
17 bootargs = "mem=64M console=ttyS0,115200 root=/dev/mtdblock5 rw rootfstype=ubifs";
18 };
19
20 memory {
21 reg = <0x20000000 0x4000000>;
22 };
23
24 i2c@0 {
25 rv3029c2@56 {
26 compatible = "rv3029c2";
27 reg = <0x56>;
28 };
29 };
30}; 14};
diff --git a/arch/arm/boot/dts/usb_a9g20_common.dtsi b/arch/arm/boot/dts/usb_a9g20_common.dtsi
new file mode 100644
index 000000000000..0b3b36182fe5
--- /dev/null
+++ b/arch/arm/boot/dts/usb_a9g20_common.dtsi
@@ -0,0 +1,27 @@
1/*
2 * usb_a9g20.dts - Device Tree file for Caloa USB A9G20 board
3 *
4 * Copyright (C) 2011 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
5 *
6 * Licensed under GPLv2 or later.
7 */
8
9#include "at91sam9g20.dtsi"
10#include "usb_a9260_common.dtsi"
11
12/ {
13 chosen {
14 bootargs = "mem=64M console=ttyS0,115200 root=/dev/mtdblock5 rw rootfstype=ubifs";
15 };
16
17 memory {
18 reg = <0x20000000 0x4000000>;
19 };
20
21 i2c@0 {
22 rv3029c2@56 {
23 compatible = "rv3029c2";
24 reg = <0x56>;
25 };
26 };
27};
diff --git a/arch/arm/boot/dts/usb_a9g20_lpw.dts b/arch/arm/boot/dts/usb_a9g20_lpw.dts
new file mode 100644
index 000000000000..f8cb1b9a01c5
--- /dev/null
+++ b/arch/arm/boot/dts/usb_a9g20_lpw.dts
@@ -0,0 +1,31 @@
1/*
2 * usb_a9g20_lpw.dts - Device Tree file for Caloa USB A9G20 Low Power board
3 *
4 * Copyright (C) 2013 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
5 *
6 * Licensed under GPLv2 or later.
7 */
8/dts-v1/;
9#include "usb_a9g20_common.dtsi"
10
11/ {
12 model = "Calao USB A9G20 Low Power";
13 compatible = "calao,usb-a9g20-lpw", "calao,usb-a9g20", "atmel,at91sam9g20", "atmel,at91sam9";
14
15 ahb {
16 apb {
17 spi1: spi@fffcc000 {
18 cs-gpios = <&pioB 3 GPIO_ACTIVE_HIGH>;
19 status = "okay";
20 mmc-slot@0 {
21 compatible = "mmc-spi-slot";
22 reg = <0>;
23 voltage-ranges = <3200 3400>;
24 spi-max-frequency = <25000000>;
25 interrupt-parent = <&pioC>;
26 interrupts = <4 IRQ_TYPE_EDGE_BOTH>;
27 };
28 };
29 };
30 };
31};
diff --git a/arch/arm/boot/dts/vf610-pinfunc.h b/arch/arm/boot/dts/vf610-pinfunc.h
new file mode 100644
index 000000000000..1ee681f7ce2f
--- /dev/null
+++ b/arch/arm/boot/dts/vf610-pinfunc.h
@@ -0,0 +1,810 @@
1/*
2 * Copyright 2013 Freescale Semiconductor, Inc.
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
10#ifndef __DTS_VF610_PINFUNC_H
11#define __DTS_VF610_PINFUNC_H
12
13/*
14 * The pin function ID for VF610 is a tuple of:
15 * <mux_reg input_reg mux_mode input_val>
16 */
17
18#define ALT0 0x0
19#define ALT1 0x1
20#define ALT2 0x2
21#define ALT3 0x3
22#define ALT4 0x4
23#define ALT5 0x5
24#define ALT6 0x6
25#define ALT7 0x7
26
27
28#define VF610_PAD_PTA6__GPIO_0 0x000 0x000 ALT0 0x0
29#define VF610_PAD_PTA6__RMII_CLKOUT 0x000 0x000 ALT1 0x0
30#define VF610_PAD_PTA6__RMII_CLKIN 0x000 0x2F0 ALT2 0x0
31#define VF610_PAD_PTA6__DCU1_TCON11 0x000 0x000 ALT4 0x0
32#define VF610_PAD_PTA6__DCU1_R2 0x000 0x000 ALT7 0x0
33#define VF610_PAD_PTA8__GPIO_1 0x004 0x000 ALT0 0x0
34#define VF610_PAD_PTA8__TCLK 0x004 0x000 ALT1 0x0
35#define VF610_PAD_PTA8__DCU0_R0 0x004 0x000 ALT4 0x0
36#define VF610_PAD_PTA8__MLB_CLK 0x004 0x354 ALT7 0x0
37#define VF610_PAD_PTA9__GPIO_2 0x008 0x000 ALT0 0x0
38#define VF610_PAD_PTA9__TDI 0x008 0x000 ALT1 0x0
39#define VF610_PAD_PTA9__RMII_CLKOUT 0x008 0x000 ALT2 0x0
40#define VF610_PAD_PTA9__RMII_CLKIN 0x008 0x2F0 ALT3 0x1
41#define VF610_PAD_PTA9__DCU0_R1 0x008 0x000 ALT4 0x0
42#define VF610_PAD_PTA9__WDOG_B 0x008 0x000 ALT6 0x0
43#define VF610_PAD_PTA10__GPIO_3 0x00C 0x000 ALT0 0x0
44#define VF610_PAD_PTA10__TDO 0x00C 0x000 ALT1 0x0
45#define VF610_PAD_PTA10__EXT_AUDIO_MCLK 0x00C 0x2EC ALT2 0x0
46#define VF610_PAD_PTA10__DCU0_G0 0x00C 0x000 ALT4 0x0
47#define VF610_PAD_PTA10__ENET_TS_CLKIN 0x00C 0x2F4 ALT6 0x0
48#define VF610_PAD_PTA10__MLB_SIGNAL 0x00C 0x35C ALT7 0x0
49#define VF610_PAD_PTA11__GPIO_4 0x010 0x000 ALT0 0x0
50#define VF610_PAD_PTA11__TMS 0x010 0x000 ALT1 0x0
51#define VF610_PAD_PTA11__DCU0_G1 0x010 0x000 ALT4 0x0
52#define VF610_PAD_PTA11__MLB_DATA 0x010 0x358 ALT7 0x0
53#define VF610_PAD_PTA12__GPIO_5 0x014 0x000 ALT0 0x0
54#define VF610_PAD_PTA12__TRACECK 0x014 0x000 ALT1 0x0
55#define VF610_PAD_PTA12__EXT_AUDIO_MCLK 0x014 0x2EC ALT2 0x1
56#define VF610_PAD_PTA12__VIU_DATA13 0x014 0x000 ALT6 0x0
57#define VF610_PAD_PTA12__I2C0_SCL 0x014 0x33C ALT7 0x0
58#define VF610_PAD_PTA16__GPIO_6 0x018 0x000 ALT0 0x0
59#define VF610_PAD_PTA16__TRACED0 0x018 0x000 ALT1 0x0
60#define VF610_PAD_PTA16__USB0_VBUS_EN 0x018 0x000 ALT2 0x0
61#define VF610_PAD_PTA16__ADC1_SE0 0x018 0x000 ALT3 0x0
62#define VF610_PAD_PTA16__LCD29 0x018 0x000 ALT4 0x0
63#define VF610_PAD_PTA16__SAI2_TX_BCLK 0x018 0x370 ALT5 0x0
64#define VF610_PAD_PTA16__VIU_DATA14 0x018 0x000 ALT6 0x0
65#define VF610_PAD_PTA16__I2C0_SDA 0x018 0x340 ALT7 0x0
66#define VF610_PAD_PTA17__GPIO_7 0x01C 0x000 ALT0 0x0
67#define VF610_PAD_PTA17__TRACED1 0x01C 0x000 ALT1 0x0
68#define VF610_PAD_PTA17__USB0_VBUS_OC 0x01C 0x000 ALT2 0x0
69#define VF610_PAD_PTA17__ADC1_SE1 0x01C 0x000 ALT3 0x0
70#define VF610_PAD_PTA17__LCD30 0x01C 0x000 ALT4 0x0
71#define VF610_PAD_PTA17__USB0_SOF_PULSE 0x01C 0x000 ALT5 0x0
72#define VF610_PAD_PTA17__VIU_DATA15 0x01C 0x000 ALT6 0x0
73#define VF610_PAD_PTA17__I2C1_SCL 0x01C 0x344 ALT7 0x0
74#define VF610_PAD_PTA18__GPIO_8 0x020 0x000 ALT0 0x0
75#define VF610_PAD_PTA18__TRACED2 0x020 0x000 ALT1 0x0
76#define VF610_PAD_PTA18__ADC0_SE0 0x020 0x000 ALT2 0x0
77#define VF610_PAD_PTA18__FTM1_QD_PHA 0x020 0x334 ALT3 0x0
78#define VF610_PAD_PTA18__LCD31 0x020 0x000 ALT4 0x0
79#define VF610_PAD_PTA18__SAI2_TX_DATA 0x020 0x000 ALT5 0x0
80#define VF610_PAD_PTA18__VIU_DATA16 0x020 0x000 ALT6 0x0
81#define VF610_PAD_PTA18__I2C1_SDA 0x020 0x348 ALT7 0x0
82#define VF610_PAD_PTA19__GPIO_9 0x024 0x000 ALT0 0x0
83#define VF610_PAD_PTA19__TRACED3 0x024 0x000 ALT1 0x0
84#define VF610_PAD_PTA19__ADC0_SE1 0x024 0x000 ALT2 0x0
85#define VF610_PAD_PTA19__FTM1_QD_PHB 0x024 0x338 ALT3 0x0
86#define VF610_PAD_PTA19__LCD32 0x024 0x000 ALT4 0x0
87#define VF610_PAD_PTA19__SAI2_TX_SYNC 0x024 0x000 ALT5 0x0
88#define VF610_PAD_PTA19__VIU_DATA17 0x024 0x000 ALT6 0x0
89#define VF610_PAD_PTA19__QSPI1_A_QSCK 0x024 0x374 ALT7 0x0
90#define VF610_PAD_PTA20__GPIO_10 0x028 0x000 ALT0 0x0
91#define VF610_PAD_PTA20__TRACED4 0x028 0x000 ALT1 0x0
92#define VF610_PAD_PTA20__LCD33 0x028 0x000 ALT4 0x0
93#define VF610_PAD_PTA20__UART3_TX 0x028 0x394 ALT6 0x0
94#define VF610_PAD_PTA20__DCU1_HSYNC 0x028 0x000 ALT7 0x0
95#define VF610_PAD_PTA21__GPIO_11 0x02C 0x000 ALT0 0x0
96#define VF610_PAD_PTA21__TRACED5 0x02C 0x000 ALT1 0x0
97#define VF610_PAD_PTA21__SAI2_RX_BCLK 0x02C 0x364 ALT5 0x0
98#define VF610_PAD_PTA21__UART3_RX 0x02C 0x390 ALT6 0x0
99#define VF610_PAD_PTA21__DCU1_VSYNC 0x02C 0x000 ALT7 0x0
100#define VF610_PAD_PTA22__GPIO_12 0x030 0x000 ALT0 0x0
101#define VF610_PAD_PTA22__TRACED6 0x030 0x000 ALT1 0x0
102#define VF610_PAD_PTA22__SAI2_RX_DATA 0x030 0x368 ALT5 0x0
103#define VF610_PAD_PTA22__I2C2_SCL 0x030 0x34C ALT6 0x0
104#define VF610_PAD_PTA22__DCU1_TAG 0x030 0x000 ALT7 0x0
105#define VF610_PAD_PTA23__GPIO_13 0x034 0x000 ALT0 0x0
106#define VF610_PAD_PTA23__TRACED7 0x034 0x000 ALT1 0x0
107#define VF610_PAD_PTA23__SAI2_RX_SYNC 0x034 0x36C ALT5 0x0
108#define VF610_PAD_PTA23__I2C2_SDA 0x034 0x350 ALT6 0x0
109#define VF610_PAD_PTA23__DCU1_DE 0x034 0x000 ALT7 0x0
110#define VF610_PAD_PTA24__GPIO_14 0x038 0x000 ALT0 0x0
111#define VF610_PAD_PTA24__TRACED8 0x038 0x000 ALT1 0x0
112#define VF610_PAD_PTA24__USB1_VBUS_EN 0x038 0x000 ALT2 0x0
113#define VF610_PAD_PTA24__ESDHC1_CLK 0x038 0x000 ALT5 0x0
114#define VF610_PAD_PTA24__DCU1_TCON4 0x038 0x000 ALT6 0x0
115#define VF610_PAD_PTA24__DDR_TEST_PAD_CTRL 0x038 0x000 ALT7 0x0
116#define VF610_PAD_PTA25__GPIO_15 0x03C 0x000 ALT0 0x0
117#define VF610_PAD_PTA25__TRACED9 0x03C 0x000 ALT1 0x0
118#define VF610_PAD_PTA25__USB1_VBUS_OC 0x03C 0x000 ALT2 0x0
119#define VF610_PAD_PTA25__ESDHC1_CMD 0x03C 0x000 ALT5 0x0
120#define VF610_PAD_PTA25__DCU1_TCON5 0x03C 0x000 ALT6 0x0
121#define VF610_PAD_PTA26__GPIO_16 0x040 0x000 ALT0 0x0
122#define VF610_PAD_PTA26__TRACED10 0x040 0x000 ALT1 0x0
123#define VF610_PAD_PTA26__SAI3_TX_BCLK 0x040 0x000 ALT2 0x0
124#define VF610_PAD_PTA26__ESDHC1_DAT0 0x040 0x000 ALT5 0x0
125#define VF610_PAD_PTA26__DCU1_TCON6 0x040 0x000 ALT6 0x0
126#define VF610_PAD_PTA27__GPIO_17 0x044 0x000 ALT0 0x0
127#define VF610_PAD_PTA27__TRACED11 0x044 0x000 ALT1 0x0
128#define VF610_PAD_PTA27__SAI3_RX_BCLK 0x044 0x000 ALT2 0x0
129#define VF610_PAD_PTA27__ESDHC1_DAT1 0x044 0x000 ALT5 0x0
130#define VF610_PAD_PTA27__DCU1_TCON7 0x044 0x000 ALT6 0x0
131#define VF610_PAD_PTA28__GPIO_18 0x048 0x000 ALT0 0x0
132#define VF610_PAD_PTA28__TRACED12 0x048 0x000 ALT1 0x0
133#define VF610_PAD_PTA28__SAI3_RX_DATA 0x048 0x000 ALT2 0x0
134#define VF610_PAD_PTA28__ENET1_1588_TMR0 0x048 0x000 ALT3 0x0
135#define VF610_PAD_PTA28__UART4_TX 0x048 0x000 ALT4 0x0
136#define VF610_PAD_PTA28__ESDHC1_DATA2 0x048 0x000 ALT5 0x0
137#define VF610_PAD_PTA28__DCU1_TCON8 0x048 0x000 ALT6 0x0
138#define VF610_PAD_PTA29__GPIO_19 0x04C 0x000 ALT0 0x0
139#define VF610_PAD_PTA29__TRACED13 0x04C 0x000 ALT1 0x0
140#define VF610_PAD_PTA29__SAI3_TX_DATA 0x04C 0x000 ALT2 0x0
141#define VF610_PAD_PTA29__ENET1_1588_TMR1 0x04C 0x000 ALT3 0x0
142#define VF610_PAD_PTA29__UART4_RX 0x04C 0x000 ALT4 0x0
143#define VF610_PAD_PTA29__ESDHC1_DAT3 0x04C 0x000 ALT5 0x0
144#define VF610_PAD_PTA29__DCU1_TCON9 0x04C 0x000 ALT6 0x0
145#define VF610_PAD_PTA30__GPIO_20 0x050 0x000 ALT0 0x0
146#define VF610_PAD_PTA30__TRACED14 0x050 0x000 ALT1 0x0
147#define VF610_PAD_PTA30__SAI3_RX_SYNC 0x050 0x000 ALT2 0x0
148#define VF610_PAD_PTA30__ENET1_1588_TMR2 0x050 0x000 ALT3 0x0
149#define VF610_PAD_PTA30__UART4_RTS 0x050 0x000 ALT4 0x0
150#define VF610_PAD_PTA30__I2C3_SCL 0x050 0x000 ALT5 0x0
151#define VF610_PAD_PTA30__UART3_TX 0x050 0x394 ALT7 0x1
152#define VF610_PAD_PTA31__GPIO_21 0x054 0x000 ALT0 0x0
153#define VF610_PAD_PTA31__TRACED15 0x054 0x000 ALT1 0x0
154#define VF610_PAD_PTA31__SAI3_TX_SYNC 0x054 0x000 ALT2 0x0
155#define VF610_PAD_PTA31__ENET1_1588_TMR3 0x054 0x000 ALT3 0x0
156#define VF610_PAD_PTA31__UART4_CTS 0x054 0x000 ALT4 0x0
157#define VF610_PAD_PTA31__I2C3_SDA 0x054 0x000 ALT5 0x0
158#define VF610_PAD_PTA31__UART3_RX 0x054 0x390 ALT7 0x1
159#define VF610_PAD_PTB0__GPIO_22 0x058 0x000 ALT0 0x0
160#define VF610_PAD_PTB0__FTM0_CH0 0x058 0x000 ALT1 0x0
161#define VF610_PAD_PTB0__ADC0_SE2 0x058 0x000 ALT2 0x0
162#define VF610_PAD_PTB0__TRACE_CTL 0x058 0x000 ALT3 0x0
163#define VF610_PAD_PTB0__LCD34 0x058 0x000 ALT4 0x0
164#define VF610_PAD_PTB0__SAI2_RX_BCLK 0x058 0x364 ALT5 0x1
165#define VF610_PAD_PTB0__VIU_DATA18 0x058 0x000 ALT6 0x0
166#define VF610_PAD_PTB0__QSPI1_A_QPCS0 0x058 0x000 ALT7 0x0
167#define VF610_PAD_PTB1__GPIO_23 0x05C 0x000 ALT0 0x0
168#define VF610_PAD_PTB1__FTM0_CH1 0x05C 0x000 ALT1 0x0
169#define VF610_PAD_PTB1__ADC0_SE3 0x05C 0x000 ALT2 0x0
170#define VF610_PAD_PTB1__SRC_RCON30 0x05C 0x000 ALT3 0x0
171#define VF610_PAD_PTB1__LCD35 0x05C 0x000 ALT4 0x0
172#define VF610_PAD_PTB1__SAI2_RX_DATA 0x05C 0x368 ALT5 0x1
173#define VF610_PAD_PTB1__VIU_DATA19 0x05C 0x000 ALT6 0x0
174#define VF610_PAD_PTB1__QSPI1_A_DATA3 0x05C 0x000 ALT7 0x0
175#define VF610_PAD_PTB2__GPIO_24 0x060 0x000 ALT0 0x0
176#define VF610_PAD_PTB2__FTM0_CH2 0x060 0x000 ALT1 0x0
177#define VF610_PAD_PTB2__ADC1_SE2 0x060 0x000 ALT2 0x0
178#define VF610_PAD_PTB2__SRC_RCON31 0x060 0x000 ALT3 0x0
179#define VF610_PAD_PTB2__LCD36 0x060 0x000 ALT4 0x0
180#define VF610_PAD_PTB2__SAI2_RX_SYNC 0x060 0x36C ALT5 0x1
181#define VF610_PAD_PTB2__VIDEO_IN0_DATA20 0x060 0x000 ALT6 0x0
182#define VF610_PAD_PTB2__QSPI1_A_DATA2 0x060 0x000 ALT7 0x0
183#define VF610_PAD_PTB3__GPIO_25 0x064 0x000 ALT0 0x0
184#define VF610_PAD_PTB3__FTM0_CH3 0x064 0x000 ALT1 0x0
185#define VF610_PAD_PTB3__ADC1_SE3 0x064 0x000 ALT2 0x0
186#define VF610_PAD_PTB3__PDB_EXTRIG 0x064 0x000 ALT3 0x0
187#define VF610_PAD_PTB3__LCD37 0x064 0x000 ALT4 0x0
188#define VF610_PAD_PTB3__VIU_DATA21 0x064 0x000 ALT6 0x0
189#define VF610_PAD_PTB3__QSPI1_A_DATA1 0x064 0x000 ALT7 0x0
190#define VF610_PAD_PTB4__GPIO_26 0x068 0x000 ALT0 0x0
191#define VF610_PAD_PTB4__FTM0_CH4 0x068 0x000 ALT1 0x0
192#define VF610_PAD_PTB4__UART1_TX 0x068 0x380 ALT2 0x0
193#define VF610_PAD_PTB4__ADC0_SE4 0x068 0x000 ALT3 0x0
194#define VF610_PAD_PTB4__LCD38 0x068 0x000 ALT4 0x0
195#define VF610_PAD_PTB4__VIU_FID 0x068 0x3A8 ALT5 0x0
196#define VF610_PAD_PTB4__VIU_DATA22 0x068 0x000 ALT6 0x0
197#define VF610_PAD_PTB4__QSPI1_A_DATA0 0x068 0x000 ALT7 0x0
198#define VF610_PAD_PTB5__GPIO_27 0x06C 0x000 ALT0 0x0
199#define VF610_PAD_PTB5__FTM0_CH5 0x06C 0x000 ALT1 0x0
200#define VF610_PAD_PTB5__UART1_RX 0x06C 0x37C ALT2 0x0
201#define VF610_PAD_PTB5__ADC1_SE4 0x06C 0x000 ALT3 0x0
202#define VF610_PAD_PTB5__LCD39 0x06C 0x000 ALT4 0x0
203#define VF610_PAD_PTB5__VIU_DE 0x06C 0x3A4 ALT5 0x0
204#define VF610_PAD_PTB5__QSPI1_A_DQS 0x06C 0x000 ALT7 0x0
205#define VF610_PAD_PTB6__GPIO_28 0x070 0x000 ALT0 0x0
206#define VF610_PAD_PTB6__FTM0_CH6 0x070 0x000 ALT1 0x0
207#define VF610_PAD_PTB6__UART1_RTS 0x070 0x000 ALT2 0x0
208#define VF610_PAD_PTB6__QSPI0_QPCS1_A 0x070 0x000 ALT3 0x0
209#define VF610_PAD_PTB6__LCD_LCD40 0x070 0x000 ALT4 0x0
210#define VF610_PAD_PTB6__FB_CLKOUT 0x070 0x000 ALT5 0x0
211#define VF610_PAD_PTB6__VIU_HSYNC 0x070 0x000 ALT6 0x0
212#define VF610_PAD_PTB6__UART2_TX 0x070 0x38C ALT7 0x0
213#define VF610_PAD_PTB7__GPIO_29 0x074 0x000 ALT0 0x0
214#define VF610_PAD_PTB7__FTM0_CH7 0x074 0x000 ALT1 0x0
215#define VF610_PAD_PTB7__UART1_CTS 0x074 0x378 ALT2 0x0
216#define VF610_PAD_PTB7__QSPI0_B_QPCS1 0x074 0x000 ALT3 0x0
217#define VF610_PAD_PTB7__LCD41 0x074 0x000 ALT4 0x0
218#define VF610_PAD_PTB7__VIU_VSYNC 0x074 0x000 ALT6 0x0
219#define VF610_PAD_PTB7__UART2_RX 0x074 0x388 ALT7 0x0
220#define VF610_PAD_PTB8__GPIO_30 0x078 0x000 ALT0 0x0
221#define VF610_PAD_PTB8__FTM1_CH0 0x078 0x32C ALT1 0x0
222#define VF610_PAD_PTB8__FTM1_QD_PHA 0x078 0x334 ALT3 0x1
223#define VF610_PAD_PTB8__VIU_DE 0x078 0x3A4 ALT5 0x1
224#define VF610_PAD_PTB8__DCU1_R6 0x078 0x000 ALT7 0x0
225#define VF610_PAD_PTB9__GPIO_31 0x07C 0x000 ALT0 0x0
226#define VF610_PAD_PTB9__FTM1_CH1 0x07C 0x330 ALT1 0x0
227#define VF610_PAD_PTB9__FTM1_QD_PHB 0x07C 0x338 ALT3 0x1
228#define VF610_PAD_PTB9__DCU1_R7 0x07C 0x000 ALT7 0x0
229#define VF610_PAD_PTB10__GPIO_32 0x080 0x000 ALT0 0x0
230#define VF610_PAD_PTB10__UART0_TX 0x080 0x000 ALT1 0x0
231#define VF610_PAD_PTB10__DCU0_TCON4 0x080 0x000 ALT4 0x0
232#define VF610_PAD_PTB10__VIU_DE 0x080 0x3A4 ALT5 0x2
233#define VF610_PAD_PTB10__CKO1 0x080 0x000 ALT6 0x0
234#define VF610_PAD_PTB10__ENET_TS_CLKIN 0x080 0x2F4 ALT7 0x1
235#define VF610_PAD_PTB11__GPIO_33 0x084 0x000 ALT0 0x0
236#define VF610_PAD_PTB11__UART0_RX 0x084 0x000 ALT1 0x0
237#define VF610_PAD_PTB11__DCU0_TCON5 0x084 0x000 ALT4 0x0
238#define VF610_PAD_PTB11__SNVS_ALARM_OUT_B 0x084 0x000 ALT5 0x0
239#define VF610_PAD_PTB11__CKO2 0x084 0x000 ALT6 0x0
240#define VF610_PAD_PTB11_ENET0_1588_TMR0 0x084 0x304 ALT7 0x0
241#define VF610_PAD_PTB12__GPIO_34 0x088 0x000 ALT0 0x0
242#define VF610_PAD_PTB12__UART0_RTS 0x088 0x000 ALT1 0x0
243#define VF610_PAD_PTB12__DSPI0_CS5 0x088 0x000 ALT3 0x0
244#define VF610_PAD_PTB12__DCU0_TCON6 0x088 0x000 ALT4 0x0
245#define VF610_PAD_PTB12__FB_AD1 0x088 0x000 ALT5 0x0
246#define VF610_PAD_PTB12__NMI 0x088 0x000 ALT6 0x0
247#define VF610_PAD_PTB12__ENET0_1588_TMR1 0x088 0x308 ALT7 0x0
248#define VF610_PAD_PTB13__GPIO_35 0x08C 0x000 ALT0 0x0
249#define VF610_PAD_PTB13__UART0_CTS 0x08C 0x000 ALT1 0x0
250#define VF610_PAD_PTB13__DSPI0_CS4 0x08C 0x000 ALT3 0x0
251#define VF610_PAD_PTB13__DCU0_TCON7 0x08C 0x000 ALT4 0x0
252#define VF610_PAD_PTB13__FB_AD0 0x08C 0x000 ALT5 0x0
253#define VF610_PAD_PTB13__TRACE_CTL 0x08C 0x000 ALT6 0x0
254#define VF610_PAD_PTB14__GPIO_36 0x090 0x000 ALT0 0x0
255#define VF610_PAD_PTB14__CAN0_RX 0x090 0x000 ALT1 0x0
256#define VF610_PAD_PTB14__I2C0_SCL 0x090 0x33C ALT2 0x1
257#define VF610_PAD_PTB14__DCU0_TCON8 0x090 0x000 ALT4 0x0
258#define VF610_PAD_PTB14__DCU1_PCLK 0x090 0x000 ALT7 0x0
259#define VF610_PAD_PTB15__GPIO_37 0x094 0x000 ALT0 0x0
260#define VF610_PAD_PTB15__CAN0_TX 0x094 0x000 ALT1 0x0
261#define VF610_PAD_PTB15__I2C0_SDA 0x094 0x340 ALT2 0x1
262#define VF610_PAD_PTB15__DCU0_TCON9 0x094 0x000 ALT4 0x0
263#define VF610_PAD_PTB15__VIU_PIX_CLK 0x094 0x3AC ALT7 0x0
264#define VF610_PAD_PTB16__GPIO_38 0x098 0x000 ALT0 0x0
265#define VF610_PAD_PTB16__CAN1_RX 0x098 0x000 ALT1 0x0
266#define VF610_PAD_PTB16__I2C1_SCL 0x098 0x344 ALT2 0x1
267#define VF610_PAD_PTB16__DCU0_TCON10 0x098 0x000 ALT4 0x0
268#define VF610_PAD_PTB17__GPIO_39 0x09C 0x000 ALT0 0x0
269#define VF610_PAD_PTB17__CAN1_TX 0x09C 0x000 ALT1 0x0
270#define VF610_PAD_PTB17__I2C1_SDA 0x09C 0x348 ALT2 0x1
271#define VF610_PAD_PTB17__DCU0_TCON11 0x09C 0x000 ALT4 0x0
272#define VF610_PAD_PTB18__GPIO_40 0x0A0 0x000 ALT0 0x0
273#define VF610_PAD_PTB18__DSPI0_CS1 0x0A0 0x000 ALT1 0x0
274#define VF610_PAD_PTB18__EXT_AUDIO_MCLK 0x0A0 0x2EC ALT2 0x2
275#define VF610_PAD_PTB18__VIU_DATA9 0x0A0 0x000 ALT6 0x0
276#define VF610_PAD_PTB19__GPIO_41 0x0A4 0x000 ALT0 0x0
277#define VF610_PAD_PTB19__DSPI0_CS0 0x0A4 0x000 ALT1 0x0
278#define VF610_PAD_PTB19__VIU_DATA10 0x0A4 0x000 ALT6 0x0
279#define VF610_PAD_PTB20__GPIO_42 0x0A8 0x000 ALT0 0x0
280#define VF610_PAD_PTB20__DSPI0_SIN 0x0A8 0x000 ALT1 0x0
281#define VF610_PAD_PTB20__LCD42 0x0A8 0x000 ALT4 0x0
282#define VF610_PAD_PTB20__VIU_DATA11 0x0A8 0x000 ALT6 0x0
283#define VF610_PAD_PTB21__GPIO_43 0x0AC 0x000 ALT0 0x0
284#define VF610_PAD_PTB21__DSPI0_SOUT 0x0AC 0x000 ALT1 0x0
285#define VF610_PAD_PTB21__LCD43 0x0AC 0x000 ALT4 0x0
286#define VF610_PAD_PTB21__VIU_DATA12 0x0AC 0x000 ALT6 0x0
287#define VF610_PAD_PTB21__DCU1_PCLK 0x0AC 0x000 ALT7 0x0
288#define VF610_PAD_PTB22__GPIO_44 0x0B0 0x000 ALT0 0x0
289#define VF610_PAD_PTB22__DSPI0_SCK 0x0B0 0x000 ALT1 0x0
290#define VF610_PAD_PTB22__VLCD 0x0B0 0x000 ALT4 0x0
291#define VF610_PAD_PTB22__VIU_FID 0x0B0 0x3A8 ALT5 0x1
292#define VF610_PAD_PTC0__GPIO_45 0x0B4 0x000 ALT0 0x0
293#define VF610_PAD_PTC0__ENET_RMII0_MDC 0x0B4 0x000 ALT1 0x0
294#define VF610_PAD_PTC0__FTM1_CH0 0x0B4 0x32C ALT2 0x1
295#define VF610_PAD_PTC0__DSPI0_CS3 0x0B4 0x000 ALT3 0x0
296#define VF610_PAD_PTC0__ESAI_SCKT 0x0B4 0x310 ALT4 0x0
297#define VF610_PAD_PTC0__ESDHC0_CLK 0x0B4 0x000 ALT5 0x0
298#define VF610_PAD_PTC0__VIU_DATA0 0x0B4 0x000 ALT6 0x0
299#define VF610_PAD_PTC0__SRC_RCON18 0x0B4 0x398 ALT7 0x0
300#define VF610_PAD_PTC1__GPIO_46 0x0B8 0x000 ALT0 0x0
301#define VF610_PAD_PTC1__ENET_RMII0_MDIO 0x0B8 0x000 ALT1 0x0
302#define VF610_PAD_PTC1__FTM1_CH1 0x0B8 0x330 ALT2 0x1
303#define VF610_PAD_PTC1__DSPI0_CS2 0x0B8 0x000 ALT3 0x0
304#define VF610_PAD_PTC1__ESAI_FST 0x0B8 0x30C ALT4 0x0
305#define VF610_PAD_PTC1__ESDHC0_CMD 0x0B8 0x000 ALT5 0x0
306#define VF610_PAD_PTC1__VIU_DATA1 0x0B8 0x000 ALT6 0x0
307#define VF610_PAD_PTC1__SRC_RCON19 0x0B8 0x39C ALT7 0x0
308#define VF610_PAD_PTC2__GPIO_47 0x0BC 0x000 ALT0 0x0
309#define VF610_PAD_PTC2__ENET_RMII0_CRS 0x0BC 0x000 ALT1 0x0
310#define VF610_PAD_PTC2__UART1_TX 0x0BC 0x380 ALT2 0x1
311#define VF610_PAD_PTC2__ESAI_SDO0 0x0BC 0x314 ALT4 0x0
312#define VF610_PAD_PTC2__ESDHC0_DAT0 0x0BC 0x000 ALT5 0x0
313#define VF610_PAD_PTC2__VIU_DATA2 0x0BC 0x000 ALT6 0x0
314#define VF610_PAD_PTC2__SRC_RCON20 0x0BC 0x3A0 ALT7 0x0
315#define VF610_PAD_PTC3__GPIO_48 0x0C0 0x000 ALT0 0x0
316#define VF610_PAD_PTC3__ENET_RMII0_RXD1 0x0C0 0x000 ALT1 0x0
317#define VF610_PAD_PTC3__UART1_RX 0x0C0 0x37C ALT2 0x1
318#define VF610_PAD_PTC3__ESAI_SDO1 0x0C0 0x318 ALT4 0x0
319#define VF610_PAD_PTC3__ESDHC0_DAT1 0x0C0 0x000 ALT5 0x0
320#define VF610_PAD_PTC3__VIU_DATA3 0x0C0 0x000 ALT6 0x0
321#define VF610_PAD_PTC3__DCU0_R0 0x0C0 0x000 ALT7 0x0
322#define VF610_PAD_PTC4__GPIO_49 0x0C4 0x000 ALT0 0x0
323#define VF610_PAD_PTC4__ENET_RMII0_RXD0 0x0C4 0x000 ALT1 0x0
324#define VF610_PAD_PTC4__UART1_RTS 0x0C4 0x000 ALT2 0x0
325#define VF610_PAD_PTC4__DSPI1_CS1 0x0C4 0x000 ALT3 0x0
326#define VF610_PAD_PTC4__ESAI_SDO2 0x0C4 0x31C ALT4 0x0
327#define VF610_PAD_PTC4__ESDHC0_DAT2 0x0C4 0x000 ALT5 0x0
328#define VF610_PAD_PTC4__VIU_DATA4 0x0C4 0x000 ALT6 0x0
329#define VF610_PAD_PTC4__DCU0_R1 0x0C4 0x000 ALT7 0x0
330#define VF610_PAD_PTC5__GPIO_50 0x0C8 0x000 ALT0 0x0
331#define VF610_PAD_PTC5__ENET_RMII0_RXER 0x0C8 0x000 ALT1 0x0
332#define VF610_PAD_PTC5__UART1_CTS 0x0C8 0x378 ALT2 0x1
333#define VF610_PAD_PTC5__DSPI1_CS0 0x0C8 0x300 ALT3 0x0
334#define VF610_PAD_PTC5__ESAI_SDO3 0x0C8 0x320 ALT4 0x0
335#define VF610_PAD_PTC5__ESDHC0_DAT3 0x0C8 0x000 ALT5 0x0
336#define VF610_PAD_PTC5__VIU_DATA5 0x0C8 0x000 ALT6 0x0
337#define VF610_PAD_PTC5__DCU0_G0 0x0C8 0x000 ALT7 0x0
338#define VF610_PAD_PTC6__GPIO_51 0x0CC 0x000 ALT0 0x0
339#define VF610_PAD_PTC6__ENET_RMII0_TXD1 0x0CC 0x000 ALT1 0x0
340#define VF610_PAD_PTC6__DSPI1_SIN 0x0CC 0x2FC ALT3 0x0
341#define VF610_PAD_PTC6__ESAI_SDI0 0x0CC 0x328 ALT4 0x0
342#define VF610_PAD_PTC6__ESDHC0_WP 0x0CC 0x000 ALT5 0x0
343#define VF610_PAD_PTC6__VIU_DATA6 0x0CC 0x000 ALT6 0x0
344#define VF610_PAD_PTC6__DCU0_G1 0x0CC 0x000 ALT7 0x0
345#define VF610_PAD_PTC7__GPIO_52 0x0D0 0x000 ALT0 0x0
346#define VF610_PAD_PTC7__ENET_RMII0_TXD0 0x0D0 0x000 ALT1 0x0
347#define VF610_PAD_PTC7__DSPI1_SOUT 0x0D0 0x000 ALT3 0x0
348#define VF610_PAD_PTC7__ESAI_SDI1 0x0D0 0x324 ALT4 0x0
349#define VF610_PAD_PTC7__VIU_DATA7 0x0D0 0x000 ALT6 0x0
350#define VF610_PAD_PTC7__DCU0_B0 0x0D0 0x000 ALT7 0x0
351#define VF610_PAD_PTC8__GPIO_53 0x0D4 0x000 ALT0 0x0
352#define VF610_PAD_PTC8__ENET_RMII0_TXEN 0x0D4 0x000 ALT1 0x0
353#define VF610_PAD_PTC8__DSPI1_SCK 0x0D4 0x2F8 ALT3 0x0
354#define VF610_PAD_PTC8__VIU_DATA8 0x0D4 0x000 ALT6 0x0
355#define VF610_PAD_PTC8__DCU0_B1 0x0D4 0x000 ALT7 0x0
356#define VF610_PAD_PTC9__GPIO_54 0x0D8 0x000 ALT0 0x0
357#define VF610_PAD_PTC9__ENET_RMII1_MDC 0x0D8 0x000 ALT1 0x0
358#define VF610_PAD_PTC9__ESAI_SCKT 0x0D8 0x310 ALT3 0x1
359#define VF610_PAD_PTC9__MLB_CLK 0x0D8 0x354 ALT6 0x1
360#define VF610_PAD_PTC9__DEBUG_OUT0 0x0D8 0x000 ALT7 0x0
361#define VF610_PAD_PTC10__GPIO_55 0x0DC 0x000 ALT0 0x0
362#define VF610_PAD_PTC10__ENET_RMII1_MDIO 0x0DC 0x000 ALT1 0x0
363#define VF610_PAD_PTC10__ESAI_FST 0x0DC 0x30C ALT3 0x1
364#define VF610_PAD_PTC10__MLB_SIGNAL 0x0DC 0x35C ALT6 0x1
365#define VF610_PAD_PTC10__DEBUG_OUT1 0x0DC 0x000 ALT7 0x0
366#define VF610_PAD_PTC11__GPIO_56 0x0E0 0x000 ALT0 0x0
367#define VF610_PAD_PTC11__ENET_RMII1_CRS 0x0E0 0x000 ALT1 0x0
368#define VF610_PAD_PTC11__ESAI_SDO0 0x0E0 0x314 ALT3 0x1
369#define VF610_PAD_PTC11__MLB_DATA 0x0E0 0x358 ALT6 0x1
370#define VF610_PAD_PTC11__DEBUG_OUT 0x0E0 0x000 ALT7 0x0
371#define VF610_PAD_PTC12__GPIO_57 0x0E4 0x000 ALT0 0x0
372#define VF610_PAD_PTC12__ENET_RMII_RXD1 0x0E4 0x000 ALT1 0x0
373#define VF610_PAD_PTC12__ESAI_SDO1 0x0E4 0x318 ALT3 0x1
374#define VF610_PAD_PTC12__SAI2_TX_BCLK 0x0E4 0x370 ALT5 0x1
375#define VF610_PAD_PTC12__DEBUG_OUT3 0x0E4 0x000 ALT7 0x0
376#define VF610_PAD_PTC13__GPIO_58 0x0E8 0x000 ALT0 0x0
377#define VF610_PAD_PTC13__ENET_RMII1_RXD0 0x0E8 0x000 ALT1 0x0
378#define VF610_PAD_PTC13__ESAI_SDO2 0x0E8 0x31C ALT3 0x1
379#define VF610_PAD_PTC13__SAI2_RX_BCLK 0x0E8 0x364 ALT5 0x2
380#define VF610_PAD_PTC13__DEBUG_OUT4 0x0E8 0x000 ALT7 0x0
381#define VF610_PAD_PTC14__GPIO_59 0x0EC 0x000 ALT0 0x0
382#define VF610_PAD_PTC14__ENET_RMII1_RXER 0x0EC 0x000 ALT1 0x0
383#define VF610_PAD_PTC14__ESAI_SDO3 0x0EC 0x320 ALT3 0x1
384#define VF610_PAD_PTC14__UART5_TX 0x0EC 0x000 ALT4 0x0
385#define VF610_PAD_PTC14__SAI2_RX_DATA 0x0EC 0x368 ALT5 0x2
386#define VF610_PAD_PTC14__ADC0_SE6 0x0EC 0x000 ALT6 0x0
387#define VF610_PAD_PTC14__DEBUG_OUT5 0x0EC 0x000 ALT7 0x0
388#define VF610_PAD_PTC15__GPIO_60 0x0F0 0x000 ALT0 0x0
389#define VF610_PAD_PTC15__ENET_RMII1_TXD1 0x0F0 0x000 ALT1 0x0
390#define VF610_PAD_PTC15__ESAI_SDI0 0x0F0 0x328 ALT3 0x1
391#define VF610_PAD_PTC15__UART5_RX 0x0F0 0x000 ALT4 0x0
392#define VF610_PAD_PTC15__SAI2_TX_DATA 0x0F0 0x000 ALT5 0x0
393#define VF610_PAD_PTC15__ADC0_SE7 0x0F0 0x000 ALT6 0x0
394#define VF610_PAD_PTC15__DEBUG_OUT6 0x0F0 0x000 ALT7 0x0
395#define VF610_PAD_PTC16__GPIO_61 0x0F4 0x000 ALT0 0x0
396#define VF610_PAD_PTC16__ENET_RMII1_TXD0 0x0F4 0x000 ALT1 0x0
397#define VF610_PAD_PTC16__ESAI_SDI1 0x0F4 0x324 ALT3 0x1
398#define VF610_PAD_PTC16__UART5_RTS 0x0F4 0x000 ALT4 0x0
399#define VF610_PAD_PTC16__SAI2_RX_SYNC 0x0F4 0x36C ALT5 0x2
400#define VF610_PAD_PTC16__ADC1_SE6 0x0F4 0x000 ALT6 0x0
401#define VF610_PAD_PTC16__DEBUG_OUT7 0x0F4 0x000 ALT7 0x0
402#define VF610_PAD_PTC17__GPIO_62 0x0F8 0x000 ALT0 0x0
403#define VF610_PAD_PTC17__ENET_RMII1_TXEN 0x0F8 0x000 ALT1 0x0
404#define VF610_PAD_PTC17__ADC1_SE7 0x0F8 0x000 ALT3 0x0
405#define VF610_PAD_PTC17__UART5_CTS 0x0F8 0x000 ALT4 0x0
406#define VF610_PAD_PTC17__SAI2_TX_SYNC 0x0F8 0x374 ALT5 0x1
407#define VF610_PAD_PTC17__USB1_SOF_PULSE 0x0F8 0x000 ALT6 0x0
408#define VF610_PAD_PTC17__DEBUG_OUT8 0x0F8 0x000 ALT7 0x0
409#define VF610_PAD_PTD31__GPIO_63 0x0FC 0x000 ALT0 0x0
410#define VF610_PAD_PTD31__FB_AD31 0x0FC 0x000 ALT1 0x0
411#define VF610_PAD_PTD31__NF_IO15 0x0FC 0x000 ALT2 0x0
412#define VF610_PAD_PTD31__FTM3_CH0 0x0FC 0x000 ALT4 0x0
413#define VF610_PAD_PTD31__DSPI2_CS1 0x0FC 0x000 ALT5 0x0
414#define VF610_PAD_PTD31__DEBUG_OUT9 0x0FC 0x000 ALT7 0x0
415#define VF610_PAD_PTD30__GPIO_64 0x100 0x000 ALT0 0x0
416#define VF610_PAD_PTD30__FB_AD30 0x100 0x000 ALT1 0x0
417#define VF610_PAD_PTD30__NF_IO14 0x100 0x000 ALT2 0x0
418#define VF610_PAD_PTD30__FTM3_CH1 0x100 0x000 ALT4 0x0
419#define VF610_PAD_PTD30__DSPI2_CS0 0x100 0x000 ALT5 0x0
420#define VF610_PAD_PTD30__DEBUG_OUT10 0x100 0x000 ALT7 0x0
421#define VF610_PAD_PTD29__GPIO_65 0x104 0x000 ALT0 0x0
422#define VF610_PAD_PTD29__FB_AD29 0x104 0x000 ALT1 0x0
423#define VF610_PAD_PTD29__NF_IO13 0x104 0x000 ALT2 0x0
424#define VF610_PAD_PTD29__FTM3_CH2 0x104 0x000 ALT4 0x0
425#define VF610_PAD_PTD29__DSPI2_SIN 0x104 0x000 ALT5 0x0
426#define VF610_PAD_PTD29__DEBUG_OUT11 0x104 0x000 ALT7 0x0
427#define VF610_PAD_PTD28__GPIO_66 0x108 0x000 ALT0 0x0
428#define VF610_PAD_PTD28__FB_AD28 0x108 0x000 ALT1 0x0
429#define VF610_PAD_PTD28__NF_IO12 0x108 0x000 ALT2 0x0
430#define VF610_PAD_PTD28__I2C2_SCL 0x108 0x34C ALT3 0x1
431#define VF610_PAD_PTD28__FTM3_CH3 0x108 0x000 ALT4 0x0
432#define VF610_PAD_PTD28__DSPI2_SOUT 0x108 0x000 ALT5 0x0
433#define VF610_PAD_PTD28__DEBUG_OUT12 0x108 0x000 ALT7 0x0
434#define VF610_PAD_PTD27__GPIO_67 0x10C 0x000 ALT0 0x0
435#define VF610_PAD_PTD27__FB_AD27 0x10C 0x000 ALT1 0x0
436#define VF610_PAD_PTD27__NF_IO11 0x10C 0x000 ALT2 0x0
437#define VF610_PAD_PTD27__I2C2_SDA 0x10C 0x350 ALT3 0x1
438#define VF610_PAD_PTD27__FTM3_CH4 0x10C 0x000 ALT4 0x0
439#define VF610_PAD_PTD27__DSPI2_SCK 0x10C 0x000 ALT5 0x0
440#define VF610_PAD_PTD27__DEBUG_OUT13 0x10C 0x000 ALT7 0x0
441#define VF610_PAD_PTD26__GPIO_68 0x110 0x000 ALT0 0x0
442#define VF610_PAD_PTD26__FB_AD26 0x110 0x000 ALT1 0x0
443#define VF610_PAD_PTD26__NF_IO10 0x110 0x000 ALT2 0x0
444#define VF610_PAD_PTD26__FTM3_CH5 0x110 0x000 ALT4 0x0
445#define VF610_PAD_PTD26__ESDHC1_WP 0x110 0x000 ALT5 0x0
446#define VF610_PAD_PTD26__DEBUG_OUT14 0x110 0x000 ALT7 0x0
447#define VF610_PAD_PTD25__GPIO_69 0x114 0x000 ALT0 0x0
448#define VF610_PAD_PTD25__FB_AD25 0x114 0x000 ALT1 0x0
449#define VF610_PAD_PTD25__NF_IO9 0x114 0x000 ALT2 0x0
450#define VF610_PAD_PTD25__FTM3_CH6 0x114 0x000 ALT4 0x0
451#define VF610_PAD_PTD25__DEBUG_OUT15 0x114 0x000 ALT7 0x0
452#define VF610_PAD_PTD24__GPIO_70 0x118 0x000 ALT0 0x0
453#define VF610_PAD_PTD24__FB_AD24 0x118 0x000 ALT1 0x0
454#define VF610_PAD_PTD24__NF_IO8 0x118 0x000 ALT2 0x0
455#define VF610_PAD_PTD24__FTM3_CH7 0x118 0x000 ALT4 0x0
456#define VF610_PAD_PTD24__DEBUG_OUT16 0x118 0x000 ALT7 0x0
457#define VF610_PAD_PTD23__GPIO_71 0x11C 0x000 ALT0 0x0
458#define VF610_PAD_PTD23__FB_AD23 0x11C 0x000 ALT1 0x0
459#define VF610_PAD_PTD23__NF_IO7 0x11C 0x000 ALT2 0x0
460#define VF610_PAD_PTD23__FTM2_CH0 0x11C 0x000 ALT3 0x0
461#define VF610_PAD_PTD23__ENET0_1588_TMR0 0x11C 0x304 ALT4 0x1
462#define VF610_PAD_PTD23__ESDHC0_DAT4 0x11C 0x000 ALT5 0x0
463#define VF610_PAD_PTD23__UART2_TX 0x11C 0x38C ALT6 0x1
464#define VF610_PAD_PTD23__DCU1_R3 0x11C 0x000 ALT7 0x0
465#define VF610_PAD_PTD22__GPIO_72 0x120 0x000 ALT0 0x0
466#define VF610_PAD_PTD22__FB_AD22 0x120 0x000 ALT1 0x0
467#define VF610_PAD_PTD22__NF_IO6 0x120 0x000 ALT2 0x0
468#define VF610_PAD_PTD22__FTM2_CH1 0x120 0x000 ALT3 0x0
469#define VF610_PAD_PTD22__ENET0_1588_TMR1 0x120 0x308 ALT4 0x1
470#define VF610_PAD_PTD22__ESDHC0_DAT5 0x120 0x000 ALT5 0x0
471#define VF610_PAD_PTD22__UART2_RX 0x120 0x388 ALT6 0x1
472#define VF610_PAD_PTD22__DCU1_R4 0x120 0x000 ALT7 0x0
473#define VF610_PAD_PTD21__GPIO_73 0x124 0x000 ALT0 0x0
474#define VF610_PAD_PTD21__FB_AD21 0x124 0x000 ALT1 0x0
475#define VF610_PAD_PTD21__NF_IO5 0x124 0x000 ALT2 0x0
476#define VF610_PAD_PTD21__ENET0_1588_TMR2 0x124 0x000 ALT4 0x0
477#define VF610_PAD_PTD21__ESDHC0_DAT6 0x124 0x000 ALT5 0x0
478#define VF610_PAD_PTD21__UART2_RTS 0x124 0x000 ALT6 0x0
479#define VF610_PAD_PTD21__DCU1_R5 0x124 0x000 ALT7 0x0
480#define VF610_PAD_PTD20__GPIO_74 0x128 0x000 ALT0 0x0
481#define VF610_PAD_PTD20__FB_AD20 0x128 0x000 ALT1 0x0
482#define VF610_PAD_PTD20__NF_IO4 0x128 0x000 ALT2 0x0
483#define VF610_PAD_PTD20__ENET0_1588_TMR3 0x128 0x000 ALT4 0x0
484#define VF610_PAD_PTD20__ESDHC0_DAT7 0x128 0x000 ALT5 0x0
485#define VF610_PAD_PTD20__UART2_CTS 0x128 0x384 ALT6 0x0
486#define VF610_PAD_PTD20__DCU1_R0 0x128 0x000 ALT7 0x0
487#define VF610_PAD_PTD19__GPIO_75 0x12C 0x000 ALT0 0x0
488#define VF610_PAD_PTD19__FB_AD19 0x12C 0x000 ALT1 0x0
489#define VF610_PAD_PTD19__NF_IO3 0x12C 0x000 ALT2 0x0
490#define VF610_PAD_PTD19__ESAI_SCKR 0x12C 0x000 ALT3 0x0
491#define VF610_PAD_PTD19__I2C0_SCL 0x12C 0x33C ALT4 0x2
492#define VF610_PAD_PTD19__FTM2_QD_PHA 0x12C 0x000 ALT5 0x0
493#define VF610_PAD_PTD19__DCU1_R1 0x12C 0x000 ALT7 0x0
494#define VF610_PAD_PTD18__GPIO_76 0x130 0x000 ALT0 0x0
495#define VF610_PAD_PTD18__FB_AD18 0x130 0x000 ALT1 0x0
496#define VF610_PAD_PTD18__NF_IO2 0x130 0x000 ALT2 0x0
497#define VF610_PAD_PTD18__ESAI_FSR 0x130 0x000 ALT3 0x0
498#define VF610_PAD_PTD18__I2C0_SDA 0x130 0x340 ALT4 0x2
499#define VF610_PAD_PTD18__FTM2_QD_PHB 0x130 0x000 ALT5 0x0
500#define VF610_PAD_PTD18__DCU1_G0 0x130 0x000 ALT7 0x0
501#define VF610_PAD_PTD17__GPIO_77 0x134 0x000 ALT0 0x0
502#define VF610_PAD_PTD17__FB_AD17 0x134 0x000 ALT1 0x0
503#define VF610_PAD_PTD17__NF_IO1 0x134 0x000 ALT2 0x0
504#define VF610_PAD_PTD17__ESAI_HCKR 0x134 0x000 ALT3 0x0
505#define VF610_PAD_PTD17__I2C1_SCL 0x134 0x344 ALT4 0x2
506#define VF610_PAD_PTD17__DCU1_G1 0x134 0x000 ALT7 0x0
507#define VF610_PAD_PTD16__GPIO_78 0x138 0x000 ALT0 0x0
508#define VF610_PAD_PTD16__FB_AD16 0x138 0x000 ALT1 0x0
509#define VF610_PAD_PTD16__NF_IO0 0x138 0x000 ALT2 0x0
510#define VF610_PAD_PTD16__ESAI_HCKT 0x138 0x000 ALT3 0x0
511#define VF610_PAD_PTD16__I2C1_SDA 0x138 0x348 ALT4 0x2
512#define VF610_PAD_PTD16__DCU1_G2 0x138 0x000 ALT7 0x0
513#define VF610_PAD_PTD0__GPIO_79 0x13C 0x000 ALT0 0x0
514#define VF610_PAD_PTD0__QSPI0_A_QSCK 0x13C 0x000 ALT1 0x0
515#define VF610_PAD_PTD0__UART2_TX 0x13C 0x38C ALT2 0x2
516#define VF610_PAD_PTD0__FB_AD15 0x13C 0x000 ALT4 0x0
517#define VF610_PAD_PTD0__SPDIF_EXTCLK 0x13C 0x000 ALT5 0x0
518#define VF610_PAD_PTD0__DEBUG_OUT17 0x13C 0x000 ALT7 0x0
519#define VF610_PAD_PTD1__GPIO_80 0x140 0x000 ALT0 0x0
520#define VF610_PAD_PTD1__QSPI0_A_CS0 0x140 0x000 ALT1 0x0
521#define VF610_PAD_PTD1__UART2_RX 0x140 0x388 ALT2 0x2
522#define VF610_PAD_PTD1__FB_AD14 0x140 0x000 ALT4 0x0
523#define VF610_PAD_PTD1__SPDIF_IN1 0x140 0x000 ALT5 0x0
524#define VF610_PAD_PTD1__DEBUG_OUT18 0x140 0x000 ALT7 0x0
525#define VF610_PAD_PTD2__GPIO_81 0x144 0x000 ALT0 0x0
526#define VF610_PAD_PTD2__QSPI0_A_DATA3 0x144 0x000 ALT1 0x0
527#define VF610_PAD_PTD2__UART2_RTS 0x144 0x000 ALT2 0x0
528#define VF610_PAD_PTD2__DSPI1_CS3 0x144 0x000 ALT3 0x0
529#define VF610_PAD_PTD2__FB_AD13 0x144 0x000 ALT4 0x0
530#define VF610_PAD_PTD2__SPDIF_OUT1 0x144 0x000 ALT5 0x0
531#define VF610_PAD_PTD2__DEBUG_OUT19 0x144 0x000 ALT7 0x0
532#define VF610_PAD_PTD3__GPIO_82 0x148 0x000 ALT0 0x0
533#define VF610_PAD_PTD3__QSPI0_A_DATA2 0x148 0x000 ALT1 0x0
534#define VF610_PAD_PTD3__UART2_CTS 0x148 0x384 ALT2 0x1
535#define VF610_PAD_PTD3__DSPI1_CS2 0x148 0x000 ALT3 0x0
536#define VF610_PAD_PTD3__FB_AD12 0x148 0x000 ALT4 0x0
537#define VF610_PAD_PTD3__SPDIF_PLOCK 0x148 0x000 ALT5 0x0
538#define VF610_PAD_PTD3__DEBUG_OUT20 0x148 0x000 ALT7 0x0
539#define VF610_PAD_PTD4__GPIO_83 0x14C 0x000 ALT0 0x0
540#define VF610_PAD_PTD4__QSPI0_A_DATA1 0x14C 0x000 ALT1 0x0
541#define VF610_PAD_PTD4__DSPI1_CS1 0x14C 0x000 ALT3 0x0
542#define VF610_PAD_PTD4__FB_AD11 0x14C 0x000 ALT4 0x0
543#define VF610_PAD_PTD4__SPDIF_SRCLK 0x14C 0x000 ALT5 0x0
544#define VF610_PAD_PTD4__DEBUG_OUT21 0x14C 0x000 ALT7 0x0
545#define VF610_PAD_PTD5__GPIO_84 0x150 0x000 ALT0 0x0
546#define VF610_PAD_PTD5__QSPI0_A_DATA0 0x150 0x000 ALT1 0x0
547#define VF610_PAD_PTD5__DSPI1_CS0 0x150 0x300 ALT3 0x1
548#define VF610_PAD_PTD5__FB_AD10 0x150 0x000 ALT4 0x0
549#define VF610_PAD_PTD5__DEBUG_OUT22 0x150 0x000 ALT7 0x0
550#define VF610_PAD_PTD6__GPIO_85 0x154 0x000 ALT0 0x0
551#define VF610_PAD_PTD6__QSPI1_A_DQS 0x154 0x000 ALT1 0x0
552#define VF610_PAD_PTD6__DSPI1_SIN 0x154 0x2FC ALT3 0x1
553#define VF610_PAD_PTD6__FB_AD9 0x154 0x000 ALT4 0x0
554#define VF610_PAD_PTD6__DEBUG_OUT23 0x154 0x000 ALT7 0x0
555#define VF610_PAD_PTD7__GPIO_86 0x158 0x000 ALT0 0x0
556#define VF610_PAD_PTD7__QSPI0_B_QSCK 0x158 0x000 ALT1 0x0
557#define VF610_PAD_PTD7__DSPI1_SOUT 0x158 0x000 ALT3 0x0
558#define VF610_PAD_PTD7__FB_AD8 0x158 0x000 ALT4 0x0
559#define VF610_PAD_PTD7__DEBUG_OUT24 0x158 0x000 ALT7 0x0
560#define VF610_PAD_PTD8__GPIO_87 0x15C 0x000 ALT0 0x0
561#define VF610_PAD_PTD8__QSPI0_B_CS0 0x15C 0x000 ALT1 0x0
562#define VF610_PAD_PTD8__FB_CLKOUT 0x15C 0x000 ALT2 0x0
563#define VF610_PAD_PTD8__DSPI1_SCK 0x15C 0x2F8 ALT3 0x1
564#define VF610_PAD_PTD8__FB_AD7 0x15C 0x000 ALT4 0x0
565#define VF610_PAD_PTD8__DEBUG_OUT25 0x15C 0x000 ALT7 0x0
566#define VF610_PAD_PTD9__GPIO_88 0x160 0x000 ALT0 0x0
567#define VF610_PAD_PTD9__QSPI0_B_DATA3 0x160 0x000 ALT1 0x0
568#define VF610_PAD_PTD9__DSPI3_CS1 0x160 0x000 ALT2 0x0
569#define VF610_PAD_PTD9__FB_AD6 0x160 0x000 ALT4 0x0
570#define VF610_PAD_PTD9__SAI1_TX_SYNC 0x160 0x360 ALT6 0x0
571#define VF610_PAD_PTD9__DCU1_B0 0x160 0x000 ALT7 0x0
572#define VF610_PAD_PTD10__GPIO_89 0x164 0x000 ALT0 0x0
573#define VF610_PAD_PTD10__QSPI0_B_DATA2 0x164 0x000 ALT1 0x0
574#define VF610_PAD_PTD10__DSPI3_CS0 0x164 0x000 ALT2 0x0
575#define VF610_PAD_PTD10__FB_AD5 0x164 0x000 ALT4 0x0
576#define VF610_PAD_PTD10__DCU1_B1 0x164 0x000 ALT7 0x0
577#define VF610_PAD_PTD11__GPIO_90 0x168 0x000 ALT0 0x0
578#define VF610_PAD_PTD11__QSPI0_B_DATA1 0x168 0x000 ALT1 0x0
579#define VF610_PAD_PTD11__DSPI3_SIN 0x168 0x000 ALT2 0x0
580#define VF610_PAD_PTD11__FB_AD4 0x168 0x000 ALT4 0x0
581#define VF610_PAD_PTD11__DEBUG_OUT26 0x168 0x000 ALT7 0x0
582#define VF610_PAD_PTD12__GPIO_91 0x16C 0x000 ALT0 0x0
583#define VF610_PAD_PTD12__QSPI0_B_DATA0 0x16C 0x000 ALT1 0x0
584#define VF610_PAD_PTD12__DSPI3_SOUT 0x16C 0x000 ALT2 0x0
585#define VF610_PAD_PTD12__FB_AD3 0x16C 0x000 ALT4 0x0
586#define VF610_PAD_PTD12__DEBUG_OUT27 0x16C 0x000 ALT7 0x0
587#define VF610_PAD_PTD13__GPIO_92 0x170 0x000 ALT0 0x0
588#define VF610_PAD_PTD13__QSPI0_B_DQS 0x170 0x000 ALT1 0x0
589#define VF610_PAD_PTD13__DSPI3_SCK 0x170 0x000 ALT2 0x0
590#define VF610_PAD_PTD13__FB_AD2 0x170 0x000 ALT4 0x0
591#define VF610_PAD_PTD13__DEBUG_OUT28 0x170 0x000 ALT7 0x0
592#define VF610_PAD_PTB23__GPIO_93 0x174 0x000 ALT0 0x0
593#define VF610_PAD_PTB23__SAI0_TX_BCLK 0x174 0x000 ALT1 0x0
594#define VF610_PAD_PTB23__UART1_TX 0x174 0x380 ALT2 0x2
595#define VF610_PAD_PTB23__SRC_RCON18 0x174 0x398 ALT3 0x1
596#define VF610_PAD_PTB23__FB_MUXED_ALE 0x174 0x000 ALT4 0x0
597#define VF610_PAD_PTB23__FB_TS_B 0x174 0x000 ALT5 0x0
598#define VF610_PAD_PTB23__UART3_RTS 0x174 0x000 ALT6 0x0
599#define VF610_PAD_PTB23__DCU1_G3 0x174 0x000 ALT7 0x0
600#define VF610_PAD_PTB24__GPIO_94 0x178 0x000 ALT0 0x0
601#define VF610_PAD_PTB24__SAI0_RX_BCLK 0x178 0x000 ALT1 0x0
602#define VF610_PAD_PTB24__UART1_RX 0x178 0x37C ALT2 0x2
603#define VF610_PAD_PTB24__SRC_RCON19 0x178 0x39C ALT3 0x1
604#define VF610_PAD_PTB24__FB_MUXED_TSIZ0 0x178 0x000 ALT4 0x0
605#define VF610_PAD_PTB24__NF_WE_B 0x178 0x000 ALT5 0x0
606#define VF610_PAD_PTB24__UART3_CTS 0x178 0x000 ALT6 0x0
607#define VF610_PAD_PTB24__DCU1_G4 0x178 0x000 ALT7 0x0
608#define VF610_PAD_PTB25__GPIO_95 0x17C 0x000 ALT0 0x0
609#define VF610_PAD_PTB25__SAI0_RX_DATA 0x17C 0x000 ALT1 0x0
610#define VF610_PAD_PTB25__UART1_RTS 0x17C 0x000 ALT2 0x0
611#define VF610_PAD_PTB25__SRC_RCON20 0x17C 0x3A0 ALT3 0x1
612#define VF610_PAD_PTB25__FB_CS1_B 0x17C 0x000 ALT4 0x0
613#define VF610_PAD_PTB25__NF_CE0_B 0x17C 0x000 ALT5 0x0
614#define VF610_PAD_PTB25__DCU1_G5 0x17C 0x000 ALT7 0x0
615#define VF610_PAD_PTB26__GPIO_96 0x180 0x000 ALT0 0x0
616#define VF610_PAD_PTB26__SAI0_TX_DATA 0x180 0x000 ALT1 0x0
617#define VF610_PAD_PTB26__UART1_CTS 0x180 0x378 ALT2 0x2
618#define VF610_PAD_PTB26__SRC_RCON21 0x180 0x000 ALT3 0x0
619#define VF610_PAD_PTB26__FB_CS0_B 0x180 0x000 ALT4 0x0
620#define VF610_PAD_PTB26__NF_CE1_B 0x180 0x000 ALT5 0x0
621#define VF610_PAD_PTB26__DCU1_G6 0x180 0x000 ALT7 0x0
622#define VF610_PAD_PTB27__GPIO_97 0x184 0x000 ALT0 0x0
623#define VF610_PAD_PTB27__SAI0_RX_SYNC 0x184 0x000 ALT1 0x0
624#define VF610_PAD_PTB27__SRC_RCON22 0x184 0x000 ALT3 0x0
625#define VF610_PAD_PTB27__FB_OE_B 0x184 0x000 ALT4 0x0
626#define VF610_PAD_PTB27__FB_MUXED_TBST_B 0x184 0x000 ALT5 0x0
627#define VF610_PAD_PTB27__NF_RE_B 0x184 0x000 ALT6 0x0
628#define VF610_PAD_PTB27__DCU1_G7 0x184 0x000 ALT7 0x0
629#define VF610_PAD_PTB28__GPIO_98 0x188 0x000 ALT0 0x0
630#define VF610_PAD_PTB28__SAI0_TX_SYNC 0x188 0x000 ALT1 0x0
631#define VF610_PAD_PTB28__SRC_RCON23 0x188 0x000 ALT3 0x0
632#define VF610_PAD_PTB28__FB_RW_B 0x188 0x000 ALT4 0x0
633#define VF610_PAD_PTB28__DCU1_B6 0x188 0x000 ALT7 0x0
634#define VF610_PAD_PTC26__GPIO_99 0x18C 0x000 ALT0 0x0
635#define VF610_PAD_PTC26__SAI1_TX_BCLK 0x18C 0x000 ALT1 0x0
636#define VF610_PAD_PTC26__DSPI0_CS5 0x18C 0x000 ALT2 0x0
637#define VF610_PAD_PTC26__SRC_RCON24 0x18C 0x000 ALT3 0x0
638#define VF610_PAD_PTC26__FB_TA_B 0x18C 0x000 ALT4 0x0
639#define VF610_PAD_PTC26__NF_RB_B 0x18C 0x000 ALT5 0x0
640#define VF610_PAD_PTC26__DCU1_B7 0x18C 0x000 ALT7 0x0
641#define VF610_PAD_PTC27__GPIO_100 0x190 0x000 ALT0 0x0
642#define VF610_PAD_PTC27__SAI1_RX_BCLK 0x190 0x000 ALT1 0x0
643#define VF610_PAD_PTC27__DSPI0_CS4 0x190 0x000 ALT2 0x0
644#define VF610_PAD_PTC27__SRC_RCON25 0x190 0x000 ALT3 0x0
645#define VF610_PAD_PTC27__FB_BE3_B 0x190 0x000 ALT4 0x0
646#define VF610_PAD_PTC27__FB_CS3_B 0x190 0x000 ALT5 0x0
647#define VF610_PAD_PTC27__NF_ALE 0x190 0x000 ALT6 0x0
648#define VF610_PAD_PTC27__DCU1_B2 0x190 0x000 ALT7 0x0
649#define VF610_PAD_PTC28__GPIO_101 0x194 0x000 ALT0 0x0
650#define VF610_PAD_PTC28__SAI1_RX_DATA 0x194 0x000 ALT1 0x0
651#define VF610_PAD_PTC28__DSPI0_CS3 0x194 0x000 ALT2 0x0
652#define VF610_PAD_PTC28__SRC_RCON26 0x194 0x000 ALT3 0x0
653#define VF610_PAD_PTC28__FB_BE2_B 0x194 0x000 ALT4 0x0
654#define VF610_PAD_PTC28__FB_CS2_B 0x194 0x000 ALT5 0x0
655#define VF610_PAD_PTC28__NF_CLE 0x194 0x000 ALT6 0x0
656#define VF610_PAD_PTC28__DCU1_B3 0x194 0x000 ALT7 0x0
657#define VF610_PAD_PTC29__GPIO_102 0x198 0x000 ALT0 0x0
658#define VF610_PAD_PTC29__SAI1_TX_DATA 0x198 0x000 ALT1 0x0
659#define VF610_PAD_PTC29__DSPI0_CS2 0x198 0x000 ALT2 0x0
660#define VF610_PAD_PTC29__SRC_RCON27 0x198 0x000 ALT3 0x0
661#define VF610_PAD_PTC29__FB_BE1_B 0x198 0x000 ALT4 0x0
662#define VF610_PAD_PTC29__FB_MUXED_TSIZE1 0x198 0x000 ALT5 0x0
663#define VF610_PAD_PTC29__DCU1_B4 0x198 0x000 ALT7 0x0
664#define VF610_PAD_PTC30__GPIO_103 0x19C 0x000 ALT0 0x0
665#define VF610_PAD_PTC30__SAI1_RX_SYNC 0x19C 0x000 ALT1 0x0
666#define VF610_PAD_PTC30__DSPI1_CS2 0x19C 0x000 ALT2 0x0
667#define VF610_PAD_PTC30__SRC_RCON28 0x19C 0x000 ALT3 0x0
668#define VF610_PAD_PTC30__FB_MUXED_BE0_B 0x19C 0x000 ALT4 0x0
669#define VF610_PAD_PTC30__FB_TSIZ0 0x19C 0x000 ALT5 0x0
670#define VF610_PAD_PTC30__ADC0_SE5 0x19C 0x000 ALT6 0x0
671#define VF610_PAD_PTC30__DCU1_B5 0x19C 0x000 ALT7 0x0
672#define VF610_PAD_PTC31__GPIO_104 0x1A0 0x000 ALT0 0x0
673#define VF610_PAD_PTC31__SAI1_TX_SYNC 0x1A0 0x360 ALT1 0x1
674#define VF610_PAD_PTC31__SRC_RCON29 0x1A0 0x000 ALT3 0x0
675#define VF610_PAD_PTC31__ADC1_SE5 0x1A0 0x000 ALT6 0x0
676#define VF610_PAD_PTC31__DCU1_B6 0x1A0 0x000 ALT7 0x0
677#define VF610_PAD_PTE0__GPIO_105 0x1A4 0x000 ALT0 0x0
678#define VF610_PAD_PTE0__DCU0_HSYNC 0x1A4 0x000 ALT1 0x0
679#define VF610_PAD_PTE0__SRC_BMODE1 0x1A4 0x000 ALT2 0x0
680#define VF610_PAD_PTE0__LCD0 0x1A4 0x000 ALT4 0x0
681#define VF610_PAD_PTE0__DEBUG_OUT29 0x1A4 0x000 ALT7 0x0
682#define VF610_PAD_PTE1__GPIO_106 0x1A8 0x000 ALT0 0x0
683#define VF610_PAD_PTE1__DCU0_VSYNC 0x1A8 0x000 ALT1 0x0
684#define VF610_PAD_PTE1__SRC_BMODE0 0x1A8 0x000 ALT2 0x0
685#define VF610_PAD_PTE1__LCD1 0x1A8 0x000 ALT4 0x0
686#define VF610_PAD_PTE1__DEBUG_OUT30 0x1A8 0x000 ALT7 0x0
687#define VF610_PAD_PTE2__GPIO_107 0x1AC 0x000 ALT0 0x0
688#define VF610_PAD_PTE2__DCU0_PCLK 0x1AC 0x000 ALT1 0x0
689#define VF610_PAD_PTE2__LCD2 0x1AC 0x000 ALT4 0x0
690#define VF610_PAD_PTE2__DEBUG_OUT31 0x1AC 0x000 ALT7 0x0
691#define VF610_PAD_PTE3__GPIO_108 0x1B0 0x000 ALT0 0x0
692#define VF610_PAD_PTE3__DCU0_TAG 0x1B0 0x000 ALT1 0x0
693#define VF610_PAD_PTE3__LCD3 0x1B0 0x000 ALT4 0x0
694#define VF610_PAD_PTE3__DEBUG_OUT32 0x1B0 0x000 ALT7 0x0
695#define VF610_PAD_PTE4__GPIO_109 0x1B4 0x000 ALT0 0x0
696#define VF610_PAD_PTE4__DCU0_DE 0x1B4 0x000 ALT1 0x0
697#define VF610_PAD_PTE4__LCD4 0x1B4 0x000 ALT4 0x0
698#define VF610_PAD_PTE4__DEBUG_OUT33 0x1B4 0x000 ALT7 0x0
699#define VF610_PAD_PTE5__GPIO_110 0x1B8 0x000 ALT0 0x0
700#define VF610_PAD_PTE5__DCU0_R0 0x1B8 0x000 ALT1 0x0
701#define VF610_PAD_PTE5__LCD5 0x1B8 0x000 ALT4 0x0
702#define VF610_PAD_PTE5__DEBUG_OUT34 0x1B8 0x000 ALT7 0x0
703#define VF610_PAD_PTE6__GPIO_111 0x1BC 0x000 ALT0 0x0
704#define VF610_PAD_PTE6__DCU0_R1 0x1BC 0x000 ALT1 0x0
705#define VF610_PAD_PTE6__LCD6 0x1BC 0x000 ALT4 0x0
706#define VF610_PAD_PTE6__DEBUG_OUT35 0x1BC 0x000 ALT7 0x0
707#define VF610_PAD_PTE7__GPIO_112 0x1C0 0x000 ALT0 0x0
708#define VF610_PAD_PTE7__DCU0_R2 0x1C0 0x000 ALT1 0x0
709#define VF610_PAD_PTE7__SRC_RCON0 0x1C0 0x000 ALT3 0x0
710#define VF610_PAD_PTE7__LCD7 0x1C0 0x000 ALT4 0x0
711#define VF610_PAD_PTE7__DEBUG_OUT36 0x1C0 0x000 ALT7 0x0
712#define VF610_PAD_PTE8__GPIO_113 0x1C4 0x000 ALT0 0x0
713#define VF610_PAD_PTE8__DCU0_R3 0x1C4 0x000 ALT1 0x0
714#define VF610_PAD_PTE8__SRC_RCON1 0x1C4 0x000 ALT3 0x0
715#define VF610_PAD_PTE8__LCD8 0x1C4 0x000 ALT4 0x0
716#define VF610_PAD_PTE8__DEBUG_OUT37 0x1C4 0x000 ALT7 0x0
717#define VF610_PAD_PTE9__GPIO_114 0x1C8 0x000 ALT0 0x0
718#define VF610_PAD_PTE9__DCU0_R4 0x1C8 0x000 ALT1 0x0
719#define VF610_PAD_PTE9__SRC_RCON2 0x1C8 0x000 ALT3 0x0
720#define VF610_PAD_PTE9__LCD9 0x1C8 0x000 ALT4 0x0
721#define VF610_PAD_PTE9__DEBUG_OUT38 0x1C8 0x000 ALT7 0x0
722#define VF610_PAD_PTE10__GPIO_115 0x1CC 0x000 ALT0 0x0
723#define VF610_PAD_PTE10__DCU0_R5 0x1CC 0x000 ALT1 0x0
724#define VF610_PAD_PTE10__SRC_RCON3 0x1CC 0x000 ALT3 0x0
725#define VF610_PAD_PTE10__LCD10 0x1CC 0x000 ALT4 0x0
726#define VF610_PAD_PTE10__DEBUG_OUT39 0x1CC 0x000 ALT7 0x0
727#define VF610_PAD_PTE11__GPIO_116 0x1D0 0x000 ALT0 0x0
728#define VF610_PAD_PTE11__DCU0_R6 0x1D0 0x000 ALT1 0x0
729#define VF610_PAD_PTE11__SRC_RCON4 0x1D0 0x000 ALT3 0x0
730#define VF610_PAD_PTE11__LCD11 0x1D0 0x000 ALT4 0x0
731#define VF610_PAD_PTE11__DEBUG_OUT40 0x1D0 0x000 ALT7 0x0
732#define VF610_PAD_PTE12__GPIO_117 0x1D4 0x000 ALT0 0x0
733#define VF610_PAD_PTE12__DCU0_R7 0x1D4 0x000 ALT1 0x0
734#define VF610_PAD_PTE12__DSPI1_CS3 0x1D4 0x000 ALT2 0x0
735#define VF610_PAD_PTE12__SRC_RCON5 0x1D4 0x000 ALT3 0x0
736#define VF610_PAD_PTE12__LCD12 0x1D4 0x000 ALT4 0x0
737#define VF610_PAD_PTE12__LPT_ALT0 0x1D4 0x000 ALT7 0x0
738#define VF610_PAD_PTE13__GPIO_118 0x1D8 0x000 ALT0 0x0
739#define VF610_PAD_PTE13__DCU0_G0 0x1D8 0x000 ALT1 0x0
740#define VF610_PAD_PTE13__LCD13 0x1D8 0x000 ALT4 0x0
741#define VF610_PAD_PTE13__DEBUG_OUT41 0x1D8 0x000 ALT7 0x0
742#define VF610_PAD_PTE14__GPIO_119 0x1DC 0x000 ALT0 0x0
743#define VF610_PAD_PTE14__DCU0_G1 0x1DC 0x000 ALT1 0x0
744#define VF610_PAD_PTE14__LCD14 0x1DC 0x000 ALT4 0x0
745#define VF610_PAD_PTE14__DEBUG_OUT42 0x1DC 0x000 ALT7 0x0
746#define VF610_PAD_PTE15__GPIO_120 0x1E0 0x000 ALT0 0x0
747#define VF610_PAD_PTE15__DCU0_G2 0x1E0 0x000 ALT1 0x0
748#define VF610_PAD_PTE15__SRC_RCON6 0x1E0 0x000 ALT3 0x0
749#define VF610_PAD_PTE15__LCD15 0x1E0 0x000 ALT4 0x0
750#define VF610_PAD_PTE15__DEBUG_OUT43 0x1E0 0x000 ALT7 0x0
751#define VF610_PAD_PTE16__GPIO_121 0x1E4 0x000 ALT0 0x0
752#define VF610_PAD_PTE16__DCU0_G3 0x1E4 0x000 ALT1 0x0
753#define VF610_PAD_PTE16__SRC_RCON7 0x1E4 0x000 ALT3 0x0
754#define VF610_PAD_PTE16__LCD16 0x1E4 0x000 ALT4 0x0
755#define VF610_PAD_PTE17__GPIO_122 0x1E8 0x000 ALT0 0x0
756#define VF610_PAD_PTE17__DCU0_G4 0x1E8 0x000 ALT1 0x0
757#define VF610_PAD_PTE17__SRC_RCON8 0x1E8 0x000 ALT3 0x0
758#define VF610_PAD_PTE17__LCD17 0x1E8 0x000 ALT4 0x0
759#define VF610_PAD_PTE18__GPIO_123 0x1EC 0x000 ALT0 0x0
760#define VF610_PAD_PTE18__DCU0_G5 0x1EC 0x000 ALT1 0x0
761#define VF610_PAD_PTE18__SRC_RCON9 0x1EC 0x000 ALT3 0x0
762#define VF610_PAD_PTE18__LCD18 0x1EC 0x000 ALT4 0x0
763#define VF610_PAD_PTE19__GPIO_124 0x1F0 0x000 ALT0 0x0
764#define VF610_PAD_PTE19__DCU0_G6 0x1F0 0x000 ALT1 0x0
765#define VF610_PAD_PTE19__SRC_RCON10 0x1F0 0x000 ALT3 0x0
766#define VF610_PAD_PTE19__LCD19 0x1F0 0x000 ALT4 0x0
767#define VF610_PAD_PTE19__I2C0_SCL 0x1F0 0x33C ALT5 0x3
768#define VF610_PAD_PTE20__GPIO_125 0x1F4 0x000 ALT0 0x0
769#define VF610_PAD_PTE20__DCU0_G7 0x1F4 0x000 ALT1 0x0
770#define VF610_PAD_PTE20__SRC_RCON11 0x1F4 0x000 ALT3 0x0
771#define VF610_PAD_PTE20__LCD20 0x1F4 0x000 ALT4 0x0
772#define VF610_PAD_PTE20__I2C0_SDA 0x1F4 0x340 ALT5 0x3
773#define VF610_PAD_PTE20__EWM_IN 0x1F4 0x000 ALT7 0x0
774#define VF610_PAD_PTE21__GPIO_126 0x1F8 0x000 ALT0 0x0
775#define VF610_PAD_PTE21__DCU0_B0 0x1F8 0x000 ALT1 0x0
776#define VF610_PAD_PTE21__LCD21 0x1F8 0x000 ALT4 0x0
777#define VF610_PAD_PTE22__GPIO_127 0x1FC 0x000 ALT0 0x0
778#define VF610_PAD_PTE22__DCU0_B1 0x1FC 0x000 ALT1 0x0
779#define VF610_PAD_PTE22__LCD22 0x1FC 0x000 ALT4 0x0
780#define VF610_PAD_PTE23__GPIO_128 0x200 0x000 ALT0 0x0
781#define VF610_PAD_PTE23__DCU0_B2 0x200 0x000 ALT1 0x0
782#define VF610_PAD_PTE23__SRC_RCON12 0x200 0x000 ALT3 0x0
783#define VF610_PAD_PTE23__LCD23 0x200 0x000 ALT4 0x0
784#define VF610_PAD_PTE24__GPIO_129 0x204 0x000 ALT0 0x0
785#define VF610_PAD_PTE24__DCU0_B3 0x204 0x000 ALT1 0x0
786#define VF610_PAD_PTE24__SRC_RCON13 0x204 0x000 ALT3 0x0
787#define VF610_PAD_PTE24__LCD24 0x204 0x000 ALT4 0x0
788#define VF610_PAD_PTE25__GPIO_130 0x208 0x000 ALT0 0x0
789#define VF610_PAD_PTE25__DCU0_B4 0x208 0x000 ALT1 0x0
790#define VF610_PAD_PTE25__SRC_RCON14 0x208 0x000 ALT3 0x0
791#define VF610_PAD_PTE25__LCD25 0x208 0x000 ALT4 0x0
792#define VF610_PAD_PTE26__GPIO_131 0x20C 0x000 ALT0 0x0
793#define VF610_PAD_PTE26__DCU0_B5 0x20C 0x000 ALT1 0x0
794#define VF610_PAD_PTE26__SRC_RCON15 0x20C 0x000 ALT3 0x0
795#define VF610_PAD_PTE26__LCD26 0x20C 0x000 ALT4 0x0
796#define VF610_PAD_PTE27__GPIO_132 0x210 0x000 ALT0 0x0
797#define VF610_PAD_PTE27__DCU0_B6 0x210 0x000 ALT1 0x0
798#define VF610_PAD_PTE27__SRC_RCON16 0x210 0x000 ALT3 0x0
799#define VF610_PAD_PTE27__LCD27 0x210 0x000 ALT4 0x0
800#define VF610_PAD_PTE27__I2C1_SCL 0x210 0x344 ALT5 0x3
801#define VF610_PAD_PTE28__GPIO_133 0x214 0x000 ALT0 0x0
802#define VF610_PAD_PTE28__DCU0_B7 0x214 0x000 ALT1 0x0
803#define VF610_PAD_PTE28__SRC_RCON17 0x214 0x000 ALT3 0x0
804#define VF610_PAD_PTE28__LCD28 0x214 0x000 ALT4 0x0
805#define VF610_PAD_PTE28__I2C1_SDA 0x214 0x348 ALT5 0x3
806#define VF610_PAD_PTE28__EWM_OUT 0x214 0x000 ALT7 0x0
807#define VF610_PAD_PTA7__GPIO_134 0x218 0x000 ALT0 0x0
808#define VF610_PAD_PTA7__VIU_PIX_CLK 0x218 0x3AC ALT1 0x1
809
810#endif
diff --git a/arch/arm/boot/dts/vf610-twr.dts b/arch/arm/boot/dts/vf610-twr.dts
new file mode 100644
index 000000000000..b3905f5bcaf9
--- /dev/null
+++ b/arch/arm/boot/dts/vf610-twr.dts
@@ -0,0 +1,57 @@
1/*
2 * Copyright 2013 Freescale Semiconductor, Inc.
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
10/dts-v1/;
11#include "vf610.dtsi"
12
13/ {
14 model = "VF610 Tower Board";
15 compatible = "fsl,vf610-twr", "fsl,vf610";
16
17 chosen {
18 bootargs = "console=ttyLP1,115200";
19 };
20
21 memory {
22 reg = <0x80000000 0x8000000>;
23 };
24
25 clocks {
26 audio_ext {
27 compatible = "fixed-clock";
28 clock-frequency = <24576000>;
29 };
30
31 enet_ext {
32 compatible = "fixed-clock";
33 clock-frequency = <50000000>;
34 };
35 };
36
37};
38
39&fec0 {
40 phy-mode = "rmii";
41 pinctrl-names = "default";
42 pinctrl-0 = <&pinctrl_fec0_1>;
43 status = "okay";
44};
45
46&fec1 {
47 phy-mode = "rmii";
48 pinctrl-names = "default";
49 pinctrl-0 = <&pinctrl_fec1_1>;
50 status = "okay";
51};
52
53&uart1 {
54 pinctrl-names = "default";
55 pinctrl-0 = <&pinctrl_uart1_1>;
56 status = "okay";
57};
diff --git a/arch/arm/boot/dts/vf610.dtsi b/arch/arm/boot/dts/vf610.dtsi
new file mode 100644
index 000000000000..67d929cf9804
--- /dev/null
+++ b/arch/arm/boot/dts/vf610.dtsi
@@ -0,0 +1,464 @@
1/*
2 * Copyright 2013 Freescale Semiconductor, Inc.
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
10#include "skeleton.dtsi"
11#include "vf610-pinfunc.h"
12#include <dt-bindings/clock/vf610-clock.h>
13
14/ {
15 aliases {
16 serial0 = &uart0;
17 serial1 = &uart1;
18 serial2 = &uart2;
19 serial3 = &uart3;
20 serial4 = &uart4;
21 serial5 = &uart5;
22 gpio0 = &gpio1;
23 gpio1 = &gpio2;
24 gpio2 = &gpio3;
25 gpio3 = &gpio4;
26 gpio4 = &gpio5;
27 };
28
29 cpus {
30 #address-cells = <1>;
31 #size-cells = <0>;
32
33 cpu@0 {
34 compatible = "arm,cortex-a5";
35 device_type = "cpu";
36 reg = <0x0>;
37 next-level-cache = <&L2>;
38 };
39 };
40
41 clocks {
42 #address-cells = <1>;
43 #size-cells = <0>;
44
45 sxosc {
46 compatible = "fixed-clock";
47 clock-frequency = <32768>;
48 };
49
50 fxosc {
51 compatible = "fixed-clock";
52 clock-frequency = <24000000>;
53 };
54 };
55
56 soc {
57 #address-cells = <1>;
58 #size-cells = <1>;
59 compatible = "simple-bus";
60 interrupt-parent = <&intc>;
61 ranges;
62
63 aips0: aips-bus@40000000 {
64 compatible = "fsl,aips-bus", "simple-bus";
65 #address-cells = <1>;
66 #size-cells = <1>;
67 interrupt-parent = <&intc>;
68 reg = <0x40000000 0x70000>;
69 ranges;
70
71 intc: interrupt-controller@40002000 {
72 compatible = "arm,cortex-a9-gic";
73 #interrupt-cells = <3>;
74 #address-cells = <1>;
75 #size-cells = <1>;
76 interrupt-controller;
77 reg = <0x40003000 0x1000>,
78 <0x40002100 0x100>;
79 };
80
81 L2: l2-cache@40006000 {
82 compatible = "arm,pl310-cache";
83 reg = <0x40006000 0x1000>;
84 cache-unified;
85 cache-level = <2>;
86 arm,data-latency = <1 1 1>;
87 arm,tag-latency = <2 2 2>;
88 };
89
90 uart0: serial@40027000 {
91 compatible = "fsl,vf610-lpuart";
92 reg = <0x40027000 0x1000>;
93 interrupts = <0 61 0x00>;
94 clocks = <&clks VF610_CLK_UART0>;
95 clock-names = "ipg";
96 status = "disabled";
97 };
98
99 uart1: serial@40028000 {
100 compatible = "fsl,vf610-lpuart";
101 reg = <0x40028000 0x1000>;
102 interrupts = <0 62 0x04>;
103 clocks = <&clks VF610_CLK_UART1>;
104 clock-names = "ipg";
105 status = "disabled";
106 };
107
108 uart2: serial@40029000 {
109 compatible = "fsl,vf610-lpuart";
110 reg = <0x40029000 0x1000>;
111 interrupts = <0 63 0x04>;
112 clocks = <&clks VF610_CLK_UART2>;
113 clock-names = "ipg";
114 status = "disabled";
115 };
116
117 uart3: serial@4002a000 {
118 compatible = "fsl,vf610-lpuart";
119 reg = <0x4002a000 0x1000>;
120 interrupts = <0 64 0x04>;
121 clocks = <&clks VF610_CLK_UART3>;
122 clock-names = "ipg";
123 status = "disabled";
124 };
125
126 sai2: sai@40031000 {
127 compatible = "fsl,vf610-sai";
128 reg = <0x40031000 0x1000>;
129 interrupts = <0 86 0x04>;
130 clocks = <&clks VF610_CLK_SAI2>;
131 clock-names = "sai";
132 status = "disabled";
133 };
134
135 pit: pit@40037000 {
136 compatible = "fsl,vf610-pit";
137 reg = <0x40037000 0x1000>;
138 interrupts = <0 39 0x04>;
139 clocks = <&clks VF610_CLK_PIT>;
140 clock-names = "pit";
141 };
142
143 wdog@4003e000 {
144 compatible = "fsl,vf610-wdt", "fsl,imx21-wdt";
145 reg = <0x4003e000 0x1000>;
146 clocks = <&clks VF610_CLK_WDT>;
147 clock-names = "wdog";
148 };
149
150 qspi0: quadspi@40044000 {
151 #address-cells = <1>;
152 #size-cells = <0>;
153 compatible = "fsl,vf610-qspi";
154 reg = <0x40044000 0x1000>;
155 interrupts = <0 24 0x04>;
156 clocks = <&clks VF610_CLK_QSPI0_EN>,
157 <&clks VF610_CLK_QSPI0>;
158 clock-names = "qspi_en", "qspi";
159 status = "disabled";
160 };
161
162 iomuxc: iomuxc@40048000 {
163 compatible = "fsl,vf610-iomuxc";
164 reg = <0x40048000 0x1000>;
165 #gpio-range-cells = <3>;
166
167 /* functions and groups pins */
168
169 dcu0 {
170 pinctrl_dcu0_1: dcu0grp_1 {
171 fsl,pins = <
172 VF610_PAD_PTB8__GPIO_30 0x42
173 VF610_PAD_PTE0__DCU0_HSYNC 0x42
174 VF610_PAD_PTE1__DCU0_VSYNC 0x42
175 VF610_PAD_PTE2__DCU0_PCLK 0x42
176 VF610_PAD_PTE4__DCU0_DE 0x42
177 VF610_PAD_PTE5__DCU0_R0 0x42
178 VF610_PAD_PTE6__DCU0_R1 0x42
179 VF610_PAD_PTE7__DCU0_R2 0x42
180 VF610_PAD_PTE8__DCU0_R3 0x42
181 VF610_PAD_PTE9__DCU0_R4 0x42
182 VF610_PAD_PTE10__DCU0_R5 0x42
183 VF610_PAD_PTE11__DCU0_R6 0x42
184 VF610_PAD_PTE12__DCU0_R7 0x42
185 VF610_PAD_PTE13__DCU0_G0 0x42
186 VF610_PAD_PTE14__DCU0_G1 0x42
187 VF610_PAD_PTE15__DCU0_G2 0x42
188 VF610_PAD_PTE16__DCU0_G3 0x42
189 VF610_PAD_PTE17__DCU0_G4 0x42
190 VF610_PAD_PTE18__DCU0_G5 0x42
191 VF610_PAD_PTE19__DCU0_G6 0x42
192 VF610_PAD_PTE20__DCU0_G7 0x42
193 VF610_PAD_PTE21__DCU0_B0 0x42
194 VF610_PAD_PTE22__DCU0_B1 0x42
195 VF610_PAD_PTE23__DCU0_B2 0x42
196 VF610_PAD_PTE24__DCU0_B3 0x42
197 VF610_PAD_PTE25__DCU0_B4 0x42
198 VF610_PAD_PTE26__DCU0_B5 0x42
199 VF610_PAD_PTE27__DCU0_B6 0x42
200 VF610_PAD_PTE28__DCU0_B7 0x42
201 >;
202 };
203 };
204
205 dspi0 {
206 pinctrl_dspi0_1: dspi0grp_1 {
207 fsl,pins = <
208 VF610_PAD_PTB19__DSPI0_CS0 0x1182
209 VF610_PAD_PTB20__DSPI0_SIN 0x1181
210 VF610_PAD_PTB21__DSPI0_SOUT 0x1182
211 VF610_PAD_PTB22__DSPI0_SCK 0x1182
212 >;
213 };
214 };
215
216 esdhc1 {
217 pinctrl_esdhc1_1: esdhc1grp_1 {
218 fsl,pins = <
219 VF610_PAD_PTA24__ESDHC1_CLK 0x31ef
220 VF610_PAD_PTA25__ESDHC1_CMD 0x31ef
221 VF610_PAD_PTA26__ESDHC1_DAT0 0x31ef
222 VF610_PAD_PTA27__ESDHC1_DAT1 0x31ef
223 VF610_PAD_PTA28__ESDHC1_DATA2 0x31ef
224 VF610_PAD_PTA29__ESDHC1_DAT3 0x31ef
225 VF610_PAD_PTA7__GPIO_134 0x219d
226 >;
227 };
228 };
229
230 fec0 {
231 pinctrl_fec0_1: fec0grp_1 {
232 fsl,pins = <
233 VF610_PAD_PTA6__RMII_CLKIN 0x30d1
234 VF610_PAD_PTC0__ENET_RMII0_MDC 0x30d3
235 VF610_PAD_PTC1__ENET_RMII0_MDIO 0x30d1
236 VF610_PAD_PTC2__ENET_RMII0_CRS 0x30d1
237 VF610_PAD_PTC3__ENET_RMII0_RXD1 0x30d1
238 VF610_PAD_PTC4__ENET_RMII0_RXD0 0x30d1
239 VF610_PAD_PTC5__ENET_RMII0_RXER 0x30d1
240 VF610_PAD_PTC6__ENET_RMII0_TXD1 0x30d2
241 VF610_PAD_PTC7__ENET_RMII0_TXD0 0x30d2
242 VF610_PAD_PTC8__ENET_RMII0_TXEN 0x30d2
243 >;
244 };
245 };
246
247 fec1 {
248 pinctrl_fec1_1: fec1grp_1 {
249 fsl,pins = <
250 VF610_PAD_PTC9__ENET_RMII1_MDC 0x30d2
251 VF610_PAD_PTC10__ENET_RMII1_MDIO 0x30d3
252 VF610_PAD_PTC11__ENET_RMII1_CRS 0x30d1
253 VF610_PAD_PTC12__ENET_RMII_RXD1 0x30d1
254 VF610_PAD_PTC13__ENET_RMII1_RXD0 0x30d1
255 VF610_PAD_PTC14__ENET_RMII1_RXER 0x30d1
256 VF610_PAD_PTC15__ENET_RMII1_TXD1 0x30d2
257 VF610_PAD_PTC16__ENET_RMII1_TXD0 0x30d2
258 VF610_PAD_PTC17__ENET_RMII1_TXEN 0x30d2
259 >;
260 };
261 };
262
263 i2c0 {
264 pinctrl_i2c0_1: i2c0grp_1 {
265 fsl,pins = <
266 VF610_PAD_PTB14__I2C0_SCL 0x30d3
267 VF610_PAD_PTB15__I2C0_SDA 0x30d3
268 >;
269 };
270 };
271
272 pwm0 {
273 pinctrl_pwm0_1: pwm0grp_1 {
274 fsl,pins = <
275 VF610_PAD_PTB0__FTM0_CH0 0x1582
276 VF610_PAD_PTB1__FTM0_CH1 0x1582
277 VF610_PAD_PTB2__FTM0_CH2 0x1582
278 VF610_PAD_PTB3__FTM0_CH3 0x1582
279 VF610_PAD_PTB6__FTM0_CH6 0x1582
280 VF610_PAD_PTB7__FTM0_CH7 0x1582
281 >;
282 };
283 };
284
285 qspi0 {
286 pinctrl_qspi0_1: qspi0grp_1 {
287 fsl,pins = <
288 VF610_PAD_PTD0__QSPI0_A_QSCK 0x307b
289 VF610_PAD_PTD1__QSPI0_A_CS0 0x307f
290 VF610_PAD_PTD2__QSPI0_A_DATA3 0x3073
291 VF610_PAD_PTD3__QSPI0_A_DATA2 0x3073
292 VF610_PAD_PTD4__QSPI0_A_DATA1 0x3073
293 VF610_PAD_PTD5__QSPI0_A_DATA0 0x307b
294 VF610_PAD_PTD7__QSPI0_B_QSCK 0x307b
295 VF610_PAD_PTD8__QSPI0_B_CS0 0x307f
296 VF610_PAD_PTD9__QSPI0_B_DATA3 0x3073
297 VF610_PAD_PTD10__QSPI0_B_DATA2 0x3073
298 VF610_PAD_PTD11__QSPI0_B_DATA1 0x3073
299 VF610_PAD_PTD12__QSPI0_B_DATA0 0x307b
300 >;
301 };
302 };
303
304 sai2 {
305 pinctrl_sai2_1: sai2grp_1 {
306 fsl,pins = <
307 VF610_PAD_PTA16__SAI2_TX_BCLK 0x02ed
308 VF610_PAD_PTA18__SAI2_TX_DATA 0x02ee
309 VF610_PAD_PTA19__SAI2_TX_SYNC 0x02ed
310 VF610_PAD_PTA21__SAI2_RX_BCLK 0x02ed
311 VF610_PAD_PTA22__SAI2_RX_DATA 0x02ed
312 VF610_PAD_PTA23__SAI2_RX_SYNC 0x02ed
313 VF610_PAD_PTB18__EXT_AUDIO_MCLK 0x02ed
314 >;
315 };
316 };
317
318 uart1 {
319 pinctrl_uart1_1: uart1grp_1 {
320 fsl,pins = <
321 VF610_PAD_PTB4__UART1_TX 0x21a2
322 VF610_PAD_PTB5__UART1_RX 0x21a1
323 >;
324 };
325 };
326
327 usbvbus {
328 pinctrl_usbvbus_1: usbvbusgrp_1 {
329 fsl,pins = <
330 VF610_PAD_PTA24__USB1_VBUS_EN 0x219c
331 VF610_PAD_PTA16__USB0_VBUS_EN 0x219c
332 >;
333 };
334 };
335
336 };
337
338 gpio1: gpio@40049000 {
339 compatible = "fsl,vf610-gpio";
340 reg = <0x40049000 0x1000 0x400ff000 0x40>;
341 interrupts = <0 107 0x04>;
342 gpio-controller;
343 #gpio-cells = <2>;
344 interrupt-controller;
345 #interrupt-cells = <2>;
346 gpio-ranges = <&iomuxc 0 0 32>;
347 };
348
349 gpio2: gpio@4004a000 {
350 compatible = "fsl,vf610-gpio";
351 reg = <0x4004a000 0x1000 0x400ff040 0x40>;
352 interrupts = <0 108 0x04>;
353 gpio-controller;
354 #gpio-cells = <2>;
355 interrupt-controller;
356 #interrupt-cells = <2>;
357 gpio-ranges = <&iomuxc 0 32 32>;
358 };
359
360 gpio3: gpio@4004b000 {
361 compatible = "fsl,vf610-gpio";
362 reg = <0x4004b000 0x1000 0x400ff080 0x40>;
363 interrupts = <0 109 0x04>;
364 gpio-controller;
365 #gpio-cells = <2>;
366 interrupt-controller;
367 #interrupt-cells = <2>;
368 gpio-ranges = <&iomuxc 0 64 32>;
369 };
370
371 gpio4: gpio@4004c000 {
372 compatible = "fsl,vf610-gpio";
373 reg = <0x4004c000 0x1000 0x400ff0c0 0x40>;
374 interrupts = <0 110 0x04>;
375 gpio-controller;
376 #gpio-cells = <2>;
377 interrupt-controller;
378 #interrupt-cells = <2>;
379 gpio-ranges = <&iomuxc 0 96 32>;
380 };
381
382 gpio5: gpio@4004d000 {
383 compatible = "fsl,vf610-gpio";
384 reg = <0x4004d000 0x1000 0x400ff100 0x40>;
385 interrupts = <0 111 0x04>;
386 gpio-controller;
387 #gpio-cells = <2>;
388 interrupt-controller;
389 #interrupt-cells = <2>;
390 gpio-ranges = <&iomuxc 0 128 7>;
391 };
392
393 anatop@40050000 {
394 compatible = "fsl,vf610-anatop";
395 reg = <0x40050000 0x1000>;
396 };
397
398 i2c0: i2c@40066000 {
399 #address-cells = <1>;
400 #size-cells = <0>;
401 compatible = "fsl,vf610-i2c";
402 reg = <0x40066000 0x1000>;
403 interrupts =<0 71 0x04>;
404 clocks = <&clks VF610_CLK_I2C0>;
405 clock-names = "ipg";
406 status = "disabled";
407 };
408
409 clks: ccm@4006b000 {
410 compatible = "fsl,vf610-ccm";
411 reg = <0x4006b000 0x1000>;
412 #clock-cells = <1>;
413 };
414 };
415
416 aips1: aips-bus@40080000 {
417 compatible = "fsl,aips-bus", "simple-bus";
418 #address-cells = <1>;
419 #size-cells = <1>;
420 reg = <0x40080000 0x80000>;
421 ranges;
422
423 uart4: serial@400a9000 {
424 compatible = "fsl,vf610-lpuart";
425 reg = <0x400a9000 0x1000>;
426 interrupts = <0 65 0x04>;
427 clocks = <&clks VF610_CLK_UART4>;
428 clock-names = "ipg";
429 status = "disabled";
430 };
431
432 uart5: serial@400aa000 {
433 compatible = "fsl,vf610-lpuart";
434 reg = <0x400aa000 0x1000>;
435 interrupts = <0 66 0x04>;
436 clocks = <&clks VF610_CLK_UART5>;
437 clock-names = "ipg";
438 status = "disabled";
439 };
440
441 fec0: ethernet@400d0000 {
442 compatible = "fsl,mvf600-fec";
443 reg = <0x400d0000 0x1000>;
444 interrupts = <0 78 0x04>;
445 clocks = <&clks VF610_CLK_ENET0>,
446 <&clks VF610_CLK_ENET0>,
447 <&clks VF610_CLK_ENET>;
448 clock-names = "ipg", "ahb", "ptp";
449 status = "disabled";
450 };
451
452 fec1: ethernet@400d1000 {
453 compatible = "fsl,mvf600-fec";
454 reg = <0x400d1000 0x1000>;
455 interrupts = <0 79 0x04>;
456 clocks = <&clks VF610_CLK_ENET1>,
457 <&clks VF610_CLK_ENET1>,
458 <&clks VF610_CLK_ENET>;
459 clock-names = "ipg", "ahb", "ptp";
460 status = "disabled";
461 };
462 };
463 };
464};
diff --git a/arch/arm/boot/dts/vt8500-bv07.dts b/arch/arm/boot/dts/vt8500-bv07.dts
index 877b33afa7ed..87f33310e2bc 100644
--- a/arch/arm/boot/dts/vt8500-bv07.dts
+++ b/arch/arm/boot/dts/vt8500-bv07.dts
@@ -30,3 +30,7 @@
30 }; 30 };
31 }; 31 };
32}; 32};
33
34&uart0 {
35 status = "okay";
36};
diff --git a/arch/arm/boot/dts/vt8500.dtsi b/arch/arm/boot/dts/vt8500.dtsi
index 4a4b96f6827e..51d0e912c8f5 100644
--- a/arch/arm/boot/dts/vt8500.dtsi
+++ b/arch/arm/boot/dts/vt8500.dtsi
@@ -11,6 +11,23 @@
11/ { 11/ {
12 compatible = "via,vt8500"; 12 compatible = "via,vt8500";
13 13
14 cpus {
15 #address-cells = <0>;
16 #size-cells = <0>;
17
18 cpu {
19 device_type = "cpu";
20 compatible = "arm,arm926ej-s";
21 };
22 };
23
24 aliases {
25 serial0 = &uart0;
26 serial1 = &uart1;
27 serial2 = &uart2;
28 serial3 = &uart3;
29 };
30
14 soc { 31 soc {
15 #address-cells = <1>; 32 #address-cells = <1>;
16 #size-cells = <1>; 33 #size-cells = <1>;
@@ -111,32 +128,36 @@
111 reg = <0xd8050400 0x100>; 128 reg = <0xd8050400 0x100>;
112 }; 129 };
113 130
114 uart@d8200000 { 131 uart0: serial@d8200000 {
115 compatible = "via,vt8500-uart"; 132 compatible = "via,vt8500-uart";
116 reg = <0xd8200000 0x1040>; 133 reg = <0xd8200000 0x1040>;
117 interrupts = <32>; 134 interrupts = <32>;
118 clocks = <&clkuart0>; 135 clocks = <&clkuart0>;
136 status = "disabled";
119 }; 137 };
120 138
121 uart@d82b0000 { 139 uart1: serial@d82b0000 {
122 compatible = "via,vt8500-uart"; 140 compatible = "via,vt8500-uart";
123 reg = <0xd82b0000 0x1040>; 141 reg = <0xd82b0000 0x1040>;
124 interrupts = <33>; 142 interrupts = <33>;
125 clocks = <&clkuart1>; 143 clocks = <&clkuart1>;
144 status = "disabled";
126 }; 145 };
127 146
128 uart@d8210000 { 147 uart2: serial@d8210000 {
129 compatible = "via,vt8500-uart"; 148 compatible = "via,vt8500-uart";
130 reg = <0xd8210000 0x1040>; 149 reg = <0xd8210000 0x1040>;
131 interrupts = <47>; 150 interrupts = <47>;
132 clocks = <&clkuart2>; 151 clocks = <&clkuart2>;
152 status = "disabled";
133 }; 153 };
134 154
135 uart@d82c0000 { 155 uart3: serial@d82c0000 {
136 compatible = "via,vt8500-uart"; 156 compatible = "via,vt8500-uart";
137 reg = <0xd82c0000 0x1040>; 157 reg = <0xd82c0000 0x1040>;
138 interrupts = <50>; 158 interrupts = <50>;
139 clocks = <&clkuart3>; 159 clocks = <&clkuart3>;
160 status = "disabled";
140 }; 161 };
141 162
142 rtc@d8100000 { 163 rtc@d8100000 {
diff --git a/arch/arm/boot/dts/wm8505-ref.dts b/arch/arm/boot/dts/wm8505-ref.dts
index edd2cec3d37f..e3e6b9eb09d0 100644
--- a/arch/arm/boot/dts/wm8505-ref.dts
+++ b/arch/arm/boot/dts/wm8505-ref.dts
@@ -30,3 +30,7 @@
30 }; 30 };
31 }; 31 };
32}; 32};
33
34&uart0 {
35 status = "okay";
36};
diff --git a/arch/arm/boot/dts/wm8505.dtsi b/arch/arm/boot/dts/wm8505.dtsi
index b2bf359e852f..a1a854b8a454 100644
--- a/arch/arm/boot/dts/wm8505.dtsi
+++ b/arch/arm/boot/dts/wm8505.dtsi
@@ -12,11 +12,24 @@
12 compatible = "wm,wm8505"; 12 compatible = "wm,wm8505";
13 13
14 cpus { 14 cpus {
15 cpu@0 { 15 #address-cells = <0>;
16 compatible = "arm,arm926ejs"; 16 #size-cells = <0>;
17
18 cpu {
19 device_type = "cpu";
20 compatible = "arm,arm926ej-s";
17 }; 21 };
18 }; 22 };
19 23
24 aliases {
25 serial0 = &uart0;
26 serial1 = &uart1;
27 serial2 = &uart2;
28 serial3 = &uart3;
29 serial4 = &uart4;
30 serial5 = &uart5;
31 };
32
20 soc { 33 soc {
21 #address-cells = <1>; 34 #address-cells = <1>;
22 #size-cells = <1>; 35 #size-cells = <1>;
@@ -68,6 +81,13 @@
68 clock-frequency = <25000000>; 81 clock-frequency = <25000000>;
69 }; 82 };
70 83
84 plla: plla {
85 #clock-cells = <0>;
86 compatible = "via,vt8500-pll-clock";
87 clocks = <&ref25>;
88 reg = <0x200>;
89 };
90
71 pllb: pllb { 91 pllb: pllb {
72 #clock-cells = <0>; 92 #clock-cells = <0>;
73 compatible = "via,vt8500-pll-clock"; 93 compatible = "via,vt8500-pll-clock";
@@ -75,6 +95,48 @@
75 reg = <0x204>; 95 reg = <0x204>;
76 }; 96 };
77 97
98 pllc: pllc {
99 #clock-cells = <0>;
100 compatible = "via,vt8500-pll-clock";
101 clocks = <&ref25>;
102 reg = <0x208>;
103 };
104
105 plld: plld {
106 #clock-cells = <0>;
107 compatible = "via,vt8500-pll-clock";
108 clocks = <&ref25>;
109 reg = <0x20c>;
110 };
111
112 clkarm: arm {
113 #clock-cells = <0>;
114 compatible = "via,vt8500-device-clock";
115 clocks = <&plla>;
116 divisor-reg = <0x300>;
117 };
118
119 clkahb: ahb {
120 #clock-cells = <0>;
121 compatible = "via,vt8500-device-clock";
122 clocks = <&pllb>;
123 divisor-reg = <0x304>;
124 };
125
126 clkapb: apb {
127 #clock-cells = <0>;
128 compatible = "via,vt8500-device-clock";
129 clocks = <&pllb>;
130 divisor-reg = <0x350>;
131 };
132
133 clkddr: ddr {
134 #clock-cells = <0>;
135 compatible = "via,vt8500-device-clock";
136 clocks = <&plld>;
137 divisor-reg = <0x310>;
138 };
139
78 clkuart0: uart0 { 140 clkuart0: uart0 {
79 #clock-cells = <0>; 141 #clock-cells = <0>;
80 compatible = "via,vt8500-device-clock"; 142 compatible = "via,vt8500-device-clock";
@@ -163,46 +225,52 @@
163 reg = <0xd8050400 0x100>; 225 reg = <0xd8050400 0x100>;
164 }; 226 };
165 227
166 uart@d8200000 { 228 uart0: serial@d8200000 {
167 compatible = "via,vt8500-uart"; 229 compatible = "via,vt8500-uart";
168 reg = <0xd8200000 0x1040>; 230 reg = <0xd8200000 0x1040>;
169 interrupts = <32>; 231 interrupts = <32>;
170 clocks = <&clkuart0>; 232 clocks = <&clkuart0>;
233 status = "disabled";
171 }; 234 };
172 235
173 uart@d82b0000 { 236 uart1: serial@d82b0000 {
174 compatible = "via,vt8500-uart"; 237 compatible = "via,vt8500-uart";
175 reg = <0xd82b0000 0x1040>; 238 reg = <0xd82b0000 0x1040>;
176 interrupts = <33>; 239 interrupts = <33>;
177 clocks = <&clkuart1>; 240 clocks = <&clkuart1>;
241 status = "disabled";
178 }; 242 };
179 243
180 uart@d8210000 { 244 uart2: serial@d8210000 {
181 compatible = "via,vt8500-uart"; 245 compatible = "via,vt8500-uart";
182 reg = <0xd8210000 0x1040>; 246 reg = <0xd8210000 0x1040>;
183 interrupts = <47>; 247 interrupts = <47>;
184 clocks = <&clkuart2>; 248 clocks = <&clkuart2>;
249 status = "disabled";
185 }; 250 };
186 251
187 uart@d82c0000 { 252 uart3: serial@d82c0000 {
188 compatible = "via,vt8500-uart"; 253 compatible = "via,vt8500-uart";
189 reg = <0xd82c0000 0x1040>; 254 reg = <0xd82c0000 0x1040>;
190 interrupts = <50>; 255 interrupts = <50>;
191 clocks = <&clkuart3>; 256 clocks = <&clkuart3>;
257 status = "disabled";
192 }; 258 };
193 259
194 uart@d8370000 { 260 uart4: serial@d8370000 {
195 compatible = "via,vt8500-uart"; 261 compatible = "via,vt8500-uart";
196 reg = <0xd8370000 0x1040>; 262 reg = <0xd8370000 0x1040>;
197 interrupts = <31>; 263 interrupts = <31>;
198 clocks = <&clkuart4>; 264 clocks = <&clkuart4>;
265 status = "disabled";
199 }; 266 };
200 267
201 uart@d8380000 { 268 uart5: serial@d8380000 {
202 compatible = "via,vt8500-uart"; 269 compatible = "via,vt8500-uart";
203 reg = <0xd8380000 0x1040>; 270 reg = <0xd8380000 0x1040>;
204 interrupts = <30>; 271 interrupts = <30>;
205 clocks = <&clkuart5>; 272 clocks = <&clkuart5>;
273 status = "disabled";
206 }; 274 };
207 275
208 rtc@d8100000 { 276 rtc@d8100000 {
diff --git a/arch/arm/boot/dts/wm8650-mid.dts b/arch/arm/boot/dts/wm8650-mid.dts
index 61671a0d9ede..dd0d1b602388 100644
--- a/arch/arm/boot/dts/wm8650-mid.dts
+++ b/arch/arm/boot/dts/wm8650-mid.dts
@@ -32,3 +32,6 @@
32 }; 32 };
33}; 33};
34 34
35&uart0 {
36 status = "okay";
37};
diff --git a/arch/arm/boot/dts/wm8650.dtsi b/arch/arm/boot/dts/wm8650.dtsi
index dd8464eeb40d..7525982262ac 100644
--- a/arch/arm/boot/dts/wm8650.dtsi
+++ b/arch/arm/boot/dts/wm8650.dtsi
@@ -11,6 +11,21 @@
11/ { 11/ {
12 compatible = "wm,wm8650"; 12 compatible = "wm,wm8650";
13 13
14 cpus {
15 #address-cells = <0>;
16 #size-cells = <0>;
17
18 cpu {
19 device_type = "cpu";
20 compatible = "arm,arm926ej-s";
21 };
22 };
23
24 aliases {
25 serial0 = &uart0;
26 serial1 = &uart1;
27 };
28
14 soc { 29 soc {
15 #address-cells = <1>; 30 #address-cells = <1>;
16 #size-cells = <1>; 31 #size-cells = <1>;
@@ -77,6 +92,55 @@
77 reg = <0x204>; 92 reg = <0x204>;
78 }; 93 };
79 94
95 pllc: pllc {
96 #clock-cells = <0>;
97 compatible = "wm,wm8650-pll-clock";
98 clocks = <&ref25>;
99 reg = <0x208>;
100 };
101
102 plld: plld {
103 #clock-cells = <0>;
104 compatible = "wm,wm8650-pll-clock";
105 clocks = <&ref25>;
106 reg = <0x20c>;
107 };
108
109 plle: plle {
110 #clock-cells = <0>;
111 compatible = "wm,wm8650-pll-clock";
112 clocks = <&ref25>;
113 reg = <0x210>;
114 };
115
116 clkarm: arm {
117 #clock-cells = <0>;
118 compatible = "via,vt8500-device-clock";
119 clocks = <&plla>;
120 divisor-reg = <0x300>;
121 };
122
123 clkahb: ahb {
124 #clock-cells = <0>;
125 compatible = "via,vt8500-device-clock";
126 clocks = <&pllb>;
127 divisor-reg = <0x304>;
128 };
129
130 clkapb: apb {
131 #clock-cells = <0>;
132 compatible = "via,vt8500-device-clock";
133 clocks = <&pllb>;
134 divisor-reg = <0x320>;
135 };
136
137 clkddr: ddr {
138 #clock-cells = <0>;
139 compatible = "via,vt8500-device-clock";
140 clocks = <&plld>;
141 divisor-reg = <0x310>;
142 };
143
80 clkuart0: uart0 { 144 clkuart0: uart0 {
81 #clock-cells = <0>; 145 #clock-cells = <0>;
82 compatible = "via,vt8500-device-clock"; 146 compatible = "via,vt8500-device-clock";
@@ -93,14 +157,7 @@
93 enable-bit = <2>; 157 enable-bit = <2>;
94 }; 158 };
95 159
96 arm: arm { 160 clksdhc: sdhc {
97 #clock-cells = <0>;
98 compatible = "via,vt8500-device-clock";
99 clocks = <&plla>;
100 divisor-reg = <0x300>;
101 };
102
103 sdhc: sdhc {
104 #clock-cells = <0>; 161 #clock-cells = <0>;
105 compatible = "via,vt8500-device-clock"; 162 compatible = "via,vt8500-device-clock";
106 clocks = <&pllb>; 163 clocks = <&pllb>;
@@ -140,18 +197,20 @@
140 reg = <0xd8050400 0x100>; 197 reg = <0xd8050400 0x100>;
141 }; 198 };
142 199
143 uart@d8200000 { 200 uart0: serial@d8200000 {
144 compatible = "via,vt8500-uart"; 201 compatible = "via,vt8500-uart";
145 reg = <0xd8200000 0x1040>; 202 reg = <0xd8200000 0x1040>;
146 interrupts = <32>; 203 interrupts = <32>;
147 clocks = <&clkuart0>; 204 clocks = <&clkuart0>;
205 status = "disabled";
148 }; 206 };
149 207
150 uart@d82b0000 { 208 uart1: serial@d82b0000 {
151 compatible = "via,vt8500-uart"; 209 compatible = "via,vt8500-uart";
152 reg = <0xd82b0000 0x1040>; 210 reg = <0xd82b0000 0x1040>;
153 interrupts = <33>; 211 interrupts = <33>;
154 clocks = <&clkuart1>; 212 clocks = <&clkuart1>;
213 status = "disabled";
155 }; 214 };
156 215
157 rtc@d8100000 { 216 rtc@d8100000 {
diff --git a/arch/arm/boot/dts/wm8750-apc8750.dts b/arch/arm/boot/dts/wm8750-apc8750.dts
new file mode 100644
index 000000000000..37e4a408bf39
--- /dev/null
+++ b/arch/arm/boot/dts/wm8750-apc8750.dts
@@ -0,0 +1,30 @@
1/*
2 * wm8750-apc8750.dts
3 * - Device tree file for VIA APC8750
4 *
5 * Copyright (C) 2012 Tony Prisk <linux@prisktech.co.nz>
6 *
7 * Licensed under GPLv2 or later
8 */
9
10/dts-v1/;
11/include/ "wm8750.dtsi"
12
13/ {
14 model = "VIA APC8750";
15};
16
17&pinctrl {
18 pinctrl-names = "default";
19 pinctrl-0 = <&i2c>;
20
21 i2c: i2c {
22 wm,pins = <168 169 170 171>;
23 wm,function = <2>; /* alt */
24 wm,pull = <2>; /* pull-up */
25 };
26};
27
28&uart0 {
29 status = "okay";
30};
diff --git a/arch/arm/boot/dts/wm8750.dtsi b/arch/arm/boot/dts/wm8750.dtsi
new file mode 100644
index 000000000000..557a9c2ace49
--- /dev/null
+++ b/arch/arm/boot/dts/wm8750.dtsi
@@ -0,0 +1,347 @@
1/*
2 * wm8750.dtsi - Device tree file for Wondermedia WM8750 SoC
3 *
4 * Copyright (C) 2012 Tony Prisk <linux@prisktech.co.nz>
5 *
6 * Licensed under GPLv2 or later
7 */
8
9/include/ "skeleton.dtsi"
10
11/ {
12 compatible = "wm,wm8750";
13
14 cpus {
15 #address-cells = <0>;
16 #size-cells = <0>;
17
18 cpu {
19 device_type = "cpu";
20 compatible = "arm,arm1176ej-s";
21 };
22 };
23
24 aliases {
25 serial0 = &uart0;
26 serial1 = &uart1;
27 serial2 = &uart2;
28 serial3 = &uart3;
29 serial4 = &uart4;
30 serial5 = &uart5;
31 i2c0 = &i2c_0;
32 i2c1 = &i2c_1;
33 };
34
35 soc {
36 #address-cells = <1>;
37 #size-cells = <1>;
38 compatible = "simple-bus";
39 ranges;
40 interrupt-parent = <&intc0>;
41
42 intc0: interrupt-controller@d8140000 {
43 compatible = "via,vt8500-intc";
44 interrupt-controller;
45 reg = <0xd8140000 0x10000>;
46 #interrupt-cells = <1>;
47 };
48
49 /* Secondary IC cascaded to intc0 */
50 intc1: interrupt-controller@d8150000 {
51 compatible = "via,vt8500-intc";
52 interrupt-controller;
53 #interrupt-cells = <1>;
54 reg = <0xD8150000 0x10000>;
55 interrupts = <56 57 58 59 60 61 62 63>;
56 };
57
58 pinctrl: pinctrl@d8110000 {
59 compatible = "wm,wm8750-pinctrl";
60 reg = <0xd8110000 0x10000>;
61 interrupt-controller;
62 #interrupt-cells = <2>;
63 gpio-controller;
64 #gpio-cells = <2>;
65 };
66
67 pmc@d8130000 {
68 compatible = "via,vt8500-pmc";
69 reg = <0xd8130000 0x1000>;
70
71 clocks {
72 #address-cells = <1>;
73 #size-cells = <0>;
74
75 ref24: ref24M {
76 #clock-cells = <0>;
77 compatible = "fixed-clock";
78 clock-frequency = <24000000>;
79 };
80
81 ref25: ref25M {
82 #clock-cells = <0>;
83 compatible = "fixed-clock";
84 clock-frequency = <25000000>;
85 };
86
87 plla: plla {
88 #clock-cells = <0>;
89 compatible = "wm,wm8750-pll-clock";
90 clocks = <&ref25>;
91 reg = <0x200>;
92 };
93
94 pllb: pllb {
95 #clock-cells = <0>;
96 compatible = "wm,wm8750-pll-clock";
97 clocks = <&ref25>;
98 reg = <0x204>;
99 };
100
101 pllc: pllc {
102 #clock-cells = <0>;
103 compatible = "wm,wm8750-pll-clock";
104 clocks = <&ref25>;
105 reg = <0x208>;
106 };
107
108 plld: plld {
109 #clock-cells = <0>;
110 compatible = "wm,wm8750-pll-clock";
111 clocks = <&ref25>;
112 reg = <0x20C>;
113 };
114
115 plle: plle {
116 #clock-cells = <0>;
117 compatible = "wm,wm8750-pll-clock";
118 clocks = <&ref25>;
119 reg = <0x210>;
120 };
121
122 clkarm: arm {
123 #clock-cells = <0>;
124 compatible = "via,vt8500-device-clock";
125 clocks = <&plla>;
126 divisor-reg = <0x300>;
127 };
128
129 clkahb: ahb {
130 #clock-cells = <0>;
131 compatible = "via,vt8500-device-clock";
132 clocks = <&pllb>;
133 divisor-reg = <0x304>;
134 };
135
136 clkapb: apb {
137 #clock-cells = <0>;
138 compatible = "via,vt8500-device-clock";
139 clocks = <&pllb>;
140 divisor-reg = <0x320>;
141 };
142
143 clkddr: ddr {
144 #clock-cells = <0>;
145 compatible = "via,vt8500-device-clock";
146 clocks = <&plld>;
147 divisor-reg = <0x310>;
148 };
149
150 clkuart0: uart0 {
151 #clock-cells = <0>;
152 compatible = "via,vt8500-device-clock";
153 clocks = <&ref24>;
154 enable-reg = <0x254>;
155 enable-bit = <24>;
156 };
157
158 clkuart1: uart1 {
159 #clock-cells = <0>;
160 compatible = "via,vt8500-device-clock";
161 clocks = <&ref24>;
162 enable-reg = <0x254>;
163 enable-bit = <25>;
164 };
165
166 clkuart2: uart2 {
167 #clock-cells = <0>;
168 compatible = "via,vt8500-device-clock";
169 clocks = <&ref24>;
170 enable-reg = <0x254>;
171 enable-bit = <26>;
172 };
173
174 clkuart3: uart3 {
175 #clock-cells = <0>;
176 compatible = "via,vt8500-device-clock";
177 clocks = <&ref24>;
178 enable-reg = <0x254>;
179 enable-bit = <27>;
180 };
181
182 clkuart4: uart4 {
183 #clock-cells = <0>;
184 compatible = "via,vt8500-device-clock";
185 clocks = <&ref24>;
186 enable-reg = <0x254>;
187 enable-bit = <28>;
188 };
189
190 clkuart5: uart5 {
191 #clock-cells = <0>;
192 compatible = "via,vt8500-device-clock";
193 clocks = <&ref24>;
194 enable-reg = <0x254>;
195 enable-bit = <29>;
196 };
197
198 clkpwm: pwm {
199 #clock-cells = <0>;
200 compatible = "via,vt8500-device-clock";
201 clocks = <&pllb>;
202 divisor-reg = <0x350>;
203 enable-reg = <0x250>;
204 enable-bit = <17>;
205 };
206
207 clksdhc: sdhc {
208 #clock-cells = <0>;
209 compatible = "via,vt8500-device-clock";
210 clocks = <&pllb>;
211 divisor-reg = <0x330>;
212 divisor-mask = <0x3f>;
213 enable-reg = <0x250>;
214 enable-bit = <0>;
215 };
216
217 clki2c0: i2c0clk {
218 #clock-cells = <0>;
219 compatible = "via,vt8500-device-clock";
220 clocks = <&pllb>;
221 divisor-reg = <0x3A0>;
222 enable-reg = <0x250>;
223 enable-bit = <8>;
224 };
225
226 clki2c1: i2c1clk {
227 #clock-cells = <0>;
228 compatible = "via,vt8500-device-clock";
229 clocks = <&pllb>;
230 divisor-reg = <0x3A4>;
231 enable-reg = <0x250>;
232 enable-bit = <9>;
233 };
234 };
235 };
236
237 pwm: pwm@d8220000 {
238 #pwm-cells = <3>;
239 compatible = "via,vt8500-pwm";
240 reg = <0xd8220000 0x100>;
241 clocks = <&clkpwm>;
242 };
243
244 timer@d8130100 {
245 compatible = "via,vt8500-timer";
246 reg = <0xd8130100 0x28>;
247 interrupts = <36>;
248 };
249
250 ehci@d8007900 {
251 compatible = "via,vt8500-ehci";
252 reg = <0xd8007900 0x200>;
253 interrupts = <26>;
254 };
255
256 uhci@d8007b00 {
257 compatible = "platform-uhci";
258 reg = <0xd8007b00 0x200>;
259 interrupts = <26>;
260 };
261
262 uhci@d8008d00 {
263 compatible = "platform-uhci";
264 reg = <0xd8008d00 0x200>;
265 interrupts = <26>;
266 };
267
268 uart0: serial@d8200000 {
269 compatible = "via,vt8500-uart";
270 reg = <0xd8200000 0x1040>;
271 interrupts = <32>;
272 clocks = <&clkuart0>;
273 status = "disabled";
274 };
275
276 uart1: serial@d82b0000 {
277 compatible = "via,vt8500-uart";
278 reg = <0xd82b0000 0x1040>;
279 interrupts = <33>;
280 clocks = <&clkuart1>;
281 status = "disabled";
282 };
283
284 uart2: serial@d8210000 {
285 compatible = "via,vt8500-uart";
286 reg = <0xd8210000 0x1040>;
287 interrupts = <47>;
288 clocks = <&clkuart2>;
289 status = "disabled";
290 };
291
292 uart3: serial@d82c0000 {
293 compatible = "via,vt8500-uart";
294 reg = <0xd82c0000 0x1040>;
295 interrupts = <50>;
296 clocks = <&clkuart3>;
297 status = "disabled";
298 };
299
300 uart4: serial@d8370000 {
301 compatible = "via,vt8500-uart";
302 reg = <0xd8370000 0x1040>;
303 interrupts = <30>;
304 clocks = <&clkuart4>;
305 status = "disabled";
306 };
307
308 uart5: serial@d8380000 {
309 compatible = "via,vt8500-uart";
310 reg = <0xd8380000 0x1040>;
311 interrupts = <43>;
312 clocks = <&clkuart5>;
313 status = "disabled";
314 };
315
316 rtc@d8100000 {
317 compatible = "via,vt8500-rtc";
318 reg = <0xd8100000 0x10000>;
319 interrupts = <48>;
320 };
321
322 sdhc@d800a000 {
323 compatible = "wm,wm8505-sdhc";
324 reg = <0xd800a000 0x1000>;
325 interrupts = <20 21>;
326 clocks = <&clksdhc>;
327 bus-width = <4>;
328 sdon-inverted;
329 };
330
331 i2c_0: i2c@d8280000 {
332 compatible = "wm,wm8505-i2c";
333 reg = <0xd8280000 0x1000>;
334 interrupts = <19>;
335 clocks = <&clki2c0>;
336 clock-frequency = <400000>;
337 };
338
339 i2c_1: i2c@d8320000 {
340 compatible = "wm,wm8505-i2c";
341 reg = <0xd8320000 0x1000>;
342 interrupts = <18>;
343 clocks = <&clki2c1>;
344 clock-frequency = <400000>;
345 };
346 };
347};
diff --git a/arch/arm/boot/dts/wm8850-w70v2.dts b/arch/arm/boot/dts/wm8850-w70v2.dts
index 32d22532cd6c..90e913fb64be 100644
--- a/arch/arm/boot/dts/wm8850-w70v2.dts
+++ b/arch/arm/boot/dts/wm8850-w70v2.dts
@@ -41,3 +41,7 @@
41 }; 41 };
42 }; 42 };
43}; 43};
44
45&uart0 {
46 status = "okay";
47};
diff --git a/arch/arm/boot/dts/wm8850.dtsi b/arch/arm/boot/dts/wm8850.dtsi
index fc790d0aee66..d98386dd2882 100644
--- a/arch/arm/boot/dts/wm8850.dtsi
+++ b/arch/arm/boot/dts/wm8850.dtsi
@@ -11,6 +11,17 @@
11/ { 11/ {
12 compatible = "wm,wm8850"; 12 compatible = "wm,wm8850";
13 13
14 cpus {
15 #address-cells = <1>;
16 #size-cells = <0>;
17
18 cpu@0 {
19 device_type = "cpu";
20 compatible = "arm,cortex-a9";
21 reg = <0x0>;
22 };
23 };
24
14 aliases { 25 aliases {
15 serial0 = &uart0; 26 serial0 = &uart0;
16 serial1 = &uart1; 27 serial1 = &uart1;
@@ -72,18 +83,81 @@
72 83
73 plla: plla { 84 plla: plla {
74 #clock-cells = <0>; 85 #clock-cells = <0>;
75 compatible = "wm,wm8750-pll-clock"; 86 compatible = "wm,wm8850-pll-clock";
76 clocks = <&ref25>; 87 clocks = <&ref24>;
77 reg = <0x200>; 88 reg = <0x200>;
78 }; 89 };
79 90
80 pllb: pllb { 91 pllb: pllb {
81 #clock-cells = <0>; 92 #clock-cells = <0>;
82 compatible = "wm,wm8750-pll-clock"; 93 compatible = "wm,wm8850-pll-clock";
83 clocks = <&ref25>; 94 clocks = <&ref24>;
84 reg = <0x204>; 95 reg = <0x204>;
85 }; 96 };
86 97
98 pllc: pllc {
99 #clock-cells = <0>;
100 compatible = "wm,wm8850-pll-clock";
101 clocks = <&ref24>;
102 reg = <0x208>;
103 };
104
105 plld: plld {
106 #clock-cells = <0>;
107 compatible = "wm,wm8850-pll-clock";
108 clocks = <&ref24>;
109 reg = <0x20c>;
110 };
111
112 plle: plle {
113 #clock-cells = <0>;
114 compatible = "wm,wm8850-pll-clock";
115 clocks = <&ref24>;
116 reg = <0x210>;
117 };
118
119 pllf: pllf {
120 #clock-cells = <0>;
121 compatible = "wm,wm8850-pll-clock";
122 clocks = <&ref24>;
123 reg = <0x214>;
124 };
125
126 pllg: pllg {
127 #clock-cells = <0>;
128 compatible = "wm,wm8850-pll-clock";
129 clocks = <&ref24>;
130 reg = <0x218>;
131 };
132
133 clkarm: arm {
134 #clock-cells = <0>;
135 compatible = "via,vt8500-device-clock";
136 clocks = <&plla>;
137 divisor-reg = <0x300>;
138 };
139
140 clkahb: ahb {
141 #clock-cells = <0>;
142 compatible = "via,vt8500-device-clock";
143 clocks = <&pllb>;
144 divisor-reg = <0x304>;
145 };
146
147 clkapb: apb {
148 #clock-cells = <0>;
149 compatible = "via,vt8500-device-clock";
150 clocks = <&pllb>;
151 divisor-reg = <0x320>;
152 };
153
154 clkddr: ddr {
155 #clock-cells = <0>;
156 compatible = "via,vt8500-device-clock";
157 clocks = <&plld>;
158 divisor-reg = <0x310>;
159 };
160
87 clkuart0: uart0 { 161 clkuart0: uart0 {
88 #clock-cells = <0>; 162 #clock-cells = <0>;
89 compatible = "via,vt8500-device-clock"; 163 compatible = "via,vt8500-device-clock";
@@ -178,32 +252,36 @@
178 interrupts = <26>; 252 interrupts = <26>;
179 }; 253 };
180 254
181 uart0: uart@d8200000 { 255 uart0: serial@d8200000 {
182 compatible = "via,vt8500-uart"; 256 compatible = "via,vt8500-uart";
183 reg = <0xd8200000 0x1040>; 257 reg = <0xd8200000 0x1040>;
184 interrupts = <32>; 258 interrupts = <32>;
185 clocks = <&clkuart0>; 259 clocks = <&clkuart0>;
260 status = "disabled";
186 }; 261 };
187 262
188 uart1: uart@d82b0000 { 263 uart1: serial@d82b0000 {
189 compatible = "via,vt8500-uart"; 264 compatible = "via,vt8500-uart";
190 reg = <0xd82b0000 0x1040>; 265 reg = <0xd82b0000 0x1040>;
191 interrupts = <33>; 266 interrupts = <33>;
192 clocks = <&clkuart1>; 267 clocks = <&clkuart1>;
268 status = "disabled";
193 }; 269 };
194 270
195 uart2: uart@d8210000 { 271 uart2: serial@d8210000 {
196 compatible = "via,vt8500-uart"; 272 compatible = "via,vt8500-uart";
197 reg = <0xd8210000 0x1040>; 273 reg = <0xd8210000 0x1040>;
198 interrupts = <47>; 274 interrupts = <47>;
199 clocks = <&clkuart2>; 275 clocks = <&clkuart2>;
276 status = "disabled";
200 }; 277 };
201 278
202 uart3: uart@d82c0000 { 279 uart3: serial@d82c0000 {
203 compatible = "via,vt8500-uart"; 280 compatible = "via,vt8500-uart";
204 reg = <0xd82c0000 0x1040>; 281 reg = <0xd82c0000 0x1040>;
205 interrupts = <50>; 282 interrupts = <50>;
206 clocks = <&clkuart3>; 283 clocks = <&clkuart3>;
284 status = "disabled";
207 }; 285 };
208 286
209 rtc@d8100000 { 287 rtc@d8100000 {
diff --git a/arch/arm/boot/dts/zynq-7000.dtsi b/arch/arm/boot/dts/zynq-7000.dtsi
index 14fb2e609bab..6f54a64850eb 100644
--- a/arch/arm/boot/dts/zynq-7000.dtsi
+++ b/arch/arm/boot/dts/zynq-7000.dtsi
@@ -49,16 +49,20 @@
49 49
50 uart0: uart@e0000000 { 50 uart0: uart@e0000000 {
51 compatible = "xlnx,xuartps"; 51 compatible = "xlnx,xuartps";
52 status = "disabled";
53 clocks = <&clkc 23>, <&clkc 40>;
54 clock-names = "ref_clk", "aper_clk";
52 reg = <0xE0000000 0x1000>; 55 reg = <0xE0000000 0x1000>;
53 interrupts = <0 27 4>; 56 interrupts = <0 27 4>;
54 clocks = <&uart_clk 0>;
55 }; 57 };
56 58
57 uart1: uart@e0001000 { 59 uart1: uart@e0001000 {
58 compatible = "xlnx,xuartps"; 60 compatible = "xlnx,xuartps";
61 status = "disabled";
62 clocks = <&clkc 24>, <&clkc 41>;
63 clock-names = "ref_clk", "aper_clk";
59 reg = <0xE0001000 0x1000>; 64 reg = <0xE0001000 0x1000>;
60 interrupts = <0 50 4>; 65 interrupts = <0 50 4>;
61 clocks = <&uart_clk 1>;
62 }; 66 };
63 67
64 slcr: slcr@f8000000 { 68 slcr: slcr@f8000000 {
@@ -69,50 +73,21 @@
69 #address-cells = <1>; 73 #address-cells = <1>;
70 #size-cells = <0>; 74 #size-cells = <0>;
71 75
72 ps_clk: ps_clk { 76 clkc: clkc {
73 #clock-cells = <0>;
74 compatible = "fixed-clock";
75 /* clock-frequency set in board-specific file */
76 clock-output-names = "ps_clk";
77 };
78 armpll: armpll {
79 #clock-cells = <0>;
80 compatible = "xlnx,zynq-pll";
81 clocks = <&ps_clk>;
82 reg = <0x100 0x110>;
83 clock-output-names = "armpll";
84 };
85 ddrpll: ddrpll {
86 #clock-cells = <0>;
87 compatible = "xlnx,zynq-pll";
88 clocks = <&ps_clk>;
89 reg = <0x104 0x114>;
90 clock-output-names = "ddrpll";
91 };
92 iopll: iopll {
93 #clock-cells = <0>;
94 compatible = "xlnx,zynq-pll";
95 clocks = <&ps_clk>;
96 reg = <0x108 0x118>;
97 clock-output-names = "iopll";
98 };
99 uart_clk: uart_clk {
100 #clock-cells = <1>;
101 compatible = "xlnx,zynq-periph-clock";
102 clocks = <&iopll &armpll &ddrpll>;
103 reg = <0x154>;
104 clock-output-names = "uart0_ref_clk",
105 "uart1_ref_clk";
106 };
107 cpu_clk: cpu_clk {
108 #clock-cells = <1>; 77 #clock-cells = <1>;
109 compatible = "xlnx,zynq-cpu-clock"; 78 compatible = "xlnx,ps7-clkc";
110 clocks = <&iopll &armpll &ddrpll>; 79 ps-clk-frequency = <33333333>;
111 reg = <0x120 0x1C4>; 80 clock-output-names = "armpll", "ddrpll", "iopll", "cpu_6or4x",
112 clock-output-names = "cpu_6x4x", 81 "cpu_3or2x", "cpu_2x", "cpu_1x", "ddr2x", "ddr3x",
113 "cpu_3x2x", 82 "dci", "lqspi", "smc", "pcap", "gem0", "gem1",
114 "cpu_2x", 83 "fclk0", "fclk1", "fclk2", "fclk3", "can0", "can1",
115 "cpu_1x"; 84 "sdio0", "sdio1", "uart0", "uart1", "spi0", "spi1",
85 "dma", "usb0_aper", "usb1_aper", "gem0_aper",
86 "gem1_aper", "sdio0_aper", "sdio1_aper",
87 "spi0_aper", "spi1_aper", "can0_aper", "can1_aper",
88 "i2c0_aper", "i2c1_aper", "uart0_aper", "uart1_aper",
89 "gpio_aper", "lqspi_aper", "smc_aper", "swdt",
90 "dbg_trc", "dbg_apb";
116 }; 91 };
117 }; 92 };
118 }; 93 };
@@ -121,9 +96,8 @@
121 interrupt-parent = <&intc>; 96 interrupt-parent = <&intc>;
122 interrupts = < 0 10 4 0 11 4 0 12 4 >; 97 interrupts = < 0 10 4 0 11 4 0 12 4 >;
123 compatible = "cdns,ttc"; 98 compatible = "cdns,ttc";
99 clocks = <&clkc 6>;
124 reg = <0xF8001000 0x1000>; 100 reg = <0xF8001000 0x1000>;
125 clocks = <&cpu_clk 3>;
126 clock-names = "cpu_1x";
127 clock-ranges; 101 clock-ranges;
128 }; 102 };
129 103
@@ -131,9 +105,8 @@
131 interrupt-parent = <&intc>; 105 interrupt-parent = <&intc>;
132 interrupts = < 0 37 4 0 38 4 0 39 4 >; 106 interrupts = < 0 37 4 0 38 4 0 39 4 >;
133 compatible = "cdns,ttc"; 107 compatible = "cdns,ttc";
108 clocks = <&clkc 6>;
134 reg = <0xF8002000 0x1000>; 109 reg = <0xF8002000 0x1000>;
135 clocks = <&cpu_clk 3>;
136 clock-names = "cpu_1x";
137 clock-ranges; 110 clock-ranges;
138 }; 111 };
139 scutimer: scutimer@f8f00600 { 112 scutimer: scutimer@f8f00600 {
@@ -141,7 +114,7 @@
141 interrupts = < 1 13 0x301 >; 114 interrupts = < 1 13 0x301 >;
142 compatible = "arm,cortex-a9-twd-timer"; 115 compatible = "arm,cortex-a9-twd-timer";
143 reg = < 0xf8f00600 0x20 >; 116 reg = < 0xf8f00600 0x20 >;
144 clocks = <&cpu_clk 1>; 117 clocks = <&clkc 4>;
145 } ; 118 } ;
146 }; 119 };
147}; 120};
diff --git a/arch/arm/boot/dts/zynq-zc702.dts b/arch/arm/boot/dts/zynq-zc702.dts
index 86f44d5b0265..21aea99a067b 100644
--- a/arch/arm/boot/dts/zynq-zc702.dts
+++ b/arch/arm/boot/dts/zynq-zc702.dts
@@ -24,11 +24,11 @@
24 }; 24 };
25 25
26 chosen { 26 chosen {
27 bootargs = "console=ttyPS1,115200 earlyprintk"; 27 bootargs = "console=ttyPS0,115200 earlyprintk";
28 }; 28 };
29 29
30}; 30};
31 31
32&ps_clk { 32&uart1 {
33 clock-frequency = <33333330>; 33 status = "okay";
34}; 34};
diff --git a/arch/arm/boot/dts/zynq-zc706.dts b/arch/arm/boot/dts/zynq-zc706.dts
new file mode 100644
index 000000000000..79009e0b74b9
--- /dev/null
+++ b/arch/arm/boot/dts/zynq-zc706.dts
@@ -0,0 +1,35 @@
1/*
2 * Copyright (C) 2011 Xilinx
3 * Copyright (C) 2012 National Instruments Corp.
4 * Copyright (C) 2013 Xilinx
5 *
6 * This software is licensed under the terms of the GNU General Public
7 * License version 2, as published by the Free Software Foundation, and
8 * may be copied, distributed, and modified under those terms.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 */
15/dts-v1/;
16/include/ "zynq-7000.dtsi"
17
18/ {
19 model = "Zynq ZC706 Development Board";
20 compatible = "xlnx,zynq-zc706", "xlnx,zynq-7000";
21
22 memory {
23 device_type = "memory";
24 reg = <0 0x40000000>;
25 };
26
27 chosen {
28 bootargs = "console=ttyPS0,115200 earlyprintk";
29 };
30
31};
32
33&uart1 {
34 status = "okay";
35};
diff --git a/arch/arm/boot/dts/zynq-zed.dts b/arch/arm/boot/dts/zynq-zed.dts
new file mode 100644
index 000000000000..d6acf2b1cdf4
--- /dev/null
+++ b/arch/arm/boot/dts/zynq-zed.dts
@@ -0,0 +1,35 @@
1/*
2 * Copyright (C) 2011 Xilinx
3 * Copyright (C) 2012 National Instruments Corp.
4 * Copyright (C) 2013 Xilinx
5 *
6 * This software is licensed under the terms of the GNU General Public
7 * License version 2, as published by the Free Software Foundation, and
8 * may be copied, distributed, and modified under those terms.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 */
15/dts-v1/;
16/include/ "zynq-7000.dtsi"
17
18/ {
19 model = "Zynq Zed Development Board";
20 compatible = "xlnx,zynq-7000";
21
22 memory {
23 device_type = "memory";
24 reg = <0 0x20000000>;
25 };
26
27 chosen {
28 bootargs = "console=ttyPS0,115200 earlyprintk";
29 };
30
31};
32
33&uart1 {
34 status = "okay";
35};
diff --git a/arch/arm/common/Kconfig b/arch/arm/common/Kconfig
index 9353184d730d..c3a4e9ceba34 100644
--- a/arch/arm/common/Kconfig
+++ b/arch/arm/common/Kconfig
@@ -17,3 +17,6 @@ config SHARP_PARAM
17 17
18config SHARP_SCOOP 18config SHARP_SCOOP
19 bool 19 bool
20
21config TI_PRIV_EDMA
22 bool
diff --git a/arch/arm/common/Makefile b/arch/arm/common/Makefile
index 48434cbe3e89..8c60f473e976 100644
--- a/arch/arm/common/Makefile
+++ b/arch/arm/common/Makefile
@@ -16,3 +16,4 @@ obj-$(CONFIG_ARM_TIMER_SP804) += timer-sp.o
16obj-$(CONFIG_MCPM) += mcpm_head.o mcpm_entry.o mcpm_platsmp.o vlock.o 16obj-$(CONFIG_MCPM) += mcpm_head.o mcpm_entry.o mcpm_platsmp.o vlock.o
17AFLAGS_mcpm_head.o := -march=armv7-a 17AFLAGS_mcpm_head.o := -march=armv7-a
18AFLAGS_vlock.o := -march=armv7-a 18AFLAGS_vlock.o := -march=armv7-a
19obj-$(CONFIG_TI_PRIV_EDMA) += edma.o
diff --git a/arch/arm/mach-davinci/dma.c b/arch/arm/common/edma.c
index 45b7c71d9cc1..39ad030ac0c7 100644
--- a/arch/arm/mach-davinci/dma.c
+++ b/arch/arm/common/edma.c
@@ -17,6 +17,7 @@
17 * along with this program; if not, write to the Free Software 17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 18 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19 */ 19 */
20#include <linux/err.h>
20#include <linux/kernel.h> 21#include <linux/kernel.h>
21#include <linux/init.h> 22#include <linux/init.h>
22#include <linux/module.h> 23#include <linux/module.h>
@@ -24,8 +25,14 @@
24#include <linux/platform_device.h> 25#include <linux/platform_device.h>
25#include <linux/io.h> 26#include <linux/io.h>
26#include <linux/slab.h> 27#include <linux/slab.h>
28#include <linux/edma.h>
29#include <linux/of_address.h>
30#include <linux/of_device.h>
31#include <linux/of_dma.h>
32#include <linux/of_irq.h>
33#include <linux/pm_runtime.h>
27 34
28#include <mach/edma.h> 35#include <linux/platform_data/edma.h>
29 36
30/* Offsets matching "struct edmacc_param" */ 37/* Offsets matching "struct edmacc_param" */
31#define PARM_OPT 0x00 38#define PARM_OPT 0x00
@@ -494,26 +501,6 @@ static irqreturn_t dma_ccerr_handler(int irq, void *data)
494 return IRQ_HANDLED; 501 return IRQ_HANDLED;
495} 502}
496 503
497/******************************************************************************
498 *
499 * Transfer controller error interrupt handlers
500 *
501 *****************************************************************************/
502
503#define tc_errs_handled false /* disabled as long as they're NOPs */
504
505static irqreturn_t dma_tc0err_handler(int irq, void *data)
506{
507 dev_dbg(data, "dma_tc0err_handler\n");
508 return IRQ_HANDLED;
509}
510
511static irqreturn_t dma_tc1err_handler(int irq, void *data)
512{
513 dev_dbg(data, "dma_tc1err_handler\n");
514 return IRQ_HANDLED;
515}
516
517static int reserve_contiguous_slots(int ctlr, unsigned int id, 504static int reserve_contiguous_slots(int ctlr, unsigned int id,
518 unsigned int num_slots, 505 unsigned int num_slots,
519 unsigned int start_slot) 506 unsigned int start_slot)
@@ -1388,32 +1375,236 @@ void edma_clear_event(unsigned channel)
1388} 1375}
1389EXPORT_SYMBOL(edma_clear_event); 1376EXPORT_SYMBOL(edma_clear_event);
1390 1377
1391/*-----------------------------------------------------------------------*/ 1378#if IS_ENABLED(CONFIG_OF) && IS_ENABLED(CONFIG_DMADEVICES)
1379
1380static int edma_of_read_u32_to_s16_array(const struct device_node *np,
1381 const char *propname, s16 *out_values,
1382 size_t sz)
1383{
1384 int ret;
1385
1386 ret = of_property_read_u16_array(np, propname, out_values, sz);
1387 if (ret)
1388 return ret;
1389
1390 /* Terminate it */
1391 *out_values++ = -1;
1392 *out_values++ = -1;
1393
1394 return 0;
1395}
1396
1397static int edma_xbar_event_map(struct device *dev,
1398 struct device_node *node,
1399 struct edma_soc_info *pdata, int len)
1400{
1401 int ret, i;
1402 struct resource res;
1403 void __iomem *xbar;
1404 const s16 (*xbar_chans)[2];
1405 u32 shift, offset, mux;
1406
1407 xbar_chans = devm_kzalloc(dev,
1408 len/sizeof(s16) + 2*sizeof(s16),
1409 GFP_KERNEL);
1410 if (!xbar_chans)
1411 return -ENOMEM;
1412
1413 ret = of_address_to_resource(node, 1, &res);
1414 if (ret)
1415 return -EIO;
1416
1417 xbar = devm_ioremap(dev, res.start, resource_size(&res));
1418 if (!xbar)
1419 return -ENOMEM;
1420
1421 ret = edma_of_read_u32_to_s16_array(node,
1422 "ti,edma-xbar-event-map",
1423 (s16 *)xbar_chans,
1424 len/sizeof(u32));
1425 if (ret)
1426 return -EIO;
1427
1428 for (i = 0; xbar_chans[i][0] != -1; i++) {
1429 shift = (xbar_chans[i][1] & 0x03) << 3;
1430 offset = xbar_chans[i][1] & 0xfffffffc;
1431 mux = readl(xbar + offset);
1432 mux &= ~(0xff << shift);
1433 mux |= xbar_chans[i][0] << shift;
1434 writel(mux, (xbar + offset));
1435 }
1436
1437 pdata->xbar_chans = xbar_chans;
1438
1439 return 0;
1440}
1441
1442static int edma_of_parse_dt(struct device *dev,
1443 struct device_node *node,
1444 struct edma_soc_info *pdata)
1445{
1446 int ret = 0, i;
1447 u32 value;
1448 struct property *prop;
1449 size_t sz;
1450 struct edma_rsv_info *rsv_info;
1451 s8 (*queue_tc_map)[2], (*queue_priority_map)[2];
1452
1453 memset(pdata, 0, sizeof(struct edma_soc_info));
1454
1455 ret = of_property_read_u32(node, "dma-channels", &value);
1456 if (ret < 0)
1457 return ret;
1458 pdata->n_channel = value;
1459
1460 ret = of_property_read_u32(node, "ti,edma-regions", &value);
1461 if (ret < 0)
1462 return ret;
1463 pdata->n_region = value;
1464
1465 ret = of_property_read_u32(node, "ti,edma-slots", &value);
1466 if (ret < 0)
1467 return ret;
1468 pdata->n_slot = value;
1469
1470 pdata->n_cc = 1;
1471
1472 rsv_info = devm_kzalloc(dev, sizeof(struct edma_rsv_info), GFP_KERNEL);
1473 if (!rsv_info)
1474 return -ENOMEM;
1475 pdata->rsv = rsv_info;
1476
1477 queue_tc_map = devm_kzalloc(dev, 8*sizeof(s8), GFP_KERNEL);
1478 if (!queue_tc_map)
1479 return -ENOMEM;
1480
1481 for (i = 0; i < 3; i++) {
1482 queue_tc_map[i][0] = i;
1483 queue_tc_map[i][1] = i;
1484 }
1485 queue_tc_map[i][0] = -1;
1486 queue_tc_map[i][1] = -1;
1487
1488 pdata->queue_tc_mapping = queue_tc_map;
1489
1490 queue_priority_map = devm_kzalloc(dev, 8*sizeof(s8), GFP_KERNEL);
1491 if (!queue_priority_map)
1492 return -ENOMEM;
1493
1494 for (i = 0; i < 3; i++) {
1495 queue_priority_map[i][0] = i;
1496 queue_priority_map[i][1] = i;
1497 }
1498 queue_priority_map[i][0] = -1;
1499 queue_priority_map[i][1] = -1;
1500
1501 pdata->queue_priority_mapping = queue_priority_map;
1502
1503 pdata->default_queue = 0;
1504
1505 prop = of_find_property(node, "ti,edma-xbar-event-map", &sz);
1506 if (prop)
1507 ret = edma_xbar_event_map(dev, node, pdata, sz);
1508
1509 return ret;
1510}
1511
1512static struct of_dma_filter_info edma_filter_info = {
1513 .filter_fn = edma_filter_fn,
1514};
1515
1516static struct edma_soc_info *edma_setup_info_from_dt(struct device *dev,
1517 struct device_node *node)
1518{
1519 struct edma_soc_info *info;
1520 int ret;
1521
1522 info = devm_kzalloc(dev, sizeof(struct edma_soc_info), GFP_KERNEL);
1523 if (!info)
1524 return ERR_PTR(-ENOMEM);
1392 1525
1393static int __init edma_probe(struct platform_device *pdev) 1526 ret = edma_of_parse_dt(dev, node, info);
1527 if (ret)
1528 return ERR_PTR(ret);
1529
1530 dma_cap_set(DMA_SLAVE, edma_filter_info.dma_cap);
1531 of_dma_controller_register(dev->of_node, of_dma_simple_xlate,
1532 &edma_filter_info);
1533
1534 return info;
1535}
1536#else
1537static struct edma_soc_info *edma_setup_info_from_dt(struct device *dev,
1538 struct device_node *node)
1539{
1540 return ERR_PTR(-ENOSYS);
1541}
1542#endif
1543
1544static int edma_probe(struct platform_device *pdev)
1394{ 1545{
1395 struct edma_soc_info **info = pdev->dev.platform_data; 1546 struct edma_soc_info **info = pdev->dev.platform_data;
1396 const s8 (*queue_priority_mapping)[2]; 1547 struct edma_soc_info *ninfo[EDMA_MAX_CC] = {NULL};
1397 const s8 (*queue_tc_mapping)[2]; 1548 s8 (*queue_priority_mapping)[2];
1549 s8 (*queue_tc_mapping)[2];
1398 int i, j, off, ln, found = 0; 1550 int i, j, off, ln, found = 0;
1399 int status = -1; 1551 int status = -1;
1400 const s16 (*rsv_chans)[2]; 1552 const s16 (*rsv_chans)[2];
1401 const s16 (*rsv_slots)[2]; 1553 const s16 (*rsv_slots)[2];
1554 const s16 (*xbar_chans)[2];
1402 int irq[EDMA_MAX_CC] = {0, 0}; 1555 int irq[EDMA_MAX_CC] = {0, 0};
1403 int err_irq[EDMA_MAX_CC] = {0, 0}; 1556 int err_irq[EDMA_MAX_CC] = {0, 0};
1404 struct resource *r[EDMA_MAX_CC] = {NULL}; 1557 struct resource *r[EDMA_MAX_CC] = {NULL};
1405 resource_size_t len[EDMA_MAX_CC]; 1558 struct resource res[EDMA_MAX_CC];
1406 char res_name[10]; 1559 char res_name[10];
1407 char irq_name[10]; 1560 char irq_name[10];
1561 struct device_node *node = pdev->dev.of_node;
1562 struct device *dev = &pdev->dev;
1563 int ret;
1564
1565 if (node) {
1566 /* Check if this is a second instance registered */
1567 if (arch_num_cc) {
1568 dev_err(dev, "only one EDMA instance is supported via DT\n");
1569 return -ENODEV;
1570 }
1571
1572 ninfo[0] = edma_setup_info_from_dt(dev, node);
1573 if (IS_ERR(ninfo[0])) {
1574 dev_err(dev, "failed to get DT data\n");
1575 return PTR_ERR(ninfo[0]);
1576 }
1577
1578 info = ninfo;
1579 }
1408 1580
1409 if (!info) 1581 if (!info)
1410 return -ENODEV; 1582 return -ENODEV;
1411 1583
1584 pm_runtime_enable(dev);
1585 ret = pm_runtime_get_sync(dev);
1586 if (ret < 0) {
1587 dev_err(dev, "pm_runtime_get_sync() failed\n");
1588 return ret;
1589 }
1590
1412 for (j = 0; j < EDMA_MAX_CC; j++) { 1591 for (j = 0; j < EDMA_MAX_CC; j++) {
1413 sprintf(res_name, "edma_cc%d", j); 1592 if (!info[j]) {
1414 r[j] = platform_get_resource_byname(pdev, IORESOURCE_MEM, 1593 if (!found)
1594 return -ENODEV;
1595 break;
1596 }
1597 if (node) {
1598 ret = of_address_to_resource(node, j, &res[j]);
1599 if (!ret)
1600 r[j] = &res[j];
1601 } else {
1602 sprintf(res_name, "edma_cc%d", j);
1603 r[j] = platform_get_resource_byname(pdev,
1604 IORESOURCE_MEM,
1415 res_name); 1605 res_name);
1416 if (!r[j] || !info[j]) { 1606 }
1607 if (!r[j]) {
1417 if (found) 1608 if (found)
1418 break; 1609 break;
1419 else 1610 else
@@ -1422,26 +1613,14 @@ static int __init edma_probe(struct platform_device *pdev)
1422 found = 1; 1613 found = 1;
1423 } 1614 }
1424 1615
1425 len[j] = resource_size(r[j]); 1616 edmacc_regs_base[j] = devm_ioremap_resource(&pdev->dev, r[j]);
1426 1617 if (IS_ERR(edmacc_regs_base[j]))
1427 r[j] = request_mem_region(r[j]->start, len[j], 1618 return PTR_ERR(edmacc_regs_base[j]);
1428 dev_name(&pdev->dev));
1429 if (!r[j]) {
1430 status = -EBUSY;
1431 goto fail1;
1432 }
1433
1434 edmacc_regs_base[j] = ioremap(r[j]->start, len[j]);
1435 if (!edmacc_regs_base[j]) {
1436 status = -EBUSY;
1437 goto fail1;
1438 }
1439 1619
1440 edma_cc[j] = kzalloc(sizeof(struct edma), GFP_KERNEL); 1620 edma_cc[j] = devm_kzalloc(&pdev->dev, sizeof(struct edma),
1441 if (!edma_cc[j]) { 1621 GFP_KERNEL);
1442 status = -ENOMEM; 1622 if (!edma_cc[j])
1443 goto fail1; 1623 return -ENOMEM;
1444 }
1445 1624
1446 edma_cc[j]->num_channels = min_t(unsigned, info[j]->n_channel, 1625 edma_cc[j]->num_channels = min_t(unsigned, info[j]->n_channel,
1447 EDMA_MAX_DMACH); 1626 EDMA_MAX_DMACH);
@@ -1472,7 +1651,7 @@ static int __init edma_probe(struct platform_device *pdev)
1472 off = rsv_chans[i][0]; 1651 off = rsv_chans[i][0];
1473 ln = rsv_chans[i][1]; 1652 ln = rsv_chans[i][1];
1474 clear_bits(off, ln, 1653 clear_bits(off, ln,
1475 edma_cc[j]->edma_unused); 1654 edma_cc[j]->edma_unused);
1476 } 1655 }
1477 } 1656 }
1478 1657
@@ -1488,26 +1667,48 @@ static int __init edma_probe(struct platform_device *pdev)
1488 } 1667 }
1489 } 1668 }
1490 1669
1491 sprintf(irq_name, "edma%d", j); 1670 /* Clear the xbar mapped channels in unused list */
1492 irq[j] = platform_get_irq_byname(pdev, irq_name); 1671 xbar_chans = info[j]->xbar_chans;
1672 if (xbar_chans) {
1673 for (i = 0; xbar_chans[i][1] != -1; i++) {
1674 off = xbar_chans[i][1];
1675 clear_bits(off, 1,
1676 edma_cc[j]->edma_unused);
1677 }
1678 }
1679
1680 if (node) {
1681 irq[j] = irq_of_parse_and_map(node, 0);
1682 } else {
1683 sprintf(irq_name, "edma%d", j);
1684 irq[j] = platform_get_irq_byname(pdev, irq_name);
1685 }
1493 edma_cc[j]->irq_res_start = irq[j]; 1686 edma_cc[j]->irq_res_start = irq[j];
1494 status = request_irq(irq[j], dma_irq_handler, 0, "edma", 1687 status = devm_request_irq(&pdev->dev, irq[j],
1495 &pdev->dev); 1688 dma_irq_handler, 0, "edma",
1689 &pdev->dev);
1496 if (status < 0) { 1690 if (status < 0) {
1497 dev_dbg(&pdev->dev, "request_irq %d failed --> %d\n", 1691 dev_dbg(&pdev->dev,
1692 "devm_request_irq %d failed --> %d\n",
1498 irq[j], status); 1693 irq[j], status);
1499 goto fail; 1694 return status;
1500 } 1695 }
1501 1696
1502 sprintf(irq_name, "edma%d_err", j); 1697 if (node) {
1503 err_irq[j] = platform_get_irq_byname(pdev, irq_name); 1698 err_irq[j] = irq_of_parse_and_map(node, 2);
1699 } else {
1700 sprintf(irq_name, "edma%d_err", j);
1701 err_irq[j] = platform_get_irq_byname(pdev, irq_name);
1702 }
1504 edma_cc[j]->irq_res_end = err_irq[j]; 1703 edma_cc[j]->irq_res_end = err_irq[j];
1505 status = request_irq(err_irq[j], dma_ccerr_handler, 0, 1704 status = devm_request_irq(&pdev->dev, err_irq[j],
1506 "edma_error", &pdev->dev); 1705 dma_ccerr_handler, 0,
1706 "edma_error", &pdev->dev);
1507 if (status < 0) { 1707 if (status < 0) {
1508 dev_dbg(&pdev->dev, "request_irq %d failed --> %d\n", 1708 dev_dbg(&pdev->dev,
1709 "devm_request_irq %d failed --> %d\n",
1509 err_irq[j], status); 1710 err_irq[j], status);
1510 goto fail; 1711 return status;
1511 } 1712 }
1512 1713
1513 for (i = 0; i < edma_cc[j]->num_channels; i++) 1714 for (i = 0; i < edma_cc[j]->num_channels; i++)
@@ -1541,46 +1742,20 @@ static int __init edma_probe(struct platform_device *pdev)
1541 arch_num_cc++; 1742 arch_num_cc++;
1542 } 1743 }
1543 1744
1544 if (tc_errs_handled) {
1545 status = request_irq(IRQ_TCERRINT0, dma_tc0err_handler, 0,
1546 "edma_tc0", &pdev->dev);
1547 if (status < 0) {
1548 dev_dbg(&pdev->dev, "request_irq %d failed --> %d\n",
1549 IRQ_TCERRINT0, status);
1550 return status;
1551 }
1552 status = request_irq(IRQ_TCERRINT, dma_tc1err_handler, 0,
1553 "edma_tc1", &pdev->dev);
1554 if (status < 0) {
1555 dev_dbg(&pdev->dev, "request_irq %d --> %d\n",
1556 IRQ_TCERRINT, status);
1557 return status;
1558 }
1559 }
1560
1561 return 0; 1745 return 0;
1562
1563fail:
1564 for (i = 0; i < EDMA_MAX_CC; i++) {
1565 if (err_irq[i])
1566 free_irq(err_irq[i], &pdev->dev);
1567 if (irq[i])
1568 free_irq(irq[i], &pdev->dev);
1569 }
1570fail1:
1571 for (i = 0; i < EDMA_MAX_CC; i++) {
1572 if (r[i])
1573 release_mem_region(r[i]->start, len[i]);
1574 if (edmacc_regs_base[i])
1575 iounmap(edmacc_regs_base[i]);
1576 kfree(edma_cc[i]);
1577 }
1578 return status;
1579} 1746}
1580 1747
1748static const struct of_device_id edma_of_ids[] = {
1749 { .compatible = "ti,edma3", },
1750 {}
1751};
1581 1752
1582static struct platform_driver edma_driver = { 1753static struct platform_driver edma_driver = {
1583 .driver.name = "edma", 1754 .driver = {
1755 .name = "edma",
1756 .of_match_table = edma_of_ids,
1757 },
1758 .probe = edma_probe,
1584}; 1759};
1585 1760
1586static int __init edma_init(void) 1761static int __init edma_init(void)
diff --git a/arch/arm/common/mcpm_head.S b/arch/arm/common/mcpm_head.S
index 8178705c4b24..80f033614a1f 100644
--- a/arch/arm/common/mcpm_head.S
+++ b/arch/arm/common/mcpm_head.S
@@ -32,11 +32,11 @@
321901: adr r0, 1902b 321901: adr r0, 1902b
33 bl printascii 33 bl printascii
34 mov r0, r9 34 mov r0, r9
35 bl printhex8 35 bl printhex2
36 adr r0, 1903b 36 adr r0, 1903b
37 bl printascii 37 bl printascii
38 mov r0, r10 38 mov r0, r10
39 bl printhex8 39 bl printhex2
40 adr r0, 1904b 40 adr r0, 1904b
41 bl printascii 41 bl printascii
42#endif 42#endif
diff --git a/arch/arm/common/mcpm_platsmp.c b/arch/arm/common/mcpm_platsmp.c
index 3caed0db6986..1bc34c7567fd 100644
--- a/arch/arm/common/mcpm_platsmp.c
+++ b/arch/arm/common/mcpm_platsmp.c
@@ -19,11 +19,7 @@
19#include <asm/smp.h> 19#include <asm/smp.h>
20#include <asm/smp_plat.h> 20#include <asm/smp_plat.h>
21 21
22static void __init simple_smp_init_cpus(void) 22static int mcpm_boot_secondary(unsigned int cpu, struct task_struct *idle)
23{
24}
25
26static int __cpuinit mcpm_boot_secondary(unsigned int cpu, struct task_struct *idle)
27{ 23{
28 unsigned int mpidr, pcpu, pcluster, ret; 24 unsigned int mpidr, pcpu, pcluster, ret;
29 extern void secondary_startup(void); 25 extern void secondary_startup(void);
@@ -44,7 +40,7 @@ static int __cpuinit mcpm_boot_secondary(unsigned int cpu, struct task_struct *i
44 return 0; 40 return 0;
45} 41}
46 42
47static void __cpuinit mcpm_secondary_init(unsigned int cpu) 43static void mcpm_secondary_init(unsigned int cpu)
48{ 44{
49 mcpm_cpu_powered_up(); 45 mcpm_cpu_powered_up();
50} 46}
@@ -74,7 +70,6 @@ static void mcpm_cpu_die(unsigned int cpu)
74#endif 70#endif
75 71
76static struct smp_operations __initdata mcpm_smp_ops = { 72static struct smp_operations __initdata mcpm_smp_ops = {
77 .smp_init_cpus = simple_smp_init_cpus,
78 .smp_boot_secondary = mcpm_boot_secondary, 73 .smp_boot_secondary = mcpm_boot_secondary,
79 .smp_secondary_init = mcpm_secondary_init, 74 .smp_secondary_init = mcpm_secondary_init,
80#ifdef CONFIG_HOTPLUG_CPU 75#ifdef CONFIG_HOTPLUG_CPU
diff --git a/arch/arm/common/timer-sp.c b/arch/arm/common/timer-sp.c
index ddc740769601..023ee63827a2 100644
--- a/arch/arm/common/timer-sp.c
+++ b/arch/arm/common/timer-sp.c
@@ -28,8 +28,8 @@
28#include <linux/of.h> 28#include <linux/of.h>
29#include <linux/of_address.h> 29#include <linux/of_address.h>
30#include <linux/of_irq.h> 30#include <linux/of_irq.h>
31#include <linux/sched_clock.h>
31 32
32#include <asm/sched_clock.h>
33#include <asm/hardware/arm_timer.h> 33#include <asm/hardware/arm_timer.h>
34#include <asm/hardware/timer-sp.h> 34#include <asm/hardware/timer-sp.h>
35 35
diff --git a/arch/arm/configs/ap4evb_defconfig b/arch/arm/configs/ap4evb_defconfig
deleted file mode 100644
index 66894f736d04..000000000000
--- a/arch/arm/configs/ap4evb_defconfig
+++ /dev/null
@@ -1,56 +0,0 @@
1CONFIG_EXPERIMENTAL=y
2CONFIG_SYSVIPC=y
3CONFIG_IKCONFIG=y
4CONFIG_IKCONFIG_PROC=y
5CONFIG_LOG_BUF_SHIFT=16
6CONFIG_BLK_DEV_INITRD=y
7CONFIG_SLAB=y
8# CONFIG_BLK_DEV_BSG is not set
9# CONFIG_IOSCHED_DEADLINE is not set
10# CONFIG_IOSCHED_CFQ is not set
11CONFIG_ARCH_SHMOBILE=y
12CONFIG_ARCH_SH7372=y
13CONFIG_MACH_AP4EVB=y
14CONFIG_AEABI=y
15# CONFIG_OABI_COMPAT is not set
16CONFIG_ZBOOT_ROM_TEXT=0x0
17CONFIG_ZBOOT_ROM_BSS=0x0
18CONFIG_CMDLINE="console=ttySC0,115200 earlyprintk=sh-sci.0,115200"
19CONFIG_KEXEC=y
20CONFIG_PM=y
21# CONFIG_SUSPEND is not set
22CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
23# CONFIG_FIRMWARE_IN_KERNEL is not set
24CONFIG_MTD=y
25CONFIG_MTD_CONCAT=y
26CONFIG_MTD_PARTITIONS=y
27CONFIG_MTD_CHAR=y
28CONFIG_MTD_BLOCK=y
29CONFIG_MTD_CFI=y
30CONFIG_MTD_CFI_INTELEXT=y
31CONFIG_MTD_PHYSMAP=y
32CONFIG_MTD_NAND=y
33# CONFIG_BLK_DEV is not set
34# CONFIG_MISC_DEVICES is not set
35# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
36# CONFIG_INPUT_KEYBOARD is not set
37# CONFIG_INPUT_MOUSE is not set
38# CONFIG_SERIO is not set
39CONFIG_SERIAL_SH_SCI=y
40CONFIG_SERIAL_SH_SCI_NR_UARTS=8
41CONFIG_SERIAL_SH_SCI_CONSOLE=y
42# CONFIG_LEGACY_PTYS is not set
43# CONFIG_HW_RANDOM is not set
44# CONFIG_HWMON is not set
45# CONFIG_VGA_CONSOLE is not set
46# CONFIG_HID_SUPPORT is not set
47# CONFIG_USB_SUPPORT is not set
48# CONFIG_DNOTIFY is not set
49CONFIG_TMPFS=y
50# CONFIG_MISC_FILESYSTEMS is not set
51CONFIG_MAGIC_SYSRQ=y
52CONFIG_DEBUG_KERNEL=y
53# CONFIG_DETECT_SOFTLOCKUP is not set
54# CONFIG_RCU_CPU_STALL_DETECTOR is not set
55# CONFIG_FTRACE is not set
56# CONFIG_CRC32 is not set
diff --git a/arch/arm/configs/armadillo800eva_defconfig b/arch/arm/configs/armadillo800eva_defconfig
index 0f2d80da7378..fae939d3d7f0 100644
--- a/arch/arm/configs/armadillo800eva_defconfig
+++ b/arch/arm/configs/armadillo800eva_defconfig
@@ -86,7 +86,7 @@ CONFIG_TOUCHSCREEN_ST1232=y
86# CONFIG_SERIO is not set 86# CONFIG_SERIO is not set
87# CONFIG_LEGACY_PTYS is not set 87# CONFIG_LEGACY_PTYS is not set
88CONFIG_SERIAL_SH_SCI=y 88CONFIG_SERIAL_SH_SCI=y
89CONFIG_SERIAL_SH_SCI_NR_UARTS=8 89CONFIG_SERIAL_SH_SCI_NR_UARTS=9
90CONFIG_SERIAL_SH_SCI_CONSOLE=y 90CONFIG_SERIAL_SH_SCI_CONSOLE=y
91# CONFIG_HW_RANDOM is not set 91# CONFIG_HW_RANDOM is not set
92CONFIG_I2C=y 92CONFIG_I2C=y
diff --git a/arch/arm/configs/at91_dt_defconfig b/arch/arm/configs/at91_dt_defconfig
index 047f2a415309..75fd842d4071 100644
--- a/arch/arm/configs/at91_dt_defconfig
+++ b/arch/arm/configs/at91_dt_defconfig
@@ -1,4 +1,3 @@
1CONFIG_EXPERIMENTAL=y
2# CONFIG_LOCALVERSION_AUTO is not set 1# CONFIG_LOCALVERSION_AUTO is not set
3# CONFIG_SWAP is not set 2# CONFIG_SWAP is not set
4CONFIG_SYSVIPC=y 3CONFIG_SYSVIPC=y
@@ -25,8 +24,6 @@ CONFIG_AT91_PROGRAMMABLE_CLOCKS=y
25CONFIG_AT91_TIMER_HZ=128 24CONFIG_AT91_TIMER_HZ=128
26CONFIG_AEABI=y 25CONFIG_AEABI=y
27# CONFIG_OABI_COMPAT is not set 26# CONFIG_OABI_COMPAT is not set
28CONFIG_LEDS=y
29CONFIG_LEDS_CPU=y
30CONFIG_UACCESS_WITH_MEMCPY=y 27CONFIG_UACCESS_WITH_MEMCPY=y
31CONFIG_ZBOOT_ROM_TEXT=0x0 28CONFIG_ZBOOT_ROM_TEXT=0x0
32CONFIG_ZBOOT_ROM_BSS=0x0 29CONFIG_ZBOOT_ROM_BSS=0x0
@@ -42,6 +39,9 @@ CONFIG_UNIX=y
42CONFIG_INET=y 39CONFIG_INET=y
43CONFIG_IP_MULTICAST=y 40CONFIG_IP_MULTICAST=y
44CONFIG_IP_PNP=y 41CONFIG_IP_PNP=y
42CONFIG_IP_PNP_DHCP=y
43CONFIG_IP_PNP_BOOTP=y
44CONFIG_IP_PNP_RARP=y
45# CONFIG_INET_XFRM_MODE_TRANSPORT is not set 45# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
46# CONFIG_INET_XFRM_MODE_TUNNEL is not set 46# CONFIG_INET_XFRM_MODE_TUNNEL is not set
47# CONFIG_INET_XFRM_MODE_BEET is not set 47# CONFIG_INET_XFRM_MODE_BEET is not set
@@ -51,7 +51,8 @@ CONFIG_IPV6=y
51# CONFIG_INET6_XFRM_MODE_TUNNEL is not set 51# CONFIG_INET6_XFRM_MODE_TUNNEL is not set
52# CONFIG_INET6_XFRM_MODE_BEET is not set 52# CONFIG_INET6_XFRM_MODE_BEET is not set
53CONFIG_IPV6_SIT_6RD=y 53CONFIG_IPV6_SIT_6RD=y
54# CONFIG_WIRELESS is not set 54CONFIG_CFG80211=y
55CONFIG_MAC80211=y
55CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" 56CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
56CONFIG_DEVTMPFS=y 57CONFIG_DEVTMPFS=y
57CONFIG_DEVTMPFS_MOUNT=y 58CONFIG_DEVTMPFS_MOUNT=y
@@ -72,7 +73,6 @@ CONFIG_BLK_DEV_RAM_COUNT=4
72CONFIG_BLK_DEV_RAM_SIZE=8192 73CONFIG_BLK_DEV_RAM_SIZE=8192
73CONFIG_ATMEL_PWM=y 74CONFIG_ATMEL_PWM=y
74CONFIG_ATMEL_TCLIB=y 75CONFIG_ATMEL_TCLIB=y
75CONFIG_EEPROM_93CX6=m
76CONFIG_SCSI=y 76CONFIG_SCSI=y
77CONFIG_BLK_DEV_SD=y 77CONFIG_BLK_DEV_SD=y
78CONFIG_SCSI_MULTI_LUN=y 78CONFIG_SCSI_MULTI_LUN=y
@@ -81,7 +81,6 @@ CONFIG_NETDEVICES=y
81CONFIG_MII=y 81CONFIG_MII=y
82CONFIG_MACB=y 82CONFIG_MACB=y
83# CONFIG_NET_VENDOR_BROADCOM is not set 83# CONFIG_NET_VENDOR_BROADCOM is not set
84# CONFIG_NET_VENDOR_CHELSIO is not set
85# CONFIG_NET_VENDOR_FARADAY is not set 84# CONFIG_NET_VENDOR_FARADAY is not set
86# CONFIG_NET_VENDOR_INTEL is not set 85# CONFIG_NET_VENDOR_INTEL is not set
87# CONFIG_NET_VENDOR_MARVELL is not set 86# CONFIG_NET_VENDOR_MARVELL is not set
@@ -92,7 +91,23 @@ CONFIG_MACB=y
92# CONFIG_NET_VENDOR_STMICRO is not set 91# CONFIG_NET_VENDOR_STMICRO is not set
93CONFIG_DAVICOM_PHY=y 92CONFIG_DAVICOM_PHY=y
94CONFIG_MICREL_PHY=y 93CONFIG_MICREL_PHY=y
95# CONFIG_WLAN is not set 94CONFIG_RTL8187=m
95CONFIG_LIBERTAS=m
96CONFIG_LIBERTAS_SDIO=m
97CONFIG_LIBERTAS_SPI=m
98CONFIG_RT2X00=m
99CONFIG_RT2500USB=m
100CONFIG_RT73USB=m
101CONFIG_RT2800USB=m
102CONFIG_RT2800USB_RT53XX=y
103CONFIG_RT2800USB_RT55XX=y
104CONFIG_RT2800USB_UNKNOWN=y
105CONFIG_RTLWIFI=m
106# CONFIG_RTLWIFI_DEBUG is not set
107CONFIG_RTL8192CU=m
108CONFIG_MWIFIEX=m
109CONFIG_MWIFIEX_SDIO=m
110CONFIG_MWIFIEX_USB=m
96CONFIG_INPUT_POLLDEV=y 111CONFIG_INPUT_POLLDEV=y
97# CONFIG_INPUT_MOUSEDEV_PSAUX is not set 112# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
98CONFIG_INPUT_MOUSEDEV_SCREEN_X=480 113CONFIG_INPUT_MOUSEDEV_SCREEN_X=480
@@ -112,13 +127,11 @@ CONFIG_I2C=y
112CONFIG_I2C_GPIO=y 127CONFIG_I2C_GPIO=y
113CONFIG_SPI=y 128CONFIG_SPI=y
114CONFIG_SPI_ATMEL=y 129CONFIG_SPI_ATMEL=y
115CONFIG_PINCTRL_AT91=y
116# CONFIG_HWMON is not set 130# CONFIG_HWMON is not set
117CONFIG_WATCHDOG=y 131CONFIG_WATCHDOG=y
118CONFIG_AT91SAM9X_WATCHDOG=y 132CONFIG_AT91SAM9X_WATCHDOG=y
119CONFIG_SSB=m 133CONFIG_SSB=m
120CONFIG_FB=y 134CONFIG_FB=y
121CONFIG_FB_MODE_HELPERS=y
122CONFIG_FB_ATMEL=y 135CONFIG_FB_ATMEL=y
123CONFIG_BACKLIGHT_LCD_SUPPORT=y 136CONFIG_BACKLIGHT_LCD_SUPPORT=y
124# CONFIG_LCD_CLASS_DEVICE is not set 137# CONFIG_LCD_CLASS_DEVICE is not set
@@ -132,11 +145,8 @@ CONFIG_FONT_8x8=y
132CONFIG_FONT_ACORN_8x8=y 145CONFIG_FONT_ACORN_8x8=y
133CONFIG_FONT_MINI_4x6=y 146CONFIG_FONT_MINI_4x6=y
134CONFIG_LOGO=y 147CONFIG_LOGO=y
135# CONFIG_HID_SUPPORT is not set
136CONFIG_USB=y 148CONFIG_USB=y
137CONFIG_USB_ANNOUNCE_NEW_DEVICES=y 149CONFIG_USB_ANNOUNCE_NEW_DEVICES=y
138CONFIG_USB_DEVICEFS=y
139# CONFIG_USB_DEVICE_CLASS is not set
140CONFIG_USB_EHCI_HCD=y 150CONFIG_USB_EHCI_HCD=y
141CONFIG_USB_OHCI_HCD=y 151CONFIG_USB_OHCI_HCD=y
142CONFIG_USB_ACM=y 152CONFIG_USB_ACM=y
@@ -146,16 +156,12 @@ CONFIG_USB_SERIAL_GENERIC=y
146CONFIG_USB_SERIAL_FTDI_SIO=y 156CONFIG_USB_SERIAL_FTDI_SIO=y
147CONFIG_USB_SERIAL_PL2303=y 157CONFIG_USB_SERIAL_PL2303=y
148CONFIG_USB_GADGET=y 158CONFIG_USB_GADGET=y
149CONFIG_USB_AT91=m 159CONFIG_USB_AT91=y
150CONFIG_USB_ATMEL_USBA=m 160CONFIG_USB_ATMEL_USBA=y
151CONFIG_USB_ETH=m 161CONFIG_USB_G_SERIAL=y
152CONFIG_USB_GADGETFS=m
153CONFIG_USB_CDC_COMPOSITE=m
154CONFIG_USB_G_ACM_MS=m
155CONFIG_USB_G_MULTI=m
156CONFIG_USB_G_MULTI_CDC=y
157CONFIG_MMC=y 162CONFIG_MMC=y
158CONFIG_MMC_ATMELMCI=y 163CONFIG_MMC_ATMELMCI=y
164CONFIG_MMC_SPI=y
159CONFIG_NEW_LEDS=y 165CONFIG_NEW_LEDS=y
160CONFIG_LEDS_CLASS=y 166CONFIG_LEDS_CLASS=y
161CONFIG_LEDS_GPIO=y 167CONFIG_LEDS_GPIO=y
@@ -164,20 +170,23 @@ CONFIG_LEDS_TRIGGER_TIMER=y
164CONFIG_LEDS_TRIGGER_HEARTBEAT=y 170CONFIG_LEDS_TRIGGER_HEARTBEAT=y
165CONFIG_LEDS_TRIGGER_GPIO=y 171CONFIG_LEDS_TRIGGER_GPIO=y
166CONFIG_RTC_CLASS=y 172CONFIG_RTC_CLASS=y
173CONFIG_RTC_DRV_RV3029C2=y
167CONFIG_RTC_DRV_AT91RM9200=y 174CONFIG_RTC_DRV_AT91RM9200=y
168CONFIG_RTC_DRV_AT91SAM9=y 175CONFIG_RTC_DRV_AT91SAM9=y
169CONFIG_DMADEVICES=y 176CONFIG_DMADEVICES=y
170# CONFIG_IOMMU_SUPPORT is not set 177# CONFIG_IOMMU_SUPPORT is not set
171CONFIG_EXT2_FS=y 178CONFIG_EXT4_FS=y
172CONFIG_FANOTIFY=y 179CONFIG_FANOTIFY=y
173CONFIG_VFAT_FS=y 180CONFIG_VFAT_FS=y
174CONFIG_TMPFS=y 181CONFIG_TMPFS=y
182CONFIG_UBIFS_FS=y
183CONFIG_UBIFS_FS_ADVANCED_COMPR=y
175CONFIG_NFS_FS=y 184CONFIG_NFS_FS=y
176CONFIG_NFS_V3=y
177CONFIG_ROOT_NFS=y 185CONFIG_ROOT_NFS=y
178CONFIG_NLS_CODEPAGE_437=y 186CONFIG_NLS_CODEPAGE_437=y
179CONFIG_NLS_CODEPAGE_850=y 187CONFIG_NLS_CODEPAGE_850=y
180CONFIG_NLS_ISO8859_1=y 188CONFIG_NLS_ISO8859_1=y
189CONFIG_NLS_UTF8=y
181CONFIG_STRIP_ASM_SYMS=y 190CONFIG_STRIP_ASM_SYMS=y
182CONFIG_DEBUG_FS=y 191CONFIG_DEBUG_FS=y
183# CONFIG_SCHED_DEBUG is not set 192# CONFIG_SCHED_DEBUG is not set
@@ -192,7 +201,7 @@ CONFIG_CRYPTO_ARC4=y
192CONFIG_CRYPTO_USER_API_HASH=m 201CONFIG_CRYPTO_USER_API_HASH=m
193CONFIG_CRYPTO_USER_API_SKCIPHER=m 202CONFIG_CRYPTO_USER_API_SKCIPHER=m
194# CONFIG_CRYPTO_HW is not set 203# CONFIG_CRYPTO_HW is not set
195CONFIG_CRC_CCITT=m 204CONFIG_CRC_CCITT=y
196CONFIG_CRC_ITU_T=m 205CONFIG_CRC_ITU_T=y
197CONFIG_CRC7=m 206CONFIG_CRC7=m
198CONFIG_AVERAGE=y 207CONFIG_AVERAGE=y
diff --git a/arch/arm/configs/at91rm9200_defconfig b/arch/arm/configs/at91rm9200_defconfig
index 4ae57a34a582..75502c4d222c 100644
--- a/arch/arm/configs/at91rm9200_defconfig
+++ b/arch/arm/configs/at91rm9200_defconfig
@@ -1,10 +1,12 @@
1CONFIG_EXPERIMENTAL=y
2# CONFIG_LOCALVERSION_AUTO is not set 1# CONFIG_LOCALVERSION_AUTO is not set
3# CONFIG_SWAP is not set 2# CONFIG_SWAP is not set
4CONFIG_SYSVIPC=y 3CONFIG_SYSVIPC=y
4CONFIG_NO_HZ=y
5CONFIG_HIGH_RES_TIMERS=y
5CONFIG_IKCONFIG=y 6CONFIG_IKCONFIG=y
6CONFIG_IKCONFIG_PROC=y 7CONFIG_IKCONFIG_PROC=y
7CONFIG_LOG_BUF_SHIFT=14 8CONFIG_LOG_BUF_SHIFT=14
9CONFIG_USER_NS=y
8CONFIG_BLK_DEV_INITRD=y 10CONFIG_BLK_DEV_INITRD=y
9CONFIG_MODULES=y 11CONFIG_MODULES=y
10CONFIG_MODULE_FORCE_LOAD=y 12CONFIG_MODULE_FORCE_LOAD=y
@@ -16,7 +18,6 @@ CONFIG_MODULE_SRCVERSION_ALL=y
16CONFIG_ARCH_AT91=y 18CONFIG_ARCH_AT91=y
17CONFIG_ARCH_AT91RM9200=y 19CONFIG_ARCH_AT91RM9200=y
18CONFIG_MACH_ONEARM=y 20CONFIG_MACH_ONEARM=y
19CONFIG_ARCH_AT91RM9200DK=y
20CONFIG_MACH_AT91RM9200EK=y 21CONFIG_MACH_AT91RM9200EK=y
21CONFIG_MACH_CSB337=y 22CONFIG_MACH_CSB337=y
22CONFIG_MACH_CSB637=y 23CONFIG_MACH_CSB637=y
@@ -35,49 +36,37 @@ CONFIG_AT91_TIMER_HZ=100
35# CONFIG_ARM_THUMB is not set 36# CONFIG_ARM_THUMB is not set
36CONFIG_PCCARD=y 37CONFIG_PCCARD=y
37CONFIG_AT91_CF=y 38CONFIG_AT91_CF=y
38CONFIG_NO_HZ=y
39CONFIG_HIGH_RES_TIMERS=y
40CONFIG_PREEMPT=y
41CONFIG_AEABI=y 39CONFIG_AEABI=y
42CONFIG_LEDS=y 40# CONFIG_COMPACTION is not set
43CONFIG_LEDS_CPU=y
44CONFIG_ZBOOT_ROM_TEXT=0x10000000 41CONFIG_ZBOOT_ROM_TEXT=0x10000000
45CONFIG_ZBOOT_ROM_BSS=0x20040000 42CONFIG_ZBOOT_ROM_BSS=0x20040000
46CONFIG_KEXEC=y 43CONFIG_KEXEC=y
44CONFIG_AUTO_ZRELADDR=y
47CONFIG_FPE_NWFPE=y 45CONFIG_FPE_NWFPE=y
48CONFIG_BINFMT_MISC=y 46CONFIG_BINFMT_MISC=y
49CONFIG_NET=y 47CONFIG_NET=y
50CONFIG_PACKET=y 48CONFIG_PACKET=y
51CONFIG_UNIX=y 49CONFIG_UNIX=y
52CONFIG_XFRM_USER=m
53CONFIG_INET=y 50CONFIG_INET=y
54CONFIG_IP_MULTICAST=y 51CONFIG_IP_MULTICAST=y
55CONFIG_IP_PNP=y 52CONFIG_IP_PNP=y
56CONFIG_IP_PNP_DHCP=y 53CONFIG_IP_PNP_DHCP=y
57CONFIG_IP_PNP_BOOTP=y 54CONFIG_IP_PNP_BOOTP=y
58CONFIG_NET_IPIP=m 55# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
59CONFIG_INET_AH=m 56# CONFIG_INET_XFRM_MODE_TUNNEL is not set
60CONFIG_INET_ESP=m 57# CONFIG_INET_XFRM_MODE_BEET is not set
61CONFIG_INET_IPCOMP=m 58# CONFIG_INET_DIAG is not set
62CONFIG_INET_XFRM_MODE_TRANSPORT=m 59CONFIG_IPV6=y
63CONFIG_INET_XFRM_MODE_TUNNEL=m
64CONFIG_INET_XFRM_MODE_BEET=m
65CONFIG_IPV6_PRIVACY=y 60CONFIG_IPV6_PRIVACY=y
66CONFIG_IPV6_ROUTER_PREF=y 61CONFIG_IPV6_ROUTER_PREF=y
67CONFIG_IPV6_ROUTE_INFO=y 62CONFIG_IPV6_ROUTE_INFO=y
68CONFIG_INET6_AH=m
69CONFIG_INET6_ESP=m
70CONFIG_INET6_IPCOMP=m
71CONFIG_IPV6_MIP6=m
72CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION=m
73CONFIG_IPV6_TUNNEL=m
74CONFIG_BRIDGE=m
75CONFIG_VLAN_8021Q=m
76CONFIG_BT=m
77CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" 63CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
64CONFIG_DEVTMPFS=y
65CONFIG_DEVTMPFS_MOUNT=y
66# CONFIG_STANDALONE is not set
67# CONFIG_PREVENT_FIRMWARE_BUILD is not set
78CONFIG_MTD=y 68CONFIG_MTD=y
79CONFIG_MTD_CMDLINE_PARTS=y 69CONFIG_MTD_CMDLINE_PARTS=y
80CONFIG_MTD_AFS_PARTS=y
81CONFIG_MTD_CHAR=y 70CONFIG_MTD_CHAR=y
82CONFIG_MTD_BLOCK=y 71CONFIG_MTD_BLOCK=y
83CONFIG_MTD_CFI=y 72CONFIG_MTD_CFI=y
@@ -94,55 +83,21 @@ CONFIG_MTD_NAND_PLATFORM=y
94CONFIG_MTD_UBI=y 83CONFIG_MTD_UBI=y
95CONFIG_MTD_UBI_GLUEBI=y 84CONFIG_MTD_UBI_GLUEBI=y
96CONFIG_BLK_DEV_LOOP=y 85CONFIG_BLK_DEV_LOOP=y
97CONFIG_BLK_DEV_NBD=y
98CONFIG_BLK_DEV_RAM=y 86CONFIG_BLK_DEV_RAM=y
99CONFIG_BLK_DEV_RAM_SIZE=8192 87CONFIG_BLK_DEV_RAM_SIZE=8192
100CONFIG_SCSI=y
101CONFIG_BLK_DEV_SD=y
102CONFIG_BLK_DEV_SR=m
103CONFIG_BLK_DEV_SR_VENDOR=y
104CONFIG_CHR_DEV_SG=m
105CONFIG_SCSI_MULTI_LUN=y
106# CONFIG_SCSI_LOWLEVEL is not set
107CONFIG_NETDEVICES=y 88CONFIG_NETDEVICES=y
108CONFIG_TUN=m 89CONFIG_MII=y
109CONFIG_ARM_AT91_ETHER=y 90CONFIG_ARM_AT91_ETHER=y
110CONFIG_PHYLIB=y
111CONFIG_DAVICOM_PHY=y 91CONFIG_DAVICOM_PHY=y
112CONFIG_SMSC_PHY=y 92CONFIG_SMSC_PHY=y
113CONFIG_MICREL_PHY=y 93CONFIG_MICREL_PHY=y
114CONFIG_PPP=y 94# CONFIG_WLAN is not set
115CONFIG_PPP_BSDCOMP=y 95# CONFIG_INPUT_MOUSEDEV is not set
116CONFIG_PPP_DEFLATE=y
117CONFIG_PPP_FILTER=y
118CONFIG_PPP_MPPE=m
119CONFIG_PPP_MULTILINK=y
120CONFIG_PPPOE=m
121CONFIG_PPP_ASYNC=y
122CONFIG_SLIP=m
123CONFIG_SLIP_COMPRESSED=y
124CONFIG_SLIP_SMART=y
125CONFIG_SLIP_MODE_SLIP6=y
126CONFIG_USB_CATC=m
127CONFIG_USB_KAWETH=m
128CONFIG_USB_PEGASUS=m
129CONFIG_USB_RTL8150=m
130CONFIG_USB_USBNET=m
131CONFIG_USB_NET_DM9601=m
132CONFIG_USB_NET_GL620A=m
133CONFIG_USB_NET_PLUSB=m
134CONFIG_USB_NET_RNDIS_HOST=m
135CONFIG_USB_ALI_M5632=y
136CONFIG_USB_AN2720=y
137CONFIG_USB_EPSON2888=y
138# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
139CONFIG_INPUT_MOUSEDEV_SCREEN_X=640
140CONFIG_INPUT_MOUSEDEV_SCREEN_Y=480
141CONFIG_INPUT_EVDEV=y 96CONFIG_INPUT_EVDEV=y
142CONFIG_KEYBOARD_GPIO=y 97CONFIG_KEYBOARD_GPIO=y
143# CONFIG_INPUT_MOUSE is not set 98# CONFIG_INPUT_MOUSE is not set
144CONFIG_INPUT_TOUCHSCREEN=y 99CONFIG_INPUT_TOUCHSCREEN=y
145CONFIG_LEGACY_PTY_COUNT=32 100# CONFIG_LEGACY_PTYS is not set
146CONFIG_SERIAL_ATMEL=y 101CONFIG_SERIAL_ATMEL=y
147CONFIG_SERIAL_ATMEL_CONSOLE=y 102CONFIG_SERIAL_ATMEL_CONSOLE=y
148CONFIG_HW_RANDOM=y 103CONFIG_HW_RANDOM=y
@@ -151,38 +106,8 @@ CONFIG_I2C_CHARDEV=y
151CONFIG_I2C_GPIO=y 106CONFIG_I2C_GPIO=y
152CONFIG_SPI=y 107CONFIG_SPI=y
153CONFIG_SPI_ATMEL=y 108CONFIG_SPI_ATMEL=y
154CONFIG_SPI_BITBANG=y
155CONFIG_GPIO_SYSFS=y 109CONFIG_GPIO_SYSFS=y
156CONFIG_HWMON=m 110# CONFIG_HWMON is not set
157CONFIG_SENSORS_ADM1021=m
158CONFIG_SENSORS_ADM1025=m
159CONFIG_SENSORS_ADM1026=m
160CONFIG_SENSORS_ADM1029=m
161CONFIG_SENSORS_ADM1031=m
162CONFIG_SENSORS_ADM9240=m
163CONFIG_SENSORS_DS1621=m
164CONFIG_SENSORS_GL518SM=m
165CONFIG_SENSORS_GL520SM=m
166CONFIG_SENSORS_IT87=m
167CONFIG_SENSORS_LM63=m
168CONFIG_SENSORS_LM73=m
169CONFIG_SENSORS_LM75=m
170CONFIG_SENSORS_LM77=m
171CONFIG_SENSORS_LM78=m
172CONFIG_SENSORS_LM80=m
173CONFIG_SENSORS_LM83=m
174CONFIG_SENSORS_LM85=m
175CONFIG_SENSORS_LM87=m
176CONFIG_SENSORS_LM90=m
177CONFIG_SENSORS_LM92=m
178CONFIG_SENSORS_MAX1619=m
179CONFIG_SENSORS_PCF8591=m
180CONFIG_SENSORS_SMSC47B397=m
181CONFIG_SENSORS_W83781D=m
182CONFIG_SENSORS_W83791D=m
183CONFIG_SENSORS_W83792D=m
184CONFIG_SENSORS_W83793=m
185CONFIG_SENSORS_W83L785TS=m
186CONFIG_WATCHDOG=y 111CONFIG_WATCHDOG=y
187CONFIG_WATCHDOG_NOWAYOUT=y 112CONFIG_WATCHDOG_NOWAYOUT=y
188CONFIG_AT91RM9200_WATCHDOG=y 113CONFIG_AT91RM9200_WATCHDOG=y
@@ -194,43 +119,14 @@ CONFIG_BACKLIGHT_LCD_SUPPORT=y
194CONFIG_LCD_CLASS_DEVICE=y 119CONFIG_LCD_CLASS_DEVICE=y
195CONFIG_BACKLIGHT_CLASS_DEVICE=y 120CONFIG_BACKLIGHT_CLASS_DEVICE=y
196# CONFIG_BACKLIGHT_GENERIC is not set 121# CONFIG_BACKLIGHT_GENERIC is not set
197CONFIG_DISPLAY_SUPPORT=y
198CONFIG_FRAMEBUFFER_CONSOLE=y 122CONFIG_FRAMEBUFFER_CONSOLE=y
199CONFIG_FONTS=y 123CONFIG_FONTS=y
200CONFIG_FONT_MINI_4x6=y
201CONFIG_LOGO=y 124CONFIG_LOGO=y
202# CONFIG_LOGO_LINUX_MONO is not set
203# CONFIG_LOGO_LINUX_VGA16 is not set
204CONFIG_USB=y 125CONFIG_USB=y
205CONFIG_USB_DEVICEFS=y
206# CONFIG_USB_DEVICE_CLASS is not set
207CONFIG_USB_MON=y
208CONFIG_USB_OHCI_HCD=y 126CONFIG_USB_OHCI_HCD=y
209CONFIG_USB_ACM=m
210CONFIG_USB_PRINTER=m
211CONFIG_USB_STORAGE=y
212CONFIG_USB_SERIAL=y
213CONFIG_USB_SERIAL_CONSOLE=y
214CONFIG_USB_SERIAL_GENERIC=y
215CONFIG_USB_SERIAL_FTDI_SIO=y
216CONFIG_USB_SERIAL_KEYSPAN=y
217CONFIG_USB_SERIAL_KEYSPAN_MPR=y
218CONFIG_USB_SERIAL_KEYSPAN_USA28=y
219CONFIG_USB_SERIAL_KEYSPAN_USA28X=y
220CONFIG_USB_SERIAL_KEYSPAN_USA28XA=y
221CONFIG_USB_SERIAL_KEYSPAN_USA28XB=y
222CONFIG_USB_SERIAL_KEYSPAN_USA19=y
223CONFIG_USB_SERIAL_KEYSPAN_USA18X=y
224CONFIG_USB_SERIAL_KEYSPAN_USA19W=y
225CONFIG_USB_SERIAL_KEYSPAN_USA19QW=y
226CONFIG_USB_SERIAL_KEYSPAN_USA19QI=y
227CONFIG_USB_SERIAL_KEYSPAN_USA49W=y
228CONFIG_USB_SERIAL_KEYSPAN_USA49WLC=y
229CONFIG_USB_SERIAL_MCT_U232=y
230CONFIG_USB_SERIAL_PL2303=y
231CONFIG_USB_GADGET=y 127CONFIG_USB_GADGET=y
232CONFIG_USB_ETH=m 128CONFIG_USB_AT91=y
233CONFIG_USB_MASS_STORAGE=m 129CONFIG_USB_G_SERIAL=y
234CONFIG_MMC=y 130CONFIG_MMC=y
235CONFIG_MMC_ATMELMCI=y 131CONFIG_MMC_ATMELMCI=y
236CONFIG_NEW_LEDS=y 132CONFIG_NEW_LEDS=y
@@ -240,84 +136,27 @@ CONFIG_LEDS_TRIGGERS=y
240CONFIG_LEDS_TRIGGER_TIMER=y 136CONFIG_LEDS_TRIGGER_TIMER=y
241CONFIG_LEDS_TRIGGER_HEARTBEAT=y 137CONFIG_LEDS_TRIGGER_HEARTBEAT=y
242CONFIG_LEDS_TRIGGER_GPIO=y 138CONFIG_LEDS_TRIGGER_GPIO=y
243CONFIG_LEDS_TRIGGER_DEFAULT_ON=y
244CONFIG_RTC_CLASS=y 139CONFIG_RTC_CLASS=y
245# CONFIG_RTC_HCTOSYS is not set
246CONFIG_RTC_DRV_DS1307=y
247CONFIG_RTC_DRV_PCF8563=y
248CONFIG_RTC_DRV_AT91RM9200=y 140CONFIG_RTC_DRV_AT91RM9200=y
249CONFIG_EXT2_FS=y 141CONFIG_EXT4_FS=y
250CONFIG_EXT2_FS_XATTR=y
251CONFIG_EXT3_FS=y
252# CONFIG_EXT3_FS_XATTR is not set
253CONFIG_REISERFS_FS=y
254CONFIG_AUTOFS4_FS=y 142CONFIG_AUTOFS4_FS=y
255CONFIG_ISO9660_FS=y
256CONFIG_JOLIET=y
257CONFIG_ZISOFS=y
258CONFIG_UDF_FS=y
259CONFIG_MSDOS_FS=y
260CONFIG_VFAT_FS=y 143CONFIG_VFAT_FS=y
261CONFIG_NTFS_FS=m
262CONFIG_TMPFS=y 144CONFIG_TMPFS=y
263CONFIG_CONFIGFS_FS=y 145CONFIG_UBIFS_FS=y
264CONFIG_JFFS2_FS=y 146CONFIG_UBIFS_FS_ADVANCED_COMPR=y
265CONFIG_JFFS2_SUMMARY=y
266CONFIG_JFFS2_COMPRESSION_OPTIONS=y
267CONFIG_JFFS2_LZO=y
268CONFIG_JFFS2_RUBIN=y
269CONFIG_CRAMFS=y
270CONFIG_MINIX_FS=y
271CONFIG_NFS_FS=y 147CONFIG_NFS_FS=y
272CONFIG_NFS_V3=y
273CONFIG_NFS_V3_ACL=y
274CONFIG_NFS_V4=y
275CONFIG_ROOT_NFS=y 148CONFIG_ROOT_NFS=y
276CONFIG_NFSD=y
277CONFIG_CIFS=m
278CONFIG_PARTITION_ADVANCED=y
279CONFIG_MAC_PARTITION=y
280CONFIG_NLS_CODEPAGE_437=y 149CONFIG_NLS_CODEPAGE_437=y
281CONFIG_NLS_CODEPAGE_737=m 150CONFIG_NLS_CODEPAGE_850=y
282CONFIG_NLS_CODEPAGE_775=m
283CONFIG_NLS_CODEPAGE_850=m
284CONFIG_NLS_CODEPAGE_852=m
285CONFIG_NLS_CODEPAGE_855=m
286CONFIG_NLS_CODEPAGE_857=m
287CONFIG_NLS_CODEPAGE_860=m
288CONFIG_NLS_CODEPAGE_861=m
289CONFIG_NLS_CODEPAGE_862=m
290CONFIG_NLS_CODEPAGE_863=m
291CONFIG_NLS_CODEPAGE_864=m
292CONFIG_NLS_CODEPAGE_865=m
293CONFIG_NLS_CODEPAGE_866=m
294CONFIG_NLS_CODEPAGE_869=m
295CONFIG_NLS_CODEPAGE_936=m
296CONFIG_NLS_CODEPAGE_950=m
297CONFIG_NLS_CODEPAGE_932=m
298CONFIG_NLS_CODEPAGE_949=m
299CONFIG_NLS_CODEPAGE_874=m
300CONFIG_NLS_ISO8859_8=m
301CONFIG_NLS_CODEPAGE_1250=m
302CONFIG_NLS_CODEPAGE_1251=m
303CONFIG_NLS_ASCII=m
304CONFIG_NLS_ISO8859_1=y 151CONFIG_NLS_ISO8859_1=y
305CONFIG_NLS_ISO8859_2=m
306CONFIG_NLS_ISO8859_3=m
307CONFIG_NLS_ISO8859_4=m
308CONFIG_NLS_ISO8859_5=m
309CONFIG_NLS_ISO8859_6=m
310CONFIG_NLS_ISO8859_7=m
311CONFIG_NLS_ISO8859_9=m
312CONFIG_NLS_ISO8859_13=m
313CONFIG_NLS_ISO8859_14=m
314CONFIG_NLS_ISO8859_15=m
315CONFIG_NLS_KOI8_R=m
316CONFIG_NLS_KOI8_U=m
317CONFIG_NLS_UTF8=y 152CONFIG_NLS_UTF8=y
318CONFIG_MAGIC_SYSRQ=y 153CONFIG_MAGIC_SYSRQ=y
319CONFIG_DEBUG_FS=y 154CONFIG_DEBUG_FS=y
320CONFIG_DEBUG_KERNEL=y 155CONFIG_DEBUG_KERNEL=y
321# CONFIG_FTRACE is not set 156# CONFIG_FTRACE is not set
157CONFIG_DEBUG_USER=y
158CONFIG_DEBUG_LL=y
159CONFIG_EARLY_PRINTK=y
322CONFIG_CRYPTO_PCBC=y 160CONFIG_CRYPTO_PCBC=y
323CONFIG_CRYPTO_SHA1=y 161CONFIG_CRYPTO_SHA1=y
162CONFIG_XZ_DEC_ARMTHUMB=y
diff --git a/arch/arm/configs/at91sam9g20_defconfig b/arch/arm/configs/at91sam9260_9g20_defconfig
index 892e8287ed73..69b6928d3d9d 100644
--- a/arch/arm/configs/at91sam9g20_defconfig
+++ b/arch/arm/configs/at91sam9260_9g20_defconfig
@@ -1,4 +1,3 @@
1CONFIG_EXPERIMENTAL=y
2# CONFIG_LOCALVERSION_AUTO is not set 1# CONFIG_LOCALVERSION_AUTO is not set
3# CONFIG_SWAP is not set 2# CONFIG_SWAP is not set
4CONFIG_SYSVIPC=y 3CONFIG_SYSVIPC=y
@@ -11,7 +10,14 @@ CONFIG_MODULE_UNLOAD=y
11# CONFIG_IOSCHED_DEADLINE is not set 10# CONFIG_IOSCHED_DEADLINE is not set
12# CONFIG_IOSCHED_CFQ is not set 11# CONFIG_IOSCHED_CFQ is not set
13CONFIG_ARCH_AT91=y 12CONFIG_ARCH_AT91=y
14CONFIG_ARCH_AT91SAM9G20=y 13CONFIG_ARCH_AT91SAM9260=y
14CONFIG_MACH_AT91SAM9260EK=y
15CONFIG_MACH_CAM60=y
16CONFIG_MACH_SAM9_L9260=y
17CONFIG_MACH_AFEB9260=y
18CONFIG_MACH_QIL_A9260=y
19CONFIG_MACH_CPU9260=y
20CONFIG_MACH_FLEXIBITY=y
15CONFIG_MACH_AT91SAM9G20EK=y 21CONFIG_MACH_AT91SAM9G20EK=y
16CONFIG_MACH_AT91SAM9G20EK_2MMC=y 22CONFIG_MACH_AT91SAM9G20EK_2MMC=y
17CONFIG_MACH_CPU9G20=y 23CONFIG_MACH_CPU9G20=y
@@ -20,10 +26,10 @@ CONFIG_MACH_PORTUXG20=y
20CONFIG_MACH_STAMP9G20=y 26CONFIG_MACH_STAMP9G20=y
21CONFIG_MACH_PCONTROL_G20=y 27CONFIG_MACH_PCONTROL_G20=y
22CONFIG_MACH_GSIA18S=y 28CONFIG_MACH_GSIA18S=y
23CONFIG_MACH_USB_A9G20=y
24CONFIG_MACH_SNAPPER_9260=y 29CONFIG_MACH_SNAPPER_9260=y
25CONFIG_MACH_AT91SAM9_DT=y 30CONFIG_MACH_AT91SAM9_DT=y
26CONFIG_AT91_PROGRAMMABLE_CLOCKS=y 31CONFIG_AT91_PROGRAMMABLE_CLOCKS=y
32CONFIG_AT91_SLOW_CLOCK=y
27# CONFIG_ARM_THUMB is not set 33# CONFIG_ARM_THUMB is not set
28CONFIG_AEABI=y 34CONFIG_AEABI=y
29CONFIG_LEDS=y 35CONFIG_LEDS=y
@@ -33,12 +39,14 @@ CONFIG_ZBOOT_ROM_BSS=0x0
33CONFIG_ARM_APPENDED_DTB=y 39CONFIG_ARM_APPENDED_DTB=y
34CONFIG_ARM_ATAG_DTB_COMPAT=y 40CONFIG_ARM_ATAG_DTB_COMPAT=y
35CONFIG_CMDLINE="mem=64M console=ttyS0,115200 initrd=0x21100000,3145728 root=/dev/ram0 rw" 41CONFIG_CMDLINE="mem=64M console=ttyS0,115200 initrd=0x21100000,3145728 root=/dev/ram0 rw"
42CONFIG_AUTO_ZRELADDR=y
36CONFIG_FPE_NWFPE=y 43CONFIG_FPE_NWFPE=y
37CONFIG_NET=y 44CONFIG_NET=y
38CONFIG_PACKET=y 45CONFIG_PACKET=y
39CONFIG_UNIX=y 46CONFIG_UNIX=y
40CONFIG_INET=y 47CONFIG_INET=y
41CONFIG_IP_PNP=y 48CONFIG_IP_PNP=y
49CONFIG_IP_PNP_DHCP=y
42CONFIG_IP_PNP_BOOTP=y 50CONFIG_IP_PNP_BOOTP=y
43# CONFIG_INET_XFRM_MODE_TRANSPORT is not set 51# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
44# CONFIG_INET_XFRM_MODE_TUNNEL is not set 52# CONFIG_INET_XFRM_MODE_TUNNEL is not set
@@ -46,8 +54,11 @@ CONFIG_IP_PNP_BOOTP=y
46# CONFIG_INET_LRO is not set 54# CONFIG_INET_LRO is not set
47# CONFIG_IPV6 is not set 55# CONFIG_IPV6 is not set
48CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" 56CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
57CONFIG_DEVTMPFS=y
58CONFIG_DEVTMPFS_MOUNT=y
49CONFIG_MTD=y 59CONFIG_MTD=y
50CONFIG_MTD_CMDLINE_PARTS=y 60CONFIG_MTD_CMDLINE_PARTS=y
61CONFIG_MTD_OF_PARTS=y
51CONFIG_MTD_CHAR=y 62CONFIG_MTD_CHAR=y
52CONFIG_MTD_BLOCK=y 63CONFIG_MTD_BLOCK=y
53CONFIG_MTD_DATAFLASH=y 64CONFIG_MTD_DATAFLASH=y
@@ -56,6 +67,8 @@ CONFIG_MTD_NAND_ATMEL=y
56CONFIG_BLK_DEV_LOOP=y 67CONFIG_BLK_DEV_LOOP=y
57CONFIG_BLK_DEV_RAM=y 68CONFIG_BLK_DEV_RAM=y
58CONFIG_BLK_DEV_RAM_SIZE=8192 69CONFIG_BLK_DEV_RAM_SIZE=8192
70CONFIG_MISC_DEVICES=y
71CONFIG_EEPROM_AT25=y
59CONFIG_SCSI=y 72CONFIG_SCSI=y
60CONFIG_BLK_DEV_SD=y 73CONFIG_BLK_DEV_SD=y
61CONFIG_SCSI_MULTI_LUN=y 74CONFIG_SCSI_MULTI_LUN=y
@@ -63,23 +76,36 @@ CONFIG_SCSI_MULTI_LUN=y
63CONFIG_NETDEVICES=y 76CONFIG_NETDEVICES=y
64CONFIG_MII=y 77CONFIG_MII=y
65CONFIG_MACB=y 78CONFIG_MACB=y
79# CONFIG_NET_VENDOR_BROADCOM is not set
80# CONFIG_NET_VENDOR_CHELSIO is not set
81# CONFIG_NET_VENDOR_FARADAY is not set
82# CONFIG_NET_VENDOR_INTEL is not set
83# CONFIG_NET_VENDOR_MARVELL is not set
84# CONFIG_NET_VENDOR_MICREL is not set
85# CONFIG_NET_VENDOR_MICROCHIP is not set
86# CONFIG_NET_VENDOR_NATSEMI is not set
87# CONFIG_NET_VENDOR_SEEQ is not set
88# CONFIG_NET_VENDOR_SMSC is not set
89# CONFIG_NET_VENDOR_STMICRO is not set
90CONFIG_SMSC_PHY=y
66# CONFIG_INPUT_MOUSEDEV_PSAUX is not set 91# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
67CONFIG_INPUT_MOUSEDEV_SCREEN_X=320
68CONFIG_INPUT_MOUSEDEV_SCREEN_Y=240
69CONFIG_INPUT_EVDEV=y
70# CONFIG_KEYBOARD_ATKBD is not set
71CONFIG_KEYBOARD_GPIO=y 92CONFIG_KEYBOARD_GPIO=y
72# CONFIG_INPUT_MOUSE is not set 93# CONFIG_INPUT_MOUSE is not set
73CONFIG_LEGACY_PTY_COUNT=16 94# CONFIG_SERIO is not set
74CONFIG_SERIAL_ATMEL=y 95CONFIG_SERIAL_ATMEL=y
75CONFIG_SERIAL_ATMEL_CONSOLE=y 96CONFIG_SERIAL_ATMEL_CONSOLE=y
76CONFIG_HW_RANDOM=y 97CONFIG_HW_RANDOM=y
77CONFIG_I2C=y 98CONFIG_I2C=y
99CONFIG_I2C_CHARDEV=y
78CONFIG_I2C_GPIO=y 100CONFIG_I2C_GPIO=y
79CONFIG_SPI=y 101CONFIG_SPI=y
80CONFIG_SPI_ATMEL=y 102CONFIG_SPI_ATMEL=y
81CONFIG_SPI_SPIDEV=y 103CONFIG_SPI_SPIDEV=y
104CONFIG_GPIO_SYSFS=y
82# CONFIG_HWMON is not set 105# CONFIG_HWMON is not set
106CONFIG_WATCHDOG=y
107CONFIG_WATCHDOG_NOWAYOUT=y
108CONFIG_AT91SAM9X_WATCHDOG=y
83CONFIG_SOUND=y 109CONFIG_SOUND=y
84CONFIG_SND=y 110CONFIG_SND=y
85CONFIG_SND_SEQUENCER=y 111CONFIG_SND_SEQUENCER=y
@@ -94,12 +120,11 @@ CONFIG_USB_MON=y
94CONFIG_USB_OHCI_HCD=y 120CONFIG_USB_OHCI_HCD=y
95CONFIG_USB_STORAGE=y 121CONFIG_USB_STORAGE=y
96CONFIG_USB_GADGET=y 122CONFIG_USB_GADGET=y
97CONFIG_USB_ZERO=m 123CONFIG_USB_AT91=y
98CONFIG_USB_GADGETFS=m 124CONFIG_USB_G_SERIAL=y
99CONFIG_USB_MASS_STORAGE=m
100CONFIG_USB_G_SERIAL=m
101CONFIG_MMC=y 125CONFIG_MMC=y
102CONFIG_MMC_ATMELMCI=m 126CONFIG_MMC_ATMELMCI=y
127CONFIG_MMC_SPI=y
103CONFIG_NEW_LEDS=y 128CONFIG_NEW_LEDS=y
104CONFIG_LEDS_CLASS=y 129CONFIG_LEDS_CLASS=y
105CONFIG_LEDS_GPIO=y 130CONFIG_LEDS_GPIO=y
@@ -109,15 +134,12 @@ CONFIG_LEDS_TRIGGER_HEARTBEAT=y
109CONFIG_RTC_CLASS=y 134CONFIG_RTC_CLASS=y
110CONFIG_RTC_DRV_RV3029C2=y 135CONFIG_RTC_DRV_RV3029C2=y
111CONFIG_RTC_DRV_AT91SAM9=y 136CONFIG_RTC_DRV_AT91SAM9=y
112CONFIG_EXT2_FS=y 137CONFIG_EXT4_FS=y
113CONFIG_MSDOS_FS=y
114CONFIG_VFAT_FS=y 138CONFIG_VFAT_FS=y
115CONFIG_TMPFS=y 139CONFIG_TMPFS=y
116CONFIG_JFFS2_FS=y 140CONFIG_UBIFS_FS=y
117CONFIG_JFFS2_SUMMARY=y 141CONFIG_UBIFS_FS_ADVANCED_COMPR=y
118CONFIG_CRAMFS=y
119CONFIG_NFS_FS=y 142CONFIG_NFS_FS=y
120CONFIG_NFS_V3=y
121CONFIG_ROOT_NFS=y 143CONFIG_ROOT_NFS=y
122CONFIG_NLS_CODEPAGE_437=y 144CONFIG_NLS_CODEPAGE_437=y
123CONFIG_NLS_CODEPAGE_850=y 145CONFIG_NLS_CODEPAGE_850=y
@@ -125,3 +147,9 @@ CONFIG_NLS_ISO8859_1=y
125CONFIG_NLS_ISO8859_15=y 147CONFIG_NLS_ISO8859_15=y
126CONFIG_NLS_UTF8=y 148CONFIG_NLS_UTF8=y
127# CONFIG_ENABLE_WARN_DEPRECATED is not set 149# CONFIG_ENABLE_WARN_DEPRECATED is not set
150CONFIG_DEBUG_KERNEL=y
151CONFIG_DEBUG_INFO=y
152# CONFIG_FTRACE is not set
153CONFIG_DEBUG_LL=y
154CONFIG_AT91_DEBUG_LL_DBGU0=y
155CONFIG_EARLY_PRINTK=y
diff --git a/arch/arm/configs/at91sam9260_defconfig b/arch/arm/configs/at91sam9260_defconfig
deleted file mode 100644
index 05618eb694f8..000000000000
--- a/arch/arm/configs/at91sam9260_defconfig
+++ /dev/null
@@ -1,91 +0,0 @@
1CONFIG_EXPERIMENTAL=y
2# CONFIG_LOCALVERSION_AUTO is not set
3# CONFIG_SWAP is not set
4CONFIG_SYSVIPC=y
5CONFIG_LOG_BUF_SHIFT=14
6CONFIG_BLK_DEV_INITRD=y
7CONFIG_SLAB=y
8CONFIG_MODULES=y
9CONFIG_MODULE_UNLOAD=y
10# CONFIG_BLK_DEV_BSG is not set
11# CONFIG_IOSCHED_DEADLINE is not set
12# CONFIG_IOSCHED_CFQ is not set
13CONFIG_ARCH_AT91=y
14CONFIG_ARCH_AT91SAM9260=y
15CONFIG_ARCH_AT91SAM9260_SAM9XE=y
16CONFIG_MACH_AT91SAM9260EK=y
17CONFIG_MACH_CAM60=y
18CONFIG_MACH_SAM9_L9260=y
19CONFIG_MACH_AFEB9260=y
20CONFIG_MACH_USB_A9260=y
21CONFIG_MACH_QIL_A9260=y
22CONFIG_MACH_CPU9260=y
23CONFIG_MACH_FLEXIBITY=y
24CONFIG_MACH_SNAPPER_9260=y
25CONFIG_MACH_AT91SAM9_DT=y
26CONFIG_AT91_PROGRAMMABLE_CLOCKS=y
27# CONFIG_ARM_THUMB is not set
28CONFIG_ZBOOT_ROM_TEXT=0x0
29CONFIG_ZBOOT_ROM_BSS=0x0
30CONFIG_ARM_APPENDED_DTB=y
31CONFIG_ARM_ATAG_DTB_COMPAT=y
32CONFIG_CMDLINE="mem=64M console=ttyS0,115200 initrd=0x21100000,3145728 root=/dev/ram0 rw"
33CONFIG_FPE_NWFPE=y
34CONFIG_NET=y
35CONFIG_PACKET=y
36CONFIG_UNIX=y
37CONFIG_INET=y
38CONFIG_IP_PNP=y
39CONFIG_IP_PNP_BOOTP=y
40# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
41# CONFIG_INET_XFRM_MODE_TUNNEL is not set
42# CONFIG_INET_XFRM_MODE_BEET is not set
43# CONFIG_INET_LRO is not set
44# CONFIG_IPV6 is not set
45CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
46CONFIG_BLK_DEV_RAM=y
47CONFIG_BLK_DEV_RAM_SIZE=8192
48CONFIG_SCSI=y
49CONFIG_BLK_DEV_SD=y
50CONFIG_SCSI_MULTI_LUN=y
51CONFIG_NETDEVICES=y
52CONFIG_MII=y
53CONFIG_MACB=y
54# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
55# CONFIG_INPUT_KEYBOARD is not set
56# CONFIG_INPUT_MOUSE is not set
57# CONFIG_SERIO is not set
58CONFIG_SERIAL_ATMEL=y
59CONFIG_SERIAL_ATMEL_CONSOLE=y
60# CONFIG_HW_RANDOM is not set
61CONFIG_I2C=y
62CONFIG_I2C_CHARDEV=y
63CONFIG_I2C_GPIO=y
64# CONFIG_HWMON is not set
65CONFIG_WATCHDOG=y
66CONFIG_WATCHDOG_NOWAYOUT=y
67CONFIG_AT91SAM9X_WATCHDOG=y
68# CONFIG_USB_HID is not set
69CONFIG_USB=y
70CONFIG_USB_DEVICEFS=y
71CONFIG_USB_MON=y
72CONFIG_USB_OHCI_HCD=y
73CONFIG_USB_STORAGE=y
74CONFIG_USB_STORAGE_DEBUG=y
75CONFIG_USB_GADGET=y
76CONFIG_USB_ZERO=m
77CONFIG_USB_GADGETFS=m
78CONFIG_USB_MASS_STORAGE=m
79CONFIG_USB_G_SERIAL=m
80CONFIG_RTC_CLASS=y
81CONFIG_RTC_DRV_AT91SAM9=y
82CONFIG_EXT2_FS=y
83CONFIG_VFAT_FS=y
84CONFIG_TMPFS=y
85CONFIG_CRAMFS=y
86CONFIG_NLS_CODEPAGE_437=y
87CONFIG_NLS_CODEPAGE_850=y
88CONFIG_NLS_ISO8859_1=y
89CONFIG_DEBUG_KERNEL=y
90CONFIG_DEBUG_USER=y
91CONFIG_DEBUG_LL=y
diff --git a/arch/arm/configs/at91sam9261_defconfig b/arch/arm/configs/at91sam9261_9g10_defconfig
index c87beb973b37..9d35cd81c611 100644
--- a/arch/arm/configs/at91sam9261_defconfig
+++ b/arch/arm/configs/at91sam9261_9g10_defconfig
@@ -17,6 +17,7 @@ CONFIG_MODULE_UNLOAD=y
17CONFIG_ARCH_AT91=y 17CONFIG_ARCH_AT91=y
18CONFIG_ARCH_AT91SAM9261=y 18CONFIG_ARCH_AT91SAM9261=y
19CONFIG_MACH_AT91SAM9261EK=y 19CONFIG_MACH_AT91SAM9261EK=y
20CONFIG_MACH_AT91SAM9G10EK=y
20CONFIG_AT91_PROGRAMMABLE_CLOCKS=y 21CONFIG_AT91_PROGRAMMABLE_CLOCKS=y
21# CONFIG_ARM_THUMB is not set 22# CONFIG_ARM_THUMB is not set
22CONFIG_AEABI=y 23CONFIG_AEABI=y
@@ -38,11 +39,11 @@ CONFIG_IP_PNP_BOOTP=y
38# CONFIG_INET_LRO is not set 39# CONFIG_INET_LRO is not set
39# CONFIG_IPV6 is not set 40# CONFIG_IPV6 is not set
40CONFIG_CFG80211=y 41CONFIG_CFG80211=y
41CONFIG_LIB80211=y
42CONFIG_MAC80211=y 42CONFIG_MAC80211=y
43CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" 43CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
44CONFIG_DEVTMPFS=y
45CONFIG_DEVTMPFS_MOUNT=y
44CONFIG_MTD=y 46CONFIG_MTD=y
45CONFIG_MTD_PARTITIONS=y
46CONFIG_MTD_CMDLINE_PARTS=y 47CONFIG_MTD_CMDLINE_PARTS=y
47CONFIG_MTD_BLOCK=y 48CONFIG_MTD_BLOCK=y
48CONFIG_MTD_NAND=y 49CONFIG_MTD_NAND=y
@@ -51,17 +52,13 @@ CONFIG_MTD_UBI=y
51CONFIG_MTD_UBI_GLUEBI=y 52CONFIG_MTD_UBI_GLUEBI=y
52CONFIG_BLK_DEV_RAM=y 53CONFIG_BLK_DEV_RAM=y
53CONFIG_BLK_DEV_RAM_SIZE=8192 54CONFIG_BLK_DEV_RAM_SIZE=8192
54CONFIG_MISC_DEVICES=y
55CONFIG_ATMEL_TCLIB=y 55CONFIG_ATMEL_TCLIB=y
56CONFIG_ATMEL_SSC=y 56CONFIG_ATMEL_SSC=y
57CONFIG_SCSI=y 57CONFIG_SCSI=y
58CONFIG_BLK_DEV_SD=y 58CONFIG_BLK_DEV_SD=y
59CONFIG_SCSI_MULTI_LUN=y 59CONFIG_SCSI_MULTI_LUN=y
60CONFIG_NETDEVICES=y 60CONFIG_NETDEVICES=y
61CONFIG_NET_ETHERNET=y
62CONFIG_DM9000=y 61CONFIG_DM9000=y
63# CONFIG_NETDEV_1000 is not set
64# CONFIG_NETDEV_10000 is not set
65CONFIG_USB_ZD1201=m 62CONFIG_USB_ZD1201=m
66CONFIG_RTL8187=m 63CONFIG_RTL8187=m
67CONFIG_LIBERTAS=m 64CONFIG_LIBERTAS=m
@@ -118,15 +115,11 @@ CONFIG_SND_AT73C213=y
118CONFIG_SND_USB_AUDIO=m 115CONFIG_SND_USB_AUDIO=m
119# CONFIG_USB_HID is not set 116# CONFIG_USB_HID is not set
120CONFIG_USB=y 117CONFIG_USB=y
121CONFIG_USB_DEVICEFS=y
122CONFIG_USB_OHCI_HCD=y 118CONFIG_USB_OHCI_HCD=y
123CONFIG_USB_STORAGE=y 119CONFIG_USB_STORAGE=y
124CONFIG_USB_GADGET=y 120CONFIG_USB_GADGET=y
125CONFIG_USB_ZERO=m 121CONFIG_USB_AT91=y
126CONFIG_USB_ETH=m 122CONFIG_USB_G_SERIAL=y
127CONFIG_USB_GADGETFS=m
128CONFIG_USB_MASS_STORAGE=m
129CONFIG_USB_G_SERIAL=m
130CONFIG_MMC=y 123CONFIG_MMC=y
131CONFIG_MMC_ATMELMCI=m 124CONFIG_MMC_ATMELMCI=m
132CONFIG_NEW_LEDS=y 125CONFIG_NEW_LEDS=y
@@ -147,12 +140,10 @@ CONFIG_SQUASHFS=y
147CONFIG_SQUASHFS_LZO=y 140CONFIG_SQUASHFS_LZO=y
148CONFIG_SQUASHFS_XZ=y 141CONFIG_SQUASHFS_XZ=y
149CONFIG_NFS_FS=y 142CONFIG_NFS_FS=y
150CONFIG_NFS_V3=y
151CONFIG_ROOT_NFS=y 143CONFIG_ROOT_NFS=y
152CONFIG_NLS_CODEPAGE_437=y 144CONFIG_NLS_CODEPAGE_437=y
153CONFIG_NLS_CODEPAGE_850=y 145CONFIG_NLS_CODEPAGE_850=y
154CONFIG_NLS_ISO8859_1=y 146CONFIG_NLS_ISO8859_1=y
155CONFIG_NLS_ISO8859_15=y 147CONFIG_NLS_ISO8859_15=y
156CONFIG_NLS_UTF8=y 148CONFIG_NLS_UTF8=y
157CONFIG_FTRACE=y
158CONFIG_CRC_CCITT=m 149CONFIG_CRC_CCITT=m
diff --git a/arch/arm/configs/at91sam9263_defconfig b/arch/arm/configs/at91sam9263_defconfig
index 36fed66bd4b5..e40026364e57 100644
--- a/arch/arm/configs/at91sam9263_defconfig
+++ b/arch/arm/configs/at91sam9263_defconfig
@@ -1,6 +1,4 @@
1CONFIG_EXPERIMENTAL=y
2# CONFIG_LOCALVERSION_AUTO is not set 1# CONFIG_LOCALVERSION_AUTO is not set
3CONFIG_KERNEL_LZMA=y
4# CONFIG_SWAP is not set 2# CONFIG_SWAP is not set
5CONFIG_SYSVIPC=y 3CONFIG_SYSVIPC=y
6CONFIG_IKCONFIG=y 4CONFIG_IKCONFIG=y
@@ -17,7 +15,6 @@ CONFIG_MODULE_UNLOAD=y
17CONFIG_ARCH_AT91=y 15CONFIG_ARCH_AT91=y
18CONFIG_ARCH_AT91SAM9263=y 16CONFIG_ARCH_AT91SAM9263=y
19CONFIG_MACH_AT91SAM9263EK=y 17CONFIG_MACH_AT91SAM9263EK=y
20CONFIG_MACH_USB_A9263=y
21CONFIG_MTD_AT91_DATAFLASH_CARD=y 18CONFIG_MTD_AT91_DATAFLASH_CARD=y
22# CONFIG_ARM_THUMB is not set 19# CONFIG_ARM_THUMB is not set
23CONFIG_AEABI=y 20CONFIG_AEABI=y
@@ -48,9 +45,11 @@ CONFIG_IP_PIMSM_V2=y
48# CONFIG_INET_LRO is not set 45# CONFIG_INET_LRO is not set
49# CONFIG_INET_DIAG is not set 46# CONFIG_INET_DIAG is not set
50CONFIG_IPV6=y 47CONFIG_IPV6=y
48# CONFIG_WIRELESS is not set
51CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" 49CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
50CONFIG_DEVTMPFS=y
51CONFIG_DEVTMPFS_MOUNT=y
52CONFIG_MTD=y 52CONFIG_MTD=y
53CONFIG_MTD_PARTITIONS=y
54CONFIG_MTD_CMDLINE_PARTS=y 53CONFIG_MTD_CMDLINE_PARTS=y
55CONFIG_MTD_CHAR=y 54CONFIG_MTD_CHAR=y
56CONFIG_MTD_BLOCK=y 55CONFIG_MTD_BLOCK=y
@@ -65,7 +64,6 @@ CONFIG_MTD_UBI_GLUEBI=y
65CONFIG_BLK_DEV_LOOP=y 64CONFIG_BLK_DEV_LOOP=y
66CONFIG_BLK_DEV_RAM=y 65CONFIG_BLK_DEV_RAM=y
67CONFIG_BLK_DEV_RAM_SIZE=8192 66CONFIG_BLK_DEV_RAM_SIZE=8192
68CONFIG_MISC_DEVICES=y
69CONFIG_ATMEL_PWM=y 67CONFIG_ATMEL_PWM=y
70CONFIG_ATMEL_TCLIB=y 68CONFIG_ATMEL_TCLIB=y
71CONFIG_SCSI=y 69CONFIG_SCSI=y
@@ -73,23 +71,18 @@ CONFIG_BLK_DEV_SD=y
73CONFIG_SCSI_MULTI_LUN=y 71CONFIG_SCSI_MULTI_LUN=y
74CONFIG_NETDEVICES=y 72CONFIG_NETDEVICES=y
75CONFIG_MII=y 73CONFIG_MII=y
76CONFIG_SMSC_PHY=y
77CONFIG_NET_ETHERNET=y
78CONFIG_MACB=y 74CONFIG_MACB=y
79# CONFIG_NETDEV_1000 is not set 75CONFIG_SMSC_PHY=y
80# CONFIG_NETDEV_10000 is not set 76# CONFIG_WLAN is not set
81CONFIG_USB_ZD1201=m
82CONFIG_INPUT_POLLDEV=m 77CONFIG_INPUT_POLLDEV=m
83# CONFIG_INPUT_MOUSEDEV_PSAUX is not set 78# CONFIG_INPUT_MOUSEDEV is not set
84CONFIG_INPUT_MOUSEDEV_SCREEN_X=240
85CONFIG_INPUT_MOUSEDEV_SCREEN_Y=320
86CONFIG_INPUT_EVDEV=y 79CONFIG_INPUT_EVDEV=y
87# CONFIG_KEYBOARD_ATKBD is not set 80# CONFIG_KEYBOARD_ATKBD is not set
88CONFIG_KEYBOARD_GPIO=y 81CONFIG_KEYBOARD_GPIO=y
89# CONFIG_INPUT_MOUSE is not set 82# CONFIG_INPUT_MOUSE is not set
90CONFIG_INPUT_TOUCHSCREEN=y 83CONFIG_INPUT_TOUCHSCREEN=y
91CONFIG_TOUCHSCREEN_ADS7846=y 84CONFIG_TOUCHSCREEN_ADS7846=y
92CONFIG_LEGACY_PTY_COUNT=4 85# CONFIG_LEGACY_PTYS is not set
93CONFIG_SERIAL_ATMEL=y 86CONFIG_SERIAL_ATMEL=y
94CONFIG_SERIAL_ATMEL_CONSOLE=y 87CONFIG_SERIAL_ATMEL_CONSOLE=y
95CONFIG_HW_RANDOM=y 88CONFIG_HW_RANDOM=y
@@ -98,6 +91,7 @@ CONFIG_I2C_CHARDEV=y
98CONFIG_I2C_GPIO=y 91CONFIG_I2C_GPIO=y
99CONFIG_SPI=y 92CONFIG_SPI=y
100CONFIG_SPI_ATMEL=y 93CONFIG_SPI_ATMEL=y
94CONFIG_GPIO_SYSFS=y
101# CONFIG_HWMON is not set 95# CONFIG_HWMON is not set
102CONFIG_WATCHDOG=y 96CONFIG_WATCHDOG=y
103CONFIG_WATCHDOG_NOWAYOUT=y 97CONFIG_WATCHDOG_NOWAYOUT=y
@@ -107,9 +101,9 @@ CONFIG_FB_ATMEL=y
107CONFIG_BACKLIGHT_LCD_SUPPORT=y 101CONFIG_BACKLIGHT_LCD_SUPPORT=y
108CONFIG_LCD_CLASS_DEVICE=y 102CONFIG_LCD_CLASS_DEVICE=y
109CONFIG_BACKLIGHT_CLASS_DEVICE=y 103CONFIG_BACKLIGHT_CLASS_DEVICE=y
110CONFIG_BACKLIGHT_ATMEL_LCDC=y
111CONFIG_FRAMEBUFFER_CONSOLE=y 104CONFIG_FRAMEBUFFER_CONSOLE=y
112CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y 105CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y
106CONFIG_FONTS=y
113CONFIG_LOGO=y 107CONFIG_LOGO=y
114CONFIG_SOUND=y 108CONFIG_SOUND=y
115CONFIG_SND=y 109CONFIG_SND=y
@@ -124,16 +118,12 @@ CONFIG_SND_ATMEL_AC97C=y
124# CONFIG_SND_SPI is not set 118# CONFIG_SND_SPI is not set
125CONFIG_SND_USB_AUDIO=m 119CONFIG_SND_USB_AUDIO=m
126CONFIG_USB=y 120CONFIG_USB=y
127CONFIG_USB_DEVICEFS=y
128CONFIG_USB_MON=y 121CONFIG_USB_MON=y
129CONFIG_USB_OHCI_HCD=y 122CONFIG_USB_OHCI_HCD=y
130CONFIG_USB_STORAGE=y 123CONFIG_USB_STORAGE=y
131CONFIG_USB_GADGET=y 124CONFIG_USB_GADGET=y
132CONFIG_USB_ZERO=m 125CONFIG_USB_ATMEL_USBA=y
133CONFIG_USB_ETH=m 126CONFIG_USB_G_SERIAL=y
134CONFIG_USB_GADGETFS=m
135CONFIG_USB_MASS_STORAGE=m
136CONFIG_USB_G_SERIAL=m
137CONFIG_MMC=y 127CONFIG_MMC=y
138CONFIG_SDIO_UART=m 128CONFIG_SDIO_UART=m
139CONFIG_MMC_ATMELMCI=m 129CONFIG_MMC_ATMELMCI=m
@@ -145,22 +135,18 @@ CONFIG_LEDS_TRIGGERS=y
145CONFIG_LEDS_TRIGGER_HEARTBEAT=y 135CONFIG_LEDS_TRIGGER_HEARTBEAT=y
146CONFIG_RTC_CLASS=y 136CONFIG_RTC_CLASS=y
147CONFIG_RTC_DRV_AT91SAM9=y 137CONFIG_RTC_DRV_AT91SAM9=y
148CONFIG_EXT2_FS=y 138CONFIG_EXT4_FS=y
149CONFIG_FUSE_FS=m
150CONFIG_VFAT_FS=y 139CONFIG_VFAT_FS=y
151CONFIG_TMPFS=y 140CONFIG_TMPFS=y
152CONFIG_JFFS2_FS=y
153CONFIG_UBIFS_FS=y 141CONFIG_UBIFS_FS=y
154CONFIG_UBIFS_FS_ADVANCED_COMPR=y 142CONFIG_UBIFS_FS_ADVANCED_COMPR=y
155CONFIG_CRAMFS=y
156CONFIG_NFS_FS=y 143CONFIG_NFS_FS=y
157CONFIG_NFS_V3=y
158CONFIG_NFS_V3_ACL=y 144CONFIG_NFS_V3_ACL=y
159CONFIG_NFS_V4=y 145CONFIG_NFS_V4=y
160CONFIG_ROOT_NFS=y 146CONFIG_ROOT_NFS=y
161CONFIG_NLS_CODEPAGE_437=y 147CONFIG_NLS_CODEPAGE_437=y
162CONFIG_NLS_CODEPAGE_850=y 148CONFIG_NLS_CODEPAGE_850=y
163CONFIG_NLS_ISO8859_1=y 149CONFIG_NLS_ISO8859_1=y
164CONFIG_FTRACE=y 150CONFIG_NLS_UTF8=y
165CONFIG_DEBUG_USER=y 151CONFIG_DEBUG_USER=y
166CONFIG_XZ_DEC=y 152CONFIG_XZ_DEC=y
diff --git a/arch/arm/configs/at91sam9g45_defconfig b/arch/arm/configs/at91sam9g45_defconfig
index 18964cdacd68..08166cd4e7d6 100644
--- a/arch/arm/configs/at91sam9g45_defconfig
+++ b/arch/arm/configs/at91sam9g45_defconfig
@@ -1,4 +1,3 @@
1CONFIG_EXPERIMENTAL=y
2# CONFIG_LOCALVERSION_AUTO is not set 1# CONFIG_LOCALVERSION_AUTO is not set
3# CONFIG_SWAP is not set 2# CONFIG_SWAP is not set
4CONFIG_SYSVIPC=y 3CONFIG_SYSVIPC=y
@@ -23,8 +22,6 @@ CONFIG_AT91_PROGRAMMABLE_CLOCKS=y
23CONFIG_AT91_SLOW_CLOCK=y 22CONFIG_AT91_SLOW_CLOCK=y
24CONFIG_AEABI=y 23CONFIG_AEABI=y
25# CONFIG_OABI_COMPAT is not set 24# CONFIG_OABI_COMPAT is not set
26CONFIG_LEDS=y
27CONFIG_LEDS_CPU=y
28CONFIG_UACCESS_WITH_MEMCPY=y 25CONFIG_UACCESS_WITH_MEMCPY=y
29CONFIG_ZBOOT_ROM_TEXT=0x0 26CONFIG_ZBOOT_ROM_TEXT=0x0
30CONFIG_ZBOOT_ROM_BSS=0x0 27CONFIG_ZBOOT_ROM_BSS=0x0
@@ -36,6 +33,9 @@ CONFIG_PACKET=y
36CONFIG_UNIX=y 33CONFIG_UNIX=y
37CONFIG_INET=y 34CONFIG_INET=y
38CONFIG_IP_MULTICAST=y 35CONFIG_IP_MULTICAST=y
36CONFIG_IP_PNP=y
37CONFIG_IP_PNP_DHCP=y
38CONFIG_IP_PNP_BOOTP=y
39# CONFIG_INET_XFRM_MODE_TRANSPORT is not set 39# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
40# CONFIG_INET_XFRM_MODE_TUNNEL is not set 40# CONFIG_INET_XFRM_MODE_TUNNEL is not set
41# CONFIG_INET_XFRM_MODE_BEET is not set 41# CONFIG_INET_XFRM_MODE_BEET is not set
@@ -45,9 +45,6 @@ CONFIG_IPV6=y
45# CONFIG_INET6_XFRM_MODE_TUNNEL is not set 45# CONFIG_INET6_XFRM_MODE_TUNNEL is not set
46# CONFIG_INET6_XFRM_MODE_BEET is not set 46# CONFIG_INET6_XFRM_MODE_BEET is not set
47CONFIG_IPV6_SIT_6RD=y 47CONFIG_IPV6_SIT_6RD=y
48CONFIG_CFG80211=y
49CONFIG_LIB80211=y
50CONFIG_MAC80211=y
51CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" 48CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
52CONFIG_DEVTMPFS=y 49CONFIG_DEVTMPFS=y
53CONFIG_DEVTMPFS_MOUNT=y 50CONFIG_DEVTMPFS_MOUNT=y
@@ -61,13 +58,14 @@ CONFIG_MTD_DATAFLASH=y
61CONFIG_MTD_NAND=y 58CONFIG_MTD_NAND=y
62CONFIG_MTD_NAND_ATMEL=y 59CONFIG_MTD_NAND_ATMEL=y
63CONFIG_MTD_UBI=y 60CONFIG_MTD_UBI=y
61CONFIG_MTD_UBI_GLUEBI=y
64CONFIG_BLK_DEV_LOOP=y 62CONFIG_BLK_DEV_LOOP=y
65CONFIG_BLK_DEV_RAM=y 63CONFIG_BLK_DEV_RAM=y
66CONFIG_BLK_DEV_RAM_COUNT=4 64CONFIG_BLK_DEV_RAM_COUNT=4
67CONFIG_BLK_DEV_RAM_SIZE=8192 65CONFIG_BLK_DEV_RAM_SIZE=8192
68CONFIG_MISC_DEVICES=y
69CONFIG_ATMEL_PWM=y 66CONFIG_ATMEL_PWM=y
70CONFIG_ATMEL_TCLIB=y 67CONFIG_ATMEL_TCLIB=y
68CONFIG_ATMEL_SSC=y
71CONFIG_SCSI=y 69CONFIG_SCSI=y
72CONFIG_BLK_DEV_SD=y 70CONFIG_BLK_DEV_SD=y
73CONFIG_SCSI_MULTI_LUN=y 71CONFIG_SCSI_MULTI_LUN=y
@@ -76,67 +74,40 @@ CONFIG_NETDEVICES=y
76CONFIG_MII=y 74CONFIG_MII=y
77CONFIG_MACB=y 75CONFIG_MACB=y
78CONFIG_DAVICOM_PHY=y 76CONFIG_DAVICOM_PHY=y
79CONFIG_LIBERTAS_THINFIRM=m 77# CONFIG_INPUT_MOUSEDEV is not set
80CONFIG_LIBERTAS_THINFIRM_USB=m
81CONFIG_AT76C50X_USB=m
82CONFIG_USB_ZD1201=m
83CONFIG_RTL8187=m
84CONFIG_ATH_COMMON=m
85CONFIG_ATH9K=m
86CONFIG_CARL9170=m
87CONFIG_B43=m
88CONFIG_B43_PHY_N=y
89CONFIG_LIBERTAS=m
90CONFIG_LIBERTAS_USB=m
91CONFIG_LIBERTAS_SDIO=m
92CONFIG_LIBERTAS_SPI=m
93CONFIG_RT2X00=m
94CONFIG_RT2500USB=m
95CONFIG_RT73USB=m
96CONFIG_RT2800USB=m
97CONFIG_RT2800USB_RT53XX=y
98CONFIG_RT2800USB_UNKNOWN=y
99CONFIG_RTL8192CU=m
100CONFIG_WL1251=m
101CONFIG_WL1251_SDIO=m
102CONFIG_WL12XX_MENU=m
103CONFIG_WL12XX=m
104CONFIG_WL12XX_SDIO=m
105CONFIG_ZD1211RW=m
106CONFIG_MWIFIEX=m
107CONFIG_MWIFIEX_SDIO=m
108CONFIG_INPUT_POLLDEV=m
109# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
110CONFIG_INPUT_MOUSEDEV_SCREEN_X=480
111CONFIG_INPUT_MOUSEDEV_SCREEN_Y=272
112CONFIG_INPUT_JOYDEV=y 78CONFIG_INPUT_JOYDEV=y
113CONFIG_INPUT_EVDEV=y 79CONFIG_INPUT_EVDEV=y
114# CONFIG_KEYBOARD_ATKBD is not set 80# CONFIG_KEYBOARD_ATKBD is not set
115CONFIG_KEYBOARD_QT1070=m 81CONFIG_KEYBOARD_QT1070=y
116CONFIG_KEYBOARD_QT2160=m 82CONFIG_KEYBOARD_QT2160=y
117CONFIG_KEYBOARD_GPIO=y 83CONFIG_KEYBOARD_GPIO=y
118# CONFIG_INPUT_MOUSE is not set 84# CONFIG_INPUT_MOUSE is not set
119CONFIG_INPUT_TOUCHSCREEN=y 85CONFIG_INPUT_TOUCHSCREEN=y
120CONFIG_TOUCHSCREEN_ATMEL_MXT=m 86CONFIG_TOUCHSCREEN_ATMEL_MXT=m
121CONFIG_TOUCHSCREEN_ATMEL_TSADCC=y 87CONFIG_TOUCHSCREEN_ATMEL_TSADCC=y
122# CONFIG_SERIO is not set 88# CONFIG_SERIO is not set
123CONFIG_LEGACY_PTY_COUNT=4 89# CONFIG_LEGACY_PTYS is not set
124CONFIG_SERIAL_ATMEL=y 90CONFIG_SERIAL_ATMEL=y
125CONFIG_SERIAL_ATMEL_CONSOLE=y 91CONFIG_SERIAL_ATMEL_CONSOLE=y
126CONFIG_HW_RANDOM=y 92CONFIG_HW_RANDOM=y
127CONFIG_I2C=y 93CONFIG_I2C=y
94CONFIG_I2C_CHARDEV=y
128CONFIG_I2C_GPIO=y 95CONFIG_I2C_GPIO=y
129CONFIG_SPI=y 96CONFIG_SPI=y
130CONFIG_SPI_ATMEL=y 97CONFIG_SPI_ATMEL=y
131# CONFIG_HWMON is not set 98# CONFIG_HWMON is not set
132CONFIG_FB=y 99CONFIG_FB=y
133CONFIG_FB_ATMEL=y 100CONFIG_FB_ATMEL=y
134CONFIG_FB_UDL=m
135CONFIG_BACKLIGHT_LCD_SUPPORT=y 101CONFIG_BACKLIGHT_LCD_SUPPORT=y
136# CONFIG_LCD_CLASS_DEVICE is not set 102CONFIG_LCD_CLASS_DEVICE=y
137CONFIG_BACKLIGHT_CLASS_DEVICE=y 103CONFIG_BACKLIGHT_CLASS_DEVICE=y
138CONFIG_BACKLIGHT_ATMEL_LCDC=y 104CONFIG_BACKLIGHT_ATMEL_LCDC=y
105CONFIG_BACKLIGHT_ATMEL_PWM=y
139# CONFIG_BACKLIGHT_GENERIC is not set 106# CONFIG_BACKLIGHT_GENERIC is not set
107CONFIG_FRAMEBUFFER_CONSOLE=y
108CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y
109CONFIG_FONTS=y
110CONFIG_LOGO=y
140CONFIG_SOUND=y 111CONFIG_SOUND=y
141CONFIG_SND=y 112CONFIG_SND=y
142CONFIG_SND_SEQUENCER=y 113CONFIG_SND_SEQUENCER=y
@@ -148,33 +119,25 @@ CONFIG_SND_PCM_OSS=y
148# CONFIG_SND_ARM is not set 119# CONFIG_SND_ARM is not set
149CONFIG_SND_ATMEL_AC97C=y 120CONFIG_SND_ATMEL_AC97C=y
150# CONFIG_SND_SPI is not set 121# CONFIG_SND_SPI is not set
151CONFIG_SND_USB_AUDIO=m 122# CONFIG_SND_USB is not set
152# CONFIG_USB_HID is not set 123# CONFIG_USB_HID is not set
153CONFIG_USB=y 124CONFIG_USB=y
154CONFIG_USB_ANNOUNCE_NEW_DEVICES=y 125CONFIG_USB_ANNOUNCE_NEW_DEVICES=y
155CONFIG_USB_DEVICEFS=y
156# CONFIG_USB_DEVICE_CLASS is not set
157CONFIG_USB_EHCI_HCD=y 126CONFIG_USB_EHCI_HCD=y
158CONFIG_USB_OHCI_HCD=y 127CONFIG_USB_OHCI_HCD=y
159CONFIG_USB_ACM=y 128CONFIG_USB_ACM=y
160CONFIG_USB_STORAGE=y 129CONFIG_USB_STORAGE=y
161CONFIG_USB_GADGET=y 130CONFIG_USB_GADGET=y
162CONFIG_USB_ATMEL_USBA=m 131CONFIG_USB_ATMEL_USBA=y
163CONFIG_USB_ZERO=m 132CONFIG_USB_G_MULTI=y
164CONFIG_USB_AUDIO=m
165CONFIG_USB_ETH=m
166CONFIG_USB_ETH_EEM=y
167CONFIG_USB_MASS_STORAGE=m
168CONFIG_USB_G_SERIAL=m
169CONFIG_USB_CDC_COMPOSITE=m
170CONFIG_USB_G_MULTI=m
171CONFIG_USB_G_MULTI_CDC=y 133CONFIG_USB_G_MULTI_CDC=y
172CONFIG_MMC=y 134CONFIG_MMC=y
173# CONFIG_MMC_BLOCK_BOUNCE is not set 135# CONFIG_MMC_BLOCK_BOUNCE is not set
174CONFIG_SDIO_UART=m
175CONFIG_MMC_ATMELMCI=y 136CONFIG_MMC_ATMELMCI=y
176CONFIG_LEDS_ATMEL_PWM=y 137CONFIG_NEW_LEDS=y
138CONFIG_LEDS_CLASS=y
177CONFIG_LEDS_GPIO=y 139CONFIG_LEDS_GPIO=y
140CONFIG_LEDS_TRIGGERS=y
178CONFIG_LEDS_TRIGGER_TIMER=y 141CONFIG_LEDS_TRIGGER_TIMER=y
179CONFIG_LEDS_TRIGGER_HEARTBEAT=y 142CONFIG_LEDS_TRIGGER_HEARTBEAT=y
180CONFIG_LEDS_TRIGGER_GPIO=y 143CONFIG_LEDS_TRIGGER_GPIO=y
@@ -184,17 +147,14 @@ CONFIG_DMADEVICES=y
184CONFIG_AT_HDMAC=y 147CONFIG_AT_HDMAC=y
185CONFIG_DMATEST=m 148CONFIG_DMATEST=m
186# CONFIG_IOMMU_SUPPORT is not set 149# CONFIG_IOMMU_SUPPORT is not set
187CONFIG_EXT2_FS=y 150CONFIG_EXT4_FS=y
188CONFIG_FANOTIFY=y 151CONFIG_FANOTIFY=y
189CONFIG_VFAT_FS=y 152CONFIG_VFAT_FS=y
190CONFIG_TMPFS=y 153CONFIG_TMPFS=y
191CONFIG_JFFS2_FS=y 154CONFIG_UBIFS_FS=y
192CONFIG_JFFS2_SUMMARY=y 155CONFIG_UBIFS_FS_ADVANCED_COMPR=y
193CONFIG_CRAMFS=m
194CONFIG_SQUASHFS=m
195CONFIG_SQUASHFS_EMBEDDED=y
196CONFIG_NFS_FS=y 156CONFIG_NFS_FS=y
197CONFIG_NFS_V3=y 157CONFIG_ROOT_NFS=y
198CONFIG_NLS_CODEPAGE_437=y 158CONFIG_NLS_CODEPAGE_437=y
199CONFIG_NLS_CODEPAGE_850=y 159CONFIG_NLS_CODEPAGE_850=y
200CONFIG_NLS_ISO8859_1=y 160CONFIG_NLS_ISO8859_1=y
@@ -203,6 +163,8 @@ CONFIG_STRIP_ASM_SYMS=y
203CONFIG_DEBUG_MEMORY_INIT=y 163CONFIG_DEBUG_MEMORY_INIT=y
204# CONFIG_FTRACE is not set 164# CONFIG_FTRACE is not set
205CONFIG_DEBUG_USER=y 165CONFIG_DEBUG_USER=y
166CONFIG_DEBUG_LL=y
167CONFIG_EARLY_PRINTK=y
206CONFIG_CRYPTO_ECB=y 168CONFIG_CRYPTO_ECB=y
207# CONFIG_CRYPTO_ANSI_CPRNG is not set 169# CONFIG_CRYPTO_ANSI_CPRNG is not set
208CONFIG_CRYPTO_USER_API_HASH=m 170CONFIG_CRYPTO_USER_API_HASH=m
diff --git a/arch/arm/configs/bcm2835_defconfig b/arch/arm/configs/bcm2835_defconfig
index ce987211a609..34e9780e63ba 100644
--- a/arch/arm/configs/bcm2835_defconfig
+++ b/arch/arm/configs/bcm2835_defconfig
@@ -55,14 +55,11 @@ CONFIG_DEVTMPFS_MOUNT=y
55# CONFIG_INPUT_KEYBOARD is not set 55# CONFIG_INPUT_KEYBOARD is not set
56# CONFIG_INPUT_MOUSE is not set 56# CONFIG_INPUT_MOUSE is not set
57# CONFIG_SERIO is not set 57# CONFIG_SERIO is not set
58# CONFIG_VT is not set
59# CONFIG_LEGACY_PTYS is not set 58# CONFIG_LEGACY_PTYS is not set
60# CONFIG_DEVKMEM is not set 59# CONFIG_DEVKMEM is not set
61CONFIG_SERIAL_AMBA_PL011=y 60CONFIG_SERIAL_AMBA_PL011=y
62CONFIG_SERIAL_AMBA_PL011_CONSOLE=y 61CONFIG_SERIAL_AMBA_PL011_CONSOLE=y
63CONFIG_TTY_PRINTK=y 62CONFIG_TTY_PRINTK=y
64CONFIG_HW_RANDOM=y
65CONFIG_HW_RANDOM_BCM2835=y
66CONFIG_I2C=y 63CONFIG_I2C=y
67CONFIG_I2C_CHARDEV=y 64CONFIG_I2C_CHARDEV=y
68CONFIG_I2C_BCM2835=y 65CONFIG_I2C_BCM2835=y
@@ -70,11 +67,27 @@ CONFIG_SPI=y
70CONFIG_SPI_BCM2835=y 67CONFIG_SPI_BCM2835=y
71CONFIG_GPIO_SYSFS=y 68CONFIG_GPIO_SYSFS=y
72# CONFIG_HWMON is not set 69# CONFIG_HWMON is not set
70CONFIG_FB=y
71CONFIG_FB_SIMPLE=y
72CONFIG_FRAMEBUFFER_CONSOLE=y
73CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y
73# CONFIG_USB_SUPPORT is not set 74# CONFIG_USB_SUPPORT is not set
74CONFIG_MMC=y 75CONFIG_MMC=y
75CONFIG_MMC_SDHCI=y 76CONFIG_MMC_SDHCI=y
76CONFIG_MMC_SDHCI_PLTFM=y 77CONFIG_MMC_SDHCI_PLTFM=y
77CONFIG_MMC_SDHCI_BCM2835=y 78CONFIG_MMC_SDHCI_BCM2835=y
79CONFIG_NEW_LEDS=y
80CONFIG_LEDS_CLASS=y
81CONFIG_LEDS_GPIO=y
82CONFIG_LEDS_TRIGGERS=y
83CONFIG_LEDS_TRIGGER_TIMER=y
84CONFIG_LEDS_TRIGGER_ONESHOT=y
85CONFIG_LEDS_TRIGGER_HEARTBEAT=y
86CONFIG_LEDS_TRIGGER_CPU=y
87CONFIG_LEDS_TRIGGER_GPIO=y
88CONFIG_LEDS_TRIGGER_DEFAULT_ON=y
89CONFIG_LEDS_TRIGGER_TRANSIENT=y
90CONFIG_LEDS_TRIGGER_CAMERA=y
78# CONFIG_IOMMU_SUPPORT is not set 91# CONFIG_IOMMU_SUPPORT is not set
79CONFIG_EXT2_FS=y 92CONFIG_EXT2_FS=y
80CONFIG_EXT2_FS_XATTR=y 93CONFIG_EXT2_FS_XATTR=y
diff --git a/arch/arm/configs/bcm_defconfig b/arch/arm/configs/bcm_defconfig
index e3bf2d65618e..65edf6d47215 100644
--- a/arch/arm/configs/bcm_defconfig
+++ b/arch/arm/configs/bcm_defconfig
@@ -78,6 +78,13 @@ CONFIG_BACKLIGHT_LCD_SUPPORT=y
78CONFIG_LCD_CLASS_DEVICE=y 78CONFIG_LCD_CLASS_DEVICE=y
79CONFIG_BACKLIGHT_CLASS_DEVICE=y 79CONFIG_BACKLIGHT_CLASS_DEVICE=y
80# CONFIG_USB_SUPPORT is not set 80# CONFIG_USB_SUPPORT is not set
81CONFIG_MMC=y
82CONFIG_MMC_UNSAFE_RESUME=y
83CONFIG_MMC_BLOCK_MINORS=32
84CONFIG_MMC_TEST=y
85CONFIG_MMC_SDHCI=y
86CONFIG_MMC_SDHCI_PLTFM=y
87CONFIG_MMC_SDHCI_BCM_KONA=y
81CONFIG_NEW_LEDS=y 88CONFIG_NEW_LEDS=y
82CONFIG_LEDS_CLASS=y 89CONFIG_LEDS_CLASS=y
83CONFIG_LEDS_TRIGGERS=y 90CONFIG_LEDS_TRIGGERS=y
diff --git a/arch/arm/configs/bockw_defconfig b/arch/arm/configs/bockw_defconfig
index 6524cdf3b08d..845f5cdf62b5 100644
--- a/arch/arm/configs/bockw_defconfig
+++ b/arch/arm/configs/bockw_defconfig
@@ -31,6 +31,7 @@ CONFIG_CMDLINE="console=ttySC0,115200 ignore_loglevel root=/dev/nfs ip=dhcp"
31CONFIG_CMDLINE_FORCE=y 31CONFIG_CMDLINE_FORCE=y
32# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set 32# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
33# CONFIG_SUSPEND is not set 33# CONFIG_SUSPEND is not set
34CONFIG_PM_RUNTIME=y
34CONFIG_NET=y 35CONFIG_NET=y
35CONFIG_UNIX=y 36CONFIG_UNIX=y
36CONFIG_INET=y 37CONFIG_INET=y
@@ -48,6 +49,14 @@ CONFIG_DEVTMPFS_MOUNT=y
48# CONFIG_STANDALONE is not set 49# CONFIG_STANDALONE is not set
49# CONFIG_PREVENT_FIRMWARE_BUILD is not set 50# CONFIG_PREVENT_FIRMWARE_BUILD is not set
50# CONFIG_FW_LOADER is not set 51# CONFIG_FW_LOADER is not set
52CONFIG_MTD=y
53CONFIG_MTD_CHAR=y
54CONFIG_MTD_BLOCK=y
55CONFIG_MTD_CFI=y
56CONFIG_MTD_CFI_AMDSTD=y
57CONFIG_MTD_M25P80=y
58CONFIG_SCSI=y
59CONFIG_BLK_DEV_SD=y
51CONFIG_NETDEVICES=y 60CONFIG_NETDEVICES=y
52# CONFIG_NET_CADENCE is not set 61# CONFIG_NET_CADENCE is not set
53# CONFIG_NET_VENDOR_BROADCOM is not set 62# CONFIG_NET_VENDOR_BROADCOM is not set
@@ -71,7 +80,23 @@ CONFIG_SERIAL_SH_SCI_NR_UARTS=6
71CONFIG_SERIAL_SH_SCI_CONSOLE=y 80CONFIG_SERIAL_SH_SCI_CONSOLE=y
72# CONFIG_HW_RANDOM is not set 81# CONFIG_HW_RANDOM is not set
73# CONFIG_HWMON is not set 82# CONFIG_HWMON is not set
74# CONFIG_USB_SUPPORT is not set 83CONFIG_I2C=y
84CONFIG_I2C_RCAR=y
85CONFIG_SPI=y
86CONFIG_SPI_SH_HSPI=y
87CONFIG_USB=y
88CONFIG_USB_ANNOUNCE_NEW_DEVICES=y
89CONFIG_USB_EHCI_HCD=y
90CONFIG_USB_OHCI_HCD=y
91CONFIG_USB_OHCI_HCD_PLATFORM=y
92CONFIG_USB_EHCI_HCD_PLATFORM=y
93CONFIG_USB_STORAGE=y
94CONFIG_USB_RCAR_PHY=y
95CONFIG_MMC=y
96CONFIG_MMC_SDHI=y
97CONFIG_MMC_SH_MMCIF=y
98CONFIG_RTC_CLASS=y
99CONFIG_RTC_DRV_RX8581=y
75CONFIG_UIO=y 100CONFIG_UIO=y
76CONFIG_UIO_PDRV_GENIRQ=y 101CONFIG_UIO_PDRV_GENIRQ=y
77# CONFIG_IOMMU_SUPPORT is not set 102# CONFIG_IOMMU_SUPPORT is not set
diff --git a/arch/arm/configs/bonito_defconfig b/arch/arm/configs/bonito_defconfig
deleted file mode 100644
index 54571082d920..000000000000
--- a/arch/arm/configs/bonito_defconfig
+++ /dev/null
@@ -1,72 +0,0 @@
1CONFIG_EXPERIMENTAL=y
2CONFIG_SYSVIPC=y
3CONFIG_IKCONFIG=y
4CONFIG_IKCONFIG_PROC=y
5CONFIG_LOG_BUF_SHIFT=16
6# CONFIG_UTS_NS is not set
7# CONFIG_IPC_NS is not set
8# CONFIG_USER_NS is not set
9# CONFIG_PID_NS is not set
10CONFIG_BLK_DEV_INITRD=y
11CONFIG_INITRAMFS_SOURCE=""
12CONFIG_CC_OPTIMIZE_FOR_SIZE=y
13CONFIG_SLAB=y
14CONFIG_MODULES=y
15CONFIG_MODULE_UNLOAD=y
16CONFIG_MODULE_FORCE_UNLOAD=y
17# CONFIG_BLK_DEV_BSG is not set
18# CONFIG_IOSCHED_DEADLINE is not set
19# CONFIG_IOSCHED_CFQ is not set
20CONFIG_ARCH_SHMOBILE=y
21CONFIG_ARCH_R8A7740=y
22CONFIG_MACH_BONITO=y
23# CONFIG_SH_TIMER_TMU is not set
24CONFIG_AEABI=y
25# CONFIG_OABI_COMPAT is not set
26CONFIG_FORCE_MAX_ZONEORDER=12
27CONFIG_ZBOOT_ROM_TEXT=0x0
28CONFIG_ZBOOT_ROM_BSS=0x0
29CONFIG_CMDLINE="console=ttySC5,115200 earlyprintk=sh-sci.5,115200 ignore_loglevel"
30CONFIG_KEXEC=y
31# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
32# CONFIG_SUSPEND is not set
33CONFIG_PM_RUNTIME=y
34CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
35# CONFIG_FIRMWARE_IN_KERNEL is not set
36CONFIG_MTD=y
37CONFIG_MTD_CHAR=y
38CONFIG_MTD_BLOCK=y
39CONFIG_MTD_CFI=y
40CONFIG_MTD_CFI_ADV_OPTIONS=y
41CONFIG_MTD_CFI_INTELEXT=y
42CONFIG_MTD_PHYSMAP=y
43CONFIG_MTD_ARM_INTEGRATOR=y
44CONFIG_MTD_BLOCK2MTD=y
45CONFIG_SCSI=y
46CONFIG_BLK_DEV_SD=y
47# CONFIG_SCSI_LOWLEVEL is not set
48# CONFIG_INPUT_KEYBOARD is not set
49# CONFIG_INPUT_MOUSE is not set
50# CONFIG_LEGACY_PTYS is not set
51CONFIG_SERIAL_SH_SCI=y
52CONFIG_SERIAL_SH_SCI_NR_UARTS=9
53CONFIG_SERIAL_SH_SCI_CONSOLE=y
54# CONFIG_HW_RANDOM is not set
55CONFIG_I2C=y
56CONFIG_I2C_CHARDEV=y
57CONFIG_I2C_SH_MOBILE=y
58CONFIG_GPIO_SYSFS=y
59# CONFIG_HWMON is not set
60# CONFIG_MFD_SUPPORT is not set
61# CONFIG_HID_SUPPORT is not set
62# CONFIG_USB_SUPPORT is not set
63CONFIG_UIO=y
64CONFIG_UIO_PDRV=y
65CONFIG_UIO_PDRV_GENIRQ=y
66# CONFIG_DNOTIFY is not set
67# CONFIG_INOTIFY_USER is not set
68CONFIG_TMPFS=y
69# CONFIG_MISC_FILESYSTEMS is not set
70# CONFIG_ENABLE_WARN_DEPRECATED is not set
71# CONFIG_ENABLE_MUST_CHECK is not set
72# CONFIG_ARM_UNWIND is not set
diff --git a/arch/arm/configs/clps711x_defconfig b/arch/arm/configs/clps711x_defconfig
index 1cd94c36321f..9e8c8316d6b0 100644
--- a/arch/arm/configs/clps711x_defconfig
+++ b/arch/arm/configs/clps711x_defconfig
@@ -31,21 +31,18 @@ CONFIG_EP7211_DONGLE=y
31# CONFIG_WIRELESS is not set 31# CONFIG_WIRELESS is not set
32CONFIG_MTD=y 32CONFIG_MTD=y
33CONFIG_MTD_CMDLINE_PARTS=y 33CONFIG_MTD_CMDLINE_PARTS=y
34CONFIG_MTD_CHAR=y
35CONFIG_MTD_BLOCK=y 34CONFIG_MTD_BLOCK=y
36CONFIG_MTD_CFI=y 35CONFIG_MTD_CFI=y
37CONFIG_MTD_JEDECPROBE=y 36CONFIG_MTD_JEDECPROBE=y
38CONFIG_MTD_CFI_INTELEXT=y 37CONFIG_MTD_CFI_INTELEXT=y
39CONFIG_MTD_CFI_AMDSTD=y 38CONFIG_MTD_CFI_AMDSTD=y
40CONFIG_MTD_CFI_STAA=y 39CONFIG_MTD_CFI_STAA=y
41CONFIG_MTD_AUTCPU12=y
42CONFIG_MTD_PLATRAM=y 40CONFIG_MTD_PLATRAM=y
43CONFIG_MTD_NAND=y 41CONFIG_MTD_NAND=y
44CONFIG_MTD_NAND_GPIO=y 42CONFIG_MTD_NAND_GPIO=y
45CONFIG_NETDEVICES=y 43CONFIG_NETDEVICES=y
46# CONFIG_NET_CADENCE is not set 44# CONFIG_NET_CADENCE is not set
47# CONFIG_NET_VENDOR_BROADCOM is not set 45# CONFIG_NET_VENDOR_BROADCOM is not set
48# CONFIG_NET_VENDOR_CHELSIO is not set
49CONFIG_CS89x0=y 46CONFIG_CS89x0=y
50CONFIG_CS89x0_PLATFORM=y 47CONFIG_CS89x0_PLATFORM=y
51# CONFIG_NET_VENDOR_FARADAY is not set 48# CONFIG_NET_VENDOR_FARADAY is not set
@@ -63,7 +60,11 @@ CONFIG_CS89x0_PLATFORM=y
63# CONFIG_VT is not set 60# CONFIG_VT is not set
64CONFIG_SERIAL_CLPS711X_CONSOLE=y 61CONFIG_SERIAL_CLPS711X_CONSOLE=y
65# CONFIG_HW_RANDOM is not set 62# CONFIG_HW_RANDOM is not set
63CONFIG_I2C=y
64CONFIG_I2C_GPIO=y
66CONFIG_SPI=y 65CONFIG_SPI=y
66CONFIG_SPI_CLPS711X=y
67CONFIG_GPIO_CLPS711X=y
67CONFIG_GPIO_GENERIC_PLATFORM=y 68CONFIG_GPIO_GENERIC_PLATFORM=y
68# CONFIG_HWMON is not set 69# CONFIG_HWMON is not set
69CONFIG_FB=y 70CONFIG_FB=y
@@ -87,4 +88,3 @@ CONFIG_DEBUG_LL=y
87CONFIG_EARLY_PRINTK=y 88CONFIG_EARLY_PRINTK=y
88# CONFIG_CRYPTO_ANSI_CPRNG is not set 89# CONFIG_CRYPTO_ANSI_CPRNG is not set
89# CONFIG_CRYPTO_HW is not set 90# CONFIG_CRYPTO_HW is not set
90# CONFIG_CRC32 is not set
diff --git a/arch/arm/configs/da8xx_omapl_defconfig b/arch/arm/configs/da8xx_omapl_defconfig
index 7c868139bdb0..1571bea48bed 100644
--- a/arch/arm/configs/da8xx_omapl_defconfig
+++ b/arch/arm/configs/da8xx_omapl_defconfig
@@ -102,6 +102,8 @@ CONFIG_SND_SOC=m
102CONFIG_SND_DAVINCI_SOC=m 102CONFIG_SND_DAVINCI_SOC=m
103# CONFIG_HID_SUPPORT is not set 103# CONFIG_HID_SUPPORT is not set
104# CONFIG_USB_SUPPORT is not set 104# CONFIG_USB_SUPPORT is not set
105CONFIG_DMADEVICES=y
106CONFIG_TI_EDMA=y
105CONFIG_EXT2_FS=y 107CONFIG_EXT2_FS=y
106CONFIG_EXT3_FS=y 108CONFIG_EXT3_FS=y
107CONFIG_XFS_FS=m 109CONFIG_XFS_FS=m
diff --git a/arch/arm/configs/davinci_all_defconfig b/arch/arm/configs/davinci_all_defconfig
index c86fd75e181a..ab2f7378352c 100644
--- a/arch/arm/configs/davinci_all_defconfig
+++ b/arch/arm/configs/davinci_all_defconfig
@@ -162,6 +162,8 @@ CONFIG_LEDS_TRIGGERS=y
162CONFIG_LEDS_TRIGGER_TIMER=m 162CONFIG_LEDS_TRIGGER_TIMER=m
163CONFIG_LEDS_TRIGGER_HEARTBEAT=m 163CONFIG_LEDS_TRIGGER_HEARTBEAT=m
164CONFIG_RTC_CLASS=y 164CONFIG_RTC_CLASS=y
165CONFIG_DMADEVICES=y
166CONFIG_TI_EDMA=y
165CONFIG_EXT2_FS=y 167CONFIG_EXT2_FS=y
166CONFIG_EXT3_FS=y 168CONFIG_EXT3_FS=y
167CONFIG_XFS_FS=m 169CONFIG_XFS_FS=m
diff --git a/arch/arm/configs/exynos_defconfig b/arch/arm/configs/exynos_defconfig
index 227abf9cc601..ad7dfbbafa45 100644
--- a/arch/arm/configs/exynos_defconfig
+++ b/arch/arm/configs/exynos_defconfig
@@ -50,6 +50,7 @@ CONFIG_USB_USBNET=y
50CONFIG_USB_NET_SMSC75XX=y 50CONFIG_USB_NET_SMSC75XX=y
51CONFIG_USB_NET_SMSC95XX=y 51CONFIG_USB_NET_SMSC95XX=y
52CONFIG_INPUT_EVDEV=y 52CONFIG_INPUT_EVDEV=y
53CONFIG_KEYBOARD_GPIO=y
53CONFIG_KEYBOARD_CROS_EC=y 54CONFIG_KEYBOARD_CROS_EC=y
54# CONFIG_MOUSE_PS2 is not set 55# CONFIG_MOUSE_PS2 is not set
55CONFIG_MOUSE_CYAPA=y 56CONFIG_MOUSE_CYAPA=y
@@ -104,6 +105,8 @@ CONFIG_MMC_SDHCI_S3C=y
104CONFIG_MMC_DW=y 105CONFIG_MMC_DW=y
105CONFIG_MMC_DW_IDMAC=y 106CONFIG_MMC_DW_IDMAC=y
106CONFIG_MMC_DW_EXYNOS=y 107CONFIG_MMC_DW_EXYNOS=y
108CONFIG_RTC_CLASS=y
109CONFIG_RTC_DRV_S3C=y
107CONFIG_COMMON_CLK_MAX77686=y 110CONFIG_COMMON_CLK_MAX77686=y
108CONFIG_EXT2_FS=y 111CONFIG_EXT2_FS=y
109CONFIG_EXT3_FS=y 112CONFIG_EXT3_FS=y
diff --git a/arch/arm/configs/imx_v6_v7_defconfig b/arch/arm/configs/imx_v6_v7_defconfig
index 6ec010f248b5..06686e7303a9 100644
--- a/arch/arm/configs/imx_v6_v7_defconfig
+++ b/arch/arm/configs/imx_v6_v7_defconfig
@@ -37,6 +37,8 @@ CONFIG_MACH_IMX51_DT=y
37CONFIG_MACH_EUKREA_CPUIMX51SD=y 37CONFIG_MACH_EUKREA_CPUIMX51SD=y
38CONFIG_SOC_IMX53=y 38CONFIG_SOC_IMX53=y
39CONFIG_SOC_IMX6Q=y 39CONFIG_SOC_IMX6Q=y
40CONFIG_SOC_IMX6SL=y
41CONFIG_SOC_VF610=y
40CONFIG_MXC_PWM=y 42CONFIG_MXC_PWM=y
41CONFIG_SMP=y 43CONFIG_SMP=y
42CONFIG_VMSPLIT_2G=y 44CONFIG_VMSPLIT_2G=y
@@ -47,6 +49,7 @@ CONFIG_CMDLINE="noinitrd console=ttymxc0,115200"
47CONFIG_VFP=y 49CONFIG_VFP=y
48CONFIG_NEON=y 50CONFIG_NEON=y
49CONFIG_BINFMT_MISC=m 51CONFIG_BINFMT_MISC=m
52CONFIG_PM_RUNTIME=y
50CONFIG_PM_DEBUG=y 53CONFIG_PM_DEBUG=y
51CONFIG_PM_TEST_SUSPEND=y 54CONFIG_PM_TEST_SUSPEND=y
52CONFIG_NET=y 55CONFIG_NET=y
@@ -170,6 +173,7 @@ CONFIG_BACKLIGHT_LCD_SUPPORT=y
170CONFIG_LCD_CLASS_DEVICE=y 173CONFIG_LCD_CLASS_DEVICE=y
171CONFIG_LCD_L4F00242T03=y 174CONFIG_LCD_L4F00242T03=y
172CONFIG_BACKLIGHT_CLASS_DEVICE=y 175CONFIG_BACKLIGHT_CLASS_DEVICE=y
176CONFIG_BACKLIGHT_PWM=y
173CONFIG_FRAMEBUFFER_CONSOLE=y 177CONFIG_FRAMEBUFFER_CONSOLE=y
174CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y 178CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y
175CONFIG_FONTS=y 179CONFIG_FONTS=y
@@ -182,6 +186,7 @@ CONFIG_SND_SOC=y
182CONFIG_SND_IMX_SOC=y 186CONFIG_SND_IMX_SOC=y
183CONFIG_SND_SOC_PHYCORE_AC97=y 187CONFIG_SND_SOC_PHYCORE_AC97=y
184CONFIG_SND_SOC_EUKREA_TLV320=y 188CONFIG_SND_SOC_EUKREA_TLV320=y
189CONFIG_SND_SOC_IMX_WM8962=y
185CONFIG_SND_SOC_IMX_SGTL5000=y 190CONFIG_SND_SOC_IMX_SGTL5000=y
186CONFIG_SND_SOC_IMX_MC13783=y 191CONFIG_SND_SOC_IMX_MC13783=y
187CONFIG_USB=y 192CONFIG_USB=y
@@ -208,10 +213,15 @@ CONFIG_IMX_SDMA=y
208CONFIG_MXS_DMA=y 213CONFIG_MXS_DMA=y
209CONFIG_STAGING=y 214CONFIG_STAGING=y
210CONFIG_DRM_IMX=y 215CONFIG_DRM_IMX=y
216CONFIG_DRM_IMX_TVE=y
217CONFIG_DRM_IMX_FB_HELPER=y
218CONFIG_DRM_IMX_PARALLEL_DISPLAY=y
211CONFIG_DRM_IMX_IPUV3_CORE=y 219CONFIG_DRM_IMX_IPUV3_CORE=y
212CONFIG_DRM_IMX_IPUV3=y 220CONFIG_DRM_IMX_IPUV3=y
213CONFIG_COMMON_CLK_DEBUG=y 221CONFIG_COMMON_CLK_DEBUG=y
214# CONFIG_IOMMU_SUPPORT is not set 222# CONFIG_IOMMU_SUPPORT is not set
223CONFIG_PWM=y
224CONFIG_PWM_IMX=y
215CONFIG_EXT2_FS=y 225CONFIG_EXT2_FS=y
216CONFIG_EXT2_FS_XATTR=y 226CONFIG_EXT2_FS_XATTR=y
217CONFIG_EXT2_FS_POSIX_ACL=y 227CONFIG_EXT2_FS_POSIX_ACL=y
diff --git a/arch/arm/configs/keystone_defconfig b/arch/arm/configs/keystone_defconfig
new file mode 100644
index 000000000000..62e968cac9dc
--- /dev/null
+++ b/arch/arm/configs/keystone_defconfig
@@ -0,0 +1,157 @@
1# CONFIG_SWAP is not set
2CONFIG_POSIX_MQUEUE=y
3CONFIG_HIGH_RES_TIMERS=y
4CONFIG_IKCONFIG=y
5CONFIG_IKCONFIG_PROC=y
6CONFIG_LOG_BUF_SHIFT=14
7CONFIG_BLK_DEV_INITRD=y
8CONFIG_SYSCTL_SYSCALL=y
9CONFIG_KALLSYMS_ALL=y
10# CONFIG_ELF_CORE is not set
11# CONFIG_BASE_FULL is not set
12CONFIG_EMBEDDED=y
13CONFIG_PROFILING=y
14CONFIG_OPROFILE=y
15CONFIG_KPROBES=y
16CONFIG_MODULES=y
17CONFIG_MODULE_FORCE_LOAD=y
18CONFIG_MODULE_UNLOAD=y
19CONFIG_MODULE_FORCE_UNLOAD=y
20CONFIG_MODVERSIONS=y
21CONFIG_ARCH_KEYSTONE=y
22CONFIG_ARM_LPAE=y
23CONFIG_SMP=y
24CONFIG_PREEMPT=y
25CONFIG_AEABI=y
26CONFIG_HIGHMEM=y
27CONFIG_VFP=y
28CONFIG_NEON=y
29# CONFIG_SUSPEND is not set
30CONFIG_PM_RUNTIME=y
31CONFIG_NET=y
32CONFIG_PACKET=y
33CONFIG_UNIX=y
34CONFIG_UNIX_DIAG=y
35CONFIG_XFRM_USER=y
36CONFIG_XFRM_SUB_POLICY=y
37CONFIG_XFRM_STATISTICS=y
38CONFIG_NET_KEY=y
39CONFIG_NET_KEY_MIGRATE=y
40CONFIG_INET=y
41CONFIG_IP_MULTICAST=y
42CONFIG_IP_ADVANCED_ROUTER=y
43CONFIG_IP_MULTIPLE_TABLES=y
44CONFIG_IP_ROUTE_MULTIPATH=y
45CONFIG_IP_ROUTE_VERBOSE=y
46CONFIG_IP_PNP=y
47CONFIG_IP_PNP_DHCP=y
48CONFIG_IP_PNP_BOOTP=y
49CONFIG_NET_IPIP=y
50CONFIG_NET_IPGRE_DEMUX=y
51CONFIG_NET_IPGRE=y
52CONFIG_IP_MROUTE=y
53CONFIG_IP_MROUTE_MULTIPLE_TABLES=y
54CONFIG_IP_PIMSM_V2=y
55CONFIG_INET_AH=y
56CONFIG_INET_IPCOMP=y
57CONFIG_IPV6=y
58CONFIG_INET6_XFRM_MODE_TRANSPORT=m
59CONFIG_INET6_XFRM_MODE_TUNNEL=m
60CONFIG_INET6_XFRM_MODE_BEET=m
61CONFIG_IPV6_SIT=m
62CONFIG_IPV6_MULTIPLE_TABLES=y
63CONFIG_IPV6_SUBTREES=y
64CONFIG_IPV6_MROUTE=y
65CONFIG_IPV6_PIMSM_V2=y
66CONFIG_NETFILTER=y
67CONFIG_NF_CONNTRACK=y
68CONFIG_NF_CT_NETLINK=y
69CONFIG_NETFILTER_XT_TARGET_CLASSIFY=y
70CONFIG_NETFILTER_XT_TARGET_CONNMARK=y
71CONFIG_NETFILTER_XT_TARGET_IDLETIMER=y
72CONFIG_NETFILTER_XT_TARGET_MARK=y
73CONFIG_NETFILTER_XT_MATCH_COMMENT=y
74CONFIG_NETFILTER_XT_MATCH_CONNBYTES=y
75CONFIG_NETFILTER_XT_MATCH_CONNLIMIT=y
76CONFIG_NETFILTER_XT_MATCH_CONNMARK=y
77CONFIG_NETFILTER_XT_MATCH_CONNTRACK=y
78CONFIG_NETFILTER_XT_MATCH_CPU=y
79CONFIG_NETFILTER_XT_MATCH_IPRANGE=y
80CONFIG_NETFILTER_XT_MATCH_LENGTH=y
81CONFIG_NETFILTER_XT_MATCH_MAC=y
82CONFIG_NETFILTER_XT_MATCH_MARK=y
83CONFIG_NETFILTER_XT_MATCH_MULTIPORT=y
84CONFIG_NETFILTER_XT_MATCH_PKTTYPE=y
85CONFIG_NETFILTER_XT_MATCH_STATE=y
86CONFIG_NF_CONNTRACK_IPV4=y
87CONFIG_IP_NF_IPTABLES=y
88CONFIG_IP_NF_MATCH_AH=y
89CONFIG_IP_NF_MATCH_ECN=y
90CONFIG_IP_NF_MATCH_TTL=y
91CONFIG_IP_NF_FILTER=y
92CONFIG_IP_NF_TARGET_REJECT=y
93CONFIG_IP_NF_TARGET_ULOG=y
94CONFIG_IP_NF_MANGLE=y
95CONFIG_IP_NF_TARGET_CLUSTERIP=y
96CONFIG_IP_NF_TARGET_ECN=y
97CONFIG_IP_NF_TARGET_TTL=y
98CONFIG_IP_NF_RAW=y
99CONFIG_IP_NF_ARPTABLES=y
100CONFIG_IP_NF_ARPFILTER=y
101CONFIG_IP_NF_ARP_MANGLE=y
102CONFIG_IP6_NF_IPTABLES=m
103CONFIG_IP_SCTP=y
104CONFIG_VLAN_8021Q=y
105CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
106CONFIG_CMA=y
107CONFIG_MTD=y
108CONFIG_MTD_CMDLINE_PARTS=y
109CONFIG_MTD_BLOCK=y
110CONFIG_MTD_PLATRAM=y
111CONFIG_MTD_M25P80=y
112CONFIG_MTD_NAND=y
113CONFIG_MTD_UBI=y
114CONFIG_PROC_DEVICETREE=y
115CONFIG_BLK_DEV_LOOP=y
116CONFIG_EEPROM_AT24=y
117CONFIG_NETDEVICES=y
118CONFIG_SERIAL_8250=y
119CONFIG_SERIAL_8250_CONSOLE=y
120CONFIG_SERIAL_OF_PLATFORM=y
121# CONFIG_HW_RANDOM is not set
122CONFIG_I2C=y
123# CONFIG_I2C_COMPAT is not set
124CONFIG_I2C_CHARDEV=y
125CONFIG_SPI=y
126CONFIG_SPI_SPIDEV=y
127# CONFIG_HWMON is not set
128CONFIG_WATCHDOG=y
129# CONFIG_USB_SUPPORT is not set
130CONFIG_DMADEVICES=y
131CONFIG_COMMON_CLK_DEBUG=y
132CONFIG_MEMORY=y
133CONFIG_TMPFS=y
134CONFIG_JFFS2_FS=y
135CONFIG_JFFS2_FS_WBUF_VERIFY=y
136CONFIG_UBIFS_FS=y
137CONFIG_CRAMFS=y
138CONFIG_NFS_FS=y
139CONFIG_NFS_V3_ACL=y
140CONFIG_ROOT_NFS=y
141CONFIG_NFSD=y
142CONFIG_NFSD_V3=y
143CONFIG_NFSD_V3_ACL=y
144CONFIG_PRINTK_TIME=y
145CONFIG_DEBUG_SHIRQ=y
146CONFIG_DEBUG_INFO=y
147CONFIG_DEBUG_USER=y
148CONFIG_CRYPTO_USER=y
149CONFIG_CRYPTO_NULL=y
150CONFIG_CRYPTO_AUTHENC=y
151CONFIG_CRYPTO_CBC=y
152CONFIG_CRYPTO_CTR=y
153CONFIG_CRYPTO_XCBC=y
154CONFIG_CRYPTO_DES=y
155CONFIG_CRYPTO_ANSI_CPRNG=y
156CONFIG_CRYPTO_USER_API_HASH=y
157CONFIG_CRYPTO_USER_API_SKCIPHER=y
diff --git a/arch/arm/configs/kirkwood_defconfig b/arch/arm/configs/kirkwood_defconfig
index a1d8252e9ec7..0f2aa61911a3 100644
--- a/arch/arm/configs/kirkwood_defconfig
+++ b/arch/arm/configs/kirkwood_defconfig
@@ -1,4 +1,3 @@
1CONFIG_EXPERIMENTAL=y
2CONFIG_SYSVIPC=y 1CONFIG_SYSVIPC=y
3CONFIG_NO_HZ=y 2CONFIG_NO_HZ=y
4CONFIG_HIGH_RES_TIMERS=y 3CONFIG_HIGH_RES_TIMERS=y
@@ -31,6 +30,7 @@ CONFIG_MACH_T5325=y
31CONFIG_MACH_TS219=y 30CONFIG_MACH_TS219=y
32CONFIG_MACH_TS41X=y 31CONFIG_MACH_TS41X=y
33CONFIG_MACH_CLOUDBOX_DT=y 32CONFIG_MACH_CLOUDBOX_DT=y
33CONFIG_MACH_DB88F628X_BP_DT=y
34CONFIG_MACH_DLINK_KIRKWOOD_DT=y 34CONFIG_MACH_DLINK_KIRKWOOD_DT=y
35CONFIG_MACH_DOCKSTAR_DT=y 35CONFIG_MACH_DOCKSTAR_DT=y
36CONFIG_MACH_DREAMPLUG_DT=y 36CONFIG_MACH_DREAMPLUG_DT=y
@@ -50,14 +50,19 @@ CONFIG_MACH_NETSPACE_V2_DT=y
50CONFIG_MACH_NSA310_DT=y 50CONFIG_MACH_NSA310_DT=y
51CONFIG_MACH_OPENBLOCKS_A6_DT=y 51CONFIG_MACH_OPENBLOCKS_A6_DT=y
52CONFIG_MACH_READYNAS_DT=y 52CONFIG_MACH_READYNAS_DT=y
53CONFIG_MACH_SHEEVAPLUG_DT=y
53CONFIG_MACH_TOPKICK_DT=y 54CONFIG_MACH_TOPKICK_DT=y
54CONFIG_MACH_TS219_DT=y 55CONFIG_MACH_TS219_DT=y
55# CONFIG_CPU_FEROCEON_OLD_ID is not set 56# CONFIG_CPU_FEROCEON_OLD_ID is not set
57CONFIG_PCI_MVEBU=y
56CONFIG_PREEMPT=y 58CONFIG_PREEMPT=y
57CONFIG_AEABI=y 59CONFIG_AEABI=y
58# CONFIG_OABI_COMPAT is not set 60# CONFIG_OABI_COMPAT is not set
59CONFIG_ZBOOT_ROM_TEXT=0x0 61CONFIG_ZBOOT_ROM_TEXT=0x0
60CONFIG_ZBOOT_ROM_BSS=0x0 62CONFIG_ZBOOT_ROM_BSS=0x0
63CONFIG_CPU_FREQ=y
64CONFIG_CPU_FREQ_STAT_DETAILS=y
65CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y
61CONFIG_CPU_IDLE=y 66CONFIG_CPU_IDLE=y
62CONFIG_NET=y 67CONFIG_NET=y
63CONFIG_PACKET=y 68CONFIG_PACKET=y
@@ -68,14 +73,12 @@ CONFIG_IP_PNP=y
68CONFIG_IP_PNP_DHCP=y 73CONFIG_IP_PNP_DHCP=y
69CONFIG_IP_PNP_BOOTP=y 74CONFIG_IP_PNP_BOOTP=y
70# CONFIG_IPV6 is not set 75# CONFIG_IPV6 is not set
71CONFIG_NET_DSA=y
72CONFIG_NET_PKTGEN=m 76CONFIG_NET_PKTGEN=m
73CONFIG_CFG80211=y 77CONFIG_CFG80211=y
74CONFIG_MAC80211=y 78CONFIG_MAC80211=y
75CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" 79CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
76CONFIG_MTD=y 80CONFIG_MTD=y
77CONFIG_MTD_CMDLINE_PARTS=y 81CONFIG_MTD_CMDLINE_PARTS=y
78CONFIG_MTD_CHAR=y
79CONFIG_MTD_BLOCK=y 82CONFIG_MTD_BLOCK=y
80CONFIG_MTD_CFI=y 83CONFIG_MTD_CFI=y
81CONFIG_MTD_JEDECPROBE=y 84CONFIG_MTD_JEDECPROBE=y
@@ -140,6 +143,7 @@ CONFIG_HID_TOPSEED=y
140CONFIG_HID_THRUSTMASTER=y 143CONFIG_HID_THRUSTMASTER=y
141CONFIG_HID_ZEROPLUS=y 144CONFIG_HID_ZEROPLUS=y
142CONFIG_USB=y 145CONFIG_USB=y
146CONFIG_USB_XHCI_HCD=y
143CONFIG_USB_EHCI_HCD=y 147CONFIG_USB_EHCI_HCD=y
144CONFIG_USB_EHCI_ROOT_HUB_TT=y 148CONFIG_USB_EHCI_ROOT_HUB_TT=y
145CONFIG_USB_PRINTER=m 149CONFIG_USB_PRINTER=m
diff --git a/arch/arm/configs/kzm9g_defconfig b/arch/arm/configs/kzm9g_defconfig
index f6e585b353a4..1ad028023a64 100644
--- a/arch/arm/configs/kzm9g_defconfig
+++ b/arch/arm/configs/kzm9g_defconfig
@@ -84,9 +84,12 @@ CONFIG_I2C_CHARDEV=y
84CONFIG_I2C_SH_MOBILE=y 84CONFIG_I2C_SH_MOBILE=y
85CONFIG_GPIO_PCF857X=y 85CONFIG_GPIO_PCF857X=y
86# CONFIG_HWMON is not set 86# CONFIG_HWMON is not set
87CONFIG_MFD_AS3711=y
87CONFIG_REGULATOR=y 88CONFIG_REGULATOR=y
89CONFIG_REGULATOR_AS3711=y
88CONFIG_FB=y 90CONFIG_FB=y
89CONFIG_FB_SH_MOBILE_LCDC=y 91CONFIG_FB_SH_MOBILE_LCDC=y
92CONFIG_BACKLIGHT_AS3711=y
90CONFIG_FRAMEBUFFER_CONSOLE=y 93CONFIG_FRAMEBUFFER_CONSOLE=y
91CONFIG_LOGO=y 94CONFIG_LOGO=y
92CONFIG_FB_SH_MOBILE_MERAM=y 95CONFIG_FB_SH_MOBILE_MERAM=y
diff --git a/arch/arm/configs/multi_v7_defconfig b/arch/arm/configs/multi_v7_defconfig
index 2e67a272df70..6e572c64cf5a 100644
--- a/arch/arm/configs/multi_v7_defconfig
+++ b/arch/arm/configs/multi_v7_defconfig
@@ -1,83 +1,171 @@
1CONFIG_EXPERIMENTAL=y 1CONFIG_IRQ_DOMAIN_DEBUG=y
2CONFIG_NO_HZ=y 2CONFIG_NO_HZ=y
3CONFIG_HIGH_RES_TIMERS=y 3CONFIG_HIGH_RES_TIMERS=y
4CONFIG_BLK_DEV_INITRD=y
4CONFIG_ARCH_MVEBU=y 5CONFIG_ARCH_MVEBU=y
5CONFIG_MACH_ARMADA_370=y 6CONFIG_MACH_ARMADA_370=y
6CONFIG_ARCH_SIRF=y
7CONFIG_MACH_ARMADA_XP=y 7CONFIG_MACH_ARMADA_XP=y
8CONFIG_ARCH_BCM=y
9CONFIG_GPIO_PCA953X=y
8CONFIG_ARCH_HIGHBANK=y 10CONFIG_ARCH_HIGHBANK=y
11CONFIG_ARCH_KEYSTONE=y
12CONFIG_ARCH_MXC=y
13CONFIG_MACH_IMX51_DT=y
14CONFIG_SOC_IMX53=y
15CONFIG_SOC_IMX6Q=y
16CONFIG_SOC_IMX6SL=y
17CONFIG_SOC_VF610=y
18CONFIG_ARCH_OMAP3=y
19CONFIG_ARCH_OMAP4=y
20CONFIG_SOC_OMAP5=y
21CONFIG_SOC_AM33XX=y
22CONFIG_SOC_AM43XX=y
23CONFIG_ARCH_ROCKCHIP=y
9CONFIG_ARCH_SOCFPGA=y 24CONFIG_ARCH_SOCFPGA=y
10CONFIG_ARCH_SUNXI=y
11CONFIG_ARCH_WM8850=y
12# CONFIG_ARCH_VEXPRESS_CORTEX_A5_A9_ERRATA is not set
13CONFIG_ARCH_ZYNQ=y
14CONFIG_ARM_ERRATA_754322=y
15CONFIG_PLAT_SPEAR=y 25CONFIG_PLAT_SPEAR=y
16CONFIG_ARCH_SPEAR13XX=y 26CONFIG_ARCH_SPEAR13XX=y
17CONFIG_MACH_SPEAR1310=y 27CONFIG_MACH_SPEAR1310=y
18CONFIG_MACH_SPEAR1340=y 28CONFIG_MACH_SPEAR1340=y
29CONFIG_ARCH_STI=y
30CONFIG_ARCH_SUNXI=y
31CONFIG_ARCH_SIRF=y
32CONFIG_ARCH_TEGRA=y
33CONFIG_ARCH_TEGRA_2x_SOC=y
34CONFIG_ARCH_TEGRA_3x_SOC=y
35CONFIG_ARCH_TEGRA_114_SOC=y
36CONFIG_TEGRA_PCI=y
37CONFIG_TEGRA_EMC_SCALING_ENABLE=y
38CONFIG_ARCH_U8500=y
39CONFIG_MACH_SNOWBALL=y
40CONFIG_MACH_UX500_DT=y
41CONFIG_ARCH_VEXPRESS=y
42CONFIG_ARCH_VEXPRESS_CA9X4=y
43CONFIG_ARCH_VIRT=y
44CONFIG_ARCH_WM8850=y
45CONFIG_ARCH_ZYNQ=y
19CONFIG_SMP=y 46CONFIG_SMP=y
20CONFIG_ARM_ARCH_TIMER=y
21CONFIG_AEABI=y
22CONFIG_HIGHMEM=y
23CONFIG_HIGHPTE=y 47CONFIG_HIGHPTE=y
24CONFIG_ARM_APPENDED_DTB=y 48CONFIG_ARM_APPENDED_DTB=y
25CONFIG_VFP=y
26CONFIG_NEON=y
27CONFIG_NET=y 49CONFIG_NET=y
50CONFIG_UNIX=y
51CONFIG_INET=y
52CONFIG_IP_PNP=y
53CONFIG_IP_PNP_DHCP=y
54CONFIG_DEVTMPFS=y
55CONFIG_DEVTMPFS_MOUNT=y
56CONFIG_OMAP_OCP2SCP=y
28CONFIG_BLK_DEV_SD=y 57CONFIG_BLK_DEV_SD=y
29CONFIG_ATA=y 58CONFIG_ATA=y
59CONFIG_SATA_AHCI_PLATFORM=y
30CONFIG_SATA_HIGHBANK=y 60CONFIG_SATA_HIGHBANK=y
31CONFIG_SATA_MV=y 61CONFIG_SATA_MV=y
32CONFIG_SATA_AHCI_PLATFORM=y
33CONFIG_NETDEVICES=y 62CONFIG_NETDEVICES=y
63CONFIG_SUN4I_EMAC=y
34CONFIG_NET_CALXEDA_XGMAC=y 64CONFIG_NET_CALXEDA_XGMAC=y
65CONFIG_KS8851=y
35CONFIG_SMSC911X=y 66CONFIG_SMSC911X=y
36CONFIG_STMMAC_ETH=y 67CONFIG_STMMAC_ETH=y
68CONFIG_MDIO_SUN4I=y
69CONFIG_KEYBOARD_SPEAR=y
37CONFIG_SERIO_AMBAKMI=y 70CONFIG_SERIO_AMBAKMI=y
38CONFIG_SERIAL_8250=y 71CONFIG_SERIAL_8250=y
39CONFIG_SERIAL_8250_CONSOLE=y 72CONFIG_SERIAL_8250_CONSOLE=y
40CONFIG_SERIAL_8250_DW=y 73CONFIG_SERIAL_8250_DW=y
41CONFIG_KEYBOARD_SPEAR=y
42CONFIG_SERIAL_AMBA_PL011=y 74CONFIG_SERIAL_AMBA_PL011=y
43CONFIG_SERIAL_AMBA_PL011_CONSOLE=y 75CONFIG_SERIAL_AMBA_PL011_CONSOLE=y
44CONFIG_SERIAL_OF_PLATFORM=y
45CONFIG_SERIAL_SIRFSOC=y 76CONFIG_SERIAL_SIRFSOC=y
46CONFIG_SERIAL_SIRFSOC_CONSOLE=y 77CONFIG_SERIAL_SIRFSOC_CONSOLE=y
78CONFIG_SERIAL_TEGRA=y
79CONFIG_SERIAL_IMX=y
80CONFIG_SERIAL_IMX_CONSOLE=y
47CONFIG_SERIAL_VT8500=y 81CONFIG_SERIAL_VT8500=y
48CONFIG_SERIAL_VT8500_CONSOLE=y 82CONFIG_SERIAL_VT8500_CONSOLE=y
49CONFIG_IPMI_HANDLER=y 83CONFIG_SERIAL_OF_PLATFORM=y
50CONFIG_IPMI_SI=y 84CONFIG_SERIAL_OMAP=y
51CONFIG_I2C=y 85CONFIG_SERIAL_OMAP_CONSOLE=y
86CONFIG_SERIAL_XILINX_PS_UART=y
87CONFIG_SERIAL_XILINX_PS_UART_CONSOLE=y
88CONFIG_SERIAL_FSL_LPUART=y
89CONFIG_SERIAL_FSL_LPUART_CONSOLE=y
52CONFIG_I2C_DESIGNWARE_PLATFORM=y 90CONFIG_I2C_DESIGNWARE_PLATFORM=y
53CONFIG_I2C_SIRF=y 91CONFIG_I2C_SIRF=y
92CONFIG_I2C_TEGRA=y
54CONFIG_SPI=y 93CONFIG_SPI=y
94CONFIG_SPI_OMAP24XX=y
55CONFIG_SPI_PL022=y 95CONFIG_SPI_PL022=y
56CONFIG_SPI_SIRF=y 96CONFIG_SPI_SIRF=y
57CONFIG_GPIO_PL061=y 97CONFIG_SPI_TEGRA114=y
58CONFIG_FB=y 98CONFIG_SPI_TEGRA20_SLINK=y
99CONFIG_PINCTRL_SINGLE=y
100CONFIG_GPIO_GENERIC_PLATFORM=y
101CONFIG_GPIO_TWL4030=y
102CONFIG_REGULATOR_GPIO=y
103CONFIG_REGULATOR_AB8500=y
104CONFIG_REGULATOR_TPS51632=y
105CONFIG_REGULATOR_TPS62360=y
106CONFIG_REGULATOR_TWL4030=y
107CONFIG_REGULATOR_VEXPRESS=y
108CONFIG_DRM=y
109CONFIG_TEGRA_HOST1X=y
110CONFIG_DRM_TEGRA=y
59CONFIG_FB_ARMCLCD=y 111CONFIG_FB_ARMCLCD=y
60CONFIG_FB_WM8505=y 112CONFIG_FB_WM8505=y
61CONFIG_FRAMEBUFFER_CONSOLE=y 113CONFIG_FB_SIMPLE=y
62CONFIG_USB=y 114CONFIG_USB=y
115CONFIG_USB_XHCI_HCD=y
116CONFIG_USB_EHCI_HCD=y
117CONFIG_USB_EHCI_TEGRA=y
118CONFIG_USB_EHCI_HCD_PLATFORM=y
63CONFIG_USB_ISP1760_HCD=y 119CONFIG_USB_ISP1760_HCD=y
64CONFIG_USB_STORAGE=y 120CONFIG_USB_STORAGE=y
121CONFIG_USB_CHIPIDEA=y
122CONFIG_USB_CHIPIDEA_HOST=y
123CONFIG_AB8500_USB=y
124CONFIG_NOP_USB_XCEIV=y
125CONFIG_OMAP_USB2=y
126CONFIG_OMAP_USB3=y
127CONFIG_SAMSUNG_USB2PHY=y
128CONFIG_SAMSUNG_USB3PHY=y
129CONFIG_USB_GPIO_VBUS=y
130CONFIG_USB_ISP1301=y
131CONFIG_USB_MXS_PHY=y
65CONFIG_MMC=y 132CONFIG_MMC=y
66CONFIG_MMC_ARMMMCI=y 133CONFIG_MMC_ARMMMCI=y
67CONFIG_MMC_SDHCI=y 134CONFIG_MMC_SDHCI=y
68CONFIG_MMC_SDHCI_PLTFM=y 135CONFIG_MMC_SDHCI_PLTFM=y
136CONFIG_MMC_SDHCI_TEGRA=y
69CONFIG_MMC_SDHCI_SPEAR=y 137CONFIG_MMC_SDHCI_SPEAR=y
70CONFIG_MMC_WMT=y 138CONFIG_MMC_OMAP=y
139CONFIG_MMC_OMAP_HS=y
71CONFIG_EDAC=y 140CONFIG_EDAC=y
72CONFIG_EDAC_MM_EDAC=y 141CONFIG_EDAC_MM_EDAC=y
73CONFIG_EDAC_HIGHBANK_MC=y 142CONFIG_EDAC_HIGHBANK_MC=y
74CONFIG_EDAC_HIGHBANK_L2=y 143CONFIG_EDAC_HIGHBANK_L2=y
75CONFIG_RTC_CLASS=y 144CONFIG_RTC_CLASS=y
145CONFIG_RTC_DRV_TWL4030=y
76CONFIG_RTC_DRV_PL031=y 146CONFIG_RTC_DRV_PL031=y
77CONFIG_RTC_DRV_VT8500=y 147CONFIG_RTC_DRV_VT8500=y
78CONFIG_PWM=y 148CONFIG_RTC_DRV_TEGRA=y
79CONFIG_PWM_VT8500=y
80CONFIG_DMADEVICES=y 149CONFIG_DMADEVICES=y
81CONFIG_PL330_DMA=y
82CONFIG_SIRF_DMA=y
83CONFIG_DW_DMAC=y 150CONFIG_DW_DMAC=y
151CONFIG_TEGRA20_APB_DMA=y
152CONFIG_STE_DMA40=y
153CONFIG_SIRF_DMA=y
154CONFIG_TI_EDMA=y
155CONFIG_PL330_DMA=y
156CONFIG_IMX_SDMA=y
157CONFIG_IMX_DMA=y
158CONFIG_MXS_DMA=y
159CONFIG_DMA_OMAP=y
160CONFIG_PWM=y
161CONFIG_PWM_VT8500=y
162CONFIG_EXT4_FS=y
163CONFIG_TMPFS=y
164CONFIG_NFS_FS=y
165CONFIG_NFS_V3_ACL=y
166CONFIG_NFS_V4=y
167CONFIG_ROOT_NFS=y
168CONFIG_PRINTK_TIME=y
169CONFIG_DEBUG_FS=y
170CONFIG_DEBUG_KERNEL=y
171CONFIG_LOCKUP_DETECTOR=y
diff --git a/arch/arm/configs/mvebu_defconfig b/arch/arm/configs/mvebu_defconfig
index f3e8ae001ff1..731814e2c189 100644
--- a/arch/arm/configs/mvebu_defconfig
+++ b/arch/arm/configs/mvebu_defconfig
@@ -13,6 +13,8 @@ CONFIG_MACH_ARMADA_370=y
13CONFIG_MACH_ARMADA_XP=y 13CONFIG_MACH_ARMADA_XP=y
14# CONFIG_CACHE_L2X0 is not set 14# CONFIG_CACHE_L2X0 is not set
15# CONFIG_SWP_EMULATE is not set 15# CONFIG_SWP_EMULATE is not set
16CONFIG_PCI=y
17CONFIG_PCI_MVEBU=y
16CONFIG_SMP=y 18CONFIG_SMP=y
17CONFIG_AEABI=y 19CONFIG_AEABI=y
18CONFIG_HIGHMEM=y 20CONFIG_HIGHMEM=y
@@ -60,6 +62,8 @@ CONFIG_USB_SUPPORT=y
60CONFIG_USB=y 62CONFIG_USB=y
61CONFIG_USB_EHCI_HCD=y 63CONFIG_USB_EHCI_HCD=y
62CONFIG_USB_EHCI_ROOT_HUB_TT=y 64CONFIG_USB_EHCI_ROOT_HUB_TT=y
65CONFIG_USB_STORAGE=y
66CONFIG_USB_XHCI_HCD=y
63CONFIG_MMC=y 67CONFIG_MMC=y
64CONFIG_MMC_MVSDIO=y 68CONFIG_MMC_MVSDIO=y
65CONFIG_NEW_LEDS=y 69CONFIG_NEW_LEDS=y
@@ -96,5 +100,3 @@ CONFIG_TIMER_STATS=y
96# CONFIG_DEBUG_BUGVERBOSE is not set 100# CONFIG_DEBUG_BUGVERBOSE is not set
97CONFIG_DEBUG_INFO=y 101CONFIG_DEBUG_INFO=y
98CONFIG_DEBUG_USER=y 102CONFIG_DEBUG_USER=y
99CONFIG_DEBUG_LL=y
100CONFIG_EARLY_PRINTK=y
diff --git a/arch/arm/configs/nhk8815_defconfig b/arch/arm/configs/nhk8815_defconfig
index b01e7632ed2e..263ae3869e32 100644
--- a/arch/arm/configs/nhk8815_defconfig
+++ b/arch/arm/configs/nhk8815_defconfig
@@ -1,6 +1,8 @@
1# CONFIG_LOCALVERSION_AUTO is not set 1# CONFIG_LOCALVERSION_AUTO is not set
2# CONFIG_SWAP is not set 2# CONFIG_SWAP is not set
3CONFIG_SYSVIPC=y 3CONFIG_SYSVIPC=y
4CONFIG_NO_HZ_IDLE=y
5CONFIG_HIGH_RES_TIMERS=y
4CONFIG_IKCONFIG=y 6CONFIG_IKCONFIG=y
5CONFIG_IKCONFIG_PROC=y 7CONFIG_IKCONFIG_PROC=y
6CONFIG_LOG_BUF_SHIFT=14 8CONFIG_LOG_BUF_SHIFT=14
@@ -48,7 +50,6 @@ CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
48CONFIG_MTD=y 50CONFIG_MTD=y
49CONFIG_MTD_TESTS=m 51CONFIG_MTD_TESTS=m
50CONFIG_MTD_CMDLINE_PARTS=y 52CONFIG_MTD_CMDLINE_PARTS=y
51CONFIG_MTD_CHAR=y
52CONFIG_MTD_BLOCK=y 53CONFIG_MTD_BLOCK=y
53CONFIG_MTD_NAND_ECC_SMC=y 54CONFIG_MTD_NAND_ECC_SMC=y
54CONFIG_MTD_NAND=y 55CONFIG_MTD_NAND=y
@@ -81,6 +82,7 @@ CONFIG_PPP_SYNC_TTY=m
81# CONFIG_INPUT_MOUSEDEV is not set 82# CONFIG_INPUT_MOUSEDEV is not set
82CONFIG_INPUT_EVDEV=y 83CONFIG_INPUT_EVDEV=y
83# CONFIG_KEYBOARD_ATKBD is not set 84# CONFIG_KEYBOARD_ATKBD is not set
85CONFIG_KEYBOARD_GPIO=y
84# CONFIG_MOUSE_PS2 is not set 86# CONFIG_MOUSE_PS2 is not set
85# CONFIG_SERIO is not set 87# CONFIG_SERIO is not set
86# CONFIG_LEGACY_PTYS is not set 88# CONFIG_LEGACY_PTYS is not set
@@ -93,9 +95,16 @@ CONFIG_I2C_GPIO=y
93CONFIG_I2C_NOMADIK=y 95CONFIG_I2C_NOMADIK=y
94CONFIG_DEBUG_GPIO=y 96CONFIG_DEBUG_GPIO=y
95# CONFIG_HWMON is not set 97# CONFIG_HWMON is not set
98CONFIG_REGULATOR=y
96CONFIG_MMC=y 99CONFIG_MMC=y
97CONFIG_MMC_CLKGATE=y 100CONFIG_MMC_UNSAFE_RESUME=y
101# CONFIG_MMC_BLOCK_BOUNCE is not set
98CONFIG_MMC_ARMMMCI=y 102CONFIG_MMC_ARMMMCI=y
103CONFIG_NEW_LEDS=y
104CONFIG_LEDS_CLASS=y
105CONFIG_LEDS_GPIO=y
106CONFIG_LEDS_TRIGGERS=y
107CONFIG_LEDS_TRIGGER_HEARTBEAT=y
99CONFIG_RTC_CLASS=y 108CONFIG_RTC_CLASS=y
100CONFIG_RTC_DRV_PL031=y 109CONFIG_RTC_DRV_PL031=y
101CONFIG_DMADEVICES=y 110CONFIG_DMADEVICES=y
diff --git a/arch/arm/configs/omap1_defconfig b/arch/arm/configs/omap1_defconfig
index 9940f7b4e438..d74edbad18fc 100644
--- a/arch/arm/configs/omap1_defconfig
+++ b/arch/arm/configs/omap1_defconfig
@@ -26,7 +26,8 @@ CONFIG_ARCH_OMAP=y
26CONFIG_ARCH_OMAP1=y 26CONFIG_ARCH_OMAP1=y
27CONFIG_OMAP_RESET_CLOCKS=y 27CONFIG_OMAP_RESET_CLOCKS=y
28# CONFIG_OMAP_MUX is not set 28# CONFIG_OMAP_MUX is not set
29CONFIG_OMAP_MBOX_FWK=y 29CONFIG_MAILBOX=y
30CONFIG_OMAP1_MBOX=y
30CONFIG_OMAP_32K_TIMER=y 31CONFIG_OMAP_32K_TIMER=y
31CONFIG_OMAP_DM_TIMER=y 32CONFIG_OMAP_DM_TIMER=y
32CONFIG_ARCH_OMAP730=y 33CONFIG_ARCH_OMAP730=y
diff --git a/arch/arm/configs/omap2plus_defconfig b/arch/arm/configs/omap2plus_defconfig
index abbe31937c65..5339e6a4d639 100644
--- a/arch/arm/configs/omap2plus_defconfig
+++ b/arch/arm/configs/omap2plus_defconfig
@@ -22,6 +22,10 @@ CONFIG_MODULE_SRCVERSION_ALL=y
22# CONFIG_BLK_DEV_BSG is not set 22# CONFIG_BLK_DEV_BSG is not set
23CONFIG_ARCH_MULTI_V6=y 23CONFIG_ARCH_MULTI_V6=y
24CONFIG_ARCH_OMAP2PLUS=y 24CONFIG_ARCH_OMAP2PLUS=y
25CONFIG_ARCH_OMAP2=y
26CONFIG_ARCH_OMAP3=y
27CONFIG_ARCH_OMAP4=y
28CONFIG_SOC_AM33XX=y
25CONFIG_OMAP_RESET_CLOCKS=y 29CONFIG_OMAP_RESET_CLOCKS=y
26CONFIG_OMAP_MUX_DEBUG=y 30CONFIG_OMAP_MUX_DEBUG=y
27CONFIG_ARCH_VEXPRESS_CA9X4=y 31CONFIG_ARCH_VEXPRESS_CA9X4=y
@@ -34,6 +38,8 @@ CONFIG_NR_CPUS=2
34CONFIG_LEDS=y 38CONFIG_LEDS=y
35CONFIG_ZBOOT_ROM_TEXT=0x0 39CONFIG_ZBOOT_ROM_TEXT=0x0
36CONFIG_ZBOOT_ROM_BSS=0x0 40CONFIG_ZBOOT_ROM_BSS=0x0
41CONFIG_ARM_APPENDED_DTB=y
42CONFIG_ARM_ATAG_DTB_COMPAT=y
37CONFIG_CMDLINE="root=/dev/mmcblk0p2 rootwait console=ttyO2,115200" 43CONFIG_CMDLINE="root=/dev/mmcblk0p2 rootwait console=ttyO2,115200"
38CONFIG_KEXEC=y 44CONFIG_KEXEC=y
39CONFIG_FPE_NWFPE=y 45CONFIG_FPE_NWFPE=y
@@ -152,6 +158,13 @@ CONFIG_W1=y
152CONFIG_POWER_SUPPLY=y 158CONFIG_POWER_SUPPLY=y
153CONFIG_SENSORS_LM75=m 159CONFIG_SENSORS_LM75=m
154CONFIG_WATCHDOG=y 160CONFIG_WATCHDOG=y
161CONFIG_THERMAL=y
162CONFIG_THERMAL_HWMON=y
163CONFIG_THERMAL_DEFAULT_GOV_STEP_WISE=y
164CONFIG_THERMAL_GOV_FAIR_SHARE=y
165CONFIG_THERMAL_GOV_STEP_WISE=y
166CONFIG_THERMAL_GOV_USER_SPACE=y
167CONFIG_CPU_THERMAL=y
155CONFIG_OMAP_WATCHDOG=y 168CONFIG_OMAP_WATCHDOG=y
156CONFIG_TWL4030_WATCHDOG=y 169CONFIG_TWL4030_WATCHDOG=y
157CONFIG_MFD_TPS65217=y 170CONFIG_MFD_TPS65217=y
@@ -210,6 +223,8 @@ CONFIG_USB_WDM=y
210CONFIG_USB_STORAGE=y 223CONFIG_USB_STORAGE=y
211CONFIG_USB_LIBUSUAL=y 224CONFIG_USB_LIBUSUAL=y
212CONFIG_USB_TEST=y 225CONFIG_USB_TEST=y
226CONFIG_USB_PHY=y
227CONFIG_NOP_USB_XCEIV=y
213CONFIG_USB_GADGET=y 228CONFIG_USB_GADGET=y
214CONFIG_USB_GADGET_DEBUG=y 229CONFIG_USB_GADGET_DEBUG=y
215CONFIG_USB_GADGET_DEBUG_FILES=y 230CONFIG_USB_GADGET_DEBUG_FILES=y
@@ -236,7 +251,13 @@ CONFIG_RTC_DRV_TWL92330=y
236CONFIG_RTC_DRV_TWL4030=y 251CONFIG_RTC_DRV_TWL4030=y
237CONFIG_RTC_DRV_OMAP=y 252CONFIG_RTC_DRV_OMAP=y
238CONFIG_DMADEVICES=y 253CONFIG_DMADEVICES=y
254CONFIG_TI_EDMA=y
239CONFIG_DMA_OMAP=y 255CONFIG_DMA_OMAP=y
256CONFIG_TI_SOC_THERMAL=y
257CONFIG_TI_THERMAL=y
258CONFIG_OMAP4_THERMAL=y
259CONFIG_OMAP5_THERMAL=y
260CONFIG_DRA752_THERMAL=y
240CONFIG_EXT2_FS=y 261CONFIG_EXT2_FS=y
241CONFIG_EXT3_FS=y 262CONFIG_EXT3_FS=y
242# CONFIG_EXT3_FS_XATTR is not set 263# CONFIG_EXT3_FS_XATTR is not set
@@ -284,3 +305,4 @@ CONFIG_SOC_OMAP5=y
284CONFIG_TI_DAVINCI_MDIO=y 305CONFIG_TI_DAVINCI_MDIO=y
285CONFIG_TI_DAVINCI_CPDMA=y 306CONFIG_TI_DAVINCI_CPDMA=y
286CONFIG_TI_CPSW=y 307CONFIG_TI_CPSW=y
308CONFIG_AT803X_PHY=y
diff --git a/arch/arm/configs/sama5_defconfig b/arch/arm/configs/sama5_defconfig
index 4d0dc3c16063..f6e78f83c3c3 100644
--- a/arch/arm/configs/sama5_defconfig
+++ b/arch/arm/configs/sama5_defconfig
@@ -26,7 +26,9 @@ CONFIG_AEABI=y
26CONFIG_UACCESS_WITH_MEMCPY=y 26CONFIG_UACCESS_WITH_MEMCPY=y
27CONFIG_ZBOOT_ROM_TEXT=0x0 27CONFIG_ZBOOT_ROM_TEXT=0x0
28CONFIG_ZBOOT_ROM_BSS=0x0 28CONFIG_ZBOOT_ROM_BSS=0x0
29CONFIG_ARM_APPENDED_DTB=y
29CONFIG_CMDLINE="console=ttyS0,115200 initrd=0x21100000,25165824 root=/dev/ram0 rw" 30CONFIG_CMDLINE="console=ttyS0,115200 initrd=0x21100000,25165824 root=/dev/ram0 rw"
31CONFIG_KEXEC=y
30CONFIG_AUTO_ZRELADDR=y 32CONFIG_AUTO_ZRELADDR=y
31CONFIG_VFP=y 33CONFIG_VFP=y
32# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set 34# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
@@ -39,6 +41,9 @@ CONFIG_UNIX=y
39CONFIG_INET=y 41CONFIG_INET=y
40CONFIG_IP_MULTICAST=y 42CONFIG_IP_MULTICAST=y
41CONFIG_IP_PNP=y 43CONFIG_IP_PNP=y
44CONFIG_IP_PNP_DHCP=y
45CONFIG_IP_PNP_BOOTP=y
46CONFIG_IP_PNP_RARP=y
42# CONFIG_INET_XFRM_MODE_TRANSPORT is not set 47# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
43# CONFIG_INET_XFRM_MODE_TUNNEL is not set 48# CONFIG_INET_XFRM_MODE_TUNNEL is not set
44# CONFIG_INET_XFRM_MODE_BEET is not set 49# CONFIG_INET_XFRM_MODE_BEET is not set
@@ -68,6 +73,8 @@ CONFIG_MTD_M25P80=y
68CONFIG_MTD_NAND=y 73CONFIG_MTD_NAND=y
69CONFIG_MTD_NAND_ATMEL=y 74CONFIG_MTD_NAND_ATMEL=y
70CONFIG_MTD_UBI=y 75CONFIG_MTD_UBI=y
76CONFIG_MTD_UBI_GLUEBI=y
77CONFIG_PROC_DEVICETREE=y
71CONFIG_BLK_DEV_LOOP=y 78CONFIG_BLK_DEV_LOOP=y
72CONFIG_BLK_DEV_RAM=y 79CONFIG_BLK_DEV_RAM=y
73CONFIG_BLK_DEV_RAM_COUNT=4 80CONFIG_BLK_DEV_RAM_COUNT=4
@@ -95,7 +102,19 @@ CONFIG_MACB=y
95# CONFIG_NET_VENDOR_STMICRO is not set 102# CONFIG_NET_VENDOR_STMICRO is not set
96# CONFIG_NET_VENDOR_WIZNET is not set 103# CONFIG_NET_VENDOR_WIZNET is not set
97CONFIG_MICREL_PHY=y 104CONFIG_MICREL_PHY=y
98# CONFIG_WLAN is not set 105CONFIG_LIBERTAS_THINFIRM=m
106CONFIG_LIBERTAS_THINFIRM_USB=m
107CONFIG_RTL8187=m
108CONFIG_RT2X00=m
109CONFIG_RT2500USB=m
110CONFIG_RT73USB=m
111CONFIG_RT2800USB=m
112CONFIG_RT2800USB_RT53XX=y
113CONFIG_RT2800USB_RT55XX=y
114CONFIG_RT2800USB_UNKNOWN=y
115CONFIG_MWIFIEX=m
116CONFIG_MWIFIEX_SDIO=m
117CONFIG_MWIFIEX_USB=m
99# CONFIG_INPUT_MOUSEDEV is not set 118# CONFIG_INPUT_MOUSEDEV is not set
100CONFIG_INPUT_EVDEV=y 119CONFIG_INPUT_EVDEV=y
101# CONFIG_KEYBOARD_ATKBD is not set 120# CONFIG_KEYBOARD_ATKBD is not set
@@ -133,9 +152,13 @@ CONFIG_USB_EHCI_HCD=y
133CONFIG_USB_OHCI_HCD=y 152CONFIG_USB_OHCI_HCD=y
134CONFIG_USB_ACM=y 153CONFIG_USB_ACM=y
135CONFIG_USB_STORAGE=y 154CONFIG_USB_STORAGE=y
155CONFIG_USB_SERIAL=y
156CONFIG_USB_SERIAL_GENERIC=y
157CONFIG_USB_SERIAL_FTDI_SIO=y
158CONFIG_USB_SERIAL_PL2303=y
136CONFIG_USB_GADGET=y 159CONFIG_USB_GADGET=y
137CONFIG_USB_AT91=y 160CONFIG_USB_ATMEL_USBA=y
138CONFIG_USB_MASS_STORAGE=m 161CONFIG_USB_G_SERIAL=y
139CONFIG_MMC=y 162CONFIG_MMC=y
140# CONFIG_MMC_BLOCK_BOUNCE is not set 163# CONFIG_MMC_BLOCK_BOUNCE is not set
141CONFIG_MMC_ATMELMCI=y 164CONFIG_MMC_ATMELMCI=y
@@ -151,18 +174,18 @@ CONFIG_DMADEVICES=y
151# CONFIG_IOMMU_SUPPORT is not set 174# CONFIG_IOMMU_SUPPORT is not set
152CONFIG_IIO=y 175CONFIG_IIO=y
153CONFIG_AT91_ADC=y 176CONFIG_AT91_ADC=y
154CONFIG_EXT2_FS=y 177CONFIG_EXT4_FS=y
155CONFIG_FANOTIFY=y 178CONFIG_FANOTIFY=y
156CONFIG_VFAT_FS=y 179CONFIG_VFAT_FS=y
157CONFIG_TMPFS=y 180CONFIG_TMPFS=y
158CONFIG_JFFS2_FS=y
159CONFIG_JFFS2_SUMMARY=y
160CONFIG_UBIFS_FS=y 181CONFIG_UBIFS_FS=y
182CONFIG_UBIFS_FS_ADVANCED_COMPR=y
161CONFIG_NFS_FS=y 183CONFIG_NFS_FS=y
162CONFIG_ROOT_NFS=y 184CONFIG_ROOT_NFS=y
163CONFIG_NLS_CODEPAGE_437=y 185CONFIG_NLS_CODEPAGE_437=y
164CONFIG_NLS_CODEPAGE_850=y 186CONFIG_NLS_CODEPAGE_850=y
165CONFIG_NLS_ISO8859_1=y 187CONFIG_NLS_ISO8859_1=y
188CONFIG_NLS_UTF8=y
166CONFIG_STRIP_ASM_SYMS=y 189CONFIG_STRIP_ASM_SYMS=y
167CONFIG_DEBUG_FS=y 190CONFIG_DEBUG_FS=y
168# CONFIG_SCHED_DEBUG is not set 191# CONFIG_SCHED_DEBUG is not set
diff --git a/arch/arm/configs/spear13xx_defconfig b/arch/arm/configs/spear13xx_defconfig
index 1fdb82694ca2..82eaa552ed14 100644
--- a/arch/arm/configs/spear13xx_defconfig
+++ b/arch/arm/configs/spear13xx_defconfig
@@ -61,7 +61,6 @@ CONFIG_GPIO_SYSFS=y
61CONFIG_GPIO_PL061=y 61CONFIG_GPIO_PL061=y
62# CONFIG_HWMON is not set 62# CONFIG_HWMON is not set
63CONFIG_WATCHDOG=y 63CONFIG_WATCHDOG=y
64CONFIG_MPCORE_WATCHDOG=y
65# CONFIG_HID_SUPPORT is not set 64# CONFIG_HID_SUPPORT is not set
66CONFIG_USB=y 65CONFIG_USB=y
67# CONFIG_USB_DEVICE_CLASS is not set 66# CONFIG_USB_DEVICE_CLASS is not set
diff --git a/arch/arm/configs/tegra_defconfig b/arch/arm/configs/tegra_defconfig
index f7ba316164d4..1effb43dab80 100644
--- a/arch/arm/configs/tegra_defconfig
+++ b/arch/arm/configs/tegra_defconfig
@@ -21,8 +21,8 @@ CONFIG_MODULE_FORCE_UNLOAD=y
21CONFIG_PARTITION_ADVANCED=y 21CONFIG_PARTITION_ADVANCED=y
22# CONFIG_IOSCHED_DEADLINE is not set 22# CONFIG_IOSCHED_DEADLINE is not set
23# CONFIG_IOSCHED_CFQ is not set 23# CONFIG_IOSCHED_CFQ is not set
24CONFIG_ARCH_TEGRA=y
25CONFIG_GPIO_PCA953X=y 24CONFIG_GPIO_PCA953X=y
25CONFIG_ARCH_TEGRA=y
26CONFIG_ARCH_TEGRA_2x_SOC=y 26CONFIG_ARCH_TEGRA_2x_SOC=y
27CONFIG_ARCH_TEGRA_3x_SOC=y 27CONFIG_ARCH_TEGRA_3x_SOC=y
28CONFIG_ARCH_TEGRA_114_SOC=y 28CONFIG_ARCH_TEGRA_114_SOC=y
@@ -36,7 +36,6 @@ CONFIG_HIGHMEM=y
36CONFIG_ZBOOT_ROM_TEXT=0x0 36CONFIG_ZBOOT_ROM_TEXT=0x0
37CONFIG_ZBOOT_ROM_BSS=0x0 37CONFIG_ZBOOT_ROM_BSS=0x0
38CONFIG_KEXEC=y 38CONFIG_KEXEC=y
39CONFIG_AUTO_ZRELADDR=y
40CONFIG_CPU_FREQ=y 39CONFIG_CPU_FREQ=y
41CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y 40CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y
42CONFIG_CPU_IDLE=y 41CONFIG_CPU_IDLE=y
@@ -81,7 +80,6 @@ CONFIG_DEVTMPFS_MOUNT=y
81# CONFIG_FIRMWARE_IN_KERNEL is not set 80# CONFIG_FIRMWARE_IN_KERNEL is not set
82CONFIG_CMA=y 81CONFIG_CMA=y
83CONFIG_MTD=y 82CONFIG_MTD=y
84CONFIG_MTD_CHAR=y
85CONFIG_MTD_M25P80=y 83CONFIG_MTD_M25P80=y
86CONFIG_PROC_DEVICETREE=y 84CONFIG_PROC_DEVICETREE=y
87CONFIG_BLK_DEV_LOOP=y 85CONFIG_BLK_DEV_LOOP=y
@@ -105,8 +103,8 @@ CONFIG_BRCMFMAC=m
105CONFIG_RT2X00=y 103CONFIG_RT2X00=y
106CONFIG_RT2800USB=m 104CONFIG_RT2800USB=m
107CONFIG_INPUT_EVDEV=y 105CONFIG_INPUT_EVDEV=y
108CONFIG_KEYBOARD_TEGRA=y
109CONFIG_KEYBOARD_GPIO=y 106CONFIG_KEYBOARD_GPIO=y
107CONFIG_KEYBOARD_TEGRA=y
110CONFIG_INPUT_MISC=y 108CONFIG_INPUT_MISC=y
111CONFIG_INPUT_MPU3050=y 109CONFIG_INPUT_MPU3050=y
112# CONFIG_LEGACY_PTYS is not set 110# CONFIG_LEGACY_PTYS is not set
@@ -121,6 +119,7 @@ CONFIG_I2C_MUX=y
121CONFIG_I2C_MUX_PINCTRL=y 119CONFIG_I2C_MUX_PINCTRL=y
122CONFIG_I2C_TEGRA=y 120CONFIG_I2C_TEGRA=y
123CONFIG_SPI=y 121CONFIG_SPI=y
122CONFIG_SPI_TEGRA114=y
124CONFIG_SPI_TEGRA20_SFLASH=y 123CONFIG_SPI_TEGRA20_SFLASH=y
125CONFIG_SPI_TEGRA20_SLINK=y 124CONFIG_SPI_TEGRA20_SLINK=y
126CONFIG_GPIO_PCA953X_IRQ=y 125CONFIG_GPIO_PCA953X_IRQ=y
@@ -129,14 +128,15 @@ CONFIG_GPIO_TPS6586X=y
129CONFIG_GPIO_TPS65910=y 128CONFIG_GPIO_TPS65910=y
130CONFIG_POWER_SUPPLY=y 129CONFIG_POWER_SUPPLY=y
131CONFIG_BATTERY_SBS=y 130CONFIG_BATTERY_SBS=y
131CONFIG_CHARGER_TPS65090=y
132CONFIG_POWER_RESET=y 132CONFIG_POWER_RESET=y
133CONFIG_POWER_RESET_GPIO=y 133CONFIG_POWER_RESET_GPIO=y
134CONFIG_SENSORS_LM90=y 134CONFIG_SENSORS_LM90=y
135CONFIG_MFD_TPS6586X=y
136CONFIG_MFD_TPS65910=y
137CONFIG_MFD_MAX8907=y 135CONFIG_MFD_MAX8907=y
138CONFIG_MFD_TPS65090=y
139CONFIG_MFD_PALMAS=y 136CONFIG_MFD_PALMAS=y
137CONFIG_MFD_TPS65090=y
138CONFIG_MFD_TPS6586X=y
139CONFIG_MFD_TPS65910=y
140CONFIG_REGULATOR=y 140CONFIG_REGULATOR=y
141CONFIG_REGULATOR_FIXED_VOLTAGE=y 141CONFIG_REGULATOR_FIXED_VOLTAGE=y
142CONFIG_REGULATOR_VIRTUAL_CONSUMER=y 142CONFIG_REGULATOR_VIRTUAL_CONSUMER=y
@@ -171,6 +171,7 @@ CONFIG_SND=y
171# CONFIG_SND_USB is not set 171# CONFIG_SND_USB is not set
172CONFIG_SND_SOC=y 172CONFIG_SND_SOC=y
173CONFIG_SND_SOC_TEGRA=y 173CONFIG_SND_SOC_TEGRA=y
174CONFIG_SND_SOC_TEGRA_RT5640=y
174CONFIG_SND_SOC_TEGRA_WM8753=y 175CONFIG_SND_SOC_TEGRA_WM8753=y
175CONFIG_SND_SOC_TEGRA_WM8903=y 176CONFIG_SND_SOC_TEGRA_WM8903=y
176CONFIG_SND_SOC_TEGRA_TRIMSLICE=y 177CONFIG_SND_SOC_TEGRA_TRIMSLICE=y
@@ -190,7 +191,13 @@ CONFIG_NEW_LEDS=y
190CONFIG_LEDS_CLASS=y 191CONFIG_LEDS_CLASS=y
191CONFIG_LEDS_GPIO=y 192CONFIG_LEDS_GPIO=y
192CONFIG_LEDS_TRIGGERS=y 193CONFIG_LEDS_TRIGGERS=y
194CONFIG_LEDS_TRIGGER_TIMER=y
195CONFIG_LEDS_TRIGGER_ONESHOT=y
196CONFIG_LEDS_TRIGGER_HEARTBEAT=y
193CONFIG_LEDS_TRIGGER_GPIO=y 197CONFIG_LEDS_TRIGGER_GPIO=y
198CONFIG_LEDS_TRIGGER_DEFAULT_ON=y
199CONFIG_LEDS_TRIGGER_TRANSIENT=y
200CONFIG_LEDS_TRIGGER_CAMERA=y
194CONFIG_RTC_CLASS=y 201CONFIG_RTC_CLASS=y
195CONFIG_RTC_DRV_MAX8907=y 202CONFIG_RTC_DRV_MAX8907=y
196CONFIG_RTC_DRV_PALMAS=y 203CONFIG_RTC_DRV_PALMAS=y
@@ -203,7 +210,6 @@ CONFIG_TEGRA20_APB_DMA=y
203CONFIG_STAGING=y 210CONFIG_STAGING=y
204CONFIG_SENSORS_ISL29018=y 211CONFIG_SENSORS_ISL29018=y
205CONFIG_SENSORS_ISL29028=y 212CONFIG_SENSORS_ISL29028=y
206CONFIG_AK8975=y
207CONFIG_MFD_NVEC=y 213CONFIG_MFD_NVEC=y
208CONFIG_KEYBOARD_NVEC=y 214CONFIG_KEYBOARD_NVEC=y
209CONFIG_SERIO_NVEC_PS2=y 215CONFIG_SERIO_NVEC_PS2=y
@@ -213,6 +219,7 @@ CONFIG_TEGRA_IOMMU_GART=y
213CONFIG_TEGRA_IOMMU_SMMU=y 219CONFIG_TEGRA_IOMMU_SMMU=y
214CONFIG_MEMORY=y 220CONFIG_MEMORY=y
215CONFIG_IIO=y 221CONFIG_IIO=y
222CONFIG_AK8975=y
216CONFIG_PWM=y 223CONFIG_PWM=y
217CONFIG_PWM_TEGRA=y 224CONFIG_PWM_TEGRA=y
218CONFIG_EXT2_FS=y 225CONFIG_EXT2_FS=y
diff --git a/arch/arm/configs/u300_defconfig b/arch/arm/configs/u300_defconfig
index 374000ec4e4e..fd81a1b99cce 100644
--- a/arch/arm/configs/u300_defconfig
+++ b/arch/arm/configs/u300_defconfig
@@ -1,7 +1,8 @@
1CONFIG_EXPERIMENTAL=y
2# CONFIG_LOCALVERSION_AUTO is not set 1# CONFIG_LOCALVERSION_AUTO is not set
3# CONFIG_SWAP is not set 2# CONFIG_SWAP is not set
4CONFIG_SYSVIPC=y 3CONFIG_SYSVIPC=y
4CONFIG_NO_HZ=y
5CONFIG_HIGH_RES_TIMERS=y
5CONFIG_LOG_BUF_SHIFT=14 6CONFIG_LOG_BUF_SHIFT=14
6CONFIG_EXPERT=y 7CONFIG_EXPERT=y
7# CONFIG_AIO is not set 8# CONFIG_AIO is not set
@@ -11,12 +12,9 @@ CONFIG_MODULE_UNLOAD=y
11# CONFIG_LBDAF is not set 12# CONFIG_LBDAF is not set
12# CONFIG_BLK_DEV_BSG is not set 13# CONFIG_BLK_DEV_BSG is not set
13# CONFIG_IOSCHED_CFQ is not set 14# CONFIG_IOSCHED_CFQ is not set
15# CONFIG_ARCH_MULTI_V7 is not set
14CONFIG_ARCH_U300=y 16CONFIG_ARCH_U300=y
15CONFIG_MACH_U300=y
16CONFIG_MACH_U300_BS335=y
17CONFIG_MACH_U300_SPIDUMMY=y 17CONFIG_MACH_U300_SPIDUMMY=y
18CONFIG_NO_HZ=y
19CONFIG_HIGH_RES_TIMERS=y
20CONFIG_PREEMPT=y 18CONFIG_PREEMPT=y
21CONFIG_AEABI=y 19CONFIG_AEABI=y
22CONFIG_ZBOOT_ROM_TEXT=0x0 20CONFIG_ZBOOT_ROM_TEXT=0x0
@@ -44,14 +42,15 @@ CONFIG_I2C=y
44# CONFIG_HWMON is not set 42# CONFIG_HWMON is not set
45CONFIG_WATCHDOG=y 43CONFIG_WATCHDOG=y
46CONFIG_REGULATOR=y 44CONFIG_REGULATOR=y
45CONFIG_REGULATOR_FIXED_VOLTAGE=y
47CONFIG_FB=y 46CONFIG_FB=y
48CONFIG_BACKLIGHT_LCD_SUPPORT=y 47CONFIG_BACKLIGHT_LCD_SUPPORT=y
49# CONFIG_LCD_CLASS_DEVICE is not set 48# CONFIG_LCD_CLASS_DEVICE is not set
50CONFIG_BACKLIGHT_CLASS_DEVICE=y 49CONFIG_BACKLIGHT_CLASS_DEVICE=y
51# CONFIG_HID_SUPPORT is not set
52# CONFIG_USB_SUPPORT is not set 50# CONFIG_USB_SUPPORT is not set
53CONFIG_MMC=y 51CONFIG_MMC=y
54CONFIG_MMC_CLKGATE=y 52CONFIG_MMC_UNSAFE_RESUME=y
53# CONFIG_MMC_BLOCK_BOUNCE is not set
55CONFIG_MMC_ARMMMCI=y 54CONFIG_MMC_ARMMMCI=y
56CONFIG_RTC_CLASS=y 55CONFIG_RTC_CLASS=y
57# CONFIG_RTC_HCTOSYS is not set 56# CONFIG_RTC_HCTOSYS is not set
@@ -70,4 +69,3 @@ CONFIG_DEBUG_FS=y
70CONFIG_TIMER_STATS=y 69CONFIG_TIMER_STATS=y
71# CONFIG_DEBUG_PREEMPT is not set 70# CONFIG_DEBUG_PREEMPT is not set
72CONFIG_DEBUG_INFO=y 71CONFIG_DEBUG_INFO=y
73# CONFIG_CRC32 is not set
diff --git a/arch/arm/configs/u8500_defconfig b/arch/arm/configs/u8500_defconfig
index c037aa1065b7..a0025dc13021 100644
--- a/arch/arm/configs/u8500_defconfig
+++ b/arch/arm/configs/u8500_defconfig
@@ -1,6 +1,8 @@
1CONFIG_EXPERIMENTAL=y 1CONFIG_HIGHMEM=y
2# CONFIG_SWAP is not set 2# CONFIG_SWAP is not set
3CONFIG_SYSVIPC=y 3CONFIG_SYSVIPC=y
4CONFIG_NO_HZ=y
5CONFIG_HIGH_RES_TIMERS=y
4CONFIG_BLK_DEV_INITRD=y 6CONFIG_BLK_DEV_INITRD=y
5CONFIG_KALLSYMS_ALL=y 7CONFIG_KALLSYMS_ALL=y
6CONFIG_MODULES=y 8CONFIG_MODULES=y
@@ -9,10 +11,7 @@ CONFIG_MODULE_UNLOAD=y
9CONFIG_ARCH_U8500=y 11CONFIG_ARCH_U8500=y
10CONFIG_MACH_HREFV60=y 12CONFIG_MACH_HREFV60=y
11CONFIG_MACH_SNOWBALL=y 13CONFIG_MACH_SNOWBALL=y
12CONFIG_MACH_U5500=y
13CONFIG_MACH_UX500_DT=y 14CONFIG_MACH_UX500_DT=y
14CONFIG_NO_HZ=y
15CONFIG_HIGH_RES_TIMERS=y
16CONFIG_SMP=y 15CONFIG_SMP=y
17CONFIG_NR_CPUS=2 16CONFIG_NR_CPUS=2
18CONFIG_PREEMPT=y 17CONFIG_PREEMPT=y
@@ -20,6 +19,7 @@ CONFIG_AEABI=y
20CONFIG_CMDLINE="root=/dev/ram0 console=ttyAMA2,115200n8" 19CONFIG_CMDLINE="root=/dev/ram0 console=ttyAMA2,115200n8"
21CONFIG_CPU_FREQ=y 20CONFIG_CPU_FREQ=y
22CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y 21CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y
22CONFIG_CPU_IDLE=y
23CONFIG_VFP=y 23CONFIG_VFP=y
24CONFIG_NEON=y 24CONFIG_NEON=y
25CONFIG_PM_RUNTIME=y 25CONFIG_PM_RUNTIME=y
@@ -36,7 +36,6 @@ CONFIG_CAIF=y
36CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" 36CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
37CONFIG_BLK_DEV_RAM=y 37CONFIG_BLK_DEV_RAM=y
38CONFIG_BLK_DEV_RAM_SIZE=65536 38CONFIG_BLK_DEV_RAM_SIZE=65536
39CONFIG_AB8500_PWM=y
40CONFIG_SENSORS_BH1780=y 39CONFIG_SENSORS_BH1780=y
41CONFIG_NETDEVICES=y 40CONFIG_NETDEVICES=y
42CONFIG_SMSC911X=y 41CONFIG_SMSC911X=y
@@ -60,35 +59,39 @@ CONFIG_VT_HW_CONSOLE_BINDING=y
60CONFIG_SERIAL_AMBA_PL011=y 59CONFIG_SERIAL_AMBA_PL011=y
61CONFIG_SERIAL_AMBA_PL011_CONSOLE=y 60CONFIG_SERIAL_AMBA_PL011_CONSOLE=y
62CONFIG_HW_RANDOM=y 61CONFIG_HW_RANDOM=y
63CONFIG_HW_RANDOM_NOMADIK=y
64CONFIG_SPI=y 62CONFIG_SPI=y
65CONFIG_SPI_PL022=y 63CONFIG_SPI_PL022=y
66CONFIG_GPIO_STMPE=y 64CONFIG_GPIO_STMPE=y
67CONFIG_GPIO_TC3589X=y 65CONFIG_GPIO_TC3589X=y
68# CONFIG_POWER_SUPPLY is not set
69# CONFIG_AB8500_BM is not set
70# CONFIG_AB8500_BATTERY_THERM_ON_BATCTRL is not set
71CONFIG_THERMAL=y 66CONFIG_THERMAL=y
72CONFIG_CPU_THERMAL=y 67CONFIG_CPU_THERMAL=y
68CONFIG_WATCHDOG=y
73CONFIG_MFD_STMPE=y 69CONFIG_MFD_STMPE=y
74CONFIG_MFD_TC3589X=y 70CONFIG_MFD_TC3589X=y
75CONFIG_AB5500_CORE=y
76CONFIG_AB8500_CORE=y
77CONFIG_REGULATOR=y
78CONFIG_REGULATOR_AB8500=y
79CONFIG_REGULATOR_FIXED_VOLTAGE=y
80CONFIG_REGULATOR_GPIO=y 71CONFIG_REGULATOR_GPIO=y
81# CONFIG_HID_SUPPORT is not set 72CONFIG_REGULATOR_AB8500=y
82CONFIG_USB_GADGET=y 73CONFIG_SOUND=y
74CONFIG_SND=y
75CONFIG_SND_SOC=y
76CONFIG_SND_SOC_UX500=y
77CONFIG_SND_SOC_UX500_MACH_MOP500=y
78CONFIG_USB=y
79CONFIG_USB_MUSB_HDRC=y
80CONFIG_USB_MUSB_UX500=y
81CONFIG_USB_PHY=y
83CONFIG_AB8500_USB=y 82CONFIG_AB8500_USB=y
83CONFIG_USB_GADGET=y
84CONFIG_USB_GADGET_MUSB_HDRC=y
85CONFIG_USB_ETH=m
84CONFIG_MMC=y 86CONFIG_MMC=y
85CONFIG_MMC_CLKGATE=y 87CONFIG_MMC_UNSAFE_RESUME=y
88# CONFIG_MMC_BLOCK_BOUNCE is not set
86CONFIG_MMC_ARMMMCI=y 89CONFIG_MMC_ARMMMCI=y
87CONFIG_NEW_LEDS=y 90CONFIG_NEW_LEDS=y
88CONFIG_LEDS_CLASS=y 91CONFIG_LEDS_CLASS=y
89CONFIG_LEDS_LM3530=y 92CONFIG_LEDS_LM3530=y
90CONFIG_LEDS_LP5521=y
91CONFIG_LEDS_GPIO=y 93CONFIG_LEDS_GPIO=y
94CONFIG_LEDS_LP5521=y
92CONFIG_LEDS_TRIGGERS=y 95CONFIG_LEDS_TRIGGERS=y
93CONFIG_LEDS_TRIGGER_HEARTBEAT=y 96CONFIG_LEDS_TRIGGER_HEARTBEAT=y
94CONFIG_RTC_CLASS=y 97CONFIG_RTC_CLASS=y
@@ -108,7 +111,6 @@ CONFIG_EXT4_FS=y
108CONFIG_VFAT_FS=y 111CONFIG_VFAT_FS=y
109CONFIG_TMPFS=y 112CONFIG_TMPFS=y
110CONFIG_TMPFS_POSIX_ACL=y 113CONFIG_TMPFS_POSIX_ACL=y
111CONFIG_CONFIGFS_FS=m
112# CONFIG_MISC_FILESYSTEMS is not set 114# CONFIG_MISC_FILESYSTEMS is not set
113CONFIG_NFS_FS=y 115CONFIG_NFS_FS=y
114CONFIG_ROOT_NFS=y 116CONFIG_ROOT_NFS=y
@@ -122,3 +124,7 @@ CONFIG_DEBUG_KERNEL=y
122CONFIG_DEBUG_INFO=y 124CONFIG_DEBUG_INFO=y
123# CONFIG_FTRACE is not set 125# CONFIG_FTRACE is not set
124CONFIG_DEBUG_USER=y 126CONFIG_DEBUG_USER=y
127CONFIG_CRYPTO_DEV_UX500=y
128CONFIG_CRYPTO_DEV_UX500_CRYP=y
129CONFIG_CRYPTO_DEV_UX500_HASH=y
130CONFIG_CRYPTO_DEV_UX500_DEBUG=y
diff --git a/arch/arm/include/asm/a.out-core.h b/arch/arm/include/asm/a.out-core.h
deleted file mode 100644
index 92f10cb5c70c..000000000000
--- a/arch/arm/include/asm/a.out-core.h
+++ /dev/null
@@ -1,45 +0,0 @@
1/* a.out coredump register dumper
2 *
3 * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
4 * Written by David Howells (dhowells@redhat.com)
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public Licence
8 * as published by the Free Software Foundation; either version
9 * 2 of the Licence, or (at your option) any later version.
10 */
11
12#ifndef _ASM_A_OUT_CORE_H
13#define _ASM_A_OUT_CORE_H
14
15#ifdef __KERNEL__
16
17#include <linux/user.h>
18#include <linux/elfcore.h>
19
20/*
21 * fill in the user structure for an a.out core dump
22 */
23static inline void aout_dump_thread(struct pt_regs *regs, struct user *dump)
24{
25 struct task_struct *tsk = current;
26
27 dump->magic = CMAGIC;
28 dump->start_code = tsk->mm->start_code;
29 dump->start_stack = regs->ARM_sp & ~(PAGE_SIZE - 1);
30
31 dump->u_tsize = (tsk->mm->end_code - tsk->mm->start_code) >> PAGE_SHIFT;
32 dump->u_dsize = (tsk->mm->brk - tsk->mm->start_data + PAGE_SIZE - 1) >> PAGE_SHIFT;
33 dump->u_ssize = 0;
34
35 memset(dump->u_debugreg, 0, sizeof(dump->u_debugreg));
36
37 if (dump->start_stack < 0x04000000)
38 dump->u_ssize = (0x04000000 - dump->start_stack) >> PAGE_SHIFT;
39
40 dump->regs = *regs;
41 dump->u_fpvalid = dump_fpu (regs, &dump->u_fp);
42}
43
44#endif /* __KERNEL__ */
45#endif /* _ASM_A_OUT_CORE_H */
diff --git a/arch/arm/include/asm/arch_timer.h b/arch/arm/include/asm/arch_timer.h
index 7c1bfc0aea0c..e406d575c94f 100644
--- a/arch/arm/include/asm/arch_timer.h
+++ b/arch/arm/include/asm/arch_timer.h
@@ -80,15 +80,6 @@ static inline u32 arch_timer_get_cntfrq(void)
80 return val; 80 return val;
81} 81}
82 82
83static inline u64 arch_counter_get_cntpct(void)
84{
85 u64 cval;
86
87 isb();
88 asm volatile("mrrc p15, 0, %Q0, %R0, c14" : "=r" (cval));
89 return cval;
90}
91
92static inline u64 arch_counter_get_cntvct(void) 83static inline u64 arch_counter_get_cntvct(void)
93{ 84{
94 u64 cval; 85 u64 cval;
@@ -98,7 +89,7 @@ static inline u64 arch_counter_get_cntvct(void)
98 return cval; 89 return cval;
99} 90}
100 91
101static inline void __cpuinit arch_counter_set_user_access(void) 92static inline void arch_counter_set_user_access(void)
102{ 93{
103 u32 cntkctl; 94 u32 cntkctl;
104 95
diff --git a/arch/arm/include/asm/assembler.h b/arch/arm/include/asm/assembler.h
index 05ee9eebad6b..a5fef710af32 100644
--- a/arch/arm/include/asm/assembler.h
+++ b/arch/arm/include/asm/assembler.h
@@ -136,7 +136,11 @@
136 * assumes FIQs are enabled, and that the processor is in SVC mode. 136 * assumes FIQs are enabled, and that the processor is in SVC mode.
137 */ 137 */
138 .macro save_and_disable_irqs, oldcpsr 138 .macro save_and_disable_irqs, oldcpsr
139#ifdef CONFIG_CPU_V7M
140 mrs \oldcpsr, primask
141#else
139 mrs \oldcpsr, cpsr 142 mrs \oldcpsr, cpsr
143#endif
140 disable_irq 144 disable_irq
141 .endm 145 .endm
142 146
@@ -150,7 +154,11 @@
150 * guarantee that this will preserve the flags. 154 * guarantee that this will preserve the flags.
151 */ 155 */
152 .macro restore_irqs_notrace, oldcpsr 156 .macro restore_irqs_notrace, oldcpsr
157#ifdef CONFIG_CPU_V7M
158 msr primask, \oldcpsr
159#else
153 msr cpsr_c, \oldcpsr 160 msr cpsr_c, \oldcpsr
161#endif
154 .endm 162 .endm
155 163
156 .macro restore_irqs, oldcpsr 164 .macro restore_irqs, oldcpsr
@@ -229,7 +237,14 @@
229#endif 237#endif
230 .endm 238 .endm
231 239
232#ifdef CONFIG_THUMB2_KERNEL 240#if defined(CONFIG_CPU_V7M)
241 /*
242 * setmode is used to assert to be in svc mode during boot. For v7-M
243 * this is done in __v7m_setup, so setmode can be empty here.
244 */
245 .macro setmode, mode, reg
246 .endm
247#elif defined(CONFIG_THUMB2_KERNEL)
233 .macro setmode, mode, reg 248 .macro setmode, mode, reg
234 mov \reg, #\mode 249 mov \reg, #\mode
235 msr cpsr_c, \reg 250 msr cpsr_c, \reg
diff --git a/arch/arm/include/asm/cp15.h b/arch/arm/include/asm/cp15.h
index 1f3262e99d81..6493802f880a 100644
--- a/arch/arm/include/asm/cp15.h
+++ b/arch/arm/include/asm/cp15.h
@@ -23,6 +23,11 @@
23#define CR_RR (1 << 14) /* Round Robin cache replacement */ 23#define CR_RR (1 << 14) /* Round Robin cache replacement */
24#define CR_L4 (1 << 15) /* LDR pc can set T bit */ 24#define CR_L4 (1 << 15) /* LDR pc can set T bit */
25#define CR_DT (1 << 16) 25#define CR_DT (1 << 16)
26#ifdef CONFIG_MMU
27#define CR_HA (1 << 17) /* Hardware management of Access Flag */
28#else
29#define CR_BR (1 << 17) /* MPU Background region enable (PMSA) */
30#endif
26#define CR_IT (1 << 18) 31#define CR_IT (1 << 18)
27#define CR_ST (1 << 19) 32#define CR_ST (1 << 19)
28#define CR_FI (1 << 21) /* Fast interrupt (lower latency mode) */ 33#define CR_FI (1 << 21) /* Fast interrupt (lower latency mode) */
@@ -61,6 +66,20 @@ static inline void set_cr(unsigned int val)
61 isb(); 66 isb();
62} 67}
63 68
69static inline unsigned int get_auxcr(void)
70{
71 unsigned int val;
72 asm("mrc p15, 0, %0, c1, c0, 1 @ get AUXCR" : "=r" (val));
73 return val;
74}
75
76static inline void set_auxcr(unsigned int val)
77{
78 asm volatile("mcr p15, 0, %0, c1, c0, 1 @ set AUXCR"
79 : : "r" (val));
80 isb();
81}
82
64#ifndef CONFIG_SMP 83#ifndef CONFIG_SMP
65extern void adjust_cr(unsigned long mask, unsigned long set); 84extern void adjust_cr(unsigned long mask, unsigned long set);
66#endif 85#endif
diff --git a/arch/arm/include/asm/cputype.h b/arch/arm/include/asm/cputype.h
index dba62cb1ad08..9672e978d50d 100644
--- a/arch/arm/include/asm/cputype.h
+++ b/arch/arm/include/asm/cputype.h
@@ -8,8 +8,25 @@
8#define CPUID_CACHETYPE 1 8#define CPUID_CACHETYPE 1
9#define CPUID_TCM 2 9#define CPUID_TCM 2
10#define CPUID_TLBTYPE 3 10#define CPUID_TLBTYPE 3
11#define CPUID_MPUIR 4
11#define CPUID_MPIDR 5 12#define CPUID_MPIDR 5
12 13
14#ifdef CONFIG_CPU_V7M
15#define CPUID_EXT_PFR0 0x40
16#define CPUID_EXT_PFR1 0x44
17#define CPUID_EXT_DFR0 0x48
18#define CPUID_EXT_AFR0 0x4c
19#define CPUID_EXT_MMFR0 0x50
20#define CPUID_EXT_MMFR1 0x54
21#define CPUID_EXT_MMFR2 0x58
22#define CPUID_EXT_MMFR3 0x5c
23#define CPUID_EXT_ISAR0 0x60
24#define CPUID_EXT_ISAR1 0x64
25#define CPUID_EXT_ISAR2 0x68
26#define CPUID_EXT_ISAR3 0x6c
27#define CPUID_EXT_ISAR4 0x70
28#define CPUID_EXT_ISAR5 0x74
29#else
13#define CPUID_EXT_PFR0 "c1, 0" 30#define CPUID_EXT_PFR0 "c1, 0"
14#define CPUID_EXT_PFR1 "c1, 1" 31#define CPUID_EXT_PFR1 "c1, 1"
15#define CPUID_EXT_DFR0 "c1, 2" 32#define CPUID_EXT_DFR0 "c1, 2"
@@ -24,6 +41,7 @@
24#define CPUID_EXT_ISAR3 "c2, 3" 41#define CPUID_EXT_ISAR3 "c2, 3"
25#define CPUID_EXT_ISAR4 "c2, 4" 42#define CPUID_EXT_ISAR4 "c2, 4"
26#define CPUID_EXT_ISAR5 "c2, 5" 43#define CPUID_EXT_ISAR5 "c2, 5"
44#endif
27 45
28#define MPIDR_SMP_BITMASK (0x3 << 30) 46#define MPIDR_SMP_BITMASK (0x3 << 30)
29#define MPIDR_SMP_VALUE (0x2 << 30) 47#define MPIDR_SMP_VALUE (0x2 << 30)
@@ -71,17 +89,38 @@ extern unsigned int processor_id;
71 __val; \ 89 __val; \
72 }) 90 })
73 91
92/*
93 * The memory clobber prevents gcc 4.5 from reordering the mrc before
94 * any is_smp() tests, which can cause undefined instruction aborts on
95 * ARM1136 r0 due to the missing extended CP15 registers.
96 */
74#define read_cpuid_ext(ext_reg) \ 97#define read_cpuid_ext(ext_reg) \
75 ({ \ 98 ({ \
76 unsigned int __val; \ 99 unsigned int __val; \
77 asm("mrc p15, 0, %0, c0, " ext_reg \ 100 asm("mrc p15, 0, %0, c0, " ext_reg \
78 : "=r" (__val) \ 101 : "=r" (__val) \
79 : \ 102 : \
80 : "cc"); \ 103 : "memory"); \
81 __val; \ 104 __val; \
82 }) 105 })
83 106
84#else /* ifdef CONFIG_CPU_CP15 */ 107#elif defined(CONFIG_CPU_V7M)
108
109#include <asm/io.h>
110#include <asm/v7m.h>
111
112#define read_cpuid(reg) \
113 ({ \
114 WARN_ON_ONCE(1); \
115 0; \
116 })
117
118static inline unsigned int __attribute_const__ read_cpuid_ext(unsigned offset)
119{
120 return readl(BASEADDR_V7M_SCB + offset);
121}
122
123#else /* ifdef CONFIG_CPU_CP15 / elif defined (CONFIG_CPU_V7M) */
85 124
86/* 125/*
87 * read_cpuid and read_cpuid_ext should only ever be called on machines that 126 * read_cpuid and read_cpuid_ext should only ever be called on machines that
@@ -108,7 +147,14 @@ static inline unsigned int __attribute_const__ read_cpuid_id(void)
108 return read_cpuid(CPUID_ID); 147 return read_cpuid(CPUID_ID);
109} 148}
110 149
111#else /* ifdef CONFIG_CPU_CP15 */ 150#elif defined(CONFIG_CPU_V7M)
151
152static inline unsigned int __attribute_const__ read_cpuid_id(void)
153{
154 return readl(BASEADDR_V7M_SCB + V7M_SCB_CPUID);
155}
156
157#else /* ifdef CONFIG_CPU_CP15 / elif defined(CONFIG_CPU_V7M) */
112 158
113static inline unsigned int __attribute_const__ read_cpuid_id(void) 159static inline unsigned int __attribute_const__ read_cpuid_id(void)
114{ 160{
diff --git a/arch/arm/include/asm/div64.h b/arch/arm/include/asm/div64.h
index fe92ccf1d0b0..191ada6e4d2d 100644
--- a/arch/arm/include/asm/div64.h
+++ b/arch/arm/include/asm/div64.h
@@ -46,7 +46,7 @@
46 __rem; \ 46 __rem; \
47}) 47})
48 48
49#if __GNUC__ < 4 49#if __GNUC__ < 4 || !defined(CONFIG_AEABI)
50 50
51/* 51/*
52 * gcc versions earlier than 4.0 are simply too problematic for the 52 * gcc versions earlier than 4.0 are simply too problematic for the
diff --git a/arch/arm/include/asm/elf.h b/arch/arm/include/asm/elf.h
index 38050b1c4800..56211f2084ef 100644
--- a/arch/arm/include/asm/elf.h
+++ b/arch/arm/include/asm/elf.h
@@ -130,4 +130,10 @@ struct mm_struct;
130extern unsigned long arch_randomize_brk(struct mm_struct *mm); 130extern unsigned long arch_randomize_brk(struct mm_struct *mm);
131#define arch_randomize_brk arch_randomize_brk 131#define arch_randomize_brk arch_randomize_brk
132 132
133#ifdef CONFIG_MMU
134#define ARCH_HAS_SETUP_ADDITIONAL_PAGES 1
135struct linux_binprm;
136int arch_setup_additional_pages(struct linux_binprm *, int);
137#endif
138
133#endif 139#endif
diff --git a/arch/arm/include/asm/glue-cache.h b/arch/arm/include/asm/glue-cache.h
index ea289e1435e7..c81adc08b3fb 100644
--- a/arch/arm/include/asm/glue-cache.h
+++ b/arch/arm/include/asm/glue-cache.h
@@ -117,10 +117,37 @@
117# endif 117# endif
118#endif 118#endif
119 119
120#if defined(CONFIG_CPU_V7M)
121# ifdef _CACHE
122# define MULTI_CACHE 1
123# else
124# define _CACHE nop
125# endif
126#endif
127
120#if !defined(_CACHE) && !defined(MULTI_CACHE) 128#if !defined(_CACHE) && !defined(MULTI_CACHE)
121#error Unknown cache maintenance model 129#error Unknown cache maintenance model
122#endif 130#endif
123 131
132#ifndef __ASSEMBLER__
133extern inline void nop_flush_icache_all(void) { }
134extern inline void nop_flush_kern_cache_all(void) { }
135extern inline void nop_flush_kern_cache_louis(void) { }
136extern inline void nop_flush_user_cache_all(void) { }
137extern inline void nop_flush_user_cache_range(unsigned long a,
138 unsigned long b, unsigned int c) { }
139
140extern inline void nop_coherent_kern_range(unsigned long a, unsigned long b) { }
141extern inline int nop_coherent_user_range(unsigned long a,
142 unsigned long b) { return 0; }
143extern inline void nop_flush_kern_dcache_area(void *a, size_t s) { }
144
145extern inline void nop_dma_flush_range(const void *a, const void *b) { }
146
147extern inline void nop_dma_map_area(const void *s, size_t l, int f) { }
148extern inline void nop_dma_unmap_area(const void *s, size_t l, int f) { }
149#endif
150
124#ifndef MULTI_CACHE 151#ifndef MULTI_CACHE
125#define __cpuc_flush_icache_all __glue(_CACHE,_flush_icache_all) 152#define __cpuc_flush_icache_all __glue(_CACHE,_flush_icache_all)
126#define __cpuc_flush_kern_all __glue(_CACHE,_flush_kern_cache_all) 153#define __cpuc_flush_kern_all __glue(_CACHE,_flush_kern_cache_all)
diff --git a/arch/arm/include/asm/glue-df.h b/arch/arm/include/asm/glue-df.h
index b6e9f2c108b5..6b70f1b46a6e 100644
--- a/arch/arm/include/asm/glue-df.h
+++ b/arch/arm/include/asm/glue-df.h
@@ -95,6 +95,14 @@
95# endif 95# endif
96#endif 96#endif
97 97
98#ifdef CONFIG_CPU_ABRT_NOMMU
99# ifdef CPU_DABORT_HANDLER
100# define MULTI_DABORT 1
101# else
102# define CPU_DABORT_HANDLER nommu_early_abort
103# endif
104#endif
105
98#ifndef CPU_DABORT_HANDLER 106#ifndef CPU_DABORT_HANDLER
99#error Unknown data abort handler type 107#error Unknown data abort handler type
100#endif 108#endif
diff --git a/arch/arm/include/asm/glue-proc.h b/arch/arm/include/asm/glue-proc.h
index 8017e94acc5e..74a8b84f3cb1 100644
--- a/arch/arm/include/asm/glue-proc.h
+++ b/arch/arm/include/asm/glue-proc.h
@@ -230,6 +230,15 @@
230# endif 230# endif
231#endif 231#endif
232 232
233#ifdef CONFIG_CPU_V7M
234# ifdef CPU_NAME
235# undef MULTI_CPU
236# define MULTI_CPU
237# else
238# define CPU_NAME cpu_v7m
239# endif
240#endif
241
233#ifdef CONFIG_CPU_PJ4B 242#ifdef CONFIG_CPU_PJ4B
234# ifdef CPU_NAME 243# ifdef CPU_NAME
235# undef MULTI_CPU 244# undef MULTI_CPU
diff --git a/arch/arm/include/asm/hardware/iop3xx.h b/arch/arm/include/asm/hardware/iop3xx.h
index ed94b1a366ae..423744bf18eb 100644
--- a/arch/arm/include/asm/hardware/iop3xx.h
+++ b/arch/arm/include/asm/hardware/iop3xx.h
@@ -223,11 +223,12 @@ extern int iop3xx_get_init_atu(void);
223#ifndef __ASSEMBLY__ 223#ifndef __ASSEMBLY__
224 224
225#include <linux/types.h> 225#include <linux/types.h>
226#include <linux/reboot.h>
226 227
227void iop3xx_map_io(void); 228void iop3xx_map_io(void);
228void iop_init_cp6_handler(void); 229void iop_init_cp6_handler(void);
229void iop_init_time(unsigned long tickrate); 230void iop_init_time(unsigned long tickrate);
230void iop3xx_restart(char, const char *); 231void iop3xx_restart(enum reboot_mode, const char *);
231 232
232static inline u32 read_tmr0(void) 233static inline u32 read_tmr0(void)
233{ 234{
diff --git a/arch/arm/include/asm/hardware/pci_v3.h b/arch/arm/include/asm/hardware/pci_v3.h
deleted file mode 100644
index 2811c7e2cfdf..000000000000
--- a/arch/arm/include/asm/hardware/pci_v3.h
+++ /dev/null
@@ -1,186 +0,0 @@
1/*
2 * arch/arm/include/asm/hardware/pci_v3.h
3 *
4 * Internal header file PCI V3 chip
5 *
6 * Copyright (C) ARM Limited
7 * Copyright (C) 2000-2001 Deep Blue Solutions Ltd.
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 */
23#ifndef ASM_ARM_HARDWARE_PCI_V3_H
24#define ASM_ARM_HARDWARE_PCI_V3_H
25
26/* -------------------------------------------------------------------------------
27 * V3 Local Bus to PCI Bridge definitions
28 * -------------------------------------------------------------------------------
29 * Registers (these are taken from page 129 of the EPC User's Manual Rev 1.04
30 * All V3 register names are prefaced by V3_ to avoid clashing with any other
31 * PCI definitions. Their names match the user's manual.
32 *
33 * I'm assuming that I20 is disabled.
34 *
35 */
36#define V3_PCI_VENDOR 0x00000000
37#define V3_PCI_DEVICE 0x00000002
38#define V3_PCI_CMD 0x00000004
39#define V3_PCI_STAT 0x00000006
40#define V3_PCI_CC_REV 0x00000008
41#define V3_PCI_HDR_CFG 0x0000000C
42#define V3_PCI_IO_BASE 0x00000010
43#define V3_PCI_BASE0 0x00000014
44#define V3_PCI_BASE1 0x00000018
45#define V3_PCI_SUB_VENDOR 0x0000002C
46#define V3_PCI_SUB_ID 0x0000002E
47#define V3_PCI_ROM 0x00000030
48#define V3_PCI_BPARAM 0x0000003C
49#define V3_PCI_MAP0 0x00000040
50#define V3_PCI_MAP1 0x00000044
51#define V3_PCI_INT_STAT 0x00000048
52#define V3_PCI_INT_CFG 0x0000004C
53#define V3_LB_BASE0 0x00000054
54#define V3_LB_BASE1 0x00000058
55#define V3_LB_MAP0 0x0000005E
56#define V3_LB_MAP1 0x00000062
57#define V3_LB_BASE2 0x00000064
58#define V3_LB_MAP2 0x00000066
59#define V3_LB_SIZE 0x00000068
60#define V3_LB_IO_BASE 0x0000006E
61#define V3_FIFO_CFG 0x00000070
62#define V3_FIFO_PRIORITY 0x00000072
63#define V3_FIFO_STAT 0x00000074
64#define V3_LB_ISTAT 0x00000076
65#define V3_LB_IMASK 0x00000077
66#define V3_SYSTEM 0x00000078
67#define V3_LB_CFG 0x0000007A
68#define V3_PCI_CFG 0x0000007C
69#define V3_DMA_PCI_ADR0 0x00000080
70#define V3_DMA_PCI_ADR1 0x00000090
71#define V3_DMA_LOCAL_ADR0 0x00000084
72#define V3_DMA_LOCAL_ADR1 0x00000094
73#define V3_DMA_LENGTH0 0x00000088
74#define V3_DMA_LENGTH1 0x00000098
75#define V3_DMA_CSR0 0x0000008B
76#define V3_DMA_CSR1 0x0000009B
77#define V3_DMA_CTLB_ADR0 0x0000008C
78#define V3_DMA_CTLB_ADR1 0x0000009C
79#define V3_DMA_DELAY 0x000000E0
80#define V3_MAIL_DATA 0x000000C0
81#define V3_PCI_MAIL_IEWR 0x000000D0
82#define V3_PCI_MAIL_IERD 0x000000D2
83#define V3_LB_MAIL_IEWR 0x000000D4
84#define V3_LB_MAIL_IERD 0x000000D6
85#define V3_MAIL_WR_STAT 0x000000D8
86#define V3_MAIL_RD_STAT 0x000000DA
87#define V3_QBA_MAP 0x000000DC
88
89/* PCI COMMAND REGISTER bits
90 */
91#define V3_COMMAND_M_FBB_EN (1 << 9)
92#define V3_COMMAND_M_SERR_EN (1 << 8)
93#define V3_COMMAND_M_PAR_EN (1 << 6)
94#define V3_COMMAND_M_MASTER_EN (1 << 2)
95#define V3_COMMAND_M_MEM_EN (1 << 1)
96#define V3_COMMAND_M_IO_EN (1 << 0)
97
98/* SYSTEM REGISTER bits
99 */
100#define V3_SYSTEM_M_RST_OUT (1 << 15)
101#define V3_SYSTEM_M_LOCK (1 << 14)
102
103/* PCI_CFG bits
104 */
105#define V3_PCI_CFG_M_I2O_EN (1 << 15)
106#define V3_PCI_CFG_M_IO_REG_DIS (1 << 14)
107#define V3_PCI_CFG_M_IO_DIS (1 << 13)
108#define V3_PCI_CFG_M_EN3V (1 << 12)
109#define V3_PCI_CFG_M_RETRY_EN (1 << 10)
110#define V3_PCI_CFG_M_AD_LOW1 (1 << 9)
111#define V3_PCI_CFG_M_AD_LOW0 (1 << 8)
112
113/* PCI_BASE register bits (PCI -> Local Bus)
114 */
115#define V3_PCI_BASE_M_ADR_BASE 0xFFF00000
116#define V3_PCI_BASE_M_ADR_BASEL 0x000FFF00
117#define V3_PCI_BASE_M_PREFETCH (1 << 3)
118#define V3_PCI_BASE_M_TYPE (3 << 1)
119#define V3_PCI_BASE_M_IO (1 << 0)
120
121/* PCI MAP register bits (PCI -> Local bus)
122 */
123#define V3_PCI_MAP_M_MAP_ADR 0xFFF00000
124#define V3_PCI_MAP_M_RD_POST_INH (1 << 15)
125#define V3_PCI_MAP_M_ROM_SIZE (3 << 10)
126#define V3_PCI_MAP_M_SWAP (3 << 8)
127#define V3_PCI_MAP_M_ADR_SIZE 0x000000F0
128#define V3_PCI_MAP_M_REG_EN (1 << 1)
129#define V3_PCI_MAP_M_ENABLE (1 << 0)
130
131/*
132 * LB_BASE0,1 register bits (Local bus -> PCI)
133 */
134#define V3_LB_BASE_ADR_BASE 0xfff00000
135#define V3_LB_BASE_SWAP (3 << 8)
136#define V3_LB_BASE_ADR_SIZE (15 << 4)
137#define V3_LB_BASE_PREFETCH (1 << 3)
138#define V3_LB_BASE_ENABLE (1 << 0)
139
140#define V3_LB_BASE_ADR_SIZE_1MB (0 << 4)
141#define V3_LB_BASE_ADR_SIZE_2MB (1 << 4)
142#define V3_LB_BASE_ADR_SIZE_4MB (2 << 4)
143#define V3_LB_BASE_ADR_SIZE_8MB (3 << 4)
144#define V3_LB_BASE_ADR_SIZE_16MB (4 << 4)
145#define V3_LB_BASE_ADR_SIZE_32MB (5 << 4)
146#define V3_LB_BASE_ADR_SIZE_64MB (6 << 4)
147#define V3_LB_BASE_ADR_SIZE_128MB (7 << 4)
148#define V3_LB_BASE_ADR_SIZE_256MB (8 << 4)
149#define V3_LB_BASE_ADR_SIZE_512MB (9 << 4)
150#define V3_LB_BASE_ADR_SIZE_1GB (10 << 4)
151#define V3_LB_BASE_ADR_SIZE_2GB (11 << 4)
152
153#define v3_addr_to_lb_base(a) ((a) & V3_LB_BASE_ADR_BASE)
154
155/*
156 * LB_MAP0,1 register bits (Local bus -> PCI)
157 */
158#define V3_LB_MAP_MAP_ADR 0xfff0
159#define V3_LB_MAP_TYPE (7 << 1)
160#define V3_LB_MAP_AD_LOW_EN (1 << 0)
161
162#define V3_LB_MAP_TYPE_IACK (0 << 1)
163#define V3_LB_MAP_TYPE_IO (1 << 1)
164#define V3_LB_MAP_TYPE_MEM (3 << 1)
165#define V3_LB_MAP_TYPE_CONFIG (5 << 1)
166#define V3_LB_MAP_TYPE_MEM_MULTIPLE (6 << 1)
167
168#define v3_addr_to_lb_map(a) (((a) >> 16) & V3_LB_MAP_MAP_ADR)
169
170/*
171 * LB_BASE2 register bits (Local bus -> PCI IO)
172 */
173#define V3_LB_BASE2_ADR_BASE 0xff00
174#define V3_LB_BASE2_SWAP (3 << 6)
175#define V3_LB_BASE2_ENABLE (1 << 0)
176
177#define v3_addr_to_lb_base2(a) (((a) >> 16) & V3_LB_BASE2_ADR_BASE)
178
179/*
180 * LB_MAP2 register bits (Local bus -> PCI IO)
181 */
182#define V3_LB_MAP2_MAP_ADR 0xff00
183
184#define v3_addr_to_lb_map2(a) (((a) >> 16) & V3_LB_MAP2_MAP_ADR)
185
186#endif
diff --git a/arch/arm/include/asm/hugetlb-3level.h b/arch/arm/include/asm/hugetlb-3level.h
new file mode 100644
index 000000000000..d4014fbe5ea3
--- /dev/null
+++ b/arch/arm/include/asm/hugetlb-3level.h
@@ -0,0 +1,71 @@
1/*
2 * arch/arm/include/asm/hugetlb-3level.h
3 *
4 * Copyright (C) 2012 ARM Ltd.
5 *
6 * Based on arch/x86/include/asm/hugetlb.h.
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 * 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#ifndef _ASM_ARM_HUGETLB_3LEVEL_H
23#define _ASM_ARM_HUGETLB_3LEVEL_H
24
25
26/*
27 * If our huge pte is non-zero then mark the valid bit.
28 * This allows pte_present(huge_ptep_get(ptep)) to return true for non-zero
29 * ptes.
30 * (The valid bit is automatically cleared by set_pte_at for PROT_NONE ptes).
31 */
32static inline pte_t huge_ptep_get(pte_t *ptep)
33{
34 pte_t retval = *ptep;
35 if (pte_val(retval))
36 pte_val(retval) |= L_PTE_VALID;
37 return retval;
38}
39
40static inline void set_huge_pte_at(struct mm_struct *mm, unsigned long addr,
41 pte_t *ptep, pte_t pte)
42{
43 set_pte_at(mm, addr, ptep, pte);
44}
45
46static inline void huge_ptep_clear_flush(struct vm_area_struct *vma,
47 unsigned long addr, pte_t *ptep)
48{
49 ptep_clear_flush(vma, addr, ptep);
50}
51
52static inline void huge_ptep_set_wrprotect(struct mm_struct *mm,
53 unsigned long addr, pte_t *ptep)
54{
55 ptep_set_wrprotect(mm, addr, ptep);
56}
57
58static inline pte_t huge_ptep_get_and_clear(struct mm_struct *mm,
59 unsigned long addr, pte_t *ptep)
60{
61 return ptep_get_and_clear(mm, addr, ptep);
62}
63
64static inline int huge_ptep_set_access_flags(struct vm_area_struct *vma,
65 unsigned long addr, pte_t *ptep,
66 pte_t pte, int dirty)
67{
68 return ptep_set_access_flags(vma, addr, ptep, pte, dirty);
69}
70
71#endif /* _ASM_ARM_HUGETLB_3LEVEL_H */
diff --git a/arch/arm/include/asm/hugetlb.h b/arch/arm/include/asm/hugetlb.h
new file mode 100644
index 000000000000..1f1b1cd112f3
--- /dev/null
+++ b/arch/arm/include/asm/hugetlb.h
@@ -0,0 +1,84 @@
1/*
2 * arch/arm/include/asm/hugetlb.h
3 *
4 * Copyright (C) 2012 ARM Ltd.
5 *
6 * Based on arch/x86/include/asm/hugetlb.h
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 * 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#ifndef _ASM_ARM_HUGETLB_H
23#define _ASM_ARM_HUGETLB_H
24
25#include <asm/page.h>
26#include <asm-generic/hugetlb.h>
27
28#include <asm/hugetlb-3level.h>
29
30static inline void hugetlb_free_pgd_range(struct mmu_gather *tlb,
31 unsigned long addr, unsigned long end,
32 unsigned long floor,
33 unsigned long ceiling)
34{
35 free_pgd_range(tlb, addr, end, floor, ceiling);
36}
37
38
39static inline int is_hugepage_only_range(struct mm_struct *mm,
40 unsigned long addr, unsigned long len)
41{
42 return 0;
43}
44
45static inline int prepare_hugepage_range(struct file *file,
46 unsigned long addr, unsigned long len)
47{
48 struct hstate *h = hstate_file(file);
49 if (len & ~huge_page_mask(h))
50 return -EINVAL;
51 if (addr & ~huge_page_mask(h))
52 return -EINVAL;
53 return 0;
54}
55
56static inline void hugetlb_prefault_arch_hook(struct mm_struct *mm)
57{
58}
59
60static inline int huge_pte_none(pte_t pte)
61{
62 return pte_none(pte);
63}
64
65static inline pte_t huge_pte_wrprotect(pte_t pte)
66{
67 return pte_wrprotect(pte);
68}
69
70static inline int arch_prepare_hugepage(struct page *page)
71{
72 return 0;
73}
74
75static inline void arch_release_hugepage(struct page *page)
76{
77}
78
79static inline void arch_clear_hugepage_flags(struct page *page)
80{
81 clear_bit(PG_dcache_clean, &page->flags);
82}
83
84#endif /* _ASM_ARM_HUGETLB_H */
diff --git a/arch/arm/include/asm/io.h b/arch/arm/include/asm/io.h
index 652b56086de7..d070741b2b37 100644
--- a/arch/arm/include/asm/io.h
+++ b/arch/arm/include/asm/io.h
@@ -130,16 +130,16 @@ static inline u32 __raw_readl(const volatile void __iomem *addr)
130 */ 130 */
131extern void __iomem *__arm_ioremap_pfn_caller(unsigned long, unsigned long, 131extern void __iomem *__arm_ioremap_pfn_caller(unsigned long, unsigned long,
132 size_t, unsigned int, void *); 132 size_t, unsigned int, void *);
133extern void __iomem *__arm_ioremap_caller(unsigned long, size_t, unsigned int, 133extern void __iomem *__arm_ioremap_caller(phys_addr_t, size_t, unsigned int,
134 void *); 134 void *);
135 135
136extern void __iomem *__arm_ioremap_pfn(unsigned long, unsigned long, size_t, unsigned int); 136extern void __iomem *__arm_ioremap_pfn(unsigned long, unsigned long, size_t, unsigned int);
137extern void __iomem *__arm_ioremap(unsigned long, size_t, unsigned int); 137extern void __iomem *__arm_ioremap(phys_addr_t, size_t, unsigned int);
138extern void __iomem *__arm_ioremap_exec(unsigned long, size_t, bool cached); 138extern void __iomem *__arm_ioremap_exec(phys_addr_t, size_t, bool cached);
139extern void __iounmap(volatile void __iomem *addr); 139extern void __iounmap(volatile void __iomem *addr);
140extern void __arm_iounmap(volatile void __iomem *addr); 140extern void __arm_iounmap(volatile void __iomem *addr);
141 141
142extern void __iomem * (*arch_ioremap_caller)(unsigned long, size_t, 142extern void __iomem * (*arch_ioremap_caller)(phys_addr_t, size_t,
143 unsigned int, void *); 143 unsigned int, void *);
144extern void (*arch_iounmap)(volatile void __iomem *); 144extern void (*arch_iounmap)(volatile void __iomem *);
145 145
diff --git a/arch/arm/include/asm/irqflags.h b/arch/arm/include/asm/irqflags.h
index 1e6cca55c750..3b763d6652a0 100644
--- a/arch/arm/include/asm/irqflags.h
+++ b/arch/arm/include/asm/irqflags.h
@@ -8,6 +8,16 @@
8/* 8/*
9 * CPU interrupt mask handling. 9 * CPU interrupt mask handling.
10 */ 10 */
11#ifdef CONFIG_CPU_V7M
12#define IRQMASK_REG_NAME_R "primask"
13#define IRQMASK_REG_NAME_W "primask"
14#define IRQMASK_I_BIT 1
15#else
16#define IRQMASK_REG_NAME_R "cpsr"
17#define IRQMASK_REG_NAME_W "cpsr_c"
18#define IRQMASK_I_BIT PSR_I_BIT
19#endif
20
11#if __LINUX_ARM_ARCH__ >= 6 21#if __LINUX_ARM_ARCH__ >= 6
12 22
13static inline unsigned long arch_local_irq_save(void) 23static inline unsigned long arch_local_irq_save(void)
@@ -15,7 +25,7 @@ static inline unsigned long arch_local_irq_save(void)
15 unsigned long flags; 25 unsigned long flags;
16 26
17 asm volatile( 27 asm volatile(
18 " mrs %0, cpsr @ arch_local_irq_save\n" 28 " mrs %0, " IRQMASK_REG_NAME_R " @ arch_local_irq_save\n"
19 " cpsid i" 29 " cpsid i"
20 : "=r" (flags) : : "memory", "cc"); 30 : "=r" (flags) : : "memory", "cc");
21 return flags; 31 return flags;
@@ -129,7 +139,7 @@ static inline unsigned long arch_local_save_flags(void)
129{ 139{
130 unsigned long flags; 140 unsigned long flags;
131 asm volatile( 141 asm volatile(
132 " mrs %0, cpsr @ local_save_flags" 142 " mrs %0, " IRQMASK_REG_NAME_R " @ local_save_flags"
133 : "=r" (flags) : : "memory", "cc"); 143 : "=r" (flags) : : "memory", "cc");
134 return flags; 144 return flags;
135} 145}
@@ -140,7 +150,7 @@ static inline unsigned long arch_local_save_flags(void)
140static inline void arch_local_irq_restore(unsigned long flags) 150static inline void arch_local_irq_restore(unsigned long flags)
141{ 151{
142 asm volatile( 152 asm volatile(
143 " msr cpsr_c, %0 @ local_irq_restore" 153 " msr " IRQMASK_REG_NAME_W ", %0 @ local_irq_restore"
144 : 154 :
145 : "r" (flags) 155 : "r" (flags)
146 : "memory", "cc"); 156 : "memory", "cc");
@@ -148,8 +158,8 @@ static inline void arch_local_irq_restore(unsigned long flags)
148 158
149static inline int arch_irqs_disabled_flags(unsigned long flags) 159static inline int arch_irqs_disabled_flags(unsigned long flags)
150{ 160{
151 return flags & PSR_I_BIT; 161 return flags & IRQMASK_I_BIT;
152} 162}
153 163
154#endif 164#endif /* ifdef __KERNEL__ */
155#endif 165#endif /* ifndef __ASM_ARM_IRQFLAGS_H */
diff --git a/arch/arm/include/asm/kvm_arch_timer.h b/arch/arm/include/asm/kvm_arch_timer.h
deleted file mode 100644
index 68cb9e1dfb81..000000000000
--- a/arch/arm/include/asm/kvm_arch_timer.h
+++ /dev/null
@@ -1,85 +0,0 @@
1/*
2 * Copyright (C) 2012 ARM Ltd.
3 * Author: Marc Zyngier <marc.zyngier@arm.com>
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 2 as
7 * published by the Free Software Foundation.
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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 */
18
19#ifndef __ASM_ARM_KVM_ARCH_TIMER_H
20#define __ASM_ARM_KVM_ARCH_TIMER_H
21
22#include <linux/clocksource.h>
23#include <linux/hrtimer.h>
24#include <linux/workqueue.h>
25
26struct arch_timer_kvm {
27#ifdef CONFIG_KVM_ARM_TIMER
28 /* Is the timer enabled */
29 bool enabled;
30
31 /* Virtual offset */
32 cycle_t cntvoff;
33#endif
34};
35
36struct arch_timer_cpu {
37#ifdef CONFIG_KVM_ARM_TIMER
38 /* Registers: control register, timer value */
39 u32 cntv_ctl; /* Saved/restored */
40 cycle_t cntv_cval; /* Saved/restored */
41
42 /*
43 * Anything that is not used directly from assembly code goes
44 * here.
45 */
46
47 /* Background timer used when the guest is not running */
48 struct hrtimer timer;
49
50 /* Work queued with the above timer expires */
51 struct work_struct expired;
52
53 /* Background timer active */
54 bool armed;
55
56 /* Timer IRQ */
57 const struct kvm_irq_level *irq;
58#endif
59};
60
61#ifdef CONFIG_KVM_ARM_TIMER
62int kvm_timer_hyp_init(void);
63int kvm_timer_init(struct kvm *kvm);
64void kvm_timer_vcpu_init(struct kvm_vcpu *vcpu);
65void kvm_timer_flush_hwstate(struct kvm_vcpu *vcpu);
66void kvm_timer_sync_hwstate(struct kvm_vcpu *vcpu);
67void kvm_timer_vcpu_terminate(struct kvm_vcpu *vcpu);
68#else
69static inline int kvm_timer_hyp_init(void)
70{
71 return 0;
72};
73
74static inline int kvm_timer_init(struct kvm *kvm)
75{
76 return 0;
77}
78
79static inline void kvm_timer_vcpu_init(struct kvm_vcpu *vcpu) {}
80static inline void kvm_timer_flush_hwstate(struct kvm_vcpu *vcpu) {}
81static inline void kvm_timer_sync_hwstate(struct kvm_vcpu *vcpu) {}
82static inline void kvm_timer_vcpu_terminate(struct kvm_vcpu *vcpu) {}
83#endif
84
85#endif
diff --git a/arch/arm/include/asm/kvm_arm.h b/arch/arm/include/asm/kvm_arm.h
index 124623e5ef14..64e96960de29 100644
--- a/arch/arm/include/asm/kvm_arm.h
+++ b/arch/arm/include/asm/kvm_arm.h
@@ -135,7 +135,6 @@
135#define KVM_PHYS_MASK (KVM_PHYS_SIZE - 1ULL) 135#define KVM_PHYS_MASK (KVM_PHYS_SIZE - 1ULL)
136#define PTRS_PER_S2_PGD (1ULL << (KVM_PHYS_SHIFT - 30)) 136#define PTRS_PER_S2_PGD (1ULL << (KVM_PHYS_SHIFT - 30))
137#define S2_PGD_ORDER get_order(PTRS_PER_S2_PGD * sizeof(pgd_t)) 137#define S2_PGD_ORDER get_order(PTRS_PER_S2_PGD * sizeof(pgd_t))
138#define S2_PGD_SIZE (1 << S2_PGD_ORDER)
139 138
140/* Virtualization Translation Control Register (VTCR) bits */ 139/* Virtualization Translation Control Register (VTCR) bits */
141#define VTCR_SH0 (3 << 12) 140#define VTCR_SH0 (3 << 12)
diff --git a/arch/arm/include/asm/kvm_asm.h b/arch/arm/include/asm/kvm_asm.h
index 18d50322a9e2..a2f43ddcc300 100644
--- a/arch/arm/include/asm/kvm_asm.h
+++ b/arch/arm/include/asm/kvm_asm.h
@@ -37,16 +37,18 @@
37#define c5_AIFSR 15 /* Auxilary Instrunction Fault Status R */ 37#define c5_AIFSR 15 /* Auxilary Instrunction Fault Status R */
38#define c6_DFAR 16 /* Data Fault Address Register */ 38#define c6_DFAR 16 /* Data Fault Address Register */
39#define c6_IFAR 17 /* Instruction Fault Address Register */ 39#define c6_IFAR 17 /* Instruction Fault Address Register */
40#define c9_L2CTLR 18 /* Cortex A15 L2 Control Register */ 40#define c7_PAR 18 /* Physical Address Register */
41#define c10_PRRR 19 /* Primary Region Remap Register */ 41#define c7_PAR_high 19 /* PAR top 32 bits */
42#define c10_NMRR 20 /* Normal Memory Remap Register */ 42#define c9_L2CTLR 20 /* Cortex A15 L2 Control Register */
43#define c12_VBAR 21 /* Vector Base Address Register */ 43#define c10_PRRR 21 /* Primary Region Remap Register */
44#define c13_CID 22 /* Context ID Register */ 44#define c10_NMRR 22 /* Normal Memory Remap Register */
45#define c13_TID_URW 23 /* Thread ID, User R/W */ 45#define c12_VBAR 23 /* Vector Base Address Register */
46#define c13_TID_URO 24 /* Thread ID, User R/O */ 46#define c13_CID 24 /* Context ID Register */
47#define c13_TID_PRIV 25 /* Thread ID, Privileged */ 47#define c13_TID_URW 25 /* Thread ID, User R/W */
48#define c14_CNTKCTL 26 /* Timer Control Register (PL1) */ 48#define c13_TID_URO 26 /* Thread ID, User R/O */
49#define NR_CP15_REGS 27 /* Number of regs (incl. invalid) */ 49#define c13_TID_PRIV 27 /* Thread ID, Privileged */
50#define c14_CNTKCTL 28 /* Timer Control Register (PL1) */
51#define NR_CP15_REGS 29 /* Number of regs (incl. invalid) */
50 52
51#define ARM_EXCEPTION_RESET 0 53#define ARM_EXCEPTION_RESET 0
52#define ARM_EXCEPTION_UNDEFINED 1 54#define ARM_EXCEPTION_UNDEFINED 1
@@ -72,8 +74,6 @@ extern char __kvm_hyp_vector[];
72extern char __kvm_hyp_code_start[]; 74extern char __kvm_hyp_code_start[];
73extern char __kvm_hyp_code_end[]; 75extern char __kvm_hyp_code_end[];
74 76
75extern void __kvm_tlb_flush_vmid(struct kvm *kvm);
76
77extern void __kvm_flush_vm_context(void); 77extern void __kvm_flush_vm_context(void);
78extern void __kvm_tlb_flush_vmid_ipa(struct kvm *kvm, phys_addr_t ipa); 78extern void __kvm_tlb_flush_vmid_ipa(struct kvm *kvm, phys_addr_t ipa);
79 79
diff --git a/arch/arm/include/asm/kvm_emulate.h b/arch/arm/include/asm/kvm_emulate.h
index 82b4babead2c..a464e8d7b6c5 100644
--- a/arch/arm/include/asm/kvm_emulate.h
+++ b/arch/arm/include/asm/kvm_emulate.h
@@ -65,11 +65,6 @@ static inline bool vcpu_mode_priv(struct kvm_vcpu *vcpu)
65 return cpsr_mode > USR_MODE;; 65 return cpsr_mode > USR_MODE;;
66} 66}
67 67
68static inline bool kvm_vcpu_reg_is_pc(struct kvm_vcpu *vcpu, int reg)
69{
70 return reg == 15;
71}
72
73static inline u32 kvm_vcpu_get_hsr(struct kvm_vcpu *vcpu) 68static inline u32 kvm_vcpu_get_hsr(struct kvm_vcpu *vcpu)
74{ 69{
75 return vcpu->arch.fault.hsr; 70 return vcpu->arch.fault.hsr;
diff --git a/arch/arm/include/asm/kvm_host.h b/arch/arm/include/asm/kvm_host.h
index 57cb786a6203..7d22517d8071 100644
--- a/arch/arm/include/asm/kvm_host.h
+++ b/arch/arm/include/asm/kvm_host.h
@@ -23,9 +23,14 @@
23#include <asm/kvm_asm.h> 23#include <asm/kvm_asm.h>
24#include <asm/kvm_mmio.h> 24#include <asm/kvm_mmio.h>
25#include <asm/fpstate.h> 25#include <asm/fpstate.h>
26#include <asm/kvm_arch_timer.h> 26#include <kvm/arm_arch_timer.h>
27 27
28#if defined(CONFIG_KVM_ARM_MAX_VCPUS)
28#define KVM_MAX_VCPUS CONFIG_KVM_ARM_MAX_VCPUS 29#define KVM_MAX_VCPUS CONFIG_KVM_ARM_MAX_VCPUS
30#else
31#define KVM_MAX_VCPUS 0
32#endif
33
29#define KVM_USER_MEM_SLOTS 32 34#define KVM_USER_MEM_SLOTS 32
30#define KVM_PRIVATE_MEM_SLOTS 4 35#define KVM_PRIVATE_MEM_SLOTS 4
31#define KVM_COALESCED_MMIO_PAGE_OFFSET 1 36#define KVM_COALESCED_MMIO_PAGE_OFFSET 1
@@ -38,7 +43,7 @@
38#define KVM_NR_PAGE_SIZES 1 43#define KVM_NR_PAGE_SIZES 1
39#define KVM_PAGES_PER_HPAGE(x) (1UL<<31) 44#define KVM_PAGES_PER_HPAGE(x) (1UL<<31)
40 45
41#include <asm/kvm_vgic.h> 46#include <kvm/arm_vgic.h>
42 47
43struct kvm_vcpu; 48struct kvm_vcpu;
44u32 *kvm_vcpu_reg(struct kvm_vcpu *vcpu, u8 reg_num, u32 mode); 49u32 *kvm_vcpu_reg(struct kvm_vcpu *vcpu, u8 reg_num, u32 mode);
@@ -190,8 +195,8 @@ int kvm_arm_coproc_set_reg(struct kvm_vcpu *vcpu, const struct kvm_one_reg *);
190int handle_exit(struct kvm_vcpu *vcpu, struct kvm_run *run, 195int handle_exit(struct kvm_vcpu *vcpu, struct kvm_run *run,
191 int exception_index); 196 int exception_index);
192 197
193static inline void __cpu_init_hyp_mode(unsigned long long boot_pgd_ptr, 198static inline void __cpu_init_hyp_mode(phys_addr_t boot_pgd_ptr,
194 unsigned long long pgd_ptr, 199 phys_addr_t pgd_ptr,
195 unsigned long hyp_stack_ptr, 200 unsigned long hyp_stack_ptr,
196 unsigned long vector_ptr) 201 unsigned long vector_ptr)
197{ 202{
diff --git a/arch/arm/include/asm/kvm_vgic.h b/arch/arm/include/asm/kvm_vgic.h
deleted file mode 100644
index 343744e4809c..000000000000
--- a/arch/arm/include/asm/kvm_vgic.h
+++ /dev/null
@@ -1,220 +0,0 @@
1/*
2 * Copyright (C) 2012 ARM Ltd.
3 * Author: Marc Zyngier <marc.zyngier@arm.com>
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 2 as
7 * published by the Free Software Foundation.
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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 */
18
19#ifndef __ASM_ARM_KVM_VGIC_H
20#define __ASM_ARM_KVM_VGIC_H
21
22#include <linux/kernel.h>
23#include <linux/kvm.h>
24#include <linux/irqreturn.h>
25#include <linux/spinlock.h>
26#include <linux/types.h>
27#include <linux/irqchip/arm-gic.h>
28
29#define VGIC_NR_IRQS 128
30#define VGIC_NR_SGIS 16
31#define VGIC_NR_PPIS 16
32#define VGIC_NR_PRIVATE_IRQS (VGIC_NR_SGIS + VGIC_NR_PPIS)
33#define VGIC_NR_SHARED_IRQS (VGIC_NR_IRQS - VGIC_NR_PRIVATE_IRQS)
34#define VGIC_MAX_CPUS KVM_MAX_VCPUS
35#define VGIC_MAX_LRS (1 << 6)
36
37/* Sanity checks... */
38#if (VGIC_MAX_CPUS > 8)
39#error Invalid number of CPU interfaces
40#endif
41
42#if (VGIC_NR_IRQS & 31)
43#error "VGIC_NR_IRQS must be a multiple of 32"
44#endif
45
46#if (VGIC_NR_IRQS > 1024)
47#error "VGIC_NR_IRQS must be <= 1024"
48#endif
49
50/*
51 * The GIC distributor registers describing interrupts have two parts:
52 * - 32 per-CPU interrupts (SGI + PPI)
53 * - a bunch of shared interrupts (SPI)
54 */
55struct vgic_bitmap {
56 union {
57 u32 reg[VGIC_NR_PRIVATE_IRQS / 32];
58 DECLARE_BITMAP(reg_ul, VGIC_NR_PRIVATE_IRQS);
59 } percpu[VGIC_MAX_CPUS];
60 union {
61 u32 reg[VGIC_NR_SHARED_IRQS / 32];
62 DECLARE_BITMAP(reg_ul, VGIC_NR_SHARED_IRQS);
63 } shared;
64};
65
66struct vgic_bytemap {
67 u32 percpu[VGIC_MAX_CPUS][VGIC_NR_PRIVATE_IRQS / 4];
68 u32 shared[VGIC_NR_SHARED_IRQS / 4];
69};
70
71struct vgic_dist {
72#ifdef CONFIG_KVM_ARM_VGIC
73 spinlock_t lock;
74 bool ready;
75
76 /* Virtual control interface mapping */
77 void __iomem *vctrl_base;
78
79 /* Distributor and vcpu interface mapping in the guest */
80 phys_addr_t vgic_dist_base;
81 phys_addr_t vgic_cpu_base;
82
83 /* Distributor enabled */
84 u32 enabled;
85
86 /* Interrupt enabled (one bit per IRQ) */
87 struct vgic_bitmap irq_enabled;
88
89 /* Interrupt 'pin' level */
90 struct vgic_bitmap irq_state;
91
92 /* Level-triggered interrupt in progress */
93 struct vgic_bitmap irq_active;
94
95 /* Interrupt priority. Not used yet. */
96 struct vgic_bytemap irq_priority;
97
98 /* Level/edge triggered */
99 struct vgic_bitmap irq_cfg;
100
101 /* Source CPU per SGI and target CPU */
102 u8 irq_sgi_sources[VGIC_MAX_CPUS][VGIC_NR_SGIS];
103
104 /* Target CPU for each IRQ */
105 u8 irq_spi_cpu[VGIC_NR_SHARED_IRQS];
106 struct vgic_bitmap irq_spi_target[VGIC_MAX_CPUS];
107
108 /* Bitmap indicating which CPU has something pending */
109 unsigned long irq_pending_on_cpu;
110#endif
111};
112
113struct vgic_cpu {
114#ifdef CONFIG_KVM_ARM_VGIC
115 /* per IRQ to LR mapping */
116 u8 vgic_irq_lr_map[VGIC_NR_IRQS];
117
118 /* Pending interrupts on this VCPU */
119 DECLARE_BITMAP( pending_percpu, VGIC_NR_PRIVATE_IRQS);
120 DECLARE_BITMAP( pending_shared, VGIC_NR_SHARED_IRQS);
121
122 /* Bitmap of used/free list registers */
123 DECLARE_BITMAP( lr_used, VGIC_MAX_LRS);
124
125 /* Number of list registers on this CPU */
126 int nr_lr;
127
128 /* CPU vif control registers for world switch */
129 u32 vgic_hcr;
130 u32 vgic_vmcr;
131 u32 vgic_misr; /* Saved only */
132 u32 vgic_eisr[2]; /* Saved only */
133 u32 vgic_elrsr[2]; /* Saved only */
134 u32 vgic_apr;
135 u32 vgic_lr[VGIC_MAX_LRS];
136#endif
137};
138
139#define LR_EMPTY 0xff
140
141struct kvm;
142struct kvm_vcpu;
143struct kvm_run;
144struct kvm_exit_mmio;
145
146#ifdef CONFIG_KVM_ARM_VGIC
147int kvm_vgic_set_addr(struct kvm *kvm, unsigned long type, u64 addr);
148int kvm_vgic_hyp_init(void);
149int kvm_vgic_init(struct kvm *kvm);
150int kvm_vgic_create(struct kvm *kvm);
151int kvm_vgic_vcpu_init(struct kvm_vcpu *vcpu);
152void kvm_vgic_flush_hwstate(struct kvm_vcpu *vcpu);
153void kvm_vgic_sync_hwstate(struct kvm_vcpu *vcpu);
154int kvm_vgic_inject_irq(struct kvm *kvm, int cpuid, unsigned int irq_num,
155 bool level);
156int kvm_vgic_vcpu_pending_irq(struct kvm_vcpu *vcpu);
157bool vgic_handle_mmio(struct kvm_vcpu *vcpu, struct kvm_run *run,
158 struct kvm_exit_mmio *mmio);
159
160#define irqchip_in_kernel(k) (!!((k)->arch.vgic.vctrl_base))
161#define vgic_initialized(k) ((k)->arch.vgic.ready)
162
163#else
164static inline int kvm_vgic_hyp_init(void)
165{
166 return 0;
167}
168
169static inline int kvm_vgic_set_addr(struct kvm *kvm, unsigned long type, u64 addr)
170{
171 return 0;
172}
173
174static inline int kvm_vgic_init(struct kvm *kvm)
175{
176 return 0;
177}
178
179static inline int kvm_vgic_create(struct kvm *kvm)
180{
181 return 0;
182}
183
184static inline int kvm_vgic_vcpu_init(struct kvm_vcpu *vcpu)
185{
186 return 0;
187}
188
189static inline void kvm_vgic_flush_hwstate(struct kvm_vcpu *vcpu) {}
190static inline void kvm_vgic_sync_hwstate(struct kvm_vcpu *vcpu) {}
191
192static inline int kvm_vgic_inject_irq(struct kvm *kvm, int cpuid,
193 unsigned int irq_num, bool level)
194{
195 return 0;
196}
197
198static inline int kvm_vgic_vcpu_pending_irq(struct kvm_vcpu *vcpu)
199{
200 return 0;
201}
202
203static inline bool vgic_handle_mmio(struct kvm_vcpu *vcpu, struct kvm_run *run,
204 struct kvm_exit_mmio *mmio)
205{
206 return false;
207}
208
209static inline int irqchip_in_kernel(struct kvm *kvm)
210{
211 return 0;
212}
213
214static inline bool vgic_initialized(struct kvm *kvm)
215{
216 return true;
217}
218#endif
219
220#endif
diff --git a/arch/arm/include/asm/mach/arch.h b/arch/arm/include/asm/mach/arch.h
index 308ad7d6f98b..441efc491b50 100644
--- a/arch/arm/include/asm/mach/arch.h
+++ b/arch/arm/include/asm/mach/arch.h
@@ -8,7 +8,10 @@
8 * published by the Free Software Foundation. 8 * published by the Free Software Foundation.
9 */ 9 */
10 10
11#include <linux/types.h>
12
11#ifndef __ASSEMBLY__ 13#ifndef __ASSEMBLY__
14#include <linux/reboot.h>
12 15
13struct tag; 16struct tag;
14struct meminfo; 17struct meminfo;
@@ -16,8 +19,10 @@ struct pt_regs;
16struct smp_operations; 19struct smp_operations;
17#ifdef CONFIG_SMP 20#ifdef CONFIG_SMP
18#define smp_ops(ops) (&(ops)) 21#define smp_ops(ops) (&(ops))
22#define smp_init_ops(ops) (&(ops))
19#else 23#else
20#define smp_ops(ops) (struct smp_operations *)NULL 24#define smp_ops(ops) (struct smp_operations *)NULL
25#define smp_init_ops(ops) (bool (*)(void))NULL
21#endif 26#endif
22 27
23struct machine_desc { 28struct machine_desc {
@@ -39,8 +44,9 @@ struct machine_desc {
39 unsigned char reserve_lp0 :1; /* never has lp0 */ 44 unsigned char reserve_lp0 :1; /* never has lp0 */
40 unsigned char reserve_lp1 :1; /* never has lp1 */ 45 unsigned char reserve_lp1 :1; /* never has lp1 */
41 unsigned char reserve_lp2 :1; /* never has lp2 */ 46 unsigned char reserve_lp2 :1; /* never has lp2 */
42 char restart_mode; /* default restart mode */ 47 enum reboot_mode reboot_mode; /* default restart mode */
43 struct smp_operations *smp; /* SMP operations */ 48 struct smp_operations *smp; /* SMP operations */
49 bool (*smp_init)(void);
44 void (*fixup)(struct tag *, char **, 50 void (*fixup)(struct tag *, char **,
45 struct meminfo *); 51 struct meminfo *);
46 void (*reserve)(void);/* reserve mem blocks */ 52 void (*reserve)(void);/* reserve mem blocks */
@@ -53,7 +59,7 @@ struct machine_desc {
53#ifdef CONFIG_MULTI_IRQ_HANDLER 59#ifdef CONFIG_MULTI_IRQ_HANDLER
54 void (*handle_irq)(struct pt_regs *); 60 void (*handle_irq)(struct pt_regs *);
55#endif 61#endif
56 void (*restart)(char, const char *); 62 void (*restart)(enum reboot_mode, const char *);
57}; 63};
58 64
59/* 65/*
diff --git a/arch/arm/include/asm/mach/pci.h b/arch/arm/include/asm/mach/pci.h
index 7d2c3c843801..a1c90d7feb0e 100644
--- a/arch/arm/include/asm/mach/pci.h
+++ b/arch/arm/include/asm/mach/pci.h
@@ -16,6 +16,7 @@
16struct pci_sys_data; 16struct pci_sys_data;
17struct pci_ops; 17struct pci_ops;
18struct pci_bus; 18struct pci_bus;
19struct device;
19 20
20struct hw_pci { 21struct hw_pci {
21#ifdef CONFIG_PCI_DOMAINS 22#ifdef CONFIG_PCI_DOMAINS
@@ -68,7 +69,16 @@ struct pci_sys_data {
68/* 69/*
69 * Call this with your hw_pci struct to initialise the PCI system. 70 * Call this with your hw_pci struct to initialise the PCI system.
70 */ 71 */
71void pci_common_init(struct hw_pci *); 72void pci_common_init_dev(struct device *, struct hw_pci *);
73
74/*
75 * Compatibility wrapper for older platforms that do not care about
76 * passing the parent device.
77 */
78static inline void pci_common_init(struct hw_pci *hw)
79{
80 pci_common_init_dev(NULL, hw);
81}
72 82
73/* 83/*
74 * Setup early fixed I/O mapping. 84 * Setup early fixed I/O mapping.
@@ -96,9 +106,4 @@ extern struct pci_ops via82c505_ops;
96extern int via82c505_setup(int nr, struct pci_sys_data *); 106extern int via82c505_setup(int nr, struct pci_sys_data *);
97extern void via82c505_init(void *sysdata); 107extern void via82c505_init(void *sysdata);
98 108
99extern struct pci_ops pci_v3_ops;
100extern int pci_v3_setup(int nr, struct pci_sys_data *);
101extern void pci_v3_preinit(void);
102extern void pci_v3_postinit(void);
103
104#endif /* __ASM_MACH_PCI_H */ 109#endif /* __ASM_MACH_PCI_H */
diff --git a/arch/arm/include/asm/memory.h b/arch/arm/include/asm/memory.h
index 57870ab313c5..e750a938fd3c 100644
--- a/arch/arm/include/asm/memory.h
+++ b/arch/arm/include/asm/memory.h
@@ -18,6 +18,8 @@
18#include <linux/types.h> 18#include <linux/types.h>
19#include <linux/sizes.h> 19#include <linux/sizes.h>
20 20
21#include <asm/cache.h>
22
21#ifdef CONFIG_NEED_MACH_MEMORY_H 23#ifdef CONFIG_NEED_MACH_MEMORY_H
22#include <mach/memory.h> 24#include <mach/memory.h>
23#endif 25#endif
@@ -141,6 +143,20 @@
141#define page_to_phys(page) (__pfn_to_phys(page_to_pfn(page))) 143#define page_to_phys(page) (__pfn_to_phys(page_to_pfn(page)))
142#define phys_to_page(phys) (pfn_to_page(__phys_to_pfn(phys))) 144#define phys_to_page(phys) (pfn_to_page(__phys_to_pfn(phys)))
143 145
146/*
147 * Minimum guaranted alignment in pgd_alloc(). The page table pointers passed
148 * around in head.S and proc-*.S are shifted by this amount, in order to
149 * leave spare high bits for systems with physical address extension. This
150 * does not fully accomodate the 40-bit addressing capability of ARM LPAE, but
151 * gives us about 38-bits or so.
152 */
153#ifdef CONFIG_ARM_LPAE
154#define ARCH_PGD_SHIFT L1_CACHE_SHIFT
155#else
156#define ARCH_PGD_SHIFT 0
157#endif
158#define ARCH_PGD_MASK ((1 << ARCH_PGD_SHIFT) - 1)
159
144#ifndef __ASSEMBLY__ 160#ifndef __ASSEMBLY__
145 161
146/* 162/*
@@ -207,7 +223,7 @@ static inline unsigned long __phys_to_virt(unsigned long x)
207 * direct-mapped view. We assume this is the first page 223 * direct-mapped view. We assume this is the first page
208 * of RAM in the mem_map as well. 224 * of RAM in the mem_map as well.
209 */ 225 */
210#define PHYS_PFN_OFFSET (PHYS_OFFSET >> PAGE_SHIFT) 226#define PHYS_PFN_OFFSET ((unsigned long)(PHYS_OFFSET >> PAGE_SHIFT))
211 227
212/* 228/*
213 * These are *only* valid on the kernel direct mapped RAM memory. 229 * These are *only* valid on the kernel direct mapped RAM memory.
@@ -260,12 +276,6 @@ static inline __deprecated void *bus_to_virt(unsigned long x)
260/* 276/*
261 * Conversion between a struct page and a physical address. 277 * Conversion between a struct page and a physical address.
262 * 278 *
263 * Note: when converting an unknown physical address to a
264 * struct page, the resulting pointer must be validated
265 * using VALID_PAGE(). It must return an invalid struct page
266 * for any physical address not corresponding to a system
267 * RAM address.
268 *
269 * page_to_pfn(page) convert a struct page * to a PFN number 279 * page_to_pfn(page) convert a struct page * to a PFN number
270 * pfn_to_page(pfn) convert a _valid_ PFN number to struct page * 280 * pfn_to_page(pfn) convert a _valid_ PFN number to struct page *
271 * 281 *
diff --git a/arch/arm/include/asm/mmu.h b/arch/arm/include/asm/mmu.h
index e3d55547e755..6f18da09668b 100644
--- a/arch/arm/include/asm/mmu.h
+++ b/arch/arm/include/asm/mmu.h
@@ -6,8 +6,11 @@
6typedef struct { 6typedef struct {
7#ifdef CONFIG_CPU_HAS_ASID 7#ifdef CONFIG_CPU_HAS_ASID
8 atomic64_t id; 8 atomic64_t id;
9#else
10 int switch_pending;
9#endif 11#endif
10 unsigned int vmalloc_seq; 12 unsigned int vmalloc_seq;
13 unsigned long sigpage;
11} mm_context_t; 14} mm_context_t;
12 15
13#ifdef CONFIG_CPU_HAS_ASID 16#ifdef CONFIG_CPU_HAS_ASID
diff --git a/arch/arm/include/asm/mmu_context.h b/arch/arm/include/asm/mmu_context.h
index a7b85e0d0cc1..9b32f76bb0dd 100644
--- a/arch/arm/include/asm/mmu_context.h
+++ b/arch/arm/include/asm/mmu_context.h
@@ -18,6 +18,7 @@
18#include <asm/cacheflush.h> 18#include <asm/cacheflush.h>
19#include <asm/cachetype.h> 19#include <asm/cachetype.h>
20#include <asm/proc-fns.h> 20#include <asm/proc-fns.h>
21#include <asm/smp_plat.h>
21#include <asm-generic/mm_hooks.h> 22#include <asm-generic/mm_hooks.h>
22 23
23void __check_vmalloc_seq(struct mm_struct *mm); 24void __check_vmalloc_seq(struct mm_struct *mm);
@@ -27,7 +28,15 @@ void __check_vmalloc_seq(struct mm_struct *mm);
27void check_and_switch_context(struct mm_struct *mm, struct task_struct *tsk); 28void check_and_switch_context(struct mm_struct *mm, struct task_struct *tsk);
28#define init_new_context(tsk,mm) ({ atomic64_set(&mm->context.id, 0); 0; }) 29#define init_new_context(tsk,mm) ({ atomic64_set(&mm->context.id, 0); 0; })
29 30
30DECLARE_PER_CPU(atomic64_t, active_asids); 31#ifdef CONFIG_ARM_ERRATA_798181
32void a15_erratum_get_cpumask(int this_cpu, struct mm_struct *mm,
33 cpumask_t *mask);
34#else /* !CONFIG_ARM_ERRATA_798181 */
35static inline void a15_erratum_get_cpumask(int this_cpu, struct mm_struct *mm,
36 cpumask_t *mask)
37{
38}
39#endif /* CONFIG_ARM_ERRATA_798181 */
31 40
32#else /* !CONFIG_CPU_HAS_ASID */ 41#else /* !CONFIG_CPU_HAS_ASID */
33 42
@@ -47,7 +56,7 @@ static inline void check_and_switch_context(struct mm_struct *mm,
47 * on non-ASID CPUs, the old mm will remain valid until the 56 * on non-ASID CPUs, the old mm will remain valid until the
48 * finish_arch_post_lock_switch() call. 57 * finish_arch_post_lock_switch() call.
49 */ 58 */
50 set_ti_thread_flag(task_thread_info(tsk), TIF_SWITCH_MM); 59 mm->context.switch_pending = 1;
51 else 60 else
52 cpu_switch_mm(mm->pgd, mm); 61 cpu_switch_mm(mm->pgd, mm);
53} 62}
@@ -56,9 +65,21 @@ static inline void check_and_switch_context(struct mm_struct *mm,
56 finish_arch_post_lock_switch 65 finish_arch_post_lock_switch
57static inline void finish_arch_post_lock_switch(void) 66static inline void finish_arch_post_lock_switch(void)
58{ 67{
59 if (test_and_clear_thread_flag(TIF_SWITCH_MM)) { 68 struct mm_struct *mm = current->mm;
60 struct mm_struct *mm = current->mm; 69
61 cpu_switch_mm(mm->pgd, mm); 70 if (mm && mm->context.switch_pending) {
71 /*
72 * Preemption must be disabled during cpu_switch_mm() as we
73 * have some stateful cache flush implementations. Check
74 * switch_pending again in case we were preempted and the
75 * switch to this mm was already done.
76 */
77 preempt_disable();
78 if (mm->context.switch_pending) {
79 mm->context.switch_pending = 0;
80 cpu_switch_mm(mm->pgd, mm);
81 }
82 preempt_enable_no_resched();
62 } 83 }
63} 84}
64 85
@@ -98,12 +119,16 @@ switch_mm(struct mm_struct *prev, struct mm_struct *next,
98#ifdef CONFIG_MMU 119#ifdef CONFIG_MMU
99 unsigned int cpu = smp_processor_id(); 120 unsigned int cpu = smp_processor_id();
100 121
101#ifdef CONFIG_SMP 122 /*
102 /* check for possible thread migration */ 123 * __sync_icache_dcache doesn't broadcast the I-cache invalidation,
103 if (!cpumask_empty(mm_cpumask(next)) && 124 * so check for possible thread migration and invalidate the I-cache
125 * if we're new to this CPU.
126 */
127 if (cache_ops_need_broadcast() &&
128 !cpumask_empty(mm_cpumask(next)) &&
104 !cpumask_test_cpu(cpu, mm_cpumask(next))) 129 !cpumask_test_cpu(cpu, mm_cpumask(next)))
105 __flush_icache_all(); 130 __flush_icache_all();
106#endif 131
107 if (!cpumask_test_and_set_cpu(cpu, mm_cpumask(next)) || prev != next) { 132 if (!cpumask_test_and_set_cpu(cpu, mm_cpumask(next)) || prev != next) {
108 check_and_switch_context(next, tsk); 133 check_and_switch_context(next, tsk);
109 if (cache_is_vivt()) 134 if (cache_is_vivt())
diff --git a/arch/arm/include/asm/mpu.h b/arch/arm/include/asm/mpu.h
new file mode 100644
index 000000000000..c3247cc2fe08
--- /dev/null
+++ b/arch/arm/include/asm/mpu.h
@@ -0,0 +1,76 @@
1#ifndef __ARM_MPU_H
2#define __ARM_MPU_H
3
4#ifdef CONFIG_ARM_MPU
5
6/* MPUIR layout */
7#define MPUIR_nU 1
8#define MPUIR_DREGION 8
9#define MPUIR_IREGION 16
10#define MPUIR_DREGION_SZMASK (0xFF << MPUIR_DREGION)
11#define MPUIR_IREGION_SZMASK (0xFF << MPUIR_IREGION)
12
13/* ID_MMFR0 data relevant to MPU */
14#define MMFR0_PMSA (0xF << 4)
15#define MMFR0_PMSAv7 (3 << 4)
16
17/* MPU D/I Size Register fields */
18#define MPU_RSR_SZ 1
19#define MPU_RSR_EN 0
20
21/* The D/I RSR value for an enabled region spanning the whole of memory */
22#define MPU_RSR_ALL_MEM 63
23
24/* Individual bits in the DR/IR ACR */
25#define MPU_ACR_XN (1 << 12)
26#define MPU_ACR_SHARED (1 << 2)
27
28/* C, B and TEX[2:0] bits only have semantic meanings when grouped */
29#define MPU_RGN_CACHEABLE 0xB
30#define MPU_RGN_SHARED_CACHEABLE (MPU_RGN_CACHEABLE | MPU_ACR_SHARED)
31#define MPU_RGN_STRONGLY_ORDERED 0
32
33/* Main region should only be shared for SMP */
34#ifdef CONFIG_SMP
35#define MPU_RGN_NORMAL (MPU_RGN_CACHEABLE | MPU_ACR_SHARED)
36#else
37#define MPU_RGN_NORMAL MPU_RGN_CACHEABLE
38#endif
39
40/* Access permission bits of ACR (only define those that we use)*/
41#define MPU_AP_PL1RW_PL0RW (0x3 << 8)
42#define MPU_AP_PL1RW_PL0R0 (0x2 << 8)
43#define MPU_AP_PL1RW_PL0NA (0x1 << 8)
44
45/* For minimal static MPU region configurations */
46#define MPU_PROBE_REGION 0
47#define MPU_BG_REGION 1
48#define MPU_RAM_REGION 2
49#define MPU_VECTORS_REGION 3
50
51/* Maximum number of regions Linux is interested in */
52#define MPU_MAX_REGIONS 16
53
54#define MPU_DATA_SIDE 0
55#define MPU_INSTR_SIDE 1
56
57#ifndef __ASSEMBLY__
58
59struct mpu_rgn {
60 /* Assume same attributes for d/i-side */
61 u32 drbar;
62 u32 drsr;
63 u32 dracr;
64};
65
66struct mpu_rgn_info {
67 u32 mpuir;
68 struct mpu_rgn rgns[MPU_MAX_REGIONS];
69};
70extern struct mpu_rgn_info mpu_rgn_info;
71
72#endif /* __ASSEMBLY__ */
73
74#endif /* CONFIG_ARM_MPU */
75
76#endif
diff --git a/arch/arm/include/asm/page.h b/arch/arm/include/asm/page.h
index 812a4944e783..4355f0ec44d6 100644
--- a/arch/arm/include/asm/page.h
+++ b/arch/arm/include/asm/page.h
@@ -13,7 +13,7 @@
13/* PAGE_SHIFT determines the page size */ 13/* PAGE_SHIFT determines the page size */
14#define PAGE_SHIFT 12 14#define PAGE_SHIFT 12
15#define PAGE_SIZE (_AC(1,UL) << PAGE_SHIFT) 15#define PAGE_SIZE (_AC(1,UL) << PAGE_SHIFT)
16#define PAGE_MASK (~(PAGE_SIZE-1)) 16#define PAGE_MASK (~((1 << PAGE_SHIFT) - 1))
17 17
18#ifndef __ASSEMBLY__ 18#ifndef __ASSEMBLY__
19 19
@@ -142,7 +142,9 @@ extern void __cpu_copy_user_highpage(struct page *to, struct page *from,
142#define clear_page(page) memset((void *)(page), 0, PAGE_SIZE) 142#define clear_page(page) memset((void *)(page), 0, PAGE_SIZE)
143extern void copy_page(void *to, const void *from); 143extern void copy_page(void *to, const void *from);
144 144
145#ifdef CONFIG_KUSER_HELPERS
145#define __HAVE_ARCH_GATE_AREA 1 146#define __HAVE_ARCH_GATE_AREA 1
147#endif
146 148
147#ifdef CONFIG_ARM_LPAE 149#ifdef CONFIG_ARM_LPAE
148#include <asm/pgtable-3level-types.h> 150#include <asm/pgtable-3level-types.h>
diff --git a/arch/arm/include/asm/pgtable-3level-hwdef.h b/arch/arm/include/asm/pgtable-3level-hwdef.h
index 18f5cef82ad5..626989fec4d3 100644
--- a/arch/arm/include/asm/pgtable-3level-hwdef.h
+++ b/arch/arm/include/asm/pgtable-3level-hwdef.h
@@ -30,6 +30,7 @@
30#define PMD_TYPE_FAULT (_AT(pmdval_t, 0) << 0) 30#define PMD_TYPE_FAULT (_AT(pmdval_t, 0) << 0)
31#define PMD_TYPE_TABLE (_AT(pmdval_t, 3) << 0) 31#define PMD_TYPE_TABLE (_AT(pmdval_t, 3) << 0)
32#define PMD_TYPE_SECT (_AT(pmdval_t, 1) << 0) 32#define PMD_TYPE_SECT (_AT(pmdval_t, 1) << 0)
33#define PMD_TABLE_BIT (_AT(pmdval_t, 1) << 1)
33#define PMD_BIT4 (_AT(pmdval_t, 0)) 34#define PMD_BIT4 (_AT(pmdval_t, 0))
34#define PMD_DOMAIN(x) (_AT(pmdval_t, 0)) 35#define PMD_DOMAIN(x) (_AT(pmdval_t, 0))
35#define PMD_APTABLE_SHIFT (61) 36#define PMD_APTABLE_SHIFT (61)
@@ -41,6 +42,8 @@
41 */ 42 */
42#define PMD_SECT_BUFFERABLE (_AT(pmdval_t, 1) << 2) 43#define PMD_SECT_BUFFERABLE (_AT(pmdval_t, 1) << 2)
43#define PMD_SECT_CACHEABLE (_AT(pmdval_t, 1) << 3) 44#define PMD_SECT_CACHEABLE (_AT(pmdval_t, 1) << 3)
45#define PMD_SECT_USER (_AT(pmdval_t, 1) << 6) /* AP[1] */
46#define PMD_SECT_RDONLY (_AT(pmdval_t, 1) << 7) /* AP[2] */
44#define PMD_SECT_S (_AT(pmdval_t, 3) << 8) 47#define PMD_SECT_S (_AT(pmdval_t, 3) << 8)
45#define PMD_SECT_AF (_AT(pmdval_t, 1) << 10) 48#define PMD_SECT_AF (_AT(pmdval_t, 1) << 10)
46#define PMD_SECT_nG (_AT(pmdval_t, 1) << 11) 49#define PMD_SECT_nG (_AT(pmdval_t, 1) << 11)
@@ -66,6 +69,7 @@
66#define PTE_TYPE_MASK (_AT(pteval_t, 3) << 0) 69#define PTE_TYPE_MASK (_AT(pteval_t, 3) << 0)
67#define PTE_TYPE_FAULT (_AT(pteval_t, 0) << 0) 70#define PTE_TYPE_FAULT (_AT(pteval_t, 0) << 0)
68#define PTE_TYPE_PAGE (_AT(pteval_t, 3) << 0) 71#define PTE_TYPE_PAGE (_AT(pteval_t, 3) << 0)
72#define PTE_TABLE_BIT (_AT(pteval_t, 1) << 1)
69#define PTE_BUFFERABLE (_AT(pteval_t, 1) << 2) /* AttrIndx[0] */ 73#define PTE_BUFFERABLE (_AT(pteval_t, 1) << 2) /* AttrIndx[0] */
70#define PTE_CACHEABLE (_AT(pteval_t, 1) << 3) /* AttrIndx[1] */ 74#define PTE_CACHEABLE (_AT(pteval_t, 1) << 3) /* AttrIndx[1] */
71#define PTE_EXT_SHARED (_AT(pteval_t, 3) << 8) /* SH[1:0], inner shareable */ 75#define PTE_EXT_SHARED (_AT(pteval_t, 3) << 8) /* SH[1:0], inner shareable */
@@ -79,4 +83,24 @@
79#define PHYS_MASK_SHIFT (40) 83#define PHYS_MASK_SHIFT (40)
80#define PHYS_MASK ((1ULL << PHYS_MASK_SHIFT) - 1) 84#define PHYS_MASK ((1ULL << PHYS_MASK_SHIFT) - 1)
81 85
86/*
87 * TTBR0/TTBR1 split (PAGE_OFFSET):
88 * 0x40000000: T0SZ = 2, T1SZ = 0 (not used)
89 * 0x80000000: T0SZ = 0, T1SZ = 1
90 * 0xc0000000: T0SZ = 0, T1SZ = 2
91 *
92 * Only use this feature if PHYS_OFFSET <= PAGE_OFFSET, otherwise
93 * booting secondary CPUs would end up using TTBR1 for the identity
94 * mapping set up in TTBR0.
95 */
96#if defined CONFIG_VMSPLIT_2G
97#define TTBR1_OFFSET 16 /* skip two L1 entries */
98#elif defined CONFIG_VMSPLIT_3G
99#define TTBR1_OFFSET (4096 * (1 + 3)) /* only L2, skip pgd + 3*pmd */
100#else
101#define TTBR1_OFFSET 0
102#endif
103
104#define TTBR1_SIZE (((PAGE_OFFSET >> 30) - 1) << 16)
105
82#endif 106#endif
diff --git a/arch/arm/include/asm/pgtable-3level.h b/arch/arm/include/asm/pgtable-3level.h
index 86b8fe398b95..5689c18c85f5 100644
--- a/arch/arm/include/asm/pgtable-3level.h
+++ b/arch/arm/include/asm/pgtable-3level.h
@@ -33,7 +33,7 @@
33#define PTRS_PER_PMD 512 33#define PTRS_PER_PMD 512
34#define PTRS_PER_PGD 4 34#define PTRS_PER_PGD 4
35 35
36#define PTE_HWTABLE_PTRS (PTRS_PER_PTE) 36#define PTE_HWTABLE_PTRS (0)
37#define PTE_HWTABLE_OFF (0) 37#define PTE_HWTABLE_OFF (0)
38#define PTE_HWTABLE_SIZE (PTRS_PER_PTE * sizeof(u64)) 38#define PTE_HWTABLE_SIZE (PTRS_PER_PTE * sizeof(u64))
39 39
@@ -48,20 +48,28 @@
48#define PMD_SHIFT 21 48#define PMD_SHIFT 21
49 49
50#define PMD_SIZE (1UL << PMD_SHIFT) 50#define PMD_SIZE (1UL << PMD_SHIFT)
51#define PMD_MASK (~(PMD_SIZE-1)) 51#define PMD_MASK (~((1 << PMD_SHIFT) - 1))
52#define PGDIR_SIZE (1UL << PGDIR_SHIFT) 52#define PGDIR_SIZE (1UL << PGDIR_SHIFT)
53#define PGDIR_MASK (~(PGDIR_SIZE-1)) 53#define PGDIR_MASK (~((1 << PGDIR_SHIFT) - 1))
54 54
55/* 55/*
56 * section address mask and size definitions. 56 * section address mask and size definitions.
57 */ 57 */
58#define SECTION_SHIFT 21 58#define SECTION_SHIFT 21
59#define SECTION_SIZE (1UL << SECTION_SHIFT) 59#define SECTION_SIZE (1UL << SECTION_SHIFT)
60#define SECTION_MASK (~(SECTION_SIZE-1)) 60#define SECTION_MASK (~((1 << SECTION_SHIFT) - 1))
61 61
62#define USER_PTRS_PER_PGD (PAGE_OFFSET / PGDIR_SIZE) 62#define USER_PTRS_PER_PGD (PAGE_OFFSET / PGDIR_SIZE)
63 63
64/* 64/*
65 * Hugetlb definitions.
66 */
67#define HPAGE_SHIFT PMD_SHIFT
68#define HPAGE_SIZE (_AC(1, UL) << HPAGE_SHIFT)
69#define HPAGE_MASK (~(HPAGE_SIZE - 1))
70#define HUGETLB_PAGE_ORDER (HPAGE_SHIFT - PAGE_SHIFT)
71
72/*
65 * "Linux" PTE definitions for LPAE. 73 * "Linux" PTE definitions for LPAE.
66 * 74 *
67 * These bits overlap with the hardware bits but the naming is preserved for 75 * These bits overlap with the hardware bits but the naming is preserved for
@@ -79,6 +87,11 @@
79#define L_PTE_SPECIAL (_AT(pteval_t, 1) << 56) /* unused */ 87#define L_PTE_SPECIAL (_AT(pteval_t, 1) << 56) /* unused */
80#define L_PTE_NONE (_AT(pteval_t, 1) << 57) /* PROT_NONE */ 88#define L_PTE_NONE (_AT(pteval_t, 1) << 57) /* PROT_NONE */
81 89
90#define PMD_SECT_VALID (_AT(pmdval_t, 1) << 0)
91#define PMD_SECT_DIRTY (_AT(pmdval_t, 1) << 55)
92#define PMD_SECT_SPLITTING (_AT(pmdval_t, 1) << 56)
93#define PMD_SECT_NONE (_AT(pmdval_t, 1) << 57)
94
82/* 95/*
83 * To be used in assembly code with the upper page attributes. 96 * To be used in assembly code with the upper page attributes.
84 */ 97 */
@@ -166,8 +179,83 @@ static inline pmd_t *pmd_offset(pud_t *pud, unsigned long addr)
166 clean_pmd_entry(pmdp); \ 179 clean_pmd_entry(pmdp); \
167 } while (0) 180 } while (0)
168 181
182/*
183 * For 3 levels of paging the PTE_EXT_NG bit will be set for user address ptes
184 * that are written to a page table but not for ptes created with mk_pte.
185 *
186 * In hugetlb_no_page, a new huge pte (new_pte) is generated and passed to
187 * hugetlb_cow, where it is compared with an entry in a page table.
188 * This comparison test fails erroneously leading ultimately to a memory leak.
189 *
190 * To correct this behaviour, we mask off PTE_EXT_NG for any pte that is
191 * present before running the comparison.
192 */
193#define __HAVE_ARCH_PTE_SAME
194#define pte_same(pte_a,pte_b) ((pte_present(pte_a) ? pte_val(pte_a) & ~PTE_EXT_NG \
195 : pte_val(pte_a)) \
196 == (pte_present(pte_b) ? pte_val(pte_b) & ~PTE_EXT_NG \
197 : pte_val(pte_b)))
198
169#define set_pte_ext(ptep,pte,ext) cpu_set_pte_ext(ptep,__pte(pte_val(pte)|(ext))) 199#define set_pte_ext(ptep,pte,ext) cpu_set_pte_ext(ptep,__pte(pte_val(pte)|(ext)))
170 200
201#define pte_huge(pte) (pte_val(pte) && !(pte_val(pte) & PTE_TABLE_BIT))
202#define pte_mkhuge(pte) (__pte(pte_val(pte) & ~PTE_TABLE_BIT))
203
204#define pmd_young(pmd) (pmd_val(pmd) & PMD_SECT_AF)
205
206#define __HAVE_ARCH_PMD_WRITE
207#define pmd_write(pmd) (!(pmd_val(pmd) & PMD_SECT_RDONLY))
208
209#ifdef CONFIG_TRANSPARENT_HUGEPAGE
210#define pmd_trans_huge(pmd) (pmd_val(pmd) && !(pmd_val(pmd) & PMD_TABLE_BIT))
211#define pmd_trans_splitting(pmd) (pmd_val(pmd) & PMD_SECT_SPLITTING)
212#endif
213
214#define PMD_BIT_FUNC(fn,op) \
215static inline pmd_t pmd_##fn(pmd_t pmd) { pmd_val(pmd) op; return pmd; }
216
217PMD_BIT_FUNC(wrprotect, |= PMD_SECT_RDONLY);
218PMD_BIT_FUNC(mkold, &= ~PMD_SECT_AF);
219PMD_BIT_FUNC(mksplitting, |= PMD_SECT_SPLITTING);
220PMD_BIT_FUNC(mkwrite, &= ~PMD_SECT_RDONLY);
221PMD_BIT_FUNC(mkdirty, |= PMD_SECT_DIRTY);
222PMD_BIT_FUNC(mkyoung, |= PMD_SECT_AF);
223
224#define pmd_mkhuge(pmd) (__pmd(pmd_val(pmd) & ~PMD_TABLE_BIT))
225
226#define pmd_pfn(pmd) (((pmd_val(pmd) & PMD_MASK) & PHYS_MASK) >> PAGE_SHIFT)
227#define pfn_pmd(pfn,prot) (__pmd(((phys_addr_t)(pfn) << PAGE_SHIFT) | pgprot_val(prot)))
228#define mk_pmd(page,prot) pfn_pmd(page_to_pfn(page),prot)
229
230/* represent a notpresent pmd by zero, this is used by pmdp_invalidate */
231#define pmd_mknotpresent(pmd) (__pmd(0))
232
233static inline pmd_t pmd_modify(pmd_t pmd, pgprot_t newprot)
234{
235 const pmdval_t mask = PMD_SECT_USER | PMD_SECT_XN | PMD_SECT_RDONLY |
236 PMD_SECT_VALID | PMD_SECT_NONE;
237 pmd_val(pmd) = (pmd_val(pmd) & ~mask) | (pgprot_val(newprot) & mask);
238 return pmd;
239}
240
241static inline void set_pmd_at(struct mm_struct *mm, unsigned long addr,
242 pmd_t *pmdp, pmd_t pmd)
243{
244 BUG_ON(addr >= TASK_SIZE);
245
246 /* create a faulting entry if PROT_NONE protected */
247 if (pmd_val(pmd) & PMD_SECT_NONE)
248 pmd_val(pmd) &= ~PMD_SECT_VALID;
249
250 *pmdp = __pmd(pmd_val(pmd) | PMD_SECT_nG);
251 flush_pmd_entry(pmdp);
252}
253
254static inline int has_transparent_hugepage(void)
255{
256 return 1;
257}
258
171#endif /* __ASSEMBLY__ */ 259#endif /* __ASSEMBLY__ */
172 260
173#endif /* _ASM_PGTABLE_3LEVEL_H */ 261#endif /* _ASM_PGTABLE_3LEVEL_H */
diff --git a/arch/arm/include/asm/pgtable-nommu.h b/arch/arm/include/asm/pgtable-nommu.h
index 7ec60d6075bf..0642228ff785 100644
--- a/arch/arm/include/asm/pgtable-nommu.h
+++ b/arch/arm/include/asm/pgtable-nommu.h
@@ -79,8 +79,6 @@ extern unsigned int kobjsize(const void *objp);
79 * No page table caches to initialise. 79 * No page table caches to initialise.
80 */ 80 */
81#define pgtable_cache_init() do { } while (0) 81#define pgtable_cache_init() do { } while (0)
82#define io_remap_pfn_range remap_pfn_range
83
84 82
85/* 83/*
86 * All 32bit addresses are effectively valid for vmalloc... 84 * All 32bit addresses are effectively valid for vmalloc...
diff --git a/arch/arm/include/asm/pgtable.h b/arch/arm/include/asm/pgtable.h
index 9bcd262a9008..04aeb02d2e11 100644
--- a/arch/arm/include/asm/pgtable.h
+++ b/arch/arm/include/asm/pgtable.h
@@ -24,6 +24,9 @@
24#include <asm/memory.h> 24#include <asm/memory.h>
25#include <asm/pgtable-hwdef.h> 25#include <asm/pgtable-hwdef.h>
26 26
27
28#include <asm/tlbflush.h>
29
27#ifdef CONFIG_ARM_LPAE 30#ifdef CONFIG_ARM_LPAE
28#include <asm/pgtable-3level.h> 31#include <asm/pgtable-3level.h>
29#else 32#else
@@ -318,13 +321,6 @@ static inline pte_t pte_modify(pte_t pte, pgprot_t newprot)
318#define HAVE_ARCH_UNMAPPED_AREA 321#define HAVE_ARCH_UNMAPPED_AREA
319#define HAVE_ARCH_UNMAPPED_AREA_TOPDOWN 322#define HAVE_ARCH_UNMAPPED_AREA_TOPDOWN
320 323
321/*
322 * remap a physical page `pfn' of size `size' with page protection `prot'
323 * into virtual address `from'
324 */
325#define io_remap_pfn_range(vma,from,pfn,size,prot) \
326 remap_pfn_range(vma, from, pfn, size, prot)
327
328#define pgtable_cache_init() do { } while (0) 324#define pgtable_cache_init() do { } while (0)
329 325
330#endif /* !__ASSEMBLY__ */ 326#endif /* !__ASSEMBLY__ */
diff --git a/arch/arm/include/asm/proc-fns.h b/arch/arm/include/asm/proc-fns.h
index f3628fb3d2b3..5324c1112f3a 100644
--- a/arch/arm/include/asm/proc-fns.h
+++ b/arch/arm/include/asm/proc-fns.h
@@ -60,7 +60,7 @@ extern struct processor {
60 /* 60 /*
61 * Set the page table 61 * Set the page table
62 */ 62 */
63 void (*switch_mm)(unsigned long pgd_phys, struct mm_struct *mm); 63 void (*switch_mm)(phys_addr_t pgd_phys, struct mm_struct *mm);
64 /* 64 /*
65 * Set a possibly extended PTE. Non-extended PTEs should 65 * Set a possibly extended PTE. Non-extended PTEs should
66 * ignore 'ext'. 66 * ignore 'ext'.
@@ -82,7 +82,7 @@ extern void cpu_proc_init(void);
82extern void cpu_proc_fin(void); 82extern void cpu_proc_fin(void);
83extern int cpu_do_idle(void); 83extern int cpu_do_idle(void);
84extern void cpu_dcache_clean_area(void *, int); 84extern void cpu_dcache_clean_area(void *, int);
85extern void cpu_do_switch_mm(unsigned long pgd_phys, struct mm_struct *mm); 85extern void cpu_do_switch_mm(phys_addr_t pgd_phys, struct mm_struct *mm);
86#ifdef CONFIG_ARM_LPAE 86#ifdef CONFIG_ARM_LPAE
87extern void cpu_set_pte_ext(pte_t *ptep, pte_t pte); 87extern void cpu_set_pte_ext(pte_t *ptep, pte_t pte);
88#else 88#else
@@ -116,13 +116,25 @@ extern void cpu_resume(void);
116#define cpu_switch_mm(pgd,mm) cpu_do_switch_mm(virt_to_phys(pgd),mm) 116#define cpu_switch_mm(pgd,mm) cpu_do_switch_mm(virt_to_phys(pgd),mm)
117 117
118#ifdef CONFIG_ARM_LPAE 118#ifdef CONFIG_ARM_LPAE
119
120#define cpu_get_ttbr(nr) \
121 ({ \
122 u64 ttbr; \
123 __asm__("mrrc p15, " #nr ", %Q0, %R0, c2" \
124 : "=r" (ttbr)); \
125 ttbr; \
126 })
127
128#define cpu_set_ttbr(nr, val) \
129 do { \
130 u64 ttbr = val; \
131 __asm__("mcrr p15, " #nr ", %Q0, %R0, c2" \
132 : : "r" (ttbr)); \
133 } while (0)
134
119#define cpu_get_pgd() \ 135#define cpu_get_pgd() \
120 ({ \ 136 ({ \
121 unsigned long pg, pg2; \ 137 u64 pg = cpu_get_ttbr(0); \
122 __asm__("mrrc p15, 0, %0, %1, c2" \
123 : "=r" (pg), "=r" (pg2) \
124 : \
125 : "cc"); \
126 pg &= ~(PTRS_PER_PGD*sizeof(pgd_t)-1); \ 138 pg &= ~(PTRS_PER_PGD*sizeof(pgd_t)-1); \
127 (pgd_t *)phys_to_virt(pg); \ 139 (pgd_t *)phys_to_virt(pg); \
128 }) 140 })
@@ -137,6 +149,10 @@ extern void cpu_resume(void);
137 }) 149 })
138#endif 150#endif
139 151
152#else /*!CONFIG_MMU */
153
154#define cpu_switch_mm(pgd,mm) { }
155
140#endif 156#endif
141 157
142#endif /* __ASSEMBLY__ */ 158#endif /* __ASSEMBLY__ */
diff --git a/arch/arm/include/asm/processor.h b/arch/arm/include/asm/processor.h
index 06e7d509eaac..413f3876341c 100644
--- a/arch/arm/include/asm/processor.h
+++ b/arch/arm/include/asm/processor.h
@@ -54,7 +54,6 @@ struct thread_struct {
54 54
55#define start_thread(regs,pc,sp) \ 55#define start_thread(regs,pc,sp) \
56({ \ 56({ \
57 unsigned long *stack = (unsigned long *)sp; \
58 memset(regs->uregs, 0, sizeof(regs->uregs)); \ 57 memset(regs->uregs, 0, sizeof(regs->uregs)); \
59 if (current->personality & ADDR_LIMIT_32BIT) \ 58 if (current->personality & ADDR_LIMIT_32BIT) \
60 regs->ARM_cpsr = USR_MODE; \ 59 regs->ARM_cpsr = USR_MODE; \
@@ -65,9 +64,6 @@ struct thread_struct {
65 regs->ARM_cpsr |= PSR_ENDSTATE; \ 64 regs->ARM_cpsr |= PSR_ENDSTATE; \
66 regs->ARM_pc = pc & ~1; /* pc */ \ 65 regs->ARM_pc = pc & ~1; /* pc */ \
67 regs->ARM_sp = sp; /* sp */ \ 66 regs->ARM_sp = sp; /* sp */ \
68 regs->ARM_r2 = stack[2]; /* r2 (envp) */ \
69 regs->ARM_r1 = stack[1]; /* r1 (argv) */ \
70 regs->ARM_r0 = stack[0]; /* r0 (argc) */ \
71 nommu_start_thread(regs); \ 67 nommu_start_thread(regs); \
72}) 68})
73 69
diff --git a/arch/arm/include/asm/psci.h b/arch/arm/include/asm/psci.h
index ce0dbe7c1625..c4ae171850f8 100644
--- a/arch/arm/include/asm/psci.h
+++ b/arch/arm/include/asm/psci.h
@@ -32,5 +32,14 @@ struct psci_operations {
32}; 32};
33 33
34extern struct psci_operations psci_ops; 34extern struct psci_operations psci_ops;
35extern struct smp_operations psci_smp_ops;
36
37#ifdef CONFIG_ARM_PSCI
38void psci_init(void);
39bool psci_smp_available(void);
40#else
41static inline void psci_init(void) { }
42static inline bool psci_smp_available(void) { return false; }
43#endif
35 44
36#endif /* __ASM_ARM_PSCI_H */ 45#endif /* __ASM_ARM_PSCI_H */
diff --git a/arch/arm/include/asm/ptrace.h b/arch/arm/include/asm/ptrace.h
index 3d52ee1bfb31..04c99f36ff7f 100644
--- a/arch/arm/include/asm/ptrace.h
+++ b/arch/arm/include/asm/ptrace.h
@@ -45,6 +45,7 @@ struct pt_regs {
45 */ 45 */
46static inline int valid_user_regs(struct pt_regs *regs) 46static inline int valid_user_regs(struct pt_regs *regs)
47{ 47{
48#ifndef CONFIG_CPU_V7M
48 unsigned long mode = regs->ARM_cpsr & MODE_MASK; 49 unsigned long mode = regs->ARM_cpsr & MODE_MASK;
49 50
50 /* 51 /*
@@ -67,6 +68,9 @@ static inline int valid_user_regs(struct pt_regs *regs)
67 regs->ARM_cpsr |= USR_MODE; 68 regs->ARM_cpsr |= USR_MODE;
68 69
69 return 0; 70 return 0;
71#else /* ifndef CONFIG_CPU_V7M */
72 return 1;
73#endif
70} 74}
71 75
72static inline long regs_return_value(struct pt_regs *regs) 76static inline long regs_return_value(struct pt_regs *regs)
diff --git a/arch/arm/include/asm/sched_clock.h b/arch/arm/include/asm/sched_clock.h
index 3d520ddca61b..2389b71a8e7c 100644
--- a/arch/arm/include/asm/sched_clock.h
+++ b/arch/arm/include/asm/sched_clock.h
@@ -1,16 +1,4 @@
1/* 1/* You shouldn't include this file. Use linux/sched_clock.h instead.
2 * sched_clock.h: support for extending counters to full 64-bit ns counter 2 * Temporary file until all asm/sched_clock.h users are gone
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 */ 3 */
8#ifndef ASM_SCHED_CLOCK 4#include <linux/sched_clock.h>
9#define ASM_SCHED_CLOCK
10
11extern void sched_clock_postinit(void);
12extern void setup_sched_clock(u32 (*read)(void), int bits, unsigned long rate);
13
14extern unsigned long long (*sched_clock_func)(void);
15
16#endif
diff --git a/arch/arm/include/asm/smp.h b/arch/arm/include/asm/smp.h
index d3a22bebe6ce..a8cae71caceb 100644
--- a/arch/arm/include/asm/smp.h
+++ b/arch/arm/include/asm/smp.h
@@ -65,7 +65,10 @@ asmlinkage void secondary_start_kernel(void);
65 * Initial data for bringing up a secondary CPU. 65 * Initial data for bringing up a secondary CPU.
66 */ 66 */
67struct secondary_data { 67struct secondary_data {
68 unsigned long pgdir; 68 union {
69 unsigned long mpu_rgn_szr;
70 unsigned long pgdir;
71 };
69 unsigned long swapper_pg_dir; 72 unsigned long swapper_pg_dir;
70 void *stack; 73 void *stack;
71}; 74};
diff --git a/arch/arm/include/asm/smp_plat.h b/arch/arm/include/asm/smp_plat.h
index e78983202737..6462a721ebd4 100644
--- a/arch/arm/include/asm/smp_plat.h
+++ b/arch/arm/include/asm/smp_plat.h
@@ -26,6 +26,9 @@ static inline bool is_smp(void)
26} 26}
27 27
28/* all SMP configurations have the extended CPUID registers */ 28/* all SMP configurations have the extended CPUID registers */
29#ifndef CONFIG_MMU
30#define tlb_ops_need_broadcast() 0
31#else
29static inline int tlb_ops_need_broadcast(void) 32static inline int tlb_ops_need_broadcast(void)
30{ 33{
31 if (!is_smp()) 34 if (!is_smp())
@@ -33,6 +36,7 @@ static inline int tlb_ops_need_broadcast(void)
33 36
34 return ((read_cpuid_ext(CPUID_EXT_MMFR3) >> 12) & 0xf) < 2; 37 return ((read_cpuid_ext(CPUID_EXT_MMFR3) >> 12) & 0xf) < 2;
35} 38}
39#endif
36 40
37#if !defined(CONFIG_SMP) || __LINUX_ARM_ARCH__ >= 7 41#if !defined(CONFIG_SMP) || __LINUX_ARM_ARCH__ >= 7
38#define cache_ops_need_broadcast() 0 42#define cache_ops_need_broadcast() 0
@@ -66,4 +70,22 @@ static inline int get_logical_index(u32 mpidr)
66 return -EINVAL; 70 return -EINVAL;
67} 71}
68 72
73/*
74 * NOTE ! Assembly code relies on the following
75 * structure memory layout in order to carry out load
76 * multiple from its base address. For more
77 * information check arch/arm/kernel/sleep.S
78 */
79struct mpidr_hash {
80 u32 mask; /* used by sleep.S */
81 u32 shift_aff[3]; /* used by sleep.S */
82 u32 bits;
83};
84
85extern struct mpidr_hash mpidr_hash;
86
87static inline u32 mpidr_hash_size(void)
88{
89 return 1 << mpidr_hash.bits;
90}
69#endif 91#endif
diff --git a/arch/arm/include/asm/smp_scu.h b/arch/arm/include/asm/smp_scu.h
index 18d169373612..0393fbab8dd5 100644
--- a/arch/arm/include/asm/smp_scu.h
+++ b/arch/arm/include/asm/smp_scu.h
@@ -23,10 +23,21 @@ static inline unsigned long scu_a9_get_base(void)
23 return pa; 23 return pa;
24} 24}
25 25
26#ifdef CONFIG_HAVE_ARM_SCU
26unsigned int scu_get_core_count(void __iomem *); 27unsigned int scu_get_core_count(void __iomem *);
27int scu_power_mode(void __iomem *, unsigned int); 28int scu_power_mode(void __iomem *, unsigned int);
29#else
30static inline unsigned int scu_get_core_count(void __iomem *scu_base)
31{
32 return 0;
33}
34static inline int scu_power_mode(void __iomem *scu_base, unsigned int mode)
35{
36 return -EINVAL;
37}
38#endif
28 39
29#ifdef CONFIG_SMP 40#if defined(CONFIG_SMP) && defined(CONFIG_HAVE_ARM_SCU)
30void scu_enable(void __iomem *scu_base); 41void scu_enable(void __iomem *scu_base);
31#else 42#else
32static inline void scu_enable(void __iomem *scu_base) {} 43static inline void scu_enable(void __iomem *scu_base) {}
diff --git a/arch/arm/include/asm/spinlock.h b/arch/arm/include/asm/spinlock.h
index 6220e9fdf4c7..f8b8965666e9 100644
--- a/arch/arm/include/asm/spinlock.h
+++ b/arch/arm/include/asm/spinlock.h
@@ -97,19 +97,22 @@ static inline void arch_spin_lock(arch_spinlock_t *lock)
97 97
98static inline int arch_spin_trylock(arch_spinlock_t *lock) 98static inline int arch_spin_trylock(arch_spinlock_t *lock)
99{ 99{
100 unsigned long tmp; 100 unsigned long contended, res;
101 u32 slock; 101 u32 slock;
102 102
103 __asm__ __volatile__( 103 do {
104" ldrex %0, [%2]\n" 104 __asm__ __volatile__(
105" subs %1, %0, %0, ror #16\n" 105 " ldrex %0, [%3]\n"
106" addeq %0, %0, %3\n" 106 " mov %2, #0\n"
107" strexeq %1, %0, [%2]" 107 " subs %1, %0, %0, ror #16\n"
108 : "=&r" (slock), "=&r" (tmp) 108 " addeq %0, %0, %4\n"
109 : "r" (&lock->slock), "I" (1 << TICKET_SHIFT) 109 " strexeq %2, %0, [%3]"
110 : "cc"); 110 : "=&r" (slock), "=&r" (contended), "=r" (res)
111 111 : "r" (&lock->slock), "I" (1 << TICKET_SHIFT)
112 if (tmp == 0) { 112 : "cc");
113 } while (res);
114
115 if (!contended) {
113 smp_mb(); 116 smp_mb();
114 return 1; 117 return 1;
115 } else { 118 } else {
diff --git a/arch/arm/include/asm/suspend.h b/arch/arm/include/asm/suspend.h
index 1c0a551ae375..cd20029bcd94 100644
--- a/arch/arm/include/asm/suspend.h
+++ b/arch/arm/include/asm/suspend.h
@@ -1,6 +1,11 @@
1#ifndef __ASM_ARM_SUSPEND_H 1#ifndef __ASM_ARM_SUSPEND_H
2#define __ASM_ARM_SUSPEND_H 2#define __ASM_ARM_SUSPEND_H
3 3
4struct sleep_save_sp {
5 u32 *save_ptr_stash;
6 u32 save_ptr_stash_phys;
7};
8
4extern void cpu_resume(void); 9extern void cpu_resume(void);
5extern int cpu_suspend(unsigned long, int (*)(unsigned long)); 10extern int cpu_suspend(unsigned long, int (*)(unsigned long));
6 11
diff --git a/arch/arm/include/asm/system_info.h b/arch/arm/include/asm/system_info.h
index dfd386d0c022..720ea0320a6d 100644
--- a/arch/arm/include/asm/system_info.h
+++ b/arch/arm/include/asm/system_info.h
@@ -11,6 +11,7 @@
11#define CPU_ARCH_ARMv5TEJ 7 11#define CPU_ARCH_ARMv5TEJ 7
12#define CPU_ARCH_ARMv6 8 12#define CPU_ARCH_ARMv6 8
13#define CPU_ARCH_ARMv7 9 13#define CPU_ARCH_ARMv7 9
14#define CPU_ARCH_ARMv7M 10
14 15
15#ifndef __ASSEMBLY__ 16#ifndef __ASSEMBLY__
16 17
diff --git a/arch/arm/include/asm/system_misc.h b/arch/arm/include/asm/system_misc.h
index 21a23e378bbe..a3d61ad984af 100644
--- a/arch/arm/include/asm/system_misc.h
+++ b/arch/arm/include/asm/system_misc.h
@@ -6,11 +6,12 @@
6#include <linux/compiler.h> 6#include <linux/compiler.h>
7#include <linux/linkage.h> 7#include <linux/linkage.h>
8#include <linux/irqflags.h> 8#include <linux/irqflags.h>
9#include <linux/reboot.h>
9 10
10extern void cpu_init(void); 11extern void cpu_init(void);
11 12
12void soft_restart(unsigned long); 13void soft_restart(unsigned long);
13extern void (*arm_pm_restart)(char str, const char *cmd); 14extern void (*arm_pm_restart)(enum reboot_mode reboot_mode, const char *cmd);
14extern void (*arm_pm_idle)(void); 15extern void (*arm_pm_idle)(void);
15 16
16#define UDBG_UNDEFINED (1 << 0) 17#define UDBG_UNDEFINED (1 << 0)
diff --git a/arch/arm/include/asm/thread_info.h b/arch/arm/include/asm/thread_info.h
index 1995d1a84060..2b8114fcba09 100644
--- a/arch/arm/include/asm/thread_info.h
+++ b/arch/arm/include/asm/thread_info.h
@@ -58,7 +58,7 @@ struct thread_info {
58 struct cpu_context_save cpu_context; /* cpu context */ 58 struct cpu_context_save cpu_context; /* cpu context */
59 __u32 syscall; /* syscall number */ 59 __u32 syscall; /* syscall number */
60 __u8 used_cp[16]; /* thread used copro */ 60 __u8 used_cp[16]; /* thread used copro */
61 unsigned long tp_value; 61 unsigned long tp_value[2]; /* TLS registers */
62#ifdef CONFIG_CRUNCH 62#ifdef CONFIG_CRUNCH
63 struct crunch_state crunchstate; 63 struct crunch_state crunchstate;
64#endif 64#endif
@@ -156,7 +156,6 @@ extern int vfp_restore_user_hwstate(struct user_vfp __user *,
156#define TIF_USING_IWMMXT 17 156#define TIF_USING_IWMMXT 17
157#define TIF_MEMDIE 18 /* is terminating due to OOM killer */ 157#define TIF_MEMDIE 18 /* is terminating due to OOM killer */
158#define TIF_RESTORE_SIGMASK 20 158#define TIF_RESTORE_SIGMASK 20
159#define TIF_SWITCH_MM 22 /* deferred switch_mm */
160 159
161#define _TIF_SIGPENDING (1 << TIF_SIGPENDING) 160#define _TIF_SIGPENDING (1 << TIF_SIGPENDING)
162#define _TIF_NEED_RESCHED (1 << TIF_NEED_RESCHED) 161#define _TIF_NEED_RESCHED (1 << TIF_NEED_RESCHED)
diff --git a/arch/arm/include/asm/tlb.h b/arch/arm/include/asm/tlb.h
index bdf2b8458ec1..46e7cfb3e721 100644
--- a/arch/arm/include/asm/tlb.h
+++ b/arch/arm/include/asm/tlb.h
@@ -204,6 +204,12 @@ static inline void __pmd_free_tlb(struct mmu_gather *tlb, pmd_t *pmdp,
204#endif 204#endif
205} 205}
206 206
207static inline void
208tlb_remove_pmd_tlb_entry(struct mmu_gather *tlb, pmd_t *pmdp, unsigned long addr)
209{
210 tlb_add_flush(tlb, addr);
211}
212
207#define pte_free_tlb(tlb, ptep, addr) __pte_free_tlb(tlb, ptep, addr) 213#define pte_free_tlb(tlb, ptep, addr) __pte_free_tlb(tlb, ptep, addr)
208#define pmd_free_tlb(tlb, pmdp, addr) __pmd_free_tlb(tlb, pmdp, addr) 214#define pmd_free_tlb(tlb, pmdp, addr) __pmd_free_tlb(tlb, pmdp, addr)
209#define pud_free_tlb(tlb, pudp, addr) pud_free((tlb)->mm, pudp) 215#define pud_free_tlb(tlb, pudp, addr) pud_free((tlb)->mm, pudp)
diff --git a/arch/arm/include/asm/tlbflush.h b/arch/arm/include/asm/tlbflush.h
index a3625d141c1d..f467e9b3f8d5 100644
--- a/arch/arm/include/asm/tlbflush.h
+++ b/arch/arm/include/asm/tlbflush.h
@@ -443,7 +443,18 @@ static inline void local_flush_bp_all(void)
443 isb(); 443 isb();
444} 444}
445 445
446#include <asm/cputype.h>
446#ifdef CONFIG_ARM_ERRATA_798181 447#ifdef CONFIG_ARM_ERRATA_798181
448static inline int erratum_a15_798181(void)
449{
450 unsigned int midr = read_cpuid_id();
451
452 /* Cortex-A15 r0p0..r3p2 affected */
453 if ((midr & 0xff0ffff0) != 0x410fc0f0 || midr > 0x413fc0f2)
454 return 0;
455 return 1;
456}
457
447static inline void dummy_flush_tlb_a15_erratum(void) 458static inline void dummy_flush_tlb_a15_erratum(void)
448{ 459{
449 /* 460 /*
@@ -453,6 +464,11 @@ static inline void dummy_flush_tlb_a15_erratum(void)
453 dsb(); 464 dsb();
454} 465}
455#else 466#else
467static inline int erratum_a15_798181(void)
468{
469 return 0;
470}
471
456static inline void dummy_flush_tlb_a15_erratum(void) 472static inline void dummy_flush_tlb_a15_erratum(void)
457{ 473{
458} 474}
@@ -535,8 +551,33 @@ static inline void update_mmu_cache(struct vm_area_struct *vma,
535} 551}
536#endif 552#endif
537 553
554#define update_mmu_cache_pmd(vma, address, pmd) do { } while (0)
555
538#endif 556#endif
539 557
540#endif /* CONFIG_MMU */ 558#elif defined(CONFIG_SMP) /* !CONFIG_MMU */
559
560#ifndef __ASSEMBLY__
561
562#include <linux/mm_types.h>
563
564static inline void local_flush_tlb_all(void) { }
565static inline void local_flush_tlb_mm(struct mm_struct *mm) { }
566static inline void local_flush_tlb_page(struct vm_area_struct *vma, unsigned long uaddr) { }
567static inline void local_flush_tlb_kernel_page(unsigned long kaddr) { }
568static inline void local_flush_tlb_range(struct vm_area_struct *vma, unsigned long start, unsigned long end) { }
569static inline void local_flush_tlb_kernel_range(unsigned long start, unsigned long end) { }
570static inline void local_flush_bp_all(void) { }
571
572extern void flush_tlb_all(void);
573extern void flush_tlb_mm(struct mm_struct *mm);
574extern void flush_tlb_page(struct vm_area_struct *vma, unsigned long uaddr);
575extern void flush_tlb_kernel_page(unsigned long kaddr);
576extern void flush_tlb_range(struct vm_area_struct *vma, unsigned long start, unsigned long end);
577extern void flush_tlb_kernel_range(unsigned long start, unsigned long end);
578extern void flush_bp_all(void);
579#endif /* __ASSEMBLY__ */
580
581#endif
541 582
542#endif 583#endif
diff --git a/arch/arm/include/asm/tls.h b/arch/arm/include/asm/tls.h
index 73409e6c0251..83259b873333 100644
--- a/arch/arm/include/asm/tls.h
+++ b/arch/arm/include/asm/tls.h
@@ -2,27 +2,30 @@
2#define __ASMARM_TLS_H 2#define __ASMARM_TLS_H
3 3
4#ifdef __ASSEMBLY__ 4#ifdef __ASSEMBLY__
5 .macro set_tls_none, tp, tmp1, tmp2 5#include <asm/asm-offsets.h>
6 .macro switch_tls_none, base, tp, tpuser, tmp1, tmp2
6 .endm 7 .endm
7 8
8 .macro set_tls_v6k, tp, tmp1, tmp2 9 .macro switch_tls_v6k, base, tp, tpuser, tmp1, tmp2
10 mrc p15, 0, \tmp2, c13, c0, 2 @ get the user r/w register
9 mcr p15, 0, \tp, c13, c0, 3 @ set TLS register 11 mcr p15, 0, \tp, c13, c0, 3 @ set TLS register
10 mov \tmp1, #0 12 mcr p15, 0, \tpuser, c13, c0, 2 @ and the user r/w register
11 mcr p15, 0, \tmp1, c13, c0, 2 @ clear user r/w TLS register 13 str \tmp2, [\base, #TI_TP_VALUE + 4] @ save it
12 .endm 14 .endm
13 15
14 .macro set_tls_v6, tp, tmp1, tmp2 16 .macro switch_tls_v6, base, tp, tpuser, tmp1, tmp2
15 ldr \tmp1, =elf_hwcap 17 ldr \tmp1, =elf_hwcap
16 ldr \tmp1, [\tmp1, #0] 18 ldr \tmp1, [\tmp1, #0]
17 mov \tmp2, #0xffff0fff 19 mov \tmp2, #0xffff0fff
18 tst \tmp1, #HWCAP_TLS @ hardware TLS available? 20 tst \tmp1, #HWCAP_TLS @ hardware TLS available?
19 mcrne p15, 0, \tp, c13, c0, 3 @ yes, set TLS register
20 movne \tmp1, #0
21 mcrne p15, 0, \tmp1, c13, c0, 2 @ clear user r/w TLS register
22 streq \tp, [\tmp2, #-15] @ set TLS value at 0xffff0ff0 21 streq \tp, [\tmp2, #-15] @ set TLS value at 0xffff0ff0
22 mrcne p15, 0, \tmp2, c13, c0, 2 @ get the user r/w register
23 mcrne p15, 0, \tp, c13, c0, 3 @ yes, set TLS register
24 mcrne p15, 0, \tpuser, c13, c0, 2 @ set user r/w register
25 strne \tmp2, [\base, #TI_TP_VALUE + 4] @ save it
23 .endm 26 .endm
24 27
25 .macro set_tls_software, tp, tmp1, tmp2 28 .macro switch_tls_software, base, tp, tpuser, tmp1, tmp2
26 mov \tmp1, #0xffff0fff 29 mov \tmp1, #0xffff0fff
27 str \tp, [\tmp1, #-15] @ set TLS value at 0xffff0ff0 30 str \tp, [\tmp1, #-15] @ set TLS value at 0xffff0ff0
28 .endm 31 .endm
@@ -31,19 +34,30 @@
31#ifdef CONFIG_TLS_REG_EMUL 34#ifdef CONFIG_TLS_REG_EMUL
32#define tls_emu 1 35#define tls_emu 1
33#define has_tls_reg 1 36#define has_tls_reg 1
34#define set_tls set_tls_none 37#define switch_tls switch_tls_none
35#elif defined(CONFIG_CPU_V6) 38#elif defined(CONFIG_CPU_V6)
36#define tls_emu 0 39#define tls_emu 0
37#define has_tls_reg (elf_hwcap & HWCAP_TLS) 40#define has_tls_reg (elf_hwcap & HWCAP_TLS)
38#define set_tls set_tls_v6 41#define switch_tls switch_tls_v6
39#elif defined(CONFIG_CPU_32v6K) 42#elif defined(CONFIG_CPU_32v6K)
40#define tls_emu 0 43#define tls_emu 0
41#define has_tls_reg 1 44#define has_tls_reg 1
42#define set_tls set_tls_v6k 45#define switch_tls switch_tls_v6k
43#else 46#else
44#define tls_emu 0 47#define tls_emu 0
45#define has_tls_reg 0 48#define has_tls_reg 0
46#define set_tls set_tls_software 49#define switch_tls switch_tls_software
47#endif 50#endif
48 51
52#ifndef __ASSEMBLY__
53static inline unsigned long get_tpuser(void)
54{
55 unsigned long reg = 0;
56
57 if (has_tls_reg && !tls_emu)
58 __asm__("mrc p15, 0, %0, c13, c0, 2" : "=r" (reg));
59
60 return reg;
61}
62#endif
49#endif /* __ASMARM_TLS_H */ 63#endif /* __ASMARM_TLS_H */
diff --git a/arch/arm/include/asm/v7m.h b/arch/arm/include/asm/v7m.h
new file mode 100644
index 000000000000..fa88d09fa3d9
--- /dev/null
+++ b/arch/arm/include/asm/v7m.h
@@ -0,0 +1,44 @@
1/*
2 * Common defines for v7m cpus
3 */
4#define V7M_SCS_ICTR IOMEM(0xe000e004)
5#define V7M_SCS_ICTR_INTLINESNUM_MASK 0x0000000f
6
7#define BASEADDR_V7M_SCB IOMEM(0xe000ed00)
8
9#define V7M_SCB_CPUID 0x00
10
11#define V7M_SCB_ICSR 0x04
12#define V7M_SCB_ICSR_PENDSVSET (1 << 28)
13#define V7M_SCB_ICSR_PENDSVCLR (1 << 27)
14#define V7M_SCB_ICSR_RETTOBASE (1 << 11)
15
16#define V7M_SCB_VTOR 0x08
17
18#define V7M_SCB_SCR 0x10
19#define V7M_SCB_SCR_SLEEPDEEP (1 << 2)
20
21#define V7M_SCB_CCR 0x14
22#define V7M_SCB_CCR_STKALIGN (1 << 9)
23
24#define V7M_SCB_SHPR2 0x1c
25#define V7M_SCB_SHPR3 0x20
26
27#define V7M_SCB_SHCSR 0x24
28#define V7M_SCB_SHCSR_USGFAULTENA (1 << 18)
29#define V7M_SCB_SHCSR_BUSFAULTENA (1 << 17)
30#define V7M_SCB_SHCSR_MEMFAULTENA (1 << 16)
31
32#define V7M_xPSR_FRAMEPTRALIGN 0x00000200
33#define V7M_xPSR_EXCEPTIONNO 0x000001ff
34
35/*
36 * When branching to an address that has bits [31:28] == 0xf an exception return
37 * occurs. Bits [27:5] are reserved (SBOP). If the processor implements the FP
38 * extension Bit [4] defines if the exception frame has space allocated for FP
39 * state information, SBOP otherwise. Bit [3] defines the mode that is returned
40 * to (0 -> handler mode; 1 -> thread mode). Bit [2] defines which sp is used
41 * (0 -> msp; 1 -> psp). Bits [1:0] are fixed to 0b01.
42 */
43#define EXC_RET_STACK_MASK 0x00000004
44#define EXC_RET_THREADMODE_PROCESSSTACK 0xfffffffd
diff --git a/arch/arm/include/asm/virt.h b/arch/arm/include/asm/virt.h
index 50af92bac737..4371f45c5784 100644
--- a/arch/arm/include/asm/virt.h
+++ b/arch/arm/include/asm/virt.h
@@ -29,6 +29,7 @@
29#define BOOT_CPU_MODE_MISMATCH PSR_N_BIT 29#define BOOT_CPU_MODE_MISMATCH PSR_N_BIT
30 30
31#ifndef __ASSEMBLY__ 31#ifndef __ASSEMBLY__
32#include <asm/cacheflush.h>
32 33
33#ifdef CONFIG_ARM_VIRT_EXT 34#ifdef CONFIG_ARM_VIRT_EXT
34/* 35/*
@@ -41,10 +42,21 @@
41 */ 42 */
42extern int __boot_cpu_mode; 43extern int __boot_cpu_mode;
43 44
45static inline void sync_boot_mode(void)
46{
47 /*
48 * As secondaries write to __boot_cpu_mode with caches disabled, we
49 * must flush the corresponding cache entries to ensure the visibility
50 * of their writes.
51 */
52 sync_cache_r(&__boot_cpu_mode);
53}
54
44void __hyp_set_vectors(unsigned long phys_vector_base); 55void __hyp_set_vectors(unsigned long phys_vector_base);
45unsigned long __hyp_get_vectors(void); 56unsigned long __hyp_get_vectors(void);
46#else 57#else
47#define __boot_cpu_mode (SVC_MODE) 58#define __boot_cpu_mode (SVC_MODE)
59#define sync_boot_mode()
48#endif 60#endif
49 61
50#ifndef ZIMAGE 62#ifndef ZIMAGE
diff --git a/arch/arm/include/asm/xen/hypercall.h b/arch/arm/include/asm/xen/hypercall.h
index 799f42ecca63..7704e28c3483 100644
--- a/arch/arm/include/asm/xen/hypercall.h
+++ b/arch/arm/include/asm/xen/hypercall.h
@@ -47,6 +47,7 @@ unsigned long HYPERVISOR_hvm_op(int op, void *arg);
47int HYPERVISOR_memory_op(unsigned int cmd, void *arg); 47int HYPERVISOR_memory_op(unsigned int cmd, void *arg);
48int HYPERVISOR_physdev_op(int cmd, void *arg); 48int HYPERVISOR_physdev_op(int cmd, void *arg);
49int HYPERVISOR_vcpu_op(int cmd, int vcpuid, void *extra_args); 49int HYPERVISOR_vcpu_op(int cmd, int vcpuid, void *extra_args);
50int HYPERVISOR_tmem_op(void *arg);
50 51
51static inline void 52static inline void
52MULTI_update_va_mapping(struct multicall_entry *mcl, unsigned long va, 53MULTI_update_va_mapping(struct multicall_entry *mcl, unsigned long va,
diff --git a/arch/arm/include/asm/xen/page.h b/arch/arm/include/asm/xen/page.h
index 30cdacb675af..359a7b50b158 100644
--- a/arch/arm/include/asm/xen/page.h
+++ b/arch/arm/include/asm/xen/page.h
@@ -1,7 +1,6 @@
1#ifndef _ASM_ARM_XEN_PAGE_H 1#ifndef _ASM_ARM_XEN_PAGE_H
2#define _ASM_ARM_XEN_PAGE_H 2#define _ASM_ARM_XEN_PAGE_H
3 3
4#include <asm/mach/map.h>
5#include <asm/page.h> 4#include <asm/page.h>
6#include <asm/pgtable.h> 5#include <asm/pgtable.h>
7 6
@@ -88,6 +87,6 @@ static inline bool set_phys_to_machine(unsigned long pfn, unsigned long mfn)
88 return __set_phys_to_machine(pfn, mfn); 87 return __set_phys_to_machine(pfn, mfn);
89} 88}
90 89
91#define xen_remap(cookie, size) __arm_ioremap((cookie), (size), MT_MEMORY); 90#define xen_remap(cookie, size) ioremap_cached((cookie), (size));
92 91
93#endif /* _ASM_ARM_XEN_PAGE_H */ 92#endif /* _ASM_ARM_XEN_PAGE_H */
diff --git a/arch/arm/include/debug/imx-uart.h b/arch/arm/include/debug/imx-uart.h
index 91d38e38a0b4..29da84e183f4 100644
--- a/arch/arm/include/debug/imx-uart.h
+++ b/arch/arm/include/debug/imx-uart.h
@@ -65,6 +65,14 @@
65#define IMX6Q_UART_BASE_ADDR(n) IMX6Q_UART##n##_BASE_ADDR 65#define IMX6Q_UART_BASE_ADDR(n) IMX6Q_UART##n##_BASE_ADDR
66#define IMX6Q_UART_BASE(n) IMX6Q_UART_BASE_ADDR(n) 66#define IMX6Q_UART_BASE(n) IMX6Q_UART_BASE_ADDR(n)
67 67
68#define IMX6SL_UART1_BASE_ADDR 0x02020000
69#define IMX6SL_UART2_BASE_ADDR 0x02024000
70#define IMX6SL_UART3_BASE_ADDR 0x02034000
71#define IMX6SL_UART4_BASE_ADDR 0x02038000
72#define IMX6SL_UART5_BASE_ADDR 0x02018000
73#define IMX6SL_UART_BASE_ADDR(n) IMX6SL_UART##n##_BASE_ADDR
74#define IMX6SL_UART_BASE(n) IMX6SL_UART_BASE_ADDR(n)
75
68#define IMX_DEBUG_UART_BASE(soc) soc##_UART_BASE(CONFIG_DEBUG_IMX_UART_PORT) 76#define IMX_DEBUG_UART_BASE(soc) soc##_UART_BASE(CONFIG_DEBUG_IMX_UART_PORT)
69 77
70#ifdef CONFIG_DEBUG_IMX1_UART 78#ifdef CONFIG_DEBUG_IMX1_UART
@@ -83,6 +91,8 @@
83#define UART_PADDR IMX_DEBUG_UART_BASE(IMX53) 91#define UART_PADDR IMX_DEBUG_UART_BASE(IMX53)
84#elif defined(CONFIG_DEBUG_IMX6Q_UART) 92#elif defined(CONFIG_DEBUG_IMX6Q_UART)
85#define UART_PADDR IMX_DEBUG_UART_BASE(IMX6Q) 93#define UART_PADDR IMX_DEBUG_UART_BASE(IMX6Q)
94#elif defined(CONFIG_DEBUG_IMX6SL_UART)
95#define UART_PADDR IMX_DEBUG_UART_BASE(IMX6SL)
86#endif 96#endif
87 97
88#endif /* __DEBUG_IMX_UART_H */ 98#endif /* __DEBUG_IMX_UART_H */
diff --git a/arch/arm/include/debug/keystone.S b/arch/arm/include/debug/keystone.S
new file mode 100644
index 000000000000..9aef9ba3f4f0
--- /dev/null
+++ b/arch/arm/include/debug/keystone.S
@@ -0,0 +1,43 @@
1/*
2 * Early serial debug output macro for Keystone SOCs
3 *
4 * Copyright 2013 Texas Instruments, Inc.
5 * Santosh Shilimkar <santosh.shilimkar@ti.com>
6 *
7 * Based on RMKs low level debug code.
8 * Copyright (C) 1994-1999 Russell King
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License version 2 as
12 * published by the Free Software Foundation.
13 */
14
15#include <linux/serial_reg.h>
16
17#define UART_SHIFT 2
18#if defined(CONFIG_DEBUG_KEYSTONE_UART0)
19#define UART_PHYS 0x02530c00
20#define UART_VIRT 0xfeb30c00
21#elif defined(CONFIG_DEBUG_KEYSTONE_UART1)
22#define UART_PHYS 0x02531000
23#define UART_VIRT 0xfeb31000
24#endif
25
26 .macro addruart, rp, rv, tmp
27 ldr \rv, =UART_VIRT @ physical base address
28 ldr \rp, =UART_PHYS @ virtual base address
29 .endm
30
31 .macro senduart,rd,rx
32 str \rd, [\rx, #UART_TX << UART_SHIFT]
33 .endm
34
35 .macro busyuart,rd,rx
361002: ldr \rd, [\rx, #UART_LSR << UART_SHIFT]
37 and \rd, \rd, #UART_LSR_TEMT | UART_LSR_THRE
38 teq \rd, #UART_LSR_TEMT | UART_LSR_THRE
39 bne 1002b
40 .endm
41
42 .macro waituart,rd,rx
43 .endm
diff --git a/arch/arm/include/debug/mvebu.S b/arch/arm/include/debug/mvebu.S
index df191afa3be1..6517311a1c91 100644
--- a/arch/arm/include/debug/mvebu.S
+++ b/arch/arm/include/debug/mvebu.S
@@ -11,7 +11,12 @@
11 * published by the Free Software Foundation. 11 * published by the Free Software Foundation.
12*/ 12*/
13 13
14#ifdef CONFIG_DEBUG_MVEBU_UART_ALTERNATE
15#define ARMADA_370_XP_REGS_PHYS_BASE 0xf1000000
16#else
14#define ARMADA_370_XP_REGS_PHYS_BASE 0xd0000000 17#define ARMADA_370_XP_REGS_PHYS_BASE 0xd0000000
18#endif
19
15#define ARMADA_370_XP_REGS_VIRT_BASE 0xfec00000 20#define ARMADA_370_XP_REGS_VIRT_BASE 0xfec00000
16 21
17 .macro addruart, rp, rv, tmp 22 .macro addruart, rp, rv, tmp
diff --git a/arch/arm/include/debug/nspire.S b/arch/arm/include/debug/nspire.S
new file mode 100644
index 000000000000..886fd276fcbc
--- /dev/null
+++ b/arch/arm/include/debug/nspire.S
@@ -0,0 +1,28 @@
1/*
2 * linux/arch/arm/include/debug/nspire.S
3 *
4 * Copyright (C) 2013 Daniel Tang <tangrs@tangrs.id.au>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2, as
8 * published by the Free Software Foundation.
9 *
10 */
11
12#define NSPIRE_EARLY_UART_PHYS_BASE 0x90020000
13#define NSPIRE_EARLY_UART_VIRT_BASE 0xfee20000
14
15.macro addruart, rp, rv, tmp
16 ldr \rp, =(NSPIRE_EARLY_UART_PHYS_BASE) @ physical base address
17 ldr \rv, =(NSPIRE_EARLY_UART_VIRT_BASE) @ virtual base address
18.endm
19
20
21#ifdef CONFIG_DEBUG_NSPIRE_CX_UART
22#include <asm/hardware/debug-pl01x.S>
23#endif
24
25#ifdef CONFIG_DEBUG_NSPIRE_CLASSIC_UART
26#define UART_SHIFT 2
27#include <asm/hardware/debug-8250.S>
28#endif
diff --git a/arch/arm/include/debug/rockchip.S b/arch/arm/include/debug/rockchip.S
new file mode 100644
index 000000000000..cfd883e69588
--- /dev/null
+++ b/arch/arm/include/debug/rockchip.S
@@ -0,0 +1,42 @@
1/*
2 * Early serial output macro for Rockchip SoCs
3 *
4 * Copyright (C) 2012 Maxime Ripard
5 *
6 * Maxime Ripard <maxime.ripard@free-electrons.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
13#if defined(CONFIG_DEBUG_RK29_UART0)
14#define ROCKCHIP_UART_DEBUG_PHYS_BASE 0x20060000
15#define ROCKCHIP_UART_DEBUG_VIRT_BASE 0xfed60000
16#elif defined(CONFIG_DEBUG_RK29_UART1)
17#define ROCKCHIP_UART_DEBUG_PHYS_BASE 0x20064000
18#define ROCKCHIP_UART_DEBUG_VIRT_BASE 0xfed64000
19#elif defined(CONFIG_DEBUG_RK29_UART2)
20#define ROCKCHIP_UART_DEBUG_PHYS_BASE 0x20068000
21#define ROCKCHIP_UART_DEBUG_VIRT_BASE 0xfed68000
22#elif defined(CONFIG_DEBUG_RK3X_UART0)
23#define ROCKCHIP_UART_DEBUG_PHYS_BASE 0x10124000
24#define ROCKCHIP_UART_DEBUG_VIRT_BASE 0xfeb24000
25#elif defined(CONFIG_DEBUG_RK3X_UART1)
26#define ROCKCHIP_UART_DEBUG_PHYS_BASE 0x10126000
27#define ROCKCHIP_UART_DEBUG_VIRT_BASE 0xfeb26000
28#elif defined(CONFIG_DEBUG_RK3X_UART2)
29#define ROCKCHIP_UART_DEBUG_PHYS_BASE 0x20064000
30#define ROCKCHIP_UART_DEBUG_VIRT_BASE 0xfed64000
31#elif defined(CONFIG_DEBUG_RK3X_UART3)
32#define ROCKCHIP_UART_DEBUG_PHYS_BASE 0x20068000
33#define ROCKCHIP_UART_DEBUG_VIRT_BASE 0xfed68000
34#endif
35
36 .macro addruart, rp, rv, tmp
37 ldr \rp, =ROCKCHIP_UART_DEBUG_PHYS_BASE
38 ldr \rv, =ROCKCHIP_UART_DEBUG_VIRT_BASE
39 .endm
40
41#define UART_SHIFT 2
42#include <asm/hardware/debug-8250.S>
diff --git a/arch/arm/include/debug/sti.S b/arch/arm/include/debug/sti.S
new file mode 100644
index 000000000000..e3aa58ff1776
--- /dev/null
+++ b/arch/arm/include/debug/sti.S
@@ -0,0 +1,61 @@
1/*
2 * arch/arm/include/debug/sti.S
3 *
4 * Debugging macro include header
5 * Copyright (C) 2013 STMicroelectronics (R&D) Limited.
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#define STIH41X_COMMS_BASE 0xfed00000
13#define STIH41X_ASC2_BASE (STIH41X_COMMS_BASE+0x32000)
14
15#define STIH41X_SBC_LPM_BASE 0xfe400000
16#define STIH41X_SBC_COMMS_BASE (STIH41X_SBC_LPM_BASE + 0x100000)
17#define STIH41X_SBC_ASC1_BASE (STIH41X_SBC_COMMS_BASE + 0x31000)
18
19
20#define VIRT_ADDRESS(x) (x - 0x1000000)
21
22#if IS_ENABLED(CONFIG_STIH41X_DEBUG_ASC2)
23#define DEBUG_LL_UART_BASE STIH41X_ASC2_BASE
24#endif
25
26#if IS_ENABLED(CONFIG_STIH41X_DEBUG_SBC_ASC1)
27#define DEBUG_LL_UART_BASE STIH41X_SBC_ASC1_BASE
28#endif
29
30#ifndef DEBUG_LL_UART_BASE
31#error "DEBUG UART is not Configured"
32#endif
33
34#define ASC_TX_BUF_OFF 0x04
35#define ASC_CTRL_OFF 0x0c
36#define ASC_STA_OFF 0x14
37
38#define ASC_STA_TX_FULL (1<<9)
39#define ASC_STA_TX_EMPTY (1<<1)
40
41
42 .macro addruart, rp, rv, tmp
43 ldr \rp, =DEBUG_LL_UART_BASE @ physical base
44 ldr \rv, =VIRT_ADDRESS(DEBUG_LL_UART_BASE) @ virt base
45 .endm
46
47 .macro senduart,rd,rx
48 strb \rd, [\rx, #ASC_TX_BUF_OFF]
49 .endm
50
51 .macro waituart,rd,rx
521001: ldr \rd, [\rx, #ASC_STA_OFF]
53 tst \rd, #ASC_STA_TX_FULL
54 bne 1001b
55 .endm
56
57 .macro busyuart,rd,rx
581001: ldr \rd, [\rx, #ASC_STA_OFF]
59 tst \rd, #ASC_STA_TX_EMPTY
60 beq 1001b
61 .endm
diff --git a/arch/arm/mach-u300/include/mach/debug-macro.S b/arch/arm/include/debug/u300.S
index 8ae8e4ab34b0..6f04f08a203c 100644
--- a/arch/arm/mach-u300/include/mach/debug-macro.S
+++ b/arch/arm/include/debug/u300.S
@@ -1,14 +1,11 @@
1/* 1/*
2 * 2 * Copyright (C) 2006-2013 ST-Ericsson AB
3 * arch-arm/mach-u300/include/mach/debug-macro.S
4 *
5 *
6 * Copyright (C) 2006-2009 ST-Ericsson AB
7 * License terms: GNU General Public License (GPL) version 2 3 * License terms: GNU General Public License (GPL) version 2
8 * Debugging macro include header. 4 * Debugging macro include header.
9 * Author: Linus Walleij <linus.walleij@stericsson.com> 5 * Author: Linus Walleij <linus.walleij@stericsson.com>
10 */ 6 */
11#include <mach/hardware.h> 7#define U300_SLOW_PER_PHYS_BASE 0xc0010000
8#define U300_SLOW_PER_VIRT_BASE 0xff000000
12 9
13 .macro addruart, rp, rv, tmp 10 .macro addruart, rp, rv, tmp
14 /* If we move the address using MMU, use this. */ 11 /* If we move the address using MMU, use this. */
diff --git a/arch/arm/include/debug/vexpress.S b/arch/arm/include/debug/vexpress.S
index dc8e882a6257..acafb229e2b6 100644
--- a/arch/arm/include/debug/vexpress.S
+++ b/arch/arm/include/debug/vexpress.S
@@ -16,6 +16,8 @@
16#define DEBUG_LL_PHYS_BASE_RS1 0x1c000000 16#define DEBUG_LL_PHYS_BASE_RS1 0x1c000000
17#define DEBUG_LL_UART_OFFSET_RS1 0x00090000 17#define DEBUG_LL_UART_OFFSET_RS1 0x00090000
18 18
19#define DEBUG_LL_UART_PHYS_CRX 0xb0090000
20
19#define DEBUG_LL_VIRT_BASE 0xf8000000 21#define DEBUG_LL_VIRT_BASE 0xf8000000
20 22
21#if defined(CONFIG_DEBUG_VEXPRESS_UART0_DETECT) 23#if defined(CONFIG_DEBUG_VEXPRESS_UART0_DETECT)
@@ -67,6 +69,14 @@
67 69
68#include <asm/hardware/debug-pl01x.S> 70#include <asm/hardware/debug-pl01x.S>
69 71
72#elif defined(CONFIG_DEBUG_VEXPRESS_UART0_CRX)
73
74 .macro addruart,rp,tmp,tmp2
75 ldr \rp, =DEBUG_LL_UART_PHYS_CRX
76 .endm
77
78#include <asm/hardware/debug-pl01x.S>
79
70#else /* CONFIG_DEBUG_LL_UART_NONE */ 80#else /* CONFIG_DEBUG_LL_UART_NONE */
71 81
72 .macro addruart, rp, rv, tmp 82 .macro addruart, rp, rv, tmp
diff --git a/arch/arm/include/uapi/asm/Kbuild b/arch/arm/include/uapi/asm/Kbuild
index 47bcb2d254af..18d76fd5a2af 100644
--- a/arch/arm/include/uapi/asm/Kbuild
+++ b/arch/arm/include/uapi/asm/Kbuild
@@ -1,7 +1,6 @@
1# UAPI Header export list 1# UAPI Header export list
2include include/uapi/asm-generic/Kbuild.asm 2include include/uapi/asm-generic/Kbuild.asm
3 3
4header-y += a.out.h
5header-y += byteorder.h 4header-y += byteorder.h
6header-y += fcntl.h 5header-y += fcntl.h
7header-y += hwcap.h 6header-y += hwcap.h
diff --git a/arch/arm/include/uapi/asm/a.out.h b/arch/arm/include/uapi/asm/a.out.h
deleted file mode 100644
index 083894b2e3bc..000000000000
--- a/arch/arm/include/uapi/asm/a.out.h
+++ /dev/null
@@ -1,34 +0,0 @@
1#ifndef __ARM_A_OUT_H__
2#define __ARM_A_OUT_H__
3
4#include <linux/personality.h>
5#include <linux/types.h>
6
7struct exec
8{
9 __u32 a_info; /* Use macros N_MAGIC, etc for access */
10 __u32 a_text; /* length of text, in bytes */
11 __u32 a_data; /* length of data, in bytes */
12 __u32 a_bss; /* length of uninitialized data area for file, in bytes */
13 __u32 a_syms; /* length of symbol table data in file, in bytes */
14 __u32 a_entry; /* start address */
15 __u32 a_trsize; /* length of relocation info for text, in bytes */
16 __u32 a_drsize; /* length of relocation info for data, in bytes */
17};
18
19/*
20 * This is always the same
21 */
22#define N_TXTADDR(a) (0x00008000)
23
24#define N_TRSIZE(a) ((a).a_trsize)
25#define N_DRSIZE(a) ((a).a_drsize)
26#define N_SYMSIZE(a) ((a).a_syms)
27
28#define M_ARM 103
29
30#ifndef LIBRARY_START_TEXT
31#define LIBRARY_START_TEXT (0x00c00000)
32#endif
33
34#endif /* __A_OUT_GNU_H__ */
diff --git a/arch/arm/include/uapi/asm/hwcap.h b/arch/arm/include/uapi/asm/hwcap.h
index 3688fd15a32d..6d34d080372a 100644
--- a/arch/arm/include/uapi/asm/hwcap.h
+++ b/arch/arm/include/uapi/asm/hwcap.h
@@ -25,6 +25,6 @@
25#define HWCAP_IDIVT (1 << 18) 25#define HWCAP_IDIVT (1 << 18)
26#define HWCAP_VFPD32 (1 << 19) /* set if VFP has 32 regs (not 16) */ 26#define HWCAP_VFPD32 (1 << 19) /* set if VFP has 32 regs (not 16) */
27#define HWCAP_IDIV (HWCAP_IDIVA | HWCAP_IDIVT) 27#define HWCAP_IDIV (HWCAP_IDIVA | HWCAP_IDIVT)
28 28#define HWCAP_LPAE (1 << 20)
29 29
30#endif /* _UAPI__ASMARM_HWCAP_H */ 30#endif /* _UAPI__ASMARM_HWCAP_H */
diff --git a/arch/arm/include/uapi/asm/ptrace.h b/arch/arm/include/uapi/asm/ptrace.h
index 96ee0929790f..5af0ed1b825a 100644
--- a/arch/arm/include/uapi/asm/ptrace.h
+++ b/arch/arm/include/uapi/asm/ptrace.h
@@ -34,28 +34,47 @@
34 34
35/* 35/*
36 * PSR bits 36 * PSR bits
37 * Note on V7M there is no mode contained in the PSR
37 */ 38 */
38#define USR26_MODE 0x00000000 39#define USR26_MODE 0x00000000
39#define FIQ26_MODE 0x00000001 40#define FIQ26_MODE 0x00000001
40#define IRQ26_MODE 0x00000002 41#define IRQ26_MODE 0x00000002
41#define SVC26_MODE 0x00000003 42#define SVC26_MODE 0x00000003
43#if defined(__KERNEL__) && defined(CONFIG_CPU_V7M)
44/*
45 * Use 0 here to get code right that creates a userspace
46 * or kernel space thread.
47 */
48#define USR_MODE 0x00000000
49#define SVC_MODE 0x00000000
50#else
42#define USR_MODE 0x00000010 51#define USR_MODE 0x00000010
52#define SVC_MODE 0x00000013
53#endif
43#define FIQ_MODE 0x00000011 54#define FIQ_MODE 0x00000011
44#define IRQ_MODE 0x00000012 55#define IRQ_MODE 0x00000012
45#define SVC_MODE 0x00000013
46#define ABT_MODE 0x00000017 56#define ABT_MODE 0x00000017
47#define HYP_MODE 0x0000001a 57#define HYP_MODE 0x0000001a
48#define UND_MODE 0x0000001b 58#define UND_MODE 0x0000001b
49#define SYSTEM_MODE 0x0000001f 59#define SYSTEM_MODE 0x0000001f
50#define MODE32_BIT 0x00000010 60#define MODE32_BIT 0x00000010
51#define MODE_MASK 0x0000001f 61#define MODE_MASK 0x0000001f
52#define PSR_T_BIT 0x00000020 62
53#define PSR_F_BIT 0x00000040 63#define V4_PSR_T_BIT 0x00000020 /* >= V4T, but not V7M */
54#define PSR_I_BIT 0x00000080 64#define V7M_PSR_T_BIT 0x01000000
55#define PSR_A_BIT 0x00000100 65#if defined(__KERNEL__) && defined(CONFIG_CPU_V7M)
56#define PSR_E_BIT 0x00000200 66#define PSR_T_BIT V7M_PSR_T_BIT
57#define PSR_J_BIT 0x01000000 67#else
58#define PSR_Q_BIT 0x08000000 68/* for compatibility */
69#define PSR_T_BIT V4_PSR_T_BIT
70#endif
71
72#define PSR_F_BIT 0x00000040 /* >= V4, but not V7M */
73#define PSR_I_BIT 0x00000080 /* >= V4, but not V7M */
74#define PSR_A_BIT 0x00000100 /* >= V6, but not V7M */
75#define PSR_E_BIT 0x00000200 /* >= V6, but not V7M */
76#define PSR_J_BIT 0x01000000 /* >= V5J, but not V7M */
77#define PSR_Q_BIT 0x08000000 /* >= V5E, including V7M */
59#define PSR_V_BIT 0x10000000 78#define PSR_V_BIT 0x10000000
60#define PSR_C_BIT 0x20000000 79#define PSR_C_BIT 0x20000000
61#define PSR_Z_BIT 0x40000000 80#define PSR_Z_BIT 0x40000000
diff --git a/arch/arm/kernel/Makefile b/arch/arm/kernel/Makefile
index 5f3338eacad2..86d10dd47dc4 100644
--- a/arch/arm/kernel/Makefile
+++ b/arch/arm/kernel/Makefile
@@ -15,14 +15,20 @@ CFLAGS_REMOVE_return_address.o = -pg
15 15
16# Object file lists. 16# Object file lists.
17 17
18obj-y := elf.o entry-armv.o entry-common.o irq.o opcodes.o \ 18obj-y := elf.o entry-common.o irq.o opcodes.o \
19 process.o ptrace.o return_address.o sched_clock.o \ 19 process.o ptrace.o return_address.o \
20 setup.o signal.o stacktrace.o sys_arm.o time.o traps.o 20 setup.o signal.o stacktrace.o sys_arm.o time.o traps.o
21 21
22obj-$(CONFIG_ATAGS) += atags_parse.o 22obj-$(CONFIG_ATAGS) += atags_parse.o
23obj-$(CONFIG_ATAGS_PROC) += atags_proc.o 23obj-$(CONFIG_ATAGS_PROC) += atags_proc.o
24obj-$(CONFIG_DEPRECATED_PARAM_STRUCT) += atags_compat.o 24obj-$(CONFIG_DEPRECATED_PARAM_STRUCT) += atags_compat.o
25 25
26ifeq ($(CONFIG_CPU_V7M),y)
27obj-y += entry-v7m.o
28else
29obj-y += entry-armv.o
30endif
31
26obj-$(CONFIG_OC_ETM) += etm.o 32obj-$(CONFIG_OC_ETM) += etm.o
27obj-$(CONFIG_CPU_IDLE) += cpuidle.o 33obj-$(CONFIG_CPU_IDLE) += cpuidle.o
28obj-$(CONFIG_ISA_DMA_API) += dma.o 34obj-$(CONFIG_ISA_DMA_API) += dma.o
@@ -32,7 +38,10 @@ obj-$(CONFIG_ARTHUR) += arthur.o
32obj-$(CONFIG_ISA_DMA) += dma-isa.o 38obj-$(CONFIG_ISA_DMA) += dma-isa.o
33obj-$(CONFIG_PCI) += bios32.o isa.o 39obj-$(CONFIG_PCI) += bios32.o isa.o
34obj-$(CONFIG_ARM_CPU_SUSPEND) += sleep.o suspend.o 40obj-$(CONFIG_ARM_CPU_SUSPEND) += sleep.o suspend.o
35obj-$(CONFIG_SMP) += smp.o smp_tlb.o 41obj-$(CONFIG_SMP) += smp.o
42ifdef CONFIG_MMU
43obj-$(CONFIG_SMP) += smp_tlb.o
44endif
36obj-$(CONFIG_HAVE_ARM_SCU) += smp_scu.o 45obj-$(CONFIG_HAVE_ARM_SCU) += smp_scu.o
37obj-$(CONFIG_HAVE_ARM_TWD) += smp_twd.o 46obj-$(CONFIG_HAVE_ARM_TWD) += smp_twd.o
38obj-$(CONFIG_ARM_ARCH_TIMER) += arch_timer.o 47obj-$(CONFIG_ARM_ARCH_TIMER) += arch_timer.o
@@ -82,6 +91,9 @@ obj-$(CONFIG_DEBUG_LL) += debug.o
82obj-$(CONFIG_EARLY_PRINTK) += early_printk.o 91obj-$(CONFIG_EARLY_PRINTK) += early_printk.o
83 92
84obj-$(CONFIG_ARM_VIRT_EXT) += hyp-stub.o 93obj-$(CONFIG_ARM_VIRT_EXT) += hyp-stub.o
85obj-$(CONFIG_ARM_PSCI) += psci.o 94ifeq ($(CONFIG_ARM_PSCI),y)
95obj-y += psci.o
96obj-$(CONFIG_SMP) += psci_smp.o
97endif
86 98
87extra-y := $(head-y) vmlinux.lds 99extra-y := $(head-y) vmlinux.lds
diff --git a/arch/arm/kernel/arch_timer.c b/arch/arm/kernel/arch_timer.c
index 59dcdced6e30..221f07b11ccb 100644
--- a/arch/arm/kernel/arch_timer.c
+++ b/arch/arm/kernel/arch_timer.c
@@ -11,9 +11,9 @@
11#include <linux/init.h> 11#include <linux/init.h>
12#include <linux/types.h> 12#include <linux/types.h>
13#include <linux/errno.h> 13#include <linux/errno.h>
14#include <linux/sched_clock.h>
14 15
15#include <asm/delay.h> 16#include <asm/delay.h>
16#include <asm/sched_clock.h>
17 17
18#include <clocksource/arm_arch_timer.h> 18#include <clocksource/arm_arch_timer.h>
19 19
diff --git a/arch/arm/kernel/asm-offsets.c b/arch/arm/kernel/asm-offsets.c
index ee68cce6b48e..ded041711beb 100644
--- a/arch/arm/kernel/asm-offsets.c
+++ b/arch/arm/kernel/asm-offsets.c
@@ -23,6 +23,7 @@
23#include <asm/thread_info.h> 23#include <asm/thread_info.h>
24#include <asm/memory.h> 24#include <asm/memory.h>
25#include <asm/procinfo.h> 25#include <asm/procinfo.h>
26#include <asm/suspend.h>
26#include <asm/hardware/cache-l2x0.h> 27#include <asm/hardware/cache-l2x0.h>
27#include <linux/kbuild.h> 28#include <linux/kbuild.h>
28 29
@@ -145,6 +146,11 @@ int main(void)
145#ifdef MULTI_CACHE 146#ifdef MULTI_CACHE
146 DEFINE(CACHE_FLUSH_KERN_ALL, offsetof(struct cpu_cache_fns, flush_kern_all)); 147 DEFINE(CACHE_FLUSH_KERN_ALL, offsetof(struct cpu_cache_fns, flush_kern_all));
147#endif 148#endif
149#ifdef CONFIG_ARM_CPU_SUSPEND
150 DEFINE(SLEEP_SAVE_SP_SZ, sizeof(struct sleep_save_sp));
151 DEFINE(SLEEP_SAVE_SP_PHYS, offsetof(struct sleep_save_sp, save_ptr_stash_phys));
152 DEFINE(SLEEP_SAVE_SP_VIRT, offsetof(struct sleep_save_sp, save_ptr_stash));
153#endif
148 BLANK(); 154 BLANK();
149 DEFINE(DMA_BIDIRECTIONAL, DMA_BIDIRECTIONAL); 155 DEFINE(DMA_BIDIRECTIONAL, DMA_BIDIRECTIONAL);
150 DEFINE(DMA_TO_DEVICE, DMA_TO_DEVICE); 156 DEFINE(DMA_TO_DEVICE, DMA_TO_DEVICE);
diff --git a/arch/arm/kernel/bios32.c b/arch/arm/kernel/bios32.c
index b2ed73c45489..261fcc826169 100644
--- a/arch/arm/kernel/bios32.c
+++ b/arch/arm/kernel/bios32.c
@@ -445,7 +445,8 @@ static int pcibios_init_resources(int busnr, struct pci_sys_data *sys)
445 return 0; 445 return 0;
446} 446}
447 447
448static void pcibios_init_hw(struct hw_pci *hw, struct list_head *head) 448static void pcibios_init_hw(struct device *parent, struct hw_pci *hw,
449 struct list_head *head)
449{ 450{
450 struct pci_sys_data *sys = NULL; 451 struct pci_sys_data *sys = NULL;
451 int ret; 452 int ret;
@@ -480,7 +481,7 @@ static void pcibios_init_hw(struct hw_pci *hw, struct list_head *head)
480 if (hw->scan) 481 if (hw->scan)
481 sys->bus = hw->scan(nr, sys); 482 sys->bus = hw->scan(nr, sys);
482 else 483 else
483 sys->bus = pci_scan_root_bus(NULL, sys->busnr, 484 sys->bus = pci_scan_root_bus(parent, sys->busnr,
484 hw->ops, sys, &sys->resources); 485 hw->ops, sys, &sys->resources);
485 486
486 if (!sys->bus) 487 if (!sys->bus)
@@ -497,7 +498,7 @@ static void pcibios_init_hw(struct hw_pci *hw, struct list_head *head)
497 } 498 }
498} 499}
499 500
500void pci_common_init(struct hw_pci *hw) 501void pci_common_init_dev(struct device *parent, struct hw_pci *hw)
501{ 502{
502 struct pci_sys_data *sys; 503 struct pci_sys_data *sys;
503 LIST_HEAD(head); 504 LIST_HEAD(head);
@@ -505,7 +506,7 @@ void pci_common_init(struct hw_pci *hw)
505 pci_add_flags(PCI_REASSIGN_ALL_RSRC); 506 pci_add_flags(PCI_REASSIGN_ALL_RSRC);
506 if (hw->preinit) 507 if (hw->preinit)
507 hw->preinit(); 508 hw->preinit();
508 pcibios_init_hw(hw, &head); 509 pcibios_init_hw(parent, hw, &head);
509 if (hw->postinit) 510 if (hw->postinit)
510 hw->postinit(); 511 hw->postinit();
511 512
diff --git a/arch/arm/kernel/entry-armv.S b/arch/arm/kernel/entry-armv.S
index 582b405befc5..d40d0ef389db 100644
--- a/arch/arm/kernel/entry-armv.S
+++ b/arch/arm/kernel/entry-armv.S
@@ -685,15 +685,16 @@ ENTRY(__switch_to)
685 UNWIND(.fnstart ) 685 UNWIND(.fnstart )
686 UNWIND(.cantunwind ) 686 UNWIND(.cantunwind )
687 add ip, r1, #TI_CPU_SAVE 687 add ip, r1, #TI_CPU_SAVE
688 ldr r3, [r2, #TI_TP_VALUE]
689 ARM( stmia ip!, {r4 - sl, fp, sp, lr} ) @ Store most regs on stack 688 ARM( stmia ip!, {r4 - sl, fp, sp, lr} ) @ Store most regs on stack
690 THUMB( stmia ip!, {r4 - sl, fp} ) @ Store most regs on stack 689 THUMB( stmia ip!, {r4 - sl, fp} ) @ Store most regs on stack
691 THUMB( str sp, [ip], #4 ) 690 THUMB( str sp, [ip], #4 )
692 THUMB( str lr, [ip], #4 ) 691 THUMB( str lr, [ip], #4 )
692 ldr r4, [r2, #TI_TP_VALUE]
693 ldr r5, [r2, #TI_TP_VALUE + 4]
693#ifdef CONFIG_CPU_USE_DOMAINS 694#ifdef CONFIG_CPU_USE_DOMAINS
694 ldr r6, [r2, #TI_CPU_DOMAIN] 695 ldr r6, [r2, #TI_CPU_DOMAIN]
695#endif 696#endif
696 set_tls r3, r4, r5 697 switch_tls r1, r4, r5, r3, r7
697#if defined(CONFIG_CC_STACKPROTECTOR) && !defined(CONFIG_SMP) 698#if defined(CONFIG_CC_STACKPROTECTOR) && !defined(CONFIG_SMP)
698 ldr r7, [r2, #TI_TASK] 699 ldr r7, [r2, #TI_TASK]
699 ldr r8, =__stack_chk_guard 700 ldr r8, =__stack_chk_guard
@@ -741,6 +742,18 @@ ENDPROC(__switch_to)
741#endif 742#endif
742 .endm 743 .endm
743 744
745 .macro kuser_pad, sym, size
746 .if (. - \sym) & 3
747 .rept 4 - (. - \sym) & 3
748 .byte 0
749 .endr
750 .endif
751 .rept (\size - (. - \sym)) / 4
752 .word 0xe7fddef1
753 .endr
754 .endm
755
756#ifdef CONFIG_KUSER_HELPERS
744 .align 5 757 .align 5
745 .globl __kuser_helper_start 758 .globl __kuser_helper_start
746__kuser_helper_start: 759__kuser_helper_start:
@@ -831,18 +844,13 @@ kuser_cmpxchg64_fixup:
831#error "incoherent kernel configuration" 844#error "incoherent kernel configuration"
832#endif 845#endif
833 846
834 /* pad to next slot */ 847 kuser_pad __kuser_cmpxchg64, 64
835 .rept (16 - (. - __kuser_cmpxchg64)/4)
836 .word 0
837 .endr
838
839 .align 5
840 848
841__kuser_memory_barrier: @ 0xffff0fa0 849__kuser_memory_barrier: @ 0xffff0fa0
842 smp_dmb arm 850 smp_dmb arm
843 usr_ret lr 851 usr_ret lr
844 852
845 .align 5 853 kuser_pad __kuser_memory_barrier, 32
846 854
847__kuser_cmpxchg: @ 0xffff0fc0 855__kuser_cmpxchg: @ 0xffff0fc0
848 856
@@ -915,13 +923,14 @@ kuser_cmpxchg32_fixup:
915 923
916#endif 924#endif
917 925
918 .align 5 926 kuser_pad __kuser_cmpxchg, 32
919 927
920__kuser_get_tls: @ 0xffff0fe0 928__kuser_get_tls: @ 0xffff0fe0
921 ldr r0, [pc, #(16 - 8)] @ read TLS, set in kuser_get_tls_init 929 ldr r0, [pc, #(16 - 8)] @ read TLS, set in kuser_get_tls_init
922 usr_ret lr 930 usr_ret lr
923 mrc p15, 0, r0, c13, c0, 3 @ 0xffff0fe8 hardware TLS code 931 mrc p15, 0, r0, c13, c0, 3 @ 0xffff0fe8 hardware TLS code
924 .rep 4 932 kuser_pad __kuser_get_tls, 16
933 .rep 3
925 .word 0 @ 0xffff0ff0 software TLS value, then 934 .word 0 @ 0xffff0ff0 software TLS value, then
926 .endr @ pad up to __kuser_helper_version 935 .endr @ pad up to __kuser_helper_version
927 936
@@ -931,14 +940,16 @@ __kuser_helper_version: @ 0xffff0ffc
931 .globl __kuser_helper_end 940 .globl __kuser_helper_end
932__kuser_helper_end: 941__kuser_helper_end:
933 942
943#endif
944
934 THUMB( .thumb ) 945 THUMB( .thumb )
935 946
936/* 947/*
937 * Vector stubs. 948 * Vector stubs.
938 * 949 *
939 * This code is copied to 0xffff0200 so we can use branches in the 950 * This code is copied to 0xffff1000 so we can use branches in the
940 * vectors, rather than ldr's. Note that this code must not 951 * vectors, rather than ldr's. Note that this code must not exceed
941 * exceed 0x300 bytes. 952 * a page size.
942 * 953 *
943 * Common stub entry macro: 954 * Common stub entry macro:
944 * Enter in IRQ mode, spsr = SVC/USR CPSR, lr = SVC/USR PC 955 * Enter in IRQ mode, spsr = SVC/USR CPSR, lr = SVC/USR PC
@@ -985,8 +996,17 @@ ENDPROC(vector_\name)
9851: 9961:
986 .endm 997 .endm
987 998
988 .globl __stubs_start 999 .section .stubs, "ax", %progbits
989__stubs_start: 1000__stubs_start:
1001 @ This must be the first word
1002 .word vector_swi
1003
1004vector_rst:
1005 ARM( swi SYS_ERROR0 )
1006 THUMB( svc #0 )
1007 THUMB( nop )
1008 b vector_und
1009
990/* 1010/*
991 * Interrupt dispatcher 1011 * Interrupt dispatcher
992 */ 1012 */
@@ -1081,6 +1101,16 @@ __stubs_start:
1081 .align 5 1101 .align 5
1082 1102
1083/*============================================================================= 1103/*=============================================================================
1104 * Address exception handler
1105 *-----------------------------------------------------------------------------
1106 * These aren't too critical.
1107 * (they're not supposed to happen, and won't happen in 32-bit data mode).
1108 */
1109
1110vector_addrexcptn:
1111 b vector_addrexcptn
1112
1113/*=============================================================================
1084 * Undefined FIQs 1114 * Undefined FIQs
1085 *----------------------------------------------------------------------------- 1115 *-----------------------------------------------------------------------------
1086 * Enter in FIQ mode, spsr = ANY CPSR, lr = ANY PC 1116 * Enter in FIQ mode, spsr = ANY CPSR, lr = ANY PC
@@ -1093,45 +1123,19 @@ __stubs_start:
1093vector_fiq: 1123vector_fiq:
1094 subs pc, lr, #4 1124 subs pc, lr, #4
1095 1125
1096/*============================================================================= 1126 .globl vector_fiq_offset
1097 * Address exception handler 1127 .equ vector_fiq_offset, vector_fiq
1098 *-----------------------------------------------------------------------------
1099 * These aren't too critical.
1100 * (they're not supposed to happen, and won't happen in 32-bit data mode).
1101 */
1102
1103vector_addrexcptn:
1104 b vector_addrexcptn
1105
1106/*
1107 * We group all the following data together to optimise
1108 * for CPUs with separate I & D caches.
1109 */
1110 .align 5
1111
1112.LCvswi:
1113 .word vector_swi
1114
1115 .globl __stubs_end
1116__stubs_end:
1117
1118 .equ stubs_offset, __vectors_start + 0x200 - __stubs_start
1119 1128
1120 .globl __vectors_start 1129 .section .vectors, "ax", %progbits
1121__vectors_start: 1130__vectors_start:
1122 ARM( swi SYS_ERROR0 ) 1131 W(b) vector_rst
1123 THUMB( svc #0 ) 1132 W(b) vector_und
1124 THUMB( nop ) 1133 W(ldr) pc, __vectors_start + 0x1000
1125 W(b) vector_und + stubs_offset 1134 W(b) vector_pabt
1126 W(ldr) pc, .LCvswi + stubs_offset 1135 W(b) vector_dabt
1127 W(b) vector_pabt + stubs_offset 1136 W(b) vector_addrexcptn
1128 W(b) vector_dabt + stubs_offset 1137 W(b) vector_irq
1129 W(b) vector_addrexcptn + stubs_offset 1138 W(b) vector_fiq
1130 W(b) vector_irq + stubs_offset
1131 W(b) vector_fiq + stubs_offset
1132
1133 .globl __vectors_end
1134__vectors_end:
1135 1139
1136 .data 1140 .data
1137 1141
diff --git a/arch/arm/kernel/entry-common.S b/arch/arm/kernel/entry-common.S
index bc5bc0a97131..94104bf69719 100644
--- a/arch/arm/kernel/entry-common.S
+++ b/arch/arm/kernel/entry-common.S
@@ -350,6 +350,9 @@ ENDPROC(ftrace_stub)
350 350
351 .align 5 351 .align 5
352ENTRY(vector_swi) 352ENTRY(vector_swi)
353#ifdef CONFIG_CPU_V7M
354 v7m_exception_entry
355#else
353 sub sp, sp, #S_FRAME_SIZE 356 sub sp, sp, #S_FRAME_SIZE
354 stmia sp, {r0 - r12} @ Calling r0 - r12 357 stmia sp, {r0 - r12} @ Calling r0 - r12
355 ARM( add r8, sp, #S_PC ) 358 ARM( add r8, sp, #S_PC )
@@ -360,8 +363,19 @@ ENTRY(vector_swi)
360 str lr, [sp, #S_PC] @ Save calling PC 363 str lr, [sp, #S_PC] @ Save calling PC
361 str r8, [sp, #S_PSR] @ Save CPSR 364 str r8, [sp, #S_PSR] @ Save CPSR
362 str r0, [sp, #S_OLD_R0] @ Save OLD_R0 365 str r0, [sp, #S_OLD_R0] @ Save OLD_R0
366#endif
363 zero_fp 367 zero_fp
364 368
369#ifdef CONFIG_ALIGNMENT_TRAP
370 ldr ip, __cr_alignment
371 ldr ip, [ip]
372 mcr p15, 0, ip, c1, c0 @ update control register
373#endif
374
375 enable_irq
376 ct_user_exit
377 get_thread_info tsk
378
365 /* 379 /*
366 * Get the system call number. 380 * Get the system call number.
367 */ 381 */
@@ -375,9 +389,9 @@ ENTRY(vector_swi)
375#ifdef CONFIG_ARM_THUMB 389#ifdef CONFIG_ARM_THUMB
376 tst r8, #PSR_T_BIT 390 tst r8, #PSR_T_BIT
377 movne r10, #0 @ no thumb OABI emulation 391 movne r10, #0 @ no thumb OABI emulation
378 ldreq r10, [lr, #-4] @ get SWI instruction 392 USER( ldreq r10, [lr, #-4] ) @ get SWI instruction
379#else 393#else
380 ldr r10, [lr, #-4] @ get SWI instruction 394 USER( ldr r10, [lr, #-4] ) @ get SWI instruction
381#endif 395#endif
382#ifdef CONFIG_CPU_ENDIAN_BE8 396#ifdef CONFIG_CPU_ENDIAN_BE8
383 rev r10, r10 @ little endian instruction 397 rev r10, r10 @ little endian instruction
@@ -392,22 +406,13 @@ ENTRY(vector_swi)
392 /* Legacy ABI only, possibly thumb mode. */ 406 /* Legacy ABI only, possibly thumb mode. */
393 tst r8, #PSR_T_BIT @ this is SPSR from save_user_regs 407 tst r8, #PSR_T_BIT @ this is SPSR from save_user_regs
394 addne scno, r7, #__NR_SYSCALL_BASE @ put OS number in 408 addne scno, r7, #__NR_SYSCALL_BASE @ put OS number in
395 ldreq scno, [lr, #-4] 409 USER( ldreq scno, [lr, #-4] )
396 410
397#else 411#else
398 /* Legacy ABI only. */ 412 /* Legacy ABI only. */
399 ldr scno, [lr, #-4] @ get SWI instruction 413 USER( ldr scno, [lr, #-4] ) @ get SWI instruction
400#endif 414#endif
401 415
402#ifdef CONFIG_ALIGNMENT_TRAP
403 ldr ip, __cr_alignment
404 ldr ip, [ip]
405 mcr p15, 0, ip, c1, c0 @ update control register
406#endif
407 enable_irq
408 ct_user_exit
409
410 get_thread_info tsk
411 adr tbl, sys_call_table @ load syscall table pointer 416 adr tbl, sys_call_table @ load syscall table pointer
412 417
413#if defined(CONFIG_OABI_COMPAT) 418#if defined(CONFIG_OABI_COMPAT)
@@ -442,6 +447,21 @@ local_restart:
442 eor r0, scno, #__NR_SYSCALL_BASE @ put OS number back 447 eor r0, scno, #__NR_SYSCALL_BASE @ put OS number back
443 bcs arm_syscall 448 bcs arm_syscall
444 b sys_ni_syscall @ not private func 449 b sys_ni_syscall @ not private func
450
451#if defined(CONFIG_OABI_COMPAT) || !defined(CONFIG_AEABI)
452 /*
453 * We failed to handle a fault trying to access the page
454 * containing the swi instruction, but we're not really in a
455 * position to return -EFAULT. Instead, return back to the
456 * instruction and re-enter the user fault handling path trying
457 * to page it in. This will likely result in sending SEGV to the
458 * current task.
459 */
4609001:
461 sub lr, lr, #4
462 str lr, [sp, #S_PC]
463 b ret_fast_syscall
464#endif
445ENDPROC(vector_swi) 465ENDPROC(vector_swi)
446 466
447 /* 467 /*
diff --git a/arch/arm/kernel/entry-header.S b/arch/arm/kernel/entry-header.S
index 160f3376ba6d..de23a9beed13 100644
--- a/arch/arm/kernel/entry-header.S
+++ b/arch/arm/kernel/entry-header.S
@@ -5,6 +5,7 @@
5#include <asm/asm-offsets.h> 5#include <asm/asm-offsets.h>
6#include <asm/errno.h> 6#include <asm/errno.h>
7#include <asm/thread_info.h> 7#include <asm/thread_info.h>
8#include <asm/v7m.h>
8 9
9@ Bad Abort numbers 10@ Bad Abort numbers
10@ ----------------- 11@ -----------------
@@ -44,6 +45,116 @@
44#endif 45#endif
45 .endm 46 .endm
46 47
48#ifdef CONFIG_CPU_V7M
49/*
50 * ARMv7-M exception entry/exit macros.
51 *
52 * xPSR, ReturnAddress(), LR (R14), R12, R3, R2, R1, and R0 are
53 * automatically saved on the current stack (32 words) before
54 * switching to the exception stack (SP_main).
55 *
56 * If exception is taken while in user mode, SP_main is
57 * empty. Otherwise, SP_main is aligned to 64 bit automatically
58 * (CCR.STKALIGN set).
59 *
60 * Linux assumes that the interrupts are disabled when entering an
61 * exception handler and it may BUG if this is not the case. Interrupts
62 * are disabled during entry and reenabled in the exit macro.
63 *
64 * v7m_exception_slow_exit is used when returning from SVC or PendSV.
65 * When returning to kernel mode, we don't return from exception.
66 */
67 .macro v7m_exception_entry
68 @ determine the location of the registers saved by the core during
69 @ exception entry. Depending on the mode the cpu was in when the
70 @ exception happend that is either on the main or the process stack.
71 @ Bit 2 of EXC_RETURN stored in the lr register specifies which stack
72 @ was used.
73 tst lr, #EXC_RET_STACK_MASK
74 mrsne r12, psp
75 moveq r12, sp
76
77 @ we cannot rely on r0-r3 and r12 matching the value saved in the
78 @ exception frame because of tail-chaining. So these have to be
79 @ reloaded.
80 ldmia r12!, {r0-r3}
81
82 @ Linux expects to have irqs off. Do it here before taking stack space
83 cpsid i
84
85 sub sp, #S_FRAME_SIZE-S_IP
86 stmdb sp!, {r0-r11}
87
88 @ load saved r12, lr, return address and xPSR.
89 @ r0-r7 are used for signals and never touched from now on. Clobbering
90 @ r8-r12 is OK.
91 mov r9, r12
92 ldmia r9!, {r8, r10-r12}
93
94 @ calculate the original stack pointer value.
95 @ r9 currently points to the memory location just above the auto saved
96 @ xPSR.
97 @ The cpu might automatically 8-byte align the stack. Bit 9
98 @ of the saved xPSR specifies if stack aligning took place. In this case
99 @ another 32-bit value is included in the stack.
100
101 tst r12, V7M_xPSR_FRAMEPTRALIGN
102 addne r9, r9, #4
103
104 @ store saved r12 using str to have a register to hold the base for stm
105 str r8, [sp, #S_IP]
106 add r8, sp, #S_SP
107 @ store r13-r15, xPSR
108 stmia r8!, {r9-r12}
109 @ store old_r0
110 str r0, [r8]
111 .endm
112
113 /*
114 * PENDSV and SVCALL are configured to have the same exception
115 * priorities. As a kernel thread runs at SVCALL execution priority it
116 * can never be preempted and so we will never have to return to a
117 * kernel thread here.
118 */
119 .macro v7m_exception_slow_exit ret_r0
120 cpsid i
121 ldr lr, =EXC_RET_THREADMODE_PROCESSSTACK
122
123 @ read original r12, sp, lr, pc and xPSR
124 add r12, sp, #S_IP
125 ldmia r12, {r1-r5}
126
127 @ an exception frame is always 8-byte aligned. To tell the hardware if
128 @ the sp to be restored is aligned or not set bit 9 of the saved xPSR
129 @ accordingly.
130 tst r2, #4
131 subne r2, r2, #4
132 orrne r5, V7M_xPSR_FRAMEPTRALIGN
133 biceq r5, V7M_xPSR_FRAMEPTRALIGN
134
135 @ write basic exception frame
136 stmdb r2!, {r1, r3-r5}
137 ldmia sp, {r1, r3-r5}
138 .if \ret_r0
139 stmdb r2!, {r0, r3-r5}
140 .else
141 stmdb r2!, {r1, r3-r5}
142 .endif
143
144 @ restore process sp
145 msr psp, r2
146
147 @ restore original r4-r11
148 ldmia sp!, {r0-r11}
149
150 @ restore main sp
151 add sp, sp, #S_FRAME_SIZE-S_IP
152
153 cpsie i
154 bx lr
155 .endm
156#endif /* CONFIG_CPU_V7M */
157
47 @ 158 @
48 @ Store/load the USER SP and LR registers by switching to the SYS 159 @ Store/load the USER SP and LR registers by switching to the SYS
49 @ mode. Useful in Thumb-2 mode where "stm/ldm rd, {sp, lr}^" is not 160 @ mode. Useful in Thumb-2 mode where "stm/ldm rd, {sp, lr}^" is not
@@ -165,6 +276,18 @@
165 rfeia sp! 276 rfeia sp!
166 .endm 277 .endm
167 278
279#ifdef CONFIG_CPU_V7M
280 /*
281 * Note we don't need to do clrex here as clearing the local monitor is
282 * part of each exception entry and exit sequence.
283 */
284 .macro restore_user_regs, fast = 0, offset = 0
285 .if \offset
286 add sp, #\offset
287 .endif
288 v7m_exception_slow_exit ret_r0 = \fast
289 .endm
290#else /* ifdef CONFIG_CPU_V7M */
168 .macro restore_user_regs, fast = 0, offset = 0 291 .macro restore_user_regs, fast = 0, offset = 0
169 clrex @ clear the exclusive monitor 292 clrex @ clear the exclusive monitor
170 mov r2, sp 293 mov r2, sp
@@ -181,6 +304,7 @@
181 add sp, sp, #S_FRAME_SIZE - S_SP 304 add sp, sp, #S_FRAME_SIZE - S_SP
182 movs pc, lr @ return & move spsr_svc into cpsr 305 movs pc, lr @ return & move spsr_svc into cpsr
183 .endm 306 .endm
307#endif /* ifdef CONFIG_CPU_V7M / else */
184 308
185 .macro get_thread_info, rd 309 .macro get_thread_info, rd
186 mov \rd, sp 310 mov \rd, sp
diff --git a/arch/arm/kernel/entry-v7m.S b/arch/arm/kernel/entry-v7m.S
new file mode 100644
index 000000000000..52b26432c9a9
--- /dev/null
+++ b/arch/arm/kernel/entry-v7m.S
@@ -0,0 +1,143 @@
1/*
2 * linux/arch/arm/kernel/entry-v7m.S
3 *
4 * Copyright (C) 2008 ARM Ltd.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 *
10 * Low-level vector interface routines for the ARMv7-M architecture
11 */
12#include <asm/memory.h>
13#include <asm/glue.h>
14#include <asm/thread_notify.h>
15#include <asm/v7m.h>
16
17#include <mach/entry-macro.S>
18
19#include "entry-header.S"
20
21#ifdef CONFIG_TRACE_IRQFLAGS
22#error "CONFIG_TRACE_IRQFLAGS not supported on the current ARMv7M implementation"
23#endif
24
25__invalid_entry:
26 v7m_exception_entry
27 adr r0, strerr
28 mrs r1, ipsr
29 mov r2, lr
30 bl printk
31 mov r0, sp
32 bl show_regs
331: b 1b
34ENDPROC(__invalid_entry)
35
36strerr: .asciz "\nUnhandled exception: IPSR = %08lx LR = %08lx\n"
37
38 .align 2
39__irq_entry:
40 v7m_exception_entry
41
42 @
43 @ Invoke the IRQ handler
44 @
45 mrs r0, ipsr
46 ldr r1, =V7M_xPSR_EXCEPTIONNO
47 and r0, r1
48 sub r0, #16
49 mov r1, sp
50 stmdb sp!, {lr}
51 @ routine called with r0 = irq number, r1 = struct pt_regs *
52 bl nvic_handle_irq
53
54 pop {lr}
55 @
56 @ Check for any pending work if returning to user
57 @
58 ldr r1, =BASEADDR_V7M_SCB
59 ldr r0, [r1, V7M_SCB_ICSR]
60 tst r0, V7M_SCB_ICSR_RETTOBASE
61 beq 2f
62
63 get_thread_info tsk
64 ldr r2, [tsk, #TI_FLAGS]
65 tst r2, #_TIF_WORK_MASK
66 beq 2f @ no work pending
67 mov r0, #V7M_SCB_ICSR_PENDSVSET
68 str r0, [r1, V7M_SCB_ICSR] @ raise PendSV
69
702:
71 @ registers r0-r3 and r12 are automatically restored on exception
72 @ return. r4-r7 were not clobbered in v7m_exception_entry so for
73 @ correctness they don't need to be restored. So only r8-r11 must be
74 @ restored here. The easiest way to do so is to restore r0-r7, too.
75 ldmia sp!, {r0-r11}
76 add sp, #S_FRAME_SIZE-S_IP
77 cpsie i
78 bx lr
79ENDPROC(__irq_entry)
80
81__pendsv_entry:
82 v7m_exception_entry
83
84 ldr r1, =BASEADDR_V7M_SCB
85 mov r0, #V7M_SCB_ICSR_PENDSVCLR
86 str r0, [r1, V7M_SCB_ICSR] @ clear PendSV
87
88 @ execute the pending work, including reschedule
89 get_thread_info tsk
90 mov why, #0
91 b ret_to_user
92ENDPROC(__pendsv_entry)
93
94/*
95 * Register switch for ARMv7-M processors.
96 * r0 = previous task_struct, r1 = previous thread_info, r2 = next thread_info
97 * previous and next are guaranteed not to be the same.
98 */
99ENTRY(__switch_to)
100 .fnstart
101 .cantunwind
102 add ip, r1, #TI_CPU_SAVE
103 stmia ip!, {r4 - r11} @ Store most regs on stack
104 str sp, [ip], #4
105 str lr, [ip], #4
106 mov r5, r0
107 add r4, r2, #TI_CPU_SAVE
108 ldr r0, =thread_notify_head
109 mov r1, #THREAD_NOTIFY_SWITCH
110 bl atomic_notifier_call_chain
111 mov ip, r4
112 mov r0, r5
113 ldmia ip!, {r4 - r11} @ Load all regs saved previously
114 ldr sp, [ip]
115 ldr pc, [ip, #4]!
116 .fnend
117ENDPROC(__switch_to)
118
119 .data
120 .align 8
121/*
122 * Vector table (64 words => 256 bytes natural alignment)
123 */
124ENTRY(vector_table)
125 .long 0 @ 0 - Reset stack pointer
126 .long __invalid_entry @ 1 - Reset
127 .long __invalid_entry @ 2 - NMI
128 .long __invalid_entry @ 3 - HardFault
129 .long __invalid_entry @ 4 - MemManage
130 .long __invalid_entry @ 5 - BusFault
131 .long __invalid_entry @ 6 - UsageFault
132 .long __invalid_entry @ 7 - Reserved
133 .long __invalid_entry @ 8 - Reserved
134 .long __invalid_entry @ 9 - Reserved
135 .long __invalid_entry @ 10 - Reserved
136 .long vector_swi @ 11 - SVCall
137 .long __invalid_entry @ 12 - Debug Monitor
138 .long __invalid_entry @ 13 - Reserved
139 .long __pendsv_entry @ 14 - PendSV
140 .long __invalid_entry @ 15 - SysTick
141 .rept 64 - 16
142 .long __irq_entry @ 16..64 - External Interrupts
143 .endr
diff --git a/arch/arm/kernel/fiq.c b/arch/arm/kernel/fiq.c
index 2adda11f712f..25442f451148 100644
--- a/arch/arm/kernel/fiq.c
+++ b/arch/arm/kernel/fiq.c
@@ -47,6 +47,11 @@
47#include <asm/irq.h> 47#include <asm/irq.h>
48#include <asm/traps.h> 48#include <asm/traps.h>
49 49
50#define FIQ_OFFSET ({ \
51 extern void *vector_fiq_offset; \
52 (unsigned)&vector_fiq_offset; \
53 })
54
50static unsigned long no_fiq_insn; 55static unsigned long no_fiq_insn;
51 56
52/* Default reacquire function 57/* Default reacquire function
@@ -80,13 +85,16 @@ int show_fiq_list(struct seq_file *p, int prec)
80void set_fiq_handler(void *start, unsigned int length) 85void set_fiq_handler(void *start, unsigned int length)
81{ 86{
82#if defined(CONFIG_CPU_USE_DOMAINS) 87#if defined(CONFIG_CPU_USE_DOMAINS)
83 memcpy((void *)0xffff001c, start, length); 88 void *base = (void *)0xffff0000;
84#else 89#else
85 memcpy(vectors_page + 0x1c, start, length); 90 void *base = vectors_page;
86#endif 91#endif
87 flush_icache_range(0xffff001c, 0xffff001c + length); 92 unsigned offset = FIQ_OFFSET;
93
94 memcpy(base + offset, start, length);
95 flush_icache_range(0xffff0000 + offset, 0xffff0000 + offset + length);
88 if (!vectors_high()) 96 if (!vectors_high())
89 flush_icache_range(0x1c, 0x1c + length); 97 flush_icache_range(offset, offset + length);
90} 98}
91 99
92int claim_fiq(struct fiq_handler *f) 100int claim_fiq(struct fiq_handler *f)
@@ -144,6 +152,7 @@ EXPORT_SYMBOL(disable_fiq);
144 152
145void __init init_FIQ(int start) 153void __init init_FIQ(int start)
146{ 154{
147 no_fiq_insn = *(unsigned long *)0xffff001c; 155 unsigned offset = FIQ_OFFSET;
156 no_fiq_insn = *(unsigned long *)(0xffff0000 + offset);
148 fiq_start = start; 157 fiq_start = start;
149} 158}
diff --git a/arch/arm/kernel/head-common.S b/arch/arm/kernel/head-common.S
index 5b391a689b47..47cd974e57ea 100644
--- a/arch/arm/kernel/head-common.S
+++ b/arch/arm/kernel/head-common.S
@@ -133,6 +133,9 @@ ENTRY(lookup_processor_type)
133 ldmfd sp!, {r4 - r6, r9, pc} 133 ldmfd sp!, {r4 - r6, r9, pc}
134ENDPROC(lookup_processor_type) 134ENDPROC(lookup_processor_type)
135 135
136 __FINIT
137 .text
138
136/* 139/*
137 * Read processor ID register (CP#15, CR0), and look up in the linker-built 140 * Read processor ID register (CP#15, CR0), and look up in the linker-built
138 * supported processor list. Note that we can't use the absolute addresses 141 * supported processor list. Note that we can't use the absolute addresses
@@ -146,7 +149,6 @@ ENDPROC(lookup_processor_type)
146 * r5 = proc_info pointer in physical address space 149 * r5 = proc_info pointer in physical address space
147 * r9 = cpuid (preserved) 150 * r9 = cpuid (preserved)
148 */ 151 */
149 __CPUINIT
150__lookup_processor_type: 152__lookup_processor_type:
151 adr r3, __lookup_processor_type_data 153 adr r3, __lookup_processor_type_data
152 ldmia r3, {r4 - r6} 154 ldmia r3, {r4 - r6}
diff --git a/arch/arm/kernel/head-nommu.S b/arch/arm/kernel/head-nommu.S
index 6a2e09c952c7..14235ba64a90 100644
--- a/arch/arm/kernel/head-nommu.S
+++ b/arch/arm/kernel/head-nommu.S
@@ -17,8 +17,12 @@
17#include <asm/assembler.h> 17#include <asm/assembler.h>
18#include <asm/ptrace.h> 18#include <asm/ptrace.h>
19#include <asm/asm-offsets.h> 19#include <asm/asm-offsets.h>
20#include <asm/memory.h>
20#include <asm/cp15.h> 21#include <asm/cp15.h>
21#include <asm/thread_info.h> 22#include <asm/thread_info.h>
23#include <asm/v7m.h>
24#include <asm/mpu.h>
25#include <asm/page.h>
22 26
23/* 27/*
24 * Kernel startup entry point. 28 * Kernel startup entry point.
@@ -50,21 +54,86 @@ ENTRY(stext)
50 54
51 setmode PSR_F_BIT | PSR_I_BIT | SVC_MODE, r9 @ ensure svc mode 55 setmode PSR_F_BIT | PSR_I_BIT | SVC_MODE, r9 @ ensure svc mode
52 @ and irqs disabled 56 @ and irqs disabled
53#ifndef CONFIG_CPU_CP15 57#if defined(CONFIG_CPU_CP15)
54 ldr r9, =CONFIG_PROCESSOR_ID
55#else
56 mrc p15, 0, r9, c0, c0 @ get processor id 58 mrc p15, 0, r9, c0, c0 @ get processor id
59#elif defined(CONFIG_CPU_V7M)
60 ldr r9, =BASEADDR_V7M_SCB
61 ldr r9, [r9, V7M_SCB_CPUID]
62#else
63 ldr r9, =CONFIG_PROCESSOR_ID
57#endif 64#endif
58 bl __lookup_processor_type @ r5=procinfo r9=cpuid 65 bl __lookup_processor_type @ r5=procinfo r9=cpuid
59 movs r10, r5 @ invalid processor (r5=0)? 66 movs r10, r5 @ invalid processor (r5=0)?
60 beq __error_p @ yes, error 'p' 67 beq __error_p @ yes, error 'p'
61 68
62 adr lr, BSYM(__after_proc_init) @ return (PIC) address 69#ifdef CONFIG_ARM_MPU
70 /* Calculate the size of a region covering just the kernel */
71 ldr r5, =PHYS_OFFSET @ Region start: PHYS_OFFSET
72 ldr r6, =(_end) @ Cover whole kernel
73 sub r6, r6, r5 @ Minimum size of region to map
74 clz r6, r6 @ Region size must be 2^N...
75 rsb r6, r6, #31 @ ...so round up region size
76 lsl r6, r6, #MPU_RSR_SZ @ Put size in right field
77 orr r6, r6, #(1 << MPU_RSR_EN) @ Set region enabled bit
78 bl __setup_mpu
79#endif
80 ldr r13, =__mmap_switched @ address to jump to after
81 @ initialising sctlr
82 adr lr, BSYM(1f) @ return (PIC) address
63 ARM( add pc, r10, #PROCINFO_INITFUNC ) 83 ARM( add pc, r10, #PROCINFO_INITFUNC )
64 THUMB( add r12, r10, #PROCINFO_INITFUNC ) 84 THUMB( add r12, r10, #PROCINFO_INITFUNC )
65 THUMB( mov pc, r12 ) 85 THUMB( mov pc, r12 )
86 1: b __after_proc_init
66ENDPROC(stext) 87ENDPROC(stext)
67 88
89#ifdef CONFIG_SMP
90 .text
91ENTRY(secondary_startup)
92 /*
93 * Common entry point for secondary CPUs.
94 *
95 * Ensure that we're in SVC mode, and IRQs are disabled. Lookup
96 * the processor type - there is no need to check the machine type
97 * as it has already been validated by the primary processor.
98 */
99 setmode PSR_F_BIT | PSR_I_BIT | SVC_MODE, r9
100#ifndef CONFIG_CPU_CP15
101 ldr r9, =CONFIG_PROCESSOR_ID
102#else
103 mrc p15, 0, r9, c0, c0 @ get processor id
104#endif
105 bl __lookup_processor_type @ r5=procinfo r9=cpuid
106 movs r10, r5 @ invalid processor?
107 beq __error_p @ yes, error 'p'
108
109 adr r4, __secondary_data
110 ldmia r4, {r7, r12}
111
112#ifdef CONFIG_ARM_MPU
113 /* Use MPU region info supplied by __cpu_up */
114 ldr r6, [r7] @ get secondary_data.mpu_szr
115 bl __setup_mpu @ Initialize the MPU
116#endif
117
118 adr lr, BSYM(__after_proc_init) @ return address
119 mov r13, r12 @ __secondary_switched address
120 ARM( add pc, r10, #PROCINFO_INITFUNC )
121 THUMB( add r12, r10, #PROCINFO_INITFUNC )
122 THUMB( mov pc, r12 )
123ENDPROC(secondary_startup)
124
125ENTRY(__secondary_switched)
126 ldr sp, [r7, #8] @ set up the stack pointer
127 mov fp, #0
128 b secondary_start_kernel
129ENDPROC(__secondary_switched)
130
131 .type __secondary_data, %object
132__secondary_data:
133 .long secondary_data
134 .long __secondary_switched
135#endif /* CONFIG_SMP */
136
68/* 137/*
69 * Set the Control Register and Read the process ID. 138 * Set the Control Register and Read the process ID.
70 */ 139 */
@@ -95,10 +164,97 @@ __after_proc_init:
95#endif 164#endif
96 mcr p15, 0, r0, c1, c0, 0 @ write control reg 165 mcr p15, 0, r0, c1, c0, 0 @ write control reg
97#endif /* CONFIG_CPU_CP15 */ 166#endif /* CONFIG_CPU_CP15 */
98 167 mov pc, r13
99 b __mmap_switched @ clear the BSS and jump
100 @ to start_kernel
101ENDPROC(__after_proc_init) 168ENDPROC(__after_proc_init)
102 .ltorg 169 .ltorg
103 170
171#ifdef CONFIG_ARM_MPU
172
173
174/* Set which MPU region should be programmed */
175.macro set_region_nr tmp, rgnr
176 mov \tmp, \rgnr @ Use static region numbers
177 mcr p15, 0, \tmp, c6, c2, 0 @ Write RGNR
178.endm
179
180/* Setup a single MPU region, either D or I side (D-side for unified) */
181.macro setup_region bar, acr, sr, side = MPU_DATA_SIDE
182 mcr p15, 0, \bar, c6, c1, (0 + \side) @ I/DRBAR
183 mcr p15, 0, \acr, c6, c1, (4 + \side) @ I/DRACR
184 mcr p15, 0, \sr, c6, c1, (2 + \side) @ I/DRSR
185.endm
186
187/*
188 * Setup the MPU and initial MPU Regions. We create the following regions:
189 * Region 0: Use this for probing the MPU details, so leave disabled.
190 * Region 1: Background region - covers the whole of RAM as strongly ordered
191 * Region 2: Normal, Shared, cacheable for RAM. From PHYS_OFFSET, size from r6
192 * Region 3: Normal, shared, inaccessible from PL0 to protect the vectors page
193 *
194 * r6: Value to be written to DRSR (and IRSR if required) for MPU_RAM_REGION
195*/
196
197ENTRY(__setup_mpu)
198
199 /* Probe for v7 PMSA compliance */
200 mrc p15, 0, r0, c0, c1, 4 @ Read ID_MMFR0
201 and r0, r0, #(MMFR0_PMSA) @ PMSA field
202 teq r0, #(MMFR0_PMSAv7) @ PMSA v7
203 bne __error_p @ Fail: ARM_MPU on NOT v7 PMSA
204
205 /* Determine whether the D/I-side memory map is unified. We set the
206 * flags here and continue to use them for the rest of this function */
207 mrc p15, 0, r0, c0, c0, 4 @ MPUIR
208 ands r5, r0, #MPUIR_DREGION_SZMASK @ 0 size d region => No MPU
209 beq __error_p @ Fail: ARM_MPU and no MPU
210 tst r0, #MPUIR_nU @ MPUIR_nU = 0 for unified
211
212 /* Setup second region first to free up r6 */
213 set_region_nr r0, #MPU_RAM_REGION
214 isb
215 /* Full access from PL0, PL1, shared for CONFIG_SMP, cacheable */
216 ldr r0, =PHYS_OFFSET @ RAM starts at PHYS_OFFSET
217 ldr r5,=(MPU_AP_PL1RW_PL0RW | MPU_RGN_NORMAL)
218
219 setup_region r0, r5, r6, MPU_DATA_SIDE @ PHYS_OFFSET, shared, enabled
220 beq 1f @ Memory-map not unified
221 setup_region r0, r5, r6, MPU_INSTR_SIDE @ PHYS_OFFSET, shared, enabled
2221: isb
223
224 /* First/background region */
225 set_region_nr r0, #MPU_BG_REGION
226 isb
227 /* Execute Never, strongly ordered, inaccessible to PL0, rw PL1 */
228 mov r0, #0 @ BG region starts at 0x0
229 ldr r5,=(MPU_ACR_XN | MPU_RGN_STRONGLY_ORDERED | MPU_AP_PL1RW_PL0NA)
230 mov r6, #MPU_RSR_ALL_MEM @ 4GB region, enabled
231
232 setup_region r0, r5, r6, MPU_DATA_SIDE @ 0x0, BG region, enabled
233 beq 2f @ Memory-map not unified
234 setup_region r0, r5, r6, MPU_INSTR_SIDE @ 0x0, BG region, enabled
2352: isb
236
237 /* Vectors region */
238 set_region_nr r0, #MPU_VECTORS_REGION
239 isb
240 /* Shared, inaccessible to PL0, rw PL1 */
241 mov r0, #CONFIG_VECTORS_BASE @ Cover from VECTORS_BASE
242 ldr r5,=(MPU_AP_PL1RW_PL0NA | MPU_RGN_NORMAL)
243 /* Writing N to bits 5:1 (RSR_SZ) --> region size 2^N+1 */
244 mov r6, #(((PAGE_SHIFT - 1) << MPU_RSR_SZ) | 1 << MPU_RSR_EN)
245
246 setup_region r0, r5, r6, MPU_DATA_SIDE @ VECTORS_BASE, PL0 NA, enabled
247 beq 3f @ Memory-map not unified
248 setup_region r0, r5, r6, MPU_INSTR_SIDE @ VECTORS_BASE, PL0 NA, enabled
2493: isb
250
251 /* Enable the MPU */
252 mrc p15, 0, r0, c1, c0, 0 @ Read SCTLR
253 bic r0, r0, #CR_BR @ Disable the 'default mem-map'
254 orr r0, r0, #CR_M @ Set SCTRL.M (MPU on)
255 mcr p15, 0, r0, c1, c0, 0 @ Enable MPU
256 isb
257 mov pc,lr
258ENDPROC(__setup_mpu)
259#endif
104#include "head-common.S" 260#include "head-common.S"
diff --git a/arch/arm/kernel/head.S b/arch/arm/kernel/head.S
index 8bac553fe213..2c7cc1e03473 100644
--- a/arch/arm/kernel/head.S
+++ b/arch/arm/kernel/head.S
@@ -156,7 +156,7 @@ ENDPROC(stext)
156 * 156 *
157 * Returns: 157 * Returns:
158 * r0, r3, r5-r7 corrupted 158 * r0, r3, r5-r7 corrupted
159 * r4 = physical page table address 159 * r4 = page table (see ARCH_PGD_SHIFT in asm/memory.h)
160 */ 160 */
161__create_page_tables: 161__create_page_tables:
162 pgtbl r4, r8 @ page table address 162 pgtbl r4, r8 @ page table address
@@ -331,6 +331,7 @@ __create_page_tables:
331#endif 331#endif
332#ifdef CONFIG_ARM_LPAE 332#ifdef CONFIG_ARM_LPAE
333 sub r4, r4, #0x1000 @ point to the PGD table 333 sub r4, r4, #0x1000 @ point to the PGD table
334 mov r4, r4, lsr #ARCH_PGD_SHIFT
334#endif 335#endif
335 mov pc, lr 336 mov pc, lr
336ENDPROC(__create_page_tables) 337ENDPROC(__create_page_tables)
@@ -342,7 +343,7 @@ __turn_mmu_on_loc:
342 .long __turn_mmu_on_end 343 .long __turn_mmu_on_end
343 344
344#if defined(CONFIG_SMP) 345#if defined(CONFIG_SMP)
345 __CPUINIT 346 .text
346ENTRY(secondary_startup) 347ENTRY(secondary_startup)
347 /* 348 /*
348 * Common entry point for secondary CPUs. 349 * Common entry point for secondary CPUs.
@@ -408,7 +409,7 @@ __secondary_data:
408 * r0 = cp#15 control register 409 * r0 = cp#15 control register
409 * r1 = machine ID 410 * r1 = machine ID
410 * r2 = atags or dtb pointer 411 * r2 = atags or dtb pointer
411 * r4 = page table pointer 412 * r4 = page table (see ARCH_PGD_SHIFT in asm/memory.h)
412 * r9 = processor ID 413 * r9 = processor ID
413 * r13 = *virtual* address to jump to upon completion 414 * r13 = *virtual* address to jump to upon completion
414 */ 415 */
@@ -427,10 +428,7 @@ __enable_mmu:
427#ifdef CONFIG_CPU_ICACHE_DISABLE 428#ifdef CONFIG_CPU_ICACHE_DISABLE
428 bic r0, r0, #CR_I 429 bic r0, r0, #CR_I
429#endif 430#endif
430#ifdef CONFIG_ARM_LPAE 431#ifndef CONFIG_ARM_LPAE
431 mov r5, #0
432 mcrr p15, 0, r4, r5, c2 @ load TTBR0
433#else
434 mov r5, #(domain_val(DOMAIN_USER, DOMAIN_MANAGER) | \ 432 mov r5, #(domain_val(DOMAIN_USER, DOMAIN_MANAGER) | \
435 domain_val(DOMAIN_KERNEL, DOMAIN_MANAGER) | \ 433 domain_val(DOMAIN_KERNEL, DOMAIN_MANAGER) | \
436 domain_val(DOMAIN_TABLE, DOMAIN_MANAGER) | \ 434 domain_val(DOMAIN_TABLE, DOMAIN_MANAGER) | \
diff --git a/arch/arm/kernel/hw_breakpoint.c b/arch/arm/kernel/hw_breakpoint.c
index 1fd749ee4a1b..7b95de601357 100644
--- a/arch/arm/kernel/hw_breakpoint.c
+++ b/arch/arm/kernel/hw_breakpoint.c
@@ -1020,7 +1020,7 @@ out_mdbgen:
1020 cpumask_or(&debug_err_mask, &debug_err_mask, cpumask_of(cpu)); 1020 cpumask_or(&debug_err_mask, &debug_err_mask, cpumask_of(cpu));
1021} 1021}
1022 1022
1023static int __cpuinit dbg_reset_notify(struct notifier_block *self, 1023static int dbg_reset_notify(struct notifier_block *self,
1024 unsigned long action, void *cpu) 1024 unsigned long action, void *cpu)
1025{ 1025{
1026 if ((action & ~CPU_TASKS_FROZEN) == CPU_ONLINE) 1026 if ((action & ~CPU_TASKS_FROZEN) == CPU_ONLINE)
@@ -1029,7 +1029,7 @@ static int __cpuinit dbg_reset_notify(struct notifier_block *self,
1029 return NOTIFY_OK; 1029 return NOTIFY_OK;
1030} 1030}
1031 1031
1032static struct notifier_block __cpuinitdata dbg_reset_nb = { 1032static struct notifier_block dbg_reset_nb = {
1033 .notifier_call = dbg_reset_notify, 1033 .notifier_call = dbg_reset_notify,
1034}; 1034};
1035 1035
diff --git a/arch/arm/kernel/hyp-stub.S b/arch/arm/kernel/hyp-stub.S
index 1315c4ccfa56..797b1a6a4906 100644
--- a/arch/arm/kernel/hyp-stub.S
+++ b/arch/arm/kernel/hyp-stub.S
@@ -56,8 +56,8 @@ ENTRY(__boot_cpu_mode)
56 ldr \reg3, [\reg2] 56 ldr \reg3, [\reg2]
57 ldr \reg1, [\reg2, \reg3] 57 ldr \reg1, [\reg2, \reg3]
58 cmp \mode, \reg1 @ matches primary CPU boot mode? 58 cmp \mode, \reg1 @ matches primary CPU boot mode?
59 orrne r7, r7, #BOOT_CPU_MODE_MISMATCH 59 orrne \reg1, \reg1, #BOOT_CPU_MODE_MISMATCH
60 strne r7, [r5, r6] @ record what happened and give up 60 strne \reg1, [\reg2, \reg3] @ record what happened and give up
61 .endm 61 .endm
62 62
63#else /* ZIMAGE */ 63#else /* ZIMAGE */
@@ -153,6 +153,13 @@ THUMB( orr r7, #(1 << 30) ) @ HSCTLR.TE
153 mrc p15, 4, r7, c14, c1, 0 @ CNTHCTL 153 mrc p15, 4, r7, c14, c1, 0 @ CNTHCTL
154 orr r7, r7, #3 @ PL1PCEN | PL1PCTEN 154 orr r7, r7, #3 @ PL1PCEN | PL1PCTEN
155 mcr p15, 4, r7, c14, c1, 0 @ CNTHCTL 155 mcr p15, 4, r7, c14, c1, 0 @ CNTHCTL
156 mov r7, #0
157 mcrr p15, 4, r7, r7, c14 @ CNTVOFF
158
159 @ Disable virtual timer in case it was counting
160 mrc p15, 0, r7, c14, c3, 1 @ CNTV_CTL
161 bic r7, #1 @ Clear ENABLE
162 mcr p15, 0, r7, c14, c3, 1 @ CNTV_CTL
1561: 1631:
157#endif 164#endif
158 165
diff --git a/arch/arm/kernel/module.c b/arch/arm/kernel/module.c
index 1e9be5d25e56..85c3fb6c93c2 100644
--- a/arch/arm/kernel/module.c
+++ b/arch/arm/kernel/module.c
@@ -288,24 +288,16 @@ int module_finalize(const Elf32_Ehdr *hdr, const Elf_Shdr *sechdrs,
288 288
289 if (strcmp(".ARM.exidx.init.text", secname) == 0) 289 if (strcmp(".ARM.exidx.init.text", secname) == 0)
290 maps[ARM_SEC_INIT].unw_sec = s; 290 maps[ARM_SEC_INIT].unw_sec = s;
291 else if (strcmp(".ARM.exidx.devinit.text", secname) == 0)
292 maps[ARM_SEC_DEVINIT].unw_sec = s;
293 else if (strcmp(".ARM.exidx", secname) == 0) 291 else if (strcmp(".ARM.exidx", secname) == 0)
294 maps[ARM_SEC_CORE].unw_sec = s; 292 maps[ARM_SEC_CORE].unw_sec = s;
295 else if (strcmp(".ARM.exidx.exit.text", secname) == 0) 293 else if (strcmp(".ARM.exidx.exit.text", secname) == 0)
296 maps[ARM_SEC_EXIT].unw_sec = s; 294 maps[ARM_SEC_EXIT].unw_sec = s;
297 else if (strcmp(".ARM.exidx.devexit.text", secname) == 0)
298 maps[ARM_SEC_DEVEXIT].unw_sec = s;
299 else if (strcmp(".init.text", secname) == 0) 295 else if (strcmp(".init.text", secname) == 0)
300 maps[ARM_SEC_INIT].txt_sec = s; 296 maps[ARM_SEC_INIT].txt_sec = s;
301 else if (strcmp(".devinit.text", secname) == 0)
302 maps[ARM_SEC_DEVINIT].txt_sec = s;
303 else if (strcmp(".text", secname) == 0) 297 else if (strcmp(".text", secname) == 0)
304 maps[ARM_SEC_CORE].txt_sec = s; 298 maps[ARM_SEC_CORE].txt_sec = s;
305 else if (strcmp(".exit.text", secname) == 0) 299 else if (strcmp(".exit.text", secname) == 0)
306 maps[ARM_SEC_EXIT].txt_sec = s; 300 maps[ARM_SEC_EXIT].txt_sec = s;
307 else if (strcmp(".devexit.text", secname) == 0)
308 maps[ARM_SEC_DEVEXIT].txt_sec = s;
309 } 301 }
310 302
311 for (i = 0; i < ARM_SEC_MAX; i++) 303 for (i = 0; i < ARM_SEC_MAX; i++)
diff --git a/arch/arm/kernel/perf_event.c b/arch/arm/kernel/perf_event.c
index 8c3094d0f7b7..21f77906602c 100644
--- a/arch/arm/kernel/perf_event.c
+++ b/arch/arm/kernel/perf_event.c
@@ -53,7 +53,12 @@ armpmu_map_cache_event(const unsigned (*cache_map)
53static int 53static int
54armpmu_map_hw_event(const unsigned (*event_map)[PERF_COUNT_HW_MAX], u64 config) 54armpmu_map_hw_event(const unsigned (*event_map)[PERF_COUNT_HW_MAX], u64 config)
55{ 55{
56 int mapping = (*event_map)[config]; 56 int mapping;
57
58 if (config >= PERF_COUNT_HW_MAX)
59 return -ENOENT;
60
61 mapping = (*event_map)[config];
57 return mapping == HW_OP_UNSUPPORTED ? -ENOENT : mapping; 62 return mapping == HW_OP_UNSUPPORTED ? -ENOENT : mapping;
58} 63}
59 64
@@ -569,6 +574,7 @@ perf_callchain_user(struct perf_callchain_entry *entry, struct pt_regs *regs)
569 return; 574 return;
570 } 575 }
571 576
577 perf_callchain_store(entry, regs->ARM_pc);
572 tail = (struct frame_tail __user *)regs->ARM_fp - 1; 578 tail = (struct frame_tail __user *)regs->ARM_fp - 1;
573 579
574 while ((entry->nr < PERF_MAX_STACK_DEPTH) && 580 while ((entry->nr < PERF_MAX_STACK_DEPTH) &&
diff --git a/arch/arm/kernel/perf_event_cpu.c b/arch/arm/kernel/perf_event_cpu.c
index 1f2740e3dbc0..aebe0e99c153 100644
--- a/arch/arm/kernel/perf_event_cpu.c
+++ b/arch/arm/kernel/perf_event_cpu.c
@@ -157,8 +157,8 @@ static void cpu_pmu_init(struct arm_pmu *cpu_pmu)
157 * UNKNOWN at reset, the PMU must be explicitly reset to avoid reading 157 * UNKNOWN at reset, the PMU must be explicitly reset to avoid reading
158 * junk values out of them. 158 * junk values out of them.
159 */ 159 */
160static int __cpuinit cpu_pmu_notify(struct notifier_block *b, 160static int cpu_pmu_notify(struct notifier_block *b, unsigned long action,
161 unsigned long action, void *hcpu) 161 void *hcpu)
162{ 162{
163 if ((action & ~CPU_TASKS_FROZEN) != CPU_STARTING) 163 if ((action & ~CPU_TASKS_FROZEN) != CPU_STARTING)
164 return NOTIFY_DONE; 164 return NOTIFY_DONE;
@@ -171,7 +171,7 @@ static int __cpuinit cpu_pmu_notify(struct notifier_block *b,
171 return NOTIFY_OK; 171 return NOTIFY_OK;
172} 172}
173 173
174static struct notifier_block __cpuinitdata cpu_pmu_hotplug_notifier = { 174static struct notifier_block cpu_pmu_hotplug_notifier = {
175 .notifier_call = cpu_pmu_notify, 175 .notifier_call = cpu_pmu_notify,
176}; 176};
177 177
diff --git a/arch/arm/kernel/process.c b/arch/arm/kernel/process.c
index 6e8931ccf13e..536c85fe72a8 100644
--- a/arch/arm/kernel/process.c
+++ b/arch/arm/kernel/process.c
@@ -32,6 +32,7 @@
32#include <linux/hw_breakpoint.h> 32#include <linux/hw_breakpoint.h>
33#include <linux/cpuidle.h> 33#include <linux/cpuidle.h>
34#include <linux/leds.h> 34#include <linux/leds.h>
35#include <linux/reboot.h>
35 36
36#include <asm/cacheflush.h> 37#include <asm/cacheflush.h>
37#include <asm/idmap.h> 38#include <asm/idmap.h>
@@ -39,6 +40,7 @@
39#include <asm/thread_notify.h> 40#include <asm/thread_notify.h>
40#include <asm/stacktrace.h> 41#include <asm/stacktrace.h>
41#include <asm/mach/time.h> 42#include <asm/mach/time.h>
43#include <asm/tls.h>
42 44
43#ifdef CONFIG_CC_STACKPROTECTOR 45#ifdef CONFIG_CC_STACKPROTECTOR
44#include <linux/stackprotector.h> 46#include <linux/stackprotector.h>
@@ -112,7 +114,7 @@ void soft_restart(unsigned long addr)
112 BUG(); 114 BUG();
113} 115}
114 116
115static void null_restart(char mode, const char *cmd) 117static void null_restart(enum reboot_mode reboot_mode, const char *cmd)
116{ 118{
117} 119}
118 120
@@ -122,7 +124,7 @@ static void null_restart(char mode, const char *cmd)
122void (*pm_power_off)(void); 124void (*pm_power_off)(void);
123EXPORT_SYMBOL(pm_power_off); 125EXPORT_SYMBOL(pm_power_off);
124 126
125void (*arm_pm_restart)(char str, const char *cmd) = null_restart; 127void (*arm_pm_restart)(enum reboot_mode reboot_mode, const char *cmd) = null_restart;
126EXPORT_SYMBOL_GPL(arm_pm_restart); 128EXPORT_SYMBOL_GPL(arm_pm_restart);
127 129
128/* 130/*
@@ -174,16 +176,6 @@ void arch_cpu_idle(void)
174 default_idle(); 176 default_idle();
175} 177}
176 178
177static char reboot_mode = 'h';
178
179int __init reboot_setup(char *str)
180{
181 reboot_mode = str[0];
182 return 1;
183}
184
185__setup("reboot=", reboot_setup);
186
187/* 179/*
188 * Called by kexec, immediately prior to machine_kexec(). 180 * Called by kexec, immediately prior to machine_kexec().
189 * 181 *
@@ -205,6 +197,7 @@ void machine_shutdown(void)
205 */ 197 */
206void machine_halt(void) 198void machine_halt(void)
207{ 199{
200 local_irq_disable();
208 smp_send_stop(); 201 smp_send_stop();
209 202
210 local_irq_disable(); 203 local_irq_disable();
@@ -219,6 +212,7 @@ void machine_halt(void)
219 */ 212 */
220void machine_power_off(void) 213void machine_power_off(void)
221{ 214{
215 local_irq_disable();
222 smp_send_stop(); 216 smp_send_stop();
223 217
224 if (pm_power_off) 218 if (pm_power_off)
@@ -238,6 +232,7 @@ void machine_power_off(void)
238 */ 232 */
239void machine_restart(char *cmd) 233void machine_restart(char *cmd)
240{ 234{
235 local_irq_disable();
241 smp_send_stop(); 236 smp_send_stop();
242 237
243 arm_pm_restart(reboot_mode, cmd); 238 arm_pm_restart(reboot_mode, cmd);
@@ -374,7 +369,8 @@ copy_thread(unsigned long clone_flags, unsigned long stack_start,
374 clear_ptrace_hw_breakpoint(p); 369 clear_ptrace_hw_breakpoint(p);
375 370
376 if (clone_flags & CLONE_SETTLS) 371 if (clone_flags & CLONE_SETTLS)
377 thread->tp_value = childregs->ARM_r3; 372 thread->tp_value[0] = childregs->ARM_r3;
373 thread->tp_value[1] = get_tpuser();
378 374
379 thread_notify(THREAD_NOTIFY_COPY, thread); 375 thread_notify(THREAD_NOTIFY_COPY, thread);
380 376
@@ -433,10 +429,11 @@ unsigned long arch_randomize_brk(struct mm_struct *mm)
433} 429}
434 430
435#ifdef CONFIG_MMU 431#ifdef CONFIG_MMU
432#ifdef CONFIG_KUSER_HELPERS
436/* 433/*
437 * The vectors page is always readable from user space for the 434 * The vectors page is always readable from user space for the
438 * atomic helpers and the signal restart code. Insert it into the 435 * atomic helpers. Insert it into the gate_vma so that it is visible
439 * gate_vma so that it is visible through ptrace and /proc/<pid>/mem. 436 * through ptrace and /proc/<pid>/mem.
440 */ 437 */
441static struct vm_area_struct gate_vma = { 438static struct vm_area_struct gate_vma = {
442 .vm_start = 0xffff0000, 439 .vm_start = 0xffff0000,
@@ -465,9 +462,48 @@ int in_gate_area_no_mm(unsigned long addr)
465{ 462{
466 return in_gate_area(NULL, addr); 463 return in_gate_area(NULL, addr);
467} 464}
465#define is_gate_vma(vma) ((vma) = &gate_vma)
466#else
467#define is_gate_vma(vma) 0
468#endif
468 469
469const char *arch_vma_name(struct vm_area_struct *vma) 470const char *arch_vma_name(struct vm_area_struct *vma)
470{ 471{
471 return (vma == &gate_vma) ? "[vectors]" : NULL; 472 return is_gate_vma(vma) ? "[vectors]" :
473 (vma->vm_mm && vma->vm_start == vma->vm_mm->context.sigpage) ?
474 "[sigpage]" : NULL;
475}
476
477static struct page *signal_page;
478extern struct page *get_signal_page(void);
479
480int arch_setup_additional_pages(struct linux_binprm *bprm, int uses_interp)
481{
482 struct mm_struct *mm = current->mm;
483 unsigned long addr;
484 int ret;
485
486 if (!signal_page)
487 signal_page = get_signal_page();
488 if (!signal_page)
489 return -ENOMEM;
490
491 down_write(&mm->mmap_sem);
492 addr = get_unmapped_area(NULL, 0, PAGE_SIZE, 0, 0);
493 if (IS_ERR_VALUE(addr)) {
494 ret = addr;
495 goto up_fail;
496 }
497
498 ret = install_special_mapping(mm, addr, PAGE_SIZE,
499 VM_READ | VM_EXEC | VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC,
500 &signal_page);
501
502 if (ret == 0)
503 mm->context.sigpage = addr;
504
505 up_fail:
506 up_write(&mm->mmap_sem);
507 return ret;
472} 508}
473#endif 509#endif
diff --git a/arch/arm/kernel/psci.c b/arch/arm/kernel/psci.c
index 36531643cc2c..46931880093d 100644
--- a/arch/arm/kernel/psci.c
+++ b/arch/arm/kernel/psci.c
@@ -158,7 +158,7 @@ static const struct of_device_id psci_of_match[] __initconst = {
158 {}, 158 {},
159}; 159};
160 160
161static int __init psci_init(void) 161void __init psci_init(void)
162{ 162{
163 struct device_node *np; 163 struct device_node *np;
164 const char *method; 164 const char *method;
@@ -166,7 +166,7 @@ static int __init psci_init(void)
166 166
167 np = of_find_matching_node(NULL, psci_of_match); 167 np = of_find_matching_node(NULL, psci_of_match);
168 if (!np) 168 if (!np)
169 return 0; 169 return;
170 170
171 pr_info("probing function IDs from device-tree\n"); 171 pr_info("probing function IDs from device-tree\n");
172 172
@@ -206,6 +206,5 @@ static int __init psci_init(void)
206 206
207out_put_node: 207out_put_node:
208 of_node_put(np); 208 of_node_put(np);
209 return 0; 209 return;
210} 210}
211early_initcall(psci_init);
diff --git a/arch/arm/kernel/psci_smp.c b/arch/arm/kernel/psci_smp.c
new file mode 100644
index 000000000000..70ded3fb42d9
--- /dev/null
+++ b/arch/arm/kernel/psci_smp.c
@@ -0,0 +1,83 @@
1/*
2 * This program is free software; you can redistribute it and/or modify
3 * it under the terms of the GNU General Public License version 2 as
4 * published by the Free Software Foundation.
5 *
6 * This program is distributed in the hope that it will be useful,
7 * but WITHOUT ANY WARRANTY; without even the implied warranty of
8 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
9 * GNU General Public License for more details.
10 *
11 * Copyright (C) 2012 ARM Limited
12 *
13 * Author: Will Deacon <will.deacon@arm.com>
14 */
15
16#include <linux/init.h>
17#include <linux/irqchip/arm-gic.h>
18#include <linux/smp.h>
19#include <linux/of.h>
20
21#include <asm/psci.h>
22#include <asm/smp_plat.h>
23
24/*
25 * psci_smp assumes that the following is true about PSCI:
26 *
27 * cpu_suspend Suspend the execution on a CPU
28 * @state we don't currently describe affinity levels, so just pass 0.
29 * @entry_point the first instruction to be executed on return
30 * returns 0 success, < 0 on failure
31 *
32 * cpu_off Power down a CPU
33 * @state we don't currently describe affinity levels, so just pass 0.
34 * no return on successful call
35 *
36 * cpu_on Power up a CPU
37 * @cpuid cpuid of target CPU, as from MPIDR
38 * @entry_point the first instruction to be executed on return
39 * returns 0 success, < 0 on failure
40 *
41 * migrate Migrate the context to a different CPU
42 * @cpuid cpuid of target CPU, as from MPIDR
43 * returns 0 success, < 0 on failure
44 *
45 */
46
47extern void secondary_startup(void);
48
49static int psci_boot_secondary(unsigned int cpu, struct task_struct *idle)
50{
51 if (psci_ops.cpu_on)
52 return psci_ops.cpu_on(cpu_logical_map(cpu),
53 __pa(secondary_startup));
54 return -ENODEV;
55}
56
57#ifdef CONFIG_HOTPLUG_CPU
58void __ref psci_cpu_die(unsigned int cpu)
59{
60 const struct psci_power_state ps = {
61 .type = PSCI_POWER_STATE_TYPE_POWER_DOWN,
62 };
63
64 if (psci_ops.cpu_off)
65 psci_ops.cpu_off(ps);
66
67 /* We should never return */
68 panic("psci: cpu %d failed to shutdown\n", cpu);
69}
70#endif
71
72bool __init psci_smp_available(void)
73{
74 /* is cpu_on available at least? */
75 return (psci_ops.cpu_on != NULL);
76}
77
78struct smp_operations __initdata psci_smp_ops = {
79 .smp_boot_secondary = psci_boot_secondary,
80#ifdef CONFIG_HOTPLUG_CPU
81 .cpu_die = psci_cpu_die,
82#endif
83};
diff --git a/arch/arm/kernel/ptrace.c b/arch/arm/kernel/ptrace.c
index 03deeffd9f6d..0dd3b79b15c3 100644
--- a/arch/arm/kernel/ptrace.c
+++ b/arch/arm/kernel/ptrace.c
@@ -849,7 +849,7 @@ long arch_ptrace(struct task_struct *child, long request,
849#endif 849#endif
850 850
851 case PTRACE_GET_THREAD_AREA: 851 case PTRACE_GET_THREAD_AREA:
852 ret = put_user(task_thread_info(child)->tp_value, 852 ret = put_user(task_thread_info(child)->tp_value[0],
853 datap); 853 datap);
854 break; 854 break;
855 855
@@ -886,20 +886,12 @@ long arch_ptrace(struct task_struct *child, long request,
886 886
887#ifdef CONFIG_HAVE_HW_BREAKPOINT 887#ifdef CONFIG_HAVE_HW_BREAKPOINT
888 case PTRACE_GETHBPREGS: 888 case PTRACE_GETHBPREGS:
889 if (ptrace_get_breakpoints(child) < 0)
890 return -ESRCH;
891
892 ret = ptrace_gethbpregs(child, addr, 889 ret = ptrace_gethbpregs(child, addr,
893 (unsigned long __user *)data); 890 (unsigned long __user *)data);
894 ptrace_put_breakpoints(child);
895 break; 891 break;
896 case PTRACE_SETHBPREGS: 892 case PTRACE_SETHBPREGS:
897 if (ptrace_get_breakpoints(child) < 0)
898 return -ESRCH;
899
900 ret = ptrace_sethbpregs(child, addr, 893 ret = ptrace_sethbpregs(child, addr,
901 (unsigned long __user *)data); 894 (unsigned long __user *)data);
902 ptrace_put_breakpoints(child);
903 break; 895 break;
904#endif 896#endif
905 897
diff --git a/arch/arm/kernel/sched_clock.c b/arch/arm/kernel/sched_clock.c
deleted file mode 100644
index e8edcaa0e432..000000000000
--- a/arch/arm/kernel/sched_clock.c
+++ /dev/null
@@ -1,217 +0,0 @@
1/*
2 * sched_clock.c: support for extending counters to full 64-bit ns counter
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#include <linux/clocksource.h>
9#include <linux/init.h>
10#include <linux/jiffies.h>
11#include <linux/kernel.h>
12#include <linux/moduleparam.h>
13#include <linux/sched.h>
14#include <linux/syscore_ops.h>
15#include <linux/timer.h>
16
17#include <asm/sched_clock.h>
18
19struct clock_data {
20 u64 epoch_ns;
21 u32 epoch_cyc;
22 u32 epoch_cyc_copy;
23 unsigned long rate;
24 u32 mult;
25 u32 shift;
26 bool suspended;
27 bool needs_suspend;
28};
29
30static void sched_clock_poll(unsigned long wrap_ticks);
31static DEFINE_TIMER(sched_clock_timer, sched_clock_poll, 0, 0);
32static int irqtime = -1;
33
34core_param(irqtime, irqtime, int, 0400);
35
36static struct clock_data cd = {
37 .mult = NSEC_PER_SEC / HZ,
38};
39
40static u32 __read_mostly sched_clock_mask = 0xffffffff;
41
42static u32 notrace jiffy_sched_clock_read(void)
43{
44 return (u32)(jiffies - INITIAL_JIFFIES);
45}
46
47static u32 __read_mostly (*read_sched_clock)(void) = jiffy_sched_clock_read;
48
49static inline u64 notrace cyc_to_ns(u64 cyc, u32 mult, u32 shift)
50{
51 return (cyc * mult) >> shift;
52}
53
54static unsigned long long notrace cyc_to_sched_clock(u32 cyc, u32 mask)
55{
56 u64 epoch_ns;
57 u32 epoch_cyc;
58
59 if (cd.suspended)
60 return cd.epoch_ns;
61
62 /*
63 * Load the epoch_cyc and epoch_ns atomically. We do this by
64 * ensuring that we always write epoch_cyc, epoch_ns and
65 * epoch_cyc_copy in strict order, and read them in strict order.
66 * If epoch_cyc and epoch_cyc_copy are not equal, then we're in
67 * the middle of an update, and we should repeat the load.
68 */
69 do {
70 epoch_cyc = cd.epoch_cyc;
71 smp_rmb();
72 epoch_ns = cd.epoch_ns;
73 smp_rmb();
74 } while (epoch_cyc != cd.epoch_cyc_copy);
75
76 return epoch_ns + cyc_to_ns((cyc - epoch_cyc) & mask, cd.mult, cd.shift);
77}
78
79/*
80 * Atomically update the sched_clock epoch.
81 */
82static void notrace update_sched_clock(void)
83{
84 unsigned long flags;
85 u32 cyc;
86 u64 ns;
87
88 cyc = read_sched_clock();
89 ns = cd.epoch_ns +
90 cyc_to_ns((cyc - cd.epoch_cyc) & sched_clock_mask,
91 cd.mult, cd.shift);
92 /*
93 * Write epoch_cyc and epoch_ns in a way that the update is
94 * detectable in cyc_to_fixed_sched_clock().
95 */
96 raw_local_irq_save(flags);
97 cd.epoch_cyc_copy = cyc;
98 smp_wmb();
99 cd.epoch_ns = ns;
100 smp_wmb();
101 cd.epoch_cyc = cyc;
102 raw_local_irq_restore(flags);
103}
104
105static void sched_clock_poll(unsigned long wrap_ticks)
106{
107 mod_timer(&sched_clock_timer, round_jiffies(jiffies + wrap_ticks));
108 update_sched_clock();
109}
110
111void __init setup_sched_clock(u32 (*read)(void), int bits, unsigned long rate)
112{
113 unsigned long r, w;
114 u64 res, wrap;
115 char r_unit;
116
117 if (cd.rate > rate)
118 return;
119
120 BUG_ON(bits > 32);
121 WARN_ON(!irqs_disabled());
122 read_sched_clock = read;
123 sched_clock_mask = (1 << bits) - 1;
124 cd.rate = rate;
125
126 /* calculate the mult/shift to convert counter ticks to ns. */
127 clocks_calc_mult_shift(&cd.mult, &cd.shift, rate, NSEC_PER_SEC, 0);
128
129 r = rate;
130 if (r >= 4000000) {
131 r /= 1000000;
132 r_unit = 'M';
133 } else if (r >= 1000) {
134 r /= 1000;
135 r_unit = 'k';
136 } else
137 r_unit = ' ';
138
139 /* calculate how many ns until we wrap */
140 wrap = cyc_to_ns((1ULL << bits) - 1, cd.mult, cd.shift);
141 do_div(wrap, NSEC_PER_MSEC);
142 w = wrap;
143
144 /* calculate the ns resolution of this counter */
145 res = cyc_to_ns(1ULL, cd.mult, cd.shift);
146 pr_info("sched_clock: %u bits at %lu%cHz, resolution %lluns, wraps every %lums\n",
147 bits, r, r_unit, res, w);
148
149 /*
150 * Start the timer to keep sched_clock() properly updated and
151 * sets the initial epoch.
152 */
153 sched_clock_timer.data = msecs_to_jiffies(w - (w / 10));
154 update_sched_clock();
155
156 /*
157 * Ensure that sched_clock() starts off at 0ns
158 */
159 cd.epoch_ns = 0;
160
161 /* Enable IRQ time accounting if we have a fast enough sched_clock */
162 if (irqtime > 0 || (irqtime == -1 && rate >= 1000000))
163 enable_sched_clock_irqtime();
164
165 pr_debug("Registered %pF as sched_clock source\n", read);
166}
167
168static unsigned long long notrace sched_clock_32(void)
169{
170 u32 cyc = read_sched_clock();
171 return cyc_to_sched_clock(cyc, sched_clock_mask);
172}
173
174unsigned long long __read_mostly (*sched_clock_func)(void) = sched_clock_32;
175
176unsigned long long notrace sched_clock(void)
177{
178 return sched_clock_func();
179}
180
181void __init sched_clock_postinit(void)
182{
183 /*
184 * If no sched_clock function has been provided at that point,
185 * make it the final one one.
186 */
187 if (read_sched_clock == jiffy_sched_clock_read)
188 setup_sched_clock(jiffy_sched_clock_read, 32, HZ);
189
190 sched_clock_poll(sched_clock_timer.data);
191}
192
193static int sched_clock_suspend(void)
194{
195 sched_clock_poll(sched_clock_timer.data);
196 cd.suspended = true;
197 return 0;
198}
199
200static void sched_clock_resume(void)
201{
202 cd.epoch_cyc = read_sched_clock();
203 cd.epoch_cyc_copy = cd.epoch_cyc;
204 cd.suspended = false;
205}
206
207static struct syscore_ops sched_clock_ops = {
208 .suspend = sched_clock_suspend,
209 .resume = sched_clock_resume,
210};
211
212static int __init sched_clock_syscore_init(void)
213{
214 register_syscore_ops(&sched_clock_ops);
215 return 0;
216}
217device_initcall(sched_clock_syscore_init);
diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c
index b4b1d397592b..afc2489ee13b 100644
--- a/arch/arm/kernel/setup.c
+++ b/arch/arm/kernel/setup.c
@@ -37,6 +37,7 @@
37#include <asm/cputype.h> 37#include <asm/cputype.h>
38#include <asm/elf.h> 38#include <asm/elf.h>
39#include <asm/procinfo.h> 39#include <asm/procinfo.h>
40#include <asm/psci.h>
40#include <asm/sections.h> 41#include <asm/sections.h>
41#include <asm/setup.h> 42#include <asm/setup.h>
42#include <asm/smp_plat.h> 43#include <asm/smp_plat.h>
@@ -73,7 +74,7 @@ __setup("fpe=", fpe_setup);
73 74
74extern void paging_init(struct machine_desc *desc); 75extern void paging_init(struct machine_desc *desc);
75extern void sanity_check_meminfo(void); 76extern void sanity_check_meminfo(void);
76extern void reboot_setup(char *str); 77extern enum reboot_mode reboot_mode;
77extern void setup_dma_zone(struct machine_desc *desc); 78extern void setup_dma_zone(struct machine_desc *desc);
78 79
79unsigned int processor_id; 80unsigned int processor_id;
@@ -128,7 +129,9 @@ struct stack {
128 u32 und[3]; 129 u32 und[3];
129} ____cacheline_aligned; 130} ____cacheline_aligned;
130 131
132#ifndef CONFIG_CPU_V7M
131static struct stack stacks[NR_CPUS]; 133static struct stack stacks[NR_CPUS];
134#endif
132 135
133char elf_platform[ELF_PLATFORM_SIZE]; 136char elf_platform[ELF_PLATFORM_SIZE];
134EXPORT_SYMBOL(elf_platform); 137EXPORT_SYMBOL(elf_platform);
@@ -207,7 +210,7 @@ static const char *proc_arch[] = {
207 "5TEJ", 210 "5TEJ",
208 "6TEJ", 211 "6TEJ",
209 "7", 212 "7",
210 "?(11)", 213 "7M",
211 "?(12)", 214 "?(12)",
212 "?(13)", 215 "?(13)",
213 "?(14)", 216 "?(14)",
@@ -216,6 +219,12 @@ static const char *proc_arch[] = {
216 "?(17)", 219 "?(17)",
217}; 220};
218 221
222#ifdef CONFIG_CPU_V7M
223static int __get_cpu_architecture(void)
224{
225 return CPU_ARCH_ARMv7M;
226}
227#else
219static int __get_cpu_architecture(void) 228static int __get_cpu_architecture(void)
220{ 229{
221 int cpu_arch; 230 int cpu_arch;
@@ -248,6 +257,7 @@ static int __get_cpu_architecture(void)
248 257
249 return cpu_arch; 258 return cpu_arch;
250} 259}
260#endif
251 261
252int __pure cpu_architecture(void) 262int __pure cpu_architecture(void)
253{ 263{
@@ -293,7 +303,9 @@ static void __init cacheid_init(void)
293{ 303{
294 unsigned int arch = cpu_architecture(); 304 unsigned int arch = cpu_architecture();
295 305
296 if (arch >= CPU_ARCH_ARMv6) { 306 if (arch == CPU_ARCH_ARMv7M) {
307 cacheid = 0;
308 } else if (arch >= CPU_ARCH_ARMv6) {
297 unsigned int cachetype = read_cpuid_cachetype(); 309 unsigned int cachetype = read_cpuid_cachetype();
298 if ((cachetype & (7 << 29)) == 4 << 29) { 310 if ((cachetype & (7 << 29)) == 4 << 29) {
299 /* ARMv7 register format */ 311 /* ARMv7 register format */
@@ -355,7 +367,7 @@ void __init early_print(const char *str, ...)
355 367
356static void __init cpuid_init_hwcaps(void) 368static void __init cpuid_init_hwcaps(void)
357{ 369{
358 unsigned int divide_instrs; 370 unsigned int divide_instrs, vmsa;
359 371
360 if (cpu_architecture() < CPU_ARCH_ARMv7) 372 if (cpu_architecture() < CPU_ARCH_ARMv7)
361 return; 373 return;
@@ -368,6 +380,11 @@ static void __init cpuid_init_hwcaps(void)
368 case 1: 380 case 1:
369 elf_hwcap |= HWCAP_IDIVT; 381 elf_hwcap |= HWCAP_IDIVT;
370 } 382 }
383
384 /* LPAE implies atomic ldrd/strd instructions */
385 vmsa = (read_cpuid_ext(CPUID_EXT_MMFR0) & 0xf) >> 0;
386 if (vmsa >= 5)
387 elf_hwcap |= HWCAP_LPAE;
371} 388}
372 389
373static void __init feat_v6_fixup(void) 390static void __init feat_v6_fixup(void)
@@ -392,6 +409,7 @@ static void __init feat_v6_fixup(void)
392 */ 409 */
393void notrace cpu_init(void) 410void notrace cpu_init(void)
394{ 411{
412#ifndef CONFIG_CPU_V7M
395 unsigned int cpu = smp_processor_id(); 413 unsigned int cpu = smp_processor_id();
396 struct stack *stk = &stacks[cpu]; 414 struct stack *stk = &stacks[cpu];
397 415
@@ -442,6 +460,7 @@ void notrace cpu_init(void)
442 "I" (offsetof(struct stack, und[0])), 460 "I" (offsetof(struct stack, und[0])),
443 PLC (PSR_F_BIT | PSR_I_BIT | SVC_MODE) 461 PLC (PSR_F_BIT | PSR_I_BIT | SVC_MODE)
444 : "r14"); 462 : "r14");
463#endif
445} 464}
446 465
447u32 __cpu_logical_map[NR_CPUS] = { [0 ... NR_CPUS-1] = MPIDR_INVALID }; 466u32 __cpu_logical_map[NR_CPUS] = { [0 ... NR_CPUS-1] = MPIDR_INVALID };
@@ -456,9 +475,82 @@ void __init smp_setup_processor_id(void)
456 for (i = 1; i < nr_cpu_ids; ++i) 475 for (i = 1; i < nr_cpu_ids; ++i)
457 cpu_logical_map(i) = i == cpu ? 0 : i; 476 cpu_logical_map(i) = i == cpu ? 0 : i;
458 477
478 /*
479 * clear __my_cpu_offset on boot CPU to avoid hang caused by
480 * using percpu variable early, for example, lockdep will
481 * access percpu variable inside lock_release
482 */
483 set_my_cpu_offset(0);
484
459 printk(KERN_INFO "Booting Linux on physical CPU 0x%x\n", mpidr); 485 printk(KERN_INFO "Booting Linux on physical CPU 0x%x\n", mpidr);
460} 486}
461 487
488struct mpidr_hash mpidr_hash;
489#ifdef CONFIG_SMP
490/**
491 * smp_build_mpidr_hash - Pre-compute shifts required at each affinity
492 * level in order to build a linear index from an
493 * MPIDR value. Resulting algorithm is a collision
494 * free hash carried out through shifting and ORing
495 */
496static void __init smp_build_mpidr_hash(void)
497{
498 u32 i, affinity;
499 u32 fs[3], bits[3], ls, mask = 0;
500 /*
501 * Pre-scan the list of MPIDRS and filter out bits that do
502 * not contribute to affinity levels, ie they never toggle.
503 */
504 for_each_possible_cpu(i)
505 mask |= (cpu_logical_map(i) ^ cpu_logical_map(0));
506 pr_debug("mask of set bits 0x%x\n", mask);
507 /*
508 * Find and stash the last and first bit set at all affinity levels to
509 * check how many bits are required to represent them.
510 */
511 for (i = 0; i < 3; i++) {
512 affinity = MPIDR_AFFINITY_LEVEL(mask, i);
513 /*
514 * Find the MSB bit and LSB bits position
515 * to determine how many bits are required
516 * to express the affinity level.
517 */
518 ls = fls(affinity);
519 fs[i] = affinity ? ffs(affinity) - 1 : 0;
520 bits[i] = ls - fs[i];
521 }
522 /*
523 * An index can be created from the MPIDR by isolating the
524 * significant bits at each affinity level and by shifting
525 * them in order to compress the 24 bits values space to a
526 * compressed set of values. This is equivalent to hashing
527 * the MPIDR through shifting and ORing. It is a collision free
528 * hash though not minimal since some levels might contain a number
529 * of CPUs that is not an exact power of 2 and their bit
530 * representation might contain holes, eg MPIDR[7:0] = {0x2, 0x80}.
531 */
532 mpidr_hash.shift_aff[0] = fs[0];
533 mpidr_hash.shift_aff[1] = MPIDR_LEVEL_BITS + fs[1] - bits[0];
534 mpidr_hash.shift_aff[2] = 2*MPIDR_LEVEL_BITS + fs[2] -
535 (bits[1] + bits[0]);
536 mpidr_hash.mask = mask;
537 mpidr_hash.bits = bits[2] + bits[1] + bits[0];
538 pr_debug("MPIDR hash: aff0[%u] aff1[%u] aff2[%u] mask[0x%x] bits[%u]\n",
539 mpidr_hash.shift_aff[0],
540 mpidr_hash.shift_aff[1],
541 mpidr_hash.shift_aff[2],
542 mpidr_hash.mask,
543 mpidr_hash.bits);
544 /*
545 * 4x is an arbitrary value used to warn on a hash table much bigger
546 * than expected on most systems.
547 */
548 if (mpidr_hash_size() > 4 * num_possible_cpus())
549 pr_warn("Large number of MPIDR hash buckets detected\n");
550 sync_cache_w(&mpidr_hash);
551}
552#endif
553
462static void __init setup_processor(void) 554static void __init setup_processor(void)
463{ 555{
464 struct proc_info_list *list; 556 struct proc_info_list *list;
@@ -744,6 +836,8 @@ static int __init meminfo_cmp(const void *_a, const void *_b)
744void __init hyp_mode_check(void) 836void __init hyp_mode_check(void)
745{ 837{
746#ifdef CONFIG_ARM_VIRT_EXT 838#ifdef CONFIG_ARM_VIRT_EXT
839 sync_boot_mode();
840
747 if (is_hyp_mode_available()) { 841 if (is_hyp_mode_available()) {
748 pr_info("CPU: All CPU(s) started in HYP mode.\n"); 842 pr_info("CPU: All CPU(s) started in HYP mode.\n");
749 pr_info("CPU: Virtualization extensions available.\n"); 843 pr_info("CPU: Virtualization extensions available.\n");
@@ -769,8 +863,8 @@ void __init setup_arch(char **cmdline_p)
769 863
770 setup_dma_zone(mdesc); 864 setup_dma_zone(mdesc);
771 865
772 if (mdesc->restart_mode) 866 if (mdesc->reboot_mode != REBOOT_HARD)
773 reboot_setup(&mdesc->restart_mode); 867 reboot_mode = mdesc->reboot_mode;
774 868
775 init_mm.start_code = (unsigned long) _text; 869 init_mm.start_code = (unsigned long) _text;
776 init_mm.end_code = (unsigned long) _etext; 870 init_mm.end_code = (unsigned long) _etext;
@@ -796,10 +890,17 @@ void __init setup_arch(char **cmdline_p)
796 unflatten_device_tree(); 890 unflatten_device_tree();
797 891
798 arm_dt_init_cpu_maps(); 892 arm_dt_init_cpu_maps();
893 psci_init();
799#ifdef CONFIG_SMP 894#ifdef CONFIG_SMP
800 if (is_smp()) { 895 if (is_smp()) {
801 smp_set_ops(mdesc->smp); 896 if (!mdesc->smp_init || !mdesc->smp_init()) {
897 if (psci_smp_available())
898 smp_set_ops(&psci_smp_ops);
899 else if (mdesc->smp)
900 smp_set_ops(mdesc->smp);
901 }
802 smp_init_cpus(); 902 smp_init_cpus();
903 smp_build_mpidr_hash();
803 } 904 }
804#endif 905#endif
805 906
@@ -872,6 +973,8 @@ static const char *hwcap_str[] = {
872 "vfpv4", 973 "vfpv4",
873 "idiva", 974 "idiva",
874 "idivt", 975 "idivt",
976 "vfpd32",
977 "lpae",
875 NULL 978 NULL
876}; 979};
877 980
diff --git a/arch/arm/kernel/signal.c b/arch/arm/kernel/signal.c
index 296786bdbb73..ab3304225272 100644
--- a/arch/arm/kernel/signal.c
+++ b/arch/arm/kernel/signal.c
@@ -8,6 +8,7 @@
8 * published by the Free Software Foundation. 8 * published by the Free Software Foundation.
9 */ 9 */
10#include <linux/errno.h> 10#include <linux/errno.h>
11#include <linux/random.h>
11#include <linux/signal.h> 12#include <linux/signal.h>
12#include <linux/personality.h> 13#include <linux/personality.h>
13#include <linux/uaccess.h> 14#include <linux/uaccess.h>
@@ -15,12 +16,11 @@
15 16
16#include <asm/elf.h> 17#include <asm/elf.h>
17#include <asm/cacheflush.h> 18#include <asm/cacheflush.h>
19#include <asm/traps.h>
18#include <asm/ucontext.h> 20#include <asm/ucontext.h>
19#include <asm/unistd.h> 21#include <asm/unistd.h>
20#include <asm/vfp.h> 22#include <asm/vfp.h>
21 23
22#include "signal.h"
23
24/* 24/*
25 * For ARM syscalls, we encode the syscall number into the instruction. 25 * For ARM syscalls, we encode the syscall number into the instruction.
26 */ 26 */
@@ -40,11 +40,13 @@
40#define SWI_THUMB_SIGRETURN (0xdf00 << 16 | 0x2700 | (__NR_sigreturn - __NR_SYSCALL_BASE)) 40#define SWI_THUMB_SIGRETURN (0xdf00 << 16 | 0x2700 | (__NR_sigreturn - __NR_SYSCALL_BASE))
41#define SWI_THUMB_RT_SIGRETURN (0xdf00 << 16 | 0x2700 | (__NR_rt_sigreturn - __NR_SYSCALL_BASE)) 41#define SWI_THUMB_RT_SIGRETURN (0xdf00 << 16 | 0x2700 | (__NR_rt_sigreturn - __NR_SYSCALL_BASE))
42 42
43const unsigned long sigreturn_codes[7] = { 43static const unsigned long sigreturn_codes[7] = {
44 MOV_R7_NR_SIGRETURN, SWI_SYS_SIGRETURN, SWI_THUMB_SIGRETURN, 44 MOV_R7_NR_SIGRETURN, SWI_SYS_SIGRETURN, SWI_THUMB_SIGRETURN,
45 MOV_R7_NR_RT_SIGRETURN, SWI_SYS_RT_SIGRETURN, SWI_THUMB_RT_SIGRETURN, 45 MOV_R7_NR_RT_SIGRETURN, SWI_SYS_RT_SIGRETURN, SWI_THUMB_RT_SIGRETURN,
46}; 46};
47 47
48static unsigned long signal_return_offset;
49
48#ifdef CONFIG_CRUNCH 50#ifdef CONFIG_CRUNCH
49static int preserve_crunch_context(struct crunch_sigframe __user *frame) 51static int preserve_crunch_context(struct crunch_sigframe __user *frame)
50{ 52{
@@ -392,17 +394,28 @@ setup_return(struct pt_regs *regs, struct ksignal *ksig,
392 if (ksig->ka.sa.sa_flags & SA_SIGINFO) 394 if (ksig->ka.sa.sa_flags & SA_SIGINFO)
393 idx += 3; 395 idx += 3;
394 396
397 /*
398 * Put the sigreturn code on the stack no matter which return
399 * mechanism we use in order to remain ABI compliant
400 */
395 if (__put_user(sigreturn_codes[idx], rc) || 401 if (__put_user(sigreturn_codes[idx], rc) ||
396 __put_user(sigreturn_codes[idx+1], rc+1)) 402 __put_user(sigreturn_codes[idx+1], rc+1))
397 return 1; 403 return 1;
398 404
405#ifdef CONFIG_MMU
399 if (cpsr & MODE32_BIT) { 406 if (cpsr & MODE32_BIT) {
407 struct mm_struct *mm = current->mm;
408
400 /* 409 /*
401 * 32-bit code can use the new high-page 410 * 32-bit code can use the signal return page
402 * signal return code support. 411 * except when the MPU has protected the vectors
412 * page from PL0
403 */ 413 */
404 retcode = KERN_SIGRETURN_CODE + (idx << 2) + thumb; 414 retcode = mm->context.sigpage + signal_return_offset +
405 } else { 415 (idx << 2) + thumb;
416 } else
417#endif
418 {
406 /* 419 /*
407 * Ensure that the instruction cache sees 420 * Ensure that the instruction cache sees
408 * the return code written onto the stack. 421 * the return code written onto the stack.
@@ -603,3 +616,33 @@ do_work_pending(struct pt_regs *regs, unsigned int thread_flags, int syscall)
603 } while (thread_flags & _TIF_WORK_MASK); 616 } while (thread_flags & _TIF_WORK_MASK);
604 return 0; 617 return 0;
605} 618}
619
620struct page *get_signal_page(void)
621{
622 unsigned long ptr;
623 unsigned offset;
624 struct page *page;
625 void *addr;
626
627 page = alloc_pages(GFP_KERNEL, 0);
628
629 if (!page)
630 return NULL;
631
632 addr = page_address(page);
633
634 /* Give the signal return code some randomness */
635 offset = 0x200 + (get_random_int() & 0x7fc);
636 signal_return_offset = offset;
637
638 /*
639 * Copy signal return handlers into the vector page, and
640 * set sigreturn to be a pointer to these.
641 */
642 memcpy(addr + offset, sigreturn_codes, sizeof(sigreturn_codes));
643
644 ptr = (unsigned long)addr + offset;
645 flush_icache_range(ptr, ptr + sizeof(sigreturn_codes));
646
647 return page;
648}
diff --git a/arch/arm/kernel/signal.h b/arch/arm/kernel/signal.h
deleted file mode 100644
index 5ff067b7c752..000000000000
--- a/arch/arm/kernel/signal.h
+++ /dev/null
@@ -1,12 +0,0 @@
1/*
2 * linux/arch/arm/kernel/signal.h
3 *
4 * Copyright (C) 2005-2009 Russell King.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
10#define KERN_SIGRETURN_CODE (CONFIG_VECTORS_BASE + 0x00000500)
11
12extern const unsigned long sigreturn_codes[7];
diff --git a/arch/arm/kernel/sleep.S b/arch/arm/kernel/sleep.S
index 987dcf33415c..db1536b8b30b 100644
--- a/arch/arm/kernel/sleep.S
+++ b/arch/arm/kernel/sleep.S
@@ -7,6 +7,49 @@
7 .text 7 .text
8 8
9/* 9/*
10 * Implementation of MPIDR hash algorithm through shifting
11 * and OR'ing.
12 *
13 * @dst: register containing hash result
14 * @rs0: register containing affinity level 0 bit shift
15 * @rs1: register containing affinity level 1 bit shift
16 * @rs2: register containing affinity level 2 bit shift
17 * @mpidr: register containing MPIDR value
18 * @mask: register containing MPIDR mask
19 *
20 * Pseudo C-code:
21 *
22 *u32 dst;
23 *
24 *compute_mpidr_hash(u32 rs0, u32 rs1, u32 rs2, u32 mpidr, u32 mask) {
25 * u32 aff0, aff1, aff2;
26 * u32 mpidr_masked = mpidr & mask;
27 * aff0 = mpidr_masked & 0xff;
28 * aff1 = mpidr_masked & 0xff00;
29 * aff2 = mpidr_masked & 0xff0000;
30 * dst = (aff0 >> rs0 | aff1 >> rs1 | aff2 >> rs2);
31 *}
32 * Input registers: rs0, rs1, rs2, mpidr, mask
33 * Output register: dst
34 * Note: input and output registers must be disjoint register sets
35 (eg: a macro instance with mpidr = r1 and dst = r1 is invalid)
36 */
37 .macro compute_mpidr_hash dst, rs0, rs1, rs2, mpidr, mask
38 and \mpidr, \mpidr, \mask @ mask out MPIDR bits
39 and \dst, \mpidr, #0xff @ mask=aff0
40 ARM( mov \dst, \dst, lsr \rs0 ) @ dst=aff0>>rs0
41 THUMB( lsr \dst, \dst, \rs0 )
42 and \mask, \mpidr, #0xff00 @ mask = aff1
43 ARM( orr \dst, \dst, \mask, lsr \rs1 ) @ dst|=(aff1>>rs1)
44 THUMB( lsr \mask, \mask, \rs1 )
45 THUMB( orr \dst, \dst, \mask )
46 and \mask, \mpidr, #0xff0000 @ mask = aff2
47 ARM( orr \dst, \dst, \mask, lsr \rs2 ) @ dst|=(aff2>>rs2)
48 THUMB( lsr \mask, \mask, \rs2 )
49 THUMB( orr \dst, \dst, \mask )
50 .endm
51
52/*
10 * Save CPU state for a suspend. This saves the CPU general purpose 53 * Save CPU state for a suspend. This saves the CPU general purpose
11 * registers, and allocates space on the kernel stack to save the CPU 54 * registers, and allocates space on the kernel stack to save the CPU
12 * specific registers and some other data for resume. 55 * specific registers and some other data for resume.
@@ -29,12 +72,18 @@ ENTRY(__cpu_suspend)
29 mov r1, r4 @ size of save block 72 mov r1, r4 @ size of save block
30 mov r2, r5 @ virtual SP 73 mov r2, r5 @ virtual SP
31 ldr r3, =sleep_save_sp 74 ldr r3, =sleep_save_sp
32#ifdef CONFIG_SMP 75 ldr r3, [r3, #SLEEP_SAVE_SP_VIRT]
33 ALT_SMP(mrc p15, 0, lr, c0, c0, 5) 76 ALT_SMP(mrc p15, 0, r9, c0, c0, 5)
34 ALT_UP(mov lr, #0) 77 ALT_UP_B(1f)
35 and lr, lr, #15 78 ldr r8, =mpidr_hash
79 /*
80 * This ldmia relies on the memory layout of the mpidr_hash
81 * struct mpidr_hash.
82 */
83 ldmia r8, {r4-r7} @ r4 = mpidr mask (r5,r6,r7) = l[0,1,2] shifts
84 compute_mpidr_hash lr, r5, r6, r7, r9, r4
36 add r3, r3, lr, lsl #2 85 add r3, r3, lr, lsl #2
37#endif 861:
38 bl __cpu_suspend_save 87 bl __cpu_suspend_save
39 adr lr, BSYM(cpu_suspend_abort) 88 adr lr, BSYM(cpu_suspend_abort)
40 ldmfd sp!, {r0, pc} @ call suspend fn 89 ldmfd sp!, {r0, pc} @ call suspend fn
@@ -81,15 +130,23 @@ ENDPROC(cpu_resume_after_mmu)
81 .data 130 .data
82 .align 131 .align
83ENTRY(cpu_resume) 132ENTRY(cpu_resume)
84#ifdef CONFIG_SMP 133 mov r1, #0
85 adr r0, sleep_save_sp 134 ALT_SMP(mrc p15, 0, r0, c0, c0, 5)
86 ALT_SMP(mrc p15, 0, r1, c0, c0, 5) 135 ALT_UP_B(1f)
87 ALT_UP(mov r1, #0) 136 adr r2, mpidr_hash_ptr
88 and r1, r1, #15 137 ldr r3, [r2]
89 ldr r0, [r0, r1, lsl #2] @ stack phys addr 138 add r2, r2, r3 @ r2 = struct mpidr_hash phys address
90#else 139 /*
91 ldr r0, sleep_save_sp @ stack phys addr 140 * This ldmia relies on the memory layout of the mpidr_hash
92#endif 141 * struct mpidr_hash.
142 */
143 ldmia r2, { r3-r6 } @ r3 = mpidr mask (r4,r5,r6) = l[0,1,2] shifts
144 compute_mpidr_hash r1, r4, r5, r6, r0, r3
1451:
146 adr r0, _sleep_save_sp
147 ldr r0, [r0, #SLEEP_SAVE_SP_PHYS]
148 ldr r0, [r0, r1, lsl #2]
149
93 setmode PSR_I_BIT | PSR_F_BIT | SVC_MODE, r1 @ set SVC, irqs off 150 setmode PSR_I_BIT | PSR_F_BIT | SVC_MODE, r1 @ set SVC, irqs off
94 @ load phys pgd, stack, resume fn 151 @ load phys pgd, stack, resume fn
95 ARM( ldmia r0!, {r1, sp, pc} ) 152 ARM( ldmia r0!, {r1, sp, pc} )
@@ -98,7 +155,11 @@ THUMB( mov sp, r2 )
98THUMB( bx r3 ) 155THUMB( bx r3 )
99ENDPROC(cpu_resume) 156ENDPROC(cpu_resume)
100 157
101sleep_save_sp: 158 .align 2
102 .rept CONFIG_NR_CPUS 159mpidr_hash_ptr:
103 .long 0 @ preserve stack phys ptr here 160 .long mpidr_hash - . @ mpidr_hash struct offset
104 .endr 161
162 .type sleep_save_sp, #object
163ENTRY(sleep_save_sp)
164_sleep_save_sp:
165 .space SLEEP_SAVE_SP_SZ @ struct sleep_save_sp
diff --git a/arch/arm/kernel/smp.c b/arch/arm/kernel/smp.c
index 5919eb451bb9..c2b4f8f0be9a 100644
--- a/arch/arm/kernel/smp.c
+++ b/arch/arm/kernel/smp.c
@@ -45,6 +45,7 @@
45#include <asm/smp_plat.h> 45#include <asm/smp_plat.h>
46#include <asm/virt.h> 46#include <asm/virt.h>
47#include <asm/mach/arch.h> 47#include <asm/mach/arch.h>
48#include <asm/mpu.h>
48 49
49/* 50/*
50 * as from 2.5, kernels no longer have an init_tasks structure 51 * as from 2.5, kernels no longer have an init_tasks structure
@@ -57,7 +58,7 @@ struct secondary_data secondary_data;
57 * control for which core is the next to come out of the secondary 58 * control for which core is the next to come out of the secondary
58 * boot "holding pen" 59 * boot "holding pen"
59 */ 60 */
60volatile int __cpuinitdata pen_release = -1; 61volatile int pen_release = -1;
61 62
62enum ipi_msg_type { 63enum ipi_msg_type {
63 IPI_WAKEUP, 64 IPI_WAKEUP,
@@ -78,7 +79,14 @@ void __init smp_set_ops(struct smp_operations *ops)
78 smp_ops = *ops; 79 smp_ops = *ops;
79}; 80};
80 81
81int __cpuinit __cpu_up(unsigned int cpu, struct task_struct *idle) 82static unsigned long get_arch_pgd(pgd_t *pgd)
83{
84 phys_addr_t pgdir = virt_to_phys(pgd);
85 BUG_ON(pgdir & ARCH_PGD_MASK);
86 return pgdir >> ARCH_PGD_SHIFT;
87}
88
89int __cpu_up(unsigned int cpu, struct task_struct *idle)
82{ 90{
83 int ret; 91 int ret;
84 92
@@ -87,8 +95,14 @@ int __cpuinit __cpu_up(unsigned int cpu, struct task_struct *idle)
87 * its stack and the page tables. 95 * its stack and the page tables.
88 */ 96 */
89 secondary_data.stack = task_stack_page(idle) + THREAD_START_SP; 97 secondary_data.stack = task_stack_page(idle) + THREAD_START_SP;
90 secondary_data.pgdir = virt_to_phys(idmap_pgd); 98#ifdef CONFIG_ARM_MPU
91 secondary_data.swapper_pg_dir = virt_to_phys(swapper_pg_dir); 99 secondary_data.mpu_rgn_szr = mpu_rgn_info.rgns[MPU_RAM_REGION].drsr;
100#endif
101
102#ifdef CONFIG_MMU
103 secondary_data.pgdir = get_arch_pgd(idmap_pgd);
104 secondary_data.swapper_pg_dir = get_arch_pgd(swapper_pg_dir);
105#endif
92 __cpuc_flush_dcache_area(&secondary_data, sizeof(secondary_data)); 106 __cpuc_flush_dcache_area(&secondary_data, sizeof(secondary_data));
93 outer_clean_range(__pa(&secondary_data), __pa(&secondary_data + 1)); 107 outer_clean_range(__pa(&secondary_data), __pa(&secondary_data + 1));
94 108
@@ -112,9 +126,8 @@ int __cpuinit __cpu_up(unsigned int cpu, struct task_struct *idle)
112 pr_err("CPU%u: failed to boot: %d\n", cpu, ret); 126 pr_err("CPU%u: failed to boot: %d\n", cpu, ret);
113 } 127 }
114 128
115 secondary_data.stack = NULL;
116 secondary_data.pgdir = 0;
117 129
130 memset(&secondary_data, 0, sizeof(secondary_data));
118 return ret; 131 return ret;
119} 132}
120 133
@@ -125,7 +138,7 @@ void __init smp_init_cpus(void)
125 smp_ops.smp_init_cpus(); 138 smp_ops.smp_init_cpus();
126} 139}
127 140
128int __cpuinit boot_secondary(unsigned int cpu, struct task_struct *idle) 141int boot_secondary(unsigned int cpu, struct task_struct *idle)
129{ 142{
130 if (smp_ops.smp_boot_secondary) 143 if (smp_ops.smp_boot_secondary)
131 return smp_ops.smp_boot_secondary(cpu, idle); 144 return smp_ops.smp_boot_secondary(cpu, idle);
@@ -157,7 +170,7 @@ static int platform_cpu_disable(unsigned int cpu)
157/* 170/*
158 * __cpu_disable runs on the processor to be shutdown. 171 * __cpu_disable runs on the processor to be shutdown.
159 */ 172 */
160int __cpuinit __cpu_disable(void) 173int __cpu_disable(void)
161{ 174{
162 unsigned int cpu = smp_processor_id(); 175 unsigned int cpu = smp_processor_id();
163 int ret; 176 int ret;
@@ -203,7 +216,7 @@ static DECLARE_COMPLETION(cpu_died);
203 * called on the thread which is asking for a CPU to be shutdown - 216 * called on the thread which is asking for a CPU to be shutdown -
204 * waits until shutdown has completed, or it is timed out. 217 * waits until shutdown has completed, or it is timed out.
205 */ 218 */
206void __cpuinit __cpu_die(unsigned int cpu) 219void __cpu_die(unsigned int cpu)
207{ 220{
208 if (!wait_for_completion_timeout(&cpu_died, msecs_to_jiffies(5000))) { 221 if (!wait_for_completion_timeout(&cpu_died, msecs_to_jiffies(5000))) {
209 pr_err("CPU%u: cpu didn't die\n", cpu); 222 pr_err("CPU%u: cpu didn't die\n", cpu);
@@ -293,7 +306,7 @@ void __ref cpu_die(void)
293 * Called by both boot and secondaries to move global data into 306 * Called by both boot and secondaries to move global data into
294 * per-processor storage. 307 * per-processor storage.
295 */ 308 */
296static void __cpuinit smp_store_cpu_info(unsigned int cpuid) 309static void smp_store_cpu_info(unsigned int cpuid)
297{ 310{
298 struct cpuinfo_arm *cpu_info = &per_cpu(cpu_data, cpuid); 311 struct cpuinfo_arm *cpu_info = &per_cpu(cpu_data, cpuid);
299 312
@@ -309,7 +322,7 @@ static void percpu_timer_setup(void);
309 * This is the secondary CPU boot entry. We're using this CPUs 322 * This is the secondary CPU boot entry. We're using this CPUs
310 * idle thread stack, but a set of temporary page tables. 323 * idle thread stack, but a set of temporary page tables.
311 */ 324 */
312asmlinkage void __cpuinit secondary_start_kernel(void) 325asmlinkage void secondary_start_kernel(void)
313{ 326{
314 struct mm_struct *mm = &init_mm; 327 struct mm_struct *mm = &init_mm;
315 unsigned int cpu; 328 unsigned int cpu;
@@ -508,7 +521,7 @@ static void broadcast_timer_set_mode(enum clock_event_mode mode,
508{ 521{
509} 522}
510 523
511static void __cpuinit broadcast_timer_setup(struct clock_event_device *evt) 524static void broadcast_timer_setup(struct clock_event_device *evt)
512{ 525{
513 evt->name = "dummy_timer"; 526 evt->name = "dummy_timer";
514 evt->features = CLOCK_EVT_FEAT_ONESHOT | 527 evt->features = CLOCK_EVT_FEAT_ONESHOT |
@@ -537,7 +550,7 @@ int local_timer_register(struct local_timer_ops *ops)
537} 550}
538#endif 551#endif
539 552
540static void __cpuinit percpu_timer_setup(void) 553static void percpu_timer_setup(void)
541{ 554{
542 unsigned int cpu = smp_processor_id(); 555 unsigned int cpu = smp_processor_id();
543 struct clock_event_device *evt = &per_cpu(percpu_clockevent, cpu); 556 struct clock_event_device *evt = &per_cpu(percpu_clockevent, cpu);
diff --git a/arch/arm/kernel/smp_tlb.c b/arch/arm/kernel/smp_tlb.c
index 9a52a07aa40e..c2edfff573c2 100644
--- a/arch/arm/kernel/smp_tlb.c
+++ b/arch/arm/kernel/smp_tlb.c
@@ -70,23 +70,6 @@ static inline void ipi_flush_bp_all(void *ignored)
70 local_flush_bp_all(); 70 local_flush_bp_all();
71} 71}
72 72
73#ifdef CONFIG_ARM_ERRATA_798181
74static int erratum_a15_798181(void)
75{
76 unsigned int midr = read_cpuid_id();
77
78 /* Cortex-A15 r0p0..r3p2 affected */
79 if ((midr & 0xff0ffff0) != 0x410fc0f0 || midr > 0x413fc0f2)
80 return 0;
81 return 1;
82}
83#else
84static int erratum_a15_798181(void)
85{
86 return 0;
87}
88#endif
89
90static void ipi_flush_tlb_a15_erratum(void *arg) 73static void ipi_flush_tlb_a15_erratum(void *arg)
91{ 74{
92 dmb(); 75 dmb();
@@ -103,7 +86,7 @@ static void broadcast_tlb_a15_erratum(void)
103 86
104static void broadcast_tlb_mm_a15_erratum(struct mm_struct *mm) 87static void broadcast_tlb_mm_a15_erratum(struct mm_struct *mm)
105{ 88{
106 int cpu, this_cpu; 89 int this_cpu;
107 cpumask_t mask = { CPU_BITS_NONE }; 90 cpumask_t mask = { CPU_BITS_NONE };
108 91
109 if (!erratum_a15_798181()) 92 if (!erratum_a15_798181())
@@ -111,21 +94,7 @@ static void broadcast_tlb_mm_a15_erratum(struct mm_struct *mm)
111 94
112 dummy_flush_tlb_a15_erratum(); 95 dummy_flush_tlb_a15_erratum();
113 this_cpu = get_cpu(); 96 this_cpu = get_cpu();
114 for_each_online_cpu(cpu) { 97 a15_erratum_get_cpumask(this_cpu, mm, &mask);
115 if (cpu == this_cpu)
116 continue;
117 /*
118 * We only need to send an IPI if the other CPUs are running
119 * the same ASID as the one being invalidated. There is no
120 * need for locking around the active_asids check since the
121 * switch_mm() function has at least one dmb() (as required by
122 * this workaround) in case a context switch happens on
123 * another CPU after the condition below.
124 */
125 if (atomic64_read(&mm->context.id) ==
126 atomic64_read(&per_cpu(active_asids, cpu)))
127 cpumask_set_cpu(cpu, &mask);
128 }
129 smp_call_function_many(&mask, ipi_flush_tlb_a15_erratum, NULL, 1); 98 smp_call_function_many(&mask, ipi_flush_tlb_a15_erratum, NULL, 1);
130 put_cpu(); 99 put_cpu();
131} 100}
diff --git a/arch/arm/kernel/smp_twd.c b/arch/arm/kernel/smp_twd.c
index 90525d9d290b..25956204ef23 100644
--- a/arch/arm/kernel/smp_twd.c
+++ b/arch/arm/kernel/smp_twd.c
@@ -120,7 +120,7 @@ static int twd_rate_change(struct notifier_block *nb,
120 * changing cpu. 120 * changing cpu.
121 */ 121 */
122 if (flags == POST_RATE_CHANGE) 122 if (flags == POST_RATE_CHANGE)
123 smp_call_function(twd_update_frequency, 123 on_each_cpu(twd_update_frequency,
124 (void *)&cnd->new_rate, 1); 124 (void *)&cnd->new_rate, 1);
125 125
126 return NOTIFY_OK; 126 return NOTIFY_OK;
@@ -187,7 +187,7 @@ core_initcall(twd_cpufreq_init);
187 187
188#endif 188#endif
189 189
190static void __cpuinit twd_calibrate_rate(void) 190static void twd_calibrate_rate(void)
191{ 191{
192 unsigned long count; 192 unsigned long count;
193 u64 waitjiffies; 193 u64 waitjiffies;
@@ -265,7 +265,7 @@ static void twd_get_clock(struct device_node *np)
265/* 265/*
266 * Setup the local clock events for a CPU. 266 * Setup the local clock events for a CPU.
267 */ 267 */
268static int __cpuinit twd_timer_setup(struct clock_event_device *clk) 268static int twd_timer_setup(struct clock_event_device *clk)
269{ 269{
270 struct clock_event_device **this_cpu_clk; 270 struct clock_event_device **this_cpu_clk;
271 int cpu = smp_processor_id(); 271 int cpu = smp_processor_id();
@@ -308,7 +308,7 @@ static int __cpuinit twd_timer_setup(struct clock_event_device *clk)
308 return 0; 308 return 0;
309} 309}
310 310
311static struct local_timer_ops twd_lt_ops __cpuinitdata = { 311static struct local_timer_ops twd_lt_ops = {
312 .setup = twd_timer_setup, 312 .setup = twd_timer_setup,
313 .stop = twd_timer_stop, 313 .stop = twd_timer_stop,
314}; 314};
diff --git a/arch/arm/kernel/suspend.c b/arch/arm/kernel/suspend.c
index c59c97ea8268..41cf3cbf756d 100644
--- a/arch/arm/kernel/suspend.c
+++ b/arch/arm/kernel/suspend.c
@@ -1,15 +1,54 @@
1#include <linux/init.h> 1#include <linux/init.h>
2#include <linux/slab.h>
2 3
4#include <asm/cacheflush.h>
3#include <asm/idmap.h> 5#include <asm/idmap.h>
4#include <asm/pgalloc.h> 6#include <asm/pgalloc.h>
5#include <asm/pgtable.h> 7#include <asm/pgtable.h>
6#include <asm/memory.h> 8#include <asm/memory.h>
9#include <asm/smp_plat.h>
7#include <asm/suspend.h> 10#include <asm/suspend.h>
8#include <asm/tlbflush.h> 11#include <asm/tlbflush.h>
9 12
10extern int __cpu_suspend(unsigned long, int (*)(unsigned long)); 13extern int __cpu_suspend(unsigned long, int (*)(unsigned long));
11extern void cpu_resume_mmu(void); 14extern void cpu_resume_mmu(void);
12 15
16#ifdef CONFIG_MMU
17/*
18 * Hide the first two arguments to __cpu_suspend - these are an implementation
19 * detail which platform code shouldn't have to know about.
20 */
21int cpu_suspend(unsigned long arg, int (*fn)(unsigned long))
22{
23 struct mm_struct *mm = current->active_mm;
24 int ret;
25
26 if (!idmap_pgd)
27 return -EINVAL;
28
29 /*
30 * Provide a temporary page table with an identity mapping for
31 * the MMU-enable code, required for resuming. On successful
32 * resume (indicated by a zero return code), we need to switch
33 * back to the correct page tables.
34 */
35 ret = __cpu_suspend(arg, fn);
36 if (ret == 0) {
37 cpu_switch_mm(mm->pgd, mm);
38 local_flush_bp_all();
39 local_flush_tlb_all();
40 }
41
42 return ret;
43}
44#else
45int cpu_suspend(unsigned long arg, int (*fn)(unsigned long))
46{
47 return __cpu_suspend(arg, fn);
48}
49#define idmap_pgd NULL
50#endif
51
13/* 52/*
14 * This is called by __cpu_suspend() to save the state, and do whatever 53 * This is called by __cpu_suspend() to save the state, and do whatever
15 * flushing is required to ensure that when the CPU goes to sleep we have 54 * flushing is required to ensure that when the CPU goes to sleep we have
@@ -47,30 +86,19 @@ void __cpu_suspend_save(u32 *ptr, u32 ptrsz, u32 sp, u32 *save_ptr)
47 virt_to_phys(save_ptr) + sizeof(*save_ptr)); 86 virt_to_phys(save_ptr) + sizeof(*save_ptr));
48} 87}
49 88
50/* 89extern struct sleep_save_sp sleep_save_sp;
51 * Hide the first two arguments to __cpu_suspend - these are an implementation
52 * detail which platform code shouldn't have to know about.
53 */
54int cpu_suspend(unsigned long arg, int (*fn)(unsigned long))
55{
56 struct mm_struct *mm = current->active_mm;
57 int ret;
58
59 if (!idmap_pgd)
60 return -EINVAL;
61 90
62 /* 91static int cpu_suspend_alloc_sp(void)
63 * Provide a temporary page table with an identity mapping for 92{
64 * the MMU-enable code, required for resuming. On successful 93 void *ctx_ptr;
65 * resume (indicated by a zero return code), we need to switch 94 /* ctx_ptr is an array of physical addresses */
66 * back to the correct page tables. 95 ctx_ptr = kcalloc(mpidr_hash_size(), sizeof(u32), GFP_KERNEL);
67 */
68 ret = __cpu_suspend(arg, fn);
69 if (ret == 0) {
70 cpu_switch_mm(mm->pgd, mm);
71 local_flush_bp_all();
72 local_flush_tlb_all();
73 }
74 96
75 return ret; 97 if (WARN_ON(!ctx_ptr))
98 return -ENOMEM;
99 sleep_save_sp.save_ptr_stash = ctx_ptr;
100 sleep_save_sp.save_ptr_stash_phys = virt_to_phys(ctx_ptr);
101 sync_cache_w(&sleep_save_sp);
102 return 0;
76} 103}
104early_initcall(cpu_suspend_alloc_sp);
diff --git a/arch/arm/kernel/time.c b/arch/arm/kernel/time.c
index abff4e9aaee0..98aee3258398 100644
--- a/arch/arm/kernel/time.c
+++ b/arch/arm/kernel/time.c
@@ -24,9 +24,9 @@
24#include <linux/timer.h> 24#include <linux/timer.h>
25#include <linux/clocksource.h> 25#include <linux/clocksource.h>
26#include <linux/irq.h> 26#include <linux/irq.h>
27#include <linux/sched_clock.h>
27 28
28#include <asm/thread_info.h> 29#include <asm/thread_info.h>
29#include <asm/sched_clock.h>
30#include <asm/stacktrace.h> 30#include <asm/stacktrace.h>
31#include <asm/mach/arch.h> 31#include <asm/mach/arch.h>
32#include <asm/mach/time.h> 32#include <asm/mach/time.h>
@@ -120,6 +120,4 @@ void __init time_init(void)
120 machine_desc->init_time(); 120 machine_desc->init_time();
121 else 121 else
122 clocksource_of_init(); 122 clocksource_of_init();
123
124 sched_clock_postinit();
125} 123}
diff --git a/arch/arm/kernel/traps.c b/arch/arm/kernel/traps.c
index 18b32e8e4497..ab517fcce21b 100644
--- a/arch/arm/kernel/traps.c
+++ b/arch/arm/kernel/traps.c
@@ -35,8 +35,6 @@
35#include <asm/tls.h> 35#include <asm/tls.h>
36#include <asm/system_misc.h> 36#include <asm/system_misc.h>
37 37
38#include "signal.h"
39
40static const char *handler[]= { "prefetch abort", "data abort", "address exception", "interrupt" }; 38static const char *handler[]= { "prefetch abort", "data abort", "address exception", "interrupt" };
41 39
42void *vectors_page; 40void *vectors_page;
@@ -581,7 +579,7 @@ asmlinkage int arm_syscall(int no, struct pt_regs *regs)
581 return regs->ARM_r0; 579 return regs->ARM_r0;
582 580
583 case NR(set_tls): 581 case NR(set_tls):
584 thread->tp_value = regs->ARM_r0; 582 thread->tp_value[0] = regs->ARM_r0;
585 if (tls_emu) 583 if (tls_emu)
586 return 0; 584 return 0;
587 if (has_tls_reg) { 585 if (has_tls_reg) {
@@ -699,7 +697,7 @@ static int get_tp_trap(struct pt_regs *regs, unsigned int instr)
699 int reg = (instr >> 12) & 15; 697 int reg = (instr >> 12) & 15;
700 if (reg == 15) 698 if (reg == 15)
701 return 1; 699 return 1;
702 regs->uregs[reg] = current_thread_info()->tp_value; 700 regs->uregs[reg] = current_thread_info()->tp_value[0];
703 regs->ARM_pc += 4; 701 regs->ARM_pc += 4;
704 return 0; 702 return 0;
705} 703}
@@ -800,47 +798,63 @@ void __init trap_init(void)
800 return; 798 return;
801} 799}
802 800
803static void __init kuser_get_tls_init(unsigned long vectors) 801#ifdef CONFIG_KUSER_HELPERS
802static void __init kuser_init(void *vectors)
804{ 803{
804 extern char __kuser_helper_start[], __kuser_helper_end[];
805 int kuser_sz = __kuser_helper_end - __kuser_helper_start;
806
807 memcpy(vectors + 0x1000 - kuser_sz, __kuser_helper_start, kuser_sz);
808
805 /* 809 /*
806 * vectors + 0xfe0 = __kuser_get_tls 810 * vectors + 0xfe0 = __kuser_get_tls
807 * vectors + 0xfe8 = hardware TLS instruction at 0xffff0fe8 811 * vectors + 0xfe8 = hardware TLS instruction at 0xffff0fe8
808 */ 812 */
809 if (tls_emu || has_tls_reg) 813 if (tls_emu || has_tls_reg)
810 memcpy((void *)vectors + 0xfe0, (void *)vectors + 0xfe8, 4); 814 memcpy(vectors + 0xfe0, vectors + 0xfe8, 4);
811} 815}
816#else
817static void __init kuser_init(void *vectors)
818{
819}
820#endif
812 821
813void __init early_trap_init(void *vectors_base) 822void __init early_trap_init(void *vectors_base)
814{ 823{
824#ifndef CONFIG_CPU_V7M
815 unsigned long vectors = (unsigned long)vectors_base; 825 unsigned long vectors = (unsigned long)vectors_base;
816 extern char __stubs_start[], __stubs_end[]; 826 extern char __stubs_start[], __stubs_end[];
817 extern char __vectors_start[], __vectors_end[]; 827 extern char __vectors_start[], __vectors_end[];
818 extern char __kuser_helper_start[], __kuser_helper_end[]; 828 unsigned i;
819 int kuser_sz = __kuser_helper_end - __kuser_helper_start;
820 829
821 vectors_page = vectors_base; 830 vectors_page = vectors_base;
822 831
823 /* 832 /*
833 * Poison the vectors page with an undefined instruction. This
834 * instruction is chosen to be undefined for both ARM and Thumb
835 * ISAs. The Thumb version is an undefined instruction with a
836 * branch back to the undefined instruction.
837 */
838 for (i = 0; i < PAGE_SIZE / sizeof(u32); i++)
839 ((u32 *)vectors_base)[i] = 0xe7fddef1;
840
841 /*
824 * Copy the vectors, stubs and kuser helpers (in entry-armv.S) 842 * Copy the vectors, stubs and kuser helpers (in entry-armv.S)
825 * into the vector page, mapped at 0xffff0000, and ensure these 843 * into the vector page, mapped at 0xffff0000, and ensure these
826 * are visible to the instruction stream. 844 * are visible to the instruction stream.
827 */ 845 */
828 memcpy((void *)vectors, __vectors_start, __vectors_end - __vectors_start); 846 memcpy((void *)vectors, __vectors_start, __vectors_end - __vectors_start);
829 memcpy((void *)vectors + 0x200, __stubs_start, __stubs_end - __stubs_start); 847 memcpy((void *)vectors + 0x1000, __stubs_start, __stubs_end - __stubs_start);
830 memcpy((void *)vectors + 0x1000 - kuser_sz, __kuser_helper_start, kuser_sz);
831 848
832 /* 849 kuser_init(vectors_base);
833 * Do processor specific fixups for the kuser helpers
834 */
835 kuser_get_tls_init(vectors);
836 850
851 flush_icache_range(vectors, vectors + PAGE_SIZE * 2);
852 modify_domain(DOMAIN_USER, DOMAIN_CLIENT);
853#else /* ifndef CONFIG_CPU_V7M */
837 /* 854 /*
838 * Copy signal return handlers into the vector page, and 855 * on V7-M there is no need to copy the vector table to a dedicated
839 * set sigreturn to be a pointer to these. 856 * memory area. The address is configurable and so a table in the kernel
857 * image can be used.
840 */ 858 */
841 memcpy((void *)(vectors + KERN_SIGRETURN_CODE - CONFIG_VECTORS_BASE), 859#endif
842 sigreturn_codes, sizeof(sigreturn_codes));
843
844 flush_icache_range(vectors, vectors + PAGE_SIZE);
845 modify_domain(DOMAIN_USER, DOMAIN_CLIENT);
846} 860}
diff --git a/arch/arm/kernel/vmlinux.lds.S b/arch/arm/kernel/vmlinux.lds.S
index a871b8e00fca..7bcee5c9b604 100644
--- a/arch/arm/kernel/vmlinux.lds.S
+++ b/arch/arm/kernel/vmlinux.lds.S
@@ -70,10 +70,6 @@ SECTIONS
70 ARM_EXIT_DISCARD(EXIT_TEXT) 70 ARM_EXIT_DISCARD(EXIT_TEXT)
71 ARM_EXIT_DISCARD(EXIT_DATA) 71 ARM_EXIT_DISCARD(EXIT_DATA)
72 EXIT_CALL 72 EXIT_CALL
73#ifndef CONFIG_HOTPLUG
74 *(.ARM.exidx.devexit.text)
75 *(.ARM.extab.devexit.text)
76#endif
77#ifndef CONFIG_MMU 73#ifndef CONFIG_MMU
78 *(.fixup) 74 *(.fixup)
79 *(__ex_table) 75 *(__ex_table)
@@ -152,6 +148,23 @@ SECTIONS
152 . = ALIGN(PAGE_SIZE); 148 . = ALIGN(PAGE_SIZE);
153 __init_begin = .; 149 __init_begin = .;
154#endif 150#endif
151 /*
152 * The vectors and stubs are relocatable code, and the
153 * only thing that matters is their relative offsets
154 */
155 __vectors_start = .;
156 .vectors 0 : AT(__vectors_start) {
157 *(.vectors)
158 }
159 . = __vectors_start + SIZEOF(.vectors);
160 __vectors_end = .;
161
162 __stubs_start = .;
163 .stubs 0x1000 : AT(__stubs_start) {
164 *(.stubs)
165 }
166 . = __stubs_start + SIZEOF(.stubs);
167 __stubs_end = .;
155 168
156 INIT_TEXT_SECTION(8) 169 INIT_TEXT_SECTION(8)
157 .exit.text : { 170 .exit.text : {
diff --git a/arch/arm/kvm/Kconfig b/arch/arm/kvm/Kconfig
index 370e1a8af6ac..ebf5015508b5 100644
--- a/arch/arm/kvm/Kconfig
+++ b/arch/arm/kvm/Kconfig
@@ -41,9 +41,9 @@ config KVM_ARM_HOST
41 Provides host support for ARM processors. 41 Provides host support for ARM processors.
42 42
43config KVM_ARM_MAX_VCPUS 43config KVM_ARM_MAX_VCPUS
44 int "Number maximum supported virtual CPUs per VM" if KVM_ARM_HOST 44 int "Number maximum supported virtual CPUs per VM"
45 default 4 if KVM_ARM_HOST 45 depends on KVM_ARM_HOST
46 default 0 46 default 4
47 help 47 help
48 Static number of max supported virtual CPUs per VM. 48 Static number of max supported virtual CPUs per VM.
49 49
@@ -67,6 +67,4 @@ config KVM_ARM_TIMER
67 ---help--- 67 ---help---
68 Adds support for the Architected Timers in virtual machines 68 Adds support for the Architected Timers in virtual machines
69 69
70source drivers/virtio/Kconfig
71
72endif # VIRTUALIZATION 70endif # VIRTUALIZATION
diff --git a/arch/arm/kvm/Makefile b/arch/arm/kvm/Makefile
index 53c5ed83d16f..d99bee4950e5 100644
--- a/arch/arm/kvm/Makefile
+++ b/arch/arm/kvm/Makefile
@@ -14,10 +14,11 @@ CFLAGS_mmu.o := -I.
14AFLAGS_init.o := -Wa,-march=armv7-a$(plus_virt) 14AFLAGS_init.o := -Wa,-march=armv7-a$(plus_virt)
15AFLAGS_interrupts.o := -Wa,-march=armv7-a$(plus_virt) 15AFLAGS_interrupts.o := -Wa,-march=armv7-a$(plus_virt)
16 16
17kvm-arm-y = $(addprefix ../../../virt/kvm/, kvm_main.o coalesced_mmio.o) 17KVM := ../../../virt/kvm
18kvm-arm-y = $(KVM)/kvm_main.o $(KVM)/coalesced_mmio.o
18 19
19obj-y += kvm-arm.o init.o interrupts.o 20obj-y += kvm-arm.o init.o interrupts.o
20obj-y += arm.o handle_exit.o guest.o mmu.o emulate.o reset.o 21obj-y += arm.o handle_exit.o guest.o mmu.o emulate.o reset.o
21obj-y += coproc.o coproc_a15.o mmio.o psci.o perf.o 22obj-y += coproc.o coproc_a15.o mmio.o psci.o perf.o
22obj-$(CONFIG_KVM_ARM_VGIC) += vgic.o 23obj-$(CONFIG_KVM_ARM_VGIC) += $(KVM)/arm/vgic.o
23obj-$(CONFIG_KVM_ARM_TIMER) += arch_timer.o 24obj-$(CONFIG_KVM_ARM_TIMER) += $(KVM)/arm/arch_timer.o
diff --git a/arch/arm/kvm/arch_timer.c b/arch/arm/kvm/arch_timer.c
deleted file mode 100644
index c55b6089e923..000000000000
--- a/arch/arm/kvm/arch_timer.c
+++ /dev/null
@@ -1,272 +0,0 @@
1/*
2 * Copyright (C) 2012 ARM Ltd.
3 * Author: Marc Zyngier <marc.zyngier@arm.com>
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 2 as
7 * published by the Free Software Foundation.
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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 */
18
19#include <linux/cpu.h>
20#include <linux/of_irq.h>
21#include <linux/kvm.h>
22#include <linux/kvm_host.h>
23#include <linux/interrupt.h>
24
25#include <clocksource/arm_arch_timer.h>
26#include <asm/arch_timer.h>
27
28#include <asm/kvm_vgic.h>
29#include <asm/kvm_arch_timer.h>
30
31static struct timecounter *timecounter;
32static struct workqueue_struct *wqueue;
33static struct kvm_irq_level timer_irq = {
34 .level = 1,
35};
36
37static cycle_t kvm_phys_timer_read(void)
38{
39 return timecounter->cc->read(timecounter->cc);
40}
41
42static bool timer_is_armed(struct arch_timer_cpu *timer)
43{
44 return timer->armed;
45}
46
47/* timer_arm: as in "arm the timer", not as in ARM the company */
48static void timer_arm(struct arch_timer_cpu *timer, u64 ns)
49{
50 timer->armed = true;
51 hrtimer_start(&timer->timer, ktime_add_ns(ktime_get(), ns),
52 HRTIMER_MODE_ABS);
53}
54
55static void timer_disarm(struct arch_timer_cpu *timer)
56{
57 if (timer_is_armed(timer)) {
58 hrtimer_cancel(&timer->timer);
59 cancel_work_sync(&timer->expired);
60 timer->armed = false;
61 }
62}
63
64static void kvm_timer_inject_irq(struct kvm_vcpu *vcpu)
65{
66 struct arch_timer_cpu *timer = &vcpu->arch.timer_cpu;
67
68 timer->cntv_ctl |= ARCH_TIMER_CTRL_IT_MASK;
69 kvm_vgic_inject_irq(vcpu->kvm, vcpu->vcpu_id,
70 vcpu->arch.timer_cpu.irq->irq,
71 vcpu->arch.timer_cpu.irq->level);
72}
73
74static irqreturn_t kvm_arch_timer_handler(int irq, void *dev_id)
75{
76 struct kvm_vcpu *vcpu = *(struct kvm_vcpu **)dev_id;
77
78 /*
79 * We disable the timer in the world switch and let it be
80 * handled by kvm_timer_sync_hwstate(). Getting a timer
81 * interrupt at this point is a sure sign of some major
82 * breakage.
83 */
84 pr_warn("Unexpected interrupt %d on vcpu %p\n", irq, vcpu);
85 return IRQ_HANDLED;
86}
87
88static void kvm_timer_inject_irq_work(struct work_struct *work)
89{
90 struct kvm_vcpu *vcpu;
91
92 vcpu = container_of(work, struct kvm_vcpu, arch.timer_cpu.expired);
93 vcpu->arch.timer_cpu.armed = false;
94 kvm_timer_inject_irq(vcpu);
95}
96
97static enum hrtimer_restart kvm_timer_expire(struct hrtimer *hrt)
98{
99 struct arch_timer_cpu *timer;
100 timer = container_of(hrt, struct arch_timer_cpu, timer);
101 queue_work(wqueue, &timer->expired);
102 return HRTIMER_NORESTART;
103}
104
105/**
106 * kvm_timer_flush_hwstate - prepare to move the virt timer to the cpu
107 * @vcpu: The vcpu pointer
108 *
109 * Disarm any pending soft timers, since the world-switch code will write the
110 * virtual timer state back to the physical CPU.
111 */
112void kvm_timer_flush_hwstate(struct kvm_vcpu *vcpu)
113{
114 struct arch_timer_cpu *timer = &vcpu->arch.timer_cpu;
115
116 /*
117 * We're about to run this vcpu again, so there is no need to
118 * keep the background timer running, as we're about to
119 * populate the CPU timer again.
120 */
121 timer_disarm(timer);
122}
123
124/**
125 * kvm_timer_sync_hwstate - sync timer state from cpu
126 * @vcpu: The vcpu pointer
127 *
128 * Check if the virtual timer was armed and either schedule a corresponding
129 * soft timer or inject directly if already expired.
130 */
131void kvm_timer_sync_hwstate(struct kvm_vcpu *vcpu)
132{
133 struct arch_timer_cpu *timer = &vcpu->arch.timer_cpu;
134 cycle_t cval, now;
135 u64 ns;
136
137 if ((timer->cntv_ctl & ARCH_TIMER_CTRL_IT_MASK) ||
138 !(timer->cntv_ctl & ARCH_TIMER_CTRL_ENABLE))
139 return;
140
141 cval = timer->cntv_cval;
142 now = kvm_phys_timer_read() - vcpu->kvm->arch.timer.cntvoff;
143
144 BUG_ON(timer_is_armed(timer));
145
146 if (cval <= now) {
147 /*
148 * Timer has already expired while we were not
149 * looking. Inject the interrupt and carry on.
150 */
151 kvm_timer_inject_irq(vcpu);
152 return;
153 }
154
155 ns = cyclecounter_cyc2ns(timecounter->cc, cval - now);
156 timer_arm(timer, ns);
157}
158
159void kvm_timer_vcpu_init(struct kvm_vcpu *vcpu)
160{
161 struct arch_timer_cpu *timer = &vcpu->arch.timer_cpu;
162
163 INIT_WORK(&timer->expired, kvm_timer_inject_irq_work);
164 hrtimer_init(&timer->timer, CLOCK_MONOTONIC, HRTIMER_MODE_ABS);
165 timer->timer.function = kvm_timer_expire;
166 timer->irq = &timer_irq;
167}
168
169static void kvm_timer_init_interrupt(void *info)
170{
171 enable_percpu_irq(timer_irq.irq, 0);
172}
173
174
175static int kvm_timer_cpu_notify(struct notifier_block *self,
176 unsigned long action, void *cpu)
177{
178 switch (action) {
179 case CPU_STARTING:
180 case CPU_STARTING_FROZEN:
181 kvm_timer_init_interrupt(NULL);
182 break;
183 case CPU_DYING:
184 case CPU_DYING_FROZEN:
185 disable_percpu_irq(timer_irq.irq);
186 break;
187 }
188
189 return NOTIFY_OK;
190}
191
192static struct notifier_block kvm_timer_cpu_nb = {
193 .notifier_call = kvm_timer_cpu_notify,
194};
195
196static const struct of_device_id arch_timer_of_match[] = {
197 { .compatible = "arm,armv7-timer", },
198 {},
199};
200
201int kvm_timer_hyp_init(void)
202{
203 struct device_node *np;
204 unsigned int ppi;
205 int err;
206
207 timecounter = arch_timer_get_timecounter();
208 if (!timecounter)
209 return -ENODEV;
210
211 np = of_find_matching_node(NULL, arch_timer_of_match);
212 if (!np) {
213 kvm_err("kvm_arch_timer: can't find DT node\n");
214 return -ENODEV;
215 }
216
217 ppi = irq_of_parse_and_map(np, 2);
218 if (!ppi) {
219 kvm_err("kvm_arch_timer: no virtual timer interrupt\n");
220 err = -EINVAL;
221 goto out;
222 }
223
224 err = request_percpu_irq(ppi, kvm_arch_timer_handler,
225 "kvm guest timer", kvm_get_running_vcpus());
226 if (err) {
227 kvm_err("kvm_arch_timer: can't request interrupt %d (%d)\n",
228 ppi, err);
229 goto out;
230 }
231
232 timer_irq.irq = ppi;
233
234 err = register_cpu_notifier(&kvm_timer_cpu_nb);
235 if (err) {
236 kvm_err("Cannot register timer CPU notifier\n");
237 goto out_free;
238 }
239
240 wqueue = create_singlethread_workqueue("kvm_arch_timer");
241 if (!wqueue) {
242 err = -ENOMEM;
243 goto out_free;
244 }
245
246 kvm_info("%s IRQ%d\n", np->name, ppi);
247 on_each_cpu(kvm_timer_init_interrupt, NULL, 1);
248
249 goto out;
250out_free:
251 free_percpu_irq(ppi, kvm_get_running_vcpus());
252out:
253 of_node_put(np);
254 return err;
255}
256
257void kvm_timer_vcpu_terminate(struct kvm_vcpu *vcpu)
258{
259 struct arch_timer_cpu *timer = &vcpu->arch.timer_cpu;
260
261 timer_disarm(timer);
262}
263
264int kvm_timer_init(struct kvm *kvm)
265{
266 if (timecounter && wqueue) {
267 kvm->arch.timer.cntvoff = kvm_phys_timer_read();
268 kvm->arch.timer.enabled = 1;
269 }
270
271 return 0;
272}
diff --git a/arch/arm/kvm/arm.c b/arch/arm/kvm/arm.c
index ef1703b9587b..741f66a2edbd 100644
--- a/arch/arm/kvm/arm.c
+++ b/arch/arm/kvm/arm.c
@@ -800,8 +800,8 @@ long kvm_arch_vm_ioctl(struct file *filp,
800 800
801static void cpu_init_hyp_mode(void *dummy) 801static void cpu_init_hyp_mode(void *dummy)
802{ 802{
803 unsigned long long boot_pgd_ptr; 803 phys_addr_t boot_pgd_ptr;
804 unsigned long long pgd_ptr; 804 phys_addr_t pgd_ptr;
805 unsigned long hyp_stack_ptr; 805 unsigned long hyp_stack_ptr;
806 unsigned long stack_page; 806 unsigned long stack_page;
807 unsigned long vector_ptr; 807 unsigned long vector_ptr;
@@ -809,8 +809,8 @@ static void cpu_init_hyp_mode(void *dummy)
809 /* Switch from the HYP stub to our own HYP init vector */ 809 /* Switch from the HYP stub to our own HYP init vector */
810 __hyp_set_vectors(kvm_get_idmap_vector()); 810 __hyp_set_vectors(kvm_get_idmap_vector());
811 811
812 boot_pgd_ptr = (unsigned long long)kvm_mmu_get_boot_httbr(); 812 boot_pgd_ptr = kvm_mmu_get_boot_httbr();
813 pgd_ptr = (unsigned long long)kvm_mmu_get_httbr(); 813 pgd_ptr = kvm_mmu_get_httbr();
814 stack_page = __get_cpu_var(kvm_arm_hyp_stack_page); 814 stack_page = __get_cpu_var(kvm_arm_hyp_stack_page);
815 hyp_stack_ptr = stack_page + PAGE_SIZE; 815 hyp_stack_ptr = stack_page + PAGE_SIZE;
816 vector_ptr = (unsigned long)__kvm_hyp_vector; 816 vector_ptr = (unsigned long)__kvm_hyp_vector;
diff --git a/arch/arm/kvm/coproc.c b/arch/arm/kvm/coproc.c
index 8eea97be1ed5..4a5199070430 100644
--- a/arch/arm/kvm/coproc.c
+++ b/arch/arm/kvm/coproc.c
@@ -180,6 +180,10 @@ static const struct coproc_reg cp15_regs[] = {
180 NULL, reset_unknown, c6_DFAR }, 180 NULL, reset_unknown, c6_DFAR },
181 { CRn( 6), CRm( 0), Op1( 0), Op2( 2), is32, 181 { CRn( 6), CRm( 0), Op1( 0), Op2( 2), is32,
182 NULL, reset_unknown, c6_IFAR }, 182 NULL, reset_unknown, c6_IFAR },
183
184 /* PAR swapped by interrupt.S */
185 { CRn( 7), Op1( 0), is64, NULL, reset_unknown64, c7_PAR },
186
183 /* 187 /*
184 * DC{C,I,CI}SW operations: 188 * DC{C,I,CI}SW operations:
185 */ 189 */
diff --git a/arch/arm/kvm/handle_exit.c b/arch/arm/kvm/handle_exit.c
index 3d74a0be47db..df4c82d47ad7 100644
--- a/arch/arm/kvm/handle_exit.c
+++ b/arch/arm/kvm/handle_exit.c
@@ -52,9 +52,6 @@ static int handle_hvc(struct kvm_vcpu *vcpu, struct kvm_run *run)
52 52
53static int handle_smc(struct kvm_vcpu *vcpu, struct kvm_run *run) 53static int handle_smc(struct kvm_vcpu *vcpu, struct kvm_run *run)
54{ 54{
55 if (kvm_psci_call(vcpu))
56 return 1;
57
58 kvm_inject_undefined(vcpu); 55 kvm_inject_undefined(vcpu);
59 return 1; 56 return 1;
60} 57}
diff --git a/arch/arm/kvm/interrupts.S b/arch/arm/kvm/interrupts.S
index f7793df62f58..16cd4ba5d7fd 100644
--- a/arch/arm/kvm/interrupts.S
+++ b/arch/arm/kvm/interrupts.S
@@ -49,6 +49,7 @@ __kvm_hyp_code_start:
49ENTRY(__kvm_tlb_flush_vmid_ipa) 49ENTRY(__kvm_tlb_flush_vmid_ipa)
50 push {r2, r3} 50 push {r2, r3}
51 51
52 dsb ishst
52 add r0, r0, #KVM_VTTBR 53 add r0, r0, #KVM_VTTBR
53 ldrd r2, r3, [r0] 54 ldrd r2, r3, [r0]
54 mcrr p15, 6, r2, r3, c2 @ Write VTTBR 55 mcrr p15, 6, r2, r3, c2 @ Write VTTBR
@@ -291,6 +292,7 @@ THUMB( orr r2, r2, #PSR_T_BIT )
291 ldr r2, =BSYM(panic) 292 ldr r2, =BSYM(panic)
292 msr ELR_hyp, r2 293 msr ELR_hyp, r2
293 ldr r0, =\panic_str 294 ldr r0, =\panic_str
295 clrex @ Clear exclusive monitor
294 eret 296 eret
295.endm 297.endm
296 298
@@ -414,6 +416,10 @@ guest_trap:
414 mrcne p15, 4, r2, c6, c0, 4 @ HPFAR 416 mrcne p15, 4, r2, c6, c0, 4 @ HPFAR
415 bne 3f 417 bne 3f
416 418
419 /* Preserve PAR */
420 mrrc p15, 0, r0, r1, c7 @ PAR
421 push {r0, r1}
422
417 /* Resolve IPA using the xFAR */ 423 /* Resolve IPA using the xFAR */
418 mcr p15, 0, r2, c7, c8, 0 @ ATS1CPR 424 mcr p15, 0, r2, c7, c8, 0 @ ATS1CPR
419 isb 425 isb
@@ -424,13 +430,20 @@ guest_trap:
424 lsl r2, r2, #4 430 lsl r2, r2, #4
425 orr r2, r2, r1, lsl #24 431 orr r2, r2, r1, lsl #24
426 432
433 /* Restore PAR */
434 pop {r0, r1}
435 mcrr p15, 0, r0, r1, c7 @ PAR
436
4273: load_vcpu @ Load VCPU pointer to r0 4373: load_vcpu @ Load VCPU pointer to r0
428 str r2, [r0, #VCPU_HPFAR] 438 str r2, [r0, #VCPU_HPFAR]
429 439
4301: mov r1, #ARM_EXCEPTION_HVC 4401: mov r1, #ARM_EXCEPTION_HVC
431 b __kvm_vcpu_return 441 b __kvm_vcpu_return
432 442
4334: pop {r0, r1, r2} @ Failed translation, return to guest 4434: pop {r0, r1} @ Failed translation, return to guest
444 mcrr p15, 0, r0, r1, c7 @ PAR
445 clrex
446 pop {r0, r1, r2}
434 eret 447 eret
435 448
436/* 449/*
@@ -456,6 +469,7 @@ switch_to_guest_vfp:
456 469
457 pop {r3-r7} 470 pop {r3-r7}
458 pop {r0-r2} 471 pop {r0-r2}
472 clrex
459 eret 473 eret
460#endif 474#endif
461 475
diff --git a/arch/arm/kvm/interrupts_head.S b/arch/arm/kvm/interrupts_head.S
index 3c8f2f0b4c5e..6f18695a09cb 100644
--- a/arch/arm/kvm/interrupts_head.S
+++ b/arch/arm/kvm/interrupts_head.S
@@ -302,11 +302,14 @@ vcpu .req r0 @ vcpu pointer always in r0
302 .endif 302 .endif
303 303
304 mrc p15, 0, r2, c14, c1, 0 @ CNTKCTL 304 mrc p15, 0, r2, c14, c1, 0 @ CNTKCTL
305 mrrc p15, 0, r4, r5, c7 @ PAR
305 306
306 .if \store_to_vcpu == 0 307 .if \store_to_vcpu == 0
307 push {r2} 308 push {r2,r4-r5}
308 .else 309 .else
309 str r2, [vcpu, #CP15_OFFSET(c14_CNTKCTL)] 310 str r2, [vcpu, #CP15_OFFSET(c14_CNTKCTL)]
311 add r12, vcpu, #CP15_OFFSET(c7_PAR)
312 strd r4, r5, [r12]
310 .endif 313 .endif
311.endm 314.endm
312 315
@@ -319,12 +322,15 @@ vcpu .req r0 @ vcpu pointer always in r0
319 */ 322 */
320.macro write_cp15_state read_from_vcpu 323.macro write_cp15_state read_from_vcpu
321 .if \read_from_vcpu == 0 324 .if \read_from_vcpu == 0
322 pop {r2} 325 pop {r2,r4-r5}
323 .else 326 .else
324 ldr r2, [vcpu, #CP15_OFFSET(c14_CNTKCTL)] 327 ldr r2, [vcpu, #CP15_OFFSET(c14_CNTKCTL)]
328 add r12, vcpu, #CP15_OFFSET(c7_PAR)
329 ldrd r4, r5, [r12]
325 .endif 330 .endif
326 331
327 mcr p15, 0, r2, c14, c1, 0 @ CNTKCTL 332 mcr p15, 0, r2, c14, c1, 0 @ CNTKCTL
333 mcrr p15, 0, r4, r5, c7 @ PAR
328 334
329 .if \read_from_vcpu == 0 335 .if \read_from_vcpu == 0
330 pop {r2-r12} 336 pop {r2-r12}
@@ -497,6 +503,10 @@ vcpu .req r0 @ vcpu pointer always in r0
497 add r5, vcpu, r4 503 add r5, vcpu, r4
498 strd r2, r3, [r5] 504 strd r2, r3, [r5]
499 505
506 @ Ensure host CNTVCT == CNTPCT
507 mov r2, #0
508 mcrr p15, 4, r2, r2, c14 @ CNTVOFF
509
5001: 5101:
501#endif 511#endif
502 @ Allow physical timer/counter access for the host 512 @ Allow physical timer/counter access for the host
diff --git a/arch/arm/kvm/mmio.c b/arch/arm/kvm/mmio.c
index 72a12f2171b2..b8e06b7a2833 100644
--- a/arch/arm/kvm/mmio.c
+++ b/arch/arm/kvm/mmio.c
@@ -86,12 +86,6 @@ static int decode_hsr(struct kvm_vcpu *vcpu, phys_addr_t fault_ipa,
86 sign_extend = kvm_vcpu_dabt_issext(vcpu); 86 sign_extend = kvm_vcpu_dabt_issext(vcpu);
87 rt = kvm_vcpu_dabt_get_rd(vcpu); 87 rt = kvm_vcpu_dabt_get_rd(vcpu);
88 88
89 if (kvm_vcpu_reg_is_pc(vcpu, rt)) {
90 /* IO memory trying to read/write pc */
91 kvm_inject_pabt(vcpu, kvm_vcpu_get_hfar(vcpu));
92 return 1;
93 }
94
95 mmio->is_write = is_write; 89 mmio->is_write = is_write;
96 mmio->phys_addr = fault_ipa; 90 mmio->phys_addr = fault_ipa;
97 mmio->len = len; 91 mmio->len = len;
diff --git a/arch/arm/kvm/mmu.c b/arch/arm/kvm/mmu.c
index 84ba67b982c0..ca6bea4859b4 100644
--- a/arch/arm/kvm/mmu.c
+++ b/arch/arm/kvm/mmu.c
@@ -382,9 +382,6 @@ int kvm_alloc_stage2_pgd(struct kvm *kvm)
382 if (!pgd) 382 if (!pgd)
383 return -ENOMEM; 383 return -ENOMEM;
384 384
385 /* stage-2 pgd must be aligned to its size */
386 VM_BUG_ON((unsigned long)pgd & (S2_PGD_SIZE - 1));
387
388 memset(pgd, 0, PTRS_PER_S2_PGD * sizeof(pgd_t)); 385 memset(pgd, 0, PTRS_PER_S2_PGD * sizeof(pgd_t));
389 kvm_clean_pgd(pgd); 386 kvm_clean_pgd(pgd);
390 kvm->arch.pgd = pgd; 387 kvm->arch.pgd = pgd;
diff --git a/arch/arm/kvm/psci.c b/arch/arm/kvm/psci.c
index 7ee5bb7a3667..86a693a02ba3 100644
--- a/arch/arm/kvm/psci.c
+++ b/arch/arm/kvm/psci.c
@@ -75,7 +75,7 @@ static unsigned long kvm_psci_vcpu_on(struct kvm_vcpu *source_vcpu)
75 * kvm_psci_call - handle PSCI call if r0 value is in range 75 * kvm_psci_call - handle PSCI call if r0 value is in range
76 * @vcpu: Pointer to the VCPU struct 76 * @vcpu: Pointer to the VCPU struct
77 * 77 *
78 * Handle PSCI calls from guests through traps from HVC or SMC instructions. 78 * Handle PSCI calls from guests through traps from HVC instructions.
79 * The calling convention is similar to SMC calls to the secure world where 79 * The calling convention is similar to SMC calls to the secure world where
80 * the function number is placed in r0 and this function returns true if the 80 * the function number is placed in r0 and this function returns true if the
81 * function number specified in r0 is withing the PSCI range, and false 81 * function number specified in r0 is withing the PSCI range, and false
diff --git a/arch/arm/kvm/reset.c b/arch/arm/kvm/reset.c
index b80256b554cd..b7840e7aa452 100644
--- a/arch/arm/kvm/reset.c
+++ b/arch/arm/kvm/reset.c
@@ -27,6 +27,8 @@
27#include <asm/kvm_arm.h> 27#include <asm/kvm_arm.h>
28#include <asm/kvm_coproc.h> 28#include <asm/kvm_coproc.h>
29 29
30#include <kvm/arm_arch_timer.h>
31
30/****************************************************************************** 32/******************************************************************************
31 * Cortex-A15 Reset Values 33 * Cortex-A15 Reset Values
32 */ 34 */
@@ -37,6 +39,11 @@ static struct kvm_regs a15_regs_reset = {
37 .usr_regs.ARM_cpsr = SVC_MODE | PSR_A_BIT | PSR_I_BIT | PSR_F_BIT, 39 .usr_regs.ARM_cpsr = SVC_MODE | PSR_A_BIT | PSR_I_BIT | PSR_F_BIT,
38}; 40};
39 41
42static const struct kvm_irq_level a15_vtimer_irq = {
43 .irq = 27,
44 .level = 1,
45};
46
40 47
41/******************************************************************************* 48/*******************************************************************************
42 * Exported reset function 49 * Exported reset function
@@ -52,6 +59,7 @@ static struct kvm_regs a15_regs_reset = {
52int kvm_reset_vcpu(struct kvm_vcpu *vcpu) 59int kvm_reset_vcpu(struct kvm_vcpu *vcpu)
53{ 60{
54 struct kvm_regs *cpu_reset; 61 struct kvm_regs *cpu_reset;
62 const struct kvm_irq_level *cpu_vtimer_irq;
55 63
56 switch (vcpu->arch.target) { 64 switch (vcpu->arch.target) {
57 case KVM_ARM_TARGET_CORTEX_A15: 65 case KVM_ARM_TARGET_CORTEX_A15:
@@ -59,6 +67,7 @@ int kvm_reset_vcpu(struct kvm_vcpu *vcpu)
59 return -EINVAL; 67 return -EINVAL;
60 cpu_reset = &a15_regs_reset; 68 cpu_reset = &a15_regs_reset;
61 vcpu->arch.midr = read_cpuid_id(); 69 vcpu->arch.midr = read_cpuid_id();
70 cpu_vtimer_irq = &a15_vtimer_irq;
62 break; 71 break;
63 default: 72 default:
64 return -ENODEV; 73 return -ENODEV;
@@ -70,5 +79,8 @@ int kvm_reset_vcpu(struct kvm_vcpu *vcpu)
70 /* Reset CP15 registers */ 79 /* Reset CP15 registers */
71 kvm_reset_coprocs(vcpu); 80 kvm_reset_coprocs(vcpu);
72 81
82 /* Reset arch_timer context */
83 kvm_timer_vcpu_reset(vcpu, cpu_vtimer_irq);
84
73 return 0; 85 return 0;
74} 86}
diff --git a/arch/arm/kvm/vgic.c b/arch/arm/kvm/vgic.c
deleted file mode 100644
index 17c5ac7d10ed..000000000000
--- a/arch/arm/kvm/vgic.c
+++ /dev/null
@@ -1,1499 +0,0 @@
1/*
2 * Copyright (C) 2012 ARM Ltd.
3 * Author: Marc Zyngier <marc.zyngier@arm.com>
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 2 as
7 * published by the Free Software Foundation.
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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 */
18
19#include <linux/cpu.h>
20#include <linux/kvm.h>
21#include <linux/kvm_host.h>
22#include <linux/interrupt.h>
23#include <linux/io.h>
24#include <linux/of.h>
25#include <linux/of_address.h>
26#include <linux/of_irq.h>
27
28#include <linux/irqchip/arm-gic.h>
29
30#include <asm/kvm_emulate.h>
31#include <asm/kvm_arm.h>
32#include <asm/kvm_mmu.h>
33
34/*
35 * How the whole thing works (courtesy of Christoffer Dall):
36 *
37 * - At any time, the dist->irq_pending_on_cpu is the oracle that knows if
38 * something is pending
39 * - VGIC pending interrupts are stored on the vgic.irq_state vgic
40 * bitmap (this bitmap is updated by both user land ioctls and guest
41 * mmio ops, and other in-kernel peripherals such as the
42 * arch. timers) and indicate the 'wire' state.
43 * - Every time the bitmap changes, the irq_pending_on_cpu oracle is
44 * recalculated
45 * - To calculate the oracle, we need info for each cpu from
46 * compute_pending_for_cpu, which considers:
47 * - PPI: dist->irq_state & dist->irq_enable
48 * - SPI: dist->irq_state & dist->irq_enable & dist->irq_spi_target
49 * - irq_spi_target is a 'formatted' version of the GICD_ICFGR
50 * registers, stored on each vcpu. We only keep one bit of
51 * information per interrupt, making sure that only one vcpu can
52 * accept the interrupt.
53 * - The same is true when injecting an interrupt, except that we only
54 * consider a single interrupt at a time. The irq_spi_cpu array
55 * contains the target CPU for each SPI.
56 *
57 * The handling of level interrupts adds some extra complexity. We
58 * need to track when the interrupt has been EOIed, so we can sample
59 * the 'line' again. This is achieved as such:
60 *
61 * - When a level interrupt is moved onto a vcpu, the corresponding
62 * bit in irq_active is set. As long as this bit is set, the line
63 * will be ignored for further interrupts. The interrupt is injected
64 * into the vcpu with the GICH_LR_EOI bit set (generate a
65 * maintenance interrupt on EOI).
66 * - When the interrupt is EOIed, the maintenance interrupt fires,
67 * and clears the corresponding bit in irq_active. This allow the
68 * interrupt line to be sampled again.
69 */
70
71#define VGIC_ADDR_UNDEF (-1)
72#define IS_VGIC_ADDR_UNDEF(_x) ((_x) == VGIC_ADDR_UNDEF)
73
74/* Physical address of vgic virtual cpu interface */
75static phys_addr_t vgic_vcpu_base;
76
77/* Virtual control interface base address */
78static void __iomem *vgic_vctrl_base;
79
80static struct device_node *vgic_node;
81
82#define ACCESS_READ_VALUE (1 << 0)
83#define ACCESS_READ_RAZ (0 << 0)
84#define ACCESS_READ_MASK(x) ((x) & (1 << 0))
85#define ACCESS_WRITE_IGNORED (0 << 1)
86#define ACCESS_WRITE_SETBIT (1 << 1)
87#define ACCESS_WRITE_CLEARBIT (2 << 1)
88#define ACCESS_WRITE_VALUE (3 << 1)
89#define ACCESS_WRITE_MASK(x) ((x) & (3 << 1))
90
91static void vgic_retire_disabled_irqs(struct kvm_vcpu *vcpu);
92static void vgic_update_state(struct kvm *kvm);
93static void vgic_kick_vcpus(struct kvm *kvm);
94static void vgic_dispatch_sgi(struct kvm_vcpu *vcpu, u32 reg);
95static u32 vgic_nr_lr;
96
97static unsigned int vgic_maint_irq;
98
99static u32 *vgic_bitmap_get_reg(struct vgic_bitmap *x,
100 int cpuid, u32 offset)
101{
102 offset >>= 2;
103 if (!offset)
104 return x->percpu[cpuid].reg;
105 else
106 return x->shared.reg + offset - 1;
107}
108
109static int vgic_bitmap_get_irq_val(struct vgic_bitmap *x,
110 int cpuid, int irq)
111{
112 if (irq < VGIC_NR_PRIVATE_IRQS)
113 return test_bit(irq, x->percpu[cpuid].reg_ul);
114
115 return test_bit(irq - VGIC_NR_PRIVATE_IRQS, x->shared.reg_ul);
116}
117
118static void vgic_bitmap_set_irq_val(struct vgic_bitmap *x, int cpuid,
119 int irq, int val)
120{
121 unsigned long *reg;
122
123 if (irq < VGIC_NR_PRIVATE_IRQS) {
124 reg = x->percpu[cpuid].reg_ul;
125 } else {
126 reg = x->shared.reg_ul;
127 irq -= VGIC_NR_PRIVATE_IRQS;
128 }
129
130 if (val)
131 set_bit(irq, reg);
132 else
133 clear_bit(irq, reg);
134}
135
136static unsigned long *vgic_bitmap_get_cpu_map(struct vgic_bitmap *x, int cpuid)
137{
138 if (unlikely(cpuid >= VGIC_MAX_CPUS))
139 return NULL;
140 return x->percpu[cpuid].reg_ul;
141}
142
143static unsigned long *vgic_bitmap_get_shared_map(struct vgic_bitmap *x)
144{
145 return x->shared.reg_ul;
146}
147
148static u32 *vgic_bytemap_get_reg(struct vgic_bytemap *x, int cpuid, u32 offset)
149{
150 offset >>= 2;
151 BUG_ON(offset > (VGIC_NR_IRQS / 4));
152 if (offset < 4)
153 return x->percpu[cpuid] + offset;
154 else
155 return x->shared + offset - 8;
156}
157
158#define VGIC_CFG_LEVEL 0
159#define VGIC_CFG_EDGE 1
160
161static bool vgic_irq_is_edge(struct kvm_vcpu *vcpu, int irq)
162{
163 struct vgic_dist *dist = &vcpu->kvm->arch.vgic;
164 int irq_val;
165
166 irq_val = vgic_bitmap_get_irq_val(&dist->irq_cfg, vcpu->vcpu_id, irq);
167 return irq_val == VGIC_CFG_EDGE;
168}
169
170static int vgic_irq_is_enabled(struct kvm_vcpu *vcpu, int irq)
171{
172 struct vgic_dist *dist = &vcpu->kvm->arch.vgic;
173
174 return vgic_bitmap_get_irq_val(&dist->irq_enabled, vcpu->vcpu_id, irq);
175}
176
177static int vgic_irq_is_active(struct kvm_vcpu *vcpu, int irq)
178{
179 struct vgic_dist *dist = &vcpu->kvm->arch.vgic;
180
181 return vgic_bitmap_get_irq_val(&dist->irq_active, vcpu->vcpu_id, irq);
182}
183
184static void vgic_irq_set_active(struct kvm_vcpu *vcpu, int irq)
185{
186 struct vgic_dist *dist = &vcpu->kvm->arch.vgic;
187
188 vgic_bitmap_set_irq_val(&dist->irq_active, vcpu->vcpu_id, irq, 1);
189}
190
191static void vgic_irq_clear_active(struct kvm_vcpu *vcpu, int irq)
192{
193 struct vgic_dist *dist = &vcpu->kvm->arch.vgic;
194
195 vgic_bitmap_set_irq_val(&dist->irq_active, vcpu->vcpu_id, irq, 0);
196}
197
198static int vgic_dist_irq_is_pending(struct kvm_vcpu *vcpu, int irq)
199{
200 struct vgic_dist *dist = &vcpu->kvm->arch.vgic;
201
202 return vgic_bitmap_get_irq_val(&dist->irq_state, vcpu->vcpu_id, irq);
203}
204
205static void vgic_dist_irq_set(struct kvm_vcpu *vcpu, int irq)
206{
207 struct vgic_dist *dist = &vcpu->kvm->arch.vgic;
208
209 vgic_bitmap_set_irq_val(&dist->irq_state, vcpu->vcpu_id, irq, 1);
210}
211
212static void vgic_dist_irq_clear(struct kvm_vcpu *vcpu, int irq)
213{
214 struct vgic_dist *dist = &vcpu->kvm->arch.vgic;
215
216 vgic_bitmap_set_irq_val(&dist->irq_state, vcpu->vcpu_id, irq, 0);
217}
218
219static void vgic_cpu_irq_set(struct kvm_vcpu *vcpu, int irq)
220{
221 if (irq < VGIC_NR_PRIVATE_IRQS)
222 set_bit(irq, vcpu->arch.vgic_cpu.pending_percpu);
223 else
224 set_bit(irq - VGIC_NR_PRIVATE_IRQS,
225 vcpu->arch.vgic_cpu.pending_shared);
226}
227
228static void vgic_cpu_irq_clear(struct kvm_vcpu *vcpu, int irq)
229{
230 if (irq < VGIC_NR_PRIVATE_IRQS)
231 clear_bit(irq, vcpu->arch.vgic_cpu.pending_percpu);
232 else
233 clear_bit(irq - VGIC_NR_PRIVATE_IRQS,
234 vcpu->arch.vgic_cpu.pending_shared);
235}
236
237static u32 mmio_data_read(struct kvm_exit_mmio *mmio, u32 mask)
238{
239 return *((u32 *)mmio->data) & mask;
240}
241
242static void mmio_data_write(struct kvm_exit_mmio *mmio, u32 mask, u32 value)
243{
244 *((u32 *)mmio->data) = value & mask;
245}
246
247/**
248 * vgic_reg_access - access vgic register
249 * @mmio: pointer to the data describing the mmio access
250 * @reg: pointer to the virtual backing of vgic distributor data
251 * @offset: least significant 2 bits used for word offset
252 * @mode: ACCESS_ mode (see defines above)
253 *
254 * Helper to make vgic register access easier using one of the access
255 * modes defined for vgic register access
256 * (read,raz,write-ignored,setbit,clearbit,write)
257 */
258static void vgic_reg_access(struct kvm_exit_mmio *mmio, u32 *reg,
259 phys_addr_t offset, int mode)
260{
261 int word_offset = (offset & 3) * 8;
262 u32 mask = (1UL << (mmio->len * 8)) - 1;
263 u32 regval;
264
265 /*
266 * Any alignment fault should have been delivered to the guest
267 * directly (ARM ARM B3.12.7 "Prioritization of aborts").
268 */
269
270 if (reg) {
271 regval = *reg;
272 } else {
273 BUG_ON(mode != (ACCESS_READ_RAZ | ACCESS_WRITE_IGNORED));
274 regval = 0;
275 }
276
277 if (mmio->is_write) {
278 u32 data = mmio_data_read(mmio, mask) << word_offset;
279 switch (ACCESS_WRITE_MASK(mode)) {
280 case ACCESS_WRITE_IGNORED:
281 return;
282
283 case ACCESS_WRITE_SETBIT:
284 regval |= data;
285 break;
286
287 case ACCESS_WRITE_CLEARBIT:
288 regval &= ~data;
289 break;
290
291 case ACCESS_WRITE_VALUE:
292 regval = (regval & ~(mask << word_offset)) | data;
293 break;
294 }
295 *reg = regval;
296 } else {
297 switch (ACCESS_READ_MASK(mode)) {
298 case ACCESS_READ_RAZ:
299 regval = 0;
300 /* fall through */
301
302 case ACCESS_READ_VALUE:
303 mmio_data_write(mmio, mask, regval >> word_offset);
304 }
305 }
306}
307
308static bool handle_mmio_misc(struct kvm_vcpu *vcpu,
309 struct kvm_exit_mmio *mmio, phys_addr_t offset)
310{
311 u32 reg;
312 u32 word_offset = offset & 3;
313
314 switch (offset & ~3) {
315 case 0: /* CTLR */
316 reg = vcpu->kvm->arch.vgic.enabled;
317 vgic_reg_access(mmio, &reg, word_offset,
318 ACCESS_READ_VALUE | ACCESS_WRITE_VALUE);
319 if (mmio->is_write) {
320 vcpu->kvm->arch.vgic.enabled = reg & 1;
321 vgic_update_state(vcpu->kvm);
322 return true;
323 }
324 break;
325
326 case 4: /* TYPER */
327 reg = (atomic_read(&vcpu->kvm->online_vcpus) - 1) << 5;
328 reg |= (VGIC_NR_IRQS >> 5) - 1;
329 vgic_reg_access(mmio, &reg, word_offset,
330 ACCESS_READ_VALUE | ACCESS_WRITE_IGNORED);
331 break;
332
333 case 8: /* IIDR */
334 reg = 0x4B00043B;
335 vgic_reg_access(mmio, &reg, word_offset,
336 ACCESS_READ_VALUE | ACCESS_WRITE_IGNORED);
337 break;
338 }
339
340 return false;
341}
342
343static bool handle_mmio_raz_wi(struct kvm_vcpu *vcpu,
344 struct kvm_exit_mmio *mmio, phys_addr_t offset)
345{
346 vgic_reg_access(mmio, NULL, offset,
347 ACCESS_READ_RAZ | ACCESS_WRITE_IGNORED);
348 return false;
349}
350
351static bool handle_mmio_set_enable_reg(struct kvm_vcpu *vcpu,
352 struct kvm_exit_mmio *mmio,
353 phys_addr_t offset)
354{
355 u32 *reg = vgic_bitmap_get_reg(&vcpu->kvm->arch.vgic.irq_enabled,
356 vcpu->vcpu_id, offset);
357 vgic_reg_access(mmio, reg, offset,
358 ACCESS_READ_VALUE | ACCESS_WRITE_SETBIT);
359 if (mmio->is_write) {
360 vgic_update_state(vcpu->kvm);
361 return true;
362 }
363
364 return false;
365}
366
367static bool handle_mmio_clear_enable_reg(struct kvm_vcpu *vcpu,
368 struct kvm_exit_mmio *mmio,
369 phys_addr_t offset)
370{
371 u32 *reg = vgic_bitmap_get_reg(&vcpu->kvm->arch.vgic.irq_enabled,
372 vcpu->vcpu_id, offset);
373 vgic_reg_access(mmio, reg, offset,
374 ACCESS_READ_VALUE | ACCESS_WRITE_CLEARBIT);
375 if (mmio->is_write) {
376 if (offset < 4) /* Force SGI enabled */
377 *reg |= 0xffff;
378 vgic_retire_disabled_irqs(vcpu);
379 vgic_update_state(vcpu->kvm);
380 return true;
381 }
382
383 return false;
384}
385
386static bool handle_mmio_set_pending_reg(struct kvm_vcpu *vcpu,
387 struct kvm_exit_mmio *mmio,
388 phys_addr_t offset)
389{
390 u32 *reg = vgic_bitmap_get_reg(&vcpu->kvm->arch.vgic.irq_state,
391 vcpu->vcpu_id, offset);
392 vgic_reg_access(mmio, reg, offset,
393 ACCESS_READ_VALUE | ACCESS_WRITE_SETBIT);
394 if (mmio->is_write) {
395 vgic_update_state(vcpu->kvm);
396 return true;
397 }
398
399 return false;
400}
401
402static bool handle_mmio_clear_pending_reg(struct kvm_vcpu *vcpu,
403 struct kvm_exit_mmio *mmio,
404 phys_addr_t offset)
405{
406 u32 *reg = vgic_bitmap_get_reg(&vcpu->kvm->arch.vgic.irq_state,
407 vcpu->vcpu_id, offset);
408 vgic_reg_access(mmio, reg, offset,
409 ACCESS_READ_VALUE | ACCESS_WRITE_CLEARBIT);
410 if (mmio->is_write) {
411 vgic_update_state(vcpu->kvm);
412 return true;
413 }
414
415 return false;
416}
417
418static bool handle_mmio_priority_reg(struct kvm_vcpu *vcpu,
419 struct kvm_exit_mmio *mmio,
420 phys_addr_t offset)
421{
422 u32 *reg = vgic_bytemap_get_reg(&vcpu->kvm->arch.vgic.irq_priority,
423 vcpu->vcpu_id, offset);
424 vgic_reg_access(mmio, reg, offset,
425 ACCESS_READ_VALUE | ACCESS_WRITE_VALUE);
426 return false;
427}
428
429#define GICD_ITARGETSR_SIZE 32
430#define GICD_CPUTARGETS_BITS 8
431#define GICD_IRQS_PER_ITARGETSR (GICD_ITARGETSR_SIZE / GICD_CPUTARGETS_BITS)
432static u32 vgic_get_target_reg(struct kvm *kvm, int irq)
433{
434 struct vgic_dist *dist = &kvm->arch.vgic;
435 struct kvm_vcpu *vcpu;
436 int i, c;
437 unsigned long *bmap;
438 u32 val = 0;
439
440 irq -= VGIC_NR_PRIVATE_IRQS;
441
442 kvm_for_each_vcpu(c, vcpu, kvm) {
443 bmap = vgic_bitmap_get_shared_map(&dist->irq_spi_target[c]);
444 for (i = 0; i < GICD_IRQS_PER_ITARGETSR; i++)
445 if (test_bit(irq + i, bmap))
446 val |= 1 << (c + i * 8);
447 }
448
449 return val;
450}
451
452static void vgic_set_target_reg(struct kvm *kvm, u32 val, int irq)
453{
454 struct vgic_dist *dist = &kvm->arch.vgic;
455 struct kvm_vcpu *vcpu;
456 int i, c;
457 unsigned long *bmap;
458 u32 target;
459
460 irq -= VGIC_NR_PRIVATE_IRQS;
461
462 /*
463 * Pick the LSB in each byte. This ensures we target exactly
464 * one vcpu per IRQ. If the byte is null, assume we target
465 * CPU0.
466 */
467 for (i = 0; i < GICD_IRQS_PER_ITARGETSR; i++) {
468 int shift = i * GICD_CPUTARGETS_BITS;
469 target = ffs((val >> shift) & 0xffU);
470 target = target ? (target - 1) : 0;
471 dist->irq_spi_cpu[irq + i] = target;
472 kvm_for_each_vcpu(c, vcpu, kvm) {
473 bmap = vgic_bitmap_get_shared_map(&dist->irq_spi_target[c]);
474 if (c == target)
475 set_bit(irq + i, bmap);
476 else
477 clear_bit(irq + i, bmap);
478 }
479 }
480}
481
482static bool handle_mmio_target_reg(struct kvm_vcpu *vcpu,
483 struct kvm_exit_mmio *mmio,
484 phys_addr_t offset)
485{
486 u32 reg;
487
488 /* We treat the banked interrupts targets as read-only */
489 if (offset < 32) {
490 u32 roreg = 1 << vcpu->vcpu_id;
491 roreg |= roreg << 8;
492 roreg |= roreg << 16;
493
494 vgic_reg_access(mmio, &roreg, offset,
495 ACCESS_READ_VALUE | ACCESS_WRITE_IGNORED);
496 return false;
497 }
498
499 reg = vgic_get_target_reg(vcpu->kvm, offset & ~3U);
500 vgic_reg_access(mmio, &reg, offset,
501 ACCESS_READ_VALUE | ACCESS_WRITE_VALUE);
502 if (mmio->is_write) {
503 vgic_set_target_reg(vcpu->kvm, reg, offset & ~3U);
504 vgic_update_state(vcpu->kvm);
505 return true;
506 }
507
508 return false;
509}
510
511static u32 vgic_cfg_expand(u16 val)
512{
513 u32 res = 0;
514 int i;
515
516 /*
517 * Turn a 16bit value like abcd...mnop into a 32bit word
518 * a0b0c0d0...m0n0o0p0, which is what the HW cfg register is.
519 */
520 for (i = 0; i < 16; i++)
521 res |= ((val >> i) & VGIC_CFG_EDGE) << (2 * i + 1);
522
523 return res;
524}
525
526static u16 vgic_cfg_compress(u32 val)
527{
528 u16 res = 0;
529 int i;
530
531 /*
532 * Turn a 32bit word a0b0c0d0...m0n0o0p0 into 16bit value like
533 * abcd...mnop which is what we really care about.
534 */
535 for (i = 0; i < 16; i++)
536 res |= ((val >> (i * 2 + 1)) & VGIC_CFG_EDGE) << i;
537
538 return res;
539}
540
541/*
542 * The distributor uses 2 bits per IRQ for the CFG register, but the
543 * LSB is always 0. As such, we only keep the upper bit, and use the
544 * two above functions to compress/expand the bits
545 */
546static bool handle_mmio_cfg_reg(struct kvm_vcpu *vcpu,
547 struct kvm_exit_mmio *mmio, phys_addr_t offset)
548{
549 u32 val;
550 u32 *reg = vgic_bitmap_get_reg(&vcpu->kvm->arch.vgic.irq_cfg,
551 vcpu->vcpu_id, offset >> 1);
552 if (offset & 2)
553 val = *reg >> 16;
554 else
555 val = *reg & 0xffff;
556
557 val = vgic_cfg_expand(val);
558 vgic_reg_access(mmio, &val, offset,
559 ACCESS_READ_VALUE | ACCESS_WRITE_VALUE);
560 if (mmio->is_write) {
561 if (offset < 4) {
562 *reg = ~0U; /* Force PPIs/SGIs to 1 */
563 return false;
564 }
565
566 val = vgic_cfg_compress(val);
567 if (offset & 2) {
568 *reg &= 0xffff;
569 *reg |= val << 16;
570 } else {
571 *reg &= 0xffff << 16;
572 *reg |= val;
573 }
574 }
575
576 return false;
577}
578
579static bool handle_mmio_sgi_reg(struct kvm_vcpu *vcpu,
580 struct kvm_exit_mmio *mmio, phys_addr_t offset)
581{
582 u32 reg;
583 vgic_reg_access(mmio, &reg, offset,
584 ACCESS_READ_RAZ | ACCESS_WRITE_VALUE);
585 if (mmio->is_write) {
586 vgic_dispatch_sgi(vcpu, reg);
587 vgic_update_state(vcpu->kvm);
588 return true;
589 }
590
591 return false;
592}
593
594/*
595 * I would have liked to use the kvm_bus_io_*() API instead, but it
596 * cannot cope with banked registers (only the VM pointer is passed
597 * around, and we need the vcpu). One of these days, someone please
598 * fix it!
599 */
600struct mmio_range {
601 phys_addr_t base;
602 unsigned long len;
603 bool (*handle_mmio)(struct kvm_vcpu *vcpu, struct kvm_exit_mmio *mmio,
604 phys_addr_t offset);
605};
606
607static const struct mmio_range vgic_ranges[] = {
608 {
609 .base = GIC_DIST_CTRL,
610 .len = 12,
611 .handle_mmio = handle_mmio_misc,
612 },
613 {
614 .base = GIC_DIST_IGROUP,
615 .len = VGIC_NR_IRQS / 8,
616 .handle_mmio = handle_mmio_raz_wi,
617 },
618 {
619 .base = GIC_DIST_ENABLE_SET,
620 .len = VGIC_NR_IRQS / 8,
621 .handle_mmio = handle_mmio_set_enable_reg,
622 },
623 {
624 .base = GIC_DIST_ENABLE_CLEAR,
625 .len = VGIC_NR_IRQS / 8,
626 .handle_mmio = handle_mmio_clear_enable_reg,
627 },
628 {
629 .base = GIC_DIST_PENDING_SET,
630 .len = VGIC_NR_IRQS / 8,
631 .handle_mmio = handle_mmio_set_pending_reg,
632 },
633 {
634 .base = GIC_DIST_PENDING_CLEAR,
635 .len = VGIC_NR_IRQS / 8,
636 .handle_mmio = handle_mmio_clear_pending_reg,
637 },
638 {
639 .base = GIC_DIST_ACTIVE_SET,
640 .len = VGIC_NR_IRQS / 8,
641 .handle_mmio = handle_mmio_raz_wi,
642 },
643 {
644 .base = GIC_DIST_ACTIVE_CLEAR,
645 .len = VGIC_NR_IRQS / 8,
646 .handle_mmio = handle_mmio_raz_wi,
647 },
648 {
649 .base = GIC_DIST_PRI,
650 .len = VGIC_NR_IRQS,
651 .handle_mmio = handle_mmio_priority_reg,
652 },
653 {
654 .base = GIC_DIST_TARGET,
655 .len = VGIC_NR_IRQS,
656 .handle_mmio = handle_mmio_target_reg,
657 },
658 {
659 .base = GIC_DIST_CONFIG,
660 .len = VGIC_NR_IRQS / 4,
661 .handle_mmio = handle_mmio_cfg_reg,
662 },
663 {
664 .base = GIC_DIST_SOFTINT,
665 .len = 4,
666 .handle_mmio = handle_mmio_sgi_reg,
667 },
668 {}
669};
670
671static const
672struct mmio_range *find_matching_range(const struct mmio_range *ranges,
673 struct kvm_exit_mmio *mmio,
674 phys_addr_t base)
675{
676 const struct mmio_range *r = ranges;
677 phys_addr_t addr = mmio->phys_addr - base;
678
679 while (r->len) {
680 if (addr >= r->base &&
681 (addr + mmio->len) <= (r->base + r->len))
682 return r;
683 r++;
684 }
685
686 return NULL;
687}
688
689/**
690 * vgic_handle_mmio - handle an in-kernel MMIO access
691 * @vcpu: pointer to the vcpu performing the access
692 * @run: pointer to the kvm_run structure
693 * @mmio: pointer to the data describing the access
694 *
695 * returns true if the MMIO access has been performed in kernel space,
696 * and false if it needs to be emulated in user space.
697 */
698bool vgic_handle_mmio(struct kvm_vcpu *vcpu, struct kvm_run *run,
699 struct kvm_exit_mmio *mmio)
700{
701 const struct mmio_range *range;
702 struct vgic_dist *dist = &vcpu->kvm->arch.vgic;
703 unsigned long base = dist->vgic_dist_base;
704 bool updated_state;
705 unsigned long offset;
706
707 if (!irqchip_in_kernel(vcpu->kvm) ||
708 mmio->phys_addr < base ||
709 (mmio->phys_addr + mmio->len) > (base + KVM_VGIC_V2_DIST_SIZE))
710 return false;
711
712 /* We don't support ldrd / strd or ldm / stm to the emulated vgic */
713 if (mmio->len > 4) {
714 kvm_inject_dabt(vcpu, mmio->phys_addr);
715 return true;
716 }
717
718 range = find_matching_range(vgic_ranges, mmio, base);
719 if (unlikely(!range || !range->handle_mmio)) {
720 pr_warn("Unhandled access %d %08llx %d\n",
721 mmio->is_write, mmio->phys_addr, mmio->len);
722 return false;
723 }
724
725 spin_lock(&vcpu->kvm->arch.vgic.lock);
726 offset = mmio->phys_addr - range->base - base;
727 updated_state = range->handle_mmio(vcpu, mmio, offset);
728 spin_unlock(&vcpu->kvm->arch.vgic.lock);
729 kvm_prepare_mmio(run, mmio);
730 kvm_handle_mmio_return(vcpu, run);
731
732 if (updated_state)
733 vgic_kick_vcpus(vcpu->kvm);
734
735 return true;
736}
737
738static void vgic_dispatch_sgi(struct kvm_vcpu *vcpu, u32 reg)
739{
740 struct kvm *kvm = vcpu->kvm;
741 struct vgic_dist *dist = &kvm->arch.vgic;
742 int nrcpus = atomic_read(&kvm->online_vcpus);
743 u8 target_cpus;
744 int sgi, mode, c, vcpu_id;
745
746 vcpu_id = vcpu->vcpu_id;
747
748 sgi = reg & 0xf;
749 target_cpus = (reg >> 16) & 0xff;
750 mode = (reg >> 24) & 3;
751
752 switch (mode) {
753 case 0:
754 if (!target_cpus)
755 return;
756
757 case 1:
758 target_cpus = ((1 << nrcpus) - 1) & ~(1 << vcpu_id) & 0xff;
759 break;
760
761 case 2:
762 target_cpus = 1 << vcpu_id;
763 break;
764 }
765
766 kvm_for_each_vcpu(c, vcpu, kvm) {
767 if (target_cpus & 1) {
768 /* Flag the SGI as pending */
769 vgic_dist_irq_set(vcpu, sgi);
770 dist->irq_sgi_sources[c][sgi] |= 1 << vcpu_id;
771 kvm_debug("SGI%d from CPU%d to CPU%d\n", sgi, vcpu_id, c);
772 }
773
774 target_cpus >>= 1;
775 }
776}
777
778static int compute_pending_for_cpu(struct kvm_vcpu *vcpu)
779{
780 struct vgic_dist *dist = &vcpu->kvm->arch.vgic;
781 unsigned long *pending, *enabled, *pend_percpu, *pend_shared;
782 unsigned long pending_private, pending_shared;
783 int vcpu_id;
784
785 vcpu_id = vcpu->vcpu_id;
786 pend_percpu = vcpu->arch.vgic_cpu.pending_percpu;
787 pend_shared = vcpu->arch.vgic_cpu.pending_shared;
788
789 pending = vgic_bitmap_get_cpu_map(&dist->irq_state, vcpu_id);
790 enabled = vgic_bitmap_get_cpu_map(&dist->irq_enabled, vcpu_id);
791 bitmap_and(pend_percpu, pending, enabled, VGIC_NR_PRIVATE_IRQS);
792
793 pending = vgic_bitmap_get_shared_map(&dist->irq_state);
794 enabled = vgic_bitmap_get_shared_map(&dist->irq_enabled);
795 bitmap_and(pend_shared, pending, enabled, VGIC_NR_SHARED_IRQS);
796 bitmap_and(pend_shared, pend_shared,
797 vgic_bitmap_get_shared_map(&dist->irq_spi_target[vcpu_id]),
798 VGIC_NR_SHARED_IRQS);
799
800 pending_private = find_first_bit(pend_percpu, VGIC_NR_PRIVATE_IRQS);
801 pending_shared = find_first_bit(pend_shared, VGIC_NR_SHARED_IRQS);
802 return (pending_private < VGIC_NR_PRIVATE_IRQS ||
803 pending_shared < VGIC_NR_SHARED_IRQS);
804}
805
806/*
807 * Update the interrupt state and determine which CPUs have pending
808 * interrupts. Must be called with distributor lock held.
809 */
810static void vgic_update_state(struct kvm *kvm)
811{
812 struct vgic_dist *dist = &kvm->arch.vgic;
813 struct kvm_vcpu *vcpu;
814 int c;
815
816 if (!dist->enabled) {
817 set_bit(0, &dist->irq_pending_on_cpu);
818 return;
819 }
820
821 kvm_for_each_vcpu(c, vcpu, kvm) {
822 if (compute_pending_for_cpu(vcpu)) {
823 pr_debug("CPU%d has pending interrupts\n", c);
824 set_bit(c, &dist->irq_pending_on_cpu);
825 }
826 }
827}
828
829#define LR_CPUID(lr) \
830 (((lr) & GICH_LR_PHYSID_CPUID) >> GICH_LR_PHYSID_CPUID_SHIFT)
831#define MK_LR_PEND(src, irq) \
832 (GICH_LR_PENDING_BIT | ((src) << GICH_LR_PHYSID_CPUID_SHIFT) | (irq))
833
834/*
835 * An interrupt may have been disabled after being made pending on the
836 * CPU interface (the classic case is a timer running while we're
837 * rebooting the guest - the interrupt would kick as soon as the CPU
838 * interface gets enabled, with deadly consequences).
839 *
840 * The solution is to examine already active LRs, and check the
841 * interrupt is still enabled. If not, just retire it.
842 */
843static void vgic_retire_disabled_irqs(struct kvm_vcpu *vcpu)
844{
845 struct vgic_cpu *vgic_cpu = &vcpu->arch.vgic_cpu;
846 int lr;
847
848 for_each_set_bit(lr, vgic_cpu->lr_used, vgic_cpu->nr_lr) {
849 int irq = vgic_cpu->vgic_lr[lr] & GICH_LR_VIRTUALID;
850
851 if (!vgic_irq_is_enabled(vcpu, irq)) {
852 vgic_cpu->vgic_irq_lr_map[irq] = LR_EMPTY;
853 clear_bit(lr, vgic_cpu->lr_used);
854 vgic_cpu->vgic_lr[lr] &= ~GICH_LR_STATE;
855 if (vgic_irq_is_active(vcpu, irq))
856 vgic_irq_clear_active(vcpu, irq);
857 }
858 }
859}
860
861/*
862 * Queue an interrupt to a CPU virtual interface. Return true on success,
863 * or false if it wasn't possible to queue it.
864 */
865static bool vgic_queue_irq(struct kvm_vcpu *vcpu, u8 sgi_source_id, int irq)
866{
867 struct vgic_cpu *vgic_cpu = &vcpu->arch.vgic_cpu;
868 int lr;
869
870 /* Sanitize the input... */
871 BUG_ON(sgi_source_id & ~7);
872 BUG_ON(sgi_source_id && irq >= VGIC_NR_SGIS);
873 BUG_ON(irq >= VGIC_NR_IRQS);
874
875 kvm_debug("Queue IRQ%d\n", irq);
876
877 lr = vgic_cpu->vgic_irq_lr_map[irq];
878
879 /* Do we have an active interrupt for the same CPUID? */
880 if (lr != LR_EMPTY &&
881 (LR_CPUID(vgic_cpu->vgic_lr[lr]) == sgi_source_id)) {
882 kvm_debug("LR%d piggyback for IRQ%d %x\n",
883 lr, irq, vgic_cpu->vgic_lr[lr]);
884 BUG_ON(!test_bit(lr, vgic_cpu->lr_used));
885 vgic_cpu->vgic_lr[lr] |= GICH_LR_PENDING_BIT;
886 return true;
887 }
888
889 /* Try to use another LR for this interrupt */
890 lr = find_first_zero_bit((unsigned long *)vgic_cpu->lr_used,
891 vgic_cpu->nr_lr);
892 if (lr >= vgic_cpu->nr_lr)
893 return false;
894
895 kvm_debug("LR%d allocated for IRQ%d %x\n", lr, irq, sgi_source_id);
896 vgic_cpu->vgic_lr[lr] = MK_LR_PEND(sgi_source_id, irq);
897 vgic_cpu->vgic_irq_lr_map[irq] = lr;
898 set_bit(lr, vgic_cpu->lr_used);
899
900 if (!vgic_irq_is_edge(vcpu, irq))
901 vgic_cpu->vgic_lr[lr] |= GICH_LR_EOI;
902
903 return true;
904}
905
906static bool vgic_queue_sgi(struct kvm_vcpu *vcpu, int irq)
907{
908 struct vgic_dist *dist = &vcpu->kvm->arch.vgic;
909 unsigned long sources;
910 int vcpu_id = vcpu->vcpu_id;
911 int c;
912
913 sources = dist->irq_sgi_sources[vcpu_id][irq];
914
915 for_each_set_bit(c, &sources, VGIC_MAX_CPUS) {
916 if (vgic_queue_irq(vcpu, c, irq))
917 clear_bit(c, &sources);
918 }
919
920 dist->irq_sgi_sources[vcpu_id][irq] = sources;
921
922 /*
923 * If the sources bitmap has been cleared it means that we
924 * could queue all the SGIs onto link registers (see the
925 * clear_bit above), and therefore we are done with them in
926 * our emulated gic and can get rid of them.
927 */
928 if (!sources) {
929 vgic_dist_irq_clear(vcpu, irq);
930 vgic_cpu_irq_clear(vcpu, irq);
931 return true;
932 }
933
934 return false;
935}
936
937static bool vgic_queue_hwirq(struct kvm_vcpu *vcpu, int irq)
938{
939 if (vgic_irq_is_active(vcpu, irq))
940 return true; /* level interrupt, already queued */
941
942 if (vgic_queue_irq(vcpu, 0, irq)) {
943 if (vgic_irq_is_edge(vcpu, irq)) {
944 vgic_dist_irq_clear(vcpu, irq);
945 vgic_cpu_irq_clear(vcpu, irq);
946 } else {
947 vgic_irq_set_active(vcpu, irq);
948 }
949
950 return true;
951 }
952
953 return false;
954}
955
956/*
957 * Fill the list registers with pending interrupts before running the
958 * guest.
959 */
960static void __kvm_vgic_flush_hwstate(struct kvm_vcpu *vcpu)
961{
962 struct vgic_cpu *vgic_cpu = &vcpu->arch.vgic_cpu;
963 struct vgic_dist *dist = &vcpu->kvm->arch.vgic;
964 int i, vcpu_id;
965 int overflow = 0;
966
967 vcpu_id = vcpu->vcpu_id;
968
969 /*
970 * We may not have any pending interrupt, or the interrupts
971 * may have been serviced from another vcpu. In all cases,
972 * move along.
973 */
974 if (!kvm_vgic_vcpu_pending_irq(vcpu)) {
975 pr_debug("CPU%d has no pending interrupt\n", vcpu_id);
976 goto epilog;
977 }
978
979 /* SGIs */
980 for_each_set_bit(i, vgic_cpu->pending_percpu, VGIC_NR_SGIS) {
981 if (!vgic_queue_sgi(vcpu, i))
982 overflow = 1;
983 }
984
985 /* PPIs */
986 for_each_set_bit_from(i, vgic_cpu->pending_percpu, VGIC_NR_PRIVATE_IRQS) {
987 if (!vgic_queue_hwirq(vcpu, i))
988 overflow = 1;
989 }
990
991 /* SPIs */
992 for_each_set_bit(i, vgic_cpu->pending_shared, VGIC_NR_SHARED_IRQS) {
993 if (!vgic_queue_hwirq(vcpu, i + VGIC_NR_PRIVATE_IRQS))
994 overflow = 1;
995 }
996
997epilog:
998 if (overflow) {
999 vgic_cpu->vgic_hcr |= GICH_HCR_UIE;
1000 } else {
1001 vgic_cpu->vgic_hcr &= ~GICH_HCR_UIE;
1002 /*
1003 * We're about to run this VCPU, and we've consumed
1004 * everything the distributor had in store for
1005 * us. Claim we don't have anything pending. We'll
1006 * adjust that if needed while exiting.
1007 */
1008 clear_bit(vcpu_id, &dist->irq_pending_on_cpu);
1009 }
1010}
1011
1012static bool vgic_process_maintenance(struct kvm_vcpu *vcpu)
1013{
1014 struct vgic_cpu *vgic_cpu = &vcpu->arch.vgic_cpu;
1015 bool level_pending = false;
1016
1017 kvm_debug("MISR = %08x\n", vgic_cpu->vgic_misr);
1018
1019 if (vgic_cpu->vgic_misr & GICH_MISR_EOI) {
1020 /*
1021 * Some level interrupts have been EOIed. Clear their
1022 * active bit.
1023 */
1024 int lr, irq;
1025
1026 for_each_set_bit(lr, (unsigned long *)vgic_cpu->vgic_eisr,
1027 vgic_cpu->nr_lr) {
1028 irq = vgic_cpu->vgic_lr[lr] & GICH_LR_VIRTUALID;
1029
1030 vgic_irq_clear_active(vcpu, irq);
1031 vgic_cpu->vgic_lr[lr] &= ~GICH_LR_EOI;
1032
1033 /* Any additional pending interrupt? */
1034 if (vgic_dist_irq_is_pending(vcpu, irq)) {
1035 vgic_cpu_irq_set(vcpu, irq);
1036 level_pending = true;
1037 } else {
1038 vgic_cpu_irq_clear(vcpu, irq);
1039 }
1040
1041 /*
1042 * Despite being EOIed, the LR may not have
1043 * been marked as empty.
1044 */
1045 set_bit(lr, (unsigned long *)vgic_cpu->vgic_elrsr);
1046 vgic_cpu->vgic_lr[lr] &= ~GICH_LR_ACTIVE_BIT;
1047 }
1048 }
1049
1050 if (vgic_cpu->vgic_misr & GICH_MISR_U)
1051 vgic_cpu->vgic_hcr &= ~GICH_HCR_UIE;
1052
1053 return level_pending;
1054}
1055
1056/*
1057 * Sync back the VGIC state after a guest run. The distributor lock is
1058 * needed so we don't get preempted in the middle of the state processing.
1059 */
1060static void __kvm_vgic_sync_hwstate(struct kvm_vcpu *vcpu)
1061{
1062 struct vgic_cpu *vgic_cpu = &vcpu->arch.vgic_cpu;
1063 struct vgic_dist *dist = &vcpu->kvm->arch.vgic;
1064 int lr, pending;
1065 bool level_pending;
1066
1067 level_pending = vgic_process_maintenance(vcpu);
1068
1069 /* Clear mappings for empty LRs */
1070 for_each_set_bit(lr, (unsigned long *)vgic_cpu->vgic_elrsr,
1071 vgic_cpu->nr_lr) {
1072 int irq;
1073
1074 if (!test_and_clear_bit(lr, vgic_cpu->lr_used))
1075 continue;
1076
1077 irq = vgic_cpu->vgic_lr[lr] & GICH_LR_VIRTUALID;
1078
1079 BUG_ON(irq >= VGIC_NR_IRQS);
1080 vgic_cpu->vgic_irq_lr_map[irq] = LR_EMPTY;
1081 }
1082
1083 /* Check if we still have something up our sleeve... */
1084 pending = find_first_zero_bit((unsigned long *)vgic_cpu->vgic_elrsr,
1085 vgic_cpu->nr_lr);
1086 if (level_pending || pending < vgic_cpu->nr_lr)
1087 set_bit(vcpu->vcpu_id, &dist->irq_pending_on_cpu);
1088}
1089
1090void kvm_vgic_flush_hwstate(struct kvm_vcpu *vcpu)
1091{
1092 struct vgic_dist *dist = &vcpu->kvm->arch.vgic;
1093
1094 if (!irqchip_in_kernel(vcpu->kvm))
1095 return;
1096
1097 spin_lock(&dist->lock);
1098 __kvm_vgic_flush_hwstate(vcpu);
1099 spin_unlock(&dist->lock);
1100}
1101
1102void kvm_vgic_sync_hwstate(struct kvm_vcpu *vcpu)
1103{
1104 struct vgic_dist *dist = &vcpu->kvm->arch.vgic;
1105
1106 if (!irqchip_in_kernel(vcpu->kvm))
1107 return;
1108
1109 spin_lock(&dist->lock);
1110 __kvm_vgic_sync_hwstate(vcpu);
1111 spin_unlock(&dist->lock);
1112}
1113
1114int kvm_vgic_vcpu_pending_irq(struct kvm_vcpu *vcpu)
1115{
1116 struct vgic_dist *dist = &vcpu->kvm->arch.vgic;
1117
1118 if (!irqchip_in_kernel(vcpu->kvm))
1119 return 0;
1120
1121 return test_bit(vcpu->vcpu_id, &dist->irq_pending_on_cpu);
1122}
1123
1124static void vgic_kick_vcpus(struct kvm *kvm)
1125{
1126 struct kvm_vcpu *vcpu;
1127 int c;
1128
1129 /*
1130 * We've injected an interrupt, time to find out who deserves
1131 * a good kick...
1132 */
1133 kvm_for_each_vcpu(c, vcpu, kvm) {
1134 if (kvm_vgic_vcpu_pending_irq(vcpu))
1135 kvm_vcpu_kick(vcpu);
1136 }
1137}
1138
1139static int vgic_validate_injection(struct kvm_vcpu *vcpu, int irq, int level)
1140{
1141 int is_edge = vgic_irq_is_edge(vcpu, irq);
1142 int state = vgic_dist_irq_is_pending(vcpu, irq);
1143
1144 /*
1145 * Only inject an interrupt if:
1146 * - edge triggered and we have a rising edge
1147 * - level triggered and we change level
1148 */
1149 if (is_edge)
1150 return level > state;
1151 else
1152 return level != state;
1153}
1154
1155static bool vgic_update_irq_state(struct kvm *kvm, int cpuid,
1156 unsigned int irq_num, bool level)
1157{
1158 struct vgic_dist *dist = &kvm->arch.vgic;
1159 struct kvm_vcpu *vcpu;
1160 int is_edge, is_level;
1161 int enabled;
1162 bool ret = true;
1163
1164 spin_lock(&dist->lock);
1165
1166 vcpu = kvm_get_vcpu(kvm, cpuid);
1167 is_edge = vgic_irq_is_edge(vcpu, irq_num);
1168 is_level = !is_edge;
1169
1170 if (!vgic_validate_injection(vcpu, irq_num, level)) {
1171 ret = false;
1172 goto out;
1173 }
1174
1175 if (irq_num >= VGIC_NR_PRIVATE_IRQS) {
1176 cpuid = dist->irq_spi_cpu[irq_num - VGIC_NR_PRIVATE_IRQS];
1177 vcpu = kvm_get_vcpu(kvm, cpuid);
1178 }
1179
1180 kvm_debug("Inject IRQ%d level %d CPU%d\n", irq_num, level, cpuid);
1181
1182 if (level)
1183 vgic_dist_irq_set(vcpu, irq_num);
1184 else
1185 vgic_dist_irq_clear(vcpu, irq_num);
1186
1187 enabled = vgic_irq_is_enabled(vcpu, irq_num);
1188
1189 if (!enabled) {
1190 ret = false;
1191 goto out;
1192 }
1193
1194 if (is_level && vgic_irq_is_active(vcpu, irq_num)) {
1195 /*
1196 * Level interrupt in progress, will be picked up
1197 * when EOId.
1198 */
1199 ret = false;
1200 goto out;
1201 }
1202
1203 if (level) {
1204 vgic_cpu_irq_set(vcpu, irq_num);
1205 set_bit(cpuid, &dist->irq_pending_on_cpu);
1206 }
1207
1208out:
1209 spin_unlock(&dist->lock);
1210
1211 return ret;
1212}
1213
1214/**
1215 * kvm_vgic_inject_irq - Inject an IRQ from a device to the vgic
1216 * @kvm: The VM structure pointer
1217 * @cpuid: The CPU for PPIs
1218 * @irq_num: The IRQ number that is assigned to the device
1219 * @level: Edge-triggered: true: to trigger the interrupt
1220 * false: to ignore the call
1221 * Level-sensitive true: activates an interrupt
1222 * false: deactivates an interrupt
1223 *
1224 * The GIC is not concerned with devices being active-LOW or active-HIGH for
1225 * level-sensitive interrupts. You can think of the level parameter as 1
1226 * being HIGH and 0 being LOW and all devices being active-HIGH.
1227 */
1228int kvm_vgic_inject_irq(struct kvm *kvm, int cpuid, unsigned int irq_num,
1229 bool level)
1230{
1231 if (vgic_update_irq_state(kvm, cpuid, irq_num, level))
1232 vgic_kick_vcpus(kvm);
1233
1234 return 0;
1235}
1236
1237static irqreturn_t vgic_maintenance_handler(int irq, void *data)
1238{
1239 /*
1240 * We cannot rely on the vgic maintenance interrupt to be
1241 * delivered synchronously. This means we can only use it to
1242 * exit the VM, and we perform the handling of EOIed
1243 * interrupts on the exit path (see vgic_process_maintenance).
1244 */
1245 return IRQ_HANDLED;
1246}
1247
1248int kvm_vgic_vcpu_init(struct kvm_vcpu *vcpu)
1249{
1250 struct vgic_cpu *vgic_cpu = &vcpu->arch.vgic_cpu;
1251 struct vgic_dist *dist = &vcpu->kvm->arch.vgic;
1252 int i;
1253
1254 if (!irqchip_in_kernel(vcpu->kvm))
1255 return 0;
1256
1257 if (vcpu->vcpu_id >= VGIC_MAX_CPUS)
1258 return -EBUSY;
1259
1260 for (i = 0; i < VGIC_NR_IRQS; i++) {
1261 if (i < VGIC_NR_PPIS)
1262 vgic_bitmap_set_irq_val(&dist->irq_enabled,
1263 vcpu->vcpu_id, i, 1);
1264 if (i < VGIC_NR_PRIVATE_IRQS)
1265 vgic_bitmap_set_irq_val(&dist->irq_cfg,
1266 vcpu->vcpu_id, i, VGIC_CFG_EDGE);
1267
1268 vgic_cpu->vgic_irq_lr_map[i] = LR_EMPTY;
1269 }
1270
1271 /*
1272 * By forcing VMCR to zero, the GIC will restore the binary
1273 * points to their reset values. Anything else resets to zero
1274 * anyway.
1275 */
1276 vgic_cpu->vgic_vmcr = 0;
1277
1278 vgic_cpu->nr_lr = vgic_nr_lr;
1279 vgic_cpu->vgic_hcr = GICH_HCR_EN; /* Get the show on the road... */
1280
1281 return 0;
1282}
1283
1284static void vgic_init_maintenance_interrupt(void *info)
1285{
1286 enable_percpu_irq(vgic_maint_irq, 0);
1287}
1288
1289static int vgic_cpu_notify(struct notifier_block *self,
1290 unsigned long action, void *cpu)
1291{
1292 switch (action) {
1293 case CPU_STARTING:
1294 case CPU_STARTING_FROZEN:
1295 vgic_init_maintenance_interrupt(NULL);
1296 break;
1297 case CPU_DYING:
1298 case CPU_DYING_FROZEN:
1299 disable_percpu_irq(vgic_maint_irq);
1300 break;
1301 }
1302
1303 return NOTIFY_OK;
1304}
1305
1306static struct notifier_block vgic_cpu_nb = {
1307 .notifier_call = vgic_cpu_notify,
1308};
1309
1310int kvm_vgic_hyp_init(void)
1311{
1312 int ret;
1313 struct resource vctrl_res;
1314 struct resource vcpu_res;
1315
1316 vgic_node = of_find_compatible_node(NULL, NULL, "arm,cortex-a15-gic");
1317 if (!vgic_node) {
1318 kvm_err("error: no compatible vgic node in DT\n");
1319 return -ENODEV;
1320 }
1321
1322 vgic_maint_irq = irq_of_parse_and_map(vgic_node, 0);
1323 if (!vgic_maint_irq) {
1324 kvm_err("error getting vgic maintenance irq from DT\n");
1325 ret = -ENXIO;
1326 goto out;
1327 }
1328
1329 ret = request_percpu_irq(vgic_maint_irq, vgic_maintenance_handler,
1330 "vgic", kvm_get_running_vcpus());
1331 if (ret) {
1332 kvm_err("Cannot register interrupt %d\n", vgic_maint_irq);
1333 goto out;
1334 }
1335
1336 ret = register_cpu_notifier(&vgic_cpu_nb);
1337 if (ret) {
1338 kvm_err("Cannot register vgic CPU notifier\n");
1339 goto out_free_irq;
1340 }
1341
1342 ret = of_address_to_resource(vgic_node, 2, &vctrl_res);
1343 if (ret) {
1344 kvm_err("Cannot obtain VCTRL resource\n");
1345 goto out_free_irq;
1346 }
1347
1348 vgic_vctrl_base = of_iomap(vgic_node, 2);
1349 if (!vgic_vctrl_base) {
1350 kvm_err("Cannot ioremap VCTRL\n");
1351 ret = -ENOMEM;
1352 goto out_free_irq;
1353 }
1354
1355 vgic_nr_lr = readl_relaxed(vgic_vctrl_base + GICH_VTR);
1356 vgic_nr_lr = (vgic_nr_lr & 0x3f) + 1;
1357
1358 ret = create_hyp_io_mappings(vgic_vctrl_base,
1359 vgic_vctrl_base + resource_size(&vctrl_res),
1360 vctrl_res.start);
1361 if (ret) {
1362 kvm_err("Cannot map VCTRL into hyp\n");
1363 goto out_unmap;
1364 }
1365
1366 kvm_info("%s@%llx IRQ%d\n", vgic_node->name,
1367 vctrl_res.start, vgic_maint_irq);
1368 on_each_cpu(vgic_init_maintenance_interrupt, NULL, 1);
1369
1370 if (of_address_to_resource(vgic_node, 3, &vcpu_res)) {
1371 kvm_err("Cannot obtain VCPU resource\n");
1372 ret = -ENXIO;
1373 goto out_unmap;
1374 }
1375 vgic_vcpu_base = vcpu_res.start;
1376
1377 goto out;
1378
1379out_unmap:
1380 iounmap(vgic_vctrl_base);
1381out_free_irq:
1382 free_percpu_irq(vgic_maint_irq, kvm_get_running_vcpus());
1383out:
1384 of_node_put(vgic_node);
1385 return ret;
1386}
1387
1388int kvm_vgic_init(struct kvm *kvm)
1389{
1390 int ret = 0, i;
1391
1392 mutex_lock(&kvm->lock);
1393
1394 if (vgic_initialized(kvm))
1395 goto out;
1396
1397 if (IS_VGIC_ADDR_UNDEF(kvm->arch.vgic.vgic_dist_base) ||
1398 IS_VGIC_ADDR_UNDEF(kvm->arch.vgic.vgic_cpu_base)) {
1399 kvm_err("Need to set vgic cpu and dist addresses first\n");
1400 ret = -ENXIO;
1401 goto out;
1402 }
1403
1404 ret = kvm_phys_addr_ioremap(kvm, kvm->arch.vgic.vgic_cpu_base,
1405 vgic_vcpu_base, KVM_VGIC_V2_CPU_SIZE);
1406 if (ret) {
1407 kvm_err("Unable to remap VGIC CPU to VCPU\n");
1408 goto out;
1409 }
1410
1411 for (i = VGIC_NR_PRIVATE_IRQS; i < VGIC_NR_IRQS; i += 4)
1412 vgic_set_target_reg(kvm, 0, i);
1413
1414 kvm_timer_init(kvm);
1415 kvm->arch.vgic.ready = true;
1416out:
1417 mutex_unlock(&kvm->lock);
1418 return ret;
1419}
1420
1421int kvm_vgic_create(struct kvm *kvm)
1422{
1423 int ret = 0;
1424
1425 mutex_lock(&kvm->lock);
1426
1427 if (atomic_read(&kvm->online_vcpus) || kvm->arch.vgic.vctrl_base) {
1428 ret = -EEXIST;
1429 goto out;
1430 }
1431
1432 spin_lock_init(&kvm->arch.vgic.lock);
1433 kvm->arch.vgic.vctrl_base = vgic_vctrl_base;
1434 kvm->arch.vgic.vgic_dist_base = VGIC_ADDR_UNDEF;
1435 kvm->arch.vgic.vgic_cpu_base = VGIC_ADDR_UNDEF;
1436
1437out:
1438 mutex_unlock(&kvm->lock);
1439 return ret;
1440}
1441
1442static bool vgic_ioaddr_overlap(struct kvm *kvm)
1443{
1444 phys_addr_t dist = kvm->arch.vgic.vgic_dist_base;
1445 phys_addr_t cpu = kvm->arch.vgic.vgic_cpu_base;
1446
1447 if (IS_VGIC_ADDR_UNDEF(dist) || IS_VGIC_ADDR_UNDEF(cpu))
1448 return 0;
1449 if ((dist <= cpu && dist + KVM_VGIC_V2_DIST_SIZE > cpu) ||
1450 (cpu <= dist && cpu + KVM_VGIC_V2_CPU_SIZE > dist))
1451 return -EBUSY;
1452 return 0;
1453}
1454
1455static int vgic_ioaddr_assign(struct kvm *kvm, phys_addr_t *ioaddr,
1456 phys_addr_t addr, phys_addr_t size)
1457{
1458 int ret;
1459
1460 if (!IS_VGIC_ADDR_UNDEF(*ioaddr))
1461 return -EEXIST;
1462 if (addr + size < addr)
1463 return -EINVAL;
1464
1465 ret = vgic_ioaddr_overlap(kvm);
1466 if (ret)
1467 return ret;
1468 *ioaddr = addr;
1469 return ret;
1470}
1471
1472int kvm_vgic_set_addr(struct kvm *kvm, unsigned long type, u64 addr)
1473{
1474 int r = 0;
1475 struct vgic_dist *vgic = &kvm->arch.vgic;
1476
1477 if (addr & ~KVM_PHYS_MASK)
1478 return -E2BIG;
1479
1480 if (addr & (SZ_4K - 1))
1481 return -EINVAL;
1482
1483 mutex_lock(&kvm->lock);
1484 switch (type) {
1485 case KVM_VGIC_V2_ADDR_TYPE_DIST:
1486 r = vgic_ioaddr_assign(kvm, &vgic->vgic_dist_base,
1487 addr, KVM_VGIC_V2_DIST_SIZE);
1488 break;
1489 case KVM_VGIC_V2_ADDR_TYPE_CPU:
1490 r = vgic_ioaddr_assign(kvm, &vgic->vgic_cpu_base,
1491 addr, KVM_VGIC_V2_CPU_SIZE);
1492 break;
1493 default:
1494 r = -ENODEV;
1495 }
1496
1497 mutex_unlock(&kvm->lock);
1498 return r;
1499}
diff --git a/arch/arm/lib/delay.c b/arch/arm/lib/delay.c
index 64dbfa57204a..5306de350133 100644
--- a/arch/arm/lib/delay.c
+++ b/arch/arm/lib/delay.c
@@ -86,7 +86,7 @@ void __init register_current_timer_delay(const struct delay_timer *timer)
86 } 86 }
87} 87}
88 88
89unsigned long __cpuinit calibrate_delay_is_known(void) 89unsigned long calibrate_delay_is_known(void)
90{ 90{
91 delay_calibrated = true; 91 delay_calibrated = true;
92 return lpj_fine; 92 return lpj_fine;
diff --git a/arch/arm/mach-at91/Kconfig b/arch/arm/mach-at91/Kconfig
index 02802386b894..699b71e7f7ec 100644
--- a/arch/arm/mach-at91/Kconfig
+++ b/arch/arm/mach-at91/Kconfig
@@ -163,6 +163,7 @@ config MACH_SAMA5_DT
163 bool "Atmel SAMA5 Evaluation Kits with device-tree support" 163 bool "Atmel SAMA5 Evaluation Kits with device-tree support"
164 depends on SOC_SAMA5 164 depends on SOC_SAMA5
165 select USE_OF 165 select USE_OF
166 select PHYLIB if NETDEVICES
166 help 167 help
167 Select this if you want to experiment device-tree with 168 Select this if you want to experiment device-tree with
168 an Atmel Evaluation Kit. 169 an Atmel Evaluation Kit.
diff --git a/arch/arm/mach-at91/Kconfig.non_dt b/arch/arm/mach-at91/Kconfig.non_dt
index 6c24985515a2..ca900be144ce 100644
--- a/arch/arm/mach-at91/Kconfig.non_dt
+++ b/arch/arm/mach-at91/Kconfig.non_dt
@@ -14,15 +14,11 @@ config ARCH_AT91RM9200
14 select SOC_AT91RM9200 14 select SOC_AT91RM9200
15 15
16config ARCH_AT91SAM9260 16config ARCH_AT91SAM9260
17 bool "AT91SAM9260 or AT91SAM9XE" 17 bool "AT91SAM9260 or AT91SAM9XE or AT91SAM9G20"
18 select SOC_AT91SAM9260 18 select SOC_AT91SAM9260
19 19
20config ARCH_AT91SAM9261 20config ARCH_AT91SAM9261
21 bool "AT91SAM9261" 21 bool "AT91SAM9261 or AT91SAM9G10"
22 select SOC_AT91SAM9261
23
24config ARCH_AT91SAM9G10
25 bool "AT91SAM9G10"
26 select SOC_AT91SAM9261 22 select SOC_AT91SAM9261
27 23
28config ARCH_AT91SAM9263 24config ARCH_AT91SAM9263
@@ -33,10 +29,6 @@ config ARCH_AT91SAM9RL
33 bool "AT91SAM9RL" 29 bool "AT91SAM9RL"
34 select SOC_AT91SAM9RL 30 select SOC_AT91SAM9RL
35 31
36config ARCH_AT91SAM9G20
37 bool "AT91SAM9G20"
38 select SOC_AT91SAM9260
39
40config ARCH_AT91SAM9G45 32config ARCH_AT91SAM9G45
41 bool "AT91SAM9G45" 33 bool "AT91SAM9G45"
42 select SOC_AT91SAM9G45 34 select SOC_AT91SAM9G45
@@ -50,6 +42,14 @@ config ARCH_AT91X40
50 42
51endchoice 43endchoice
52 44
45config ARCH_AT91SAM9G20
46 bool
47 select ARCH_AT91SAM9260
48
49config ARCH_AT91SAM9G10
50 bool
51 select ARCH_AT91SAM9261
52
53# ---------------------------------------------------------- 53# ----------------------------------------------------------
54 54
55if ARCH_AT91RM9200 55if ARCH_AT91RM9200
@@ -62,13 +62,6 @@ config MACH_ONEARM
62 Select this if you are using Ajeco's 1ARM Single Board Computer. 62 Select this if you are using Ajeco's 1ARM Single Board Computer.
63 <http://www.ajeco.fi/> 63 <http://www.ajeco.fi/>
64 64
65config ARCH_AT91RM9200DK
66 bool "Atmel AT91RM9200-DK Development board"
67 select HAVE_AT91_DATAFLASH_CARD
68 help
69 Select this if you are using Atmel's AT91RM9200-DK Development board.
70 (Discontinued)
71
72config MACH_AT91RM9200EK 65config MACH_AT91RM9200EK
73 bool "Atmel AT91RM9200-EK Evaluation Kit" 66 bool "Atmel AT91RM9200-EK Evaluation Kit"
74 select HAVE_AT91_DATAFLASH_CARD 67 select HAVE_AT91_DATAFLASH_CARD
@@ -183,12 +176,6 @@ config MACH_AFEB9260
183 <svn://194.85.238.22/home/users/george/svn/arm9eb> 176 <svn://194.85.238.22/home/users/george/svn/arm9eb>
184 <http://groups.google.com/group/arm9fpga-evolution-board> 177 <http://groups.google.com/group/arm9fpga-evolution-board>
185 178
186config MACH_USB_A9260
187 bool "CALAO USB-A9260"
188 help
189 Select this if you are using a Calao Systems USB-A9260.
190 <http://www.calao-systems.com>
191
192config MACH_QIL_A9260 179config MACH_QIL_A9260
193 bool "CALAO QIL-A9260 board" 180 bool "CALAO QIL-A9260 board"
194 help 181 help
@@ -207,76 +194,6 @@ config MACH_FLEXIBITY
207 Select this if you are using Flexibity Connect board 194 Select this if you are using Flexibity Connect board
208 <http://www.flexibity.com> 195 <http://www.flexibity.com>
209 196
210endif
211
212# ----------------------------------------------------------
213
214if ARCH_AT91SAM9261
215
216comment "AT91SAM9261 Board Type"
217
218config MACH_AT91SAM9261EK
219 bool "Atmel AT91SAM9261-EK Evaluation Kit"
220 select HAVE_AT91_DATAFLASH_CARD
221 help
222 Select this if you are using Atmel's AT91SAM9261-EK Evaluation Kit.
223 <http://www.atmel.com/dyn/products/tools_card.asp?tool_id=3820>
224
225endif
226
227# ----------------------------------------------------------
228
229if ARCH_AT91SAM9G10
230
231comment "AT91SAM9G10 Board Type"
232
233config MACH_AT91SAM9G10EK
234 bool "Atmel AT91SAM9G10-EK Evaluation Kit"
235 select HAVE_AT91_DATAFLASH_CARD
236 help
237 Select this if you are using Atmel's AT91SAM9G10-EK Evaluation Kit.
238 <http://www.atmel.com/dyn/products/tools_card.asp?tool_id=4588>
239
240endif
241
242# ----------------------------------------------------------
243
244if ARCH_AT91SAM9263
245
246comment "AT91SAM9263 Board Type"
247
248config MACH_AT91SAM9263EK
249 bool "Atmel AT91SAM9263-EK Evaluation Kit"
250 select HAVE_AT91_DATAFLASH_CARD
251 help
252 Select this if you are using Atmel's AT91SAM9263-EK Evaluation Kit.
253 <http://www.atmel.com/dyn/products/tools_card.asp?tool_id=4057>
254
255config MACH_USB_A9263
256 bool "CALAO USB-A9263"
257 help
258 Select this if you are using a Calao Systems USB-A9263.
259 <http://www.calao-systems.com>
260
261endif
262
263# ----------------------------------------------------------
264
265if ARCH_AT91SAM9RL
266
267comment "AT91SAM9RL Board Type"
268
269config MACH_AT91SAM9RLEK
270 bool "Atmel AT91SAM9RL-EK Evaluation Kit"
271 help
272 Select this if you are using Atmel's AT91SAM9RL-EK Evaluation Kit.
273
274endif
275
276# ----------------------------------------------------------
277
278if ARCH_AT91SAM9G20
279
280comment "AT91SAM9G20 Board Type" 197comment "AT91SAM9G20 Board Type"
281 198
282config MACH_AT91SAM9G20EK 199config MACH_AT91SAM9G20EK
@@ -334,24 +251,64 @@ config MACH_GSIA18S
334 produced by GeoSIG Ltd company. This is an internet accelerograph. 251 produced by GeoSIG Ltd company. This is an internet accelerograph.
335 <http://www.geosig.com> 252 <http://www.geosig.com>
336 253
337config MACH_USB_A9G20 254config MACH_SNAPPER_9260
338 bool "CALAO USB-A9G20" 255 bool "Bluewater Systems Snapper 9260/9G20 module"
339 depends on ARCH_AT91SAM9G20 256 help
257 Select this if you are using the Bluewater Systems Snapper 9260 or
258 Snapper 9G20 modules.
259 <http://www.bluewatersys.com/>
260endif
261
262# ----------------------------------------------------------
263
264if ARCH_AT91SAM9261
265
266comment "AT91SAM9261 Board Type"
267
268config MACH_AT91SAM9261EK
269 bool "Atmel AT91SAM9261-EK Evaluation Kit"
270 select HAVE_AT91_DATAFLASH_CARD
340 help 271 help
341 Select this if you are using a Calao Systems USB-A9G20. 272 Select this if you are using Atmel's AT91SAM9261-EK Evaluation Kit.
342 <http://www.calao-systems.com> 273 <http://www.atmel.com/dyn/products/tools_card.asp?tool_id=3820>
274
275comment "AT91SAM9G10 Board Type"
276
277config MACH_AT91SAM9G10EK
278 bool "Atmel AT91SAM9G10-EK Evaluation Kit"
279 select HAVE_AT91_DATAFLASH_CARD
280 help
281 Select this if you are using Atmel's AT91SAM9G10-EK Evaluation Kit.
282 <http://www.atmel.com/dyn/products/tools_card.asp?tool_id=4588>
343 283
344endif 284endif
345 285
346if (ARCH_AT91SAM9260 || ARCH_AT91SAM9G20) 286# ----------------------------------------------------------
347comment "AT91SAM9260/AT91SAM9G20 boards" 287
288if ARCH_AT91SAM9263
289
290comment "AT91SAM9263 Board Type"
291
292config MACH_AT91SAM9263EK
293 bool "Atmel AT91SAM9263-EK Evaluation Kit"
294 select HAVE_AT91_DATAFLASH_CARD
295 help
296 Select this if you are using Atmel's AT91SAM9263-EK Evaluation Kit.
297 <http://www.atmel.com/dyn/products/tools_card.asp?tool_id=4057>
298
299endif
300
301# ----------------------------------------------------------
302
303if ARCH_AT91SAM9RL
304
305comment "AT91SAM9RL Board Type"
306
307config MACH_AT91SAM9RLEK
308 bool "Atmel AT91SAM9RL-EK Evaluation Kit"
309 help
310 Select this if you are using Atmel's AT91SAM9RL-EK Evaluation Kit.
348 311
349config MACH_SNAPPER_9260
350 bool "Bluewater Systems Snapper 9260/9G20 module"
351 help
352 Select this if you are using the Bluewater Systems Snapper 9260 or
353 Snapper 9G20 modules.
354 <http://www.bluewatersys.com/>
355endif 312endif
356 313
357# ---------------------------------------------------------- 314# ----------------------------------------------------------
diff --git a/arch/arm/mach-at91/Makefile b/arch/arm/mach-at91/Makefile
index 788562dccb43..3b0a9538093c 100644
--- a/arch/arm/mach-at91/Makefile
+++ b/arch/arm/mach-at91/Makefile
@@ -27,16 +27,13 @@ obj-$(CONFIG_SOC_SAMA5D3) += sama5d3.o
27obj-$(CONFIG_ARCH_AT91RM9200) += at91rm9200_devices.o 27obj-$(CONFIG_ARCH_AT91RM9200) += at91rm9200_devices.o
28obj-$(CONFIG_ARCH_AT91SAM9260) += at91sam9260_devices.o 28obj-$(CONFIG_ARCH_AT91SAM9260) += at91sam9260_devices.o
29obj-$(CONFIG_ARCH_AT91SAM9261) += at91sam9261_devices.o 29obj-$(CONFIG_ARCH_AT91SAM9261) += at91sam9261_devices.o
30obj-$(CONFIG_ARCH_AT91SAM9G10) += at91sam9261_devices.o
31obj-$(CONFIG_ARCH_AT91SAM9263) += at91sam9263_devices.o 30obj-$(CONFIG_ARCH_AT91SAM9263) += at91sam9263_devices.o
32obj-$(CONFIG_ARCH_AT91SAM9RL) += at91sam9rl_devices.o 31obj-$(CONFIG_ARCH_AT91SAM9RL) += at91sam9rl_devices.o
33obj-$(CONFIG_ARCH_AT91SAM9G20) += at91sam9260_devices.o
34obj-$(CONFIG_ARCH_AT91SAM9G45) += at91sam9g45_devices.o 32obj-$(CONFIG_ARCH_AT91SAM9G45) += at91sam9g45_devices.o
35obj-$(CONFIG_ARCH_AT91X40) += at91x40.o at91x40_time.o 33obj-$(CONFIG_ARCH_AT91X40) += at91x40.o at91x40_time.o
36 34
37# AT91RM9200 board-specific support 35# AT91RM9200 board-specific support
38obj-$(CONFIG_MACH_ONEARM) += board-1arm.o 36obj-$(CONFIG_MACH_ONEARM) += board-1arm.o
39obj-$(CONFIG_ARCH_AT91RM9200DK) += board-rm9200dk.o
40obj-$(CONFIG_MACH_AT91RM9200EK) += board-rm9200ek.o 37obj-$(CONFIG_MACH_AT91RM9200EK) += board-rm9200ek.o
41obj-$(CONFIG_MACH_CSB337) += board-csb337.o 38obj-$(CONFIG_MACH_CSB337) += board-csb337.o
42obj-$(CONFIG_MACH_CSB637) += board-csb637.o 39obj-$(CONFIG_MACH_CSB637) += board-csb637.o
@@ -55,7 +52,6 @@ obj-$(CONFIG_MACH_RSI_EWS) += board-rsi-ews.o
55obj-$(CONFIG_MACH_AT91SAM9260EK) += board-sam9260ek.o 52obj-$(CONFIG_MACH_AT91SAM9260EK) += board-sam9260ek.o
56obj-$(CONFIG_MACH_CAM60) += board-cam60.o 53obj-$(CONFIG_MACH_CAM60) += board-cam60.o
57obj-$(CONFIG_MACH_SAM9_L9260) += board-sam9-l9260.o 54obj-$(CONFIG_MACH_SAM9_L9260) += board-sam9-l9260.o
58obj-$(CONFIG_MACH_USB_A9260) += board-usb-a926x.o
59obj-$(CONFIG_MACH_QIL_A9260) += board-qil-a9260.o 55obj-$(CONFIG_MACH_QIL_A9260) += board-qil-a9260.o
60obj-$(CONFIG_MACH_AFEB9260) += board-afeb-9260v1.o 56obj-$(CONFIG_MACH_AFEB9260) += board-afeb-9260v1.o
61obj-$(CONFIG_MACH_CPU9260) += board-cpu9krea.o 57obj-$(CONFIG_MACH_CPU9260) += board-cpu9krea.o
@@ -67,7 +63,6 @@ obj-$(CONFIG_MACH_AT91SAM9G10EK) += board-sam9261ek.o
67 63
68# AT91SAM9263 board-specific support 64# AT91SAM9263 board-specific support
69obj-$(CONFIG_MACH_AT91SAM9263EK) += board-sam9263ek.o 65obj-$(CONFIG_MACH_AT91SAM9263EK) += board-sam9263ek.o
70obj-$(CONFIG_MACH_USB_A9263) += board-usb-a926x.o
71 66
72# AT91SAM9RL board-specific support 67# AT91SAM9RL board-specific support
73obj-$(CONFIG_MACH_AT91SAM9RLEK) += board-sam9rlek.o 68obj-$(CONFIG_MACH_AT91SAM9RLEK) += board-sam9rlek.o
@@ -80,7 +75,6 @@ obj-$(CONFIG_MACH_STAMP9G20) += board-stamp9g20.o
80obj-$(CONFIG_MACH_PORTUXG20) += board-stamp9g20.o 75obj-$(CONFIG_MACH_PORTUXG20) += board-stamp9g20.o
81obj-$(CONFIG_MACH_PCONTROL_G20) += board-pcontrol-g20.o board-stamp9g20.o 76obj-$(CONFIG_MACH_PCONTROL_G20) += board-pcontrol-g20.o board-stamp9g20.o
82obj-$(CONFIG_MACH_GSIA18S) += board-gsia18s.o board-stamp9g20.o 77obj-$(CONFIG_MACH_GSIA18S) += board-gsia18s.o board-stamp9g20.o
83obj-$(CONFIG_MACH_USB_A9G20) += board-usb-a926x.o
84 78
85# AT91SAM9260/AT91SAM9G20 board-specific support 79# AT91SAM9260/AT91SAM9G20 board-specific support
86obj-$(CONFIG_MACH_SNAPPER_9260) += board-snapper9260.o 80obj-$(CONFIG_MACH_SNAPPER_9260) += board-snapper9260.o
diff --git a/arch/arm/mach-at91/at91rm9200.c b/arch/arm/mach-at91/at91rm9200.c
index d193a409bc45..4aad93d54d6f 100644
--- a/arch/arm/mach-at91/at91rm9200.c
+++ b/arch/arm/mach-at91/at91rm9200.c
@@ -11,6 +11,7 @@
11 */ 11 */
12 12
13#include <linux/module.h> 13#include <linux/module.h>
14#include <linux/reboot.h>
14 15
15#include <asm/irq.h> 16#include <asm/irq.h>
16#include <asm/mach/arch.h> 17#include <asm/mach/arch.h>
@@ -304,7 +305,7 @@ static void at91rm9200_idle(void)
304 at91_pmc_write(AT91_PMC_SCDR, AT91_PMC_PCK); 305 at91_pmc_write(AT91_PMC_SCDR, AT91_PMC_PCK);
305} 306}
306 307
307static void at91rm9200_restart(char mode, const char *cmd) 308static void at91rm9200_restart(enum reboot_mode reboot_mode, const char *cmd)
308{ 309{
309 /* 310 /*
310 * Perform a hardware reset with the use of the Watchdog timer. 311 * Perform a hardware reset with the use of the Watchdog timer.
@@ -332,10 +333,6 @@ static void __init at91rm9200_initialize(void)
332{ 333{
333 arm_pm_idle = at91rm9200_idle; 334 arm_pm_idle = at91rm9200_idle;
334 arm_pm_restart = at91rm9200_restart; 335 arm_pm_restart = at91rm9200_restart;
335 at91_extern_irq = (1 << AT91RM9200_ID_IRQ0) | (1 << AT91RM9200_ID_IRQ1)
336 | (1 << AT91RM9200_ID_IRQ2) | (1 << AT91RM9200_ID_IRQ3)
337 | (1 << AT91RM9200_ID_IRQ4) | (1 << AT91RM9200_ID_IRQ5)
338 | (1 << AT91RM9200_ID_IRQ6);
339 336
340 /* Initialize GPIO subsystem */ 337 /* Initialize GPIO subsystem */
341 at91_gpio_init(at91rm9200_gpio, 338 at91_gpio_init(at91rm9200_gpio,
@@ -388,6 +385,10 @@ static unsigned int at91rm9200_default_irq_priority[NR_AIC_IRQS] __initdata = {
388AT91_SOC_START(at91rm9200) 385AT91_SOC_START(at91rm9200)
389 .map_io = at91rm9200_map_io, 386 .map_io = at91rm9200_map_io,
390 .default_irq_priority = at91rm9200_default_irq_priority, 387 .default_irq_priority = at91rm9200_default_irq_priority,
388 .extern_irq = (1 << AT91RM9200_ID_IRQ0) | (1 << AT91RM9200_ID_IRQ1)
389 | (1 << AT91RM9200_ID_IRQ2) | (1 << AT91RM9200_ID_IRQ3)
390 | (1 << AT91RM9200_ID_IRQ4) | (1 << AT91RM9200_ID_IRQ5)
391 | (1 << AT91RM9200_ID_IRQ6),
391 .ioremap_registers = at91rm9200_ioremap_registers, 392 .ioremap_registers = at91rm9200_ioremap_registers,
392 .register_clocks = at91rm9200_register_clocks, 393 .register_clocks = at91rm9200_register_clocks,
393 .init = at91rm9200_initialize, 394 .init = at91rm9200_initialize,
diff --git a/arch/arm/mach-at91/at91sam9260.c b/arch/arm/mach-at91/at91sam9260.c
index a8ce24538da6..5de6074b4f4f 100644
--- a/arch/arm/mach-at91/at91sam9260.c
+++ b/arch/arm/mach-at91/at91sam9260.c
@@ -348,8 +348,6 @@ static void __init at91sam9260_initialize(void)
348{ 348{
349 arm_pm_idle = at91sam9_idle; 349 arm_pm_idle = at91sam9_idle;
350 arm_pm_restart = at91sam9_alt_restart; 350 arm_pm_restart = at91sam9_alt_restart;
351 at91_extern_irq = (1 << AT91SAM9260_ID_IRQ0) | (1 << AT91SAM9260_ID_IRQ1)
352 | (1 << AT91SAM9260_ID_IRQ2);
353 351
354 /* Register GPIO subsystem */ 352 /* Register GPIO subsystem */
355 at91_gpio_init(at91sam9260_gpio, 3); 353 at91_gpio_init(at91sam9260_gpio, 3);
@@ -400,6 +398,8 @@ static unsigned int at91sam9260_default_irq_priority[NR_AIC_IRQS] __initdata = {
400AT91_SOC_START(at91sam9260) 398AT91_SOC_START(at91sam9260)
401 .map_io = at91sam9260_map_io, 399 .map_io = at91sam9260_map_io,
402 .default_irq_priority = at91sam9260_default_irq_priority, 400 .default_irq_priority = at91sam9260_default_irq_priority,
401 .extern_irq = (1 << AT91SAM9260_ID_IRQ0) | (1 << AT91SAM9260_ID_IRQ1)
402 | (1 << AT91SAM9260_ID_IRQ2),
403 .ioremap_registers = at91sam9260_ioremap_registers, 403 .ioremap_registers = at91sam9260_ioremap_registers,
404 .register_clocks = at91sam9260_register_clocks, 404 .register_clocks = at91sam9260_register_clocks,
405 .init = at91sam9260_initialize, 405 .init = at91sam9260_initialize,
diff --git a/arch/arm/mach-at91/at91sam9261.c b/arch/arm/mach-at91/at91sam9261.c
index 25efb5ac30f1..0e0793241ab7 100644
--- a/arch/arm/mach-at91/at91sam9261.c
+++ b/arch/arm/mach-at91/at91sam9261.c
@@ -290,8 +290,6 @@ static void __init at91sam9261_initialize(void)
290{ 290{
291 arm_pm_idle = at91sam9_idle; 291 arm_pm_idle = at91sam9_idle;
292 arm_pm_restart = at91sam9_alt_restart; 292 arm_pm_restart = at91sam9_alt_restart;
293 at91_extern_irq = (1 << AT91SAM9261_ID_IRQ0) | (1 << AT91SAM9261_ID_IRQ1)
294 | (1 << AT91SAM9261_ID_IRQ2);
295 293
296 /* Register GPIO subsystem */ 294 /* Register GPIO subsystem */
297 at91_gpio_init(at91sam9261_gpio, 3); 295 at91_gpio_init(at91sam9261_gpio, 3);
@@ -342,6 +340,8 @@ static unsigned int at91sam9261_default_irq_priority[NR_AIC_IRQS] __initdata = {
342AT91_SOC_START(at91sam9261) 340AT91_SOC_START(at91sam9261)
343 .map_io = at91sam9261_map_io, 341 .map_io = at91sam9261_map_io,
344 .default_irq_priority = at91sam9261_default_irq_priority, 342 .default_irq_priority = at91sam9261_default_irq_priority,
343 .extern_irq = (1 << AT91SAM9261_ID_IRQ0) | (1 << AT91SAM9261_ID_IRQ1)
344 | (1 << AT91SAM9261_ID_IRQ2),
345 .ioremap_registers = at91sam9261_ioremap_registers, 345 .ioremap_registers = at91sam9261_ioremap_registers,
346 .register_clocks = at91sam9261_register_clocks, 346 .register_clocks = at91sam9261_register_clocks,
347 .init = at91sam9261_initialize, 347 .init = at91sam9261_initialize,
diff --git a/arch/arm/mach-at91/at91sam9263.c b/arch/arm/mach-at91/at91sam9263.c
index f44ffd2105a7..6ce7d1850893 100644
--- a/arch/arm/mach-at91/at91sam9263.c
+++ b/arch/arm/mach-at91/at91sam9263.c
@@ -327,7 +327,6 @@ static void __init at91sam9263_initialize(void)
327{ 327{
328 arm_pm_idle = at91sam9_idle; 328 arm_pm_idle = at91sam9_idle;
329 arm_pm_restart = at91sam9_alt_restart; 329 arm_pm_restart = at91sam9_alt_restart;
330 at91_extern_irq = (1 << AT91SAM9263_ID_IRQ0) | (1 << AT91SAM9263_ID_IRQ1);
331 330
332 /* Register GPIO subsystem */ 331 /* Register GPIO subsystem */
333 at91_gpio_init(at91sam9263_gpio, 5); 332 at91_gpio_init(at91sam9263_gpio, 5);
@@ -378,6 +377,7 @@ static unsigned int at91sam9263_default_irq_priority[NR_AIC_IRQS] __initdata = {
378AT91_SOC_START(at91sam9263) 377AT91_SOC_START(at91sam9263)
379 .map_io = at91sam9263_map_io, 378 .map_io = at91sam9263_map_io,
380 .default_irq_priority = at91sam9263_default_irq_priority, 379 .default_irq_priority = at91sam9263_default_irq_priority,
380 .extern_irq = (1 << AT91SAM9263_ID_IRQ0) | (1 << AT91SAM9263_ID_IRQ1),
381 .ioremap_registers = at91sam9263_ioremap_registers, 381 .ioremap_registers = at91sam9263_ioremap_registers,
382 .register_clocks = at91sam9263_register_clocks, 382 .register_clocks = at91sam9263_register_clocks,
383 .init = at91sam9263_initialize, 383 .init = at91sam9263_initialize,
diff --git a/arch/arm/mach-at91/at91sam9g45.c b/arch/arm/mach-at91/at91sam9g45.c
index 8b7fce067652..474ee04d24b9 100644
--- a/arch/arm/mach-at91/at91sam9g45.c
+++ b/arch/arm/mach-at91/at91sam9g45.c
@@ -266,6 +266,8 @@ static struct clk_lookup periph_clocks_lookups[] = {
266 CLKDEV_CON_DEV_ID(NULL, "fff88000.i2c", &twi1_clk), 266 CLKDEV_CON_DEV_ID(NULL, "fff88000.i2c", &twi1_clk),
267 CLKDEV_CON_DEV_ID("spi_clk", "fffa4000.spi", &spi0_clk), 267 CLKDEV_CON_DEV_ID("spi_clk", "fffa4000.spi", &spi0_clk),
268 CLKDEV_CON_DEV_ID("spi_clk", "fffa8000.spi", &spi1_clk), 268 CLKDEV_CON_DEV_ID("spi_clk", "fffa8000.spi", &spi1_clk),
269 CLKDEV_CON_DEV_ID("hclk", "600000.gadget", &utmi_clk),
270 CLKDEV_CON_DEV_ID("pclk", "600000.gadget", &udphs_clk),
269 /* fake hclk clock */ 271 /* fake hclk clock */
270 CLKDEV_CON_DEV_ID("hclk", "at91_ohci", &uhphs_clk), 272 CLKDEV_CON_DEV_ID("hclk", "at91_ohci", &uhphs_clk),
271 CLKDEV_CON_DEV_ID(NULL, "fffff200.gpio", &pioA_clk), 273 CLKDEV_CON_DEV_ID(NULL, "fffff200.gpio", &pioA_clk),
@@ -374,7 +376,6 @@ static void __init at91sam9g45_initialize(void)
374{ 376{
375 arm_pm_idle = at91sam9_idle; 377 arm_pm_idle = at91sam9_idle;
376 arm_pm_restart = at91sam9g45_restart; 378 arm_pm_restart = at91sam9g45_restart;
377 at91_extern_irq = (1 << AT91SAM9G45_ID_IRQ0);
378 379
379 /* Register GPIO subsystem */ 380 /* Register GPIO subsystem */
380 at91_gpio_init(at91sam9g45_gpio, 5); 381 at91_gpio_init(at91sam9g45_gpio, 5);
@@ -425,6 +426,7 @@ static unsigned int at91sam9g45_default_irq_priority[NR_AIC_IRQS] __initdata = {
425AT91_SOC_START(at91sam9g45) 426AT91_SOC_START(at91sam9g45)
426 .map_io = at91sam9g45_map_io, 427 .map_io = at91sam9g45_map_io,
427 .default_irq_priority = at91sam9g45_default_irq_priority, 428 .default_irq_priority = at91sam9g45_default_irq_priority,
429 .extern_irq = (1 << AT91SAM9G45_ID_IRQ0),
428 .ioremap_registers = at91sam9g45_ioremap_registers, 430 .ioremap_registers = at91sam9g45_ioremap_registers,
429 .register_clocks = at91sam9g45_register_clocks, 431 .register_clocks = at91sam9g45_register_clocks,
430 .init = at91sam9g45_initialize, 432 .init = at91sam9g45_initialize,
diff --git a/arch/arm/mach-at91/at91sam9rl.c b/arch/arm/mach-at91/at91sam9rl.c
index f77fae5591bc..d4ec0d9a9872 100644
--- a/arch/arm/mach-at91/at91sam9rl.c
+++ b/arch/arm/mach-at91/at91sam9rl.c
@@ -293,7 +293,6 @@ static void __init at91sam9rl_initialize(void)
293{ 293{
294 arm_pm_idle = at91sam9_idle; 294 arm_pm_idle = at91sam9_idle;
295 arm_pm_restart = at91sam9_alt_restart; 295 arm_pm_restart = at91sam9_alt_restart;
296 at91_extern_irq = (1 << AT91SAM9RL_ID_IRQ0);
297 296
298 /* Register GPIO subsystem */ 297 /* Register GPIO subsystem */
299 at91_gpio_init(at91sam9rl_gpio, 4); 298 at91_gpio_init(at91sam9rl_gpio, 4);
@@ -344,6 +343,7 @@ static unsigned int at91sam9rl_default_irq_priority[NR_AIC_IRQS] __initdata = {
344AT91_SOC_START(at91sam9rl) 343AT91_SOC_START(at91sam9rl)
345 .map_io = at91sam9rl_map_io, 344 .map_io = at91sam9rl_map_io,
346 .default_irq_priority = at91sam9rl_default_irq_priority, 345 .default_irq_priority = at91sam9rl_default_irq_priority,
346 .extern_irq = (1 << AT91SAM9RL_ID_IRQ0),
347 .ioremap_registers = at91sam9rl_ioremap_registers, 347 .ioremap_registers = at91sam9rl_ioremap_registers,
348 .register_clocks = at91sam9rl_register_clocks, 348 .register_clocks = at91sam9rl_register_clocks,
349 .init = at91sam9rl_initialize, 349 .init = at91sam9rl_initialize,
diff --git a/arch/arm/mach-at91/at91sam9x5.c b/arch/arm/mach-at91/at91sam9x5.c
index e631fec040ce..2abee6626aac 100644
--- a/arch/arm/mach-at91/at91sam9x5.c
+++ b/arch/arm/mach-at91/at91sam9x5.c
@@ -249,6 +249,8 @@ static struct clk_lookup periph_clocks_lookups[] = {
249 CLKDEV_CON_DEV_ID("hclk", "600000.ohci", &uhphs_clk), 249 CLKDEV_CON_DEV_ID("hclk", "600000.ohci", &uhphs_clk),
250 CLKDEV_CON_DEV_ID("ohci_clk", "600000.ohci", &uhphs_clk), 250 CLKDEV_CON_DEV_ID("ohci_clk", "600000.ohci", &uhphs_clk),
251 CLKDEV_CON_DEV_ID("ehci_clk", "700000.ehci", &uhphs_clk), 251 CLKDEV_CON_DEV_ID("ehci_clk", "700000.ehci", &uhphs_clk),
252 CLKDEV_CON_DEV_ID("hclk", "500000.gadget", &utmi_clk),
253 CLKDEV_CON_DEV_ID("pclk", "500000.gadget", &udphs_clk),
252}; 254};
253 255
254/* 256/*
diff --git a/arch/arm/mach-at91/at91x40.c b/arch/arm/mach-at91/at91x40.c
index 19ca79396905..bad94b84a46f 100644
--- a/arch/arm/mach-at91/at91x40.c
+++ b/arch/arm/mach-at91/at91x40.c
@@ -55,8 +55,6 @@ static void at91x40_idle(void)
55void __init at91x40_initialize(unsigned long main_clock) 55void __init at91x40_initialize(unsigned long main_clock)
56{ 56{
57 arm_pm_idle = at91x40_idle; 57 arm_pm_idle = at91x40_idle;
58 at91_extern_irq = (1 << AT91X40_ID_IRQ0) | (1 << AT91X40_ID_IRQ1)
59 | (1 << AT91X40_ID_IRQ2);
60} 58}
61 59
62/* 60/*
@@ -86,9 +84,10 @@ static unsigned int at91x40_default_irq_priority[NR_AIC_IRQS] __initdata = {
86 84
87void __init at91x40_init_interrupts(unsigned int priority[NR_AIC_IRQS]) 85void __init at91x40_init_interrupts(unsigned int priority[NR_AIC_IRQS])
88{ 86{
87 u32 extern_irq = (1 << AT91X40_ID_IRQ0) | (1 << AT91X40_ID_IRQ1)
88 | (1 << AT91X40_ID_IRQ2);
89 if (!priority) 89 if (!priority)
90 priority = at91x40_default_irq_priority; 90 priority = at91x40_default_irq_priority;
91 91
92 at91_aic_init(priority, at91_extern_irq); 92 at91_aic_init(priority, extern_irq);
93} 93}
94
diff --git a/arch/arm/mach-at91/board-dt-sama5.c b/arch/arm/mach-at91/board-dt-sama5.c
index 705305e62bbc..ad95f6a23a28 100644
--- a/arch/arm/mach-at91/board-dt-sama5.c
+++ b/arch/arm/mach-at91/board-dt-sama5.c
@@ -62,7 +62,8 @@ static int ksz9021rn_phy_fixup(struct phy_device *phy)
62 62
63static void __init sama5_dt_device_init(void) 63static void __init sama5_dt_device_init(void)
64{ 64{
65 if (of_machine_is_compatible("atmel,sama5d3xcm")) 65 if (of_machine_is_compatible("atmel,sama5d3xcm") &&
66 IS_ENABLED(CONFIG_PHYLIB))
66 phy_register_fixup_for_uid(PHY_ID_KSZ9021, MICREL_PHY_ID_MASK, 67 phy_register_fixup_for_uid(PHY_ID_KSZ9021, MICREL_PHY_ID_MASK,
67 ksz9021rn_phy_fixup); 68 ksz9021rn_phy_fixup);
68 69
diff --git a/arch/arm/mach-at91/board-rm9200dk.c b/arch/arm/mach-at91/board-rm9200dk.c
deleted file mode 100644
index 690541b18cbc..000000000000
--- a/arch/arm/mach-at91/board-rm9200dk.c
+++ /dev/null
@@ -1,228 +0,0 @@
1/*
2 * linux/arch/arm/mach-at91/board-rm9200dk.c
3 *
4 * Copyright (C) 2005 SAN People
5 *
6 * Epson S1D framebuffer glue code is:
7 * Copyright (C) 2005 Thibaut VARENE <varenet@parisc-linux.org>
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 */
23
24#include <linux/types.h>
25#include <linux/gpio.h>
26#include <linux/init.h>
27#include <linux/mm.h>
28#include <linux/module.h>
29#include <linux/platform_device.h>
30#include <linux/spi/spi.h>
31#include <linux/mtd/physmap.h>
32
33#include <asm/setup.h>
34#include <asm/mach-types.h>
35#include <asm/irq.h>
36
37#include <asm/mach/arch.h>
38#include <asm/mach/map.h>
39#include <asm/mach/irq.h>
40
41#include <mach/hardware.h>
42#include <mach/at91rm9200_mc.h>
43#include <mach/at91_ramc.h>
44
45#include "at91_aic.h"
46#include "board.h"
47#include "generic.h"
48
49
50static void __init dk_init_early(void)
51{
52 /* Initialize processor: 18.432 MHz crystal */
53 at91_initialize(18432000);
54}
55
56static struct macb_platform_data __initdata dk_eth_data = {
57 .phy_irq_pin = AT91_PIN_PC4,
58 .is_rmii = 1,
59};
60
61static struct at91_usbh_data __initdata dk_usbh_data = {
62 .ports = 2,
63 .vbus_pin = {-EINVAL, -EINVAL},
64 .overcurrent_pin= {-EINVAL, -EINVAL},
65};
66
67static struct at91_udc_data __initdata dk_udc_data = {
68 .vbus_pin = AT91_PIN_PD4,
69 .pullup_pin = AT91_PIN_PD5,
70};
71
72static struct at91_cf_data __initdata dk_cf_data = {
73 .irq_pin = -EINVAL,
74 .det_pin = AT91_PIN_PB0,
75 .vcc_pin = -EINVAL,
76 .rst_pin = AT91_PIN_PC5,
77};
78
79#ifndef CONFIG_MTD_AT91_DATAFLASH_CARD
80static struct mci_platform_data __initdata dk_mci0_data = {
81 .slot[0] = {
82 .bus_width = 4,
83 .detect_pin = -EINVAL,
84 .wp_pin = -EINVAL,
85 },
86};
87#endif
88
89static struct spi_board_info dk_spi_devices[] = {
90 { /* DataFlash chip */
91 .modalias = "mtd_dataflash",
92 .chip_select = 0,
93 .max_speed_hz = 15 * 1000 * 1000,
94 },
95 { /* UR6HCPS2-SP40 PS2-to-SPI adapter */
96 .modalias = "ur6hcps2",
97 .chip_select = 1,
98 .max_speed_hz = 250 * 1000,
99 },
100 { /* TLV1504 ADC, 4 channels, 10 bits; one is a temp sensor */
101 .modalias = "tlv1504",
102 .chip_select = 2,
103 .max_speed_hz = 20 * 1000 * 1000,
104 },
105#ifdef CONFIG_MTD_AT91_DATAFLASH_CARD
106 { /* DataFlash card */
107 .modalias = "mtd_dataflash",
108 .chip_select = 3,
109 .max_speed_hz = 15 * 1000 * 1000,
110 }
111#endif
112};
113
114static struct i2c_board_info __initdata dk_i2c_devices[] = {
115 {
116 I2C_BOARD_INFO("ics1523", 0x26),
117 },
118 {
119 I2C_BOARD_INFO("x9429", 0x28),
120 },
121 {
122 I2C_BOARD_INFO("24c1024", 0x50),
123 }
124};
125
126static struct mtd_partition __initdata dk_nand_partition[] = {
127 {
128 .name = "NAND Partition 1",
129 .offset = 0,
130 .size = MTDPART_SIZ_FULL,
131 },
132};
133
134static struct atmel_nand_data __initdata dk_nand_data = {
135 .ale = 22,
136 .cle = 21,
137 .det_pin = AT91_PIN_PB1,
138 .rdy_pin = AT91_PIN_PC2,
139 .enable_pin = -EINVAL,
140 .ecc_mode = NAND_ECC_SOFT,
141 .on_flash_bbt = 1,
142 .parts = dk_nand_partition,
143 .num_parts = ARRAY_SIZE(dk_nand_partition),
144};
145
146#define DK_FLASH_BASE AT91_CHIPSELECT_0
147#define DK_FLASH_SIZE SZ_2M
148
149static struct physmap_flash_data dk_flash_data = {
150 .width = 2,
151};
152
153static struct resource dk_flash_resource = {
154 .start = DK_FLASH_BASE,
155 .end = DK_FLASH_BASE + DK_FLASH_SIZE - 1,
156 .flags = IORESOURCE_MEM,
157};
158
159static struct platform_device dk_flash = {
160 .name = "physmap-flash",
161 .id = 0,
162 .dev = {
163 .platform_data = &dk_flash_data,
164 },
165 .resource = &dk_flash_resource,
166 .num_resources = 1,
167};
168
169static struct gpio_led dk_leds[] = {
170 {
171 .name = "led0",
172 .gpio = AT91_PIN_PB2,
173 .active_low = 1,
174 .default_trigger = "heartbeat",
175 }
176};
177
178static void __init dk_board_init(void)
179{
180 /* Serial */
181 /* DBGU on ttyS0. (Rx & Tx only) */
182 at91_register_uart(0, 0, 0);
183
184 /* USART1 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */
185 at91_register_uart(AT91RM9200_ID_US1, 1, ATMEL_UART_CTS | ATMEL_UART_RTS
186 | ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD
187 | ATMEL_UART_RI);
188 at91_add_device_serial();
189 /* Ethernet */
190 at91_add_device_eth(&dk_eth_data);
191 /* USB Host */
192 at91_add_device_usbh(&dk_usbh_data);
193 /* USB Device */
194 at91_add_device_udc(&dk_udc_data);
195 at91_set_multi_drive(dk_udc_data.pullup_pin, 1); /* pullup_pin is connected to reset */
196 /* Compact Flash */
197 at91_add_device_cf(&dk_cf_data);
198 /* I2C */
199 at91_add_device_i2c(dk_i2c_devices, ARRAY_SIZE(dk_i2c_devices));
200 /* SPI */
201 at91_add_device_spi(dk_spi_devices, ARRAY_SIZE(dk_spi_devices));
202#ifdef CONFIG_MTD_AT91_DATAFLASH_CARD
203 /* DataFlash card */
204 at91_set_gpio_output(AT91_PIN_PB7, 0);
205#else
206 /* MMC */
207 at91_set_gpio_output(AT91_PIN_PB7, 1); /* this MMC card slot can optionally use SPI signaling (CS3). */
208 at91_add_device_mci(0, &dk_mci0_data);
209#endif
210 /* NAND */
211 at91_add_device_nand(&dk_nand_data);
212 /* NOR Flash */
213 platform_device_register(&dk_flash);
214 /* LEDs */
215 at91_gpio_leds(dk_leds, ARRAY_SIZE(dk_leds));
216 /* VGA */
217// dk_add_device_video();
218}
219
220MACHINE_START(AT91RM9200DK, "Atmel AT91RM9200-DK")
221 /* Maintainer: SAN People/Atmel */
222 .init_time = at91rm9200_timer_init,
223 .map_io = at91_map_io,
224 .handle_irq = at91_aic_handle_irq,
225 .init_early = dk_init_early,
226 .init_irq = at91_init_irq_default,
227 .init_machine = dk_board_init,
228MACHINE_END
diff --git a/arch/arm/mach-at91/board-sam9261ek.c b/arch/arm/mach-at91/board-sam9261ek.c
index b446645c7727..d3437624ca4e 100644
--- a/arch/arm/mach-at91/board-sam9261ek.c
+++ b/arch/arm/mach-at91/board-sam9261ek.c
@@ -264,11 +264,7 @@ static void __init ek_add_device_ts(void) {}
264 */ 264 */
265static struct at73c213_board_info at73c213_data = { 265static struct at73c213_board_info at73c213_data = {
266 .ssc_id = 1, 266 .ssc_id = 1,
267#if defined(CONFIG_MACH_AT91SAM9261EK) 267 .shortname = "AT91SAM9261/9G10-EK external DAC",
268 .shortname = "AT91SAM9261-EK external DAC",
269#else
270 .shortname = "AT91SAM9G10-EK external DAC",
271#endif
272}; 268};
273 269
274#if defined(CONFIG_SND_AT73C213) || defined(CONFIG_SND_AT73C213_MODULE) 270#if defined(CONFIG_SND_AT73C213) || defined(CONFIG_SND_AT73C213_MODULE)
@@ -412,9 +408,6 @@ static struct atmel_lcdfb_info __initdata ek_lcdc_data = {
412 .default_monspecs = &at91fb_default_stn_monspecs, 408 .default_monspecs = &at91fb_default_stn_monspecs,
413 .atmel_lcdfb_power_control = at91_lcdc_stn_power_control, 409 .atmel_lcdfb_power_control = at91_lcdc_stn_power_control,
414 .guard_time = 1, 410 .guard_time = 1,
415#if defined(CONFIG_MACH_AT91SAM9G10EK)
416 .lcd_wiring_mode = ATMEL_LCDC_WIRING_RGB,
417#endif
418}; 411};
419 412
420#else 413#else
@@ -468,9 +461,6 @@ static struct atmel_lcdfb_info __initdata ek_lcdc_data = {
468 .default_monspecs = &at91fb_default_tft_monspecs, 461 .default_monspecs = &at91fb_default_tft_monspecs,
469 .atmel_lcdfb_power_control = at91_lcdc_tft_power_control, 462 .atmel_lcdfb_power_control = at91_lcdc_tft_power_control,
470 .guard_time = 1, 463 .guard_time = 1,
471#if defined(CONFIG_MACH_AT91SAM9G10EK)
472 .lcd_wiring_mode = ATMEL_LCDC_WIRING_RGB,
473#endif
474}; 464};
475#endif 465#endif
476 466
@@ -574,6 +564,10 @@ static void __init ek_board_init(void)
574 /* DBGU on ttyS0. (Rx & Tx only) */ 564 /* DBGU on ttyS0. (Rx & Tx only) */
575 at91_register_uart(0, 0, 0); 565 at91_register_uart(0, 0, 0);
576 at91_add_device_serial(); 566 at91_add_device_serial();
567
568 if (cpu_is_at91sam9g10())
569 ek_lcdc_data.lcd_wiring_mode = ATMEL_LCDC_WIRING_RGB;
570
577 /* USB Host */ 571 /* USB Host */
578 at91_add_device_usbh(&ek_usbh_data); 572 at91_add_device_usbh(&ek_usbh_data);
579 /* USB Device */ 573 /* USB Device */
@@ -606,11 +600,17 @@ static void __init ek_board_init(void)
606 at91_gpio_leds(ek_leds, ARRAY_SIZE(ek_leds)); 600 at91_gpio_leds(ek_leds, ARRAY_SIZE(ek_leds));
607} 601}
608 602
609#if defined(CONFIG_MACH_AT91SAM9261EK)
610MACHINE_START(AT91SAM9261EK, "Atmel AT91SAM9261-EK") 603MACHINE_START(AT91SAM9261EK, "Atmel AT91SAM9261-EK")
611#else 604 /* Maintainer: Atmel */
605 .init_time = at91sam926x_pit_init,
606 .map_io = at91_map_io,
607 .handle_irq = at91_aic_handle_irq,
608 .init_early = ek_init_early,
609 .init_irq = at91_init_irq_default,
610 .init_machine = ek_board_init,
611MACHINE_END
612
612MACHINE_START(AT91SAM9G10EK, "Atmel AT91SAM9G10-EK") 613MACHINE_START(AT91SAM9G10EK, "Atmel AT91SAM9G10-EK")
613#endif
614 /* Maintainer: Atmel */ 614 /* Maintainer: Atmel */
615 .init_time = at91sam926x_pit_init, 615 .init_time = at91sam926x_pit_init,
616 .map_io = at91_map_io, 616 .map_io = at91_map_io,
diff --git a/arch/arm/mach-at91/board-usb-a926x.c b/arch/arm/mach-at91/board-usb-a926x.c
deleted file mode 100644
index 2487d944a1bc..000000000000
--- a/arch/arm/mach-at91/board-usb-a926x.c
+++ /dev/null
@@ -1,384 +0,0 @@
1/*
2 * linux/arch/arm/mach-at91/board-usb-a926x.c
3 *
4 * Copyright (C) 2005 SAN People
5 * Copyright (C) 2007 Atmel Corporation.
6 * Copyright (C) 2007 Calao-systems
7 * Copyright (C) 2011 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 */
23
24#include <linux/types.h>
25#include <linux/init.h>
26#include <linux/mm.h>
27#include <linux/module.h>
28#include <linux/platform_device.h>
29#include <linux/spi/spi.h>
30#include <linux/gpio_keys.h>
31#include <linux/gpio.h>
32#include <linux/input.h>
33#include <linux/spi/mmc_spi.h>
34
35#include <asm/setup.h>
36#include <asm/mach-types.h>
37#include <asm/irq.h>
38
39#include <asm/mach/arch.h>
40#include <asm/mach/map.h>
41#include <asm/mach/irq.h>
42
43#include <mach/hardware.h>
44#include <mach/at91sam9_smc.h>
45
46#include "at91_aic.h"
47#include "at91_shdwc.h"
48#include "board.h"
49#include "sam9_smc.h"
50#include "generic.h"
51
52
53static void __init ek_init_early(void)
54{
55 /* Initialize processor: 12.00 MHz crystal */
56 at91_initialize(12000000);
57}
58
59/*
60 * USB Host port
61 */
62static struct at91_usbh_data __initdata ek_usbh_data = {
63 .ports = 2,
64 .vbus_pin = {-EINVAL, -EINVAL},
65 .overcurrent_pin= {-EINVAL, -EINVAL},
66};
67
68/*
69 * USB Device port
70 */
71static struct at91_udc_data __initdata ek_udc_data = {
72 .vbus_pin = AT91_PIN_PB11,
73 .pullup_pin = -EINVAL, /* pull-up driven by UDC */
74};
75
76static void __init ek_add_device_udc(void)
77{
78 if (machine_is_usb_a9260() || machine_is_usb_a9g20())
79 ek_udc_data.vbus_pin = AT91_PIN_PC5;
80
81 at91_add_device_udc(&ek_udc_data);
82}
83
84#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE)
85#define MMC_SPI_CARD_DETECT_INT AT91_PIN_PC4
86static int at91_mmc_spi_init(struct device *dev,
87 irqreturn_t (*detect_int)(int, void *), void *data)
88{
89 /* Configure Interrupt pin as input, no pull-up */
90 at91_set_gpio_input(MMC_SPI_CARD_DETECT_INT, 0);
91 return request_irq(gpio_to_irq(MMC_SPI_CARD_DETECT_INT), detect_int,
92 IRQF_TRIGGER_FALLING | IRQF_TRIGGER_RISING,
93 "mmc-spi-detect", data);
94}
95
96static void at91_mmc_spi_exit(struct device *dev, void *data)
97{
98 free_irq(gpio_to_irq(MMC_SPI_CARD_DETECT_INT), data);
99}
100
101static struct mmc_spi_platform_data at91_mmc_spi_pdata = {
102 .init = at91_mmc_spi_init,
103 .exit = at91_mmc_spi_exit,
104 .detect_delay = 100, /* msecs */
105};
106#endif
107
108/*
109 * SPI devices.
110 */
111static struct spi_board_info usb_a9263_spi_devices[] = {
112 { /* DataFlash chip */
113 .modalias = "mtd_dataflash",
114 .chip_select = 0,
115 .max_speed_hz = 15 * 1000 * 1000,
116 .bus_num = 0,
117 }
118};
119
120static struct spi_board_info usb_a9g20_spi_devices[] = {
121#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE)
122 {
123 .modalias = "mmc_spi",
124 .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */
125 .bus_num = 1,
126 .chip_select = 0,
127 .platform_data = &at91_mmc_spi_pdata,
128 .mode = SPI_MODE_3,
129 },
130#endif
131};
132
133static void __init ek_add_device_spi(void)
134{
135 if (machine_is_usb_a9263())
136 at91_add_device_spi(usb_a9263_spi_devices, ARRAY_SIZE(usb_a9263_spi_devices));
137 else if (machine_is_usb_a9g20())
138 at91_add_device_spi(usb_a9g20_spi_devices, ARRAY_SIZE(usb_a9g20_spi_devices));
139}
140
141/*
142 * MACB Ethernet device
143 */
144static struct macb_platform_data __initdata ek_macb_data = {
145 .phy_irq_pin = AT91_PIN_PE31,
146 .is_rmii = 1,
147};
148
149static void __init ek_add_device_eth(void)
150{
151 if (machine_is_usb_a9260() || machine_is_usb_a9g20())
152 ek_macb_data.phy_irq_pin = AT91_PIN_PA31;
153
154 at91_add_device_eth(&ek_macb_data);
155}
156
157/*
158 * NAND flash
159 */
160static struct mtd_partition __initdata ek_nand_partition[] = {
161 {
162 .name = "barebox",
163 .offset = 0,
164 .size = 3 * SZ_128K,
165 }, {
166 .name = "bareboxenv",
167 .offset = MTDPART_OFS_NXTBLK,
168 .size = SZ_128K,
169 }, {
170 .name = "bareboxenv2",
171 .offset = MTDPART_OFS_NXTBLK,
172 .size = SZ_128K,
173 }, {
174 .name = "oftree",
175 .offset = MTDPART_OFS_NXTBLK,
176 .size = SZ_128K,
177 }, {
178 .name = "kernel",
179 .offset = MTDPART_OFS_NXTBLK,
180 .size = 4 * SZ_1M,
181 }, {
182 .name = "rootfs",
183 .offset = MTDPART_OFS_NXTBLK,
184 .size = 120 * SZ_1M,
185 }, {
186 .name = "data",
187 .offset = MTDPART_OFS_NXTBLK,
188 .size = MTDPART_SIZ_FULL,
189 }
190};
191
192static struct atmel_nand_data __initdata ek_nand_data = {
193 .ale = 21,
194 .cle = 22,
195 .det_pin = -EINVAL,
196 .rdy_pin = AT91_PIN_PA22,
197 .enable_pin = AT91_PIN_PD15,
198 .ecc_mode = NAND_ECC_SOFT,
199 .on_flash_bbt = 1,
200 .parts = ek_nand_partition,
201 .num_parts = ARRAY_SIZE(ek_nand_partition),
202};
203
204static struct sam9_smc_config __initdata usb_a9260_nand_smc_config = {
205 .ncs_read_setup = 0,
206 .nrd_setup = 1,
207 .ncs_write_setup = 0,
208 .nwe_setup = 1,
209
210 .ncs_read_pulse = 3,
211 .nrd_pulse = 3,
212 .ncs_write_pulse = 3,
213 .nwe_pulse = 3,
214
215 .read_cycle = 5,
216 .write_cycle = 5,
217
218 .mode = AT91_SMC_READMODE | AT91_SMC_WRITEMODE | AT91_SMC_EXNWMODE_DISABLE | AT91_SMC_DBW_8,
219 .tdf_cycles = 2,
220};
221
222static struct sam9_smc_config __initdata usb_a9g20_nand_smc_config = {
223 .ncs_read_setup = 0,
224 .nrd_setup = 2,
225 .ncs_write_setup = 0,
226 .nwe_setup = 2,
227
228 .ncs_read_pulse = 4,
229 .nrd_pulse = 4,
230 .ncs_write_pulse = 4,
231 .nwe_pulse = 4,
232
233 .read_cycle = 7,
234 .write_cycle = 7,
235
236 .mode = AT91_SMC_READMODE | AT91_SMC_WRITEMODE | AT91_SMC_EXNWMODE_DISABLE | AT91_SMC_DBW_8,
237 .tdf_cycles = 3,
238};
239
240static void __init ek_add_device_nand(void)
241{
242 if (machine_is_usb_a9260() || machine_is_usb_a9g20()) {
243 ek_nand_data.rdy_pin = AT91_PIN_PC13;
244 ek_nand_data.enable_pin = AT91_PIN_PC14;
245 }
246
247 /* configure chip-select 3 (NAND) */
248 if (machine_is_usb_a9g20())
249 sam9_smc_configure(0, 3, &usb_a9g20_nand_smc_config);
250 else
251 sam9_smc_configure(0, 3, &usb_a9260_nand_smc_config);
252
253 at91_add_device_nand(&ek_nand_data);
254}
255
256
257/*
258 * GPIO Buttons
259 */
260#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE)
261static struct gpio_keys_button ek_buttons[] = {
262 { /* USER PUSH BUTTON */
263 .code = KEY_ENTER,
264 .gpio = AT91_PIN_PB10,
265 .active_low = 1,
266 .desc = "user_pb",
267 .wakeup = 1,
268 }
269};
270
271static struct gpio_keys_platform_data ek_button_data = {
272 .buttons = ek_buttons,
273 .nbuttons = ARRAY_SIZE(ek_buttons),
274};
275
276static struct platform_device ek_button_device = {
277 .name = "gpio-keys",
278 .id = -1,
279 .num_resources = 0,
280 .dev = {
281 .platform_data = &ek_button_data,
282 }
283};
284
285static void __init ek_add_device_buttons(void)
286{
287 at91_set_GPIO_periph(AT91_PIN_PB10, 1); /* user push button, pull up enabled */
288 at91_set_deglitch(AT91_PIN_PB10, 1);
289
290 platform_device_register(&ek_button_device);
291}
292#else
293static void __init ek_add_device_buttons(void) {}
294#endif
295
296/*
297 * LEDs
298 */
299static struct gpio_led ek_leds[] = {
300 { /* user_led (green) */
301 .name = "user_led",
302 .gpio = AT91_PIN_PB21,
303 .active_low = 1,
304 .default_trigger = "heartbeat",
305 }
306};
307
308static struct i2c_board_info __initdata ek_i2c_devices[] = {
309 {
310 I2C_BOARD_INFO("rv3029c2", 0x56),
311 },
312};
313
314static void __init ek_add_device_leds(void)
315{
316 if (machine_is_usb_a9260() || machine_is_usb_a9g20())
317 ek_leds[0].active_low = 0;
318
319 at91_gpio_leds(ek_leds, ARRAY_SIZE(ek_leds));
320}
321
322static void __init ek_board_init(void)
323{
324 /* Serial */
325 /* DBGU on ttyS0. (Rx & Tx only) */
326 at91_register_uart(0, 0, 0);
327 at91_add_device_serial();
328 /* USB Host */
329 at91_add_device_usbh(&ek_usbh_data);
330 /* USB Device */
331 ek_add_device_udc();
332 /* SPI */
333 ek_add_device_spi();
334 /* Ethernet */
335 ek_add_device_eth();
336 /* NAND */
337 ek_add_device_nand();
338 /* Push Buttons */
339 ek_add_device_buttons();
340 /* LEDs */
341 ek_add_device_leds();
342
343 if (machine_is_usb_a9g20()) {
344 /* I2C */
345 at91_add_device_i2c(ek_i2c_devices, ARRAY_SIZE(ek_i2c_devices));
346 } else {
347 /* I2C */
348 at91_add_device_i2c(NULL, 0);
349 /* shutdown controller, wakeup button (5 msec low) */
350 at91_shdwc_write(AT91_SHDW_MR, AT91_SHDW_CPTWK0_(10)
351 | AT91_SHDW_WKMODE0_LOW
352 | AT91_SHDW_RTTWKEN);
353 }
354}
355
356MACHINE_START(USB_A9263, "CALAO USB_A9263")
357 /* Maintainer: calao-systems */
358 .init_time = at91sam926x_pit_init,
359 .map_io = at91_map_io,
360 .handle_irq = at91_aic_handle_irq,
361 .init_early = ek_init_early,
362 .init_irq = at91_init_irq_default,
363 .init_machine = ek_board_init,
364MACHINE_END
365
366MACHINE_START(USB_A9260, "CALAO USB_A9260")
367 /* Maintainer: calao-systems */
368 .init_time = at91sam926x_pit_init,
369 .map_io = at91_map_io,
370 .handle_irq = at91_aic_handle_irq,
371 .init_early = ek_init_early,
372 .init_irq = at91_init_irq_default,
373 .init_machine = ek_board_init,
374MACHINE_END
375
376MACHINE_START(USB_A9G20, "CALAO USB_A92G0")
377 /* Maintainer: Jean-Christophe PLAGNIOL-VILLARD */
378 .init_time = at91sam926x_pit_init,
379 .map_io = at91_map_io,
380 .handle_irq = at91_aic_handle_irq,
381 .init_early = ek_init_early,
382 .init_irq = at91_init_irq_default,
383 .init_machine = ek_board_init,
384MACHINE_END
diff --git a/arch/arm/mach-at91/clock.c b/arch/arm/mach-at91/clock.c
index da841885d01c..6b2630a92f71 100644
--- a/arch/arm/mach-at91/clock.c
+++ b/arch/arm/mach-at91/clock.c
@@ -75,7 +75,7 @@ EXPORT_SYMBOL_GPL(at91_pmc_base);
75#define cpu_has_pllb() (!(cpu_is_at91sam9rl() \ 75#define cpu_has_pllb() (!(cpu_is_at91sam9rl() \
76 || cpu_is_at91sam9g45() \ 76 || cpu_is_at91sam9g45() \
77 || cpu_is_at91sam9x5() \ 77 || cpu_is_at91sam9x5() \
78 || cpu_is_at91sam9n12())) 78 || cpu_is_sama5d3()))
79 79
80#define cpu_has_upll() (cpu_is_at91sam9g45() \ 80#define cpu_has_upll() (cpu_is_at91sam9g45() \
81 || cpu_is_at91sam9x5() \ 81 || cpu_is_at91sam9x5() \
@@ -489,7 +489,7 @@ static int at91_clk_show(struct seq_file *s, void *unused)
489 seq_printf(s, "UCKR = %8x\n", uckr); 489 seq_printf(s, "UCKR = %8x\n", uckr);
490 } 490 }
491 seq_printf(s, "MCKR = %8x\n", at91_pmc_read(AT91_PMC_MCKR)); 491 seq_printf(s, "MCKR = %8x\n", at91_pmc_read(AT91_PMC_MCKR));
492 if (cpu_has_upll()) 492 if (cpu_has_upll() || cpu_is_at91sam9n12())
493 seq_printf(s, "USB = %8x\n", at91_pmc_read(AT91_PMC_USB)); 493 seq_printf(s, "USB = %8x\n", at91_pmc_read(AT91_PMC_USB));
494 seq_printf(s, "SR = %8x\n", sr); 494 seq_printf(s, "SR = %8x\n", sr);
495 495
@@ -614,6 +614,8 @@ static u32 __init at91_usb_rate(struct clk *pll, u32 freq, u32 reg)
614{ 614{
615 if (pll == &pllb && (reg & AT91_PMC_USB96M)) 615 if (pll == &pllb && (reg & AT91_PMC_USB96M))
616 return freq / 2; 616 return freq / 2;
617 else if (pll == &utmi_clk || cpu_is_at91sam9n12())
618 return freq / (1 + ((reg & AT91_PMC_OHCIUSBDIV) >> 8));
617 else 619 else
618 return freq; 620 return freq;
619} 621}
@@ -683,6 +685,8 @@ static struct clk *const standard_pmc_clocks[] __initconst = {
683/* PLLB generated USB full speed clock init */ 685/* PLLB generated USB full speed clock init */
684static void __init at91_pllb_usbfs_clock_init(unsigned long main_clock) 686static void __init at91_pllb_usbfs_clock_init(unsigned long main_clock)
685{ 687{
688 unsigned int reg;
689
686 /* 690 /*
687 * USB clock init: choose 48 MHz PLLB value, 691 * USB clock init: choose 48 MHz PLLB value,
688 * disable 48MHz clock during usb peripheral suspend. 692 * disable 48MHz clock during usb peripheral suspend.
@@ -691,22 +695,35 @@ static void __init at91_pllb_usbfs_clock_init(unsigned long main_clock)
691 */ 695 */
692 uhpck.parent = &pllb; 696 uhpck.parent = &pllb;
693 697
694 at91_pllb_usb_init = at91_pll_calc(main_clock, 48000000 * 2) | AT91_PMC_USB96M; 698 reg = at91_pllb_usb_init = at91_pll_calc(main_clock, 48000000 * 2);
695 pllb.rate_hz = at91_pll_rate(&pllb, main_clock, at91_pllb_usb_init); 699 pllb.rate_hz = at91_pll_rate(&pllb, main_clock, at91_pllb_usb_init);
696 if (cpu_is_at91rm9200()) { 700 if (cpu_is_at91rm9200()) {
701 reg = at91_pllb_usb_init |= AT91_PMC_USB96M;
697 uhpck.pmc_mask = AT91RM9200_PMC_UHP; 702 uhpck.pmc_mask = AT91RM9200_PMC_UHP;
698 udpck.pmc_mask = AT91RM9200_PMC_UDP; 703 udpck.pmc_mask = AT91RM9200_PMC_UDP;
699 at91_pmc_write(AT91_PMC_SCER, AT91RM9200_PMC_MCKUDP); 704 at91_pmc_write(AT91_PMC_SCER, AT91RM9200_PMC_MCKUDP);
700 } else if (cpu_is_at91sam9260() || cpu_is_at91sam9261() || 705 } else if (cpu_is_at91sam9260() || cpu_is_at91sam9261() ||
701 cpu_is_at91sam9263() || cpu_is_at91sam9g20() || 706 cpu_is_at91sam9263() || cpu_is_at91sam9g20() ||
702 cpu_is_at91sam9g10()) { 707 cpu_is_at91sam9g10()) {
708 reg = at91_pllb_usb_init |= AT91_PMC_USB96M;
709 uhpck.pmc_mask = AT91SAM926x_PMC_UHP;
710 udpck.pmc_mask = AT91SAM926x_PMC_UDP;
711 } else if (cpu_is_at91sam9n12()) {
712 /* Divider for USB clock is in USB clock register for 9n12 */
713 reg = AT91_PMC_USBS_PLLB;
714
715 /* For PLLB output 96M, set usb divider 2 (USBDIV + 1) */
716 reg |= AT91_PMC_OHCIUSBDIV_2;
717 at91_pmc_write(AT91_PMC_USB, reg);
718
719 /* Still setup masks */
703 uhpck.pmc_mask = AT91SAM926x_PMC_UHP; 720 uhpck.pmc_mask = AT91SAM926x_PMC_UHP;
704 udpck.pmc_mask = AT91SAM926x_PMC_UDP; 721 udpck.pmc_mask = AT91SAM926x_PMC_UDP;
705 } 722 }
706 at91_pmc_write(AT91_CKGR_PLLBR, 0); 723 at91_pmc_write(AT91_CKGR_PLLBR, 0);
707 724
708 udpck.rate_hz = at91_usb_rate(&pllb, pllb.rate_hz, at91_pllb_usb_init); 725 udpck.rate_hz = at91_usb_rate(&pllb, pllb.rate_hz, reg);
709 uhpck.rate_hz = at91_usb_rate(&pllb, pllb.rate_hz, at91_pllb_usb_init); 726 uhpck.rate_hz = at91_usb_rate(&pllb, pllb.rate_hz, reg);
710} 727}
711 728
712/* UPLL generated USB full speed clock init */ 729/* UPLL generated USB full speed clock init */
@@ -725,8 +742,7 @@ static void __init at91_upll_usbfs_clock_init(unsigned long main_clock)
725 /* Now set uhpck values */ 742 /* Now set uhpck values */
726 uhpck.parent = &utmi_clk; 743 uhpck.parent = &utmi_clk;
727 uhpck.pmc_mask = AT91SAM926x_PMC_UHP; 744 uhpck.pmc_mask = AT91SAM926x_PMC_UHP;
728 uhpck.rate_hz = utmi_clk.rate_hz; 745 uhpck.rate_hz = at91_usb_rate(&utmi_clk, utmi_clk.rate_hz, usbr);
729 uhpck.rate_hz /= 1 + ((at91_pmc_read(AT91_PMC_USB) & AT91_PMC_OHCIUSBDIV) >> 8);
730} 746}
731 747
732static int __init at91_pmc_init(unsigned long main_clock) 748static int __init at91_pmc_init(unsigned long main_clock)
diff --git a/arch/arm/mach-at91/cpuidle.c b/arch/arm/mach-at91/cpuidle.c
index 69f9e3bbf4e5..4ec6a6d9b9be 100644
--- a/arch/arm/mach-at91/cpuidle.c
+++ b/arch/arm/mach-at91/cpuidle.c
@@ -51,7 +51,7 @@ static struct cpuidle_driver at91_idle_driver = {
51 .states[1] = { 51 .states[1] = {
52 .enter = at91_enter_idle, 52 .enter = at91_enter_idle,
53 .exit_latency = 10, 53 .exit_latency = 10,
54 .target_residency = 100000, 54 .target_residency = 10000,
55 .flags = CPUIDLE_FLAG_TIME_VALID, 55 .flags = CPUIDLE_FLAG_TIME_VALID,
56 .name = "RAM_SR", 56 .name = "RAM_SR",
57 .desc = "WFI and DDR Self Refresh", 57 .desc = "WFI and DDR Self Refresh",
diff --git a/arch/arm/mach-at91/generic.h b/arch/arm/mach-at91/generic.h
index 78ab06548658..dc6e2f5f804d 100644
--- a/arch/arm/mach-at91/generic.h
+++ b/arch/arm/mach-at91/generic.h
@@ -10,6 +10,7 @@
10 10
11#include <linux/clkdev.h> 11#include <linux/clkdev.h>
12#include <linux/of.h> 12#include <linux/of.h>
13#include <linux/reboot.h>
13 14
14 /* Map io */ 15 /* Map io */
15extern void __init at91_map_io(void); 16extern void __init at91_map_io(void);
@@ -60,8 +61,8 @@ extern void at91sam9_idle(void);
60 61
61/* reset */ 62/* reset */
62extern void at91_ioremap_rstc(u32 base_addr); 63extern void at91_ioremap_rstc(u32 base_addr);
63extern void at91sam9_alt_restart(char, const char *); 64extern void at91sam9_alt_restart(enum reboot_mode, const char *);
64extern void at91sam9g45_restart(char, const char *); 65extern void at91sam9g45_restart(enum reboot_mode, const char *);
65 66
66/* shutdown */ 67/* shutdown */
67extern void at91_ioremap_shdwc(u32 base_addr); 68extern void at91_ioremap_shdwc(u32 base_addr);
@@ -85,4 +86,4 @@ extern void __init at91_gpio_irq_setup(void);
85extern int __init at91_gpio_of_irq_setup(struct device_node *node, 86extern int __init at91_gpio_of_irq_setup(struct device_node *node,
86 struct device_node *parent); 87 struct device_node *parent);
87 88
88extern int at91_extern_irq; 89extern u32 at91_get_extern_irq(void);
diff --git a/arch/arm/mach-at91/include/mach/at91_pmc.h b/arch/arm/mach-at91/include/mach/at91_pmc.h
index 2bd7f51b0b82..c604cc69acb5 100644
--- a/arch/arm/mach-at91/include/mach/at91_pmc.h
+++ b/arch/arm/mach-at91/include/mach/at91_pmc.h
@@ -130,7 +130,10 @@ extern void __iomem *at91_pmc_base;
130#define AT91_PMC_USBS (0x1 << 0) /* USB OHCI Input clock selection */ 130#define AT91_PMC_USBS (0x1 << 0) /* USB OHCI Input clock selection */
131#define AT91_PMC_USBS_PLLA (0 << 0) 131#define AT91_PMC_USBS_PLLA (0 << 0)
132#define AT91_PMC_USBS_UPLL (1 << 0) 132#define AT91_PMC_USBS_UPLL (1 << 0)
133#define AT91_PMC_USBS_PLLB (1 << 0) /* [AT91SAMN12 only] */
133#define AT91_PMC_OHCIUSBDIV (0xF << 8) /* Divider for USB OHCI Clock */ 134#define AT91_PMC_OHCIUSBDIV (0xF << 8) /* Divider for USB OHCI Clock */
135#define AT91_PMC_OHCIUSBDIV_1 (0x0 << 8)
136#define AT91_PMC_OHCIUSBDIV_2 (0x1 << 8)
134 137
135#define AT91_PMC_SMD 0x3c /* Soft Modem Clock Register [some SAM9 only] */ 138#define AT91_PMC_SMD 0x3c /* Soft Modem Clock Register [some SAM9 only] */
136#define AT91_PMC_SMDS (0x1 << 0) /* SMD input clock selection */ 139#define AT91_PMC_SMDS (0x1 << 0) /* SMD input clock selection */
diff --git a/arch/arm/mach-at91/irq.c b/arch/arm/mach-at91/irq.c
index e0ca59171022..3d192c5aee66 100644
--- a/arch/arm/mach-at91/irq.c
+++ b/arch/arm/mach-at91/irq.c
@@ -232,7 +232,14 @@ static void __maybe_unused at91_aic5_eoi(struct irq_data *d)
232 at91_aic_write(AT91_AIC5_EOICR, 0); 232 at91_aic_write(AT91_AIC5_EOICR, 0);
233} 233}
234 234
235unsigned long *at91_extern_irq; 235static unsigned long *at91_extern_irq;
236
237u32 at91_get_extern_irq(void)
238{
239 if (!at91_extern_irq)
240 return 0;
241 return *at91_extern_irq;
242}
236 243
237#define is_extern_irq(hwirq) test_bit(hwirq, at91_extern_irq) 244#define is_extern_irq(hwirq) test_bit(hwirq, at91_extern_irq)
238 245
diff --git a/arch/arm/mach-at91/pm.c b/arch/arm/mach-at91/pm.c
index 530db304ec5e..15afb5d9271f 100644
--- a/arch/arm/mach-at91/pm.c
+++ b/arch/arm/mach-at91/pm.c
@@ -212,7 +212,7 @@ static int at91_pm_enter(suspend_state_t state)
212 (at91_pmc_read(AT91_PMC_PCSR) 212 (at91_pmc_read(AT91_PMC_PCSR)
213 | (1 << AT91_ID_FIQ) 213 | (1 << AT91_ID_FIQ)
214 | (1 << AT91_ID_SYS) 214 | (1 << AT91_ID_SYS)
215 | (at91_extern_irq)) 215 | (at91_get_extern_irq()))
216 & at91_aic_read(AT91_AIC_IMR), 216 & at91_aic_read(AT91_AIC_IMR),
217 state); 217 state);
218 218
diff --git a/arch/arm/mach-at91/setup.c b/arch/arm/mach-at91/setup.c
index e2f4bdd146d6..b17fbcf4d9e8 100644
--- a/arch/arm/mach-at91/setup.c
+++ b/arch/arm/mach-at91/setup.c
@@ -48,7 +48,7 @@ void __init at91_init_irq_default(void)
48void __init at91_init_interrupts(unsigned int *priority) 48void __init at91_init_interrupts(unsigned int *priority)
49{ 49{
50 /* Initialize the AIC interrupt controller */ 50 /* Initialize the AIC interrupt controller */
51 at91_aic_init(priority, at91_extern_irq); 51 at91_aic_init(priority, at91_boot_soc.extern_irq);
52 52
53 /* Enable GPIO interrupts */ 53 /* Enable GPIO interrupts */
54 at91_gpio_irq_setup(); 54 at91_gpio_irq_setup();
@@ -80,7 +80,7 @@ void __init at91_init_sram(int bank, unsigned long base, unsigned int length)
80 80
81 desc->pfn = __phys_to_pfn(base); 81 desc->pfn = __phys_to_pfn(base);
82 desc->length = length; 82 desc->length = length;
83 desc->type = MT_DEVICE; 83 desc->type = MT_MEMORY_NONCACHED;
84 84
85 pr_info("AT91: sram at 0x%lx of 0x%x mapped at 0x%lx\n", 85 pr_info("AT91: sram at 0x%lx of 0x%x mapped at 0x%lx\n",
86 base, length, desc->virtual); 86 base, length, desc->virtual);
diff --git a/arch/arm/mach-at91/soc.h b/arch/arm/mach-at91/soc.h
index 43a225f9e713..a1e1482c6da8 100644
--- a/arch/arm/mach-at91/soc.h
+++ b/arch/arm/mach-at91/soc.h
@@ -6,6 +6,7 @@
6 6
7struct at91_init_soc { 7struct at91_init_soc {
8 int builtin; 8 int builtin;
9 u32 extern_irq;
9 unsigned int *default_irq_priority; 10 unsigned int *default_irq_priority;
10 void (*map_io)(void); 11 void (*map_io)(void);
11 void (*ioremap_registers)(void); 12 void (*ioremap_registers)(void);
diff --git a/arch/arm/mach-bcm/board_bcm.c b/arch/arm/mach-bcm/board_bcm.c
index 22e8421b1df3..28599326d4ad 100644
--- a/arch/arm/mach-bcm/board_bcm.c
+++ b/arch/arm/mach-bcm/board_bcm.c
@@ -15,7 +15,6 @@
15#include <linux/init.h> 15#include <linux/init.h>
16#include <linux/device.h> 16#include <linux/device.h>
17#include <linux/platform_device.h> 17#include <linux/platform_device.h>
18#include <linux/irqchip.h>
19#include <linux/clocksource.h> 18#include <linux/clocksource.h>
20 19
21#include <asm/mach/arch.h> 20#include <asm/mach/arch.h>
@@ -54,7 +53,6 @@ static void __init board_init(void)
54static const char * const bcm11351_dt_compat[] = { "bcm,bcm11351", NULL, }; 53static const char * const bcm11351_dt_compat[] = { "bcm,bcm11351", NULL, };
55 54
56DT_MACHINE_START(BCM11351_DT, "Broadcom Application Processor") 55DT_MACHINE_START(BCM11351_DT, "Broadcom Application Processor")
57 .init_irq = irqchip_init,
58 .init_time = clocksource_of_init, 56 .init_time = clocksource_of_init,
59 .init_machine = board_init, 57 .init_machine = board_init,
60 .dt_compat = bcm11351_dt_compat, 58 .dt_compat = bcm11351_dt_compat,
diff --git a/arch/arm/mach-bcm2835/bcm2835.c b/arch/arm/mach-bcm2835/bcm2835.c
index 740fa9ebe249..40686d7ef500 100644
--- a/arch/arm/mach-bcm2835/bcm2835.c
+++ b/arch/arm/mach-bcm2835/bcm2835.c
@@ -53,7 +53,7 @@ static void bcm2835_setup_restart(void)
53 WARN(!wdt_regs, "failed to remap watchdog regs"); 53 WARN(!wdt_regs, "failed to remap watchdog regs");
54} 54}
55 55
56static void bcm2835_restart(char mode, const char *cmd) 56static void bcm2835_restart(enum reboot_mode mode, const char *cmd)
57{ 57{
58 u32 val; 58 u32 val;
59 59
@@ -91,7 +91,7 @@ static void bcm2835_power_off(void)
91 writel_relaxed(val, wdt_regs + PM_RSTS); 91 writel_relaxed(val, wdt_regs + PM_RSTS);
92 92
93 /* Continue with normal reset mechanism */ 93 /* Continue with normal reset mechanism */
94 bcm2835_restart(0, ""); 94 bcm2835_restart(REBOOT_HARD, "");
95} 95}
96 96
97static struct map_desc io_map __initdata = { 97static struct map_desc io_map __initdata = {
diff --git a/arch/arm/mach-clps711x/Kconfig b/arch/arm/mach-clps711x/Kconfig
index 2d00165e85ec..01ad4d41e728 100644
--- a/arch/arm/mach-clps711x/Kconfig
+++ b/arch/arm/mach-clps711x/Kconfig
@@ -22,8 +22,7 @@ config ARCH_CLEP7312
22 22
23config ARCH_EDB7211 23config ARCH_EDB7211
24 bool "EDB7211" 24 bool "EDB7211"
25 select ARCH_SELECT_MEMORY_MODEL 25 select ARCH_HAS_HOLES_MEMORYMODEL
26 select ARCH_SPARSEMEM_ENABLE
27 help 26 help
28 Say Y here if you intend to run this kernel on a Cirrus Logic EDB-7211 27 Say Y here if you intend to run this kernel on a Cirrus Logic EDB-7211
29 evaluation board. 28 evaluation board.
diff --git a/arch/arm/mach-clps711x/Makefile b/arch/arm/mach-clps711x/Makefile
index 992995af666a..f30ed2b496fb 100644
--- a/arch/arm/mach-clps711x/Makefile
+++ b/arch/arm/mach-clps711x/Makefile
@@ -4,10 +4,7 @@
4 4
5# Object file lists. 5# Object file lists.
6 6
7obj-y := common.o 7obj-y := common.o devices.o
8obj-m :=
9obj-n :=
10obj- :=
11 8
12obj-$(CONFIG_ARCH_AUTCPU12) += board-autcpu12.o 9obj-$(CONFIG_ARCH_AUTCPU12) += board-autcpu12.o
13obj-$(CONFIG_ARCH_CDB89712) += board-cdb89712.o 10obj-$(CONFIG_ARCH_CDB89712) += board-cdb89712.o
diff --git a/arch/arm/mach-clps711x/board-autcpu12.c b/arch/arm/mach-clps711x/board-autcpu12.c
index f38584709df7..5867aebd8d0c 100644
--- a/arch/arm/mach-clps711x/board-autcpu12.c
+++ b/arch/arm/mach-clps711x/board-autcpu12.c
@@ -26,6 +26,8 @@
26#include <linux/gpio.h> 26#include <linux/gpio.h>
27#include <linux/ioport.h> 27#include <linux/ioport.h>
28#include <linux/interrupt.h> 28#include <linux/interrupt.h>
29#include <linux/mtd/physmap.h>
30#include <linux/mtd/plat-ram.h>
29#include <linux/mtd/partitions.h> 31#include <linux/mtd/partitions.h>
30#include <linux/mtd/nand-gpio.h> 32#include <linux/mtd/nand-gpio.h>
31#include <linux/platform_device.h> 33#include <linux/platform_device.h>
@@ -40,38 +42,49 @@
40#include <asm/page.h> 42#include <asm/page.h>
41 43
42#include <asm/mach/map.h> 44#include <asm/mach/map.h>
43#include <mach/autcpu12.h>
44 45
45#include "common.h" 46#include "common.h"
47#include "devices.h"
46 48
47#define AUTCPU12_CS8900_BASE (CS2_PHYS_BASE + 0x300) 49/* NOR flash */
48#define AUTCPU12_CS8900_IRQ (IRQ_EINT3) 50#define AUTCPU12_FLASH_BASE (CS0_PHYS_BASE)
51
52/* Board specific hardware definitions */
53#define AUTCPU12_CHAR_LCD_BASE (CS1_PHYS_BASE + 0x00000000)
54#define AUTCPU12_CSAUX1_BASE (CS1_PHYS_BASE + 0x04000000)
55#define AUTCPU12_CAN_BASE (CS1_PHYS_BASE + 0x08000000)
56#define AUTCPU12_TOUCH_BASE (CS1_PHYS_BASE + 0x0a000000)
57#define AUTCPU12_IO_BASE (CS1_PHYS_BASE + 0x0c000000)
58#define AUTCPU12_LPT_BASE (CS1_PHYS_BASE + 0x0e000000)
59
60/* NVRAM */
61#define AUTCPU12_NVRAM_BASE (CS1_PHYS_BASE + 0x02000000)
49 62
63/* SmartMedia flash */
50#define AUTCPU12_SMC_BASE (CS1_PHYS_BASE + 0x06000000) 64#define AUTCPU12_SMC_BASE (CS1_PHYS_BASE + 0x06000000)
51#define AUTCPU12_SMC_SEL_BASE (AUTCPU12_SMC_BASE + 0x10) 65#define AUTCPU12_SMC_SEL_BASE (AUTCPU12_SMC_BASE + 0x10)
52 66
67/* Ethernet */
68#define AUTCPU12_CS8900_BASE (CS2_PHYS_BASE + 0x300)
69#define AUTCPU12_CS8900_IRQ (IRQ_EINT3)
70
71/* NAND flash */
53#define AUTCPU12_MMGPIO_BASE (CLPS711X_NR_GPIO) 72#define AUTCPU12_MMGPIO_BASE (CLPS711X_NR_GPIO)
54#define AUTCPU12_SMC_NCE (AUTCPU12_MMGPIO_BASE + 0) /* Bit 0 */ 73#define AUTCPU12_SMC_NCE (AUTCPU12_MMGPIO_BASE + 0) /* Bit 0 */
55#define AUTCPU12_SMC_RDY CLPS711X_GPIO(1, 2) 74#define AUTCPU12_SMC_RDY CLPS711X_GPIO(1, 2)
56#define AUTCPU12_SMC_ALE CLPS711X_GPIO(1, 3) 75#define AUTCPU12_SMC_ALE CLPS711X_GPIO(1, 3)
57#define AUTCPU12_SMC_CLE CLPS711X_GPIO(1, 3) 76#define AUTCPU12_SMC_CLE CLPS711X_GPIO(1, 3)
58 77
78/* LCD contrast digital potentiometer */
79#define AUTCPU12_DPOT_CS CLPS711X_GPIO(4, 0)
80#define AUTCPU12_DPOT_CLK CLPS711X_GPIO(4, 1)
81#define AUTCPU12_DPOT_UD CLPS711X_GPIO(4, 2)
82
59static struct resource autcpu12_cs8900_resource[] __initdata = { 83static struct resource autcpu12_cs8900_resource[] __initdata = {
60 DEFINE_RES_MEM(AUTCPU12_CS8900_BASE, SZ_1K), 84 DEFINE_RES_MEM(AUTCPU12_CS8900_BASE, SZ_1K),
61 DEFINE_RES_IRQ(AUTCPU12_CS8900_IRQ), 85 DEFINE_RES_IRQ(AUTCPU12_CS8900_IRQ),
62}; 86};
63 87
64static struct resource autcpu12_nvram_resource[] __initdata = {
65 DEFINE_RES_MEM_NAMED(AUTCPU12_PHYS_NVRAM, SZ_128K, "SRAM"),
66};
67
68static struct platform_device autcpu12_nvram_pdev __initdata = {
69 .name = "autcpu12_nvram",
70 .id = -1,
71 .resource = autcpu12_nvram_resource,
72 .num_resources = ARRAY_SIZE(autcpu12_nvram_resource),
73};
74
75static struct resource autcpu12_nand_resource[] __initdata = { 88static struct resource autcpu12_nand_resource[] __initdata = {
76 DEFINE_RES_MEM(AUTCPU12_SMC_BASE, SZ_16), 89 DEFINE_RES_MEM(AUTCPU12_SMC_BASE, SZ_16),
77}; 90};
@@ -147,17 +160,106 @@ static struct platform_device autcpu12_mmgpio_pdev __initdata = {
147 }, 160 },
148}; 161};
149 162
163static const struct gpio autcpu12_gpios[] __initconst = {
164 { AUTCPU12_DPOT_CS, GPIOF_OUT_INIT_HIGH, "DPOT CS" },
165 { AUTCPU12_DPOT_CLK, GPIOF_OUT_INIT_LOW, "DPOT CLK" },
166 { AUTCPU12_DPOT_UD, GPIOF_OUT_INIT_LOW, "DPOT UD" },
167};
168
169static struct mtd_partition autcpu12_flash_partitions[] = {
170 {
171 .name = "NOR.0",
172 .offset = 0,
173 .size = MTDPART_SIZ_FULL,
174 },
175};
176
177static struct physmap_flash_data autcpu12_flash_pdata = {
178 .width = 4,
179 .parts = autcpu12_flash_partitions,
180 .nr_parts = ARRAY_SIZE(autcpu12_flash_partitions),
181};
182
183static struct resource autcpu12_flash_resources[] __initdata = {
184 DEFINE_RES_MEM(AUTCPU12_FLASH_BASE, SZ_8M),
185};
186
187static struct platform_device autcpu12_flash_pdev __initdata = {
188 .name = "physmap-flash",
189 .id = 0,
190 .resource = autcpu12_flash_resources,
191 .num_resources = ARRAY_SIZE(autcpu12_flash_resources),
192 .dev = {
193 .platform_data = &autcpu12_flash_pdata,
194 },
195};
196
197static struct resource autcpu12_nvram_resource[] __initdata = {
198 DEFINE_RES_MEM(AUTCPU12_NVRAM_BASE, 0),
199};
200
201static struct platdata_mtd_ram autcpu12_nvram_pdata = {
202 .bankwidth = 4,
203};
204
205static struct platform_device autcpu12_nvram_pdev __initdata = {
206 .name = "mtd-ram",
207 .id = 0,
208 .resource = autcpu12_nvram_resource,
209 .num_resources = ARRAY_SIZE(autcpu12_nvram_resource),
210 .dev = {
211 .platform_data = &autcpu12_nvram_pdata,
212 },
213};
214
215static void __init autcpu12_nvram_init(void)
216{
217 void __iomem *nvram;
218 unsigned int save[2];
219 resource_size_t nvram_size = SZ_128K;
220
221 /*
222 * Check for 32K/128K
223 * Read ofs 0K
224 * Read ofs 64K
225 * Write complement to ofs 64K
226 * Read and check result on ofs 0K
227 * Restore contents
228 */
229 nvram = ioremap(autcpu12_nvram_resource[0].start, SZ_128K);
230 if (nvram) {
231 save[0] = readl(nvram + 0);
232 save[1] = readl(nvram + SZ_64K);
233 writel(~save[0], nvram + SZ_64K);
234 if (readl(nvram + 0) != save[0]) {
235 writel(save[0], nvram + 0);
236 nvram_size = SZ_32K;
237 } else
238 writel(save[1], nvram + SZ_64K);
239 iounmap(nvram);
240
241 autcpu12_nvram_resource[0].end =
242 autcpu12_nvram_resource[0].start + nvram_size - 1;
243 platform_device_register(&autcpu12_nvram_pdev);
244 } else
245 pr_err("Failed to remap NVRAM resource\n");
246}
247
150static void __init autcpu12_init(void) 248static void __init autcpu12_init(void)
151{ 249{
250 clps711x_devices_init();
251 platform_device_register(&autcpu12_flash_pdev);
152 platform_device_register_simple("video-clps711x", 0, NULL, 0); 252 platform_device_register_simple("video-clps711x", 0, NULL, 0);
153 platform_device_register_simple("cs89x0", 0, autcpu12_cs8900_resource, 253 platform_device_register_simple("cs89x0", 0, autcpu12_cs8900_resource,
154 ARRAY_SIZE(autcpu12_cs8900_resource)); 254 ARRAY_SIZE(autcpu12_cs8900_resource));
155 platform_device_register(&autcpu12_mmgpio_pdev); 255 platform_device_register(&autcpu12_mmgpio_pdev);
156 platform_device_register(&autcpu12_nvram_pdev); 256 autcpu12_nvram_init();
157} 257}
158 258
159static void __init autcpu12_init_late(void) 259static void __init autcpu12_init_late(void)
160{ 260{
261 gpio_request_array(autcpu12_gpios, ARRAY_SIZE(autcpu12_gpios));
262
161 if (IS_ENABLED(MTD_NAND_GPIO) && IS_ENABLED(GPIO_GENERIC_PLATFORM)) { 263 if (IS_ENABLED(MTD_NAND_GPIO) && IS_ENABLED(GPIO_GENERIC_PLATFORM)) {
162 /* We are need both drivers to handle NAND */ 264 /* We are need both drivers to handle NAND */
163 platform_device_register(&autcpu12_nand_pdev); 265 platform_device_register(&autcpu12_nand_pdev);
@@ -169,6 +271,7 @@ MACHINE_START(AUTCPU12, "autronix autcpu12")
169 .atag_offset = 0x20000, 271 .atag_offset = 0x20000,
170 .nr_irqs = CLPS711X_NR_IRQS, 272 .nr_irqs = CLPS711X_NR_IRQS,
171 .map_io = clps711x_map_io, 273 .map_io = clps711x_map_io,
274 .init_early = clps711x_init_early,
172 .init_irq = clps711x_init_irq, 275 .init_irq = clps711x_init_irq,
173 .init_time = clps711x_timer_init, 276 .init_time = clps711x_timer_init,
174 .init_machine = autcpu12_init, 277 .init_machine = autcpu12_init,
diff --git a/arch/arm/mach-clps711x/board-cdb89712.c b/arch/arm/mach-clps711x/board-cdb89712.c
index baab7da33c9b..a9e38c6bcfb4 100644
--- a/arch/arm/mach-clps711x/board-cdb89712.c
+++ b/arch/arm/mach-clps711x/board-cdb89712.c
@@ -39,6 +39,7 @@
39#include <asm/mach/map.h> 39#include <asm/mach/map.h>
40 40
41#include "common.h" 41#include "common.h"
42#include "devices.h"
42 43
43#define CDB89712_CS8900_BASE (CS2_PHYS_BASE + 0x300) 44#define CDB89712_CS8900_BASE (CS2_PHYS_BASE + 0x300)
44#define CDB89712_CS8900_IRQ (IRQ_EINT3) 45#define CDB89712_CS8900_IRQ (IRQ_EINT3)
@@ -127,6 +128,7 @@ static struct platform_device cdb89712_sram_pdev __initdata = {
127 128
128static void __init cdb89712_init(void) 129static void __init cdb89712_init(void)
129{ 130{
131 clps711x_devices_init();
130 platform_device_register(&cdb89712_flash_pdev); 132 platform_device_register(&cdb89712_flash_pdev);
131 platform_device_register(&cdb89712_bootrom_pdev); 133 platform_device_register(&cdb89712_bootrom_pdev);
132 platform_device_register(&cdb89712_sram_pdev); 134 platform_device_register(&cdb89712_sram_pdev);
@@ -139,6 +141,7 @@ MACHINE_START(CDB89712, "Cirrus-CDB89712")
139 .atag_offset = 0x100, 141 .atag_offset = 0x100,
140 .nr_irqs = CLPS711X_NR_IRQS, 142 .nr_irqs = CLPS711X_NR_IRQS,
141 .map_io = clps711x_map_io, 143 .map_io = clps711x_map_io,
144 .init_early = clps711x_init_early,
142 .init_irq = clps711x_init_irq, 145 .init_irq = clps711x_init_irq,
143 .init_time = clps711x_timer_init, 146 .init_time = clps711x_timer_init,
144 .init_machine = cdb89712_init, 147 .init_machine = cdb89712_init,
diff --git a/arch/arm/mach-clps711x/board-clep7312.c b/arch/arm/mach-clps711x/board-clep7312.c
index 014aa3c19a03..b4764246d0f8 100644
--- a/arch/arm/mach-clps711x/board-clep7312.c
+++ b/arch/arm/mach-clps711x/board-clep7312.c
@@ -39,6 +39,7 @@ MACHINE_START(CLEP7212, "Cirrus Logic 7212/7312")
39 .nr_irqs = CLPS711X_NR_IRQS, 39 .nr_irqs = CLPS711X_NR_IRQS,
40 .fixup = fixup_clep7312, 40 .fixup = fixup_clep7312,
41 .map_io = clps711x_map_io, 41 .map_io = clps711x_map_io,
42 .init_early = clps711x_init_early,
42 .init_irq = clps711x_init_irq, 43 .init_irq = clps711x_init_irq,
43 .init_time = clps711x_timer_init, 44 .init_time = clps711x_timer_init,
44 .handle_irq = clps711x_handle_irq, 45 .handle_irq = clps711x_handle_irq,
diff --git a/arch/arm/mach-clps711x/board-edb7211.c b/arch/arm/mach-clps711x/board-edb7211.c
index 5f928e9ed2ef..9dfb990f0801 100644
--- a/arch/arm/mach-clps711x/board-edb7211.c
+++ b/arch/arm/mach-clps711x/board-edb7211.c
@@ -12,6 +12,7 @@
12#include <linux/delay.h> 12#include <linux/delay.h>
13#include <linux/memblock.h> 13#include <linux/memblock.h>
14#include <linux/types.h> 14#include <linux/types.h>
15#include <linux/i2c-gpio.h>
15#include <linux/interrupt.h> 16#include <linux/interrupt.h>
16#include <linux/backlight.h> 17#include <linux/backlight.h>
17#include <linux/platform_device.h> 18#include <linux/platform_device.h>
@@ -29,6 +30,7 @@
29#include <mach/hardware.h> 30#include <mach/hardware.h>
30 31
31#include "common.h" 32#include "common.h"
33#include "devices.h"
32 34
33#define VIDEORAM_SIZE SZ_128K 35#define VIDEORAM_SIZE SZ_128K
34 36
@@ -36,11 +38,24 @@
36#define EDB7211_LCDEN CLPS711X_GPIO(3, 2) 38#define EDB7211_LCDEN CLPS711X_GPIO(3, 2)
37#define EDB7211_LCDBL CLPS711X_GPIO(3, 3) 39#define EDB7211_LCDBL CLPS711X_GPIO(3, 3)
38 40
41#define EDB7211_I2C_SDA CLPS711X_GPIO(3, 4)
42#define EDB7211_I2C_SCL CLPS711X_GPIO(3, 5)
43
39#define EDB7211_FLASH0_BASE (CS0_PHYS_BASE) 44#define EDB7211_FLASH0_BASE (CS0_PHYS_BASE)
40#define EDB7211_FLASH1_BASE (CS1_PHYS_BASE) 45#define EDB7211_FLASH1_BASE (CS1_PHYS_BASE)
46
41#define EDB7211_CS8900_BASE (CS2_PHYS_BASE + 0x300) 47#define EDB7211_CS8900_BASE (CS2_PHYS_BASE + 0x300)
42#define EDB7211_CS8900_IRQ (IRQ_EINT3) 48#define EDB7211_CS8900_IRQ (IRQ_EINT3)
43 49
50/* The extra 8 lines of the keyboard matrix */
51#define EDB7211_EXTKBD_BASE (CS3_PHYS_BASE)
52
53static struct i2c_gpio_platform_data edb7211_i2c_pdata __initdata = {
54 .sda_pin = EDB7211_I2C_SDA,
55 .scl_pin = EDB7211_I2C_SCL,
56 .scl_is_output_only = 1,
57};
58
44static struct resource edb7211_cs8900_resource[] __initdata = { 59static struct resource edb7211_cs8900_resource[] __initdata = {
45 DEFINE_RES_MEM(EDB7211_CS8900_BASE, SZ_1K), 60 DEFINE_RES_MEM(EDB7211_CS8900_BASE, SZ_1K),
46 DEFINE_RES_IRQ(EDB7211_CS8900_IRQ), 61 DEFINE_RES_IRQ(EDB7211_CS8900_IRQ),
@@ -94,13 +109,14 @@ static struct plat_lcd_data edb7211_lcd_power_pdata = {
94 109
95static void edb7211_lcd_backlight_set_intensity(int intensity) 110static void edb7211_lcd_backlight_set_intensity(int intensity)
96{ 111{
97 gpio_set_value(EDB7211_LCDBL, intensity); 112 gpio_set_value(EDB7211_LCDBL, !!intensity);
113 clps_writel((clps_readl(PMPCON) & 0xf0ff) | (intensity << 8), PMPCON);
98} 114}
99 115
100static struct generic_bl_info edb7211_lcd_backlight_pdata = { 116static struct generic_bl_info edb7211_lcd_backlight_pdata = {
101 .name = "lcd-backlight.0", 117 .name = "lcd-backlight.0",
102 .default_intensity = 0x01, 118 .default_intensity = 0x01,
103 .max_intensity = 0x01, 119 .max_intensity = 0x0f,
104 .set_bl_intensity = edb7211_lcd_backlight_set_intensity, 120 .set_bl_intensity = edb7211_lcd_backlight_set_intensity,
105}; 121};
106 122
@@ -112,8 +128,8 @@ static struct gpio edb7211_gpios[] __initconst = {
112 128
113static struct map_desc edb7211_io_desc[] __initdata = { 129static struct map_desc edb7211_io_desc[] __initdata = {
114 { /* Memory-mapped extra keyboard row */ 130 { /* Memory-mapped extra keyboard row */
115 .virtual = IO_ADDRESS(EP7211_PHYS_EXTKBD), 131 .virtual = IO_ADDRESS(EDB7211_EXTKBD_BASE),
116 .pfn = __phys_to_pfn(EP7211_PHYS_EXTKBD), 132 .pfn = __phys_to_pfn(EDB7211_EXTKBD_BASE),
117 .length = SZ_1M, 133 .length = SZ_1M,
118 .type = MT_DEVICE, 134 .type = MT_DEVICE,
119 }, 135 },
@@ -151,6 +167,11 @@ fixup_edb7211(struct tag *tags, char **cmdline, struct meminfo *mi)
151 167
152static void __init edb7211_init(void) 168static void __init edb7211_init(void)
153{ 169{
170 clps711x_devices_init();
171}
172
173static void __init edb7211_init_late(void)
174{
154 gpio_request_array(edb7211_gpios, ARRAY_SIZE(edb7211_gpios)); 175 gpio_request_array(edb7211_gpios, ARRAY_SIZE(edb7211_gpios));
155 176
156 platform_device_register(&edb7211_flash_pdev); 177 platform_device_register(&edb7211_flash_pdev);
@@ -163,6 +184,9 @@ static void __init edb7211_init(void)
163 platform_device_register_simple("video-clps711x", 0, NULL, 0); 184 platform_device_register_simple("video-clps711x", 0, NULL, 0);
164 platform_device_register_simple("cs89x0", 0, edb7211_cs8900_resource, 185 platform_device_register_simple("cs89x0", 0, edb7211_cs8900_resource,
165 ARRAY_SIZE(edb7211_cs8900_resource)); 186 ARRAY_SIZE(edb7211_cs8900_resource));
187 platform_device_register_data(&platform_bus, "i2c-gpio", 0,
188 &edb7211_i2c_pdata,
189 sizeof(edb7211_i2c_pdata));
166} 190}
167 191
168MACHINE_START(EDB7211, "CL-EDB7211 (EP7211 eval board)") 192MACHINE_START(EDB7211, "CL-EDB7211 (EP7211 eval board)")
@@ -172,9 +196,11 @@ MACHINE_START(EDB7211, "CL-EDB7211 (EP7211 eval board)")
172 .fixup = fixup_edb7211, 196 .fixup = fixup_edb7211,
173 .reserve = edb7211_reserve, 197 .reserve = edb7211_reserve,
174 .map_io = edb7211_map_io, 198 .map_io = edb7211_map_io,
199 .init_early = clps711x_init_early,
175 .init_irq = clps711x_init_irq, 200 .init_irq = clps711x_init_irq,
176 .init_time = clps711x_timer_init, 201 .init_time = clps711x_timer_init,
177 .init_machine = edb7211_init, 202 .init_machine = edb7211_init,
203 .init_late = edb7211_init_late,
178 .handle_irq = clps711x_handle_irq, 204 .handle_irq = clps711x_handle_irq,
179 .restart = clps711x_restart, 205 .restart = clps711x_restart,
180MACHINE_END 206MACHINE_END
diff --git a/arch/arm/mach-clps711x/board-fortunet.c b/arch/arm/mach-clps711x/board-fortunet.c
index c5675efc8c6a..b1561e3d7c5c 100644
--- a/arch/arm/mach-clps711x/board-fortunet.c
+++ b/arch/arm/mach-clps711x/board-fortunet.c
@@ -77,6 +77,7 @@ MACHINE_START(FORTUNET, "ARM-FortuNet")
77 .nr_irqs = CLPS711X_NR_IRQS, 77 .nr_irqs = CLPS711X_NR_IRQS,
78 .fixup = fortunet_fixup, 78 .fixup = fortunet_fixup,
79 .map_io = clps711x_map_io, 79 .map_io = clps711x_map_io,
80 .init_early = clps711x_init_early,
80 .init_irq = clps711x_init_irq, 81 .init_irq = clps711x_init_irq,
81 .init_time = clps711x_timer_init, 82 .init_time = clps711x_timer_init,
82 .handle_irq = clps711x_handle_irq, 83 .handle_irq = clps711x_handle_irq,
diff --git a/arch/arm/mach-clps711x/board-p720t.c b/arch/arm/mach-clps711x/board-p720t.c
index 8d3ee6771135..dd81b06f68fe 100644
--- a/arch/arm/mach-clps711x/board-p720t.c
+++ b/arch/arm/mach-clps711x/board-p720t.c
@@ -23,10 +23,12 @@
23#include <linux/string.h> 23#include <linux/string.h>
24#include <linux/mm.h> 24#include <linux/mm.h>
25#include <linux/io.h> 25#include <linux/io.h>
26#include <linux/gpio.h>
26#include <linux/slab.h> 27#include <linux/slab.h>
27#include <linux/leds.h> 28#include <linux/leds.h>
28#include <linux/sizes.h> 29#include <linux/sizes.h>
29#include <linux/backlight.h> 30#include <linux/backlight.h>
31#include <linux/basic_mmio_gpio.h>
30#include <linux/platform_device.h> 32#include <linux/platform_device.h>
31#include <linux/mtd/partitions.h> 33#include <linux/mtd/partitions.h>
32#include <linux/mtd/nand-gpio.h> 34#include <linux/mtd/nand-gpio.h>
@@ -38,11 +40,11 @@
38#include <asm/mach-types.h> 40#include <asm/mach-types.h>
39#include <asm/mach/arch.h> 41#include <asm/mach/arch.h>
40#include <asm/mach/map.h> 42#include <asm/mach/map.h>
41#include <mach/syspld.h>
42 43
43#include <video/platform_lcd.h> 44#include <video/platform_lcd.h>
44 45
45#include "common.h" 46#include "common.h"
47#include "devices.h"
46 48
47#define P720T_USERLED CLPS711X_GPIO(3, 0) 49#define P720T_USERLED CLPS711X_GPIO(3, 0)
48#define P720T_NAND_CLE CLPS711X_GPIO(4, 0) 50#define P720T_NAND_CLE CLPS711X_GPIO(4, 0)
@@ -51,6 +53,178 @@
51 53
52#define P720T_NAND_BASE (CLPS711X_SDRAM1_BASE) 54#define P720T_NAND_BASE (CLPS711X_SDRAM1_BASE)
53 55
56#define P720T_MMGPIO_BASE (CLPS711X_NR_GPIO)
57
58#define SYSPLD_PHYS_BASE IOMEM(CS1_PHYS_BASE)
59
60#define PLD_INT (SYSPLD_PHYS_BASE + 0x000000)
61#define PLD_INT_MMGPIO_BASE (P720T_MMGPIO_BASE + 0)
62#define PLD_INT_PENIRQ (PLD_INT_MMGPIO_BASE + 5)
63#define PLD_INT_UCB_IRQ (PLD_INT_MMGPIO_BASE + 1)
64#define PLD_INT_KBD_ATN (PLD_INT_MMGPIO_BASE + 0) /* EINT1 */
65
66#define PLD_PWR (SYSPLD_PHYS_BASE + 0x000004)
67#define PLD_PWR_MMGPIO_BASE (P720T_MMGPIO_BASE + 8)
68#define PLD_PWR_EXT (PLD_PWR_MMGPIO_BASE + 5)
69#define PLD_PWR_MODE (PLD_PWR_MMGPIO_BASE + 4) /* 1 = PWM, 0 = PFM */
70#define PLD_S4_ON (PLD_PWR_MMGPIO_BASE + 3) /* LCD bias voltage enable */
71#define PLD_S3_ON (PLD_PWR_MMGPIO_BASE + 2) /* LCD backlight enable */
72#define PLD_S2_ON (PLD_PWR_MMGPIO_BASE + 1) /* LCD 3V3 supply enable */
73#define PLD_S1_ON (PLD_PWR_MMGPIO_BASE + 0) /* LCD 3V supply enable */
74
75#define PLD_KBD (SYSPLD_PHYS_BASE + 0x000008)
76#define PLD_KBD_MMGPIO_BASE (P720T_MMGPIO_BASE + 16)
77#define PLD_KBD_WAKE (PLD_KBD_MMGPIO_BASE + 1)
78#define PLD_KBD_EN (PLD_KBD_MMGPIO_BASE + 0)
79
80#define PLD_SPI (SYSPLD_PHYS_BASE + 0x00000c)
81#define PLD_SPI_MMGPIO_BASE (P720T_MMGPIO_BASE + 24)
82#define PLD_SPI_EN (PLD_SPI_MMGPIO_BASE + 0)
83
84#define PLD_IO (SYSPLD_PHYS_BASE + 0x000010)
85#define PLD_IO_MMGPIO_BASE (P720T_MMGPIO_BASE + 32)
86#define PLD_IO_BOOTSEL (PLD_IO_MMGPIO_BASE + 6) /* Boot sel switch */
87#define PLD_IO_USER (PLD_IO_MMGPIO_BASE + 5) /* User defined switch */
88#define PLD_IO_LED3 (PLD_IO_MMGPIO_BASE + 4)
89#define PLD_IO_LED2 (PLD_IO_MMGPIO_BASE + 3)
90#define PLD_IO_LED1 (PLD_IO_MMGPIO_BASE + 2)
91#define PLD_IO_LED0 (PLD_IO_MMGPIO_BASE + 1)
92#define PLD_IO_LEDEN (PLD_IO_MMGPIO_BASE + 0)
93
94#define PLD_IRDA (SYSPLD_PHYS_BASE + 0x000014)
95#define PLD_IRDA_MMGPIO_BASE (P720T_MMGPIO_BASE + 40)
96#define PLD_IRDA_EN (PLD_IRDA_MMGPIO_BASE + 0)
97
98#define PLD_COM2 (SYSPLD_PHYS_BASE + 0x000018)
99#define PLD_COM2_MMGPIO_BASE (P720T_MMGPIO_BASE + 48)
100#define PLD_COM2_EN (PLD_COM2_MMGPIO_BASE + 0)
101
102#define PLD_COM1 (SYSPLD_PHYS_BASE + 0x00001c)
103#define PLD_COM1_MMGPIO_BASE (P720T_MMGPIO_BASE + 56)
104#define PLD_COM1_EN (PLD_COM1_MMGPIO_BASE + 0)
105
106#define PLD_AUD (SYSPLD_PHYS_BASE + 0x000020)
107#define PLD_AUD_MMGPIO_BASE (P720T_MMGPIO_BASE + 64)
108#define PLD_AUD_DIV1 (PLD_AUD_MMGPIO_BASE + 6)
109#define PLD_AUD_DIV0 (PLD_AUD_MMGPIO_BASE + 5)
110#define PLD_AUD_CLK_SEL1 (PLD_AUD_MMGPIO_BASE + 4)
111#define PLD_AUD_CLK_SEL0 (PLD_AUD_MMGPIO_BASE + 3)
112#define PLD_AUD_MIC_PWR (PLD_AUD_MMGPIO_BASE + 2)
113#define PLD_AUD_MIC_GAIN (PLD_AUD_MMGPIO_BASE + 1)
114#define PLD_AUD_CODEC_EN (PLD_AUD_MMGPIO_BASE + 0)
115
116#define PLD_CF (SYSPLD_PHYS_BASE + 0x000024)
117#define PLD_CF_MMGPIO_BASE (P720T_MMGPIO_BASE + 72)
118#define PLD_CF2_SLEEP (PLD_CF_MMGPIO_BASE + 5)
119#define PLD_CF1_SLEEP (PLD_CF_MMGPIO_BASE + 4)
120#define PLD_CF2_nPDREQ (PLD_CF_MMGPIO_BASE + 3)
121#define PLD_CF1_nPDREQ (PLD_CF_MMGPIO_BASE + 2)
122#define PLD_CF2_nIRQ (PLD_CF_MMGPIO_BASE + 1)
123#define PLD_CF1_nIRQ (PLD_CF_MMGPIO_BASE + 0)
124
125#define PLD_SDC (SYSPLD_PHYS_BASE + 0x000028)
126#define PLD_SDC_MMGPIO_BASE (P720T_MMGPIO_BASE + 80)
127#define PLD_SDC_INT_EN (PLD_SDC_MMGPIO_BASE + 2)
128#define PLD_SDC_WP (PLD_SDC_MMGPIO_BASE + 1)
129#define PLD_SDC_CD (PLD_SDC_MMGPIO_BASE + 0)
130
131#define PLD_CODEC (SYSPLD_PHYS_BASE + 0x400000)
132#define PLD_CODEC_MMGPIO_BASE (P720T_MMGPIO_BASE + 88)
133#define PLD_CODEC_IRQ3 (PLD_CODEC_MMGPIO_BASE + 4)
134#define PLD_CODEC_IRQ2 (PLD_CODEC_MMGPIO_BASE + 3)
135#define PLD_CODEC_IRQ1 (PLD_CODEC_MMGPIO_BASE + 2)
136#define PLD_CODEC_EN (PLD_CODEC_MMGPIO_BASE + 0)
137
138#define PLD_BRITE (SYSPLD_PHYS_BASE + 0x400004)
139#define PLD_BRITE_MMGPIO_BASE (P720T_MMGPIO_BASE + 96)
140#define PLD_BRITE_UP (PLD_BRITE_MMGPIO_BASE + 1)
141#define PLD_BRITE_DN (PLD_BRITE_MMGPIO_BASE + 0)
142
143#define PLD_LCDEN (SYSPLD_PHYS_BASE + 0x400008)
144#define PLD_LCDEN_MMGPIO_BASE (P720T_MMGPIO_BASE + 104)
145#define PLD_LCDEN_EN (PLD_LCDEN_MMGPIO_BASE + 0)
146
147#define PLD_TCH (SYSPLD_PHYS_BASE + 0x400010)
148#define PLD_TCH_MMGPIO_BASE (P720T_MMGPIO_BASE + 112)
149#define PLD_TCH_PENIRQ (PLD_TCH_MMGPIO_BASE + 1)
150#define PLD_TCH_EN (PLD_TCH_MMGPIO_BASE + 0)
151
152#define PLD_GPIO (SYSPLD_PHYS_BASE + 0x400014)
153#define PLD_GPIO_MMGPIO_BASE (P720T_MMGPIO_BASE + 120)
154#define PLD_GPIO2 (PLD_GPIO_MMGPIO_BASE + 2)
155#define PLD_GPIO1 (PLD_GPIO_MMGPIO_BASE + 1)
156#define PLD_GPIO0 (PLD_GPIO_MMGPIO_BASE + 0)
157
158static struct gpio p720t_gpios[] __initconst = {
159 { PLD_S1_ON, GPIOF_OUT_INIT_LOW, "PLD_S1_ON" },
160 { PLD_S2_ON, GPIOF_OUT_INIT_LOW, "PLD_S2_ON" },
161 { PLD_S3_ON, GPIOF_OUT_INIT_LOW, "PLD_S3_ON" },
162 { PLD_S4_ON, GPIOF_OUT_INIT_LOW, "PLD_S4_ON" },
163 { PLD_KBD_EN, GPIOF_OUT_INIT_LOW, "PLD_KBD_EN" },
164 { PLD_SPI_EN, GPIOF_OUT_INIT_LOW, "PLD_SPI_EN" },
165 { PLD_IO_USER, GPIOF_OUT_INIT_LOW, "PLD_IO_USER" },
166 { PLD_IO_LED0, GPIOF_OUT_INIT_LOW, "PLD_IO_LED0" },
167 { PLD_IO_LED1, GPIOF_OUT_INIT_LOW, "PLD_IO_LED1" },
168 { PLD_IO_LED2, GPIOF_OUT_INIT_LOW, "PLD_IO_LED2" },
169 { PLD_IO_LED3, GPIOF_OUT_INIT_LOW, "PLD_IO_LED3" },
170 { PLD_IO_LEDEN, GPIOF_OUT_INIT_LOW, "PLD_IO_LEDEN" },
171 { PLD_IRDA_EN, GPIOF_OUT_INIT_LOW, "PLD_IRDA_EN" },
172 { PLD_COM1_EN, GPIOF_OUT_INIT_HIGH, "PLD_COM1_EN" },
173 { PLD_COM2_EN, GPIOF_OUT_INIT_HIGH, "PLD_COM2_EN" },
174 { PLD_CODEC_EN, GPIOF_OUT_INIT_LOW, "PLD_CODEC_EN" },
175 { PLD_LCDEN_EN, GPIOF_OUT_INIT_LOW, "PLD_LCDEN_EN" },
176 { PLD_TCH_EN, GPIOF_OUT_INIT_LOW, "PLD_TCH_EN" },
177 { P720T_USERLED,GPIOF_OUT_INIT_LOW, "USER_LED" },
178};
179
180static struct resource p720t_mmgpio_resource[] __initdata = {
181 DEFINE_RES_MEM_NAMED(0, 4, "dat"),
182};
183
184static struct bgpio_pdata p720t_mmgpio_pdata = {
185 .ngpio = 8,
186};
187
188static struct platform_device p720t_mmgpio __initdata = {
189 .name = "basic-mmio-gpio",
190 .id = -1,
191 .resource = p720t_mmgpio_resource,
192 .num_resources = ARRAY_SIZE(p720t_mmgpio_resource),
193 .dev = {
194 .platform_data = &p720t_mmgpio_pdata,
195 },
196};
197
198static void __init p720t_mmgpio_init(void __iomem *addrbase, int gpiobase)
199{
200 p720t_mmgpio_resource[0].start = (unsigned long)addrbase;
201 p720t_mmgpio_pdata.base = gpiobase;
202
203 platform_device_register(&p720t_mmgpio);
204}
205
206static struct {
207 void __iomem *addrbase;
208 int gpiobase;
209} mmgpios[] __initconst = {
210 { PLD_INT, PLD_INT_MMGPIO_BASE },
211 { PLD_PWR, PLD_PWR_MMGPIO_BASE },
212 { PLD_KBD, PLD_KBD_MMGPIO_BASE },
213 { PLD_SPI, PLD_SPI_MMGPIO_BASE },
214 { PLD_IO, PLD_IO_MMGPIO_BASE },
215 { PLD_IRDA, PLD_IRDA_MMGPIO_BASE },
216 { PLD_COM2, PLD_COM2_MMGPIO_BASE },
217 { PLD_COM1, PLD_COM1_MMGPIO_BASE },
218 { PLD_AUD, PLD_AUD_MMGPIO_BASE },
219 { PLD_CF, PLD_CF_MMGPIO_BASE },
220 { PLD_SDC, PLD_SDC_MMGPIO_BASE },
221 { PLD_CODEC, PLD_CODEC_MMGPIO_BASE },
222 { PLD_BRITE, PLD_BRITE_MMGPIO_BASE },
223 { PLD_LCDEN, PLD_LCDEN_MMGPIO_BASE },
224 { PLD_TCH, PLD_TCH_MMGPIO_BASE },
225 { PLD_GPIO, PLD_GPIO_MMGPIO_BASE },
226};
227
54static struct resource p720t_nand_resource[] __initdata = { 228static struct resource p720t_nand_resource[] __initdata = {
55 DEFINE_RES_MEM(P720T_NAND_BASE, SZ_4), 229 DEFINE_RES_MEM(P720T_NAND_BASE, SZ_4),
56}; 230};
@@ -92,11 +266,15 @@ static struct platform_device p720t_nand_pdev __initdata = {
92static void p720t_lcd_power_set(struct plat_lcd_data *pd, unsigned int power) 266static void p720t_lcd_power_set(struct plat_lcd_data *pd, unsigned int power)
93{ 267{
94 if (power) { 268 if (power) {
95 PLD_LCDEN = PLD_LCDEN_EN; 269 gpio_set_value(PLD_LCDEN_EN, 1);
96 PLD_PWR |= PLD_S4_ON | PLD_S2_ON | PLD_S1_ON; 270 gpio_set_value(PLD_S1_ON, 1);
271 gpio_set_value(PLD_S2_ON, 1);
272 gpio_set_value(PLD_S4_ON, 1);
97 } else { 273 } else {
98 PLD_PWR &= ~(PLD_S4_ON | PLD_S2_ON | PLD_S1_ON); 274 gpio_set_value(PLD_S1_ON, 0);
99 PLD_LCDEN = 0; 275 gpio_set_value(PLD_S2_ON, 0);
276 gpio_set_value(PLD_S4_ON, 0);
277 gpio_set_value(PLD_LCDEN_EN, 0);
100 } 278 }
101} 279}
102 280
@@ -106,10 +284,7 @@ static struct plat_lcd_data p720t_lcd_power_pdata = {
106 284
107static void p720t_lcd_backlight_set_intensity(int intensity) 285static void p720t_lcd_backlight_set_intensity(int intensity)
108{ 286{
109 if (intensity) 287 gpio_set_value(PLD_S3_ON, intensity);
110 PLD_PWR |= PLD_S3_ON;
111 else
112 PLD_PWR = 0;
113} 288}
114 289
115static struct generic_bl_info p720t_lcd_backlight_pdata = { 290static struct generic_bl_info p720t_lcd_backlight_pdata = {
@@ -119,19 +294,6 @@ static struct generic_bl_info p720t_lcd_backlight_pdata = {
119 .set_bl_intensity = p720t_lcd_backlight_set_intensity, 294 .set_bl_intensity = p720t_lcd_backlight_set_intensity,
120}; 295};
121 296
122/*
123 * Map the P720T system PLD. It occupies two address spaces:
124 * 0x10000000 and 0x10400000. We map both regions as one.
125 */
126static struct map_desc p720t_io_desc[] __initdata = {
127 {
128 .virtual = SYSPLD_VIRT_BASE,
129 .pfn = __phys_to_pfn(SYSPLD_PHYS_BASE),
130 .length = SZ_8M,
131 .type = MT_DEVICE,
132 },
133};
134
135static void __init 297static void __init
136fixup_p720t(struct tag *tag, char **cmdline, struct meminfo *mi) 298fixup_p720t(struct tag *tag, char **cmdline, struct meminfo *mi)
137{ 299{
@@ -157,33 +319,6 @@ fixup_p720t(struct tag *tag, char **cmdline, struct meminfo *mi)
157 } 319 }
158} 320}
159 321
160static void __init p720t_map_io(void)
161{
162 clps711x_map_io();
163 iotable_init(p720t_io_desc, ARRAY_SIZE(p720t_io_desc));
164}
165
166static void __init p720t_init_early(void)
167{
168 /*
169 * Power down as much as possible in case we don't
170 * have the drivers loaded.
171 */
172 PLD_LCDEN = 0;
173 PLD_PWR &= ~(PLD_S4_ON|PLD_S3_ON|PLD_S2_ON|PLD_S1_ON);
174
175 PLD_KBD = 0;
176 PLD_IO = 0;
177 PLD_IRDA = 0;
178 PLD_CODEC = 0;
179 PLD_TCH = 0;
180 PLD_SPI = 0;
181 if (!IS_ENABLED(CONFIG_DEBUG_LL)) {
182 PLD_COM2 = 0;
183 PLD_COM1 = 0;
184 }
185}
186
187static struct gpio_led p720t_gpio_leds[] = { 322static struct gpio_led p720t_gpio_leds[] = {
188 { 323 {
189 .name = "User LED", 324 .name = "User LED",
@@ -199,7 +334,20 @@ static struct gpio_led_platform_data p720t_gpio_led_pdata __initdata = {
199 334
200static void __init p720t_init(void) 335static void __init p720t_init(void)
201{ 336{
337 int i;
338
339 clps711x_devices_init();
340
341 for (i = 0; i < ARRAY_SIZE(mmgpios); i++)
342 p720t_mmgpio_init(mmgpios[i].addrbase, mmgpios[i].gpiobase);
343
202 platform_device_register(&p720t_nand_pdev); 344 platform_device_register(&p720t_nand_pdev);
345}
346
347static void __init p720t_init_late(void)
348{
349 WARN_ON(gpio_request_array(p720t_gpios, ARRAY_SIZE(p720t_gpios)));
350
203 platform_device_register_data(&platform_bus, "platform-lcd", 0, 351 platform_device_register_data(&platform_bus, "platform-lcd", 0,
204 &p720t_lcd_power_pdata, 352 &p720t_lcd_power_pdata,
205 sizeof(p720t_lcd_power_pdata)); 353 sizeof(p720t_lcd_power_pdata));
@@ -207,10 +355,6 @@ static void __init p720t_init(void)
207 &p720t_lcd_backlight_pdata, 355 &p720t_lcd_backlight_pdata,
208 sizeof(p720t_lcd_backlight_pdata)); 356 sizeof(p720t_lcd_backlight_pdata));
209 platform_device_register_simple("video-clps711x", 0, NULL, 0); 357 platform_device_register_simple("video-clps711x", 0, NULL, 0);
210}
211
212static void __init p720t_init_late(void)
213{
214 platform_device_register_data(&platform_bus, "leds-gpio", 0, 358 platform_device_register_data(&platform_bus, "leds-gpio", 0,
215 &p720t_gpio_led_pdata, 359 &p720t_gpio_led_pdata,
216 sizeof(p720t_gpio_led_pdata)); 360 sizeof(p720t_gpio_led_pdata));
@@ -221,8 +365,8 @@ MACHINE_START(P720T, "ARM-Prospector720T")
221 .atag_offset = 0x100, 365 .atag_offset = 0x100,
222 .nr_irqs = CLPS711X_NR_IRQS, 366 .nr_irqs = CLPS711X_NR_IRQS,
223 .fixup = fixup_p720t, 367 .fixup = fixup_p720t,
224 .map_io = p720t_map_io, 368 .map_io = clps711x_map_io,
225 .init_early = p720t_init_early, 369 .init_early = clps711x_init_early,
226 .init_irq = clps711x_init_irq, 370 .init_irq = clps711x_init_irq,
227 .init_time = clps711x_timer_init, 371 .init_time = clps711x_timer_init,
228 .init_machine = p720t_init, 372 .init_machine = p720t_init,
diff --git a/arch/arm/mach-clps711x/common.c b/arch/arm/mach-clps711x/common.c
index 20ff50f3ccf0..4ca2f3ca2de4 100644
--- a/arch/arm/mach-clps711x/common.c
+++ b/arch/arm/mach-clps711x/common.c
@@ -27,12 +27,14 @@
27#include <linux/clk.h> 27#include <linux/clk.h>
28#include <linux/clkdev.h> 28#include <linux/clkdev.h>
29#include <linux/clockchips.h> 29#include <linux/clockchips.h>
30#include <linux/clocksource.h>
30#include <linux/clk-provider.h> 31#include <linux/clk-provider.h>
31 32
32#include <asm/exception.h> 33#include <asm/exception.h>
33#include <asm/mach/irq.h> 34#include <asm/mach/irq.h>
34#include <asm/mach/map.h> 35#include <asm/mach/map.h>
35#include <asm/mach/time.h> 36#include <asm/mach/time.h>
37#include <asm/sched_clock.h>
36#include <asm/system_misc.h> 38#include <asm/system_misc.h>
37 39
38#include <mach/hardware.h> 40#include <mach/hardware.h>
@@ -213,7 +215,7 @@ void __init clps711x_init_irq(void)
213 } 215 }
214} 216}
215 217
216inline u32 fls16(u32 x) 218static inline u32 fls16(u32 x)
217{ 219{
218 u32 r = 15; 220 u32 r = 15;
219 221
@@ -237,27 +239,52 @@ inline u32 fls16(u32 x)
237 239
238asmlinkage void __exception_irq_entry clps711x_handle_irq(struct pt_regs *regs) 240asmlinkage void __exception_irq_entry clps711x_handle_irq(struct pt_regs *regs)
239{ 241{
240 u32 irqstat; 242 do {
241 void __iomem *base = CLPS711X_VIRT_BASE; 243 u32 irqstat;
242 244 void __iomem *base = CLPS711X_VIRT_BASE;
243 irqstat = readl_relaxed(base + INTSR1) & readl_relaxed(base + INTMR1); 245
244 if (irqstat) { 246 irqstat = readw_relaxed(base + INTSR1) &
245 handle_IRQ(fls16(irqstat), regs); 247 readw_relaxed(base + INTMR1);
246 return; 248 if (irqstat)
247 } 249 handle_IRQ(fls16(irqstat), regs);
250
251 irqstat = readw_relaxed(base + INTSR2) &
252 readw_relaxed(base + INTMR2);
253 if (irqstat) {
254 handle_IRQ(fls16(irqstat) + 16, regs);
255 continue;
256 }
257
258 break;
259 } while (1);
260}
248 261
249 irqstat = readl_relaxed(base + INTSR2) & readl_relaxed(base + INTMR2); 262static u32 notrace clps711x_sched_clock_read(void)
250 if (likely(irqstat)) 263{
251 handle_IRQ(fls16(irqstat) + 16, regs); 264 return ~readw_relaxed(CLPS711X_VIRT_BASE + TC1D);
252} 265}
253 266
254static void clps711x_clockevent_set_mode(enum clock_event_mode mode, 267static void clps711x_clockevent_set_mode(enum clock_event_mode mode,
255 struct clock_event_device *evt) 268 struct clock_event_device *evt)
256{ 269{
270 disable_irq(IRQ_TC2OI);
271
272 switch (mode) {
273 case CLOCK_EVT_MODE_PERIODIC:
274 enable_irq(IRQ_TC2OI);
275 break;
276 case CLOCK_EVT_MODE_ONESHOT:
277 /* Not supported */
278 case CLOCK_EVT_MODE_SHUTDOWN:
279 case CLOCK_EVT_MODE_UNUSED:
280 case CLOCK_EVT_MODE_RESUME:
281 /* Left event sources disabled, no more interrupts appear */
282 break;
283 }
257} 284}
258 285
259static struct clock_event_device clockevent_clps711x = { 286static struct clock_event_device clockevent_clps711x = {
260 .name = "CLPS711x Clockevents", 287 .name = "clps711x-clockevent",
261 .rating = 300, 288 .rating = 300,
262 .features = CLOCK_EVT_FEAT_PERIODIC, 289 .features = CLOCK_EVT_FEAT_PERIODIC,
263 .set_mode = clps711x_clockevent_set_mode, 290 .set_mode = clps711x_clockevent_set_mode,
@@ -271,8 +298,8 @@ static irqreturn_t clps711x_timer_interrupt(int irq, void *dev_id)
271} 298}
272 299
273static struct irqaction clps711x_timer_irq = { 300static struct irqaction clps711x_timer_irq = {
274 .name = "CLPS711x Timer Tick", 301 .name = "clps711x-timer",
275 .flags = IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL, 302 .flags = IRQF_TIMER | IRQF_IRQPOLL,
276 .handler = clps711x_timer_interrupt, 303 .handler = clps711x_timer_interrupt,
277}; 304};
278 305
@@ -301,6 +328,7 @@ void __init clps711x_timer_init(void)
301 cpu = ext; 328 cpu = ext;
302 bus = cpu; 329 bus = cpu;
303 spi = 135400; 330 spi = 135400;
331 pll = 0;
304 } else { 332 } else {
305 cpu = pll; 333 cpu = pll;
306 if (cpu >= 36864000) 334 if (cpu >= 36864000)
@@ -319,9 +347,9 @@ void __init clps711x_timer_init(void)
319 else 347 else
320 timh = 541440; 348 timh = 541440;
321 } else 349 } else
322 timh = cpu / 144; 350 timh = DIV_ROUND_CLOSEST(cpu, 144);
323 351
324 timl = timh / 256; 352 timl = DIV_ROUND_CLOSEST(timh, 256);
325 353
326 /* All clocks are fixed */ 354 /* All clocks are fixed */
327 add_fixed_clk(clk_pll, "pll", pll); 355 add_fixed_clk(clk_pll, "pll", pll);
@@ -334,18 +362,29 @@ void __init clps711x_timer_init(void)
334 362
335 pr_info("CPU frequency set at %i Hz.\n", cpu); 363 pr_info("CPU frequency set at %i Hz.\n", cpu);
336 364
365 /* Start Timer1 in free running mode (Low frequency) */
366 tmp = clps_readl(SYSCON1) & ~(SYSCON1_TC1S | SYSCON1_TC1M);
367 clps_writel(tmp, SYSCON1);
368
369 setup_sched_clock(clps711x_sched_clock_read, 16, timl);
370
371 clocksource_mmio_init(CLPS711X_VIRT_BASE + TC1D,
372 "clps711x_clocksource", timl, 300, 16,
373 clocksource_mmio_readw_down);
374
375 /* Set Timer2 prescaler */
337 clps_writew(DIV_ROUND_CLOSEST(timh, HZ), TC2D); 376 clps_writew(DIV_ROUND_CLOSEST(timh, HZ), TC2D);
338 377
339 tmp = clps_readl(SYSCON1); 378 /* Start Timer2 in prescale mode (High frequency)*/
340 tmp |= SYSCON1_TC2S | SYSCON1_TC2M; 379 tmp = clps_readl(SYSCON1) | SYSCON1_TC2M | SYSCON1_TC2S;
341 clps_writel(tmp, SYSCON1); 380 clps_writel(tmp, SYSCON1);
342 381
343 clockevents_config_and_register(&clockevent_clps711x, timh, 1, 0xffff); 382 clockevents_config_and_register(&clockevent_clps711x, timh, 0, 0);
344 383
345 setup_irq(IRQ_TC2OI, &clps711x_timer_irq); 384 setup_irq(IRQ_TC2OI, &clps711x_timer_irq);
346} 385}
347 386
348void clps711x_restart(char mode, const char *cmd) 387void clps711x_restart(enum reboot_mode mode, const char *cmd)
349{ 388{
350 soft_restart(0); 389 soft_restart(0);
351} 390}
@@ -353,15 +392,11 @@ void clps711x_restart(char mode, const char *cmd)
353static void clps711x_idle(void) 392static void clps711x_idle(void)
354{ 393{
355 clps_writel(1, HALT); 394 clps_writel(1, HALT);
356 __asm__ __volatile__( 395 asm("mov r0, r0");
357 "mov r0, r0\n\ 396 asm("mov r0, r0");
358 mov r0, r0");
359} 397}
360 398
361static int __init clps711x_idle_init(void) 399void __init clps711x_init_early(void)
362{ 400{
363 arm_pm_idle = clps711x_idle; 401 arm_pm_idle = clps711x_idle;
364 return 0;
365} 402}
366
367arch_initcall(clps711x_idle_init);
diff --git a/arch/arm/mach-clps711x/common.h b/arch/arm/mach-clps711x/common.h
index f84a7292c70e..9a6767bfdc47 100644
--- a/arch/arm/mach-clps711x/common.h
+++ b/arch/arm/mach-clps711x/common.h
@@ -4,6 +4,8 @@
4 * Common bits. 4 * Common bits.
5 */ 5 */
6 6
7#include <linux/reboot.h>
8
7#define CLPS711X_NR_IRQS (33) 9#define CLPS711X_NR_IRQS (33)
8#define CLPS711X_NR_GPIO (4 * 8 + 3) 10#define CLPS711X_NR_GPIO (4 * 8 + 3)
9#define CLPS711X_GPIO(prt, bit) ((prt) * 8 + (bit)) 11#define CLPS711X_GPIO(prt, bit) ((prt) * 8 + (bit))
@@ -12,4 +14,5 @@ extern void clps711x_map_io(void);
12extern void clps711x_init_irq(void); 14extern void clps711x_init_irq(void);
13extern void clps711x_timer_init(void); 15extern void clps711x_timer_init(void);
14extern void clps711x_handle_irq(struct pt_regs *regs); 16extern void clps711x_handle_irq(struct pt_regs *regs);
15extern void clps711x_restart(char mode, const char *cmd); 17extern void clps711x_restart(enum reboot_mode mode, const char *cmd);
18extern void clps711x_init_early(void);
diff --git a/arch/arm/mach-clps711x/devices.c b/arch/arm/mach-clps711x/devices.c
new file mode 100644
index 000000000000..856b81cf2f8a
--- /dev/null
+++ b/arch/arm/mach-clps711x/devices.c
@@ -0,0 +1,68 @@
1/*
2 * CLPS711X common devices definitions
3 *
4 * Author: Alexander Shiyan <shc_work@mail.ru>, 2013
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
12#include <linux/platform_device.h>
13#include <linux/sizes.h>
14
15#include <mach/hardware.h>
16
17static const phys_addr_t clps711x_gpios[][2] __initconst = {
18 { PADR, PADDR },
19 { PBDR, PBDDR },
20 { PCDR, PCDDR },
21 { PDDR, PDDDR },
22 { PEDR, PEDDR },
23};
24
25static void __init clps711x_add_gpio(void)
26{
27 unsigned i;
28 struct resource gpio_res[2];
29
30 memset(gpio_res, 0, sizeof(gpio_res));
31
32 gpio_res[0].flags = IORESOURCE_MEM;
33 gpio_res[1].flags = IORESOURCE_MEM;
34
35 for (i = 0; i < ARRAY_SIZE(clps711x_gpios); i++) {
36 gpio_res[0].start = CLPS711X_PHYS_BASE + clps711x_gpios[i][0];
37 gpio_res[0].end = gpio_res[0].start;
38 gpio_res[1].start = CLPS711X_PHYS_BASE + clps711x_gpios[i][1];
39 gpio_res[1].end = gpio_res[1].start;
40
41 platform_device_register_simple("clps711x-gpio", i,
42 gpio_res, ARRAY_SIZE(gpio_res));
43 }
44}
45
46const struct resource clps711x_syscon_res[] __initconst = {
47 /* SYSCON1, SYSFLG1 */
48 DEFINE_RES_MEM(CLPS711X_PHYS_BASE + SYSCON1, SZ_128),
49 /* SYSCON2, SYSFLG2 */
50 DEFINE_RES_MEM(CLPS711X_PHYS_BASE + SYSCON2, SZ_128),
51 /* SYSCON3 */
52 DEFINE_RES_MEM(CLPS711X_PHYS_BASE + SYSCON3, SZ_64),
53};
54
55static void __init clps711x_add_syscon(void)
56{
57 unsigned i;
58
59 for (i = 0; i < ARRAY_SIZE(clps711x_syscon_res); i++)
60 platform_device_register_simple("clps711x-syscon", i + 1,
61 &clps711x_syscon_res[i], 1);
62}
63
64void __init clps711x_devices_init(void)
65{
66 clps711x_add_gpio();
67 clps711x_add_syscon();
68}
diff --git a/arch/arm/mach-clps711x/devices.h b/arch/arm/mach-clps711x/devices.h
new file mode 100644
index 000000000000..a5efc1744b84
--- /dev/null
+++ b/arch/arm/mach-clps711x/devices.h
@@ -0,0 +1,12 @@
1/*
2 * CLPS711X common devices definitions
3 *
4 * Copyright (C) 2013 Alexander Shiyan <shc_work@mail.ru>
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
12void clps711x_devices_init(void);
diff --git a/arch/arm/mach-clps711x/include/mach/autcpu12.h b/arch/arm/mach-clps711x/include/mach/autcpu12.h
deleted file mode 100644
index 0452f5f3f034..000000000000
--- a/arch/arm/mach-clps711x/include/mach/autcpu12.h
+++ /dev/null
@@ -1,59 +0,0 @@
1/*
2 * AUTCPU12 specific defines
3 *
4 * (c) 2001 Thomas Gleixner, autronix automation <gleixner@autronix.de>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
20#ifndef __ASM_ARCH_AUTCPU12_H
21#define __ASM_ARCH_AUTCPU12_H
22
23/*
24 * The flash bank is wired to chip select 0
25 */
26#define AUTCPU12_PHYS_FLASH CS0_PHYS_BASE /* physical */
27
28/* offset for device specific information structure */
29#define AUTCPU12_LCDINFO_OFFS (0x00010000)
30
31/* Videomemory in the internal SRAM (CS 6) */
32#define AUTCPU12_PHYS_VIDEO CS6_PHYS_BASE
33
34/*
35* All special IO's are tied to CS1
36*/
37#define AUTCPU12_PHYS_CHAR_LCD CS1_PHYS_BASE +0x00000000 /* physical */
38
39#define AUTCPU12_PHYS_NVRAM CS1_PHYS_BASE +0x02000000 /* physical */
40
41#define AUTCPU12_PHYS_CSAUX1 CS1_PHYS_BASE +0x04000000 /* physical */
42
43#define AUTCPU12_PHYS_CAN CS1_PHYS_BASE +0x08000000 /* physical */
44
45#define AUTCPU12_PHYS_TOUCH CS1_PHYS_BASE +0x0A000000 /* physical */
46
47#define AUTCPU12_PHYS_IO CS1_PHYS_BASE +0x0C000000 /* physical */
48
49#define AUTCPU12_PHYS_LPT CS1_PHYS_BASE +0x0E000000 /* physical */
50
51/*
52* defines for lcd contrast
53*/
54#define AUTCPU12_DPOT_PORT_OFFSET PEDR
55#define AUTCPU12_DPOT_CS (1<<0)
56#define AUTCPU12_DPOT_CLK (1<<1)
57#define AUTCPU12_DPOT_UD (1<<2)
58
59#endif
diff --git a/arch/arm/mach-clps711x/include/mach/clps711x.h b/arch/arm/mach-clps711x/include/mach/clps711x.h
index 01d1b9559710..0286f4bf9945 100644
--- a/arch/arm/mach-clps711x/include/mach/clps711x.h
+++ b/arch/arm/mach-clps711x/include/mach/clps711x.h
@@ -21,6 +21,8 @@
21#ifndef __MACH_CLPS711X_H 21#ifndef __MACH_CLPS711X_H
22#define __MACH_CLPS711X_H 22#define __MACH_CLPS711X_H
23 23
24#include <linux/mfd/syscon/clps711x.h>
25
24#define CLPS711X_PHYS_BASE (0x80000000) 26#define CLPS711X_PHYS_BASE (0x80000000)
25 27
26#define PADR (0x0000) 28#define PADR (0x0000)
@@ -96,83 +98,9 @@
96#define RANDID2 (0x2708) 98#define RANDID2 (0x2708)
97#define RANDID3 (0x270c) 99#define RANDID3 (0x270c)
98 100
99/* common bits: SYSCON1 / SYSCON2 */
100#define SYSCON_UARTEN (1 << 8)
101
102#define SYSCON1_KBDSCAN(x) ((x) & 15)
103#define SYSCON1_KBDSCANMASK (15)
104#define SYSCON1_TC1M (1 << 4)
105#define SYSCON1_TC1S (1 << 5)
106#define SYSCON1_TC2M (1 << 6)
107#define SYSCON1_TC2S (1 << 7)
108#define SYSCON1_UART1EN SYSCON_UARTEN
109#define SYSCON1_BZTOG (1 << 9)
110#define SYSCON1_BZMOD (1 << 10)
111#define SYSCON1_DBGEN (1 << 11)
112#define SYSCON1_LCDEN (1 << 12)
113#define SYSCON1_CDENTX (1 << 13)
114#define SYSCON1_CDENRX (1 << 14)
115#define SYSCON1_SIREN (1 << 15)
116#define SYSCON1_ADCKSEL(x) (((x) & 3) << 16)
117#define SYSCON1_ADCKSEL_MASK (3 << 16)
118#define SYSCON1_EXCKEN (1 << 18)
119#define SYSCON1_WAKEDIS (1 << 19)
120#define SYSCON1_IRTXM (1 << 20)
121
122/* common bits: SYSFLG1 / SYSFLG2 */
123#define SYSFLG_UBUSY (1 << 11)
124#define SYSFLG_URXFE (1 << 22)
125#define SYSFLG_UTXFF (1 << 23)
126
127#define SYSFLG1_MCDR (1 << 0)
128#define SYSFLG1_DCDET (1 << 1)
129#define SYSFLG1_WUDR (1 << 2)
130#define SYSFLG1_WUON (1 << 3)
131#define SYSFLG1_CTS (1 << 8)
132#define SYSFLG1_DSR (1 << 9)
133#define SYSFLG1_DCD (1 << 10)
134#define SYSFLG1_UBUSY SYSFLG_UBUSY
135#define SYSFLG1_NBFLG (1 << 12)
136#define SYSFLG1_RSTFLG (1 << 13)
137#define SYSFLG1_PFFLG (1 << 14)
138#define SYSFLG1_CLDFLG (1 << 15)
139#define SYSFLG1_URXFE SYSFLG_URXFE
140#define SYSFLG1_UTXFF SYSFLG_UTXFF
141#define SYSFLG1_CRXFE (1 << 24)
142#define SYSFLG1_CTXFF (1 << 25)
143#define SYSFLG1_SSIBUSY (1 << 26)
144#define SYSFLG1_ID (1 << 29)
145#define SYSFLG1_VERID(x) (((x) >> 30) & 3)
146#define SYSFLG1_VERID_MASK (3 << 30)
147
148#define SYSFLG2_SSRXOF (1 << 0)
149#define SYSFLG2_RESVAL (1 << 1)
150#define SYSFLG2_RESFRM (1 << 2)
151#define SYSFLG2_SS2RXFE (1 << 3)
152#define SYSFLG2_SS2TXFF (1 << 4)
153#define SYSFLG2_SS2TXUF (1 << 5)
154#define SYSFLG2_CKMODE (1 << 6)
155#define SYSFLG2_UBUSY SYSFLG_UBUSY
156#define SYSFLG2_URXFE SYSFLG_URXFE
157#define SYSFLG2_UTXFF SYSFLG_UTXFF
158
159#define LCDCON_GSEN (1 << 30) 101#define LCDCON_GSEN (1 << 30)
160#define LCDCON_GSMD (1 << 31) 102#define LCDCON_GSMD (1 << 31)
161 103
162#define SYSCON2_SERSEL (1 << 0)
163#define SYSCON2_KBD6 (1 << 1)
164#define SYSCON2_DRAMZ (1 << 2)
165#define SYSCON2_KBWEN (1 << 3)
166#define SYSCON2_SS2TXEN (1 << 4)
167#define SYSCON2_PCCARD1 (1 << 5)
168#define SYSCON2_PCCARD2 (1 << 6)
169#define SYSCON2_SS2RXEN (1 << 7)
170#define SYSCON2_UART2EN SYSCON_UARTEN
171#define SYSCON2_SS2MAEN (1 << 9)
172#define SYSCON2_OSTB (1 << 12)
173#define SYSCON2_CLKENSL (1 << 13)
174#define SYSCON2_BUZFREQ (1 << 14)
175
176/* common bits: UARTDR1 / UARTDR2 */ 104/* common bits: UARTDR1 / UARTDR2 */
177#define UARTDR_FRMERR (1 << 8) 105#define UARTDR_FRMERR (1 << 8)
178#define UARTDR_PARERR (1 << 9) 106#define UARTDR_PARERR (1 << 9)
@@ -228,18 +156,6 @@
228#define DAI64FS_MCLK256EN (1 << 3) 156#define DAI64FS_MCLK256EN (1 << 3)
229#define DAI64FS_LOOPBACK (1 << 5) 157#define DAI64FS_LOOPBACK (1 << 5)
230 158
231#define SYSCON3_ADCCON (1 << 0)
232#define SYSCON3_CLKCTL0 (1 << 1)
233#define SYSCON3_CLKCTL1 (1 << 2)
234#define SYSCON3_DAISEL (1 << 3)
235#define SYSCON3_ADCCKNSEN (1 << 4)
236#define SYSCON3_VERSN(x) (((x) >> 5) & 7)
237#define SYSCON3_VERSN_MASK (7 << 5)
238#define SYSCON3_FASTWAKE (1 << 8)
239#define SYSCON3_DAIEN (1 << 9)
240#define SYSCON3_128FS SYSCON3_DAIEN
241#define SYSCON3_ENPD67 (1 << 10)
242
243#define SDCONF_ACTIVE (1 << 10) 159#define SDCONF_ACTIVE (1 << 10)
244#define SDCONF_CLKCTL (1 << 9) 160#define SDCONF_CLKCTL (1 << 9)
245#define SDCONF_WIDTH_4 (0 << 7) 161#define SDCONF_WIDTH_4 (0 << 7)
diff --git a/arch/arm/mach-clps711x/include/mach/hardware.h b/arch/arm/mach-clps711x/include/mach/hardware.h
index 2f23dd5d73e4..c5a8ea6839ef 100644
--- a/arch/arm/mach-clps711x/include/mach/hardware.h
+++ b/arch/arm/mach-clps711x/include/mach/hardware.h
@@ -70,11 +70,4 @@
70#define CLPS711X_SDRAM0_BASE (0xc0000000) 70#define CLPS711X_SDRAM0_BASE (0xc0000000)
71#define CLPS711X_SDRAM1_BASE (0xd0000000) 71#define CLPS711X_SDRAM1_BASE (0xd0000000)
72 72
73#if defined (CONFIG_ARCH_EDB7211)
74
75/* The extra 8 lines of the keyboard matrix are wired to chip select 3 */
76#define EP7211_PHYS_EXTKBD CS3_PHYS_BASE
77
78#endif /* CONFIG_ARCH_EDB7211 */
79
80#endif 73#endif
diff --git a/arch/arm/mach-clps711x/include/mach/memory.h b/arch/arm/mach-clps711x/include/mach/memory.h
deleted file mode 100644
index fc0e028d9405..000000000000
--- a/arch/arm/mach-clps711x/include/mach/memory.h
+++ /dev/null
@@ -1,41 +0,0 @@
1/*
2 * arch/arm/mach-clps711x/include/mach/memory.h
3 *
4 * Copyright (C) 1999 ARM Limited
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
20#ifndef __ASM_ARCH_MEMORY_H
21#define __ASM_ARCH_MEMORY_H
22
23/*
24 * Physical DRAM offset.
25 */
26#define PLAT_PHYS_OFFSET UL(0xc0000000)
27
28/*
29 * The PS7211 allows up to 256MB max per DRAM bank, but the EDB7211
30 * uses only one of the two banks (bank #1). However, even within
31 * bank #1, memory is discontiguous.
32 *
33 * The EDB7211 has two 8MB DRAM areas with 8MB of empty space between
34 * them, so we use 24 for the node max shift to get 16MB node sizes.
35 */
36
37#define SECTION_SIZE_BITS 24
38#define MAX_PHYSMEM_BITS 32
39
40#endif
41
diff --git a/arch/arm/mach-clps711x/include/mach/syspld.h b/arch/arm/mach-clps711x/include/mach/syspld.h
deleted file mode 100644
index 9a433155bf58..000000000000
--- a/arch/arm/mach-clps711x/include/mach/syspld.h
+++ /dev/null
@@ -1,116 +0,0 @@
1/*
2 * arch/arm/mach-clps711x/include/mach/syspld.h
3 *
4 * System Control PLD register definitions.
5 *
6 * Copyright (C) 2000 Deep Blue Solutions Ltd.
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 */
22#ifndef __ASM_ARCH_SYSPLD_H
23#define __ASM_ARCH_SYSPLD_H
24
25#define SYSPLD_PHYS_BASE (0x10000000)
26#define SYSPLD_VIRT_BASE IO_ADDRESS(SYSPLD_PHYS_BASE)
27
28#define SYSPLD_REG(type, off) (*(volatile type *)(SYSPLD_VIRT_BASE + (off)))
29
30#define PLD_INT SYSPLD_REG(u32, 0x000000)
31#define PLD_INT_PENIRQ (1 << 5)
32#define PLD_INT_UCB_IRQ (1 << 1)
33#define PLD_INT_KBD_ATN (1 << 0) /* EINT1 */
34
35#define PLD_PWR SYSPLD_REG(u32, 0x000004)
36#define PLD_PWR_EXT (1 << 5)
37#define PLD_PWR_MODE (1 << 4) /* 1 = PWM, 0 = PFM */
38#define PLD_S4_ON (1 << 3) /* LCD bias voltage enable */
39#define PLD_S3_ON (1 << 2) /* LCD backlight enable */
40#define PLD_S2_ON (1 << 1) /* LCD 3V3 supply enable */
41#define PLD_S1_ON (1 << 0) /* LCD 3V supply enable */
42
43#define PLD_KBD SYSPLD_REG(u32, 0x000008)
44#define PLD_KBD_WAKE (1 << 1)
45#define PLD_KBD_EN (1 << 0)
46
47#define PLD_SPI SYSPLD_REG(u32, 0x00000c)
48#define PLD_SPI_EN (1 << 0)
49
50#define PLD_IO SYSPLD_REG(u32, 0x000010)
51#define PLD_IO_BOOTSEL (1 << 6) /* boot sel switch */
52#define PLD_IO_USER (1 << 5) /* user defined switch */
53#define PLD_IO_LED3 (1 << 4)
54#define PLD_IO_LED2 (1 << 3)
55#define PLD_IO_LED1 (1 << 2)
56#define PLD_IO_LED0 (1 << 1)
57#define PLD_IO_LEDEN (1 << 0)
58
59#define PLD_IRDA SYSPLD_REG(u32, 0x000014)
60#define PLD_IRDA_EN (1 << 0)
61
62#define PLD_COM2 SYSPLD_REG(u32, 0x000018)
63#define PLD_COM2_EN (1 << 0)
64
65#define PLD_COM1 SYSPLD_REG(u32, 0x00001c)
66#define PLD_COM1_EN (1 << 0)
67
68#define PLD_AUD SYSPLD_REG(u32, 0x000020)
69#define PLD_AUD_DIV1 (1 << 6)
70#define PLD_AUD_DIV0 (1 << 5)
71#define PLD_AUD_CLK_SEL1 (1 << 4)
72#define PLD_AUD_CLK_SEL0 (1 << 3)
73#define PLD_AUD_MIC_PWR (1 << 2)
74#define PLD_AUD_MIC_GAIN (1 << 1)
75#define PLD_AUD_CODEC_EN (1 << 0)
76
77#define PLD_CF SYSPLD_REG(u32, 0x000024)
78#define PLD_CF2_SLEEP (1 << 5)
79#define PLD_CF1_SLEEP (1 << 4)
80#define PLD_CF2_nPDREQ (1 << 3)
81#define PLD_CF1_nPDREQ (1 << 2)
82#define PLD_CF2_nIRQ (1 << 1)
83#define PLD_CF1_nIRQ (1 << 0)
84
85#define PLD_SDC SYSPLD_REG(u32, 0x000028)
86#define PLD_SDC_INT_EN (1 << 2)
87#define PLD_SDC_WP (1 << 1)
88#define PLD_SDC_CD (1 << 0)
89
90#define PLD_FPGA SYSPLD_REG(u32, 0x00002c)
91
92#define PLD_CODEC SYSPLD_REG(u32, 0x400000)
93#define PLD_CODEC_IRQ3 (1 << 4)
94#define PLD_CODEC_IRQ2 (1 << 3)
95#define PLD_CODEC_IRQ1 (1 << 2)
96#define PLD_CODEC_EN (1 << 0)
97
98#define PLD_BRITE SYSPLD_REG(u32, 0x400004)
99#define PLD_BRITE_UP (1 << 1)
100#define PLD_BRITE_DN (1 << 0)
101
102#define PLD_LCDEN SYSPLD_REG(u32, 0x400008)
103#define PLD_LCDEN_EN (1 << 0)
104
105#define PLD_ID SYSPLD_REG(u32, 0x40000c)
106
107#define PLD_TCH SYSPLD_REG(u32, 0x400010)
108#define PLD_TCH_PENIRQ (1 << 1)
109#define PLD_TCH_EN (1 << 0)
110
111#define PLD_GPIO SYSPLD_REG(u32, 0x400014)
112#define PLD_GPIO2 (1 << 2)
113#define PLD_GPIO1 (1 << 1)
114#define PLD_GPIO0 (1 << 0)
115
116#endif
diff --git a/arch/arm/mach-cns3xxx/core.h b/arch/arm/mach-cns3xxx/core.h
index b23b17b4da10..5218b6198dc2 100644
--- a/arch/arm/mach-cns3xxx/core.h
+++ b/arch/arm/mach-cns3xxx/core.h
@@ -11,6 +11,8 @@
11#ifndef __CNS3XXX_CORE_H 11#ifndef __CNS3XXX_CORE_H
12#define __CNS3XXX_CORE_H 12#define __CNS3XXX_CORE_H
13 13
14#include <linux/reboot.h>
15
14extern void cns3xxx_timer_init(void); 16extern void cns3xxx_timer_init(void);
15 17
16#ifdef CONFIG_CACHE_L2X0 18#ifdef CONFIG_CACHE_L2X0
@@ -22,6 +24,6 @@ static inline void cns3xxx_l2x0_init(void) {}
22void __init cns3xxx_map_io(void); 24void __init cns3xxx_map_io(void);
23void __init cns3xxx_init_irq(void); 25void __init cns3xxx_init_irq(void);
24void cns3xxx_power_off(void); 26void cns3xxx_power_off(void);
25void cns3xxx_restart(char, const char *); 27void cns3xxx_restart(enum reboot_mode, const char *);
26 28
27#endif /* __CNS3XXX_CORE_H */ 29#endif /* __CNS3XXX_CORE_H */
diff --git a/arch/arm/mach-cns3xxx/pm.c b/arch/arm/mach-cns3xxx/pm.c
index 79e3d47aad65..fb38c726e987 100644
--- a/arch/arm/mach-cns3xxx/pm.c
+++ b/arch/arm/mach-cns3xxx/pm.c
@@ -89,7 +89,7 @@ void cns3xxx_pwr_soft_rst(unsigned int block)
89} 89}
90EXPORT_SYMBOL(cns3xxx_pwr_soft_rst); 90EXPORT_SYMBOL(cns3xxx_pwr_soft_rst);
91 91
92void cns3xxx_restart(char mode, const char *cmd) 92void cns3xxx_restart(enum reboot_mode mode, const char *cmd)
93{ 93{
94 /* 94 /*
95 * To reset, we hit the on-board reset register 95 * To reset, we hit the on-board reset register
diff --git a/arch/arm/mach-davinci/Kconfig b/arch/arm/mach-davinci/Kconfig
index a075b3e0c5c7..e026b19b23ea 100644
--- a/arch/arm/mach-davinci/Kconfig
+++ b/arch/arm/mach-davinci/Kconfig
@@ -40,6 +40,7 @@ config ARCH_DAVINCI_DA850
40 bool "DA850/OMAP-L138/AM18x based system" 40 bool "DA850/OMAP-L138/AM18x based system"
41 select ARCH_DAVINCI_DA8XX 41 select ARCH_DAVINCI_DA8XX
42 select ARCH_HAS_CPUFREQ 42 select ARCH_HAS_CPUFREQ
43 select CPU_FREQ_TABLE
43 select CP_INTC 44 select CP_INTC
44 45
45config ARCH_DAVINCI_DA8XX 46config ARCH_DAVINCI_DA8XX
diff --git a/arch/arm/mach-davinci/Makefile b/arch/arm/mach-davinci/Makefile
index dd1ffccc75e9..63997a1128e6 100644
--- a/arch/arm/mach-davinci/Makefile
+++ b/arch/arm/mach-davinci/Makefile
@@ -5,7 +5,7 @@
5 5
6# Common objects 6# Common objects
7obj-y := time.o clock.o serial.o psc.o \ 7obj-y := time.o clock.o serial.o psc.o \
8 dma.o usb.o common.o sram.o aemif.o 8 usb.o common.o sram.o aemif.o
9 9
10obj-$(CONFIG_DAVINCI_MUX) += mux.o 10obj-$(CONFIG_DAVINCI_MUX) += mux.o
11 11
diff --git a/arch/arm/mach-davinci/board-da850-evm.c b/arch/arm/mach-davinci/board-da850-evm.c
index 8a24b6c6339f..bea6793a7ede 100644
--- a/arch/arm/mach-davinci/board-da850-evm.c
+++ b/arch/arm/mach-davinci/board-da850-evm.c
@@ -985,7 +985,6 @@ static struct regulator_init_data tps65070_regulator_data[] = {
985static struct touchscreen_init_data tps6507x_touchscreen_data = { 985static struct touchscreen_init_data tps6507x_touchscreen_data = {
986 .poll_period = 30, /* ms between touch samples */ 986 .poll_period = 30, /* ms between touch samples */
987 .min_pressure = 0x30, /* minimum pressure to trigger touch */ 987 .min_pressure = 0x30, /* minimum pressure to trigger touch */
988 .vref = 0, /* turn off vref when not using A/D */
989 .vendor = 0, /* /sys/class/input/input?/id/vendor */ 988 .vendor = 0, /* /sys/class/input/input?/id/vendor */
990 .product = 65070, /* /sys/class/input/input?/id/product */ 989 .product = 65070, /* /sys/class/input/input?/id/product */
991 .version = 0x100, /* /sys/class/input/input?/id/version */ 990 .version = 0x100, /* /sys/class/input/input?/id/version */
diff --git a/arch/arm/mach-davinci/board-dm365-evm.c b/arch/arm/mach-davinci/board-dm365-evm.c
index fd38c8d22e3c..4cdb61c54459 100644
--- a/arch/arm/mach-davinci/board-dm365-evm.c
+++ b/arch/arm/mach-davinci/board-dm365-evm.c
@@ -505,11 +505,10 @@ static struct vpbe_output dm365evm_vpbe_outputs[] = {
505/* 505/*
506 * Amplifiers on the board 506 * Amplifiers on the board
507 */ 507 */
508struct ths7303_platform_data ths7303_pdata = { 508static struct ths7303_platform_data ths7303_pdata = {
509 .ch_1 = 3, 509 .ch_1 = 3,
510 .ch_2 = 3, 510 .ch_2 = 3,
511 .ch_3 = 3, 511 .ch_3 = 3,
512 .init_enable = 1,
513}; 512};
514 513
515static struct amp_config_info vpbe_amp = { 514static struct amp_config_info vpbe_amp = {
diff --git a/arch/arm/mach-davinci/board-sffsdr.c b/arch/arm/mach-davinci/board-sffsdr.c
index 739be7e738fe..513eee14f77d 100644
--- a/arch/arm/mach-davinci/board-sffsdr.c
+++ b/arch/arm/mach-davinci/board-sffsdr.c
@@ -151,7 +151,6 @@ static __init void davinci_sffsdr_init(void)
151} 151}
152 152
153MACHINE_START(SFFSDR, "Lyrtech SFFSDR") 153MACHINE_START(SFFSDR, "Lyrtech SFFSDR")
154 /* Maintainer: Hugo Villeneuve hugo.villeneuve@lyrtech.com */
155 .atag_offset = 0x100, 154 .atag_offset = 0x100,
156 .map_io = davinci_sffsdr_map_io, 155 .map_io = davinci_sffsdr_map_io,
157 .init_irq = davinci_irq_init, 156 .init_irq = davinci_irq_init,
diff --git a/arch/arm/mach-davinci/board-tnetv107x-evm.c b/arch/arm/mach-davinci/board-tnetv107x-evm.c
index ba798370fc96..78ea395d2aca 100644
--- a/arch/arm/mach-davinci/board-tnetv107x-evm.c
+++ b/arch/arm/mach-davinci/board-tnetv107x-evm.c
@@ -26,12 +26,12 @@
26#include <linux/input.h> 26#include <linux/input.h>
27#include <linux/input/matrix_keypad.h> 27#include <linux/input/matrix_keypad.h>
28#include <linux/spi/spi.h> 28#include <linux/spi/spi.h>
29#include <linux/platform_data/edma.h>
29 30
30#include <asm/mach/arch.h> 31#include <asm/mach/arch.h>
31#include <asm/mach-types.h> 32#include <asm/mach-types.h>
32 33
33#include <mach/irqs.h> 34#include <mach/irqs.h>
34#include <mach/edma.h>
35#include <mach/mux.h> 35#include <mach/mux.h>
36#include <mach/cp_intc.h> 36#include <mach/cp_intc.h>
37#include <mach/tnetv107x.h> 37#include <mach/tnetv107x.h>
diff --git a/arch/arm/mach-davinci/da850.c b/arch/arm/mach-davinci/da850.c
index 4d6933848abf..a0d4f6038b60 100644
--- a/arch/arm/mach-davinci/da850.c
+++ b/arch/arm/mach-davinci/da850.c
@@ -1004,7 +1004,7 @@ static const struct da850_opp da850_opp_96 = {
1004 1004
1005#define OPP(freq) \ 1005#define OPP(freq) \
1006 { \ 1006 { \
1007 .index = (unsigned int) &da850_opp_##freq, \ 1007 .driver_data = (unsigned int) &da850_opp_##freq, \
1008 .frequency = freq * 1000, \ 1008 .frequency = freq * 1000, \
1009 } 1009 }
1010 1010
@@ -1016,7 +1016,7 @@ static struct cpufreq_frequency_table da850_freq_table[] = {
1016 OPP(200), 1016 OPP(200),
1017 OPP(96), 1017 OPP(96),
1018 { 1018 {
1019 .index = 0, 1019 .driver_data = 0,
1020 .frequency = CPUFREQ_TABLE_END, 1020 .frequency = CPUFREQ_TABLE_END,
1021 }, 1021 },
1022}; 1022};
@@ -1044,7 +1044,7 @@ static int da850_set_voltage(unsigned int index)
1044 if (!cvdd) 1044 if (!cvdd)
1045 return -ENODEV; 1045 return -ENODEV;
1046 1046
1047 opp = (struct da850_opp *) cpufreq_info.freq_table[index].index; 1047 opp = (struct da850_opp *) cpufreq_info.freq_table[index].driver_data;
1048 1048
1049 return regulator_set_voltage(cvdd, opp->cvdd_min, opp->cvdd_max); 1049 return regulator_set_voltage(cvdd, opp->cvdd_min, opp->cvdd_max);
1050} 1050}
@@ -1125,7 +1125,7 @@ static int da850_set_pll0rate(struct clk *clk, unsigned long index)
1125 struct pll_data *pll = clk->pll_data; 1125 struct pll_data *pll = clk->pll_data;
1126 int ret; 1126 int ret;
1127 1127
1128 opp = (struct da850_opp *) cpufreq_info.freq_table[index].index; 1128 opp = (struct da850_opp *) cpufreq_info.freq_table[index].driver_data;
1129 prediv = opp->prediv; 1129 prediv = opp->prediv;
1130 mult = opp->mult; 1130 mult = opp->mult;
1131 postdiv = opp->postdiv; 1131 postdiv = opp->postdiv;
diff --git a/arch/arm/mach-davinci/davinci.h b/arch/arm/mach-davinci/davinci.h
index 1ab3df423dac..a883043d0820 100644
--- a/arch/arm/mach-davinci/davinci.h
+++ b/arch/arm/mach-davinci/davinci.h
@@ -23,9 +23,9 @@
23#include <linux/platform_device.h> 23#include <linux/platform_device.h>
24#include <linux/spi/spi.h> 24#include <linux/spi/spi.h>
25#include <linux/platform_data/davinci_asp.h> 25#include <linux/platform_data/davinci_asp.h>
26#include <linux/platform_data/edma.h>
26#include <linux/platform_data/keyscan-davinci.h> 27#include <linux/platform_data/keyscan-davinci.h>
27#include <mach/hardware.h> 28#include <mach/hardware.h>
28#include <mach/edma.h>
29 29
30#include <media/davinci/vpfe_capture.h> 30#include <media/davinci/vpfe_capture.h>
31#include <media/davinci/vpif_types.h> 31#include <media/davinci/vpif_types.h>
@@ -77,32 +77,32 @@ void davinci_map_sysmod(void);
77#define DM646X_ASYNC_EMIF_CS2_SPACE_BASE 0x42000000 77#define DM646X_ASYNC_EMIF_CS2_SPACE_BASE 0x42000000
78 78
79/* DM355 function declarations */ 79/* DM355 function declarations */
80void __init dm355_init(void); 80void dm355_init(void);
81void dm355_init_spi0(unsigned chipselect_mask, 81void dm355_init_spi0(unsigned chipselect_mask,
82 const struct spi_board_info *info, unsigned len); 82 const struct spi_board_info *info, unsigned len);
83void __init dm355_init_asp1(u32 evt_enable, struct snd_platform_data *pdata); 83void dm355_init_asp1(u32 evt_enable, struct snd_platform_data *pdata);
84int dm355_init_video(struct vpfe_config *, struct vpbe_config *); 84int dm355_init_video(struct vpfe_config *, struct vpbe_config *);
85 85
86/* DM365 function declarations */ 86/* DM365 function declarations */
87void __init dm365_init(void); 87void dm365_init(void);
88void __init dm365_init_asp(struct snd_platform_data *pdata); 88void dm365_init_asp(struct snd_platform_data *pdata);
89void __init dm365_init_vc(struct snd_platform_data *pdata); 89void dm365_init_vc(struct snd_platform_data *pdata);
90void __init dm365_init_ks(struct davinci_ks_platform_data *pdata); 90void dm365_init_ks(struct davinci_ks_platform_data *pdata);
91void __init dm365_init_rtc(void); 91void dm365_init_rtc(void);
92void dm365_init_spi0(unsigned chipselect_mask, 92void dm365_init_spi0(unsigned chipselect_mask,
93 const struct spi_board_info *info, unsigned len); 93 const struct spi_board_info *info, unsigned len);
94int dm365_init_video(struct vpfe_config *, struct vpbe_config *); 94int dm365_init_video(struct vpfe_config *, struct vpbe_config *);
95 95
96/* DM644x function declarations */ 96/* DM644x function declarations */
97void __init dm644x_init(void); 97void dm644x_init(void);
98void __init dm644x_init_asp(struct snd_platform_data *pdata); 98void dm644x_init_asp(struct snd_platform_data *pdata);
99int __init dm644x_init_video(struct vpfe_config *, struct vpbe_config *); 99int dm644x_init_video(struct vpfe_config *, struct vpbe_config *);
100 100
101/* DM646x function declarations */ 101/* DM646x function declarations */
102void __init dm646x_init(void); 102void dm646x_init(void);
103void __init dm646x_init_mcasp0(struct snd_platform_data *pdata); 103void dm646x_init_mcasp0(struct snd_platform_data *pdata);
104void __init dm646x_init_mcasp1(struct snd_platform_data *pdata); 104void dm646x_init_mcasp1(struct snd_platform_data *pdata);
105int __init dm646x_init_edma(struct edma_rsv_info *rsv); 105int dm646x_init_edma(struct edma_rsv_info *rsv);
106void dm646x_video_init(void); 106void dm646x_video_init(void);
107void dm646x_setup_vpif(struct vpif_display_config *, 107void dm646x_setup_vpif(struct vpif_display_config *,
108 struct vpif_capture_config *); 108 struct vpif_capture_config *);
diff --git a/arch/arm/mach-davinci/devices-da8xx.c b/arch/arm/mach-davinci/devices-da8xx.c
index bf572525175d..71a46a348761 100644
--- a/arch/arm/mach-davinci/devices-da8xx.c
+++ b/arch/arm/mach-davinci/devices-da8xx.c
@@ -16,6 +16,7 @@
16#include <linux/serial_8250.h> 16#include <linux/serial_8250.h>
17#include <linux/ahci_platform.h> 17#include <linux/ahci_platform.h>
18#include <linux/clk.h> 18#include <linux/clk.h>
19#include <linux/reboot.h>
19 20
20#include <mach/cputype.h> 21#include <mach/cputype.h>
21#include <mach/common.h> 22#include <mach/common.h>
@@ -105,27 +106,27 @@ struct platform_device da8xx_serial_device = {
105 }, 106 },
106}; 107};
107 108
108static const s8 da8xx_queue_tc_mapping[][2] = { 109static s8 da8xx_queue_tc_mapping[][2] = {
109 /* {event queue no, TC no} */ 110 /* {event queue no, TC no} */
110 {0, 0}, 111 {0, 0},
111 {1, 1}, 112 {1, 1},
112 {-1, -1} 113 {-1, -1}
113}; 114};
114 115
115static const s8 da8xx_queue_priority_mapping[][2] = { 116static s8 da8xx_queue_priority_mapping[][2] = {
116 /* {event queue no, Priority} */ 117 /* {event queue no, Priority} */
117 {0, 3}, 118 {0, 3},
118 {1, 7}, 119 {1, 7},
119 {-1, -1} 120 {-1, -1}
120}; 121};
121 122
122static const s8 da850_queue_tc_mapping[][2] = { 123static s8 da850_queue_tc_mapping[][2] = {
123 /* {event queue no, TC no} */ 124 /* {event queue no, TC no} */
124 {0, 0}, 125 {0, 0},
125 {-1, -1} 126 {-1, -1}
126}; 127};
127 128
128static const s8 da850_queue_priority_mapping[][2] = { 129static s8 da850_queue_priority_mapping[][2] = {
129 /* {event queue no, Priority} */ 130 /* {event queue no, Priority} */
130 {0, 3}, 131 {0, 3},
131 {-1, -1} 132 {-1, -1}
@@ -366,7 +367,7 @@ static struct platform_device da8xx_wdt_device = {
366 .resource = da8xx_watchdog_resources, 367 .resource = da8xx_watchdog_resources,
367}; 368};
368 369
369void da8xx_restart(char mode, const char *cmd) 370void da8xx_restart(enum reboot_mode mode, const char *cmd)
370{ 371{
371 struct device *dev; 372 struct device *dev;
372 373
diff --git a/arch/arm/mach-davinci/devices-tnetv107x.c b/arch/arm/mach-davinci/devices-tnetv107x.c
index cfb194df18ed..128cb9ae80f4 100644
--- a/arch/arm/mach-davinci/devices-tnetv107x.c
+++ b/arch/arm/mach-davinci/devices-tnetv107x.c
@@ -18,10 +18,10 @@
18#include <linux/dma-mapping.h> 18#include <linux/dma-mapping.h>
19#include <linux/clk.h> 19#include <linux/clk.h>
20#include <linux/slab.h> 20#include <linux/slab.h>
21#include <linux/platform_data/edma.h>
21 22
22#include <mach/common.h> 23#include <mach/common.h>
23#include <mach/irqs.h> 24#include <mach/irqs.h>
24#include <mach/edma.h>
25#include <mach/tnetv107x.h> 25#include <mach/tnetv107x.h>
26 26
27#include "clock.h" 27#include "clock.h"
@@ -58,14 +58,14 @@
58#define TNETV107X_DMACH_SDIO1_RX 28 58#define TNETV107X_DMACH_SDIO1_RX 28
59#define TNETV107X_DMACH_SDIO1_TX 29 59#define TNETV107X_DMACH_SDIO1_TX 29
60 60
61static const s8 edma_tc_mapping[][2] = { 61static s8 edma_tc_mapping[][2] = {
62 /* event queue no TC no */ 62 /* event queue no TC no */
63 { 0, 0 }, 63 { 0, 0 },
64 { 1, 1 }, 64 { 1, 1 },
65 { -1, -1 } 65 { -1, -1 }
66}; 66};
67 67
68static const s8 edma_priority_mapping[][2] = { 68static s8 edma_priority_mapping[][2] = {
69 /* event queue no Prio */ 69 /* event queue no Prio */
70 { 0, 3 }, 70 { 0, 3 },
71 { 1, 7 }, 71 { 1, 7 },
diff --git a/arch/arm/mach-davinci/devices.c b/arch/arm/mach-davinci/devices.c
index a7068a3aa9d3..111573c0aad1 100644
--- a/arch/arm/mach-davinci/devices.c
+++ b/arch/arm/mach-davinci/devices.c
@@ -13,15 +13,17 @@
13#include <linux/platform_device.h> 13#include <linux/platform_device.h>
14#include <linux/dma-mapping.h> 14#include <linux/dma-mapping.h>
15#include <linux/io.h> 15#include <linux/io.h>
16#include <linux/reboot.h>
16 17
17#include <mach/hardware.h> 18#include <mach/hardware.h>
18#include <linux/platform_data/i2c-davinci.h> 19#include <linux/platform_data/i2c-davinci.h>
19#include <mach/irqs.h> 20#include <mach/irqs.h>
20#include <mach/cputype.h> 21#include <mach/cputype.h>
21#include <mach/mux.h> 22#include <mach/mux.h>
22#include <mach/edma.h>
23#include <linux/platform_data/mmc-davinci.h> 23#include <linux/platform_data/mmc-davinci.h>
24#include <mach/time.h> 24#include <mach/time.h>
25#include <linux/platform_data/edma.h>
26
25 27
26#include "davinci.h" 28#include "davinci.h"
27#include "clock.h" 29#include "clock.h"
@@ -34,6 +36,9 @@
34#define DM365_MMCSD0_BASE 0x01D11000 36#define DM365_MMCSD0_BASE 0x01D11000
35#define DM365_MMCSD1_BASE 0x01D00000 37#define DM365_MMCSD1_BASE 0x01D00000
36 38
39#define DAVINCI_DMA_MMCRXEVT 26
40#define DAVINCI_DMA_MMCTXEVT 27
41
37void __iomem *davinci_sysmod_base; 42void __iomem *davinci_sysmod_base;
38 43
39void davinci_map_sysmod(void) 44void davinci_map_sysmod(void)
@@ -303,7 +308,7 @@ struct platform_device davinci_wdt_device = {
303 .resource = wdt_resources, 308 .resource = wdt_resources,
304}; 309};
305 310
306void davinci_restart(char mode, const char *cmd) 311void davinci_restart(enum reboot_mode mode, const char *cmd)
307{ 312{
308 davinci_watchdog_reset(&davinci_wdt_device); 313 davinci_watchdog_reset(&davinci_wdt_device);
309} 314}
diff --git a/arch/arm/mach-davinci/dm355.c b/arch/arm/mach-davinci/dm355.c
index a11034a358f1..86100d179694 100644
--- a/arch/arm/mach-davinci/dm355.c
+++ b/arch/arm/mach-davinci/dm355.c
@@ -19,7 +19,6 @@
19#include <asm/mach/map.h> 19#include <asm/mach/map.h>
20 20
21#include <mach/cputype.h> 21#include <mach/cputype.h>
22#include <mach/edma.h>
23#include <mach/psc.h> 22#include <mach/psc.h>
24#include <mach/mux.h> 23#include <mach/mux.h>
25#include <mach/irqs.h> 24#include <mach/irqs.h>
@@ -28,6 +27,7 @@
28#include <mach/common.h> 27#include <mach/common.h>
29#include <linux/platform_data/spi-davinci.h> 28#include <linux/platform_data/spi-davinci.h>
30#include <mach/gpio-davinci.h> 29#include <mach/gpio-davinci.h>
30#include <linux/platform_data/edma.h>
31 31
32#include "davinci.h" 32#include "davinci.h"
33#include "clock.h" 33#include "clock.h"
@@ -569,7 +569,7 @@ static u8 dm355_default_priorities[DAVINCI_N_AINTC_IRQ] = {
569 569
570/*----------------------------------------------------------------------*/ 570/*----------------------------------------------------------------------*/
571 571
572static const s8 572static s8
573queue_tc_mapping[][2] = { 573queue_tc_mapping[][2] = {
574 /* {event queue no, TC no} */ 574 /* {event queue no, TC no} */
575 {0, 0}, 575 {0, 0},
@@ -577,7 +577,7 @@ queue_tc_mapping[][2] = {
577 {-1, -1}, 577 {-1, -1},
578}; 578};
579 579
580static const s8 580static s8
581queue_priority_mapping[][2] = { 581queue_priority_mapping[][2] = {
582 /* {event queue no, Priority} */ 582 /* {event queue no, Priority} */
583 {0, 3}, 583 {0, 3},
@@ -860,7 +860,7 @@ static struct platform_device dm355_vpbe_display = {
860 }, 860 },
861}; 861};
862 862
863struct venc_platform_data dm355_venc_pdata = { 863static struct venc_platform_data dm355_venc_pdata = {
864 .setup_pinmux = dm355_vpbe_setup_pinmux, 864 .setup_pinmux = dm355_vpbe_setup_pinmux,
865 .setup_clock = dm355_venc_setup_clock, 865 .setup_clock = dm355_venc_setup_clock,
866}; 866};
diff --git a/arch/arm/mach-davinci/dm365.c b/arch/arm/mach-davinci/dm365.c
index 40fa4fee9331..dad28029ba9b 100644
--- a/arch/arm/mach-davinci/dm365.c
+++ b/arch/arm/mach-davinci/dm365.c
@@ -18,11 +18,11 @@
18#include <linux/platform_device.h> 18#include <linux/platform_device.h>
19#include <linux/dma-mapping.h> 19#include <linux/dma-mapping.h>
20#include <linux/spi/spi.h> 20#include <linux/spi/spi.h>
21#include <linux/platform_data/edma.h>
21 22
22#include <asm/mach/map.h> 23#include <asm/mach/map.h>
23 24
24#include <mach/cputype.h> 25#include <mach/cputype.h>
25#include <mach/edma.h>
26#include <mach/psc.h> 26#include <mach/psc.h>
27#include <mach/mux.h> 27#include <mach/mux.h>
28#include <mach/irqs.h> 28#include <mach/irqs.h>
@@ -826,7 +826,7 @@ static u8 dm365_default_priorities[DAVINCI_N_AINTC_IRQ] = {
826}; 826};
827 827
828/* Four Transfer Controllers on DM365 */ 828/* Four Transfer Controllers on DM365 */
829static const s8 829static s8
830dm365_queue_tc_mapping[][2] = { 830dm365_queue_tc_mapping[][2] = {
831 /* {event queue no, TC no} */ 831 /* {event queue no, TC no} */
832 {0, 0}, 832 {0, 0},
@@ -836,7 +836,7 @@ dm365_queue_tc_mapping[][2] = {
836 {-1, -1}, 836 {-1, -1},
837}; 837};
838 838
839static const s8 839static s8
840dm365_queue_priority_mapping[][2] = { 840dm365_queue_priority_mapping[][2] = {
841 /* {event queue no, Priority} */ 841 /* {event queue no, Priority} */
842 {0, 7}, 842 {0, 7},
@@ -1349,7 +1349,7 @@ static struct platform_device dm365_vpbe_display = {
1349 }, 1349 },
1350}; 1350};
1351 1351
1352struct venc_platform_data dm365_venc_pdata = { 1352static struct venc_platform_data dm365_venc_pdata = {
1353 .setup_pinmux = dm365_vpbe_setup_pinmux, 1353 .setup_pinmux = dm365_vpbe_setup_pinmux,
1354 .setup_clock = dm365_venc_setup_clock, 1354 .setup_clock = dm365_venc_setup_clock,
1355}; 1355};
diff --git a/arch/arm/mach-davinci/dm644x.c b/arch/arm/mach-davinci/dm644x.c
index 4d37d3e2a193..a49d18246fe9 100644
--- a/arch/arm/mach-davinci/dm644x.c
+++ b/arch/arm/mach-davinci/dm644x.c
@@ -12,11 +12,11 @@
12#include <linux/clk.h> 12#include <linux/clk.h>
13#include <linux/serial_8250.h> 13#include <linux/serial_8250.h>
14#include <linux/platform_device.h> 14#include <linux/platform_device.h>
15#include <linux/platform_data/edma.h>
15 16
16#include <asm/mach/map.h> 17#include <asm/mach/map.h>
17 18
18#include <mach/cputype.h> 19#include <mach/cputype.h>
19#include <mach/edma.h>
20#include <mach/irqs.h> 20#include <mach/irqs.h>
21#include <mach/psc.h> 21#include <mach/psc.h>
22#include <mach/mux.h> 22#include <mach/mux.h>
@@ -497,7 +497,7 @@ static u8 dm644x_default_priorities[DAVINCI_N_AINTC_IRQ] = {
497 497
498/*----------------------------------------------------------------------*/ 498/*----------------------------------------------------------------------*/
499 499
500static const s8 500static s8
501queue_tc_mapping[][2] = { 501queue_tc_mapping[][2] = {
502 /* {event queue no, TC no} */ 502 /* {event queue no, TC no} */
503 {0, 0}, 503 {0, 0},
@@ -505,7 +505,7 @@ queue_tc_mapping[][2] = {
505 {-1, -1}, 505 {-1, -1},
506}; 506};
507 507
508static const s8 508static s8
509queue_priority_mapping[][2] = { 509queue_priority_mapping[][2] = {
510 /* {event queue no, Priority} */ 510 /* {event queue no, Priority} */
511 {0, 3}, 511 {0, 3},
diff --git a/arch/arm/mach-davinci/dm646x.c b/arch/arm/mach-davinci/dm646x.c
index ac7b431c4c8e..d1259e80141b 100644
--- a/arch/arm/mach-davinci/dm646x.c
+++ b/arch/arm/mach-davinci/dm646x.c
@@ -13,11 +13,11 @@
13#include <linux/clk.h> 13#include <linux/clk.h>
14#include <linux/serial_8250.h> 14#include <linux/serial_8250.h>
15#include <linux/platform_device.h> 15#include <linux/platform_device.h>
16#include <linux/platform_data/edma.h>
16 17
17#include <asm/mach/map.h> 18#include <asm/mach/map.h>
18 19
19#include <mach/cputype.h> 20#include <mach/cputype.h>
20#include <mach/edma.h>
21#include <mach/irqs.h> 21#include <mach/irqs.h>
22#include <mach/psc.h> 22#include <mach/psc.h>
23#include <mach/mux.h> 23#include <mach/mux.h>
@@ -531,7 +531,7 @@ static u8 dm646x_default_priorities[DAVINCI_N_AINTC_IRQ] = {
531/*----------------------------------------------------------------------*/ 531/*----------------------------------------------------------------------*/
532 532
533/* Four Transfer Controllers on DM646x */ 533/* Four Transfer Controllers on DM646x */
534static const s8 534static s8
535dm646x_queue_tc_mapping[][2] = { 535dm646x_queue_tc_mapping[][2] = {
536 /* {event queue no, TC no} */ 536 /* {event queue no, TC no} */
537 {0, 0}, 537 {0, 0},
@@ -541,7 +541,7 @@ dm646x_queue_tc_mapping[][2] = {
541 {-1, -1}, 541 {-1, -1},
542}; 542};
543 543
544static const s8 544static s8
545dm646x_queue_priority_mapping[][2] = { 545dm646x_queue_priority_mapping[][2] = {
546 /* {event queue no, Priority} */ 546 /* {event queue no, Priority} */
547 {0, 4}, 547 {0, 4},
diff --git a/arch/arm/mach-davinci/include/mach/common.h b/arch/arm/mach-davinci/include/mach/common.h
index b124b77c90c5..cce316b92c06 100644
--- a/arch/arm/mach-davinci/include/mach/common.h
+++ b/arch/arm/mach-davinci/include/mach/common.h
@@ -14,6 +14,7 @@
14 14
15#include <linux/compiler.h> 15#include <linux/compiler.h>
16#include <linux/types.h> 16#include <linux/types.h>
17#include <linux/reboot.h>
17 18
18extern void davinci_timer_init(void); 19extern void davinci_timer_init(void);
19 20
@@ -81,7 +82,7 @@ extern struct davinci_soc_info davinci_soc_info;
81 82
82extern void davinci_common_init(struct davinci_soc_info *soc_info); 83extern void davinci_common_init(struct davinci_soc_info *soc_info);
83extern void davinci_init_ide(void); 84extern void davinci_init_ide(void);
84void davinci_restart(char mode, const char *cmd); 85void davinci_restart(enum reboot_mode mode, const char *cmd);
85void davinci_init_late(void); 86void davinci_init_late(void);
86 87
87#ifdef CONFIG_DAVINCI_RESET_CLOCKS 88#ifdef CONFIG_DAVINCI_RESET_CLOCKS
diff --git a/arch/arm/mach-davinci/include/mach/cp_intc.h b/arch/arm/mach-davinci/include/mach/cp_intc.h
index d13d8dfa2b0d..827bbe9baed4 100644
--- a/arch/arm/mach-davinci/include/mach/cp_intc.h
+++ b/arch/arm/mach-davinci/include/mach/cp_intc.h
@@ -51,7 +51,7 @@
51#define CP_INTC_HOST_PRIO_VECTOR(n) (0x1600 + (n << 2)) 51#define CP_INTC_HOST_PRIO_VECTOR(n) (0x1600 + (n << 2))
52#define CP_INTC_VECTOR_ADDR(n) (0x2000 + (n << 2)) 52#define CP_INTC_VECTOR_ADDR(n) (0x2000 + (n << 2))
53 53
54void __init cp_intc_init(void); 54void cp_intc_init(void);
55int __init cp_intc_of_init(struct device_node *, struct device_node *); 55int cp_intc_of_init(struct device_node *, struct device_node *);
56 56
57#endif /* __ASM_HARDWARE_CP_INTC_H */ 57#endif /* __ASM_HARDWARE_CP_INTC_H */
diff --git a/arch/arm/mach-davinci/include/mach/da8xx.h b/arch/arm/mach-davinci/include/mach/da8xx.h
index 2e1c9eae0a58..7b41a5e9bc31 100644
--- a/arch/arm/mach-davinci/include/mach/da8xx.h
+++ b/arch/arm/mach-davinci/include/mach/da8xx.h
@@ -17,11 +17,12 @@
17#include <linux/davinci_emac.h> 17#include <linux/davinci_emac.h>
18#include <linux/spi/spi.h> 18#include <linux/spi/spi.h>
19#include <linux/platform_data/davinci_asp.h> 19#include <linux/platform_data/davinci_asp.h>
20#include <linux/reboot.h>
20#include <linux/videodev2.h> 21#include <linux/videodev2.h>
21 22
22#include <mach/serial.h> 23#include <mach/serial.h>
23#include <mach/edma.h>
24#include <mach/pm.h> 24#include <mach/pm.h>
25#include <linux/platform_data/edma.h>
25#include <linux/platform_data/i2c-davinci.h> 26#include <linux/platform_data/i2c-davinci.h>
26#include <linux/platform_data/mmc-davinci.h> 27#include <linux/platform_data/mmc-davinci.h>
27#include <linux/platform_data/usb-davinci.h> 28#include <linux/platform_data/usb-davinci.h>
@@ -79,8 +80,8 @@ extern unsigned int da850_max_speed;
79#define DA8XX_SHARED_RAM_BASE 0x80000000 80#define DA8XX_SHARED_RAM_BASE 0x80000000
80#define DA8XX_ARM_RAM_BASE 0xffff0000 81#define DA8XX_ARM_RAM_BASE 0xffff0000
81 82
82void __init da830_init(void); 83void da830_init(void);
83void __init da850_init(void); 84void da850_init(void);
84 85
85int da830_register_edma(struct edma_rsv_info *rsv); 86int da830_register_edma(struct edma_rsv_info *rsv);
86int da850_register_edma(struct edma_rsv_info *rsv[2]); 87int da850_register_edma(struct edma_rsv_info *rsv[2]);
@@ -94,19 +95,19 @@ int da8xx_register_uio_pruss(void);
94int da8xx_register_lcdc(struct da8xx_lcdc_platform_data *pdata); 95int da8xx_register_lcdc(struct da8xx_lcdc_platform_data *pdata);
95int da8xx_register_mmcsd0(struct davinci_mmc_config *config); 96int da8xx_register_mmcsd0(struct davinci_mmc_config *config);
96int da850_register_mmcsd1(struct davinci_mmc_config *config); 97int da850_register_mmcsd1(struct davinci_mmc_config *config);
97void __init da8xx_register_mcasp(int id, struct snd_platform_data *pdata); 98void da8xx_register_mcasp(int id, struct snd_platform_data *pdata);
98int da8xx_register_rtc(void); 99int da8xx_register_rtc(void);
99int da850_register_cpufreq(char *async_clk); 100int da850_register_cpufreq(char *async_clk);
100int da8xx_register_cpuidle(void); 101int da8xx_register_cpuidle(void);
101void __iomem * __init da8xx_get_mem_ctlr(void); 102void __iomem *da8xx_get_mem_ctlr(void);
102int da850_register_pm(struct platform_device *pdev); 103int da850_register_pm(struct platform_device *pdev);
103int __init da850_register_sata(unsigned long refclkpn); 104int da850_register_sata(unsigned long refclkpn);
104int __init da850_register_vpif(void); 105int da850_register_vpif(void);
105int __init da850_register_vpif_display 106int da850_register_vpif_display
106 (struct vpif_display_config *display_config); 107 (struct vpif_display_config *display_config);
107int __init da850_register_vpif_capture 108int da850_register_vpif_capture
108 (struct vpif_capture_config *capture_config); 109 (struct vpif_capture_config *capture_config);
109void da8xx_restart(char mode, const char *cmd); 110void da8xx_restart(enum reboot_mode mode, const char *cmd);
110void da8xx_rproc_reserve_cma(void); 111void da8xx_rproc_reserve_cma(void);
111int da8xx_register_rproc(void); 112int da8xx_register_rproc(void);
112 113
diff --git a/arch/arm/mach-davinci/include/mach/edma.h b/arch/arm/mach-davinci/include/mach/edma.h
deleted file mode 100644
index 7e84c906ceff..000000000000
--- a/arch/arm/mach-davinci/include/mach/edma.h
+++ /dev/null
@@ -1,267 +0,0 @@
1/*
2 * TI DAVINCI dma definitions
3 *
4 * Copyright (C) 2006-2009 Texas Instruments.
5 *
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License as published by the
8 * Free Software Foundation; either version 2 of the License, or (at your
9 * option) any later version.
10 *
11 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
12 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
13 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
14 * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
15 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
16 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
17 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
18 * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
19 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
20 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
21 *
22 * You should have received a copy of the GNU General Public License along
23 * with this program; if not, write to the Free Software Foundation, Inc.,
24 * 675 Mass Ave, Cambridge, MA 02139, USA.
25 *
26 */
27
28/*
29 * This EDMA3 programming framework exposes two basic kinds of resource:
30 *
31 * Channel Triggers transfers, usually from a hardware event but
32 * also manually or by "chaining" from DMA completions.
33 * Each channel is coupled to a Parameter RAM (PaRAM) slot.
34 *
35 * Slot Each PaRAM slot holds a DMA transfer descriptor (PaRAM
36 * "set"), source and destination addresses, a link to a
37 * next PaRAM slot (if any), options for the transfer, and
38 * instructions for updating those addresses. There are
39 * more than twice as many slots as event channels.
40 *
41 * Each PaRAM set describes a sequence of transfers, either for one large
42 * buffer or for several discontiguous smaller buffers. An EDMA transfer
43 * is driven only from a channel, which performs the transfers specified
44 * in its PaRAM slot until there are no more transfers. When that last
45 * transfer completes, the "link" field may be used to reload the channel's
46 * PaRAM slot with a new transfer descriptor.
47 *
48 * The EDMA Channel Controller (CC) maps requests from channels into physical
49 * Transfer Controller (TC) requests when the channel triggers (by hardware
50 * or software events, or by chaining). The two physical DMA channels provided
51 * by the TCs are thus shared by many logical channels.
52 *
53 * DaVinci hardware also has a "QDMA" mechanism which is not currently
54 * supported through this interface. (DSP firmware uses it though.)
55 */
56
57#ifndef EDMA_H_
58#define EDMA_H_
59
60/* PaRAM slots are laid out like this */
61struct edmacc_param {
62 unsigned int opt;
63 unsigned int src;
64 unsigned int a_b_cnt;
65 unsigned int dst;
66 unsigned int src_dst_bidx;
67 unsigned int link_bcntrld;
68 unsigned int src_dst_cidx;
69 unsigned int ccnt;
70};
71
72#define CCINT0_INTERRUPT 16
73#define CCERRINT_INTERRUPT 17
74#define TCERRINT0_INTERRUPT 18
75#define TCERRINT1_INTERRUPT 19
76
77/* fields in edmacc_param.opt */
78#define SAM BIT(0)
79#define DAM BIT(1)
80#define SYNCDIM BIT(2)
81#define STATIC BIT(3)
82#define EDMA_FWID (0x07 << 8)
83#define TCCMODE BIT(11)
84#define EDMA_TCC(t) ((t) << 12)
85#define TCINTEN BIT(20)
86#define ITCINTEN BIT(21)
87#define TCCHEN BIT(22)
88#define ITCCHEN BIT(23)
89
90#define TRWORD (0x7<<2)
91#define PAENTRY (0x1ff<<5)
92
93/* Drivers should avoid using these symbolic names for dm644x
94 * channels, and use platform_device IORESOURCE_DMA resources
95 * instead. (Other DaVinci chips have different peripherals
96 * and thus have different DMA channel mappings.)
97 */
98#define DAVINCI_DMA_MCBSP_TX 2
99#define DAVINCI_DMA_MCBSP_RX 3
100#define DAVINCI_DMA_VPSS_HIST 4
101#define DAVINCI_DMA_VPSS_H3A 5
102#define DAVINCI_DMA_VPSS_PRVU 6
103#define DAVINCI_DMA_VPSS_RSZ 7
104#define DAVINCI_DMA_IMCOP_IMXINT 8
105#define DAVINCI_DMA_IMCOP_VLCDINT 9
106#define DAVINCI_DMA_IMCO_PASQINT 10
107#define DAVINCI_DMA_IMCOP_DSQINT 11
108#define DAVINCI_DMA_SPI_SPIX 16
109#define DAVINCI_DMA_SPI_SPIR 17
110#define DAVINCI_DMA_UART0_URXEVT0 18
111#define DAVINCI_DMA_UART0_UTXEVT0 19
112#define DAVINCI_DMA_UART1_URXEVT1 20
113#define DAVINCI_DMA_UART1_UTXEVT1 21
114#define DAVINCI_DMA_UART2_URXEVT2 22
115#define DAVINCI_DMA_UART2_UTXEVT2 23
116#define DAVINCI_DMA_MEMSTK_MSEVT 24
117#define DAVINCI_DMA_MMCRXEVT 26
118#define DAVINCI_DMA_MMCTXEVT 27
119#define DAVINCI_DMA_I2C_ICREVT 28
120#define DAVINCI_DMA_I2C_ICXEVT 29
121#define DAVINCI_DMA_GPIO_GPINT0 32
122#define DAVINCI_DMA_GPIO_GPINT1 33
123#define DAVINCI_DMA_GPIO_GPINT2 34
124#define DAVINCI_DMA_GPIO_GPINT3 35
125#define DAVINCI_DMA_GPIO_GPINT4 36
126#define DAVINCI_DMA_GPIO_GPINT5 37
127#define DAVINCI_DMA_GPIO_GPINT6 38
128#define DAVINCI_DMA_GPIO_GPINT7 39
129#define DAVINCI_DMA_GPIO_GPBNKINT0 40
130#define DAVINCI_DMA_GPIO_GPBNKINT1 41
131#define DAVINCI_DMA_GPIO_GPBNKINT2 42
132#define DAVINCI_DMA_GPIO_GPBNKINT3 43
133#define DAVINCI_DMA_GPIO_GPBNKINT4 44
134#define DAVINCI_DMA_TIMER0_TINT0 48
135#define DAVINCI_DMA_TIMER1_TINT1 49
136#define DAVINCI_DMA_TIMER2_TINT2 50
137#define DAVINCI_DMA_TIMER3_TINT3 51
138#define DAVINCI_DMA_PWM0 52
139#define DAVINCI_DMA_PWM1 53
140#define DAVINCI_DMA_PWM2 54
141
142/* DA830 specific EDMA3 information */
143#define EDMA_DA830_NUM_DMACH 32
144#define EDMA_DA830_NUM_TCC 32
145#define EDMA_DA830_NUM_PARAMENTRY 128
146#define EDMA_DA830_NUM_EVQUE 2
147#define EDMA_DA830_NUM_TC 2
148#define EDMA_DA830_CHMAP_EXIST 0
149#define EDMA_DA830_NUM_REGIONS 4
150#define DA830_DMACH2EVENT_MAP0 0x000FC03Fu
151#define DA830_DMACH2EVENT_MAP1 0x00000000u
152#define DA830_EDMA_ARM_OWN 0x30FFCCFFu
153
154/*ch_status paramater of callback function possible values*/
155#define DMA_COMPLETE 1
156#define DMA_CC_ERROR 2
157#define DMA_TC1_ERROR 3
158#define DMA_TC2_ERROR 4
159
160enum address_mode {
161 INCR = 0,
162 FIFO = 1
163};
164
165enum fifo_width {
166 W8BIT = 0,
167 W16BIT = 1,
168 W32BIT = 2,
169 W64BIT = 3,
170 W128BIT = 4,
171 W256BIT = 5
172};
173
174enum dma_event_q {
175 EVENTQ_0 = 0,
176 EVENTQ_1 = 1,
177 EVENTQ_2 = 2,
178 EVENTQ_3 = 3,
179 EVENTQ_DEFAULT = -1
180};
181
182enum sync_dimension {
183 ASYNC = 0,
184 ABSYNC = 1
185};
186
187#define EDMA_CTLR_CHAN(ctlr, chan) (((ctlr) << 16) | (chan))
188#define EDMA_CTLR(i) ((i) >> 16)
189#define EDMA_CHAN_SLOT(i) ((i) & 0xffff)
190
191#define EDMA_CHANNEL_ANY -1 /* for edma_alloc_channel() */
192#define EDMA_SLOT_ANY -1 /* for edma_alloc_slot() */
193#define EDMA_CONT_PARAMS_ANY 1001
194#define EDMA_CONT_PARAMS_FIXED_EXACT 1002
195#define EDMA_CONT_PARAMS_FIXED_NOT_EXACT 1003
196
197#define EDMA_MAX_CC 2
198
199/* alloc/free DMA channels and their dedicated parameter RAM slots */
200int edma_alloc_channel(int channel,
201 void (*callback)(unsigned channel, u16 ch_status, void *data),
202 void *data, enum dma_event_q);
203void edma_free_channel(unsigned channel);
204
205/* alloc/free parameter RAM slots */
206int edma_alloc_slot(unsigned ctlr, int slot);
207void edma_free_slot(unsigned slot);
208
209/* alloc/free a set of contiguous parameter RAM slots */
210int edma_alloc_cont_slots(unsigned ctlr, unsigned int id, int slot, int count);
211int edma_free_cont_slots(unsigned slot, int count);
212
213/* calls that operate on part of a parameter RAM slot */
214void edma_set_src(unsigned slot, dma_addr_t src_port,
215 enum address_mode mode, enum fifo_width);
216void edma_set_dest(unsigned slot, dma_addr_t dest_port,
217 enum address_mode mode, enum fifo_width);
218void edma_get_position(unsigned slot, dma_addr_t *src, dma_addr_t *dst);
219void edma_set_src_index(unsigned slot, s16 src_bidx, s16 src_cidx);
220void edma_set_dest_index(unsigned slot, s16 dest_bidx, s16 dest_cidx);
221void edma_set_transfer_params(unsigned slot, u16 acnt, u16 bcnt, u16 ccnt,
222 u16 bcnt_rld, enum sync_dimension sync_mode);
223void edma_link(unsigned from, unsigned to);
224void edma_unlink(unsigned from);
225
226/* calls that operate on an entire parameter RAM slot */
227void edma_write_slot(unsigned slot, const struct edmacc_param *params);
228void edma_read_slot(unsigned slot, struct edmacc_param *params);
229
230/* channel control operations */
231int edma_start(unsigned channel);
232void edma_stop(unsigned channel);
233void edma_clean_channel(unsigned channel);
234void edma_clear_event(unsigned channel);
235void edma_pause(unsigned channel);
236void edma_resume(unsigned channel);
237
238struct edma_rsv_info {
239
240 const s16 (*rsv_chans)[2];
241 const s16 (*rsv_slots)[2];
242};
243
244/* platform_data for EDMA driver */
245struct edma_soc_info {
246
247 /* how many dma resources of each type */
248 unsigned n_channel;
249 unsigned n_region;
250 unsigned n_slot;
251 unsigned n_tc;
252 unsigned n_cc;
253 /*
254 * Default queue is expected to be a low-priority queue.
255 * This way, long transfers on the default queue started
256 * by the codec engine will not cause audio defects.
257 */
258 enum dma_event_q default_queue;
259
260 /* Resource reservation for other cores */
261 struct edma_rsv_info *rsv;
262
263 const s8 (*queue_tc_mapping)[2];
264 const s8 (*queue_priority_mapping)[2];
265};
266
267#endif
diff --git a/arch/arm/mach-davinci/include/mach/tnetv107x.h b/arch/arm/mach-davinci/include/mach/tnetv107x.h
index 1656a02e3eda..16314c64f755 100644
--- a/arch/arm/mach-davinci/include/mach/tnetv107x.h
+++ b/arch/arm/mach-davinci/include/mach/tnetv107x.h
@@ -35,6 +35,7 @@
35#include <linux/serial_8250.h> 35#include <linux/serial_8250.h>
36#include <linux/input/matrix_keypad.h> 36#include <linux/input/matrix_keypad.h>
37#include <linux/mfd/ti_ssp.h> 37#include <linux/mfd/ti_ssp.h>
38#include <linux/reboot.h>
38 39
39#include <linux/platform_data/mmc-davinci.h> 40#include <linux/platform_data/mmc-davinci.h>
40#include <linux/platform_data/mtd-davinci.h> 41#include <linux/platform_data/mtd-davinci.h>
@@ -51,10 +52,10 @@ struct tnetv107x_device_info {
51extern struct platform_device tnetv107x_wdt_device; 52extern struct platform_device tnetv107x_wdt_device;
52extern struct platform_device tnetv107x_serial_device; 53extern struct platform_device tnetv107x_serial_device;
53 54
54extern void __init tnetv107x_init(void); 55extern void tnetv107x_init(void);
55extern void __init tnetv107x_devices_init(struct tnetv107x_device_info *); 56extern void tnetv107x_devices_init(struct tnetv107x_device_info *);
56extern void __init tnetv107x_irq_init(void); 57extern void tnetv107x_irq_init(void);
57void tnetv107x_restart(char mode, const char *cmd); 58void tnetv107x_restart(enum reboot_mode mode, const char *cmd);
58 59
59#endif 60#endif
60 61
diff --git a/arch/arm/mach-davinci/time.c b/arch/arm/mach-davinci/time.c
index bad361ec1666..7a55b5c95971 100644
--- a/arch/arm/mach-davinci/time.c
+++ b/arch/arm/mach-davinci/time.c
@@ -18,8 +18,8 @@
18#include <linux/clk.h> 18#include <linux/clk.h>
19#include <linux/err.h> 19#include <linux/err.h>
20#include <linux/platform_device.h> 20#include <linux/platform_device.h>
21#include <linux/sched_clock.h>
21 22
22#include <asm/sched_clock.h>
23#include <asm/mach/irq.h> 23#include <asm/mach/irq.h>
24#include <asm/mach/time.h> 24#include <asm/mach/time.h>
25 25
diff --git a/arch/arm/mach-davinci/tnetv107x.c b/arch/arm/mach-davinci/tnetv107x.c
index 3b2a70d43efa..4545667ecd3c 100644
--- a/arch/arm/mach-davinci/tnetv107x.c
+++ b/arch/arm/mach-davinci/tnetv107x.c
@@ -19,6 +19,7 @@
19#include <linux/io.h> 19#include <linux/io.h>
20#include <linux/err.h> 20#include <linux/err.h>
21#include <linux/platform_device.h> 21#include <linux/platform_device.h>
22#include <linux/reboot.h>
22 23
23#include <asm/mach/map.h> 24#include <asm/mach/map.h>
24 25
@@ -730,7 +731,7 @@ static void tnetv107x_watchdog_reset(struct platform_device *pdev)
730 __raw_writel(1, &regs->kick); 731 __raw_writel(1, &regs->kick);
731} 732}
732 733
733void tnetv107x_restart(char mode, const char *cmd) 734void tnetv107x_restart(enum reboot_mode mode, const char *cmd)
734{ 735{
735 tnetv107x_watchdog_reset(&tnetv107x_wdt_device); 736 tnetv107x_watchdog_reset(&tnetv107x_wdt_device);
736} 737}
diff --git a/arch/arm/mach-dove/Kconfig b/arch/arm/mach-dove/Kconfig
index 36469d813951..dff7b2fd4e20 100644
--- a/arch/arm/mach-dove/Kconfig
+++ b/arch/arm/mach-dove/Kconfig
@@ -22,8 +22,7 @@ config MACH_CM_A510
22 22
23config MACH_DOVE_DT 23config MACH_DOVE_DT
24 bool "Marvell Dove Flattened Device Tree" 24 bool "Marvell Dove Flattened Device Tree"
25 select MVEBU_CLK_CORE 25 select DOVE_CLK
26 select MVEBU_CLK_GATING
27 select REGULATOR 26 select REGULATOR
28 select REGULATOR_FIXED_VOLTAGE 27 select REGULATOR_FIXED_VOLTAGE
29 select USE_OF 28 select USE_OF
diff --git a/arch/arm/mach-dove/board-dt.c b/arch/arm/mach-dove/board-dt.c
index 0b142803b2e1..f3755ac81148 100644
--- a/arch/arm/mach-dove/board-dt.c
+++ b/arch/arm/mach-dove/board-dt.c
@@ -10,7 +10,6 @@
10 10
11#include <linux/init.h> 11#include <linux/init.h>
12#include <linux/clk-provider.h> 12#include <linux/clk-provider.h>
13#include <linux/clk/mvebu.h>
14#include <linux/of.h> 13#include <linux/of.h>
15#include <linux/of_platform.h> 14#include <linux/of_platform.h>
16#include <linux/platform_data/usb-ehci-orion.h> 15#include <linux/platform_data/usb-ehci-orion.h>
@@ -49,7 +48,7 @@ static void __init dove_legacy_clk_init(void)
49 48
50static void __init dove_of_clk_init(void) 49static void __init dove_of_clk_init(void)
51{ 50{
52 mvebu_clocks_init(); 51 of_clk_init(NULL);
53 dove_legacy_clk_init(); 52 dove_legacy_clk_init();
54} 53}
55 54
diff --git a/arch/arm/mach-dove/common.c b/arch/arm/mach-dove/common.c
index e2b5da031f96..00247c771313 100644
--- a/arch/arm/mach-dove/common.c
+++ b/arch/arm/mach-dove/common.c
@@ -9,7 +9,6 @@
9 */ 9 */
10 10
11#include <linux/clk-provider.h> 11#include <linux/clk-provider.h>
12#include <linux/clk/mvebu.h>
13#include <linux/dma-mapping.h> 12#include <linux/dma-mapping.h>
14#include <linux/init.h> 13#include <linux/init.h>
15#include <linux/of.h> 14#include <linux/of.h>
@@ -382,7 +381,7 @@ void __init dove_init(void)
382 dove_xor1_init(); 381 dove_xor1_init();
383} 382}
384 383
385void dove_restart(char mode, const char *cmd) 384void dove_restart(enum reboot_mode mode, const char *cmd)
386{ 385{
387 /* 386 /*
388 * Enable soft reset to assert RSTOUTn. 387 * Enable soft reset to assert RSTOUTn.
diff --git a/arch/arm/mach-dove/common.h b/arch/arm/mach-dove/common.h
index e86347928b67..1d725224d146 100644
--- a/arch/arm/mach-dove/common.h
+++ b/arch/arm/mach-dove/common.h
@@ -11,6 +11,8 @@
11#ifndef __ARCH_DOVE_COMMON_H 11#ifndef __ARCH_DOVE_COMMON_H
12#define __ARCH_DOVE_COMMON_H 12#define __ARCH_DOVE_COMMON_H
13 13
14#include <linux/reboot.h>
15
14struct mv643xx_eth_platform_data; 16struct mv643xx_eth_platform_data;
15struct mv_sata_platform_data; 17struct mv_sata_platform_data;
16 18
@@ -42,6 +44,6 @@ void dove_spi1_init(void);
42void dove_i2c_init(void); 44void dove_i2c_init(void);
43void dove_sdio0_init(void); 45void dove_sdio0_init(void);
44void dove_sdio1_init(void); 46void dove_sdio1_init(void);
45void dove_restart(char, const char *); 47void dove_restart(enum reboot_mode, const char *);
46 48
47#endif 49#endif
diff --git a/arch/arm/mach-dove/include/mach/bridge-regs.h b/arch/arm/mach-dove/include/mach/bridge-regs.h
index 99f259e8cf33..5362df3df89f 100644
--- a/arch/arm/mach-dove/include/mach/bridge-regs.h
+++ b/arch/arm/mach-dove/include/mach/bridge-regs.h
@@ -26,6 +26,7 @@
26#define SYSTEM_SOFT_RESET (BRIDGE_VIRT_BASE + 0x010c) 26#define SYSTEM_SOFT_RESET (BRIDGE_VIRT_BASE + 0x010c)
27#define SOFT_RESET 0x00000001 27#define SOFT_RESET 0x00000001
28 28
29#define BRIDGE_CAUSE (BRIDGE_VIRT_BASE + 0x0110)
29#define BRIDGE_INT_TIMER1_CLR (~0x0004) 30#define BRIDGE_INT_TIMER1_CLR (~0x0004)
30 31
31#define IRQ_VIRT_BASE (BRIDGE_VIRT_BASE + 0x0200) 32#define IRQ_VIRT_BASE (BRIDGE_VIRT_BASE + 0x0200)
diff --git a/arch/arm/mach-ebsa110/core.c b/arch/arm/mach-ebsa110/core.c
index b13cc74114db..68ac934d4565 100644
--- a/arch/arm/mach-ebsa110/core.c
+++ b/arch/arm/mach-ebsa110/core.c
@@ -116,7 +116,7 @@ static void __init ebsa110_map_io(void)
116 iotable_init(ebsa110_io_desc, ARRAY_SIZE(ebsa110_io_desc)); 116 iotable_init(ebsa110_io_desc, ARRAY_SIZE(ebsa110_io_desc));
117} 117}
118 118
119static void __iomem *ebsa110_ioremap_caller(unsigned long cookie, size_t size, 119static void __iomem *ebsa110_ioremap_caller(phys_addr_t cookie, size_t size,
120 unsigned int flags, void *caller) 120 unsigned int flags, void *caller)
121{ 121{
122 return (void __iomem *)cookie; 122 return (void __iomem *)cookie;
@@ -311,7 +311,7 @@ static int __init ebsa110_init(void)
311 311
312arch_initcall(ebsa110_init); 312arch_initcall(ebsa110_init);
313 313
314static void ebsa110_restart(char mode, const char *cmd) 314static void ebsa110_restart(enum reboot_mode mode, const char *cmd)
315{ 315{
316 soft_restart(0x80000000); 316 soft_restart(0x80000000);
317} 317}
@@ -321,7 +321,6 @@ MACHINE_START(EBSA110, "EBSA110")
321 .atag_offset = 0x400, 321 .atag_offset = 0x400,
322 .reserve_lp0 = 1, 322 .reserve_lp0 = 1,
323 .reserve_lp2 = 1, 323 .reserve_lp2 = 1,
324 .restart_mode = 's',
325 .map_io = ebsa110_map_io, 324 .map_io = ebsa110_map_io,
326 .init_early = ebsa110_init_early, 325 .init_early = ebsa110_init_early,
327 .init_irq = ebsa110_init_irq, 326 .init_irq = ebsa110_init_irq,
diff --git a/arch/arm/mach-ep93xx/core.c b/arch/arm/mach-ep93xx/core.c
index c49ed3dc1aea..df8612fbbc9c 100644
--- a/arch/arm/mach-ep93xx/core.c
+++ b/arch/arm/mach-ep93xx/core.c
@@ -35,6 +35,7 @@
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#include <linux/irqchip/arm-vic.h>
38#include <linux/reboot.h>
38 39
39#include <mach/hardware.h> 40#include <mach/hardware.h>
40#include <linux/platform_data/video-ep93xx.h> 41#include <linux/platform_data/video-ep93xx.h>
@@ -921,7 +922,7 @@ void __init ep93xx_init_devices(void)
921 gpio_led_register_device(-1, &ep93xx_led_data); 922 gpio_led_register_device(-1, &ep93xx_led_data);
922} 923}
923 924
924void ep93xx_restart(char mode, const char *cmd) 925void ep93xx_restart(enum reboot_mode mode, const char *cmd)
925{ 926{
926 /* 927 /*
927 * Set then clear the SWRST bit to initiate a software reset 928 * Set then clear the SWRST bit to initiate a software reset
diff --git a/arch/arm/mach-ep93xx/include/mach/platform.h b/arch/arm/mach-ep93xx/include/mach/platform.h
index a14e1b37beff..e256e0baec2e 100644
--- a/arch/arm/mach-ep93xx/include/mach/platform.h
+++ b/arch/arm/mach-ep93xx/include/mach/platform.h
@@ -4,6 +4,8 @@
4 4
5#ifndef __ASSEMBLY__ 5#ifndef __ASSEMBLY__
6 6
7#include <linux/reboot.h>
8
7struct i2c_gpio_platform_data; 9struct i2c_gpio_platform_data;
8struct i2c_board_info; 10struct i2c_board_info;
9struct spi_board_info; 11struct spi_board_info;
@@ -55,7 +57,7 @@ void ep93xx_ide_release_gpio(struct platform_device *pdev);
55void ep93xx_init_devices(void); 57void ep93xx_init_devices(void);
56extern void ep93xx_timer_init(void); 58extern void ep93xx_timer_init(void);
57 59
58void ep93xx_restart(char, const char *); 60void ep93xx_restart(enum reboot_mode, const char *);
59void ep93xx_init_late(void); 61void ep93xx_init_late(void);
60 62
61#ifdef CONFIG_CRUNCH 63#ifdef CONFIG_CRUNCH
diff --git a/arch/arm/mach-exynos/Kconfig b/arch/arm/mach-exynos/Kconfig
index ff18fc2ea46f..5952e68c76c4 100644
--- a/arch/arm/mach-exynos/Kconfig
+++ b/arch/arm/mach-exynos/Kconfig
@@ -14,9 +14,11 @@ menu "SAMSUNG EXYNOS SoCs Support"
14config ARCH_EXYNOS4 14config ARCH_EXYNOS4
15 bool "SAMSUNG EXYNOS4" 15 bool "SAMSUNG EXYNOS4"
16 default y 16 default y
17 select GIC_NON_BANKED
17 select HAVE_ARM_SCU if SMP 18 select HAVE_ARM_SCU if SMP
18 select HAVE_SMP 19 select HAVE_SMP
19 select MIGHT_HAVE_CACHE_L2X0 20 select MIGHT_HAVE_CACHE_L2X0
21 select PINCTRL
20 help 22 help
21 Samsung EXYNOS4 SoCs based systems 23 Samsung EXYNOS4 SoCs based systems
22 24
@@ -24,6 +26,7 @@ config ARCH_EXYNOS5
24 bool "SAMSUNG EXYNOS5" 26 bool "SAMSUNG EXYNOS5"
25 select HAVE_ARM_SCU if SMP 27 select HAVE_ARM_SCU if SMP
26 select HAVE_SMP 28 select HAVE_SMP
29 select PINCTRL
27 help 30 help
28 Samsung EXYNOS5 (Cortex-A15) SoC based systems 31 Samsung EXYNOS5 (Cortex-A15) SoC based systems
29 32
@@ -34,7 +37,8 @@ config CPU_EXYNOS4210
34 default y 37 default y
35 depends on ARCH_EXYNOS4 38 depends on ARCH_EXYNOS4
36 select ARM_CPU_SUSPEND if PM 39 select ARM_CPU_SUSPEND if PM
37 select PM_GENERIC_DOMAINS 40 select PINCTRL_EXYNOS
41 select PM_GENERIC_DOMAINS if PM
38 select S5P_PM if PM 42 select S5P_PM if PM
39 select S5P_SLEEP if PM 43 select S5P_SLEEP if PM
40 select SAMSUNG_DMADEV 44 select SAMSUNG_DMADEV
@@ -45,6 +49,7 @@ config SOC_EXYNOS4212
45 bool "SAMSUNG EXYNOS4212" 49 bool "SAMSUNG EXYNOS4212"
46 default y 50 default y
47 depends on ARCH_EXYNOS4 51 depends on ARCH_EXYNOS4
52 select PINCTRL_EXYNOS
48 select S5P_PM if PM 53 select S5P_PM if PM
49 select S5P_SLEEP if PM 54 select S5P_SLEEP if PM
50 select SAMSUNG_DMADEV 55 select SAMSUNG_DMADEV
@@ -55,6 +60,7 @@ config SOC_EXYNOS4412
55 bool "SAMSUNG EXYNOS4412" 60 bool "SAMSUNG EXYNOS4412"
56 default y 61 default y
57 depends on ARCH_EXYNOS4 62 depends on ARCH_EXYNOS4
63 select PINCTRL_EXYNOS
58 select SAMSUNG_DMADEV 64 select SAMSUNG_DMADEV
59 help 65 help
60 Enable EXYNOS4412 SoC support 66 Enable EXYNOS4412 SoC support
@@ -63,6 +69,7 @@ config SOC_EXYNOS5250
63 bool "SAMSUNG EXYNOS5250" 69 bool "SAMSUNG EXYNOS5250"
64 default y 70 default y
65 depends on ARCH_EXYNOS5 71 depends on ARCH_EXYNOS5
72 select PINCTRL_EXYNOS
66 select PM_GENERIC_DOMAINS if PM 73 select PM_GENERIC_DOMAINS if PM
67 select S5P_PM if PM 74 select S5P_PM if PM
68 select S5P_SLEEP if PM 75 select S5P_SLEEP if PM
@@ -71,352 +78,43 @@ config SOC_EXYNOS5250
71 help 78 help
72 Enable EXYNOS5250 SoC support 79 Enable EXYNOS5250 SoC support
73 80
81config SOC_EXYNOS5420
82 bool "SAMSUNG EXYNOS5420"
83 default y
84 depends on ARCH_EXYNOS5
85 select PM_GENERIC_DOMAINS if PM
86 select S5P_PM if PM
87 select S5P_SLEEP if PM
88 help
89 Enable EXYNOS5420 SoC support
90
74config SOC_EXYNOS5440 91config SOC_EXYNOS5440
75 bool "SAMSUNG EXYNOS5440" 92 bool "SAMSUNG EXYNOS5440"
76 default y 93 default y
77 depends on ARCH_EXYNOS5 94 depends on ARCH_EXYNOS5
95 select ARCH_DMA_ADDR_T_64BIT if ARM_LPAE
78 select ARCH_HAS_OPP 96 select ARCH_HAS_OPP
79 select ARM_ARCH_TIMER 97 select HAVE_ARM_ARCH_TIMER
80 select AUTO_ZRELADDR 98 select AUTO_ZRELADDR
81 select PINCTRL 99 select MIGHT_HAVE_PCI
100 select PCI_DOMAINS if PCI
82 select PINCTRL_EXYNOS5440 101 select PINCTRL_EXYNOS5440
83 select PM_OPP 102 select PM_OPP
84 help 103 help
85 Enable EXYNOS5440 SoC support 104 Enable EXYNOS5440 SoC support
86 105
87config EXYNOS_ATAGS
88 bool "ATAGS based boot for EXYNOS (deprecated)"
89 depends on !ARCH_MULTIPLATFORM
90 depends on ATAGS
91 default y
92 help
93 The EXYNOS platform is moving towards being completely probed
94 through device tree. This enables support for board files using
95 the traditional ATAGS boot format.
96 Note that this option is not available for multiplatform builds.
97
98if EXYNOS_ATAGS
99
100config EXYNOS_DEV_DMA
101 bool
102 help
103 Compile in amba device definitions for DMA controller
104
105config EXYNOS4_DEV_AHCI
106 bool
107 help
108 Compile in platform device definitions for AHCI
109
110config EXYNOS4_SETUP_FIMD0
111 bool
112 help
113 Common setup code for FIMD0.
114
115config EXYNOS4_DEV_USB_OHCI
116 bool
117 help
118 Compile in platform device definition for USB OHCI
119
120config EXYNOS4_SETUP_I2C1
121 bool
122 help
123 Common setup code for i2c bus 1.
124
125config EXYNOS4_SETUP_I2C2
126 bool
127 help
128 Common setup code for i2c bus 2.
129
130config EXYNOS4_SETUP_I2C3
131 bool
132 help
133 Common setup code for i2c bus 3.
134
135config EXYNOS4_SETUP_I2C4
136 bool
137 help
138 Common setup code for i2c bus 4.
139
140config EXYNOS4_SETUP_I2C5
141 bool
142 help
143 Common setup code for i2c bus 5.
144
145config EXYNOS4_SETUP_I2C6
146 bool
147 help
148 Common setup code for i2c bus 6.
149
150config EXYNOS4_SETUP_I2C7
151 bool
152 help
153 Common setup code for i2c bus 7.
154
155config EXYNOS4_SETUP_KEYPAD
156 bool
157 help
158 Common setup code for keypad.
159
160config EXYNOS4_SETUP_SDHCI
161 bool
162 select EXYNOS4_SETUP_SDHCI_GPIO
163 help
164 Internal helper functions for EXYNOS4 based SDHCI systems.
165
166config EXYNOS4_SETUP_SDHCI_GPIO
167 bool
168 help
169 Common setup code for SDHCI gpio.
170
171config EXYNOS4_SETUP_FIMC
172 bool
173 help
174 Common setup code for the camera interfaces.
175
176config EXYNOS4_SETUP_USB_PHY
177 bool
178 help
179 Common setup code for USB PHY controller
180
181config EXYNOS_SETUP_SPI
182 bool
183 help
184 Common setup code for SPI GPIO configurations.
185
186# machine support
187
188if ARCH_EXYNOS4
189
190comment "EXYNOS4210 Boards"
191
192config MACH_SMDKC210
193 bool "SMDKC210"
194 select MACH_SMDKV310
195 help
196 Machine support for Samsung SMDKC210
197
198config MACH_SMDKV310
199 bool "SMDKV310"
200 select CPU_EXYNOS4210
201 select EXYNOS4_DEV_AHCI
202 select EXYNOS4_DEV_USB_OHCI
203 select EXYNOS4_SETUP_FIMD0
204 select EXYNOS4_SETUP_I2C1
205 select EXYNOS4_SETUP_KEYPAD
206 select EXYNOS4_SETUP_SDHCI
207 select EXYNOS4_SETUP_USB_PHY
208 select EXYNOS_DEV_DMA
209 select EXYNOS_DEV_SYSMMU
210 select S3C24XX_PWM
211 select S3C_DEV_HSMMC
212 select S3C_DEV_HSMMC1
213 select S3C_DEV_HSMMC2
214 select S3C_DEV_HSMMC3
215 select S3C_DEV_I2C1
216 select S3C_DEV_RTC
217 select S3C_DEV_USB_HSOTG
218 select S3C_DEV_WDT
219 select S5P_DEV_FIMC0
220 select S5P_DEV_FIMC1
221 select S5P_DEV_FIMC2
222 select S5P_DEV_FIMC3
223 select S5P_DEV_FIMD0
224 select S5P_DEV_G2D
225 select S5P_DEV_I2C_HDMIPHY
226 select S5P_DEV_JPEG
227 select S5P_DEV_MFC
228 select S5P_DEV_TV
229 select S5P_DEV_USB_EHCI
230 select SAMSUNG_DEV_BACKLIGHT
231 select SAMSUNG_DEV_KEYPAD
232 select SAMSUNG_DEV_PWM
233 help
234 Machine support for Samsung SMDKV310
235
236config MACH_ARMLEX4210
237 bool "ARMLEX4210"
238 select CPU_EXYNOS4210
239 select EXYNOS4_DEV_AHCI
240 select EXYNOS4_SETUP_SDHCI
241 select EXYNOS_DEV_DMA
242 select S3C_DEV_HSMMC
243 select S3C_DEV_HSMMC2
244 select S3C_DEV_HSMMC3
245 select S3C_DEV_RTC
246 select S3C_DEV_WDT
247 help
248 Machine support for Samsung ARMLEX4210 based on EXYNOS4210
249
250config MACH_UNIVERSAL_C210
251 bool "Mobile UNIVERSAL_C210 Board"
252 select CLKSRC_MMIO
253 select CLKSRC_SAMSUNG_PWM
254 select CPU_EXYNOS4210
255 select EXYNOS4_SETUP_FIMC
256 select EXYNOS4_SETUP_FIMD0
257 select EXYNOS4_SETUP_I2C1
258 select EXYNOS4_SETUP_I2C3
259 select EXYNOS4_SETUP_I2C5
260 select EXYNOS4_SETUP_SDHCI
261 select EXYNOS4_SETUP_USB_PHY
262 select EXYNOS_DEV_DMA
263 select EXYNOS_DEV_SYSMMU
264 select S3C_DEV_HSMMC
265 select S3C_DEV_HSMMC2
266 select S3C_DEV_HSMMC3
267 select S3C_DEV_I2C1
268 select S3C_DEV_I2C3
269 select S3C_DEV_I2C5
270 select S3C_DEV_USB_HSOTG
271 select S5P_DEV_CSIS0
272 select S5P_DEV_FIMC0
273 select S5P_DEV_FIMC1
274 select S5P_DEV_FIMC2
275 select S5P_DEV_FIMC3
276 select S5P_DEV_FIMD0
277 select S5P_DEV_G2D
278 select S5P_DEV_I2C_HDMIPHY
279 select S5P_DEV_JPEG
280 select S5P_DEV_MFC
281 select S5P_DEV_ONENAND
282 select S5P_DEV_TV
283 select S5P_GPIO_INT
284 select S5P_SETUP_MIPIPHY
285 help
286 Machine support for Samsung Mobile Universal S5PC210 Reference
287 Board.
288
289config MACH_NURI
290 bool "Mobile NURI Board"
291 select CPU_EXYNOS4210
292 select EXYNOS4_SETUP_FIMC
293 select EXYNOS4_SETUP_FIMD0
294 select EXYNOS4_SETUP_I2C1
295 select EXYNOS4_SETUP_I2C3
296 select EXYNOS4_SETUP_I2C5
297 select EXYNOS4_SETUP_I2C6
298 select EXYNOS4_SETUP_SDHCI
299 select EXYNOS4_SETUP_USB_PHY
300 select EXYNOS_DEV_DMA
301 select S3C_DEV_HSMMC
302 select S3C_DEV_HSMMC2
303 select S3C_DEV_HSMMC3
304 select S3C_DEV_I2C1
305 select S3C_DEV_I2C3
306 select S3C_DEV_I2C5
307 select S3C_DEV_I2C6
308 select S3C_DEV_RTC
309 select S3C_DEV_USB_HSOTG
310 select S3C_DEV_WDT
311 select S5P_DEV_CSIS0
312 select S5P_DEV_FIMC0
313 select S5P_DEV_FIMC1
314 select S5P_DEV_FIMC2
315 select S5P_DEV_FIMC3
316 select S5P_DEV_FIMD0
317 select S5P_DEV_G2D
318 select S5P_DEV_JPEG
319 select S5P_DEV_MFC
320 select S5P_DEV_USB_EHCI
321 select S5P_GPIO_INT
322 select S5P_SETUP_MIPIPHY
323 select SAMSUNG_DEV_ADC
324 select SAMSUNG_DEV_PWM
325 help
326 Machine support for Samsung Mobile NURI Board.
327
328config MACH_ORIGEN
329 bool "ORIGEN"
330 select CPU_EXYNOS4210
331 select EXYNOS4_DEV_USB_OHCI
332 select EXYNOS4_SETUP_FIMD0
333 select EXYNOS4_SETUP_SDHCI
334 select EXYNOS4_SETUP_USB_PHY
335 select EXYNOS_DEV_DMA
336 select EXYNOS_DEV_SYSMMU
337 select S3C24XX_PWM
338 select S3C_DEV_HSMMC
339 select S3C_DEV_HSMMC2
340 select S3C_DEV_RTC
341 select S3C_DEV_USB_HSOTG
342 select S3C_DEV_WDT
343 select S5P_DEV_FIMC0
344 select S5P_DEV_FIMC1
345 select S5P_DEV_FIMC2
346 select S5P_DEV_FIMC3
347 select S5P_DEV_FIMD0
348 select S5P_DEV_G2D
349 select S5P_DEV_I2C_HDMIPHY
350 select S5P_DEV_JPEG
351 select S5P_DEV_MFC
352 select S5P_DEV_TV
353 select S5P_DEV_USB_EHCI
354 select SAMSUNG_DEV_BACKLIGHT
355 select SAMSUNG_DEV_PWM
356 help
357 Machine support for ORIGEN based on Samsung EXYNOS4210
358
359comment "EXYNOS4212 Boards"
360
361config MACH_SMDK4212
362 bool "SMDK4212"
363 select EXYNOS4_SETUP_FIMD0
364 select EXYNOS4_SETUP_I2C1
365 select EXYNOS4_SETUP_I2C3
366 select EXYNOS4_SETUP_I2C7
367 select EXYNOS4_SETUP_KEYPAD
368 select EXYNOS4_SETUP_SDHCI
369 select EXYNOS4_SETUP_USB_PHY
370 select EXYNOS_DEV_DMA
371 select EXYNOS_DEV_SYSMMU
372 select S3C24XX_PWM
373 select S3C_DEV_HSMMC2
374 select S3C_DEV_HSMMC3
375 select S3C_DEV_I2C1
376 select S3C_DEV_I2C3
377 select S3C_DEV_I2C7
378 select S3C_DEV_RTC
379 select S3C_DEV_USB_HSOTG
380 select S3C_DEV_WDT
381 select S5P_DEV_FIMC0
382 select S5P_DEV_FIMC1
383 select S5P_DEV_FIMC2
384 select S5P_DEV_FIMC3
385 select S5P_DEV_FIMD0
386 select S5P_DEV_MFC
387 select SAMSUNG_DEV_BACKLIGHT
388 select SAMSUNG_DEV_KEYPAD
389 select SAMSUNG_DEV_PWM
390 select SOC_EXYNOS4212
391 help
392 Machine support for Samsung SMDK4212
393
394comment "EXYNOS4412 Boards"
395
396config MACH_SMDK4412
397 bool "SMDK4412"
398 select MACH_SMDK4212
399 select SOC_EXYNOS4412
400 help
401 Machine support for Samsung SMDK4412
402endif
403
404endif
405
406comment "Flattened Device Tree based board for EXYNOS SoCs" 106comment "Flattened Device Tree based board for EXYNOS SoCs"
407 107
408config MACH_EXYNOS4_DT 108config MACH_EXYNOS4_DT
409 bool "Samsung Exynos4 Machine using device tree" 109 bool "Samsung Exynos4 Machine using device tree"
110 default y
410 depends on ARCH_EXYNOS4 111 depends on ARCH_EXYNOS4
411 select ARM_AMBA 112 select ARM_AMBA
412 select CLKSRC_OF 113 select CLKSRC_OF
413 select CLKSRC_SAMSUNG_PWM if CPU_EXYNOS4210 114 select CLKSRC_SAMSUNG_PWM if CPU_EXYNOS4210
414 select CPU_EXYNOS4210 115 select CPU_EXYNOS4210
415 select KEYBOARD_SAMSUNG if INPUT_KEYBOARD 116 select KEYBOARD_SAMSUNG if INPUT_KEYBOARD
416 select PINCTRL
417 select PINCTRL_EXYNOS
418 select S5P_DEV_MFC 117 select S5P_DEV_MFC
419 select USE_OF
420 help 118 help
421 Machine support for Samsung Exynos4 machine with device tree enabled. 119 Machine support for Samsung Exynos4 machine with device tree enabled.
422 Select this if a fdt blob is available for the Exynos4 SoC based board. 120 Select this if a fdt blob is available for the Exynos4 SoC based board.
@@ -429,28 +127,11 @@ config MACH_EXYNOS5_DT
429 depends on ARCH_EXYNOS5 127 depends on ARCH_EXYNOS5
430 select ARM_AMBA 128 select ARM_AMBA
431 select CLKSRC_OF 129 select CLKSRC_OF
432 select USE_OF 130 select USB_ARCH_HAS_XHCI
433 help 131 help
434 Machine support for Samsung EXYNOS5 machine with device tree enabled. 132 Machine support for Samsung EXYNOS5 machine with device tree enabled.
435 Select this if a fdt blob is available for the EXYNOS5 SoC based board. 133 Select this if a fdt blob is available for the EXYNOS5 SoC based board.
436 134
437if ARCH_EXYNOS4
438
439comment "Configuration for HSMMC 8-bit bus width"
440
441config EXYNOS4_SDHCI_CH0_8BIT
442 bool "Channel 0 with 8-bit bus"
443 help
444 Support HSMMC Channel 0 8-bit bus.
445 If selected, Channel 1 is disabled.
446
447config EXYNOS4_SDHCI_CH2_8BIT
448 bool "Channel 2 with 8-bit bus"
449 help
450 Support HSMMC Channel 2 8-bit bus.
451 If selected, Channel 3 is disabled.
452endif
453
454endmenu 135endmenu
455 136
456endif 137endif
diff --git a/arch/arm/mach-exynos/Makefile b/arch/arm/mach-exynos/Makefile
index b09b027178f3..53696154aead 100644
--- a/arch/arm/mach-exynos/Makefile
+++ b/arch/arm/mach-exynos/Makefile
@@ -14,7 +14,7 @@ obj- :=
14 14
15obj-$(CONFIG_ARCH_EXYNOS) += common.o 15obj-$(CONFIG_ARCH_EXYNOS) += common.o
16 16
17obj-$(CONFIG_PM) += pm.o 17obj-$(CONFIG_S5P_PM) += pm.o
18obj-$(CONFIG_PM_GENERIC_DOMAINS) += pm_domains.o 18obj-$(CONFIG_PM_GENERIC_DOMAINS) += pm_domains.o
19obj-$(CONFIG_CPU_IDLE) += cpuidle.o 19obj-$(CONFIG_CPU_IDLE) += cpuidle.o
20 20
@@ -32,38 +32,5 @@ AFLAGS_exynos-smc.o :=-Wa,-march=armv7-a$(plus_sec)
32 32
33# machine support 33# machine support
34 34
35obj-$(CONFIG_MACH_SMDKC210) += mach-smdkv310.o
36obj-$(CONFIG_MACH_SMDKV310) += mach-smdkv310.o
37obj-$(CONFIG_MACH_ARMLEX4210) += mach-armlex4210.o
38obj-$(CONFIG_MACH_UNIVERSAL_C210) += mach-universal_c210.o
39obj-$(CONFIG_MACH_NURI) += mach-nuri.o
40obj-$(CONFIG_MACH_ORIGEN) += mach-origen.o
41
42obj-$(CONFIG_MACH_SMDK4212) += mach-smdk4x12.o
43obj-$(CONFIG_MACH_SMDK4412) += mach-smdk4x12.o
44
45obj-$(CONFIG_MACH_EXYNOS4_DT) += mach-exynos4-dt.o 35obj-$(CONFIG_MACH_EXYNOS4_DT) += mach-exynos4-dt.o
46obj-$(CONFIG_MACH_EXYNOS5_DT) += mach-exynos5-dt.o 36obj-$(CONFIG_MACH_EXYNOS5_DT) += mach-exynos5-dt.o
47
48# device support
49
50obj-y += dev-uart.o
51obj-$(CONFIG_ARCH_EXYNOS4) += dev-audio.o
52obj-$(CONFIG_EXYNOS4_DEV_AHCI) += dev-ahci.o
53obj-$(CONFIG_EXYNOS_DEV_DMA) += dma.o
54obj-$(CONFIG_EXYNOS4_DEV_USB_OHCI) += dev-ohci.o
55
56obj-$(CONFIG_ARCH_EXYNOS) += setup-i2c0.o
57obj-$(CONFIG_EXYNOS4_SETUP_FIMC) += setup-fimc.o
58obj-$(CONFIG_EXYNOS4_SETUP_FIMD0) += setup-fimd0.o
59obj-$(CONFIG_EXYNOS4_SETUP_I2C1) += setup-i2c1.o
60obj-$(CONFIG_EXYNOS4_SETUP_I2C2) += setup-i2c2.o
61obj-$(CONFIG_EXYNOS4_SETUP_I2C3) += setup-i2c3.o
62obj-$(CONFIG_EXYNOS4_SETUP_I2C4) += setup-i2c4.o
63obj-$(CONFIG_EXYNOS4_SETUP_I2C5) += setup-i2c5.o
64obj-$(CONFIG_EXYNOS4_SETUP_I2C6) += setup-i2c6.o
65obj-$(CONFIG_EXYNOS4_SETUP_I2C7) += setup-i2c7.o
66obj-$(CONFIG_EXYNOS4_SETUP_KEYPAD) += setup-keypad.o
67obj-$(CONFIG_EXYNOS4_SETUP_SDHCI_GPIO) += setup-sdhci-gpio.o
68obj-$(CONFIG_EXYNOS4_SETUP_USB_PHY) += setup-usb-phy.o
69obj-$(CONFIG_EXYNOS_SETUP_SPI) += setup-spi.o
diff --git a/arch/arm/mach-exynos/common.c b/arch/arm/mach-exynos/common.c
index f7e504b7874d..ba95e5db2501 100644
--- a/arch/arm/mach-exynos/common.c
+++ b/arch/arm/mach-exynos/common.c
@@ -40,20 +40,9 @@
40 40
41#include <mach/regs-irq.h> 41#include <mach/regs-irq.h>
42#include <mach/regs-pmu.h> 42#include <mach/regs-pmu.h>
43#include <mach/regs-gpio.h>
44#include <mach/irqs.h>
45 43
46#include <plat/cpu.h> 44#include <plat/cpu.h>
47#include <plat/devs.h>
48#include <plat/pm.h> 45#include <plat/pm.h>
49#include <plat/sdhci.h>
50#include <plat/gpio-cfg.h>
51#include <plat/adc-core.h>
52#include <plat/fb-core.h>
53#include <plat/fimc-core.h>
54#include <plat/iic-core.h>
55#include <plat/tv-core.h>
56#include <plat/spi-core.h>
57#include <plat/regs-serial.h> 46#include <plat/regs-serial.h>
58 47
59#include "common.h" 48#include "common.h"
@@ -64,36 +53,30 @@ static const char name_exynos4210[] = "EXYNOS4210";
64static const char name_exynos4212[] = "EXYNOS4212"; 53static const char name_exynos4212[] = "EXYNOS4212";
65static const char name_exynos4412[] = "EXYNOS4412"; 54static const char name_exynos4412[] = "EXYNOS4412";
66static const char name_exynos5250[] = "EXYNOS5250"; 55static const char name_exynos5250[] = "EXYNOS5250";
56static const char name_exynos5420[] = "EXYNOS5420";
67static const char name_exynos5440[] = "EXYNOS5440"; 57static const char name_exynos5440[] = "EXYNOS5440";
68 58
69static void exynos4_map_io(void); 59static void exynos4_map_io(void);
70static void exynos5_map_io(void); 60static void exynos5_map_io(void);
71static void exynos5440_map_io(void);
72static void exynos4_init_uarts(struct s3c2410_uartcfg *cfg, int no);
73static int exynos_init(void); 61static int exynos_init(void);
74 62
75unsigned long xxti_f = 0, xusbxti_f = 0;
76
77static struct cpu_table cpu_ids[] __initdata = { 63static struct cpu_table cpu_ids[] __initdata = {
78 { 64 {
79 .idcode = EXYNOS4210_CPU_ID, 65 .idcode = EXYNOS4210_CPU_ID,
80 .idmask = EXYNOS4_CPU_MASK, 66 .idmask = EXYNOS4_CPU_MASK,
81 .map_io = exynos4_map_io, 67 .map_io = exynos4_map_io,
82 .init_uarts = exynos4_init_uarts,
83 .init = exynos_init, 68 .init = exynos_init,
84 .name = name_exynos4210, 69 .name = name_exynos4210,
85 }, { 70 }, {
86 .idcode = EXYNOS4212_CPU_ID, 71 .idcode = EXYNOS4212_CPU_ID,
87 .idmask = EXYNOS4_CPU_MASK, 72 .idmask = EXYNOS4_CPU_MASK,
88 .map_io = exynos4_map_io, 73 .map_io = exynos4_map_io,
89 .init_uarts = exynos4_init_uarts,
90 .init = exynos_init, 74 .init = exynos_init,
91 .name = name_exynos4212, 75 .name = name_exynos4212,
92 }, { 76 }, {
93 .idcode = EXYNOS4412_CPU_ID, 77 .idcode = EXYNOS4412_CPU_ID,
94 .idmask = EXYNOS4_CPU_MASK, 78 .idmask = EXYNOS4_CPU_MASK,
95 .map_io = exynos4_map_io, 79 .map_io = exynos4_map_io,
96 .init_uarts = exynos4_init_uarts,
97 .init = exynos_init, 80 .init = exynos_init,
98 .name = name_exynos4412, 81 .name = name_exynos4412,
99 }, { 82 }, {
@@ -103,9 +86,14 @@ static struct cpu_table cpu_ids[] __initdata = {
103 .init = exynos_init, 86 .init = exynos_init,
104 .name = name_exynos5250, 87 .name = name_exynos5250,
105 }, { 88 }, {
89 .idcode = EXYNOS5420_SOC_ID,
90 .idmask = EXYNOS5_SOC_MASK,
91 .map_io = exynos5_map_io,
92 .init = exynos_init,
93 .name = name_exynos5420,
94 }, {
106 .idcode = EXYNOS5440_SOC_ID, 95 .idcode = EXYNOS5440_SOC_ID,
107 .idmask = EXYNOS5_SOC_MASK, 96 .idmask = EXYNOS5_SOC_MASK,
108 .map_io = exynos5440_map_io,
109 .init = exynos_init, 97 .init = exynos_init,
110 .name = name_exynos5440, 98 .name = name_exynos5440,
111 }, 99 },
@@ -113,15 +101,6 @@ static struct cpu_table cpu_ids[] __initdata = {
113 101
114/* Initial IO mappings */ 102/* Initial IO mappings */
115 103
116static struct map_desc exynos_iodesc[] __initdata = {
117 {
118 .virtual = (unsigned long)S5P_VA_CHIPID,
119 .pfn = __phys_to_pfn(EXYNOS_PA_CHIPID),
120 .length = SZ_4K,
121 .type = MT_DEVICE,
122 },
123};
124
125static struct map_desc exynos4_iodesc[] __initdata = { 104static struct map_desc exynos4_iodesc[] __initdata = {
126 { 105 {
127 .virtual = (unsigned long)S3C_VA_SYS, 106 .virtual = (unsigned long)S3C_VA_SYS,
@@ -169,11 +148,6 @@ static struct map_desc exynos4_iodesc[] __initdata = {
169 .length = SZ_64K, 148 .length = SZ_64K,
170 .type = MT_DEVICE, 149 .type = MT_DEVICE,
171 }, { 150 }, {
172 .virtual = (unsigned long)S3C_VA_UART,
173 .pfn = __phys_to_pfn(EXYNOS4_PA_UART),
174 .length = SZ_512K,
175 .type = MT_DEVICE,
176 }, {
177 .virtual = (unsigned long)S5P_VA_CMU, 151 .virtual = (unsigned long)S5P_VA_CMU,
178 .pfn = __phys_to_pfn(EXYNOS4_PA_CMU), 152 .pfn = __phys_to_pfn(EXYNOS4_PA_CMU),
179 .length = SZ_128K, 153 .length = SZ_128K,
@@ -287,45 +261,24 @@ static struct map_desc exynos5_iodesc[] __initdata = {
287 .pfn = __phys_to_pfn(EXYNOS5_PA_PMU), 261 .pfn = __phys_to_pfn(EXYNOS5_PA_PMU),
288 .length = SZ_64K, 262 .length = SZ_64K,
289 .type = MT_DEVICE, 263 .type = MT_DEVICE,
290 }, {
291 .virtual = (unsigned long)S3C_VA_UART,
292 .pfn = __phys_to_pfn(EXYNOS5_PA_UART),
293 .length = SZ_512K,
294 .type = MT_DEVICE,
295 },
296};
297
298static struct map_desc exynos5440_iodesc0[] __initdata = {
299 {
300 .virtual = (unsigned long)S3C_VA_UART,
301 .pfn = __phys_to_pfn(EXYNOS5440_PA_UART0),
302 .length = SZ_512K,
303 .type = MT_DEVICE,
304 }, 264 },
305}; 265};
306 266
307static struct samsung_pwm_variant exynos4_pwm_variant = { 267void exynos4_restart(enum reboot_mode mode, const char *cmd)
308 .bits = 32,
309 .div_base = 0,
310 .has_tint_cstat = true,
311 .tclk_mask = 0,
312};
313
314void exynos4_restart(char mode, const char *cmd)
315{ 268{
316 __raw_writel(0x1, S5P_SWRESET); 269 __raw_writel(0x1, S5P_SWRESET);
317} 270}
318 271
319void exynos5_restart(char mode, const char *cmd) 272void exynos5_restart(enum reboot_mode mode, const char *cmd)
320{ 273{
321 struct device_node *np; 274 struct device_node *np;
322 u32 val; 275 u32 val;
323 void __iomem *addr; 276 void __iomem *addr;
324 277
325 if (of_machine_is_compatible("samsung,exynos5250")) { 278 val = 0x1;
326 val = 0x1; 279 addr = EXYNOS_SWRESET;
327 addr = EXYNOS_SWRESET; 280
328 } else if (of_machine_is_compatible("samsung,exynos5440")) { 281 if (of_machine_is_compatible("samsung,exynos5440")) {
329 u32 status; 282 u32 status;
330 np = of_find_compatible_node(NULL, NULL, "samsung,exynos5440-clock"); 283 np = of_find_compatible_node(NULL, NULL, "samsung,exynos5440-clock");
331 284
@@ -336,9 +289,6 @@ void exynos5_restart(char mode, const char *cmd)
336 val = __raw_readl(addr); 289 val = __raw_readl(addr);
337 290
338 val = (val & 0xffff0000) | (status & 0xffff); 291 val = (val & 0xffff0000) | (status & 0xffff);
339 } else {
340 pr_err("%s: cannot support non-DT\n", __func__);
341 return;
342 } 292 }
343 293
344 __raw_writel(val, addr); 294 __raw_writel(val, addr);
@@ -353,8 +303,7 @@ void __init exynos_init_late(void)
353 exynos_pm_late_initcall(); 303 exynos_pm_late_initcall();
354} 304}
355 305
356#ifdef CONFIG_OF 306static int __init exynos_fdt_map_chipid(unsigned long node, const char *uname,
357int __init exynos_fdt_map_chipid(unsigned long node, const char *uname,
358 int depth, void *data) 307 int depth, void *data)
359{ 308{
360 struct map_desc iodesc; 309 struct map_desc iodesc;
@@ -376,7 +325,6 @@ int __init exynos_fdt_map_chipid(unsigned long node, const char *uname,
376 iotable_init(&iodesc, 1); 325 iotable_init(&iodesc, 1);
377 return 1; 326 return 1;
378} 327}
379#endif
380 328
381/* 329/*
382 * exynos_map_io 330 * exynos_map_io
@@ -384,19 +332,11 @@ int __init exynos_fdt_map_chipid(unsigned long node, const char *uname,
384 * register the standard cpu IO areas 332 * register the standard cpu IO areas
385 */ 333 */
386 334
387void __init exynos_init_io(struct map_desc *mach_desc, int size) 335void __init exynos_init_io(void)
388{ 336{
389 debug_ll_io_init(); 337 debug_ll_io_init();
390 338
391#ifdef CONFIG_OF 339 of_scan_flat_dt(exynos_fdt_map_chipid, NULL);
392 if (initial_boot_params)
393 of_scan_flat_dt(exynos_fdt_map_chipid, NULL);
394 else
395#endif
396 iotable_init(exynos_iodesc, ARRAY_SIZE(exynos_iodesc));
397
398 if (mach_desc)
399 iotable_init(mach_desc, size);
400 340
401 /* detect cpu id and rev. */ 341 /* detect cpu id and rev. */
402 s5p_init_cpu(S5P_VA_CHIPID); 342 s5p_init_cpu(S5P_VA_CHIPID);
@@ -417,34 +357,6 @@ static void __init exynos4_map_io(void)
417 iotable_init(exynos4210_iodesc, ARRAY_SIZE(exynos4210_iodesc)); 357 iotable_init(exynos4210_iodesc, ARRAY_SIZE(exynos4210_iodesc));
418 if (soc_is_exynos4212() || soc_is_exynos4412()) 358 if (soc_is_exynos4212() || soc_is_exynos4412())
419 iotable_init(exynos4x12_iodesc, ARRAY_SIZE(exynos4x12_iodesc)); 359 iotable_init(exynos4x12_iodesc, ARRAY_SIZE(exynos4x12_iodesc));
420
421 /* initialize device information early */
422 exynos4_default_sdhci0();
423 exynos4_default_sdhci1();
424 exynos4_default_sdhci2();
425 exynos4_default_sdhci3();
426
427 s3c_adc_setname("samsung-adc-v3");
428
429 s3c_fimc_setname(0, "exynos4-fimc");
430 s3c_fimc_setname(1, "exynos4-fimc");
431 s3c_fimc_setname(2, "exynos4-fimc");
432 s3c_fimc_setname(3, "exynos4-fimc");
433
434 s3c_sdhci_setname(0, "exynos4-sdhci");
435 s3c_sdhci_setname(1, "exynos4-sdhci");
436 s3c_sdhci_setname(2, "exynos4-sdhci");
437 s3c_sdhci_setname(3, "exynos4-sdhci");
438
439 /* The I2C bus controllers are directly compatible with s3c2440 */
440 s3c_i2c0_setname("s3c2440-i2c");
441 s3c_i2c1_setname("s3c2440-i2c");
442 s3c_i2c2_setname("s3c2440-i2c");
443
444 s5p_fb_setname(0, "exynos4-fb");
445 s5p_hdmi_setname("exynos4-hdmi");
446
447 s3c64xx_spi_setname("exynos4210-spi");
448} 360}
449 361
450static void __init exynos5_map_io(void) 362static void __init exynos5_map_io(void)
@@ -455,86 +367,10 @@ static void __init exynos5_map_io(void)
455 iotable_init(exynos5250_iodesc, ARRAY_SIZE(exynos5250_iodesc)); 367 iotable_init(exynos5250_iodesc, ARRAY_SIZE(exynos5250_iodesc));
456} 368}
457 369
458static void __init exynos5440_map_io(void)
459{
460 iotable_init(exynos5440_iodesc0, ARRAY_SIZE(exynos5440_iodesc0));
461}
462
463void __init exynos_set_timer_source(u8 channels)
464{
465 exynos4_pwm_variant.output_mask = BIT(SAMSUNG_PWM_NUM) - 1;
466 exynos4_pwm_variant.output_mask &= ~channels;
467}
468
469void __init exynos_init_time(void) 370void __init exynos_init_time(void)
470{ 371{
471 unsigned int timer_irqs[SAMSUNG_PWM_NUM] = { 372 of_clk_init(NULL);
472 EXYNOS4_IRQ_TIMER0_VIC, EXYNOS4_IRQ_TIMER1_VIC, 373 clocksource_of_init();
473 EXYNOS4_IRQ_TIMER2_VIC, EXYNOS4_IRQ_TIMER3_VIC,
474 EXYNOS4_IRQ_TIMER4_VIC,
475 };
476
477 if (of_have_populated_dt()) {
478#ifdef CONFIG_OF
479 of_clk_init(NULL);
480 clocksource_of_init();
481#endif
482 } else {
483 /* todo: remove after migrating legacy E4 platforms to dt */
484#ifdef CONFIG_ARCH_EXYNOS4
485 exynos4_clk_init(NULL, !soc_is_exynos4210(), S5P_VA_CMU, readl(S5P_VA_CHIPID + 8) & 1);
486 exynos4_clk_register_fixed_ext(xxti_f, xusbxti_f);
487#endif
488#ifdef CONFIG_CLKSRC_SAMSUNG_PWM
489 if (soc_is_exynos4210() && samsung_rev() == EXYNOS4210_REV_0)
490 samsung_pwm_clocksource_init(S3C_VA_TIMER,
491 timer_irqs, &exynos4_pwm_variant);
492 else
493#endif
494 mct_init(S5P_VA_SYSTIMER, EXYNOS4_IRQ_MCT_G0,
495 EXYNOS4_IRQ_MCT_L0, EXYNOS4_IRQ_MCT_L1);
496 }
497}
498
499static unsigned int max_combiner_nr(void)
500{
501 if (soc_is_exynos5250())
502 return EXYNOS5_MAX_COMBINER_NR;
503 else if (soc_is_exynos4412())
504 return EXYNOS4412_MAX_COMBINER_NR;
505 else if (soc_is_exynos4212())
506 return EXYNOS4212_MAX_COMBINER_NR;
507 else
508 return EXYNOS4210_MAX_COMBINER_NR;
509}
510
511
512void __init exynos4_init_irq(void)
513{
514 unsigned int gic_bank_offset;
515
516 gic_bank_offset = soc_is_exynos4412() ? 0x4000 : 0x8000;
517
518 if (!of_have_populated_dt())
519 gic_init_bases(0, IRQ_PPI(0), S5P_VA_GIC_DIST, S5P_VA_GIC_CPU, gic_bank_offset, NULL);
520#ifdef CONFIG_OF
521 else
522 irqchip_init();
523#endif
524
525 if (!of_have_populated_dt())
526 combiner_init(S5P_VA_COMBINER_BASE, NULL,
527 max_combiner_nr(), COMBINER_IRQ(0, 0));
528
529 gic_arch_extn.irq_set_wake = s3c_irq_wake;
530}
531
532void __init exynos5_init_irq(void)
533{
534#ifdef CONFIG_OF
535 irqchip_init();
536#endif
537 gic_arch_extn.irq_set_wake = s3c_irq_wake;
538} 374}
539 375
540struct bus_type exynos_subsys = { 376struct bus_type exynos_subsys = {
@@ -552,59 +388,19 @@ static int __init exynos_core_init(void)
552} 388}
553core_initcall(exynos_core_init); 389core_initcall(exynos_core_init);
554 390
555#ifdef CONFIG_CACHE_L2X0
556static int __init exynos4_l2x0_cache_init(void) 391static int __init exynos4_l2x0_cache_init(void)
557{ 392{
558 int ret; 393 int ret;
559 394
560 if (soc_is_exynos5250() || soc_is_exynos5440())
561 return 0;
562
563 ret = l2x0_of_init(L2_AUX_VAL, L2_AUX_MASK); 395 ret = l2x0_of_init(L2_AUX_VAL, L2_AUX_MASK);
564 if (!ret) { 396 if (ret)
565 l2x0_regs_phys = virt_to_phys(&l2x0_saved_regs); 397 return ret;
566 clean_dcache_area(&l2x0_regs_phys, sizeof(unsigned long));
567 return 0;
568 }
569
570 if (!(__raw_readl(S5P_VA_L2CC + L2X0_CTRL) & 0x1)) {
571 l2x0_saved_regs.phy_base = EXYNOS4_PA_L2CC;
572 /* TAG, Data Latency Control: 2 cycles */
573 l2x0_saved_regs.tag_latency = 0x110;
574
575 if (soc_is_exynos4212() || soc_is_exynos4412())
576 l2x0_saved_regs.data_latency = 0x120;
577 else
578 l2x0_saved_regs.data_latency = 0x110;
579 398
580 l2x0_saved_regs.prefetch_ctrl = 0x30000007; 399 l2x0_regs_phys = virt_to_phys(&l2x0_saved_regs);
581 l2x0_saved_regs.pwr_ctrl = 400 clean_dcache_area(&l2x0_regs_phys, sizeof(unsigned long));
582 (L2X0_DYNAMIC_CLK_GATING_EN | L2X0_STNDBY_MODE_EN);
583
584 l2x0_regs_phys = virt_to_phys(&l2x0_saved_regs);
585
586 __raw_writel(l2x0_saved_regs.tag_latency,
587 S5P_VA_L2CC + L2X0_TAG_LATENCY_CTRL);
588 __raw_writel(l2x0_saved_regs.data_latency,
589 S5P_VA_L2CC + L2X0_DATA_LATENCY_CTRL);
590
591 /* L2X0 Prefetch Control */
592 __raw_writel(l2x0_saved_regs.prefetch_ctrl,
593 S5P_VA_L2CC + L2X0_PREFETCH_CTRL);
594
595 /* L2X0 Power Control */
596 __raw_writel(l2x0_saved_regs.pwr_ctrl,
597 S5P_VA_L2CC + L2X0_POWER_CTRL);
598
599 clean_dcache_area(&l2x0_regs_phys, sizeof(unsigned long));
600 clean_dcache_area(&l2x0_saved_regs, sizeof(struct l2x0_regs));
601 }
602
603 l2x0_init(S5P_VA_L2CC, L2_AUX_VAL, L2_AUX_MASK);
604 return 0; 401 return 0;
605} 402}
606early_initcall(exynos4_l2x0_cache_init); 403early_initcall(exynos4_l2x0_cache_init);
607#endif
608 404
609static int __init exynos_init(void) 405static int __init exynos_init(void)
610{ 406{
@@ -612,350 +408,3 @@ static int __init exynos_init(void)
612 408
613 return device_register(&exynos4_dev); 409 return device_register(&exynos4_dev);
614} 410}
615
616/* uart registration process */
617
618static void __init exynos4_init_uarts(struct s3c2410_uartcfg *cfg, int no)
619{
620 struct s3c2410_uartcfg *tcfg = cfg;
621 u32 ucnt;
622
623 for (ucnt = 0; ucnt < no; ucnt++, tcfg++)
624 tcfg->has_fracval = 1;
625
626 s3c24xx_init_uartdevs("exynos4210-uart", exynos4_uart_resources, cfg, no);
627}
628
629static void __iomem *exynos_eint_base;
630
631static DEFINE_SPINLOCK(eint_lock);
632
633static unsigned int eint0_15_data[16];
634
635static inline int exynos4_irq_to_gpio(unsigned int irq)
636{
637 if (irq < IRQ_EINT(0))
638 return -EINVAL;
639
640 irq -= IRQ_EINT(0);
641 if (irq < 8)
642 return EXYNOS4_GPX0(irq);
643
644 irq -= 8;
645 if (irq < 8)
646 return EXYNOS4_GPX1(irq);
647
648 irq -= 8;
649 if (irq < 8)
650 return EXYNOS4_GPX2(irq);
651
652 irq -= 8;
653 if (irq < 8)
654 return EXYNOS4_GPX3(irq);
655
656 return -EINVAL;
657}
658
659static inline int exynos5_irq_to_gpio(unsigned int irq)
660{
661 if (irq < IRQ_EINT(0))
662 return -EINVAL;
663
664 irq -= IRQ_EINT(0);
665 if (irq < 8)
666 return EXYNOS5_GPX0(irq);
667
668 irq -= 8;
669 if (irq < 8)
670 return EXYNOS5_GPX1(irq);
671
672 irq -= 8;
673 if (irq < 8)
674 return EXYNOS5_GPX2(irq);
675
676 irq -= 8;
677 if (irq < 8)
678 return EXYNOS5_GPX3(irq);
679
680 return -EINVAL;
681}
682
683static unsigned int exynos4_eint0_15_src_int[16] = {
684 EXYNOS4_IRQ_EINT0,
685 EXYNOS4_IRQ_EINT1,
686 EXYNOS4_IRQ_EINT2,
687 EXYNOS4_IRQ_EINT3,
688 EXYNOS4_IRQ_EINT4,
689 EXYNOS4_IRQ_EINT5,
690 EXYNOS4_IRQ_EINT6,
691 EXYNOS4_IRQ_EINT7,
692 EXYNOS4_IRQ_EINT8,
693 EXYNOS4_IRQ_EINT9,
694 EXYNOS4_IRQ_EINT10,
695 EXYNOS4_IRQ_EINT11,
696 EXYNOS4_IRQ_EINT12,
697 EXYNOS4_IRQ_EINT13,
698 EXYNOS4_IRQ_EINT14,
699 EXYNOS4_IRQ_EINT15,
700};
701
702static unsigned int exynos5_eint0_15_src_int[16] = {
703 EXYNOS5_IRQ_EINT0,
704 EXYNOS5_IRQ_EINT1,
705 EXYNOS5_IRQ_EINT2,
706 EXYNOS5_IRQ_EINT3,
707 EXYNOS5_IRQ_EINT4,
708 EXYNOS5_IRQ_EINT5,
709 EXYNOS5_IRQ_EINT6,
710 EXYNOS5_IRQ_EINT7,
711 EXYNOS5_IRQ_EINT8,
712 EXYNOS5_IRQ_EINT9,
713 EXYNOS5_IRQ_EINT10,
714 EXYNOS5_IRQ_EINT11,
715 EXYNOS5_IRQ_EINT12,
716 EXYNOS5_IRQ_EINT13,
717 EXYNOS5_IRQ_EINT14,
718 EXYNOS5_IRQ_EINT15,
719};
720static inline void exynos_irq_eint_mask(struct irq_data *data)
721{
722 u32 mask;
723
724 spin_lock(&eint_lock);
725 mask = __raw_readl(EINT_MASK(exynos_eint_base, data->irq));
726 mask |= EINT_OFFSET_BIT(data->irq);
727 __raw_writel(mask, EINT_MASK(exynos_eint_base, data->irq));
728 spin_unlock(&eint_lock);
729}
730
731static void exynos_irq_eint_unmask(struct irq_data *data)
732{
733 u32 mask;
734
735 spin_lock(&eint_lock);
736 mask = __raw_readl(EINT_MASK(exynos_eint_base, data->irq));
737 mask &= ~(EINT_OFFSET_BIT(data->irq));
738 __raw_writel(mask, EINT_MASK(exynos_eint_base, data->irq));
739 spin_unlock(&eint_lock);
740}
741
742static inline void exynos_irq_eint_ack(struct irq_data *data)
743{
744 __raw_writel(EINT_OFFSET_BIT(data->irq),
745 EINT_PEND(exynos_eint_base, data->irq));
746}
747
748static void exynos_irq_eint_maskack(struct irq_data *data)
749{
750 exynos_irq_eint_mask(data);
751 exynos_irq_eint_ack(data);
752}
753
754static int exynos_irq_eint_set_type(struct irq_data *data, unsigned int type)
755{
756 int offs = EINT_OFFSET(data->irq);
757 int shift;
758 u32 ctrl, mask;
759 u32 newvalue = 0;
760
761 switch (type) {
762 case IRQ_TYPE_EDGE_RISING:
763 newvalue = S5P_IRQ_TYPE_EDGE_RISING;
764 break;
765
766 case IRQ_TYPE_EDGE_FALLING:
767 newvalue = S5P_IRQ_TYPE_EDGE_FALLING;
768 break;
769
770 case IRQ_TYPE_EDGE_BOTH:
771 newvalue = S5P_IRQ_TYPE_EDGE_BOTH;
772 break;
773
774 case IRQ_TYPE_LEVEL_LOW:
775 newvalue = S5P_IRQ_TYPE_LEVEL_LOW;
776 break;
777
778 case IRQ_TYPE_LEVEL_HIGH:
779 newvalue = S5P_IRQ_TYPE_LEVEL_HIGH;
780 break;
781
782 default:
783 printk(KERN_ERR "No such irq type %d", type);
784 return -EINVAL;
785 }
786
787 shift = (offs & 0x7) * 4;
788 mask = 0x7 << shift;
789
790 spin_lock(&eint_lock);
791 ctrl = __raw_readl(EINT_CON(exynos_eint_base, data->irq));
792 ctrl &= ~mask;
793 ctrl |= newvalue << shift;
794 __raw_writel(ctrl, EINT_CON(exynos_eint_base, data->irq));
795 spin_unlock(&eint_lock);
796
797 if (soc_is_exynos5250())
798 s3c_gpio_cfgpin(exynos5_irq_to_gpio(data->irq), S3C_GPIO_SFN(0xf));
799 else
800 s3c_gpio_cfgpin(exynos4_irq_to_gpio(data->irq), S3C_GPIO_SFN(0xf));
801
802 return 0;
803}
804
805static struct irq_chip exynos_irq_eint = {
806 .name = "exynos-eint",
807 .irq_mask = exynos_irq_eint_mask,
808 .irq_unmask = exynos_irq_eint_unmask,
809 .irq_mask_ack = exynos_irq_eint_maskack,
810 .irq_ack = exynos_irq_eint_ack,
811 .irq_set_type = exynos_irq_eint_set_type,
812#ifdef CONFIG_PM
813 .irq_set_wake = s3c_irqext_wake,
814#endif
815};
816
817/*
818 * exynos4_irq_demux_eint
819 *
820 * This function demuxes the IRQ from from EINTs 16 to 31.
821 * It is designed to be inlined into the specific handler
822 * s5p_irq_demux_eintX_Y.
823 *
824 * Each EINT pend/mask registers handle eight of them.
825 */
826static inline void exynos_irq_demux_eint(unsigned int start)
827{
828 unsigned int irq;
829
830 u32 status = __raw_readl(EINT_PEND(exynos_eint_base, start));
831 u32 mask = __raw_readl(EINT_MASK(exynos_eint_base, start));
832
833 status &= ~mask;
834 status &= 0xff;
835
836 while (status) {
837 irq = fls(status) - 1;
838 generic_handle_irq(irq + start);
839 status &= ~(1 << irq);
840 }
841}
842
843static void exynos_irq_demux_eint16_31(unsigned int irq, struct irq_desc *desc)
844{
845 struct irq_chip *chip = irq_get_chip(irq);
846 chained_irq_enter(chip, desc);
847 exynos_irq_demux_eint(IRQ_EINT(16));
848 exynos_irq_demux_eint(IRQ_EINT(24));
849 chained_irq_exit(chip, desc);
850}
851
852static void exynos_irq_eint0_15(unsigned int irq, struct irq_desc *desc)
853{
854 u32 *irq_data = irq_get_handler_data(irq);
855 struct irq_chip *chip = irq_get_chip(irq);
856
857 chained_irq_enter(chip, desc);
858 generic_handle_irq(*irq_data);
859 chained_irq_exit(chip, desc);
860}
861
862static int __init exynos_init_irq_eint(void)
863{
864 int irq;
865
866#ifdef CONFIG_PINCTRL_SAMSUNG
867 /*
868 * The Samsung pinctrl driver provides an integrated gpio/pinmux/pinconf
869 * functionality along with support for external gpio and wakeup
870 * interrupts. If the samsung pinctrl driver is enabled and includes
871 * the wakeup interrupt support, then the setting up external wakeup
872 * interrupts here can be skipped. This check here is temporary to
873 * allow exynos4 platforms that do not use Samsung pinctrl driver to
874 * co-exist with platforms that do. When all of the Samsung Exynos4
875 * platforms switch over to using the pinctrl driver, the wakeup
876 * interrupt support code here can be completely removed.
877 */
878 static const struct of_device_id exynos_pinctrl_ids[] = {
879 { .compatible = "samsung,exynos4210-pinctrl", },
880 { .compatible = "samsung,exynos4x12-pinctrl", },
881 { .compatible = "samsung,exynos5250-pinctrl", },
882 };
883 struct device_node *pctrl_np, *wkup_np;
884 const char *wkup_compat = "samsung,exynos4210-wakeup-eint";
885
886 for_each_matching_node(pctrl_np, exynos_pinctrl_ids) {
887 if (of_device_is_available(pctrl_np)) {
888 wkup_np = of_find_compatible_node(pctrl_np, NULL,
889 wkup_compat);
890 if (wkup_np)
891 return -ENODEV;
892 }
893 }
894#endif
895 if (soc_is_exynos5440())
896 return 0;
897
898 if (soc_is_exynos5250())
899 exynos_eint_base = ioremap(EXYNOS5_PA_GPIO1, SZ_4K);
900 else
901 exynos_eint_base = ioremap(EXYNOS4_PA_GPIO2, SZ_4K);
902
903 if (exynos_eint_base == NULL) {
904 pr_err("unable to ioremap for EINT base address\n");
905 return -ENOMEM;
906 }
907
908 for (irq = 0 ; irq <= 31 ; irq++) {
909 irq_set_chip_and_handler(IRQ_EINT(irq), &exynos_irq_eint,
910 handle_level_irq);
911 set_irq_flags(IRQ_EINT(irq), IRQF_VALID);
912 }
913
914 irq_set_chained_handler(EXYNOS_IRQ_EINT16_31, exynos_irq_demux_eint16_31);
915
916 for (irq = 0 ; irq <= 15 ; irq++) {
917 eint0_15_data[irq] = IRQ_EINT(irq);
918
919 if (soc_is_exynos5250()) {
920 irq_set_handler_data(exynos5_eint0_15_src_int[irq],
921 &eint0_15_data[irq]);
922 irq_set_chained_handler(exynos5_eint0_15_src_int[irq],
923 exynos_irq_eint0_15);
924 } else {
925 irq_set_handler_data(exynos4_eint0_15_src_int[irq],
926 &eint0_15_data[irq]);
927 irq_set_chained_handler(exynos4_eint0_15_src_int[irq],
928 exynos_irq_eint0_15);
929 }
930 }
931
932 return 0;
933}
934arch_initcall(exynos_init_irq_eint);
935
936static struct resource exynos4_pmu_resource[] = {
937 DEFINE_RES_IRQ(EXYNOS4_IRQ_PMU),
938 DEFINE_RES_IRQ(EXYNOS4_IRQ_PMU_CPU1),
939#if defined(CONFIG_SOC_EXYNOS4412)
940 DEFINE_RES_IRQ(EXYNOS4_IRQ_PMU_CPU2),
941 DEFINE_RES_IRQ(EXYNOS4_IRQ_PMU_CPU3),
942#endif
943};
944
945static struct platform_device exynos4_device_pmu = {
946 .name = "arm-pmu",
947 .num_resources = ARRAY_SIZE(exynos4_pmu_resource),
948 .resource = exynos4_pmu_resource,
949};
950
951static int __init exynos_armpmu_init(void)
952{
953 if (!of_have_populated_dt()) {
954 if (soc_is_exynos4210() || soc_is_exynos4212())
955 exynos4_device_pmu.num_resources = 2;
956 platform_device_register(&exynos4_device_pmu);
957 }
958
959 return 0;
960}
961arch_initcall(exynos_armpmu_init);
diff --git a/arch/arm/mach-exynos/common.h b/arch/arm/mach-exynos/common.h
index 11fc1e29819b..972490fc09d6 100644
--- a/arch/arm/mach-exynos/common.h
+++ b/arch/arm/mach-exynos/common.h
@@ -12,6 +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
15#include <linux/reboot.h>
15#include <linux/of.h> 16#include <linux/of.h>
16 17
17void mct_init(void __iomem *base, int irq_g0, int irq_l0, int irq_l1); 18void mct_init(void __iomem *base, int irq_g0, int irq_l0, int irq_l1);
@@ -19,11 +20,9 @@ void exynos_init_time(void);
19extern unsigned long xxti_f, xusbxti_f; 20extern unsigned long xxti_f, xusbxti_f;
20 21
21struct map_desc; 22struct map_desc;
22void exynos_init_io(struct map_desc *mach_desc, int size); 23void exynos_init_io(void);
23void exynos4_init_irq(void); 24void exynos4_restart(enum reboot_mode mode, const char *cmd);
24void exynos5_init_irq(void); 25void exynos5_restart(enum reboot_mode mode, const char *cmd);
25void exynos4_restart(char mode, const char *cmd);
26void exynos5_restart(char mode, const char *cmd);
27void exynos_init_late(void); 26void exynos_init_late(void);
28 27
29/* ToDo: remove these after migrating legacy exynos4 platforms to dt */ 28/* ToDo: remove these after migrating legacy exynos4 platforms to dt */
@@ -98,6 +97,5 @@ struct exynos_pmu_conf {
98}; 97};
99 98
100extern void exynos_sys_powerdown_conf(enum sys_powerdown mode); 99extern void exynos_sys_powerdown_conf(enum sys_powerdown mode);
101extern void s3c_cpu_resume(void);
102 100
103#endif /* __ARCH_ARM_MACH_EXYNOS_COMMON_H */ 101#endif /* __ARCH_ARM_MACH_EXYNOS_COMMON_H */
diff --git a/arch/arm/mach-exynos/cpuidle.c b/arch/arm/mach-exynos/cpuidle.c
index 17a18ff3d71e..225ee8431c72 100644
--- a/arch/arm/mach-exynos/cpuidle.c
+++ b/arch/arm/mach-exynos/cpuidle.c
@@ -25,6 +25,7 @@
25#include <mach/regs-pmu.h> 25#include <mach/regs-pmu.h>
26 26
27#include <plat/cpu.h> 27#include <plat/cpu.h>
28#include <plat/pm.h>
28 29
29#include "common.h" 30#include "common.h"
30 31
diff --git a/arch/arm/mach-exynos/dev-ahci.c b/arch/arm/mach-exynos/dev-ahci.c
deleted file mode 100644
index ce1aad3eeeb9..000000000000
--- a/arch/arm/mach-exynos/dev-ahci.c
+++ /dev/null
@@ -1,255 +0,0 @@
1/* linux/arch/arm/mach-exynos4/dev-ahci.c
2 *
3 * Copyright (c) 2011 Samsung Electronics Co., Ltd.
4 * http://www.samsung.com
5 *
6 * EXYNOS4 - AHCI 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/clk.h>
14#include <linux/delay.h>
15#include <linux/dma-mapping.h>
16#include <linux/platform_device.h>
17#include <linux/ahci_platform.h>
18
19#include <plat/cpu.h>
20
21#include <mach/irqs.h>
22#include <mach/map.h>
23#include <mach/regs-pmu.h>
24
25/* PHY Control Register */
26#define SATA_CTRL0 0x0
27/* PHY Link Control Register */
28#define SATA_CTRL1 0x4
29/* PHY Status Register */
30#define SATA_PHY_STATUS 0x8
31
32#define SATA_CTRL0_RX_DATA_VALID(x) (x << 27)
33#define SATA_CTRL0_SPEED_MODE (1 << 26)
34#define SATA_CTRL0_M_PHY_CAL (1 << 19)
35#define SATA_CTRL0_PHY_CMU_RST_N (1 << 10)
36#define SATA_CTRL0_M_PHY_LN_RST_N (1 << 9)
37#define SATA_CTRL0_PHY_POR_N (1 << 8)
38
39#define SATA_CTRL1_RST_PMALIVE_N (1 << 8)
40#define SATA_CTRL1_RST_RXOOB_N (1 << 7)
41#define SATA_CTRL1_RST_RX_N (1 << 6)
42#define SATA_CTRL1_RST_TX_N (1 << 5)
43
44#define SATA_PHY_STATUS_CMU_OK (1 << 18)
45#define SATA_PHY_STATUS_LANE_OK (1 << 16)
46
47#define LANE0 0x200
48#define COM_LANE 0xA00
49
50#define HOST_PORTS_IMPL 0xC
51#define SCLK_SATA_FREQ (67 * MHZ)
52
53static void __iomem *phy_base, *phy_ctrl;
54
55struct phy_reg {
56 u8 reg;
57 u8 val;
58};
59
60/* SATA PHY setup */
61static const struct phy_reg exynos4_sataphy_cmu[] = {
62 { 0x00, 0x06 }, { 0x02, 0x80 }, { 0x22, 0xa0 }, { 0x23, 0x42 },
63 { 0x2e, 0x04 }, { 0x2f, 0x50 }, { 0x30, 0x70 }, { 0x31, 0x02 },
64 { 0x32, 0x25 }, { 0x33, 0x40 }, { 0x34, 0x01 }, { 0x35, 0x40 },
65 { 0x61, 0x2e }, { 0x63, 0x5e }, { 0x65, 0x42 }, { 0x66, 0xd1 },
66 { 0x67, 0x20 }, { 0x68, 0x28 }, { 0x69, 0x78 }, { 0x6a, 0x04 },
67 { 0x6b, 0xc8 }, { 0x6c, 0x06 },
68};
69
70static const struct phy_reg exynos4_sataphy_lane[] = {
71 { 0x00, 0x02 }, { 0x05, 0x10 }, { 0x06, 0x84 }, { 0x07, 0x04 },
72 { 0x08, 0xe0 }, { 0x10, 0x23 }, { 0x13, 0x05 }, { 0x14, 0x30 },
73 { 0x15, 0x00 }, { 0x17, 0x70 }, { 0x18, 0xf2 }, { 0x19, 0x1e },
74 { 0x1a, 0x18 }, { 0x1b, 0x0d }, { 0x1c, 0x08 }, { 0x50, 0x60 },
75 { 0x51, 0x0f },
76};
77
78static const struct phy_reg exynos4_sataphy_comlane[] = {
79 { 0x01, 0x20 }, { 0x03, 0x40 }, { 0x04, 0x3c }, { 0x05, 0x7d },
80 { 0x06, 0x1d }, { 0x07, 0xcf }, { 0x08, 0x05 }, { 0x09, 0x63 },
81 { 0x0a, 0x29 }, { 0x0b, 0xc4 }, { 0x0c, 0x01 }, { 0x0d, 0x03 },
82 { 0x0e, 0x28 }, { 0x0f, 0x98 }, { 0x10, 0x19 }, { 0x13, 0x80 },
83 { 0x14, 0xf0 }, { 0x15, 0xd0 }, { 0x39, 0xa0 }, { 0x3a, 0xa0 },
84 { 0x3b, 0xa0 }, { 0x3c, 0xa0 }, { 0x3d, 0xa0 }, { 0x3e, 0xa0 },
85 { 0x3f, 0xa0 }, { 0x40, 0x42 }, { 0x42, 0x80 }, { 0x43, 0x58 },
86 { 0x45, 0x44 }, { 0x46, 0x5c }, { 0x47, 0x86 }, { 0x48, 0x8d },
87 { 0x49, 0xd0 }, { 0x4a, 0x09 }, { 0x4b, 0x90 }, { 0x4c, 0x07 },
88 { 0x4d, 0x40 }, { 0x51, 0x20 }, { 0x52, 0x32 }, { 0x7f, 0xd8 },
89 { 0x80, 0x1a }, { 0x81, 0xff }, { 0x82, 0x11 }, { 0x83, 0x00 },
90 { 0x87, 0xf0 }, { 0x87, 0xff }, { 0x87, 0xff }, { 0x87, 0xff },
91 { 0x87, 0xff }, { 0x8c, 0x1c }, { 0x8d, 0xc2 }, { 0x8e, 0xc3 },
92 { 0x8f, 0x3f }, { 0x90, 0x0a }, { 0x96, 0xf8 },
93};
94
95static int wait_for_phy_ready(void __iomem *reg, unsigned long bit)
96{
97 unsigned long timeout;
98
99 /* wait for maximum of 3 sec */
100 timeout = jiffies + msecs_to_jiffies(3000);
101 while (!(__raw_readl(reg) & bit)) {
102 if (time_after(jiffies, timeout))
103 return -1;
104 cpu_relax();
105 }
106 return 0;
107}
108
109static int ahci_phy_init(void __iomem *mmio)
110{
111 int i, ctrl0;
112
113 for (i = 0; i < ARRAY_SIZE(exynos4_sataphy_cmu); i++)
114 __raw_writeb(exynos4_sataphy_cmu[i].val,
115 phy_base + (exynos4_sataphy_cmu[i].reg * 4));
116
117 for (i = 0; i < ARRAY_SIZE(exynos4_sataphy_lane); i++)
118 __raw_writeb(exynos4_sataphy_lane[i].val,
119 phy_base + (LANE0 + exynos4_sataphy_lane[i].reg) * 4);
120
121 for (i = 0; i < ARRAY_SIZE(exynos4_sataphy_comlane); i++)
122 __raw_writeb(exynos4_sataphy_comlane[i].val,
123 phy_base + (COM_LANE + exynos4_sataphy_comlane[i].reg) * 4);
124
125 __raw_writeb(0x07, phy_base);
126
127 ctrl0 = __raw_readl(phy_ctrl + SATA_CTRL0);
128 ctrl0 |= SATA_CTRL0_PHY_CMU_RST_N;
129 __raw_writel(ctrl0, phy_ctrl + SATA_CTRL0);
130
131 if (wait_for_phy_ready(phy_ctrl + SATA_PHY_STATUS,
132 SATA_PHY_STATUS_CMU_OK) < 0) {
133 printk(KERN_ERR "PHY CMU not ready\n");
134 return -EBUSY;
135 }
136
137 __raw_writeb(0x03, phy_base + (COM_LANE * 4));
138
139 ctrl0 = __raw_readl(phy_ctrl + SATA_CTRL0);
140 ctrl0 |= SATA_CTRL0_M_PHY_LN_RST_N;
141 __raw_writel(ctrl0, phy_ctrl + SATA_CTRL0);
142
143 if (wait_for_phy_ready(phy_ctrl + SATA_PHY_STATUS,
144 SATA_PHY_STATUS_LANE_OK) < 0) {
145 printk(KERN_ERR "PHY LANE not ready\n");
146 return -EBUSY;
147 }
148
149 ctrl0 = __raw_readl(phy_ctrl + SATA_CTRL0);
150 ctrl0 |= SATA_CTRL0_M_PHY_CAL;
151 __raw_writel(ctrl0, phy_ctrl + SATA_CTRL0);
152
153 return 0;
154}
155
156static int exynos4_ahci_init(struct device *dev, void __iomem *mmio)
157{
158 struct clk *clk_sata, *clk_sataphy, *clk_sclk_sata;
159 int val, ret;
160
161 phy_base = ioremap(EXYNOS4_PA_SATAPHY, SZ_64K);
162 if (!phy_base) {
163 dev_err(dev, "failed to allocate memory for SATA PHY\n");
164 return -ENOMEM;
165 }
166
167 phy_ctrl = ioremap(EXYNOS4_PA_SATAPHY_CTRL, SZ_16);
168 if (!phy_ctrl) {
169 dev_err(dev, "failed to allocate memory for SATA PHY CTRL\n");
170 ret = -ENOMEM;
171 goto err1;
172 }
173
174 clk_sata = clk_get(dev, "sata");
175 if (IS_ERR(clk_sata)) {
176 dev_err(dev, "failed to get sata clock\n");
177 ret = PTR_ERR(clk_sata);
178 clk_sata = NULL;
179 goto err2;
180
181 }
182 clk_enable(clk_sata);
183
184 clk_sataphy = clk_get(dev, "sataphy");
185 if (IS_ERR(clk_sataphy)) {
186 dev_err(dev, "failed to get sataphy clock\n");
187 ret = PTR_ERR(clk_sataphy);
188 clk_sataphy = NULL;
189 goto err3;
190 }
191 clk_enable(clk_sataphy);
192
193 clk_sclk_sata = clk_get(dev, "sclk_sata");
194 if (IS_ERR(clk_sclk_sata)) {
195 dev_err(dev, "failed to get sclk_sata\n");
196 ret = PTR_ERR(clk_sclk_sata);
197 clk_sclk_sata = NULL;
198 goto err4;
199 }
200 clk_enable(clk_sclk_sata);
201 clk_set_rate(clk_sclk_sata, SCLK_SATA_FREQ);
202
203 __raw_writel(S5P_PMU_SATA_PHY_CONTROL_EN, S5P_PMU_SATA_PHY_CONTROL);
204
205 /* Enable PHY link control */
206 val = SATA_CTRL1_RST_PMALIVE_N | SATA_CTRL1_RST_RXOOB_N |
207 SATA_CTRL1_RST_RX_N | SATA_CTRL1_RST_TX_N;
208 __raw_writel(val, phy_ctrl + SATA_CTRL1);
209
210 /* Set communication speed as 3Gbps and enable PHY power */
211 val = SATA_CTRL0_RX_DATA_VALID(3) | SATA_CTRL0_SPEED_MODE |
212 SATA_CTRL0_PHY_POR_N;
213 __raw_writel(val, phy_ctrl + SATA_CTRL0);
214
215 /* Port0 is available */
216 __raw_writel(0x1, mmio + HOST_PORTS_IMPL);
217
218 return ahci_phy_init(mmio);
219
220err4:
221 clk_disable(clk_sataphy);
222 clk_put(clk_sataphy);
223err3:
224 clk_disable(clk_sata);
225 clk_put(clk_sata);
226err2:
227 iounmap(phy_ctrl);
228err1:
229 iounmap(phy_base);
230
231 return ret;
232}
233
234static struct ahci_platform_data exynos4_ahci_pdata = {
235 .init = exynos4_ahci_init,
236};
237
238static struct resource exynos4_ahci_resource[] = {
239 [0] = DEFINE_RES_MEM(EXYNOS4_PA_SATA, SZ_64K),
240 [1] = DEFINE_RES_IRQ(EXYNOS4_IRQ_SATA),
241};
242
243static u64 exynos4_ahci_dmamask = DMA_BIT_MASK(32);
244
245struct platform_device exynos4_device_ahci = {
246 .name = "ahci",
247 .id = -1,
248 .resource = exynos4_ahci_resource,
249 .num_resources = ARRAY_SIZE(exynos4_ahci_resource),
250 .dev = {
251 .platform_data = &exynos4_ahci_pdata,
252 .dma_mask = &exynos4_ahci_dmamask,
253 .coherent_dma_mask = DMA_BIT_MASK(32),
254 },
255};
diff --git a/arch/arm/mach-exynos/dev-audio.c b/arch/arm/mach-exynos/dev-audio.c
deleted file mode 100644
index c662c89794b2..000000000000
--- a/arch/arm/mach-exynos/dev-audio.c
+++ /dev/null
@@ -1,254 +0,0 @@
1/* linux/arch/arm/mach-exynos4/dev-audio.c
2 *
3 * Copyright (c) 2011 Samsung Electronics Co., Ltd.
4 * http://www.samsung.com
5 *
6 * Copyright (c) 2010 Samsung Electronics Co. Ltd
7 * Jaswinder Singh <jassi.brar@samsung.com>
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License version 2 as
11 * published by the Free Software Foundation.
12 */
13
14#include <linux/platform_device.h>
15#include <linux/dma-mapping.h>
16#include <linux/gpio.h>
17#include <linux/platform_data/asoc-s3c.h>
18
19#include <plat/gpio-cfg.h>
20
21#include <mach/map.h>
22#include <mach/dma.h>
23#include <mach/irqs.h>
24
25#define EXYNOS4_AUDSS_INT_MEM (0x03000000)
26
27static int exynos4_cfg_i2s(struct platform_device *pdev)
28{
29 /* configure GPIO for i2s port */
30 switch (pdev->id) {
31 case 0:
32 s3c_gpio_cfgpin_range(EXYNOS4_GPZ(0), 7, S3C_GPIO_SFN(2));
33 break;
34 case 1:
35 s3c_gpio_cfgpin_range(EXYNOS4_GPC0(0), 5, S3C_GPIO_SFN(2));
36 break;
37 case 2:
38 s3c_gpio_cfgpin_range(EXYNOS4_GPC1(0), 5, S3C_GPIO_SFN(4));
39 break;
40 default:
41 printk(KERN_ERR "Invalid Device %d\n", pdev->id);
42 return -EINVAL;
43 }
44
45 return 0;
46}
47
48static struct s3c_audio_pdata i2sv5_pdata = {
49 .cfg_gpio = exynos4_cfg_i2s,
50 .type = {
51 .i2s = {
52 .quirks = QUIRK_PRI_6CHAN | QUIRK_SEC_DAI
53 | QUIRK_NEED_RSTCLR,
54 .idma_addr = EXYNOS4_AUDSS_INT_MEM,
55 },
56 },
57};
58
59static struct resource exynos4_i2s0_resource[] = {
60 [0] = DEFINE_RES_MEM(EXYNOS4_PA_I2S0, SZ_256),
61 [1] = DEFINE_RES_DMA(DMACH_I2S0_TX),
62 [2] = DEFINE_RES_DMA(DMACH_I2S0_RX),
63 [3] = DEFINE_RES_DMA(DMACH_I2S0S_TX),
64};
65
66struct platform_device exynos4_device_i2s0 = {
67 .name = "samsung-i2s",
68 .id = 0,
69 .num_resources = ARRAY_SIZE(exynos4_i2s0_resource),
70 .resource = exynos4_i2s0_resource,
71 .dev = {
72 .platform_data = &i2sv5_pdata,
73 },
74};
75
76static struct s3c_audio_pdata i2sv3_pdata = {
77 .cfg_gpio = exynos4_cfg_i2s,
78 .type = {
79 .i2s = {
80 .quirks = QUIRK_NO_MUXPSR,
81 },
82 },
83};
84
85static struct resource exynos4_i2s1_resource[] = {
86 [0] = DEFINE_RES_MEM(EXYNOS4_PA_I2S1, SZ_256),
87 [1] = DEFINE_RES_DMA(DMACH_I2S1_TX),
88 [2] = DEFINE_RES_DMA(DMACH_I2S1_RX),
89};
90
91struct platform_device exynos4_device_i2s1 = {
92 .name = "samsung-i2s",
93 .id = 1,
94 .num_resources = ARRAY_SIZE(exynos4_i2s1_resource),
95 .resource = exynos4_i2s1_resource,
96 .dev = {
97 .platform_data = &i2sv3_pdata,
98 },
99};
100
101static struct resource exynos4_i2s2_resource[] = {
102 [0] = DEFINE_RES_MEM(EXYNOS4_PA_I2S2, SZ_256),
103 [1] = DEFINE_RES_DMA(DMACH_I2S2_TX),
104 [2] = DEFINE_RES_DMA(DMACH_I2S2_RX),
105};
106
107struct platform_device exynos4_device_i2s2 = {
108 .name = "samsung-i2s",
109 .id = 2,
110 .num_resources = ARRAY_SIZE(exynos4_i2s2_resource),
111 .resource = exynos4_i2s2_resource,
112 .dev = {
113 .platform_data = &i2sv3_pdata,
114 },
115};
116
117/* PCM Controller platform_devices */
118
119static int exynos4_pcm_cfg_gpio(struct platform_device *pdev)
120{
121 switch (pdev->id) {
122 case 0:
123 s3c_gpio_cfgpin_range(EXYNOS4_GPZ(0), 5, S3C_GPIO_SFN(3));
124 break;
125 case 1:
126 s3c_gpio_cfgpin_range(EXYNOS4_GPC0(0), 5, S3C_GPIO_SFN(3));
127 break;
128 case 2:
129 s3c_gpio_cfgpin_range(EXYNOS4_GPC1(0), 5, S3C_GPIO_SFN(3));
130 break;
131 default:
132 printk(KERN_DEBUG "Invalid PCM Controller number!");
133 return -EINVAL;
134 }
135
136 return 0;
137}
138
139static struct s3c_audio_pdata s3c_pcm_pdata = {
140 .cfg_gpio = exynos4_pcm_cfg_gpio,
141};
142
143static struct resource exynos4_pcm0_resource[] = {
144 [0] = DEFINE_RES_MEM(EXYNOS4_PA_PCM0, SZ_256),
145 [1] = DEFINE_RES_DMA(DMACH_PCM0_TX),
146 [2] = DEFINE_RES_DMA(DMACH_PCM0_RX),
147};
148
149struct platform_device exynos4_device_pcm0 = {
150 .name = "samsung-pcm",
151 .id = 0,
152 .num_resources = ARRAY_SIZE(exynos4_pcm0_resource),
153 .resource = exynos4_pcm0_resource,
154 .dev = {
155 .platform_data = &s3c_pcm_pdata,
156 },
157};
158
159static struct resource exynos4_pcm1_resource[] = {
160 [0] = DEFINE_RES_MEM(EXYNOS4_PA_PCM1, SZ_256),
161 [1] = DEFINE_RES_DMA(DMACH_PCM1_TX),
162 [2] = DEFINE_RES_DMA(DMACH_PCM1_RX),
163};
164
165struct platform_device exynos4_device_pcm1 = {
166 .name = "samsung-pcm",
167 .id = 1,
168 .num_resources = ARRAY_SIZE(exynos4_pcm1_resource),
169 .resource = exynos4_pcm1_resource,
170 .dev = {
171 .platform_data = &s3c_pcm_pdata,
172 },
173};
174
175static struct resource exynos4_pcm2_resource[] = {
176 [0] = DEFINE_RES_MEM(EXYNOS4_PA_PCM2, SZ_256),
177 [1] = DEFINE_RES_DMA(DMACH_PCM2_TX),
178 [2] = DEFINE_RES_DMA(DMACH_PCM2_RX),
179};
180
181struct platform_device exynos4_device_pcm2 = {
182 .name = "samsung-pcm",
183 .id = 2,
184 .num_resources = ARRAY_SIZE(exynos4_pcm2_resource),
185 .resource = exynos4_pcm2_resource,
186 .dev = {
187 .platform_data = &s3c_pcm_pdata,
188 },
189};
190
191/* AC97 Controller platform devices */
192
193static int exynos4_ac97_cfg_gpio(struct platform_device *pdev)
194{
195 return s3c_gpio_cfgpin_range(EXYNOS4_GPC0(0), 5, S3C_GPIO_SFN(4));
196}
197
198static struct resource exynos4_ac97_resource[] = {
199 [0] = DEFINE_RES_MEM(EXYNOS4_PA_AC97, SZ_256),
200 [1] = DEFINE_RES_DMA(DMACH_AC97_PCMOUT),
201 [2] = DEFINE_RES_DMA(DMACH_AC97_PCMIN),
202 [3] = DEFINE_RES_DMA(DMACH_AC97_MICIN),
203 [4] = DEFINE_RES_IRQ(EXYNOS4_IRQ_AC97),
204};
205
206static struct s3c_audio_pdata s3c_ac97_pdata = {
207 .cfg_gpio = exynos4_ac97_cfg_gpio,
208};
209
210static u64 exynos4_ac97_dmamask = DMA_BIT_MASK(32);
211
212struct platform_device exynos4_device_ac97 = {
213 .name = "samsung-ac97",
214 .id = -1,
215 .num_resources = ARRAY_SIZE(exynos4_ac97_resource),
216 .resource = exynos4_ac97_resource,
217 .dev = {
218 .platform_data = &s3c_ac97_pdata,
219 .dma_mask = &exynos4_ac97_dmamask,
220 .coherent_dma_mask = DMA_BIT_MASK(32),
221 },
222};
223
224/* S/PDIF Controller platform_device */
225
226static int exynos4_spdif_cfg_gpio(struct platform_device *pdev)
227{
228 s3c_gpio_cfgpin_range(EXYNOS4_GPC1(0), 2, S3C_GPIO_SFN(4));
229
230 return 0;
231}
232
233static struct resource exynos4_spdif_resource[] = {
234 [0] = DEFINE_RES_MEM(EXYNOS4_PA_SPDIF, SZ_256),
235 [1] = DEFINE_RES_DMA(DMACH_SPDIF),
236};
237
238static struct s3c_audio_pdata samsung_spdif_pdata = {
239 .cfg_gpio = exynos4_spdif_cfg_gpio,
240};
241
242static u64 exynos4_spdif_dmamask = DMA_BIT_MASK(32);
243
244struct platform_device exynos4_device_spdif = {
245 .name = "samsung-spdif",
246 .id = -1,
247 .num_resources = ARRAY_SIZE(exynos4_spdif_resource),
248 .resource = exynos4_spdif_resource,
249 .dev = {
250 .platform_data = &samsung_spdif_pdata,
251 .dma_mask = &exynos4_spdif_dmamask,
252 .coherent_dma_mask = DMA_BIT_MASK(32),
253 },
254};
diff --git a/arch/arm/mach-exynos/dev-ohci.c b/arch/arm/mach-exynos/dev-ohci.c
deleted file mode 100644
index d5bc129e6bb7..000000000000
--- a/arch/arm/mach-exynos/dev-ohci.c
+++ /dev/null
@@ -1,52 +0,0 @@
1/* linux/arch/arm/mach-exynos/dev-ohci.c
2 *
3 * Copyright (c) 2011 Samsung Electronics Co., Ltd.
4 * http://www.samsung.com
5 *
6 * EXYNOS - OHCI 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/dma-mapping.h>
14#include <linux/platform_device.h>
15#include <linux/platform_data/usb-ohci-exynos.h>
16
17#include <mach/irqs.h>
18#include <mach/map.h>
19
20#include <plat/devs.h>
21#include <plat/usb-phy.h>
22
23static struct resource exynos4_ohci_resource[] = {
24 [0] = DEFINE_RES_MEM(EXYNOS4_PA_OHCI, SZ_256),
25 [1] = DEFINE_RES_IRQ(IRQ_USB_HOST),
26};
27
28static u64 exynos4_ohci_dma_mask = DMA_BIT_MASK(32);
29
30struct platform_device exynos4_device_ohci = {
31 .name = "exynos-ohci",
32 .id = -1,
33 .num_resources = ARRAY_SIZE(exynos4_ohci_resource),
34 .resource = exynos4_ohci_resource,
35 .dev = {
36 .dma_mask = &exynos4_ohci_dma_mask,
37 .coherent_dma_mask = DMA_BIT_MASK(32),
38 }
39};
40
41void __init exynos4_ohci_set_platdata(struct exynos4_ohci_platdata *pd)
42{
43 struct exynos4_ohci_platdata *npd;
44
45 npd = s3c_set_platdata(pd, sizeof(struct exynos4_ohci_platdata),
46 &exynos4_device_ohci);
47
48 if (!npd->phy_init)
49 npd->phy_init = s5p_usb_phy_init;
50 if (!npd->phy_exit)
51 npd->phy_exit = s5p_usb_phy_exit;
52}
diff --git a/arch/arm/mach-exynos/dev-uart.c b/arch/arm/mach-exynos/dev-uart.c
deleted file mode 100644
index c48aff02c786..000000000000
--- a/arch/arm/mach-exynos/dev-uart.c
+++ /dev/null
@@ -1,55 +0,0 @@
1/*
2 * Copyright (c) 2012 Samsung Electronics Co., Ltd.
3 * http://www.samsung.com
4 *
5 * Base EXYNOS UART resource and device 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#include <linux/kernel.h>
13#include <linux/types.h>
14#include <linux/interrupt.h>
15#include <linux/list.h>
16#include <linux/ioport.h>
17#include <linux/platform_device.h>
18
19#include <asm/mach/arch.h>
20#include <asm/mach/irq.h>
21#include <mach/hardware.h>
22#include <mach/map.h>
23#include <mach/irqs.h>
24
25#include <plat/devs.h>
26
27#define EXYNOS_UART_RESOURCE(_series, _nr) \
28static struct resource exynos##_series##_uart##_nr##_resource[] = { \
29 [0] = DEFINE_RES_MEM(EXYNOS##_series##_PA_UART##_nr, EXYNOS##_series##_SZ_UART), \
30 [1] = DEFINE_RES_IRQ(EXYNOS##_series##_IRQ_UART##_nr), \
31};
32
33EXYNOS_UART_RESOURCE(4, 0)
34EXYNOS_UART_RESOURCE(4, 1)
35EXYNOS_UART_RESOURCE(4, 2)
36EXYNOS_UART_RESOURCE(4, 3)
37
38struct s3c24xx_uart_resources exynos4_uart_resources[] __initdata = {
39 [0] = {
40 .resources = exynos4_uart0_resource,
41 .nr_resources = ARRAY_SIZE(exynos4_uart0_resource),
42 },
43 [1] = {
44 .resources = exynos4_uart1_resource,
45 .nr_resources = ARRAY_SIZE(exynos4_uart1_resource),
46 },
47 [2] = {
48 .resources = exynos4_uart2_resource,
49 .nr_resources = ARRAY_SIZE(exynos4_uart2_resource),
50 },
51 [3] = {
52 .resources = exynos4_uart3_resource,
53 .nr_resources = ARRAY_SIZE(exynos4_uart3_resource),
54 },
55};
diff --git a/arch/arm/mach-exynos/dma.c b/arch/arm/mach-exynos/dma.c
deleted file mode 100644
index 87e07d6fc615..000000000000
--- a/arch/arm/mach-exynos/dma.c
+++ /dev/null
@@ -1,322 +0,0 @@
1/* linux/arch/arm/mach-exynos4/dma.c
2 *
3 * Copyright (c) 2011 Samsung Electronics Co., Ltd.
4 * http://www.samsung.com
5 *
6 * Copyright (C) 2010 Samsung Electronics Co. Ltd.
7 * Jaswinder Singh <jassi.brar@samsung.com>
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
22 */
23
24#include <linux/dma-mapping.h>
25#include <linux/amba/bus.h>
26#include <linux/amba/pl330.h>
27#include <linux/of.h>
28
29#include <asm/irq.h>
30#include <plat/devs.h>
31#include <plat/irqs.h>
32#include <plat/cpu.h>
33
34#include <mach/map.h>
35#include <mach/irqs.h>
36#include <mach/dma.h>
37
38static u8 exynos4210_pdma0_peri[] = {
39 DMACH_PCM0_RX,
40 DMACH_PCM0_TX,
41 DMACH_PCM2_RX,
42 DMACH_PCM2_TX,
43 DMACH_MSM_REQ0,
44 DMACH_MSM_REQ2,
45 DMACH_SPI0_RX,
46 DMACH_SPI0_TX,
47 DMACH_SPI2_RX,
48 DMACH_SPI2_TX,
49 DMACH_I2S0S_TX,
50 DMACH_I2S0_RX,
51 DMACH_I2S0_TX,
52 DMACH_I2S2_RX,
53 DMACH_I2S2_TX,
54 DMACH_UART0_RX,
55 DMACH_UART0_TX,
56 DMACH_UART2_RX,
57 DMACH_UART2_TX,
58 DMACH_UART4_RX,
59 DMACH_UART4_TX,
60 DMACH_SLIMBUS0_RX,
61 DMACH_SLIMBUS0_TX,
62 DMACH_SLIMBUS2_RX,
63 DMACH_SLIMBUS2_TX,
64 DMACH_SLIMBUS4_RX,
65 DMACH_SLIMBUS4_TX,
66 DMACH_AC97_MICIN,
67 DMACH_AC97_PCMIN,
68 DMACH_AC97_PCMOUT,
69};
70
71static u8 exynos4212_pdma0_peri[] = {
72 DMACH_PCM0_RX,
73 DMACH_PCM0_TX,
74 DMACH_PCM2_RX,
75 DMACH_PCM2_TX,
76 DMACH_MIPI_HSI0,
77 DMACH_MIPI_HSI1,
78 DMACH_SPI0_RX,
79 DMACH_SPI0_TX,
80 DMACH_SPI2_RX,
81 DMACH_SPI2_TX,
82 DMACH_I2S0S_TX,
83 DMACH_I2S0_RX,
84 DMACH_I2S0_TX,
85 DMACH_I2S2_RX,
86 DMACH_I2S2_TX,
87 DMACH_UART0_RX,
88 DMACH_UART0_TX,
89 DMACH_UART2_RX,
90 DMACH_UART2_TX,
91 DMACH_UART4_RX,
92 DMACH_UART4_TX,
93 DMACH_SLIMBUS0_RX,
94 DMACH_SLIMBUS0_TX,
95 DMACH_SLIMBUS2_RX,
96 DMACH_SLIMBUS2_TX,
97 DMACH_SLIMBUS4_RX,
98 DMACH_SLIMBUS4_TX,
99 DMACH_AC97_MICIN,
100 DMACH_AC97_PCMIN,
101 DMACH_AC97_PCMOUT,
102 DMACH_MIPI_HSI4,
103 DMACH_MIPI_HSI5,
104};
105
106static u8 exynos5250_pdma0_peri[] = {
107 DMACH_PCM0_RX,
108 DMACH_PCM0_TX,
109 DMACH_PCM2_RX,
110 DMACH_PCM2_TX,
111 DMACH_SPI0_RX,
112 DMACH_SPI0_TX,
113 DMACH_SPI2_RX,
114 DMACH_SPI2_TX,
115 DMACH_I2S0S_TX,
116 DMACH_I2S0_RX,
117 DMACH_I2S0_TX,
118 DMACH_I2S2_RX,
119 DMACH_I2S2_TX,
120 DMACH_UART0_RX,
121 DMACH_UART0_TX,
122 DMACH_UART2_RX,
123 DMACH_UART2_TX,
124 DMACH_UART4_RX,
125 DMACH_UART4_TX,
126 DMACH_SLIMBUS0_RX,
127 DMACH_SLIMBUS0_TX,
128 DMACH_SLIMBUS2_RX,
129 DMACH_SLIMBUS2_TX,
130 DMACH_SLIMBUS4_RX,
131 DMACH_SLIMBUS4_TX,
132 DMACH_AC97_MICIN,
133 DMACH_AC97_PCMIN,
134 DMACH_AC97_PCMOUT,
135 DMACH_MIPI_HSI0,
136 DMACH_MIPI_HSI2,
137 DMACH_MIPI_HSI4,
138 DMACH_MIPI_HSI6,
139};
140
141static struct dma_pl330_platdata exynos_pdma0_pdata;
142
143static AMBA_AHB_DEVICE(exynos_pdma0, "dma-pl330.0", 0x00041330,
144 EXYNOS4_PA_PDMA0, {EXYNOS4_IRQ_PDMA0}, &exynos_pdma0_pdata);
145
146static u8 exynos4210_pdma1_peri[] = {
147 DMACH_PCM0_RX,
148 DMACH_PCM0_TX,
149 DMACH_PCM1_RX,
150 DMACH_PCM1_TX,
151 DMACH_MSM_REQ1,
152 DMACH_MSM_REQ3,
153 DMACH_SPI1_RX,
154 DMACH_SPI1_TX,
155 DMACH_I2S0S_TX,
156 DMACH_I2S0_RX,
157 DMACH_I2S0_TX,
158 DMACH_I2S1_RX,
159 DMACH_I2S1_TX,
160 DMACH_UART0_RX,
161 DMACH_UART0_TX,
162 DMACH_UART1_RX,
163 DMACH_UART1_TX,
164 DMACH_UART3_RX,
165 DMACH_UART3_TX,
166 DMACH_SLIMBUS1_RX,
167 DMACH_SLIMBUS1_TX,
168 DMACH_SLIMBUS3_RX,
169 DMACH_SLIMBUS3_TX,
170 DMACH_SLIMBUS5_RX,
171 DMACH_SLIMBUS5_TX,
172};
173
174static u8 exynos4212_pdma1_peri[] = {
175 DMACH_PCM0_RX,
176 DMACH_PCM0_TX,
177 DMACH_PCM1_RX,
178 DMACH_PCM1_TX,
179 DMACH_MIPI_HSI2,
180 DMACH_MIPI_HSI3,
181 DMACH_SPI1_RX,
182 DMACH_SPI1_TX,
183 DMACH_I2S0S_TX,
184 DMACH_I2S0_RX,
185 DMACH_I2S0_TX,
186 DMACH_I2S1_RX,
187 DMACH_I2S1_TX,
188 DMACH_UART0_RX,
189 DMACH_UART0_TX,
190 DMACH_UART1_RX,
191 DMACH_UART1_TX,
192 DMACH_UART3_RX,
193 DMACH_UART3_TX,
194 DMACH_SLIMBUS1_RX,
195 DMACH_SLIMBUS1_TX,
196 DMACH_SLIMBUS3_RX,
197 DMACH_SLIMBUS3_TX,
198 DMACH_SLIMBUS5_RX,
199 DMACH_SLIMBUS5_TX,
200 DMACH_SLIMBUS0AUX_RX,
201 DMACH_SLIMBUS0AUX_TX,
202 DMACH_SPDIF,
203 DMACH_MIPI_HSI6,
204 DMACH_MIPI_HSI7,
205};
206
207static u8 exynos5250_pdma1_peri[] = {
208 DMACH_PCM0_RX,
209 DMACH_PCM0_TX,
210 DMACH_PCM1_RX,
211 DMACH_PCM1_TX,
212 DMACH_SPI1_RX,
213 DMACH_SPI1_TX,
214 DMACH_PWM,
215 DMACH_SPDIF,
216 DMACH_I2S0S_TX,
217 DMACH_I2S0_RX,
218 DMACH_I2S0_TX,
219 DMACH_I2S1_RX,
220 DMACH_I2S1_TX,
221 DMACH_UART0_RX,
222 DMACH_UART0_TX,
223 DMACH_UART1_RX,
224 DMACH_UART1_TX,
225 DMACH_UART3_RX,
226 DMACH_UART3_TX,
227 DMACH_SLIMBUS1_RX,
228 DMACH_SLIMBUS1_TX,
229 DMACH_SLIMBUS3_RX,
230 DMACH_SLIMBUS3_TX,
231 DMACH_SLIMBUS5_RX,
232 DMACH_SLIMBUS5_TX,
233 DMACH_SLIMBUS0AUX_RX,
234 DMACH_SLIMBUS0AUX_TX,
235 DMACH_DISP1,
236 DMACH_MIPI_HSI1,
237 DMACH_MIPI_HSI3,
238 DMACH_MIPI_HSI5,
239 DMACH_MIPI_HSI7,
240};
241
242static struct dma_pl330_platdata exynos_pdma1_pdata;
243
244static AMBA_AHB_DEVICE(exynos_pdma1, "dma-pl330.1", 0x00041330,
245 EXYNOS4_PA_PDMA1, {EXYNOS4_IRQ_PDMA1}, &exynos_pdma1_pdata);
246
247static u8 mdma_peri[] = {
248 DMACH_MTOM_0,
249 DMACH_MTOM_1,
250 DMACH_MTOM_2,
251 DMACH_MTOM_3,
252 DMACH_MTOM_4,
253 DMACH_MTOM_5,
254 DMACH_MTOM_6,
255 DMACH_MTOM_7,
256};
257
258static struct dma_pl330_platdata exynos_mdma1_pdata = {
259 .nr_valid_peri = ARRAY_SIZE(mdma_peri),
260 .peri_id = mdma_peri,
261};
262
263static AMBA_AHB_DEVICE(exynos_mdma1, "dma-pl330.2", 0x00041330,
264 EXYNOS4_PA_MDMA1, {EXYNOS4_IRQ_MDMA1}, &exynos_mdma1_pdata);
265
266static int __init exynos_dma_init(void)
267{
268 if (of_have_populated_dt())
269 return 0;
270
271 if (soc_is_exynos4210()) {
272 exynos_pdma0_pdata.nr_valid_peri =
273 ARRAY_SIZE(exynos4210_pdma0_peri);
274 exynos_pdma0_pdata.peri_id = exynos4210_pdma0_peri;
275 exynos_pdma1_pdata.nr_valid_peri =
276 ARRAY_SIZE(exynos4210_pdma1_peri);
277 exynos_pdma1_pdata.peri_id = exynos4210_pdma1_peri;
278
279 if (samsung_rev() == EXYNOS4210_REV_0)
280 exynos_mdma1_device.res.start = EXYNOS4_PA_S_MDMA1;
281 } else if (soc_is_exynos4212() || soc_is_exynos4412()) {
282 exynos_pdma0_pdata.nr_valid_peri =
283 ARRAY_SIZE(exynos4212_pdma0_peri);
284 exynos_pdma0_pdata.peri_id = exynos4212_pdma0_peri;
285 exynos_pdma1_pdata.nr_valid_peri =
286 ARRAY_SIZE(exynos4212_pdma1_peri);
287 exynos_pdma1_pdata.peri_id = exynos4212_pdma1_peri;
288 } else if (soc_is_exynos5250()) {
289 exynos_pdma0_pdata.nr_valid_peri =
290 ARRAY_SIZE(exynos5250_pdma0_peri);
291 exynos_pdma0_pdata.peri_id = exynos5250_pdma0_peri;
292 exynos_pdma1_pdata.nr_valid_peri =
293 ARRAY_SIZE(exynos5250_pdma1_peri);
294 exynos_pdma1_pdata.peri_id = exynos5250_pdma1_peri;
295
296 exynos_pdma0_device.res.start = EXYNOS5_PA_PDMA0;
297 exynos_pdma0_device.res.end = EXYNOS5_PA_PDMA0 + SZ_4K;
298 exynos_pdma0_device.irq[0] = EXYNOS5_IRQ_PDMA0;
299 exynos_pdma1_device.res.start = EXYNOS5_PA_PDMA1;
300 exynos_pdma1_device.res.end = EXYNOS5_PA_PDMA1 + SZ_4K;
301 exynos_pdma0_device.irq[0] = EXYNOS5_IRQ_PDMA1;
302 exynos_mdma1_device.res.start = EXYNOS5_PA_MDMA1;
303 exynos_mdma1_device.res.end = EXYNOS5_PA_MDMA1 + SZ_4K;
304 exynos_pdma0_device.irq[0] = EXYNOS5_IRQ_MDMA1;
305 }
306
307 dma_cap_set(DMA_SLAVE, exynos_pdma0_pdata.cap_mask);
308 dma_cap_set(DMA_CYCLIC, exynos_pdma0_pdata.cap_mask);
309 dma_cap_set(DMA_PRIVATE, exynos_pdma0_pdata.cap_mask);
310 amba_device_register(&exynos_pdma0_device, &iomem_resource);
311
312 dma_cap_set(DMA_SLAVE, exynos_pdma1_pdata.cap_mask);
313 dma_cap_set(DMA_CYCLIC, exynos_pdma1_pdata.cap_mask);
314 dma_cap_set(DMA_PRIVATE, exynos_pdma1_pdata.cap_mask);
315 amba_device_register(&exynos_pdma1_device, &iomem_resource);
316
317 dma_cap_set(DMA_MEMCPY, exynos_mdma1_pdata.cap_mask);
318 amba_device_register(&exynos_mdma1_device, &iomem_resource);
319
320 return 0;
321}
322arch_initcall(exynos_dma_init);
diff --git a/arch/arm/mach-exynos/firmware.c b/arch/arm/mach-exynos/firmware.c
index ed11f100d479..932129ef26c6 100644
--- a/arch/arm/mach-exynos/firmware.c
+++ b/arch/arm/mach-exynos/firmware.c
@@ -48,20 +48,18 @@ static const struct firmware_ops exynos_firmware_ops = {
48 48
49void __init exynos_firmware_init(void) 49void __init exynos_firmware_init(void)
50{ 50{
51 if (of_have_populated_dt()) { 51 struct device_node *nd;
52 struct device_node *nd; 52 const __be32 *addr;
53 const __be32 *addr;
54 53
55 nd = of_find_compatible_node(NULL, NULL, 54 nd = of_find_compatible_node(NULL, NULL,
56 "samsung,secure-firmware"); 55 "samsung,secure-firmware");
57 if (!nd) 56 if (!nd)
58 return; 57 return;
59 58
60 addr = of_get_address(nd, 0, NULL, NULL); 59 addr = of_get_address(nd, 0, NULL, NULL);
61 if (!addr) { 60 if (!addr) {
62 pr_err("%s: No address specified.\n", __func__); 61 pr_err("%s: No address specified.\n", __func__);
63 return; 62 return;
64 }
65 } 63 }
66 64
67 pr_info("Running under secure firmware.\n"); 65 pr_info("Running under secure firmware.\n");
diff --git a/arch/arm/mach-exynos/headsmp.S b/arch/arm/mach-exynos/headsmp.S
index 5364d4bfa8bc..cdd9d91e9933 100644
--- a/arch/arm/mach-exynos/headsmp.S
+++ b/arch/arm/mach-exynos/headsmp.S
@@ -13,8 +13,6 @@
13#include <linux/linkage.h> 13#include <linux/linkage.h>
14#include <linux/init.h> 14#include <linux/init.h>
15 15
16 __CPUINIT
17
18/* 16/*
19 * exynos4 specific entry point for secondary CPUs. This provides 17 * exynos4 specific entry point for secondary CPUs. This provides
20 * a "holding pen" into which all secondary cores are held until we're 18 * a "holding pen" into which all secondary cores are held until we're
diff --git a/arch/arm/mach-exynos/include/mach/gpio.h b/arch/arm/mach-exynos/include/mach/gpio.h
deleted file mode 100644
index eb24f1eb8e3b..000000000000
--- a/arch/arm/mach-exynos/include/mach/gpio.h
+++ /dev/null
@@ -1,289 +0,0 @@
1/*
2 * Copyright (c) 2010-2012 Samsung Electronics Co., Ltd.
3 * http://www.samsung.com
4 *
5 * EXYNOS - GPIO lib support
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_GPIO_H
13#define __ASM_ARCH_GPIO_H __FILE__
14
15/* Macro for EXYNOS GPIO numbering */
16
17#define EXYNOS_GPIO_NEXT(__gpio) \
18 ((__gpio##_START) + (__gpio##_NR) + CONFIG_S3C_GPIO_SPACE + 1)
19
20/* EXYNOS4 GPIO bank sizes */
21
22#define EXYNOS4_GPIO_A0_NR (8)
23#define EXYNOS4_GPIO_A1_NR (6)
24#define EXYNOS4_GPIO_B_NR (8)
25#define EXYNOS4_GPIO_C0_NR (5)
26#define EXYNOS4_GPIO_C1_NR (5)
27#define EXYNOS4_GPIO_D0_NR (4)
28#define EXYNOS4_GPIO_D1_NR (4)
29#define EXYNOS4_GPIO_E0_NR (5)
30#define EXYNOS4_GPIO_E1_NR (8)
31#define EXYNOS4_GPIO_E2_NR (6)
32#define EXYNOS4_GPIO_E3_NR (8)
33#define EXYNOS4_GPIO_E4_NR (8)
34#define EXYNOS4_GPIO_F0_NR (8)
35#define EXYNOS4_GPIO_F1_NR (8)
36#define EXYNOS4_GPIO_F2_NR (8)
37#define EXYNOS4_GPIO_F3_NR (6)
38#define EXYNOS4_GPIO_J0_NR (8)
39#define EXYNOS4_GPIO_J1_NR (5)
40#define EXYNOS4_GPIO_K0_NR (7)
41#define EXYNOS4_GPIO_K1_NR (7)
42#define EXYNOS4_GPIO_K2_NR (7)
43#define EXYNOS4_GPIO_K3_NR (7)
44#define EXYNOS4_GPIO_L0_NR (8)
45#define EXYNOS4_GPIO_L1_NR (3)
46#define EXYNOS4_GPIO_L2_NR (8)
47#define EXYNOS4_GPIO_X0_NR (8)
48#define EXYNOS4_GPIO_X1_NR (8)
49#define EXYNOS4_GPIO_X2_NR (8)
50#define EXYNOS4_GPIO_X3_NR (8)
51#define EXYNOS4_GPIO_Y0_NR (6)
52#define EXYNOS4_GPIO_Y1_NR (4)
53#define EXYNOS4_GPIO_Y2_NR (6)
54#define EXYNOS4_GPIO_Y3_NR (8)
55#define EXYNOS4_GPIO_Y4_NR (8)
56#define EXYNOS4_GPIO_Y5_NR (8)
57#define EXYNOS4_GPIO_Y6_NR (8)
58#define EXYNOS4_GPIO_Z_NR (7)
59
60/* EXYNOS4 GPIO bank numbers */
61
62enum exynos4_gpio_number {
63 EXYNOS4_GPIO_A0_START = 0,
64 EXYNOS4_GPIO_A1_START = EXYNOS_GPIO_NEXT(EXYNOS4_GPIO_A0),
65 EXYNOS4_GPIO_B_START = EXYNOS_GPIO_NEXT(EXYNOS4_GPIO_A1),
66 EXYNOS4_GPIO_C0_START = EXYNOS_GPIO_NEXT(EXYNOS4_GPIO_B),
67 EXYNOS4_GPIO_C1_START = EXYNOS_GPIO_NEXT(EXYNOS4_GPIO_C0),
68 EXYNOS4_GPIO_D0_START = EXYNOS_GPIO_NEXT(EXYNOS4_GPIO_C1),
69 EXYNOS4_GPIO_D1_START = EXYNOS_GPIO_NEXT(EXYNOS4_GPIO_D0),
70 EXYNOS4_GPIO_E0_START = EXYNOS_GPIO_NEXT(EXYNOS4_GPIO_D1),
71 EXYNOS4_GPIO_E1_START = EXYNOS_GPIO_NEXT(EXYNOS4_GPIO_E0),
72 EXYNOS4_GPIO_E2_START = EXYNOS_GPIO_NEXT(EXYNOS4_GPIO_E1),
73 EXYNOS4_GPIO_E3_START = EXYNOS_GPIO_NEXT(EXYNOS4_GPIO_E2),
74 EXYNOS4_GPIO_E4_START = EXYNOS_GPIO_NEXT(EXYNOS4_GPIO_E3),
75 EXYNOS4_GPIO_F0_START = EXYNOS_GPIO_NEXT(EXYNOS4_GPIO_E4),
76 EXYNOS4_GPIO_F1_START = EXYNOS_GPIO_NEXT(EXYNOS4_GPIO_F0),
77 EXYNOS4_GPIO_F2_START = EXYNOS_GPIO_NEXT(EXYNOS4_GPIO_F1),
78 EXYNOS4_GPIO_F3_START = EXYNOS_GPIO_NEXT(EXYNOS4_GPIO_F2),
79 EXYNOS4_GPIO_J0_START = EXYNOS_GPIO_NEXT(EXYNOS4_GPIO_F3),
80 EXYNOS4_GPIO_J1_START = EXYNOS_GPIO_NEXT(EXYNOS4_GPIO_J0),
81 EXYNOS4_GPIO_K0_START = EXYNOS_GPIO_NEXT(EXYNOS4_GPIO_J1),
82 EXYNOS4_GPIO_K1_START = EXYNOS_GPIO_NEXT(EXYNOS4_GPIO_K0),
83 EXYNOS4_GPIO_K2_START = EXYNOS_GPIO_NEXT(EXYNOS4_GPIO_K1),
84 EXYNOS4_GPIO_K3_START = EXYNOS_GPIO_NEXT(EXYNOS4_GPIO_K2),
85 EXYNOS4_GPIO_L0_START = EXYNOS_GPIO_NEXT(EXYNOS4_GPIO_K3),
86 EXYNOS4_GPIO_L1_START = EXYNOS_GPIO_NEXT(EXYNOS4_GPIO_L0),
87 EXYNOS4_GPIO_L2_START = EXYNOS_GPIO_NEXT(EXYNOS4_GPIO_L1),
88 EXYNOS4_GPIO_X0_START = EXYNOS_GPIO_NEXT(EXYNOS4_GPIO_L2),
89 EXYNOS4_GPIO_X1_START = EXYNOS_GPIO_NEXT(EXYNOS4_GPIO_X0),
90 EXYNOS4_GPIO_X2_START = EXYNOS_GPIO_NEXT(EXYNOS4_GPIO_X1),
91 EXYNOS4_GPIO_X3_START = EXYNOS_GPIO_NEXT(EXYNOS4_GPIO_X2),
92 EXYNOS4_GPIO_Y0_START = EXYNOS_GPIO_NEXT(EXYNOS4_GPIO_X3),
93 EXYNOS4_GPIO_Y1_START = EXYNOS_GPIO_NEXT(EXYNOS4_GPIO_Y0),
94 EXYNOS4_GPIO_Y2_START = EXYNOS_GPIO_NEXT(EXYNOS4_GPIO_Y1),
95 EXYNOS4_GPIO_Y3_START = EXYNOS_GPIO_NEXT(EXYNOS4_GPIO_Y2),
96 EXYNOS4_GPIO_Y4_START = EXYNOS_GPIO_NEXT(EXYNOS4_GPIO_Y3),
97 EXYNOS4_GPIO_Y5_START = EXYNOS_GPIO_NEXT(EXYNOS4_GPIO_Y4),
98 EXYNOS4_GPIO_Y6_START = EXYNOS_GPIO_NEXT(EXYNOS4_GPIO_Y5),
99 EXYNOS4_GPIO_Z_START = EXYNOS_GPIO_NEXT(EXYNOS4_GPIO_Y6),
100};
101
102/* EXYNOS4 GPIO number definitions */
103
104#define EXYNOS4_GPA0(_nr) (EXYNOS4_GPIO_A0_START + (_nr))
105#define EXYNOS4_GPA1(_nr) (EXYNOS4_GPIO_A1_START + (_nr))
106#define EXYNOS4_GPB(_nr) (EXYNOS4_GPIO_B_START + (_nr))
107#define EXYNOS4_GPC0(_nr) (EXYNOS4_GPIO_C0_START + (_nr))
108#define EXYNOS4_GPC1(_nr) (EXYNOS4_GPIO_C1_START + (_nr))
109#define EXYNOS4_GPD0(_nr) (EXYNOS4_GPIO_D0_START + (_nr))
110#define EXYNOS4_GPD1(_nr) (EXYNOS4_GPIO_D1_START + (_nr))
111#define EXYNOS4_GPE0(_nr) (EXYNOS4_GPIO_E0_START + (_nr))
112#define EXYNOS4_GPE1(_nr) (EXYNOS4_GPIO_E1_START + (_nr))
113#define EXYNOS4_GPE2(_nr) (EXYNOS4_GPIO_E2_START + (_nr))
114#define EXYNOS4_GPE3(_nr) (EXYNOS4_GPIO_E3_START + (_nr))
115#define EXYNOS4_GPE4(_nr) (EXYNOS4_GPIO_E4_START + (_nr))
116#define EXYNOS4_GPF0(_nr) (EXYNOS4_GPIO_F0_START + (_nr))
117#define EXYNOS4_GPF1(_nr) (EXYNOS4_GPIO_F1_START + (_nr))
118#define EXYNOS4_GPF2(_nr) (EXYNOS4_GPIO_F2_START + (_nr))
119#define EXYNOS4_GPF3(_nr) (EXYNOS4_GPIO_F3_START + (_nr))
120#define EXYNOS4_GPJ0(_nr) (EXYNOS4_GPIO_J0_START + (_nr))
121#define EXYNOS4_GPJ1(_nr) (EXYNOS4_GPIO_J1_START + (_nr))
122#define EXYNOS4_GPK0(_nr) (EXYNOS4_GPIO_K0_START + (_nr))
123#define EXYNOS4_GPK1(_nr) (EXYNOS4_GPIO_K1_START + (_nr))
124#define EXYNOS4_GPK2(_nr) (EXYNOS4_GPIO_K2_START + (_nr))
125#define EXYNOS4_GPK3(_nr) (EXYNOS4_GPIO_K3_START + (_nr))
126#define EXYNOS4_GPL0(_nr) (EXYNOS4_GPIO_L0_START + (_nr))
127#define EXYNOS4_GPL1(_nr) (EXYNOS4_GPIO_L1_START + (_nr))
128#define EXYNOS4_GPL2(_nr) (EXYNOS4_GPIO_L2_START + (_nr))
129#define EXYNOS4_GPX0(_nr) (EXYNOS4_GPIO_X0_START + (_nr))
130#define EXYNOS4_GPX1(_nr) (EXYNOS4_GPIO_X1_START + (_nr))
131#define EXYNOS4_GPX2(_nr) (EXYNOS4_GPIO_X2_START + (_nr))
132#define EXYNOS4_GPX3(_nr) (EXYNOS4_GPIO_X3_START + (_nr))
133#define EXYNOS4_GPY0(_nr) (EXYNOS4_GPIO_Y0_START + (_nr))
134#define EXYNOS4_GPY1(_nr) (EXYNOS4_GPIO_Y1_START + (_nr))
135#define EXYNOS4_GPY2(_nr) (EXYNOS4_GPIO_Y2_START + (_nr))
136#define EXYNOS4_GPY3(_nr) (EXYNOS4_GPIO_Y3_START + (_nr))
137#define EXYNOS4_GPY4(_nr) (EXYNOS4_GPIO_Y4_START + (_nr))
138#define EXYNOS4_GPY5(_nr) (EXYNOS4_GPIO_Y5_START + (_nr))
139#define EXYNOS4_GPY6(_nr) (EXYNOS4_GPIO_Y6_START + (_nr))
140#define EXYNOS4_GPZ(_nr) (EXYNOS4_GPIO_Z_START + (_nr))
141
142/* the end of the EXYNOS4 specific gpios */
143
144#define EXYNOS4_GPIO_END (EXYNOS4_GPZ(EXYNOS4_GPIO_Z_NR) + 1)
145
146/* EXYNOS5 GPIO bank sizes */
147
148#define EXYNOS5_GPIO_A0_NR (8)
149#define EXYNOS5_GPIO_A1_NR (6)
150#define EXYNOS5_GPIO_A2_NR (8)
151#define EXYNOS5_GPIO_B0_NR (5)
152#define EXYNOS5_GPIO_B1_NR (5)
153#define EXYNOS5_GPIO_B2_NR (4)
154#define EXYNOS5_GPIO_B3_NR (4)
155#define EXYNOS5_GPIO_C0_NR (7)
156#define EXYNOS5_GPIO_C1_NR (4)
157#define EXYNOS5_GPIO_C2_NR (7)
158#define EXYNOS5_GPIO_C3_NR (7)
159#define EXYNOS5_GPIO_C4_NR (7)
160#define EXYNOS5_GPIO_D0_NR (4)
161#define EXYNOS5_GPIO_D1_NR (8)
162#define EXYNOS5_GPIO_Y0_NR (6)
163#define EXYNOS5_GPIO_Y1_NR (4)
164#define EXYNOS5_GPIO_Y2_NR (6)
165#define EXYNOS5_GPIO_Y3_NR (8)
166#define EXYNOS5_GPIO_Y4_NR (8)
167#define EXYNOS5_GPIO_Y5_NR (8)
168#define EXYNOS5_GPIO_Y6_NR (8)
169#define EXYNOS5_GPIO_X0_NR (8)
170#define EXYNOS5_GPIO_X1_NR (8)
171#define EXYNOS5_GPIO_X2_NR (8)
172#define EXYNOS5_GPIO_X3_NR (8)
173#define EXYNOS5_GPIO_E0_NR (8)
174#define EXYNOS5_GPIO_E1_NR (2)
175#define EXYNOS5_GPIO_F0_NR (4)
176#define EXYNOS5_GPIO_F1_NR (4)
177#define EXYNOS5_GPIO_G0_NR (8)
178#define EXYNOS5_GPIO_G1_NR (8)
179#define EXYNOS5_GPIO_G2_NR (2)
180#define EXYNOS5_GPIO_H0_NR (4)
181#define EXYNOS5_GPIO_H1_NR (8)
182#define EXYNOS5_GPIO_V0_NR (8)
183#define EXYNOS5_GPIO_V1_NR (8)
184#define EXYNOS5_GPIO_V2_NR (8)
185#define EXYNOS5_GPIO_V3_NR (8)
186#define EXYNOS5_GPIO_V4_NR (2)
187#define EXYNOS5_GPIO_Z_NR (7)
188
189/* EXYNOS5 GPIO bank numbers */
190
191enum exynos5_gpio_number {
192 EXYNOS5_GPIO_A0_START = 0,
193 EXYNOS5_GPIO_A1_START = EXYNOS_GPIO_NEXT(EXYNOS5_GPIO_A0),
194 EXYNOS5_GPIO_A2_START = EXYNOS_GPIO_NEXT(EXYNOS5_GPIO_A1),
195 EXYNOS5_GPIO_B0_START = EXYNOS_GPIO_NEXT(EXYNOS5_GPIO_A2),
196 EXYNOS5_GPIO_B1_START = EXYNOS_GPIO_NEXT(EXYNOS5_GPIO_B0),
197 EXYNOS5_GPIO_B2_START = EXYNOS_GPIO_NEXT(EXYNOS5_GPIO_B1),
198 EXYNOS5_GPIO_B3_START = EXYNOS_GPIO_NEXT(EXYNOS5_GPIO_B2),
199 EXYNOS5_GPIO_C0_START = EXYNOS_GPIO_NEXT(EXYNOS5_GPIO_B3),
200 EXYNOS5_GPIO_C1_START = EXYNOS_GPIO_NEXT(EXYNOS5_GPIO_C0),
201 EXYNOS5_GPIO_C2_START = EXYNOS_GPIO_NEXT(EXYNOS5_GPIO_C1),
202 EXYNOS5_GPIO_C3_START = EXYNOS_GPIO_NEXT(EXYNOS5_GPIO_C2),
203 EXYNOS5_GPIO_C4_START = EXYNOS_GPIO_NEXT(EXYNOS5_GPIO_C3),
204 EXYNOS5_GPIO_D0_START = EXYNOS_GPIO_NEXT(EXYNOS5_GPIO_C4),
205 EXYNOS5_GPIO_D1_START = EXYNOS_GPIO_NEXT(EXYNOS5_GPIO_D0),
206 EXYNOS5_GPIO_Y0_START = EXYNOS_GPIO_NEXT(EXYNOS5_GPIO_D1),
207 EXYNOS5_GPIO_Y1_START = EXYNOS_GPIO_NEXT(EXYNOS5_GPIO_Y0),
208 EXYNOS5_GPIO_Y2_START = EXYNOS_GPIO_NEXT(EXYNOS5_GPIO_Y1),
209 EXYNOS5_GPIO_Y3_START = EXYNOS_GPIO_NEXT(EXYNOS5_GPIO_Y2),
210 EXYNOS5_GPIO_Y4_START = EXYNOS_GPIO_NEXT(EXYNOS5_GPIO_Y3),
211 EXYNOS5_GPIO_Y5_START = EXYNOS_GPIO_NEXT(EXYNOS5_GPIO_Y4),
212 EXYNOS5_GPIO_Y6_START = EXYNOS_GPIO_NEXT(EXYNOS5_GPIO_Y5),
213 EXYNOS5_GPIO_X0_START = EXYNOS_GPIO_NEXT(EXYNOS5_GPIO_Y6),
214 EXYNOS5_GPIO_X1_START = EXYNOS_GPIO_NEXT(EXYNOS5_GPIO_X0),
215 EXYNOS5_GPIO_X2_START = EXYNOS_GPIO_NEXT(EXYNOS5_GPIO_X1),
216 EXYNOS5_GPIO_X3_START = EXYNOS_GPIO_NEXT(EXYNOS5_GPIO_X2),
217 EXYNOS5_GPIO_E0_START = EXYNOS_GPIO_NEXT(EXYNOS5_GPIO_X3),
218 EXYNOS5_GPIO_E1_START = EXYNOS_GPIO_NEXT(EXYNOS5_GPIO_E0),
219 EXYNOS5_GPIO_F0_START = EXYNOS_GPIO_NEXT(EXYNOS5_GPIO_E1),
220 EXYNOS5_GPIO_F1_START = EXYNOS_GPIO_NEXT(EXYNOS5_GPIO_F0),
221 EXYNOS5_GPIO_G0_START = EXYNOS_GPIO_NEXT(EXYNOS5_GPIO_F1),
222 EXYNOS5_GPIO_G1_START = EXYNOS_GPIO_NEXT(EXYNOS5_GPIO_G0),
223 EXYNOS5_GPIO_G2_START = EXYNOS_GPIO_NEXT(EXYNOS5_GPIO_G1),
224 EXYNOS5_GPIO_H0_START = EXYNOS_GPIO_NEXT(EXYNOS5_GPIO_G2),
225 EXYNOS5_GPIO_H1_START = EXYNOS_GPIO_NEXT(EXYNOS5_GPIO_H0),
226 EXYNOS5_GPIO_V0_START = EXYNOS_GPIO_NEXT(EXYNOS5_GPIO_H1),
227 EXYNOS5_GPIO_V1_START = EXYNOS_GPIO_NEXT(EXYNOS5_GPIO_V0),
228 EXYNOS5_GPIO_V2_START = EXYNOS_GPIO_NEXT(EXYNOS5_GPIO_V1),
229 EXYNOS5_GPIO_V3_START = EXYNOS_GPIO_NEXT(EXYNOS5_GPIO_V2),
230 EXYNOS5_GPIO_V4_START = EXYNOS_GPIO_NEXT(EXYNOS5_GPIO_V3),
231 EXYNOS5_GPIO_Z_START = EXYNOS_GPIO_NEXT(EXYNOS5_GPIO_V4),
232};
233
234/* EXYNOS5 GPIO number definitions */
235
236#define EXYNOS5_GPA0(_nr) (EXYNOS5_GPIO_A0_START + (_nr))
237#define EXYNOS5_GPA1(_nr) (EXYNOS5_GPIO_A1_START + (_nr))
238#define EXYNOS5_GPA2(_nr) (EXYNOS5_GPIO_A2_START + (_nr))
239#define EXYNOS5_GPB0(_nr) (EXYNOS5_GPIO_B0_START + (_nr))
240#define EXYNOS5_GPB1(_nr) (EXYNOS5_GPIO_B1_START + (_nr))
241#define EXYNOS5_GPB2(_nr) (EXYNOS5_GPIO_B2_START + (_nr))
242#define EXYNOS5_GPB3(_nr) (EXYNOS5_GPIO_B3_START + (_nr))
243#define EXYNOS5_GPC0(_nr) (EXYNOS5_GPIO_C0_START + (_nr))
244#define EXYNOS5_GPC1(_nr) (EXYNOS5_GPIO_C1_START + (_nr))
245#define EXYNOS5_GPC2(_nr) (EXYNOS5_GPIO_C2_START + (_nr))
246#define EXYNOS5_GPC3(_nr) (EXYNOS5_GPIO_C3_START + (_nr))
247#define EXYNOS5_GPC4(_nr) (EXYNOS5_GPIO_C4_START + (_nr))
248#define EXYNOS5_GPD0(_nr) (EXYNOS5_GPIO_D0_START + (_nr))
249#define EXYNOS5_GPD1(_nr) (EXYNOS5_GPIO_D1_START + (_nr))
250#define EXYNOS5_GPY0(_nr) (EXYNOS5_GPIO_Y0_START + (_nr))
251#define EXYNOS5_GPY1(_nr) (EXYNOS5_GPIO_Y1_START + (_nr))
252#define EXYNOS5_GPY2(_nr) (EXYNOS5_GPIO_Y2_START + (_nr))
253#define EXYNOS5_GPY3(_nr) (EXYNOS5_GPIO_Y3_START + (_nr))
254#define EXYNOS5_GPY4(_nr) (EXYNOS5_GPIO_Y4_START + (_nr))
255#define EXYNOS5_GPY5(_nr) (EXYNOS5_GPIO_Y5_START + (_nr))
256#define EXYNOS5_GPY6(_nr) (EXYNOS5_GPIO_Y6_START + (_nr))
257#define EXYNOS5_GPX0(_nr) (EXYNOS5_GPIO_X0_START + (_nr))
258#define EXYNOS5_GPX1(_nr) (EXYNOS5_GPIO_X1_START + (_nr))
259#define EXYNOS5_GPX2(_nr) (EXYNOS5_GPIO_X2_START + (_nr))
260#define EXYNOS5_GPX3(_nr) (EXYNOS5_GPIO_X3_START + (_nr))
261#define EXYNOS5_GPE0(_nr) (EXYNOS5_GPIO_E0_START + (_nr))
262#define EXYNOS5_GPE1(_nr) (EXYNOS5_GPIO_E1_START + (_nr))
263#define EXYNOS5_GPF0(_nr) (EXYNOS5_GPIO_F0_START + (_nr))
264#define EXYNOS5_GPF1(_nr) (EXYNOS5_GPIO_F1_START + (_nr))
265#define EXYNOS5_GPG0(_nr) (EXYNOS5_GPIO_G0_START + (_nr))
266#define EXYNOS5_GPG1(_nr) (EXYNOS5_GPIO_G1_START + (_nr))
267#define EXYNOS5_GPG2(_nr) (EXYNOS5_GPIO_G2_START + (_nr))
268#define EXYNOS5_GPH0(_nr) (EXYNOS5_GPIO_H0_START + (_nr))
269#define EXYNOS5_GPH1(_nr) (EXYNOS5_GPIO_H1_START + (_nr))
270#define EXYNOS5_GPV0(_nr) (EXYNOS5_GPIO_V0_START + (_nr))
271#define EXYNOS5_GPV1(_nr) (EXYNOS5_GPIO_V1_START + (_nr))
272#define EXYNOS5_GPV2(_nr) (EXYNOS5_GPIO_V2_START + (_nr))
273#define EXYNOS5_GPV3(_nr) (EXYNOS5_GPIO_V3_START + (_nr))
274#define EXYNOS5_GPV4(_nr) (EXYNOS5_GPIO_V4_START + (_nr))
275#define EXYNOS5_GPZ(_nr) (EXYNOS5_GPIO_Z_START + (_nr))
276
277/* the end of the EXYNOS5 specific gpios */
278
279#define EXYNOS5_GPIO_END (EXYNOS5_GPZ(EXYNOS5_GPIO_Z_NR) + 1)
280
281/* actually, EXYNOS5_GPIO_END is bigger than EXYNOS4 */
282
283#define S3C_GPIO_END (EXYNOS5_GPIO_END)
284
285/* define the number of gpios */
286
287#define ARCH_NR_GPIOS (CONFIG_SAMSUNG_GPIO_EXTRA + S3C_GPIO_END)
288
289#endif /* __ASM_ARCH_GPIO_H */
diff --git a/arch/arm/mach-exynos/include/mach/irqs.h b/arch/arm/mach-exynos/include/mach/irqs.h
deleted file mode 100644
index c72f59d91fce..000000000000
--- a/arch/arm/mach-exynos/include/mach/irqs.h
+++ /dev/null
@@ -1,476 +0,0 @@
1/*
2 * Copyright (c) 2010-2012 Samsung Electronics Co., Ltd.
3 * http://www.samsung.com
4 *
5 * EXYNOS - IRQ 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_IRQS_H
13#define __ASM_ARCH_IRQS_H __FILE__
14
15#include <plat/irqs.h>
16
17/* PPI: Private Peripheral Interrupt */
18
19#define IRQ_PPI(x) (x + 16)
20
21/* SPI: Shared Peripheral Interrupt */
22
23#define IRQ_SPI(x) (x + 32)
24
25/* COMBINER */
26
27#define MAX_IRQ_IN_COMBINER 8
28#define COMBINER_GROUP(x) ((x) * MAX_IRQ_IN_COMBINER + IRQ_SPI(128))
29#define COMBINER_IRQ(x, y) (COMBINER_GROUP(x) + y)
30
31/* For EXYNOS4 and EXYNOS5 */
32
33#define EXYNOS_IRQ_EINT16_31 IRQ_SPI(32)
34
35/* For EXYNOS4 SoCs */
36
37#define EXYNOS4_IRQ_EINT0 IRQ_SPI(16)
38#define EXYNOS4_IRQ_EINT1 IRQ_SPI(17)
39#define EXYNOS4_IRQ_EINT2 IRQ_SPI(18)
40#define EXYNOS4_IRQ_EINT3 IRQ_SPI(19)
41#define EXYNOS4_IRQ_EINT4 IRQ_SPI(20)
42#define EXYNOS4_IRQ_EINT5 IRQ_SPI(21)
43#define EXYNOS4_IRQ_EINT6 IRQ_SPI(22)
44#define EXYNOS4_IRQ_EINT7 IRQ_SPI(23)
45#define EXYNOS4_IRQ_EINT8 IRQ_SPI(24)
46#define EXYNOS4_IRQ_EINT9 IRQ_SPI(25)
47#define EXYNOS4_IRQ_EINT10 IRQ_SPI(26)
48#define EXYNOS4_IRQ_EINT11 IRQ_SPI(27)
49#define EXYNOS4_IRQ_EINT12 IRQ_SPI(28)
50#define EXYNOS4_IRQ_EINT13 IRQ_SPI(29)
51#define EXYNOS4_IRQ_EINT14 IRQ_SPI(30)
52#define EXYNOS4_IRQ_EINT15 IRQ_SPI(31)
53
54#define EXYNOS4_IRQ_MDMA0 IRQ_SPI(33)
55#define EXYNOS4_IRQ_MDMA1 IRQ_SPI(34)
56#define EXYNOS4_IRQ_PDMA0 IRQ_SPI(35)
57#define EXYNOS4_IRQ_PDMA1 IRQ_SPI(36)
58#define EXYNOS4_IRQ_TIMER0_VIC IRQ_SPI(37)
59#define EXYNOS4_IRQ_TIMER1_VIC IRQ_SPI(38)
60#define EXYNOS4_IRQ_TIMER2_VIC IRQ_SPI(39)
61#define EXYNOS4_IRQ_TIMER3_VIC IRQ_SPI(40)
62#define EXYNOS4_IRQ_TIMER4_VIC IRQ_SPI(41)
63#define EXYNOS4_IRQ_MCT_L0 IRQ_SPI(42)
64#define EXYNOS4_IRQ_WDT IRQ_SPI(43)
65#define EXYNOS4_IRQ_RTC_ALARM IRQ_SPI(44)
66#define EXYNOS4_IRQ_RTC_TIC IRQ_SPI(45)
67#define EXYNOS4_IRQ_GPIO_XB IRQ_SPI(46)
68#define EXYNOS4_IRQ_GPIO_XA IRQ_SPI(47)
69#define EXYNOS4_IRQ_MCT_L1 IRQ_SPI(48)
70
71#define EXYNOS4_IRQ_UART0 IRQ_SPI(52)
72#define EXYNOS4_IRQ_UART1 IRQ_SPI(53)
73#define EXYNOS4_IRQ_UART2 IRQ_SPI(54)
74#define EXYNOS4_IRQ_UART3 IRQ_SPI(55)
75#define EXYNOS4_IRQ_UART4 IRQ_SPI(56)
76#define EXYNOS4_IRQ_MCT_G0 IRQ_SPI(57)
77#define EXYNOS4_IRQ_IIC IRQ_SPI(58)
78#define EXYNOS4_IRQ_IIC1 IRQ_SPI(59)
79#define EXYNOS4_IRQ_IIC2 IRQ_SPI(60)
80#define EXYNOS4_IRQ_IIC3 IRQ_SPI(61)
81#define EXYNOS4_IRQ_IIC4 IRQ_SPI(62)
82#define EXYNOS4_IRQ_IIC5 IRQ_SPI(63)
83#define EXYNOS4_IRQ_IIC6 IRQ_SPI(64)
84#define EXYNOS4_IRQ_IIC7 IRQ_SPI(65)
85#define EXYNOS4_IRQ_SPI0 IRQ_SPI(66)
86#define EXYNOS4_IRQ_SPI1 IRQ_SPI(67)
87#define EXYNOS4_IRQ_SPI2 IRQ_SPI(68)
88
89#define EXYNOS4_IRQ_USB_HOST IRQ_SPI(70)
90#define EXYNOS4_IRQ_USB_HSOTG IRQ_SPI(71)
91#define EXYNOS4_IRQ_MODEM_IF IRQ_SPI(72)
92#define EXYNOS4_IRQ_HSMMC0 IRQ_SPI(73)
93#define EXYNOS4_IRQ_HSMMC1 IRQ_SPI(74)
94#define EXYNOS4_IRQ_HSMMC2 IRQ_SPI(75)
95#define EXYNOS4_IRQ_HSMMC3 IRQ_SPI(76)
96#define EXYNOS4_IRQ_DWMCI IRQ_SPI(77)
97
98#define EXYNOS4_IRQ_MIPI_CSIS0 IRQ_SPI(78)
99#define EXYNOS4_IRQ_MIPI_CSIS1 IRQ_SPI(80)
100
101#define EXYNOS4_IRQ_ONENAND_AUDI IRQ_SPI(82)
102#define EXYNOS4_IRQ_ROTATOR IRQ_SPI(83)
103#define EXYNOS4_IRQ_FIMC0 IRQ_SPI(84)
104#define EXYNOS4_IRQ_FIMC1 IRQ_SPI(85)
105#define EXYNOS4_IRQ_FIMC2 IRQ_SPI(86)
106#define EXYNOS4_IRQ_FIMC3 IRQ_SPI(87)
107#define EXYNOS4_IRQ_JPEG IRQ_SPI(88)
108#define EXYNOS4_IRQ_2D IRQ_SPI(89)
109#define EXYNOS4_IRQ_PCIE IRQ_SPI(90)
110
111#define EXYNOS4_IRQ_MIXER IRQ_SPI(91)
112#define EXYNOS4_IRQ_HDMI IRQ_SPI(92)
113#define EXYNOS4_IRQ_IIC_HDMIPHY IRQ_SPI(93)
114#define EXYNOS4_IRQ_MFC IRQ_SPI(94)
115#define EXYNOS4_IRQ_SDO IRQ_SPI(95)
116
117#define EXYNOS4_IRQ_AUDIO_SS IRQ_SPI(96)
118#define EXYNOS4_IRQ_I2S0 IRQ_SPI(97)
119#define EXYNOS4_IRQ_I2S1 IRQ_SPI(98)
120#define EXYNOS4_IRQ_I2S2 IRQ_SPI(99)
121#define EXYNOS4_IRQ_AC97 IRQ_SPI(100)
122
123#define EXYNOS4_IRQ_SPDIF IRQ_SPI(104)
124#define EXYNOS4_IRQ_ADC0 IRQ_SPI(105)
125#define EXYNOS4_IRQ_PEN0 IRQ_SPI(106)
126#define EXYNOS4_IRQ_ADC1 IRQ_SPI(107)
127#define EXYNOS4_IRQ_PEN1 IRQ_SPI(108)
128#define EXYNOS4_IRQ_KEYPAD IRQ_SPI(109)
129#define EXYNOS4_IRQ_POWER_PMU IRQ_SPI(110)
130#define EXYNOS4_IRQ_GPS IRQ_SPI(111)
131#define EXYNOS4_IRQ_INTFEEDCTRL_SSS IRQ_SPI(112)
132#define EXYNOS4_IRQ_SLIMBUS IRQ_SPI(113)
133
134#define EXYNOS4_IRQ_TSI IRQ_SPI(115)
135#define EXYNOS4_IRQ_SATA IRQ_SPI(116)
136
137#define EXYNOS4_IRQ_PMU COMBINER_IRQ(2, 2)
138#define EXYNOS4_IRQ_PMU_CPU1 COMBINER_IRQ(3, 2)
139#define EXYNOS4_IRQ_PMU_CPU2 COMBINER_IRQ(18, 2)
140#define EXYNOS4_IRQ_PMU_CPU3 COMBINER_IRQ(19, 2)
141
142#define EXYNOS4_IRQ_TMU_TRIG0 COMBINER_IRQ(2, 4)
143#define EXYNOS4_IRQ_TMU_TRIG1 COMBINER_IRQ(3, 4)
144
145#define EXYNOS4_IRQ_SYSMMU_MDMA0_0 COMBINER_IRQ(4, 0)
146#define EXYNOS4_IRQ_SYSMMU_SSS_0 COMBINER_IRQ(4, 1)
147#define EXYNOS4_IRQ_SYSMMU_FIMC0_0 COMBINER_IRQ(4, 2)
148#define EXYNOS4_IRQ_SYSMMU_FIMC1_0 COMBINER_IRQ(4, 3)
149#define EXYNOS4_IRQ_SYSMMU_FIMC2_0 COMBINER_IRQ(4, 4)
150#define EXYNOS4_IRQ_SYSMMU_FIMC3_0 COMBINER_IRQ(4, 5)
151#define EXYNOS4_IRQ_SYSMMU_JPEG_0 COMBINER_IRQ(4, 6)
152#define EXYNOS4_IRQ_SYSMMU_2D_0 COMBINER_IRQ(4, 7)
153
154#define EXYNOS4_IRQ_SYSMMU_ROTATOR_0 COMBINER_IRQ(5, 0)
155#define EXYNOS4_IRQ_SYSMMU_MDMA1_0 COMBINER_IRQ(5, 1)
156#define EXYNOS4_IRQ_SYSMMU_LCD0_M0_0 COMBINER_IRQ(5, 2)
157#define EXYNOS4_IRQ_SYSMMU_LCD1_M1_0 COMBINER_IRQ(5, 3)
158#define EXYNOS4_IRQ_SYSMMU_TV_M0_0 COMBINER_IRQ(5, 4)
159#define EXYNOS4_IRQ_SYSMMU_MFC_M0_0 COMBINER_IRQ(5, 5)
160#define EXYNOS4_IRQ_SYSMMU_MFC_M1_0 COMBINER_IRQ(5, 6)
161#define EXYNOS4_IRQ_SYSMMU_PCIE_0 COMBINER_IRQ(5, 7)
162
163#define EXYNOS4_IRQ_SYSMMU_FIMC_LITE0_0 COMBINER_IRQ(16, 0)
164#define EXYNOS4_IRQ_SYSMMU_FIMC_LITE1_0 COMBINER_IRQ(16, 1)
165#define EXYNOS4_IRQ_SYSMMU_FIMC_ISP_0 COMBINER_IRQ(16, 2)
166#define EXYNOS4_IRQ_SYSMMU_FIMC_DRC_0 COMBINER_IRQ(16, 3)
167#define EXYNOS4_IRQ_SYSMMU_FIMC_FD_0 COMBINER_IRQ(16, 4)
168#define EXYNOS4_IRQ_SYSMMU_FIMC_CX_0 COMBINER_IRQ(16, 5)
169
170#define EXYNOS4_IRQ_FIMD0_FIFO COMBINER_IRQ(11, 0)
171#define EXYNOS4_IRQ_FIMD0_VSYNC COMBINER_IRQ(11, 1)
172#define EXYNOS4_IRQ_FIMD0_SYSTEM COMBINER_IRQ(11, 2)
173
174#define EXYNOS4210_MAX_COMBINER_NR 16
175#define EXYNOS4212_MAX_COMBINER_NR 18
176#define EXYNOS4412_MAX_COMBINER_NR 20
177#define EXYNOS4_MAX_COMBINER_NR EXYNOS4412_MAX_COMBINER_NR
178
179#define EXYNOS4_IRQ_GPIO1_NR_GROUPS 16
180#define EXYNOS4_IRQ_GPIO2_NR_GROUPS 9
181
182/*
183 * For Compatibility:
184 * the default is for EXYNOS4, and
185 * for exynos5, should be re-mapped at function
186 */
187
188#define IRQ_TIMER0_VIC EXYNOS4_IRQ_TIMER0_VIC
189#define IRQ_TIMER1_VIC EXYNOS4_IRQ_TIMER1_VIC
190#define IRQ_TIMER2_VIC EXYNOS4_IRQ_TIMER2_VIC
191#define IRQ_TIMER3_VIC EXYNOS4_IRQ_TIMER3_VIC
192#define IRQ_TIMER4_VIC EXYNOS4_IRQ_TIMER4_VIC
193
194#define IRQ_WDT EXYNOS4_IRQ_WDT
195#define IRQ_RTC_ALARM EXYNOS4_IRQ_RTC_ALARM
196#define IRQ_RTC_TIC EXYNOS4_IRQ_RTC_TIC
197#define IRQ_GPIO_XB EXYNOS4_IRQ_GPIO_XB
198#define IRQ_GPIO_XA EXYNOS4_IRQ_GPIO_XA
199
200#define IRQ_IIC EXYNOS4_IRQ_IIC
201#define IRQ_IIC1 EXYNOS4_IRQ_IIC1
202#define IRQ_IIC3 EXYNOS4_IRQ_IIC3
203#define IRQ_IIC5 EXYNOS4_IRQ_IIC5
204#define IRQ_IIC6 EXYNOS4_IRQ_IIC6
205#define IRQ_IIC7 EXYNOS4_IRQ_IIC7
206
207#define IRQ_SPI0 EXYNOS4_IRQ_SPI0
208#define IRQ_SPI1 EXYNOS4_IRQ_SPI1
209#define IRQ_SPI2 EXYNOS4_IRQ_SPI2
210
211#define IRQ_USB_HOST EXYNOS4_IRQ_USB_HOST
212#define IRQ_OTG EXYNOS4_IRQ_USB_HSOTG
213
214#define IRQ_HSMMC0 EXYNOS4_IRQ_HSMMC0
215#define IRQ_HSMMC1 EXYNOS4_IRQ_HSMMC1
216#define IRQ_HSMMC2 EXYNOS4_IRQ_HSMMC2
217#define IRQ_HSMMC3 EXYNOS4_IRQ_HSMMC3
218
219#define IRQ_MIPI_CSIS0 EXYNOS4_IRQ_MIPI_CSIS0
220
221#define IRQ_ONENAND_AUDI EXYNOS4_IRQ_ONENAND_AUDI
222
223#define IRQ_FIMC0 EXYNOS4_IRQ_FIMC0
224#define IRQ_FIMC1 EXYNOS4_IRQ_FIMC1
225#define IRQ_FIMC2 EXYNOS4_IRQ_FIMC2
226#define IRQ_FIMC3 EXYNOS4_IRQ_FIMC3
227#define IRQ_JPEG EXYNOS4_IRQ_JPEG
228#define IRQ_2D EXYNOS4_IRQ_2D
229
230#define IRQ_MIXER EXYNOS4_IRQ_MIXER
231#define IRQ_HDMI EXYNOS4_IRQ_HDMI
232#define IRQ_IIC_HDMIPHY EXYNOS4_IRQ_IIC_HDMIPHY
233#define IRQ_MFC EXYNOS4_IRQ_MFC
234#define IRQ_SDO EXYNOS4_IRQ_SDO
235
236#define IRQ_I2S0 EXYNOS4_IRQ_I2S0
237
238#define IRQ_ADC EXYNOS4_IRQ_ADC0
239#define IRQ_TC EXYNOS4_IRQ_PEN0
240
241#define IRQ_KEYPAD EXYNOS4_IRQ_KEYPAD
242
243#define IRQ_FIMD0_FIFO EXYNOS4_IRQ_FIMD0_FIFO
244#define IRQ_FIMD0_VSYNC EXYNOS4_IRQ_FIMD0_VSYNC
245#define IRQ_FIMD0_SYSTEM EXYNOS4_IRQ_FIMD0_SYSTEM
246
247#define IRQ_GPIO1_NR_GROUPS EXYNOS4_IRQ_GPIO1_NR_GROUPS
248#define IRQ_GPIO2_NR_GROUPS EXYNOS4_IRQ_GPIO2_NR_GROUPS
249
250/* For EXYNOS5 SoCs */
251
252#define EXYNOS5_IRQ_MDMA0 IRQ_SPI(33)
253#define EXYNOS5_IRQ_PDMA0 IRQ_SPI(34)
254#define EXYNOS5_IRQ_PDMA1 IRQ_SPI(35)
255#define EXYNOS5_IRQ_TIMER0_VIC IRQ_SPI(36)
256#define EXYNOS5_IRQ_TIMER1_VIC IRQ_SPI(37)
257#define EXYNOS5_IRQ_TIMER2_VIC IRQ_SPI(38)
258#define EXYNOS5_IRQ_TIMER3_VIC IRQ_SPI(39)
259#define EXYNOS5_IRQ_TIMER4_VIC IRQ_SPI(40)
260#define EXYNOS5_IRQ_RTIC IRQ_SPI(41)
261#define EXYNOS5_IRQ_WDT IRQ_SPI(42)
262#define EXYNOS5_IRQ_RTC_ALARM IRQ_SPI(43)
263#define EXYNOS5_IRQ_RTC_TIC IRQ_SPI(44)
264#define EXYNOS5_IRQ_GPIO_XB IRQ_SPI(45)
265#define EXYNOS5_IRQ_GPIO_XA IRQ_SPI(46)
266#define EXYNOS5_IRQ_GPIO IRQ_SPI(47)
267#define EXYNOS5_IRQ_IEM_IEC IRQ_SPI(48)
268#define EXYNOS5_IRQ_IEM_APC IRQ_SPI(49)
269#define EXYNOS5_IRQ_GPIO_C2C IRQ_SPI(50)
270#define EXYNOS5_IRQ_IIC IRQ_SPI(56)
271#define EXYNOS5_IRQ_IIC1 IRQ_SPI(57)
272#define EXYNOS5_IRQ_IIC2 IRQ_SPI(58)
273#define EXYNOS5_IRQ_IIC3 IRQ_SPI(59)
274#define EXYNOS5_IRQ_IIC4 IRQ_SPI(60)
275#define EXYNOS5_IRQ_IIC5 IRQ_SPI(61)
276#define EXYNOS5_IRQ_IIC6 IRQ_SPI(62)
277#define EXYNOS5_IRQ_IIC7 IRQ_SPI(63)
278#define EXYNOS5_IRQ_IIC_HDMIPHY IRQ_SPI(64)
279#define EXYNOS5_IRQ_TMU IRQ_SPI(65)
280#define EXYNOS5_IRQ_FIQ_0 IRQ_SPI(66)
281#define EXYNOS5_IRQ_FIQ_1 IRQ_SPI(67)
282#define EXYNOS5_IRQ_SPI0 IRQ_SPI(68)
283#define EXYNOS5_IRQ_SPI1 IRQ_SPI(69)
284#define EXYNOS5_IRQ_SPI2 IRQ_SPI(70)
285#define EXYNOS5_IRQ_USB_HOST IRQ_SPI(71)
286#define EXYNOS5_IRQ_USB3_DRD IRQ_SPI(72)
287#define EXYNOS5_IRQ_MIPI_HSI IRQ_SPI(73)
288#define EXYNOS5_IRQ_USB_HSOTG IRQ_SPI(74)
289#define EXYNOS5_IRQ_HSMMC0 IRQ_SPI(75)
290#define EXYNOS5_IRQ_HSMMC1 IRQ_SPI(76)
291#define EXYNOS5_IRQ_HSMMC2 IRQ_SPI(77)
292#define EXYNOS5_IRQ_HSMMC3 IRQ_SPI(78)
293#define EXYNOS5_IRQ_MIPICSI0 IRQ_SPI(79)
294#define EXYNOS5_IRQ_MIPICSI1 IRQ_SPI(80)
295#define EXYNOS5_IRQ_EFNFCON_DMA_ABORT IRQ_SPI(81)
296#define EXYNOS5_IRQ_MIPIDSI0 IRQ_SPI(82)
297#define EXYNOS5_IRQ_WDT_IOP IRQ_SPI(83)
298#define EXYNOS5_IRQ_ROTATOR IRQ_SPI(84)
299#define EXYNOS5_IRQ_GSC0 IRQ_SPI(85)
300#define EXYNOS5_IRQ_GSC1 IRQ_SPI(86)
301#define EXYNOS5_IRQ_GSC2 IRQ_SPI(87)
302#define EXYNOS5_IRQ_GSC3 IRQ_SPI(88)
303#define EXYNOS5_IRQ_JPEG IRQ_SPI(89)
304#define EXYNOS5_IRQ_EFNFCON_DMA IRQ_SPI(90)
305#define EXYNOS5_IRQ_2D IRQ_SPI(91)
306#define EXYNOS5_IRQ_EFNFCON_0 IRQ_SPI(92)
307#define EXYNOS5_IRQ_EFNFCON_1 IRQ_SPI(93)
308#define EXYNOS5_IRQ_MIXER IRQ_SPI(94)
309#define EXYNOS5_IRQ_HDMI IRQ_SPI(95)
310#define EXYNOS5_IRQ_MFC IRQ_SPI(96)
311#define EXYNOS5_IRQ_AUDIO_SS IRQ_SPI(97)
312#define EXYNOS5_IRQ_I2S0 IRQ_SPI(98)
313#define EXYNOS5_IRQ_I2S1 IRQ_SPI(99)
314#define EXYNOS5_IRQ_I2S2 IRQ_SPI(100)
315#define EXYNOS5_IRQ_AC97 IRQ_SPI(101)
316#define EXYNOS5_IRQ_PCM0 IRQ_SPI(102)
317#define EXYNOS5_IRQ_PCM1 IRQ_SPI(103)
318#define EXYNOS5_IRQ_PCM2 IRQ_SPI(104)
319#define EXYNOS5_IRQ_SPDIF IRQ_SPI(105)
320#define EXYNOS5_IRQ_ADC0 IRQ_SPI(106)
321#define EXYNOS5_IRQ_ADC1 IRQ_SPI(107)
322#define EXYNOS5_IRQ_SATA_PHY IRQ_SPI(108)
323#define EXYNOS5_IRQ_SATA_PMEMREQ IRQ_SPI(109)
324#define EXYNOS5_IRQ_CAM_C IRQ_SPI(110)
325#define EXYNOS5_IRQ_EAGLE_PMU IRQ_SPI(111)
326#define EXYNOS5_IRQ_INTFEEDCTRL_SSS IRQ_SPI(112)
327#define EXYNOS5_IRQ_DP1_INTP1 IRQ_SPI(113)
328#define EXYNOS5_IRQ_CEC IRQ_SPI(114)
329#define EXYNOS5_IRQ_SATA IRQ_SPI(115)
330
331#define EXYNOS5_IRQ_MMC44 IRQ_SPI(123)
332#define EXYNOS5_IRQ_MDMA1 IRQ_SPI(124)
333#define EXYNOS5_IRQ_FIMC_LITE0 IRQ_SPI(125)
334#define EXYNOS5_IRQ_FIMC_LITE1 IRQ_SPI(126)
335#define EXYNOS5_IRQ_RP_TIMER IRQ_SPI(127)
336
337/* EXYNOS5440 */
338
339#define EXYNOS5440_IRQ_UART0 IRQ_SPI(2)
340#define EXYNOS5440_IRQ_UART1 IRQ_SPI(3)
341
342#define EXYNOS5_IRQ_PMU COMBINER_IRQ(1, 2)
343
344#define EXYNOS5_IRQ_SYSMMU_GSC0_0 COMBINER_IRQ(2, 0)
345#define EXYNOS5_IRQ_SYSMMU_GSC0_1 COMBINER_IRQ(2, 1)
346#define EXYNOS5_IRQ_SYSMMU_GSC1_0 COMBINER_IRQ(2, 2)
347#define EXYNOS5_IRQ_SYSMMU_GSC1_1 COMBINER_IRQ(2, 3)
348#define EXYNOS5_IRQ_SYSMMU_GSC2_0 COMBINER_IRQ(2, 4)
349#define EXYNOS5_IRQ_SYSMMU_GSC2_1 COMBINER_IRQ(2, 5)
350#define EXYNOS5_IRQ_SYSMMU_GSC3_0 COMBINER_IRQ(2, 6)
351#define EXYNOS5_IRQ_SYSMMU_GSC3_1 COMBINER_IRQ(2, 7)
352
353#define EXYNOS5_IRQ_SYSMMU_LITE2_0 COMBINER_IRQ(3, 0)
354#define EXYNOS5_IRQ_SYSMMU_LITE2_1 COMBINER_IRQ(3, 1)
355#define EXYNOS5_IRQ_SYSMMU_FIMD1_0 COMBINER_IRQ(3, 2)
356#define EXYNOS5_IRQ_SYSMMU_FIMD1_1 COMBINER_IRQ(3, 3)
357#define EXYNOS5_IRQ_SYSMMU_LITE0_0 COMBINER_IRQ(3, 4)
358#define EXYNOS5_IRQ_SYSMMU_LITE0_1 COMBINER_IRQ(3, 5)
359#define EXYNOS5_IRQ_SYSMMU_SCALERPISP_0 COMBINER_IRQ(3, 6)
360#define EXYNOS5_IRQ_SYSMMU_SCALERPISP_1 COMBINER_IRQ(3, 7)
361
362#define EXYNOS5_IRQ_SYSMMU_ROTATOR_0 COMBINER_IRQ(4, 0)
363#define EXYNOS5_IRQ_SYSMMU_ROTATOR_1 COMBINER_IRQ(4, 1)
364#define EXYNOS5_IRQ_SYSMMU_JPEG_0 COMBINER_IRQ(4, 2)
365#define EXYNOS5_IRQ_SYSMMU_JPEG_1 COMBINER_IRQ(4, 3)
366
367#define EXYNOS5_IRQ_SYSMMU_FD_0 COMBINER_IRQ(5, 0)
368#define EXYNOS5_IRQ_SYSMMU_FD_1 COMBINER_IRQ(5, 1)
369#define EXYNOS5_IRQ_SYSMMU_SCALERCISP_0 COMBINER_IRQ(5, 2)
370#define EXYNOS5_IRQ_SYSMMU_SCALERCISP_1 COMBINER_IRQ(5, 3)
371#define EXYNOS5_IRQ_SYSMMU_MCUISP_0 COMBINER_IRQ(5, 4)
372#define EXYNOS5_IRQ_SYSMMU_MCUISP_1 COMBINER_IRQ(5, 5)
373#define EXYNOS5_IRQ_SYSMMU_3DNR_0 COMBINER_IRQ(5, 6)
374#define EXYNOS5_IRQ_SYSMMU_3DNR_1 COMBINER_IRQ(5, 7)
375
376#define EXYNOS5_IRQ_SYSMMU_ARM_0 COMBINER_IRQ(6, 0)
377#define EXYNOS5_IRQ_SYSMMU_ARM_1 COMBINER_IRQ(6, 1)
378#define EXYNOS5_IRQ_SYSMMU_MFC_R_0 COMBINER_IRQ(6, 2)
379#define EXYNOS5_IRQ_SYSMMU_MFC_R_1 COMBINER_IRQ(6, 3)
380#define EXYNOS5_IRQ_SYSMMU_RTIC_0 COMBINER_IRQ(6, 4)
381#define EXYNOS5_IRQ_SYSMMU_RTIC_1 COMBINER_IRQ(6, 5)
382#define EXYNOS5_IRQ_SYSMMU_SSS_0 COMBINER_IRQ(6, 6)
383#define EXYNOS5_IRQ_SYSMMU_SSS_1 COMBINER_IRQ(6, 7)
384
385#define EXYNOS5_IRQ_SYSMMU_MDMA0_0 COMBINER_IRQ(7, 0)
386#define EXYNOS5_IRQ_SYSMMU_MDMA0_1 COMBINER_IRQ(7, 1)
387#define EXYNOS5_IRQ_SYSMMU_MDMA1_0 COMBINER_IRQ(7, 2)
388#define EXYNOS5_IRQ_SYSMMU_MDMA1_1 COMBINER_IRQ(7, 3)
389#define EXYNOS5_IRQ_SYSMMU_TV_0 COMBINER_IRQ(7, 4)
390#define EXYNOS5_IRQ_SYSMMU_TV_1 COMBINER_IRQ(7, 5)
391
392#define EXYNOS5_IRQ_SYSMMU_MFC_L_0 COMBINER_IRQ(8, 5)
393#define EXYNOS5_IRQ_SYSMMU_MFC_L_1 COMBINER_IRQ(8, 6)
394
395#define EXYNOS5_IRQ_SYSMMU_DIS1_0 COMBINER_IRQ(9, 4)
396#define EXYNOS5_IRQ_SYSMMU_DIS1_1 COMBINER_IRQ(9, 5)
397
398#define EXYNOS5_IRQ_DP COMBINER_IRQ(10, 3)
399#define EXYNOS5_IRQ_SYSMMU_DIS0_0 COMBINER_IRQ(10, 4)
400#define EXYNOS5_IRQ_SYSMMU_DIS0_1 COMBINER_IRQ(10, 5)
401#define EXYNOS5_IRQ_SYSMMU_ISP_0 COMBINER_IRQ(10, 6)
402#define EXYNOS5_IRQ_SYSMMU_ISP_1 COMBINER_IRQ(10, 7)
403
404#define EXYNOS5_IRQ_SYSMMU_ODC_0 COMBINER_IRQ(11, 0)
405#define EXYNOS5_IRQ_SYSMMU_ODC_1 COMBINER_IRQ(11, 1)
406#define EXYNOS5_IRQ_SYSMMU_DRC_0 COMBINER_IRQ(11, 6)
407#define EXYNOS5_IRQ_SYSMMU_DRC_1 COMBINER_IRQ(11, 7)
408
409#define EXYNOS5_IRQ_MDMA1_ABORT COMBINER_IRQ(13, 1)
410
411#define EXYNOS5_IRQ_MDMA0_ABORT COMBINER_IRQ(15, 3)
412
413#define EXYNOS5_IRQ_FIMD1_FIFO COMBINER_IRQ(18, 4)
414#define EXYNOS5_IRQ_FIMD1_VSYNC COMBINER_IRQ(18, 5)
415#define EXYNOS5_IRQ_FIMD1_SYSTEM COMBINER_IRQ(18, 6)
416
417#define EXYNOS5_IRQ_ARMIOP_GIC COMBINER_IRQ(19, 0)
418#define EXYNOS5_IRQ_ARMISP_GIC COMBINER_IRQ(19, 1)
419#define EXYNOS5_IRQ_IOP_GIC COMBINER_IRQ(19, 3)
420#define EXYNOS5_IRQ_ISP_GIC COMBINER_IRQ(19, 4)
421
422#define EXYNOS5_IRQ_PMU_CPU1 COMBINER_IRQ(22, 4)
423
424#define EXYNOS5_IRQ_EINT0 COMBINER_IRQ(23, 0)
425
426#define EXYNOS5_IRQ_EINT1 COMBINER_IRQ(24, 0)
427#define EXYNOS5_IRQ_SYSMMU_LITE1_0 COMBINER_IRQ(24, 1)
428#define EXYNOS5_IRQ_SYSMMU_LITE1_1 COMBINER_IRQ(24, 2)
429#define EXYNOS5_IRQ_SYSMMU_2D_0 COMBINER_IRQ(24, 5)
430#define EXYNOS5_IRQ_SYSMMU_2D_1 COMBINER_IRQ(24, 6)
431
432#define EXYNOS5_IRQ_EINT2 COMBINER_IRQ(25, 0)
433#define EXYNOS5_IRQ_EINT3 COMBINER_IRQ(25, 1)
434
435#define EXYNOS5_IRQ_EINT4 COMBINER_IRQ(26, 0)
436#define EXYNOS5_IRQ_EINT5 COMBINER_IRQ(26, 1)
437
438#define EXYNOS5_IRQ_EINT6 COMBINER_IRQ(27, 0)
439#define EXYNOS5_IRQ_EINT7 COMBINER_IRQ(27, 1)
440
441#define EXYNOS5_IRQ_EINT8 COMBINER_IRQ(28, 0)
442#define EXYNOS5_IRQ_EINT9 COMBINER_IRQ(28, 1)
443
444#define EXYNOS5_IRQ_EINT10 COMBINER_IRQ(29, 0)
445#define EXYNOS5_IRQ_EINT11 COMBINER_IRQ(29, 1)
446
447#define EXYNOS5_IRQ_EINT12 COMBINER_IRQ(30, 0)
448#define EXYNOS5_IRQ_EINT13 COMBINER_IRQ(30, 1)
449
450#define EXYNOS5_IRQ_EINT14 COMBINER_IRQ(31, 0)
451#define EXYNOS5_IRQ_EINT15 COMBINER_IRQ(31, 1)
452
453#define EXYNOS5_MAX_COMBINER_NR 32
454
455#define EXYNOS5_IRQ_GPIO1_NR_GROUPS 14
456#define EXYNOS5_IRQ_GPIO2_NR_GROUPS 9
457#define EXYNOS5_IRQ_GPIO3_NR_GROUPS 5
458#define EXYNOS5_IRQ_GPIO4_NR_GROUPS 1
459
460#define MAX_COMBINER_NR (EXYNOS4_MAX_COMBINER_NR > EXYNOS5_MAX_COMBINER_NR ? \
461 EXYNOS4_MAX_COMBINER_NR : EXYNOS5_MAX_COMBINER_NR)
462
463#define S5P_EINT_BASE1 COMBINER_IRQ(MAX_COMBINER_NR, 0)
464#define S5P_EINT_BASE2 (S5P_EINT_BASE1 + 16)
465#define S5P_GPIOINT_BASE (S5P_EINT_BASE1 + 32)
466#define IRQ_GPIO_END (S5P_GPIOINT_BASE + S5P_GPIOINT_COUNT)
467#define IRQ_TIMER_BASE (IRQ_GPIO_END + 64)
468
469/* Set the default NR_IRQS */
470#define EXYNOS_NR_IRQS (IRQ_TIMER_BASE + IRQ_TIMER_COUNT)
471
472#ifndef CONFIG_SPARSE_IRQ
473#define NR_IRQS EXYNOS_NR_IRQS
474#endif
475
476#endif /* __ASM_ARCH_IRQS_H */
diff --git a/arch/arm/mach-exynos/include/mach/map.h b/arch/arm/mach-exynos/include/mach/map.h
index 92b29bb583cb..7b046b59d9ec 100644
--- a/arch/arm/mach-exynos/include/mach/map.h
+++ b/arch/arm/mach-exynos/include/mach/map.h
@@ -30,31 +30,6 @@
30#define EXYNOS4x12_PA_SYSRAM_NS 0x0204F000 30#define EXYNOS4x12_PA_SYSRAM_NS 0x0204F000
31#define EXYNOS5250_PA_SYSRAM_NS 0x0204F000 31#define EXYNOS5250_PA_SYSRAM_NS 0x0204F000
32 32
33#define EXYNOS4_PA_FIMC0 0x11800000
34#define EXYNOS4_PA_FIMC1 0x11810000
35#define EXYNOS4_PA_FIMC2 0x11820000
36#define EXYNOS4_PA_FIMC3 0x11830000
37
38#define EXYNOS4_PA_JPEG 0x11840000
39
40/* x = 0...1 */
41#define EXYNOS4_PA_FIMC_LITE(x) (0x12390000 + ((x) * 0x10000))
42
43#define EXYNOS4_PA_G2D 0x12800000
44
45#define EXYNOS4_PA_I2S0 0x03830000
46#define EXYNOS4_PA_I2S1 0xE3100000
47#define EXYNOS4_PA_I2S2 0xE2A00000
48
49#define EXYNOS4_PA_PCM0 0x03840000
50#define EXYNOS4_PA_PCM1 0x13980000
51#define EXYNOS4_PA_PCM2 0x13990000
52
53#define EXYNOS4_PA_SROM_BANK(x) (0x04000000 + ((x) * 0x01000000))
54
55#define EXYNOS4_PA_ONENAND 0x0C000000
56#define EXYNOS4_PA_ONENAND_DMA 0x0C600000
57
58#define EXYNOS_PA_CHIPID 0x10000000 33#define EXYNOS_PA_CHIPID 0x10000000
59 34
60#define EXYNOS4_PA_SYSCON 0x10010000 35#define EXYNOS4_PA_SYSCON 0x10010000
@@ -71,10 +46,6 @@
71#define EXYNOS4_PA_WATCHDOG 0x10060000 46#define EXYNOS4_PA_WATCHDOG 0x10060000
72#define EXYNOS5_PA_WATCHDOG 0x101D0000 47#define EXYNOS5_PA_WATCHDOG 0x101D0000
73 48
74#define EXYNOS4_PA_RTC 0x10070000
75
76#define EXYNOS4_PA_KEYPAD 0x100A0000
77
78#define EXYNOS4_PA_DMC0 0x10400000 49#define EXYNOS4_PA_DMC0 0x10400000
79#define EXYNOS4_PA_DMC1 0x10410000 50#define EXYNOS4_PA_DMC1 0x10410000
80 51
@@ -87,207 +58,22 @@
87#define EXYNOS5_PA_GIC_DIST 0x10481000 58#define EXYNOS5_PA_GIC_DIST 0x10481000
88 59
89#define EXYNOS4_PA_COREPERI 0x10500000 60#define EXYNOS4_PA_COREPERI 0x10500000
90#define EXYNOS4_PA_TWD 0x10500600
91#define EXYNOS4_PA_L2CC 0x10502000 61#define EXYNOS4_PA_L2CC 0x10502000
92 62
93#define EXYNOS4_PA_TMU 0x100C0000
94
95#define EXYNOS4_PA_MDMA0 0x10810000
96#define EXYNOS4_PA_MDMA1 0x12850000
97#define EXYNOS4_PA_S_MDMA1 0x12840000
98#define EXYNOS4_PA_PDMA0 0x12680000
99#define EXYNOS4_PA_PDMA1 0x12690000
100#define EXYNOS5_PA_MDMA0 0x10800000
101#define EXYNOS5_PA_MDMA1 0x11C10000
102#define EXYNOS5_PA_PDMA0 0x121A0000
103#define EXYNOS5_PA_PDMA1 0x121B0000
104
105#define EXYNOS4_PA_SYSMMU_MDMA 0x10A40000
106#define EXYNOS4_PA_SYSMMU_2D_ACP 0x10A40000
107#define EXYNOS4_PA_SYSMMU_SSS 0x10A50000
108#define EXYNOS4_PA_SYSMMU_FIMC0 0x11A20000
109#define EXYNOS4_PA_SYSMMU_FIMC1 0x11A30000
110#define EXYNOS4_PA_SYSMMU_FIMC2 0x11A40000
111#define EXYNOS4_PA_SYSMMU_FIMC3 0x11A50000
112#define EXYNOS4_PA_SYSMMU_JPEG 0x11A60000
113#define EXYNOS4_PA_SYSMMU_FIMD0 0x11E20000
114#define EXYNOS4_PA_SYSMMU_FIMD1 0x12220000
115#define EXYNOS4_PA_SYSMMU_FIMC_ISP 0x12260000
116#define EXYNOS4_PA_SYSMMU_FIMC_DRC 0x12270000
117#define EXYNOS4_PA_SYSMMU_FIMC_FD 0x122A0000
118#define EXYNOS4_PA_SYSMMU_ISPCPU 0x122B0000
119#define EXYNOS4_PA_SYSMMU_FIMC_LITE0 0x123B0000
120#define EXYNOS4_PA_SYSMMU_FIMC_LITE1 0x123C0000
121#define EXYNOS4_PA_SYSMMU_PCIe 0x12620000
122#define EXYNOS4_PA_SYSMMU_G2D 0x12A20000
123#define EXYNOS4_PA_SYSMMU_ROTATOR 0x12A30000
124#define EXYNOS4_PA_SYSMMU_MDMA2 0x12A40000
125#define EXYNOS4_PA_SYSMMU_TV 0x12E20000
126#define EXYNOS4_PA_SYSMMU_MFC_L 0x13620000
127#define EXYNOS4_PA_SYSMMU_MFC_R 0x13630000
128
129#define EXYNOS5_PA_GSC0 0x13E00000
130#define EXYNOS5_PA_GSC1 0x13E10000
131#define EXYNOS5_PA_GSC2 0x13E20000
132#define EXYNOS5_PA_GSC3 0x13E30000
133
134#define EXYNOS5_PA_SYSMMU_MDMA1 0x10A40000
135#define EXYNOS5_PA_SYSMMU_SSS 0x10A50000
136#define EXYNOS5_PA_SYSMMU_2D 0x10A60000
137#define EXYNOS5_PA_SYSMMU_MFC_L 0x11200000
138#define EXYNOS5_PA_SYSMMU_MFC_R 0x11210000
139#define EXYNOS5_PA_SYSMMU_ROTATOR 0x11D40000
140#define EXYNOS5_PA_SYSMMU_MDMA2 0x11D50000
141#define EXYNOS5_PA_SYSMMU_JPEG 0x11F20000
142#define EXYNOS5_PA_SYSMMU_IOP 0x12360000
143#define EXYNOS5_PA_SYSMMU_RTIC 0x12370000
144#define EXYNOS5_PA_SYSMMU_ISP 0x13260000
145#define EXYNOS5_PA_SYSMMU_DRC 0x12370000
146#define EXYNOS5_PA_SYSMMU_SCALERC 0x13280000
147#define EXYNOS5_PA_SYSMMU_SCALERP 0x13290000
148#define EXYNOS5_PA_SYSMMU_FD 0x132A0000
149#define EXYNOS5_PA_SYSMMU_ISPCPU 0x132B0000
150#define EXYNOS5_PA_SYSMMU_ODC 0x132C0000
151#define EXYNOS5_PA_SYSMMU_DIS0 0x132D0000
152#define EXYNOS5_PA_SYSMMU_DIS1 0x132E0000
153#define EXYNOS5_PA_SYSMMU_3DNR 0x132F0000
154#define EXYNOS5_PA_SYSMMU_LITE0 0x13C40000
155#define EXYNOS5_PA_SYSMMU_LITE1 0x13C50000
156#define EXYNOS5_PA_SYSMMU_GSC0 0x13E80000
157#define EXYNOS5_PA_SYSMMU_GSC1 0x13E90000
158#define EXYNOS5_PA_SYSMMU_GSC2 0x13EA0000
159#define EXYNOS5_PA_SYSMMU_GSC3 0x13EB0000
160#define EXYNOS5_PA_SYSMMU_FIMD1 0x14640000
161#define EXYNOS5_PA_SYSMMU_TV 0x14650000
162
163#define EXYNOS4_PA_SPI0 0x13920000
164#define EXYNOS4_PA_SPI1 0x13930000
165#define EXYNOS4_PA_SPI2 0x13940000
166#define EXYNOS5_PA_SPI0 0x12D20000
167#define EXYNOS5_PA_SPI1 0x12D30000
168#define EXYNOS5_PA_SPI2 0x12D40000
169
170#define EXYNOS4_PA_GPIO1 0x11400000
171#define EXYNOS4_PA_GPIO2 0x11000000
172#define EXYNOS4_PA_GPIO3 0x03860000
173#define EXYNOS5_PA_GPIO1 0x11400000
174#define EXYNOS5_PA_GPIO2 0x13400000
175#define EXYNOS5_PA_GPIO3 0x10D10000
176#define EXYNOS5_PA_GPIO4 0x03860000
177
178#define EXYNOS4_PA_MIPI_CSIS0 0x11880000
179#define EXYNOS4_PA_MIPI_CSIS1 0x11890000
180
181#define EXYNOS4_PA_FIMD0 0x11C00000
182
183#define EXYNOS4_PA_HSMMC(x) (0x12510000 + ((x) * 0x10000))
184#define EXYNOS4_PA_DWMCI 0x12550000
185#define EXYNOS5_PA_DWMCI0 0x12200000
186#define EXYNOS5_PA_DWMCI1 0x12210000
187#define EXYNOS5_PA_DWMCI2 0x12220000
188#define EXYNOS5_PA_DWMCI3 0x12230000
189
190#define EXYNOS4_PA_HSOTG 0x12480000
191#define EXYNOS4_PA_USB_HSPHY 0x125B0000
192
193#define EXYNOS4_PA_SATA 0x12560000
194#define EXYNOS4_PA_SATAPHY 0x125D0000
195#define EXYNOS4_PA_SATAPHY_CTRL 0x126B0000
196
197#define EXYNOS4_PA_SROMC 0x12570000 63#define EXYNOS4_PA_SROMC 0x12570000
198#define EXYNOS5_PA_SROMC 0x12250000 64#define EXYNOS5_PA_SROMC 0x12250000
199 65
200#define EXYNOS4_PA_EHCI 0x12580000
201#define EXYNOS4_PA_OHCI 0x12590000
202#define EXYNOS4_PA_HSPHY 0x125B0000 66#define EXYNOS4_PA_HSPHY 0x125B0000
203#define EXYNOS4_PA_MFC 0x13400000
204 67
205#define EXYNOS4_PA_UART 0x13800000 68#define EXYNOS4_PA_UART 0x13800000
206#define EXYNOS5_PA_UART 0x12C00000 69#define EXYNOS5_PA_UART 0x12C00000
207 70
208#define EXYNOS4_PA_VP 0x12C00000
209#define EXYNOS4_PA_MIXER 0x12C10000
210#define EXYNOS4_PA_SDO 0x12C20000
211#define EXYNOS4_PA_HDMI 0x12D00000
212#define EXYNOS4_PA_IIC_HDMIPHY 0x138E0000
213
214#define EXYNOS4_PA_IIC(x) (0x13860000 + ((x) * 0x10000))
215#define EXYNOS5_PA_IIC(x) (0x12C60000 + ((x) * 0x10000))
216
217#define EXYNOS4_PA_ADC 0x13910000
218#define EXYNOS4_PA_ADC1 0x13911000
219
220#define EXYNOS4_PA_AC97 0x139A0000
221
222#define EXYNOS4_PA_SPDIF 0x139B0000
223
224#define EXYNOS4_PA_TIMER 0x139D0000 71#define EXYNOS4_PA_TIMER 0x139D0000
225#define EXYNOS5_PA_TIMER 0x12DD0000 72#define EXYNOS5_PA_TIMER 0x12DD0000
226 73
227#define EXYNOS4_PA_SDRAM 0x40000000
228#define EXYNOS5_PA_SDRAM 0x40000000
229
230/* Compatibiltiy Defines */
231
232#define S3C_PA_HSMMC0 EXYNOS4_PA_HSMMC(0)
233#define S3C_PA_HSMMC1 EXYNOS4_PA_HSMMC(1)
234#define S3C_PA_HSMMC2 EXYNOS4_PA_HSMMC(2)
235#define S3C_PA_HSMMC3 EXYNOS4_PA_HSMMC(3)
236#define S3C_PA_IIC EXYNOS4_PA_IIC(0)
237#define S3C_PA_IIC1 EXYNOS4_PA_IIC(1)
238#define S3C_PA_IIC2 EXYNOS4_PA_IIC(2)
239#define S3C_PA_IIC3 EXYNOS4_PA_IIC(3)
240#define S3C_PA_IIC4 EXYNOS4_PA_IIC(4)
241#define S3C_PA_IIC5 EXYNOS4_PA_IIC(5)
242#define S3C_PA_IIC6 EXYNOS4_PA_IIC(6)
243#define S3C_PA_IIC7 EXYNOS4_PA_IIC(7)
244#define S3C_PA_RTC EXYNOS4_PA_RTC
245#define S3C_PA_WDT EXYNOS4_PA_WATCHDOG
246#define S3C_PA_SPI0 EXYNOS4_PA_SPI0
247#define S3C_PA_SPI1 EXYNOS4_PA_SPI1
248#define S3C_PA_SPI2 EXYNOS4_PA_SPI2
249#define S3C_PA_USB_HSOTG EXYNOS4_PA_HSOTG
250
251#define S5P_PA_EHCI EXYNOS4_PA_EHCI
252#define S5P_PA_FIMC0 EXYNOS4_PA_FIMC0
253#define S5P_PA_FIMC1 EXYNOS4_PA_FIMC1
254#define S5P_PA_FIMC2 EXYNOS4_PA_FIMC2
255#define S5P_PA_FIMC3 EXYNOS4_PA_FIMC3
256#define S5P_PA_JPEG EXYNOS4_PA_JPEG
257#define S5P_PA_G2D EXYNOS4_PA_G2D
258#define S5P_PA_FIMD0 EXYNOS4_PA_FIMD0
259#define S5P_PA_HDMI EXYNOS4_PA_HDMI
260#define S5P_PA_IIC_HDMIPHY EXYNOS4_PA_IIC_HDMIPHY
261#define S5P_PA_MFC EXYNOS4_PA_MFC
262#define S5P_PA_MIPI_CSIS0 EXYNOS4_PA_MIPI_CSIS0
263#define S5P_PA_MIPI_CSIS1 EXYNOS4_PA_MIPI_CSIS1
264#define S5P_PA_MIXER EXYNOS4_PA_MIXER
265#define S5P_PA_ONENAND EXYNOS4_PA_ONENAND
266#define S5P_PA_ONENAND_DMA EXYNOS4_PA_ONENAND_DMA
267#define S5P_PA_SDO EXYNOS4_PA_SDO
268#define S5P_PA_SDRAM EXYNOS4_PA_SDRAM
269#define S5P_PA_VP EXYNOS4_PA_VP
270
271#define SAMSUNG_PA_ADC EXYNOS4_PA_ADC
272#define SAMSUNG_PA_ADC1 EXYNOS4_PA_ADC1
273#define SAMSUNG_PA_KEYPAD EXYNOS4_PA_KEYPAD
274
275/* Compatibility UART */ 74/* Compatibility UART */
276 75
277#define EXYNOS4_PA_UART0 0x13800000
278#define EXYNOS4_PA_UART1 0x13810000
279#define EXYNOS4_PA_UART2 0x13820000
280#define EXYNOS4_PA_UART3 0x13830000
281#define EXYNOS4_SZ_UART SZ_256
282
283#define EXYNOS5_PA_UART0 0x12C00000
284#define EXYNOS5_PA_UART1 0x12C10000
285#define EXYNOS5_PA_UART2 0x12C20000
286#define EXYNOS5_PA_UART3 0x12C30000
287
288#define EXYNOS5440_PA_UART0 0x000B0000 76#define EXYNOS5440_PA_UART0 0x000B0000
289#define EXYNOS5440_PA_UART1 0x000C0000
290#define EXYNOS5440_SZ_UART SZ_256
291 77
292#define S3C_VA_UARTx(x) (S3C_VA_UART + ((x) * S3C_UART_OFFSET)) 78#define S3C_VA_UARTx(x) (S3C_VA_UART + ((x) * S3C_UART_OFFSET))
293 79
diff --git a/arch/arm/mach-exynos/include/mach/memory.h b/arch/arm/mach-exynos/include/mach/memory.h
index 374ef2cf7152..2a4cdb7cb326 100644
--- a/arch/arm/mach-exynos/include/mach/memory.h
+++ b/arch/arm/mach-exynos/include/mach/memory.h
@@ -15,8 +15,13 @@
15 15
16#define PLAT_PHYS_OFFSET UL(0x40000000) 16#define PLAT_PHYS_OFFSET UL(0x40000000)
17 17
18#ifndef CONFIG_ARM_LPAE
18/* Maximum of 256MiB in one bank */ 19/* Maximum of 256MiB in one bank */
19#define MAX_PHYSMEM_BITS 32 20#define MAX_PHYSMEM_BITS 32
20#define SECTION_SIZE_BITS 28 21#define SECTION_SIZE_BITS 28
22#else
23#define MAX_PHYSMEM_BITS 36
24#define SECTION_SIZE_BITS 31
25#endif
21 26
22#endif /* __ASM_ARCH_MEMORY_H */ 27#endif /* __ASM_ARCH_MEMORY_H */
diff --git a/arch/arm/mach-exynos/include/mach/pm-core.h b/arch/arm/mach-exynos/include/mach/pm-core.h
index 296090e7f423..2b00833b6641 100644
--- a/arch/arm/mach-exynos/include/mach/pm-core.h
+++ b/arch/arm/mach-exynos/include/mach/pm-core.h
@@ -34,12 +34,7 @@ static inline void s3c_pm_debug_init_uart(void)
34 34
35static inline void s3c_pm_arch_prepare_irqs(void) 35static inline void s3c_pm_arch_prepare_irqs(void)
36{ 36{
37 u32 eintmask = s3c_irqwake_eintmask; 37 __raw_writel(exynos_get_eint_wake_mask(), S5P_EINT_WAKEUP_MASK);
38
39 if (of_have_populated_dt())
40 eintmask = exynos_get_eint_wake_mask();
41
42 __raw_writel(eintmask, S5P_EINT_WAKEUP_MASK);
43 __raw_writel(s3c_irqwake_intmask & ~(1 << 31), S5P_WAKEUP_MASK); 38 __raw_writel(s3c_irqwake_intmask & ~(1 << 31), S5P_WAKEUP_MASK);
44} 39}
45 40
@@ -69,4 +64,9 @@ static inline void samsung_pm_saved_gpios(void)
69 /* nothing here yet */ 64 /* nothing here yet */
70} 65}
71 66
67/* Compatibility definitions to make plat-samsung/pm.c compile */
68#define IRQ_EINT_BIT(x) 1
69#define s3c_irqwake_intallow 0
70#define s3c_irqwake_eintallow 0
71
72#endif /* __ASM_ARCH_PM_CORE_H */ 72#endif /* __ASM_ARCH_PM_CORE_H */
diff --git a/arch/arm/mach-exynos/include/mach/regs-gpio.h b/arch/arm/mach-exynos/include/mach/regs-gpio.h
deleted file mode 100644
index e4b5b60dcb85..000000000000
--- a/arch/arm/mach-exynos/include/mach/regs-gpio.h
+++ /dev/null
@@ -1,40 +0,0 @@
1/* linux/arch/arm/mach-exynos4/include/mach/regs-gpio.h
2 *
3 * Copyright (c) 2010-2011 Samsung Electronics Co., Ltd.
4 * http://www.samsung.com
5 *
6 * EXYNOS4 - GPIO (including EINT) 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 __ASM_ARCH_REGS_GPIO_H
14#define __ASM_ARCH_REGS_GPIO_H __FILE__
15
16#include <mach/map.h>
17#include <mach/irqs.h>
18
19#define EINT_REG_NR(x) (EINT_OFFSET(x) >> 3)
20#define EINT_CON(b, x) (b + 0xE00 + (EINT_REG_NR(x) * 4))
21#define EINT_FLTCON(b, x) (b + 0xE80 + (EINT_REG_NR(x) * 4))
22#define EINT_MASK(b, x) (b + 0xF00 + (EINT_REG_NR(x) * 4))
23#define EINT_PEND(b, x) (b + 0xF40 + (EINT_REG_NR(x) * 4))
24
25#define EINT_OFFSET_BIT(x) (1 << (EINT_OFFSET(x) & 0x7))
26
27/* compatibility for plat-s5p/irq-pm.c */
28#define EXYNOS4_EINT40CON (S5P_VA_GPIO2 + 0xE00)
29#define S5P_EINT_CON(x) (EXYNOS4_EINT40CON + ((x) * 0x4))
30
31#define EXYNOS4_EINT40FLTCON0 (S5P_VA_GPIO2 + 0xE80)
32#define S5P_EINT_FLTCON(x) (EXYNOS4_EINT40FLTCON0 + ((x) * 0x4))
33
34#define EXYNOS4_EINT40MASK (S5P_VA_GPIO2 + 0xF00)
35#define S5P_EINT_MASK(x) (EXYNOS4_EINT40MASK + ((x) * 0x4))
36
37#define EXYNOS4_EINT40PEND (S5P_VA_GPIO2 + 0xF40)
38#define S5P_EINT_PEND(x) (EXYNOS4_EINT40PEND + ((x) * 0x4))
39
40#endif /* __ASM_ARCH_REGS_GPIO_H */
diff --git a/arch/arm/mach-exynos/include/mach/regs-usb-phy.h b/arch/arm/mach-exynos/include/mach/regs-usb-phy.h
deleted file mode 100644
index 07277735252e..000000000000
--- a/arch/arm/mach-exynos/include/mach/regs-usb-phy.h
+++ /dev/null
@@ -1,74 +0,0 @@
1/*
2 * Copyright (C) 2011 Samsung Electronics Co.Ltd
3 * Author: Joonyoung Shim <jy0922.shim@samsung.com>
4 *
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License as published by the
7 * Free Software Foundation; either version 2 of the License, or (at your
8 * option) any later version.
9 */
10
11#ifndef __PLAT_S5P_REGS_USB_PHY_H
12#define __PLAT_S5P_REGS_USB_PHY_H
13
14#define EXYNOS4_HSOTG_PHYREG(x) ((x) + S3C_VA_USB_HSPHY)
15
16#define EXYNOS4_PHYPWR EXYNOS4_HSOTG_PHYREG(0x00)
17#define PHY1_HSIC_NORMAL_MASK (0xf << 9)
18#define PHY1_HSIC1_SLEEP (1 << 12)
19#define PHY1_HSIC1_FORCE_SUSPEND (1 << 11)
20#define PHY1_HSIC0_SLEEP (1 << 10)
21#define PHY1_HSIC0_FORCE_SUSPEND (1 << 9)
22
23#define PHY1_STD_NORMAL_MASK (0x7 << 6)
24#define PHY1_STD_SLEEP (1 << 8)
25#define PHY1_STD_ANALOG_POWERDOWN (1 << 7)
26#define PHY1_STD_FORCE_SUSPEND (1 << 6)
27
28#define PHY0_NORMAL_MASK (0x39 << 0)
29#define PHY0_SLEEP (1 << 5)
30#define PHY0_OTG_DISABLE (1 << 4)
31#define PHY0_ANALOG_POWERDOWN (1 << 3)
32#define PHY0_FORCE_SUSPEND (1 << 0)
33
34#define EXYNOS4_PHYCLK EXYNOS4_HSOTG_PHYREG(0x04)
35#define PHY1_COMMON_ON_N (1 << 7)
36#define PHY0_COMMON_ON_N (1 << 4)
37#define PHY0_ID_PULLUP (1 << 2)
38
39#define EXYNOS4_CLKSEL_SHIFT (0)
40
41#define EXYNOS4210_CLKSEL_MASK (0x3 << 0)
42#define EXYNOS4210_CLKSEL_48M (0x0 << 0)
43#define EXYNOS4210_CLKSEL_12M (0x2 << 0)
44#define EXYNOS4210_CLKSEL_24M (0x3 << 0)
45
46#define EXYNOS4X12_CLKSEL_MASK (0x7 << 0)
47#define EXYNOS4X12_CLKSEL_9600K (0x0 << 0)
48#define EXYNOS4X12_CLKSEL_10M (0x1 << 0)
49#define EXYNOS4X12_CLKSEL_12M (0x2 << 0)
50#define EXYNOS4X12_CLKSEL_19200K (0x3 << 0)
51#define EXYNOS4X12_CLKSEL_20M (0x4 << 0)
52#define EXYNOS4X12_CLKSEL_24M (0x5 << 0)
53
54#define EXYNOS4_RSTCON EXYNOS4_HSOTG_PHYREG(0x08)
55#define HOST_LINK_PORT_SWRST_MASK (0xf << 6)
56#define HOST_LINK_PORT2_SWRST (1 << 9)
57#define HOST_LINK_PORT1_SWRST (1 << 8)
58#define HOST_LINK_PORT0_SWRST (1 << 7)
59#define HOST_LINK_ALL_SWRST (1 << 6)
60
61#define PHY1_SWRST_MASK (0x7 << 3)
62#define PHY1_HSIC_SWRST (1 << 5)
63#define PHY1_STD_SWRST (1 << 4)
64#define PHY1_ALL_SWRST (1 << 3)
65
66#define PHY0_SWRST_MASK (0x7 << 0)
67#define PHY0_PHYLINK_SWRST (1 << 2)
68#define PHY0_HLINK_SWRST (1 << 1)
69#define PHY0_SWRST (1 << 0)
70
71#define EXYNOS4_PHY1CON EXYNOS4_HSOTG_PHYREG(0x34)
72#define FPENABLEN (1 << 0)
73
74#endif /* __PLAT_S5P_REGS_USB_PHY_H */
diff --git a/arch/arm/mach-exynos/include/mach/uncompress.h b/arch/arm/mach-exynos/include/mach/uncompress.h
index 2979995d5a6a..5d7ce36be46f 100644
--- a/arch/arm/mach-exynos/include/mach/uncompress.h
+++ b/arch/arm/mach-exynos/include/mach/uncompress.h
@@ -15,9 +15,6 @@
15#include <asm/mach-types.h> 15#include <asm/mach-types.h>
16 16
17#include <mach/map.h> 17#include <mach/map.h>
18
19volatile u8 *uart_base;
20
21#include <plat/uncompress.h> 18#include <plat/uncompress.h>
22 19
23static unsigned int __raw_readl(unsigned int ptr) 20static unsigned int __raw_readl(unsigned int ptr)
@@ -31,13 +28,12 @@ static void arch_detect_cpu(void)
31 28
32 /* 29 /*
33 * product_id is bits 31:12 30 * product_id is bits 31:12
34 * bits 23:20 describe the exynosX family 31 * bits 23:20 describe the exynosX family
35 * 32 * bits 27:24 describe the exynosX family in exynos5420
36 */ 33 */
37 chip_id >>= 20; 34 chip_id >>= 20;
38 chip_id &= 0xf;
39 35
40 if (chip_id == 0x5) 36 if ((chip_id & 0x0f) == 0x5 || (chip_id & 0xf0) == 0x50)
41 uart_base = (volatile u8 *)EXYNOS5_PA_UART + (S3C_UART_OFFSET * CONFIG_S3C_LOWLEVEL_UART_PORT); 37 uart_base = (volatile u8 *)EXYNOS5_PA_UART + (S3C_UART_OFFSET * CONFIG_S3C_LOWLEVEL_UART_PORT);
42 else 38 else
43 uart_base = (volatile u8 *)EXYNOS4_PA_UART + (S3C_UART_OFFSET * CONFIG_S3C_LOWLEVEL_UART_PORT); 39 uart_base = (volatile u8 *)EXYNOS4_PA_UART + (S3C_UART_OFFSET * CONFIG_S3C_LOWLEVEL_UART_PORT);
diff --git a/arch/arm/mach-exynos/mach-armlex4210.c b/arch/arm/mach-exynos/mach-armlex4210.c
deleted file mode 100644
index 5f0f55701374..000000000000
--- a/arch/arm/mach-exynos/mach-armlex4210.c
+++ /dev/null
@@ -1,207 +0,0 @@
1/* linux/arch/arm/mach-exynos4/mach-armlex4210.c
2 *
3 * Copyright (c) 2011 Samsung Electronics Co., Ltd.
4 * http://www.samsung.com
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9*/
10
11#include <linux/gpio.h>
12#include <linux/io.h>
13#include <linux/mmc/host.h>
14#include <linux/platform_device.h>
15#include <linux/serial_core.h>
16#include <linux/smsc911x.h>
17
18#include <asm/mach/arch.h>
19#include <asm/mach-types.h>
20
21#include <plat/cpu.h>
22#include <plat/devs.h>
23#include <plat/gpio-cfg.h>
24#include <plat/regs-serial.h>
25#include <plat/regs-srom.h>
26#include <plat/sdhci.h>
27
28#include <mach/irqs.h>
29#include <mach/map.h>
30
31#include "common.h"
32
33/* Following are default values for UCON, ULCON and UFCON UART registers */
34#define ARMLEX4210_UCON_DEFAULT (S3C2410_UCON_TXILEVEL | \
35 S3C2410_UCON_RXILEVEL | \
36 S3C2410_UCON_TXIRQMODE | \
37 S3C2410_UCON_RXIRQMODE | \
38 S3C2410_UCON_RXFIFO_TOI | \
39 S3C2443_UCON_RXERR_IRQEN)
40
41#define ARMLEX4210_ULCON_DEFAULT S3C2410_LCON_CS8
42
43#define ARMLEX4210_UFCON_DEFAULT (S3C2410_UFCON_FIFOMODE | \
44 S5PV210_UFCON_TXTRIG4 | \
45 S5PV210_UFCON_RXTRIG4)
46
47static struct s3c2410_uartcfg armlex4210_uartcfgs[] __initdata = {
48 [0] = {
49 .hwport = 0,
50 .flags = 0,
51 .ucon = ARMLEX4210_UCON_DEFAULT,
52 .ulcon = ARMLEX4210_ULCON_DEFAULT,
53 .ufcon = ARMLEX4210_UFCON_DEFAULT,
54 },
55 [1] = {
56 .hwport = 1,
57 .flags = 0,
58 .ucon = ARMLEX4210_UCON_DEFAULT,
59 .ulcon = ARMLEX4210_ULCON_DEFAULT,
60 .ufcon = ARMLEX4210_UFCON_DEFAULT,
61 },
62 [2] = {
63 .hwport = 2,
64 .flags = 0,
65 .ucon = ARMLEX4210_UCON_DEFAULT,
66 .ulcon = ARMLEX4210_ULCON_DEFAULT,
67 .ufcon = ARMLEX4210_UFCON_DEFAULT,
68 },
69 [3] = {
70 .hwport = 3,
71 .flags = 0,
72 .ucon = ARMLEX4210_UCON_DEFAULT,
73 .ulcon = ARMLEX4210_ULCON_DEFAULT,
74 .ufcon = ARMLEX4210_UFCON_DEFAULT,
75 },
76};
77
78static struct s3c_sdhci_platdata armlex4210_hsmmc0_pdata __initdata = {
79 .cd_type = S3C_SDHCI_CD_PERMANENT,
80#ifdef CONFIG_EXYNOS4_SDHCI_CH0_8BIT
81 .max_width = 8,
82 .host_caps = MMC_CAP_8_BIT_DATA,
83#endif
84};
85
86static struct s3c_sdhci_platdata armlex4210_hsmmc2_pdata __initdata = {
87 .cd_type = S3C_SDHCI_CD_GPIO,
88 .ext_cd_gpio = EXYNOS4_GPX2(5),
89 .ext_cd_gpio_invert = 1,
90 .max_width = 4,
91};
92
93static struct s3c_sdhci_platdata armlex4210_hsmmc3_pdata __initdata = {
94 .cd_type = S3C_SDHCI_CD_PERMANENT,
95 .max_width = 4,
96};
97
98static void __init armlex4210_sdhci_init(void)
99{
100 s3c_sdhci0_set_platdata(&armlex4210_hsmmc0_pdata);
101 s3c_sdhci2_set_platdata(&armlex4210_hsmmc2_pdata);
102 s3c_sdhci3_set_platdata(&armlex4210_hsmmc3_pdata);
103}
104
105static void __init armlex4210_wlan_init(void)
106{
107 /* enable */
108 s3c_gpio_cfgpin(EXYNOS4_GPX2(0), S3C_GPIO_SFN(0xf));
109 s3c_gpio_setpull(EXYNOS4_GPX2(0), S3C_GPIO_PULL_UP);
110
111 /* reset */
112 s3c_gpio_cfgpin(EXYNOS4_GPX1(6), S3C_GPIO_SFN(0xf));
113 s3c_gpio_setpull(EXYNOS4_GPX1(6), S3C_GPIO_PULL_UP);
114
115 /* wakeup */
116 s3c_gpio_cfgpin(EXYNOS4_GPX1(5), S3C_GPIO_SFN(0xf));
117 s3c_gpio_setpull(EXYNOS4_GPX1(5), S3C_GPIO_PULL_UP);
118}
119
120static struct resource armlex4210_smsc911x_resources[] = {
121 [0] = DEFINE_RES_MEM(EXYNOS4_PA_SROM_BANK(3), SZ_64K),
122 [1] = DEFINE_RES_NAMED(IRQ_EINT(27), 1, NULL, IORESOURCE_IRQ \
123 | IRQF_TRIGGER_HIGH),
124};
125
126static struct smsc911x_platform_config smsc9215_config = {
127 .irq_polarity = SMSC911X_IRQ_POLARITY_ACTIVE_HIGH,
128 .irq_type = SMSC911X_IRQ_TYPE_PUSH_PULL,
129 .flags = SMSC911X_USE_16BIT | SMSC911X_FORCE_INTERNAL_PHY,
130 .phy_interface = PHY_INTERFACE_MODE_MII,
131 .mac = {0x00, 0x80, 0x00, 0x23, 0x45, 0x67},
132};
133
134static struct platform_device armlex4210_smsc911x = {
135 .name = "smsc911x",
136 .id = -1,
137 .num_resources = ARRAY_SIZE(armlex4210_smsc911x_resources),
138 .resource = armlex4210_smsc911x_resources,
139 .dev = {
140 .platform_data = &smsc9215_config,
141 },
142};
143
144static struct platform_device *armlex4210_devices[] __initdata = {
145 &s3c_device_hsmmc0,
146 &s3c_device_hsmmc2,
147 &s3c_device_hsmmc3,
148 &s3c_device_rtc,
149 &s3c_device_wdt,
150 &armlex4210_smsc911x,
151 &exynos4_device_ahci,
152};
153
154static void __init armlex4210_smsc911x_init(void)
155{
156 u32 cs1;
157
158 /* configure nCS1 width to 16 bits */
159 cs1 = __raw_readl(S5P_SROM_BW) &
160 ~(S5P_SROM_BW__CS_MASK << S5P_SROM_BW__NCS1__SHIFT);
161 cs1 |= ((1 << S5P_SROM_BW__DATAWIDTH__SHIFT) |
162 (0 << S5P_SROM_BW__WAITENABLE__SHIFT) |
163 (1 << S5P_SROM_BW__ADDRMODE__SHIFT) |
164 (1 << S5P_SROM_BW__BYTEENABLE__SHIFT)) <<
165 S5P_SROM_BW__NCS1__SHIFT;
166 __raw_writel(cs1, S5P_SROM_BW);
167
168 /* set timing for nCS1 suitable for ethernet chip */
169 __raw_writel((0x1 << S5P_SROM_BCX__PMC__SHIFT) |
170 (0x9 << S5P_SROM_BCX__TACP__SHIFT) |
171 (0xc << S5P_SROM_BCX__TCAH__SHIFT) |
172 (0x1 << S5P_SROM_BCX__TCOH__SHIFT) |
173 (0x6 << S5P_SROM_BCX__TACC__SHIFT) |
174 (0x1 << S5P_SROM_BCX__TCOS__SHIFT) |
175 (0x1 << S5P_SROM_BCX__TACS__SHIFT), S5P_SROM_BC1);
176}
177
178static void __init armlex4210_map_io(void)
179{
180 exynos_init_io(NULL, 0);
181 s3c24xx_init_uarts(armlex4210_uartcfgs,
182 ARRAY_SIZE(armlex4210_uartcfgs));
183}
184
185static void __init armlex4210_machine_init(void)
186{
187 armlex4210_smsc911x_init();
188
189 armlex4210_sdhci_init();
190
191 armlex4210_wlan_init();
192
193 platform_add_devices(armlex4210_devices,
194 ARRAY_SIZE(armlex4210_devices));
195}
196
197MACHINE_START(ARMLEX4210, "ARMLEX4210")
198 /* Maintainer: Alim Akhtar <alim.akhtar@samsung.com> */
199 .atag_offset = 0x100,
200 .smp = smp_ops(exynos_smp_ops),
201 .init_irq = exynos4_init_irq,
202 .map_io = armlex4210_map_io,
203 .init_machine = armlex4210_machine_init,
204 .init_late = exynos_init_late,
205 .init_time = exynos_init_time,
206 .restart = exynos4_restart,
207MACHINE_END
diff --git a/arch/arm/mach-exynos/mach-exynos4-dt.c b/arch/arm/mach-exynos/mach-exynos4-dt.c
index b9ed834a7eee..0099c6c13bba 100644
--- a/arch/arm/mach-exynos/mach-exynos4-dt.c
+++ b/arch/arm/mach-exynos/mach-exynos4-dt.c
@@ -23,11 +23,6 @@
23 23
24#include "common.h" 24#include "common.h"
25 25
26static void __init exynos4_dt_map_io(void)
27{
28 exynos_init_io(NULL, 0);
29}
30
31static void __init exynos4_dt_machine_init(void) 26static void __init exynos4_dt_machine_init(void)
32{ 27{
33 of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); 28 of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
@@ -55,8 +50,7 @@ static void __init exynos4_reserve(void)
55DT_MACHINE_START(EXYNOS4210_DT, "Samsung Exynos4 (Flattened Device Tree)") 50DT_MACHINE_START(EXYNOS4210_DT, "Samsung Exynos4 (Flattened Device Tree)")
56 /* Maintainer: Thomas Abraham <thomas.abraham@linaro.org> */ 51 /* Maintainer: Thomas Abraham <thomas.abraham@linaro.org> */
57 .smp = smp_ops(exynos_smp_ops), 52 .smp = smp_ops(exynos_smp_ops),
58 .init_irq = exynos4_init_irq, 53 .map_io = exynos_init_io,
59 .map_io = exynos4_dt_map_io,
60 .init_early = exynos_firmware_init, 54 .init_early = exynos_firmware_init,
61 .init_machine = exynos4_dt_machine_init, 55 .init_machine = exynos4_dt_machine_init,
62 .init_late = exynos_init_late, 56 .init_late = exynos_init_late,
diff --git a/arch/arm/mach-exynos/mach-exynos5-dt.c b/arch/arm/mach-exynos/mach-exynos5-dt.c
index 753b94f3fca7..f874b773ca13 100644
--- a/arch/arm/mach-exynos/mach-exynos5-dt.c
+++ b/arch/arm/mach-exynos/mach-exynos5-dt.c
@@ -23,11 +23,6 @@
23 23
24#include "common.h" 24#include "common.h"
25 25
26static void __init exynos5_dt_map_io(void)
27{
28 exynos_init_io(NULL, 0);
29}
30
31static void __init exynos5_dt_machine_init(void) 26static void __init exynos5_dt_machine_init(void)
32{ 27{
33 struct device_node *i2c_np; 28 struct device_node *i2c_np;
@@ -57,6 +52,7 @@ static void __init exynos5_dt_machine_init(void)
57 52
58static char const *exynos5_dt_compat[] __initdata = { 53static char const *exynos5_dt_compat[] __initdata = {
59 "samsung,exynos5250", 54 "samsung,exynos5250",
55 "samsung,exynos5420",
60 "samsung,exynos5440", 56 "samsung,exynos5440",
61 NULL 57 NULL
62}; 58};
@@ -76,9 +72,8 @@ static void __init exynos5_reserve(void)
76 72
77DT_MACHINE_START(EXYNOS5_DT, "SAMSUNG EXYNOS5 (Flattened Device Tree)") 73DT_MACHINE_START(EXYNOS5_DT, "SAMSUNG EXYNOS5 (Flattened Device Tree)")
78 /* Maintainer: Kukjin Kim <kgene.kim@samsung.com> */ 74 /* Maintainer: Kukjin Kim <kgene.kim@samsung.com> */
79 .init_irq = exynos5_init_irq,
80 .smp = smp_ops(exynos_smp_ops), 75 .smp = smp_ops(exynos_smp_ops),
81 .map_io = exynos5_dt_map_io, 76 .map_io = exynos_init_io,
82 .init_machine = exynos5_dt_machine_init, 77 .init_machine = exynos5_dt_machine_init,
83 .init_late = exynos_init_late, 78 .init_late = exynos_init_late,
84 .init_time = exynos_init_time, 79 .init_time = exynos_init_time,
diff --git a/arch/arm/mach-exynos/mach-nuri.c b/arch/arm/mach-exynos/mach-nuri.c
deleted file mode 100644
index 5c8b2878dbbd..000000000000
--- a/arch/arm/mach-exynos/mach-nuri.c
+++ /dev/null
@@ -1,1388 +0,0 @@
1/*
2 * linux/arch/arm/mach-exynos4/mach-nuri.c
3 *
4 * Copyright (c) 2011 Samsung Electronics Co., Ltd.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
10
11#include <linux/platform_device.h>
12#include <linux/serial_core.h>
13#include <linux/input.h>
14#include <linux/i2c.h>
15#include <linux/i2c/atmel_mxt_ts.h>
16#include <linux/i2c-gpio.h>
17#include <linux/gpio_keys.h>
18#include <linux/gpio.h>
19#include <linux/power/max8903_charger.h>
20#include <linux/power/max17042_battery.h>
21#include <linux/regulator/machine.h>
22#include <linux/regulator/fixed.h>
23#include <linux/mfd/max8997.h>
24#include <linux/mfd/max8997-private.h>
25#include <linux/mmc/host.h>
26#include <linux/fb.h>
27#include <linux/pwm_backlight.h>
28#include <linux/platform_data/i2c-s3c2410.h>
29#include <linux/platform_data/mipi-csis.h>
30#include <linux/platform_data/s3c-hsotg.h>
31#include <linux/platform_data/usb-ehci-s5p.h>
32#include <drm/exynos_drm.h>
33
34#include <video/platform_lcd.h>
35#include <video/samsung_fimd.h>
36#include <media/m5mols.h>
37#include <media/s5k6aa.h>
38#include <media/s5p_fimc.h>
39#include <media/v4l2-mediabus.h>
40
41#include <asm/mach/arch.h>
42#include <asm/mach-types.h>
43
44#include <plat/adc.h>
45#include <plat/regs-serial.h>
46#include <plat/cpu.h>
47#include <plat/devs.h>
48#include <plat/fb.h>
49#include <plat/sdhci.h>
50#include <plat/clock.h>
51#include <plat/gpio-cfg.h>
52#include <plat/mfc.h>
53#include <plat/fimc-core.h>
54#include <plat/camport.h>
55
56#include <mach/irqs.h>
57#include <mach/map.h>
58
59#include "common.h"
60
61/* Following are default values for UCON, ULCON and UFCON UART registers */
62#define NURI_UCON_DEFAULT (S3C2410_UCON_TXILEVEL | \
63 S3C2410_UCON_RXILEVEL | \
64 S3C2410_UCON_TXIRQMODE | \
65 S3C2410_UCON_RXIRQMODE | \
66 S3C2410_UCON_RXFIFO_TOI | \
67 S3C2443_UCON_RXERR_IRQEN)
68
69#define NURI_ULCON_DEFAULT S3C2410_LCON_CS8
70
71#define NURI_UFCON_DEFAULT (S3C2410_UFCON_FIFOMODE | \
72 S5PV210_UFCON_TXTRIG256 | \
73 S5PV210_UFCON_RXTRIG256)
74
75enum fixed_regulator_id {
76 FIXED_REG_ID_MMC = 0,
77 FIXED_REG_ID_MAX8903,
78 FIXED_REG_ID_CAM_A28V,
79 FIXED_REG_ID_CAM_12V,
80 FIXED_REG_ID_CAM_VT_15V,
81};
82
83static struct s3c2410_uartcfg nuri_uartcfgs[] __initdata = {
84 {
85 .hwport = 0,
86 .ucon = NURI_UCON_DEFAULT,
87 .ulcon = NURI_ULCON_DEFAULT,
88 .ufcon = NURI_UFCON_DEFAULT,
89 },
90 {
91 .hwport = 1,
92 .ucon = NURI_UCON_DEFAULT,
93 .ulcon = NURI_ULCON_DEFAULT,
94 .ufcon = NURI_UFCON_DEFAULT,
95 },
96 {
97 .hwport = 2,
98 .ucon = NURI_UCON_DEFAULT,
99 .ulcon = NURI_ULCON_DEFAULT,
100 .ufcon = NURI_UFCON_DEFAULT,
101 },
102 {
103 .hwport = 3,
104 .ucon = NURI_UCON_DEFAULT,
105 .ulcon = NURI_ULCON_DEFAULT,
106 .ufcon = NURI_UFCON_DEFAULT,
107 },
108};
109
110/* eMMC */
111static struct s3c_sdhci_platdata nuri_hsmmc0_data __initdata = {
112 .max_width = 8,
113 .host_caps = (MMC_CAP_8_BIT_DATA | MMC_CAP_4_BIT_DATA |
114 MMC_CAP_MMC_HIGHSPEED | MMC_CAP_SD_HIGHSPEED |
115 MMC_CAP_ERASE),
116 .cd_type = S3C_SDHCI_CD_PERMANENT,
117};
118
119static struct regulator_consumer_supply emmc_supplies[] = {
120 REGULATOR_SUPPLY("vmmc", "exynos4-sdhci.0"),
121 REGULATOR_SUPPLY("vmmc", "dw_mmc"),
122};
123
124static struct regulator_init_data emmc_fixed_voltage_init_data = {
125 .constraints = {
126 .name = "VMEM_VDD_2.8V",
127 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
128 },
129 .num_consumer_supplies = ARRAY_SIZE(emmc_supplies),
130 .consumer_supplies = emmc_supplies,
131};
132
133static struct fixed_voltage_config emmc_fixed_voltage_config = {
134 .supply_name = "MASSMEMORY_EN (inverted)",
135 .microvolts = 2800000,
136 .gpio = EXYNOS4_GPL1(1),
137 .enable_high = false,
138 .init_data = &emmc_fixed_voltage_init_data,
139};
140
141static struct platform_device emmc_fixed_voltage = {
142 .name = "reg-fixed-voltage",
143 .id = FIXED_REG_ID_MMC,
144 .dev = {
145 .platform_data = &emmc_fixed_voltage_config,
146 },
147};
148
149/* SD */
150static struct s3c_sdhci_platdata nuri_hsmmc2_data __initdata = {
151 .max_width = 4,
152 .host_caps = MMC_CAP_4_BIT_DATA |
153 MMC_CAP_MMC_HIGHSPEED | MMC_CAP_SD_HIGHSPEED,
154 .ext_cd_gpio = EXYNOS4_GPX3(3), /* XEINT_27 */
155 .ext_cd_gpio_invert = 1,
156 .cd_type = S3C_SDHCI_CD_GPIO,
157};
158
159/* WLAN */
160static struct s3c_sdhci_platdata nuri_hsmmc3_data __initdata = {
161 .max_width = 4,
162 .host_caps = MMC_CAP_4_BIT_DATA |
163 MMC_CAP_MMC_HIGHSPEED | MMC_CAP_SD_HIGHSPEED,
164 .cd_type = S3C_SDHCI_CD_EXTERNAL,
165};
166
167static void __init nuri_sdhci_init(void)
168{
169 s3c_sdhci0_set_platdata(&nuri_hsmmc0_data);
170 s3c_sdhci2_set_platdata(&nuri_hsmmc2_data);
171 s3c_sdhci3_set_platdata(&nuri_hsmmc3_data);
172}
173
174/* GPIO KEYS */
175static struct gpio_keys_button nuri_gpio_keys_tables[] = {
176 {
177 .code = KEY_VOLUMEUP,
178 .gpio = EXYNOS4_GPX2(0), /* XEINT16 */
179 .desc = "gpio-keys: KEY_VOLUMEUP",
180 .type = EV_KEY,
181 .active_low = 1,
182 .debounce_interval = 1,
183 }, {
184 .code = KEY_VOLUMEDOWN,
185 .gpio = EXYNOS4_GPX2(1), /* XEINT17 */
186 .desc = "gpio-keys: KEY_VOLUMEDOWN",
187 .type = EV_KEY,
188 .active_low = 1,
189 .debounce_interval = 1,
190 }, {
191 .code = KEY_POWER,
192 .gpio = EXYNOS4_GPX2(7), /* XEINT23 */
193 .desc = "gpio-keys: KEY_POWER",
194 .type = EV_KEY,
195 .active_low = 1,
196 .wakeup = 1,
197 .debounce_interval = 1,
198 },
199};
200
201static struct gpio_keys_platform_data nuri_gpio_keys_data = {
202 .buttons = nuri_gpio_keys_tables,
203 .nbuttons = ARRAY_SIZE(nuri_gpio_keys_tables),
204};
205
206static struct platform_device nuri_gpio_keys = {
207 .name = "gpio-keys",
208 .dev = {
209 .platform_data = &nuri_gpio_keys_data,
210 },
211};
212
213#ifdef CONFIG_DRM_EXYNOS
214static struct exynos_drm_fimd_pdata drm_fimd_pdata = {
215 .panel = {
216 .timing = {
217 .xres = 1024,
218 .yres = 600,
219 .hsync_len = 40,
220 .left_margin = 79,
221 .right_margin = 200,
222 .vsync_len = 10,
223 .upper_margin = 10,
224 .lower_margin = 11,
225 .refresh = 60,
226 },
227 },
228 .vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB |
229 VIDCON0_CLKSEL_LCD,
230 .vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC,
231 .default_win = 3,
232 .bpp = 32,
233};
234
235#else
236/* Frame Buffer */
237static struct s3c_fb_pd_win nuri_fb_win0 = {
238 .max_bpp = 24,
239 .default_bpp = 16,
240 .xres = 1024,
241 .yres = 600,
242 .virtual_x = 1024,
243 .virtual_y = 2 * 600,
244};
245
246static struct fb_videomode nuri_lcd_timing = {
247 .left_margin = 64,
248 .right_margin = 16,
249 .upper_margin = 64,
250 .lower_margin = 1,
251 .hsync_len = 48,
252 .vsync_len = 3,
253 .xres = 1024,
254 .yres = 600,
255 .refresh = 60,
256};
257
258static struct s3c_fb_platdata nuri_fb_pdata __initdata = {
259 .win[0] = &nuri_fb_win0,
260 .vtiming = &nuri_lcd_timing,
261 .vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB |
262 VIDCON0_CLKSEL_LCD,
263 .vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC,
264 .setup_gpio = exynos4_fimd0_gpio_setup_24bpp,
265};
266#endif
267
268static void nuri_lcd_power_on(struct plat_lcd_data *pd, unsigned int power)
269{
270 int gpio = EXYNOS4_GPE1(5);
271
272 gpio_request(gpio, "LVDS_nSHDN");
273 gpio_direction_output(gpio, power);
274 gpio_free(gpio);
275}
276
277static int nuri_bl_init(struct device *dev)
278{
279 return gpio_request_one(EXYNOS4_GPE2(3), GPIOF_OUT_INIT_LOW,
280 "LCD_LD0_EN");
281}
282
283static int nuri_bl_notify(struct device *dev, int brightness)
284{
285 if (brightness < 1)
286 brightness = 0;
287
288 gpio_set_value(EXYNOS4_GPE2(3), 1);
289
290 return brightness;
291}
292
293static void nuri_bl_exit(struct device *dev)
294{
295 gpio_free(EXYNOS4_GPE2(3));
296}
297
298/* nuri pwm backlight */
299static struct platform_pwm_backlight_data nuri_backlight_data = {
300 .pwm_id = 0,
301 .pwm_period_ns = 30000,
302 .max_brightness = 100,
303 .dft_brightness = 50,
304 .init = nuri_bl_init,
305 .notify = nuri_bl_notify,
306 .exit = nuri_bl_exit,
307};
308
309static struct platform_device nuri_backlight_device = {
310 .name = "pwm-backlight",
311 .id = -1,
312 .dev = {
313 .parent = &s3c_device_timer[0].dev,
314 .platform_data = &nuri_backlight_data,
315 },
316};
317
318static struct plat_lcd_data nuri_lcd_platform_data = {
319 .set_power = nuri_lcd_power_on,
320};
321
322static struct platform_device nuri_lcd_device = {
323 .name = "platform-lcd",
324 .id = -1,
325 .dev = {
326 .platform_data = &nuri_lcd_platform_data,
327 },
328};
329
330/* I2C1 */
331static struct i2c_board_info i2c1_devs[] __initdata = {
332 /* Gyro, To be updated */
333};
334
335/* TSP */
336static struct mxt_platform_data mxt_platform_data = {
337 .x_line = 18,
338 .y_line = 11,
339 .x_size = 1024,
340 .y_size = 600,
341 .blen = 0x1,
342 .threshold = 0x28,
343 .voltage = 2800000, /* 2.8V */
344 .orient = MXT_DIAGONAL_COUNTER,
345 .irqflags = IRQF_TRIGGER_FALLING,
346};
347
348static struct s3c2410_platform_i2c i2c3_data __initdata = {
349 .flags = 0,
350 .bus_num = 3,
351 .slave_addr = 0x10,
352 .frequency = 400 * 1000,
353 .sda_delay = 100,
354};
355
356static struct i2c_board_info i2c3_devs[] __initdata = {
357 {
358 I2C_BOARD_INFO("atmel_mxt_ts", 0x4a),
359 .platform_data = &mxt_platform_data,
360 .irq = IRQ_EINT(4),
361 },
362};
363
364static void __init nuri_tsp_init(void)
365{
366 int gpio;
367
368 /* TOUCH_INT: XEINT_4 */
369 gpio = EXYNOS4_GPX0(4);
370 gpio_request(gpio, "TOUCH_INT");
371 s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(0xf));
372 s3c_gpio_setpull(gpio, S3C_GPIO_PULL_UP);
373}
374
375static struct regulator_consumer_supply __initdata max8997_ldo1_[] = {
376 REGULATOR_SUPPLY("vdd", "s5p-adc"), /* Used by CPU's ADC drv */
377};
378static struct regulator_consumer_supply __initdata max8997_ldo3_[] = {
379 REGULATOR_SUPPLY("vusb_d", "s3c-hsotg"), /* USB */
380 REGULATOR_SUPPLY("vddcore", "s5p-mipi-csis.0"), /* MIPI */
381};
382static struct regulator_consumer_supply __initdata max8997_ldo4_[] = {
383 REGULATOR_SUPPLY("vddio", "s5p-mipi-csis.0"), /* MIPI */
384};
385static struct regulator_consumer_supply __initdata max8997_ldo5_[] = {
386 REGULATOR_SUPPLY("vhsic", "modemctl"), /* MODEM */
387};
388static struct regulator_consumer_supply nuri_max8997_ldo6_consumer[] = {
389 REGULATOR_SUPPLY("vdd_reg", "6-003c"), /* S5K6AA camera */
390};
391static struct regulator_consumer_supply __initdata max8997_ldo7_[] = {
392 REGULATOR_SUPPLY("dig_18", "0-001f"), /* HCD803 */
393};
394static struct regulator_consumer_supply __initdata max8997_ldo8_[] = {
395 REGULATOR_SUPPLY("vusb_a", "s3c-hsotg"), /* USB */
396 REGULATOR_SUPPLY("vdac", NULL), /* Used by CPU */
397};
398static struct regulator_consumer_supply __initdata max8997_ldo11_[] = {
399 REGULATOR_SUPPLY("vcc", "platform-lcd"), /* U804 LVDS */
400};
401static struct regulator_consumer_supply __initdata max8997_ldo12_[] = {
402 REGULATOR_SUPPLY("vddio", "6-003c"), /* HDC802 */
403};
404static struct regulator_consumer_supply __initdata max8997_ldo13_[] = {
405 REGULATOR_SUPPLY("vmmc", "exynos4-sdhci.2"), /* TFLASH */
406};
407static struct regulator_consumer_supply __initdata max8997_ldo14_[] = {
408 REGULATOR_SUPPLY("inmotor", "max8997-haptic"),
409};
410static struct regulator_consumer_supply __initdata max8997_ldo15_[] = {
411 REGULATOR_SUPPLY("avdd", "3-004a"), /* Touch Screen */
412};
413static struct regulator_consumer_supply __initdata max8997_ldo16_[] = {
414 REGULATOR_SUPPLY("d_sensor", "0-001f"), /* HDC803 */
415};
416static struct regulator_consumer_supply __initdata max8997_ldo18_[] = {
417 REGULATOR_SUPPLY("vdd", "3-004a"), /* Touch Screen */
418};
419static struct regulator_consumer_supply __initdata max8997_buck1_[] = {
420 REGULATOR_SUPPLY("vdd_arm", NULL), /* CPUFREQ */
421};
422static struct regulator_consumer_supply __initdata max8997_buck2_[] = {
423 REGULATOR_SUPPLY("vdd_int", "exynos4210-busfreq.0"), /* CPUFREQ */
424};
425static struct regulator_consumer_supply __initdata max8997_buck3_[] = {
426 REGULATOR_SUPPLY("vdd", "mali_dev.0"), /* G3D of Exynos 4 */
427};
428static struct regulator_consumer_supply __initdata max8997_buck4_[] = {
429 REGULATOR_SUPPLY("core", "0-001f"), /* HDC803 */
430};
431static struct regulator_consumer_supply __initdata max8997_buck6_[] = {
432 REGULATOR_SUPPLY("dig_28", "0-001f"), /* pin "7" of HDC803 */
433};
434static struct regulator_consumer_supply __initdata max8997_esafeout1_[] = {
435 REGULATOR_SUPPLY("usb_vbus", NULL), /* CPU's USB OTG */
436};
437static struct regulator_consumer_supply __initdata max8997_esafeout2_[] = {
438 REGULATOR_SUPPLY("usb_vbus", "modemctl"), /* VBUS of Modem */
439};
440
441static struct regulator_consumer_supply __initdata max8997_charger_[] = {
442 REGULATOR_SUPPLY("vinchg1", "charger-manager.0"),
443};
444static struct regulator_consumer_supply __initdata max8997_chg_toff_[] = {
445 REGULATOR_SUPPLY("vinchg_stop", NULL), /* for jack interrupt handlers */
446};
447
448static struct regulator_consumer_supply __initdata max8997_32khz_ap_[] = {
449 REGULATOR_SUPPLY("gps_clk", "bcm4751"),
450 REGULATOR_SUPPLY("bt_clk", "bcm4330-b1"),
451 REGULATOR_SUPPLY("wifi_clk", "bcm433-b1"),
452};
453
454static struct regulator_init_data __initdata max8997_ldo1_data = {
455 .constraints = {
456 .name = "VADC_3.3V_C210",
457 .min_uV = 3300000,
458 .max_uV = 3300000,
459 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
460 .apply_uV = 1,
461 .state_mem = {
462 .disabled = 1,
463 },
464 },
465 .num_consumer_supplies = ARRAY_SIZE(max8997_ldo1_),
466 .consumer_supplies = max8997_ldo1_,
467};
468
469static struct regulator_init_data __initdata max8997_ldo2_data = {
470 .constraints = {
471 .name = "VALIVE_1.1V_C210",
472 .min_uV = 1100000,
473 .max_uV = 1100000,
474 .apply_uV = 1,
475 .always_on = 1,
476 .state_mem = {
477 .enabled = 1,
478 },
479 },
480};
481
482static struct regulator_init_data __initdata max8997_ldo3_data = {
483 .constraints = {
484 .name = "VUSB_1.1V_C210",
485 .min_uV = 1100000,
486 .max_uV = 1100000,
487 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
488 .apply_uV = 1,
489 .state_mem = {
490 .disabled = 1,
491 },
492 },
493 .num_consumer_supplies = ARRAY_SIZE(max8997_ldo3_),
494 .consumer_supplies = max8997_ldo3_,
495};
496
497static struct regulator_init_data __initdata max8997_ldo4_data = {
498 .constraints = {
499 .name = "VMIPI_1.8V",
500 .min_uV = 1800000,
501 .max_uV = 1800000,
502 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
503 .apply_uV = 1,
504 .state_mem = {
505 .disabled = 1,
506 },
507 },
508 .num_consumer_supplies = ARRAY_SIZE(max8997_ldo4_),
509 .consumer_supplies = max8997_ldo4_,
510};
511
512static struct regulator_init_data __initdata max8997_ldo5_data = {
513 .constraints = {
514 .name = "VHSIC_1.2V_C210",
515 .min_uV = 1200000,
516 .max_uV = 1200000,
517 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
518 .apply_uV = 1,
519 .state_mem = {
520 .disabled = 1,
521 },
522 },
523 .num_consumer_supplies = ARRAY_SIZE(max8997_ldo5_),
524 .consumer_supplies = max8997_ldo5_,
525};
526
527static struct regulator_init_data __initdata max8997_ldo6_data = {
528 .constraints = {
529 .name = "VCC_1.8V_PDA",
530 .min_uV = 1800000,
531 .max_uV = 1800000,
532 .apply_uV = 1,
533 .always_on = 1,
534 .state_mem = {
535 .enabled = 1,
536 },
537 },
538 .num_consumer_supplies = ARRAY_SIZE(nuri_max8997_ldo6_consumer),
539 .consumer_supplies = nuri_max8997_ldo6_consumer,
540};
541
542static struct regulator_init_data __initdata max8997_ldo7_data = {
543 .constraints = {
544 .name = "CAM_ISP_1.8V",
545 .min_uV = 1800000,
546 .max_uV = 1800000,
547 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
548 .apply_uV = 1,
549 .state_mem = {
550 .disabled = 1,
551 },
552 },
553 .num_consumer_supplies = ARRAY_SIZE(max8997_ldo7_),
554 .consumer_supplies = max8997_ldo7_,
555};
556
557static struct regulator_init_data __initdata max8997_ldo8_data = {
558 .constraints = {
559 .name = "VUSB+VDAC_3.3V_C210",
560 .min_uV = 3300000,
561 .max_uV = 3300000,
562 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
563 .apply_uV = 1,
564 .state_mem = {
565 .disabled = 1,
566 },
567 },
568 .num_consumer_supplies = ARRAY_SIZE(max8997_ldo8_),
569 .consumer_supplies = max8997_ldo8_,
570};
571
572static struct regulator_init_data __initdata max8997_ldo9_data = {
573 .constraints = {
574 .name = "VCC_2.8V_PDA",
575 .min_uV = 2800000,
576 .max_uV = 2800000,
577 .apply_uV = 1,
578 .always_on = 1,
579 .state_mem = {
580 .enabled = 1,
581 },
582 },
583};
584
585static struct regulator_init_data __initdata max8997_ldo10_data = {
586 .constraints = {
587 .name = "VPLL_1.1V_C210",
588 .min_uV = 1100000,
589 .max_uV = 1100000,
590 .apply_uV = 1,
591 .always_on = 1,
592 .state_mem = {
593 .disabled = 1,
594 },
595 },
596};
597
598static struct regulator_init_data __initdata max8997_ldo11_data = {
599 .constraints = {
600 .name = "LVDS_VDD3.3V",
601 .min_uV = 3300000,
602 .max_uV = 3300000,
603 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
604 .apply_uV = 1,
605 .boot_on = 1,
606 .state_mem = {
607 .disabled = 1,
608 },
609 },
610 .num_consumer_supplies = ARRAY_SIZE(max8997_ldo11_),
611 .consumer_supplies = max8997_ldo11_,
612};
613
614static struct regulator_init_data __initdata max8997_ldo12_data = {
615 .constraints = {
616 .name = "VT_CAM_1.8V",
617 .min_uV = 1800000,
618 .max_uV = 1800000,
619 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
620 .apply_uV = 1,
621 .state_mem = {
622 .disabled = 1,
623 },
624 },
625 .num_consumer_supplies = ARRAY_SIZE(max8997_ldo12_),
626 .consumer_supplies = max8997_ldo12_,
627};
628
629static struct regulator_init_data __initdata max8997_ldo13_data = {
630 .constraints = {
631 .name = "VTF_2.8V",
632 .min_uV = 2800000,
633 .max_uV = 2800000,
634 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
635 .apply_uV = 1,
636 .state_mem = {
637 .disabled = 1,
638 },
639 },
640 .num_consumer_supplies = ARRAY_SIZE(max8997_ldo13_),
641 .consumer_supplies = max8997_ldo13_,
642};
643
644static struct regulator_init_data __initdata max8997_ldo14_data = {
645 .constraints = {
646 .name = "VCC_3.0V_MOTOR",
647 .min_uV = 3000000,
648 .max_uV = 3000000,
649 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
650 .apply_uV = 1,
651 .state_mem = {
652 .disabled = 1,
653 },
654 },
655 .num_consumer_supplies = ARRAY_SIZE(max8997_ldo14_),
656 .consumer_supplies = max8997_ldo14_,
657};
658
659static struct regulator_init_data __initdata max8997_ldo15_data = {
660 .constraints = {
661 .name = "VTOUCH_ADVV2.8V",
662 .min_uV = 2800000,
663 .max_uV = 2800000,
664 .apply_uV = 1,
665 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
666 .state_mem = {
667 .disabled = 1,
668 },
669 },
670 .num_consumer_supplies = ARRAY_SIZE(max8997_ldo15_),
671 .consumer_supplies = max8997_ldo15_,
672};
673
674static struct regulator_init_data __initdata max8997_ldo16_data = {
675 .constraints = {
676 .name = "CAM_SENSOR_IO_1.8V",
677 .min_uV = 1800000,
678 .max_uV = 1800000,
679 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
680 .apply_uV = 1,
681 .state_mem = {
682 .disabled = 1,
683 },
684 },
685 .num_consumer_supplies = ARRAY_SIZE(max8997_ldo16_),
686 .consumer_supplies = max8997_ldo16_,
687};
688
689static struct regulator_init_data __initdata max8997_ldo18_data = {
690 .constraints = {
691 .name = "VTOUCH_VDD2.8V",
692 .min_uV = 2800000,
693 .max_uV = 2800000,
694 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
695 .apply_uV = 1,
696 .state_mem = {
697 .disabled = 1,
698 },
699 },
700 .num_consumer_supplies = ARRAY_SIZE(max8997_ldo18_),
701 .consumer_supplies = max8997_ldo18_,
702};
703
704static struct regulator_init_data __initdata max8997_ldo21_data = {
705 .constraints = {
706 .name = "VDDQ_M1M2_1.2V",
707 .min_uV = 1200000,
708 .max_uV = 1200000,
709 .apply_uV = 1,
710 .always_on = 1,
711 .state_mem = {
712 .disabled = 1,
713 },
714 },
715};
716
717static struct regulator_init_data __initdata max8997_buck1_data = {
718 .constraints = {
719 .name = "VARM_1.2V_C210",
720 .min_uV = 900000,
721 .max_uV = 1350000,
722 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE,
723 .always_on = 1,
724 .state_mem = {
725 .disabled = 1,
726 },
727 },
728 .num_consumer_supplies = ARRAY_SIZE(max8997_buck1_),
729 .consumer_supplies = max8997_buck1_,
730};
731
732static struct regulator_init_data __initdata max8997_buck2_data = {
733 .constraints = {
734 .name = "VINT_1.1V_C210",
735 .min_uV = 900000,
736 .max_uV = 1200000,
737 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE,
738 .always_on = 1,
739 .state_mem = {
740 .disabled = 1,
741 },
742 },
743 .num_consumer_supplies = ARRAY_SIZE(max8997_buck2_),
744 .consumer_supplies = max8997_buck2_,
745};
746
747static struct regulator_init_data __initdata max8997_buck3_data = {
748 .constraints = {
749 .name = "VG3D_1.1V_C210",
750 .min_uV = 900000,
751 .max_uV = 1100000,
752 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE |
753 REGULATOR_CHANGE_STATUS,
754 .state_mem = {
755 .disabled = 1,
756 },
757 },
758 .num_consumer_supplies = ARRAY_SIZE(max8997_buck3_),
759 .consumer_supplies = max8997_buck3_,
760};
761
762static struct regulator_init_data __initdata max8997_buck4_data = {
763 .constraints = {
764 .name = "CAM_ISP_CORE_1.2V",
765 .min_uV = 1200000,
766 .max_uV = 1200000,
767 .apply_uV = 1,
768 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
769 .state_mem = {
770 .disabled = 1,
771 },
772 },
773 .num_consumer_supplies = ARRAY_SIZE(max8997_buck4_),
774 .consumer_supplies = max8997_buck4_,
775};
776
777static struct regulator_init_data __initdata max8997_buck5_data = {
778 .constraints = {
779 .name = "VMEM_1.2V_C210",
780 .min_uV = 1200000,
781 .max_uV = 1200000,
782 .apply_uV = 1,
783 .always_on = 1,
784 .state_mem = {
785 .enabled = 1,
786 },
787 },
788};
789
790static struct regulator_init_data __initdata max8997_buck6_data = {
791 .constraints = {
792 .name = "CAM_AF_2.8V",
793 .min_uV = 2800000,
794 .max_uV = 2800000,
795 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
796 .state_mem = {
797 .disabled = 1,
798 },
799 },
800 .num_consumer_supplies = ARRAY_SIZE(max8997_buck6_),
801 .consumer_supplies = max8997_buck6_,
802};
803
804static struct regulator_init_data __initdata max8997_buck7_data = {
805 .constraints = {
806 .name = "VCC_SUB_2.0V",
807 .min_uV = 2000000,
808 .max_uV = 2000000,
809 .apply_uV = 1,
810 .always_on = 1,
811 .state_mem = {
812 .enabled = 1,
813 },
814 },
815};
816
817static struct regulator_init_data __initdata max8997_32khz_ap_data = {
818 .constraints = {
819 .name = "32KHz AP",
820 .always_on = 1,
821 .state_mem = {
822 .enabled = 1,
823 },
824 },
825 .num_consumer_supplies = ARRAY_SIZE(max8997_32khz_ap_),
826 .consumer_supplies = max8997_32khz_ap_,
827};
828
829static struct regulator_init_data __initdata max8997_32khz_cp_data = {
830 .constraints = {
831 .name = "32KHz CP",
832 .state_mem = {
833 .disabled = 1,
834 },
835 },
836};
837
838static struct regulator_init_data __initdata max8997_vichg_data = {
839 .constraints = {
840 .name = "VICHG",
841 .state_mem = {
842 .disabled = 1,
843 },
844 },
845};
846
847static struct regulator_init_data __initdata max8997_esafeout1_data = {
848 .constraints = {
849 .name = "SAFEOUT1",
850 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
851 .always_on = 1,
852 .state_mem = {
853 .disabled = 1,
854 },
855 },
856 .num_consumer_supplies = ARRAY_SIZE(max8997_esafeout1_),
857 .consumer_supplies = max8997_esafeout1_,
858};
859
860static struct regulator_init_data __initdata max8997_esafeout2_data = {
861 .constraints = {
862 .name = "SAFEOUT2",
863 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
864 .state_mem = {
865 .disabled = 1,
866 },
867 },
868 .num_consumer_supplies = ARRAY_SIZE(max8997_esafeout2_),
869 .consumer_supplies = max8997_esafeout2_,
870};
871
872static struct regulator_init_data __initdata max8997_charger_cv_data = {
873 .constraints = {
874 .name = "CHARGER_CV",
875 .min_uV = 4200000,
876 .max_uV = 4200000,
877 .apply_uV = 1,
878 },
879};
880
881static struct regulator_init_data __initdata max8997_charger_data = {
882 .constraints = {
883 .name = "CHARGER",
884 .min_uA = 200000,
885 .max_uA = 950000,
886 .boot_on = 1,
887 .valid_ops_mask = REGULATOR_CHANGE_STATUS |
888 REGULATOR_CHANGE_CURRENT,
889 },
890 .num_consumer_supplies = ARRAY_SIZE(max8997_charger_),
891 .consumer_supplies = max8997_charger_,
892};
893
894static struct regulator_init_data __initdata max8997_charger_topoff_data = {
895 .constraints = {
896 .name = "CHARGER TOPOFF",
897 .min_uA = 50000,
898 .max_uA = 200000,
899 .valid_ops_mask = REGULATOR_CHANGE_CURRENT,
900 },
901 .num_consumer_supplies = ARRAY_SIZE(max8997_chg_toff_),
902 .consumer_supplies = max8997_chg_toff_,
903};
904
905static struct max8997_regulator_data __initdata nuri_max8997_regulators[] = {
906 { MAX8997_LDO1, &max8997_ldo1_data },
907 { MAX8997_LDO2, &max8997_ldo2_data },
908 { MAX8997_LDO3, &max8997_ldo3_data },
909 { MAX8997_LDO4, &max8997_ldo4_data },
910 { MAX8997_LDO5, &max8997_ldo5_data },
911 { MAX8997_LDO6, &max8997_ldo6_data },
912 { MAX8997_LDO7, &max8997_ldo7_data },
913 { MAX8997_LDO8, &max8997_ldo8_data },
914 { MAX8997_LDO9, &max8997_ldo9_data },
915 { MAX8997_LDO10, &max8997_ldo10_data },
916 { MAX8997_LDO11, &max8997_ldo11_data },
917 { MAX8997_LDO12, &max8997_ldo12_data },
918 { MAX8997_LDO13, &max8997_ldo13_data },
919 { MAX8997_LDO14, &max8997_ldo14_data },
920 { MAX8997_LDO15, &max8997_ldo15_data },
921 { MAX8997_LDO16, &max8997_ldo16_data },
922
923 { MAX8997_LDO18, &max8997_ldo18_data },
924 { MAX8997_LDO21, &max8997_ldo21_data },
925
926 { MAX8997_BUCK1, &max8997_buck1_data },
927 { MAX8997_BUCK2, &max8997_buck2_data },
928 { MAX8997_BUCK3, &max8997_buck3_data },
929 { MAX8997_BUCK4, &max8997_buck4_data },
930 { MAX8997_BUCK5, &max8997_buck5_data },
931 { MAX8997_BUCK6, &max8997_buck6_data },
932 { MAX8997_BUCK7, &max8997_buck7_data },
933
934 { MAX8997_EN32KHZ_AP, &max8997_32khz_ap_data },
935 { MAX8997_EN32KHZ_CP, &max8997_32khz_cp_data },
936
937 { MAX8997_ENVICHG, &max8997_vichg_data },
938 { MAX8997_ESAFEOUT1, &max8997_esafeout1_data },
939 { MAX8997_ESAFEOUT2, &max8997_esafeout2_data },
940 { MAX8997_CHARGER_CV, &max8997_charger_cv_data },
941 { MAX8997_CHARGER, &max8997_charger_data },
942 { MAX8997_CHARGER_TOPOFF, &max8997_charger_topoff_data },
943};
944
945static struct max8997_platform_data __initdata nuri_max8997_pdata = {
946 .wakeup = 1,
947
948 .num_regulators = ARRAY_SIZE(nuri_max8997_regulators),
949 .regulators = nuri_max8997_regulators,
950
951 .buck125_gpios = { EXYNOS4_GPX0(5), EXYNOS4_GPX0(6), EXYNOS4_GPL0(0) },
952
953 .buck1_voltage[0] = 1350000, /* 1.35V */
954 .buck1_voltage[1] = 1300000, /* 1.3V */
955 .buck1_voltage[2] = 1250000, /* 1.25V */
956 .buck1_voltage[3] = 1200000, /* 1.2V */
957 .buck1_voltage[4] = 1150000, /* 1.15V */
958 .buck1_voltage[5] = 1100000, /* 1.1V */
959 .buck1_voltage[6] = 1000000, /* 1.0V */
960 .buck1_voltage[7] = 950000, /* 0.95V */
961
962 .buck2_voltage[0] = 1100000, /* 1.1V */
963 .buck2_voltage[1] = 1000000, /* 1.0V */
964 .buck2_voltage[2] = 950000, /* 0.95V */
965 .buck2_voltage[3] = 900000, /* 0.9V */
966 .buck2_voltage[4] = 1100000, /* 1.1V */
967 .buck2_voltage[5] = 1000000, /* 1.0V */
968 .buck2_voltage[6] = 950000, /* 0.95V */
969 .buck2_voltage[7] = 900000, /* 0.9V */
970
971 .buck5_voltage[0] = 1200000, /* 1.2V */
972 .buck5_voltage[1] = 1200000, /* 1.2V */
973 .buck5_voltage[2] = 1200000, /* 1.2V */
974 .buck5_voltage[3] = 1200000, /* 1.2V */
975 .buck5_voltage[4] = 1200000, /* 1.2V */
976 .buck5_voltage[5] = 1200000, /* 1.2V */
977 .buck5_voltage[6] = 1200000, /* 1.2V */
978 .buck5_voltage[7] = 1200000, /* 1.2V */
979};
980
981/* GPIO I2C 5 (PMIC) */
982enum { I2C5_MAX8997 };
983static struct i2c_board_info i2c5_devs[] __initdata = {
984 [I2C5_MAX8997] = {
985 I2C_BOARD_INFO("max8997", 0xCC >> 1),
986 .platform_data = &nuri_max8997_pdata,
987 },
988};
989
990static struct max17042_platform_data nuri_battery_platform_data = {
991};
992
993/* GPIO I2C 9 (Fuel Gauge) */
994static struct i2c_gpio_platform_data i2c9_gpio_data = {
995 .sda_pin = EXYNOS4_GPY4(0), /* XM0ADDR_8 */
996 .scl_pin = EXYNOS4_GPY4(1), /* XM0ADDR_9 */
997};
998static struct platform_device i2c9_gpio = {
999 .name = "i2c-gpio",
1000 .id = 9,
1001 .dev = {
1002 .platform_data = &i2c9_gpio_data,
1003 },
1004};
1005enum { I2C9_MAX17042};
1006static struct i2c_board_info i2c9_devs[] __initdata = {
1007 [I2C9_MAX17042] = {
1008 I2C_BOARD_INFO("max17042", 0x36),
1009 .platform_data = &nuri_battery_platform_data,
1010 },
1011};
1012
1013/* MAX8903 Secondary Charger */
1014static struct regulator_consumer_supply supplies_max8903[] = {
1015 REGULATOR_SUPPLY("vinchg2", "charger-manager.0"),
1016};
1017
1018static struct regulator_init_data max8903_charger_en_data = {
1019 .constraints = {
1020 .name = "VOUT_CHARGER",
1021 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
1022 .boot_on = 1,
1023 },
1024 .num_consumer_supplies = ARRAY_SIZE(supplies_max8903),
1025 .consumer_supplies = supplies_max8903,
1026};
1027
1028static struct fixed_voltage_config max8903_charger_en = {
1029 .supply_name = "VOUT_CHARGER",
1030 .microvolts = 5000000, /* Assume 5VDC */
1031 .gpio = EXYNOS4_GPY4(5), /* TA_EN negaged */
1032 .enable_high = 0, /* Enable = Low */
1033 .enabled_at_boot = 1,
1034 .init_data = &max8903_charger_en_data,
1035};
1036
1037static struct platform_device max8903_fixed_reg_dev = {
1038 .name = "reg-fixed-voltage",
1039 .id = FIXED_REG_ID_MAX8903,
1040 .dev = { .platform_data = &max8903_charger_en },
1041};
1042
1043static struct max8903_pdata nuri_max8903 = {
1044 /*
1045 * cen: don't control with the driver, let it be
1046 * controlled by regulator above
1047 */
1048 .dok = EXYNOS4_GPX1(4), /* TA_nCONNECTED */
1049 /* uok, usus: not connected */
1050 .chg = EXYNOS4_GPE2(0), /* TA_nCHG */
1051 /* flt: vcc_1.8V_pda */
1052 .dcm = EXYNOS4_GPL0(1), /* CURR_ADJ */
1053
1054 .dc_valid = true,
1055 .usb_valid = false, /* USB is not wired to MAX8903 */
1056};
1057
1058static struct platform_device nuri_max8903_device = {
1059 .name = "max8903-charger",
1060 .dev = {
1061 .platform_data = &nuri_max8903,
1062 },
1063};
1064
1065static void __init nuri_power_init(void)
1066{
1067 int gpio;
1068 int ta_en = 0;
1069
1070 gpio = EXYNOS4_GPX0(7);
1071 gpio_request(gpio, "AP_PMIC_IRQ");
1072 s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(0xf));
1073 s3c_gpio_setpull(gpio, S3C_GPIO_PULL_NONE);
1074
1075 gpio = EXYNOS4_GPX2(3);
1076 gpio_request(gpio, "FUEL_ALERT");
1077 s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(0xf));
1078 s3c_gpio_setpull(gpio, S3C_GPIO_PULL_NONE);
1079
1080 gpio = nuri_max8903.dok;
1081 gpio_request(gpio, "TA_nCONNECTED");
1082 s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(0xf));
1083 s3c_gpio_setpull(gpio, S3C_GPIO_PULL_NONE);
1084 ta_en = gpio_get_value(gpio) ? 0 : 1;
1085
1086 gpio = nuri_max8903.chg;
1087 gpio_request(gpio, "TA_nCHG");
1088 gpio_direction_input(gpio);
1089
1090 gpio = nuri_max8903.dcm;
1091 gpio_request(gpio, "CURR_ADJ");
1092 gpio_direction_output(gpio, ta_en);
1093}
1094
1095/* USB EHCI */
1096static struct s5p_ehci_platdata nuri_ehci_pdata;
1097
1098static void __init nuri_ehci_init(void)
1099{
1100 struct s5p_ehci_platdata *pdata = &nuri_ehci_pdata;
1101
1102 s5p_ehci_set_platdata(pdata);
1103}
1104
1105/* USB OTG */
1106static struct s3c_hsotg_plat nuri_hsotg_pdata;
1107
1108/* CAMERA */
1109static struct regulator_consumer_supply cam_vt_cam15_supply =
1110 REGULATOR_SUPPLY("vdd_core", "6-003c");
1111
1112static struct regulator_init_data cam_vt_cam15_reg_init_data = {
1113 .constraints = { .valid_ops_mask = REGULATOR_CHANGE_STATUS },
1114 .num_consumer_supplies = 1,
1115 .consumer_supplies = &cam_vt_cam15_supply,
1116};
1117
1118static struct fixed_voltage_config cam_vt_cam15_fixed_voltage_cfg = {
1119 .supply_name = "VT_CAM_1.5V",
1120 .microvolts = 1500000,
1121 .gpio = EXYNOS4_GPE2(2), /* VT_CAM_1.5V_EN */
1122 .enable_high = 1,
1123 .init_data = &cam_vt_cam15_reg_init_data,
1124};
1125
1126static struct platform_device cam_vt_cam15_fixed_rdev = {
1127 .name = "reg-fixed-voltage", .id = FIXED_REG_ID_CAM_VT_15V,
1128 .dev = { .platform_data = &cam_vt_cam15_fixed_voltage_cfg },
1129};
1130
1131static struct regulator_consumer_supply cam_vdda_supply[] = {
1132 REGULATOR_SUPPLY("vdda", "6-003c"),
1133 REGULATOR_SUPPLY("a_sensor", "0-001f"),
1134};
1135
1136static struct regulator_init_data cam_vdda_reg_init_data = {
1137 .constraints = { .valid_ops_mask = REGULATOR_CHANGE_STATUS },
1138 .num_consumer_supplies = ARRAY_SIZE(cam_vdda_supply),
1139 .consumer_supplies = cam_vdda_supply,
1140};
1141
1142static struct fixed_voltage_config cam_vdda_fixed_voltage_cfg = {
1143 .supply_name = "CAM_IO_EN",
1144 .microvolts = 2800000,
1145 .gpio = EXYNOS4_GPE2(1), /* CAM_IO_EN */
1146 .enable_high = 1,
1147 .init_data = &cam_vdda_reg_init_data,
1148};
1149
1150static struct platform_device cam_vdda_fixed_rdev = {
1151 .name = "reg-fixed-voltage", .id = FIXED_REG_ID_CAM_A28V,
1152 .dev = { .platform_data = &cam_vdda_fixed_voltage_cfg },
1153};
1154
1155static struct regulator_consumer_supply camera_8m_12v_supply =
1156 REGULATOR_SUPPLY("dig_12", "0-001f");
1157
1158static struct regulator_init_data cam_8m_12v_reg_init_data = {
1159 .num_consumer_supplies = 1,
1160 .consumer_supplies = &camera_8m_12v_supply,
1161 .constraints = {
1162 .valid_ops_mask = REGULATOR_CHANGE_STATUS
1163 },
1164};
1165
1166static struct fixed_voltage_config cam_8m_12v_fixed_voltage_cfg = {
1167 .supply_name = "8M_1.2V",
1168 .microvolts = 1200000,
1169 .gpio = EXYNOS4_GPE2(5), /* 8M_1.2V_EN */
1170 .enable_high = 1,
1171 .init_data = &cam_8m_12v_reg_init_data,
1172};
1173
1174static struct platform_device cam_8m_12v_fixed_rdev = {
1175 .name = "reg-fixed-voltage", .id = FIXED_REG_ID_CAM_12V,
1176 .dev = { .platform_data = &cam_8m_12v_fixed_voltage_cfg },
1177};
1178
1179static struct s5p_platform_mipi_csis mipi_csis_platdata = {
1180 .clk_rate = 166000000UL,
1181 .lanes = 2,
1182 .hs_settle = 12,
1183};
1184
1185#define GPIO_CAM_MEGA_RST EXYNOS4_GPY3(7) /* ISP_RESET */
1186#define GPIO_CAM_8M_ISP_INT EXYNOS4_GPL2(5)
1187#define GPIO_CAM_VT_NSTBY EXYNOS4_GPL2(0)
1188#define GPIO_CAM_VT_NRST EXYNOS4_GPL2(1)
1189
1190static struct s5k6aa_platform_data s5k6aa_pldata = {
1191 .mclk_frequency = 24000000UL,
1192 .gpio_reset = { GPIO_CAM_VT_NRST, 0 },
1193 .gpio_stby = { GPIO_CAM_VT_NSTBY, 0 },
1194 .bus_type = V4L2_MBUS_PARALLEL,
1195 .horiz_flip = 1,
1196};
1197
1198static struct i2c_board_info s5k6aa_board_info = {
1199 I2C_BOARD_INFO("S5K6AA", 0x3c),
1200 .platform_data = &s5k6aa_pldata,
1201};
1202
1203static struct m5mols_platform_data m5mols_platdata = {
1204 .gpio_reset = GPIO_CAM_MEGA_RST,
1205};
1206
1207static struct i2c_board_info m5mols_board_info = {
1208 I2C_BOARD_INFO("M5MOLS", 0x1F),
1209 .platform_data = &m5mols_platdata,
1210};
1211
1212static struct fimc_source_info nuri_camera_sensors[] = {
1213 {
1214 .flags = V4L2_MBUS_PCLK_SAMPLE_RISING |
1215 V4L2_MBUS_VSYNC_ACTIVE_LOW,
1216 .fimc_bus_type = FIMC_BUS_TYPE_ITU_601,
1217 .board_info = &s5k6aa_board_info,
1218 .clk_frequency = 24000000UL,
1219 .i2c_bus_num = 6,
1220 }, {
1221 .flags = V4L2_MBUS_PCLK_SAMPLE_FALLING |
1222 V4L2_MBUS_VSYNC_ACTIVE_LOW,
1223 .fimc_bus_type = FIMC_BUS_TYPE_MIPI_CSI2,
1224 .board_info = &m5mols_board_info,
1225 .clk_frequency = 24000000UL,
1226 },
1227};
1228
1229static struct s5p_platform_fimc fimc_md_platdata = {
1230 .source_info = nuri_camera_sensors,
1231 .num_clients = ARRAY_SIZE(nuri_camera_sensors),
1232};
1233
1234static struct gpio nuri_camera_gpios[] = {
1235 { GPIO_CAM_VT_NSTBY, GPIOF_OUT_INIT_LOW, "CAM_VGA_NSTBY" },
1236 { GPIO_CAM_VT_NRST, GPIOF_OUT_INIT_LOW, "CAM_VGA_NRST" },
1237 { GPIO_CAM_8M_ISP_INT, GPIOF_IN, "8M_ISP_INT" },
1238 { GPIO_CAM_MEGA_RST, GPIOF_OUT_INIT_LOW, "CAM_8M_NRST" },
1239};
1240
1241static void __init nuri_camera_init(void)
1242{
1243 s3c_set_platdata(&mipi_csis_platdata, sizeof(mipi_csis_platdata),
1244 &s5p_device_mipi_csis0);
1245 s3c_set_platdata(&fimc_md_platdata, sizeof(fimc_md_platdata),
1246 &s5p_device_fimc_md);
1247
1248 if (gpio_request_array(nuri_camera_gpios,
1249 ARRAY_SIZE(nuri_camera_gpios))) {
1250 pr_err("%s: GPIO request failed\n", __func__);
1251 return;
1252 }
1253
1254 m5mols_board_info.irq = s5p_register_gpio_interrupt(GPIO_CAM_8M_ISP_INT);
1255 if (m5mols_board_info.irq >= 0)
1256 s3c_gpio_cfgpin(GPIO_CAM_8M_ISP_INT, S3C_GPIO_SFN(0xF));
1257 else
1258 pr_err("%s: Failed to configure 8M_ISP_INT GPIO\n", __func__);
1259
1260 /* Free GPIOs controlled directly by the sensor drivers. */
1261 gpio_free(GPIO_CAM_VT_NRST);
1262 gpio_free(GPIO_CAM_VT_NSTBY);
1263 gpio_free(GPIO_CAM_MEGA_RST);
1264
1265 if (exynos4_fimc_setup_gpio(S5P_CAMPORT_A)) {
1266 pr_err("%s: Camera port A setup failed\n", __func__);
1267 return;
1268 }
1269 /* Increase drive strength of the sensor clock output */
1270 s5p_gpio_set_drvstr(EXYNOS4_GPJ1(3), S5P_GPIO_DRVSTR_LV4);
1271}
1272
1273static struct s3c2410_platform_i2c nuri_i2c6_platdata __initdata = {
1274 .frequency = 400000U,
1275 .sda_delay = 200,
1276 .bus_num = 6,
1277};
1278
1279static struct s3c2410_platform_i2c nuri_i2c0_platdata __initdata = {
1280 .frequency = 400000U,
1281 .sda_delay = 200,
1282};
1283
1284/* DEVFREQ controlling memory/bus */
1285static struct platform_device exynos4_bus_devfreq = {
1286 .name = "exynos4210-busfreq",
1287};
1288
1289static struct platform_device *nuri_devices[] __initdata = {
1290 /* Samsung Platform Devices */
1291 &s3c_device_i2c5, /* PMIC should initialize first */
1292 &s3c_device_i2c0,
1293 &s3c_device_i2c6,
1294 &emmc_fixed_voltage,
1295 &s5p_device_mipi_csis0,
1296 &s5p_device_fimc0,
1297 &s5p_device_fimc1,
1298 &s5p_device_fimc2,
1299 &s5p_device_fimc3,
1300 &s5p_device_fimd0,
1301 &s3c_device_hsmmc0,
1302 &s3c_device_hsmmc2,
1303 &s3c_device_hsmmc3,
1304 &s3c_device_wdt,
1305 &s3c_device_timer[0],
1306 &s5p_device_ehci,
1307 &s3c_device_i2c3,
1308 &i2c9_gpio,
1309 &s3c_device_adc,
1310 &s5p_device_g2d,
1311 &s5p_device_jpeg,
1312 &s3c_device_rtc,
1313 &s5p_device_mfc,
1314 &s5p_device_mfc_l,
1315 &s5p_device_mfc_r,
1316 &s5p_device_fimc_md,
1317 &s3c_device_usb_hsotg,
1318
1319 /* NURI Devices */
1320 &nuri_gpio_keys,
1321 &nuri_lcd_device,
1322 &nuri_backlight_device,
1323 &max8903_fixed_reg_dev,
1324 &nuri_max8903_device,
1325 &cam_vt_cam15_fixed_rdev,
1326 &cam_vdda_fixed_rdev,
1327 &cam_8m_12v_fixed_rdev,
1328 &exynos4_bus_devfreq,
1329};
1330
1331static void __init nuri_map_io(void)
1332{
1333 exynos_init_io(NULL, 0);
1334 s3c24xx_init_uarts(nuri_uartcfgs, ARRAY_SIZE(nuri_uartcfgs));
1335 xxti_f = 0;
1336 xusbxti_f = 24000000;
1337}
1338
1339static void __init nuri_reserve(void)
1340{
1341 s5p_mfc_reserve_mem(0x43000000, 8 << 20, 0x51000000, 8 << 20);
1342}
1343
1344static void __init nuri_machine_init(void)
1345{
1346 nuri_sdhci_init();
1347 nuri_tsp_init();
1348 nuri_power_init();
1349
1350 s3c_i2c0_set_platdata(&nuri_i2c0_platdata);
1351 i2c_register_board_info(1, i2c1_devs, ARRAY_SIZE(i2c1_devs));
1352 s3c_i2c3_set_platdata(&i2c3_data);
1353 i2c_register_board_info(3, i2c3_devs, ARRAY_SIZE(i2c3_devs));
1354 s3c_i2c5_set_platdata(NULL);
1355 i2c5_devs[I2C5_MAX8997].irq = gpio_to_irq(EXYNOS4_GPX0(7));
1356 i2c_register_board_info(5, i2c5_devs, ARRAY_SIZE(i2c5_devs));
1357 i2c9_devs[I2C9_MAX17042].irq = gpio_to_irq(EXYNOS4_GPX2(3));
1358 i2c_register_board_info(9, i2c9_devs, ARRAY_SIZE(i2c9_devs));
1359 s3c_i2c6_set_platdata(&nuri_i2c6_platdata);
1360
1361#ifdef CONFIG_DRM_EXYNOS
1362 s5p_device_fimd0.dev.platform_data = &drm_fimd_pdata;
1363 exynos4_fimd0_gpio_setup_24bpp();
1364#else
1365 s5p_fimd0_set_platdata(&nuri_fb_pdata);
1366#endif
1367
1368 nuri_camera_init();
1369
1370 nuri_ehci_init();
1371 s3c_hsotg_set_platdata(&nuri_hsotg_pdata);
1372
1373 /* Last */
1374 platform_add_devices(nuri_devices, ARRAY_SIZE(nuri_devices));
1375}
1376
1377MACHINE_START(NURI, "NURI")
1378 /* Maintainer: Kyungmin Park <kyungmin.park@samsung.com> */
1379 .atag_offset = 0x100,
1380 .smp = smp_ops(exynos_smp_ops),
1381 .init_irq = exynos4_init_irq,
1382 .map_io = nuri_map_io,
1383 .init_machine = nuri_machine_init,
1384 .init_late = exynos_init_late,
1385 .init_time = exynos_init_time,
1386 .reserve = &nuri_reserve,
1387 .restart = exynos4_restart,
1388MACHINE_END
diff --git a/arch/arm/mach-exynos/mach-origen.c b/arch/arm/mach-exynos/mach-origen.c
deleted file mode 100644
index 27f03ed5d067..000000000000
--- a/arch/arm/mach-exynos/mach-origen.c
+++ /dev/null
@@ -1,823 +0,0 @@
1/* linux/arch/arm/mach-exynos4/mach-origen.c
2 *
3 * Copyright (c) 2011 Insignal Co., Ltd.
4 * http://www.insignal.co.kr/
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9*/
10
11#include <linux/serial_core.h>
12#include <linux/leds.h>
13#include <linux/gpio.h>
14#include <linux/mmc/host.h>
15#include <linux/platform_device.h>
16#include <linux/io.h>
17#include <linux/input.h>
18#include <linux/pwm.h>
19#include <linux/pwm_backlight.h>
20#include <linux/gpio_keys.h>
21#include <linux/i2c.h>
22#include <linux/regulator/machine.h>
23#include <linux/mfd/max8997.h>
24#include <linux/lcd.h>
25#include <linux/rfkill-gpio.h>
26#include <linux/platform_data/i2c-s3c2410.h>
27#include <linux/platform_data/s3c-hsotg.h>
28#include <linux/platform_data/usb-ehci-s5p.h>
29#include <linux/platform_data/usb-ohci-exynos.h>
30
31#include <asm/mach/arch.h>
32#include <asm/mach-types.h>
33
34#include <video/platform_lcd.h>
35#include <video/samsung_fimd.h>
36
37#include <plat/regs-serial.h>
38#include <plat/cpu.h>
39#include <plat/devs.h>
40#include <plat/sdhci.h>
41#include <plat/clock.h>
42#include <plat/gpio-cfg.h>
43#include <plat/backlight.h>
44#include <plat/fb.h>
45#include <plat/mfc.h>
46#include <plat/hdmi.h>
47
48#include <mach/map.h>
49#include <mach/irqs.h>
50
51#include <drm/exynos_drm.h>
52#include "common.h"
53
54/* Following are default values for UCON, ULCON and UFCON UART registers */
55#define ORIGEN_UCON_DEFAULT (S3C2410_UCON_TXILEVEL | \
56 S3C2410_UCON_RXILEVEL | \
57 S3C2410_UCON_TXIRQMODE | \
58 S3C2410_UCON_RXIRQMODE | \
59 S3C2410_UCON_RXFIFO_TOI | \
60 S3C2443_UCON_RXERR_IRQEN)
61
62#define ORIGEN_ULCON_DEFAULT S3C2410_LCON_CS8
63
64#define ORIGEN_UFCON_DEFAULT (S3C2410_UFCON_FIFOMODE | \
65 S5PV210_UFCON_TXTRIG4 | \
66 S5PV210_UFCON_RXTRIG4)
67
68static struct s3c2410_uartcfg origen_uartcfgs[] __initdata = {
69 [0] = {
70 .hwport = 0,
71 .flags = 0,
72 .ucon = ORIGEN_UCON_DEFAULT,
73 .ulcon = ORIGEN_ULCON_DEFAULT,
74 .ufcon = ORIGEN_UFCON_DEFAULT,
75 },
76 [1] = {
77 .hwport = 1,
78 .flags = 0,
79 .ucon = ORIGEN_UCON_DEFAULT,
80 .ulcon = ORIGEN_ULCON_DEFAULT,
81 .ufcon = ORIGEN_UFCON_DEFAULT,
82 },
83 [2] = {
84 .hwport = 2,
85 .flags = 0,
86 .ucon = ORIGEN_UCON_DEFAULT,
87 .ulcon = ORIGEN_ULCON_DEFAULT,
88 .ufcon = ORIGEN_UFCON_DEFAULT,
89 },
90 [3] = {
91 .hwport = 3,
92 .flags = 0,
93 .ucon = ORIGEN_UCON_DEFAULT,
94 .ulcon = ORIGEN_ULCON_DEFAULT,
95 .ufcon = ORIGEN_UFCON_DEFAULT,
96 },
97};
98
99static struct regulator_consumer_supply __initdata ldo3_consumer[] = {
100 REGULATOR_SUPPLY("vddcore", "s5p-mipi-csis.0"), /* MIPI */
101 REGULATOR_SUPPLY("vdd", "exynos4-hdmi"), /* HDMI */
102 REGULATOR_SUPPLY("vdd_pll", "exynos4-hdmi"), /* HDMI */
103 REGULATOR_SUPPLY("vusb_a", "s3c-hsotg"), /* OTG */
104};
105static struct regulator_consumer_supply __initdata ldo6_consumer[] = {
106 REGULATOR_SUPPLY("vddio", "s5p-mipi-csis.0"), /* MIPI */
107};
108static struct regulator_consumer_supply __initdata ldo7_consumer[] = {
109 REGULATOR_SUPPLY("avdd", "alc5625"), /* Realtek ALC5625 */
110};
111static struct regulator_consumer_supply __initdata ldo8_consumer[] = {
112 REGULATOR_SUPPLY("vdd", "s5p-adc"), /* ADC */
113 REGULATOR_SUPPLY("vdd_osc", "exynos4-hdmi"), /* HDMI */
114 REGULATOR_SUPPLY("vusb_d", "s3c-hsotg"), /* OTG */
115};
116static struct regulator_consumer_supply __initdata ldo9_consumer[] = {
117 REGULATOR_SUPPLY("dvdd", "swb-a31"), /* AR6003 WLAN & CSR 8810 BT */
118};
119static struct regulator_consumer_supply __initdata ldo11_consumer[] = {
120 REGULATOR_SUPPLY("dvdd", "alc5625"), /* Realtek ALC5625 */
121};
122static struct regulator_consumer_supply __initdata ldo14_consumer[] = {
123 REGULATOR_SUPPLY("avdd18", "swb-a31"), /* AR6003 WLAN & CSR 8810 BT */
124};
125static struct regulator_consumer_supply __initdata ldo17_consumer[] = {
126 REGULATOR_SUPPLY("vdd33", "swb-a31"), /* AR6003 WLAN & CSR 8810 BT */
127};
128static struct regulator_consumer_supply __initdata buck1_consumer[] = {
129 REGULATOR_SUPPLY("vdd_arm", NULL), /* CPUFREQ */
130};
131static struct regulator_consumer_supply __initdata buck2_consumer[] = {
132 REGULATOR_SUPPLY("vdd_int", NULL), /* CPUFREQ */
133};
134static struct regulator_consumer_supply __initdata buck3_consumer[] = {
135 REGULATOR_SUPPLY("vdd_g3d", "mali_drm"), /* G3D */
136};
137static struct regulator_consumer_supply __initdata buck7_consumer[] = {
138 REGULATOR_SUPPLY("vcc", "platform-lcd"), /* LCD */
139};
140
141static struct regulator_init_data __initdata max8997_ldo1_data = {
142 .constraints = {
143 .name = "VDD_ABB_3.3V",
144 .min_uV = 3300000,
145 .max_uV = 3300000,
146 .apply_uV = 1,
147 .state_mem = {
148 .disabled = 1,
149 },
150 },
151};
152
153static struct regulator_init_data __initdata max8997_ldo2_data = {
154 .constraints = {
155 .name = "VDD_ALIVE_1.1V",
156 .min_uV = 1100000,
157 .max_uV = 1100000,
158 .apply_uV = 1,
159 .always_on = 1,
160 .state_mem = {
161 .enabled = 1,
162 },
163 },
164};
165
166static struct regulator_init_data __initdata max8997_ldo3_data = {
167 .constraints = {
168 .name = "VMIPI_1.1V",
169 .min_uV = 1100000,
170 .max_uV = 1100000,
171 .apply_uV = 1,
172 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
173 .state_mem = {
174 .disabled = 1,
175 },
176 },
177 .num_consumer_supplies = ARRAY_SIZE(ldo3_consumer),
178 .consumer_supplies = ldo3_consumer,
179};
180
181static struct regulator_init_data __initdata max8997_ldo4_data = {
182 .constraints = {
183 .name = "VDD_RTC_1.8V",
184 .min_uV = 1800000,
185 .max_uV = 1800000,
186 .apply_uV = 1,
187 .always_on = 1,
188 .state_mem = {
189 .disabled = 1,
190 },
191 },
192};
193
194static struct regulator_init_data __initdata max8997_ldo6_data = {
195 .constraints = {
196 .name = "VMIPI_1.8V",
197 .min_uV = 1800000,
198 .max_uV = 1800000,
199 .apply_uV = 1,
200 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
201 .state_mem = {
202 .disabled = 1,
203 },
204 },
205 .num_consumer_supplies = ARRAY_SIZE(ldo6_consumer),
206 .consumer_supplies = ldo6_consumer,
207};
208
209static struct regulator_init_data __initdata max8997_ldo7_data = {
210 .constraints = {
211 .name = "VDD_AUD_1.8V",
212 .min_uV = 1800000,
213 .max_uV = 1800000,
214 .apply_uV = 1,
215 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
216 .state_mem = {
217 .disabled = 1,
218 },
219 },
220 .num_consumer_supplies = ARRAY_SIZE(ldo7_consumer),
221 .consumer_supplies = ldo7_consumer,
222};
223
224static struct regulator_init_data __initdata max8997_ldo8_data = {
225 .constraints = {
226 .name = "VADC_3.3V",
227 .min_uV = 3300000,
228 .max_uV = 3300000,
229 .apply_uV = 1,
230 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
231 .state_mem = {
232 .disabled = 1,
233 },
234 },
235 .num_consumer_supplies = ARRAY_SIZE(ldo8_consumer),
236 .consumer_supplies = ldo8_consumer,
237};
238
239static struct regulator_init_data __initdata max8997_ldo9_data = {
240 .constraints = {
241 .name = "DVDD_SWB_2.8V",
242 .min_uV = 2800000,
243 .max_uV = 2800000,
244 .apply_uV = 1,
245 .always_on = 1,
246 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
247 .state_mem = {
248 .disabled = 1,
249 },
250 },
251 .num_consumer_supplies = ARRAY_SIZE(ldo9_consumer),
252 .consumer_supplies = ldo9_consumer,
253};
254
255static struct regulator_init_data __initdata max8997_ldo10_data = {
256 .constraints = {
257 .name = "VDD_PLL_1.1V",
258 .min_uV = 1100000,
259 .max_uV = 1100000,
260 .apply_uV = 1,
261 .always_on = 1,
262 .state_mem = {
263 .disabled = 1,
264 },
265 },
266};
267
268static struct regulator_init_data __initdata max8997_ldo11_data = {
269 .constraints = {
270 .name = "VDD_AUD_3V",
271 .min_uV = 3000000,
272 .max_uV = 3000000,
273 .apply_uV = 1,
274 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
275 .state_mem = {
276 .disabled = 1,
277 },
278 },
279 .num_consumer_supplies = ARRAY_SIZE(ldo11_consumer),
280 .consumer_supplies = ldo11_consumer,
281};
282
283static struct regulator_init_data __initdata max8997_ldo14_data = {
284 .constraints = {
285 .name = "AVDD18_SWB_1.8V",
286 .min_uV = 1800000,
287 .max_uV = 1800000,
288 .apply_uV = 1,
289 .always_on = 1,
290 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
291 .state_mem = {
292 .disabled = 1,
293 },
294 },
295 .num_consumer_supplies = ARRAY_SIZE(ldo14_consumer),
296 .consumer_supplies = ldo14_consumer,
297};
298
299static struct regulator_init_data __initdata max8997_ldo17_data = {
300 .constraints = {
301 .name = "VDD_SWB_3.3V",
302 .min_uV = 3300000,
303 .max_uV = 3300000,
304 .apply_uV = 1,
305 .always_on = 1,
306 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
307 .state_mem = {
308 .disabled = 1,
309 },
310 },
311 .num_consumer_supplies = ARRAY_SIZE(ldo17_consumer),
312 .consumer_supplies = ldo17_consumer,
313};
314
315static struct regulator_init_data __initdata max8997_ldo21_data = {
316 .constraints = {
317 .name = "VDD_MIF_1.2V",
318 .min_uV = 1200000,
319 .max_uV = 1200000,
320 .apply_uV = 1,
321 .always_on = 1,
322 .state_mem = {
323 .disabled = 1,
324 },
325 },
326};
327
328static struct regulator_init_data __initdata max8997_buck1_data = {
329 .constraints = {
330 .name = "VDD_ARM_1.2V",
331 .min_uV = 950000,
332 .max_uV = 1350000,
333 .always_on = 1,
334 .boot_on = 1,
335 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE,
336 .state_mem = {
337 .disabled = 1,
338 },
339 },
340 .num_consumer_supplies = ARRAY_SIZE(buck1_consumer),
341 .consumer_supplies = buck1_consumer,
342};
343
344static struct regulator_init_data __initdata max8997_buck2_data = {
345 .constraints = {
346 .name = "VDD_INT_1.1V",
347 .min_uV = 900000,
348 .max_uV = 1100000,
349 .always_on = 1,
350 .boot_on = 1,
351 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE,
352 .state_mem = {
353 .disabled = 1,
354 },
355 },
356 .num_consumer_supplies = ARRAY_SIZE(buck2_consumer),
357 .consumer_supplies = buck2_consumer,
358};
359
360static struct regulator_init_data __initdata max8997_buck3_data = {
361 .constraints = {
362 .name = "VDD_G3D_1.1V",
363 .min_uV = 900000,
364 .max_uV = 1100000,
365 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE |
366 REGULATOR_CHANGE_STATUS,
367 .state_mem = {
368 .disabled = 1,
369 },
370 },
371 .num_consumer_supplies = ARRAY_SIZE(buck3_consumer),
372 .consumer_supplies = buck3_consumer,
373};
374
375static struct regulator_init_data __initdata max8997_buck5_data = {
376 .constraints = {
377 .name = "VDDQ_M1M2_1.2V",
378 .min_uV = 1200000,
379 .max_uV = 1200000,
380 .apply_uV = 1,
381 .always_on = 1,
382 .state_mem = {
383 .disabled = 1,
384 },
385 },
386};
387
388static struct regulator_init_data __initdata max8997_buck7_data = {
389 .constraints = {
390 .name = "VDD_LCD_3.3V",
391 .min_uV = 3300000,
392 .max_uV = 3300000,
393 .boot_on = 1,
394 .apply_uV = 1,
395 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
396 .state_mem = {
397 .disabled = 1
398 },
399 },
400 .num_consumer_supplies = ARRAY_SIZE(buck7_consumer),
401 .consumer_supplies = buck7_consumer,
402};
403
404static struct max8997_regulator_data __initdata origen_max8997_regulators[] = {
405 { MAX8997_LDO1, &max8997_ldo1_data },
406 { MAX8997_LDO2, &max8997_ldo2_data },
407 { MAX8997_LDO3, &max8997_ldo3_data },
408 { MAX8997_LDO4, &max8997_ldo4_data },
409 { MAX8997_LDO6, &max8997_ldo6_data },
410 { MAX8997_LDO7, &max8997_ldo7_data },
411 { MAX8997_LDO8, &max8997_ldo8_data },
412 { MAX8997_LDO9, &max8997_ldo9_data },
413 { MAX8997_LDO10, &max8997_ldo10_data },
414 { MAX8997_LDO11, &max8997_ldo11_data },
415 { MAX8997_LDO14, &max8997_ldo14_data },
416 { MAX8997_LDO17, &max8997_ldo17_data },
417 { MAX8997_LDO21, &max8997_ldo21_data },
418 { MAX8997_BUCK1, &max8997_buck1_data },
419 { MAX8997_BUCK2, &max8997_buck2_data },
420 { MAX8997_BUCK3, &max8997_buck3_data },
421 { MAX8997_BUCK5, &max8997_buck5_data },
422 { MAX8997_BUCK7, &max8997_buck7_data },
423};
424
425static struct max8997_platform_data __initdata origen_max8997_pdata = {
426 .num_regulators = ARRAY_SIZE(origen_max8997_regulators),
427 .regulators = origen_max8997_regulators,
428
429 .wakeup = true,
430 .buck1_gpiodvs = false,
431 .buck2_gpiodvs = false,
432 .buck5_gpiodvs = false,
433
434 .ignore_gpiodvs_side_effect = true,
435 .buck125_default_idx = 0x0,
436
437 .buck125_gpios[0] = EXYNOS4_GPX0(0),
438 .buck125_gpios[1] = EXYNOS4_GPX0(1),
439 .buck125_gpios[2] = EXYNOS4_GPX0(2),
440
441 .buck1_voltage[0] = 1350000,
442 .buck1_voltage[1] = 1300000,
443 .buck1_voltage[2] = 1250000,
444 .buck1_voltage[3] = 1200000,
445 .buck1_voltage[4] = 1150000,
446 .buck1_voltage[5] = 1100000,
447 .buck1_voltage[6] = 1000000,
448 .buck1_voltage[7] = 950000,
449
450 .buck2_voltage[0] = 1100000,
451 .buck2_voltage[1] = 1100000,
452 .buck2_voltage[2] = 1100000,
453 .buck2_voltage[3] = 1100000,
454 .buck2_voltage[4] = 1000000,
455 .buck2_voltage[5] = 1000000,
456 .buck2_voltage[6] = 1000000,
457 .buck2_voltage[7] = 1000000,
458
459 .buck5_voltage[0] = 1200000,
460 .buck5_voltage[1] = 1200000,
461 .buck5_voltage[2] = 1200000,
462 .buck5_voltage[3] = 1200000,
463 .buck5_voltage[4] = 1200000,
464 .buck5_voltage[5] = 1200000,
465 .buck5_voltage[6] = 1200000,
466 .buck5_voltage[7] = 1200000,
467};
468
469/* I2C0 */
470static struct i2c_board_info i2c0_devs[] __initdata = {
471 {
472 I2C_BOARD_INFO("max8997", (0xCC >> 1)),
473 .platform_data = &origen_max8997_pdata,
474 .irq = IRQ_EINT(4),
475 },
476};
477
478static struct s3c_sdhci_platdata origen_hsmmc0_pdata __initdata = {
479 .cd_type = S3C_SDHCI_CD_INTERNAL,
480};
481
482static struct s3c_sdhci_platdata origen_hsmmc2_pdata __initdata = {
483 .cd_type = S3C_SDHCI_CD_INTERNAL,
484};
485
486/* USB EHCI */
487static struct s5p_ehci_platdata origen_ehci_pdata;
488
489static void __init origen_ehci_init(void)
490{
491 struct s5p_ehci_platdata *pdata = &origen_ehci_pdata;
492
493 s5p_ehci_set_platdata(pdata);
494}
495
496/* USB OHCI */
497static struct exynos4_ohci_platdata origen_ohci_pdata;
498
499static void __init origen_ohci_init(void)
500{
501 struct exynos4_ohci_platdata *pdata = &origen_ohci_pdata;
502
503 exynos4_ohci_set_platdata(pdata);
504}
505
506/* USB OTG */
507static struct s3c_hsotg_plat origen_hsotg_pdata;
508
509static struct gpio_led origen_gpio_leds[] = {
510 {
511 .name = "origen::status1",
512 .default_trigger = "heartbeat",
513 .gpio = EXYNOS4_GPX1(3),
514 .active_low = 1,
515 },
516 {
517 .name = "origen::status2",
518 .default_trigger = "mmc0",
519 .gpio = EXYNOS4_GPX1(4),
520 .active_low = 1,
521 },
522};
523
524static struct gpio_led_platform_data origen_gpio_led_info = {
525 .leds = origen_gpio_leds,
526 .num_leds = ARRAY_SIZE(origen_gpio_leds),
527};
528
529static struct platform_device origen_leds_gpio = {
530 .name = "leds-gpio",
531 .id = -1,
532 .dev = {
533 .platform_data = &origen_gpio_led_info,
534 },
535};
536
537static struct gpio_keys_button origen_gpio_keys_table[] = {
538 {
539 .code = KEY_MENU,
540 .gpio = EXYNOS4_GPX1(5),
541 .desc = "gpio-keys: KEY_MENU",
542 .type = EV_KEY,
543 .active_low = 1,
544 .wakeup = 1,
545 .debounce_interval = 1,
546 }, {
547 .code = KEY_HOME,
548 .gpio = EXYNOS4_GPX1(6),
549 .desc = "gpio-keys: KEY_HOME",
550 .type = EV_KEY,
551 .active_low = 1,
552 .wakeup = 1,
553 .debounce_interval = 1,
554 }, {
555 .code = KEY_BACK,
556 .gpio = EXYNOS4_GPX1(7),
557 .desc = "gpio-keys: KEY_BACK",
558 .type = EV_KEY,
559 .active_low = 1,
560 .wakeup = 1,
561 .debounce_interval = 1,
562 }, {
563 .code = KEY_UP,
564 .gpio = EXYNOS4_GPX2(0),
565 .desc = "gpio-keys: KEY_UP",
566 .type = EV_KEY,
567 .active_low = 1,
568 .wakeup = 1,
569 .debounce_interval = 1,
570 }, {
571 .code = KEY_DOWN,
572 .gpio = EXYNOS4_GPX2(1),
573 .desc = "gpio-keys: KEY_DOWN",
574 .type = EV_KEY,
575 .active_low = 1,
576 .wakeup = 1,
577 .debounce_interval = 1,
578 },
579};
580
581static struct gpio_keys_platform_data origen_gpio_keys_data = {
582 .buttons = origen_gpio_keys_table,
583 .nbuttons = ARRAY_SIZE(origen_gpio_keys_table),
584};
585
586static struct platform_device origen_device_gpiokeys = {
587 .name = "gpio-keys",
588 .dev = {
589 .platform_data = &origen_gpio_keys_data,
590 },
591};
592
593static void lcd_hv070wsa_set_power(struct plat_lcd_data *pd, unsigned int power)
594{
595 int ret;
596
597 if (power)
598 ret = gpio_request_one(EXYNOS4_GPE3(4),
599 GPIOF_OUT_INIT_HIGH, "GPE3_4");
600 else
601 ret = gpio_request_one(EXYNOS4_GPE3(4),
602 GPIOF_OUT_INIT_LOW, "GPE3_4");
603
604 gpio_free(EXYNOS4_GPE3(4));
605
606 if (ret)
607 pr_err("failed to request gpio for LCD power: %d\n", ret);
608}
609
610static struct plat_lcd_data origen_lcd_hv070wsa_data = {
611 .set_power = lcd_hv070wsa_set_power,
612};
613
614static struct platform_device origen_lcd_hv070wsa = {
615 .name = "platform-lcd",
616 .dev.parent = &s5p_device_fimd0.dev,
617 .dev.platform_data = &origen_lcd_hv070wsa_data,
618};
619
620static struct pwm_lookup origen_pwm_lookup[] = {
621 PWM_LOOKUP("s3c24xx-pwm.0", 0, "pwm-backlight.0", NULL),
622};
623
624#ifdef CONFIG_DRM_EXYNOS_FIMD
625static struct exynos_drm_fimd_pdata drm_fimd_pdata = {
626 .panel = {
627 .timing = {
628 .left_margin = 64,
629 .right_margin = 16,
630 .upper_margin = 64,
631 .lower_margin = 16,
632 .hsync_len = 48,
633 .vsync_len = 3,
634 .xres = 1024,
635 .yres = 600,
636 },
637 },
638 .vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB,
639 .vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC |
640 VIDCON1_INV_VCLK,
641 .default_win = 0,
642 .bpp = 32,
643};
644#else
645static struct s3c_fb_pd_win origen_fb_win0 = {
646 .xres = 1024,
647 .yres = 600,
648 .max_bpp = 32,
649 .default_bpp = 24,
650 .virtual_x = 1024,
651 .virtual_y = 2 * 600,
652};
653
654static struct fb_videomode origen_lcd_timing = {
655 .left_margin = 64,
656 .right_margin = 16,
657 .upper_margin = 64,
658 .lower_margin = 16,
659 .hsync_len = 48,
660 .vsync_len = 3,
661 .xres = 1024,
662 .yres = 600,
663};
664
665static struct s3c_fb_platdata origen_lcd_pdata __initdata = {
666 .win[0] = &origen_fb_win0,
667 .vtiming = &origen_lcd_timing,
668 .vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB,
669 .vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC |
670 VIDCON1_INV_VCLK,
671 .setup_gpio = exynos4_fimd0_gpio_setup_24bpp,
672};
673#endif
674
675/* Bluetooth rfkill gpio platform data */
676static struct rfkill_gpio_platform_data origen_bt_pdata = {
677 .reset_gpio = EXYNOS4_GPX2(2),
678 .shutdown_gpio = -1,
679 .type = RFKILL_TYPE_BLUETOOTH,
680 .name = "origen-bt",
681};
682
683/* Bluetooth Platform device */
684static struct platform_device origen_device_bluetooth = {
685 .name = "rfkill_gpio",
686 .id = -1,
687 .dev = {
688 .platform_data = &origen_bt_pdata,
689 },
690};
691
692static struct platform_device *origen_devices[] __initdata = {
693 &s3c_device_hsmmc2,
694 &s3c_device_hsmmc0,
695 &s3c_device_i2c0,
696 &s3c_device_rtc,
697 &s3c_device_usb_hsotg,
698 &s3c_device_wdt,
699 &s5p_device_ehci,
700 &s5p_device_fimc0,
701 &s5p_device_fimc1,
702 &s5p_device_fimc2,
703 &s5p_device_fimc3,
704 &s5p_device_fimc_md,
705 &s5p_device_fimd0,
706 &s5p_device_g2d,
707 &s5p_device_hdmi,
708 &s5p_device_i2c_hdmiphy,
709 &s5p_device_jpeg,
710 &s5p_device_mfc,
711 &s5p_device_mfc_l,
712 &s5p_device_mfc_r,
713 &s5p_device_mixer,
714 &exynos4_device_ohci,
715 &origen_device_gpiokeys,
716 &origen_lcd_hv070wsa,
717 &origen_leds_gpio,
718 &origen_device_bluetooth,
719};
720
721/* LCD Backlight data */
722static struct samsung_bl_gpio_info origen_bl_gpio_info = {
723 .no = EXYNOS4_GPD0(0),
724 .func = S3C_GPIO_SFN(2),
725};
726
727static struct platform_pwm_backlight_data origen_bl_data = {
728 .pwm_id = 0,
729 .pwm_period_ns = 1000,
730};
731
732static void __init origen_bt_setup(void)
733{
734 gpio_request(EXYNOS4_GPA0(0), "GPIO BT_UART");
735 /* 4 UART Pins configuration */
736 s3c_gpio_cfgrange_nopull(EXYNOS4_GPA0(0), 4, S3C_GPIO_SFN(2));
737 /* Setup BT Reset, this gpio will be requesed by rfkill-gpio */
738 s3c_gpio_cfgpin(EXYNOS4_GPX2(2), S3C_GPIO_OUTPUT);
739 s3c_gpio_setpull(EXYNOS4_GPX2(2), S3C_GPIO_PULL_NONE);
740}
741
742/* I2C module and id for HDMIPHY */
743static struct i2c_board_info hdmiphy_info = {
744 I2C_BOARD_INFO("hdmiphy-exynos4210", 0x38),
745};
746
747static void s5p_tv_setup(void)
748{
749 /* Direct HPD to HDMI chip */
750 gpio_request_one(EXYNOS4_GPX3(7), GPIOF_IN, "hpd-plug");
751 s3c_gpio_cfgpin(EXYNOS4_GPX3(7), S3C_GPIO_SFN(0x3));
752 s3c_gpio_setpull(EXYNOS4_GPX3(7), S3C_GPIO_PULL_NONE);
753}
754
755static void __init origen_map_io(void)
756{
757 exynos_init_io(NULL, 0);
758 s3c24xx_init_uarts(origen_uartcfgs, ARRAY_SIZE(origen_uartcfgs));
759 xxti_f = 0;
760 xusbxti_f = 24000000;
761}
762
763static void __init origen_power_init(void)
764{
765 gpio_request(EXYNOS4_GPX0(4), "PMIC_IRQ");
766 s3c_gpio_cfgpin(EXYNOS4_GPX0(4), S3C_GPIO_SFN(0xf));
767 s3c_gpio_setpull(EXYNOS4_GPX0(4), S3C_GPIO_PULL_NONE);
768}
769
770static void __init origen_reserve(void)
771{
772 s5p_mfc_reserve_mem(0x43000000, 8 << 20, 0x51000000, 8 << 20);
773}
774
775static void __init origen_machine_init(void)
776{
777 origen_power_init();
778
779 s3c_i2c0_set_platdata(NULL);
780 i2c_register_board_info(0, i2c0_devs, ARRAY_SIZE(i2c0_devs));
781
782 /*
783 * Since sdhci instance 2 can contain a bootable media,
784 * sdhci instance 0 is registered after instance 2.
785 */
786 s3c_sdhci2_set_platdata(&origen_hsmmc2_pdata);
787 s3c_sdhci0_set_platdata(&origen_hsmmc0_pdata);
788
789 origen_ehci_init();
790 origen_ohci_init();
791 s3c_hsotg_set_platdata(&origen_hsotg_pdata);
792
793 s5p_tv_setup();
794 s5p_i2c_hdmiphy_set_platdata(NULL);
795 s5p_hdmi_set_platdata(&hdmiphy_info, NULL, 0);
796
797#ifdef CONFIG_DRM_EXYNOS_FIMD
798 s5p_device_fimd0.dev.platform_data = &drm_fimd_pdata;
799 exynos4_fimd0_gpio_setup_24bpp();
800#else
801 s5p_fimd0_set_platdata(&origen_lcd_pdata);
802#endif
803
804 platform_add_devices(origen_devices, ARRAY_SIZE(origen_devices));
805
806 pwm_add_table(origen_pwm_lookup, ARRAY_SIZE(origen_pwm_lookup));
807 samsung_bl_set(&origen_bl_gpio_info, &origen_bl_data);
808
809 origen_bt_setup();
810}
811
812MACHINE_START(ORIGEN, "ORIGEN")
813 /* Maintainer: JeongHyeon Kim <jhkim@insignal.co.kr> */
814 .atag_offset = 0x100,
815 .smp = smp_ops(exynos_smp_ops),
816 .init_irq = exynos4_init_irq,
817 .map_io = origen_map_io,
818 .init_machine = origen_machine_init,
819 .init_late = exynos_init_late,
820 .init_time = exynos_init_time,
821 .reserve = &origen_reserve,
822 .restart = exynos4_restart,
823MACHINE_END
diff --git a/arch/arm/mach-exynos/mach-smdk4x12.c b/arch/arm/mach-exynos/mach-smdk4x12.c
deleted file mode 100644
index 2c8af9617920..000000000000
--- a/arch/arm/mach-exynos/mach-smdk4x12.c
+++ /dev/null
@@ -1,396 +0,0 @@
1/*
2 * linux/arch/arm/mach-exynos4/mach-smdk4x12.c
3 *
4 * Copyright (c) 2011 Samsung Electronics Co., Ltd.
5 * http://www.samsung.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 version 2 as
9 * published by the Free Software Foundation.
10*/
11
12#include <linux/gpio.h>
13#include <linux/i2c.h>
14#include <linux/input.h>
15#include <linux/io.h>
16#include <linux/lcd.h>
17#include <linux/mfd/max8997.h>
18#include <linux/mmc/host.h>
19#include <linux/platform_device.h>
20#include <linux/pwm.h>
21#include <linux/pwm_backlight.h>
22#include <linux/regulator/machine.h>
23#include <linux/serial_core.h>
24#include <linux/platform_data/i2c-s3c2410.h>
25#include <linux/platform_data/s3c-hsotg.h>
26
27#include <asm/mach/arch.h>
28#include <asm/mach-types.h>
29
30#include <video/samsung_fimd.h>
31#include <plat/backlight.h>
32#include <plat/clock.h>
33#include <plat/cpu.h>
34#include <plat/devs.h>
35#include <plat/fb.h>
36#include <plat/gpio-cfg.h>
37#include <plat/keypad.h>
38#include <plat/mfc.h>
39#include <plat/regs-serial.h>
40#include <plat/sdhci.h>
41
42#include <mach/irqs.h>
43#include <mach/map.h>
44
45#include <drm/exynos_drm.h>
46#include "common.h"
47
48/* Following are default values for UCON, ULCON and UFCON UART registers */
49#define SMDK4X12_UCON_DEFAULT (S3C2410_UCON_TXILEVEL | \
50 S3C2410_UCON_RXILEVEL | \
51 S3C2410_UCON_TXIRQMODE | \
52 S3C2410_UCON_RXIRQMODE | \
53 S3C2410_UCON_RXFIFO_TOI | \
54 S3C2443_UCON_RXERR_IRQEN)
55
56#define SMDK4X12_ULCON_DEFAULT S3C2410_LCON_CS8
57
58#define SMDK4X12_UFCON_DEFAULT (S3C2410_UFCON_FIFOMODE | \
59 S5PV210_UFCON_TXTRIG4 | \
60 S5PV210_UFCON_RXTRIG4)
61
62static struct s3c2410_uartcfg smdk4x12_uartcfgs[] __initdata = {
63 [0] = {
64 .hwport = 0,
65 .flags = 0,
66 .ucon = SMDK4X12_UCON_DEFAULT,
67 .ulcon = SMDK4X12_ULCON_DEFAULT,
68 .ufcon = SMDK4X12_UFCON_DEFAULT,
69 },
70 [1] = {
71 .hwport = 1,
72 .flags = 0,
73 .ucon = SMDK4X12_UCON_DEFAULT,
74 .ulcon = SMDK4X12_ULCON_DEFAULT,
75 .ufcon = SMDK4X12_UFCON_DEFAULT,
76 },
77 [2] = {
78 .hwport = 2,
79 .flags = 0,
80 .ucon = SMDK4X12_UCON_DEFAULT,
81 .ulcon = SMDK4X12_ULCON_DEFAULT,
82 .ufcon = SMDK4X12_UFCON_DEFAULT,
83 },
84 [3] = {
85 .hwport = 3,
86 .flags = 0,
87 .ucon = SMDK4X12_UCON_DEFAULT,
88 .ulcon = SMDK4X12_ULCON_DEFAULT,
89 .ufcon = SMDK4X12_UFCON_DEFAULT,
90 },
91};
92
93static struct s3c_sdhci_platdata smdk4x12_hsmmc2_pdata __initdata = {
94 .cd_type = S3C_SDHCI_CD_INTERNAL,
95#ifdef CONFIG_EXYNOS4_SDHCI_CH2_8BIT
96 .max_width = 8,
97 .host_caps = MMC_CAP_8_BIT_DATA,
98#endif
99};
100
101static struct s3c_sdhci_platdata smdk4x12_hsmmc3_pdata __initdata = {
102 .cd_type = S3C_SDHCI_CD_INTERNAL,
103};
104
105static struct regulator_consumer_supply max8997_buck1 =
106 REGULATOR_SUPPLY("vdd_arm", NULL);
107
108static struct regulator_consumer_supply max8997_buck2 =
109 REGULATOR_SUPPLY("vdd_int", NULL);
110
111static struct regulator_consumer_supply max8997_buck3 =
112 REGULATOR_SUPPLY("vdd_g3d", NULL);
113
114static struct regulator_init_data max8997_buck1_data = {
115 .constraints = {
116 .name = "VDD_ARM_SMDK4X12",
117 .min_uV = 925000,
118 .max_uV = 1350000,
119 .always_on = 1,
120 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE,
121 .state_mem = {
122 .disabled = 1,
123 },
124 },
125 .num_consumer_supplies = 1,
126 .consumer_supplies = &max8997_buck1,
127};
128
129static struct regulator_init_data max8997_buck2_data = {
130 .constraints = {
131 .name = "VDD_INT_SMDK4X12",
132 .min_uV = 950000,
133 .max_uV = 1150000,
134 .always_on = 1,
135 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE,
136 .state_mem = {
137 .disabled = 1,
138 },
139 },
140 .num_consumer_supplies = 1,
141 .consumer_supplies = &max8997_buck2,
142};
143
144static struct regulator_init_data max8997_buck3_data = {
145 .constraints = {
146 .name = "VDD_G3D_SMDK4X12",
147 .min_uV = 950000,
148 .max_uV = 1150000,
149 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE |
150 REGULATOR_CHANGE_STATUS,
151 .state_mem = {
152 .disabled = 1,
153 },
154 },
155 .num_consumer_supplies = 1,
156 .consumer_supplies = &max8997_buck3,
157};
158
159static struct max8997_regulator_data smdk4x12_max8997_regulators[] = {
160 { MAX8997_BUCK1, &max8997_buck1_data },
161 { MAX8997_BUCK2, &max8997_buck2_data },
162 { MAX8997_BUCK3, &max8997_buck3_data },
163};
164
165static struct max8997_platform_data smdk4x12_max8997_pdata = {
166 .num_regulators = ARRAY_SIZE(smdk4x12_max8997_regulators),
167 .regulators = smdk4x12_max8997_regulators,
168
169 .buck1_voltage[0] = 1100000, /* 1.1V */
170 .buck1_voltage[1] = 1100000, /* 1.1V */
171 .buck1_voltage[2] = 1100000, /* 1.1V */
172 .buck1_voltage[3] = 1100000, /* 1.1V */
173 .buck1_voltage[4] = 1100000, /* 1.1V */
174 .buck1_voltage[5] = 1100000, /* 1.1V */
175 .buck1_voltage[6] = 1000000, /* 1.0V */
176 .buck1_voltage[7] = 950000, /* 0.95V */
177
178 .buck2_voltage[0] = 1100000, /* 1.1V */
179 .buck2_voltage[1] = 1000000, /* 1.0V */
180 .buck2_voltage[2] = 950000, /* 0.95V */
181 .buck2_voltage[3] = 900000, /* 0.9V */
182 .buck2_voltage[4] = 1100000, /* 1.1V */
183 .buck2_voltage[5] = 1000000, /* 1.0V */
184 .buck2_voltage[6] = 950000, /* 0.95V */
185 .buck2_voltage[7] = 900000, /* 0.9V */
186
187 .buck5_voltage[0] = 1100000, /* 1.1V */
188 .buck5_voltage[1] = 1100000, /* 1.1V */
189 .buck5_voltage[2] = 1100000, /* 1.1V */
190 .buck5_voltage[3] = 1100000, /* 1.1V */
191 .buck5_voltage[4] = 1100000, /* 1.1V */
192 .buck5_voltage[5] = 1100000, /* 1.1V */
193 .buck5_voltage[6] = 1100000, /* 1.1V */
194 .buck5_voltage[7] = 1100000, /* 1.1V */
195};
196
197static struct i2c_board_info smdk4x12_i2c_devs0[] __initdata = {
198 {
199 I2C_BOARD_INFO("max8997", 0x66),
200 .platform_data = &smdk4x12_max8997_pdata,
201 }
202};
203
204static struct i2c_board_info smdk4x12_i2c_devs1[] __initdata = {
205 { I2C_BOARD_INFO("wm8994", 0x1a), }
206};
207
208static struct i2c_board_info smdk4x12_i2c_devs3[] __initdata = {
209 /* nothing here yet */
210};
211
212static struct i2c_board_info smdk4x12_i2c_devs7[] __initdata = {
213 /* nothing here yet */
214};
215
216static struct samsung_bl_gpio_info smdk4x12_bl_gpio_info = {
217 .no = EXYNOS4_GPD0(1),
218 .func = S3C_GPIO_SFN(2),
219};
220
221static struct platform_pwm_backlight_data smdk4x12_bl_data = {
222 .pwm_id = 1,
223 .pwm_period_ns = 1000,
224};
225
226static struct pwm_lookup smdk4x12_pwm_lookup[] = {
227 PWM_LOOKUP("s3c24xx-pwm.1", 0, "pwm-backlight.0", NULL),
228};
229
230static uint32_t smdk4x12_keymap[] __initdata = {
231 /* KEY(row, col, keycode) */
232 KEY(1, 3, KEY_1), KEY(1, 4, KEY_2), KEY(1, 5, KEY_3),
233 KEY(1, 6, KEY_4), KEY(1, 7, KEY_5),
234 KEY(2, 5, KEY_D), KEY(2, 6, KEY_A), KEY(2, 7, KEY_B),
235 KEY(0, 7, KEY_E), KEY(0, 5, KEY_C)
236};
237
238static struct matrix_keymap_data smdk4x12_keymap_data __initdata = {
239 .keymap = smdk4x12_keymap,
240 .keymap_size = ARRAY_SIZE(smdk4x12_keymap),
241};
242
243static struct samsung_keypad_platdata smdk4x12_keypad_data __initdata = {
244 .keymap_data = &smdk4x12_keymap_data,
245 .rows = 3,
246 .cols = 8,
247};
248
249#ifdef CONFIG_DRM_EXYNOS_FIMD
250static struct exynos_drm_fimd_pdata drm_fimd_pdata = {
251 .panel = {
252 .timing = {
253 .left_margin = 8,
254 .right_margin = 8,
255 .upper_margin = 6,
256 .lower_margin = 6,
257 .hsync_len = 6,
258 .vsync_len = 4,
259 .xres = 480,
260 .yres = 800,
261 },
262 },
263 .vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB,
264 .vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC,
265 .default_win = 0,
266 .bpp = 32,
267};
268#else
269static struct s3c_fb_pd_win smdk4x12_fb_win0 = {
270 .xres = 480,
271 .yres = 800,
272 .virtual_x = 480,
273 .virtual_y = 800 * 2,
274 .max_bpp = 32,
275 .default_bpp = 24,
276};
277
278static struct fb_videomode smdk4x12_lcd_timing = {
279 .left_margin = 8,
280 .right_margin = 8,
281 .upper_margin = 6,
282 .lower_margin = 6,
283 .hsync_len = 6,
284 .vsync_len = 4,
285 .xres = 480,
286 .yres = 800,
287};
288
289static struct s3c_fb_platdata smdk4x12_lcd_pdata __initdata = {
290 .win[0] = &smdk4x12_fb_win0,
291 .vtiming = &smdk4x12_lcd_timing,
292 .vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB,
293 .vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC,
294 .setup_gpio = exynos4_fimd0_gpio_setup_24bpp,
295};
296#endif
297
298/* USB OTG */
299static struct s3c_hsotg_plat smdk4x12_hsotg_pdata;
300
301static struct platform_device *smdk4x12_devices[] __initdata = {
302 &s3c_device_hsmmc2,
303 &s3c_device_hsmmc3,
304 &s3c_device_i2c0,
305 &s3c_device_i2c1,
306 &s3c_device_i2c3,
307 &s3c_device_i2c7,
308 &s3c_device_rtc,
309 &s3c_device_usb_hsotg,
310 &s3c_device_wdt,
311 &s5p_device_fimc0,
312 &s5p_device_fimc1,
313 &s5p_device_fimc2,
314 &s5p_device_fimc3,
315 &s5p_device_fimc_md,
316 &s5p_device_fimd0,
317 &s5p_device_mfc,
318 &s5p_device_mfc_l,
319 &s5p_device_mfc_r,
320 &samsung_device_keypad,
321};
322
323static void __init smdk4x12_map_io(void)
324{
325 exynos_init_io(NULL, 0);
326 s3c24xx_init_uarts(smdk4x12_uartcfgs, ARRAY_SIZE(smdk4x12_uartcfgs));
327}
328
329static void __init smdk4x12_reserve(void)
330{
331 s5p_mfc_reserve_mem(0x43000000, 8 << 20, 0x51000000, 8 << 20);
332}
333
334static void __init smdk4x12_machine_init(void)
335{
336 s3c_i2c0_set_platdata(NULL);
337 i2c_register_board_info(0, smdk4x12_i2c_devs0,
338 ARRAY_SIZE(smdk4x12_i2c_devs0));
339
340 s3c_i2c1_set_platdata(NULL);
341 i2c_register_board_info(1, smdk4x12_i2c_devs1,
342 ARRAY_SIZE(smdk4x12_i2c_devs1));
343
344 s3c_i2c3_set_platdata(NULL);
345 i2c_register_board_info(3, smdk4x12_i2c_devs3,
346 ARRAY_SIZE(smdk4x12_i2c_devs3));
347
348 s3c_i2c7_set_platdata(NULL);
349 i2c_register_board_info(7, smdk4x12_i2c_devs7,
350 ARRAY_SIZE(smdk4x12_i2c_devs7));
351
352 samsung_bl_set(&smdk4x12_bl_gpio_info, &smdk4x12_bl_data);
353 pwm_add_table(smdk4x12_pwm_lookup, ARRAY_SIZE(smdk4x12_pwm_lookup));
354
355 samsung_keypad_set_platdata(&smdk4x12_keypad_data);
356
357 s3c_sdhci2_set_platdata(&smdk4x12_hsmmc2_pdata);
358 s3c_sdhci3_set_platdata(&smdk4x12_hsmmc3_pdata);
359
360 s3c_hsotg_set_platdata(&smdk4x12_hsotg_pdata);
361
362#ifdef CONFIG_DRM_EXYNOS_FIMD
363 s5p_device_fimd0.dev.platform_data = &drm_fimd_pdata;
364 exynos4_fimd0_gpio_setup_24bpp();
365#else
366 s5p_fimd0_set_platdata(&smdk4x12_lcd_pdata);
367#endif
368
369 platform_add_devices(smdk4x12_devices, ARRAY_SIZE(smdk4x12_devices));
370}
371
372MACHINE_START(SMDK4212, "SMDK4212")
373 /* Maintainer: Kukjin Kim <kgene.kim@samsung.com> */
374 .atag_offset = 0x100,
375 .smp = smp_ops(exynos_smp_ops),
376 .init_irq = exynos4_init_irq,
377 .map_io = smdk4x12_map_io,
378 .init_machine = smdk4x12_machine_init,
379 .init_time = exynos_init_time,
380 .restart = exynos4_restart,
381 .reserve = &smdk4x12_reserve,
382MACHINE_END
383
384MACHINE_START(SMDK4412, "SMDK4412")
385 /* Maintainer: Kukjin Kim <kgene.kim@samsung.com> */
386 /* Maintainer: Changhwan Youn <chaos.youn@samsung.com> */
387 .atag_offset = 0x100,
388 .smp = smp_ops(exynos_smp_ops),
389 .init_irq = exynos4_init_irq,
390 .map_io = smdk4x12_map_io,
391 .init_machine = smdk4x12_machine_init,
392 .init_late = exynos_init_late,
393 .init_time = exynos_init_time,
394 .restart = exynos4_restart,
395 .reserve = &smdk4x12_reserve,
396MACHINE_END
diff --git a/arch/arm/mach-exynos/mach-smdkv310.c b/arch/arm/mach-exynos/mach-smdkv310.c
deleted file mode 100644
index d95b8cf85253..000000000000
--- a/arch/arm/mach-exynos/mach-smdkv310.c
+++ /dev/null
@@ -1,444 +0,0 @@
1/* linux/arch/arm/mach-exynos4/mach-smdkv310.c
2 *
3 * Copyright (c) 2010-2011 Samsung Electronics Co., Ltd.
4 * http://www.samsung.com
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9*/
10
11#include <linux/serial_core.h>
12#include <linux/delay.h>
13#include <linux/gpio.h>
14#include <linux/lcd.h>
15#include <linux/mmc/host.h>
16#include <linux/platform_device.h>
17#include <linux/smsc911x.h>
18#include <linux/io.h>
19#include <linux/i2c.h>
20#include <linux/input.h>
21#include <linux/pwm.h>
22#include <linux/pwm_backlight.h>
23#include <linux/platform_data/i2c-s3c2410.h>
24#include <linux/platform_data/s3c-hsotg.h>
25#include <linux/platform_data/usb-ehci-s5p.h>
26#include <linux/platform_data/usb-ohci-exynos.h>
27
28#include <asm/mach/arch.h>
29#include <asm/mach-types.h>
30
31#include <video/platform_lcd.h>
32#include <video/samsung_fimd.h>
33#include <plat/regs-serial.h>
34#include <plat/regs-srom.h>
35#include <plat/cpu.h>
36#include <plat/devs.h>
37#include <plat/fb.h>
38#include <plat/keypad.h>
39#include <plat/sdhci.h>
40#include <plat/gpio-cfg.h>
41#include <plat/backlight.h>
42#include <plat/mfc.h>
43#include <plat/clock.h>
44#include <plat/hdmi.h>
45
46#include <mach/irqs.h>
47#include <mach/map.h>
48
49#include <drm/exynos_drm.h>
50#include "common.h"
51
52/* Following are default values for UCON, ULCON and UFCON UART registers */
53#define SMDKV310_UCON_DEFAULT (S3C2410_UCON_TXILEVEL | \
54 S3C2410_UCON_RXILEVEL | \
55 S3C2410_UCON_TXIRQMODE | \
56 S3C2410_UCON_RXIRQMODE | \
57 S3C2410_UCON_RXFIFO_TOI | \
58 S3C2443_UCON_RXERR_IRQEN)
59
60#define SMDKV310_ULCON_DEFAULT S3C2410_LCON_CS8
61
62#define SMDKV310_UFCON_DEFAULT (S3C2410_UFCON_FIFOMODE | \
63 S5PV210_UFCON_TXTRIG4 | \
64 S5PV210_UFCON_RXTRIG4)
65
66static struct s3c2410_uartcfg smdkv310_uartcfgs[] __initdata = {
67 [0] = {
68 .hwport = 0,
69 .flags = 0,
70 .ucon = SMDKV310_UCON_DEFAULT,
71 .ulcon = SMDKV310_ULCON_DEFAULT,
72 .ufcon = SMDKV310_UFCON_DEFAULT,
73 },
74 [1] = {
75 .hwport = 1,
76 .flags = 0,
77 .ucon = SMDKV310_UCON_DEFAULT,
78 .ulcon = SMDKV310_ULCON_DEFAULT,
79 .ufcon = SMDKV310_UFCON_DEFAULT,
80 },
81 [2] = {
82 .hwport = 2,
83 .flags = 0,
84 .ucon = SMDKV310_UCON_DEFAULT,
85 .ulcon = SMDKV310_ULCON_DEFAULT,
86 .ufcon = SMDKV310_UFCON_DEFAULT,
87 },
88 [3] = {
89 .hwport = 3,
90 .flags = 0,
91 .ucon = SMDKV310_UCON_DEFAULT,
92 .ulcon = SMDKV310_ULCON_DEFAULT,
93 .ufcon = SMDKV310_UFCON_DEFAULT,
94 },
95};
96
97static struct s3c_sdhci_platdata smdkv310_hsmmc0_pdata __initdata = {
98 .cd_type = S3C_SDHCI_CD_INTERNAL,
99#ifdef CONFIG_EXYNOS4_SDHCI_CH0_8BIT
100 .max_width = 8,
101 .host_caps = MMC_CAP_8_BIT_DATA,
102#endif
103};
104
105static struct s3c_sdhci_platdata smdkv310_hsmmc1_pdata __initdata = {
106 .cd_type = S3C_SDHCI_CD_GPIO,
107 .ext_cd_gpio = EXYNOS4_GPK0(2),
108 .ext_cd_gpio_invert = 1,
109};
110
111static struct s3c_sdhci_platdata smdkv310_hsmmc2_pdata __initdata = {
112 .cd_type = S3C_SDHCI_CD_INTERNAL,
113#ifdef CONFIG_EXYNOS4_SDHCI_CH2_8BIT
114 .max_width = 8,
115 .host_caps = MMC_CAP_8_BIT_DATA,
116#endif
117};
118
119static struct s3c_sdhci_platdata smdkv310_hsmmc3_pdata __initdata = {
120 .cd_type = S3C_SDHCI_CD_GPIO,
121 .ext_cd_gpio = EXYNOS4_GPK2(2),
122 .ext_cd_gpio_invert = 1,
123};
124
125static void lcd_lte480wv_set_power(struct plat_lcd_data *pd,
126 unsigned int power)
127{
128 if (power) {
129#if !defined(CONFIG_BACKLIGHT_PWM)
130 gpio_request_one(EXYNOS4_GPD0(1), GPIOF_OUT_INIT_HIGH, "GPD0");
131 gpio_free(EXYNOS4_GPD0(1));
132#endif
133 /* fire nRESET on power up */
134 gpio_request_one(EXYNOS4_GPX0(6), GPIOF_OUT_INIT_HIGH, "GPX0");
135 mdelay(100);
136
137 gpio_set_value(EXYNOS4_GPX0(6), 0);
138 mdelay(10);
139
140 gpio_set_value(EXYNOS4_GPX0(6), 1);
141 mdelay(10);
142
143 gpio_free(EXYNOS4_GPX0(6));
144 } else {
145#if !defined(CONFIG_BACKLIGHT_PWM)
146 gpio_request_one(EXYNOS4_GPD0(1), GPIOF_OUT_INIT_LOW, "GPD0");
147 gpio_free(EXYNOS4_GPD0(1));
148#endif
149 }
150}
151
152static struct plat_lcd_data smdkv310_lcd_lte480wv_data = {
153 .set_power = lcd_lte480wv_set_power,
154};
155
156static struct platform_device smdkv310_lcd_lte480wv = {
157 .name = "platform-lcd",
158 .dev.parent = &s5p_device_fimd0.dev,
159 .dev.platform_data = &smdkv310_lcd_lte480wv_data,
160};
161
162#ifdef CONFIG_DRM_EXYNOS_FIMD
163static struct exynos_drm_fimd_pdata drm_fimd_pdata = {
164 .panel = {
165 .timing = {
166 .left_margin = 13,
167 .right_margin = 8,
168 .upper_margin = 7,
169 .lower_margin = 5,
170 .hsync_len = 3,
171 .vsync_len = 1,
172 .xres = 800,
173 .yres = 480,
174 },
175 },
176 .vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB,
177 .vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC,
178 .default_win = 0,
179 .bpp = 32,
180};
181#else
182static struct s3c_fb_pd_win smdkv310_fb_win0 = {
183 .max_bpp = 32,
184 .default_bpp = 24,
185 .xres = 800,
186 .yres = 480,
187};
188
189static struct fb_videomode smdkv310_lcd_timing = {
190 .left_margin = 13,
191 .right_margin = 8,
192 .upper_margin = 7,
193 .lower_margin = 5,
194 .hsync_len = 3,
195 .vsync_len = 1,
196 .xres = 800,
197 .yres = 480,
198};
199
200static struct s3c_fb_platdata smdkv310_lcd0_pdata __initdata = {
201 .win[0] = &smdkv310_fb_win0,
202 .vtiming = &smdkv310_lcd_timing,
203 .vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB,
204 .vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC,
205 .setup_gpio = exynos4_fimd0_gpio_setup_24bpp,
206};
207#endif
208
209static struct resource smdkv310_smsc911x_resources[] = {
210 [0] = DEFINE_RES_MEM(EXYNOS4_PA_SROM_BANK(1), SZ_64K),
211 [1] = DEFINE_RES_NAMED(IRQ_EINT(5), 1, NULL, IORESOURCE_IRQ \
212 | IRQF_TRIGGER_LOW),
213};
214
215static struct smsc911x_platform_config smsc9215_config = {
216 .irq_polarity = SMSC911X_IRQ_POLARITY_ACTIVE_LOW,
217 .irq_type = SMSC911X_IRQ_TYPE_PUSH_PULL,
218 .flags = SMSC911X_USE_16BIT | SMSC911X_FORCE_INTERNAL_PHY,
219 .phy_interface = PHY_INTERFACE_MODE_MII,
220 .mac = {0x00, 0x80, 0x00, 0x23, 0x45, 0x67},
221};
222
223static struct platform_device smdkv310_smsc911x = {
224 .name = "smsc911x",
225 .id = -1,
226 .num_resources = ARRAY_SIZE(smdkv310_smsc911x_resources),
227 .resource = smdkv310_smsc911x_resources,
228 .dev = {
229 .platform_data = &smsc9215_config,
230 },
231};
232
233static uint32_t smdkv310_keymap[] __initdata = {
234 /* KEY(row, col, keycode) */
235 KEY(0, 3, KEY_1), KEY(0, 4, KEY_2), KEY(0, 5, KEY_3),
236 KEY(0, 6, KEY_4), KEY(0, 7, KEY_5),
237 KEY(1, 3, KEY_A), KEY(1, 4, KEY_B), KEY(1, 5, KEY_C),
238 KEY(1, 6, KEY_D), KEY(1, 7, KEY_E)
239};
240
241static struct matrix_keymap_data smdkv310_keymap_data __initdata = {
242 .keymap = smdkv310_keymap,
243 .keymap_size = ARRAY_SIZE(smdkv310_keymap),
244};
245
246static struct samsung_keypad_platdata smdkv310_keypad_data __initdata = {
247 .keymap_data = &smdkv310_keymap_data,
248 .rows = 2,
249 .cols = 8,
250};
251
252static struct i2c_board_info i2c_devs1[] __initdata = {
253 {I2C_BOARD_INFO("wm8994", 0x1a),},
254};
255
256/* USB EHCI */
257static struct s5p_ehci_platdata smdkv310_ehci_pdata;
258
259static void __init smdkv310_ehci_init(void)
260{
261 struct s5p_ehci_platdata *pdata = &smdkv310_ehci_pdata;
262
263 s5p_ehci_set_platdata(pdata);
264}
265
266/* USB OHCI */
267static struct exynos4_ohci_platdata smdkv310_ohci_pdata;
268
269static void __init smdkv310_ohci_init(void)
270{
271 struct exynos4_ohci_platdata *pdata = &smdkv310_ohci_pdata;
272
273 exynos4_ohci_set_platdata(pdata);
274}
275
276/* USB OTG */
277static struct s3c_hsotg_plat smdkv310_hsotg_pdata;
278
279/* Audio device */
280static struct platform_device smdkv310_device_audio = {
281 .name = "smdk-audio",
282 .id = -1,
283};
284
285static struct platform_device *smdkv310_devices[] __initdata = {
286 &s3c_device_hsmmc0,
287 &s3c_device_hsmmc1,
288 &s3c_device_hsmmc2,
289 &s3c_device_hsmmc3,
290 &s3c_device_i2c1,
291 &s5p_device_i2c_hdmiphy,
292 &s3c_device_rtc,
293 &s3c_device_usb_hsotg,
294 &s3c_device_wdt,
295 &s5p_device_ehci,
296 &s5p_device_fimc0,
297 &s5p_device_fimc1,
298 &s5p_device_fimc2,
299 &s5p_device_fimc3,
300 &s5p_device_fimc_md,
301 &s5p_device_g2d,
302 &s5p_device_jpeg,
303 &exynos4_device_ac97,
304 &exynos4_device_i2s0,
305 &exynos4_device_ohci,
306 &samsung_device_keypad,
307 &s5p_device_mfc,
308 &s5p_device_mfc_l,
309 &s5p_device_mfc_r,
310 &exynos4_device_spdif,
311 &samsung_asoc_idma,
312 &s5p_device_fimd0,
313 &smdkv310_device_audio,
314 &smdkv310_lcd_lte480wv,
315 &smdkv310_smsc911x,
316 &exynos4_device_ahci,
317 &s5p_device_hdmi,
318 &s5p_device_mixer,
319};
320
321static void __init smdkv310_smsc911x_init(void)
322{
323 u32 cs1;
324
325 /* configure nCS1 width to 16 bits */
326 cs1 = __raw_readl(S5P_SROM_BW) &
327 ~(S5P_SROM_BW__CS_MASK << S5P_SROM_BW__NCS1__SHIFT);
328 cs1 |= ((1 << S5P_SROM_BW__DATAWIDTH__SHIFT) |
329 (1 << S5P_SROM_BW__WAITENABLE__SHIFT) |
330 (1 << S5P_SROM_BW__BYTEENABLE__SHIFT)) <<
331 S5P_SROM_BW__NCS1__SHIFT;
332 __raw_writel(cs1, S5P_SROM_BW);
333
334 /* set timing for nCS1 suitable for ethernet chip */
335 __raw_writel((0x1 << S5P_SROM_BCX__PMC__SHIFT) |
336 (0x9 << S5P_SROM_BCX__TACP__SHIFT) |
337 (0xc << S5P_SROM_BCX__TCAH__SHIFT) |
338 (0x1 << S5P_SROM_BCX__TCOH__SHIFT) |
339 (0x6 << S5P_SROM_BCX__TACC__SHIFT) |
340 (0x1 << S5P_SROM_BCX__TCOS__SHIFT) |
341 (0x1 << S5P_SROM_BCX__TACS__SHIFT), S5P_SROM_BC1);
342}
343
344/* LCD Backlight data */
345static struct samsung_bl_gpio_info smdkv310_bl_gpio_info = {
346 .no = EXYNOS4_GPD0(1),
347 .func = S3C_GPIO_SFN(2),
348};
349
350static struct platform_pwm_backlight_data smdkv310_bl_data = {
351 .pwm_id = 1,
352 .pwm_period_ns = 1000,
353};
354
355/* I2C module and id for HDMIPHY */
356static struct i2c_board_info hdmiphy_info = {
357 I2C_BOARD_INFO("hdmiphy-exynos4210", 0x38),
358};
359
360static struct pwm_lookup smdkv310_pwm_lookup[] = {
361 PWM_LOOKUP("s3c24xx-pwm.1", 0, "pwm-backlight.0", NULL),
362};
363
364static void s5p_tv_setup(void)
365{
366 /* direct HPD to HDMI chip */
367 WARN_ON(gpio_request_one(EXYNOS4_GPX3(7), GPIOF_IN, "hpd-plug"));
368 s3c_gpio_cfgpin(EXYNOS4_GPX3(7), S3C_GPIO_SFN(0x3));
369 s3c_gpio_setpull(EXYNOS4_GPX3(7), S3C_GPIO_PULL_NONE);
370}
371
372static void __init smdkv310_map_io(void)
373{
374 exynos_init_io(NULL, 0);
375 s3c24xx_init_uarts(smdkv310_uartcfgs, ARRAY_SIZE(smdkv310_uartcfgs));
376 xxti_f = 12000000;
377 xusbxti_f = 24000000;
378}
379
380static void __init smdkv310_reserve(void)
381{
382 s5p_mfc_reserve_mem(0x43000000, 8 << 20, 0x51000000, 8 << 20);
383}
384
385static void __init smdkv310_machine_init(void)
386{
387 s3c_i2c1_set_platdata(NULL);
388 i2c_register_board_info(1, i2c_devs1, ARRAY_SIZE(i2c_devs1));
389
390 smdkv310_smsc911x_init();
391
392 s3c_sdhci0_set_platdata(&smdkv310_hsmmc0_pdata);
393 s3c_sdhci1_set_platdata(&smdkv310_hsmmc1_pdata);
394 s3c_sdhci2_set_platdata(&smdkv310_hsmmc2_pdata);
395 s3c_sdhci3_set_platdata(&smdkv310_hsmmc3_pdata);
396
397 s5p_tv_setup();
398 s5p_i2c_hdmiphy_set_platdata(NULL);
399 s5p_hdmi_set_platdata(&hdmiphy_info, NULL, 0);
400
401 samsung_keypad_set_platdata(&smdkv310_keypad_data);
402
403 samsung_bl_set(&smdkv310_bl_gpio_info, &smdkv310_bl_data);
404 pwm_add_table(smdkv310_pwm_lookup, ARRAY_SIZE(smdkv310_pwm_lookup));
405
406#ifdef CONFIG_DRM_EXYNOS_FIMD
407 s5p_device_fimd0.dev.platform_data = &drm_fimd_pdata;
408 exynos4_fimd0_gpio_setup_24bpp();
409#else
410 s5p_fimd0_set_platdata(&smdkv310_lcd0_pdata);
411#endif
412
413 smdkv310_ehci_init();
414 smdkv310_ohci_init();
415 s3c_hsotg_set_platdata(&smdkv310_hsotg_pdata);
416
417 platform_add_devices(smdkv310_devices, ARRAY_SIZE(smdkv310_devices));
418}
419
420MACHINE_START(SMDKV310, "SMDKV310")
421 /* Maintainer: Kukjin Kim <kgene.kim@samsung.com> */
422 /* Maintainer: Changhwan Youn <chaos.youn@samsung.com> */
423 .atag_offset = 0x100,
424 .smp = smp_ops(exynos_smp_ops),
425 .init_irq = exynos4_init_irq,
426 .map_io = smdkv310_map_io,
427 .init_machine = smdkv310_machine_init,
428 .init_time = exynos_init_time,
429 .reserve = &smdkv310_reserve,
430 .restart = exynos4_restart,
431MACHINE_END
432
433MACHINE_START(SMDKC210, "SMDKC210")
434 /* Maintainer: Kukjin Kim <kgene.kim@samsung.com> */
435 .atag_offset = 0x100,
436 .smp = smp_ops(exynos_smp_ops),
437 .init_irq = exynos4_init_irq,
438 .map_io = smdkv310_map_io,
439 .init_machine = smdkv310_machine_init,
440 .init_late = exynos_init_late,
441 .init_time = exynos_init_time,
442 .reserve = &smdkv310_reserve,
443 .restart = exynos4_restart,
444MACHINE_END
diff --git a/arch/arm/mach-exynos/mach-universal_c210.c b/arch/arm/mach-exynos/mach-universal_c210.c
deleted file mode 100644
index 74ddb2b55614..000000000000
--- a/arch/arm/mach-exynos/mach-universal_c210.c
+++ /dev/null
@@ -1,1159 +0,0 @@
1/* linux/arch/arm/mach-exynos4/mach-universal_c210.c
2 *
3 * Copyright (c) 2010 Samsung Electronics Co., Ltd.
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 2 as
7 * published by the Free Software Foundation.
8*/
9
10#include <linux/platform_device.h>
11#include <linux/serial_core.h>
12#include <linux/input.h>
13#include <linux/i2c.h>
14#include <linux/gpio_keys.h>
15#include <linux/gpio.h>
16#include <linux/interrupt.h>
17#include <linux/fb.h>
18#include <linux/mfd/max8998.h>
19#include <linux/regulator/machine.h>
20#include <linux/regulator/fixed.h>
21#include <linux/regulator/max8952.h>
22#include <linux/mmc/host.h>
23#include <linux/i2c-gpio.h>
24#include <linux/i2c/mcs.h>
25#include <linux/i2c/atmel_mxt_ts.h>
26#include <linux/platform_data/i2c-s3c2410.h>
27#include <linux/platform_data/mipi-csis.h>
28#include <linux/platform_data/s3c-hsotg.h>
29#include <drm/exynos_drm.h>
30
31#include <asm/mach/arch.h>
32#include <asm/mach-types.h>
33
34#include <video/samsung_fimd.h>
35#include <plat/regs-serial.h>
36#include <plat/clock.h>
37#include <plat/cpu.h>
38#include <plat/devs.h>
39#include <plat/gpio-cfg.h>
40#include <plat/fb.h>
41#include <plat/mfc.h>
42#include <plat/sdhci.h>
43#include <plat/fimc-core.h>
44#include <plat/camport.h>
45
46#include <mach/map.h>
47
48#include <media/v4l2-mediabus.h>
49#include <media/s5p_fimc.h>
50#include <media/m5mols.h>
51#include <media/s5k6aa.h>
52
53#include "common.h"
54
55/* Following are default values for UCON, ULCON and UFCON UART registers */
56#define UNIVERSAL_UCON_DEFAULT (S3C2410_UCON_TXILEVEL | \
57 S3C2410_UCON_RXILEVEL | \
58 S3C2410_UCON_TXIRQMODE | \
59 S3C2410_UCON_RXIRQMODE | \
60 S3C2410_UCON_RXFIFO_TOI | \
61 S3C2443_UCON_RXERR_IRQEN)
62
63#define UNIVERSAL_ULCON_DEFAULT S3C2410_LCON_CS8
64
65#define UNIVERSAL_UFCON_DEFAULT (S3C2410_UFCON_FIFOMODE | \
66 S5PV210_UFCON_TXTRIG256 | \
67 S5PV210_UFCON_RXTRIG256)
68
69static struct s3c2410_uartcfg universal_uartcfgs[] __initdata = {
70 [0] = {
71 .hwport = 0,
72 .ucon = UNIVERSAL_UCON_DEFAULT,
73 .ulcon = UNIVERSAL_ULCON_DEFAULT,
74 .ufcon = UNIVERSAL_UFCON_DEFAULT,
75 },
76 [1] = {
77 .hwport = 1,
78 .ucon = UNIVERSAL_UCON_DEFAULT,
79 .ulcon = UNIVERSAL_ULCON_DEFAULT,
80 .ufcon = UNIVERSAL_UFCON_DEFAULT,
81 },
82 [2] = {
83 .hwport = 2,
84 .ucon = UNIVERSAL_UCON_DEFAULT,
85 .ulcon = UNIVERSAL_ULCON_DEFAULT,
86 .ufcon = UNIVERSAL_UFCON_DEFAULT,
87 },
88 [3] = {
89 .hwport = 3,
90 .ucon = UNIVERSAL_UCON_DEFAULT,
91 .ulcon = UNIVERSAL_ULCON_DEFAULT,
92 .ufcon = UNIVERSAL_UFCON_DEFAULT,
93 },
94};
95
96static struct regulator_consumer_supply max8952_consumer =
97 REGULATOR_SUPPLY("vdd_arm", NULL);
98
99static struct regulator_init_data universal_max8952_reg_data = {
100 .constraints = {
101 .name = "VARM_1.2V",
102 .min_uV = 770000,
103 .max_uV = 1400000,
104 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE,
105 .always_on = 1,
106 .boot_on = 1,
107 },
108 .num_consumer_supplies = 1,
109 .consumer_supplies = &max8952_consumer,
110};
111
112static struct max8952_platform_data universal_max8952_pdata __initdata = {
113 .gpio_vid0 = EXYNOS4_GPX0(3),
114 .gpio_vid1 = EXYNOS4_GPX0(4),
115 .gpio_en = -1, /* Not controllable, set "Always High" */
116 .default_mode = 0, /* vid0 = 0, vid1 = 0 */
117 .dvs_mode = { 48, 32, 28, 18 }, /* 1.25, 1.20, 1.05, 0.95V */
118 .sync_freq = 0, /* default: fastest */
119 .ramp_speed = 0, /* default: fastest */
120 .reg_data = &universal_max8952_reg_data,
121};
122
123static struct regulator_consumer_supply lp3974_buck1_consumer =
124 REGULATOR_SUPPLY("vdd_int", NULL);
125
126static struct regulator_consumer_supply lp3974_buck2_consumer =
127 REGULATOR_SUPPLY("vddg3d", NULL);
128
129static struct regulator_consumer_supply lp3974_buck3_consumer[] = {
130 REGULATOR_SUPPLY("vdet", "s5p-sdo"),
131 REGULATOR_SUPPLY("vdd_reg", "0-003c"),
132};
133
134static struct regulator_init_data lp3974_buck1_data = {
135 .constraints = {
136 .name = "VINT_1.1V",
137 .min_uV = 750000,
138 .max_uV = 1500000,
139 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE |
140 REGULATOR_CHANGE_STATUS,
141 .boot_on = 1,
142 .state_mem = {
143 .disabled = 1,
144 },
145 },
146 .num_consumer_supplies = 1,
147 .consumer_supplies = &lp3974_buck1_consumer,
148};
149
150static struct regulator_init_data lp3974_buck2_data = {
151 .constraints = {
152 .name = "VG3D_1.1V",
153 .min_uV = 750000,
154 .max_uV = 1500000,
155 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE |
156 REGULATOR_CHANGE_STATUS,
157 .boot_on = 1,
158 .state_mem = {
159 .disabled = 1,
160 },
161 },
162 .num_consumer_supplies = 1,
163 .consumer_supplies = &lp3974_buck2_consumer,
164};
165
166static struct regulator_init_data lp3974_buck3_data = {
167 .constraints = {
168 .name = "VCC_1.8V",
169 .min_uV = 1800000,
170 .max_uV = 1800000,
171 .apply_uV = 1,
172 .always_on = 1,
173 .state_mem = {
174 .enabled = 1,
175 },
176 },
177 .num_consumer_supplies = ARRAY_SIZE(lp3974_buck3_consumer),
178 .consumer_supplies = lp3974_buck3_consumer,
179};
180
181static struct regulator_init_data lp3974_buck4_data = {
182 .constraints = {
183 .name = "VMEM_1.2V",
184 .min_uV = 1200000,
185 .max_uV = 1200000,
186 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
187 .apply_uV = 1,
188 .state_mem = {
189 .disabled = 1,
190 },
191 },
192};
193
194static struct regulator_init_data lp3974_ldo2_data = {
195 .constraints = {
196 .name = "VALIVE_1.2V",
197 .min_uV = 1200000,
198 .max_uV = 1200000,
199 .apply_uV = 1,
200 .always_on = 1,
201 .state_mem = {
202 .enabled = 1,
203 },
204 },
205};
206
207static struct regulator_consumer_supply lp3974_ldo3_consumer[] = {
208 REGULATOR_SUPPLY("vusb_a", "s3c-hsotg"),
209 REGULATOR_SUPPLY("vdd", "exynos4-hdmi"),
210 REGULATOR_SUPPLY("vdd_pll", "exynos4-hdmi"),
211 REGULATOR_SUPPLY("vddcore", "s5p-mipi-csis.0"),
212};
213
214static struct regulator_init_data lp3974_ldo3_data = {
215 .constraints = {
216 .name = "VUSB+MIPI_1.1V",
217 .min_uV = 1100000,
218 .max_uV = 1100000,
219 .apply_uV = 1,
220 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
221 .state_mem = {
222 .disabled = 1,
223 },
224 },
225 .num_consumer_supplies = ARRAY_SIZE(lp3974_ldo3_consumer),
226 .consumer_supplies = lp3974_ldo3_consumer,
227};
228
229static struct regulator_consumer_supply lp3974_ldo4_consumer[] = {
230 REGULATOR_SUPPLY("vdd_osc", "exynos4-hdmi"),
231};
232
233static struct regulator_init_data lp3974_ldo4_data = {
234 .constraints = {
235 .name = "VADC_3.3V",
236 .min_uV = 3300000,
237 .max_uV = 3300000,
238 .apply_uV = 1,
239 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
240 .state_mem = {
241 .disabled = 1,
242 },
243 },
244 .num_consumer_supplies = ARRAY_SIZE(lp3974_ldo4_consumer),
245 .consumer_supplies = lp3974_ldo4_consumer,
246};
247
248static struct regulator_init_data lp3974_ldo5_data = {
249 .constraints = {
250 .name = "VTF_2.8V",
251 .min_uV = 2800000,
252 .max_uV = 2800000,
253 .apply_uV = 1,
254 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
255 .state_mem = {
256 .disabled = 1,
257 },
258 },
259};
260
261static struct regulator_init_data lp3974_ldo6_data = {
262 .constraints = {
263 .name = "LDO6",
264 .min_uV = 2000000,
265 .max_uV = 2000000,
266 .apply_uV = 1,
267 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
268 .state_mem = {
269 .disabled = 1,
270 },
271 },
272};
273
274static struct regulator_consumer_supply lp3974_ldo7_consumer[] = {
275 REGULATOR_SUPPLY("vddio", "s5p-mipi-csis.0"),
276};
277
278static struct regulator_init_data lp3974_ldo7_data = {
279 .constraints = {
280 .name = "VLCD+VMIPI_1.8V",
281 .min_uV = 1800000,
282 .max_uV = 1800000,
283 .apply_uV = 1,
284 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
285 .state_mem = {
286 .disabled = 1,
287 },
288 },
289 .num_consumer_supplies = ARRAY_SIZE(lp3974_ldo7_consumer),
290 .consumer_supplies = lp3974_ldo7_consumer,
291};
292
293static struct regulator_consumer_supply lp3974_ldo8_consumer[] = {
294 REGULATOR_SUPPLY("vusb_d", "s3c-hsotg"),
295 REGULATOR_SUPPLY("vdd33a_dac", "s5p-sdo"),
296};
297
298static struct regulator_init_data lp3974_ldo8_data = {
299 .constraints = {
300 .name = "VUSB+VDAC_3.3V",
301 .min_uV = 3300000,
302 .max_uV = 3300000,
303 .apply_uV = 1,
304 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
305 .state_mem = {
306 .disabled = 1,
307 },
308 },
309 .num_consumer_supplies = ARRAY_SIZE(lp3974_ldo8_consumer),
310 .consumer_supplies = lp3974_ldo8_consumer,
311};
312
313static struct regulator_consumer_supply lp3974_ldo9_consumer =
314 REGULATOR_SUPPLY("vddio", "0-003c");
315
316static struct regulator_init_data lp3974_ldo9_data = {
317 .constraints = {
318 .name = "VCC_2.8V",
319 .min_uV = 2800000,
320 .max_uV = 2800000,
321 .apply_uV = 1,
322 .always_on = 1,
323 .state_mem = {
324 .enabled = 1,
325 },
326 },
327 .num_consumer_supplies = 1,
328 .consumer_supplies = &lp3974_ldo9_consumer,
329};
330
331static struct regulator_init_data lp3974_ldo10_data = {
332 .constraints = {
333 .name = "VPLL_1.1V",
334 .min_uV = 1100000,
335 .max_uV = 1100000,
336 .boot_on = 1,
337 .apply_uV = 1,
338 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
339 .state_mem = {
340 .disabled = 1,
341 },
342 },
343};
344
345static struct regulator_consumer_supply lp3974_ldo11_consumer =
346 REGULATOR_SUPPLY("dig_28", "0-001f");
347
348static struct regulator_init_data lp3974_ldo11_data = {
349 .constraints = {
350 .name = "CAM_AF_3.3V",
351 .min_uV = 3300000,
352 .max_uV = 3300000,
353 .apply_uV = 1,
354 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
355 .state_mem = {
356 .disabled = 1,
357 },
358 },
359 .num_consumer_supplies = 1,
360 .consumer_supplies = &lp3974_ldo11_consumer,
361};
362
363static struct regulator_init_data lp3974_ldo12_data = {
364 .constraints = {
365 .name = "PS_2.8V",
366 .min_uV = 2800000,
367 .max_uV = 2800000,
368 .apply_uV = 1,
369 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
370 .state_mem = {
371 .disabled = 1,
372 },
373 },
374};
375
376static struct regulator_init_data lp3974_ldo13_data = {
377 .constraints = {
378 .name = "VHIC_1.2V",
379 .min_uV = 1200000,
380 .max_uV = 1200000,
381 .apply_uV = 1,
382 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
383 .state_mem = {
384 .disabled = 1,
385 },
386 },
387};
388
389static struct regulator_consumer_supply lp3974_ldo14_consumer =
390 REGULATOR_SUPPLY("dig_18", "0-001f");
391
392static struct regulator_init_data lp3974_ldo14_data = {
393 .constraints = {
394 .name = "CAM_I_HOST_1.8V",
395 .min_uV = 1800000,
396 .max_uV = 1800000,
397 .apply_uV = 1,
398 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
399 .state_mem = {
400 .disabled = 1,
401 },
402 },
403 .num_consumer_supplies = 1,
404 .consumer_supplies = &lp3974_ldo14_consumer,
405};
406
407
408static struct regulator_consumer_supply lp3974_ldo15_consumer =
409 REGULATOR_SUPPLY("dig_12", "0-001f");
410
411static struct regulator_init_data lp3974_ldo15_data = {
412 .constraints = {
413 .name = "CAM_S_DIG+FM33_CORE_1.2V",
414 .min_uV = 1200000,
415 .max_uV = 1200000,
416 .apply_uV = 1,
417 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
418 .state_mem = {
419 .disabled = 1,
420 },
421 },
422 .num_consumer_supplies = 1,
423 .consumer_supplies = &lp3974_ldo15_consumer,
424};
425
426static struct regulator_consumer_supply lp3974_ldo16_consumer[] = {
427 REGULATOR_SUPPLY("vdda", "0-003c"),
428 REGULATOR_SUPPLY("a_sensor", "0-001f"),
429};
430
431static struct regulator_init_data lp3974_ldo16_data = {
432 .constraints = {
433 .name = "CAM_S_ANA_2.8V",
434 .min_uV = 2800000,
435 .max_uV = 2800000,
436 .apply_uV = 1,
437 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
438 .state_mem = {
439 .disabled = 1,
440 },
441 },
442 .num_consumer_supplies = ARRAY_SIZE(lp3974_ldo16_consumer),
443 .consumer_supplies = lp3974_ldo16_consumer,
444};
445
446static struct regulator_init_data lp3974_ldo17_data = {
447 .constraints = {
448 .name = "VCC_3.0V_LCD",
449 .min_uV = 3000000,
450 .max_uV = 3000000,
451 .apply_uV = 1,
452 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
453 .boot_on = 1,
454 .state_mem = {
455 .disabled = 1,
456 },
457 },
458};
459
460static struct regulator_init_data lp3974_32khz_ap_data = {
461 .constraints = {
462 .name = "32KHz AP",
463 .always_on = 1,
464 .state_mem = {
465 .enabled = 1,
466 },
467 },
468};
469
470static struct regulator_init_data lp3974_32khz_cp_data = {
471 .constraints = {
472 .name = "32KHz CP",
473 .state_mem = {
474 .disabled = 1,
475 },
476 },
477};
478
479static struct regulator_init_data lp3974_vichg_data = {
480 .constraints = {
481 .name = "VICHG",
482 .state_mem = {
483 .disabled = 1,
484 },
485 },
486};
487
488static struct regulator_init_data lp3974_esafeout1_data = {
489 .constraints = {
490 .name = "SAFEOUT1",
491 .min_uV = 4800000,
492 .max_uV = 4800000,
493 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
494 .always_on = 1,
495 .state_mem = {
496 .enabled = 1,
497 },
498 },
499};
500
501static struct regulator_init_data lp3974_esafeout2_data = {
502 .constraints = {
503 .name = "SAFEOUT2",
504 .boot_on = 1,
505 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
506 .state_mem = {
507 .enabled = 1,
508 },
509 },
510};
511
512static struct max8998_regulator_data lp3974_regulators[] = {
513 { MAX8998_LDO2, &lp3974_ldo2_data },
514 { MAX8998_LDO3, &lp3974_ldo3_data },
515 { MAX8998_LDO4, &lp3974_ldo4_data },
516 { MAX8998_LDO5, &lp3974_ldo5_data },
517 { MAX8998_LDO6, &lp3974_ldo6_data },
518 { MAX8998_LDO7, &lp3974_ldo7_data },
519 { MAX8998_LDO8, &lp3974_ldo8_data },
520 { MAX8998_LDO9, &lp3974_ldo9_data },
521 { MAX8998_LDO10, &lp3974_ldo10_data },
522 { MAX8998_LDO11, &lp3974_ldo11_data },
523 { MAX8998_LDO12, &lp3974_ldo12_data },
524 { MAX8998_LDO13, &lp3974_ldo13_data },
525 { MAX8998_LDO14, &lp3974_ldo14_data },
526 { MAX8998_LDO15, &lp3974_ldo15_data },
527 { MAX8998_LDO16, &lp3974_ldo16_data },
528 { MAX8998_LDO17, &lp3974_ldo17_data },
529 { MAX8998_BUCK1, &lp3974_buck1_data },
530 { MAX8998_BUCK2, &lp3974_buck2_data },
531 { MAX8998_BUCK3, &lp3974_buck3_data },
532 { MAX8998_BUCK4, &lp3974_buck4_data },
533 { MAX8998_EN32KHZ_AP, &lp3974_32khz_ap_data },
534 { MAX8998_EN32KHZ_CP, &lp3974_32khz_cp_data },
535 { MAX8998_ENVICHG, &lp3974_vichg_data },
536 { MAX8998_ESAFEOUT1, &lp3974_esafeout1_data },
537 { MAX8998_ESAFEOUT2, &lp3974_esafeout2_data },
538};
539
540static struct max8998_platform_data universal_lp3974_pdata = {
541 .num_regulators = ARRAY_SIZE(lp3974_regulators),
542 .regulators = lp3974_regulators,
543 .buck1_voltage1 = 1100000, /* INT */
544 .buck1_voltage2 = 1000000,
545 .buck1_voltage3 = 1100000,
546 .buck1_voltage4 = 1000000,
547 .buck1_set1 = EXYNOS4_GPX0(5),
548 .buck1_set2 = EXYNOS4_GPX0(6),
549 .buck2_voltage1 = 1200000, /* G3D */
550 .buck2_voltage2 = 1100000,
551 .buck1_default_idx = 0,
552 .buck2_set3 = EXYNOS4_GPE2(0),
553 .buck2_default_idx = 0,
554 .wakeup = true,
555};
556
557
558enum fixed_regulator_id {
559 FIXED_REG_ID_MMC0,
560 FIXED_REG_ID_HDMI_5V,
561 FIXED_REG_ID_CAM_S_IF,
562 FIXED_REG_ID_CAM_I_CORE,
563 FIXED_REG_ID_CAM_VT_DIO,
564};
565
566static struct regulator_consumer_supply hdmi_fixed_consumer =
567 REGULATOR_SUPPLY("hdmi-en", "exynos4-hdmi");
568
569static struct regulator_init_data hdmi_fixed_voltage_init_data = {
570 .constraints = {
571 .name = "HDMI_5V",
572 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
573 },
574 .num_consumer_supplies = 1,
575 .consumer_supplies = &hdmi_fixed_consumer,
576};
577
578static struct fixed_voltage_config hdmi_fixed_voltage_config = {
579 .supply_name = "HDMI_EN1",
580 .microvolts = 5000000,
581 .gpio = EXYNOS4_GPE0(1),
582 .enable_high = true,
583 .init_data = &hdmi_fixed_voltage_init_data,
584};
585
586static struct platform_device hdmi_fixed_voltage = {
587 .name = "reg-fixed-voltage",
588 .id = FIXED_REG_ID_HDMI_5V,
589 .dev = {
590 .platform_data = &hdmi_fixed_voltage_config,
591 },
592};
593
594/* GPIO I2C 5 (PMIC) */
595static struct i2c_board_info i2c5_devs[] __initdata = {
596 {
597 I2C_BOARD_INFO("max8952", 0xC0 >> 1),
598 .platform_data = &universal_max8952_pdata,
599 }, {
600 I2C_BOARD_INFO("lp3974", 0xCC >> 1),
601 .platform_data = &universal_lp3974_pdata,
602 },
603};
604
605/* I2C3 (TSP) */
606static struct mxt_platform_data qt602240_platform_data = {
607 .x_line = 19,
608 .y_line = 11,
609 .x_size = 800,
610 .y_size = 480,
611 .blen = 0x11,
612 .threshold = 0x28,
613 .voltage = 2800000, /* 2.8V */
614 .orient = MXT_DIAGONAL,
615 .irqflags = IRQF_TRIGGER_FALLING,
616};
617
618static struct i2c_board_info i2c3_devs[] __initdata = {
619 {
620 I2C_BOARD_INFO("qt602240_ts", 0x4a),
621 .platform_data = &qt602240_platform_data,
622 },
623};
624
625static void __init universal_tsp_init(void)
626{
627 int gpio;
628
629 /* TSP_LDO_ON: XMDMADDR_11 */
630 gpio = EXYNOS4_GPE2(3);
631 gpio_request_one(gpio, GPIOF_OUT_INIT_HIGH, "TSP_LDO_ON");
632 gpio_export(gpio, 0);
633
634 /* TSP_INT: XMDMADDR_7 */
635 gpio = EXYNOS4_GPE1(7);
636 gpio_request(gpio, "TSP_INT");
637
638 s5p_register_gpio_interrupt(gpio);
639 s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(0xf));
640 s3c_gpio_setpull(gpio, S3C_GPIO_PULL_UP);
641 i2c3_devs[0].irq = gpio_to_irq(gpio);
642}
643
644
645/* GPIO I2C 12 (3 Touchkey) */
646static uint32_t touchkey_keymap[] = {
647 /* MCS_KEY_MAP(value, keycode) */
648 MCS_KEY_MAP(0, KEY_MENU), /* KEY_SEND */
649 MCS_KEY_MAP(1, KEY_BACK), /* KEY_END */
650};
651
652static struct mcs_platform_data touchkey_data = {
653 .keymap = touchkey_keymap,
654 .keymap_size = ARRAY_SIZE(touchkey_keymap),
655 .key_maxval = 2,
656};
657
658/* GPIO I2C 3_TOUCH 2.8V */
659#define I2C_GPIO_BUS_12 12
660static struct i2c_gpio_platform_data i2c_gpio12_data = {
661 .sda_pin = EXYNOS4_GPE4(0), /* XMDMDATA_8 */
662 .scl_pin = EXYNOS4_GPE4(1), /* XMDMDATA_9 */
663};
664
665static struct platform_device i2c_gpio12 = {
666 .name = "i2c-gpio",
667 .id = I2C_GPIO_BUS_12,
668 .dev = {
669 .platform_data = &i2c_gpio12_data,
670 },
671};
672
673static struct i2c_board_info i2c_gpio12_devs[] __initdata = {
674 {
675 I2C_BOARD_INFO("mcs5080_touchkey", 0x20),
676 .platform_data = &touchkey_data,
677 },
678};
679
680static void __init universal_touchkey_init(void)
681{
682 int gpio;
683
684 gpio = EXYNOS4_GPE3(7); /* XMDMDATA_7 */
685 gpio_request(gpio, "3_TOUCH_INT");
686 s5p_register_gpio_interrupt(gpio);
687 s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(0xf));
688 i2c_gpio12_devs[0].irq = gpio_to_irq(gpio);
689
690 gpio = EXYNOS4_GPE3(3); /* XMDMDATA_3 */
691 gpio_request_one(gpio, GPIOF_OUT_INIT_HIGH, "3_TOUCH_EN");
692}
693
694static struct s3c2410_platform_i2c universal_i2c0_platdata __initdata = {
695 .frequency = 300 * 1000,
696 .sda_delay = 200,
697};
698
699/* GPIO KEYS */
700static struct gpio_keys_button universal_gpio_keys_tables[] = {
701 {
702 .code = KEY_VOLUMEUP,
703 .gpio = EXYNOS4_GPX2(0), /* XEINT16 */
704 .desc = "gpio-keys: KEY_VOLUMEUP",
705 .type = EV_KEY,
706 .active_low = 1,
707 .debounce_interval = 1,
708 }, {
709 .code = KEY_VOLUMEDOWN,
710 .gpio = EXYNOS4_GPX2(1), /* XEINT17 */
711 .desc = "gpio-keys: KEY_VOLUMEDOWN",
712 .type = EV_KEY,
713 .active_low = 1,
714 .debounce_interval = 1,
715 }, {
716 .code = KEY_CONFIG,
717 .gpio = EXYNOS4_GPX2(2), /* XEINT18 */
718 .desc = "gpio-keys: KEY_CONFIG",
719 .type = EV_KEY,
720 .active_low = 1,
721 .debounce_interval = 1,
722 }, {
723 .code = KEY_CAMERA,
724 .gpio = EXYNOS4_GPX2(3), /* XEINT19 */
725 .desc = "gpio-keys: KEY_CAMERA",
726 .type = EV_KEY,
727 .active_low = 1,
728 .debounce_interval = 1,
729 }, {
730 .code = KEY_OK,
731 .gpio = EXYNOS4_GPX3(5), /* XEINT29 */
732 .desc = "gpio-keys: KEY_OK",
733 .type = EV_KEY,
734 .active_low = 1,
735 .debounce_interval = 1,
736 },
737};
738
739static struct gpio_keys_platform_data universal_gpio_keys_data = {
740 .buttons = universal_gpio_keys_tables,
741 .nbuttons = ARRAY_SIZE(universal_gpio_keys_tables),
742};
743
744static struct platform_device universal_gpio_keys = {
745 .name = "gpio-keys",
746 .dev = {
747 .platform_data = &universal_gpio_keys_data,
748 },
749};
750
751/* eMMC */
752static struct s3c_sdhci_platdata universal_hsmmc0_data __initdata = {
753 .max_width = 8,
754 .host_caps = (MMC_CAP_8_BIT_DATA | MMC_CAP_4_BIT_DATA |
755 MMC_CAP_MMC_HIGHSPEED | MMC_CAP_SD_HIGHSPEED),
756 .cd_type = S3C_SDHCI_CD_PERMANENT,
757};
758
759static struct regulator_consumer_supply mmc0_supplies[] = {
760 REGULATOR_SUPPLY("vmmc", "exynos4-sdhci.0"),
761};
762
763static struct regulator_init_data mmc0_fixed_voltage_init_data = {
764 .constraints = {
765 .name = "VMEM_VDD_2.8V",
766 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
767 },
768 .num_consumer_supplies = ARRAY_SIZE(mmc0_supplies),
769 .consumer_supplies = mmc0_supplies,
770};
771
772static struct fixed_voltage_config mmc0_fixed_voltage_config = {
773 .supply_name = "MASSMEMORY_EN",
774 .microvolts = 2800000,
775 .gpio = EXYNOS4_GPE1(3),
776 .enable_high = true,
777 .init_data = &mmc0_fixed_voltage_init_data,
778};
779
780static struct platform_device mmc0_fixed_voltage = {
781 .name = "reg-fixed-voltage",
782 .id = FIXED_REG_ID_MMC0,
783 .dev = {
784 .platform_data = &mmc0_fixed_voltage_config,
785 },
786};
787
788/* SD */
789static struct s3c_sdhci_platdata universal_hsmmc2_data __initdata = {
790 .max_width = 4,
791 .host_caps = MMC_CAP_4_BIT_DATA |
792 MMC_CAP_MMC_HIGHSPEED | MMC_CAP_SD_HIGHSPEED,
793 .ext_cd_gpio = EXYNOS4_GPX3(4), /* XEINT_28 */
794 .ext_cd_gpio_invert = 1,
795 .cd_type = S3C_SDHCI_CD_GPIO,
796};
797
798/* WiFi */
799static struct s3c_sdhci_platdata universal_hsmmc3_data __initdata = {
800 .max_width = 4,
801 .host_caps = MMC_CAP_4_BIT_DATA |
802 MMC_CAP_MMC_HIGHSPEED | MMC_CAP_SD_HIGHSPEED,
803 .cd_type = S3C_SDHCI_CD_EXTERNAL,
804};
805
806static void __init universal_sdhci_init(void)
807{
808 s3c_sdhci0_set_platdata(&universal_hsmmc0_data);
809 s3c_sdhci2_set_platdata(&universal_hsmmc2_data);
810 s3c_sdhci3_set_platdata(&universal_hsmmc3_data);
811}
812
813/* I2C1 */
814static struct i2c_board_info i2c1_devs[] __initdata = {
815 /* Gyro, To be updated */
816};
817
818#ifdef CONFIG_DRM_EXYNOS
819static struct exynos_drm_fimd_pdata drm_fimd_pdata = {
820 .panel = {
821 .timing = {
822 .left_margin = 16,
823 .right_margin = 16,
824 .upper_margin = 2,
825 .lower_margin = 28,
826 .hsync_len = 2,
827 .vsync_len = 1,
828 .xres = 480,
829 .yres = 800,
830 .refresh = 55,
831 },
832 },
833 .vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB |
834 VIDCON0_CLKSEL_LCD,
835 .vidcon1 = VIDCON1_INV_VCLK | VIDCON1_INV_VDEN
836 | VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC,
837 .default_win = 3,
838 .bpp = 32,
839};
840#else
841/* Frame Buffer */
842static struct s3c_fb_pd_win universal_fb_win0 = {
843 .max_bpp = 32,
844 .default_bpp = 16,
845 .xres = 480,
846 .yres = 800,
847 .virtual_x = 480,
848 .virtual_y = 2 * 800,
849};
850
851static struct fb_videomode universal_lcd_timing = {
852 .left_margin = 16,
853 .right_margin = 16,
854 .upper_margin = 2,
855 .lower_margin = 28,
856 .hsync_len = 2,
857 .vsync_len = 1,
858 .xres = 480,
859 .yres = 800,
860 .refresh = 55,
861};
862
863static struct s3c_fb_platdata universal_lcd_pdata __initdata = {
864 .win[0] = &universal_fb_win0,
865 .vtiming = &universal_lcd_timing,
866 .vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB |
867 VIDCON0_CLKSEL_LCD,
868 .vidcon1 = VIDCON1_INV_VCLK | VIDCON1_INV_VDEN
869 | VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC,
870 .setup_gpio = exynos4_fimd0_gpio_setup_24bpp,
871};
872#endif
873
874static struct regulator_consumer_supply cam_vt_dio_supply =
875 REGULATOR_SUPPLY("vdd_core", "0-003c");
876
877static struct regulator_init_data cam_vt_dio_reg_init_data = {
878 .constraints = { .valid_ops_mask = REGULATOR_CHANGE_STATUS },
879 .num_consumer_supplies = 1,
880 .consumer_supplies = &cam_vt_dio_supply,
881};
882
883static struct fixed_voltage_config cam_vt_dio_fixed_voltage_cfg = {
884 .supply_name = "CAM_VT_D_IO",
885 .microvolts = 2800000,
886 .gpio = EXYNOS4_GPE2(1), /* CAM_PWR_EN2 */
887 .enable_high = 1,
888 .init_data = &cam_vt_dio_reg_init_data,
889};
890
891static struct platform_device cam_vt_dio_fixed_reg_dev = {
892 .name = "reg-fixed-voltage", .id = FIXED_REG_ID_CAM_VT_DIO,
893 .dev = { .platform_data = &cam_vt_dio_fixed_voltage_cfg },
894};
895
896static struct regulator_consumer_supply cam_i_core_supply =
897 REGULATOR_SUPPLY("core", "0-001f");
898
899static struct regulator_init_data cam_i_core_reg_init_data = {
900 .constraints = { .valid_ops_mask = REGULATOR_CHANGE_STATUS },
901 .num_consumer_supplies = 1,
902 .consumer_supplies = &cam_i_core_supply,
903};
904
905static struct fixed_voltage_config cam_i_core_fixed_voltage_cfg = {
906 .supply_name = "CAM_I_CORE_1.2V",
907 .microvolts = 1200000,
908 .gpio = EXYNOS4_GPE2(2), /* CAM_8M_CORE_EN */
909 .enable_high = 1,
910 .init_data = &cam_i_core_reg_init_data,
911};
912
913static struct platform_device cam_i_core_fixed_reg_dev = {
914 .name = "reg-fixed-voltage", .id = FIXED_REG_ID_CAM_I_CORE,
915 .dev = { .platform_data = &cam_i_core_fixed_voltage_cfg },
916};
917
918static struct regulator_consumer_supply cam_s_if_supply =
919 REGULATOR_SUPPLY("d_sensor", "0-001f");
920
921static struct regulator_init_data cam_s_if_reg_init_data = {
922 .constraints = { .valid_ops_mask = REGULATOR_CHANGE_STATUS },
923 .num_consumer_supplies = 1,
924 .consumer_supplies = &cam_s_if_supply,
925};
926
927static struct fixed_voltage_config cam_s_if_fixed_voltage_cfg = {
928 .supply_name = "CAM_S_IF_1.8V",
929 .microvolts = 1800000,
930 .gpio = EXYNOS4_GPE3(0), /* CAM_PWR_EN1 */
931 .enable_high = 1,
932 .init_data = &cam_s_if_reg_init_data,
933};
934
935static struct platform_device cam_s_if_fixed_reg_dev = {
936 .name = "reg-fixed-voltage", .id = FIXED_REG_ID_CAM_S_IF,
937 .dev = { .platform_data = &cam_s_if_fixed_voltage_cfg },
938};
939
940static struct s5p_platform_mipi_csis mipi_csis_platdata = {
941 .clk_rate = 166000000UL,
942 .lanes = 2,
943 .hs_settle = 12,
944};
945
946#define GPIO_CAM_LEVEL_EN(n) EXYNOS4_GPE4(n + 3)
947#define GPIO_CAM_8M_ISP_INT EXYNOS4_GPX1(5) /* XEINT_13 */
948#define GPIO_CAM_MEGA_nRST EXYNOS4_GPE2(5)
949#define GPIO_CAM_VGA_NRST EXYNOS4_GPE4(7)
950#define GPIO_CAM_VGA_NSTBY EXYNOS4_GPE4(6)
951
952static int s5k6aa_set_power(int on)
953{
954 gpio_set_value(GPIO_CAM_LEVEL_EN(2), !!on);
955 return 0;
956}
957
958static struct s5k6aa_platform_data s5k6aa_platdata = {
959 .mclk_frequency = 21600000UL,
960 .gpio_reset = { GPIO_CAM_VGA_NRST, 0 },
961 .gpio_stby = { GPIO_CAM_VGA_NSTBY, 0 },
962 .bus_type = V4L2_MBUS_PARALLEL,
963 .horiz_flip = 1,
964 .set_power = s5k6aa_set_power,
965};
966
967static struct i2c_board_info s5k6aa_board_info = {
968 I2C_BOARD_INFO("S5K6AA", 0x3C),
969 .platform_data = &s5k6aa_platdata,
970};
971
972static int m5mols_set_power(struct device *dev, int on)
973{
974 gpio_set_value(GPIO_CAM_LEVEL_EN(1), !on);
975 gpio_set_value(GPIO_CAM_LEVEL_EN(2), !!on);
976 return 0;
977}
978
979static struct m5mols_platform_data m5mols_platdata = {
980 .gpio_reset = GPIO_CAM_MEGA_nRST,
981 .reset_polarity = 0,
982 .set_power = m5mols_set_power,
983};
984
985static struct i2c_board_info m5mols_board_info = {
986 I2C_BOARD_INFO("M5MOLS", 0x1F),
987 .platform_data = &m5mols_platdata,
988};
989
990static struct fimc_source_info universal_camera_sensors[] = {
991 {
992 .mux_id = 0,
993 .flags = V4L2_MBUS_PCLK_SAMPLE_FALLING |
994 V4L2_MBUS_VSYNC_ACTIVE_LOW,
995 .fimc_bus_type = FIMC_BUS_TYPE_ITU_601,
996 .board_info = &s5k6aa_board_info,
997 .i2c_bus_num = 0,
998 .clk_frequency = 24000000UL,
999 }, {
1000 .mux_id = 0,
1001 .flags = V4L2_MBUS_PCLK_SAMPLE_FALLING |
1002 V4L2_MBUS_VSYNC_ACTIVE_LOW,
1003 .fimc_bus_type = FIMC_BUS_TYPE_MIPI_CSI2,
1004 .board_info = &m5mols_board_info,
1005 .i2c_bus_num = 0,
1006 .clk_frequency = 24000000UL,
1007 },
1008};
1009
1010static struct s5p_platform_fimc fimc_md_platdata = {
1011 .source_info = universal_camera_sensors,
1012 .num_clients = ARRAY_SIZE(universal_camera_sensors),
1013};
1014
1015static struct gpio universal_camera_gpios[] = {
1016 { GPIO_CAM_LEVEL_EN(1), GPIOF_OUT_INIT_HIGH, "CAM_LVL_EN1" },
1017 { GPIO_CAM_LEVEL_EN(2), GPIOF_OUT_INIT_LOW, "CAM_LVL_EN2" },
1018 { GPIO_CAM_8M_ISP_INT, GPIOF_IN, "8M_ISP_INT" },
1019 { GPIO_CAM_MEGA_nRST, GPIOF_OUT_INIT_LOW, "CAM_8M_NRST" },
1020 { GPIO_CAM_VGA_NRST, GPIOF_OUT_INIT_LOW, "CAM_VGA_NRST" },
1021 { GPIO_CAM_VGA_NSTBY, GPIOF_OUT_INIT_LOW, "CAM_VGA_NSTBY" },
1022};
1023
1024/* USB OTG */
1025static struct s3c_hsotg_plat universal_hsotg_pdata;
1026
1027static void __init universal_camera_init(void)
1028{
1029 s3c_set_platdata(&mipi_csis_platdata, sizeof(mipi_csis_platdata),
1030 &s5p_device_mipi_csis0);
1031 s3c_set_platdata(&fimc_md_platdata, sizeof(fimc_md_platdata),
1032 &s5p_device_fimc_md);
1033
1034 if (gpio_request_array(universal_camera_gpios,
1035 ARRAY_SIZE(universal_camera_gpios))) {
1036 pr_err("%s: GPIO request failed\n", __func__);
1037 return;
1038 }
1039
1040 if (!s3c_gpio_cfgpin(GPIO_CAM_8M_ISP_INT, S3C_GPIO_SFN(0xf)))
1041 m5mols_board_info.irq = gpio_to_irq(GPIO_CAM_8M_ISP_INT);
1042 else
1043 pr_err("Failed to configure 8M_ISP_INT GPIO\n");
1044
1045 /* Free GPIOs controlled directly by the sensor drivers. */
1046 gpio_free(GPIO_CAM_MEGA_nRST);
1047 gpio_free(GPIO_CAM_8M_ISP_INT);
1048 gpio_free(GPIO_CAM_VGA_NRST);
1049 gpio_free(GPIO_CAM_VGA_NSTBY);
1050
1051 if (exynos4_fimc_setup_gpio(S5P_CAMPORT_A))
1052 pr_err("Camera port A setup failed\n");
1053}
1054
1055static struct platform_device *universal_devices[] __initdata = {
1056 /* Samsung Platform Devices */
1057 &s5p_device_mipi_csis0,
1058 &s5p_device_fimc0,
1059 &s5p_device_fimc1,
1060 &s5p_device_fimc2,
1061 &s5p_device_fimc3,
1062 &s5p_device_g2d,
1063 &mmc0_fixed_voltage,
1064 &s3c_device_hsmmc0,
1065 &s3c_device_hsmmc2,
1066 &s3c_device_hsmmc3,
1067 &s3c_device_i2c0,
1068 &s3c_device_i2c3,
1069 &s3c_device_i2c5,
1070 &s5p_device_i2c_hdmiphy,
1071 &hdmi_fixed_voltage,
1072 &s5p_device_hdmi,
1073 &s5p_device_sdo,
1074 &s5p_device_mixer,
1075
1076 /* Universal Devices */
1077 &i2c_gpio12,
1078 &universal_gpio_keys,
1079 &s5p_device_onenand,
1080 &s5p_device_fimd0,
1081 &s5p_device_jpeg,
1082 &s3c_device_usb_hsotg,
1083 &s5p_device_mfc,
1084 &s5p_device_mfc_l,
1085 &s5p_device_mfc_r,
1086 &cam_vt_dio_fixed_reg_dev,
1087 &cam_i_core_fixed_reg_dev,
1088 &cam_s_if_fixed_reg_dev,
1089 &s5p_device_fimc_md,
1090};
1091
1092static void __init universal_map_io(void)
1093{
1094 exynos_init_io(NULL, 0);
1095 s3c24xx_init_uarts(universal_uartcfgs, ARRAY_SIZE(universal_uartcfgs));
1096 exynos_set_timer_source(BIT(2) | BIT(4));
1097 xxti_f = 0;
1098 xusbxti_f = 24000000;
1099}
1100
1101static void s5p_tv_setup(void)
1102{
1103 /* direct HPD to HDMI chip */
1104 gpio_request_one(EXYNOS4_GPX3(7), GPIOF_IN, "hpd-plug");
1105 s3c_gpio_cfgpin(EXYNOS4_GPX3(7), S3C_GPIO_SFN(0x3));
1106 s3c_gpio_setpull(EXYNOS4_GPX3(7), S3C_GPIO_PULL_NONE);
1107}
1108
1109static void __init universal_reserve(void)
1110{
1111 s5p_mfc_reserve_mem(0x43000000, 8 << 20, 0x51000000, 8 << 20);
1112}
1113
1114static void __init universal_machine_init(void)
1115{
1116 universal_sdhci_init();
1117 s5p_tv_setup();
1118
1119 s3c_i2c0_set_platdata(&universal_i2c0_platdata);
1120 i2c_register_board_info(1, i2c1_devs, ARRAY_SIZE(i2c1_devs));
1121
1122 universal_tsp_init();
1123 s3c_i2c3_set_platdata(NULL);
1124 i2c_register_board_info(3, i2c3_devs, ARRAY_SIZE(i2c3_devs));
1125
1126 s3c_i2c5_set_platdata(NULL);
1127 s5p_i2c_hdmiphy_set_platdata(NULL);
1128 i2c_register_board_info(5, i2c5_devs, ARRAY_SIZE(i2c5_devs));
1129
1130#ifdef CONFIG_DRM_EXYNOS
1131 s5p_device_fimd0.dev.platform_data = &drm_fimd_pdata;
1132 exynos4_fimd0_gpio_setup_24bpp();
1133#else
1134 s5p_fimd0_set_platdata(&universal_lcd_pdata);
1135#endif
1136
1137 universal_touchkey_init();
1138 i2c_register_board_info(I2C_GPIO_BUS_12, i2c_gpio12_devs,
1139 ARRAY_SIZE(i2c_gpio12_devs));
1140
1141 s3c_hsotg_set_platdata(&universal_hsotg_pdata);
1142 universal_camera_init();
1143
1144 /* Last */
1145 platform_add_devices(universal_devices, ARRAY_SIZE(universal_devices));
1146}
1147
1148MACHINE_START(UNIVERSAL_C210, "UNIVERSAL_C210")
1149 /* Maintainer: Kyungmin Park <kyungmin.park@samsung.com> */
1150 .atag_offset = 0x100,
1151 .smp = smp_ops(exynos_smp_ops),
1152 .init_irq = exynos4_init_irq,
1153 .map_io = universal_map_io,
1154 .init_machine = universal_machine_init,
1155 .init_late = exynos_init_late,
1156 .init_time = exynos_init_time,
1157 .reserve = &universal_reserve,
1158 .restart = exynos4_restart,
1159MACHINE_END
diff --git a/arch/arm/mach-exynos/platsmp.c b/arch/arm/mach-exynos/platsmp.c
index a0e8ff7758a4..58b43e6f9262 100644
--- a/arch/arm/mach-exynos/platsmp.c
+++ b/arch/arm/mach-exynos/platsmp.c
@@ -50,6 +50,8 @@ static inline void __iomem *cpu_boot_reg(int cpu)
50 boot_reg = cpu_boot_reg_base(); 50 boot_reg = cpu_boot_reg_base();
51 if (soc_is_exynos4412()) 51 if (soc_is_exynos4412())
52 boot_reg += 4*cpu; 52 boot_reg += 4*cpu;
53 else if (soc_is_exynos5420())
54 boot_reg += 4;
53 return boot_reg; 55 return boot_reg;
54} 56}
55 57
@@ -73,7 +75,7 @@ static void __iomem *scu_base_addr(void)
73 75
74static DEFINE_SPINLOCK(boot_lock); 76static DEFINE_SPINLOCK(boot_lock);
75 77
76static void __cpuinit exynos_secondary_init(unsigned int cpu) 78static void exynos_secondary_init(unsigned int cpu)
77{ 79{
78 /* 80 /*
79 * let the primary processor know we're out of the 81 * let the primary processor know we're out of the
@@ -88,7 +90,7 @@ static void __cpuinit exynos_secondary_init(unsigned int cpu)
88 spin_unlock(&boot_lock); 90 spin_unlock(&boot_lock);
89} 91}
90 92
91static int __cpuinit exynos_boot_secondary(unsigned int cpu, struct task_struct *idle) 93static int exynos_boot_secondary(unsigned int cpu, struct task_struct *idle)
92{ 94{
93 unsigned long timeout; 95 unsigned long timeout;
94 unsigned long phys_cpu = cpu_logical_map(cpu); 96 unsigned long phys_cpu = cpu_logical_map(cpu);
@@ -180,10 +182,14 @@ static void __init exynos_smp_init_cpus(void)
180 void __iomem *scu_base = scu_base_addr(); 182 void __iomem *scu_base = scu_base_addr();
181 unsigned int i, ncores; 183 unsigned int i, ncores;
182 184
183 if (soc_is_exynos5250()) 185 if (read_cpuid_part_number() == ARM_CPU_PART_CORTEX_A9)
184 ncores = 2;
185 else
186 ncores = scu_base ? scu_get_core_count(scu_base) : 1; 186 ncores = scu_base ? scu_get_core_count(scu_base) : 1;
187 else
188 /*
189 * CPU Nodes are passed thru DT and set_cpu_possible
190 * is set by "arm_dt_init_cpu_maps".
191 */
192 return;
187 193
188 /* sanity check */ 194 /* sanity check */
189 if (ncores > nr_cpu_ids) { 195 if (ncores > nr_cpu_ids) {
@@ -200,7 +206,7 @@ static void __init exynos_smp_prepare_cpus(unsigned int max_cpus)
200{ 206{
201 int i; 207 int i;
202 208
203 if (!(soc_is_exynos5250() || soc_is_exynos5440())) 209 if (read_cpuid_part_number() == ARM_CPU_PART_CORTEX_A9)
204 scu_enable(scu_base_addr()); 210 scu_enable(scu_base_addr());
205 211
206 /* 212 /*
diff --git a/arch/arm/mach-exynos/pm.c b/arch/arm/mach-exynos/pm.c
index e3faaa812016..c679db577269 100644
--- a/arch/arm/mach-exynos/pm.c
+++ b/arch/arm/mach-exynos/pm.c
@@ -30,7 +30,6 @@
30#include <plat/regs-srom.h> 30#include <plat/regs-srom.h>
31 31
32#include <mach/regs-irq.h> 32#include <mach/regs-irq.h>
33#include <mach/regs-gpio.h>
34#include <mach/regs-clock.h> 33#include <mach/regs-clock.h>
35#include <mach/regs-pmu.h> 34#include <mach/regs-pmu.h>
36#include <mach/pm-core.h> 35#include <mach/pm-core.h>
@@ -218,6 +217,9 @@ static __init int exynos_pm_drvinit(void)
218 struct clk *pll_base; 217 struct clk *pll_base;
219 unsigned int tmp; 218 unsigned int tmp;
220 219
220 if (soc_is_exynos5440())
221 return 0;
222
221 s3c_pm_init(); 223 s3c_pm_init();
222 224
223 /* All wakeup disable */ 225 /* All wakeup disable */
@@ -341,6 +343,9 @@ static struct syscore_ops exynos_pm_syscore_ops = {
341 343
342static __init int exynos_pm_syscore_init(void) 344static __init int exynos_pm_syscore_init(void)
343{ 345{
346 if (soc_is_exynos5440())
347 return 0;
348
344 register_syscore_ops(&exynos_pm_syscore_ops); 349 register_syscore_ops(&exynos_pm_syscore_ops);
345 return 0; 350 return 0;
346} 351}
diff --git a/arch/arm/mach-exynos/pm_domains.c b/arch/arm/mach-exynos/pm_domains.c
index 9f1351de52f7..1703593e366c 100644
--- a/arch/arm/mach-exynos/pm_domains.c
+++ b/arch/arm/mach-exynos/pm_domains.c
@@ -74,17 +74,6 @@ static int exynos_pd_power_off(struct generic_pm_domain *domain)
74 return exynos_pd_power(domain, false); 74 return exynos_pd_power(domain, false);
75} 75}
76 76
77#define EXYNOS_GPD(PD, BASE, NAME) \
78static struct exynos_pm_domain PD = { \
79 .base = (void __iomem *)BASE, \
80 .name = NAME, \
81 .pd = { \
82 .power_off = exynos_pd_power_off, \
83 .power_on = exynos_pd_power_on, \
84 }, \
85}
86
87#ifdef CONFIG_OF
88static void exynos_add_device_to_domain(struct exynos_pm_domain *pd, 77static void exynos_add_device_to_domain(struct exynos_pm_domain *pd,
89 struct device *dev) 78 struct device *dev)
90{ 79{
@@ -157,7 +146,7 @@ static struct notifier_block platform_nb = {
157 .notifier_call = exynos_pm_notifier_call, 146 .notifier_call = exynos_pm_notifier_call,
158}; 147};
159 148
160static __init int exynos_pm_dt_parse_domains(void) 149static __init int exynos4_pm_init_power_domain(void)
161{ 150{
162 struct platform_device *pdev; 151 struct platform_device *pdev;
163 struct device_node *np; 152 struct device_node *np;
@@ -193,94 +182,6 @@ static __init int exynos_pm_dt_parse_domains(void)
193 182
194 return 0; 183 return 0;
195} 184}
196#else
197static __init int exynos_pm_dt_parse_domains(void)
198{
199 return 0;
200}
201#endif /* CONFIG_OF */
202
203static __init __maybe_unused void exynos_pm_add_dev_to_genpd(struct platform_device *pdev,
204 struct exynos_pm_domain *pd)
205{
206 if (pdev->dev.bus) {
207 if (!pm_genpd_add_device(&pd->pd, &pdev->dev))
208 pm_genpd_dev_need_restore(&pdev->dev, true);
209 else
210 pr_info("%s: error in adding %s device to %s power"
211 "domain\n", __func__, dev_name(&pdev->dev),
212 pd->name);
213 }
214}
215
216EXYNOS_GPD(exynos4_pd_mfc, S5P_PMU_MFC_CONF, "pd-mfc");
217EXYNOS_GPD(exynos4_pd_g3d, S5P_PMU_G3D_CONF, "pd-g3d");
218EXYNOS_GPD(exynos4_pd_lcd0, S5P_PMU_LCD0_CONF, "pd-lcd0");
219EXYNOS_GPD(exynos4_pd_lcd1, S5P_PMU_LCD1_CONF, "pd-lcd1");
220EXYNOS_GPD(exynos4_pd_tv, S5P_PMU_TV_CONF, "pd-tv");
221EXYNOS_GPD(exynos4_pd_cam, S5P_PMU_CAM_CONF, "pd-cam");
222EXYNOS_GPD(exynos4_pd_gps, S5P_PMU_GPS_CONF, "pd-gps");
223
224static struct exynos_pm_domain *exynos4_pm_domains[] = {
225 &exynos4_pd_mfc,
226 &exynos4_pd_g3d,
227 &exynos4_pd_lcd0,
228 &exynos4_pd_lcd1,
229 &exynos4_pd_tv,
230 &exynos4_pd_cam,
231 &exynos4_pd_gps,
232};
233
234static __init int exynos4_pm_init_power_domain(void)
235{
236 int idx;
237
238 if (of_have_populated_dt())
239 return exynos_pm_dt_parse_domains();
240
241 for (idx = 0; idx < ARRAY_SIZE(exynos4_pm_domains); idx++) {
242 struct exynos_pm_domain *pd = exynos4_pm_domains[idx];
243 int on = __raw_readl(pd->base + 0x4) & S5P_INT_LOCAL_PWR_EN;
244
245 pm_genpd_init(&pd->pd, NULL, !on);
246 }
247
248#ifdef CONFIG_S5P_DEV_FIMD0
249 exynos_pm_add_dev_to_genpd(&s5p_device_fimd0, &exynos4_pd_lcd0);
250#endif
251#ifdef CONFIG_S5P_DEV_TV
252 exynos_pm_add_dev_to_genpd(&s5p_device_hdmi, &exynos4_pd_tv);
253 exynos_pm_add_dev_to_genpd(&s5p_device_mixer, &exynos4_pd_tv);
254#endif
255#ifdef CONFIG_S5P_DEV_MFC
256 exynos_pm_add_dev_to_genpd(&s5p_device_mfc, &exynos4_pd_mfc);
257#endif
258#ifdef CONFIG_S5P_DEV_FIMC0
259 exynos_pm_add_dev_to_genpd(&s5p_device_fimc0, &exynos4_pd_cam);
260#endif
261#ifdef CONFIG_S5P_DEV_FIMC1
262 exynos_pm_add_dev_to_genpd(&s5p_device_fimc1, &exynos4_pd_cam);
263#endif
264#ifdef CONFIG_S5P_DEV_FIMC2
265 exynos_pm_add_dev_to_genpd(&s5p_device_fimc2, &exynos4_pd_cam);
266#endif
267#ifdef CONFIG_S5P_DEV_FIMC3
268 exynos_pm_add_dev_to_genpd(&s5p_device_fimc3, &exynos4_pd_cam);
269#endif
270#ifdef CONFIG_S5P_DEV_CSIS0
271 exynos_pm_add_dev_to_genpd(&s5p_device_mipi_csis0, &exynos4_pd_cam);
272#endif
273#ifdef CONFIG_S5P_DEV_CSIS1
274 exynos_pm_add_dev_to_genpd(&s5p_device_mipi_csis1, &exynos4_pd_cam);
275#endif
276#ifdef CONFIG_S5P_DEV_G2D
277 exynos_pm_add_dev_to_genpd(&s5p_device_g2d, &exynos4_pd_lcd0);
278#endif
279#ifdef CONFIG_S5P_DEV_JPEG
280 exynos_pm_add_dev_to_genpd(&s5p_device_jpeg, &exynos4_pd_cam);
281#endif
282 return 0;
283}
284arch_initcall(exynos4_pm_init_power_domain); 185arch_initcall(exynos4_pm_init_power_domain);
285 186
286int __init exynos_pm_late_initcall(void) 187int __init exynos_pm_late_initcall(void)
diff --git a/arch/arm/mach-exynos/setup-fimc.c b/arch/arm/mach-exynos/setup-fimc.c
deleted file mode 100644
index 6a45078d9d12..000000000000
--- a/arch/arm/mach-exynos/setup-fimc.c
+++ /dev/null
@@ -1,44 +0,0 @@
1/*
2 * Copyright (C) 2011 Samsung Electronics Co., Ltd.
3 *
4 * Exynos4 camera interface GPIO configuration.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
10
11#include <linux/gpio.h>
12#include <plat/gpio-cfg.h>
13#include <plat/camport.h>
14
15int exynos4_fimc_setup_gpio(enum s5p_camport_id id)
16{
17 u32 gpio8, gpio5;
18 u32 sfn;
19 int ret;
20
21 switch (id) {
22 case S5P_CAMPORT_A:
23 gpio8 = EXYNOS4_GPJ0(0); /* PCLK, VSYNC, HREF, DATA[0:4] */
24 gpio5 = EXYNOS4_GPJ1(0); /* DATA[5:7], CLKOUT, FIELD */
25 sfn = S3C_GPIO_SFN(2);
26 break;
27
28 case S5P_CAMPORT_B:
29 gpio8 = EXYNOS4_GPE0(0); /* DATA[0:7] */
30 gpio5 = EXYNOS4_GPE1(0); /* PCLK, VSYNC, HREF, CLKOUT, FIELD */
31 sfn = S3C_GPIO_SFN(3);
32 break;
33
34 default:
35 WARN(1, "Wrong camport id: %d\n", id);
36 return -EINVAL;
37 }
38
39 ret = s3c_gpio_cfgall_range(gpio8, 8, sfn, S3C_GPIO_PULL_UP);
40 if (ret)
41 return ret;
42
43 return s3c_gpio_cfgall_range(gpio5, 5, sfn, S3C_GPIO_PULL_UP);
44}
diff --git a/arch/arm/mach-exynos/setup-fimd0.c b/arch/arm/mach-exynos/setup-fimd0.c
deleted file mode 100644
index 5665bb4e980b..000000000000
--- a/arch/arm/mach-exynos/setup-fimd0.c
+++ /dev/null
@@ -1,43 +0,0 @@
1/* linux/arch/arm/mach-exynos4/setup-fimd0.c
2 *
3 * Copyright (c) 2009-2011 Samsung Electronics Co., Ltd.
4 * http://www.samsung.com
5 *
6 * Base Exynos4 FIMD 0 configuration
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/fb.h>
14#include <linux/gpio.h>
15
16#include <video/samsung_fimd.h>
17#include <plat/gpio-cfg.h>
18
19#include <mach/map.h>
20
21void exynos4_fimd0_gpio_setup_24bpp(void)
22{
23 unsigned int reg;
24
25 s3c_gpio_cfgrange_nopull(EXYNOS4_GPF0(0), 8, S3C_GPIO_SFN(2));
26 s3c_gpio_cfgrange_nopull(EXYNOS4_GPF1(0), 8, S3C_GPIO_SFN(2));
27 s3c_gpio_cfgrange_nopull(EXYNOS4_GPF2(0), 8, S3C_GPIO_SFN(2));
28 s3c_gpio_cfgrange_nopull(EXYNOS4_GPF3(0), 4, S3C_GPIO_SFN(2));
29
30 /*
31 * Set DISPLAY_CONTROL register for Display path selection.
32 *
33 * DISPLAY_CONTROL[1:0]
34 * ---------------------
35 * 00 | MIE
36 * 01 | MDINE
37 * 10 | FIMD : selected
38 * 11 | FIMD
39 */
40 reg = __raw_readl(S3C_VA_SYS + 0x0210);
41 reg |= (1 << 1);
42 __raw_writel(reg, S3C_VA_SYS + 0x0210);
43}
diff --git a/arch/arm/mach-exynos/setup-i2c0.c b/arch/arm/mach-exynos/setup-i2c0.c
deleted file mode 100644
index e2d9dfbf102c..000000000000
--- a/arch/arm/mach-exynos/setup-i2c0.c
+++ /dev/null
@@ -1,29 +0,0 @@
1/*
2 * Copyright (c) 2009-2012 Samsung Electronics Co., Ltd.
3 * http://www.samsung.com/
4 *
5 * I2C0 GPIO configuration.
6 *
7 * Based on plat-s3c64xx/setup-i2c0.c
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
14struct platform_device; /* don't need the contents */
15
16#include <linux/gpio.h>
17#include <linux/platform_data/i2c-s3c2410.h>
18#include <plat/gpio-cfg.h>
19#include <plat/cpu.h>
20
21void s3c_i2c0_cfg_gpio(struct platform_device *dev)
22{
23 if (soc_is_exynos5250() || soc_is_exynos5440())
24 /* will be implemented with gpio function */
25 return;
26
27 s3c_gpio_cfgall_range(EXYNOS4_GPD1(0), 2,
28 S3C_GPIO_SFN(2), S3C_GPIO_PULL_UP);
29}
diff --git a/arch/arm/mach-exynos/setup-i2c1.c b/arch/arm/mach-exynos/setup-i2c1.c
deleted file mode 100644
index 8d2279cc85dc..000000000000
--- a/arch/arm/mach-exynos/setup-i2c1.c
+++ /dev/null
@@ -1,23 +0,0 @@
1/*
2 * linux/arch/arm/mach-exynos4/setup-i2c1.c
3 *
4 * Copyright (C) 2010 Samsung Electronics Co., Ltd.
5 *
6 * I2C1 GPIO configuration.
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
13struct platform_device; /* don't need the contents */
14
15#include <linux/gpio.h>
16#include <linux/platform_data/i2c-s3c2410.h>
17#include <plat/gpio-cfg.h>
18
19void s3c_i2c1_cfg_gpio(struct platform_device *dev)
20{
21 s3c_gpio_cfgall_range(EXYNOS4_GPD1(2), 2,
22 S3C_GPIO_SFN(2), S3C_GPIO_PULL_UP);
23}
diff --git a/arch/arm/mach-exynos/setup-i2c2.c b/arch/arm/mach-exynos/setup-i2c2.c
deleted file mode 100644
index 0ed62fc42a77..000000000000
--- a/arch/arm/mach-exynos/setup-i2c2.c
+++ /dev/null
@@ -1,23 +0,0 @@
1/*
2 * linux/arch/arm/mach-exynos4/setup-i2c2.c
3 *
4 * Copyright (c) 2009-2010 Samsung Electronics Co., Ltd.
5 *
6 * I2C2 GPIO configuration.
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
13struct platform_device; /* don't need the contents */
14
15#include <linux/gpio.h>
16#include <linux/platform_data/i2c-s3c2410.h>
17#include <plat/gpio-cfg.h>
18
19void s3c_i2c2_cfg_gpio(struct platform_device *dev)
20{
21 s3c_gpio_cfgall_range(EXYNOS4_GPA0(6), 2,
22 S3C_GPIO_SFN(3), S3C_GPIO_PULL_UP);
23}
diff --git a/arch/arm/mach-exynos/setup-i2c3.c b/arch/arm/mach-exynos/setup-i2c3.c
deleted file mode 100644
index 7787fd26076b..000000000000
--- a/arch/arm/mach-exynos/setup-i2c3.c
+++ /dev/null
@@ -1,23 +0,0 @@
1/*
2 * linux/arch/arm/mach-exynos4/setup-i2c3.c
3 *
4 * Copyright (c) 2010 Samsung Electronics Co., Ltd.
5 *
6 * I2C3 GPIO configuration.
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
13struct platform_device; /* don't need the contents */
14
15#include <linux/gpio.h>
16#include <linux/platform_data/i2c-s3c2410.h>
17#include <plat/gpio-cfg.h>
18
19void s3c_i2c3_cfg_gpio(struct platform_device *dev)
20{
21 s3c_gpio_cfgall_range(EXYNOS4_GPA1(2), 2,
22 S3C_GPIO_SFN(3), S3C_GPIO_PULL_UP);
23}
diff --git a/arch/arm/mach-exynos/setup-i2c4.c b/arch/arm/mach-exynos/setup-i2c4.c
deleted file mode 100644
index edc847f89826..000000000000
--- a/arch/arm/mach-exynos/setup-i2c4.c
+++ /dev/null
@@ -1,23 +0,0 @@
1/*
2 * linux/arch/arm/mach-exynos4/setup-i2c4.c
3 *
4 * Copyright (c) 2010 Samsung Electronics Co., Ltd.
5 *
6 * I2C4 GPIO configuration.
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
13struct platform_device; /* don't need the contents */
14
15#include <linux/gpio.h>
16#include <linux/platform_data/i2c-s3c2410.h>
17#include <plat/gpio-cfg.h>
18
19void s3c_i2c4_cfg_gpio(struct platform_device *dev)
20{
21 s3c_gpio_cfgall_range(EXYNOS4_GPB(2), 2,
22 S3C_GPIO_SFN(3), S3C_GPIO_PULL_UP);
23}
diff --git a/arch/arm/mach-exynos/setup-i2c5.c b/arch/arm/mach-exynos/setup-i2c5.c
deleted file mode 100644
index d88af7f75954..000000000000
--- a/arch/arm/mach-exynos/setup-i2c5.c
+++ /dev/null
@@ -1,23 +0,0 @@
1/*
2 * linux/arch/arm/mach-exynos4/setup-i2c5.c
3 *
4 * Copyright (c) 2010 Samsung Electronics Co., Ltd.
5 *
6 * I2C5 GPIO configuration.
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
13struct platform_device; /* don't need the contents */
14
15#include <linux/gpio.h>
16#include <linux/platform_data/i2c-s3c2410.h>
17#include <plat/gpio-cfg.h>
18
19void s3c_i2c5_cfg_gpio(struct platform_device *dev)
20{
21 s3c_gpio_cfgall_range(EXYNOS4_GPB(6), 2,
22 S3C_GPIO_SFN(3), S3C_GPIO_PULL_UP);
23}
diff --git a/arch/arm/mach-exynos/setup-i2c6.c b/arch/arm/mach-exynos/setup-i2c6.c
deleted file mode 100644
index c590286c9d3a..000000000000
--- a/arch/arm/mach-exynos/setup-i2c6.c
+++ /dev/null
@@ -1,23 +0,0 @@
1/*
2 * linux/arch/arm/mach-exynos4/setup-i2c6.c
3 *
4 * Copyright (c) 2010 Samsung Electronics Co., Ltd.
5 *
6 * I2C6 GPIO configuration.
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
13struct platform_device; /* don't need the contents */
14
15#include <linux/gpio.h>
16#include <linux/platform_data/i2c-s3c2410.h>
17#include <plat/gpio-cfg.h>
18
19void s3c_i2c6_cfg_gpio(struct platform_device *dev)
20{
21 s3c_gpio_cfgall_range(EXYNOS4_GPC1(3), 2,
22 S3C_GPIO_SFN(4), S3C_GPIO_PULL_UP);
23}
diff --git a/arch/arm/mach-exynos/setup-i2c7.c b/arch/arm/mach-exynos/setup-i2c7.c
deleted file mode 100644
index 1bba75568a5f..000000000000
--- a/arch/arm/mach-exynos/setup-i2c7.c
+++ /dev/null
@@ -1,23 +0,0 @@
1/*
2 * linux/arch/arm/mach-exynos4/setup-i2c7.c
3 *
4 * Copyright (c) 2010 Samsung Electronics Co., Ltd.
5 *
6 * I2C7 GPIO configuration.
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
13struct platform_device; /* don't need the contents */
14
15#include <linux/gpio.h>
16#include <linux/platform_data/i2c-s3c2410.h>
17#include <plat/gpio-cfg.h>
18
19void s3c_i2c7_cfg_gpio(struct platform_device *dev)
20{
21 s3c_gpio_cfgall_range(EXYNOS4_GPD0(2), 2,
22 S3C_GPIO_SFN(3), S3C_GPIO_PULL_UP);
23}
diff --git a/arch/arm/mach-exynos/setup-keypad.c b/arch/arm/mach-exynos/setup-keypad.c
deleted file mode 100644
index 7862bfb5933d..000000000000
--- a/arch/arm/mach-exynos/setup-keypad.c
+++ /dev/null
@@ -1,36 +0,0 @@
1/* linux/arch/arm/mach-exynos4/setup-keypad.c
2 *
3 * Copyright (c) 2011 Samsung Electronics Co., Ltd.
4 * http://www.samsung.com
5 *
6 * GPIO configuration for Exynos4 KeyPad device
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/gpio.h>
14#include <plat/gpio-cfg.h>
15
16void samsung_keypad_cfg_gpio(unsigned int rows, unsigned int cols)
17{
18 /* Keypads can be of various combinations, Just making sure */
19
20 if (rows > 8) {
21 /* Set all the necessary GPX2 pins: KP_ROW[0~7] */
22 s3c_gpio_cfgall_range(EXYNOS4_GPX2(0), 8, S3C_GPIO_SFN(3),
23 S3C_GPIO_PULL_UP);
24
25 /* Set all the necessary GPX3 pins: KP_ROW[8~] */
26 s3c_gpio_cfgall_range(EXYNOS4_GPX3(0), (rows - 8),
27 S3C_GPIO_SFN(3), S3C_GPIO_PULL_UP);
28 } else {
29 /* Set all the necessary GPX2 pins: KP_ROW[x] */
30 s3c_gpio_cfgall_range(EXYNOS4_GPX2(0), rows, S3C_GPIO_SFN(3),
31 S3C_GPIO_PULL_UP);
32 }
33
34 /* Set all the necessary GPX1 pins to special-function 3: KP_COL[x] */
35 s3c_gpio_cfgrange_nopull(EXYNOS4_GPX1(0), cols, S3C_GPIO_SFN(3));
36}
diff --git a/arch/arm/mach-exynos/setup-sdhci-gpio.c b/arch/arm/mach-exynos/setup-sdhci-gpio.c
deleted file mode 100644
index d5b98c866738..000000000000
--- a/arch/arm/mach-exynos/setup-sdhci-gpio.c
+++ /dev/null
@@ -1,152 +0,0 @@
1/* linux/arch/arm/mach-exynos4/setup-sdhci-gpio.c
2 *
3 * Copyright (c) 2010-2011 Samsung Electronics Co., Ltd.
4 * http://www.samsung.com
5 *
6 * EXYNOS4 - Helper functions for setting up SDHCI device(s) GPIO (HSMMC)
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/platform_device.h>
17#include <linux/io.h>
18#include <linux/gpio.h>
19#include <linux/mmc/host.h>
20#include <linux/mmc/card.h>
21
22#include <mach/gpio.h>
23#include <plat/gpio-cfg.h>
24#include <plat/sdhci.h>
25
26void exynos4_setup_sdhci0_cfg_gpio(struct platform_device *dev, int width)
27{
28 struct s3c_sdhci_platdata *pdata = dev->dev.platform_data;
29 unsigned int gpio;
30
31 /* Set all the necessary GPK0[0:1] pins to special-function 2 */
32 for (gpio = EXYNOS4_GPK0(0); gpio < EXYNOS4_GPK0(2); gpio++) {
33 s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(2));
34 s3c_gpio_setpull(gpio, S3C_GPIO_PULL_NONE);
35 s5p_gpio_set_drvstr(gpio, S5P_GPIO_DRVSTR_LV4);
36 }
37
38 switch (width) {
39 case 8:
40 for (gpio = EXYNOS4_GPK1(3); gpio <= EXYNOS4_GPK1(6); gpio++) {
41 /* Data pin GPK1[3:6] to special-function 3 */
42 s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(3));
43 s3c_gpio_setpull(gpio, S3C_GPIO_PULL_UP);
44 s5p_gpio_set_drvstr(gpio, S5P_GPIO_DRVSTR_LV4);
45 }
46 case 4:
47 for (gpio = EXYNOS4_GPK0(3); gpio <= EXYNOS4_GPK0(6); gpio++) {
48 /* Data pin GPK0[3:6] to special-function 2 */
49 s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(2));
50 s3c_gpio_setpull(gpio, S3C_GPIO_PULL_UP);
51 s5p_gpio_set_drvstr(gpio, S5P_GPIO_DRVSTR_LV4);
52 }
53 default:
54 break;
55 }
56
57 if (pdata->cd_type == S3C_SDHCI_CD_INTERNAL) {
58 s3c_gpio_cfgpin(EXYNOS4_GPK0(2), S3C_GPIO_SFN(2));
59 s3c_gpio_setpull(EXYNOS4_GPK0(2), S3C_GPIO_PULL_UP);
60 s5p_gpio_set_drvstr(gpio, S5P_GPIO_DRVSTR_LV4);
61 }
62}
63
64void exynos4_setup_sdhci1_cfg_gpio(struct platform_device *dev, int width)
65{
66 struct s3c_sdhci_platdata *pdata = dev->dev.platform_data;
67 unsigned int gpio;
68
69 /* Set all the necessary GPK1[0:1] pins to special-function 2 */
70 for (gpio = EXYNOS4_GPK1(0); gpio < EXYNOS4_GPK1(2); gpio++) {
71 s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(2));
72 s3c_gpio_setpull(gpio, S3C_GPIO_PULL_NONE);
73 s5p_gpio_set_drvstr(gpio, S5P_GPIO_DRVSTR_LV4);
74 }
75
76 for (gpio = EXYNOS4_GPK1(3); gpio <= EXYNOS4_GPK1(6); gpio++) {
77 /* Data pin GPK1[3:6] to special-function 2 */
78 s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(2));
79 s3c_gpio_setpull(gpio, S3C_GPIO_PULL_UP);
80 s5p_gpio_set_drvstr(gpio, S5P_GPIO_DRVSTR_LV4);
81 }
82
83 if (pdata->cd_type == S3C_SDHCI_CD_INTERNAL) {
84 s3c_gpio_cfgpin(EXYNOS4_GPK1(2), S3C_GPIO_SFN(2));
85 s3c_gpio_setpull(EXYNOS4_GPK1(2), S3C_GPIO_PULL_UP);
86 s5p_gpio_set_drvstr(gpio, S5P_GPIO_DRVSTR_LV4);
87 }
88}
89
90void exynos4_setup_sdhci2_cfg_gpio(struct platform_device *dev, int width)
91{
92 struct s3c_sdhci_platdata *pdata = dev->dev.platform_data;
93 unsigned int gpio;
94
95 /* Set all the necessary GPK2[0:1] pins to special-function 2 */
96 for (gpio = EXYNOS4_GPK2(0); gpio < EXYNOS4_GPK2(2); gpio++) {
97 s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(2));
98 s3c_gpio_setpull(gpio, S3C_GPIO_PULL_NONE);
99 s5p_gpio_set_drvstr(gpio, S5P_GPIO_DRVSTR_LV4);
100 }
101
102 switch (width) {
103 case 8:
104 for (gpio = EXYNOS4_GPK3(3); gpio <= EXYNOS4_GPK3(6); gpio++) {
105 /* Data pin GPK3[3:6] to special-function 3 */
106 s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(3));
107 s3c_gpio_setpull(gpio, S3C_GPIO_PULL_UP);
108 s5p_gpio_set_drvstr(gpio, S5P_GPIO_DRVSTR_LV4);
109 }
110 case 4:
111 for (gpio = EXYNOS4_GPK2(3); gpio <= EXYNOS4_GPK2(6); gpio++) {
112 /* Data pin GPK2[3:6] to special-function 2 */
113 s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(2));
114 s3c_gpio_setpull(gpio, S3C_GPIO_PULL_UP);
115 s5p_gpio_set_drvstr(gpio, S5P_GPIO_DRVSTR_LV4);
116 }
117 default:
118 break;
119 }
120
121 if (pdata->cd_type == S3C_SDHCI_CD_INTERNAL) {
122 s3c_gpio_cfgpin(EXYNOS4_GPK2(2), S3C_GPIO_SFN(2));
123 s3c_gpio_setpull(EXYNOS4_GPK2(2), S3C_GPIO_PULL_UP);
124 s5p_gpio_set_drvstr(gpio, S5P_GPIO_DRVSTR_LV4);
125 }
126}
127
128void exynos4_setup_sdhci3_cfg_gpio(struct platform_device *dev, int width)
129{
130 struct s3c_sdhci_platdata *pdata = dev->dev.platform_data;
131 unsigned int gpio;
132
133 /* Set all the necessary GPK3[0:1] pins to special-function 2 */
134 for (gpio = EXYNOS4_GPK3(0); gpio < EXYNOS4_GPK3(2); gpio++) {
135 s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(2));
136 s3c_gpio_setpull(gpio, S3C_GPIO_PULL_NONE);
137 s5p_gpio_set_drvstr(gpio, S5P_GPIO_DRVSTR_LV4);
138 }
139
140 for (gpio = EXYNOS4_GPK3(3); gpio <= EXYNOS4_GPK3(6); gpio++) {
141 /* Data pin GPK3[3:6] to special-function 2 */
142 s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(2));
143 s3c_gpio_setpull(gpio, S3C_GPIO_PULL_UP);
144 s5p_gpio_set_drvstr(gpio, S5P_GPIO_DRVSTR_LV4);
145 }
146
147 if (pdata->cd_type == S3C_SDHCI_CD_INTERNAL) {
148 s3c_gpio_cfgpin(EXYNOS4_GPK3(2), S3C_GPIO_SFN(2));
149 s3c_gpio_setpull(EXYNOS4_GPK3(2), S3C_GPIO_PULL_UP);
150 s5p_gpio_set_drvstr(gpio, S5P_GPIO_DRVSTR_LV4);
151 }
152}
diff --git a/arch/arm/mach-exynos/setup-spi.c b/arch/arm/mach-exynos/setup-spi.c
deleted file mode 100644
index 4999829d1c6e..000000000000
--- a/arch/arm/mach-exynos/setup-spi.c
+++ /dev/null
@@ -1,45 +0,0 @@
1/* linux/arch/arm/mach-exynos4/setup-spi.c
2 *
3 * Copyright (C) 2011 Samsung Electronics Ltd.
4 * http://www.samsung.com/
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
10
11#include <linux/gpio.h>
12#include <plat/gpio-cfg.h>
13
14#ifdef CONFIG_S3C64XX_DEV_SPI0
15int s3c64xx_spi0_cfg_gpio(void)
16{
17 s3c_gpio_cfgpin(EXYNOS4_GPB(0), S3C_GPIO_SFN(2));
18 s3c_gpio_setpull(EXYNOS4_GPB(0), S3C_GPIO_PULL_UP);
19 s3c_gpio_cfgall_range(EXYNOS4_GPB(2), 2,
20 S3C_GPIO_SFN(2), S3C_GPIO_PULL_UP);
21 return 0;
22}
23#endif
24
25#ifdef CONFIG_S3C64XX_DEV_SPI1
26int s3c64xx_spi1_cfg_gpio(void)
27{
28 s3c_gpio_cfgpin(EXYNOS4_GPB(4), S3C_GPIO_SFN(2));
29 s3c_gpio_setpull(EXYNOS4_GPB(4), S3C_GPIO_PULL_UP);
30 s3c_gpio_cfgall_range(EXYNOS4_GPB(6), 2,
31 S3C_GPIO_SFN(2), S3C_GPIO_PULL_UP);
32 return 0;
33}
34#endif
35
36#ifdef CONFIG_S3C64XX_DEV_SPI2
37int s3c64xx_spi2_cfg_gpio(void)
38{
39 s3c_gpio_cfgpin(EXYNOS4_GPC1(1), S3C_GPIO_SFN(5));
40 s3c_gpio_setpull(EXYNOS4_GPC1(1), S3C_GPIO_PULL_UP);
41 s3c_gpio_cfgall_range(EXYNOS4_GPC1(3), 2,
42 S3C_GPIO_SFN(5), S3C_GPIO_PULL_UP);
43 return 0;
44}
45#endif
diff --git a/arch/arm/mach-exynos/setup-usb-phy.c b/arch/arm/mach-exynos/setup-usb-phy.c
deleted file mode 100644
index 6af40662a449..000000000000
--- a/arch/arm/mach-exynos/setup-usb-phy.c
+++ /dev/null
@@ -1,223 +0,0 @@
1/*
2 * Copyright (C) 2011 Samsung Electronics Co.Ltd
3 * Author: Joonyoung Shim <jy0922.shim@samsung.com>
4 *
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License as published by the
7 * Free Software Foundation; either version 2 of the License, or (at your
8 * option) any later version.
9 *
10 */
11
12#include <linux/clk.h>
13#include <linux/delay.h>
14#include <linux/err.h>
15#include <linux/io.h>
16#include <linux/platform_device.h>
17#include <mach/regs-pmu.h>
18#include <mach/regs-usb-phy.h>
19#include <plat/cpu.h>
20#include <plat/usb-phy.h>
21
22static atomic_t host_usage;
23
24static int exynos4_usb_host_phy_is_on(void)
25{
26 return (readl(EXYNOS4_PHYPWR) & PHY1_STD_ANALOG_POWERDOWN) ? 0 : 1;
27}
28
29static void exynos4210_usb_phy_clkset(struct platform_device *pdev)
30{
31 struct clk *xusbxti_clk;
32 u32 phyclk;
33
34 xusbxti_clk = clk_get(&pdev->dev, "xusbxti");
35 if (xusbxti_clk && !IS_ERR(xusbxti_clk)) {
36 if (soc_is_exynos4210()) {
37 /* set clock frequency for PLL */
38 phyclk = readl(EXYNOS4_PHYCLK) & ~EXYNOS4210_CLKSEL_MASK;
39
40 switch (clk_get_rate(xusbxti_clk)) {
41 case 12 * MHZ:
42 phyclk |= EXYNOS4210_CLKSEL_12M;
43 break;
44 case 48 * MHZ:
45 phyclk |= EXYNOS4210_CLKSEL_48M;
46 break;
47 default:
48 case 24 * MHZ:
49 phyclk |= EXYNOS4210_CLKSEL_24M;
50 break;
51 }
52 writel(phyclk, EXYNOS4_PHYCLK);
53 } else if (soc_is_exynos4212() || soc_is_exynos4412()) {
54 /* set clock frequency for PLL */
55 phyclk = readl(EXYNOS4_PHYCLK) & ~EXYNOS4X12_CLKSEL_MASK;
56
57 switch (clk_get_rate(xusbxti_clk)) {
58 case 9600 * KHZ:
59 phyclk |= EXYNOS4X12_CLKSEL_9600K;
60 break;
61 case 10 * MHZ:
62 phyclk |= EXYNOS4X12_CLKSEL_10M;
63 break;
64 case 12 * MHZ:
65 phyclk |= EXYNOS4X12_CLKSEL_12M;
66 break;
67 case 19200 * KHZ:
68 phyclk |= EXYNOS4X12_CLKSEL_19200K;
69 break;
70 case 20 * MHZ:
71 phyclk |= EXYNOS4X12_CLKSEL_20M;
72 break;
73 default:
74 case 24 * MHZ:
75 /* default reference clock */
76 phyclk |= EXYNOS4X12_CLKSEL_24M;
77 break;
78 }
79 writel(phyclk, EXYNOS4_PHYCLK);
80 }
81 clk_put(xusbxti_clk);
82 }
83}
84
85static int exynos4210_usb_phy0_init(struct platform_device *pdev)
86{
87 u32 rstcon;
88
89 writel(readl(S5P_USBDEVICE_PHY_CONTROL) | S5P_USBDEVICE_PHY_ENABLE,
90 S5P_USBDEVICE_PHY_CONTROL);
91
92 exynos4210_usb_phy_clkset(pdev);
93
94 /* set to normal PHY0 */
95 writel((readl(EXYNOS4_PHYPWR) & ~PHY0_NORMAL_MASK), EXYNOS4_PHYPWR);
96
97 /* reset PHY0 and Link */
98 rstcon = readl(EXYNOS4_RSTCON) | PHY0_SWRST_MASK;
99 writel(rstcon, EXYNOS4_RSTCON);
100 udelay(10);
101
102 rstcon &= ~PHY0_SWRST_MASK;
103 writel(rstcon, EXYNOS4_RSTCON);
104
105 return 0;
106}
107
108static int exynos4210_usb_phy0_exit(struct platform_device *pdev)
109{
110 writel((readl(EXYNOS4_PHYPWR) | PHY0_ANALOG_POWERDOWN |
111 PHY0_OTG_DISABLE), EXYNOS4_PHYPWR);
112
113 writel(readl(S5P_USBDEVICE_PHY_CONTROL) & ~S5P_USBDEVICE_PHY_ENABLE,
114 S5P_USBDEVICE_PHY_CONTROL);
115
116 return 0;
117}
118
119static int exynos4210_usb_phy1_init(struct platform_device *pdev)
120{
121 struct clk *otg_clk;
122 u32 rstcon;
123 int err;
124
125 atomic_inc(&host_usage);
126
127 otg_clk = clk_get(&pdev->dev, "otg");
128 if (IS_ERR(otg_clk)) {
129 dev_err(&pdev->dev, "Failed to get otg clock\n");
130 return PTR_ERR(otg_clk);
131 }
132
133 err = clk_enable(otg_clk);
134 if (err) {
135 clk_put(otg_clk);
136 return err;
137 }
138
139 if (exynos4_usb_host_phy_is_on())
140 return 0;
141
142 writel(readl(S5P_USBHOST_PHY_CONTROL) | S5P_USBHOST_PHY_ENABLE,
143 S5P_USBHOST_PHY_CONTROL);
144
145 exynos4210_usb_phy_clkset(pdev);
146
147 /* floating prevention logic: disable */
148 writel((readl(EXYNOS4_PHY1CON) | FPENABLEN), EXYNOS4_PHY1CON);
149
150 /* set to normal HSIC 0 and 1 of PHY1 */
151 writel((readl(EXYNOS4_PHYPWR) & ~PHY1_HSIC_NORMAL_MASK),
152 EXYNOS4_PHYPWR);
153
154 /* set to normal standard USB of PHY1 */
155 writel((readl(EXYNOS4_PHYPWR) & ~PHY1_STD_NORMAL_MASK), EXYNOS4_PHYPWR);
156
157 /* reset all ports of both PHY and Link */
158 rstcon = readl(EXYNOS4_RSTCON) | HOST_LINK_PORT_SWRST_MASK |
159 PHY1_SWRST_MASK;
160 writel(rstcon, EXYNOS4_RSTCON);
161 udelay(10);
162
163 rstcon &= ~(HOST_LINK_PORT_SWRST_MASK | PHY1_SWRST_MASK);
164 writel(rstcon, EXYNOS4_RSTCON);
165 udelay(80);
166
167 clk_disable(otg_clk);
168 clk_put(otg_clk);
169
170 return 0;
171}
172
173static int exynos4210_usb_phy1_exit(struct platform_device *pdev)
174{
175 struct clk *otg_clk;
176 int err;
177
178 if (atomic_dec_return(&host_usage) > 0)
179 return 0;
180
181 otg_clk = clk_get(&pdev->dev, "otg");
182 if (IS_ERR(otg_clk)) {
183 dev_err(&pdev->dev, "Failed to get otg clock\n");
184 return PTR_ERR(otg_clk);
185 }
186
187 err = clk_enable(otg_clk);
188 if (err) {
189 clk_put(otg_clk);
190 return err;
191 }
192
193 writel((readl(EXYNOS4_PHYPWR) | PHY1_STD_ANALOG_POWERDOWN),
194 EXYNOS4_PHYPWR);
195
196 writel(readl(S5P_USBHOST_PHY_CONTROL) & ~S5P_USBHOST_PHY_ENABLE,
197 S5P_USBHOST_PHY_CONTROL);
198
199 clk_disable(otg_clk);
200 clk_put(otg_clk);
201
202 return 0;
203}
204
205int s5p_usb_phy_init(struct platform_device *pdev, int type)
206{
207 if (type == USB_PHY_TYPE_DEVICE)
208 return exynos4210_usb_phy0_init(pdev);
209 else if (type == USB_PHY_TYPE_HOST)
210 return exynos4210_usb_phy1_init(pdev);
211
212 return -EINVAL;
213}
214
215int s5p_usb_phy_exit(struct platform_device *pdev, int type)
216{
217 if (type == USB_PHY_TYPE_DEVICE)
218 return exynos4210_usb_phy0_exit(pdev);
219 else if (type == USB_PHY_TYPE_HOST)
220 return exynos4210_usb_phy1_exit(pdev);
221
222 return -EINVAL;
223}
diff --git a/arch/arm/mach-footbridge/cats-hw.c b/arch/arm/mach-footbridge/cats-hw.c
index 6987a09ec219..9669cc0b6318 100644
--- a/arch/arm/mach-footbridge/cats-hw.c
+++ b/arch/arm/mach-footbridge/cats-hw.c
@@ -86,7 +86,7 @@ fixup_cats(struct tag *tags, char **cmdline, struct meminfo *mi)
86MACHINE_START(CATS, "Chalice-CATS") 86MACHINE_START(CATS, "Chalice-CATS")
87 /* Maintainer: Philip Blundell */ 87 /* Maintainer: Philip Blundell */
88 .atag_offset = 0x100, 88 .atag_offset = 0x100,
89 .restart_mode = 's', 89 .reboot_mode = REBOOT_SOFT,
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,
diff --git a/arch/arm/mach-footbridge/common.c b/arch/arm/mach-footbridge/common.c
index a42b369bc439..2739ca2c1334 100644
--- a/arch/arm/mach-footbridge/common.c
+++ b/arch/arm/mach-footbridge/common.c
@@ -198,9 +198,9 @@ void __init footbridge_map_io(void)
198 } 198 }
199} 199}
200 200
201void footbridge_restart(char mode, const char *cmd) 201void footbridge_restart(enum reboot_mode mode, const char *cmd)
202{ 202{
203 if (mode == 's') { 203 if (mode == REBOOT_SOFT) {
204 /* Jump into the ROM */ 204 /* Jump into the ROM */
205 soft_restart(0x41000000); 205 soft_restart(0x41000000);
206 } else { 206 } else {
diff --git a/arch/arm/mach-footbridge/common.h b/arch/arm/mach-footbridge/common.h
index a846e50a07b8..56607b3a773e 100644
--- a/arch/arm/mach-footbridge/common.h
+++ b/arch/arm/mach-footbridge/common.h
@@ -1,3 +1,4 @@
1#include <linux/reboot.h>
1 2
2extern void footbridge_timer_init(void); 3extern void footbridge_timer_init(void);
3extern void isa_timer_init(void); 4extern void isa_timer_init(void);
@@ -8,4 +9,4 @@ extern void footbridge_map_io(void);
8extern void footbridge_init_irq(void); 9extern void footbridge_init_irq(void);
9 10
10extern void isa_init_irq(unsigned int irq); 11extern void isa_init_irq(unsigned int irq);
11extern void footbridge_restart(char, const char *); 12extern void footbridge_restart(enum reboot_mode, const char *);
diff --git a/arch/arm/mach-footbridge/dc21285.c b/arch/arm/mach-footbridge/dc21285.c
index a7cd2cf5e08d..3490a24f969e 100644
--- a/arch/arm/mach-footbridge/dc21285.c
+++ b/arch/arm/mach-footbridge/dc21285.c
@@ -276,8 +276,6 @@ int __init dc21285_setup(int nr, struct pci_sys_data *sys)
276 276
277 sys->mem_offset = DC21285_PCI_MEM; 277 sys->mem_offset = DC21285_PCI_MEM;
278 278
279 pci_ioremap_io(0, DC21285_PCI_IO);
280
281 pci_add_resource_offset(&sys->resources, &res[0], sys->mem_offset); 279 pci_add_resource_offset(&sys->resources, &res[0], sys->mem_offset);
282 pci_add_resource_offset(&sys->resources, &res[1], sys->mem_offset); 280 pci_add_resource_offset(&sys->resources, &res[1], sys->mem_offset);
283 281
diff --git a/arch/arm/mach-footbridge/netwinder-hw.c b/arch/arm/mach-footbridge/netwinder-hw.c
index 90ea23fdce4c..1fd2cf097e30 100644
--- a/arch/arm/mach-footbridge/netwinder-hw.c
+++ b/arch/arm/mach-footbridge/netwinder-hw.c
@@ -634,9 +634,9 @@ fixup_netwinder(struct tag *tags, char **cmdline, struct meminfo *mi)
634#endif 634#endif
635} 635}
636 636
637static void netwinder_restart(char mode, const char *cmd) 637static void netwinder_restart(enum reboot_mode mode, const char *cmd)
638{ 638{
639 if (mode == 's') { 639 if (mode == REBOOT_SOFT) {
640 /* Jump into the ROM */ 640 /* Jump into the ROM */
641 soft_restart(0x41000000); 641 soft_restart(0x41000000);
642 } else { 642 } else {
diff --git a/arch/arm/mach-highbank/core.h b/arch/arm/mach-highbank/core.h
index 3f65206a9b92..aea1ec5ab6f8 100644
--- a/arch/arm/mach-highbank/core.h
+++ b/arch/arm/mach-highbank/core.h
@@ -1,8 +1,10 @@
1#ifndef __HIGHBANK_CORE_H 1#ifndef __HIGHBANK_CORE_H
2#define __HIGHBANK_CORE_H 2#define __HIGHBANK_CORE_H
3 3
4#include <linux/reboot.h>
5
4extern void highbank_set_cpu_jump(int cpu, void *jump_addr); 6extern void highbank_set_cpu_jump(int cpu, void *jump_addr);
5extern void highbank_restart(char, const char *); 7extern void highbank_restart(enum reboot_mode, const char *);
6extern void __iomem *scu_base_addr; 8extern void __iomem *scu_base_addr;
7 9
8#ifdef CONFIG_PM_SLEEP 10#ifdef CONFIG_PM_SLEEP
diff --git a/arch/arm/mach-highbank/highbank.c b/arch/arm/mach-highbank/highbank.c
index e7df2dd43a40..88815795fe26 100644
--- a/arch/arm/mach-highbank/highbank.c
+++ b/arch/arm/mach-highbank/highbank.c
@@ -115,6 +115,7 @@ static int highbank_platform_notifier(struct notifier_block *nb,
115{ 115{
116 struct resource *res; 116 struct resource *res;
117 int reg = -1; 117 int reg = -1;
118 u32 val;
118 struct device *dev = __dev; 119 struct device *dev = __dev;
119 120
120 if (event != BUS_NOTIFY_ADD_DEVICE) 121 if (event != BUS_NOTIFY_ADD_DEVICE)
@@ -141,10 +142,10 @@ static int highbank_platform_notifier(struct notifier_block *nb,
141 return NOTIFY_DONE; 142 return NOTIFY_DONE;
142 143
143 if (of_property_read_bool(dev->of_node, "dma-coherent")) { 144 if (of_property_read_bool(dev->of_node, "dma-coherent")) {
144 writel(0xff31, sregs_base + reg); 145 val = readl(sregs_base + reg);
146 writel(val | 0xff01, sregs_base + reg);
145 set_dma_ops(dev, &arm_coherent_dma_ops); 147 set_dma_ops(dev, &arm_coherent_dma_ops);
146 } else 148 }
147 writel(0, sregs_base + reg);
148 149
149 return NOTIFY_OK; 150 return NOTIFY_OK;
150} 151}
@@ -176,7 +177,6 @@ static const char *highbank_match[] __initconst = {
176 177
177DT_MACHINE_START(HIGHBANK, "Highbank") 178DT_MACHINE_START(HIGHBANK, "Highbank")
178 .smp = smp_ops(highbank_smp_ops), 179 .smp = smp_ops(highbank_smp_ops),
179 .map_io = debug_ll_io_init,
180 .init_irq = highbank_init_irq, 180 .init_irq = highbank_init_irq,
181 .init_time = highbank_timer_init, 181 .init_time = highbank_timer_init,
182 .init_machine = highbank_init, 182 .init_machine = highbank_init,
diff --git a/arch/arm/mach-highbank/platsmp.c b/arch/arm/mach-highbank/platsmp.c
index a984573e0d02..32d75cf55cbc 100644
--- a/arch/arm/mach-highbank/platsmp.c
+++ b/arch/arm/mach-highbank/platsmp.c
@@ -24,7 +24,7 @@
24 24
25extern void secondary_startup(void); 25extern void secondary_startup(void);
26 26
27static int __cpuinit highbank_boot_secondary(unsigned int cpu, struct task_struct *idle) 27static int highbank_boot_secondary(unsigned int cpu, struct task_struct *idle)
28{ 28{
29 highbank_set_cpu_jump(cpu, secondary_startup); 29 highbank_set_cpu_jump(cpu, secondary_startup);
30 arch_send_wakeup_ipi_mask(cpumask_of(cpu)); 30 arch_send_wakeup_ipi_mask(cpumask_of(cpu));
diff --git a/arch/arm/mach-highbank/system.c b/arch/arm/mach-highbank/system.c
index 37d8384dcf19..2df5870b7583 100644
--- a/arch/arm/mach-highbank/system.c
+++ b/arch/arm/mach-highbank/system.c
@@ -15,13 +15,14 @@
15 */ 15 */
16#include <linux/io.h> 16#include <linux/io.h>
17#include <asm/proc-fns.h> 17#include <asm/proc-fns.h>
18#include <linux/reboot.h>
18 19
19#include "core.h" 20#include "core.h"
20#include "sysregs.h" 21#include "sysregs.h"
21 22
22void highbank_restart(char mode, const char *cmd) 23void highbank_restart(enum reboot_mode mode, const char *cmd)
23{ 24{
24 if (mode == 'h') 25 if (mode == REBOOT_HARD)
25 highbank_set_pwr_hard_reset(); 26 highbank_set_pwr_hard_reset();
26 else 27 else
27 highbank_set_pwr_soft_reset(); 28 highbank_set_pwr_soft_reset();
diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig
index ba44328464f3..f54656091a9d 100644
--- a/arch/arm/mach-imx/Kconfig
+++ b/arch/arm/mach-imx/Kconfig
@@ -56,9 +56,6 @@ config MXC_USE_EPIT
56 uses the same clocks as the GPT. Anyway, on some systems the GPT 56 uses the same clocks as the GPT. Anyway, on some systems the GPT
57 may be in use for other purposes. 57 may be in use for other purposes.
58 58
59config MXC_ULPI
60 bool
61
62config ARCH_HAS_RNGA 59config ARCH_HAS_RNGA
63 bool 60 bool
64 61
@@ -111,7 +108,6 @@ config SOC_IMX25
111 select ARCH_MXC_IOMUX_V3 108 select ARCH_MXC_IOMUX_V3
112 select COMMON_CLK 109 select COMMON_CLK
113 select CPU_ARM926T 110 select CPU_ARM926T
114 select HAVE_CAN_FLEXCAN if CAN
115 select MXC_AVIC 111 select MXC_AVIC
116 112
117config SOC_IMX27 113config SOC_IMX27
@@ -137,7 +133,6 @@ config SOC_IMX35
137 select ARCH_MXC_IOMUX_V3 133 select ARCH_MXC_IOMUX_V3
138 select COMMON_CLK 134 select COMMON_CLK
139 select CPU_V6K 135 select CPU_V6K
140 select HAVE_CAN_FLEXCAN if CAN
141 select HAVE_EPIT 136 select HAVE_EPIT
142 select MXC_AVIC 137 select MXC_AVIC
143 select SMP_ON_UP if SMP 138 select SMP_ON_UP if SMP
@@ -176,6 +171,7 @@ config ARCH_MX1ADS
176config MACH_SCB9328 171config MACH_SCB9328
177 bool "Synertronixx scb9328" 172 bool "Synertronixx scb9328"
178 select IMX_HAVE_PLATFORM_IMX_UART 173 select IMX_HAVE_PLATFORM_IMX_UART
174 select SOC_IMX1
179 help 175 help
180 Say Y here if you are using a Synertronixx scb9328 board 176 Say Y here if you are using a Synertronixx scb9328 board
181 177
@@ -233,7 +229,7 @@ config MACH_EUKREA_CPUIMX25SD
233 select IMX_HAVE_PLATFORM_MXC_EHCI 229 select IMX_HAVE_PLATFORM_MXC_EHCI
234 select IMX_HAVE_PLATFORM_MXC_NAND 230 select IMX_HAVE_PLATFORM_MXC_NAND
235 select IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX 231 select IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX
236 select MXC_ULPI if USB_ULPI 232 select USB_ULPI_VIEWPORT if USB_ULPI
237 select SOC_IMX25 233 select SOC_IMX25
238 234
239choice 235choice
@@ -284,7 +280,7 @@ config MACH_PCM038
284 select IMX_HAVE_PLATFORM_MXC_NAND 280 select IMX_HAVE_PLATFORM_MXC_NAND
285 select IMX_HAVE_PLATFORM_MXC_W1 281 select IMX_HAVE_PLATFORM_MXC_W1
286 select IMX_HAVE_PLATFORM_SPI_IMX 282 select IMX_HAVE_PLATFORM_SPI_IMX
287 select MXC_ULPI if USB_ULPI 283 select USB_ULPI_VIEWPORT if USB_ULPI
288 select SOC_IMX27 284 select SOC_IMX27
289 help 285 help
290 Include support for phyCORE-i.MX27 (aka pcm038) platform. This 286 Include support for phyCORE-i.MX27 (aka pcm038) platform. This
@@ -314,7 +310,7 @@ config MACH_CPUIMX27
314 select IMX_HAVE_PLATFORM_MXC_EHCI 310 select IMX_HAVE_PLATFORM_MXC_EHCI
315 select IMX_HAVE_PLATFORM_MXC_NAND 311 select IMX_HAVE_PLATFORM_MXC_NAND
316 select IMX_HAVE_PLATFORM_MXC_W1 312 select IMX_HAVE_PLATFORM_MXC_W1
317 select MXC_ULPI if USB_ULPI 313 select USB_ULPI_VIEWPORT if USB_ULPI
318 select SOC_IMX27 314 select SOC_IMX27
319 help 315 help
320 Include support for Eukrea CPUIMX27 platform. This includes 316 Include support for Eukrea CPUIMX27 platform. This includes
@@ -369,7 +365,7 @@ config MACH_MX27_3DS
369 select IMX_HAVE_PLATFORM_MXC_MMC 365 select IMX_HAVE_PLATFORM_MXC_MMC
370 select IMX_HAVE_PLATFORM_SPI_IMX 366 select IMX_HAVE_PLATFORM_SPI_IMX
371 select MXC_DEBUG_BOARD 367 select MXC_DEBUG_BOARD
372 select MXC_ULPI if USB_ULPI 368 select USB_ULPI_VIEWPORT if USB_ULPI
373 select SOC_IMX27 369 select SOC_IMX27
374 help 370 help
375 Include support for MX27PDK platform. This includes specific 371 Include support for MX27PDK platform. This includes specific
@@ -414,7 +410,7 @@ config MACH_PCA100
414 select IMX_HAVE_PLATFORM_MXC_NAND 410 select IMX_HAVE_PLATFORM_MXC_NAND
415 select IMX_HAVE_PLATFORM_MXC_W1 411 select IMX_HAVE_PLATFORM_MXC_W1
416 select IMX_HAVE_PLATFORM_SPI_IMX 412 select IMX_HAVE_PLATFORM_SPI_IMX
417 select MXC_ULPI if USB_ULPI 413 select USB_ULPI_VIEWPORT if USB_ULPI
418 select SOC_IMX27 414 select SOC_IMX27
419 help 415 help
420 Include support for phyCARD-s (aka pca100) platform. This 416 Include support for phyCARD-s (aka pca100) platform. This
@@ -481,7 +477,7 @@ config MACH_MX31LILLY
481 select IMX_HAVE_PLATFORM_MXC_EHCI 477 select IMX_HAVE_PLATFORM_MXC_EHCI
482 select IMX_HAVE_PLATFORM_MXC_MMC 478 select IMX_HAVE_PLATFORM_MXC_MMC
483 select IMX_HAVE_PLATFORM_SPI_IMX 479 select IMX_HAVE_PLATFORM_SPI_IMX
484 select MXC_ULPI if USB_ULPI 480 select USB_ULPI_VIEWPORT if USB_ULPI
485 select SOC_IMX31 481 select SOC_IMX31
486 help 482 help
487 Include support for mx31 based LILLY1131 modules. This includes 483 Include support for mx31 based LILLY1131 modules. This includes
@@ -497,7 +493,7 @@ config MACH_MX31LITE
497 select IMX_HAVE_PLATFORM_MXC_RTC 493 select IMX_HAVE_PLATFORM_MXC_RTC
498 select IMX_HAVE_PLATFORM_SPI_IMX 494 select IMX_HAVE_PLATFORM_SPI_IMX
499 select LEDS_GPIO_REGISTER 495 select LEDS_GPIO_REGISTER
500 select MXC_ULPI if USB_ULPI 496 select USB_ULPI_VIEWPORT if USB_ULPI
501 select SOC_IMX31 497 select SOC_IMX31
502 help 498 help
503 Include support for MX31 LITEKIT platform. This includes specific 499 Include support for MX31 LITEKIT platform. This includes specific
@@ -514,7 +510,7 @@ config MACH_PCM037
514 select IMX_HAVE_PLATFORM_MXC_MMC 510 select IMX_HAVE_PLATFORM_MXC_MMC
515 select IMX_HAVE_PLATFORM_MXC_NAND 511 select IMX_HAVE_PLATFORM_MXC_NAND
516 select IMX_HAVE_PLATFORM_MXC_W1 512 select IMX_HAVE_PLATFORM_MXC_W1
517 select MXC_ULPI if USB_ULPI 513 select USB_ULPI_VIEWPORT if USB_ULPI
518 select SOC_IMX31 514 select SOC_IMX31
519 help 515 help
520 Include support for Phytec pcm037 platform. This includes 516 Include support for Phytec pcm037 platform. This includes
@@ -544,7 +540,7 @@ config MACH_MX31_3DS
544 select IMX_HAVE_PLATFORM_MXC_NAND 540 select IMX_HAVE_PLATFORM_MXC_NAND
545 select IMX_HAVE_PLATFORM_SPI_IMX 541 select IMX_HAVE_PLATFORM_SPI_IMX
546 select MXC_DEBUG_BOARD 542 select MXC_DEBUG_BOARD
547 select MXC_ULPI if USB_ULPI 543 select USB_ULPI_VIEWPORT if USB_ULPI
548 select SOC_IMX31 544 select SOC_IMX31
549 help 545 help
550 Include support for MX31PDK (3DS) platform. This includes specific 546 Include support for MX31PDK (3DS) platform. This includes specific
@@ -571,7 +567,7 @@ config MACH_MX31MOBOARD
571 select IMX_HAVE_PLATFORM_MXC_MMC 567 select IMX_HAVE_PLATFORM_MXC_MMC
572 select IMX_HAVE_PLATFORM_SPI_IMX 568 select IMX_HAVE_PLATFORM_SPI_IMX
573 select LEDS_GPIO_REGISTER 569 select LEDS_GPIO_REGISTER
574 select MXC_ULPI if USB_ULPI 570 select USB_ULPI_VIEWPORT if USB_ULPI
575 select SOC_IMX31 571 select SOC_IMX31
576 help 572 help
577 Include support for mx31moboard platform. This includes specific 573 Include support for mx31moboard platform. This includes specific
@@ -595,7 +591,7 @@ config MACH_ARMADILLO5X0
595 select IMX_HAVE_PLATFORM_MXC_EHCI 591 select IMX_HAVE_PLATFORM_MXC_EHCI
596 select IMX_HAVE_PLATFORM_MXC_MMC 592 select IMX_HAVE_PLATFORM_MXC_MMC
597 select IMX_HAVE_PLATFORM_MXC_NAND 593 select IMX_HAVE_PLATFORM_MXC_NAND
598 select MXC_ULPI if USB_ULPI 594 select USB_ULPI_VIEWPORT if USB_ULPI
599 select SOC_IMX31 595 select SOC_IMX31
600 help 596 help
601 Include support for Atmark Armadillo-500 platform. This includes 597 Include support for Atmark Armadillo-500 platform. This includes
@@ -639,7 +635,7 @@ config MACH_PCM043
639 select IMX_HAVE_PLATFORM_MXC_EHCI 635 select IMX_HAVE_PLATFORM_MXC_EHCI
640 select IMX_HAVE_PLATFORM_MXC_NAND 636 select IMX_HAVE_PLATFORM_MXC_NAND
641 select IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX 637 select IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX
642 select MXC_ULPI if USB_ULPI 638 select USB_ULPI_VIEWPORT if USB_ULPI
643 select SOC_IMX35 639 select SOC_IMX35
644 help 640 help
645 Include support for Phytec pcm043 platform. This includes 641 Include support for Phytec pcm043 platform. This includes
@@ -673,7 +669,7 @@ config MACH_EUKREA_CPUIMX35SD
673 select IMX_HAVE_PLATFORM_MXC_EHCI 669 select IMX_HAVE_PLATFORM_MXC_EHCI
674 select IMX_HAVE_PLATFORM_MXC_NAND 670 select IMX_HAVE_PLATFORM_MXC_NAND
675 select IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX 671 select IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX
676 select MXC_ULPI if USB_ULPI 672 select USB_ULPI_VIEWPORT if USB_ULPI
677 select SOC_IMX35 673 select SOC_IMX35
678 help 674 help
679 Include support for Eukrea CPUIMX35 platform. This includes 675 Include support for Eukrea CPUIMX35 platform. This includes
@@ -776,7 +772,6 @@ comment "Device tree only"
776 772
777config SOC_IMX53 773config SOC_IMX53
778 bool "i.MX53 support" 774 bool "i.MX53 support"
779 select HAVE_CAN_FLEXCAN if CAN
780 select HAVE_IMX_SRC 775 select HAVE_IMX_SRC
781 select IMX_HAVE_PLATFORM_IMX2_WDT 776 select IMX_HAVE_PLATFORM_IMX2_WDT
782 select PINCTRL 777 select PINCTRL
@@ -799,7 +794,6 @@ config SOC_IMX6Q
799 select CPU_V7 794 select CPU_V7
800 select HAVE_ARM_SCU if SMP 795 select HAVE_ARM_SCU if SMP
801 select HAVE_ARM_TWD if LOCAL_TIMERS 796 select HAVE_ARM_TWD if LOCAL_TIMERS
802 select HAVE_CAN_FLEXCAN if CAN
803 select HAVE_IMX_ANATOP 797 select HAVE_IMX_ANATOP
804 select HAVE_IMX_GPC 798 select HAVE_IMX_GPC
805 select HAVE_IMX_MMDC 799 select HAVE_IMX_MMDC
@@ -816,6 +810,41 @@ config SOC_IMX6Q
816 help 810 help
817 This enables support for Freescale i.MX6 Quad processor. 811 This enables support for Freescale i.MX6 Quad processor.
818 812
813config SOC_IMX6SL
814 bool "i.MX6 SoloLite support"
815 select ARM_ERRATA_754322
816 select ARM_ERRATA_775420
817 select ARM_GIC
818 select CPU_V7
819 select HAVE_IMX_ANATOP
820 select HAVE_IMX_GPC
821 select HAVE_IMX_MMDC
822 select HAVE_IMX_SRC
823 select MFD_SYSCON
824 select PINCTRL
825 select PINCTRL_IMX6SL
826 select PL310_ERRATA_588369 if CACHE_PL310
827 select PL310_ERRATA_727915 if CACHE_PL310
828 select PL310_ERRATA_769419 if CACHE_PL310
829
830 help
831 This enables support for Freescale i.MX6 SoloLite processor.
832
833config SOC_VF610
834 bool "Vybrid Family VF610 support"
835 select CPU_V7
836 select ARM_GIC
837 select CLKSRC_OF
838 select PINCTRL
839 select PINCTRL_VF610
840 select VF_PIT_TIMER
841 select PL310_ERRATA_588369 if CACHE_PL310
842 select PL310_ERRATA_727915 if CACHE_PL310
843 select PL310_ERRATA_769419 if CACHE_PL310
844
845 help
846 This enable support for Freescale Vybrid VF610 processor.
847
819endif 848endif
820 849
821source "arch/arm/mach-imx/devices/Kconfig" 850source "arch/arm/mach-imx/devices/Kconfig"
diff --git a/arch/arm/mach-imx/Makefile b/arch/arm/mach-imx/Makefile
index 70ae7c490ac0..e20f22d58fd8 100644
--- a/arch/arm/mach-imx/Makefile
+++ b/arch/arm/mach-imx/Makefile
@@ -23,7 +23,6 @@ obj-$(CONFIG_ARCH_MXC_IOMUX_V3) += iomux-v3.o
23obj-$(CONFIG_MXC_TZIC) += tzic.o 23obj-$(CONFIG_MXC_TZIC) += tzic.o
24obj-$(CONFIG_MXC_AVIC) += avic.o 24obj-$(CONFIG_MXC_AVIC) += avic.o
25 25
26obj-$(CONFIG_MXC_ULPI) += ulpi.o
27obj-$(CONFIG_MXC_USE_EPIT) += epit.o 26obj-$(CONFIG_MXC_USE_EPIT) += epit.o
28obj-$(CONFIG_MXC_DEBUG_BOARD) += 3ds_debugboard.o 27obj-$(CONFIG_MXC_DEBUG_BOARD) += 3ds_debugboard.o
29 28
@@ -98,6 +97,7 @@ AFLAGS_headsmp.o :=-Wa,-march=armv7-a
98obj-$(CONFIG_SMP) += headsmp.o platsmp.o 97obj-$(CONFIG_SMP) += headsmp.o platsmp.o
99obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o 98obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o
100obj-$(CONFIG_SOC_IMX6Q) += clk-imx6q.o mach-imx6q.o 99obj-$(CONFIG_SOC_IMX6Q) += clk-imx6q.o mach-imx6q.o
100obj-$(CONFIG_SOC_IMX6SL) += clk-imx6sl.o mach-imx6sl.o
101 101
102ifeq ($(CONFIG_PM),y) 102ifeq ($(CONFIG_PM),y)
103obj-$(CONFIG_SOC_IMX6Q) += pm-imx6q.o headsmp.o 103obj-$(CONFIG_SOC_IMX6Q) += pm-imx6q.o headsmp.o
@@ -111,4 +111,6 @@ obj-$(CONFIG_MACH_EUKREA_MBIMXSD51_BASEBOARD) += eukrea_mbimxsd51-baseboard.o
111obj-$(CONFIG_MACH_IMX51_DT) += imx51-dt.o 111obj-$(CONFIG_MACH_IMX51_DT) += imx51-dt.o
112obj-$(CONFIG_SOC_IMX53) += mach-imx53.o 112obj-$(CONFIG_SOC_IMX53) += mach-imx53.o
113 113
114obj-$(CONFIG_SOC_VF610) += clk-vf610.o mach-vf610.o
115
114obj-y += devices/ 116obj-y += devices/
diff --git a/arch/arm/mach-imx/clk-imx51-imx53.c b/arch/arm/mach-imx/clk-imx51-imx53.c
index 6fc486b6a3c6..9afac26fa1cc 100644
--- a/arch/arm/mach-imx/clk-imx51-imx53.c
+++ b/arch/arm/mach-imx/clk-imx51-imx53.c
@@ -73,6 +73,12 @@ static const char *mx53_cko2_sel[] = {
73 "tve_sel", "lp_apm", 73 "tve_sel", "lp_apm",
74 "uart_root", "dummy"/* spdif0_clk_root */, 74 "uart_root", "dummy"/* spdif0_clk_root */,
75 "dummy", "dummy", }; 75 "dummy", "dummy", };
76static const char *mx51_spdif_xtal_sel[] = { "osc", "ckih", "ckih2", };
77static const char *mx53_spdif_xtal_sel[] = { "osc", "ckih", "ckih2", "pll4_sw", };
78static const char *spdif_sel[] = { "pll1_sw", "pll2_sw", "pll3_sw", "spdif_xtal_sel", };
79static const char *spdif0_com_sel[] = { "spdif0_podf", "ssi1_root_gate", };
80static const char *mx51_spdif1_com_sel[] = { "spdif1_podf", "ssi2_root_gate", };
81
76 82
77enum imx5_clks { 83enum imx5_clks {
78 dummy, ckil, osc, ckih1, ckih2, ahb, ipg, axi_a, axi_b, uart_pred, 84 dummy, ckil, osc, ckih1, ckih2, ahb, ipg, axi_a, axi_b, uart_pred,
@@ -110,7 +116,9 @@ enum imx5_clks {
110 owire_gate, gpu3d_s, gpu2d_s, gpu3d_gate, gpu2d_gate, garb_gate, 116 owire_gate, gpu3d_s, gpu2d_s, gpu3d_gate, gpu2d_gate, garb_gate,
111 cko1_sel, cko1_podf, cko1, 117 cko1_sel, cko1_podf, cko1,
112 cko2_sel, cko2_podf, cko2, 118 cko2_sel, cko2_podf, cko2,
113 srtc_gate, pata_gate, 119 srtc_gate, pata_gate, sata_gate, spdif_xtal_sel, spdif0_sel,
120 spdif1_sel, spdif0_pred, spdif0_podf, spdif1_pred, spdif1_podf,
121 spdif0_com_s, spdif1_com_sel, spdif0_gate, spdif1_gate, spdif_ipg_gate,
114 clk_max 122 clk_max
115}; 123};
116 124
@@ -123,11 +131,13 @@ static void __init mx5_clocks_common_init(unsigned long rate_ckil,
123{ 131{
124 int i; 132 int i;
125 133
134 of_clk_init(NULL);
135
126 clk[dummy] = imx_clk_fixed("dummy", 0); 136 clk[dummy] = imx_clk_fixed("dummy", 0);
127 clk[ckil] = imx_clk_fixed("ckil", rate_ckil); 137 clk[ckil] = imx_obtain_fixed_clock("ckil", rate_ckil);
128 clk[osc] = imx_clk_fixed("osc", rate_osc); 138 clk[osc] = imx_obtain_fixed_clock("osc", rate_osc);
129 clk[ckih1] = imx_clk_fixed("ckih1", rate_ckih1); 139 clk[ckih1] = imx_obtain_fixed_clock("ckih1", rate_ckih1);
130 clk[ckih2] = imx_clk_fixed("ckih2", rate_ckih2); 140 clk[ckih2] = imx_obtain_fixed_clock("ckih2", rate_ckih2);
131 141
132 clk[lp_apm] = imx_clk_mux("lp_apm", MXC_CCM_CCSR, 9, 1, 142 clk[lp_apm] = imx_clk_mux("lp_apm", MXC_CCM_CCSR, 9, 1,
133 lp_apm_sel, ARRAY_SIZE(lp_apm_sel)); 143 lp_apm_sel, ARRAY_SIZE(lp_apm_sel));
@@ -267,6 +277,13 @@ static void __init mx5_clocks_common_init(unsigned long rate_ckil,
267 clk[owire_gate] = imx_clk_gate2("owire_gate", "per_root", MXC_CCM_CCGR2, 22); 277 clk[owire_gate] = imx_clk_gate2("owire_gate", "per_root", MXC_CCM_CCGR2, 22);
268 clk[srtc_gate] = imx_clk_gate2("srtc_gate", "per_root", MXC_CCM_CCGR4, 28); 278 clk[srtc_gate] = imx_clk_gate2("srtc_gate", "per_root", MXC_CCM_CCGR4, 28);
269 clk[pata_gate] = imx_clk_gate2("pata_gate", "ipg", MXC_CCM_CCGR4, 0); 279 clk[pata_gate] = imx_clk_gate2("pata_gate", "ipg", MXC_CCM_CCGR4, 0);
280 clk[spdif0_sel] = imx_clk_mux("spdif0_sel", MXC_CCM_CSCMR2, 0, 2, spdif_sel, ARRAY_SIZE(spdif_sel));
281 clk[spdif0_pred] = imx_clk_divider("spdif0_pred", "spdif0_sel", MXC_CCM_CDCDR, 25, 3);
282 clk[spdif0_podf] = imx_clk_divider("spdif0_podf", "spdif0_pred", MXC_CCM_CDCDR, 19, 6);
283 clk[spdif0_com_s] = imx_clk_mux_flags("spdif0_com_sel", MXC_CCM_CSCMR2, 4, 1,
284 spdif0_com_sel, ARRAY_SIZE(spdif0_com_sel), CLK_SET_RATE_PARENT);
285 clk[spdif0_gate] = imx_clk_gate2("spdif0_gate", "spdif0_com_sel", MXC_CCM_CCGR5, 26);
286 clk[spdif_ipg_gate] = imx_clk_gate2("spdif_ipg_gate", "ipg", MXC_CCM_CCGR5, 30);
270 287
271 for (i = 0; i < ARRAY_SIZE(clk); i++) 288 for (i = 0; i < ARRAY_SIZE(clk); i++)
272 if (IS_ERR(clk[i])) 289 if (IS_ERR(clk[i]))
@@ -310,8 +327,6 @@ static void __init mx5_clocks_common_init(unsigned long rate_ckil,
310 clk_register_clkdev(clk[ssi1_ipg_gate], NULL, "imx-ssi.0"); 327 clk_register_clkdev(clk[ssi1_ipg_gate], NULL, "imx-ssi.0");
311 clk_register_clkdev(clk[ssi2_ipg_gate], NULL, "imx-ssi.1"); 328 clk_register_clkdev(clk[ssi2_ipg_gate], NULL, "imx-ssi.1");
312 clk_register_clkdev(clk[ssi3_ipg_gate], NULL, "imx-ssi.2"); 329 clk_register_clkdev(clk[ssi3_ipg_gate], NULL, "imx-ssi.2");
313 clk_register_clkdev(clk[ssi_ext1_gate], "ssi_ext1", NULL);
314 clk_register_clkdev(clk[ssi_ext2_gate], "ssi_ext2", NULL);
315 clk_register_clkdev(clk[sdma_gate], NULL, "imx35-sdma"); 330 clk_register_clkdev(clk[sdma_gate], NULL, "imx35-sdma");
316 clk_register_clkdev(clk[cpu_podf], NULL, "cpufreq-cpu0.0"); 331 clk_register_clkdev(clk[cpu_podf], NULL, "cpufreq-cpu0.0");
317 clk_register_clkdev(clk[iim_gate], "iim", NULL); 332 clk_register_clkdev(clk[iim_gate], "iim", NULL);
@@ -378,6 +393,15 @@ int __init mx51_clocks_init(unsigned long rate_ckil, unsigned long rate_osc,
378 clk[mipi_hsc2_gate] = imx_clk_gate2("mipi_hsc2_gate", "ipg", MXC_CCM_CCGR4, 8); 393 clk[mipi_hsc2_gate] = imx_clk_gate2("mipi_hsc2_gate", "ipg", MXC_CCM_CCGR4, 8);
379 clk[mipi_esc_gate] = imx_clk_gate2("mipi_esc_gate", "ipg", MXC_CCM_CCGR4, 10); 394 clk[mipi_esc_gate] = imx_clk_gate2("mipi_esc_gate", "ipg", MXC_CCM_CCGR4, 10);
380 clk[mipi_hsp_gate] = imx_clk_gate2("mipi_hsp_gate", "ipg", MXC_CCM_CCGR4, 12); 395 clk[mipi_hsp_gate] = imx_clk_gate2("mipi_hsp_gate", "ipg", MXC_CCM_CCGR4, 12);
396 clk[spdif_xtal_sel] = imx_clk_mux("spdif_xtal_sel", MXC_CCM_CSCMR1, 2, 2,
397 mx51_spdif_xtal_sel, ARRAY_SIZE(mx51_spdif_xtal_sel));
398 clk[spdif1_sel] = imx_clk_mux("spdif1_sel", MXC_CCM_CSCMR2, 2, 2,
399 spdif_sel, ARRAY_SIZE(spdif_sel));
400 clk[spdif1_pred] = imx_clk_divider("spdif1_podf", "spdif1_sel", MXC_CCM_CDCDR, 16, 3);
401 clk[spdif1_podf] = imx_clk_divider("spdif1_podf", "spdif1_pred", MXC_CCM_CDCDR, 9, 6);
402 clk[spdif1_com_sel] = imx_clk_mux("spdif1_com_sel", MXC_CCM_CSCMR2, 5, 1,
403 mx51_spdif1_com_sel, ARRAY_SIZE(mx51_spdif1_com_sel));
404 clk[spdif1_gate] = imx_clk_gate2("spdif1_gate", "spdif1_com_sel", MXC_CCM_CCGR5, 28);
381 405
382 for (i = 0; i < ARRAY_SIZE(clk); i++) 406 for (i = 0; i < ARRAY_SIZE(clk); i++)
383 if (IS_ERR(clk[i])) 407 if (IS_ERR(clk[i]))
@@ -485,6 +509,7 @@ int __init mx53_clocks_init(unsigned long rate_ckil, unsigned long rate_osc,
485 clk[can2_serial_gate] = imx_clk_gate2("can2_serial_gate", "can_sel", MXC_CCM_CCGR4, 8); 509 clk[can2_serial_gate] = imx_clk_gate2("can2_serial_gate", "can_sel", MXC_CCM_CCGR4, 8);
486 clk[can2_ipg_gate] = imx_clk_gate2("can2_ipg_gate", "ipg", MXC_CCM_CCGR4, 6); 510 clk[can2_ipg_gate] = imx_clk_gate2("can2_ipg_gate", "ipg", MXC_CCM_CCGR4, 6);
487 clk[i2c3_gate] = imx_clk_gate2("i2c3_gate", "per_root", MXC_CCM_CCGR1, 22); 511 clk[i2c3_gate] = imx_clk_gate2("i2c3_gate", "per_root", MXC_CCM_CCGR1, 22);
512 clk[sata_gate] = imx_clk_gate2("sata_gate", "ipg", MXC_CCM_CCGR4, 2);
488 513
489 clk[cko1_sel] = imx_clk_mux("cko1_sel", MXC_CCM_CCOSR, 0, 4, 514 clk[cko1_sel] = imx_clk_mux("cko1_sel", MXC_CCM_CCOSR, 0, 4,
490 mx53_cko1_sel, ARRAY_SIZE(mx53_cko1_sel)); 515 mx53_cko1_sel, ARRAY_SIZE(mx53_cko1_sel));
@@ -495,6 +520,8 @@ int __init mx53_clocks_init(unsigned long rate_ckil, unsigned long rate_osc,
495 mx53_cko2_sel, ARRAY_SIZE(mx53_cko2_sel)); 520 mx53_cko2_sel, ARRAY_SIZE(mx53_cko2_sel));
496 clk[cko2_podf] = imx_clk_divider("cko2_podf", "cko2_sel", MXC_CCM_CCOSR, 21, 3); 521 clk[cko2_podf] = imx_clk_divider("cko2_podf", "cko2_sel", MXC_CCM_CCOSR, 21, 3);
497 clk[cko2] = imx_clk_gate2("cko2", "cko2_podf", MXC_CCM_CCOSR, 24); 522 clk[cko2] = imx_clk_gate2("cko2", "cko2_podf", MXC_CCM_CCOSR, 24);
523 clk[spdif_xtal_sel] = imx_clk_mux("spdif_xtal_sel", MXC_CCM_CSCMR1, 2, 2,
524 mx53_spdif_xtal_sel, ARRAY_SIZE(mx53_spdif_xtal_sel));
498 525
499 for (i = 0; i < ARRAY_SIZE(clk); i++) 526 for (i = 0; i < ARRAY_SIZE(clk); i++)
500 if (IS_ERR(clk[i])) 527 if (IS_ERR(clk[i]))
@@ -542,42 +569,12 @@ int __init mx53_clocks_init(unsigned long rate_ckil, unsigned long rate_osc,
542 return 0; 569 return 0;
543} 570}
544 571
545#ifdef CONFIG_OF
546static void __init clk_get_freq_dt(unsigned long *ckil, unsigned long *osc,
547 unsigned long *ckih1, unsigned long *ckih2)
548{
549 struct device_node *np;
550
551 /* retrieve the freqency of fixed clocks from device tree */
552 for_each_compatible_node(np, NULL, "fixed-clock") {
553 u32 rate;
554 if (of_property_read_u32(np, "clock-frequency", &rate))
555 continue;
556
557 if (of_device_is_compatible(np, "fsl,imx-ckil"))
558 *ckil = rate;
559 else if (of_device_is_compatible(np, "fsl,imx-osc"))
560 *osc = rate;
561 else if (of_device_is_compatible(np, "fsl,imx-ckih1"))
562 *ckih1 = rate;
563 else if (of_device_is_compatible(np, "fsl,imx-ckih2"))
564 *ckih2 = rate;
565 }
566}
567
568int __init mx51_clocks_init_dt(void) 572int __init mx51_clocks_init_dt(void)
569{ 573{
570 unsigned long ckil, osc, ckih1, ckih2; 574 return mx51_clocks_init(0, 0, 0, 0);
571
572 clk_get_freq_dt(&ckil, &osc, &ckih1, &ckih2);
573 return mx51_clocks_init(ckil, osc, ckih1, ckih2);
574} 575}
575 576
576int __init mx53_clocks_init_dt(void) 577int __init mx53_clocks_init_dt(void)
577{ 578{
578 unsigned long ckil, osc, ckih1, ckih2; 579 return mx53_clocks_init(0, 0, 0, 0);
579
580 clk_get_freq_dt(&ckil, &osc, &ckih1, &ckih2);
581 return mx53_clocks_init(ckil, osc, ckih1, ckih2);
582} 580}
583#endif
diff --git a/arch/arm/mach-imx/clk-imx6q.c b/arch/arm/mach-imx/clk-imx6q.c
index 4e3148ce852d..86567d980b07 100644
--- a/arch/arm/mach-imx/clk-imx6q.c
+++ b/arch/arm/mach-imx/clk-imx6q.c
@@ -199,7 +199,8 @@ static const char *pcie_axi_sels[] = { "axi", "ahb", };
199static const char *ssi_sels[] = { "pll3_pfd2_508m", "pll3_pfd3_454m", "pll4_post_div", }; 199static const char *ssi_sels[] = { "pll3_pfd2_508m", "pll3_pfd3_454m", "pll4_post_div", };
200static const char *usdhc_sels[] = { "pll2_pfd2_396m", "pll2_pfd0_352m", }; 200static const char *usdhc_sels[] = { "pll2_pfd2_396m", "pll2_pfd0_352m", };
201static const char *enfc_sels[] = { "pll2_pfd0_352m", "pll2_bus", "pll3_usb_otg", "pll2_pfd2_396m", }; 201static const char *enfc_sels[] = { "pll2_pfd0_352m", "pll2_bus", "pll3_usb_otg", "pll2_pfd2_396m", };
202static const char *emi_sels[] = { "axi", "pll3_usb_otg", "pll2_pfd2_396m", "pll2_pfd0_352m", }; 202static const char *emi_sels[] = { "pll2_pfd2_396m", "pll3_usb_otg", "axi", "pll2_pfd0_352m", };
203static const char *emi_slow_sels[] = { "axi", "pll3_usb_otg", "pll2_pfd2_396m", "pll2_pfd0_352m", };
203static const char *vdo_axi_sels[] = { "axi", "ahb", }; 204static const char *vdo_axi_sels[] = { "axi", "ahb", };
204static const char *vpu_axi_sels[] = { "axi", "pll2_pfd2_396m", "pll2_pfd0_352m", }; 205static const char *vpu_axi_sels[] = { "axi", "pll2_pfd2_396m", "pll2_pfd0_352m", };
205static const char *cko1_sels[] = { "pll3_usb_otg", "pll2_bus", "pll1_sys", "pll5_video_div", 206static const char *cko1_sels[] = { "pll3_usb_otg", "pll2_bus", "pll1_sys", "pll5_video_div",
@@ -238,7 +239,7 @@ enum mx6q_clks {
238 pll4_audio, pll5_video, pll8_mlb, pll7_usb_host, pll6_enet, ssi1_ipg, 239 pll4_audio, pll5_video, pll8_mlb, pll7_usb_host, pll6_enet, ssi1_ipg,
239 ssi2_ipg, ssi3_ipg, rom, usbphy1, usbphy2, ldb_di0_div_3_5, ldb_di1_div_3_5, 240 ssi2_ipg, ssi3_ipg, rom, usbphy1, usbphy2, ldb_di0_div_3_5, ldb_di1_div_3_5,
240 sata_ref, sata_ref_100m, pcie_ref, pcie_ref_125m, enet_ref, usbphy1_gate, 241 sata_ref, sata_ref_100m, pcie_ref, pcie_ref_125m, enet_ref, usbphy1_gate,
241 usbphy2_gate, pll4_post_div, pll5_post_div, pll5_video_div, clk_max 242 usbphy2_gate, pll4_post_div, pll5_post_div, pll5_video_div, eim_slow, clk_max
242}; 243};
243 244
244static struct clk *clk[clk_max]; 245static struct clk *clk[clk_max];
@@ -270,27 +271,16 @@ static struct clk_div_table video_div_table[] = {
270 { } 271 { }
271}; 272};
272 273
273int __init mx6q_clocks_init(void) 274static void __init imx6q_clocks_init(struct device_node *ccm_node)
274{ 275{
275 struct device_node *np; 276 struct device_node *np;
276 void __iomem *base; 277 void __iomem *base;
277 int i, irq; 278 int i, irq;
278 279
279 clk[dummy] = imx_clk_fixed("dummy", 0); 280 clk[dummy] = imx_clk_fixed("dummy", 0);
280 281 clk[ckil] = imx_obtain_fixed_clock("ckil", 0);
281 /* retrieve the freqency of fixed clocks from device tree */ 282 clk[ckih] = imx_obtain_fixed_clock("ckih1", 0);
282 for_each_compatible_node(np, NULL, "fixed-clock") { 283 clk[osc] = imx_obtain_fixed_clock("osc", 0);
283 u32 rate;
284 if (of_property_read_u32(np, "clock-frequency", &rate))
285 continue;
286
287 if (of_device_is_compatible(np, "fsl,imx-ckil"))
288 clk[ckil] = imx_clk_fixed("ckil", rate);
289 else if (of_device_is_compatible(np, "fsl,imx-ckih1"))
290 clk[ckih] = imx_clk_fixed("ckih", rate);
291 else if (of_device_is_compatible(np, "fsl,imx-osc"))
292 clk[osc] = imx_clk_fixed("osc", rate);
293 }
294 284
295 np = of_find_compatible_node(NULL, NULL, "fsl,imx6q-anatop"); 285 np = of_find_compatible_node(NULL, NULL, "fsl,imx6q-anatop");
296 base = of_iomap(np, 0); 286 base = of_iomap(np, 0);
@@ -312,7 +302,6 @@ int __init mx6q_clocks_init(void)
312 clk[pll5_video] = imx_clk_pllv3(IMX_PLLV3_AV, "pll5_video", "osc", base + 0xa0, 0x7f); 302 clk[pll5_video] = imx_clk_pllv3(IMX_PLLV3_AV, "pll5_video", "osc", base + 0xa0, 0x7f);
313 clk[pll6_enet] = imx_clk_pllv3(IMX_PLLV3_ENET, "pll6_enet", "osc", base + 0xe0, 0x3); 303 clk[pll6_enet] = imx_clk_pllv3(IMX_PLLV3_ENET, "pll6_enet", "osc", base + 0xe0, 0x3);
314 clk[pll7_usb_host] = imx_clk_pllv3(IMX_PLLV3_USB, "pll7_usb_host","osc", base + 0x20, 0x3); 304 clk[pll7_usb_host] = imx_clk_pllv3(IMX_PLLV3_USB, "pll7_usb_host","osc", base + 0x20, 0x3);
315 clk[pll8_mlb] = imx_clk_pllv3(IMX_PLLV3_MLB, "pll8_mlb", "osc", base + 0xd0, 0x0);
316 305
317 /* 306 /*
318 * Bit 20 is the reserved and read-only bit, we do this only for: 307 * Bit 20 is the reserved and read-only bit, we do this only for:
@@ -360,7 +349,7 @@ int __init mx6q_clocks_init(void)
360 clk[pll5_post_div] = clk_register_divider_table(NULL, "pll5_post_div", "pll5_video", CLK_SET_RATE_PARENT, base + 0xa0, 19, 2, 0, post_div_table, &imx_ccm_lock); 349 clk[pll5_post_div] = clk_register_divider_table(NULL, "pll5_post_div", "pll5_video", CLK_SET_RATE_PARENT, base + 0xa0, 19, 2, 0, post_div_table, &imx_ccm_lock);
361 clk[pll5_video_div] = clk_register_divider_table(NULL, "pll5_video_div", "pll5_post_div", CLK_SET_RATE_PARENT, base + 0x170, 30, 2, 0, video_div_table, &imx_ccm_lock); 350 clk[pll5_video_div] = clk_register_divider_table(NULL, "pll5_video_div", "pll5_post_div", CLK_SET_RATE_PARENT, base + 0x170, 30, 2, 0, video_div_table, &imx_ccm_lock);
362 351
363 np = of_find_compatible_node(NULL, NULL, "fsl,imx6q-ccm"); 352 np = ccm_node;
364 base = of_iomap(np, 0); 353 base = of_iomap(np, 0);
365 WARN_ON(!base); 354 WARN_ON(!base);
366 ccm_base = base; 355 ccm_base = base;
@@ -404,7 +393,7 @@ int __init mx6q_clocks_init(void)
404 clk[usdhc4_sel] = imx_clk_mux("usdhc4_sel", base + 0x1c, 19, 1, usdhc_sels, ARRAY_SIZE(usdhc_sels)); 393 clk[usdhc4_sel] = imx_clk_mux("usdhc4_sel", base + 0x1c, 19, 1, usdhc_sels, ARRAY_SIZE(usdhc_sels));
405 clk[enfc_sel] = imx_clk_mux("enfc_sel", base + 0x2c, 16, 2, enfc_sels, ARRAY_SIZE(enfc_sels)); 394 clk[enfc_sel] = imx_clk_mux("enfc_sel", base + 0x2c, 16, 2, enfc_sels, ARRAY_SIZE(enfc_sels));
406 clk[emi_sel] = imx_clk_mux("emi_sel", base + 0x1c, 27, 2, emi_sels, ARRAY_SIZE(emi_sels)); 395 clk[emi_sel] = imx_clk_mux("emi_sel", base + 0x1c, 27, 2, emi_sels, ARRAY_SIZE(emi_sels));
407 clk[emi_slow_sel] = imx_clk_mux("emi_slow_sel", base + 0x1c, 29, 2, emi_sels, ARRAY_SIZE(emi_sels)); 396 clk[emi_slow_sel] = imx_clk_mux("emi_slow_sel", base + 0x1c, 29, 2, emi_slow_sels, ARRAY_SIZE(emi_slow_sels));
408 clk[vdo_axi_sel] = imx_clk_mux("vdo_axi_sel", base + 0x18, 11, 1, vdo_axi_sels, ARRAY_SIZE(vdo_axi_sels)); 397 clk[vdo_axi_sel] = imx_clk_mux("vdo_axi_sel", base + 0x18, 11, 1, vdo_axi_sels, ARRAY_SIZE(vdo_axi_sels));
409 clk[vpu_axi_sel] = imx_clk_mux("vpu_axi_sel", base + 0x18, 14, 2, vpu_axi_sels, ARRAY_SIZE(vpu_axi_sels)); 398 clk[vpu_axi_sel] = imx_clk_mux("vpu_axi_sel", base + 0x18, 14, 2, vpu_axi_sels, ARRAY_SIZE(vpu_axi_sels));
410 clk[cko1_sel] = imx_clk_mux("cko1_sel", base + 0x60, 0, 4, cko1_sels, ARRAY_SIZE(cko1_sels)); 399 clk[cko1_sel] = imx_clk_mux("cko1_sel", base + 0x60, 0, 4, cko1_sels, ARRAY_SIZE(cko1_sels));
@@ -481,7 +470,14 @@ int __init mx6q_clocks_init(void)
481 clk[esai] = imx_clk_gate2("esai", "esai_podf", base + 0x6c, 16); 470 clk[esai] = imx_clk_gate2("esai", "esai_podf", base + 0x6c, 16);
482 clk[gpt_ipg] = imx_clk_gate2("gpt_ipg", "ipg", base + 0x6c, 20); 471 clk[gpt_ipg] = imx_clk_gate2("gpt_ipg", "ipg", base + 0x6c, 20);
483 clk[gpt_ipg_per] = imx_clk_gate2("gpt_ipg_per", "ipg_per", base + 0x6c, 22); 472 clk[gpt_ipg_per] = imx_clk_gate2("gpt_ipg_per", "ipg_per", base + 0x6c, 22);
484 clk[gpu2d_core] = imx_clk_gate2("gpu2d_core", "gpu2d_core_podf", base + 0x6c, 24); 473 if (cpu_is_imx6dl())
474 /*
475 * The multiplexer and divider of imx6q clock gpu3d_shader get
476 * redefined/reused as gpu2d_core_sel and gpu2d_core_podf on imx6dl.
477 */
478 clk[gpu2d_core] = imx_clk_gate2("gpu2d_core", "gpu3d_shader", base + 0x6c, 24);
479 else
480 clk[gpu2d_core] = imx_clk_gate2("gpu2d_core", "gpu2d_core_podf", base + 0x6c, 24);
485 clk[gpu3d_core] = imx_clk_gate2("gpu3d_core", "gpu3d_core_podf", base + 0x6c, 26); 481 clk[gpu3d_core] = imx_clk_gate2("gpu3d_core", "gpu3d_core_podf", base + 0x6c, 26);
486 clk[hdmi_iahb] = imx_clk_gate2("hdmi_iahb", "ahb", base + 0x70, 0); 482 clk[hdmi_iahb] = imx_clk_gate2("hdmi_iahb", "ahb", base + 0x70, 0);
487 clk[hdmi_isfr] = imx_clk_gate2("hdmi_isfr", "pll3_pfd1_540m", base + 0x70, 4); 483 clk[hdmi_isfr] = imx_clk_gate2("hdmi_isfr", "pll3_pfd1_540m", base + 0x70, 4);
@@ -499,7 +495,14 @@ int __init mx6q_clocks_init(void)
499 clk[ldb_di1] = imx_clk_gate2("ldb_di1", "ldb_di1_podf", base + 0x74, 14); 495 clk[ldb_di1] = imx_clk_gate2("ldb_di1", "ldb_di1_podf", base + 0x74, 14);
500 clk[ipu2_di1] = imx_clk_gate2("ipu2_di1", "ipu2_di1_sel", base + 0x74, 10); 496 clk[ipu2_di1] = imx_clk_gate2("ipu2_di1", "ipu2_di1_sel", base + 0x74, 10);
501 clk[hsi_tx] = imx_clk_gate2("hsi_tx", "hsi_tx_podf", base + 0x74, 16); 497 clk[hsi_tx] = imx_clk_gate2("hsi_tx", "hsi_tx_podf", base + 0x74, 16);
502 clk[mlb] = imx_clk_gate2("mlb", "axi", base + 0x74, 18); 498 if (cpu_is_imx6dl())
499 /*
500 * The multiplexer and divider of the imx6q clock gpu2d get
501 * redefined/reused as mlb_sys_sel and mlb_sys_clk_podf on imx6dl.
502 */
503 clk[mlb] = imx_clk_gate2("mlb", "gpu2d_core_podf", base + 0x74, 18);
504 else
505 clk[mlb] = imx_clk_gate2("mlb", "axi", base + 0x74, 18);
503 clk[mmdc_ch0_axi] = imx_clk_gate2("mmdc_ch0_axi", "mmdc_ch0_axi_podf", base + 0x74, 20); 506 clk[mmdc_ch0_axi] = imx_clk_gate2("mmdc_ch0_axi", "mmdc_ch0_axi_podf", base + 0x74, 20);
504 clk[mmdc_ch1_axi] = imx_clk_gate2("mmdc_ch1_axi", "mmdc_ch1_axi_podf", base + 0x74, 22); 507 clk[mmdc_ch1_axi] = imx_clk_gate2("mmdc_ch1_axi", "mmdc_ch1_axi_podf", base + 0x74, 22);
505 clk[ocram] = imx_clk_gate2("ocram", "ahb", base + 0x74, 28); 508 clk[ocram] = imx_clk_gate2("ocram", "ahb", base + 0x74, 28);
@@ -528,6 +531,7 @@ int __init mx6q_clocks_init(void)
528 clk[usdhc2] = imx_clk_gate2("usdhc2", "usdhc2_podf", base + 0x80, 4); 531 clk[usdhc2] = imx_clk_gate2("usdhc2", "usdhc2_podf", base + 0x80, 4);
529 clk[usdhc3] = imx_clk_gate2("usdhc3", "usdhc3_podf", base + 0x80, 6); 532 clk[usdhc3] = imx_clk_gate2("usdhc3", "usdhc3_podf", base + 0x80, 6);
530 clk[usdhc4] = imx_clk_gate2("usdhc4", "usdhc4_podf", base + 0x80, 8); 533 clk[usdhc4] = imx_clk_gate2("usdhc4", "usdhc4_podf", base + 0x80, 8);
534 clk[eim_slow] = imx_clk_gate2("eim_slow", "emi_slow_podf", base + 0x80, 10);
531 clk[vdo_axi] = imx_clk_gate2("vdo_axi", "vdo_axi_sel", base + 0x80, 12); 535 clk[vdo_axi] = imx_clk_gate2("vdo_axi", "vdo_axi_sel", base + 0x80, 12);
532 clk[vpu_axi] = imx_clk_gate2("vpu_axi", "vpu_axi_podf", base + 0x80, 14); 536 clk[vpu_axi] = imx_clk_gate2("vpu_axi", "vpu_axi_podf", base + 0x80, 14);
533 clk[cko1] = imx_clk_gate("cko1", "cko1_podf", base + 0x60, 7); 537 clk[cko1] = imx_clk_gate("cko1", "cko1_podf", base + 0x60, 7);
@@ -547,6 +551,8 @@ int __init mx6q_clocks_init(void)
547 clk_register_clkdev(clk[ahb], "ahb", NULL); 551 clk_register_clkdev(clk[ahb], "ahb", NULL);
548 clk_register_clkdev(clk[cko1], "cko1", NULL); 552 clk_register_clkdev(clk[cko1], "cko1", NULL);
549 clk_register_clkdev(clk[arm], NULL, "cpu0"); 553 clk_register_clkdev(clk[arm], NULL, "cpu0");
554 clk_register_clkdev(clk[pll4_post_div], "pll4_post_div", NULL);
555 clk_register_clkdev(clk[pll4_audio], "pll4_audio", NULL);
550 556
551 if (imx6q_revision() != IMX_CHIP_REVISION_1_0) { 557 if (imx6q_revision() != IMX_CHIP_REVISION_1_0) {
552 clk_set_parent(clk[ldb_di0_sel], clk[pll5_video_div]); 558 clk_set_parent(clk[ldb_di0_sel], clk[pll5_video_div]);
@@ -576,6 +582,5 @@ int __init mx6q_clocks_init(void)
576 WARN_ON(!base); 582 WARN_ON(!base);
577 irq = irq_of_parse_and_map(np, 0); 583 irq = irq_of_parse_and_map(np, 0);
578 mxc_timer_init(base, irq); 584 mxc_timer_init(base, irq);
579
580 return 0;
581} 585}
586CLK_OF_DECLARE(imx6q, "fsl,imx6q-ccm", imx6q_clocks_init);
diff --git a/arch/arm/mach-imx/clk-imx6sl.c b/arch/arm/mach-imx/clk-imx6sl.c
new file mode 100644
index 000000000000..a307ac22dffe
--- /dev/null
+++ b/arch/arm/mach-imx/clk-imx6sl.c
@@ -0,0 +1,267 @@
1/*
2 * Copyright 2013 Freescale Semiconductor, Inc.
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
10#include <linux/clk.h>
11#include <linux/clkdev.h>
12#include <linux/err.h>
13#include <linux/of.h>
14#include <linux/of_address.h>
15#include <linux/of_irq.h>
16#include <dt-bindings/clock/imx6sl-clock.h>
17
18#include "clk.h"
19#include "common.h"
20
21static const char const *step_sels[] = { "osc", "pll2_pfd2", };
22static const char const *pll1_sw_sels[] = { "pll1_sys", "step", };
23static const char const *ocram_alt_sels[] = { "pll2_pfd2", "pll3_pfd1", };
24static const char const *ocram_sels[] = { "periph", "ocram_alt_sels", };
25static const char const *pre_periph_sels[] = { "pll2_bus", "pll2_pfd2", "pll2_pfd0", "pll2_198m", };
26static const char const *periph_clk2_sels[] = { "pll3_usb_otg", "osc", "osc", "dummy", };
27static const char const *periph2_clk2_sels[] = { "pll3_usb_otg", "pll2_bus", };
28static const char const *periph_sels[] = { "pre_periph_sel", "periph_clk2_podf", };
29static const char const *periph2_sels[] = { "pre_periph2_sel", "periph2_clk2_podf", };
30static const char const *csi_lcdif_sels[] = { "mmdc", "pll2_pfd2", "pll3_120m", "pll3_pfd1", };
31static const char const *usdhc_sels[] = { "pll2_pfd2", "pll2_pfd0", };
32static const char const *ssi_sels[] = { "pll3_pfd2", "pll3_pfd3", "pll4_post_div", "dummy", };
33static const char const *perclk_sels[] = { "ipg", "osc", };
34static const char const *epdc_pxp_sels[] = { "mmdc", "pll3_usb_otg", "pll5_video_div", "pll2_pfd0", "pll2_pfd2", "pll3_pfd1", };
35static const char const *gpu2d_ovg_sels[] = { "pll3_pfd1", "pll3_usb_otg", "pll2_bus", "pll2_pfd2", };
36static const char const *gpu2d_sels[] = { "pll2_pfd2", "pll3_usb_otg", "pll3_pfd1", "pll2_bus", };
37static const char const *lcdif_pix_sels[] = { "pll2_bus", "pll3_usb_otg", "pll5_video_div", "pll2_pfd0", "pll3_pfd0", "pll3_pfd1", };
38static const char const *epdc_pix_sels[] = { "pll2_bus", "pll3_usb_otg", "pll5_video_div", "pll2_pfd0", "pll2_pfd1", "pll3_pfd1", };
39static const char const *audio_sels[] = { "pll4_post_div", "pll3_pfd2", "pll3_pfd3", "pll3_usb_otg", };
40static const char const *ecspi_sels[] = { "pll3_60m", "osc", };
41static const char const *uart_sels[] = { "pll3_80m", "osc", };
42
43static struct clk_div_table clk_enet_ref_table[] = {
44 { .val = 0, .div = 20, },
45 { .val = 1, .div = 10, },
46 { .val = 2, .div = 5, },
47 { .val = 3, .div = 4, },
48 { }
49};
50
51static struct clk_div_table post_div_table[] = {
52 { .val = 2, .div = 1, },
53 { .val = 1, .div = 2, },
54 { .val = 0, .div = 4, },
55 { }
56};
57
58static struct clk_div_table video_div_table[] = {
59 { .val = 0, .div = 1, },
60 { .val = 1, .div = 2, },
61 { .val = 2, .div = 1, },
62 { .val = 3, .div = 4, },
63 { }
64};
65
66static struct clk *clks[IMX6SL_CLK_CLK_END];
67static struct clk_onecell_data clk_data;
68
69static void __init imx6sl_clocks_init(struct device_node *ccm_node)
70{
71 struct device_node *np;
72 void __iomem *base;
73 int irq;
74 int i;
75
76 clks[IMX6SL_CLK_DUMMY] = imx_clk_fixed("dummy", 0);
77 clks[IMX6SL_CLK_CKIL] = imx_obtain_fixed_clock("ckil", 0);
78 clks[IMX6SL_CLK_OSC] = imx_obtain_fixed_clock("osc", 0);
79
80 np = of_find_compatible_node(NULL, NULL, "fsl,imx6sl-anatop");
81 base = of_iomap(np, 0);
82 WARN_ON(!base);
83
84 /* type name parent base div_mask */
85 clks[IMX6SL_CLK_PLL1_SYS] = imx_clk_pllv3(IMX_PLLV3_SYS, "pll1_sys", "osc", base, 0x7f);
86 clks[IMX6SL_CLK_PLL2_BUS] = imx_clk_pllv3(IMX_PLLV3_GENERIC, "pll2_bus", "osc", base + 0x30, 0x1);
87 clks[IMX6SL_CLK_PLL3_USB_OTG] = imx_clk_pllv3(IMX_PLLV3_USB, "pll3_usb_otg", "osc", base + 0x10, 0x3);
88 clks[IMX6SL_CLK_PLL4_AUDIO] = imx_clk_pllv3(IMX_PLLV3_AV, "pll4_audio", "osc", base + 0x70, 0x7f);
89 clks[IMX6SL_CLK_PLL5_VIDEO] = imx_clk_pllv3(IMX_PLLV3_AV, "pll5_video", "osc", base + 0xa0, 0x7f);
90 clks[IMX6SL_CLK_PLL6_ENET] = imx_clk_pllv3(IMX_PLLV3_ENET, "pll6_enet", "osc", base + 0xe0, 0x3);
91 clks[IMX6SL_CLK_PLL7_USB_HOST] = imx_clk_pllv3(IMX_PLLV3_USB, "pll7_usb_host", "osc", base + 0x20, 0x3);
92
93 /*
94 * usbphy1 and usbphy2 are implemented as dummy gates using reserve
95 * bit 20. They are used by phy driver to keep the refcount of
96 * parent PLL correct. usbphy1_gate and usbphy2_gate only needs to be
97 * turned on during boot, and software will not need to control it
98 * anymore after that.
99 */
100 clks[IMX6SL_CLK_USBPHY1] = imx_clk_gate("usbphy1", "pll3_usb_otg", base + 0x10, 20);
101 clks[IMX6SL_CLK_USBPHY2] = imx_clk_gate("usbphy2", "pll7_usb_host", base + 0x20, 20);
102 clks[IMX6SL_CLK_USBPHY1_GATE] = imx_clk_gate("usbphy1_gate", "dummy", base + 0x10, 6);
103 clks[IMX6SL_CLK_USBPHY2_GATE] = imx_clk_gate("usbphy2_gate", "dummy", base + 0x20, 6);
104
105 /* dev name parent_name flags reg shift width div: flags, div_table lock */
106 clks[IMX6SL_CLK_PLL4_POST_DIV] = clk_register_divider_table(NULL, "pll4_post_div", "pll4_audio", CLK_SET_RATE_PARENT, base + 0x70, 19, 2, 0, post_div_table, &imx_ccm_lock);
107 clks[IMX6SL_CLK_PLL5_POST_DIV] = clk_register_divider_table(NULL, "pll5_post_div", "pll5_video", CLK_SET_RATE_PARENT, base + 0xa0, 19, 2, 0, post_div_table, &imx_ccm_lock);
108 clks[IMX6SL_CLK_PLL5_VIDEO_DIV] = clk_register_divider_table(NULL, "pll5_video_div", "pll5_post_div", CLK_SET_RATE_PARENT, base + 0x170, 30, 2, 0, video_div_table, &imx_ccm_lock);
109 clks[IMX6SL_CLK_ENET_REF] = clk_register_divider_table(NULL, "enet_ref", "pll6_enet", 0, base + 0xe0, 0, 2, 0, clk_enet_ref_table, &imx_ccm_lock);
110
111 /* name parent_name reg idx */
112 clks[IMX6SL_CLK_PLL2_PFD0] = imx_clk_pfd("pll2_pfd0", "pll2_bus", base + 0x100, 0);
113 clks[IMX6SL_CLK_PLL2_PFD1] = imx_clk_pfd("pll2_pfd1", "pll2_bus", base + 0x100, 1);
114 clks[IMX6SL_CLK_PLL2_PFD2] = imx_clk_pfd("pll2_pfd2", "pll2_bus", base + 0x100, 2);
115 clks[IMX6SL_CLK_PLL3_PFD0] = imx_clk_pfd("pll3_pfd0", "pll3_usb_otg", base + 0xf0, 0);
116 clks[IMX6SL_CLK_PLL3_PFD1] = imx_clk_pfd("pll3_pfd1", "pll3_usb_otg", base + 0xf0, 1);
117 clks[IMX6SL_CLK_PLL3_PFD2] = imx_clk_pfd("pll3_pfd2", "pll3_usb_otg", base + 0xf0, 2);
118 clks[IMX6SL_CLK_PLL3_PFD3] = imx_clk_pfd("pll3_pfd3", "pll3_usb_otg", base + 0xf0, 3);
119
120 /* name parent_name mult div */
121 clks[IMX6SL_CLK_PLL2_198M] = imx_clk_fixed_factor("pll2_198m", "pll2_pfd2", 1, 2);
122 clks[IMX6SL_CLK_PLL3_120M] = imx_clk_fixed_factor("pll3_120m", "pll3_usb_otg", 1, 4);
123 clks[IMX6SL_CLK_PLL3_80M] = imx_clk_fixed_factor("pll3_80m", "pll3_usb_otg", 1, 6);
124 clks[IMX6SL_CLK_PLL3_60M] = imx_clk_fixed_factor("pll3_60m", "pll3_usb_otg", 1, 8);
125
126 np = ccm_node;
127 base = of_iomap(np, 0);
128 WARN_ON(!base);
129
130 /* name reg shift width parent_names num_parents */
131 clks[IMX6SL_CLK_STEP] = imx_clk_mux("step", base + 0xc, 8, 1, step_sels, ARRAY_SIZE(step_sels));
132 clks[IMX6SL_CLK_PLL1_SW] = imx_clk_mux("pll1_sw", base + 0xc, 2, 1, pll1_sw_sels, ARRAY_SIZE(pll1_sw_sels));
133 clks[IMX6SL_CLK_OCRAM_ALT_SEL] = imx_clk_mux("ocram_alt_sel", base + 0x14, 7, 1, ocram_alt_sels, ARRAY_SIZE(ocram_alt_sels));
134 clks[IMX6SL_CLK_OCRAM_SEL] = imx_clk_mux("ocram_sel", base + 0x14, 6, 1, ocram_sels, ARRAY_SIZE(ocram_sels));
135 clks[IMX6SL_CLK_PRE_PERIPH2_SEL] = imx_clk_mux("pre_periph2_sel", base + 0x18, 21, 2, pre_periph_sels, ARRAY_SIZE(pre_periph_sels));
136 clks[IMX6SL_CLK_PRE_PERIPH_SEL] = imx_clk_mux("pre_periph_sel", base + 0x18, 18, 2, pre_periph_sels, ARRAY_SIZE(pre_periph_sels));
137 clks[IMX6SL_CLK_PERIPH2_CLK2_SEL] = imx_clk_mux("periph2_clk2_sel", base + 0x18, 20, 1, periph2_clk2_sels, ARRAY_SIZE(periph2_clk2_sels));
138 clks[IMX6SL_CLK_PERIPH_CLK2_SEL] = imx_clk_mux("periph_clk2_sel", base + 0x18, 12, 2, periph_clk2_sels, ARRAY_SIZE(periph_clk2_sels));
139 clks[IMX6SL_CLK_CSI_SEL] = imx_clk_mux("csi_sel", base + 0x3c, 9, 2, csi_lcdif_sels, ARRAY_SIZE(csi_lcdif_sels));
140 clks[IMX6SL_CLK_LCDIF_AXI_SEL] = imx_clk_mux("lcdif_axi_sel", base + 0x3c, 14, 2, csi_lcdif_sels, ARRAY_SIZE(csi_lcdif_sels));
141 clks[IMX6SL_CLK_USDHC1_SEL] = imx_clk_mux("usdhc1_sel", base + 0x1c, 16, 1, usdhc_sels, ARRAY_SIZE(usdhc_sels));
142 clks[IMX6SL_CLK_USDHC2_SEL] = imx_clk_mux("usdhc2_sel", base + 0x1c, 17, 1, usdhc_sels, ARRAY_SIZE(usdhc_sels));
143 clks[IMX6SL_CLK_USDHC3_SEL] = imx_clk_mux("usdhc3_sel", base + 0x1c, 18, 1, usdhc_sels, ARRAY_SIZE(usdhc_sels));
144 clks[IMX6SL_CLK_USDHC4_SEL] = imx_clk_mux("usdhc4_sel", base + 0x1c, 19, 1, usdhc_sels, ARRAY_SIZE(usdhc_sels));
145 clks[IMX6SL_CLK_SSI1_SEL] = imx_clk_mux("ssi1_sel", base + 0x1c, 10, 2, ssi_sels, ARRAY_SIZE(ssi_sels));
146 clks[IMX6SL_CLK_SSI2_SEL] = imx_clk_mux("ssi2_sel", base + 0x1c, 12, 2, ssi_sels, ARRAY_SIZE(ssi_sels));
147 clks[IMX6SL_CLK_SSI3_SEL] = imx_clk_mux("ssi3_sel", base + 0x1c, 14, 2, ssi_sels, ARRAY_SIZE(ssi_sels));
148 clks[IMX6SL_CLK_PERCLK_SEL] = imx_clk_mux("perclk_sel", base + 0x1c, 6, 1, perclk_sels, ARRAY_SIZE(perclk_sels));
149 clks[IMX6SL_CLK_PXP_AXI_SEL] = imx_clk_mux("pxp_axi_sel", base + 0x34, 6, 3, epdc_pxp_sels, ARRAY_SIZE(epdc_pxp_sels));
150 clks[IMX6SL_CLK_EPDC_AXI_SEL] = imx_clk_mux("epdc_axi_sel", base + 0x34, 15, 3, epdc_pxp_sels, ARRAY_SIZE(epdc_pxp_sels));
151 clks[IMX6SL_CLK_GPU2D_OVG_SEL] = imx_clk_mux("gpu2d_ovg_sel", base + 0x18, 4, 2, gpu2d_ovg_sels, ARRAY_SIZE(gpu2d_ovg_sels));
152 clks[IMX6SL_CLK_GPU2D_SEL] = imx_clk_mux("gpu2d_sel", base + 0x18, 8, 2, gpu2d_sels, ARRAY_SIZE(gpu2d_sels));
153 clks[IMX6SL_CLK_LCDIF_PIX_SEL] = imx_clk_mux("lcdif_pix_sel", base + 0x38, 6, 3, lcdif_pix_sels, ARRAY_SIZE(lcdif_pix_sels));
154 clks[IMX6SL_CLK_EPDC_PIX_SEL] = imx_clk_mux("epdc_pix_sel", base + 0x38, 15, 3, epdc_pix_sels, ARRAY_SIZE(epdc_pix_sels));
155 clks[IMX6SL_CLK_SPDIF0_SEL] = imx_clk_mux("spdif0_sel", base + 0x30, 20, 2, audio_sels, ARRAY_SIZE(audio_sels));
156 clks[IMX6SL_CLK_SPDIF1_SEL] = imx_clk_mux("spdif1_sel", base + 0x30, 7, 2, audio_sels, ARRAY_SIZE(audio_sels));
157 clks[IMX6SL_CLK_EXTERN_AUDIO_SEL] = imx_clk_mux("extern_audio_sel", base + 0x20, 19, 2, audio_sels, ARRAY_SIZE(audio_sels));
158 clks[IMX6SL_CLK_ECSPI_SEL] = imx_clk_mux("ecspi_sel", base + 0x38, 18, 1, ecspi_sels, ARRAY_SIZE(ecspi_sels));
159 clks[IMX6SL_CLK_UART_SEL] = imx_clk_mux("uart_sel", base + 0x24, 6, 1, uart_sels, ARRAY_SIZE(uart_sels));
160
161 /* name reg shift width busy: reg, shift parent_names num_parents */
162 clks[IMX6SL_CLK_PERIPH] = imx_clk_busy_mux("periph", base + 0x14, 25, 1, base + 0x48, 5, periph_sels, ARRAY_SIZE(periph_sels));
163 clks[IMX6SL_CLK_PERIPH2] = imx_clk_busy_mux("periph2", base + 0x14, 26, 1, base + 0x48, 3, periph2_sels, ARRAY_SIZE(periph2_sels));
164
165 /* name parent_name reg shift width */
166 clks[IMX6SL_CLK_OCRAM_PODF] = imx_clk_divider("ocram_podf", "ocram_sel", base + 0x14, 16, 3);
167 clks[IMX6SL_CLK_PERIPH_CLK2_PODF] = imx_clk_divider("periph_clk2_podf", "periph_clk2_sel", base + 0x14, 27, 3);
168 clks[IMX6SL_CLK_PERIPH2_CLK2_PODF] = imx_clk_divider("periph2_clk2_podf", "periph2_clk2_sel", base + 0x14, 0, 3);
169 clks[IMX6SL_CLK_IPG] = imx_clk_divider("ipg", "ahb", base + 0x14, 8, 2);
170 clks[IMX6SL_CLK_CSI_PODF] = imx_clk_divider("csi_podf", "csi_sel", base + 0x3c, 11, 3);
171 clks[IMX6SL_CLK_LCDIF_AXI_PODF] = imx_clk_divider("lcdif_axi_podf", "lcdif_axi_sel", base + 0x3c, 16, 3);
172 clks[IMX6SL_CLK_USDHC1_PODF] = imx_clk_divider("usdhc1_podf", "usdhc1_sel", base + 0x24, 11, 3);
173 clks[IMX6SL_CLK_USDHC2_PODF] = imx_clk_divider("usdhc2_podf", "usdhc2_sel", base + 0x24, 16, 3);
174 clks[IMX6SL_CLK_USDHC3_PODF] = imx_clk_divider("usdhc3_podf", "usdhc3_sel", base + 0x24, 19, 3);
175 clks[IMX6SL_CLK_USDHC4_PODF] = imx_clk_divider("usdhc4_podf", "usdhc4_sel", base + 0x24, 22, 3);
176 clks[IMX6SL_CLK_SSI1_PRED] = imx_clk_divider("ssi1_pred", "ssi1_sel", base + 0x28, 6, 3);
177 clks[IMX6SL_CLK_SSI1_PODF] = imx_clk_divider("ssi1_podf", "ssi1_pred", base + 0x28, 0, 6);
178 clks[IMX6SL_CLK_SSI2_PRED] = imx_clk_divider("ssi2_pred", "ssi2_sel", base + 0x2c, 6, 3);
179 clks[IMX6SL_CLK_SSI2_PODF] = imx_clk_divider("ssi2_podf", "ssi2_pred", base + 0x2c, 0, 6);
180 clks[IMX6SL_CLK_SSI3_PRED] = imx_clk_divider("ssi3_pred", "ssi3_sel", base + 0x28, 22, 3);
181 clks[IMX6SL_CLK_SSI3_PODF] = imx_clk_divider("ssi3_podf", "ssi3_pred", base + 0x28, 16, 6);
182 clks[IMX6SL_CLK_PERCLK] = imx_clk_divider("perclk", "perclk_sel", base + 0x1c, 0, 6);
183 clks[IMX6SL_CLK_PXP_AXI_PODF] = imx_clk_divider("pxp_axi_podf", "pxp_axi_sel", base + 0x34, 3, 3);
184 clks[IMX6SL_CLK_EPDC_AXI_PODF] = imx_clk_divider("epdc_axi_podf", "epdc_axi_sel", base + 0x34, 12, 3);
185 clks[IMX6SL_CLK_GPU2D_OVG_PODF] = imx_clk_divider("gpu2d_ovg_podf", "gpu2d_ovg_sel", base + 0x18, 26, 3);
186 clks[IMX6SL_CLK_GPU2D_PODF] = imx_clk_divider("gpu2d_podf", "gpu2d_sel", base + 0x18, 29, 3);
187 clks[IMX6SL_CLK_LCDIF_PIX_PRED] = imx_clk_divider("lcdif_pix_pred", "lcdif_pix_sel", base + 0x38, 3, 3);
188 clks[IMX6SL_CLK_EPDC_PIX_PRED] = imx_clk_divider("epdc_pix_pred", "epdc_pix_sel", base + 0x38, 12, 3);
189 clks[IMX6SL_CLK_LCDIF_PIX_PODF] = imx_clk_divider("lcdif_pix_podf", "lcdif_pix_pred", base + 0x1c, 20, 3);
190 clks[IMX6SL_CLK_EPDC_PIX_PODF] = imx_clk_divider("epdc_pix_podf", "epdc_pix_pred", base + 0x18, 23, 3);
191 clks[IMX6SL_CLK_SPDIF0_PRED] = imx_clk_divider("spdif0_pred", "spdif0_sel", base + 0x30, 25, 3);
192 clks[IMX6SL_CLK_SPDIF0_PODF] = imx_clk_divider("spdif0_podf", "spdif0_pred", base + 0x30, 22, 3);
193 clks[IMX6SL_CLK_SPDIF1_PRED] = imx_clk_divider("spdif1_pred", "spdif1_sel", base + 0x30, 12, 3);
194 clks[IMX6SL_CLK_SPDIF1_PODF] = imx_clk_divider("spdif1_podf", "spdif1_pred", base + 0x30, 9, 3);
195 clks[IMX6SL_CLK_EXTERN_AUDIO_PRED] = imx_clk_divider("extern_audio_pred", "extern_audio_sel", base + 0x28, 9, 3);
196 clks[IMX6SL_CLK_EXTERN_AUDIO_PODF] = imx_clk_divider("extern_audio_podf", "extern_audio_pred", base + 0x28, 25, 3);
197 clks[IMX6SL_CLK_ECSPI_ROOT] = imx_clk_divider("ecspi_root", "ecspi_sel", base + 0x38, 19, 6);
198 clks[IMX6SL_CLK_UART_ROOT] = imx_clk_divider("uart_root", "uart_sel", base + 0x24, 0, 6);
199
200 /* name parent_name reg shift width busy: reg, shift */
201 clks[IMX6SL_CLK_AHB] = imx_clk_busy_divider("ahb", "periph", base + 0x14, 10, 3, base + 0x48, 1);
202 clks[IMX6SL_CLK_MMDC_ROOT] = imx_clk_busy_divider("mmdc", "periph2", base + 0x14, 3, 3, base + 0x48, 2);
203 clks[IMX6SL_CLK_ARM] = imx_clk_busy_divider("arm", "pll1_sw", base + 0x10, 0, 3, base + 0x48, 16);
204
205 /* name parent_name reg shift */
206 clks[IMX6SL_CLK_ECSPI1] = imx_clk_gate2("ecspi1", "ecspi_root", base + 0x6c, 0);
207 clks[IMX6SL_CLK_ECSPI2] = imx_clk_gate2("ecspi2", "ecspi_root", base + 0x6c, 2);
208 clks[IMX6SL_CLK_ECSPI3] = imx_clk_gate2("ecspi3", "ecspi_root", base + 0x6c, 4);
209 clks[IMX6SL_CLK_ECSPI4] = imx_clk_gate2("ecspi4", "ecspi_root", base + 0x6c, 6);
210 clks[IMX6SL_CLK_EPIT1] = imx_clk_gate2("epit1", "perclk", base + 0x6c, 12);
211 clks[IMX6SL_CLK_EPIT2] = imx_clk_gate2("epit2", "perclk", base + 0x6c, 14);
212 clks[IMX6SL_CLK_EXTERN_AUDIO] = imx_clk_gate2("extern_audio", "extern_audio_podf", base + 0x6c, 16);
213 clks[IMX6SL_CLK_GPT] = imx_clk_gate2("gpt", "perclk", base + 0x6c, 20);
214 clks[IMX6SL_CLK_GPT_SERIAL] = imx_clk_gate2("gpt_serial", "perclk", base + 0x6c, 22);
215 clks[IMX6SL_CLK_GPU2D_OVG] = imx_clk_gate2("gpu2d_ovg", "gpu2d_ovg_podf", base + 0x6c, 26);
216 clks[IMX6SL_CLK_I2C1] = imx_clk_gate2("i2c1", "perclk", base + 0x70, 6);
217 clks[IMX6SL_CLK_I2C2] = imx_clk_gate2("i2c2", "perclk", base + 0x70, 8);
218 clks[IMX6SL_CLK_I2C3] = imx_clk_gate2("i2c3", "perclk", base + 0x70, 10);
219 clks[IMX6SL_CLK_OCOTP] = imx_clk_gate2("ocotp", "ipg", base + 0x70, 12);
220 clks[IMX6SL_CLK_CSI] = imx_clk_gate2("csi", "csi_podf", base + 0x74, 0);
221 clks[IMX6SL_CLK_PXP_AXI] = imx_clk_gate2("pxp_axi", "pxp_axi_podf", base + 0x74, 2);
222 clks[IMX6SL_CLK_EPDC_AXI] = imx_clk_gate2("epdc_axi", "epdc_axi_podf", base + 0x74, 4);
223 clks[IMX6SL_CLK_LCDIF_AXI] = imx_clk_gate2("lcdif_axi", "lcdif_axi_podf", base + 0x74, 6);
224 clks[IMX6SL_CLK_LCDIF_PIX] = imx_clk_gate2("lcdif_pix", "lcdif_pix_podf", base + 0x74, 8);
225 clks[IMX6SL_CLK_EPDC_PIX] = imx_clk_gate2("epdc_pix", "epdc_pix_podf", base + 0x74, 10);
226 clks[IMX6SL_CLK_OCRAM] = imx_clk_gate2("ocram", "ocram_podf", base + 0x74, 28);
227 clks[IMX6SL_CLK_PWM1] = imx_clk_gate2("pwm1", "perclk", base + 0x78, 16);
228 clks[IMX6SL_CLK_PWM2] = imx_clk_gate2("pwm2", "perclk", base + 0x78, 18);
229 clks[IMX6SL_CLK_PWM3] = imx_clk_gate2("pwm3", "perclk", base + 0x78, 20);
230 clks[IMX6SL_CLK_PWM4] = imx_clk_gate2("pwm4", "perclk", base + 0x78, 22);
231 clks[IMX6SL_CLK_SDMA] = imx_clk_gate2("sdma", "ipg", base + 0x7c, 6);
232 clks[IMX6SL_CLK_SPDIF] = imx_clk_gate2("spdif", "spdif0_podf", base + 0x7c, 14);
233 clks[IMX6SL_CLK_SSI1] = imx_clk_gate2("ssi1", "ssi1_podf", base + 0x7c, 18);
234 clks[IMX6SL_CLK_SSI2] = imx_clk_gate2("ssi2", "ssi2_podf", base + 0x7c, 20);
235 clks[IMX6SL_CLK_SSI3] = imx_clk_gate2("ssi3", "ssi3_podf", base + 0x7c, 22);
236 clks[IMX6SL_CLK_UART] = imx_clk_gate2("uart", "ipg", base + 0x7c, 24);
237 clks[IMX6SL_CLK_UART_SERIAL] = imx_clk_gate2("uart_serial", "uart_root", base + 0x7c, 26);
238 clks[IMX6SL_CLK_USBOH3] = imx_clk_gate2("usboh3", "ipg", base + 0x80, 0);
239 clks[IMX6SL_CLK_USDHC1] = imx_clk_gate2("usdhc1", "usdhc1_podf", base + 0x80, 2);
240 clks[IMX6SL_CLK_USDHC2] = imx_clk_gate2("usdhc2", "usdhc2_podf", base + 0x80, 4);
241 clks[IMX6SL_CLK_USDHC3] = imx_clk_gate2("usdhc3", "usdhc3_podf", base + 0x80, 6);
242 clks[IMX6SL_CLK_USDHC4] = imx_clk_gate2("usdhc4", "usdhc4_podf", base + 0x80, 8);
243
244 for (i = 0; i < ARRAY_SIZE(clks); i++)
245 if (IS_ERR(clks[i]))
246 pr_err("i.MX6SL clk %d: register failed with %ld\n",
247 i, PTR_ERR(clks[i]));
248
249 clk_data.clks = clks;
250 clk_data.clk_num = ARRAY_SIZE(clks);
251 of_clk_add_provider(np, of_clk_src_onecell_get, &clk_data);
252
253 clk_register_clkdev(clks[IMX6SL_CLK_GPT], "ipg", "imx-gpt.0");
254 clk_register_clkdev(clks[IMX6SL_CLK_GPT_SERIAL], "per", "imx-gpt.0");
255
256 if (IS_ENABLED(CONFIG_USB_MXS_PHY)) {
257 clk_prepare_enable(clks[IMX6SL_CLK_USBPHY1_GATE]);
258 clk_prepare_enable(clks[IMX6SL_CLK_USBPHY2_GATE]);
259 }
260
261 np = of_find_compatible_node(NULL, NULL, "fsl,imx6sl-gpt");
262 base = of_iomap(np, 0);
263 WARN_ON(!base);
264 irq = irq_of_parse_and_map(np, 0);
265 mxc_timer_init(base, irq);
266}
267CLK_OF_DECLARE(imx6sl, "fsl,imx6sl-ccm", imx6sl_clocks_init);
diff --git a/arch/arm/mach-imx/clk-pllv3.c b/arch/arm/mach-imx/clk-pllv3.c
index d09bc3df9a7a..a9fad5f8d340 100644
--- a/arch/arm/mach-imx/clk-pllv3.c
+++ b/arch/arm/mach-imx/clk-pllv3.c
@@ -296,13 +296,6 @@ static const struct clk_ops clk_pllv3_enet_ops = {
296 .recalc_rate = clk_pllv3_enet_recalc_rate, 296 .recalc_rate = clk_pllv3_enet_recalc_rate,
297}; 297};
298 298
299static const struct clk_ops clk_pllv3_mlb_ops = {
300 .prepare = clk_pllv3_prepare,
301 .unprepare = clk_pllv3_unprepare,
302 .enable = clk_pllv3_enable,
303 .disable = clk_pllv3_disable,
304};
305
306struct clk *imx_clk_pllv3(enum imx_pllv3_type type, const char *name, 299struct clk *imx_clk_pllv3(enum imx_pllv3_type type, const char *name,
307 const char *parent_name, void __iomem *base, 300 const char *parent_name, void __iomem *base,
308 u32 div_mask) 301 u32 div_mask)
@@ -330,9 +323,6 @@ struct clk *imx_clk_pllv3(enum imx_pllv3_type type, const char *name,
330 case IMX_PLLV3_ENET: 323 case IMX_PLLV3_ENET:
331 ops = &clk_pllv3_enet_ops; 324 ops = &clk_pllv3_enet_ops;
332 break; 325 break;
333 case IMX_PLLV3_MLB:
334 ops = &clk_pllv3_mlb_ops;
335 break;
336 default: 326 default:
337 ops = &clk_pllv3_ops; 327 ops = &clk_pllv3_ops;
338 } 328 }
diff --git a/arch/arm/mach-imx/clk-vf610.c b/arch/arm/mach-imx/clk-vf610.c
new file mode 100644
index 000000000000..b169a396d93b
--- /dev/null
+++ b/arch/arm/mach-imx/clk-vf610.c
@@ -0,0 +1,321 @@
1/*
2 * Copyright 2012-2013 Freescale Semiconductor, Inc.
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 */
10
11#include <linux/of_address.h>
12#include <linux/clk.h>
13#include <dt-bindings/clock/vf610-clock.h>
14
15#include "clk.h"
16
17#define CCM_CCR (ccm_base + 0x00)
18#define CCM_CSR (ccm_base + 0x04)
19#define CCM_CCSR (ccm_base + 0x08)
20#define CCM_CACRR (ccm_base + 0x0c)
21#define CCM_CSCMR1 (ccm_base + 0x10)
22#define CCM_CSCDR1 (ccm_base + 0x14)
23#define CCM_CSCDR2 (ccm_base + 0x18)
24#define CCM_CSCDR3 (ccm_base + 0x1c)
25#define CCM_CSCMR2 (ccm_base + 0x20)
26#define CCM_CSCDR4 (ccm_base + 0x24)
27#define CCM_CLPCR (ccm_base + 0x2c)
28#define CCM_CISR (ccm_base + 0x30)
29#define CCM_CIMR (ccm_base + 0x34)
30#define CCM_CGPR (ccm_base + 0x3c)
31#define CCM_CCGR0 (ccm_base + 0x40)
32#define CCM_CCGR1 (ccm_base + 0x44)
33#define CCM_CCGR2 (ccm_base + 0x48)
34#define CCM_CCGR3 (ccm_base + 0x4c)
35#define CCM_CCGR4 (ccm_base + 0x50)
36#define CCM_CCGR5 (ccm_base + 0x54)
37#define CCM_CCGR6 (ccm_base + 0x58)
38#define CCM_CCGR7 (ccm_base + 0x5c)
39#define CCM_CCGR8 (ccm_base + 0x60)
40#define CCM_CCGR9 (ccm_base + 0x64)
41#define CCM_CCGR10 (ccm_base + 0x68)
42#define CCM_CCGR11 (ccm_base + 0x6c)
43#define CCM_CMEOR0 (ccm_base + 0x70)
44#define CCM_CMEOR1 (ccm_base + 0x74)
45#define CCM_CMEOR2 (ccm_base + 0x78)
46#define CCM_CMEOR3 (ccm_base + 0x7c)
47#define CCM_CMEOR4 (ccm_base + 0x80)
48#define CCM_CMEOR5 (ccm_base + 0x84)
49#define CCM_CPPDSR (ccm_base + 0x88)
50#define CCM_CCOWR (ccm_base + 0x8c)
51#define CCM_CCPGR0 (ccm_base + 0x90)
52#define CCM_CCPGR1 (ccm_base + 0x94)
53#define CCM_CCPGR2 (ccm_base + 0x98)
54#define CCM_CCPGR3 (ccm_base + 0x9c)
55
56#define CCM_CCGRx_CGn(n) ((n) * 2)
57
58#define PFD_PLL1_BASE (anatop_base + 0x2b0)
59#define PFD_PLL2_BASE (anatop_base + 0x100)
60#define PFD_PLL3_BASE (anatop_base + 0xf0)
61
62static void __iomem *anatop_base;
63static void __iomem *ccm_base;
64
65/* sources for multiplexer clocks, this is used multiple times */
66static const char const *fast_sels[] = { "firc", "fxosc", };
67static const char const *slow_sels[] = { "sirc_32k", "sxosc", };
68static const char const *pll1_sels[] = { "pll1_main", "pll1_pfd1", "pll1_pfd2", "pll1_pfd3", "pll1_pfd4", };
69static const char const *pll2_sels[] = { "pll2_main", "pll2_pfd1", "pll2_pfd2", "pll2_pfd3", "pll2_pfd4", };
70static const char const *sys_sels[] = { "fast_clk_sel", "slow_clk_sel", "pll2_pfd_sel", "pll2_main", "pll1_pfd_sel", "pll3_main", };
71static const char const *ddr_sels[] = { "pll2_pfd2", "sys_sel", };
72static const char const *rmii_sels[] = { "enet_ext", "audio_ext", "enet_50m", "enet_25m", };
73static const char const *enet_ts_sels[] = { "enet_ext", "fxosc", "audio_ext", "usb", "enet_ts", "enet_25m", "enet_50m", };
74static const char const *esai_sels[] = { "audio_ext", "mlb", "spdif_rx", "pll4_main_div", };
75static const char const *sai_sels[] = { "audio_ext", "mlb", "spdif_rx", "pll4_main_div", };
76static const char const *nfc_sels[] = { "platform_bus", "pll1_pfd1", "pll3_pfd1", "pll3_pfd3", };
77static const char const *qspi_sels[] = { "pll3_main", "pll3_pfd4", "pll2_pfd4", "pll1_pfd4", };
78static const char const *esdhc_sels[] = { "pll3_main", "pll3_pfd3", "pll1_pfd3", "platform_bus", };
79static const char const *dcu_sels[] = { "pll1_pfd2", "pll3_main", };
80static const char const *gpu_sels[] = { "pll2_pfd2", "pll3_pfd2", };
81static const char const *vadc_sels[] = { "pll6_main_div", "pll3_main_div", "pll3_main", };
82/* FTM counter clock source, not module clock */
83static const char const *ftm_ext_sels[] = {"sirc_128k", "sxosc", "fxosc_half", "audio_ext", };
84static const char const *ftm_fix_sels[] = { "sxosc", "ipg_bus", };
85
86static struct clk_div_table pll4_main_div_table[] = {
87 { .val = 0, .div = 1 },
88 { .val = 1, .div = 2 },
89 { .val = 2, .div = 6 },
90 { .val = 3, .div = 8 },
91 { .val = 4, .div = 10 },
92 { .val = 5, .div = 12 },
93 { .val = 6, .div = 14 },
94 { .val = 7, .div = 16 },
95 { }
96};
97
98static struct clk *clk[VF610_CLK_END];
99static struct clk_onecell_data clk_data;
100
101static void __init vf610_clocks_init(struct device_node *ccm_node)
102{
103 struct device_node *np;
104
105 clk[VF610_CLK_DUMMY] = imx_clk_fixed("dummy", 0);
106 clk[VF610_CLK_SIRC_128K] = imx_clk_fixed("sirc_128k", 128000);
107 clk[VF610_CLK_SIRC_32K] = imx_clk_fixed("sirc_32k", 32000);
108 clk[VF610_CLK_FIRC] = imx_clk_fixed("firc", 24000000);
109
110 clk[VF610_CLK_SXOSC] = imx_obtain_fixed_clock("sxosc", 0);
111 clk[VF610_CLK_FXOSC] = imx_obtain_fixed_clock("fxosc", 0);
112 clk[VF610_CLK_AUDIO_EXT] = imx_obtain_fixed_clock("audio_ext", 0);
113 clk[VF610_CLK_ENET_EXT] = imx_obtain_fixed_clock("enet_ext", 0);
114
115 clk[VF610_CLK_FXOSC_HALF] = imx_clk_fixed_factor("fxosc_half", "fxosc", 1, 2);
116
117 np = of_find_compatible_node(NULL, NULL, "fsl,vf610-anatop");
118 anatop_base = of_iomap(np, 0);
119 BUG_ON(!anatop_base);
120
121 np = ccm_node;
122 ccm_base = of_iomap(np, 0);
123 BUG_ON(!ccm_base);
124
125 clk[VF610_CLK_SLOW_CLK_SEL] = imx_clk_mux("slow_clk_sel", CCM_CCSR, 4, 1, slow_sels, ARRAY_SIZE(slow_sels));
126 clk[VF610_CLK_FASK_CLK_SEL] = imx_clk_mux("fast_clk_sel", CCM_CCSR, 5, 1, fast_sels, ARRAY_SIZE(fast_sels));
127
128 clk[VF610_CLK_PLL1_MAIN] = imx_clk_fixed_factor("pll1_main", "fast_clk_sel", 22, 1);
129 clk[VF610_CLK_PLL1_PFD1] = imx_clk_pfd("pll1_pfd1", "pll1_main", PFD_PLL1_BASE, 0);
130 clk[VF610_CLK_PLL1_PFD2] = imx_clk_pfd("pll1_pfd2", "pll1_main", PFD_PLL1_BASE, 1);
131 clk[VF610_CLK_PLL1_PFD3] = imx_clk_pfd("pll1_pfd3", "pll1_main", PFD_PLL1_BASE, 2);
132 clk[VF610_CLK_PLL1_PFD4] = imx_clk_pfd("pll1_pfd4", "pll1_main", PFD_PLL1_BASE, 3);
133
134 clk[VF610_CLK_PLL2_MAIN] = imx_clk_fixed_factor("pll2_main", "fast_clk_sel", 22, 1);
135 clk[VF610_CLK_PLL2_PFD1] = imx_clk_pfd("pll2_pfd1", "pll2_main", PFD_PLL2_BASE, 0);
136 clk[VF610_CLK_PLL2_PFD2] = imx_clk_pfd("pll2_pfd2", "pll2_main", PFD_PLL2_BASE, 1);
137 clk[VF610_CLK_PLL2_PFD3] = imx_clk_pfd("pll2_pfd3", "pll2_main", PFD_PLL2_BASE, 2);
138 clk[VF610_CLK_PLL2_PFD4] = imx_clk_pfd("pll2_pfd4", "pll2_main", PFD_PLL2_BASE, 3);
139
140 clk[VF610_CLK_PLL3_MAIN] = imx_clk_fixed_factor("pll3_main", "fast_clk_sel", 20, 1);
141 clk[VF610_CLK_PLL3_PFD1] = imx_clk_pfd("pll3_pfd1", "pll3_main", PFD_PLL3_BASE, 0);
142 clk[VF610_CLK_PLL3_PFD2] = imx_clk_pfd("pll3_pfd2", "pll3_main", PFD_PLL3_BASE, 1);
143 clk[VF610_CLK_PLL3_PFD3] = imx_clk_pfd("pll3_pfd3", "pll3_main", PFD_PLL3_BASE, 2);
144 clk[VF610_CLK_PLL3_PFD4] = imx_clk_pfd("pll3_pfd4", "pll3_main", PFD_PLL3_BASE, 3);
145
146 clk[VF610_CLK_PLL4_MAIN] = imx_clk_fixed_factor("pll4_main", "fast_clk_sel", 25, 1);
147 /* Enet pll: fixed 50Mhz */
148 clk[VF610_CLK_PLL5_MAIN] = imx_clk_fixed_factor("pll5_main", "fast_clk_sel", 125, 6);
149 /* pll6: default 960Mhz */
150 clk[VF610_CLK_PLL6_MAIN] = imx_clk_fixed_factor("pll6_main", "fast_clk_sel", 40, 1);
151 clk[VF610_CLK_PLL1_PFD_SEL] = imx_clk_mux("pll1_pfd_sel", CCM_CCSR, 16, 3, pll1_sels, 5);
152 clk[VF610_CLK_PLL2_PFD_SEL] = imx_clk_mux("pll2_pfd_sel", CCM_CCSR, 19, 3, pll2_sels, 5);
153 clk[VF610_CLK_SYS_SEL] = imx_clk_mux("sys_sel", CCM_CCSR, 0, 3, sys_sels, ARRAY_SIZE(sys_sels));
154 clk[VF610_CLK_DDR_SEL] = imx_clk_mux("ddr_sel", CCM_CCSR, 6, 1, ddr_sels, ARRAY_SIZE(ddr_sels));
155 clk[VF610_CLK_SYS_BUS] = imx_clk_divider("sys_bus", "sys_sel", CCM_CACRR, 0, 3);
156 clk[VF610_CLK_PLATFORM_BUS] = imx_clk_divider("platform_bus", "sys_bus", CCM_CACRR, 3, 3);
157 clk[VF610_CLK_IPG_BUS] = imx_clk_divider("ipg_bus", "platform_bus", CCM_CACRR, 11, 2);
158
159 clk[VF610_CLK_PLL3_MAIN_DIV] = imx_clk_divider("pll3_main_div", "pll3_main", CCM_CACRR, 20, 1);
160 clk[VF610_CLK_PLL4_MAIN_DIV] = clk_register_divider_table(NULL, "pll4_main_div", "pll4_main", 0, CCM_CACRR, 6, 3, 0, pll4_main_div_table, &imx_ccm_lock);
161 clk[VF610_CLK_PLL6_MAIN_DIV] = imx_clk_divider("pll6_main_div", "pll6_main", CCM_CACRR, 21, 1);
162
163 clk[VF610_CLK_USBC0] = imx_clk_gate2("usbc0", "pll3_main", CCM_CCGR1, CCM_CCGRx_CGn(4));
164 clk[VF610_CLK_USBC1] = imx_clk_gate2("usbc1", "pll3_main", CCM_CCGR7, CCM_CCGRx_CGn(4));
165
166 clk[VF610_CLK_QSPI0_SEL] = imx_clk_mux("qspi0_sel", CCM_CSCMR1, 22, 2, qspi_sels, 4);
167 clk[VF610_CLK_QSPI0_EN] = imx_clk_gate("qspi0_en", "qspi0_sel", CCM_CSCDR3, 4);
168 clk[VF610_CLK_QSPI0_X4_DIV] = imx_clk_divider("qspi0_x4", "qspi0_en", CCM_CSCDR3, 0, 2);
169 clk[VF610_CLK_QSPI0_X2_DIV] = imx_clk_divider("qspi0_x2", "qspi0_x4", CCM_CSCDR3, 2, 1);
170 clk[VF610_CLK_QSPI0_X1_DIV] = imx_clk_divider("qspi0_x1", "qspi0_x2", CCM_CSCDR3, 3, 1);
171 clk[VF610_CLK_QSPI0] = imx_clk_gate2("qspi0", "qspi0_x1", CCM_CCGR2, CCM_CCGRx_CGn(4));
172
173 clk[VF610_CLK_QSPI1_SEL] = imx_clk_mux("qspi1_sel", CCM_CSCMR1, 24, 2, qspi_sels, 4);
174 clk[VF610_CLK_QSPI1_EN] = imx_clk_gate("qspi1_en", "qspi1_sel", CCM_CSCDR3, 12);
175 clk[VF610_CLK_QSPI1_X4_DIV] = imx_clk_divider("qspi1_x4", "qspi1_en", CCM_CSCDR3, 8, 2);
176 clk[VF610_CLK_QSPI1_X2_DIV] = imx_clk_divider("qspi1_x2", "qspi1_x4", CCM_CSCDR3, 10, 1);
177 clk[VF610_CLK_QSPI1_X1_DIV] = imx_clk_divider("qspi1_x1", "qspi1_x2", CCM_CSCDR3, 11, 1);
178 clk[VF610_CLK_QSPI1] = imx_clk_gate2("qspi1", "qspi1_x1", CCM_CCGR8, CCM_CCGRx_CGn(4));
179
180 clk[VF610_CLK_ENET_50M] = imx_clk_fixed_factor("enet_50m", "pll5_main", 1, 10);
181 clk[VF610_CLK_ENET_25M] = imx_clk_fixed_factor("enet_25m", "pll5_main", 1, 20);
182 clk[VF610_CLK_ENET_SEL] = imx_clk_mux("enet_sel", CCM_CSCMR2, 4, 2, rmii_sels, 4);
183 clk[VF610_CLK_ENET_TS_SEL] = imx_clk_mux("enet_ts_sel", CCM_CSCMR2, 0, 3, enet_ts_sels, 7);
184 clk[VF610_CLK_ENET] = imx_clk_gate("enet", "enet_sel", CCM_CSCDR1, 24);
185 clk[VF610_CLK_ENET_TS] = imx_clk_gate("enet_ts", "enet_ts_sel", CCM_CSCDR1, 23);
186 clk[VF610_CLK_ENET0] = imx_clk_gate2("enet0", "ipg_bus", CCM_CCGR9, CCM_CCGRx_CGn(0));
187 clk[VF610_CLK_ENET1] = imx_clk_gate2("enet1", "ipg_bus", CCM_CCGR9, CCM_CCGRx_CGn(1));
188
189 clk[VF610_CLK_PIT] = imx_clk_gate2("pit", "ipg_bus", CCM_CCGR1, CCM_CCGRx_CGn(7));
190
191 clk[VF610_CLK_UART0] = imx_clk_gate2("uart0", "ipg_bus", CCM_CCGR0, CCM_CCGRx_CGn(7));
192 clk[VF610_CLK_UART1] = imx_clk_gate2("uart1", "ipg_bus", CCM_CCGR0, CCM_CCGRx_CGn(8));
193 clk[VF610_CLK_UART2] = imx_clk_gate2("uart2", "ipg_bus", CCM_CCGR0, CCM_CCGRx_CGn(9));
194 clk[VF610_CLK_UART3] = imx_clk_gate2("uart3", "ipg_bus", CCM_CCGR0, CCM_CCGRx_CGn(10));
195
196 clk[VF610_CLK_I2C0] = imx_clk_gate2("i2c0", "ipg_bus", CCM_CCGR4, CCM_CCGRx_CGn(6));
197 clk[VF610_CLK_I2C1] = imx_clk_gate2("i2c1", "ipg_bus", CCM_CCGR4, CCM_CCGRx_CGn(7));
198
199 clk[VF610_CLK_DSPI0] = imx_clk_gate2("dspi0", "ipg_bus", CCM_CCGR0, CCM_CCGRx_CGn(12));
200 clk[VF610_CLK_DSPI1] = imx_clk_gate2("dspi1", "ipg_bus", CCM_CCGR0, CCM_CCGRx_CGn(13));
201 clk[VF610_CLK_DSPI2] = imx_clk_gate2("dspi2", "ipg_bus", CCM_CCGR6, CCM_CCGRx_CGn(12));
202 clk[VF610_CLK_DSPI3] = imx_clk_gate2("dspi3", "ipg_bus", CCM_CCGR6, CCM_CCGRx_CGn(13));
203
204 clk[VF610_CLK_WDT] = imx_clk_gate2("wdt", "ipg_bus", CCM_CCGR1, CCM_CCGRx_CGn(14));
205
206 clk[VF610_CLK_ESDHC0_SEL] = imx_clk_mux("esdhc0_sel", CCM_CSCMR1, 16, 2, esdhc_sels, 4);
207 clk[VF610_CLK_ESDHC0_EN] = imx_clk_gate("esdhc0_en", "esdhc0_sel", CCM_CSCDR2, 28);
208 clk[VF610_CLK_ESDHC0_DIV] = imx_clk_divider("esdhc0_div", "esdhc0_en", CCM_CSCDR2, 16, 4);
209 clk[VF610_CLK_ESDHC0] = imx_clk_gate2("eshc0", "esdhc0_div", CCM_CCGR7, CCM_CCGRx_CGn(1));
210
211 clk[VF610_CLK_ESDHC1_SEL] = imx_clk_mux("esdhc1_sel", CCM_CSCMR1, 18, 2, esdhc_sels, 4);
212 clk[VF610_CLK_ESDHC1_EN] = imx_clk_gate("esdhc1_en", "esdhc1_sel", CCM_CSCDR2, 29);
213 clk[VF610_CLK_ESDHC1_DIV] = imx_clk_divider("esdhc1_div", "esdhc1_en", CCM_CSCDR2, 20, 4);
214 clk[VF610_CLK_ESDHC1] = imx_clk_gate2("eshc1", "esdhc1_div", CCM_CCGR7, CCM_CCGRx_CGn(2));
215
216 /*
217 * ftm_ext_clk and ftm_fix_clk are FTM timer counter's
218 * selectable clock sources, both use a common enable bit
219 * in CCM_CSCDR1, selecting "dummy" clock as parent of
220 * "ftm0_ext_fix" make it serve only for enable/disable.
221 */
222 clk[VF610_CLK_FTM0_EXT_SEL] = imx_clk_mux("ftm0_ext_sel", CCM_CSCMR2, 6, 2, ftm_ext_sels, 4);
223 clk[VF610_CLK_FTM0_FIX_SEL] = imx_clk_mux("ftm0_fix_sel", CCM_CSCMR2, 14, 1, ftm_fix_sels, 2);
224 clk[VF610_CLK_FTM0_EXT_FIX_EN] = imx_clk_gate("ftm0_ext_fix_en", "dummy", CCM_CSCDR1, 25);
225 clk[VF610_CLK_FTM1_EXT_SEL] = imx_clk_mux("ftm1_ext_sel", CCM_CSCMR2, 8, 2, ftm_ext_sels, 4);
226 clk[VF610_CLK_FTM1_FIX_SEL] = imx_clk_mux("ftm1_fix_sel", CCM_CSCMR2, 15, 1, ftm_fix_sels, 2);
227 clk[VF610_CLK_FTM1_EXT_FIX_EN] = imx_clk_gate("ftm1_ext_fix_en", "dummy", CCM_CSCDR1, 26);
228 clk[VF610_CLK_FTM2_EXT_SEL] = imx_clk_mux("ftm2_ext_sel", CCM_CSCMR2, 10, 2, ftm_ext_sels, 4);
229 clk[VF610_CLK_FTM2_FIX_SEL] = imx_clk_mux("ftm2_fix_sel", CCM_CSCMR2, 16, 1, ftm_fix_sels, 2);
230 clk[VF610_CLK_FTM2_EXT_FIX_EN] = imx_clk_gate("ftm2_ext_fix_en", "dummy", CCM_CSCDR1, 27);
231 clk[VF610_CLK_FTM3_EXT_SEL] = imx_clk_mux("ftm3_ext_sel", CCM_CSCMR2, 12, 2, ftm_ext_sels, 4);
232 clk[VF610_CLK_FTM3_FIX_SEL] = imx_clk_mux("ftm3_fix_sel", CCM_CSCMR2, 17, 1, ftm_fix_sels, 2);
233 clk[VF610_CLK_FTM3_EXT_FIX_EN] = imx_clk_gate("ftm3_ext_fix_en", "dummy", CCM_CSCDR1, 28);
234
235 /* ftm(n)_clk are FTM module operation clock */
236 clk[VF610_CLK_FTM0] = imx_clk_gate2("ftm0", "ipg_bus", CCM_CCGR1, CCM_CCGRx_CGn(8));
237 clk[VF610_CLK_FTM1] = imx_clk_gate2("ftm1", "ipg_bus", CCM_CCGR1, CCM_CCGRx_CGn(9));
238 clk[VF610_CLK_FTM2] = imx_clk_gate2("ftm2", "ipg_bus", CCM_CCGR7, CCM_CCGRx_CGn(8));
239 clk[VF610_CLK_FTM3] = imx_clk_gate2("ftm3", "ipg_bus", CCM_CCGR7, CCM_CCGRx_CGn(9));
240
241 clk[VF610_CLK_DCU0_SEL] = imx_clk_mux("dcu0_sel", CCM_CSCMR1, 28, 1, dcu_sels, 2);
242 clk[VF610_CLK_DCU0_EN] = imx_clk_gate("dcu0_en", "dcu0_sel", CCM_CSCDR3, 19);
243 clk[VF610_CLK_DCU0_DIV] = imx_clk_divider("dcu0_div", "dcu0_en", CCM_CSCDR3, 16, 3);
244 clk[VF610_CLK_DCU0] = imx_clk_gate2("dcu0", "dcu0_div", CCM_CCGR3, CCM_CCGRx_CGn(8));
245 clk[VF610_CLK_DCU1_SEL] = imx_clk_mux("dcu1_sel", CCM_CSCMR1, 29, 1, dcu_sels, 2);
246 clk[VF610_CLK_DCU1_EN] = imx_clk_gate("dcu1_en", "dcu1_sel", CCM_CSCDR3, 23);
247 clk[VF610_CLK_DCU1_DIV] = imx_clk_divider("dcu1_div", "dcu1_en", CCM_CSCDR3, 20, 3);
248 clk[VF610_CLK_DCU1] = imx_clk_gate2("dcu1", "dcu1_div", CCM_CCGR9, CCM_CCGRx_CGn(8));
249
250 clk[VF610_CLK_ESAI_SEL] = imx_clk_mux("esai_sel", CCM_CSCMR1, 20, 2, esai_sels, 4);
251 clk[VF610_CLK_ESAI_EN] = imx_clk_gate("esai_en", "esai_sel", CCM_CSCDR2, 30);
252 clk[VF610_CLK_ESAI_DIV] = imx_clk_divider("esai_div", "esai_en", CCM_CSCDR2, 24, 4);
253 clk[VF610_CLK_ESAI] = imx_clk_gate2("esai", "esai_div", CCM_CCGR4, CCM_CCGRx_CGn(2));
254
255 clk[VF610_CLK_SAI0_SEL] = imx_clk_mux("sai0_sel", CCM_CSCMR1, 0, 2, sai_sels, 4);
256 clk[VF610_CLK_SAI0_EN] = imx_clk_gate("sai0_en", "sai0_sel", CCM_CSCDR1, 16);
257 clk[VF610_CLK_SAI0_DIV] = imx_clk_divider("sai0_div", "sai0_en", CCM_CSCDR1, 0, 4);
258 clk[VF610_CLK_SAI0] = imx_clk_gate2("sai0", "sai0_div", CCM_CCGR0, CCM_CCGRx_CGn(15));
259
260 clk[VF610_CLK_SAI1_SEL] = imx_clk_mux("sai1_sel", CCM_CSCMR1, 2, 2, sai_sels, 4);
261 clk[VF610_CLK_SAI1_EN] = imx_clk_gate("sai1_en", "sai1_sel", CCM_CSCDR1, 17);
262 clk[VF610_CLK_SAI1_DIV] = imx_clk_divider("sai1_div", "sai1_en", CCM_CSCDR1, 4, 4);
263 clk[VF610_CLK_SAI1] = imx_clk_gate2("sai1", "sai1_div", CCM_CCGR1, CCM_CCGRx_CGn(0));
264
265 clk[VF610_CLK_SAI2_SEL] = imx_clk_mux("sai2_sel", CCM_CSCMR1, 4, 2, sai_sels, 4);
266 clk[VF610_CLK_SAI2_EN] = imx_clk_gate("sai2_en", "sai2_sel", CCM_CSCDR1, 18);
267 clk[VF610_CLK_SAI2_DIV] = imx_clk_divider("sai2_div", "sai2_en", CCM_CSCDR1, 8, 4);
268 clk[VF610_CLK_SAI2] = imx_clk_gate2("sai2", "sai2_div", CCM_CCGR1, CCM_CCGRx_CGn(1));
269
270 clk[VF610_CLK_SAI3_SEL] = imx_clk_mux("sai3_sel", CCM_CSCMR1, 6, 2, sai_sels, 4);
271 clk[VF610_CLK_SAI3_EN] = imx_clk_gate("sai3_en", "sai3_sel", CCM_CSCDR1, 19);
272 clk[VF610_CLK_SAI3_DIV] = imx_clk_divider("sai3_div", "sai3_en", CCM_CSCDR1, 12, 4);
273 clk[VF610_CLK_SAI3] = imx_clk_gate2("sai3", "sai3_div", CCM_CCGR1, CCM_CCGRx_CGn(2));
274
275 clk[VF610_CLK_NFC_SEL] = imx_clk_mux("nfc_sel", CCM_CSCMR1, 12, 2, nfc_sels, 4);
276 clk[VF610_CLK_NFC_EN] = imx_clk_gate("nfc_en", "nfc_sel", CCM_CSCDR2, 9);
277 clk[VF610_CLK_NFC_PRE_DIV] = imx_clk_divider("nfc_pre_div", "nfc_en", CCM_CSCDR3, 13, 3);
278 clk[VF610_CLK_NFC_FRAC_DIV] = imx_clk_divider("nfc_frac_div", "nfc_pre_div", CCM_CSCDR2, 4, 4);
279 clk[VF610_CLK_NFC] = imx_clk_gate2("nfc", "nfc_frac_div", CCM_CCGR10, CCM_CCGRx_CGn(0));
280
281 clk[VF610_CLK_GPU_SEL] = imx_clk_mux("gpu_sel", CCM_CSCMR1, 14, 1, gpu_sels, 2);
282 clk[VF610_CLK_GPU_EN] = imx_clk_gate("gpu_en", "gpu_sel", CCM_CSCDR2, 10);
283 clk[VF610_CLK_GPU2D] = imx_clk_gate2("gpu", "gpu_en", CCM_CCGR8, CCM_CCGRx_CGn(15));
284
285 clk[VF610_CLK_VADC_SEL] = imx_clk_mux("vadc_sel", CCM_CSCMR1, 8, 2, vadc_sels, 3);
286 clk[VF610_CLK_VADC_EN] = imx_clk_gate("vadc_en", "vadc_sel", CCM_CSCDR1, 22);
287 clk[VF610_CLK_VADC_DIV] = imx_clk_divider("vadc_div", "vadc_en", CCM_CSCDR1, 20, 2);
288 clk[VF610_CLK_VADC_DIV_HALF] = imx_clk_fixed_factor("vadc_div_half", "vadc_div", 1, 2);
289 clk[VF610_CLK_VADC] = imx_clk_gate2("vadc", "vadc_div", CCM_CCGR8, CCM_CCGRx_CGn(7));
290
291 clk[VF610_CLK_ADC0] = imx_clk_gate2("adc0", "ipg_bus", CCM_CCGR1, CCM_CCGRx_CGn(11));
292 clk[VF610_CLK_ADC1] = imx_clk_gate2("adc1", "ipg_bus", CCM_CCGR7, CCM_CCGRx_CGn(11));
293 clk[VF610_CLK_DAC0] = imx_clk_gate2("dac0", "ipg_bus", CCM_CCGR8, CCM_CCGRx_CGn(12));
294 clk[VF610_CLK_DAC1] = imx_clk_gate2("dac1", "ipg_bus", CCM_CCGR8, CCM_CCGRx_CGn(13));
295
296 clk[VF610_CLK_ASRC] = imx_clk_gate2("asrc", "ipg_bus", CCM_CCGR4, CCM_CCGRx_CGn(1));
297
298 clk[VF610_CLK_FLEXCAN0] = imx_clk_gate2("flexcan0", "ipg_bus", CCM_CCGR0, CCM_CCGRx_CGn(0));
299 clk[VF610_CLK_FLEXCAN1] = imx_clk_gate2("flexcan1", "ipg_bus", CCM_CCGR9, CCM_CCGRx_CGn(4));
300
301 clk_set_parent(clk[VF610_CLK_QSPI0_SEL], clk[VF610_CLK_PLL1_PFD4]);
302 clk_set_rate(clk[VF610_CLK_QSPI0_X4_DIV], clk_get_rate(clk[VF610_CLK_QSPI0_SEL]) / 2);
303 clk_set_rate(clk[VF610_CLK_QSPI0_X2_DIV], clk_get_rate(clk[VF610_CLK_QSPI0_X4_DIV]) / 2);
304 clk_set_rate(clk[VF610_CLK_QSPI0_X1_DIV], clk_get_rate(clk[VF610_CLK_QSPI0_X2_DIV]) / 2);
305
306 clk_set_parent(clk[VF610_CLK_QSPI1_SEL], clk[VF610_CLK_PLL1_PFD4]);
307 clk_set_rate(clk[VF610_CLK_QSPI1_X4_DIV], clk_get_rate(clk[VF610_CLK_QSPI1_SEL]) / 2);
308 clk_set_rate(clk[VF610_CLK_QSPI1_X2_DIV], clk_get_rate(clk[VF610_CLK_QSPI1_X4_DIV]) / 2);
309 clk_set_rate(clk[VF610_CLK_QSPI1_X1_DIV], clk_get_rate(clk[VF610_CLK_QSPI1_X2_DIV]) / 2);
310
311 clk_set_parent(clk[VF610_CLK_SAI0_SEL], clk[VF610_CLK_AUDIO_EXT]);
312 clk_set_parent(clk[VF610_CLK_SAI1_SEL], clk[VF610_CLK_AUDIO_EXT]);
313 clk_set_parent(clk[VF610_CLK_SAI2_SEL], clk[VF610_CLK_AUDIO_EXT]);
314 clk_set_parent(clk[VF610_CLK_SAI3_SEL], clk[VF610_CLK_AUDIO_EXT]);
315
316 /* Add the clocks to provider list */
317 clk_data.clks = clk;
318 clk_data.clk_num = ARRAY_SIZE(clk);
319 of_clk_add_provider(np, of_clk_src_onecell_get, &clk_data);
320}
321CLK_OF_DECLARE(vf610, "fsl,vf610-ccm", vf610_clocks_init);
diff --git a/arch/arm/mach-imx/clk.c b/arch/arm/mach-imx/clk.c
index 37e884ed1cd4..55bc80a00666 100644
--- a/arch/arm/mach-imx/clk.c
+++ b/arch/arm/mach-imx/clk.c
@@ -1,4 +1,39 @@
1#include <linux/clk.h>
2#include <linux/err.h>
3#include <linux/of.h>
4#include <linux/slab.h>
1#include <linux/spinlock.h> 5#include <linux/spinlock.h>
2#include "clk.h" 6#include "clk.h"
3 7
4DEFINE_SPINLOCK(imx_ccm_lock); 8DEFINE_SPINLOCK(imx_ccm_lock);
9
10static struct clk * __init imx_obtain_fixed_clock_from_dt(const char *name)
11{
12 struct of_phandle_args phandle;
13 struct clk *clk = ERR_PTR(-ENODEV);
14 char *path;
15
16 path = kasprintf(GFP_KERNEL, "/clocks/%s", name);
17 if (!path)
18 return ERR_PTR(-ENOMEM);
19
20 phandle.np = of_find_node_by_path(path);
21 kfree(path);
22
23 if (phandle.np) {
24 clk = of_clk_get_from_provider(&phandle);
25 of_node_put(phandle.np);
26 }
27 return clk;
28}
29
30struct clk * __init imx_obtain_fixed_clock(
31 const char *name, unsigned long rate)
32{
33 struct clk *clk;
34
35 clk = imx_obtain_fixed_clock_from_dt(name);
36 if (IS_ERR(clk))
37 clk = imx_clk_fixed(name, rate);
38 return clk;
39}
diff --git a/arch/arm/mach-imx/clk.h b/arch/arm/mach-imx/clk.h
index d9d9d9c66dff..0e4e8bb261b9 100644
--- a/arch/arm/mach-imx/clk.h
+++ b/arch/arm/mach-imx/clk.h
@@ -18,7 +18,6 @@ enum imx_pllv3_type {
18 IMX_PLLV3_USB, 18 IMX_PLLV3_USB,
19 IMX_PLLV3_AV, 19 IMX_PLLV3_AV,
20 IMX_PLLV3_ENET, 20 IMX_PLLV3_ENET,
21 IMX_PLLV3_MLB,
22}; 21};
23 22
24struct clk *imx_clk_pllv3(enum imx_pllv3_type type, const char *name, 23struct clk *imx_clk_pllv3(enum imx_pllv3_type type, const char *name,
@@ -29,6 +28,9 @@ struct clk *clk_register_gate2(struct device *dev, const char *name,
29 void __iomem *reg, u8 bit_idx, 28 void __iomem *reg, u8 bit_idx,
30 u8 clk_gate_flags, spinlock_t *lock); 29 u8 clk_gate_flags, spinlock_t *lock);
31 30
31struct clk * imx_obtain_fixed_clock(
32 const char *name, unsigned long rate);
33
32static inline struct clk *imx_clk_gate2(const char *name, const char *parent, 34static inline struct clk *imx_clk_gate2(const char *name, const char *parent,
33 void __iomem *reg, u8 shift) 35 void __iomem *reg, u8 shift)
34{ 36{
diff --git a/arch/arm/mach-imx/common.h b/arch/arm/mach-imx/common.h
index c08ae3f99cee..cb6c838b63ed 100644
--- a/arch/arm/mach-imx/common.h
+++ b/arch/arm/mach-imx/common.h
@@ -11,6 +11,8 @@
11#ifndef __ASM_ARCH_MXC_COMMON_H__ 11#ifndef __ASM_ARCH_MXC_COMMON_H__
12#define __ASM_ARCH_MXC_COMMON_H__ 12#define __ASM_ARCH_MXC_COMMON_H__
13 13
14#include <linux/reboot.h>
15
14struct platform_device; 16struct platform_device;
15struct pt_regs; 17struct pt_regs;
16struct clk; 18struct clk;
@@ -68,12 +70,12 @@ extern int mx27_clocks_init_dt(void);
68extern int mx31_clocks_init_dt(void); 70extern int mx31_clocks_init_dt(void);
69extern int mx51_clocks_init_dt(void); 71extern int mx51_clocks_init_dt(void);
70extern int mx53_clocks_init_dt(void); 72extern int mx53_clocks_init_dt(void);
71extern int mx6q_clocks_init(void);
72extern struct platform_device *mxc_register_gpio(char *name, int id, 73extern struct platform_device *mxc_register_gpio(char *name, int id,
73 resource_size_t iobase, resource_size_t iosize, int irq, int irq_high); 74 resource_size_t iobase, resource_size_t iosize, int irq, int irq_high);
74extern void mxc_set_cpu_type(unsigned int type); 75extern void mxc_set_cpu_type(unsigned int type);
75extern void mxc_restart(char, const char *); 76extern void mxc_restart(enum reboot_mode, const char *);
76extern void mxc_arch_reset_init(void __iomem *); 77extern void mxc_arch_reset_init(void __iomem *);
78extern void mxc_arch_reset_init_dt(void);
77extern int mx53_revision(void); 79extern int mx53_revision(void);
78extern int imx6q_revision(void); 80extern int imx6q_revision(void);
79extern int mx53_display_revision(void); 81extern int mx53_display_revision(void);
diff --git a/arch/arm/mach-imx/devices-imx25.h b/arch/arm/mach-imx/devices-imx25.h
index 0d2922bc575c..769563fdeaa0 100644
--- a/arch/arm/mach-imx/devices-imx25.h
+++ b/arch/arm/mach-imx/devices-imx25.h
@@ -13,10 +13,10 @@ extern const struct imx_fec_data imx25_fec_data;
13 imx_add_fec(&imx25_fec_data, pdata) 13 imx_add_fec(&imx25_fec_data, pdata)
14 14
15extern const struct imx_flexcan_data imx25_flexcan_data[]; 15extern const struct imx_flexcan_data imx25_flexcan_data[];
16#define imx25_add_flexcan(id, pdata) \ 16#define imx25_add_flexcan(id) \
17 imx_add_flexcan(&imx25_flexcan_data[id], pdata) 17 imx_add_flexcan(&imx25_flexcan_data[id])
18#define imx25_add_flexcan0(pdata) imx25_add_flexcan(0, pdata) 18#define imx25_add_flexcan0() imx25_add_flexcan(0)
19#define imx25_add_flexcan1(pdata) imx25_add_flexcan(1, pdata) 19#define imx25_add_flexcan1() imx25_add_flexcan(1)
20 20
21extern const struct imx_fsl_usb2_udc_data imx25_fsl_usb2_udc_data; 21extern const struct imx_fsl_usb2_udc_data imx25_fsl_usb2_udc_data;
22#define imx25_add_fsl_usb2_udc(pdata) \ 22#define imx25_add_fsl_usb2_udc(pdata) \
diff --git a/arch/arm/mach-imx/devices-imx35.h b/arch/arm/mach-imx/devices-imx35.h
index e2675f1b141c..780d8240281b 100644
--- a/arch/arm/mach-imx/devices-imx35.h
+++ b/arch/arm/mach-imx/devices-imx35.h
@@ -17,10 +17,10 @@ extern const struct imx_fsl_usb2_udc_data imx35_fsl_usb2_udc_data;
17 imx_add_fsl_usb2_udc(&imx35_fsl_usb2_udc_data, pdata) 17 imx_add_fsl_usb2_udc(&imx35_fsl_usb2_udc_data, pdata)
18 18
19extern const struct imx_flexcan_data imx35_flexcan_data[]; 19extern const struct imx_flexcan_data imx35_flexcan_data[];
20#define imx35_add_flexcan(id, pdata) \ 20#define imx35_add_flexcan(id) \
21 imx_add_flexcan(&imx35_flexcan_data[id], pdata) 21 imx_add_flexcan(&imx35_flexcan_data[id])
22#define imx35_add_flexcan0(pdata) imx35_add_flexcan(0, pdata) 22#define imx35_add_flexcan0() imx35_add_flexcan(0)
23#define imx35_add_flexcan1(pdata) imx35_add_flexcan(1, pdata) 23#define imx35_add_flexcan1() imx35_add_flexcan(1)
24 24
25extern const struct imx_imx2_wdt_data imx35_imx2_wdt_data; 25extern const struct imx_imx2_wdt_data imx35_imx2_wdt_data;
26#define imx35_add_imx2_wdt() \ 26#define imx35_add_imx2_wdt() \
diff --git a/arch/arm/mach-imx/devices/Kconfig b/arch/arm/mach-imx/devices/Kconfig
index 3dd2b1b041d1..68c74fb0373c 100644
--- a/arch/arm/mach-imx/devices/Kconfig
+++ b/arch/arm/mach-imx/devices/Kconfig
@@ -4,7 +4,6 @@ config IMX_HAVE_PLATFORM_FEC
4 4
5config IMX_HAVE_PLATFORM_FLEXCAN 5config IMX_HAVE_PLATFORM_FLEXCAN
6 bool 6 bool
7 select HAVE_CAN_FLEXCAN if CAN
8 7
9config IMX_HAVE_PLATFORM_FSL_USB2_UDC 8config IMX_HAVE_PLATFORM_FSL_USB2_UDC
10 bool 9 bool
diff --git a/arch/arm/mach-imx/devices/devices-common.h b/arch/arm/mach-imx/devices/devices-common.h
index 453e20bc2657..c13b76b9f6b3 100644
--- a/arch/arm/mach-imx/devices/devices-common.h
+++ b/arch/arm/mach-imx/devices/devices-common.h
@@ -50,7 +50,6 @@ struct platform_device *__init imx_add_fec(
50 const struct imx_fec_data *data, 50 const struct imx_fec_data *data,
51 const struct fec_platform_data *pdata); 51 const struct fec_platform_data *pdata);
52 52
53#include <linux/can/platform/flexcan.h>
54struct imx_flexcan_data { 53struct imx_flexcan_data {
55 int id; 54 int id;
56 resource_size_t iobase; 55 resource_size_t iobase;
@@ -58,8 +57,7 @@ struct imx_flexcan_data {
58 resource_size_t irq; 57 resource_size_t irq;
59}; 58};
60struct platform_device *__init imx_add_flexcan( 59struct platform_device *__init imx_add_flexcan(
61 const struct imx_flexcan_data *data, 60 const struct imx_flexcan_data *data);
62 const struct flexcan_platform_data *pdata);
63 61
64#include <linux/fsl_devices.h> 62#include <linux/fsl_devices.h>
65struct imx_fsl_usb2_udc_data { 63struct imx_fsl_usb2_udc_data {
diff --git a/arch/arm/mach-imx/devices/platform-flexcan.c b/arch/arm/mach-imx/devices/platform-flexcan.c
index 1078bf0a94ef..55d61eaf63c6 100644
--- a/arch/arm/mach-imx/devices/platform-flexcan.c
+++ b/arch/arm/mach-imx/devices/platform-flexcan.c
@@ -38,8 +38,7 @@ const struct imx_flexcan_data imx35_flexcan_data[] __initconst = {
38#endif /* ifdef CONFIG_SOC_IMX35 */ 38#endif /* ifdef CONFIG_SOC_IMX35 */
39 39
40struct platform_device *__init imx_add_flexcan( 40struct platform_device *__init imx_add_flexcan(
41 const struct imx_flexcan_data *data, 41 const struct imx_flexcan_data *data)
42 const struct flexcan_platform_data *pdata)
43{ 42{
44 struct resource res[] = { 43 struct resource res[] = {
45 { 44 {
@@ -54,5 +53,5 @@ struct platform_device *__init imx_add_flexcan(
54 }; 53 };
55 54
56 return imx_add_platform_device("flexcan", data->id, 55 return imx_add_platform_device("flexcan", data->id,
57 res, ARRAY_SIZE(res), pdata, sizeof(*pdata)); 56 res, ARRAY_SIZE(res), NULL, 0);
58} 57}
diff --git a/arch/arm/mach-imx/eukrea_mbimxsd25-baseboard.c b/arch/arm/mach-imx/eukrea_mbimxsd25-baseboard.c
index e2b70f4c1a2c..e77cc3af6db2 100644
--- a/arch/arm/mach-imx/eukrea_mbimxsd25-baseboard.c
+++ b/arch/arm/mach-imx/eukrea_mbimxsd25-baseboard.c
@@ -279,7 +279,7 @@ void __init eukrea_mbimxsd25_baseboard_init(void)
279 imx25_add_imx_fb(&eukrea_mximxsd_fb_pdata); 279 imx25_add_imx_fb(&eukrea_mximxsd_fb_pdata);
280 imx25_add_imx_ssi(0, &eukrea_mbimxsd_ssi_pdata); 280 imx25_add_imx_ssi(0, &eukrea_mbimxsd_ssi_pdata);
281 281
282 imx25_add_flexcan1(NULL); 282 imx25_add_flexcan1();
283 imx25_add_sdhci_esdhc_imx(0, &sd1_pdata); 283 imx25_add_sdhci_esdhc_imx(0, &sd1_pdata);
284 284
285 gpio_request(GPIO_LED1, "LED1"); 285 gpio_request(GPIO_LED1, "LED1");
diff --git a/arch/arm/mach-imx/eukrea_mbimxsd35-baseboard.c b/arch/arm/mach-imx/eukrea_mbimxsd35-baseboard.c
index 5a2d5ef12dd5..14d6c8249b76 100644
--- a/arch/arm/mach-imx/eukrea_mbimxsd35-baseboard.c
+++ b/arch/arm/mach-imx/eukrea_mbimxsd35-baseboard.c
@@ -287,7 +287,7 @@ void __init eukrea_mbimxsd35_baseboard_init(void)
287 287
288 imx35_add_imx_ssi(0, &eukrea_mbimxsd_ssi_pdata); 288 imx35_add_imx_ssi(0, &eukrea_mbimxsd_ssi_pdata);
289 289
290 imx35_add_flexcan1(NULL); 290 imx35_add_flexcan1();
291 imx35_add_sdhci_esdhc_imx(0, &sd1_pdata); 291 imx35_add_sdhci_esdhc_imx(0, &sd1_pdata);
292 292
293 gpio_request(GPIO_LED1, "LED1"); 293 gpio_request(GPIO_LED1, "LED1");
diff --git a/arch/arm/mach-imx/hardware.h b/arch/arm/mach-imx/hardware.h
index 356131f7b591..a3b0b04b45c9 100644
--- a/arch/arm/mach-imx/hardware.h
+++ b/arch/arm/mach-imx/hardware.h
@@ -20,6 +20,7 @@
20#ifndef __ASM_ARCH_MXC_HARDWARE_H__ 20#ifndef __ASM_ARCH_MXC_HARDWARE_H__
21#define __ASM_ARCH_MXC_HARDWARE_H__ 21#define __ASM_ARCH_MXC_HARDWARE_H__
22 22
23#include <asm/io.h>
23#include <asm/sizes.h> 24#include <asm/sizes.h>
24 25
25#define addr_in_module(addr, mod) \ 26#define addr_in_module(addr, mod) \
diff --git a/arch/arm/mach-imx/imx25-dt.c b/arch/arm/mach-imx/imx25-dt.c
index 82348391582a..3e1ec5ffe630 100644
--- a/arch/arm/mach-imx/imx25-dt.c
+++ b/arch/arm/mach-imx/imx25-dt.c
@@ -19,6 +19,8 @@
19 19
20static void __init imx25_dt_init(void) 20static void __init imx25_dt_init(void)
21{ 21{
22 mxc_arch_reset_init_dt();
23
22 of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); 24 of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
23} 25}
24 26
diff --git a/arch/arm/mach-imx/imx27-dt.c b/arch/arm/mach-imx/imx27-dt.c
index 4aaead0a77ff..4e235ecb4021 100644
--- a/arch/arm/mach-imx/imx27-dt.c
+++ b/arch/arm/mach-imx/imx27-dt.c
@@ -22,6 +22,8 @@ static void __init imx27_dt_init(void)
22{ 22{
23 struct platform_device_info devinfo = { .name = "cpufreq-cpu0", }; 23 struct platform_device_info devinfo = { .name = "cpufreq-cpu0", };
24 24
25 mxc_arch_reset_init_dt();
26
25 of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); 27 of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
26 28
27 platform_device_register_full(&devinfo); 29 platform_device_register_full(&devinfo);
diff --git a/arch/arm/mach-imx/imx31-dt.c b/arch/arm/mach-imx/imx31-dt.c
index 67de611e29ab..818a1cc2fe45 100644
--- a/arch/arm/mach-imx/imx31-dt.c
+++ b/arch/arm/mach-imx/imx31-dt.c
@@ -20,6 +20,8 @@
20 20
21static void __init imx31_dt_init(void) 21static void __init imx31_dt_init(void)
22{ 22{
23 mxc_arch_reset_init_dt();
24
23 of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); 25 of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
24} 26}
25 27
diff --git a/arch/arm/mach-imx/imx51-dt.c b/arch/arm/mach-imx/imx51-dt.c
index ab24cc322111..53e43e579dd7 100644
--- a/arch/arm/mach-imx/imx51-dt.c
+++ b/arch/arm/mach-imx/imx51-dt.c
@@ -23,6 +23,8 @@ static void __init imx51_dt_init(void)
23{ 23{
24 struct platform_device_info devinfo = { .name = "cpufreq-cpu0", }; 24 struct platform_device_info devinfo = { .name = "cpufreq-cpu0", };
25 25
26 mxc_arch_reset_init_dt();
27
26 of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); 28 of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
27 platform_device_register_full(&devinfo); 29 platform_device_register_full(&devinfo);
28} 30}
diff --git a/arch/arm/mach-imx/irq-common.c b/arch/arm/mach-imx/irq-common.c
index 4b34f52dc46b..0a920d184867 100644
--- a/arch/arm/mach-imx/irq-common.c
+++ b/arch/arm/mach-imx/irq-common.c
@@ -18,6 +18,7 @@
18 18
19#include <linux/module.h> 19#include <linux/module.h>
20#include <linux/irq.h> 20#include <linux/irq.h>
21#include <linux/platform_data/asoc-imx-ssi.h>
21 22
22#include "irq-common.h" 23#include "irq-common.h"
23 24
diff --git a/arch/arm/mach-imx/mach-imx53.c b/arch/arm/mach-imx/mach-imx53.c
index f579c616feed..98c58944015a 100644
--- a/arch/arm/mach-imx/mach-imx53.c
+++ b/arch/arm/mach-imx/mach-imx53.c
@@ -21,25 +21,12 @@
21#include <asm/mach/time.h> 21#include <asm/mach/time.h>
22 22
23#include "common.h" 23#include "common.h"
24#include "hardware.h"
24#include "mx53.h" 25#include "mx53.h"
25 26
26static void __init imx53_qsb_init(void)
27{
28 struct clk *clk;
29
30 clk = clk_get_sys(NULL, "ssi_ext1");
31 if (IS_ERR(clk)) {
32 pr_err("failed to get clk ssi_ext1\n");
33 return;
34 }
35
36 clk_register_clkdev(clk, NULL, "0-000a");
37}
38
39static void __init imx53_dt_init(void) 27static void __init imx53_dt_init(void)
40{ 28{
41 if (of_machine_is_compatible("fsl,imx53-qsb")) 29 mxc_arch_reset_init_dt();
42 imx53_qsb_init();
43 30
44 of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); 31 of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
45} 32}
diff --git a/arch/arm/mach-imx/mach-imx6q.c b/arch/arm/mach-imx/mach-imx6q.c
index 5536fd81379a..7be13f8e69a0 100644
--- a/arch/arm/mach-imx/mach-imx6q.c
+++ b/arch/arm/mach-imx/mach-imx6q.c
@@ -11,6 +11,7 @@
11 */ 11 */
12 12
13#include <linux/clk.h> 13#include <linux/clk.h>
14#include <linux/clk-provider.h>
14#include <linux/clkdev.h> 15#include <linux/clkdev.h>
15#include <linux/clocksource.h> 16#include <linux/clocksource.h>
16#include <linux/cpu.h> 17#include <linux/cpu.h>
@@ -26,6 +27,7 @@
26#include <linux/of_platform.h> 27#include <linux/of_platform.h>
27#include <linux/opp.h> 28#include <linux/opp.h>
28#include <linux/phy.h> 29#include <linux/phy.h>
30#include <linux/reboot.h>
29#include <linux/regmap.h> 31#include <linux/regmap.h>
30#include <linux/micrel_phy.h> 32#include <linux/micrel_phy.h>
31#include <linux/mfd/syscon.h> 33#include <linux/mfd/syscon.h>
@@ -66,7 +68,7 @@ static void __init imx6q_init_revision(void)
66 mxc_set_cpu_type(rev >> 16 & 0xff); 68 mxc_set_cpu_type(rev >> 16 & 0xff);
67} 69}
68 70
69static void imx6q_restart(char mode, const char *cmd) 71static void imx6q_restart(enum reboot_mode mode, const char *cmd)
70{ 72{
71 struct device_node *np; 73 struct device_node *np;
72 void __iomem *wdog_base; 74 void __iomem *wdog_base;
@@ -145,6 +147,45 @@ static void __init imx6q_sabrelite_init(void)
145 imx6q_sabrelite_cko1_setup(); 147 imx6q_sabrelite_cko1_setup();
146} 148}
147 149
150static void __init imx6q_sabresd_cko1_setup(void)
151{
152 struct clk *cko1_sel, *pll4, *pll4_post, *cko1;
153 unsigned long rate;
154
155 cko1_sel = clk_get_sys(NULL, "cko1_sel");
156 pll4 = clk_get_sys(NULL, "pll4_audio");
157 pll4_post = clk_get_sys(NULL, "pll4_post_div");
158 cko1 = clk_get_sys(NULL, "cko1");
159 if (IS_ERR(cko1_sel) || IS_ERR(pll4)
160 || IS_ERR(pll4_post) || IS_ERR(cko1)) {
161 pr_err("cko1 setup failed!\n");
162 goto put_clk;
163 }
164 /*
165 * Setting pll4 at 768MHz (24MHz * 32)
166 * So its child clock can get 24MHz easily
167 */
168 clk_set_rate(pll4, 768000000);
169
170 clk_set_parent(cko1_sel, pll4_post);
171 rate = clk_round_rate(cko1, 24000000);
172 clk_set_rate(cko1, rate);
173put_clk:
174 if (!IS_ERR(cko1_sel))
175 clk_put(cko1_sel);
176 if (!IS_ERR(pll4_post))
177 clk_put(pll4_post);
178 if (!IS_ERR(pll4))
179 clk_put(pll4);
180 if (!IS_ERR(cko1))
181 clk_put(cko1);
182}
183
184static void __init imx6q_sabresd_init(void)
185{
186 imx6q_sabresd_cko1_setup();
187}
188
148static void __init imx6q_1588_init(void) 189static void __init imx6q_1588_init(void)
149{ 190{
150 struct regmap *gpr; 191 struct regmap *gpr;
@@ -165,6 +206,9 @@ static void __init imx6q_init_machine(void)
165{ 206{
166 if (of_machine_is_compatible("fsl,imx6q-sabrelite")) 207 if (of_machine_is_compatible("fsl,imx6q-sabrelite"))
167 imx6q_sabrelite_init(); 208 imx6q_sabrelite_init();
209 else if (of_machine_is_compatible("fsl,imx6q-sabresd") ||
210 of_machine_is_compatible("fsl,imx6dl-sabresd"))
211 imx6q_sabresd_init();
168 212
169 of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); 213 of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
170 214
@@ -253,10 +297,44 @@ static void __init imx6q_map_io(void)
253 imx_scu_map_io(); 297 imx_scu_map_io();
254} 298}
255 299
300#ifdef CONFIG_CACHE_L2X0
301static void __init imx6q_init_l2cache(void)
302{
303 void __iomem *l2x0_base;
304 struct device_node *np;
305 unsigned int val;
306
307 np = of_find_compatible_node(NULL, NULL, "arm,pl310-cache");
308 if (!np)
309 goto out;
310
311 l2x0_base = of_iomap(np, 0);
312 if (!l2x0_base) {
313 of_node_put(np);
314 goto out;
315 }
316
317 /* Configure the L2 PREFETCH and POWER registers */
318 val = readl_relaxed(l2x0_base + L2X0_PREFETCH_CTRL);
319 val |= 0x70800000;
320 writel_relaxed(val, l2x0_base + L2X0_PREFETCH_CTRL);
321 val = L2X0_DYNAMIC_CLK_GATING_EN | L2X0_STNDBY_MODE_EN;
322 writel_relaxed(val, l2x0_base + L2X0_POWER_CTRL);
323
324 iounmap(l2x0_base);
325 of_node_put(np);
326
327out:
328 l2x0_of_init(0, ~0UL);
329}
330#else
331static inline void imx6q_init_l2cache(void) {}
332#endif
333
256static void __init imx6q_init_irq(void) 334static void __init imx6q_init_irq(void)
257{ 335{
258 imx6q_init_revision(); 336 imx6q_init_revision();
259 l2x0_of_init(0, ~0UL); 337 imx6q_init_l2cache();
260 imx_src_init(); 338 imx_src_init();
261 imx_gpc_init(); 339 imx_gpc_init();
262 irqchip_init(); 340 irqchip_init();
@@ -264,7 +342,7 @@ static void __init imx6q_init_irq(void)
264 342
265static void __init imx6q_timer_init(void) 343static void __init imx6q_timer_init(void)
266{ 344{
267 mx6q_clocks_init(); 345 of_clk_init(NULL);
268 clocksource_of_init(); 346 clocksource_of_init();
269 imx_print_silicon_rev(cpu_is_imx6dl() ? "i.MX6DL" : "i.MX6Q", 347 imx_print_silicon_rev(cpu_is_imx6dl() ? "i.MX6DL" : "i.MX6Q",
270 imx6q_revision()); 348 imx6q_revision());
diff --git a/arch/arm/mach-imx/mach-imx6sl.c b/arch/arm/mach-imx/mach-imx6sl.c
new file mode 100644
index 000000000000..132db2609507
--- /dev/null
+++ b/arch/arm/mach-imx/mach-imx6sl.c
@@ -0,0 +1,52 @@
1/*
2 * Copyright 2013 Freescale Semiconductor, Inc.
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
10#include <linux/clk-provider.h>
11#include <linux/irqchip.h>
12#include <linux/of.h>
13#include <linux/of_platform.h>
14#include <asm/hardware/cache-l2x0.h>
15#include <asm/mach/arch.h>
16#include <asm/mach/map.h>
17
18#include "common.h"
19
20static void __init imx6sl_init_machine(void)
21{
22 mxc_arch_reset_init_dt();
23
24 of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
25}
26
27static void __init imx6sl_init_irq(void)
28{
29 l2x0_of_init(0, ~0UL);
30 imx_src_init();
31 imx_gpc_init();
32 irqchip_init();
33}
34
35static void __init imx6sl_timer_init(void)
36{
37 of_clk_init(NULL);
38}
39
40static const char *imx6sl_dt_compat[] __initdata = {
41 "fsl,imx6sl",
42 NULL,
43};
44
45DT_MACHINE_START(IMX6SL, "Freescale i.MX6 SoloLite (Device Tree)")
46 .map_io = debug_ll_io_init,
47 .init_irq = imx6sl_init_irq,
48 .init_time = imx6sl_timer_init,
49 .init_machine = imx6sl_init_machine,
50 .dt_compat = imx6sl_dt_compat,
51 .restart = mxc_restart,
52MACHINE_END
diff --git a/arch/arm/mach-imx/mach-mx25_3ds.c b/arch/arm/mach-imx/mach-mx25_3ds.c
index 8bcda688a006..13490c203050 100644
--- a/arch/arm/mach-imx/mach-mx25_3ds.c
+++ b/arch/arm/mach-imx/mach-mx25_3ds.c
@@ -249,7 +249,7 @@ static void __init mx25pdk_init(void)
249 imx25_add_imx_i2c0(&mx25_3ds_i2c0_data); 249 imx25_add_imx_i2c0(&mx25_3ds_i2c0_data);
250 250
251 gpio_request_one(MX25PDK_CAN_PWDN, GPIOF_OUT_INIT_LOW, "can-pwdn"); 251 gpio_request_one(MX25PDK_CAN_PWDN, GPIOF_OUT_INIT_LOW, "can-pwdn");
252 imx25_add_flexcan0(NULL); 252 imx25_add_flexcan0();
253} 253}
254 254
255static void __init mx25pdk_timer_init(void) 255static void __init mx25pdk_timer_init(void)
diff --git a/arch/arm/mach-imx/mach-mx31moboard.c b/arch/arm/mach-imx/mach-mx31moboard.c
index dae4cd7be040..6f424eced181 100644
--- a/arch/arm/mach-imx/mach-mx31moboard.c
+++ b/arch/arm/mach-imx/mach-mx31moboard.c
@@ -268,10 +268,11 @@ static struct mc13xxx_led_platform_data moboard_led[] = {
268static struct mc13xxx_leds_platform_data moboard_leds = { 268static struct mc13xxx_leds_platform_data moboard_leds = {
269 .num_leds = ARRAY_SIZE(moboard_led), 269 .num_leds = ARRAY_SIZE(moboard_led),
270 .led = moboard_led, 270 .led = moboard_led,
271 .flags = MC13783_LED_SLEWLIMTC, 271 .led_control[0] = MC13783_LED_C0_ENABLE | MC13783_LED_C0_ABMODE(0),
272 .abmode = MC13783_LED_AB_DISABLED, 272 .led_control[1] = MC13783_LED_C1_SLEWLIM,
273 .tc1_period = MC13783_LED_PERIOD_10MS, 273 .led_control[2] = MC13783_LED_C2_SLEWLIM,
274 .tc2_period = MC13783_LED_PERIOD_10MS, 274 .led_control[3] = MC13783_LED_C3_PERIOD(0),
275 .led_control[4] = MC13783_LED_C3_PERIOD(0),
275}; 276};
276 277
277static struct mc13xxx_buttons_platform_data moboard_buttons = { 278static struct mc13xxx_buttons_platform_data moboard_buttons = {
diff --git a/arch/arm/mach-imx/mach-pca100.c b/arch/arm/mach-imx/mach-pca100.c
index b8b15bb1ffdf..19bb6441a7d4 100644
--- a/arch/arm/mach-imx/mach-pca100.c
+++ b/arch/arm/mach-imx/mach-pca100.c
@@ -398,8 +398,8 @@ static void __init pca100_init(void)
398 imx27_add_fsl_usb2_udc(&otg_device_pdata); 398 imx27_add_fsl_usb2_udc(&otg_device_pdata);
399 } 399 }
400 400
401 usbh2_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops, 401 usbh2_pdata.otg = imx_otg_ulpi_create(
402 ULPI_OTG_DRVVBUS | ULPI_OTG_DRVVBUS_EXT); 402 ULPI_OTG_DRVVBUS | ULPI_OTG_DRVVBUS_EXT);
403 403
404 if (usbh2_pdata.otg) 404 if (usbh2_pdata.otg)
405 imx27_add_mxc_ehci_hs(2, &usbh2_pdata); 405 imx27_add_mxc_ehci_hs(2, &usbh2_pdata);
diff --git a/arch/arm/mach-imx/mach-pcm043.c b/arch/arm/mach-imx/mach-pcm043.c
index 8ed533f0f8ca..b726cb1c5fdd 100644
--- a/arch/arm/mach-imx/mach-pcm043.c
+++ b/arch/arm/mach-imx/mach-pcm043.c
@@ -385,7 +385,7 @@ static void __init pcm043_init(void)
385 if (!otg_mode_host) 385 if (!otg_mode_host)
386 imx35_add_fsl_usb2_udc(&otg_device_pdata); 386 imx35_add_fsl_usb2_udc(&otg_device_pdata);
387 387
388 imx35_add_flexcan1(NULL); 388 imx35_add_flexcan1();
389 imx35_add_sdhci_esdhc_imx(0, &sd1_pdata); 389 imx35_add_sdhci_esdhc_imx(0, &sd1_pdata);
390} 390}
391 391
diff --git a/arch/arm/mach-imx/mach-vf610.c b/arch/arm/mach-imx/mach-vf610.c
new file mode 100644
index 000000000000..816991deb9b8
--- /dev/null
+++ b/arch/arm/mach-imx/mach-vf610.c
@@ -0,0 +1,48 @@
1/*
2 * Copyright 2012-2013 Freescale Semiconductor, Inc.
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
10#include <linux/of_platform.h>
11#include <linux/clocksource.h>
12#include <linux/irqchip.h>
13#include <linux/clk-provider.h>
14#include <asm/mach/arch.h>
15#include <asm/hardware/cache-l2x0.h>
16
17#include "common.h"
18
19static void __init vf610_init_machine(void)
20{
21 mxc_arch_reset_init_dt();
22 of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
23}
24
25static void __init vf610_init_irq(void)
26{
27 l2x0_of_init(0, ~0UL);
28 irqchip_init();
29}
30
31static void __init vf610_init_time(void)
32{
33 of_clk_init(NULL);
34 clocksource_of_init();
35}
36
37static const char *vf610_dt_compat[] __initdata = {
38 "fsl,vf610",
39 NULL,
40};
41
42DT_MACHINE_START(VYBRID_VF610, "Freescale Vybrid VF610 (Device Tree)")
43 .init_irq = vf610_init_irq,
44 .init_time = vf610_init_time,
45 .init_machine = vf610_init_machine,
46 .dt_compat = vf610_dt_compat,
47 .restart = mxc_restart,
48MACHINE_END
diff --git a/arch/arm/mach-imx/mm-imx1.c b/arch/arm/mach-imx/mm-imx1.c
index 3c609c52d3eb..e065fedb3ad4 100644
--- a/arch/arm/mach-imx/mm-imx1.c
+++ b/arch/arm/mach-imx/mm-imx1.c
@@ -39,7 +39,6 @@ void __init mx1_map_io(void)
39void __init imx1_init_early(void) 39void __init imx1_init_early(void)
40{ 40{
41 mxc_set_cpu_type(MXC_CPU_MX1); 41 mxc_set_cpu_type(MXC_CPU_MX1);
42 mxc_arch_reset_init(MX1_IO_ADDRESS(MX1_WDT_BASE_ADDR));
43 imx_iomuxv1_init(MX1_IO_ADDRESS(MX1_GPIO_BASE_ADDR), 42 imx_iomuxv1_init(MX1_IO_ADDRESS(MX1_GPIO_BASE_ADDR),
44 MX1_NUM_GPIO_PORT); 43 MX1_NUM_GPIO_PORT);
45} 44}
@@ -51,6 +50,7 @@ void __init mx1_init_irq(void)
51 50
52void __init imx1_soc_init(void) 51void __init imx1_soc_init(void)
53{ 52{
53 mxc_arch_reset_init(MX1_IO_ADDRESS(MX1_WDT_BASE_ADDR));
54 mxc_device_init(); 54 mxc_device_init();
55 55
56 mxc_register_gpio("imx1-gpio", 0, MX1_GPIO1_BASE_ADDR, SZ_256, 56 mxc_register_gpio("imx1-gpio", 0, MX1_GPIO1_BASE_ADDR, SZ_256,
diff --git a/arch/arm/mach-imx/mm-imx21.c b/arch/arm/mach-imx/mm-imx21.c
index d8ccd3a8ec53..2e91ab2ca378 100644
--- a/arch/arm/mach-imx/mm-imx21.c
+++ b/arch/arm/mach-imx/mm-imx21.c
@@ -66,7 +66,6 @@ void __init mx21_map_io(void)
66void __init imx21_init_early(void) 66void __init imx21_init_early(void)
67{ 67{
68 mxc_set_cpu_type(MXC_CPU_MX21); 68 mxc_set_cpu_type(MXC_CPU_MX21);
69 mxc_arch_reset_init(MX21_IO_ADDRESS(MX21_WDOG_BASE_ADDR));
70 imx_iomuxv1_init(MX21_IO_ADDRESS(MX21_GPIO_BASE_ADDR), 69 imx_iomuxv1_init(MX21_IO_ADDRESS(MX21_GPIO_BASE_ADDR),
71 MX21_NUM_GPIO_PORT); 70 MX21_NUM_GPIO_PORT);
72} 71}
@@ -82,6 +81,7 @@ static const struct resource imx21_audmux_res[] __initconst = {
82 81
83void __init imx21_soc_init(void) 82void __init imx21_soc_init(void)
84{ 83{
84 mxc_arch_reset_init(MX21_IO_ADDRESS(MX21_WDOG_BASE_ADDR));
85 mxc_device_init(); 85 mxc_device_init();
86 86
87 mxc_register_gpio("imx21-gpio", 0, MX21_GPIO1_BASE_ADDR, SZ_256, MX21_INT_GPIO, 0); 87 mxc_register_gpio("imx21-gpio", 0, MX21_GPIO1_BASE_ADDR, SZ_256, MX21_INT_GPIO, 0);
diff --git a/arch/arm/mach-imx/mm-imx25.c b/arch/arm/mach-imx/mm-imx25.c
index 9357707bb7af..e065c117f5a6 100644
--- a/arch/arm/mach-imx/mm-imx25.c
+++ b/arch/arm/mach-imx/mm-imx25.c
@@ -54,7 +54,6 @@ void __init imx25_init_early(void)
54{ 54{
55 mxc_set_cpu_type(MXC_CPU_MX25); 55 mxc_set_cpu_type(MXC_CPU_MX25);
56 mxc_iomux_v3_init(MX25_IO_ADDRESS(MX25_IOMUXC_BASE_ADDR)); 56 mxc_iomux_v3_init(MX25_IO_ADDRESS(MX25_IOMUXC_BASE_ADDR));
57 mxc_arch_reset_init(MX25_IO_ADDRESS(MX25_WDOG_BASE_ADDR));
58} 57}
59 58
60void __init mx25_init_irq(void) 59void __init mx25_init_irq(void)
@@ -89,6 +88,7 @@ static const struct resource imx25_audmux_res[] __initconst = {
89 88
90void __init imx25_soc_init(void) 89void __init imx25_soc_init(void)
91{ 90{
91 mxc_arch_reset_init(MX25_IO_ADDRESS(MX25_WDOG_BASE_ADDR));
92 mxc_device_init(); 92 mxc_device_init();
93 93
94 /* i.mx25 has the i.mx35 type gpio */ 94 /* i.mx25 has the i.mx35 type gpio */
diff --git a/arch/arm/mach-imx/mm-imx27.c b/arch/arm/mach-imx/mm-imx27.c
index 4f1be65a7b5f..7d82a5a5b16b 100644
--- a/arch/arm/mach-imx/mm-imx27.c
+++ b/arch/arm/mach-imx/mm-imx27.c
@@ -66,7 +66,6 @@ void __init mx27_map_io(void)
66void __init imx27_init_early(void) 66void __init imx27_init_early(void)
67{ 67{
68 mxc_set_cpu_type(MXC_CPU_MX27); 68 mxc_set_cpu_type(MXC_CPU_MX27);
69 mxc_arch_reset_init(MX27_IO_ADDRESS(MX27_WDOG_BASE_ADDR));
70 imx_iomuxv1_init(MX27_IO_ADDRESS(MX27_GPIO_BASE_ADDR), 69 imx_iomuxv1_init(MX27_IO_ADDRESS(MX27_GPIO_BASE_ADDR),
71 MX27_NUM_GPIO_PORT); 70 MX27_NUM_GPIO_PORT);
72} 71}
@@ -82,6 +81,7 @@ static const struct resource imx27_audmux_res[] __initconst = {
82 81
83void __init imx27_soc_init(void) 82void __init imx27_soc_init(void)
84{ 83{
84 mxc_arch_reset_init(MX27_IO_ADDRESS(MX27_WDOG_BASE_ADDR));
85 mxc_device_init(); 85 mxc_device_init();
86 86
87 /* i.mx27 has the i.mx21 type gpio */ 87 /* i.mx27 has the i.mx21 type gpio */
diff --git a/arch/arm/mach-imx/mm-imx3.c b/arch/arm/mach-imx/mm-imx3.c
index e0e69a682174..0884ca90d15a 100644
--- a/arch/arm/mach-imx/mm-imx3.c
+++ b/arch/arm/mach-imx/mm-imx3.c
@@ -65,7 +65,7 @@ static void imx3_idle(void)
65 : "=r" (reg)); 65 : "=r" (reg));
66} 66}
67 67
68static void __iomem *imx3_ioremap_caller(unsigned long phys_addr, size_t size, 68static void __iomem *imx3_ioremap_caller(phys_addr_t phys_addr, size_t size,
69 unsigned int mtype, void *caller) 69 unsigned int mtype, void *caller)
70{ 70{
71 if (mtype == MT_DEVICE) { 71 if (mtype == MT_DEVICE) {
@@ -138,7 +138,6 @@ void __init mx31_map_io(void)
138void __init imx31_init_early(void) 138void __init imx31_init_early(void)
139{ 139{
140 mxc_set_cpu_type(MXC_CPU_MX31); 140 mxc_set_cpu_type(MXC_CPU_MX31);
141 mxc_arch_reset_init(MX31_IO_ADDRESS(MX31_WDOG_BASE_ADDR));
142 arch_ioremap_caller = imx3_ioremap_caller; 141 arch_ioremap_caller = imx3_ioremap_caller;
143 arm_pm_idle = imx3_idle; 142 arm_pm_idle = imx3_idle;
144 mx3_ccm_base = MX31_IO_ADDRESS(MX31_CCM_BASE_ADDR); 143 mx3_ccm_base = MX31_IO_ADDRESS(MX31_CCM_BASE_ADDR);
@@ -174,6 +173,7 @@ void __init imx31_soc_init(void)
174 173
175 imx3_init_l2x0(); 174 imx3_init_l2x0();
176 175
176 mxc_arch_reset_init(MX31_IO_ADDRESS(MX31_WDOG_BASE_ADDR));
177 mxc_device_init(); 177 mxc_device_init();
178 178
179 mxc_register_gpio("imx31-gpio", 0, MX31_GPIO1_BASE_ADDR, SZ_16K, MX31_INT_GPIO1, 0); 179 mxc_register_gpio("imx31-gpio", 0, MX31_GPIO1_BASE_ADDR, SZ_16K, MX31_INT_GPIO1, 0);
@@ -216,7 +216,6 @@ void __init imx35_init_early(void)
216{ 216{
217 mxc_set_cpu_type(MXC_CPU_MX35); 217 mxc_set_cpu_type(MXC_CPU_MX35);
218 mxc_iomux_v3_init(MX35_IO_ADDRESS(MX35_IOMUXC_BASE_ADDR)); 218 mxc_iomux_v3_init(MX35_IO_ADDRESS(MX35_IOMUXC_BASE_ADDR));
219 mxc_arch_reset_init(MX35_IO_ADDRESS(MX35_WDOG_BASE_ADDR));
220 arm_pm_idle = imx3_idle; 219 arm_pm_idle = imx3_idle;
221 arch_ioremap_caller = imx3_ioremap_caller; 220 arch_ioremap_caller = imx3_ioremap_caller;
222 mx3_ccm_base = MX35_IO_ADDRESS(MX35_CCM_BASE_ADDR); 221 mx3_ccm_base = MX35_IO_ADDRESS(MX35_CCM_BASE_ADDR);
@@ -272,6 +271,7 @@ void __init imx35_soc_init(void)
272 271
273 imx3_init_l2x0(); 272 imx3_init_l2x0();
274 273
274 mxc_arch_reset_init(MX35_IO_ADDRESS(MX35_WDOG_BASE_ADDR));
275 mxc_device_init(); 275 mxc_device_init();
276 276
277 mxc_register_gpio("imx35-gpio", 0, MX35_GPIO1_BASE_ADDR, SZ_16K, MX35_INT_GPIO1, 0); 277 mxc_register_gpio("imx35-gpio", 0, MX35_GPIO1_BASE_ADDR, SZ_16K, MX35_INT_GPIO1, 0);
diff --git a/arch/arm/mach-imx/mm-imx5.c b/arch/arm/mach-imx/mm-imx5.c
index b7c4e70e5081..cf193d87274a 100644
--- a/arch/arm/mach-imx/mm-imx5.c
+++ b/arch/arm/mach-imx/mm-imx5.c
@@ -83,7 +83,6 @@ void __init imx51_init_early(void)
83 imx51_ipu_mipi_setup(); 83 imx51_ipu_mipi_setup();
84 mxc_set_cpu_type(MXC_CPU_MX51); 84 mxc_set_cpu_type(MXC_CPU_MX51);
85 mxc_iomux_v3_init(MX51_IO_ADDRESS(MX51_IOMUXC_BASE_ADDR)); 85 mxc_iomux_v3_init(MX51_IO_ADDRESS(MX51_IOMUXC_BASE_ADDR));
86 mxc_arch_reset_init(MX51_IO_ADDRESS(MX51_WDOG1_BASE_ADDR));
87 imx_src_init(); 86 imx_src_init();
88} 87}
89 88
@@ -91,7 +90,6 @@ void __init imx53_init_early(void)
91{ 90{
92 mxc_set_cpu_type(MXC_CPU_MX53); 91 mxc_set_cpu_type(MXC_CPU_MX53);
93 mxc_iomux_v3_init(MX53_IO_ADDRESS(MX53_IOMUXC_BASE_ADDR)); 92 mxc_iomux_v3_init(MX53_IO_ADDRESS(MX53_IOMUXC_BASE_ADDR));
94 mxc_arch_reset_init(MX53_IO_ADDRESS(MX53_WDOG1_BASE_ADDR));
95 imx_src_init(); 93 imx_src_init();
96} 94}
97 95
@@ -129,6 +127,7 @@ static const struct resource imx51_audmux_res[] __initconst = {
129 127
130void __init imx51_soc_init(void) 128void __init imx51_soc_init(void)
131{ 129{
130 mxc_arch_reset_init(MX51_IO_ADDRESS(MX51_WDOG1_BASE_ADDR));
132 mxc_device_init(); 131 mxc_device_init();
133 132
134 /* i.mx51 has the i.mx35 type gpio */ 133 /* i.mx51 has the i.mx35 type gpio */
diff --git a/arch/arm/mach-imx/mx27.h b/arch/arm/mach-imx/mx27.h
index e074616d54ca..8a65f192e7f3 100644
--- a/arch/arm/mach-imx/mx27.h
+++ b/arch/arm/mach-imx/mx27.h
@@ -135,7 +135,7 @@
135#define MX27_INT_GPT4 (NR_IRQS_LEGACY + 4) 135#define MX27_INT_GPT4 (NR_IRQS_LEGACY + 4)
136#define MX27_INT_RTIC (NR_IRQS_LEGACY + 5) 136#define MX27_INT_RTIC (NR_IRQS_LEGACY + 5)
137#define MX27_INT_CSPI3 (NR_IRQS_LEGACY + 6) 137#define MX27_INT_CSPI3 (NR_IRQS_LEGACY + 6)
138#define MX27_INT_SDHC (NR_IRQS_LEGACY + 7) 138#define MX27_INT_MSHC (NR_IRQS_LEGACY + 7)
139#define MX27_INT_GPIO (NR_IRQS_LEGACY + 8) 139#define MX27_INT_GPIO (NR_IRQS_LEGACY + 8)
140#define MX27_INT_SDHC3 (NR_IRQS_LEGACY + 9) 140#define MX27_INT_SDHC3 (NR_IRQS_LEGACY + 9)
141#define MX27_INT_SDHC2 (NR_IRQS_LEGACY + 10) 141#define MX27_INT_SDHC2 (NR_IRQS_LEGACY + 10)
diff --git a/arch/arm/mach-imx/platsmp.c b/arch/arm/mach-imx/platsmp.c
index c6e1ab544882..1f24c1fdfea4 100644
--- a/arch/arm/mach-imx/platsmp.c
+++ b/arch/arm/mach-imx/platsmp.c
@@ -53,7 +53,7 @@ void imx_scu_standby_enable(void)
53 writel_relaxed(val, scu_base); 53 writel_relaxed(val, scu_base);
54} 54}
55 55
56static int __cpuinit imx_boot_secondary(unsigned int cpu, struct task_struct *idle) 56static int imx_boot_secondary(unsigned int cpu, struct task_struct *idle)
57{ 57{
58 imx_set_cpu_jump(cpu, v7_secondary_startup); 58 imx_set_cpu_jump(cpu, v7_secondary_startup);
59 imx_enable_cpu(cpu, true); 59 imx_enable_cpu(cpu, true);
diff --git a/arch/arm/mach-imx/system.c b/arch/arm/mach-imx/system.c
index 695e0d73bf85..6fe81bb4d3c9 100644
--- a/arch/arm/mach-imx/system.c
+++ b/arch/arm/mach-imx/system.c
@@ -21,6 +21,8 @@
21#include <linux/io.h> 21#include <linux/io.h>
22#include <linux/err.h> 22#include <linux/err.h>
23#include <linux/delay.h> 23#include <linux/delay.h>
24#include <linux/of.h>
25#include <linux/of_address.h>
24 26
25#include <asm/system_misc.h> 27#include <asm/system_misc.h>
26#include <asm/proc-fns.h> 28#include <asm/proc-fns.h>
@@ -30,24 +32,22 @@
30#include "hardware.h" 32#include "hardware.h"
31 33
32static void __iomem *wdog_base; 34static void __iomem *wdog_base;
35static struct clk *wdog_clk;
33 36
34/* 37/*
35 * Reset the system. It is called by machine_restart(). 38 * Reset the system. It is called by machine_restart().
36 */ 39 */
37void mxc_restart(char mode, const char *cmd) 40void mxc_restart(enum reboot_mode mode, const char *cmd)
38{ 41{
39 unsigned int wcr_enable; 42 unsigned int wcr_enable;
40 43
41 if (cpu_is_mx1()) { 44 if (wdog_clk)
42 wcr_enable = (1 << 0); 45 clk_enable(wdog_clk);
43 } else {
44 struct clk *clk;
45 46
46 clk = clk_get_sys("imx2-wdt.0", NULL); 47 if (cpu_is_mx1())
47 if (!IS_ERR(clk)) 48 wcr_enable = (1 << 0);
48 clk_prepare_enable(clk); 49 else
49 wcr_enable = (1 << 2); 50 wcr_enable = (1 << 2);
50 }
51 51
52 /* Assert SRS signal */ 52 /* Assert SRS signal */
53 __raw_writew(wcr_enable, wdog_base); 53 __raw_writew(wcr_enable, wdog_base);
@@ -55,7 +55,7 @@ void mxc_restart(char mode, const char *cmd)
55 /* wait for reset to assert... */ 55 /* wait for reset to assert... */
56 mdelay(500); 56 mdelay(500);
57 57
58 printk(KERN_ERR "Watchdog reset failed to assert reset\n"); 58 pr_err("%s: Watchdog reset failed to assert reset\n", __func__);
59 59
60 /* delay to allow the serial port to show the message */ 60 /* delay to allow the serial port to show the message */
61 mdelay(50); 61 mdelay(50);
@@ -64,7 +64,34 @@ void mxc_restart(char mode, const char *cmd)
64 soft_restart(0); 64 soft_restart(0);
65} 65}
66 66
67void mxc_arch_reset_init(void __iomem *base) 67void __init mxc_arch_reset_init(void __iomem *base)
68{ 68{
69 wdog_base = base; 69 wdog_base = base;
70
71 wdog_clk = clk_get_sys("imx2-wdt.0", NULL);
72 if (IS_ERR(wdog_clk)) {
73 pr_warn("%s: failed to get wdog clock\n", __func__);
74 wdog_clk = NULL;
75 return;
76 }
77
78 clk_prepare(wdog_clk);
79}
80
81void __init mxc_arch_reset_init_dt(void)
82{
83 struct device_node *np;
84
85 np = of_find_compatible_node(NULL, NULL, "fsl,imx21-wdt");
86 wdog_base = of_iomap(np, 0);
87 WARN_ON(!wdog_base);
88
89 wdog_clk = of_clk_get(np, 0);
90 if (IS_ERR(wdog_clk)) {
91 pr_warn("%s: failed to get wdog clock\n", __func__);
92 wdog_clk = NULL;
93 return;
94 }
95
96 clk_prepare(wdog_clk);
70} 97}
diff --git a/arch/arm/mach-imx/time.c b/arch/arm/mach-imx/time.c
index fea91313678b..cd46529e9eaa 100644
--- a/arch/arm/mach-imx/time.c
+++ b/arch/arm/mach-imx/time.c
@@ -26,8 +26,8 @@
26#include <linux/clockchips.h> 26#include <linux/clockchips.h>
27#include <linux/clk.h> 27#include <linux/clk.h>
28#include <linux/err.h> 28#include <linux/err.h>
29#include <linux/sched_clock.h>
29 30
30#include <asm/sched_clock.h>
31#include <asm/mach/time.h> 31#include <asm/mach/time.h>
32 32
33#include "common.h" 33#include "common.h"
diff --git a/arch/arm/mach-imx/ulpi.c b/arch/arm/mach-imx/ulpi.c
deleted file mode 100644
index 0f051957d10c..000000000000
--- a/arch/arm/mach-imx/ulpi.c
+++ /dev/null
@@ -1,118 +0,0 @@
1/*
2 * Copyright 2008 Sascha Hauer, Pengutronix <s.hauer@pengutronix.de>
3 * Copyright 2009 Daniel Mack <daniel@caiaq.de>
4 *
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License
7 * as published by the Free Software Foundation; either version 2
8 * of the License, or (at your option) any later version.
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
20#include <linux/module.h>
21#include <linux/kernel.h>
22#include <linux/io.h>
23#include <linux/delay.h>
24#include <linux/usb/otg.h>
25#include <linux/usb/ulpi.h>
26
27#include "ulpi.h"
28
29/* ULPIVIEW register bits */
30#define ULPIVW_WU (1 << 31) /* Wakeup */
31#define ULPIVW_RUN (1 << 30) /* read/write run */
32#define ULPIVW_WRITE (1 << 29) /* 0 = read 1 = write */
33#define ULPIVW_SS (1 << 27) /* SyncState */
34#define ULPIVW_PORT_MASK 0x07 /* Port field */
35#define ULPIVW_PORT_SHIFT 24
36#define ULPIVW_ADDR_MASK 0xff /* data address field */
37#define ULPIVW_ADDR_SHIFT 16
38#define ULPIVW_RDATA_MASK 0xff /* read data field */
39#define ULPIVW_RDATA_SHIFT 8
40#define ULPIVW_WDATA_MASK 0xff /* write data field */
41#define ULPIVW_WDATA_SHIFT 0
42
43static int ulpi_poll(void __iomem *view, u32 bit)
44{
45 int timeout = 10000;
46
47 while (timeout--) {
48 u32 data = __raw_readl(view);
49
50 if (!(data & bit))
51 return 0;
52
53 cpu_relax();
54 };
55
56 printk(KERN_WARNING "timeout polling for ULPI device\n");
57
58 return -ETIMEDOUT;
59}
60
61static int ulpi_read(struct usb_phy *otg, u32 reg)
62{
63 int ret;
64 void __iomem *view = otg->io_priv;
65
66 /* make sure interface is running */
67 if (!(__raw_readl(view) & ULPIVW_SS)) {
68 __raw_writel(ULPIVW_WU, view);
69
70 /* wait for wakeup */
71 ret = ulpi_poll(view, ULPIVW_WU);
72 if (ret)
73 return ret;
74 }
75
76 /* read the register */
77 __raw_writel((ULPIVW_RUN | (reg << ULPIVW_ADDR_SHIFT)), view);
78
79 /* wait for completion */
80 ret = ulpi_poll(view, ULPIVW_RUN);
81 if (ret)
82 return ret;
83
84 return (__raw_readl(view) >> ULPIVW_RDATA_SHIFT) & ULPIVW_RDATA_MASK;
85}
86
87static int ulpi_write(struct usb_phy *otg, u32 val, u32 reg)
88{
89 int ret;
90 void __iomem *view = otg->io_priv;
91
92 /* make sure the interface is running */
93 if (!(__raw_readl(view) & ULPIVW_SS)) {
94 __raw_writel(ULPIVW_WU, view);
95 /* wait for wakeup */
96 ret = ulpi_poll(view, ULPIVW_WU);
97 if (ret)
98 return ret;
99 }
100
101 __raw_writel((ULPIVW_RUN | ULPIVW_WRITE |
102 (reg << ULPIVW_ADDR_SHIFT) |
103 ((val & ULPIVW_WDATA_MASK) << ULPIVW_WDATA_SHIFT)), view);
104
105 /* wait for completion */
106 return ulpi_poll(view, ULPIVW_RUN);
107}
108
109struct usb_phy_io_ops mxc_ulpi_access_ops = {
110 .read = ulpi_read,
111 .write = ulpi_write,
112};
113EXPORT_SYMBOL_GPL(mxc_ulpi_access_ops);
114
115struct usb_phy *imx_otg_ulpi_create(unsigned int flags)
116{
117 return otg_ulpi_create(&mxc_ulpi_access_ops, flags);
118}
diff --git a/arch/arm/mach-imx/ulpi.h b/arch/arm/mach-imx/ulpi.h
index 42bdaca6d7d9..23f5c0349e80 100644
--- a/arch/arm/mach-imx/ulpi.h
+++ b/arch/arm/mach-imx/ulpi.h
@@ -1,8 +1,13 @@
1#ifndef __MACH_ULPI_H 1#ifndef __MACH_ULPI_H
2#define __MACH_ULPI_H 2#define __MACH_ULPI_H
3 3
4#ifdef CONFIG_USB_ULPI 4#include <linux/usb/ulpi.h>
5struct usb_phy *imx_otg_ulpi_create(unsigned int flags); 5
6#ifdef CONFIG_USB_ULPI_VIEWPORT
7static inline struct usb_phy *imx_otg_ulpi_create(unsigned int flags)
8{
9 return otg_ulpi_create(&ulpi_viewport_access_ops, flags);
10}
6#else 11#else
7static inline struct usb_phy *imx_otg_ulpi_create(unsigned int flags) 12static inline struct usb_phy *imx_otg_ulpi_create(unsigned int flags)
8{ 13{
@@ -10,7 +15,5 @@ static inline struct usb_phy *imx_otg_ulpi_create(unsigned int flags)
10} 15}
11#endif 16#endif
12 17
13extern struct usb_phy_io_ops mxc_ulpi_access_ops;
14
15#endif /* __MACH_ULPI_H */ 18#endif /* __MACH_ULPI_H */
16 19
diff --git a/arch/arm/mach-integrator/Makefile b/arch/arm/mach-integrator/Makefile
index d14d6b76f4c2..ec759ded7b60 100644
--- a/arch/arm/mach-integrator/Makefile
+++ b/arch/arm/mach-integrator/Makefile
@@ -8,5 +8,5 @@ obj-y := core.o lm.o leds.o
8obj-$(CONFIG_ARCH_INTEGRATOR_AP) += integrator_ap.o 8obj-$(CONFIG_ARCH_INTEGRATOR_AP) += integrator_ap.o
9obj-$(CONFIG_ARCH_INTEGRATOR_CP) += integrator_cp.o 9obj-$(CONFIG_ARCH_INTEGRATOR_CP) += integrator_cp.o
10 10
11obj-$(CONFIG_PCI) += pci_v3.o pci.o 11obj-$(CONFIG_PCI) += pci_v3.o
12obj-$(CONFIG_INTEGRATOR_IMPD1) += impd1.o 12obj-$(CONFIG_INTEGRATOR_IMPD1) += impd1.o
diff --git a/arch/arm/mach-integrator/common.h b/arch/arm/mach-integrator/common.h
index 72516658be1e..ad0ac5547b2c 100644
--- a/arch/arm/mach-integrator/common.h
+++ b/arch/arm/mach-integrator/common.h
@@ -1,7 +1,8 @@
1#include <linux/reboot.h>
1#include <linux/amba/serial.h> 2#include <linux/amba/serial.h>
2extern struct amba_pl010_data ap_uart_data; 3extern struct amba_pl010_data ap_uart_data;
3void integrator_init_early(void); 4void integrator_init_early(void);
4int integrator_init(bool is_cp); 5int integrator_init(bool is_cp);
5void integrator_reserve(void); 6void integrator_reserve(void);
6void integrator_restart(char, const char *); 7void integrator_restart(enum reboot_mode, const char *);
7void integrator_init_sysfs(struct device *parent, u32 id); 8void integrator_init_sysfs(struct device *parent, u32 id);
diff --git a/arch/arm/mach-integrator/core.c b/arch/arm/mach-integrator/core.c
index 81461d218717..4cdfd7365925 100644
--- a/arch/arm/mach-integrator/core.c
+++ b/arch/arm/mach-integrator/core.c
@@ -124,7 +124,7 @@ void __init integrator_reserve(void)
124/* 124/*
125 * To reset, we hit the on-board reset register in the system FPGA 125 * To reset, we hit the on-board reset register in the system FPGA
126 */ 126 */
127void integrator_restart(char mode, const char *cmd) 127void integrator_restart(enum reboot_mode mode, const char *cmd)
128{ 128{
129 cm_control(CM_CTRL_RESET, CM_CTRL_RESET); 129 cm_control(CM_CTRL_RESET, CM_CTRL_RESET);
130} 130}
diff --git a/arch/arm/mach-integrator/include/mach/platform.h b/arch/arm/mach-integrator/include/mach/platform.h
index be5859efe10e..306d025d9730 100644
--- a/arch/arm/mach-integrator/include/mach/platform.h
+++ b/arch/arm/mach-integrator/include/mach/platform.h
@@ -305,29 +305,6 @@
305/* KMI definitions are now in include/asm-arm/hardware/amba_kmi.h -- rmk */ 305/* KMI definitions are now in include/asm-arm/hardware/amba_kmi.h -- rmk */
306 306
307/* ------------------------------------------------------------------------ 307/* ------------------------------------------------------------------------
308 * Where in the memory map does PCI live?
309 * ------------------------------------------------------------------------
310 * This represents a fairly liberal usage of address space. Even though
311 * the V3 only has two windows (therefore we need to map stuff on the fly),
312 * we maintain the same addresses, even if they're not mapped.
313 *
314 */
315#define PHYS_PCI_MEM_BASE 0x40000000 /* 512M to xxx */
316/* unused 256M from A0000000-AFFFFFFF might be used for I2O ???
317 */
318#define PHYS_PCI_IO_BASE 0x60000000 /* 16M to xxx */
319/* unused (128-16)M from B1000000-B7FFFFFF
320 */
321#define PHYS_PCI_CONFIG_BASE 0x61000000 /* 16M to xxx */
322/* unused ((128-16)M - 64K) from XXX
323 */
324#define PHYS_PCI_V3_BASE 0x62000000
325
326#define PCI_MEMORY_VADDR IOMEM(0xe8000000)
327#define PCI_CONFIG_VADDR IOMEM(0xec000000)
328#define PCI_V3_VADDR IOMEM(0xed000000)
329
330/* ------------------------------------------------------------------------
331 * Integrator Interrupt Controllers 308 * Integrator Interrupt Controllers
332 * ------------------------------------------------------------------------ 309 * ------------------------------------------------------------------------
333 * 310 *
diff --git a/arch/arm/mach-integrator/integrator_ap.c b/arch/arm/mach-integrator/integrator_ap.c
index b23c8e4f28e8..d9e95e612fcb 100644
--- a/arch/arm/mach-integrator/integrator_ap.c
+++ b/arch/arm/mach-integrator/integrator_ap.c
@@ -41,7 +41,7 @@
41#include <linux/stat.h> 41#include <linux/stat.h>
42#include <linux/sys_soc.h> 42#include <linux/sys_soc.h>
43#include <linux/termios.h> 43#include <linux/termios.h>
44#include <video/vga.h> 44#include <linux/sched_clock.h>
45 45
46#include <mach/hardware.h> 46#include <mach/hardware.h>
47#include <mach/platform.h> 47#include <mach/platform.h>
@@ -49,7 +49,6 @@
49#include <asm/setup.h> 49#include <asm/setup.h>
50#include <asm/param.h> /* HZ */ 50#include <asm/param.h> /* HZ */
51#include <asm/mach-types.h> 51#include <asm/mach-types.h>
52#include <asm/sched_clock.h>
53 52
54#include <mach/lm.h> 53#include <mach/lm.h>
55#include <mach/irqs.h> 54#include <mach/irqs.h>
@@ -57,10 +56,10 @@
57#include <asm/mach/arch.h> 56#include <asm/mach/arch.h>
58#include <asm/mach/irq.h> 57#include <asm/mach/irq.h>
59#include <asm/mach/map.h> 58#include <asm/mach/map.h>
60#include <asm/mach/pci.h>
61#include <asm/mach/time.h> 59#include <asm/mach/time.h>
62 60
63#include "common.h" 61#include "common.h"
62#include "pci_v3.h"
64 63
65/* Base address to the AP system controller */ 64/* Base address to the AP system controller */
66void __iomem *ap_syscon_base; 65void __iomem *ap_syscon_base;
@@ -78,10 +77,6 @@ void __iomem *ap_syscon_base;
78 77
79/* 78/*
80 * Logical Physical 79 * Logical Physical
81 * e8000000 40000000 PCI memory PHYS_PCI_MEM_BASE (max 512M)
82 * ec000000 61000000 PCI config space PHYS_PCI_CONFIG_BASE (max 16M)
83 * ed000000 62000000 PCI V3 regs PHYS_PCI_V3_BASE (max 64k)
84 * fee00000 60000000 PCI IO PHYS_PCI_IO_BASE (max 16M)
85 * ef000000 Cache flush 80 * ef000000 Cache flush
86 * f1000000 10000000 Core module registers 81 * f1000000 10000000 Core module registers
87 * f1100000 11000000 System controller registers 82 * f1100000 11000000 System controller registers
@@ -130,29 +125,13 @@ static struct map_desc ap_io_desc[] __initdata __maybe_unused = {
130 .pfn = __phys_to_pfn(INTEGRATOR_AP_GPIO_BASE), 125 .pfn = __phys_to_pfn(INTEGRATOR_AP_GPIO_BASE),
131 .length = SZ_4K, 126 .length = SZ_4K,
132 .type = MT_DEVICE 127 .type = MT_DEVICE
133 }, {
134 .virtual = (unsigned long)PCI_MEMORY_VADDR,
135 .pfn = __phys_to_pfn(PHYS_PCI_MEM_BASE),
136 .length = SZ_16M,
137 .type = MT_DEVICE
138 }, {
139 .virtual = (unsigned long)PCI_CONFIG_VADDR,
140 .pfn = __phys_to_pfn(PHYS_PCI_CONFIG_BASE),
141 .length = SZ_16M,
142 .type = MT_DEVICE
143 }, {
144 .virtual = (unsigned long)PCI_V3_VADDR,
145 .pfn = __phys_to_pfn(PHYS_PCI_V3_BASE),
146 .length = SZ_64K,
147 .type = MT_DEVICE
148 } 128 }
149}; 129};
150 130
151static void __init ap_map_io(void) 131static void __init ap_map_io(void)
152{ 132{
153 iotable_init(ap_io_desc, ARRAY_SIZE(ap_io_desc)); 133 iotable_init(ap_io_desc, ARRAY_SIZE(ap_io_desc));
154 vga_base = (unsigned long)PCI_MEMORY_VADDR; 134 pci_v3_early_init();
155 pci_map_io_early(__phys_to_pfn(PHYS_PCI_IO_BASE));
156} 135}
157 136
158#ifdef CONFIG_PM 137#ifdef CONFIG_PM
@@ -615,6 +594,11 @@ static void __init ap_map_io_atag(void)
615 * for eventual deletion. 594 * for eventual deletion.
616 */ 595 */
617 596
597static struct platform_device pci_v3_device = {
598 .name = "pci-v3",
599 .id = 0,
600};
601
618static struct resource cfi_flash_resource = { 602static struct resource cfi_flash_resource = {
619 .start = INTEGRATOR_FLASH_BASE, 603 .start = INTEGRATOR_FLASH_BASE,
620 .end = INTEGRATOR_FLASH_BASE + INTEGRATOR_FLASH_SIZE - 1, 604 .end = INTEGRATOR_FLASH_BASE + INTEGRATOR_FLASH_SIZE - 1,
@@ -672,6 +656,7 @@ static void __init ap_init(void)
672 unsigned long sc_dec; 656 unsigned long sc_dec;
673 int i; 657 int i;
674 658
659 platform_device_register(&pci_v3_device);
675 platform_device_register(&cfi_flash_device); 660 platform_device_register(&cfi_flash_device);
676 661
677 ap_syscon_base = __io_address(INTEGRATOR_SC_BASE); 662 ap_syscon_base = __io_address(INTEGRATOR_SC_BASE);
diff --git a/arch/arm/mach-integrator/pci.c b/arch/arm/mach-integrator/pci.c
deleted file mode 100644
index 6c1667e728f5..000000000000
--- a/arch/arm/mach-integrator/pci.c
+++ /dev/null
@@ -1,113 +0,0 @@
1/*
2 * linux/arch/arm/mach-integrator/pci-integrator.c
3 *
4 * Copyright (C) 1999 ARM Limited
5 * Copyright (C) 2000 Deep Blue Solutions Ltd
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 *
21 *
22 * PCI functions for Integrator
23 */
24#include <linux/kernel.h>
25#include <linux/pci.h>
26#include <linux/interrupt.h>
27#include <linux/init.h>
28
29#include <asm/mach/pci.h>
30#include <asm/mach-types.h>
31
32#include <mach/irqs.h>
33
34/*
35 * A small note about bridges and interrupts. The DECchip 21050 (and
36 * later) adheres to the PCI-PCI bridge specification. This says that
37 * the interrupts on the other side of a bridge are swizzled in the
38 * following manner:
39 *
40 * Dev Interrupt Interrupt
41 * Pin on Pin on
42 * Device Connector
43 *
44 * 4 A A
45 * B B
46 * C C
47 * D D
48 *
49 * 5 A B
50 * B C
51 * C D
52 * D A
53 *
54 * 6 A C
55 * B D
56 * C A
57 * D B
58 *
59 * 7 A D
60 * B A
61 * C B
62 * D C
63 *
64 * Where A = pin 1, B = pin 2 and so on and pin=0 = default = A.
65 * Thus, each swizzle is ((pin-1) + (device#-4)) % 4
66 */
67
68/*
69 * This routine handles multiple bridges.
70 */
71static u8 __init integrator_swizzle(struct pci_dev *dev, u8 *pinp)
72{
73 if (*pinp == 0)
74 *pinp = 1;
75
76 return pci_common_swizzle(dev, pinp);
77}
78
79static int irq_tab[4] __initdata = {
80 IRQ_AP_PCIINT0, IRQ_AP_PCIINT1, IRQ_AP_PCIINT2, IRQ_AP_PCIINT3
81};
82
83/*
84 * map the specified device/slot/pin to an IRQ. This works out such
85 * that slot 9 pin 1 is INT0, pin 2 is INT1, and slot 10 pin 1 is INT1.
86 */
87static int __init integrator_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
88{
89 int intnr = ((slot - 9) + (pin - 1)) & 3;
90
91 return irq_tab[intnr];
92}
93
94extern void pci_v3_init(void *);
95
96static struct hw_pci integrator_pci __initdata = {
97 .swizzle = integrator_swizzle,
98 .map_irq = integrator_map_irq,
99 .setup = pci_v3_setup,
100 .nr_controllers = 1,
101 .ops = &pci_v3_ops,
102 .preinit = pci_v3_preinit,
103 .postinit = pci_v3_postinit,
104};
105
106static int __init integrator_pci_init(void)
107{
108 if (machine_is_integrator())
109 pci_common_init(&integrator_pci);
110 return 0;
111}
112
113subsys_initcall(integrator_pci_init);
diff --git a/arch/arm/mach-integrator/pci_v3.c b/arch/arm/mach-integrator/pci_v3.c
index e7fcea7f3300..bef100527c42 100644
--- a/arch/arm/mach-integrator/pci_v3.c
+++ b/arch/arm/mach-integrator/pci_v3.c
@@ -27,16 +27,199 @@
27#include <linux/spinlock.h> 27#include <linux/spinlock.h>
28#include <linux/init.h> 28#include <linux/init.h>
29#include <linux/io.h> 29#include <linux/io.h>
30#include <linux/platform_device.h>
31#include <linux/of.h>
32#include <linux/of_address.h>
33#include <linux/of_irq.h>
34#include <linux/of_pci.h>
35#include <video/vga.h>
30 36
31#include <mach/hardware.h> 37#include <mach/hardware.h>
32#include <mach/platform.h> 38#include <mach/platform.h>
33#include <mach/irqs.h> 39#include <mach/irqs.h>
34 40
41#include <asm/mach/map.h>
35#include <asm/signal.h> 42#include <asm/signal.h>
36#include <asm/mach/pci.h> 43#include <asm/mach/pci.h>
37#include <asm/irq_regs.h> 44#include <asm/irq_regs.h>
38 45
39#include <asm/hardware/pci_v3.h> 46#include "pci_v3.h"
47
48/*
49 * Where in the memory map does PCI live?
50 *
51 * This represents a fairly liberal usage of address space. Even though
52 * the V3 only has two windows (therefore we need to map stuff on the fly),
53 * we maintain the same addresses, even if they're not mapped.
54 */
55#define PHYS_PCI_MEM_BASE 0x40000000 /* 256M */
56#define PHYS_PCI_PRE_BASE 0x50000000 /* 256M */
57#define PHYS_PCI_IO_BASE 0x60000000 /* 16M */
58#define PHYS_PCI_CONFIG_BASE 0x61000000 /* 16M */
59#define PHYS_PCI_V3_BASE 0x62000000 /* 64K */
60
61#define PCI_MEMORY_VADDR IOMEM(0xe8000000)
62#define PCI_CONFIG_VADDR IOMEM(0xec000000)
63
64/*
65 * V3 Local Bus to PCI Bridge definitions
66 *
67 * Registers (these are taken from page 129 of the EPC User's Manual Rev 1.04
68 * All V3 register names are prefaced by V3_ to avoid clashing with any other
69 * PCI definitions. Their names match the user's manual.
70 *
71 * I'm assuming that I20 is disabled.
72 *
73 */
74#define V3_PCI_VENDOR 0x00000000
75#define V3_PCI_DEVICE 0x00000002
76#define V3_PCI_CMD 0x00000004
77#define V3_PCI_STAT 0x00000006
78#define V3_PCI_CC_REV 0x00000008
79#define V3_PCI_HDR_CFG 0x0000000C
80#define V3_PCI_IO_BASE 0x00000010
81#define V3_PCI_BASE0 0x00000014
82#define V3_PCI_BASE1 0x00000018
83#define V3_PCI_SUB_VENDOR 0x0000002C
84#define V3_PCI_SUB_ID 0x0000002E
85#define V3_PCI_ROM 0x00000030
86#define V3_PCI_BPARAM 0x0000003C
87#define V3_PCI_MAP0 0x00000040
88#define V3_PCI_MAP1 0x00000044
89#define V3_PCI_INT_STAT 0x00000048
90#define V3_PCI_INT_CFG 0x0000004C
91#define V3_LB_BASE0 0x00000054
92#define V3_LB_BASE1 0x00000058
93#define V3_LB_MAP0 0x0000005E
94#define V3_LB_MAP1 0x00000062
95#define V3_LB_BASE2 0x00000064
96#define V3_LB_MAP2 0x00000066
97#define V3_LB_SIZE 0x00000068
98#define V3_LB_IO_BASE 0x0000006E
99#define V3_FIFO_CFG 0x00000070
100#define V3_FIFO_PRIORITY 0x00000072
101#define V3_FIFO_STAT 0x00000074
102#define V3_LB_ISTAT 0x00000076
103#define V3_LB_IMASK 0x00000077
104#define V3_SYSTEM 0x00000078
105#define V3_LB_CFG 0x0000007A
106#define V3_PCI_CFG 0x0000007C
107#define V3_DMA_PCI_ADR0 0x00000080
108#define V3_DMA_PCI_ADR1 0x00000090
109#define V3_DMA_LOCAL_ADR0 0x00000084
110#define V3_DMA_LOCAL_ADR1 0x00000094
111#define V3_DMA_LENGTH0 0x00000088
112#define V3_DMA_LENGTH1 0x00000098
113#define V3_DMA_CSR0 0x0000008B
114#define V3_DMA_CSR1 0x0000009B
115#define V3_DMA_CTLB_ADR0 0x0000008C
116#define V3_DMA_CTLB_ADR1 0x0000009C
117#define V3_DMA_DELAY 0x000000E0
118#define V3_MAIL_DATA 0x000000C0
119#define V3_PCI_MAIL_IEWR 0x000000D0
120#define V3_PCI_MAIL_IERD 0x000000D2
121#define V3_LB_MAIL_IEWR 0x000000D4
122#define V3_LB_MAIL_IERD 0x000000D6
123#define V3_MAIL_WR_STAT 0x000000D8
124#define V3_MAIL_RD_STAT 0x000000DA
125#define V3_QBA_MAP 0x000000DC
126
127/* PCI COMMAND REGISTER bits
128 */
129#define V3_COMMAND_M_FBB_EN (1 << 9)
130#define V3_COMMAND_M_SERR_EN (1 << 8)
131#define V3_COMMAND_M_PAR_EN (1 << 6)
132#define V3_COMMAND_M_MASTER_EN (1 << 2)
133#define V3_COMMAND_M_MEM_EN (1 << 1)
134#define V3_COMMAND_M_IO_EN (1 << 0)
135
136/* SYSTEM REGISTER bits
137 */
138#define V3_SYSTEM_M_RST_OUT (1 << 15)
139#define V3_SYSTEM_M_LOCK (1 << 14)
140
141/* PCI_CFG bits
142 */
143#define V3_PCI_CFG_M_I2O_EN (1 << 15)
144#define V3_PCI_CFG_M_IO_REG_DIS (1 << 14)
145#define V3_PCI_CFG_M_IO_DIS (1 << 13)
146#define V3_PCI_CFG_M_EN3V (1 << 12)
147#define V3_PCI_CFG_M_RETRY_EN (1 << 10)
148#define V3_PCI_CFG_M_AD_LOW1 (1 << 9)
149#define V3_PCI_CFG_M_AD_LOW0 (1 << 8)
150
151/* PCI_BASE register bits (PCI -> Local Bus)
152 */
153#define V3_PCI_BASE_M_ADR_BASE 0xFFF00000
154#define V3_PCI_BASE_M_ADR_BASEL 0x000FFF00
155#define V3_PCI_BASE_M_PREFETCH (1 << 3)
156#define V3_PCI_BASE_M_TYPE (3 << 1)
157#define V3_PCI_BASE_M_IO (1 << 0)
158
159/* PCI MAP register bits (PCI -> Local bus)
160 */
161#define V3_PCI_MAP_M_MAP_ADR 0xFFF00000
162#define V3_PCI_MAP_M_RD_POST_INH (1 << 15)
163#define V3_PCI_MAP_M_ROM_SIZE (3 << 10)
164#define V3_PCI_MAP_M_SWAP (3 << 8)
165#define V3_PCI_MAP_M_ADR_SIZE 0x000000F0
166#define V3_PCI_MAP_M_REG_EN (1 << 1)
167#define V3_PCI_MAP_M_ENABLE (1 << 0)
168
169/*
170 * LB_BASE0,1 register bits (Local bus -> PCI)
171 */
172#define V3_LB_BASE_ADR_BASE 0xfff00000
173#define V3_LB_BASE_SWAP (3 << 8)
174#define V3_LB_BASE_ADR_SIZE (15 << 4)
175#define V3_LB_BASE_PREFETCH (1 << 3)
176#define V3_LB_BASE_ENABLE (1 << 0)
177
178#define V3_LB_BASE_ADR_SIZE_1MB (0 << 4)
179#define V3_LB_BASE_ADR_SIZE_2MB (1 << 4)
180#define V3_LB_BASE_ADR_SIZE_4MB (2 << 4)
181#define V3_LB_BASE_ADR_SIZE_8MB (3 << 4)
182#define V3_LB_BASE_ADR_SIZE_16MB (4 << 4)
183#define V3_LB_BASE_ADR_SIZE_32MB (5 << 4)
184#define V3_LB_BASE_ADR_SIZE_64MB (6 << 4)
185#define V3_LB_BASE_ADR_SIZE_128MB (7 << 4)
186#define V3_LB_BASE_ADR_SIZE_256MB (8 << 4)
187#define V3_LB_BASE_ADR_SIZE_512MB (9 << 4)
188#define V3_LB_BASE_ADR_SIZE_1GB (10 << 4)
189#define V3_LB_BASE_ADR_SIZE_2GB (11 << 4)
190
191#define v3_addr_to_lb_base(a) ((a) & V3_LB_BASE_ADR_BASE)
192
193/*
194 * LB_MAP0,1 register bits (Local bus -> PCI)
195 */
196#define V3_LB_MAP_MAP_ADR 0xfff0
197#define V3_LB_MAP_TYPE (7 << 1)
198#define V3_LB_MAP_AD_LOW_EN (1 << 0)
199
200#define V3_LB_MAP_TYPE_IACK (0 << 1)
201#define V3_LB_MAP_TYPE_IO (1 << 1)
202#define V3_LB_MAP_TYPE_MEM (3 << 1)
203#define V3_LB_MAP_TYPE_CONFIG (5 << 1)
204#define V3_LB_MAP_TYPE_MEM_MULTIPLE (6 << 1)
205
206#define v3_addr_to_lb_map(a) (((a) >> 16) & V3_LB_MAP_MAP_ADR)
207
208/*
209 * LB_BASE2 register bits (Local bus -> PCI IO)
210 */
211#define V3_LB_BASE2_ADR_BASE 0xff00
212#define V3_LB_BASE2_SWAP (3 << 6)
213#define V3_LB_BASE2_ENABLE (1 << 0)
214
215#define v3_addr_to_lb_base2(a) (((a) >> 16) & V3_LB_BASE2_ADR_BASE)
216
217/*
218 * LB_MAP2 register bits (Local bus -> PCI IO)
219 */
220#define V3_LB_MAP2_MAP_ADR 0xff00
221
222#define v3_addr_to_lb_map2(a) (((a) >> 16) & V3_LB_MAP2_MAP_ADR)
40 223
41/* 224/*
42 * The V3 PCI interface chip in Integrator provides several windows from 225 * The V3 PCI interface chip in Integrator provides several windows from
@@ -101,15 +284,28 @@
101 * the mappings into PCI memory. 284 * the mappings into PCI memory.
102 */ 285 */
103 286
287/* Filled in by probe */
288static void __iomem *pci_v3_base;
289/* CPU side memory ranges */
290static struct resource conf_mem; /* FIXME: remap this instead of static map */
291static struct resource io_mem;
292static struct resource non_mem;
293static struct resource pre_mem;
294/* PCI side memory ranges */
295static u64 non_mem_pci;
296static u64 non_mem_pci_sz;
297static u64 pre_mem_pci;
298static u64 pre_mem_pci_sz;
299
104// V3 access routines 300// V3 access routines
105#define v3_writeb(o,v) __raw_writeb(v, PCI_V3_VADDR + (unsigned int)(o)) 301#define v3_writeb(o,v) __raw_writeb(v, pci_v3_base + (unsigned int)(o))
106#define v3_readb(o) (__raw_readb(PCI_V3_VADDR + (unsigned int)(o))) 302#define v3_readb(o) (__raw_readb(pci_v3_base + (unsigned int)(o)))
107 303
108#define v3_writew(o,v) __raw_writew(v, PCI_V3_VADDR + (unsigned int)(o)) 304#define v3_writew(o,v) __raw_writew(v, pci_v3_base + (unsigned int)(o))
109#define v3_readw(o) (__raw_readw(PCI_V3_VADDR + (unsigned int)(o))) 305#define v3_readw(o) (__raw_readw(pci_v3_base + (unsigned int)(o)))
110 306
111#define v3_writel(o,v) __raw_writel(v, PCI_V3_VADDR + (unsigned int)(o)) 307#define v3_writel(o,v) __raw_writel(v, pci_v3_base + (unsigned int)(o))
112#define v3_readl(o) (__raw_readl(PCI_V3_VADDR + (unsigned int)(o))) 308#define v3_readl(o) (__raw_readl(pci_v3_base + (unsigned int)(o)))
113 309
114/*============================================================================ 310/*============================================================================
115 * 311 *
@@ -165,19 +361,6 @@
165 */ 361 */
166static DEFINE_RAW_SPINLOCK(v3_lock); 362static DEFINE_RAW_SPINLOCK(v3_lock);
167 363
168#define PCI_BUS_NONMEM_START 0x00000000
169#define PCI_BUS_NONMEM_SIZE SZ_256M
170
171#define PCI_BUS_PREMEM_START PCI_BUS_NONMEM_START + PCI_BUS_NONMEM_SIZE
172#define PCI_BUS_PREMEM_SIZE SZ_256M
173
174#if PCI_BUS_NONMEM_START & 0x000fffff
175#error PCI_BUS_NONMEM_START must be megabyte aligned
176#endif
177#if PCI_BUS_PREMEM_START & 0x000fffff
178#error PCI_BUS_PREMEM_START must be megabyte aligned
179#endif
180
181#undef V3_LB_BASE_PREFETCH 364#undef V3_LB_BASE_PREFETCH
182#define V3_LB_BASE_PREFETCH 0 365#define V3_LB_BASE_PREFETCH 0
183 366
@@ -243,13 +426,13 @@ static void __iomem *v3_open_config_window(struct pci_bus *bus,
243 * prefetchable), this frees up base1 for re-use by 426 * prefetchable), this frees up base1 for re-use by
244 * configuration memory 427 * configuration memory
245 */ 428 */
246 v3_writel(V3_LB_BASE0, v3_addr_to_lb_base(PHYS_PCI_MEM_BASE) | 429 v3_writel(V3_LB_BASE0, v3_addr_to_lb_base(non_mem.start) |
247 V3_LB_BASE_ADR_SIZE_512MB | V3_LB_BASE_ENABLE); 430 V3_LB_BASE_ADR_SIZE_512MB | V3_LB_BASE_ENABLE);
248 431
249 /* 432 /*
250 * Set up base1/map1 to point into configuration space. 433 * Set up base1/map1 to point into configuration space.
251 */ 434 */
252 v3_writel(V3_LB_BASE1, v3_addr_to_lb_base(PHYS_PCI_CONFIG_BASE) | 435 v3_writel(V3_LB_BASE1, v3_addr_to_lb_base(conf_mem.start) |
253 V3_LB_BASE_ADR_SIZE_16MB | V3_LB_BASE_ENABLE); 436 V3_LB_BASE_ADR_SIZE_16MB | V3_LB_BASE_ENABLE);
254 v3_writew(V3_LB_MAP1, mapaddress); 437 v3_writew(V3_LB_MAP1, mapaddress);
255 438
@@ -261,16 +444,16 @@ static void v3_close_config_window(void)
261 /* 444 /*
262 * Reassign base1 for use by prefetchable PCI memory 445 * Reassign base1 for use by prefetchable PCI memory
263 */ 446 */
264 v3_writel(V3_LB_BASE1, v3_addr_to_lb_base(PHYS_PCI_MEM_BASE + SZ_256M) | 447 v3_writel(V3_LB_BASE1, v3_addr_to_lb_base(pre_mem.start) |
265 V3_LB_BASE_ADR_SIZE_256MB | V3_LB_BASE_PREFETCH | 448 V3_LB_BASE_ADR_SIZE_256MB | V3_LB_BASE_PREFETCH |
266 V3_LB_BASE_ENABLE); 449 V3_LB_BASE_ENABLE);
267 v3_writew(V3_LB_MAP1, v3_addr_to_lb_map(PCI_BUS_PREMEM_START) | 450 v3_writew(V3_LB_MAP1, v3_addr_to_lb_map(pre_mem_pci) |
268 V3_LB_MAP_TYPE_MEM_MULTIPLE); 451 V3_LB_MAP_TYPE_MEM_MULTIPLE);
269 452
270 /* 453 /*
271 * And shrink base0 back to a 256M window (NOTE: MAP0 already correct) 454 * And shrink base0 back to a 256M window (NOTE: MAP0 already correct)
272 */ 455 */
273 v3_writel(V3_LB_BASE0, v3_addr_to_lb_base(PHYS_PCI_MEM_BASE) | 456 v3_writel(V3_LB_BASE0, v3_addr_to_lb_base(non_mem.start) |
274 V3_LB_BASE_ADR_SIZE_256MB | V3_LB_BASE_ENABLE); 457 V3_LB_BASE_ADR_SIZE_256MB | V3_LB_BASE_ENABLE);
275} 458}
276 459
@@ -337,25 +520,11 @@ static int v3_write_config(struct pci_bus *bus, unsigned int devfn, int where,
337 return PCIBIOS_SUCCESSFUL; 520 return PCIBIOS_SUCCESSFUL;
338} 521}
339 522
340struct pci_ops pci_v3_ops = { 523static struct pci_ops pci_v3_ops = {
341 .read = v3_read_config, 524 .read = v3_read_config,
342 .write = v3_write_config, 525 .write = v3_write_config,
343}; 526};
344 527
345static struct resource non_mem = {
346 .name = "PCI non-prefetchable",
347 .start = PHYS_PCI_MEM_BASE + PCI_BUS_NONMEM_START,
348 .end = PHYS_PCI_MEM_BASE + PCI_BUS_NONMEM_START + PCI_BUS_NONMEM_SIZE - 1,
349 .flags = IORESOURCE_MEM,
350};
351
352static struct resource pre_mem = {
353 .name = "PCI prefetchable",
354 .start = PHYS_PCI_MEM_BASE + PCI_BUS_PREMEM_START,
355 .end = PHYS_PCI_MEM_BASE + PCI_BUS_PREMEM_START + PCI_BUS_PREMEM_SIZE - 1,
356 .flags = IORESOURCE_MEM | IORESOURCE_PREFETCH,
357};
358
359static int __init pci_v3_setup_resources(struct pci_sys_data *sys) 528static int __init pci_v3_setup_resources(struct pci_sys_data *sys)
360{ 529{
361 if (request_resource(&iomem_resource, &non_mem)) { 530 if (request_resource(&iomem_resource, &non_mem)) {
@@ -471,7 +640,7 @@ static irqreturn_t v3_irq(int dummy, void *devid)
471 return IRQ_HANDLED; 640 return IRQ_HANDLED;
472} 641}
473 642
474int __init pci_v3_setup(int nr, struct pci_sys_data *sys) 643static int __init pci_v3_setup(int nr, struct pci_sys_data *sys)
475{ 644{
476 int ret = 0; 645 int ret = 0;
477 646
@@ -479,7 +648,7 @@ int __init pci_v3_setup(int nr, struct pci_sys_data *sys)
479 return -EINVAL; 648 return -EINVAL;
480 649
481 if (nr == 0) { 650 if (nr == 0) {
482 sys->mem_offset = PHYS_PCI_MEM_BASE; 651 sys->mem_offset = non_mem.start;
483 ret = pci_v3_setup_resources(sys); 652 ret = pci_v3_setup_resources(sys);
484 } 653 }
485 654
@@ -490,18 +659,10 @@ int __init pci_v3_setup(int nr, struct pci_sys_data *sys)
490 * V3_LB_BASE? - local bus address 659 * V3_LB_BASE? - local bus address
491 * V3_LB_MAP? - pci bus address 660 * V3_LB_MAP? - pci bus address
492 */ 661 */
493void __init pci_v3_preinit(void) 662static void __init pci_v3_preinit(void)
494{ 663{
495 unsigned long flags; 664 unsigned long flags;
496 unsigned int temp; 665 unsigned int temp;
497 int ret;
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 666
506 pcibios_min_mem = 0x00100000; 667 pcibios_min_mem = 0x00100000;
507 668
@@ -525,25 +686,25 @@ void __init pci_v3_preinit(void)
525 * Setup window 0 - PCI non-prefetchable memory 686 * Setup window 0 - PCI non-prefetchable memory
526 * Local: 0x40000000 Bus: 0x00000000 Size: 256MB 687 * Local: 0x40000000 Bus: 0x00000000 Size: 256MB
527 */ 688 */
528 v3_writel(V3_LB_BASE0, v3_addr_to_lb_base(PHYS_PCI_MEM_BASE) | 689 v3_writel(V3_LB_BASE0, v3_addr_to_lb_base(non_mem.start) |
529 V3_LB_BASE_ADR_SIZE_256MB | V3_LB_BASE_ENABLE); 690 V3_LB_BASE_ADR_SIZE_256MB | V3_LB_BASE_ENABLE);
530 v3_writew(V3_LB_MAP0, v3_addr_to_lb_map(PCI_BUS_NONMEM_START) | 691 v3_writew(V3_LB_MAP0, v3_addr_to_lb_map(non_mem_pci) |
531 V3_LB_MAP_TYPE_MEM); 692 V3_LB_MAP_TYPE_MEM);
532 693
533 /* 694 /*
534 * Setup window 1 - PCI prefetchable memory 695 * Setup window 1 - PCI prefetchable memory
535 * Local: 0x50000000 Bus: 0x10000000 Size: 256MB 696 * Local: 0x50000000 Bus: 0x10000000 Size: 256MB
536 */ 697 */
537 v3_writel(V3_LB_BASE1, v3_addr_to_lb_base(PHYS_PCI_MEM_BASE + SZ_256M) | 698 v3_writel(V3_LB_BASE1, v3_addr_to_lb_base(pre_mem.start) |
538 V3_LB_BASE_ADR_SIZE_256MB | V3_LB_BASE_PREFETCH | 699 V3_LB_BASE_ADR_SIZE_256MB | V3_LB_BASE_PREFETCH |
539 V3_LB_BASE_ENABLE); 700 V3_LB_BASE_ENABLE);
540 v3_writew(V3_LB_MAP1, v3_addr_to_lb_map(PCI_BUS_PREMEM_START) | 701 v3_writew(V3_LB_MAP1, v3_addr_to_lb_map(pre_mem_pci) |
541 V3_LB_MAP_TYPE_MEM_MULTIPLE); 702 V3_LB_MAP_TYPE_MEM_MULTIPLE);
542 703
543 /* 704 /*
544 * Setup window 2 - PCI IO 705 * Setup window 2 - PCI IO
545 */ 706 */
546 v3_writel(V3_LB_BASE2, v3_addr_to_lb_base2(PHYS_PCI_IO_BASE) | 707 v3_writel(V3_LB_BASE2, v3_addr_to_lb_base2(io_mem.start) |
547 V3_LB_BASE_ENABLE); 708 V3_LB_BASE_ENABLE);
548 v3_writew(V3_LB_MAP2, v3_addr_to_lb_map2(0)); 709 v3_writew(V3_LB_MAP2, v3_addr_to_lb_map2(0));
549 710
@@ -578,18 +739,10 @@ void __init pci_v3_preinit(void)
578 v3_writeb(V3_LB_IMASK, 0x28); 739 v3_writeb(V3_LB_IMASK, 0x28);
579 __raw_writel(3, ap_syscon_base + INTEGRATOR_SC_PCIENABLE_OFFSET); 740 __raw_writel(3, ap_syscon_base + INTEGRATOR_SC_PCIENABLE_OFFSET);
580 741
581 /*
582 * Grab the PCI error interrupt.
583 */
584 ret = request_irq(IRQ_AP_V3INT, v3_irq, 0, "V3", NULL);
585 if (ret)
586 printk(KERN_ERR "PCI: unable to grab PCI error "
587 "interrupt: %d\n", ret);
588
589 raw_spin_unlock_irqrestore(&v3_lock, flags); 742 raw_spin_unlock_irqrestore(&v3_lock, flags);
590} 743}
591 744
592void __init pci_v3_postinit(void) 745static void __init pci_v3_postinit(void)
593{ 746{
594 unsigned int pci_cmd; 747 unsigned int pci_cmd;
595 748
@@ -608,5 +761,284 @@ void __init pci_v3_postinit(void)
608 "interrupt: %d\n", ret); 761 "interrupt: %d\n", ret);
609#endif 762#endif
610 763
611 register_isa_ports(PHYS_PCI_MEM_BASE, PHYS_PCI_IO_BASE, 0); 764 register_isa_ports(non_mem.start, io_mem.start, 0);
765}
766
767/*
768 * A small note about bridges and interrupts. The DECchip 21050 (and
769 * later) adheres to the PCI-PCI bridge specification. This says that
770 * the interrupts on the other side of a bridge are swizzled in the
771 * following manner:
772 *
773 * Dev Interrupt Interrupt
774 * Pin on Pin on
775 * Device Connector
776 *
777 * 4 A A
778 * B B
779 * C C
780 * D D
781 *
782 * 5 A B
783 * B C
784 * C D
785 * D A
786 *
787 * 6 A C
788 * B D
789 * C A
790 * D B
791 *
792 * 7 A D
793 * B A
794 * C B
795 * D C
796 *
797 * Where A = pin 1, B = pin 2 and so on and pin=0 = default = A.
798 * Thus, each swizzle is ((pin-1) + (device#-4)) % 4
799 */
800
801/*
802 * This routine handles multiple bridges.
803 */
804static u8 __init pci_v3_swizzle(struct pci_dev *dev, u8 *pinp)
805{
806 if (*pinp == 0)
807 *pinp = 1;
808
809 return pci_common_swizzle(dev, pinp);
810}
811
812static int irq_tab[4] __initdata = {
813 IRQ_AP_PCIINT0, IRQ_AP_PCIINT1, IRQ_AP_PCIINT2, IRQ_AP_PCIINT3
814};
815
816/*
817 * map the specified device/slot/pin to an IRQ. This works out such
818 * that slot 9 pin 1 is INT0, pin 2 is INT1, and slot 10 pin 1 is INT1.
819 */
820static int __init pci_v3_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
821{
822 int intnr = ((slot - 9) + (pin - 1)) & 3;
823
824 return irq_tab[intnr];
825}
826
827static struct hw_pci pci_v3 __initdata = {
828 .swizzle = pci_v3_swizzle,
829 .setup = pci_v3_setup,
830 .nr_controllers = 1,
831 .ops = &pci_v3_ops,
832 .preinit = pci_v3_preinit,
833 .postinit = pci_v3_postinit,
834};
835
836#ifdef CONFIG_OF
837
838static int __init pci_v3_map_irq_dt(const struct pci_dev *dev, u8 slot, u8 pin)
839{
840 struct of_irq oirq;
841 int ret;
842
843 ret = of_irq_map_pci(dev, &oirq);
844 if (ret) {
845 dev_err(&dev->dev, "of_irq_map_pci() %d\n", ret);
846 /* Proper return code 0 == NO_IRQ */
847 return 0;
848 }
849
850 return irq_create_of_mapping(oirq.controller, oirq.specifier,
851 oirq.size);
852}
853
854static int __init pci_v3_dtprobe(struct platform_device *pdev,
855 struct device_node *np)
856{
857 struct of_pci_range_parser parser;
858 struct of_pci_range range;
859 struct resource *res;
860 int irq, ret;
861
862 if (of_pci_range_parser_init(&parser, np))
863 return -EINVAL;
864
865 /* Get base for bridge registers */
866 res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
867 if (!res) {
868 dev_err(&pdev->dev, "unable to obtain PCIv3 base\n");
869 return -ENODEV;
870 }
871 pci_v3_base = devm_ioremap(&pdev->dev, res->start,
872 resource_size(res));
873 if (!pci_v3_base) {
874 dev_err(&pdev->dev, "unable to remap PCIv3 base\n");
875 return -ENODEV;
876 }
877
878 /* Get and request error IRQ resource */
879 irq = platform_get_irq(pdev, 0);
880 if (irq <= 0) {
881 dev_err(&pdev->dev, "unable to obtain PCIv3 error IRQ\n");
882 return -ENODEV;
883 }
884 ret = devm_request_irq(&pdev->dev, irq, v3_irq, 0,
885 "PCIv3 error", NULL);
886 if (ret < 0) {
887 dev_err(&pdev->dev, "unable to request PCIv3 error IRQ %d (%d)\n", irq, ret);
888 return ret;
889 }
890
891 for_each_of_pci_range(&parser, &range) {
892 if (!range.flags) {
893 of_pci_range_to_resource(&range, np, &conf_mem);
894 conf_mem.name = "PCIv3 config";
895 }
896 if (range.flags & IORESOURCE_IO) {
897 of_pci_range_to_resource(&range, np, &io_mem);
898 io_mem.name = "PCIv3 I/O";
899 }
900 if ((range.flags & IORESOURCE_MEM) &&
901 !(range.flags & IORESOURCE_PREFETCH)) {
902 non_mem_pci = range.pci_addr;
903 non_mem_pci_sz = range.size;
904 of_pci_range_to_resource(&range, np, &non_mem);
905 non_mem.name = "PCIv3 non-prefetched mem";
906 }
907 if ((range.flags & IORESOURCE_MEM) &&
908 (range.flags & IORESOURCE_PREFETCH)) {
909 pre_mem_pci = range.pci_addr;
910 pre_mem_pci_sz = range.size;
911 of_pci_range_to_resource(&range, np, &pre_mem);
912 pre_mem.name = "PCIv3 prefetched mem";
913 }
914 }
915
916 if (!conf_mem.start || !io_mem.start ||
917 !non_mem.start || !pre_mem.start) {
918 dev_err(&pdev->dev, "missing ranges in device node\n");
919 return -EINVAL;
920 }
921
922 pci_v3.map_irq = pci_v3_map_irq_dt;
923 pci_common_init_dev(&pdev->dev, &pci_v3);
924
925 return 0;
926}
927
928#else
929
930static inline int pci_v3_dtprobe(struct platform_device *pdev,
931 struct device_node *np)
932{
933 return -EINVAL;
934}
935
936#endif
937
938static int __init pci_v3_probe(struct platform_device *pdev)
939{
940 struct device_node *np = pdev->dev.of_node;
941 int ret;
942
943 /* Remap the Integrator system controller */
944 ap_syscon_base = ioremap(INTEGRATOR_SC_BASE, 0x100);
945 if (!ap_syscon_base) {
946 dev_err(&pdev->dev, "unable to remap the AP syscon for PCIv3\n");
947 return -ENODEV;
948 }
949
950 /* Device tree probe path */
951 if (np)
952 return pci_v3_dtprobe(pdev, np);
953
954 pci_v3_base = devm_ioremap(&pdev->dev, PHYS_PCI_V3_BASE, SZ_64K);
955 if (!pci_v3_base) {
956 dev_err(&pdev->dev, "unable to remap PCIv3 base\n");
957 return -ENODEV;
958 }
959
960 ret = devm_request_irq(&pdev->dev, IRQ_AP_V3INT, v3_irq, 0, "V3", NULL);
961 if (ret) {
962 dev_err(&pdev->dev, "unable to grab PCI error interrupt: %d\n",
963 ret);
964 return -ENODEV;
965 }
966
967 conf_mem.name = "PCIv3 config";
968 conf_mem.start = PHYS_PCI_CONFIG_BASE;
969 conf_mem.end = PHYS_PCI_CONFIG_BASE + SZ_16M - 1;
970 conf_mem.flags = IORESOURCE_MEM;
971
972 io_mem.name = "PCIv3 I/O";
973 io_mem.start = PHYS_PCI_IO_BASE;
974 io_mem.end = PHYS_PCI_IO_BASE + SZ_16M - 1;
975 io_mem.flags = IORESOURCE_MEM;
976
977 non_mem_pci = 0x00000000;
978 non_mem_pci_sz = SZ_256M;
979 non_mem.name = "PCIv3 non-prefetched mem";
980 non_mem.start = PHYS_PCI_MEM_BASE;
981 non_mem.end = PHYS_PCI_MEM_BASE + SZ_256M - 1;
982 non_mem.flags = IORESOURCE_MEM;
983
984 pre_mem_pci = 0x10000000;
985 pre_mem_pci_sz = SZ_256M;
986 pre_mem.name = "PCIv3 prefetched mem";
987 pre_mem.start = PHYS_PCI_PRE_BASE + SZ_256M;
988 pre_mem.end = PHYS_PCI_PRE_BASE + SZ_256M - 1;
989 pre_mem.flags = IORESOURCE_MEM | IORESOURCE_PREFETCH;
990
991 pci_v3.map_irq = pci_v3_map_irq;
992
993 pci_common_init_dev(&pdev->dev, &pci_v3);
994
995 return 0;
996}
997
998static const struct of_device_id pci_ids[] = {
999 { .compatible = "v3,v360epc-pci", },
1000 {},
1001};
1002
1003static struct platform_driver pci_v3_driver = {
1004 .driver = {
1005 .name = "pci-v3",
1006 .of_match_table = pci_ids,
1007 },
1008};
1009
1010static int __init pci_v3_init(void)
1011{
1012 return platform_driver_probe(&pci_v3_driver, pci_v3_probe);
1013}
1014
1015subsys_initcall(pci_v3_init);
1016
1017/*
1018 * Static mappings for the PCIv3 bridge
1019 *
1020 * e8000000 40000000 PCI memory PHYS_PCI_MEM_BASE (max 512M)
1021 * ec000000 61000000 PCI config space PHYS_PCI_CONFIG_BASE (max 16M)
1022 * fee00000 60000000 PCI IO PHYS_PCI_IO_BASE (max 16M)
1023 */
1024static struct map_desc pci_v3_io_desc[] __initdata __maybe_unused = {
1025 {
1026 .virtual = (unsigned long)PCI_MEMORY_VADDR,
1027 .pfn = __phys_to_pfn(PHYS_PCI_MEM_BASE),
1028 .length = SZ_16M,
1029 .type = MT_DEVICE
1030 }, {
1031 .virtual = (unsigned long)PCI_CONFIG_VADDR,
1032 .pfn = __phys_to_pfn(PHYS_PCI_CONFIG_BASE),
1033 .length = SZ_16M,
1034 .type = MT_DEVICE
1035 }
1036};
1037
1038int __init pci_v3_early_init(void)
1039{
1040 iotable_init(pci_v3_io_desc, ARRAY_SIZE(pci_v3_io_desc));
1041 vga_base = (unsigned long)PCI_MEMORY_VADDR;
1042 pci_map_io_early(__phys_to_pfn(PHYS_PCI_IO_BASE));
1043 return 0;
612} 1044}
diff --git a/arch/arm/mach-integrator/pci_v3.h b/arch/arm/mach-integrator/pci_v3.h
new file mode 100644
index 000000000000..755fd29fed4a
--- /dev/null
+++ b/arch/arm/mach-integrator/pci_v3.h
@@ -0,0 +1,2 @@
1/* Simple oneliner include to the PCIv3 early init */
2extern int pci_v3_early_init(void);
diff --git a/arch/arm/mach-iop13xx/include/mach/iop13xx.h b/arch/arm/mach-iop13xx/include/mach/iop13xx.h
index 7480f58267aa..17b40279e0a4 100644
--- a/arch/arm/mach-iop13xx/include/mach/iop13xx.h
+++ b/arch/arm/mach-iop13xx/include/mach/iop13xx.h
@@ -2,6 +2,9 @@
2#define _IOP13XX_HW_H_ 2#define _IOP13XX_HW_H_
3 3
4#ifndef __ASSEMBLY__ 4#ifndef __ASSEMBLY__
5
6#include <linux/reboot.h>
7
5/* The ATU offsets can change based on the strapping */ 8/* The ATU offsets can change based on the strapping */
6extern u32 iop13xx_atux_pmmr_offset; 9extern u32 iop13xx_atux_pmmr_offset;
7extern u32 iop13xx_atue_pmmr_offset; 10extern u32 iop13xx_atue_pmmr_offset;
@@ -11,7 +14,7 @@ void iop13xx_map_io(void);
11void iop13xx_platform_init(void); 14void iop13xx_platform_init(void);
12void iop13xx_add_tpmi_devices(void); 15void iop13xx_add_tpmi_devices(void);
13void iop13xx_init_irq(void); 16void iop13xx_init_irq(void);
14void iop13xx_restart(char, const char *); 17void iop13xx_restart(enum reboot_mode, const char *);
15 18
16/* CPUID CP6 R0 Page 0 */ 19/* CPUID CP6 R0 Page 0 */
17static inline int iop13xx_cpu_id(void) 20static inline int iop13xx_cpu_id(void)
diff --git a/arch/arm/mach-iop13xx/io.c b/arch/arm/mach-iop13xx/io.c
index 183dc8b5511b..faaf7d4482c5 100644
--- a/arch/arm/mach-iop13xx/io.c
+++ b/arch/arm/mach-iop13xx/io.c
@@ -23,7 +23,7 @@
23 23
24#include "pci.h" 24#include "pci.h"
25 25
26static void __iomem *__iop13xx_ioremap_caller(unsigned long cookie, 26static void __iomem *__iop13xx_ioremap_caller(phys_addr_t cookie,
27 size_t size, unsigned int mtype, void *caller) 27 size_t size, unsigned int mtype, void *caller)
28{ 28{
29 void __iomem * retval; 29 void __iomem * retval;
diff --git a/arch/arm/mach-iop13xx/setup.c b/arch/arm/mach-iop13xx/setup.c
index 3181f61ea63e..96e6c7a6793b 100644
--- a/arch/arm/mach-iop13xx/setup.c
+++ b/arch/arm/mach-iop13xx/setup.c
@@ -469,7 +469,6 @@ void __init iop13xx_platform_init(void)
469 dma_cap_set(DMA_MEMCPY, plat_data->cap_mask); 469 dma_cap_set(DMA_MEMCPY, plat_data->cap_mask);
470 dma_cap_set(DMA_XOR, plat_data->cap_mask); 470 dma_cap_set(DMA_XOR, plat_data->cap_mask);
471 dma_cap_set(DMA_XOR_VAL, plat_data->cap_mask); 471 dma_cap_set(DMA_XOR_VAL, plat_data->cap_mask);
472 dma_cap_set(DMA_MEMSET, plat_data->cap_mask);
473 dma_cap_set(DMA_INTERRUPT, plat_data->cap_mask); 472 dma_cap_set(DMA_INTERRUPT, plat_data->cap_mask);
474 break; 473 break;
475 case IOP13XX_INIT_ADMA_1: 474 case IOP13XX_INIT_ADMA_1:
@@ -479,7 +478,6 @@ void __init iop13xx_platform_init(void)
479 dma_cap_set(DMA_MEMCPY, plat_data->cap_mask); 478 dma_cap_set(DMA_MEMCPY, plat_data->cap_mask);
480 dma_cap_set(DMA_XOR, plat_data->cap_mask); 479 dma_cap_set(DMA_XOR, plat_data->cap_mask);
481 dma_cap_set(DMA_XOR_VAL, plat_data->cap_mask); 480 dma_cap_set(DMA_XOR_VAL, plat_data->cap_mask);
482 dma_cap_set(DMA_MEMSET, plat_data->cap_mask);
483 dma_cap_set(DMA_INTERRUPT, plat_data->cap_mask); 481 dma_cap_set(DMA_INTERRUPT, plat_data->cap_mask);
484 break; 482 break;
485 case IOP13XX_INIT_ADMA_2: 483 case IOP13XX_INIT_ADMA_2:
@@ -489,7 +487,6 @@ void __init iop13xx_platform_init(void)
489 dma_cap_set(DMA_MEMCPY, plat_data->cap_mask); 487 dma_cap_set(DMA_MEMCPY, plat_data->cap_mask);
490 dma_cap_set(DMA_XOR, plat_data->cap_mask); 488 dma_cap_set(DMA_XOR, plat_data->cap_mask);
491 dma_cap_set(DMA_XOR_VAL, plat_data->cap_mask); 489 dma_cap_set(DMA_XOR_VAL, plat_data->cap_mask);
492 dma_cap_set(DMA_MEMSET, plat_data->cap_mask);
493 dma_cap_set(DMA_INTERRUPT, plat_data->cap_mask); 490 dma_cap_set(DMA_INTERRUPT, plat_data->cap_mask);
494 dma_cap_set(DMA_PQ, plat_data->cap_mask); 491 dma_cap_set(DMA_PQ, plat_data->cap_mask);
495 dma_cap_set(DMA_PQ_VAL, plat_data->cap_mask); 492 dma_cap_set(DMA_PQ_VAL, plat_data->cap_mask);
@@ -597,7 +594,7 @@ __setup("iop13xx_init_adma", iop13xx_init_adma_setup);
597__setup("iop13xx_init_uart", iop13xx_init_uart_setup); 594__setup("iop13xx_init_uart", iop13xx_init_uart_setup);
598__setup("iop13xx_init_i2c", iop13xx_init_i2c_setup); 595__setup("iop13xx_init_i2c", iop13xx_init_i2c_setup);
599 596
600void iop13xx_restart(char mode, const char *cmd) 597void iop13xx_restart(enum reboot_mode mode, const char *cmd)
601{ 598{
602 /* 599 /*
603 * Reset the internal bus (warning both cores are reset) 600 * Reset the internal bus (warning both cores are reset)
diff --git a/arch/arm/mach-iop32x/n2100.c b/arch/arm/mach-iop32x/n2100.c
index ea0984a7449e..069144300b77 100644
--- a/arch/arm/mach-iop32x/n2100.c
+++ b/arch/arm/mach-iop32x/n2100.c
@@ -286,7 +286,7 @@ static void n2100_power_off(void)
286 ; 286 ;
287} 287}
288 288
289static void n2100_restart(char mode, const char *cmd) 289static void n2100_restart(enum reboot_mode mode, const char *cmd)
290{ 290{
291 gpio_line_set(N2100_HARDWARE_RESET, GPIO_LOW); 291 gpio_line_set(N2100_HARDWARE_RESET, GPIO_LOW);
292 gpio_line_config(N2100_HARDWARE_RESET, GPIO_OUT); 292 gpio_line_config(N2100_HARDWARE_RESET, GPIO_OUT);
diff --git a/arch/arm/mach-ixp4xx/Kconfig b/arch/arm/mach-ixp4xx/Kconfig
index 73a2d905af8a..30e1ebe3a891 100644
--- a/arch/arm/mach-ixp4xx/Kconfig
+++ b/arch/arm/mach-ixp4xx/Kconfig
@@ -235,7 +235,6 @@ config IXP4XX_QMGR
235config IXP4XX_NPE 235config IXP4XX_NPE
236 tristate "IXP4xx Network Processor Engine support" 236 tristate "IXP4xx Network Processor Engine support"
237 select FW_LOADER 237 select FW_LOADER
238 select HOTPLUG
239 help 238 help
240 This driver supports IXP4xx built-in network coprocessors 239 This driver supports IXP4xx built-in network coprocessors
241 and is automatically selected by Ethernet and HSS drivers. 240 and is automatically selected by Ethernet and HSS drivers.
diff --git a/arch/arm/mach-ixp4xx/common.c b/arch/arm/mach-ixp4xx/common.c
index 6600cff6bd92..5327decde5a0 100644
--- a/arch/arm/mach-ixp4xx/common.c
+++ b/arch/arm/mach-ixp4xx/common.c
@@ -30,6 +30,7 @@
30#include <linux/export.h> 30#include <linux/export.h>
31#include <linux/gpio.h> 31#include <linux/gpio.h>
32#include <linux/cpu.h> 32#include <linux/cpu.h>
33#include <linux/sched_clock.h>
33 34
34#include <mach/udc.h> 35#include <mach/udc.h>
35#include <mach/hardware.h> 36#include <mach/hardware.h>
@@ -38,7 +39,6 @@
38#include <asm/pgtable.h> 39#include <asm/pgtable.h>
39#include <asm/page.h> 40#include <asm/page.h>
40#include <asm/irq.h> 41#include <asm/irq.h>
41#include <asm/sched_clock.h>
42#include <asm/system_misc.h> 42#include <asm/system_misc.h>
43 43
44#include <asm/mach/map.h> 44#include <asm/mach/map.h>
@@ -531,9 +531,9 @@ static void __init ixp4xx_clockevent_init(void)
531 0xf, 0xfffffffe); 531 0xf, 0xfffffffe);
532} 532}
533 533
534void ixp4xx_restart(char mode, const char *cmd) 534void ixp4xx_restart(enum reboot_mode mode, const char *cmd)
535{ 535{
536 if ( 1 && mode == 's') { 536 if ( 1 && mode == REBOOT_SOFT) {
537 /* Jump into ROM at address 0 */ 537 /* Jump into ROM at address 0 */
538 soft_restart(0); 538 soft_restart(0);
539 } else { 539 } else {
@@ -559,7 +559,7 @@ void ixp4xx_restart(char mode, const char *cmd)
559 * fallback to the default. 559 * fallback to the default.
560 */ 560 */
561 561
562static void __iomem *ixp4xx_ioremap_caller(unsigned long addr, size_t size, 562static void __iomem *ixp4xx_ioremap_caller(phys_addr_t addr, size_t size,
563 unsigned int mtype, void *caller) 563 unsigned int mtype, void *caller)
564{ 564{
565 if (!is_pci_memory(addr)) 565 if (!is_pci_memory(addr))
diff --git a/arch/arm/mach-ixp4xx/dsmg600-setup.c b/arch/arm/mach-ixp4xx/dsmg600-setup.c
index 5d413f8c5700..63de1b3fd06b 100644
--- a/arch/arm/mach-ixp4xx/dsmg600-setup.c
+++ b/arch/arm/mach-ixp4xx/dsmg600-setup.c
@@ -27,6 +27,8 @@
27#include <linux/i2c.h> 27#include <linux/i2c.h>
28#include <linux/i2c-gpio.h> 28#include <linux/i2c-gpio.h>
29 29
30#include <mach/hardware.h>
31
30#include <asm/mach-types.h> 32#include <asm/mach-types.h>
31#include <asm/mach/arch.h> 33#include <asm/mach/arch.h>
32#include <asm/mach/flash.h> 34#include <asm/mach/flash.h>
diff --git a/arch/arm/mach-ixp4xx/include/mach/platform.h b/arch/arm/mach-ixp4xx/include/mach/platform.h
index db5afb69c123..4c4c6a6f4526 100644
--- a/arch/arm/mach-ixp4xx/include/mach/platform.h
+++ b/arch/arm/mach-ixp4xx/include/mach/platform.h
@@ -13,6 +13,8 @@
13 13
14#ifndef __ASSEMBLY__ 14#ifndef __ASSEMBLY__
15 15
16#include <linux/reboot.h>
17
16#include <asm/types.h> 18#include <asm/types.h>
17 19
18#ifndef __ARMEB__ 20#ifndef __ARMEB__
@@ -123,7 +125,7 @@ extern void ixp4xx_init_early(void);
123extern void ixp4xx_init_irq(void); 125extern void ixp4xx_init_irq(void);
124extern void ixp4xx_sys_init(void); 126extern void ixp4xx_sys_init(void);
125extern void ixp4xx_timer_init(void); 127extern void ixp4xx_timer_init(void);
126extern void ixp4xx_restart(char, const char *); 128extern void ixp4xx_restart(enum reboot_mode, const char *);
127extern void ixp4xx_pci_preinit(void); 129extern void ixp4xx_pci_preinit(void);
128struct pci_sys_data; 130struct pci_sys_data;
129extern int ixp4xx_setup(int nr, struct pci_sys_data *sys); 131extern int ixp4xx_setup(int nr, struct pci_sys_data *sys);
diff --git a/arch/arm/mach-ixp4xx/include/mach/timex.h b/arch/arm/mach-ixp4xx/include/mach/timex.h
index c9e930f29339..0396d89f947c 100644
--- a/arch/arm/mach-ixp4xx/include/mach/timex.h
+++ b/arch/arm/mach-ixp4xx/include/mach/timex.h
@@ -3,7 +3,7 @@
3 * 3 *
4 */ 4 */
5 5
6#include <mach/hardware.h> 6#include <mach/ixp4xx-regs.h>
7 7
8/* 8/*
9 * We use IXP425 General purpose timer for our timer needs, it runs at 9 * We use IXP425 General purpose timer for our timer needs, it runs at
diff --git a/arch/arm/mach-ixp4xx/omixp-setup.c b/arch/arm/mach-ixp4xx/omixp-setup.c
index 46a89f5e8269..75ef03dc9964 100644
--- a/arch/arm/mach-ixp4xx/omixp-setup.c
+++ b/arch/arm/mach-ixp4xx/omixp-setup.c
@@ -27,6 +27,8 @@
27#include <asm/mach/arch.h> 27#include <asm/mach/arch.h>
28#include <asm/mach/flash.h> 28#include <asm/mach/flash.h>
29 29
30#include <mach/hardware.h>
31
30static struct resource omixp_flash_resources[] = { 32static struct resource omixp_flash_resources[] = {
31 { 33 {
32 .flags = IORESOURCE_MEM, 34 .flags = IORESOURCE_MEM,
diff --git a/arch/arm/mach-keystone/Kconfig b/arch/arm/mach-keystone/Kconfig
new file mode 100644
index 000000000000..51a50e996840
--- /dev/null
+++ b/arch/arm/mach-keystone/Kconfig
@@ -0,0 +1,15 @@
1config ARCH_KEYSTONE
2 bool "Texas Instruments Keystone Devices"
3 depends on ARCH_MULTI_V7
4 select CPU_V7
5 select ARM_GIC
6 select HAVE_ARM_ARCH_TIMER
7 select HAVE_SMP
8 select CLKSRC_MMIO
9 select GENERIC_CLOCKEVENTS
10 select HAVE_SCHED_CLOCK
11 select ARCH_WANT_OPTIONAL_GPIOLIB
12 select ARM_ERRATA_798181 if SMP
13 help
14 Support for boards based on the Texas Instruments Keystone family of
15 SoCs.
diff --git a/arch/arm/mach-keystone/Makefile b/arch/arm/mach-keystone/Makefile
new file mode 100644
index 000000000000..ddc52b05dc84
--- /dev/null
+++ b/arch/arm/mach-keystone/Makefile
@@ -0,0 +1,6 @@
1obj-y := keystone.o smc.o
2
3plus_sec := $(call as-instr,.arch_extension sec,+sec)
4AFLAGS_smc.o :=-Wa,-march=armv7-a$(plus_sec)
5
6obj-$(CONFIG_SMP) += platsmp.o
diff --git a/arch/arm/mach-keystone/Makefile.boot b/arch/arm/mach-keystone/Makefile.boot
new file mode 100644
index 000000000000..f3835c43af61
--- /dev/null
+++ b/arch/arm/mach-keystone/Makefile.boot
@@ -0,0 +1 @@
zreladdr-y := 0x80008000
diff --git a/arch/arm/mach-keystone/keystone.c b/arch/arm/mach-keystone/keystone.c
new file mode 100644
index 000000000000..b661c5c2870a
--- /dev/null
+++ b/arch/arm/mach-keystone/keystone.c
@@ -0,0 +1,75 @@
1/*
2 * Keystone2 based boards and SOC related code.
3 *
4 * Copyright 2013 Texas Instruments, Inc.
5 * Cyril Chemparathy <cyril@ti.com>
6 * Santosh Shilimkar <santosh.shillimkar@ti.com>
7 *
8 * This program is free software; you can redistribute it and/or modify it
9 * under the terms and conditions of the GNU General Public License,
10 * version 2, as published by the Free Software Foundation.
11 */
12#include <linux/io.h>
13#include <linux/of.h>
14#include <linux/init.h>
15#include <linux/of_platform.h>
16#include <linux/of_address.h>
17
18#include <asm/setup.h>
19#include <asm/mach/map.h>
20#include <asm/mach/arch.h>
21#include <asm/mach/time.h>
22#include <asm/smp_plat.h>
23
24#include "keystone.h"
25
26#define PLL_RESET_WRITE_KEY_MASK 0xffff0000
27#define PLL_RESET_WRITE_KEY 0x5a69
28#define PLL_RESET BIT(16)
29
30static void __iomem *keystone_rstctrl;
31
32static void __init keystone_init(void)
33{
34 struct device_node *node;
35
36 node = of_find_compatible_node(NULL, NULL, "ti,keystone-reset");
37 if (WARN_ON(!node))
38 pr_warn("ti,keystone-reset node undefined\n");
39
40 keystone_rstctrl = of_iomap(node, 0);
41 if (WARN_ON(!keystone_rstctrl))
42 pr_warn("ti,keystone-reset iomap error\n");
43
44 of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
45}
46
47static const char *keystone_match[] __initconst = {
48 "ti,keystone-evm",
49 NULL,
50};
51
52void keystone_restart(enum reboot_mode mode, const char *cmd)
53{
54 u32 val;
55
56 BUG_ON(!keystone_rstctrl);
57
58 /* Enable write access to RSTCTRL */
59 val = readl(keystone_rstctrl);
60 val &= PLL_RESET_WRITE_KEY_MASK;
61 val |= PLL_RESET_WRITE_KEY;
62 writel(val, keystone_rstctrl);
63
64 /* Reset the SOC */
65 val = readl(keystone_rstctrl);
66 val &= ~PLL_RESET;
67 writel(val, keystone_rstctrl);
68}
69
70DT_MACHINE_START(KEYSTONE, "Keystone")
71 .smp = smp_ops(keystone_smp_ops),
72 .init_machine = keystone_init,
73 .dt_compat = keystone_match,
74 .restart = keystone_restart,
75MACHINE_END
diff --git a/arch/arm/mach-keystone/keystone.h b/arch/arm/mach-keystone/keystone.h
new file mode 100644
index 000000000000..60bef9dedb12
--- /dev/null
+++ b/arch/arm/mach-keystone/keystone.h
@@ -0,0 +1,23 @@
1/*
2 * Copyright 2013 Texas Instruments, Inc.
3 * Cyril Chemparathy <cyril@ti.com>
4 * Santosh Shilimkar <santosh.shillimkar@ti.com>
5 *
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms and conditions of the GNU General Public License,
8 * version 2, as published by the Free Software Foundation.
9 */
10
11#ifndef __KEYSTONE_H__
12#define __KEYSTONE_H__
13
14#define KEYSTONE_MON_CPU_UP_IDX 0x00
15
16#ifndef __ASSEMBLER__
17
18extern struct smp_operations keystone_smp_ops;
19extern void secondary_startup(void);
20extern u32 keystone_cpu_smc(u32 command, u32 cpu, u32 addr);
21
22#endif /* __ASSEMBLER__ */
23#endif /* __KEYSTONE_H__ */
diff --git a/arch/arm/mach-keystone/platsmp.c b/arch/arm/mach-keystone/platsmp.c
new file mode 100644
index 000000000000..14378e3fef16
--- /dev/null
+++ b/arch/arm/mach-keystone/platsmp.c
@@ -0,0 +1,43 @@
1/*
2 * Keystone SOC SMP platform code
3 *
4 * Copyright 2013 Texas Instruments, Inc.
5 * Cyril Chemparathy <cyril@ti.com>
6 * Santosh Shilimkar <santosh.shillimkar@ti.com>
7 *
8 * Based on platsmp.c, Copyright (C) 2002 ARM Ltd.
9 *
10 * This program is free software; you can redistribute it and/or modify it
11 * under the terms and conditions of the GNU General Public License,
12 * version 2, as published by the Free Software Foundation.
13 */
14
15#include <linux/init.h>
16#include <linux/smp.h>
17#include <linux/io.h>
18
19#include <asm/smp_plat.h>
20#include <asm/prom.h>
21
22#include "keystone.h"
23
24static int keystone_smp_boot_secondary(unsigned int cpu,
25 struct task_struct *idle)
26{
27 unsigned long start = virt_to_phys(&secondary_startup);
28 int error;
29
30 pr_debug("keystone-smp: booting cpu %d, vector %08lx\n",
31 cpu, start);
32
33 error = keystone_cpu_smc(KEYSTONE_MON_CPU_UP_IDX, cpu, start);
34 if (error)
35 pr_err("CPU %d bringup failed with %d\n", cpu, error);
36
37 return error;
38}
39
40struct smp_operations keystone_smp_ops __initdata = {
41 .smp_init_cpus = arm_dt_init_cpu_maps,
42 .smp_boot_secondary = keystone_smp_boot_secondary,
43};
diff --git a/arch/arm/mach-keystone/smc.S b/arch/arm/mach-keystone/smc.S
new file mode 100644
index 000000000000..9b9e4f7b241e
--- /dev/null
+++ b/arch/arm/mach-keystone/smc.S
@@ -0,0 +1,29 @@
1/*
2 * Keystone Secure APIs
3 *
4 * Copyright (C) 2013 Texas Instruments, Inc.
5 * Santosh Shilimkar <santosh.shilimkar@ti.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 version 2 as
9 * published by the Free Software Foundation.
10 */
11
12#include <linux/linkage.h>
13
14/**
15 * u32 keystone_cpu_smc(u32 command, u32 cpu, u32 addr)
16 *
17 * Low level CPU monitor API
18 * @command: Monitor command.
19 * @cpu: CPU Number
20 * @addr: Kernel jump address for boot CPU
21 *
22 * Return: Non zero value on failure
23 */
24ENTRY(keystone_cpu_smc)
25 stmfd sp!, {r4-r12, lr}
26 smc #0
27 dsb
28 ldmfd sp!, {r4-r12, pc}
29ENDPROC(keystone_cpu_smc)
diff --git a/arch/arm/mach-kirkwood/Kconfig b/arch/arm/mach-kirkwood/Kconfig
index 7509a89af967..b634f9650a7b 100644
--- a/arch/arm/mach-kirkwood/Kconfig
+++ b/arch/arm/mach-kirkwood/Kconfig
@@ -8,12 +8,6 @@ config MACH_D2NET_V2
8 Say 'Y' here if you want your kernel to support the 8 Say 'Y' here if you want your kernel to support the
9 LaCie d2 Network v2 NAS. 9 LaCie d2 Network v2 NAS.
10 10
11config MACH_DB88F6281_BP
12 bool "Marvell DB-88F6281-BP Development Board"
13 help
14 Say 'Y' here if you want your kernel to support the
15 Marvell DB-88F6281-BP Development Board.
16
17config MACH_DOCKSTAR 11config MACH_DOCKSTAR
18 bool "Seagate FreeAgent DockStar" 12 bool "Seagate FreeAgent DockStar"
19 help 13 help
@@ -134,13 +128,12 @@ comment "Device tree entries"
134 128
135config ARCH_KIRKWOOD_DT 129config ARCH_KIRKWOOD_DT
136 bool "Marvell Kirkwood Flattened Device Tree" 130 bool "Marvell Kirkwood Flattened Device Tree"
131 select KIRKWOOD_CLK
137 select POWER_SUPPLY 132 select POWER_SUPPLY
138 select POWER_RESET 133 select POWER_RESET
139 select POWER_RESET_GPIO 134 select POWER_RESET_GPIO
140 select REGULATOR 135 select REGULATOR
141 select REGULATOR_FIXED_VOLTAGE 136 select REGULATOR_FIXED_VOLTAGE
142 select MVEBU_CLK_CORE
143 select MVEBU_CLK_GATING
144 select USE_OF 137 select USE_OF
145 help 138 help
146 Say 'Y' here if you want your kernel to support the 139 Say 'Y' here if you want your kernel to support the
@@ -153,6 +146,13 @@ config MACH_CLOUDBOX_DT
153 Say 'Y' here if you want your kernel to support the LaCie 146 Say 'Y' here if you want your kernel to support the LaCie
154 CloudBox NAS, using Flattened Device Tree. 147 CloudBox NAS, using Flattened Device Tree.
155 148
149config MACH_DB88F628X_BP_DT
150 bool "Marvell DB-88F628x-BP Development Board (Flattened Device Tree)"
151 help
152 Say 'Y' here if you want your kernel to support the Marvell
153 DB-88F6281-BP and DB-88F6282-BP Development Board (Flattened
154 Device Tree).
155
156config MACH_DLINK_KIRKWOOD_DT 156config MACH_DLINK_KIRKWOOD_DT
157 bool "D-Link Kirkwood-based NAS (Flattened Device Tree)" 157 bool "D-Link Kirkwood-based NAS (Flattened Device Tree)"
158 select ARCH_KIRKWOOD_DT 158 select ARCH_KIRKWOOD_DT
@@ -227,6 +227,7 @@ config MACH_KM_KIRKWOOD_DT
227config MACH_LSXL_DT 227config MACH_LSXL_DT
228 bool "Buffalo Linkstation LS-XHL, LS-CHLv2 (Flattened Device Tree)" 228 bool "Buffalo Linkstation LS-XHL, LS-CHLv2 (Flattened Device Tree)"
229 select ARCH_KIRKWOOD_DT 229 select ARCH_KIRKWOOD_DT
230 select POWER_RESET_RESTART
230 help 231 help
231 Say 'Y' here if you want your kernel to support the 232 Say 'Y' here if you want your kernel to support the
232 Buffalo Linkstation LS-XHL & LS-CHLv2 devices, using 233 Buffalo Linkstation LS-XHL & LS-CHLv2 devices, using
@@ -272,14 +273,6 @@ config MACH_NETSPACE_V2_DT
272 Say 'Y' here if you want your kernel to support the LaCie 273 Say 'Y' here if you want your kernel to support the LaCie
273 Network Space v2 NAS, using Flattened Device Tree. 274 Network Space v2 NAS, using Flattened Device Tree.
274 275
275config MACH_NSA310_DT
276 bool "ZyXEL NSA-310 (Flattened Device Tree)"
277 select ARCH_KIRKWOOD_DT
278 select ARM_ATAG_DTB_COMPAT
279 help
280 Say 'Y' here if you want your kernel to support the
281 ZyXEL NSA-310 board (Flattened Device Tree).
282
283config MACH_OPENBLOCKS_A6_DT 276config MACH_OPENBLOCKS_A6_DT
284 bool "Plat'Home OpenBlocks A6 (Flattened Device Tree)" 277 bool "Plat'Home OpenBlocks A6 (Flattened Device Tree)"
285 select ARCH_KIRKWOOD_DT 278 select ARCH_KIRKWOOD_DT
@@ -296,6 +289,13 @@ config MACH_READYNAS_DT
296 Say 'Y' here if you want your kernel to support the 289 Say 'Y' here if you want your kernel to support the
297 NETGEAR ReadyNAS Duo v2 using Fattened Device Tree. 290 NETGEAR ReadyNAS Duo v2 using Fattened Device Tree.
298 291
292config MACH_SHEEVAPLUG_DT
293 bool "Marvell (eSATA) SheevaPlug (Flattened Device Tree)"
294 select ARCH_KIRKWOOD_DT
295 help
296 Say 'Y' here if you want your kernel to support the
297 Marvell (eSATA) SheevaPlug (Flattened Device Tree).
298
299config MACH_TOPKICK_DT 299config MACH_TOPKICK_DT
300 bool "USI Topkick (Flattened Device Tree)" 300 bool "USI Topkick (Flattened Device Tree)"
301 select ARCH_KIRKWOOD_DT 301 select ARCH_KIRKWOOD_DT
@@ -308,6 +308,7 @@ config MACH_TS219_DT
308 select ARCH_KIRKWOOD_DT 308 select ARCH_KIRKWOOD_DT
309 select ARM_APPENDED_DTB 309 select ARM_APPENDED_DTB
310 select ARM_ATAG_DTB_COMPAT 310 select ARM_ATAG_DTB_COMPAT
311 select POWER_RESET_QNAP
311 help 312 help
312 Say 'Y' here if you want your kernel to support the QNAP 313 Say 'Y' here if you want your kernel to support the QNAP
313 TS-110, TS-119, TS-119P+, TS-210, TS-219, TS-219P and 314 TS-110, TS-119, TS-119P+, TS-210, TS-219, TS-219P and
diff --git a/arch/arm/mach-kirkwood/Makefile b/arch/arm/mach-kirkwood/Makefile
index e1f3735d3415..ac4cd75dd499 100644
--- a/arch/arm/mach-kirkwood/Makefile
+++ b/arch/arm/mach-kirkwood/Makefile
@@ -1,7 +1,6 @@
1obj-y += common.o irq.o pcie.o mpp.o 1obj-y += common.o irq.o pcie.o mpp.o
2 2
3obj-$(CONFIG_MACH_D2NET_V2) += d2net_v2-setup.o lacie_v2-common.o 3obj-$(CONFIG_MACH_D2NET_V2) += d2net_v2-setup.o lacie_v2-common.o
4obj-$(CONFIG_MACH_DB88F6281_BP) += db88f6281-bp-setup.o
5obj-$(CONFIG_MACH_DOCKSTAR) += dockstar-setup.o 4obj-$(CONFIG_MACH_DOCKSTAR) += dockstar-setup.o
6obj-$(CONFIG_MACH_ESATA_SHEEVAPLUG) += sheevaplug-setup.o 5obj-$(CONFIG_MACH_ESATA_SHEEVAPLUG) += sheevaplug-setup.o
7obj-$(CONFIG_MACH_GURUPLUG) += guruplug-setup.o 6obj-$(CONFIG_MACH_GURUPLUG) += guruplug-setup.o
@@ -21,6 +20,7 @@ obj-$(CONFIG_MACH_TS41X) += ts41x-setup.o tsx1x-common.o
21 20
22obj-$(CONFIG_ARCH_KIRKWOOD_DT) += board-dt.o 21obj-$(CONFIG_ARCH_KIRKWOOD_DT) += board-dt.o
23obj-$(CONFIG_MACH_CLOUDBOX_DT) += board-ns2.o 22obj-$(CONFIG_MACH_CLOUDBOX_DT) += board-ns2.o
23obj-$(CONFIG_MACH_DB88F628X_BP_DT) += board-db88f628x-bp.o
24obj-$(CONFIG_MACH_DLINK_KIRKWOOD_DT) += board-dnskw.o 24obj-$(CONFIG_MACH_DLINK_KIRKWOOD_DT) += board-dnskw.o
25obj-$(CONFIG_MACH_DOCKSTAR_DT) += board-dockstar.o 25obj-$(CONFIG_MACH_DOCKSTAR_DT) += board-dockstar.o
26obj-$(CONFIG_MACH_DREAMPLUG_DT) += board-dreamplug.o 26obj-$(CONFIG_MACH_DREAMPLUG_DT) += board-dreamplug.o
@@ -37,8 +37,8 @@ obj-$(CONFIG_MACH_NETSPACE_LITE_V2_DT) += board-ns2.o
37obj-$(CONFIG_MACH_NETSPACE_MAX_V2_DT) += board-ns2.o 37obj-$(CONFIG_MACH_NETSPACE_MAX_V2_DT) += board-ns2.o
38obj-$(CONFIG_MACH_NETSPACE_MINI_V2_DT) += board-ns2.o 38obj-$(CONFIG_MACH_NETSPACE_MINI_V2_DT) += board-ns2.o
39obj-$(CONFIG_MACH_NETSPACE_V2_DT) += board-ns2.o 39obj-$(CONFIG_MACH_NETSPACE_V2_DT) += board-ns2.o
40obj-$(CONFIG_MACH_NSA310_DT) += board-nsa310.o
41obj-$(CONFIG_MACH_OPENBLOCKS_A6_DT) += board-openblocks_a6.o 40obj-$(CONFIG_MACH_OPENBLOCKS_A6_DT) += board-openblocks_a6.o
42obj-$(CONFIG_MACH_READYNAS_DT) += board-readynas.o 41obj-$(CONFIG_MACH_READYNAS_DT) += board-readynas.o
42obj-$(CONFIG_MACH_SHEEVAPLUG_DT) += board-sheevaplug.o
43obj-$(CONFIG_MACH_TOPKICK_DT) += board-usi_topkick.o 43obj-$(CONFIG_MACH_TOPKICK_DT) += board-usi_topkick.o
44obj-$(CONFIG_MACH_TS219_DT) += board-ts219.o tsx1x-common.o 44obj-$(CONFIG_MACH_TS219_DT) += board-ts219.o tsx1x-common.o
diff --git a/arch/arm/mach-kirkwood/board-db88f628x-bp.c b/arch/arm/mach-kirkwood/board-db88f628x-bp.c
new file mode 100644
index 000000000000..2f574bc8ed40
--- /dev/null
+++ b/arch/arm/mach-kirkwood/board-db88f628x-bp.c
@@ -0,0 +1,24 @@
1/*
2 * Saeed Bishara <saeed@marvell.com>
3 *
4 * Marvell DB-88F628{1,2}-BP Development Board Setup
5 *
6 * This file is licensed under the terms of the GNU General Public
7 * License version 2. This program is licensed "as is" without any
8 * warranty of any kind, whether express or implied.
9 */
10
11#include <linux/kernel.h>
12#include <linux/init.h>
13#include <linux/of.h>
14#include <linux/mv643xx_eth.h>
15#include "common.h"
16
17static struct mv643xx_eth_platform_data db88f628x_ge00_data = {
18 .phy_addr = MV643XX_ETH_PHY_ADDR(8),
19};
20
21void __init db88f628x_init(void)
22{
23 kirkwood_ge00_init(&db88f628x_ge00_data);
24}
diff --git a/arch/arm/mach-kirkwood/board-dt.c b/arch/arm/mach-kirkwood/board-dt.c
index e9647b80cb59..6e122ed3282f 100644
--- a/arch/arm/mach-kirkwood/board-dt.c
+++ b/arch/arm/mach-kirkwood/board-dt.c
@@ -15,7 +15,6 @@
15#include <linux/of.h> 15#include <linux/of.h>
16#include <linux/of_platform.h> 16#include <linux/of_platform.h>
17#include <linux/clk-provider.h> 17#include <linux/clk-provider.h>
18#include <linux/clk/mvebu.h>
19#include <linux/kexec.h> 18#include <linux/kexec.h>
20#include <asm/mach/arch.h> 19#include <asm/mach/arch.h>
21#include <asm/mach/map.h> 20#include <asm/mach/map.h>
@@ -25,11 +24,6 @@
25#include <plat/common.h> 24#include <plat/common.h>
26#include "common.h" 25#include "common.h"
27 26
28static struct of_device_id kirkwood_dt_match_table[] __initdata = {
29 { .compatible = "simple-bus", },
30 { }
31};
32
33/* 27/*
34 * There are still devices that doesn't know about DT yet. Get clock 28 * There are still devices that doesn't know about DT yet. Get clock
35 * gates here and add a clock lookup alias, so that old platform 29 * gates here and add a clock lookup alias, so that old platform
@@ -77,7 +71,7 @@ static void __init kirkwood_legacy_clk_init(void)
77 71
78static void __init kirkwood_of_clk_init(void) 72static void __init kirkwood_of_clk_init(void)
79{ 73{
80 mvebu_clocks_init(); 74 of_clk_init(NULL);
81 kirkwood_legacy_clk_init(); 75 kirkwood_legacy_clk_init();
82} 76}
83 77
@@ -97,6 +91,8 @@ static void __init kirkwood_dt_init(void)
97 91
98 kirkwood_l2_init(); 92 kirkwood_l2_init();
99 93
94 kirkwood_cpufreq_init();
95
100 /* Setup root of clk tree */ 96 /* Setup root of clk tree */
101 kirkwood_of_clk_init(); 97 kirkwood_of_clk_init();
102 98
@@ -112,6 +108,9 @@ static void __init kirkwood_dt_init(void)
112 if (of_machine_is_compatible("globalscale,guruplug")) 108 if (of_machine_is_compatible("globalscale,guruplug"))
113 guruplug_dt_init(); 109 guruplug_dt_init();
114 110
111 if (of_machine_is_compatible("globalscale,sheevaplug"))
112 sheevaplug_dt_init();
113
115 if (of_machine_is_compatible("dlink,dns-kirkwood")) 114 if (of_machine_is_compatible("dlink,dns-kirkwood"))
116 dnskw_init(); 115 dnskw_init();
117 116
@@ -147,6 +146,10 @@ static void __init kirkwood_dt_init(void)
147 of_machine_is_compatible("lacie,netspace_v2")) 146 of_machine_is_compatible("lacie,netspace_v2"))
148 ns2_init(); 147 ns2_init();
149 148
149 if (of_machine_is_compatible("marvell,db-88f6281-bp") ||
150 of_machine_is_compatible("marvell,db-88f6282-bp"))
151 db88f628x_init();
152
150 if (of_machine_is_compatible("mpl,cec4")) 153 if (of_machine_is_compatible("mpl,cec4"))
151 mplcec4_init(); 154 mplcec4_init();
152 155
@@ -159,12 +162,13 @@ static void __init kirkwood_dt_init(void)
159 if (of_machine_is_compatible("usi,topkick")) 162 if (of_machine_is_compatible("usi,topkick"))
160 usi_topkick_init(); 163 usi_topkick_init();
161 164
162 of_platform_populate(NULL, kirkwood_dt_match_table, NULL, NULL); 165 of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
163} 166}
164 167
165static const char * const kirkwood_dt_board_compat[] = { 168static const char * const kirkwood_dt_board_compat[] = {
166 "globalscale,dreamplug", 169 "globalscale,dreamplug",
167 "globalscale,guruplug", 170 "globalscale,guruplug",
171 "globalscale,sheevaplug",
168 "dlink,dns-320", 172 "dlink,dns-320",
169 "dlink,dns-325", 173 "dlink,dns-325",
170 "iom,iconnect", 174 "iom,iconnect",
@@ -181,6 +185,8 @@ static const char * const kirkwood_dt_board_compat[] = {
181 "lacie,netspace_max_v2", 185 "lacie,netspace_max_v2",
182 "lacie,netspace_mini_v2", 186 "lacie,netspace_mini_v2",
183 "lacie,netspace_v2", 187 "lacie,netspace_v2",
188 "marvell,db-88f6281-bp",
189 "marvell,db-88f6282-bp",
184 "mpl,cec4", 190 "mpl,cec4",
185 "netgear,readynas-duo-v2", 191 "netgear,readynas-duo-v2",
186 "plathome,openblocks-a6", 192 "plathome,openblocks-a6",
diff --git a/arch/arm/mach-kirkwood/board-iconnect.c b/arch/arm/mach-kirkwood/board-iconnect.c
index c8ebde4919e2..98b5ad1bba90 100644
--- a/arch/arm/mach-kirkwood/board-iconnect.c
+++ b/arch/arm/mach-kirkwood/board-iconnect.c
@@ -22,11 +22,3 @@ void __init iconnect_init(void)
22{ 22{
23 kirkwood_ge00_init(&iconnect_ge00_data); 23 kirkwood_ge00_init(&iconnect_ge00_data);
24} 24}
25
26static int __init iconnect_pci_init(void)
27{
28 if (of_machine_is_compatible("iom,iconnect"))
29 kirkwood_pcie_init(KW_PCIE0);
30 return 0;
31}
32subsys_initcall(iconnect_pci_init);
diff --git a/arch/arm/mach-kirkwood/board-lsxl.c b/arch/arm/mach-kirkwood/board-lsxl.c
index 4ec8b7ae784a..348395238df6 100644
--- a/arch/arm/mach-kirkwood/board-lsxl.c
+++ b/arch/arm/mach-kirkwood/board-lsxl.c
@@ -25,19 +25,6 @@ static struct mv643xx_eth_platform_data lsxl_ge01_data = {
25 .phy_addr = MV643XX_ETH_PHY_ADDR(8), 25 .phy_addr = MV643XX_ETH_PHY_ADDR(8),
26}; 26};
27 27
28/*
29 * On the LS-XHL/LS-CHLv2, the shutdown process is following:
30 * - Userland monitors key events until the power switch goes to off position
31 * - The board reboots
32 * - U-boot starts and goes into an idle mode waiting for the user
33 * to move the switch to ON position
34 *
35 */
36static void lsxl_power_off(void)
37{
38 kirkwood_restart('h', NULL);
39}
40
41void __init lsxl_init(void) 28void __init lsxl_init(void)
42{ 29{
43 /* 30 /*
@@ -46,7 +33,4 @@ void __init lsxl_init(void)
46 33
47 kirkwood_ge00_init(&lsxl_ge00_data); 34 kirkwood_ge00_init(&lsxl_ge00_data);
48 kirkwood_ge01_init(&lsxl_ge01_data); 35 kirkwood_ge01_init(&lsxl_ge01_data);
49
50 /* register power-off method */
51 pm_power_off = lsxl_power_off;
52} 36}
diff --git a/arch/arm/mach-kirkwood/board-mplcec4.c b/arch/arm/mach-kirkwood/board-mplcec4.c
index 7d6dc669e17f..938712e248f1 100644
--- a/arch/arm/mach-kirkwood/board-mplcec4.c
+++ b/arch/arm/mach-kirkwood/board-mplcec4.c
@@ -29,7 +29,6 @@ void __init mplcec4_init(void)
29 */ 29 */
30 kirkwood_ge00_init(&mplcec4_ge00_data); 30 kirkwood_ge00_init(&mplcec4_ge00_data);
31 kirkwood_ge01_init(&mplcec4_ge01_data); 31 kirkwood_ge01_init(&mplcec4_ge01_data);
32 kirkwood_pcie_init(KW_PCIE0);
33} 32}
34 33
35 34
diff --git a/arch/arm/mach-kirkwood/board-nsa310.c b/arch/arm/mach-kirkwood/board-nsa310.c
deleted file mode 100644
index 55ade93b93bf..000000000000
--- a/arch/arm/mach-kirkwood/board-nsa310.c
+++ /dev/null
@@ -1,25 +0,0 @@
1/*
2 * arch/arm/mach-kirkwood/nsa-310-setup.c
3 *
4 * ZyXEL NSA-310 Setup
5 *
6 * This file is licensed under the terms of the GNU General Public
7 * License version 2. This program is licensed "as is" without any
8 * warranty of any kind, whether express or implied.
9 */
10
11#include <linux/kernel.h>
12#include <linux/init.h>
13#include <mach/kirkwood.h>
14#include <linux/of.h>
15#include "common.h"
16
17static int __init nsa310_pci_init(void)
18{
19 if (of_machine_is_compatible("zyxel,nsa310"))
20 kirkwood_pcie_init(KW_PCIE0);
21
22 return 0;
23}
24
25subsys_initcall(nsa310_pci_init);
diff --git a/arch/arm/mach-kirkwood/board-readynas.c b/arch/arm/mach-kirkwood/board-readynas.c
index fb42c20e273f..341b82d9cadb 100644
--- a/arch/arm/mach-kirkwood/board-readynas.c
+++ b/arch/arm/mach-kirkwood/board-readynas.c
@@ -24,5 +24,4 @@ static struct mv643xx_eth_platform_data netgear_readynas_ge00_data = {
24void __init netgear_readynas_init(void) 24void __init netgear_readynas_init(void)
25{ 25{
26 kirkwood_ge00_init(&netgear_readynas_ge00_data); 26 kirkwood_ge00_init(&netgear_readynas_ge00_data);
27 kirkwood_pcie_init(KW_PCIE0);
28} 27}
diff --git a/arch/arm/mach-kirkwood/board-sheevaplug.c b/arch/arm/mach-kirkwood/board-sheevaplug.c
new file mode 100644
index 000000000000..fa389373ca74
--- /dev/null
+++ b/arch/arm/mach-kirkwood/board-sheevaplug.c
@@ -0,0 +1,27 @@
1/*
2 * arch/arm/mach-kirkwood/board-sheevaplug.c
3 *
4 * Marvell Sheevaplug Reference Board Init for drivers not converted to
5 * flattened device tree yet.
6 *
7 * This file is licensed under the terms of the GNU General Public
8 * License version 2. This program is licensed "as is" without any
9 * warranty of any kind, whether express or implied.
10 */
11
12#include <linux/kernel.h>
13#include <linux/init.h>
14#include <linux/mv643xx_eth.h>
15#include "common.h"
16
17static struct mv643xx_eth_platform_data sheevaplug_ge00_data = {
18 .phy_addr = MV643XX_ETH_PHY_ADDR(0),
19};
20
21void __init sheevaplug_dt_init(void)
22{
23 /*
24 * Basic setup. Needs to be called early.
25 */
26 kirkwood_ge00_init(&sheevaplug_ge00_data);
27}
diff --git a/arch/arm/mach-kirkwood/board-ts219.c b/arch/arm/mach-kirkwood/board-ts219.c
index 4695d5f35fc9..860f44ab457d 100644
--- a/arch/arm/mach-kirkwood/board-ts219.c
+++ b/arch/arm/mach-kirkwood/board-ts219.c
@@ -23,7 +23,6 @@
23#include <asm/mach/arch.h> 23#include <asm/mach/arch.h>
24#include <mach/kirkwood.h> 24#include <mach/kirkwood.h>
25#include "common.h" 25#include "common.h"
26#include "tsx1x-common.h"
27 26
28static struct mv643xx_eth_platform_data qnap_ts219_ge00_data = { 27static struct mv643xx_eth_platform_data qnap_ts219_ge00_data = {
29 .phy_addr = MV643XX_ETH_PHY_ADDR(8), 28 .phy_addr = MV643XX_ETH_PHY_ADDR(8),
@@ -38,6 +37,4 @@ void __init qnap_dt_ts219_init(void)
38 qnap_ts219_ge00_data.phy_addr = MV643XX_ETH_PHY_ADDR(0); 37 qnap_ts219_ge00_data.phy_addr = MV643XX_ETH_PHY_ADDR(0);
39 38
40 kirkwood_ge00_init(&qnap_ts219_ge00_data); 39 kirkwood_ge00_init(&qnap_ts219_ge00_data);
41
42 pm_power_off = qnap_tsx1x_power_off;
43} 40}
diff --git a/arch/arm/mach-kirkwood/common.c b/arch/arm/mach-kirkwood/common.c
index f38922897563..e9238b5567ee 100644
--- a/arch/arm/mach-kirkwood/common.c
+++ b/arch/arm/mach-kirkwood/common.c
@@ -20,6 +20,7 @@
20#include <linux/mv643xx_i2c.h> 20#include <linux/mv643xx_i2c.h>
21#include <linux/timex.h> 21#include <linux/timex.h>
22#include <linux/kexec.h> 22#include <linux/kexec.h>
23#include <linux/reboot.h>
23#include <net/dsa.h> 24#include <net/dsa.h>
24#include <asm/page.h> 25#include <asm/page.h>
25#include <asm/mach/map.h> 26#include <asm/mach/map.h>
@@ -598,6 +599,29 @@ void __init kirkwood_audio_init(void)
598} 599}
599 600
600/***************************************************************************** 601/*****************************************************************************
602 * CPU Frequency
603 ****************************************************************************/
604static struct resource kirkwood_cpufreq_resources[] = {
605 [0] = {
606 .start = CPU_CONTROL_PHYS,
607 .end = CPU_CONTROL_PHYS + 3,
608 .flags = IORESOURCE_MEM,
609 },
610};
611
612static struct platform_device kirkwood_cpufreq_device = {
613 .name = "kirkwood-cpufreq",
614 .id = -1,
615 .num_resources = ARRAY_SIZE(kirkwood_cpufreq_resources),
616 .resource = kirkwood_cpufreq_resources,
617};
618
619void __init kirkwood_cpufreq_init(void)
620{
621 platform_device_register(&kirkwood_cpufreq_device);
622}
623
624/*****************************************************************************
601 * General 625 * General
602 ****************************************************************************/ 626 ****************************************************************************/
603/* 627/*
@@ -648,30 +672,6 @@ char * __init kirkwood_id(void)
648 672
649void __init kirkwood_setup_wins(void) 673void __init kirkwood_setup_wins(void)
650{ 674{
651 /*
652 * The PCIe windows will no longer be statically allocated
653 * here once Kirkwood is migrated to the pci-mvebu driver.
654 */
655 mvebu_mbus_add_window_remap_flags("pcie0.0",
656 KIRKWOOD_PCIE_IO_PHYS_BASE,
657 KIRKWOOD_PCIE_IO_SIZE,
658 KIRKWOOD_PCIE_IO_BUS_BASE,
659 MVEBU_MBUS_PCI_IO);
660 mvebu_mbus_add_window_remap_flags("pcie0.0",
661 KIRKWOOD_PCIE_MEM_PHYS_BASE,
662 KIRKWOOD_PCIE_MEM_SIZE,
663 MVEBU_MBUS_NO_REMAP,
664 MVEBU_MBUS_PCI_MEM);
665 mvebu_mbus_add_window_remap_flags("pcie1.0",
666 KIRKWOOD_PCIE1_IO_PHYS_BASE,
667 KIRKWOOD_PCIE1_IO_SIZE,
668 KIRKWOOD_PCIE1_IO_BUS_BASE,
669 MVEBU_MBUS_PCI_IO);
670 mvebu_mbus_add_window_remap_flags("pcie1.0",
671 KIRKWOOD_PCIE1_MEM_PHYS_BASE,
672 KIRKWOOD_PCIE1_MEM_SIZE,
673 MVEBU_MBUS_NO_REMAP,
674 MVEBU_MBUS_PCI_MEM);
675 mvebu_mbus_add_window("nand", KIRKWOOD_NAND_MEM_PHYS_BASE, 675 mvebu_mbus_add_window("nand", KIRKWOOD_NAND_MEM_PHYS_BASE,
676 KIRKWOOD_NAND_MEM_SIZE); 676 KIRKWOOD_NAND_MEM_SIZE);
677 mvebu_mbus_add_window("sram", KIRKWOOD_SRAM_PHYS_BASE, 677 mvebu_mbus_add_window("sram", KIRKWOOD_SRAM_PHYS_BASE,
@@ -723,7 +723,7 @@ void __init kirkwood_init(void)
723#endif 723#endif
724} 724}
725 725
726void kirkwood_restart(char mode, const char *cmd) 726void kirkwood_restart(enum reboot_mode mode, const char *cmd)
727{ 727{
728 /* 728 /*
729 * Enable soft reset to assert RSTOUTn. 729 * Enable soft reset to assert RSTOUTn.
diff --git a/arch/arm/mach-kirkwood/common.h b/arch/arm/mach-kirkwood/common.h
index 21da3b1ebd7b..fcf3ba682e24 100644
--- a/arch/arm/mach-kirkwood/common.h
+++ b/arch/arm/mach-kirkwood/common.h
@@ -11,6 +11,8 @@
11#ifndef __ARCH_KIRKWOOD_COMMON_H 11#ifndef __ARCH_KIRKWOOD_COMMON_H
12#define __ARCH_KIRKWOOD_COMMON_H 12#define __ARCH_KIRKWOOD_COMMON_H
13 13
14#include <linux/reboot.h>
15
14struct dsa_platform_data; 16struct dsa_platform_data;
15struct mv643xx_eth_platform_data; 17struct mv643xx_eth_platform_data;
16struct mv_sata_platform_data; 18struct mv_sata_platform_data;
@@ -51,7 +53,9 @@ void kirkwood_nand_init_rnb(struct mtd_partition *parts, int nr_parts,
51 int (*dev_ready)(struct mtd_info *)); 53 int (*dev_ready)(struct mtd_info *));
52void kirkwood_audio_init(void); 54void kirkwood_audio_init(void);
53void kirkwood_cpuidle_init(void); 55void kirkwood_cpuidle_init(void);
54void kirkwood_restart(char, const char *); 56void kirkwood_cpufreq_init(void);
57
58void kirkwood_restart(enum reboot_mode, const char *);
55void kirkwood_clk_init(void); 59void kirkwood_clk_init(void);
56 60
57/* board init functions for boards not fully converted to fdt */ 61/* board init functions for boards not fully converted to fdt */
@@ -65,6 +69,11 @@ void guruplug_dt_init(void);
65#else 69#else
66static inline void guruplug_dt_init(void) {}; 70static inline void guruplug_dt_init(void) {};
67#endif 71#endif
72#ifdef CONFIG_MACH_SHEEVAPLUG_DT
73void sheevaplug_dt_init(void);
74#else
75static inline void sheevaplug_dt_init(void) {};
76#endif
68#ifdef CONFIG_MACH_TS219_DT 77#ifdef CONFIG_MACH_TS219_DT
69void qnap_dt_ts219_init(void); 78void qnap_dt_ts219_init(void);
70#else 79#else
@@ -119,6 +128,12 @@ void km_kirkwood_init(void);
119static inline void km_kirkwood_init(void) {}; 128static inline void km_kirkwood_init(void) {};
120#endif 129#endif
121 130
131#ifdef CONFIG_MACH_DB88F628X_BP_DT
132void db88f628x_init(void);
133#else
134static inline void db88f628x_init(void) {};
135#endif
136
122#ifdef CONFIG_MACH_MPLCEC4_DT 137#ifdef CONFIG_MACH_MPLCEC4_DT
123void mplcec4_init(void); 138void mplcec4_init(void);
124#else 139#else
diff --git a/arch/arm/mach-kirkwood/db88f6281-bp-setup.c b/arch/arm/mach-kirkwood/db88f6281-bp-setup.c
deleted file mode 100644
index 5a369fe74754..000000000000
--- a/arch/arm/mach-kirkwood/db88f6281-bp-setup.c
+++ /dev/null
@@ -1,108 +0,0 @@
1/*
2 * arch/arm/mach-kirkwood/db88f6281-bp-setup.c
3 *
4 * Marvell DB-88F6281-BP Development Board Setup
5 *
6 * This file is licensed under the terms of the GNU General Public
7 * License version 2. This program is licensed "as is" without any
8 * warranty of any kind, whether express or implied.
9 */
10
11#include <linux/kernel.h>
12#include <linux/init.h>
13#include <linux/sizes.h>
14#include <linux/platform_device.h>
15#include <linux/mtd/partitions.h>
16#include <linux/ata_platform.h>
17#include <linux/mv643xx_eth.h>
18#include <asm/mach-types.h>
19#include <asm/mach/arch.h>
20#include <mach/kirkwood.h>
21#include <linux/platform_data/mmc-mvsdio.h>
22#include "common.h"
23#include "mpp.h"
24
25static struct mtd_partition db88f6281_nand_parts[] = {
26 {
27 .name = "u-boot",
28 .offset = 0,
29 .size = SZ_1M
30 }, {
31 .name = "uImage",
32 .offset = MTDPART_OFS_NXTBLK,
33 .size = SZ_4M
34 }, {
35 .name = "root",
36 .offset = MTDPART_OFS_NXTBLK,
37 .size = MTDPART_SIZ_FULL
38 },
39};
40
41static struct mv643xx_eth_platform_data db88f6281_ge00_data = {
42 .phy_addr = MV643XX_ETH_PHY_ADDR(8),
43};
44
45static struct mv_sata_platform_data db88f6281_sata_data = {
46 .n_ports = 2,
47};
48
49static struct mvsdio_platform_data db88f6281_mvsdio_data = {
50 .gpio_write_protect = 37,
51 .gpio_card_detect = 38,
52};
53
54static unsigned int db88f6281_mpp_config[] __initdata = {
55 MPP0_NF_IO2,
56 MPP1_NF_IO3,
57 MPP2_NF_IO4,
58 MPP3_NF_IO5,
59 MPP4_NF_IO6,
60 MPP5_NF_IO7,
61 MPP18_NF_IO0,
62 MPP19_NF_IO1,
63 MPP37_GPIO,
64 MPP38_GPIO,
65 0
66};
67
68static void __init db88f6281_init(void)
69{
70 /*
71 * Basic setup. Needs to be called early.
72 */
73 kirkwood_init();
74 kirkwood_mpp_conf(db88f6281_mpp_config);
75
76 kirkwood_nand_init(ARRAY_AND_SIZE(db88f6281_nand_parts), 25);
77 kirkwood_ehci_init();
78 kirkwood_ge00_init(&db88f6281_ge00_data);
79 kirkwood_sata_init(&db88f6281_sata_data);
80 kirkwood_uart0_init();
81 kirkwood_sdio_init(&db88f6281_mvsdio_data);
82}
83
84static int __init db88f6281_pci_init(void)
85{
86 if (machine_is_db88f6281_bp()) {
87 u32 dev, rev;
88
89 kirkwood_pcie_id(&dev, &rev);
90 if (dev == MV88F6282_DEV_ID)
91 kirkwood_pcie_init(KW_PCIE1 | KW_PCIE0);
92 else
93 kirkwood_pcie_init(KW_PCIE0);
94 }
95 return 0;
96}
97subsys_initcall(db88f6281_pci_init);
98
99MACHINE_START(DB88F6281_BP, "Marvell DB-88F6281-BP Development Board")
100 /* Maintainer: Saeed Bishara <saeed@marvell.com> */
101 .atag_offset = 0x100,
102 .init_machine = db88f6281_init,
103 .map_io = kirkwood_map_io,
104 .init_early = kirkwood_init_early,
105 .init_irq = kirkwood_init_irq,
106 .init_time = kirkwood_timer_init,
107 .restart = kirkwood_restart,
108MACHINE_END
diff --git a/arch/arm/mach-kirkwood/include/mach/bridge-regs.h b/arch/arm/mach-kirkwood/include/mach/bridge-regs.h
index 5c82b7dce4e2..91242c944d7a 100644
--- a/arch/arm/mach-kirkwood/include/mach/bridge-regs.h
+++ b/arch/arm/mach-kirkwood/include/mach/bridge-regs.h
@@ -17,17 +17,16 @@
17#define CPU_CONFIG_ERROR_PROP 0x00000004 17#define CPU_CONFIG_ERROR_PROP 0x00000004
18 18
19#define CPU_CONTROL (BRIDGE_VIRT_BASE + 0x0104) 19#define CPU_CONTROL (BRIDGE_VIRT_BASE + 0x0104)
20#define CPU_CONTROL_PHYS (BRIDGE_PHYS_BASE + 0x0104)
20#define CPU_RESET 0x00000002 21#define CPU_RESET 0x00000002
21 22
22#define RSTOUTn_MASK (BRIDGE_VIRT_BASE + 0x0108) 23#define RSTOUTn_MASK (BRIDGE_VIRT_BASE + 0x0108)
23#define WDT_RESET_OUT_EN 0x00000002
24#define SOFT_RESET_OUT_EN 0x00000004 24#define SOFT_RESET_OUT_EN 0x00000004
25 25
26#define SYSTEM_SOFT_RESET (BRIDGE_VIRT_BASE + 0x010c) 26#define SYSTEM_SOFT_RESET (BRIDGE_VIRT_BASE + 0x010c)
27#define SOFT_RESET 0x00000001 27#define SOFT_RESET 0x00000001
28 28
29#define BRIDGE_CAUSE (BRIDGE_VIRT_BASE + 0x0110) 29#define BRIDGE_CAUSE (BRIDGE_VIRT_BASE + 0x0110)
30#define WDT_INT_REQ 0x0008
31 30
32#define BRIDGE_INT_TIMER1_CLR (~0x0004) 31#define BRIDGE_INT_TIMER1_CLR (~0x0004)
33 32
@@ -69,6 +68,7 @@
69#define CGC_RUNIT (1 << 7) 68#define CGC_RUNIT (1 << 7)
70#define CGC_XOR0 (1 << 8) 69#define CGC_XOR0 (1 << 8)
71#define CGC_AUDIO (1 << 9) 70#define CGC_AUDIO (1 << 9)
71#define CGC_POWERSAVE (1 << 11)
72#define CGC_SATA0 (1 << 14) 72#define CGC_SATA0 (1 << 14)
73#define CGC_SATA1 (1 << 15) 73#define CGC_SATA1 (1 << 15)
74#define CGC_XOR1 (1 << 16) 74#define CGC_XOR1 (1 << 16)
diff --git a/arch/arm/mach-kirkwood/pcie.c b/arch/arm/mach-kirkwood/pcie.c
index 7f43e6c2f8c0..ddcb09f5bdd3 100644
--- a/arch/arm/mach-kirkwood/pcie.c
+++ b/arch/arm/mach-kirkwood/pcie.c
@@ -12,6 +12,7 @@
12#include <linux/pci.h> 12#include <linux/pci.h>
13#include <linux/slab.h> 13#include <linux/slab.h>
14#include <linux/clk.h> 14#include <linux/clk.h>
15#include <linux/mbus.h>
15#include <video/vga.h> 16#include <video/vga.h>
16#include <asm/irq.h> 17#include <asm/irq.h>
17#include <asm/mach/pci.h> 18#include <asm/mach/pci.h>
@@ -253,6 +254,27 @@ static void __init add_pcie_port(int index, void __iomem *base)
253 254
254void __init kirkwood_pcie_init(unsigned int portmask) 255void __init kirkwood_pcie_init(unsigned int portmask)
255{ 256{
257 mvebu_mbus_add_window_remap_flags("pcie0.0",
258 KIRKWOOD_PCIE_IO_PHYS_BASE,
259 KIRKWOOD_PCIE_IO_SIZE,
260 KIRKWOOD_PCIE_IO_BUS_BASE,
261 MVEBU_MBUS_PCI_IO);
262 mvebu_mbus_add_window_remap_flags("pcie0.0",
263 KIRKWOOD_PCIE_MEM_PHYS_BASE,
264 KIRKWOOD_PCIE_MEM_SIZE,
265 MVEBU_MBUS_NO_REMAP,
266 MVEBU_MBUS_PCI_MEM);
267 mvebu_mbus_add_window_remap_flags("pcie1.0",
268 KIRKWOOD_PCIE1_IO_PHYS_BASE,
269 KIRKWOOD_PCIE1_IO_SIZE,
270 KIRKWOOD_PCIE1_IO_BUS_BASE,
271 MVEBU_MBUS_PCI_IO);
272 mvebu_mbus_add_window_remap_flags("pcie1.0",
273 KIRKWOOD_PCIE1_MEM_PHYS_BASE,
274 KIRKWOOD_PCIE1_MEM_SIZE,
275 MVEBU_MBUS_NO_REMAP,
276 MVEBU_MBUS_PCI_MEM);
277
256 vga_base = KIRKWOOD_PCIE_MEM_PHYS_BASE; 278 vga_base = KIRKWOOD_PCIE_MEM_PHYS_BASE;
257 279
258 if (portmask & KW_PCIE0) 280 if (portmask & KW_PCIE0)
diff --git a/arch/arm/mach-ks8695/generic.h b/arch/arm/mach-ks8695/generic.h
index 6e97ce462d73..43253f8e6de4 100644
--- a/arch/arm/mach-ks8695/generic.h
+++ b/arch/arm/mach-ks8695/generic.h
@@ -12,5 +12,5 @@
12 12
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(enum reboot_mode, const char *);
16extern void ks8695_timer_init(void); 16extern void ks8695_timer_init(void);
diff --git a/arch/arm/mach-ks8695/time.c b/arch/arm/mach-ks8695/time.c
index c272a3863d5f..426c97662f5b 100644
--- a/arch/arm/mach-ks8695/time.c
+++ b/arch/arm/mach-ks8695/time.c
@@ -154,11 +154,11 @@ 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
157void ks8695_restart(char mode, const char *cmd) 157void ks8695_restart(enum reboot_mode reboot_mode, const char *cmd)
158{ 158{
159 unsigned int reg; 159 unsigned int reg;
160 160
161 if (mode == 's') 161 if (reboot_mode == REBOOT_SOFT)
162 soft_restart(0); 162 soft_restart(0);
163 163
164 /* disable timer0 */ 164 /* disable timer0 */
diff --git a/arch/arm/mach-lpc32xx/common.c b/arch/arm/mach-lpc32xx/common.c
index 0d4db8c544b5..d7aa54c25c59 100644
--- a/arch/arm/mach-lpc32xx/common.c
+++ b/arch/arm/mach-lpc32xx/common.c
@@ -207,11 +207,11 @@ void __init lpc32xx_map_io(void)
207 iotable_init(lpc32xx_io_desc, ARRAY_SIZE(lpc32xx_io_desc)); 207 iotable_init(lpc32xx_io_desc, ARRAY_SIZE(lpc32xx_io_desc));
208} 208}
209 209
210void lpc23xx_restart(char mode, const char *cmd) 210void lpc23xx_restart(enum reboot_mode mode, const char *cmd)
211{ 211{
212 switch (mode) { 212 switch (mode) {
213 case 's': 213 case REBOOT_SOFT:
214 case 'h': 214 case REBOOT_HARD:
215 lpc32xx_watchdog_reset(); 215 lpc32xx_watchdog_reset();
216 break; 216 break;
217 217
diff --git a/arch/arm/mach-lpc32xx/common.h b/arch/arm/mach-lpc32xx/common.h
index e0b26062a272..1cd8853b2f9b 100644
--- a/arch/arm/mach-lpc32xx/common.h
+++ b/arch/arm/mach-lpc32xx/common.h
@@ -21,6 +21,7 @@
21 21
22#include <mach/board.h> 22#include <mach/board.h>
23#include <linux/platform_device.h> 23#include <linux/platform_device.h>
24#include <linux/reboot.h>
24 25
25/* 26/*
26 * Other arch specific structures and functions 27 * Other arch specific structures and functions
@@ -29,7 +30,7 @@ extern void lpc32xx_timer_init(void);
29extern void __init lpc32xx_init_irq(void); 30extern void __init lpc32xx_init_irq(void);
30extern void __init lpc32xx_map_io(void); 31extern void __init lpc32xx_map_io(void);
31extern void __init lpc32xx_serial_init(void); 32extern void __init lpc32xx_serial_init(void);
32extern void lpc23xx_restart(char, const char *); 33extern void lpc23xx_restart(enum reboot_mode, const char *);
33 34
34 35
35/* 36/*
diff --git a/arch/arm/mach-lpc32xx/phy3250.c b/arch/arm/mach-lpc32xx/phy3250.c
index c1cd5a943ab1..e54f87ec2e4a 100644
--- a/arch/arm/mach-lpc32xx/phy3250.c
+++ b/arch/arm/mach-lpc32xx/phy3250.c
@@ -182,8 +182,8 @@ static void pl08x_put_signal(const struct pl08x_channel_data *cd, int ch)
182static struct pl08x_platform_data pl08x_pd = { 182static struct pl08x_platform_data pl08x_pd = {
183 .slave_channels = &pl08x_slave_channels[0], 183 .slave_channels = &pl08x_slave_channels[0],
184 .num_slave_channels = ARRAY_SIZE(pl08x_slave_channels), 184 .num_slave_channels = ARRAY_SIZE(pl08x_slave_channels),
185 .get_signal = pl08x_get_signal, 185 .get_xfer_signal = pl08x_get_signal,
186 .put_signal = pl08x_put_signal, 186 .put_xfer_signal = pl08x_put_signal,
187 .lli_buses = PL08X_AHB1, 187 .lli_buses = PL08X_AHB1,
188 .mem_buses = PL08X_AHB1, 188 .mem_buses = PL08X_AHB1,
189}; 189};
diff --git a/arch/arm/mach-mmp/aspenite.c b/arch/arm/mach-mmp/aspenite.c
index 5b660ec09ef5..0c002099c3a3 100644
--- a/arch/arm/mach-mmp/aspenite.c
+++ b/arch/arm/mach-mmp/aspenite.c
@@ -210,7 +210,7 @@ struct pxa168fb_mach_info aspenite_lcd_info = {
210 .invert_pixclock = 0, 210 .invert_pixclock = 0,
211}; 211};
212 212
213static unsigned int aspenite_matrix_key_map[] = { 213static const unsigned int aspenite_matrix_key_map[] = {
214 KEY(0, 6, KEY_UP), /* SW 4 */ 214 KEY(0, 6, KEY_UP), /* SW 4 */
215 KEY(0, 7, KEY_DOWN), /* SW 5 */ 215 KEY(0, 7, KEY_DOWN), /* SW 5 */
216 KEY(1, 6, KEY_LEFT), /* SW 6 */ 216 KEY(1, 6, KEY_LEFT), /* SW 6 */
@@ -219,11 +219,15 @@ static unsigned int aspenite_matrix_key_map[] = {
219 KEY(4, 7, KEY_ESC), /* SW 9 */ 219 KEY(4, 7, KEY_ESC), /* SW 9 */
220}; 220};
221 221
222static struct matrix_keymap_data aspenite_matrix_keymap_data = {
223 .keymap = aspenite_matrix_key_map,
224 .keymap_size = ARRAY_SIZE(aspenite_matrix_key_map),
225};
226
222static struct pxa27x_keypad_platform_data aspenite_keypad_info __initdata = { 227static struct pxa27x_keypad_platform_data aspenite_keypad_info __initdata = {
223 .matrix_key_rows = 5, 228 .matrix_key_rows = 5,
224 .matrix_key_cols = 8, 229 .matrix_key_cols = 8,
225 .matrix_key_map = aspenite_matrix_key_map, 230 .matrix_keymap_data = &aspenite_matrix_keymap_data,
226 .matrix_key_map_size = ARRAY_SIZE(aspenite_matrix_key_map),
227 .debounce_interval = 30, 231 .debounce_interval = 30,
228}; 232};
229 233
diff --git a/arch/arm/mach-mmp/common.c b/arch/arm/mach-mmp/common.c
index 9292b7966e3b..c03b4ab582db 100644
--- a/arch/arm/mach-mmp/common.c
+++ b/arch/arm/mach-mmp/common.c
@@ -47,7 +47,7 @@ void __init mmp_map_io(void)
47 mmp_chip_id = __raw_readl(MMP_CHIPID); 47 mmp_chip_id = __raw_readl(MMP_CHIPID);
48} 48}
49 49
50void mmp_restart(char mode, const char *cmd) 50void mmp_restart(enum reboot_mode mode, const char *cmd)
51{ 51{
52 soft_restart(0); 52 soft_restart(0);
53} 53}
diff --git a/arch/arm/mach-mmp/common.h b/arch/arm/mach-mmp/common.h
index 0bdc50b134ce..991d7e9877de 100644
--- a/arch/arm/mach-mmp/common.h
+++ b/arch/arm/mach-mmp/common.h
@@ -1,10 +1,11 @@
1#include <linux/reboot.h>
1#define ARRAY_AND_SIZE(x) (x), ARRAY_SIZE(x) 2#define ARRAY_AND_SIZE(x) (x), ARRAY_SIZE(x)
2 3
3extern void timer_init(int irq); 4extern void timer_init(int irq);
4 5
5extern void __init icu_init_irq(void); 6extern void __init icu_init_irq(void);
6extern void __init mmp_map_io(void); 7extern void __init mmp_map_io(void);
7extern void mmp_restart(char, const char *); 8extern void mmp_restart(enum reboot_mode, const char *);
8extern void __init pxa168_clk_init(void); 9extern void __init pxa168_clk_init(void);
9extern void __init pxa910_clk_init(void); 10extern void __init pxa910_clk_init(void);
10extern void __init mmp2_clk_init(void); 11extern void __init mmp2_clk_init(void);
diff --git a/arch/arm/mach-mmp/include/mach/pxa168.h b/arch/arm/mach-mmp/include/mach/pxa168.h
index 7ed1df21ea1c..459c2d03eb5c 100644
--- a/arch/arm/mach-mmp/include/mach/pxa168.h
+++ b/arch/arm/mach-mmp/include/mach/pxa168.h
@@ -1,9 +1,11 @@
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
4#include <linux/reboot.h>
5
4extern void pxa168_timer_init(void); 6extern void pxa168_timer_init(void);
5extern void __init pxa168_init_irq(void); 7extern void __init pxa168_init_irq(void);
6extern void pxa168_restart(char, const char *); 8extern void pxa168_restart(enum reboot_mode, const char *);
7extern void pxa168_clear_keypad_wakeup(void); 9extern void pxa168_clear_keypad_wakeup(void);
8 10
9#include <linux/i2c.h> 11#include <linux/i2c.h>
diff --git a/arch/arm/mach-mmp/pxa168.c b/arch/arm/mach-mmp/pxa168.c
index a30dcf3b7d9e..144e997624c0 100644
--- a/arch/arm/mach-mmp/pxa168.c
+++ b/arch/arm/mach-mmp/pxa168.c
@@ -172,7 +172,7 @@ int __init pxa168_add_usb_host(struct mv_usb_platform_data *pdata)
172 return platform_device_register(&pxa168_device_usb_host); 172 return platform_device_register(&pxa168_device_usb_host);
173} 173}
174 174
175void pxa168_restart(char mode, const char *cmd) 175void pxa168_restart(enum reboot_mode mode, const char *cmd)
176{ 176{
177 soft_restart(0xffff0000); 177 soft_restart(0xffff0000);
178} 178}
diff --git a/arch/arm/mach-mmp/teton_bga.c b/arch/arm/mach-mmp/teton_bga.c
index e4d95b4c6bb2..6aa53fb29d26 100644
--- a/arch/arm/mach-mmp/teton_bga.c
+++ b/arch/arm/mach-mmp/teton_bga.c
@@ -61,11 +61,15 @@ static unsigned int teton_bga_matrix_key_map[] = {
61 KEY(1, 7, KEY_RIGHT), 61 KEY(1, 7, KEY_RIGHT),
62}; 62};
63 63
64static struct matrix_keymap_data teton_bga_matrix_keymap_data = {
65 .keymap = teton_bga_matrix_key_map,
66 .keymap_size = ARRAY_SIZE(teton_bga_matrix_key_map),
67};
68
64static struct pxa27x_keypad_platform_data teton_bga_keypad_info __initdata = { 69static struct pxa27x_keypad_platform_data teton_bga_keypad_info __initdata = {
65 .matrix_key_rows = 2, 70 .matrix_key_rows = 2,
66 .matrix_key_cols = 8, 71 .matrix_key_cols = 8,
67 .matrix_key_map = teton_bga_matrix_key_map, 72 .matrix_keymap_data = &teton_bga_matrix_keymap_data,
68 .matrix_key_map_size = ARRAY_SIZE(teton_bga_matrix_key_map),
69 .debounce_interval = 30, 73 .debounce_interval = 30,
70}; 74};
71 75
diff --git a/arch/arm/mach-mmp/time.c b/arch/arm/mach-mmp/time.c
index 86a18b3d252e..7ac41e83cfef 100644
--- a/arch/arm/mach-mmp/time.c
+++ b/arch/arm/mach-mmp/time.c
@@ -28,8 +28,8 @@
28#include <linux/of.h> 28#include <linux/of.h>
29#include <linux/of_address.h> 29#include <linux/of_address.h>
30#include <linux/of_irq.h> 30#include <linux/of_irq.h>
31#include <linux/sched_clock.h>
31 32
32#include <asm/sched_clock.h>
33#include <mach/addr-map.h> 33#include <mach/addr-map.h>
34#include <mach/regs-timers.h> 34#include <mach/regs-timers.h>
35#include <mach/regs-apbc.h> 35#include <mach/regs-apbc.h>
diff --git a/arch/arm/mach-msm/Kconfig b/arch/arm/mach-msm/Kconfig
index fceb093b9494..905efc8cac79 100644
--- a/arch/arm/mach-msm/Kconfig
+++ b/arch/arm/mach-msm/Kconfig
@@ -48,9 +48,7 @@ config ARCH_MSM8X60
48 select CPU_V7 48 select CPU_V7
49 select GPIO_MSM_V2 49 select GPIO_MSM_V2
50 select HAVE_SMP 50 select HAVE_SMP
51 select MSM_GPIOMUX
52 select MSM_SCM if SMP 51 select MSM_SCM if SMP
53 select MSM_V2_TLMM
54 select USE_OF 52 select USE_OF
55 53
56config ARCH_MSM8960 54config ARCH_MSM8960
@@ -58,9 +56,8 @@ config ARCH_MSM8960
58 select ARM_GIC 56 select ARM_GIC
59 select CPU_V7 57 select CPU_V7
60 select HAVE_SMP 58 select HAVE_SMP
61 select MSM_GPIOMUX 59 select GPIO_MSM_V2
62 select MSM_SCM if SMP 60 select MSM_SCM if SMP
63 select MSM_V2_TLMM
64 select USE_OF 61 select USE_OF
65 62
66config MSM_HAS_DEBUG_UART_HS 63config MSM_HAS_DEBUG_UART_HS
@@ -125,9 +122,8 @@ config MSM_SMD
125 122
126config MSM_GPIOMUX 123config MSM_GPIOMUX
127 bool 124 bool
128 125 help
129config MSM_V2_TLMM 126 Support for MSM V1 TLMM GPIOMUX architecture.
130 bool
131 127
132config MSM_SCM 128config MSM_SCM
133 bool 129 bool
diff --git a/arch/arm/mach-msm/Makefile b/arch/arm/mach-msm/Makefile
index 17519faf082f..d257ff40e16b 100644
--- a/arch/arm/mach-msm/Makefile
+++ b/arch/arm/mach-msm/Makefile
@@ -1,16 +1,18 @@
1obj-y += io.o timer.o 1obj-y += io.o timer.o
2obj-y += clock.o 2obj-y += clock.o
3obj-$(CONFIG_DEBUG_FS) += clock-debug.o
4 3
5obj-$(CONFIG_MSM_VIC) += irq-vic.o 4obj-$(CONFIG_MSM_VIC) += irq-vic.o
6obj-$(CONFIG_MSM_IOMMU) += devices-iommu.o 5obj-$(CONFIG_MSM_IOMMU) += devices-iommu.o
7 6
8obj-$(CONFIG_ARCH_MSM7X00A) += dma.o irq.o 7obj-$(CONFIG_ARCH_MSM7X00A) += irq.o
9obj-$(CONFIG_ARCH_MSM7X30) += dma.o 8obj-$(CONFIG_ARCH_QSD8X50) += sirc.o
10obj-$(CONFIG_ARCH_QSD8X50) += dma.o sirc.o
11 9
12obj-$(CONFIG_MSM_PROC_COMM) += proc_comm.o clock-pcom.o vreg.o 10obj-$(CONFIG_MSM_PROC_COMM) += proc_comm.o clock-pcom.o vreg.o
13 11
12obj-$(CONFIG_ARCH_MSM7X00A) += dma.o
13obj-$(CONFIG_ARCH_MSM7X30) += dma.o
14obj-$(CONFIG_ARCH_QSD8X50) += dma.o
15
14obj-$(CONFIG_MSM_SMD) += smd.o smd_debug.o 16obj-$(CONFIG_MSM_SMD) += smd.o smd_debug.o
15obj-$(CONFIG_MSM_SMD) += last_radio_log.o 17obj-$(CONFIG_MSM_SMD) += last_radio_log.o
16obj-$(CONFIG_MSM_SCM) += scm.o scm-boot.o 18obj-$(CONFIG_MSM_SCM) += scm.o scm-boot.o
@@ -27,7 +29,5 @@ obj-$(CONFIG_ARCH_MSM7X30) += board-msm7x30.o devices-msm7x30.o
27obj-$(CONFIG_ARCH_QSD8X50) += board-qsd8x50.o devices-qsd8x50.o 29obj-$(CONFIG_ARCH_QSD8X50) += board-qsd8x50.o devices-qsd8x50.o
28obj-$(CONFIG_ARCH_MSM8X60) += board-dt-8660.o 30obj-$(CONFIG_ARCH_MSM8X60) += board-dt-8660.o
29obj-$(CONFIG_ARCH_MSM8960) += board-dt-8960.o 31obj-$(CONFIG_ARCH_MSM8960) += board-dt-8960.o
30 32obj-$(CONFIG_MSM_GPIOMUX) += gpiomux.o
31obj-$(CONFIG_ARCH_MSM7X30) += gpiomux-v1.o gpiomux.o 33obj-$(CONFIG_ARCH_QSD8X50) += gpiomux-8x50.o
32obj-$(CONFIG_ARCH_QSD8X50) += gpiomux-8x50.o gpiomux-v1.o gpiomux.o
33obj-$(CONFIG_ARCH_MSM8X60) += gpiomux-8x60.o gpiomux-v2.o gpiomux.o
diff --git a/arch/arm/mach-msm/board-dt-8660.c b/arch/arm/mach-msm/board-dt-8660.c
index 7dcfc5300bbd..492f5cd87b0a 100644
--- a/arch/arm/mach-msm/board-dt-8660.c
+++ b/arch/arm/mach-msm/board-dt-8660.c
@@ -11,7 +11,6 @@
11 */ 11 */
12 12
13#include <linux/init.h> 13#include <linux/init.h>
14#include <linux/irqchip.h>
15#include <linux/of.h> 14#include <linux/of.h>
16#include <linux/of_platform.h> 15#include <linux/of_platform.h>
17 16
@@ -44,7 +43,6 @@ static const char *msm8x60_fluid_match[] __initdata = {
44DT_MACHINE_START(MSM_DT, "Qualcomm MSM (Flattened Device Tree)") 43DT_MACHINE_START(MSM_DT, "Qualcomm MSM (Flattened Device Tree)")
45 .smp = smp_ops(msm_smp_ops), 44 .smp = smp_ops(msm_smp_ops),
46 .map_io = msm_map_msm8x60_io, 45 .map_io = msm_map_msm8x60_io,
47 .init_irq = irqchip_init,
48 .init_machine = msm8x60_dt_init, 46 .init_machine = msm8x60_dt_init,
49 .init_late = msm8x60_init_late, 47 .init_late = msm8x60_init_late,
50 .init_time = msm_dt_timer_init, 48 .init_time = msm_dt_timer_init,
diff --git a/arch/arm/mach-msm/board-dt-8960.c b/arch/arm/mach-msm/board-dt-8960.c
index 73019363ffa4..bb5530957c4f 100644
--- a/arch/arm/mach-msm/board-dt-8960.c
+++ b/arch/arm/mach-msm/board-dt-8960.c
@@ -11,7 +11,6 @@
11 */ 11 */
12 12
13#include <linux/init.h> 13#include <linux/init.h>
14#include <linux/irqchip.h>
15#include <linux/of_platform.h> 14#include <linux/of_platform.h>
16 15
17#include <asm/mach/arch.h> 16#include <asm/mach/arch.h>
@@ -31,7 +30,6 @@ static const char * const msm8960_dt_match[] __initconst = {
31DT_MACHINE_START(MSM8960_DT, "Qualcomm MSM (Flattened Device Tree)") 30DT_MACHINE_START(MSM8960_DT, "Qualcomm MSM (Flattened Device Tree)")
32 .smp = smp_ops(msm_smp_ops), 31 .smp = smp_ops(msm_smp_ops),
33 .map_io = msm_map_msm8960_io, 32 .map_io = msm_map_msm8960_io,
34 .init_irq = irqchip_init,
35 .init_time = msm_dt_timer_init, 33 .init_time = msm_dt_timer_init,
36 .init_machine = msm_dt_init, 34 .init_machine = msm_dt_init,
37 .dt_compat = msm8960_dt_match, 35 .dt_compat = msm8960_dt_match,
diff --git a/arch/arm/mach-msm/board-halibut.c b/arch/arm/mach-msm/board-halibut.c
index 82eaf88d2026..803651ad4f62 100644
--- a/arch/arm/mach-msm/board-halibut.c
+++ b/arch/arm/mach-msm/board-halibut.c
@@ -59,6 +59,7 @@ static struct platform_device smc91x_device = {
59}; 59};
60 60
61static struct platform_device *devices[] __initdata = { 61static struct platform_device *devices[] __initdata = {
62 &msm_clock_7x01a,
62 &msm_device_gpio_7201, 63 &msm_device_gpio_7201,
63 &msm_device_uart3, 64 &msm_device_uart3,
64 &msm_device_smd, 65 &msm_device_smd,
@@ -91,7 +92,6 @@ static void __init halibut_fixup(struct tag *tags, char **cmdline,
91static void __init halibut_map_io(void) 92static void __init halibut_map_io(void)
92{ 93{
93 msm_map_common_io(); 94 msm_map_common_io();
94 msm_clock_init(msm_clocks_7x01a, msm_num_clocks_7x01a);
95} 95}
96 96
97static void __init halibut_init_late(void) 97static void __init halibut_init_late(void)
diff --git a/arch/arm/mach-msm/board-msm7x30.c b/arch/arm/mach-msm/board-msm7x30.c
index 520c141acd03..db3d8c0bc8a4 100644
--- a/arch/arm/mach-msm/board-msm7x30.c
+++ b/arch/arm/mach-msm/board-msm7x30.c
@@ -89,6 +89,7 @@ struct msm_gpiomux_config msm_gpiomux_configs[GPIOMUX_NGPIOS] = {
89}; 89};
90 90
91static struct platform_device *devices[] __initdata = { 91static struct platform_device *devices[] __initdata = {
92 &msm_clock_7x30,
92 &msm_device_gpio_7x30, 93 &msm_device_gpio_7x30,
93#if defined(CONFIG_SERIAL_MSM) || defined(CONFIG_MSM_SERIAL_DEBUGGER) 94#if defined(CONFIG_SERIAL_MSM) || defined(CONFIG_MSM_SERIAL_DEBUGGER)
94 &msm_device_uart2, 95 &msm_device_uart2,
@@ -116,7 +117,6 @@ static void __init msm7x30_init(void)
116static void __init msm7x30_map_io(void) 117static void __init msm7x30_map_io(void)
117{ 118{
118 msm_map_msm7x30_io(); 119 msm_map_msm7x30_io();
119 msm_clock_init(msm_clocks_7x30, msm_num_clocks_7x30);
120} 120}
121 121
122static void __init msm7x30_init_late(void) 122static void __init msm7x30_init_late(void)
diff --git a/arch/arm/mach-msm/board-qsd8x50.c b/arch/arm/mach-msm/board-qsd8x50.c
index 38a532d6937c..f14a73d86bc0 100644
--- a/arch/arm/mach-msm/board-qsd8x50.c
+++ b/arch/arm/mach-msm/board-qsd8x50.c
@@ -89,6 +89,7 @@ static struct msm_otg_platform_data msm_otg_pdata = {
89}; 89};
90 90
91static struct platform_device *devices[] __initdata = { 91static struct platform_device *devices[] __initdata = {
92 &msm_clock_8x50,
92 &msm_device_gpio_8x50, 93 &msm_device_gpio_8x50,
93 &msm_device_uart3, 94 &msm_device_uart3,
94 &msm_device_smd, 95 &msm_device_smd,
@@ -172,7 +173,6 @@ static void __init qsd8x50_init_mmc(void)
172static void __init qsd8x50_map_io(void) 173static void __init qsd8x50_map_io(void)
173{ 174{
174 msm_map_qsd8x50_io(); 175 msm_map_qsd8x50_io();
175 msm_clock_init(msm_clocks_8x50, msm_num_clocks_8x50);
176} 176}
177 177
178static void __init qsd8x50_init_irq(void) 178static void __init qsd8x50_init_irq(void)
diff --git a/arch/arm/mach-msm/board-trout-panel.c b/arch/arm/mach-msm/board-trout-panel.c
index f9a5db6d2ced..77b0a26f897f 100644
--- a/arch/arm/mach-msm/board-trout-panel.c
+++ b/arch/arm/mach-msm/board-trout-panel.c
@@ -7,7 +7,6 @@
7#include <linux/platform_device.h> 7#include <linux/platform_device.h>
8#include <linux/delay.h> 8#include <linux/delay.h>
9#include <linux/leds.h> 9#include <linux/leds.h>
10#include <linux/clk.h>
11#include <linux/err.h> 10#include <linux/err.h>
12 11
13#include <asm/io.h> 12#include <asm/io.h>
@@ -19,6 +18,7 @@
19 18
20#include "board-trout.h" 19#include "board-trout.h"
21#include "proc_comm.h" 20#include "proc_comm.h"
21#include "clock-pcom.h"
22#include "devices.h" 22#include "devices.h"
23 23
24#define TROUT_DEFAULT_BACKLIGHT_BRIGHTNESS 255 24#define TROUT_DEFAULT_BACKLIGHT_BRIGHTNESS 255
@@ -170,7 +170,6 @@ static struct mddi_table mddi_toshiba_init_table[] = {
170#define INTMASK_VWAKEOUT (1U << 0) 170#define INTMASK_VWAKEOUT (1U << 0)
171 171
172 172
173static struct clk *gp_clk;
174static int trout_new_backlight = 1; 173static int trout_new_backlight = 1;
175static struct vreg *vreg_mddi_1v5; 174static struct vreg *vreg_mddi_1v5;
176static struct vreg *vreg_lcm_2v85; 175static struct vreg *vreg_lcm_2v85;
@@ -273,18 +272,14 @@ int __init trout_init_panel(void)
273 } else { 272 } else {
274 uint32_t config = PCOM_GPIO_CFG(27, 1, GPIO_OUTPUT, 273 uint32_t config = PCOM_GPIO_CFG(27, 1, GPIO_OUTPUT,
275 GPIO_NO_PULL, GPIO_8MA); 274 GPIO_NO_PULL, GPIO_8MA);
275 uint32_t id = P_GP_CLK;
276 uint32_t rate = 19200000;
277
276 msm_proc_comm(PCOM_RPC_GPIO_TLMM_CONFIG_EX, &config, 0); 278 msm_proc_comm(PCOM_RPC_GPIO_TLMM_CONFIG_EX, &config, 0);
277 279
278 gp_clk = clk_get(NULL, "gp_clk"); 280 msm_proc_comm(PCOM_CLKCTL_RPC_SET_RATE, &id, &rate);
279 if (IS_ERR(gp_clk)) { 281 if (id < 0)
280 printk(KERN_ERR "trout_init_panel: could not get gp" 282 pr_err("trout_init_panel: set clock rate failed\n");
281 "clock\n");
282 gp_clk = NULL;
283 }
284 rc = clk_set_rate(gp_clk, 19200000);
285 if (rc)
286 printk(KERN_ERR "trout_init_panel: set clock rate "
287 "failed\n");
288 } 283 }
289 284
290 rc = platform_device_register(&msm_device_mdp); 285 rc = platform_device_register(&msm_device_mdp);
diff --git a/arch/arm/mach-msm/board-trout.c b/arch/arm/mach-msm/board-trout.c
index 80fe1c5ff5c1..64a46eb4fc49 100644
--- a/arch/arm/mach-msm/board-trout.c
+++ b/arch/arm/mach-msm/board-trout.c
@@ -36,6 +36,7 @@
36extern int trout_init_mmc(unsigned int); 36extern int trout_init_mmc(unsigned int);
37 37
38static struct platform_device *devices[] __initdata = { 38static struct platform_device *devices[] __initdata = {
39 &msm_clock_7x01a,
39 &msm_device_gpio_7201, 40 &msm_device_gpio_7201,
40 &msm_device_uart3, 41 &msm_device_uart3,
41 &msm_device_smd, 42 &msm_device_smd,
@@ -94,8 +95,6 @@ static void __init trout_map_io(void)
94 /* route UART3 to the "H2W" extended usb connector */ 95 /* route UART3 to the "H2W" extended usb connector */
95 writeb(0x80, TROUT_CPLD_BASE + 0x00); 96 writeb(0x80, TROUT_CPLD_BASE + 0x00);
96#endif 97#endif
97
98 msm_clock_init(msm_clocks_7x01a, msm_num_clocks_7x01a);
99} 98}
100 99
101static void __init trout_init_late(void) 100static void __init trout_init_late(void)
diff --git a/arch/arm/mach-msm/clock-7x30.h b/arch/arm/mach-msm/clock-7x30.h
deleted file mode 100644
index 14104453688b..000000000000
--- a/arch/arm/mach-msm/clock-7x30.h
+++ /dev/null
@@ -1,155 +0,0 @@
1/* Copyright (c) 2009, Code Aurora Forum. All rights reserved.
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License version 2 and
5 * only version 2 as published by the Free Software Foundation.
6 *
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 * GNU General Public License for more details.
11 */
12
13#ifndef __ARCH_ARM_MACH_MSM_CLOCK_7X30_H
14#define __ARCH_ARM_MACH_MSM_CLOCK_7X30_H
15
16enum {
17 L_7X30_NONE_CLK = -1,
18 L_7X30_ADM_CLK,
19 L_7X30_I2C_CLK,
20 L_7X30_I2C_2_CLK,
21 L_7X30_QUP_I2C_CLK,
22 L_7X30_UART1DM_CLK,
23 L_7X30_UART1DM_P_CLK,
24 L_7X30_UART2DM_CLK,
25 L_7X30_UART2DM_P_CLK,
26 L_7X30_EMDH_CLK,
27 L_7X30_EMDH_P_CLK,
28 L_7X30_PMDH_CLK,
29 L_7X30_PMDH_P_CLK,
30 L_7X30_GRP_2D_CLK,
31 L_7X30_GRP_2D_P_CLK,
32 L_7X30_GRP_3D_SRC_CLK,
33 L_7X30_GRP_3D_CLK,
34 L_7X30_GRP_3D_P_CLK,
35 L_7X30_IMEM_CLK,
36 L_7X30_SDC1_CLK,
37 L_7X30_SDC1_P_CLK,
38 L_7X30_SDC2_CLK,
39 L_7X30_SDC2_P_CLK,
40 L_7X30_SDC3_CLK,
41 L_7X30_SDC3_P_CLK,
42 L_7X30_SDC4_CLK,
43 L_7X30_SDC4_P_CLK,
44 L_7X30_MDP_CLK,
45 L_7X30_MDP_P_CLK,
46 L_7X30_MDP_LCDC_PCLK_CLK,
47 L_7X30_MDP_LCDC_PAD_PCLK_CLK,
48 L_7X30_MDP_VSYNC_CLK,
49 L_7X30_MI2S_CODEC_RX_M_CLK,
50 L_7X30_MI2S_CODEC_RX_S_CLK,
51 L_7X30_MI2S_CODEC_TX_M_CLK,
52 L_7X30_MI2S_CODEC_TX_S_CLK,
53 L_7X30_MI2S_M_CLK,
54 L_7X30_MI2S_S_CLK,
55 L_7X30_LPA_CODEC_CLK,
56 L_7X30_LPA_CORE_CLK,
57 L_7X30_LPA_P_CLK,
58 L_7X30_MIDI_CLK,
59 L_7X30_MDC_CLK,
60 L_7X30_ROTATOR_IMEM_CLK,
61 L_7X30_ROTATOR_P_CLK,
62 L_7X30_SDAC_M_CLK,
63 L_7X30_SDAC_CLK,
64 L_7X30_UART1_CLK,
65 L_7X30_UART2_CLK,
66 L_7X30_UART3_CLK,
67 L_7X30_TV_CLK,
68 L_7X30_TV_DAC_CLK,
69 L_7X30_TV_ENC_CLK,
70 L_7X30_HDMI_CLK,
71 L_7X30_TSIF_REF_CLK,
72 L_7X30_TSIF_P_CLK,
73 L_7X30_USB_HS_SRC_CLK,
74 L_7X30_USB_HS_CLK,
75 L_7X30_USB_HS_CORE_CLK,
76 L_7X30_USB_HS_P_CLK,
77 L_7X30_USB_HS2_CLK,
78 L_7X30_USB_HS2_CORE_CLK,
79 L_7X30_USB_HS2_P_CLK,
80 L_7X30_USB_HS3_CLK,
81 L_7X30_USB_HS3_CORE_CLK,
82 L_7X30_USB_HS3_P_CLK,
83 L_7X30_VFE_CLK,
84 L_7X30_VFE_P_CLK,
85 L_7X30_VFE_MDC_CLK,
86 L_7X30_VFE_CAMIF_CLK,
87 L_7X30_CAMIF_PAD_P_CLK,
88 L_7X30_CAM_M_CLK,
89 L_7X30_JPEG_CLK,
90 L_7X30_JPEG_P_CLK,
91 L_7X30_VPE_CLK,
92 L_7X30_MFC_CLK,
93 L_7X30_MFC_DIV2_CLK,
94 L_7X30_MFC_P_CLK,
95 L_7X30_SPI_CLK,
96 L_7X30_SPI_P_CLK,
97 L_7X30_CSI0_CLK,
98 L_7X30_CSI0_VFE_CLK,
99 L_7X30_CSI0_P_CLK,
100 L_7X30_CSI1_CLK,
101 L_7X30_CSI1_VFE_CLK,
102 L_7X30_CSI1_P_CLK,
103 L_7X30_GLBL_ROOT_CLK,
104
105 L_7X30_AXI_LI_VG_CLK,
106 L_7X30_AXI_LI_GRP_CLK,
107 L_7X30_AXI_LI_JPEG_CLK,
108 L_7X30_AXI_GRP_2D_CLK,
109 L_7X30_AXI_MFC_CLK,
110 L_7X30_AXI_VPE_CLK,
111 L_7X30_AXI_LI_VFE_CLK,
112 L_7X30_AXI_LI_APPS_CLK,
113 L_7X30_AXI_MDP_CLK,
114 L_7X30_AXI_IMEM_CLK,
115 L_7X30_AXI_LI_ADSP_A_CLK,
116 L_7X30_AXI_ROTATOR_CLK,
117
118 L_7X30_NR_CLKS
119};
120
121struct clk_ops;
122extern struct clk_ops clk_ops_7x30;
123
124struct clk_ops *clk_7x30_is_local(uint32_t id);
125int clk_7x30_init(void);
126
127void pll_enable(uint32_t pll);
128void pll_disable(uint32_t pll);
129
130extern int internal_pwr_rail_ctl_auto(unsigned rail_id, bool enable);
131
132#define CLK_7X30(clk_name, clk_id, clk_dev, clk_flags) { \
133 .con_id = clk_name, \
134 .dev_id = clk_dev, \
135 .clk = &(struct clk){ \
136 .id = L_7X30_##clk_id, \
137 .remote_id = P_##clk_id, \
138 .flags = clk_flags, \
139 .dbg_name = #clk_id, \
140 }, \
141 }
142
143#define CLK_7X30S(clk_name, l_id, r_id, clk_dev, clk_flags) { \
144 .con_id = clk_name, \
145 .dev_id = clk_dev, \
146 .clk = &(struct clk){ \
147 .id = L_7X30_##l_id, \
148 .remote_id = P_##r_id, \
149 .flags = clk_flags, \
150 .dbg_name = #l_id, \
151 .ops = &clk_ops_pcom, \
152 }, \
153 }
154
155#endif
diff --git a/arch/arm/mach-msm/clock-debug.c b/arch/arm/mach-msm/clock-debug.c
deleted file mode 100644
index 4886404d42f5..000000000000
--- a/arch/arm/mach-msm/clock-debug.c
+++ /dev/null
@@ -1,130 +0,0 @@
1/*
2 * Copyright (C) 2007 Google, Inc.
3 * Copyright (c) 2007-2010, Code Aurora Forum. All rights reserved.
4 *
5 * This software is licensed under the terms of the GNU General Public
6 * License version 2, as published by the Free Software Foundation, and
7 * may be copied, distributed, and modified under those terms.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 */
15
16#include <linux/kernel.h>
17#include <linux/module.h>
18#include <linux/ctype.h>
19#include <linux/debugfs.h>
20#include <linux/clk.h>
21#include "clock.h"
22
23static int clock_debug_rate_set(void *data, u64 val)
24{
25 struct clk *clock = data;
26 int ret;
27
28 /* Only increases to max rate will succeed, but that's actually good
29 * for debugging purposes so we don't check for error. */
30 if (clock->flags & CLK_MAX)
31 clk_set_max_rate(clock, val);
32 if (clock->flags & CLK_MIN)
33 ret = clk_set_min_rate(clock, val);
34 else
35 ret = clk_set_rate(clock, val);
36 if (ret != 0)
37 printk(KERN_ERR "clk_set%s_rate failed (%d)\n",
38 (clock->flags & CLK_MIN) ? "_min" : "", ret);
39 return ret;
40}
41
42static int clock_debug_rate_get(void *data, u64 *val)
43{
44 struct clk *clock = data;
45 *val = clk_get_rate(clock);
46 return 0;
47}
48
49DEFINE_SIMPLE_ATTRIBUTE(clock_rate_fops, clock_debug_rate_get,
50 clock_debug_rate_set, "%llu\n");
51
52static int clock_debug_enable_set(void *data, u64 val)
53{
54 struct clk *clock = data;
55 int rc = 0;
56
57 if (val)
58 rc = clock->ops->enable(clock->id);
59 else
60 clock->ops->disable(clock->id);
61
62 return rc;
63}
64
65static int clock_debug_enable_get(void *data, u64 *val)
66{
67 struct clk *clock = data;
68
69 *val = clock->ops->is_enabled(clock->id);
70
71 return 0;
72}
73
74DEFINE_SIMPLE_ATTRIBUTE(clock_enable_fops, clock_debug_enable_get,
75 clock_debug_enable_set, "%llu\n");
76
77static int clock_debug_local_get(void *data, u64 *val)
78{
79 struct clk *clock = data;
80
81 *val = clock->ops->is_local(clock->id);
82
83 return 0;
84}
85
86DEFINE_SIMPLE_ATTRIBUTE(clock_local_fops, clock_debug_local_get,
87 NULL, "%llu\n");
88
89static struct dentry *debugfs_base;
90
91int __init clock_debug_init(void)
92{
93 debugfs_base = debugfs_create_dir("clk", NULL);
94 if (!debugfs_base)
95 return -ENOMEM;
96 return 0;
97}
98
99int __init clock_debug_add(struct clk *clock)
100{
101 char temp[50], *ptr;
102 struct dentry *clk_dir;
103
104 if (!debugfs_base)
105 return -ENOMEM;
106
107 strncpy(temp, clock->dbg_name, ARRAY_SIZE(temp)-1);
108 for (ptr = temp; *ptr; ptr++)
109 *ptr = tolower(*ptr);
110
111 clk_dir = debugfs_create_dir(temp, debugfs_base);
112 if (!clk_dir)
113 return -ENOMEM;
114
115 if (!debugfs_create_file("rate", S_IRUGO | S_IWUSR, clk_dir,
116 clock, &clock_rate_fops))
117 goto error;
118
119 if (!debugfs_create_file("enable", S_IRUGO | S_IWUSR, clk_dir,
120 clock, &clock_enable_fops))
121 goto error;
122
123 if (!debugfs_create_file("is_local", S_IRUGO, clk_dir, clock,
124 &clock_local_fops))
125 goto error;
126 return 0;
127error:
128 debugfs_remove_recursive(clk_dir);
129 return -ENOMEM;
130}
diff --git a/arch/arm/mach-msm/clock-pcom.c b/arch/arm/mach-msm/clock-pcom.c
index a52c970df157..9a80449518e6 100644
--- a/arch/arm/mach-msm/clock-pcom.c
+++ b/arch/arm/mach-msm/clock-pcom.c
@@ -1,6 +1,6 @@
1/* 1/*
2 * Copyright (C) 2007 Google, Inc. 2 * Copyright (C) 2007 Google, Inc.
3 * Copyright (c) 2007-2010, Code Aurora Forum. All rights reserved. 3 * Copyright (c) 2007-2012, The Linux Foundation. All rights reserved.
4 * 4 *
5 * This software is licensed under the terms of the GNU General Public 5 * This software is licensed under the terms of the GNU General Public
6 * License version 2, as published by the Free Software Foundation, and 6 * License version 2, as published by the Free Software Foundation, and
@@ -13,20 +13,33 @@
13 * 13 *
14 */ 14 */
15 15
16#include <linux/kernel.h>
16#include <linux/err.h> 17#include <linux/err.h>
17#include <linux/ctype.h> 18#include <linux/platform_device.h>
18#include <linux/stddef.h> 19#include <linux/module.h>
20#include <linux/clk-provider.h>
21#include <linux/clkdev.h>
22
19#include <mach/clk.h> 23#include <mach/clk.h>
20 24
21#include "proc_comm.h" 25#include "proc_comm.h"
22#include "clock.h" 26#include "clock.h"
23#include "clock-pcom.h" 27#include "clock-pcom.h"
24 28
25/* 29struct clk_pcom {
26 * glue for the proc_comm interface 30 unsigned id;
27 */ 31 unsigned long flags;
28static int pc_clk_enable(unsigned id) 32 struct msm_clk msm_clk;
33};
34
35static inline struct clk_pcom *to_clk_pcom(struct clk_hw *hw)
29{ 36{
37 return container_of(to_msm_clk(hw), struct clk_pcom, msm_clk);
38}
39
40static int pc_clk_enable(struct clk_hw *hw)
41{
42 unsigned id = to_clk_pcom(hw)->id;
30 int rc = msm_proc_comm(PCOM_CLKCTL_RPC_ENABLE, &id, NULL); 43 int rc = msm_proc_comm(PCOM_CLKCTL_RPC_ENABLE, &id, NULL);
31 if (rc < 0) 44 if (rc < 0)
32 return rc; 45 return rc;
@@ -34,14 +47,16 @@ static int pc_clk_enable(unsigned id)
34 return (int)id < 0 ? -EINVAL : 0; 47 return (int)id < 0 ? -EINVAL : 0;
35} 48}
36 49
37static void pc_clk_disable(unsigned id) 50static void pc_clk_disable(struct clk_hw *hw)
38{ 51{
52 unsigned id = to_clk_pcom(hw)->id;
39 msm_proc_comm(PCOM_CLKCTL_RPC_DISABLE, &id, NULL); 53 msm_proc_comm(PCOM_CLKCTL_RPC_DISABLE, &id, NULL);
40} 54}
41 55
42int pc_clk_reset(unsigned id, enum clk_reset_action action) 56static int pc_clk_reset(struct clk_hw *hw, enum clk_reset_action action)
43{ 57{
44 int rc; 58 int rc;
59 unsigned id = to_clk_pcom(hw)->id;
45 60
46 if (action == CLK_RESET_ASSERT) 61 if (action == CLK_RESET_ASSERT)
47 rc = msm_proc_comm(PCOM_CLKCTL_RPC_RESET_ASSERT, &id, NULL); 62 rc = msm_proc_comm(PCOM_CLKCTL_RPC_RESET_ASSERT, &id, NULL);
@@ -54,85 +69,109 @@ int pc_clk_reset(unsigned id, enum clk_reset_action action)
54 return (int)id < 0 ? -EINVAL : 0; 69 return (int)id < 0 ? -EINVAL : 0;
55} 70}
56 71
57static int pc_clk_set_rate(unsigned id, unsigned rate) 72static int pc_clk_set_rate(struct clk_hw *hw, unsigned long new_rate,
73 unsigned long p_rate)
58{ 74{
59 /* The rate _might_ be rounded off to the nearest KHz value by the 75 struct clk_pcom *p = to_clk_pcom(hw);
76 unsigned id = p->id, rate = new_rate;
77 int rc;
78
79 /*
80 * The rate _might_ be rounded off to the nearest KHz value by the
60 * remote function. So a return value of 0 doesn't necessarily mean 81 * remote function. So a return value of 0 doesn't necessarily mean
61 * that the exact rate was set successfully. 82 * that the exact rate was set successfully.
62 */ 83 */
63 int rc = msm_proc_comm(PCOM_CLKCTL_RPC_SET_RATE, &id, &rate); 84 if (p->flags & CLKFLAG_MIN)
64 if (rc < 0) 85 rc = msm_proc_comm(PCOM_CLKCTL_RPC_MIN_RATE, &id, &rate);
65 return rc;
66 else
67 return (int)id < 0 ? -EINVAL : 0;
68}
69
70static int pc_clk_set_min_rate(unsigned id, unsigned rate)
71{
72 int rc = msm_proc_comm(PCOM_CLKCTL_RPC_MIN_RATE, &id, &rate);
73 if (rc < 0)
74 return rc;
75 else
76 return (int)id < 0 ? -EINVAL : 0;
77}
78
79static int pc_clk_set_max_rate(unsigned id, unsigned rate)
80{
81 int rc = msm_proc_comm(PCOM_CLKCTL_RPC_MAX_RATE, &id, &rate);
82 if (rc < 0)
83 return rc;
84 else 86 else
85 return (int)id < 0 ? -EINVAL : 0; 87 rc = msm_proc_comm(PCOM_CLKCTL_RPC_SET_RATE, &id, &rate);
86}
87
88static int pc_clk_set_flags(unsigned id, unsigned flags)
89{
90 int rc = msm_proc_comm(PCOM_CLKCTL_RPC_SET_FLAGS, &id, &flags);
91 if (rc < 0) 88 if (rc < 0)
92 return rc; 89 return rc;
93 else 90 else
94 return (int)id < 0 ? -EINVAL : 0; 91 return (int)id < 0 ? -EINVAL : 0;
95} 92}
96 93
97static unsigned pc_clk_get_rate(unsigned id) 94static unsigned long pc_clk_recalc_rate(struct clk_hw *hw, unsigned long p_rate)
98{ 95{
96 unsigned id = to_clk_pcom(hw)->id;
99 if (msm_proc_comm(PCOM_CLKCTL_RPC_RATE, &id, NULL)) 97 if (msm_proc_comm(PCOM_CLKCTL_RPC_RATE, &id, NULL))
100 return 0; 98 return 0;
101 else 99 else
102 return id; 100 return id;
103} 101}
104 102
105static unsigned pc_clk_is_enabled(unsigned id) 103static int pc_clk_is_enabled(struct clk_hw *hw)
106{ 104{
105 unsigned id = to_clk_pcom(hw)->id;
107 if (msm_proc_comm(PCOM_CLKCTL_RPC_ENABLED, &id, NULL)) 106 if (msm_proc_comm(PCOM_CLKCTL_RPC_ENABLED, &id, NULL))
108 return 0; 107 return 0;
109 else 108 else
110 return id; 109 return id;
111} 110}
112 111
113static long pc_clk_round_rate(unsigned id, unsigned rate) 112static long pc_clk_round_rate(struct clk_hw *hw, unsigned long rate,
113 unsigned long *p_rate)
114{ 114{
115
116 /* Not really supported; pc_clk_set_rate() does rounding on it's own. */ 115 /* Not really supported; pc_clk_set_rate() does rounding on it's own. */
117 return rate; 116 return rate;
118} 117}
119 118
120static bool pc_clk_is_local(unsigned id) 119static struct clk_ops clk_ops_pcom = {
121{
122 return false;
123}
124
125struct clk_ops clk_ops_pcom = {
126 .enable = pc_clk_enable, 120 .enable = pc_clk_enable,
127 .disable = pc_clk_disable, 121 .disable = pc_clk_disable,
128 .auto_off = pc_clk_disable,
129 .reset = pc_clk_reset,
130 .set_rate = pc_clk_set_rate, 122 .set_rate = pc_clk_set_rate,
131 .set_min_rate = pc_clk_set_min_rate, 123 .recalc_rate = pc_clk_recalc_rate,
132 .set_max_rate = pc_clk_set_max_rate,
133 .set_flags = pc_clk_set_flags,
134 .get_rate = pc_clk_get_rate,
135 .is_enabled = pc_clk_is_enabled, 124 .is_enabled = pc_clk_is_enabled,
136 .round_rate = pc_clk_round_rate, 125 .round_rate = pc_clk_round_rate,
137 .is_local = pc_clk_is_local,
138}; 126};
127
128static int msm_clock_pcom_probe(struct platform_device *pdev)
129{
130 const struct pcom_clk_pdata *pdata = pdev->dev.platform_data;
131 int i, ret;
132
133 for (i = 0; i < pdata->num_lookups; i++) {
134 const struct clk_pcom_desc *desc = &pdata->lookup[i];
135 struct clk *c;
136 struct clk_pcom *p;
137 struct clk_hw *hw;
138 struct clk_init_data init;
139
140 p = devm_kzalloc(&pdev->dev, sizeof(*p), GFP_KERNEL);
141 if (!p)
142 return -ENOMEM;
143
144 p->id = desc->id;
145 p->flags = desc->flags;
146 p->msm_clk.reset = pc_clk_reset;
147
148 hw = &p->msm_clk.hw;
149 hw->init = &init;
150
151 init.name = desc->name;
152 init.ops = &clk_ops_pcom;
153 init.num_parents = 0;
154 init.flags = CLK_IS_ROOT;
155
156 if (!(p->flags & CLKFLAG_AUTO_OFF))
157 init.flags |= CLK_IGNORE_UNUSED;
158
159 c = devm_clk_register(&pdev->dev, hw);
160 ret = clk_register_clkdev(c, desc->con, desc->dev);
161 if (ret)
162 return ret;
163 }
164
165 return 0;
166}
167
168static struct platform_driver msm_clock_pcom_driver = {
169 .probe = msm_clock_pcom_probe,
170 .driver = {
171 .name = "msm-clock-pcom",
172 .owner = THIS_MODULE,
173 },
174};
175module_platform_driver(msm_clock_pcom_driver);
176
177MODULE_LICENSE("GPL v2");
diff --git a/arch/arm/mach-msm/clock-pcom.h b/arch/arm/mach-msm/clock-pcom.h
index 974d0032f3a3..5bb164fd46a8 100644
--- a/arch/arm/mach-msm/clock-pcom.h
+++ b/arch/arm/mach-msm/clock-pcom.h
@@ -1,4 +1,5 @@
1/* Copyright (c) 2009, Code Aurora Forum. All rights reserved. 1/*
2 * Copyright (c) 2009-2012, The Linux Foundation. All rights reserved.
2 * 3 *
3 * This program is free software; you can redistribute it and/or modify 4 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License version 2 and 5 * it under the terms of the GNU General Public License version 2 and
@@ -120,21 +121,25 @@
120 121
121#define P_NR_CLKS 102 122#define P_NR_CLKS 102
122 123
123struct clk_ops; 124struct clk_pcom_desc {
124extern struct clk_ops clk_ops_pcom; 125 unsigned id;
126 const char *name;
127 const char *con;
128 const char *dev;
129 unsigned long flags;
130};
125 131
126int pc_clk_reset(unsigned id, enum clk_reset_action action); 132struct pcom_clk_pdata {
133 struct clk_pcom_desc *lookup;
134 u32 num_lookups;
135};
127 136
128#define CLK_PCOM(clk_name, clk_id, clk_dev, clk_flags) { \ 137#define CLK_PCOM(clk_name, clk_id, clk_dev, clk_flags) { \
129 .con_id = clk_name, \ 138 .id = P_##clk_id, \
130 .dev_id = clk_dev, \ 139 .name = #clk_id, \
131 .clk = &(struct clk){ \ 140 .con = clk_name, \
132 .id = P_##clk_id, \ 141 .dev = clk_dev, \
133 .remote_id = P_##clk_id, \ 142 .flags = clk_flags, \
134 .ops = &clk_ops_pcom, \
135 .flags = clk_flags, \
136 .dbg_name = #clk_id, \
137 }, \
138 } 143 }
139 144
140#endif 145#endif
diff --git a/arch/arm/mach-msm/clock.c b/arch/arm/mach-msm/clock.c
index d9145dfc2a3b..35ea02b52483 100644
--- a/arch/arm/mach-msm/clock.c
+++ b/arch/arm/mach-msm/clock.c
@@ -1,7 +1,7 @@
1/* arch/arm/mach-msm/clock.c 1/* arch/arm/mach-msm/clock.c
2 * 2 *
3 * Copyright (C) 2007 Google, Inc. 3 * Copyright (C) 2007 Google, Inc.
4 * Copyright (c) 2007-2010, Code Aurora Forum. All rights reserved. 4 * Copyright (c) 2007-2012, The Linux Foundation. All rights reserved.
5 * 5 *
6 * This software is licensed under the terms of the GNU General Public 6 * This software is licensed under the terms of the GNU General Public
7 * License version 2, as published by the Free Software Foundation, and 7 * License version 2, as published by the Free Software Foundation, and
@@ -14,171 +14,15 @@
14 * 14 *
15 */ 15 */
16 16
17#include <linux/kernel.h> 17#include <linux/clk-provider.h>
18#include <linux/list.h>
19#include <linux/err.h>
20#include <linux/spinlock.h>
21#include <linux/pm_qos.h>
22#include <linux/mutex.h>
23#include <linux/clk.h>
24#include <linux/string.h>
25#include <linux/module.h> 18#include <linux/module.h>
26#include <linux/clkdev.h>
27 19
28#include "clock.h" 20#include "clock.h"
29 21
30static DEFINE_MUTEX(clocks_mutex);
31static DEFINE_SPINLOCK(clocks_lock);
32static LIST_HEAD(clocks);
33
34/*
35 * Standard clock functions defined in include/linux/clk.h
36 */
37int clk_enable(struct clk *clk)
38{
39 unsigned long flags;
40 spin_lock_irqsave(&clocks_lock, flags);
41 clk->count++;
42 if (clk->count == 1)
43 clk->ops->enable(clk->id);
44 spin_unlock_irqrestore(&clocks_lock, flags);
45 return 0;
46}
47EXPORT_SYMBOL(clk_enable);
48
49void clk_disable(struct clk *clk)
50{
51 unsigned long flags;
52 spin_lock_irqsave(&clocks_lock, flags);
53 BUG_ON(clk->count == 0);
54 clk->count--;
55 if (clk->count == 0)
56 clk->ops->disable(clk->id);
57 spin_unlock_irqrestore(&clocks_lock, flags);
58}
59EXPORT_SYMBOL(clk_disable);
60
61int clk_reset(struct clk *clk, enum clk_reset_action action) 22int clk_reset(struct clk *clk, enum clk_reset_action action)
62{ 23{
63 return clk->ops->reset(clk->remote_id, action); 24 struct clk_hw *hw = __clk_get_hw(clk);
25 struct msm_clk *m = to_msm_clk(hw);
26 return m->reset(hw, action);
64} 27}
65EXPORT_SYMBOL(clk_reset); 28EXPORT_SYMBOL(clk_reset);
66
67unsigned long clk_get_rate(struct clk *clk)
68{
69 return clk->ops->get_rate(clk->id);
70}
71EXPORT_SYMBOL(clk_get_rate);
72
73int clk_set_rate(struct clk *clk, unsigned long rate)
74{
75 int ret;
76 if (clk->flags & CLKFLAG_MAX) {
77 ret = clk->ops->set_max_rate(clk->id, rate);
78 if (ret)
79 return ret;
80 }
81 if (clk->flags & CLKFLAG_MIN) {
82 ret = clk->ops->set_min_rate(clk->id, rate);
83 if (ret)
84 return ret;
85 }
86
87 if (clk->flags & CLKFLAG_MAX || clk->flags & CLKFLAG_MIN)
88 return ret;
89
90 return clk->ops->set_rate(clk->id, rate);
91}
92EXPORT_SYMBOL(clk_set_rate);
93
94long clk_round_rate(struct clk *clk, unsigned long rate)
95{
96 return clk->ops->round_rate(clk->id, rate);
97}
98EXPORT_SYMBOL(clk_round_rate);
99
100int clk_set_min_rate(struct clk *clk, unsigned long rate)
101{
102 return clk->ops->set_min_rate(clk->id, rate);
103}
104EXPORT_SYMBOL(clk_set_min_rate);
105
106int clk_set_max_rate(struct clk *clk, unsigned long rate)
107{
108 return clk->ops->set_max_rate(clk->id, rate);
109}
110EXPORT_SYMBOL(clk_set_max_rate);
111
112int clk_set_parent(struct clk *clk, struct clk *parent)
113{
114 return -ENOSYS;
115}
116EXPORT_SYMBOL(clk_set_parent);
117
118struct clk *clk_get_parent(struct clk *clk)
119{
120 return ERR_PTR(-ENOSYS);
121}
122EXPORT_SYMBOL(clk_get_parent);
123
124int clk_set_flags(struct clk *clk, unsigned long flags)
125{
126 if (clk == NULL || IS_ERR(clk))
127 return -EINVAL;
128 return clk->ops->set_flags(clk->id, flags);
129}
130EXPORT_SYMBOL(clk_set_flags);
131
132/* EBI1 is the only shared clock that several clients want to vote on as of
133 * this commit. If this changes in the future, then it might be better to
134 * make clk_min_rate handle the voting or make ebi1_clk_set_min_rate more
135 * generic to support different clocks.
136 */
137static struct clk *ebi1_clk;
138
139void __init msm_clock_init(struct clk_lookup *clock_tbl, unsigned num_clocks)
140{
141 unsigned n;
142
143 mutex_lock(&clocks_mutex);
144 for (n = 0; n < num_clocks; n++) {
145 clkdev_add(&clock_tbl[n]);
146 list_add_tail(&clock_tbl[n].clk->list, &clocks);
147 }
148 mutex_unlock(&clocks_mutex);
149
150 ebi1_clk = clk_get(NULL, "ebi1_clk");
151 BUG_ON(ebi1_clk == NULL);
152
153}
154
155/* The bootloader and/or AMSS may have left various clocks enabled.
156 * Disable any clocks that belong to us (CLKFLAG_AUTO_OFF) but have
157 * not been explicitly enabled by a clk_enable() call.
158 */
159static int __init clock_late_init(void)
160{
161 unsigned long flags;
162 struct clk *clk;
163 unsigned count = 0;
164
165 clock_debug_init();
166 mutex_lock(&clocks_mutex);
167 list_for_each_entry(clk, &clocks, list) {
168 clock_debug_add(clk);
169 if (clk->flags & CLKFLAG_AUTO_OFF) {
170 spin_lock_irqsave(&clocks_lock, flags);
171 if (!clk->count) {
172 count++;
173 clk->ops->auto_off(clk->id);
174 }
175 spin_unlock_irqrestore(&clocks_lock, flags);
176 }
177 }
178 mutex_unlock(&clocks_mutex);
179 pr_info("clock_late_init() disabled %d unused clocks\n", count);
180 return 0;
181}
182
183late_initcall(clock_late_init);
184
diff --git a/arch/arm/mach-msm/clock.h b/arch/arm/mach-msm/clock.h
index 2c007f606d29..42d29dd7aafc 100644
--- a/arch/arm/mach-msm/clock.h
+++ b/arch/arm/mach-msm/clock.h
@@ -1,7 +1,7 @@
1/* arch/arm/mach-msm/clock.h 1/* arch/arm/mach-msm/clock.h
2 * 2 *
3 * Copyright (C) 2007 Google, Inc. 3 * Copyright (C) 2007 Google, Inc.
4 * Copyright (c) 2007-2010, Code Aurora Forum. All rights reserved. 4 * Copyright (c) 2007-2012, The Linux Foundation. All rights reserved.
5 * 5 *
6 * This software is licensed under the terms of the GNU General Public 6 * This software is licensed under the terms of the GNU General Public
7 * License version 2, as published by the Free Software Foundation, and 7 * License version 2, as published by the Free Software Foundation, and
@@ -17,56 +17,27 @@
17#ifndef __ARCH_ARM_MACH_MSM_CLOCK_H 17#ifndef __ARCH_ARM_MACH_MSM_CLOCK_H
18#define __ARCH_ARM_MACH_MSM_CLOCK_H 18#define __ARCH_ARM_MACH_MSM_CLOCK_H
19 19
20#include <linux/init.h> 20#include <linux/clk-provider.h>
21#include <linux/list.h>
22#include <mach/clk.h> 21#include <mach/clk.h>
23 22
24#define CLKFLAG_INVERT 0x00000001
25#define CLKFLAG_NOINVERT 0x00000002
26#define CLKFLAG_NONEST 0x00000004
27#define CLKFLAG_NORESET 0x00000008
28
29#define CLK_FIRST_AVAILABLE_FLAG 0x00000100 23#define CLK_FIRST_AVAILABLE_FLAG 0x00000100
30#define CLKFLAG_AUTO_OFF 0x00000200 24#define CLKFLAG_AUTO_OFF 0x00000200
31#define CLKFLAG_MIN 0x00000400 25#define CLKFLAG_MIN 0x00000400
32#define CLKFLAG_MAX 0x00000800 26#define CLKFLAG_MAX 0x00000800
33 27
34struct clk_ops {
35 int (*enable)(unsigned id);
36 void (*disable)(unsigned id);
37 void (*auto_off)(unsigned id);
38 int (*reset)(unsigned id, enum clk_reset_action action);
39 int (*set_rate)(unsigned id, unsigned rate);
40 int (*set_min_rate)(unsigned id, unsigned rate);
41 int (*set_max_rate)(unsigned id, unsigned rate);
42 int (*set_flags)(unsigned id, unsigned flags);
43 unsigned (*get_rate)(unsigned id);
44 unsigned (*is_enabled)(unsigned id);
45 long (*round_rate)(unsigned id, unsigned rate);
46 bool (*is_local)(unsigned id);
47};
48
49struct clk {
50 uint32_t id;
51 uint32_t remote_id;
52 uint32_t count;
53 uint32_t flags;
54 struct clk_ops *ops;
55 const char *dbg_name;
56 struct list_head list;
57};
58
59#define OFF CLKFLAG_AUTO_OFF 28#define OFF CLKFLAG_AUTO_OFF
60#define CLK_MIN CLKFLAG_MIN 29#define CLK_MIN CLKFLAG_MIN
61#define CLK_MAX CLKFLAG_MAX 30#define CLK_MAX CLKFLAG_MAX
62#define CLK_MINMAX (CLK_MIN | CLK_MAX) 31#define CLK_MINMAX (CLK_MIN | CLK_MAX)
63 32
64#ifdef CONFIG_DEBUG_FS 33struct msm_clk {
65int __init clock_debug_init(void); 34 int (*reset)(struct clk_hw *hw, enum clk_reset_action action);
66int __init clock_debug_add(struct clk *clock); 35 struct clk_hw hw;
67#else 36};
68static inline int __init clock_debug_init(void) { return 0; } 37
69static inline int __init clock_debug_add(struct clk *clock) { return 0; } 38static inline struct msm_clk *to_msm_clk(struct clk_hw *hw)
70#endif 39{
40 return container_of(hw, struct msm_clk, hw);
41}
71 42
72#endif 43#endif
diff --git a/arch/arm/mach-msm/common.h b/arch/arm/mach-msm/common.h
index ce8215a269e5..421cf7751a80 100644
--- a/arch/arm/mach-msm/common.h
+++ b/arch/arm/mach-msm/common.h
@@ -23,7 +23,7 @@ extern void msm_map_msm8x60_io(void);
23extern void msm_map_msm8960_io(void); 23extern void msm_map_msm8960_io(void);
24extern void msm_map_qsd8x50_io(void); 24extern void msm_map_qsd8x50_io(void);
25 25
26extern void __iomem *__msm_ioremap_caller(unsigned long phys_addr, size_t size, 26extern void __iomem *__msm_ioremap_caller(phys_addr_t phys_addr, size_t size,
27 unsigned int mtype, void *caller); 27 unsigned int mtype, void *caller);
28 28
29extern struct smp_operations msm_smp_ops; 29extern struct smp_operations msm_smp_ops;
diff --git a/arch/arm/mach-msm/core.h b/arch/arm/mach-msm/core.h
deleted file mode 100644
index a9bab53dddf4..000000000000
--- a/arch/arm/mach-msm/core.h
+++ /dev/null
@@ -1,2 +0,0 @@
1extern struct smp_operations msm_smp_ops;
2extern void msm_cpu_die(unsigned int cpu);
diff --git a/arch/arm/mach-msm/devices-msm7x00.c b/arch/arm/mach-msm/devices-msm7x00.c
index 1a0a2306b115..6d50fb964863 100644
--- a/arch/arm/mach-msm/devices-msm7x00.c
+++ b/arch/arm/mach-msm/devices-msm7x00.c
@@ -425,7 +425,7 @@ struct platform_device msm_device_mdp = {
425 .resource = resources_mdp, 425 .resource = resources_mdp,
426}; 426};
427 427
428struct clk_lookup msm_clocks_7x01a[] = { 428static struct clk_pcom_desc msm_clocks_7x01a[] = {
429 CLK_PCOM("adm_clk", ADM_CLK, NULL, 0), 429 CLK_PCOM("adm_clk", ADM_CLK, NULL, 0),
430 CLK_PCOM("adsp_clk", ADSP_CLK, NULL, 0), 430 CLK_PCOM("adsp_clk", ADSP_CLK, NULL, 0),
431 CLK_PCOM("ebi1_clk", EBI1_CLK, NULL, 0), 431 CLK_PCOM("ebi1_clk", EBI1_CLK, NULL, 0),
@@ -469,4 +469,12 @@ struct clk_lookup msm_clocks_7x01a[] = {
469 CLK_PCOM("vfe_mdc_clk", VFE_MDC_CLK, NULL, OFF), 469 CLK_PCOM("vfe_mdc_clk", VFE_MDC_CLK, NULL, OFF),
470}; 470};
471 471
472unsigned msm_num_clocks_7x01a = ARRAY_SIZE(msm_clocks_7x01a); 472static struct pcom_clk_pdata msm_clock_7x01a_pdata = {
473 .lookup = msm_clocks_7x01a,
474 .num_lookups = ARRAY_SIZE(msm_clocks_7x01a),
475};
476
477struct platform_device msm_clock_7x01a = {
478 .name = "msm-clock-pcom",
479 .dev.platform_data = &msm_clock_7x01a_pdata,
480};
diff --git a/arch/arm/mach-msm/devices-msm7x30.c b/arch/arm/mach-msm/devices-msm7x30.c
index 12f482c07740..d4db75acff56 100644
--- a/arch/arm/mach-msm/devices-msm7x30.c
+++ b/arch/arm/mach-msm/devices-msm7x30.c
@@ -28,8 +28,8 @@
28 28
29#include <asm/mach/flash.h> 29#include <asm/mach/flash.h>
30 30
31#include "clock.h"
31#include "clock-pcom.h" 32#include "clock-pcom.h"
32#include "clock-7x30.h"
33 33
34#include <linux/platform_data/mmc-msm_sdcc.h> 34#include <linux/platform_data/mmc-msm_sdcc.h>
35 35
@@ -161,7 +161,7 @@ struct platform_device msm_device_hsusb_host = {
161 }, 161 },
162}; 162};
163 163
164struct clk_lookup msm_clocks_7x30[] = { 164static struct clk_pcom_desc msm_clocks_7x30[] = {
165 CLK_PCOM("adm_clk", ADM_CLK, NULL, 0), 165 CLK_PCOM("adm_clk", ADM_CLK, NULL, 0),
166 CLK_PCOM("adsp_clk", ADSP_CLK, NULL, 0), 166 CLK_PCOM("adsp_clk", ADSP_CLK, NULL, 0),
167 CLK_PCOM("cam_m_clk", CAM_M_CLK, NULL, 0), 167 CLK_PCOM("cam_m_clk", CAM_M_CLK, NULL, 0),
@@ -177,7 +177,6 @@ struct clk_lookup msm_clocks_7x30[] = {
177 CLK_PCOM("grp_2d_pclk", GRP_2D_P_CLK, NULL, 0), 177 CLK_PCOM("grp_2d_pclk", GRP_2D_P_CLK, NULL, 0),
178 CLK_PCOM("grp_clk", GRP_3D_CLK, NULL, 0), 178 CLK_PCOM("grp_clk", GRP_3D_CLK, NULL, 0),
179 CLK_PCOM("grp_pclk", GRP_3D_P_CLK, NULL, 0), 179 CLK_PCOM("grp_pclk", GRP_3D_P_CLK, NULL, 0),
180 CLK_7X30S("grp_src_clk", GRP_3D_SRC_CLK, GRP_3D_CLK, NULL, 0),
181 CLK_PCOM("hdmi_clk", HDMI_CLK, NULL, 0), 180 CLK_PCOM("hdmi_clk", HDMI_CLK, NULL, 0),
182 CLK_PCOM("imem_clk", IMEM_CLK, NULL, OFF), 181 CLK_PCOM("imem_clk", IMEM_CLK, NULL, OFF),
183 CLK_PCOM("jpeg_clk", JPEG_CLK, NULL, OFF), 182 CLK_PCOM("jpeg_clk", JPEG_CLK, NULL, OFF),
@@ -210,7 +209,6 @@ struct clk_lookup msm_clocks_7x30[] = {
210 CLK_PCOM("sdac_clk", SDAC_CLK, NULL, OFF), 209 CLK_PCOM("sdac_clk", SDAC_CLK, NULL, OFF),
211 CLK_PCOM("spi_clk", SPI_CLK, NULL, 0), 210 CLK_PCOM("spi_clk", SPI_CLK, NULL, 0),
212 CLK_PCOM("spi_pclk", SPI_P_CLK, NULL, 0), 211 CLK_PCOM("spi_pclk", SPI_P_CLK, NULL, 0),
213 CLK_7X30S("tv_src_clk", TV_CLK, TV_ENC_CLK, NULL, 0),
214 CLK_PCOM("tv_dac_clk", TV_DAC_CLK, NULL, 0), 212 CLK_PCOM("tv_dac_clk", TV_DAC_CLK, NULL, 0),
215 CLK_PCOM("tv_enc_clk", TV_ENC_CLK, NULL, 0), 213 CLK_PCOM("tv_enc_clk", TV_ENC_CLK, NULL, 0),
216 CLK_PCOM("uart_clk", UART2_CLK, "msm_serial.1", 0), 214 CLK_PCOM("uart_clk", UART2_CLK, "msm_serial.1", 0),
@@ -237,5 +235,12 @@ struct clk_lookup msm_clocks_7x30[] = {
237 CLK_PCOM("csi_vfe_clk", CSI0_VFE_CLK, NULL, 0), 235 CLK_PCOM("csi_vfe_clk", CSI0_VFE_CLK, NULL, 0),
238}; 236};
239 237
240unsigned msm_num_clocks_7x30 = ARRAY_SIZE(msm_clocks_7x30); 238static struct pcom_clk_pdata msm_clock_7x30_pdata = {
239 .lookup = msm_clocks_7x30,
240 .num_lookups = ARRAY_SIZE(msm_clocks_7x30),
241};
241 242
243struct platform_device msm_clock_7x30 = {
244 .name = "msm-clock-pcom",
245 .dev.platform_data = &msm_clock_7x30_pdata,
246};
diff --git a/arch/arm/mach-msm/devices-qsd8x50.c b/arch/arm/mach-msm/devices-qsd8x50.c
index 2e1b3ec9dfc7..f5518112284b 100644
--- a/arch/arm/mach-msm/devices-qsd8x50.c
+++ b/arch/arm/mach-msm/devices-qsd8x50.c
@@ -28,6 +28,7 @@
28#include <asm/mach/flash.h> 28#include <asm/mach/flash.h>
29 29
30#include <linux/platform_data/mmc-msm_sdcc.h> 30#include <linux/platform_data/mmc-msm_sdcc.h>
31#include "clock.h"
31#include "clock-pcom.h" 32#include "clock-pcom.h"
32 33
33static struct resource msm_gpio_resources[] = { 34static struct resource msm_gpio_resources[] = {
@@ -322,7 +323,7 @@ int __init msm_add_sdcc(unsigned int controller,
322 return platform_device_register(pdev); 323 return platform_device_register(pdev);
323} 324}
324 325
325struct clk_lookup msm_clocks_8x50[] = { 326static struct clk_pcom_desc msm_clocks_8x50[] = {
326 CLK_PCOM("adm_clk", ADM_CLK, NULL, 0), 327 CLK_PCOM("adm_clk", ADM_CLK, NULL, 0),
327 CLK_PCOM("ce_clk", CE_CLK, NULL, 0), 328 CLK_PCOM("ce_clk", CE_CLK, NULL, 0),
328 CLK_PCOM("ebi1_clk", EBI1_CLK, NULL, CLK_MIN), 329 CLK_PCOM("ebi1_clk", EBI1_CLK, NULL, CLK_MIN),
@@ -376,5 +377,12 @@ struct clk_lookup msm_clocks_8x50[] = {
376 CLK_PCOM("usb_phy_clk", USB_PHY_CLK, NULL, 0), 377 CLK_PCOM("usb_phy_clk", USB_PHY_CLK, NULL, 0),
377}; 378};
378 379
379unsigned msm_num_clocks_8x50 = ARRAY_SIZE(msm_clocks_8x50); 380static struct pcom_clk_pdata msm_clock_8x50_pdata = {
381 .lookup = msm_clocks_8x50,
382 .num_lookups = ARRAY_SIZE(msm_clocks_8x50),
383};
380 384
385struct platform_device msm_clock_8x50 = {
386 .name = "msm-clock-pcom",
387 .dev.platform_data = &msm_clock_8x50_pdata,
388};
diff --git a/arch/arm/mach-msm/devices.h b/arch/arm/mach-msm/devices.h
index da902cf51161..dccefad9f9b9 100644
--- a/arch/arm/mach-msm/devices.h
+++ b/arch/arm/mach-msm/devices.h
@@ -16,10 +16,6 @@
16#ifndef __ARCH_ARM_MACH_MSM_DEVICES_H 16#ifndef __ARCH_ARM_MACH_MSM_DEVICES_H
17#define __ARCH_ARM_MACH_MSM_DEVICES_H 17#define __ARCH_ARM_MACH_MSM_DEVICES_H
18 18
19#include <linux/clkdev.h>
20
21#include "clock.h"
22
23extern struct platform_device msm_device_gpio_7201; 19extern struct platform_device msm_device_gpio_7201;
24extern struct platform_device msm_device_gpio_7x30; 20extern struct platform_device msm_device_gpio_7x30;
25extern struct platform_device msm_device_gpio_8x50; 21extern struct platform_device msm_device_gpio_8x50;
@@ -50,13 +46,8 @@ extern struct platform_device msm_device_mddi0;
50extern struct platform_device msm_device_mddi1; 46extern struct platform_device msm_device_mddi1;
51extern struct platform_device msm_device_mdp; 47extern struct platform_device msm_device_mdp;
52 48
53extern struct clk_lookup msm_clocks_7x01a[]; 49extern struct platform_device msm_clock_7x01a;
54extern unsigned msm_num_clocks_7x01a; 50extern struct platform_device msm_clock_7x30;
55 51extern struct platform_device msm_clock_8x50;
56extern struct clk_lookup msm_clocks_7x30[];
57extern unsigned msm_num_clocks_7x30;
58
59extern struct clk_lookup msm_clocks_8x50[];
60extern unsigned msm_num_clocks_8x50;
61 52
62#endif 53#endif
diff --git a/arch/arm/mach-msm/dma.c b/arch/arm/mach-msm/dma.c
index b279fd8a31b1..f8f6adfa07c6 100644
--- a/arch/arm/mach-msm/dma.c
+++ b/arch/arm/mach-msm/dma.c
@@ -284,6 +284,7 @@ static int __init msm_init_datamover(void)
284 clk = clk_get(NULL, "adm_clk"); 284 clk = clk_get(NULL, "adm_clk");
285 if (IS_ERR(clk)) 285 if (IS_ERR(clk))
286 return PTR_ERR(clk); 286 return PTR_ERR(clk);
287 clk_prepare(clk);
287 msm_dmov_clk = clk; 288 msm_dmov_clk = clk;
288 ret = request_irq(INT_ADM_AARM, msm_datamover_irq_handler, 0, "msmdatamover", NULL); 289 ret = request_irq(INT_ADM_AARM, msm_datamover_irq_handler, 0, "msmdatamover", NULL);
289 if (ret) 290 if (ret)
@@ -291,6 +292,4 @@ static int __init msm_init_datamover(void)
291 disable_irq(INT_ADM_AARM); 292 disable_irq(INT_ADM_AARM);
292 return 0; 293 return 0;
293} 294}
294 295module_init(msm_init_datamover);
295arch_initcall(msm_init_datamover);
296
diff --git a/arch/arm/mach-msm/gpiomux-8x60.c b/arch/arm/mach-msm/gpiomux-8x60.c
deleted file mode 100644
index 7b380b31bd0e..000000000000
--- a/arch/arm/mach-msm/gpiomux-8x60.c
+++ /dev/null
@@ -1,19 +0,0 @@
1/* Copyright (c) 2010, Code Aurora Forum. All rights reserved.
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License version 2 and
5 * only version 2 as published by the Free Software Foundation.
6 *
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 * GNU General Public License for more details.
11 *
12 * You should have received a copy of the GNU General Public License
13 * along with this program; if not, write to the Free Software
14 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
15 * 02110-1301, USA.
16 */
17#include "gpiomux.h"
18
19struct msm_gpiomux_config msm_gpiomux_configs[GPIOMUX_NGPIOS] = {};
diff --git a/arch/arm/mach-msm/gpiomux-v1.c b/arch/arm/mach-msm/gpiomux-v1.c
deleted file mode 100644
index 27de2abd7144..000000000000
--- a/arch/arm/mach-msm/gpiomux-v1.c
+++ /dev/null
@@ -1,33 +0,0 @@
1/* Copyright (c) 2010, Code Aurora Forum. All rights reserved.
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License version 2 and
5 * only version 2 as published by the Free Software Foundation.
6 *
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 * GNU General Public License for more details.
11 *
12 * You should have received a copy of the GNU General Public License
13 * along with this program; if not, write to the Free Software
14 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
15 * 02110-1301, USA.
16 */
17#include <linux/kernel.h>
18#include "gpiomux.h"
19#include "proc_comm.h"
20
21void __msm_gpiomux_write(unsigned gpio, gpiomux_config_t val)
22{
23 unsigned tlmm_config = (val & ~GPIOMUX_CTL_MASK) |
24 ((gpio & 0x3ff) << 4);
25 unsigned tlmm_disable = 0;
26 int rc;
27
28 rc = msm_proc_comm(PCOM_RPC_GPIO_TLMM_CONFIG_EX,
29 &tlmm_config, &tlmm_disable);
30 if (rc)
31 pr_err("%s: unexpected proc_comm failure %d: %08x %08x\n",
32 __func__, rc, tlmm_config, tlmm_disable);
33}
diff --git a/arch/arm/mach-msm/gpiomux-v2.c b/arch/arm/mach-msm/gpiomux-v2.c
deleted file mode 100644
index 273396d2b127..000000000000
--- a/arch/arm/mach-msm/gpiomux-v2.c
+++ /dev/null
@@ -1,25 +0,0 @@
1/* Copyright (c) 2010, Code Aurora Forum. All rights reserved.
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License version 2 and
5 * only version 2 as published by the Free Software Foundation.
6 *
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 * GNU General Public License for more details.
11 *
12 * You should have received a copy of the GNU General Public License
13 * along with this program; if not, write to the Free Software
14 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
15 * 02110-1301, USA.
16 */
17#include <linux/io.h>
18#include <mach/msm_iomap.h>
19#include "gpiomux.h"
20
21void __msm_gpiomux_write(unsigned gpio, gpiomux_config_t val)
22{
23 writel(val & ~GPIOMUX_CTL_MASK,
24 MSM_TLMM_BASE + 0x1000 + (0x10 * gpio));
25}
diff --git a/arch/arm/mach-msm/gpiomux-v2.h b/arch/arm/mach-msm/gpiomux-v2.h
deleted file mode 100644
index 3bf10e7f0381..000000000000
--- a/arch/arm/mach-msm/gpiomux-v2.h
+++ /dev/null
@@ -1,61 +0,0 @@
1/* Copyright (c) 2010, Code Aurora Forum. All rights reserved.
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License version 2 and
5 * only version 2 as published by the Free Software Foundation.
6 *
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 * GNU General Public License for more details.
11 *
12 * You should have received a copy of the GNU General Public License
13 * along with this program; if not, write to the Free Software
14 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
15 * 02110-1301, USA.
16 */
17#ifndef __ARCH_ARM_MACH_MSM_GPIOMUX_V2_H
18#define __ARCH_ARM_MACH_MSM_GPIOMUX_V2_H
19
20#define GPIOMUX_NGPIOS 173
21
22typedef u16 gpiomux_config_t;
23
24enum {
25 GPIOMUX_DRV_2MA = 0UL << 6,
26 GPIOMUX_DRV_4MA = 1UL << 6,
27 GPIOMUX_DRV_6MA = 2UL << 6,
28 GPIOMUX_DRV_8MA = 3UL << 6,
29 GPIOMUX_DRV_10MA = 4UL << 6,
30 GPIOMUX_DRV_12MA = 5UL << 6,
31 GPIOMUX_DRV_14MA = 6UL << 6,
32 GPIOMUX_DRV_16MA = 7UL << 6,
33};
34
35enum {
36 GPIOMUX_FUNC_GPIO = 0UL << 2,
37 GPIOMUX_FUNC_1 = 1UL << 2,
38 GPIOMUX_FUNC_2 = 2UL << 2,
39 GPIOMUX_FUNC_3 = 3UL << 2,
40 GPIOMUX_FUNC_4 = 4UL << 2,
41 GPIOMUX_FUNC_5 = 5UL << 2,
42 GPIOMUX_FUNC_6 = 6UL << 2,
43 GPIOMUX_FUNC_7 = 7UL << 2,
44 GPIOMUX_FUNC_8 = 8UL << 2,
45 GPIOMUX_FUNC_9 = 9UL << 2,
46 GPIOMUX_FUNC_A = 10UL << 2,
47 GPIOMUX_FUNC_B = 11UL << 2,
48 GPIOMUX_FUNC_C = 12UL << 2,
49 GPIOMUX_FUNC_D = 13UL << 2,
50 GPIOMUX_FUNC_E = 14UL << 2,
51 GPIOMUX_FUNC_F = 15UL << 2,
52};
53
54enum {
55 GPIOMUX_PULL_NONE = 0UL,
56 GPIOMUX_PULL_DOWN = 1UL,
57 GPIOMUX_PULL_KEEPER = 2UL,
58 GPIOMUX_PULL_UP = 3UL,
59};
60
61#endif
diff --git a/arch/arm/mach-msm/gpiomux.c b/arch/arm/mach-msm/gpiomux.c
index 53af21abd155..2b8e2d217082 100644
--- a/arch/arm/mach-msm/gpiomux.c
+++ b/arch/arm/mach-msm/gpiomux.c
@@ -17,9 +17,24 @@
17#include <linux/module.h> 17#include <linux/module.h>
18#include <linux/spinlock.h> 18#include <linux/spinlock.h>
19#include "gpiomux.h" 19#include "gpiomux.h"
20#include "proc_comm.h"
20 21
21static DEFINE_SPINLOCK(gpiomux_lock); 22static DEFINE_SPINLOCK(gpiomux_lock);
22 23
24static void __msm_gpiomux_write(unsigned gpio, gpiomux_config_t val)
25{
26 unsigned tlmm_config = (val & ~GPIOMUX_CTL_MASK) |
27 ((gpio & 0x3ff) << 4);
28 unsigned tlmm_disable = 0;
29 int rc;
30
31 rc = msm_proc_comm(PCOM_RPC_GPIO_TLMM_CONFIG_EX,
32 &tlmm_config, &tlmm_disable);
33 if (rc)
34 pr_err("%s: unexpected proc_comm failure %d: %08x %08x\n",
35 __func__, rc, tlmm_config, tlmm_disable);
36}
37
23int msm_gpiomux_write(unsigned gpio, 38int msm_gpiomux_write(unsigned gpio,
24 gpiomux_config_t active, 39 gpiomux_config_t active,
25 gpiomux_config_t suspended) 40 gpiomux_config_t suspended)
diff --git a/arch/arm/mach-msm/gpiomux.h b/arch/arm/mach-msm/gpiomux.h
index 00459f6ee13c..4410d7766f93 100644
--- a/arch/arm/mach-msm/gpiomux.h
+++ b/arch/arm/mach-msm/gpiomux.h
@@ -20,12 +20,7 @@
20#include <linux/bitops.h> 20#include <linux/bitops.h>
21#include <linux/errno.h> 21#include <linux/errno.h>
22#include <mach/msm_gpiomux.h> 22#include <mach/msm_gpiomux.h>
23
24#if defined(CONFIG_MSM_V2_TLMM)
25#include "gpiomux-v2.h"
26#else
27#include "gpiomux-v1.h" 23#include "gpiomux-v1.h"
28#endif
29 24
30/** 25/**
31 * struct msm_gpiomux_config: gpiomux settings for one gpio line. 26 * struct msm_gpiomux_config: gpiomux settings for one gpio line.
@@ -78,16 +73,6 @@ extern struct msm_gpiomux_config msm_gpiomux_configs[GPIOMUX_NGPIOS];
78int msm_gpiomux_write(unsigned gpio, 73int msm_gpiomux_write(unsigned gpio,
79 gpiomux_config_t active, 74 gpiomux_config_t active,
80 gpiomux_config_t suspended); 75 gpiomux_config_t suspended);
81
82/* Architecture-internal function for use by the framework only.
83 * This function can assume the following:
84 * - the gpio value has passed a bounds-check
85 * - the gpiomux spinlock has been obtained
86 *
87 * This function is not for public consumption. External users
88 * should use msm_gpiomux_write.
89 */
90void __msm_gpiomux_write(unsigned gpio, gpiomux_config_t val);
91#else 76#else
92static inline int msm_gpiomux_write(unsigned gpio, 77static inline int msm_gpiomux_write(unsigned gpio,
93 gpiomux_config_t active, 78 gpiomux_config_t active,
diff --git a/arch/arm/mach-msm/headsmp.S b/arch/arm/mach-msm/headsmp.S
index bcd5af223dea..6c62c3f82fe6 100644
--- a/arch/arm/mach-msm/headsmp.S
+++ b/arch/arm/mach-msm/headsmp.S
@@ -11,8 +11,6 @@
11#include <linux/linkage.h> 11#include <linux/linkage.h>
12#include <linux/init.h> 12#include <linux/init.h>
13 13
14 __CPUINIT
15
16/* 14/*
17 * MSM specific entry point for secondary CPUs. This provides 15 * MSM specific entry point for secondary CPUs. This provides
18 * a "holding pen" into which all secondary cores are held until we're 16 * a "holding pen" into which all secondary cores are held until we're
diff --git a/arch/arm/mach-msm/include/mach/board.h b/arch/arm/mach-msm/include/mach/board.h
index 8cebedb11233..c34e246a3e07 100644
--- a/arch/arm/mach-msm/include/mach/board.h
+++ b/arch/arm/mach-msm/include/mach/board.h
@@ -20,16 +20,11 @@
20#include <linux/types.h> 20#include <linux/types.h>
21#include <linux/platform_data/mmc-msm_sdcc.h> 21#include <linux/platform_data/mmc-msm_sdcc.h>
22 22
23/* platform device data structures */
24
25struct clk_lookup;
26
27/* common init routines for use by arch/arm/mach-msm/board-*.c */ 23/* common init routines for use by arch/arm/mach-msm/board-*.c */
28 24
29void __init msm_add_devices(void); 25void __init msm_add_devices(void);
30void __init msm_init_irq(void); 26void __init msm_init_irq(void);
31void __init msm_init_gpio(void); 27void __init msm_init_gpio(void);
32void __init msm_clock_init(struct clk_lookup *clock_tbl, unsigned num_clocks);
33int __init msm_add_sdcc(unsigned int controller, 28int __init msm_add_sdcc(unsigned int controller,
34 struct msm_mmc_platform_data *plat, 29 struct msm_mmc_platform_data *plat,
35 unsigned int stat_irq, unsigned long stat_irq_flags); 30 unsigned int stat_irq, unsigned long stat_irq_flags);
diff --git a/arch/arm/mach-msm/include/mach/clk.h b/arch/arm/mach-msm/include/mach/clk.h
index e8d38428d813..fd4f4a7a83b3 100644
--- a/arch/arm/mach-msm/include/mach/clk.h
+++ b/arch/arm/mach-msm/include/mach/clk.h
@@ -25,16 +25,7 @@ enum clk_reset_action {
25 25
26struct clk; 26struct clk;
27 27
28/* Rate is minimum clock rate in Hz */
29int clk_set_min_rate(struct clk *clk, unsigned long rate);
30
31/* Rate is maximum clock rate in Hz */
32int clk_set_max_rate(struct clk *clk, unsigned long rate);
33
34/* Assert/Deassert reset to a hardware block associated with a clock */ 28/* Assert/Deassert reset to a hardware block associated with a clock */
35int clk_reset(struct clk *clk, enum clk_reset_action action); 29int clk_reset(struct clk *clk, enum clk_reset_action action);
36 30
37/* Set clock-specific configuration parameters */
38int clk_set_flags(struct clk *clk, unsigned long flags);
39
40#endif 31#endif
diff --git a/arch/arm/mach-msm/include/mach/msm_iomap-8960.h b/arch/arm/mach-msm/include/mach/msm_iomap-8960.h
index 9819a556acae..7bca8d7108d6 100644
--- a/arch/arm/mach-msm/include/mach/msm_iomap-8960.h
+++ b/arch/arm/mach-msm/include/mach/msm_iomap-8960.h
@@ -32,13 +32,6 @@
32 * 32 *
33 */ 33 */
34 34
35
36#define MSM8960_QGIC_DIST_PHYS 0x02000000
37#define MSM8960_QGIC_DIST_SIZE SZ_4K
38
39#define MSM8960_QGIC_CPU_PHYS 0x02002000
40#define MSM8960_QGIC_CPU_SIZE SZ_4K
41
42#define MSM8960_TMR_PHYS 0x0200A000 35#define MSM8960_TMR_PHYS 0x0200A000
43#define MSM8960_TMR_SIZE SZ_4K 36#define MSM8960_TMR_SIZE SZ_4K
44 37
diff --git a/arch/arm/mach-msm/include/mach/msm_iomap-8x60.h b/arch/arm/mach-msm/include/mach/msm_iomap-8x60.h
index 199372e62def..75a7b62c1c74 100644
--- a/arch/arm/mach-msm/include/mach/msm_iomap-8x60.h
+++ b/arch/arm/mach-msm/include/mach/msm_iomap-8x60.h
@@ -35,12 +35,6 @@
35 * 35 *
36 */ 36 */
37 37
38#define MSM8X60_QGIC_DIST_PHYS 0x02080000
39#define MSM8X60_QGIC_DIST_SIZE SZ_4K
40
41#define MSM8X60_QGIC_CPU_PHYS 0x02081000
42#define MSM8X60_QGIC_CPU_SIZE SZ_4K
43
44#define MSM_TLMM_BASE IOMEM(0xF0004000) 38#define MSM_TLMM_BASE IOMEM(0xF0004000)
45#define MSM_TLMM_PHYS 0x00800000 39#define MSM_TLMM_PHYS 0x00800000
46#define MSM_TLMM_SIZE SZ_16K 40#define MSM_TLMM_SIZE SZ_16K
diff --git a/arch/arm/mach-msm/include/mach/msm_iomap.h b/arch/arm/mach-msm/include/mach/msm_iomap.h
index 2ab7cf0919b3..c56e81ffdcde 100644
--- a/arch/arm/mach-msm/include/mach/msm_iomap.h
+++ b/arch/arm/mach-msm/include/mach/msm_iomap.h
@@ -62,8 +62,6 @@
62 62
63/* Virtual addresses shared across all MSM targets. */ 63/* Virtual addresses shared across all MSM targets. */
64#define MSM_CSR_BASE IOMEM(0xE0001000) 64#define MSM_CSR_BASE IOMEM(0xE0001000)
65#define MSM_QGIC_DIST_BASE IOMEM(0xF0000000)
66#define MSM_QGIC_CPU_BASE IOMEM(0xF0001000)
67#define MSM_TMR_BASE IOMEM(0xF0200000) 65#define MSM_TMR_BASE IOMEM(0xF0200000)
68#define MSM_TMR0_BASE IOMEM(0xF0201000) 66#define MSM_TMR0_BASE IOMEM(0xF0201000)
69#define MSM_GPIO1_BASE IOMEM(0xE0003000) 67#define MSM_GPIO1_BASE IOMEM(0xE0003000)
diff --git a/arch/arm/mach-msm/io.c b/arch/arm/mach-msm/io.c
index 123ef9cbce1b..3dc04ccaf59f 100644
--- a/arch/arm/mach-msm/io.c
+++ b/arch/arm/mach-msm/io.c
@@ -107,8 +107,6 @@ void __init msm_map_qsd8x50_io(void)
107 107
108#ifdef CONFIG_ARCH_MSM8X60 108#ifdef CONFIG_ARCH_MSM8X60
109static struct map_desc msm8x60_io_desc[] __initdata = { 109static struct map_desc msm8x60_io_desc[] __initdata = {
110 MSM_CHIP_DEVICE(QGIC_DIST, MSM8X60),
111 MSM_CHIP_DEVICE(QGIC_CPU, MSM8X60),
112 MSM_CHIP_DEVICE(TMR, MSM8X60), 110 MSM_CHIP_DEVICE(TMR, MSM8X60),
113 MSM_CHIP_DEVICE(TMR0, MSM8X60), 111 MSM_CHIP_DEVICE(TMR0, MSM8X60),
114#ifdef CONFIG_DEBUG_MSM8660_UART 112#ifdef CONFIG_DEBUG_MSM8660_UART
@@ -124,8 +122,6 @@ void __init msm_map_msm8x60_io(void)
124 122
125#ifdef CONFIG_ARCH_MSM8960 123#ifdef CONFIG_ARCH_MSM8960
126static struct map_desc msm8960_io_desc[] __initdata = { 124static struct map_desc msm8960_io_desc[] __initdata = {
127 MSM_CHIP_DEVICE(QGIC_DIST, MSM8960),
128 MSM_CHIP_DEVICE(QGIC_CPU, MSM8960),
129 MSM_CHIP_DEVICE(TMR, MSM8960), 125 MSM_CHIP_DEVICE(TMR, MSM8960),
130 MSM_CHIP_DEVICE(TMR0, MSM8960), 126 MSM_CHIP_DEVICE(TMR0, MSM8960),
131#ifdef CONFIG_DEBUG_MSM8960_UART 127#ifdef CONFIG_DEBUG_MSM8960_UART
@@ -172,7 +168,7 @@ void __init msm_map_msm7x30_io(void)
172} 168}
173#endif /* CONFIG_ARCH_MSM7X30 */ 169#endif /* CONFIG_ARCH_MSM7X30 */
174 170
175void __iomem *__msm_ioremap_caller(unsigned long phys_addr, size_t size, 171void __iomem *__msm_ioremap_caller(phys_addr_t phys_addr, size_t size,
176 unsigned int mtype, void *caller) 172 unsigned int mtype, void *caller)
177{ 173{
178 if (mtype == MT_DEVICE) { 174 if (mtype == MT_DEVICE) {
diff --git a/arch/arm/mach-msm/platsmp.c b/arch/arm/mach-msm/platsmp.c
index 00cdb0a5dac8..3f06edcdd0ce 100644
--- a/arch/arm/mach-msm/platsmp.c
+++ b/arch/arm/mach-msm/platsmp.c
@@ -38,7 +38,7 @@ static inline int get_core_count(void)
38 return ((read_cpuid_id() >> 4) & 3) + 1; 38 return ((read_cpuid_id() >> 4) & 3) + 1;
39} 39}
40 40
41static void __cpuinit msm_secondary_init(unsigned int cpu) 41static void msm_secondary_init(unsigned int cpu)
42{ 42{
43 /* 43 /*
44 * let the primary processor know we're out of the 44 * let the primary processor know we're out of the
@@ -54,7 +54,7 @@ static void __cpuinit msm_secondary_init(unsigned int cpu)
54 spin_unlock(&boot_lock); 54 spin_unlock(&boot_lock);
55} 55}
56 56
57static __cpuinit void prepare_cold_cpu(unsigned int cpu) 57static void prepare_cold_cpu(unsigned int cpu)
58{ 58{
59 int ret; 59 int ret;
60 ret = scm_set_boot_addr(virt_to_phys(msm_secondary_startup), 60 ret = scm_set_boot_addr(virt_to_phys(msm_secondary_startup),
@@ -73,7 +73,7 @@ static __cpuinit void prepare_cold_cpu(unsigned int cpu)
73 "address\n"); 73 "address\n");
74} 74}
75 75
76static int __cpuinit msm_boot_secondary(unsigned int cpu, struct task_struct *idle) 76static int msm_boot_secondary(unsigned int cpu, struct task_struct *idle)
77{ 77{
78 unsigned long timeout; 78 unsigned long timeout;
79 static int cold_boot_done; 79 static int cold_boot_done;
diff --git a/arch/arm/mach-msm/timer.c b/arch/arm/mach-msm/timer.c
index 284313f3e02c..8697cfc0d0b6 100644
--- a/arch/arm/mach-msm/timer.c
+++ b/arch/arm/mach-msm/timer.c
@@ -23,10 +23,10 @@
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/of_irq.h> 25#include <linux/of_irq.h>
26#include <linux/sched_clock.h>
26 27
27#include <asm/mach/time.h> 28#include <asm/mach/time.h>
28#include <asm/localtimer.h> 29#include <asm/localtimer.h>
29#include <asm/sched_clock.h>
30 30
31#include "common.h" 31#include "common.h"
32 32
@@ -139,7 +139,7 @@ static struct clocksource msm_clocksource = {
139}; 139};
140 140
141#ifdef CONFIG_LOCAL_TIMERS 141#ifdef CONFIG_LOCAL_TIMERS
142static int __cpuinit msm_local_timer_setup(struct clock_event_device *evt) 142static int msm_local_timer_setup(struct clock_event_device *evt)
143{ 143{
144 /* Use existing clock_event for cpu 0 */ 144 /* Use existing clock_event for cpu 0 */
145 if (!smp_processor_id()) 145 if (!smp_processor_id())
@@ -164,7 +164,7 @@ static void msm_local_timer_stop(struct clock_event_device *evt)
164 disable_percpu_irq(evt->irq); 164 disable_percpu_irq(evt->irq);
165} 165}
166 166
167static struct local_timer_ops msm_local_timer_ops __cpuinitdata = { 167static struct local_timer_ops msm_local_timer_ops = {
168 .setup = msm_local_timer_setup, 168 .setup = msm_local_timer_setup,
169 .stop = msm_local_timer_stop, 169 .stop = msm_local_timer_stop,
170}; 170};
diff --git a/arch/arm/mach-mv78xx0/common.c b/arch/arm/mach-mv78xx0/common.c
index 749a7f8c4992..75062eff2494 100644
--- a/arch/arm/mach-mv78xx0/common.c
+++ b/arch/arm/mach-mv78xx0/common.c
@@ -413,7 +413,7 @@ void __init mv78xx0_init(void)
413 clk_init(); 413 clk_init();
414} 414}
415 415
416void mv78xx0_restart(char mode, const char *cmd) 416void mv78xx0_restart(enum reboot_mode mode, const char *cmd)
417{ 417{
418 /* 418 /*
419 * Enable soft reset to assert RSTOUTn. 419 * Enable soft reset to assert RSTOUTn.
diff --git a/arch/arm/mach-mv78xx0/common.h b/arch/arm/mach-mv78xx0/common.h
index 5e9485bad0ac..6889af26077d 100644
--- a/arch/arm/mach-mv78xx0/common.h
+++ b/arch/arm/mach-mv78xx0/common.h
@@ -11,6 +11,8 @@
11#ifndef __ARCH_MV78XX0_COMMON_H 11#ifndef __ARCH_MV78XX0_COMMON_H
12#define __ARCH_MV78XX0_COMMON_H 12#define __ARCH_MV78XX0_COMMON_H
13 13
14#include <linux/reboot.h>
15
14struct mv643xx_eth_platform_data; 16struct mv643xx_eth_platform_data;
15struct mv_sata_platform_data; 17struct mv_sata_platform_data;
16 18
@@ -45,7 +47,7 @@ void mv78xx0_uart1_init(void);
45void mv78xx0_uart2_init(void); 47void mv78xx0_uart2_init(void);
46void mv78xx0_uart3_init(void); 48void mv78xx0_uart3_init(void);
47void mv78xx0_i2c_init(void); 49void mv78xx0_i2c_init(void);
48void mv78xx0_restart(char, const char *); 50void mv78xx0_restart(enum reboot_mode, const char *);
49 51
50extern void mv78xx0_timer_init(void); 52extern void mv78xx0_timer_init(void);
51 53
diff --git a/arch/arm/mach-mvebu/Kconfig b/arch/arm/mach-mvebu/Kconfig
index 80a8bcacd9d5..9eb63d724602 100644
--- a/arch/arm/mach-mvebu/Kconfig
+++ b/arch/arm/mach-mvebu/Kconfig
@@ -10,12 +10,11 @@ config ARCH_MVEBU
10 select PLAT_ORION 10 select PLAT_ORION
11 select SPARSE_IRQ 11 select SPARSE_IRQ
12 select CLKDEV_LOOKUP 12 select CLKDEV_LOOKUP
13 select MVEBU_CLK_CORE
14 select MVEBU_CLK_CPU
15 select MVEBU_CLK_GATING
16 select MVEBU_MBUS 13 select MVEBU_MBUS
17 select ZONE_DMA if ARM_LPAE 14 select ZONE_DMA if ARM_LPAE
18 select ARCH_REQUIRE_GPIOLIB 15 select ARCH_REQUIRE_GPIOLIB
16 select MIGHT_HAVE_PCI
17 select PCI_QUIRKS if PCI
19 18
20if ARCH_MVEBU 19if ARCH_MVEBU
21 20
@@ -30,6 +29,7 @@ config MACH_ARMADA_370_XP
30 29
31config MACH_ARMADA_370 30config MACH_ARMADA_370
32 bool "Marvell Armada 370 boards" 31 bool "Marvell Armada 370 boards"
32 select ARMADA_370_CLK
33 select MACH_ARMADA_370_XP 33 select MACH_ARMADA_370_XP
34 select PINCTRL_ARMADA_370 34 select PINCTRL_ARMADA_370
35 help 35 help
@@ -38,6 +38,7 @@ config MACH_ARMADA_370
38 38
39config MACH_ARMADA_XP 39config MACH_ARMADA_XP
40 bool "Marvell Armada XP boards" 40 bool "Marvell Armada XP boards"
41 select ARMADA_XP_CLK
41 select MACH_ARMADA_370_XP 42 select MACH_ARMADA_370_XP
42 select PINCTRL_ARMADA_XP 43 select PINCTRL_ARMADA_XP
43 help 44 help
diff --git a/arch/arm/mach-mvebu/armada-370-xp.c b/arch/arm/mach-mvebu/armada-370-xp.c
index 1c48890bb72b..97cbb8021919 100644
--- a/arch/arm/mach-mvebu/armada-370-xp.c
+++ b/arch/arm/mach-mvebu/armada-370-xp.c
@@ -14,13 +14,13 @@
14 14
15#include <linux/kernel.h> 15#include <linux/kernel.h>
16#include <linux/init.h> 16#include <linux/init.h>
17#include <linux/clk-provider.h>
18#include <linux/of_address.h>
17#include <linux/of_platform.h> 19#include <linux/of_platform.h>
18#include <linux/io.h> 20#include <linux/io.h>
19#include <linux/time-armada-370-xp.h> 21#include <linux/time-armada-370-xp.h>
20#include <linux/clk/mvebu.h>
21#include <linux/dma-mapping.h> 22#include <linux/dma-mapping.h>
22#include <linux/mbus.h> 23#include <linux/mbus.h>
23#include <linux/irqchip.h>
24#include <asm/hardware/cache-l2x0.h> 24#include <asm/hardware/cache-l2x0.h>
25#include <asm/mach/arch.h> 25#include <asm/mach/arch.h>
26#include <asm/mach/map.h> 26#include <asm/mach/map.h>
@@ -29,45 +29,49 @@
29#include "common.h" 29#include "common.h"
30#include "coherency.h" 30#include "coherency.h"
31 31
32static struct map_desc armada_370_xp_io_desc[] __initdata = { 32static void __init armada_370_xp_map_io(void)
33 {
34 .virtual = (unsigned long) ARMADA_370_XP_REGS_VIRT_BASE,
35 .pfn = __phys_to_pfn(ARMADA_370_XP_REGS_PHYS_BASE),
36 .length = ARMADA_370_XP_REGS_SIZE,
37 .type = MT_DEVICE,
38 },
39};
40
41void __init armada_370_xp_map_io(void)
42{ 33{
43 iotable_init(armada_370_xp_io_desc, ARRAY_SIZE(armada_370_xp_io_desc)); 34 debug_ll_io_init();
44} 35}
45 36
46void __init armada_370_xp_timer_and_clk_init(void) 37/*
47{ 38 * This initialization will be replaced by a DT-based
48 mvebu_clocks_init(); 39 * initialization once the mvebu-mbus driver gains DT support.
49 armada_370_xp_timer_init(); 40 */
50}
51 41
52void __init armada_370_xp_init_early(void) 42#define ARMADA_370_XP_MBUS_WINS_OFFS 0x20000
43#define ARMADA_370_XP_MBUS_WINS_SIZE 0x100
44#define ARMADA_370_XP_SDRAM_WINS_OFFS 0x20180
45#define ARMADA_370_XP_SDRAM_WINS_SIZE 0x20
46
47static void __init armada_370_xp_mbus_init(void)
53{ 48{
54 char *mbus_soc_name; 49 char *mbus_soc_name;
50 struct device_node *dn;
51 const __be32 mbus_wins_offs = cpu_to_be32(ARMADA_370_XP_MBUS_WINS_OFFS);
52 const __be32 sdram_wins_offs = cpu_to_be32(ARMADA_370_XP_SDRAM_WINS_OFFS);
55 53
56 /*
57 * This initialization will be replaced by a DT-based
58 * initialization once the mvebu-mbus driver gains DT support.
59 */
60 if (of_machine_is_compatible("marvell,armada370")) 54 if (of_machine_is_compatible("marvell,armada370"))
61 mbus_soc_name = "marvell,armada370-mbus"; 55 mbus_soc_name = "marvell,armada370-mbus";
62 else 56 else
63 mbus_soc_name = "marvell,armadaxp-mbus"; 57 mbus_soc_name = "marvell,armadaxp-mbus";
64 58
59 dn = of_find_node_by_name(NULL, "internal-regs");
60 BUG_ON(!dn);
61
65 mvebu_mbus_init(mbus_soc_name, 62 mvebu_mbus_init(mbus_soc_name,
66 ARMADA_370_XP_MBUS_WINS_BASE, 63 of_translate_address(dn, &mbus_wins_offs),
67 ARMADA_370_XP_MBUS_WINS_SIZE, 64 ARMADA_370_XP_MBUS_WINS_SIZE,
68 ARMADA_370_XP_SDRAM_WINS_BASE, 65 of_translate_address(dn, &sdram_wins_offs),
69 ARMADA_370_XP_SDRAM_WINS_SIZE); 66 ARMADA_370_XP_SDRAM_WINS_SIZE);
67}
70 68
69static void __init armada_370_xp_timer_and_clk_init(void)
70{
71 of_clk_init(NULL);
72 armada_370_xp_timer_init();
73 coherency_init();
74 armada_370_xp_mbus_init();
71#ifdef CONFIG_CACHE_L2X0 75#ifdef CONFIG_CACHE_L2X0
72 l2x0_of_init(0, ~0UL); 76 l2x0_of_init(0, ~0UL);
73#endif 77#endif
@@ -76,7 +80,6 @@ void __init armada_370_xp_init_early(void)
76static void __init armada_370_xp_dt_init(void) 80static void __init armada_370_xp_dt_init(void)
77{ 81{
78 of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); 82 of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
79 coherency_init();
80} 83}
81 84
82static const char * const armada_370_xp_dt_compat[] = { 85static const char * const armada_370_xp_dt_compat[] = {
@@ -88,8 +91,6 @@ DT_MACHINE_START(ARMADA_XP_DT, "Marvell Armada 370/XP (Device Tree)")
88 .smp = smp_ops(armada_xp_smp_ops), 91 .smp = smp_ops(armada_xp_smp_ops),
89 .init_machine = armada_370_xp_dt_init, 92 .init_machine = armada_370_xp_dt_init,
90 .map_io = armada_370_xp_map_io, 93 .map_io = armada_370_xp_map_io,
91 .init_early = armada_370_xp_init_early,
92 .init_irq = irqchip_init,
93 .init_time = armada_370_xp_timer_and_clk_init, 94 .init_time = armada_370_xp_timer_and_clk_init,
94 .restart = mvebu_restart, 95 .restart = mvebu_restart,
95 .dt_compat = armada_370_xp_dt_compat, 96 .dt_compat = armada_370_xp_dt_compat,
diff --git a/arch/arm/mach-mvebu/armada-370-xp.h b/arch/arm/mach-mvebu/armada-370-xp.h
index 2070e1b4f342..c612b2c4ed6c 100644
--- a/arch/arm/mach-mvebu/armada-370-xp.h
+++ b/arch/arm/mach-mvebu/armada-370-xp.h
@@ -15,16 +15,6 @@
15#ifndef __MACH_ARMADA_370_XP_H 15#ifndef __MACH_ARMADA_370_XP_H
16#define __MACH_ARMADA_370_XP_H 16#define __MACH_ARMADA_370_XP_H
17 17
18#define ARMADA_370_XP_REGS_PHYS_BASE 0xd0000000
19#define ARMADA_370_XP_REGS_VIRT_BASE IOMEM(0xfec00000)
20#define ARMADA_370_XP_REGS_SIZE SZ_1M
21
22/* These defines can go away once mvebu-mbus has a DT binding */
23#define ARMADA_370_XP_MBUS_WINS_BASE (ARMADA_370_XP_REGS_PHYS_BASE + 0x20000)
24#define ARMADA_370_XP_MBUS_WINS_SIZE 0x100
25#define ARMADA_370_XP_SDRAM_WINS_BASE (ARMADA_370_XP_REGS_PHYS_BASE + 0x20180)
26#define ARMADA_370_XP_SDRAM_WINS_SIZE 0x20
27
28#ifdef CONFIG_SMP 18#ifdef CONFIG_SMP
29#include <linux/cpumask.h> 19#include <linux/cpumask.h>
30 20
diff --git a/arch/arm/mach-mvebu/coherency.c b/arch/arm/mach-mvebu/coherency.c
index 8278960066c3..4c24303ec481 100644
--- a/arch/arm/mach-mvebu/coherency.c
+++ b/arch/arm/mach-mvebu/coherency.c
@@ -25,16 +25,11 @@
25#include <linux/dma-mapping.h> 25#include <linux/dma-mapping.h>
26#include <linux/platform_device.h> 26#include <linux/platform_device.h>
27#include <asm/smp_plat.h> 27#include <asm/smp_plat.h>
28#include <asm/cacheflush.h>
28#include "armada-370-xp.h" 29#include "armada-370-xp.h"
29 30
30/* 31unsigned long coherency_phys_base;
31 * Some functions in this file are called very early during SMP 32static void __iomem *coherency_base;
32 * initialization. At that time the device tree framework is not yet
33 * ready, and it is not possible to get the register address to
34 * ioremap it. That's why the pointer below is given with an initial
35 * value matching its virtual mapping
36 */
37static void __iomem *coherency_base = ARMADA_370_XP_REGS_VIRT_BASE + 0x20200;
38static void __iomem *coherency_cpu_base; 33static void __iomem *coherency_cpu_base;
39 34
40/* Coherency fabric registers */ 35/* Coherency fabric registers */
@@ -47,18 +42,6 @@ static struct of_device_id of_coherency_table[] = {
47 { /* end of list */ }, 42 { /* end of list */ },
48}; 43};
49 44
50#ifdef CONFIG_SMP
51int coherency_get_cpu_count(void)
52{
53 int reg, cnt;
54
55 reg = readl(coherency_base + COHERENCY_FABRIC_CFG_OFFSET);
56 cnt = (reg & 0xF) + 1;
57
58 return cnt;
59}
60#endif
61
62/* Function defined in coherency_ll.S */ 45/* Function defined in coherency_ll.S */
63int ll_set_cpu_coherent(void __iomem *base_addr, unsigned int hw_cpu_id); 46int ll_set_cpu_coherent(void __iomem *base_addr, unsigned int hw_cpu_id);
64 47
@@ -143,13 +126,31 @@ int __init coherency_init(void)
143 126
144 np = of_find_matching_node(NULL, of_coherency_table); 127 np = of_find_matching_node(NULL, of_coherency_table);
145 if (np) { 128 if (np) {
129 struct resource res;
146 pr_info("Initializing Coherency fabric\n"); 130 pr_info("Initializing Coherency fabric\n");
131 of_address_to_resource(np, 0, &res);
132 coherency_phys_base = res.start;
133 /*
134 * Ensure secondary CPUs will see the updated value,
135 * which they read before they join the coherency
136 * fabric, and therefore before they are coherent with
137 * the boot CPU cache.
138 */
139 sync_cache_w(&coherency_phys_base);
147 coherency_base = of_iomap(np, 0); 140 coherency_base = of_iomap(np, 0);
148 coherency_cpu_base = of_iomap(np, 1); 141 coherency_cpu_base = of_iomap(np, 1);
149 set_cpu_coherent(cpu_logical_map(smp_processor_id()), 0); 142 set_cpu_coherent(cpu_logical_map(smp_processor_id()), 0);
150 bus_register_notifier(&platform_bus_type,
151 &mvebu_hwcc_platform_nb);
152 } 143 }
153 144
154 return 0; 145 return 0;
155} 146}
147
148static int __init coherency_late_init(void)
149{
150 if (of_find_matching_node(NULL, of_coherency_table))
151 bus_register_notifier(&platform_bus_type,
152 &mvebu_hwcc_platform_nb);
153 return 0;
154}
155
156postcore_initcall(coherency_late_init);
diff --git a/arch/arm/mach-mvebu/coherency.h b/arch/arm/mach-mvebu/coherency.h
index 2f428137f6fe..df33ad8a6c08 100644
--- a/arch/arm/mach-mvebu/coherency.h
+++ b/arch/arm/mach-mvebu/coherency.h
@@ -14,10 +14,6 @@
14#ifndef __MACH_370_XP_COHERENCY_H 14#ifndef __MACH_370_XP_COHERENCY_H
15#define __MACH_370_XP_COHERENCY_H 15#define __MACH_370_XP_COHERENCY_H
16 16
17#ifdef CONFIG_SMP
18int coherency_get_cpu_count(void);
19#endif
20
21int set_cpu_coherent(int cpu_id, int smp_group_id); 17int set_cpu_coherent(int cpu_id, int smp_group_id);
22int coherency_init(void); 18int coherency_init(void);
23 19
diff --git a/arch/arm/mach-mvebu/common.h b/arch/arm/mach-mvebu/common.h
index aa27bc2ffb60..e366010e1d91 100644
--- a/arch/arm/mach-mvebu/common.h
+++ b/arch/arm/mach-mvebu/common.h
@@ -15,7 +15,11 @@
15#ifndef __ARCH_MVEBU_COMMON_H 15#ifndef __ARCH_MVEBU_COMMON_H
16#define __ARCH_MVEBU_COMMON_H 16#define __ARCH_MVEBU_COMMON_H
17 17
18void mvebu_restart(char mode, const char *cmd); 18#define ARMADA_XP_MAX_CPUS 4
19
20#include <linux/reboot.h>
21
22void mvebu_restart(enum reboot_mode mode, const char *cmd);
19 23
20void armada_370_xp_init_irq(void); 24void armada_370_xp_init_irq(void);
21void armada_370_xp_handle_irq(struct pt_regs *regs); 25void armada_370_xp_handle_irq(struct pt_regs *regs);
diff --git a/arch/arm/mach-mvebu/headsmp.S b/arch/arm/mach-mvebu/headsmp.S
index a06e0ede8c08..8a1b0c96e9ec 100644
--- a/arch/arm/mach-mvebu/headsmp.S
+++ b/arch/arm/mach-mvebu/headsmp.S
@@ -22,28 +22,26 @@
22#include <linux/init.h> 22#include <linux/init.h>
23 23
24/* 24/*
25 * At this stage the secondary CPUs don't have acces yet to the MMU, so
26 * we have to provide physical addresses
27 */
28#define ARMADA_XP_CFB_BASE 0xD0020200
29
30 __CPUINIT
31
32/*
33 * Armada XP specific entry point for secondary CPUs. 25 * Armada XP specific entry point for secondary CPUs.
34 * We add the CPU to the coherency fabric and then jump to secondary 26 * We add the CPU to the coherency fabric and then jump to secondary
35 * startup 27 * startup
36 */ 28 */
37ENTRY(armada_xp_secondary_startup) 29ENTRY(armada_xp_secondary_startup)
30 /* Get coherency fabric base physical address */
31 adr r0, 1f
32 ldr r1, [r0]
33 ldr r0, [r0, r1]
38 34
39 /* Read CPU id */ 35 /* Read CPU id */
40 mrc p15, 0, r1, c0, c0, 5 36 mrc p15, 0, r1, c0, c0, 5
41 and r1, r1, #0xF 37 and r1, r1, #0xF
42 38
43 /* Add CPU to coherency fabric */ 39 /* Add CPU to coherency fabric */
44 ldr r0, =ARMADA_XP_CFB_BASE
45
46 bl ll_set_cpu_coherent 40 bl ll_set_cpu_coherent
47 b secondary_startup 41 b secondary_startup
48 42
49ENDPROC(armada_xp_secondary_startup) 43ENDPROC(armada_xp_secondary_startup)
44
45 .align 2
461:
47 .long coherency_phys_base - .
diff --git a/arch/arm/mach-mvebu/platsmp.c b/arch/arm/mach-mvebu/platsmp.c
index 875ea748391c..ce81d3031405 100644
--- a/arch/arm/mach-mvebu/platsmp.c
+++ b/arch/arm/mach-mvebu/platsmp.c
@@ -71,13 +71,12 @@ void __init set_secondary_cpus_clock(void)
71 } 71 }
72} 72}
73 73
74static void __cpuinit armada_xp_secondary_init(unsigned int cpu) 74static void armada_xp_secondary_init(unsigned int cpu)
75{ 75{
76 armada_xp_mpic_smp_cpu_init(); 76 armada_xp_mpic_smp_cpu_init();
77} 77}
78 78
79static int __cpuinit armada_xp_boot_secondary(unsigned int cpu, 79static int armada_xp_boot_secondary(unsigned int cpu, struct task_struct *idle)
80 struct task_struct *idle)
81{ 80{
82 pr_info("Booting CPU %d\n", cpu); 81 pr_info("Booting CPU %d\n", cpu);
83 82
@@ -88,8 +87,16 @@ static int __cpuinit armada_xp_boot_secondary(unsigned int cpu,
88 87
89static void __init armada_xp_smp_init_cpus(void) 88static void __init armada_xp_smp_init_cpus(void)
90{ 89{
90 struct device_node *np;
91 unsigned int i, ncores; 91 unsigned int i, ncores;
92 ncores = coherency_get_cpu_count(); 92
93 np = of_find_node_by_name(NULL, "cpus");
94 if (!np)
95 panic("No 'cpus' node found\n");
96
97 ncores = of_get_child_count(np);
98 if (ncores == 0 || ncores > ARMADA_XP_MAX_CPUS)
99 panic("Invalid number of CPUs in DT\n");
93 100
94 /* Limit possible CPUs to defconfig */ 101 /* Limit possible CPUs to defconfig */
95 if (ncores > nr_cpu_ids) { 102 if (ncores > nr_cpu_ids) {
diff --git a/arch/arm/mach-mvebu/system-controller.c b/arch/arm/mach-mvebu/system-controller.c
index b8079df8c986..f875124ff4f9 100644
--- a/arch/arm/mach-mvebu/system-controller.c
+++ b/arch/arm/mach-mvebu/system-controller.c
@@ -26,6 +26,7 @@
26#include <linux/init.h> 26#include <linux/init.h>
27#include <linux/of_address.h> 27#include <linux/of_address.h>
28#include <linux/io.h> 28#include <linux/io.h>
29#include <linux/reboot.h>
29 30
30static void __iomem *system_controller_base; 31static void __iomem *system_controller_base;
31 32
@@ -63,7 +64,7 @@ static struct of_device_id of_system_controller_table[] = {
63 { /* end of list */ }, 64 { /* end of list */ },
64}; 65};
65 66
66void mvebu_restart(char mode, const char *cmd) 67void mvebu_restart(enum reboot_mode mode, const char *cmd)
67{ 68{
68 if (!system_controller_base) { 69 if (!system_controller_base) {
69 pr_err("Cannot restart, system-controller not available: check the device tree\n"); 70 pr_err("Cannot restart, system-controller not available: check the device tree\n");
diff --git a/arch/arm/mach-mxs/Kconfig b/arch/arm/mach-mxs/Kconfig
index 4dc2fbba0ecd..8cde9e05b5d6 100644
--- a/arch/arm/mach-mxs/Kconfig
+++ b/arch/arm/mach-mxs/Kconfig
@@ -3,7 +3,6 @@ config SOC_IMX23
3 select ARM_AMBA 3 select ARM_AMBA
4 select ARM_CPU_SUSPEND if PM 4 select ARM_CPU_SUSPEND if PM
5 select CPU_ARM926T 5 select CPU_ARM926T
6 select HAVE_PWM
7 select PINCTRL_IMX23 6 select PINCTRL_IMX23
8 7
9config SOC_IMX28 8config SOC_IMX28
@@ -11,8 +10,6 @@ config SOC_IMX28
11 select ARM_AMBA 10 select ARM_AMBA
12 select ARM_CPU_SUSPEND if PM 11 select ARM_CPU_SUSPEND if PM
13 select CPU_ARM926T 12 select CPU_ARM926T
14 select HAVE_CAN_FLEXCAN if CAN
15 select HAVE_PWM
16 select PINCTRL_IMX28 13 select PINCTRL_IMX28
17 14
18config ARCH_MXS 15config ARCH_MXS
@@ -25,6 +22,7 @@ config ARCH_MXS
25 select GENERIC_CLOCKEVENTS 22 select GENERIC_CLOCKEVENTS
26 select HAVE_CLK_PREPARE 23 select HAVE_CLK_PREPARE
27 select PINCTRL 24 select PINCTRL
25 select SOC_BUS
28 select SOC_IMX23 26 select SOC_IMX23
29 select SOC_IMX28 27 select SOC_IMX28
30 select STMP_DEVICE 28 select STMP_DEVICE
diff --git a/arch/arm/mach-mxs/mach-mxs.c b/arch/arm/mach-mxs/mach-mxs.c
index 5b62b6489d4b..4ce27b536dc9 100644
--- a/arch/arm/mach-mxs/mach-mxs.c
+++ b/arch/arm/mach-mxs/mach-mxs.c
@@ -14,18 +14,18 @@
14#include <linux/clk/mxs.h> 14#include <linux/clk/mxs.h>
15#include <linux/clkdev.h> 15#include <linux/clkdev.h>
16#include <linux/clocksource.h> 16#include <linux/clocksource.h>
17#include <linux/can/platform/flexcan.h>
18#include <linux/delay.h> 17#include <linux/delay.h>
19#include <linux/err.h> 18#include <linux/err.h>
20#include <linux/gpio.h> 19#include <linux/gpio.h>
21#include <linux/init.h> 20#include <linux/init.h>
22#include <linux/irqchip.h>
23#include <linux/irqchip/mxs.h> 21#include <linux/irqchip/mxs.h>
22#include <linux/reboot.h>
24#include <linux/micrel_phy.h> 23#include <linux/micrel_phy.h>
25#include <linux/of_address.h> 24#include <linux/of_address.h>
26#include <linux/of_platform.h> 25#include <linux/of_platform.h>
27#include <linux/phy.h> 26#include <linux/phy.h>
28#include <linux/pinctrl/consumer.h> 27#include <linux/pinctrl/consumer.h>
28#include <linux/sys_soc.h>
29#include <asm/mach/arch.h> 29#include <asm/mach/arch.h>
30#include <asm/mach/map.h> 30#include <asm/mach/map.h>
31#include <asm/mach/time.h> 31#include <asm/mach/time.h>
@@ -39,12 +39,28 @@
39#define MXS_DIGCTL_SAIF_CLKMUX_EXTMSTR0 0x2 39#define MXS_DIGCTL_SAIF_CLKMUX_EXTMSTR0 0x2
40#define MXS_DIGCTL_SAIF_CLKMUX_EXTMSTR1 0x3 40#define MXS_DIGCTL_SAIF_CLKMUX_EXTMSTR1 0x3
41 41
42#define HW_DIGCTL_CHIPID 0x310
43#define HW_DIGCTL_CHIPID_MASK (0xffff << 16)
44#define HW_DIGCTL_REV_MASK 0xff
45#define HW_DIGCTL_CHIPID_MX23 (0x3780 << 16)
46#define HW_DIGCTL_CHIPID_MX28 (0x2800 << 16)
47
48#define MXS_CHIP_REVISION_1_0 0x10
49#define MXS_CHIP_REVISION_1_1 0x11
50#define MXS_CHIP_REVISION_1_2 0x12
51#define MXS_CHIP_REVISION_1_3 0x13
52#define MXS_CHIP_REVISION_1_4 0x14
53#define MXS_CHIP_REV_UNKNOWN 0xff
54
42#define MXS_GPIO_NR(bank, nr) ((bank) * 32 + (nr)) 55#define MXS_GPIO_NR(bank, nr) ((bank) * 32 + (nr))
43 56
44#define MXS_SET_ADDR 0x4 57#define MXS_SET_ADDR 0x4
45#define MXS_CLR_ADDR 0x8 58#define MXS_CLR_ADDR 0x8
46#define MXS_TOG_ADDR 0xc 59#define MXS_TOG_ADDR 0xc
47 60
61static u32 chipid;
62static u32 socid;
63
48static inline void __mxs_setl(u32 mask, void __iomem *reg) 64static inline void __mxs_setl(u32 mask, void __iomem *reg)
49{ 65{
50 __raw_writel(mask, reg + MXS_SET_ADDR); 66 __raw_writel(mask, reg + MXS_SET_ADDR);
@@ -60,41 +76,6 @@ static inline void __mxs_togl(u32 mask, void __iomem *reg)
60 __raw_writel(mask, reg + MXS_TOG_ADDR); 76 __raw_writel(mask, reg + MXS_TOG_ADDR);
61} 77}
62 78
63/*
64 * MX28EVK_FLEXCAN_SWITCH is shared between both flexcan controllers
65 */
66#define MX28EVK_FLEXCAN_SWITCH MXS_GPIO_NR(2, 13)
67
68static int flexcan0_en, flexcan1_en;
69
70static void mx28evk_flexcan_switch(void)
71{
72 if (flexcan0_en || flexcan1_en)
73 gpio_set_value(MX28EVK_FLEXCAN_SWITCH, 1);
74 else
75 gpio_set_value(MX28EVK_FLEXCAN_SWITCH, 0);
76}
77
78static void mx28evk_flexcan0_switch(int enable)
79{
80 flexcan0_en = enable;
81 mx28evk_flexcan_switch();
82}
83
84static void mx28evk_flexcan1_switch(int enable)
85{
86 flexcan1_en = enable;
87 mx28evk_flexcan_switch();
88}
89
90static struct flexcan_platform_data flexcan_pdata[2];
91
92static struct of_dev_auxdata mxs_auxdata_lookup[] __initdata = {
93 OF_DEV_AUXDATA("fsl,imx28-flexcan", 0x80032000, NULL, &flexcan_pdata[0]),
94 OF_DEV_AUXDATA("fsl,imx28-flexcan", 0x80034000, NULL, &flexcan_pdata[1]),
95 { /* sentinel */ }
96};
97
98#define OCOTP_WORD_OFFSET 0x20 79#define OCOTP_WORD_OFFSET 0x20
99#define OCOTP_WORD_COUNT 0x20 80#define OCOTP_WORD_COUNT 0x20
100 81
@@ -254,15 +235,6 @@ static void __init imx28_evk_init(void)
254 mxs_saif_clkmux_select(MXS_DIGCTL_SAIF_CLKMUX_EXTMSTR0); 235 mxs_saif_clkmux_select(MXS_DIGCTL_SAIF_CLKMUX_EXTMSTR0);
255} 236}
256 237
257static void __init imx28_evk_post_init(void)
258{
259 if (!gpio_request_one(MX28EVK_FLEXCAN_SWITCH, GPIOF_DIR_OUT,
260 "flexcan-switch")) {
261 flexcan_pdata[0].transceiver_switch = mx28evk_flexcan0_switch;
262 flexcan_pdata[1].transceiver_switch = mx28evk_flexcan1_switch;
263 }
264}
265
266static int apx4devkit_phy_fixup(struct phy_device *phy) 238static int apx4devkit_phy_fixup(struct phy_device *phy)
267{ 239{
268 phy->dev_flags |= MICREL_PHY_50MHZ_CLK; 240 phy->dev_flags |= MICREL_PHY_50MHZ_CLK;
@@ -352,35 +324,126 @@ static void __init tx28_post_init(void)
352 pinctrl_put(pctl); 324 pinctrl_put(pctl);
353} 325}
354 326
355static void __init cfa10049_init(void) 327static void __init crystalfontz_init(void)
356{ 328{
357 update_fec_mac_prop(OUI_CRYSTALFONTZ); 329 update_fec_mac_prop(OUI_CRYSTALFONTZ);
358} 330}
359 331
360static void __init cfa10037_init(void) 332static const char __init *mxs_get_soc_id(void)
361{ 333{
362 update_fec_mac_prop(OUI_CRYSTALFONTZ); 334 struct device_node *np;
335 void __iomem *digctl_base;
336
337 np = of_find_compatible_node(NULL, NULL, "fsl,imx23-digctl");
338 digctl_base = of_iomap(np, 0);
339 WARN_ON(!digctl_base);
340
341 chipid = readl(digctl_base + HW_DIGCTL_CHIPID);
342 socid = chipid & HW_DIGCTL_CHIPID_MASK;
343
344 iounmap(digctl_base);
345 of_node_put(np);
346
347 switch (socid) {
348 case HW_DIGCTL_CHIPID_MX23:
349 return "i.MX23";
350 case HW_DIGCTL_CHIPID_MX28:
351 return "i.MX28";
352 default:
353 return "Unknown";
354 }
355}
356
357static u32 __init mxs_get_cpu_rev(void)
358{
359 u32 rev = chipid & HW_DIGCTL_REV_MASK;
360
361 switch (socid) {
362 case HW_DIGCTL_CHIPID_MX23:
363 switch (rev) {
364 case 0x0:
365 return MXS_CHIP_REVISION_1_0;
366 case 0x1:
367 return MXS_CHIP_REVISION_1_1;
368 case 0x2:
369 return MXS_CHIP_REVISION_1_2;
370 case 0x3:
371 return MXS_CHIP_REVISION_1_3;
372 case 0x4:
373 return MXS_CHIP_REVISION_1_4;
374 default:
375 return MXS_CHIP_REV_UNKNOWN;
376 }
377 case HW_DIGCTL_CHIPID_MX28:
378 switch (rev) {
379 case 0x0:
380 return MXS_CHIP_REVISION_1_1;
381 case 0x1:
382 return MXS_CHIP_REVISION_1_2;
383 default:
384 return MXS_CHIP_REV_UNKNOWN;
385 }
386 default:
387 return MXS_CHIP_REV_UNKNOWN;
388 }
389}
390
391static const char __init *mxs_get_revision(void)
392{
393 u32 rev = mxs_get_cpu_rev();
394
395 if (rev != MXS_CHIP_REV_UNKNOWN)
396 return kasprintf(GFP_KERNEL, "TO%d.%d", (rev >> 4) & 0xf,
397 rev & 0xf);
398 else
399 return kasprintf(GFP_KERNEL, "%s", "Unknown");
363} 400}
364 401
365static void __init mxs_machine_init(void) 402static void __init mxs_machine_init(void)
366{ 403{
404 struct device_node *root;
405 struct device *parent;
406 struct soc_device *soc_dev;
407 struct soc_device_attribute *soc_dev_attr;
408 int ret;
409
410 soc_dev_attr = kzalloc(sizeof(*soc_dev_attr), GFP_KERNEL);
411 if (!soc_dev_attr)
412 return;
413
414 root = of_find_node_by_path("/");
415 ret = of_property_read_string(root, "model", &soc_dev_attr->machine);
416 if (ret)
417 return;
418
419 soc_dev_attr->family = "Freescale MXS Family";
420 soc_dev_attr->soc_id = mxs_get_soc_id();
421 soc_dev_attr->revision = mxs_get_revision();
422
423 soc_dev = soc_device_register(soc_dev_attr);
424 if (IS_ERR(soc_dev)) {
425 kfree(soc_dev_attr->revision);
426 kfree(soc_dev_attr);
427 return;
428 }
429
430 parent = soc_device_to_device(soc_dev);
431
367 if (of_machine_is_compatible("fsl,imx28-evk")) 432 if (of_machine_is_compatible("fsl,imx28-evk"))
368 imx28_evk_init(); 433 imx28_evk_init();
369 else if (of_machine_is_compatible("bluegiga,apx4devkit")) 434 else if (of_machine_is_compatible("bluegiga,apx4devkit"))
370 apx4devkit_init(); 435 apx4devkit_init();
371 else if (of_machine_is_compatible("crystalfontz,cfa10037")) 436 else if (of_machine_is_compatible("crystalfontz,cfa10037") ||
372 cfa10037_init(); 437 of_machine_is_compatible("crystalfontz,cfa10049") ||
373 else if (of_machine_is_compatible("crystalfontz,cfa10049")) 438 of_machine_is_compatible("crystalfontz,cfa10055") ||
374 cfa10049_init(); 439 of_machine_is_compatible("crystalfontz,cfa10057"))
440 crystalfontz_init();
375 441
376 of_platform_populate(NULL, of_default_bus_match_table, 442 of_platform_populate(NULL, of_default_bus_match_table,
377 mxs_auxdata_lookup, NULL); 443 NULL, parent);
378 444
379 if (of_machine_is_compatible("karo,tx28")) 445 if (of_machine_is_compatible("karo,tx28"))
380 tx28_post_init(); 446 tx28_post_init();
381
382 if (of_machine_is_compatible("fsl,imx28-evk"))
383 imx28_evk_post_init();
384} 447}
385 448
386#define MX23_CLKCTRL_RESET_OFFSET 0x120 449#define MX23_CLKCTRL_RESET_OFFSET 0x120
@@ -390,7 +453,7 @@ static void __init mxs_machine_init(void)
390/* 453/*
391 * Reset the system. It is called by machine_restart(). 454 * Reset the system. It is called by machine_restart().
392 */ 455 */
393static void mxs_restart(char mode, const char *cmd) 456static void mxs_restart(enum reboot_mode mode, const char *cmd)
394{ 457{
395 struct device_node *np; 458 struct device_node *np;
396 void __iomem *reset_addr; 459 void __iomem *reset_addr;
@@ -434,8 +497,6 @@ static const char *mxs_dt_compat[] __initdata = {
434}; 497};
435 498
436DT_MACHINE_START(MXS, "Freescale MXS (Device Tree)") 499DT_MACHINE_START(MXS, "Freescale MXS (Device Tree)")
437 .map_io = debug_ll_io_init,
438 .init_irq = irqchip_init,
439 .handle_irq = icoll_handle_irq, 500 .handle_irq = icoll_handle_irq,
440 .init_time = mxs_timer_init, 501 .init_time = mxs_timer_init,
441 .init_machine = mxs_machine_init, 502 .init_machine = mxs_machine_init,
diff --git a/arch/arm/mach-mxs/pm.h b/arch/arm/mach-mxs/pm.h
index f57e7cdece2e..09d77b00a96b 100644
--- a/arch/arm/mach-mxs/pm.h
+++ b/arch/arm/mach-mxs/pm.h
@@ -9,6 +9,10 @@
9#ifndef __ARCH_MXS_PM_H 9#ifndef __ARCH_MXS_PM_H
10#define __ARCH_MXS_PM_H 10#define __ARCH_MXS_PM_H
11 11
12#ifdef CONFIG_PM
12void mxs_pm_init(void); 13void mxs_pm_init(void);
14#else
15#define mxs_pm_init NULL
16#endif
13 17
14#endif 18#endif
diff --git a/arch/arm/mach-netx/generic.c b/arch/arm/mach-netx/generic.c
index 1504b68f4c66..db25b0cef3a7 100644
--- a/arch/arm/mach-netx/generic.c
+++ b/arch/arm/mach-netx/generic.c
@@ -24,6 +24,7 @@
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 <linux/irqchip/arm-vic.h>
27#include <linux/reboot.h>
27#include <mach/hardware.h> 28#include <mach/hardware.h>
28#include <asm/mach/map.h> 29#include <asm/mach/map.h>
29#include <mach/netx-regs.h> 30#include <mach/netx-regs.h>
@@ -187,7 +188,7 @@ static int __init netx_init(void)
187 188
188subsys_initcall(netx_init); 189subsys_initcall(netx_init);
189 190
190void netx_restart(char mode, const char *cmd) 191void netx_restart(enum reboot_mode mode, const char *cmd)
191{ 192{
192 writel(NETX_SYSTEM_RES_CR_FIRMW_RES_EN | NETX_SYSTEM_RES_CR_FIRMW_RES, 193 writel(NETX_SYSTEM_RES_CR_FIRMW_RES_EN | NETX_SYSTEM_RES_CR_FIRMW_RES,
193 NETX_SYSTEM_RES_CR); 194 NETX_SYSTEM_RES_CR);
diff --git a/arch/arm/mach-netx/generic.h b/arch/arm/mach-netx/generic.h
index 768b26bbb42b..bb2ce471cc28 100644
--- a/arch/arm/mach-netx/generic.h
+++ b/arch/arm/mach-netx/generic.h
@@ -17,8 +17,10 @@
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 */ 18 */
19 19
20#include <linux/reboot.h>
21
20extern void __init netx_map_io(void); 22extern void __init netx_map_io(void);
21extern void __init netx_init_irq(void); 23extern void __init netx_init_irq(void);
22extern void netx_restart(char, const char *); 24extern void netx_restart(enum reboot_mode, const char *);
23 25
24extern void netx_timer_init(void); 26extern void netx_timer_init(void);
diff --git a/arch/arm/mach-nomadik/Kconfig b/arch/arm/mach-nomadik/Kconfig
index 9b9d105f194c..5981c3db9b41 100644
--- a/arch/arm/mach-nomadik/Kconfig
+++ b/arch/arm/mach-nomadik/Kconfig
@@ -6,6 +6,7 @@ config ARCH_NOMADIK
6 select ARM_VIC 6 select ARM_VIC
7 select CLKSRC_NOMADIK_MTU 7 select CLKSRC_NOMADIK_MTU
8 select CLKSRC_NOMADIK_MTU_SCHED_CLOCK 8 select CLKSRC_NOMADIK_MTU_SCHED_CLOCK
9 select CLKSRC_OF
9 select COMMON_CLK 10 select COMMON_CLK
10 select CPU_ARM926T 11 select CPU_ARM926T
11 select GENERIC_CLOCKEVENTS 12 select GENERIC_CLOCKEVENTS
diff --git a/arch/arm/mach-nomadik/cpu-8815.c b/arch/arm/mach-nomadik/cpu-8815.c
index 59f6ff5c9bae..13e0df9c11ce 100644
--- a/arch/arm/mach-nomadik/cpu-8815.c
+++ b/arch/arm/mach-nomadik/cpu-8815.c
@@ -25,11 +25,8 @@
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.h>
29#include <linux/platform_data/clk-nomadik.h> 28#include <linux/platform_data/clk-nomadik.h>
30#include <linux/platform_data/pinctrl-nomadik.h> 29#include <linux/clocksource.h>
31#include <linux/pinctrl/machine.h>
32#include <linux/platform_data/clocksource-nomadik-mtu.h>
33#include <linux/of_irq.h> 30#include <linux/of_irq.h>
34#include <linux/of_gpio.h> 31#include <linux/of_gpio.h>
35#include <linux/of_address.h> 32#include <linux/of_address.h>
@@ -91,48 +88,6 @@
91#define NOMADIK_L2CC_BASE 0x10210000 /* L2 Cache controller */ 88#define NOMADIK_L2CC_BASE 0x10210000 /* L2 Cache controller */
92#define NOMADIK_UART1_VBASE 0xF01FB000 89#define NOMADIK_UART1_VBASE 0xF01FB000
93 90
94static unsigned long out_low[] = { PIN_OUTPUT_LOW };
95static unsigned long out_high[] = { PIN_OUTPUT_HIGH };
96static unsigned long in_nopull[] = { PIN_INPUT_NOPULL };
97static unsigned long in_pullup[] = { PIN_INPUT_PULLUP };
98
99static struct pinctrl_map __initdata nhk8815_pinmap[] = {
100 PIN_MAP_MUX_GROUP_DEFAULT("uart0", "pinctrl-stn8815", "u0_a_1", "u0"),
101 PIN_MAP_MUX_GROUP_DEFAULT("uart1", "pinctrl-stn8815", "u1_a_1", "u1"),
102 /* Hog in MMC/SD card mux */
103 PIN_MAP_MUX_GROUP_HOG_DEFAULT("pinctrl-stn8815", "mmcsd_a_1", "mmcsd"),
104 /* MCCLK */
105 PIN_MAP_CONFIGS_PIN_HOG_DEFAULT("pinctrl-stn8815", "GPIO8_B10", out_low),
106 /* MCCMD */
107 PIN_MAP_CONFIGS_PIN_HOG_DEFAULT("pinctrl-stn8815", "GPIO9_A10", in_pullup),
108 /* MCCMDDIR */
109 PIN_MAP_CONFIGS_PIN_HOG_DEFAULT("pinctrl-stn8815", "GPIO10_C11", out_high),
110 /* MCDAT3-0 */
111 PIN_MAP_CONFIGS_PIN_HOG_DEFAULT("pinctrl-stn8815", "GPIO11_B11", in_pullup),
112 PIN_MAP_CONFIGS_PIN_HOG_DEFAULT("pinctrl-stn8815", "GPIO12_A11", in_pullup),
113 PIN_MAP_CONFIGS_PIN_HOG_DEFAULT("pinctrl-stn8815", "GPIO13_C12", in_pullup),
114 PIN_MAP_CONFIGS_PIN_HOG_DEFAULT("pinctrl-stn8815", "GPIO14_B12", in_pullup),
115 /* MCDAT0DIR */
116 PIN_MAP_CONFIGS_PIN_HOG_DEFAULT("pinctrl-stn8815", "GPIO15_A12", out_high),
117 /* MCDAT31DIR */
118 PIN_MAP_CONFIGS_PIN_HOG_DEFAULT("pinctrl-stn8815", "GPIO16_C13", out_high),
119 /* MCMSFBCLK */
120 PIN_MAP_CONFIGS_PIN_HOG_DEFAULT("pinctrl-stn8815", "GPIO24_C15", in_pullup),
121 /* CD input GPIO */
122 PIN_MAP_CONFIGS_PIN_HOG_DEFAULT("pinctrl-stn8815", "GPIO111_H21", in_nopull),
123 /* CD bias drive */
124 PIN_MAP_CONFIGS_PIN_HOG_DEFAULT("pinctrl-stn8815", "GPIO112_J21", out_low),
125 /* I2C0 */
126 PIN_MAP_CONFIGS_PIN_HOG_DEFAULT("pinctrl-stn8815", "GPIO62_D3", in_pullup),
127 PIN_MAP_CONFIGS_PIN_HOG_DEFAULT("pinctrl-stn8815", "GPIO63_D2", in_pullup),
128 /* I2C1 */
129 PIN_MAP_CONFIGS_PIN_HOG_DEFAULT("pinctrl-stn8815", "GPIO53_L4", in_pullup),
130 PIN_MAP_CONFIGS_PIN_HOG_DEFAULT("pinctrl-stn8815", "GPIO54_L3", in_pullup),
131 /* I2C2 */
132 PIN_MAP_CONFIGS_PIN_HOG_DEFAULT("pinctrl-stn8815", "GPIO73_C21", in_pullup),
133 PIN_MAP_CONFIGS_PIN_HOG_DEFAULT("pinctrl-stn8815", "GPIO74_C20", in_pullup),
134};
135
136/* This is needed for LL-debug/earlyprintk/debug-macro.S */ 91/* This is needed for LL-debug/earlyprintk/debug-macro.S */
137static struct map_desc cpu8815_io_desc[] __initdata = { 92static struct map_desc cpu8815_io_desc[] __initdata = {
138 { 93 {
@@ -148,7 +103,7 @@ static void __init cpu8815_map_io(void)
148 iotable_init(cpu8815_io_desc, ARRAY_SIZE(cpu8815_io_desc)); 103 iotable_init(cpu8815_io_desc, ARRAY_SIZE(cpu8815_io_desc));
149} 104}
150 105
151static void cpu8815_restart(char mode, const char *cmd) 106static void cpu8815_restart(enum reboot_mode mode, const char *cmd)
152{ 107{
153 void __iomem *srcbase = ioremap(NOMADIK_SRC_BASE, SZ_4K); 108 void __iomem *srcbase = ioremap(NOMADIK_SRC_BASE, SZ_4K);
154 109
@@ -172,7 +127,7 @@ static void __init cpu8815_timer_init_of(void)
172 /* We need this to be up now */ 127 /* We need this to be up now */
173 nomadik_clk_init(); 128 nomadik_clk_init();
174 129
175 mtu = of_find_node_by_path("/mtu0"); 130 mtu = of_find_node_by_path("/mtu@101e2000");
176 if (!mtu) 131 if (!mtu)
177 return; 132 return;
178 base = of_iomap(mtu, 0); 133 base = of_iomap(mtu, 0);
@@ -188,7 +143,7 @@ static void __init cpu8815_timer_init_of(void)
188 src_cr |= SRC_CR_INIT_VAL; 143 src_cr |= SRC_CR_INIT_VAL;
189 writel(src_cr, base); 144 writel(src_cr, base);
190 145
191 nmdk_timer_init(base, irq); 146 clocksource_of_init();
192} 147}
193 148
194static struct fsmc_nand_timings cpu8815_nand_timings = { 149static struct fsmc_nand_timings cpu8815_nand_timings = {
@@ -280,28 +235,10 @@ device_initcall(cpu8815_mmcsd_init);
280 235
281/* These are mostly to get the right device names for the clock lookups */ 236/* These are mostly to get the right device names for the clock lookups */
282static struct of_dev_auxdata cpu8815_auxdata_lookup[] __initdata = { 237static struct of_dev_auxdata cpu8815_auxdata_lookup[] __initdata = {
283 OF_DEV_AUXDATA("st,nomadik-gpio", NOMADIK_GPIO0_BASE,
284 "gpio.0", NULL),
285 OF_DEV_AUXDATA("st,nomadik-gpio", NOMADIK_GPIO1_BASE,
286 "gpio.1", NULL),
287 OF_DEV_AUXDATA("st,nomadik-gpio", NOMADIK_GPIO2_BASE,
288 "gpio.2", NULL),
289 OF_DEV_AUXDATA("st,nomadik-gpio", NOMADIK_GPIO3_BASE,
290 "gpio.3", NULL),
291 OF_DEV_AUXDATA("stericsson,nmk-pinctrl-stn8815", 0,
292 "pinctrl-stn8815", NULL),
293 OF_DEV_AUXDATA("arm,primecell", NOMADIK_UART0_BASE,
294 "uart0", NULL),
295 OF_DEV_AUXDATA("arm,primecell", NOMADIK_UART1_BASE,
296 "uart1", NULL),
297 OF_DEV_AUXDATA("arm,primecell", NOMADIK_RNG_BASE,
298 "rng", NULL),
299 OF_DEV_AUXDATA("arm,primecell", NOMADIK_RTC_BASE,
300 "rtc-pl031", NULL),
301 OF_DEV_AUXDATA("stericsson,fsmc-nand", NOMADIK_FSMC_BASE, 238 OF_DEV_AUXDATA("stericsson,fsmc-nand", NOMADIK_FSMC_BASE,
302 "fsmc-nand", &cpu8815_nand_data), 239 NULL, &cpu8815_nand_data),
303 OF_DEV_AUXDATA("arm,primecell", NOMADIK_SDI_BASE, 240 OF_DEV_AUXDATA("arm,primecell", NOMADIK_SDI_BASE,
304 "mmci", &mmcsd_plat_data), 241 NULL, &mmcsd_plat_data),
305 { /* sentinel */ }, 242 { /* sentinel */ },
306}; 243};
307 244
@@ -311,7 +248,6 @@ static void __init cpu8815_init_of(void)
311 /* At full speed latency must be >=2, so 0x249 in low bits */ 248 /* At full speed latency must be >=2, so 0x249 in low bits */
312 l2x0_of_init(0x00730249, 0xfe000fff); 249 l2x0_of_init(0x00730249, 0xfe000fff);
313#endif 250#endif
314 pinctrl_register_mappings(nhk8815_pinmap, ARRAY_SIZE(nhk8815_pinmap));
315 of_platform_populate(NULL, of_default_bus_match_table, 251 of_platform_populate(NULL, of_default_bus_match_table,
316 cpu8815_auxdata_lookup, NULL); 252 cpu8815_auxdata_lookup, NULL);
317} 253}
@@ -323,7 +259,6 @@ static const char * cpu8815_board_compat[] = {
323 259
324DT_MACHINE_START(NOMADIK_DT, "Nomadik STn8815") 260DT_MACHINE_START(NOMADIK_DT, "Nomadik STn8815")
325 .map_io = cpu8815_map_io, 261 .map_io = cpu8815_map_io,
326 .init_irq = irqchip_init,
327 .init_time = cpu8815_timer_init_of, 262 .init_time = cpu8815_timer_init_of,
328 .init_machine = cpu8815_init_of, 263 .init_machine = cpu8815_init_of,
329 .restart = cpu8815_restart, 264 .restart = cpu8815_restart,
diff --git a/arch/arm/mach-nspire/Kconfig b/arch/arm/mach-nspire/Kconfig
new file mode 100644
index 000000000000..59d8f0a70919
--- /dev/null
+++ b/arch/arm/mach-nspire/Kconfig
@@ -0,0 +1,16 @@
1config ARCH_NSPIRE
2 bool "TI-NSPIRE based"
3 depends on ARCH_MULTI_V4_V5
4 depends on MMU
5 select CPU_ARM926T
6 select COMMON_CLK
7 select GENERIC_CLOCKEVENTS
8 select GENERIC_IRQ_CHIP
9 select SPARSE_IRQ
10 select ARM_AMBA
11 select ARM_VIC
12 select ARM_TIMER_SP804
13 select USE_OF
14 select CLKSRC_OF
15 help
16 This enables support for systems using the TI-NSPIRE CPU
diff --git a/arch/arm/mach-nspire/Makefile b/arch/arm/mach-nspire/Makefile
new file mode 100644
index 000000000000..1bec256eba07
--- /dev/null
+++ b/arch/arm/mach-nspire/Makefile
@@ -0,0 +1,2 @@
1obj-y += nspire.o
2obj-y += clcd.o
diff --git a/arch/arm/mach-nspire/Makefile.boot b/arch/arm/mach-nspire/Makefile.boot
new file mode 100644
index 000000000000..e69de29bb2d1
--- /dev/null
+++ b/arch/arm/mach-nspire/Makefile.boot
diff --git a/arch/arm/mach-nspire/clcd.c b/arch/arm/mach-nspire/clcd.c
new file mode 100644
index 000000000000..abea12617b17
--- /dev/null
+++ b/arch/arm/mach-nspire/clcd.c
@@ -0,0 +1,119 @@
1/*
2 * linux/arch/arm/mach-nspire/clcd.c
3 *
4 * Copyright (C) 2013 Daniel Tang <tangrs@tangrs.id.au>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2, as
8 * published by the Free Software Foundation.
9 *
10 */
11
12#include <linux/init.h>
13#include <linux/of.h>
14#include <linux/amba/bus.h>
15#include <linux/amba/clcd.h>
16#include <linux/dma-mapping.h>
17
18static struct clcd_panel nspire_cx_lcd_panel = {
19 .mode = {
20 .name = "Color LCD",
21 .refresh = 60,
22 .xres = 320,
23 .yres = 240,
24 .sync = 0,
25 .vmode = FB_VMODE_NONINTERLACED,
26 .pixclock = 1,
27 .hsync_len = 6,
28 .vsync_len = 1,
29 .right_margin = 50,
30 .left_margin = 38,
31 .lower_margin = 3,
32 .upper_margin = 17,
33 },
34 .width = 65, /* ~6.50 cm */
35 .height = 49, /* ~4.87 cm */
36 .tim2 = TIM2_IPC,
37 .cntl = CNTL_LCDTFT | CNTL_LCDVCOMP(1),
38 .bpp = 16,
39 .caps = CLCD_CAP_565,
40};
41
42static struct clcd_panel nspire_classic_lcd_panel = {
43 .mode = {
44 .name = "Grayscale LCD",
45 .refresh = 60,
46 .xres = 320,
47 .yres = 240,
48 .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
49 .vmode = FB_VMODE_NONINTERLACED,
50 .pixclock = 1,
51 .hsync_len = 6,
52 .vsync_len = 1,
53 .right_margin = 6,
54 .left_margin = 6,
55 },
56 .width = 71, /* 7.11cm */
57 .height = 53, /* 5.33cm */
58 .tim2 = 0x80007d0,
59 .cntl = CNTL_LCDMONO8,
60 .bpp = 8,
61 .grayscale = 1,
62 .caps = CLCD_CAP_5551,
63};
64
65int nspire_clcd_setup(struct clcd_fb *fb)
66{
67 struct clcd_panel *panel;
68 size_t panel_size;
69 const char *type;
70 dma_addr_t dma;
71 int err;
72
73 BUG_ON(!fb->dev->dev.of_node);
74
75 err = of_property_read_string(fb->dev->dev.of_node, "lcd-type", &type);
76 if (err) {
77 pr_err("CLCD: Could not find lcd-type property\n");
78 return err;
79 }
80
81 if (!strcmp(type, "cx")) {
82 panel = &nspire_cx_lcd_panel;
83 } else if (!strcmp(type, "classic")) {
84 panel = &nspire_classic_lcd_panel;
85 } else {
86 pr_err("CLCD: Unknown lcd-type %s\n", type);
87 return -EINVAL;
88 }
89
90 panel_size = ((panel->mode.xres * panel->mode.yres) * panel->bpp) / 8;
91 panel_size = ALIGN(panel_size, PAGE_SIZE);
92
93 fb->fb.screen_base = dma_alloc_writecombine(&fb->dev->dev,
94 panel_size, &dma, GFP_KERNEL);
95
96 if (!fb->fb.screen_base) {
97 pr_err("CLCD: unable to map framebuffer\n");
98 return -ENOMEM;
99 }
100
101 fb->fb.fix.smem_start = dma;
102 fb->fb.fix.smem_len = panel_size;
103 fb->panel = panel;
104
105 return 0;
106}
107
108int nspire_clcd_mmap(struct clcd_fb *fb, struct vm_area_struct *vma)
109{
110 return dma_mmap_writecombine(&fb->dev->dev, vma,
111 fb->fb.screen_base, fb->fb.fix.smem_start,
112 fb->fb.fix.smem_len);
113}
114
115void nspire_clcd_remove(struct clcd_fb *fb)
116{
117 dma_free_writecombine(&fb->dev->dev, fb->fb.fix.smem_len,
118 fb->fb.screen_base, fb->fb.fix.smem_start);
119}
diff --git a/arch/arm/mach-nspire/clcd.h b/arch/arm/mach-nspire/clcd.h
new file mode 100644
index 000000000000..8c33d2c18371
--- /dev/null
+++ b/arch/arm/mach-nspire/clcd.h
@@ -0,0 +1,14 @@
1/*
2 * linux/arch/arm/mach-nspire/clcd.h
3 *
4 * Copyright (C) 2013 Daniel Tang <tangrs@tangrs.id.au>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2, as
8 * published by the Free Software Foundation.
9 *
10 */
11
12int nspire_clcd_setup(struct clcd_fb *fb);
13int nspire_clcd_mmap(struct clcd_fb *fb, struct vm_area_struct *vma);
14void nspire_clcd_remove(struct clcd_fb *fb);
diff --git a/arch/arm/mach-nspire/mmio.h b/arch/arm/mach-nspire/mmio.h
new file mode 100644
index 000000000000..8813471af4cf
--- /dev/null
+++ b/arch/arm/mach-nspire/mmio.h
@@ -0,0 +1,20 @@
1/*
2 * linux/arch/arm/mach-nspire/mmio.h
3 *
4 * Copyright (C) 2013 Daniel Tang <tangrs@tangrs.id.au>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2, as
8 * published by the Free Software Foundation.
9 *
10 */
11
12#define NSPIRE_MISC_PHYS_BASE 0x900A0000
13#define NSPIRE_MISC_HWRESET 0x08
14
15#define NSPIRE_PWR_PHYS_BASE 0x900B0000
16#define NSPIRE_PWR_VIRT_BASE 0xFEEB0000
17#define NSPIRE_PWR_BUS_DISABLE1 0x18
18#define NSPIRE_PWR_BUS_DISABLE2 0x20
19
20#define NSPIRE_LCD_PHYS_BASE 0xC0000000
diff --git a/arch/arm/mach-nspire/nspire.c b/arch/arm/mach-nspire/nspire.c
new file mode 100644
index 000000000000..99e26092a9f7
--- /dev/null
+++ b/arch/arm/mach-nspire/nspire.c
@@ -0,0 +1,89 @@
1/*
2 * linux/arch/arm/mach-nspire/nspire.c
3 *
4 * Copyright (C) 2013 Daniel Tang <tangrs@tangrs.id.au>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2, as
8 * published by the Free Software Foundation.
9 *
10 */
11#include <linux/init.h>
12#include <linux/of_irq.h>
13#include <linux/of_address.h>
14#include <linux/of_platform.h>
15#include <linux/irqchip.h>
16#include <linux/irqchip/arm-vic.h>
17#include <linux/clk-provider.h>
18#include <linux/clkdev.h>
19#include <linux/amba/bus.h>
20#include <linux/amba/clcd.h>
21#include <linux/clocksource.h>
22
23#include <asm/mach/arch.h>
24#include <asm/mach-types.h>
25#include <asm/mach/map.h>
26
27#include <asm/hardware/timer-sp.h>
28
29#include "mmio.h"
30#include "clcd.h"
31
32static const char *nspire_dt_match[] __initconst = {
33 "ti,nspire",
34 "ti,nspire-cx",
35 "ti,nspire-tp",
36 "ti,nspire-clp",
37 NULL,
38};
39
40static void __init nspire_map_io(void)
41{
42 debug_ll_io_init();
43}
44
45static struct clcd_board nspire_clcd_data = {
46 .name = "LCD",
47 .caps = CLCD_CAP_5551 | CLCD_CAP_565,
48 .check = clcdfb_check,
49 .decode = clcdfb_decode,
50 .setup = nspire_clcd_setup,
51 .mmap = nspire_clcd_mmap,
52 .remove = nspire_clcd_remove,
53};
54
55
56static struct of_dev_auxdata nspire_auxdata[] __initdata = {
57 OF_DEV_AUXDATA("arm,pl111", NSPIRE_LCD_PHYS_BASE,
58 NULL, &nspire_clcd_data),
59 { }
60};
61
62static void __init nspire_init(void)
63{
64 of_platform_populate(NULL, of_default_bus_match_table,
65 nspire_auxdata, NULL);
66}
67
68static void __init nspire_init_time(void)
69{
70 of_clk_init(NULL);
71 clocksource_of_init();
72}
73
74static void nspire_restart(char mode, const char *cmd)
75{
76 void __iomem *base = ioremap(NSPIRE_MISC_PHYS_BASE, SZ_4K);
77 if (!base)
78 return;
79
80 writel(2, base + NSPIRE_MISC_HWRESET);
81}
82
83DT_MACHINE_START(NSPIRE, "TI-NSPIRE")
84 .dt_compat = nspire_dt_match,
85 .map_io = nspire_map_io,
86 .init_time = nspire_init_time,
87 .init_machine = nspire_init,
88 .restart = nspire_restart,
89MACHINE_END
diff --git a/arch/arm/mach-omap1/Makefile b/arch/arm/mach-omap1/Makefile
index 222d58c0ae76..3889b6cd211e 100644
--- a/arch/arm/mach-omap1/Makefile
+++ b/arch/arm/mach-omap1/Makefile
@@ -19,10 +19,6 @@ obj-$(CONFIG_ARCH_OMAP16XX) += ocpi.o
19# Power Management 19# Power Management
20obj-$(CONFIG_PM) += pm.o sleep.o 20obj-$(CONFIG_PM) += pm.o sleep.o
21 21
22# DSP
23obj-$(CONFIG_OMAP_MBOX_FWK) += mailbox_mach.o
24mailbox_mach-objs := mailbox.o
25
26i2c-omap-$(CONFIG_I2C_OMAP) := i2c.o 22i2c-omap-$(CONFIG_I2C_OMAP) := i2c.o
27obj-y += $(i2c-omap-m) $(i2c-omap-y) 23obj-y += $(i2c-omap-m) $(i2c-omap-y)
28 24
diff --git a/arch/arm/mach-omap1/board-h2.c b/arch/arm/mach-omap1/board-h2.c
index 0dac3d239e32..fd90cafc2e36 100644
--- a/arch/arm/mach-omap1/board-h2.c
+++ b/arch/arm/mach-omap1/board-h2.c
@@ -41,7 +41,6 @@
41#include <mach/mux.h> 41#include <mach/mux.h>
42#include <linux/omap-dma.h> 42#include <linux/omap-dma.h>
43#include <mach/tc.h> 43#include <mach/tc.h>
44#include <mach/irda.h>
45#include <linux/platform_data/keypad-omap.h> 44#include <linux/platform_data/keypad-omap.h>
46#include <mach/flash.h> 45#include <mach/flash.h>
47 46
@@ -50,7 +49,6 @@
50 49
51#include "common.h" 50#include "common.h"
52#include "board-h2.h" 51#include "board-h2.h"
53#include "dma.h"
54 52
55/* At OMAP1610 Innovator the Ethernet is directly connected to CS1 */ 53/* At OMAP1610 Innovator the Ethernet is directly connected to CS1 */
56#define OMAP1610_ETHR_START 0x04000300 54#define OMAP1610_ETHR_START 0x04000300
@@ -276,39 +274,6 @@ static struct platform_device h2_kp_device = {
276 .resource = h2_kp_resources, 274 .resource = h2_kp_resources,
277}; 275};
278 276
279#define H2_IRDA_FIRSEL_GPIO_PIN 17
280
281static struct omap_irda_config h2_irda_data = {
282 .transceiver_cap = IR_SIRMODE | IR_MIRMODE | IR_FIRMODE,
283 .rx_channel = OMAP_DMA_UART3_RX,
284 .tx_channel = OMAP_DMA_UART3_TX,
285 .dest_start = UART3_THR,
286 .src_start = UART3_RHR,
287 .tx_trigger = 0,
288 .rx_trigger = 0,
289};
290
291static struct resource h2_irda_resources[] = {
292 [0] = {
293 .start = INT_UART3,
294 .end = INT_UART3,
295 .flags = IORESOURCE_IRQ,
296 },
297};
298
299static u64 irda_dmamask = 0xffffffff;
300
301static struct platform_device h2_irda_device = {
302 .name = "omapirda",
303 .id = 0,
304 .dev = {
305 .platform_data = &h2_irda_data,
306 .dma_mask = &irda_dmamask,
307 },
308 .num_resources = ARRAY_SIZE(h2_irda_resources),
309 .resource = h2_irda_resources,
310};
311
312static struct gpio_led h2_gpio_led_pins[] = { 277static struct gpio_led h2_gpio_led_pins[] = {
313 { 278 {
314 .name = "h2:red", 279 .name = "h2:red",
@@ -339,7 +304,6 @@ static struct platform_device *h2_devices[] __initdata = {
339 &h2_nor_device, 304 &h2_nor_device,
340 &h2_nand_device, 305 &h2_nand_device,
341 &h2_smc91x_device, 306 &h2_smc91x_device,
342 &h2_irda_device,
343 &h2_kp_device, 307 &h2_kp_device,
344 &h2_gpio_leds, 308 &h2_gpio_leds,
345}; 309};
diff --git a/arch/arm/mach-omap1/board-nokia770.c b/arch/arm/mach-omap1/board-nokia770.c
index 62a15e289c79..91449c5cb70f 100644
--- a/arch/arm/mach-omap1/board-nokia770.c
+++ b/arch/arm/mach-omap1/board-nokia770.c
@@ -234,16 +234,26 @@ static struct i2c_board_info nokia770_i2c_board_info_2[] __initdata = {
234 { 234 {
235 I2C_BOARD_INFO("retu-mfd", 0x01), 235 I2C_BOARD_INFO("retu-mfd", 0x01),
236 }, 236 },
237 {
238 I2C_BOARD_INFO("tahvo-mfd", 0x02),
239 },
237}; 240};
238 241
239static void __init nokia770_cbus_init(void) 242static void __init nokia770_cbus_init(void)
240{ 243{
241 const int retu_irq_gpio = 62; 244 const int retu_irq_gpio = 62;
245 const int tahvo_irq_gpio = 40;
242 246
243 if (gpio_request_one(retu_irq_gpio, GPIOF_IN, "Retu IRQ")) 247 if (gpio_request_one(retu_irq_gpio, GPIOF_IN, "Retu IRQ"))
244 return; 248 return;
249 if (gpio_request_one(tahvo_irq_gpio, GPIOF_IN, "Tahvo IRQ")) {
250 gpio_free(retu_irq_gpio);
251 return;
252 }
245 irq_set_irq_type(gpio_to_irq(retu_irq_gpio), IRQ_TYPE_EDGE_RISING); 253 irq_set_irq_type(gpio_to_irq(retu_irq_gpio), IRQ_TYPE_EDGE_RISING);
254 irq_set_irq_type(gpio_to_irq(tahvo_irq_gpio), IRQ_TYPE_EDGE_RISING);
246 nokia770_i2c_board_info_2[0].irq = gpio_to_irq(retu_irq_gpio); 255 nokia770_i2c_board_info_2[0].irq = gpio_to_irq(retu_irq_gpio);
256 nokia770_i2c_board_info_2[1].irq = gpio_to_irq(tahvo_irq_gpio);
247 i2c_register_board_info(2, nokia770_i2c_board_info_2, 257 i2c_register_board_info(2, nokia770_i2c_board_info_2,
248 ARRAY_SIZE(nokia770_i2c_board_info_2)); 258 ARRAY_SIZE(nokia770_i2c_board_info_2));
249 platform_device_register(&nokia770_cbus_device); 259 platform_device_register(&nokia770_cbus_device);
diff --git a/arch/arm/mach-omap1/board-palmte.c b/arch/arm/mach-omap1/board-palmte.c
index 845a1a7aef95..3b8e98f4353c 100644
--- a/arch/arm/mach-omap1/board-palmte.c
+++ b/arch/arm/mach-omap1/board-palmte.c
@@ -38,14 +38,12 @@
38#include <mach/mux.h> 38#include <mach/mux.h>
39#include <mach/tc.h> 39#include <mach/tc.h>
40#include <linux/omap-dma.h> 40#include <linux/omap-dma.h>
41#include <mach/irda.h>
42#include <linux/platform_data/keypad-omap.h> 41#include <linux/platform_data/keypad-omap.h>
43 42
44#include <mach/hardware.h> 43#include <mach/hardware.h>
45#include <mach/usb.h> 44#include <mach/usb.h>
46 45
47#include "common.h" 46#include "common.h"
48#include "dma.h"
49 47
50#define PALMTE_USBDETECT_GPIO 0 48#define PALMTE_USBDETECT_GPIO 0
51#define PALMTE_USB_OR_DC_GPIO 1 49#define PALMTE_USB_OR_DC_GPIO 1
@@ -167,40 +165,11 @@ static struct platform_device palmte_backlight_device = {
167 }, 165 },
168}; 166};
169 167
170static struct omap_irda_config palmte_irda_config = {
171 .transceiver_cap = IR_SIRMODE,
172 .rx_channel = OMAP_DMA_UART3_RX,
173 .tx_channel = OMAP_DMA_UART3_TX,
174 .dest_start = UART3_THR,
175 .src_start = UART3_RHR,
176 .tx_trigger = 0,
177 .rx_trigger = 0,
178};
179
180static struct resource palmte_irda_resources[] = {
181 [0] = {
182 .start = INT_UART3,
183 .end = INT_UART3,
184 .flags = IORESOURCE_IRQ,
185 },
186};
187
188static struct platform_device palmte_irda_device = {
189 .name = "omapirda",
190 .id = -1,
191 .dev = {
192 .platform_data = &palmte_irda_config,
193 },
194 .num_resources = ARRAY_SIZE(palmte_irda_resources),
195 .resource = palmte_irda_resources,
196};
197
198static struct platform_device *palmte_devices[] __initdata = { 168static struct platform_device *palmte_devices[] __initdata = {
199 &palmte_rom_device, 169 &palmte_rom_device,
200 &palmte_kp_device, 170 &palmte_kp_device,
201 &palmte_lcd_device, 171 &palmte_lcd_device,
202 &palmte_backlight_device, 172 &palmte_backlight_device,
203 &palmte_irda_device,
204}; 173};
205 174
206static struct omap_usb_config palmte_usb_config __initdata = { 175static struct omap_usb_config palmte_usb_config __initdata = {
diff --git a/arch/arm/mach-omap1/board-palmtt.c b/arch/arm/mach-omap1/board-palmtt.c
index 65a4a3e357f2..ca501208825f 100644
--- a/arch/arm/mach-omap1/board-palmtt.c
+++ b/arch/arm/mach-omap1/board-palmtt.c
@@ -38,14 +38,12 @@
38#include <mach/mux.h> 38#include <mach/mux.h>
39#include <linux/omap-dma.h> 39#include <linux/omap-dma.h>
40#include <mach/tc.h> 40#include <mach/tc.h>
41#include <mach/irda.h>
42#include <linux/platform_data/keypad-omap.h> 41#include <linux/platform_data/keypad-omap.h>
43 42
44#include <mach/hardware.h> 43#include <mach/hardware.h>
45#include <mach/usb.h> 44#include <mach/usb.h>
46 45
47#include "common.h" 46#include "common.h"
48#include "dma.h"
49 47
50#define PALMTT_USBDETECT_GPIO 0 48#define PALMTT_USBDETECT_GPIO 0
51#define PALMTT_CABLE_GPIO 1 49#define PALMTT_CABLE_GPIO 1
@@ -163,33 +161,6 @@ static struct platform_device palmtt_lcd_device = {
163 .name = "lcd_palmtt", 161 .name = "lcd_palmtt",
164 .id = -1, 162 .id = -1,
165}; 163};
166static struct omap_irda_config palmtt_irda_config = {
167 .transceiver_cap = IR_SIRMODE,
168 .rx_channel = OMAP_DMA_UART3_RX,
169 .tx_channel = OMAP_DMA_UART3_TX,
170 .dest_start = UART3_THR,
171 .src_start = UART3_RHR,
172 .tx_trigger = 0,
173 .rx_trigger = 0,
174};
175
176static struct resource palmtt_irda_resources[] = {
177 [0] = {
178 .start = INT_UART3,
179 .end = INT_UART3,
180 .flags = IORESOURCE_IRQ,
181 },
182};
183
184static struct platform_device palmtt_irda_device = {
185 .name = "omapirda",
186 .id = -1,
187 .dev = {
188 .platform_data = &palmtt_irda_config,
189 },
190 .num_resources = ARRAY_SIZE(palmtt_irda_resources),
191 .resource = palmtt_irda_resources,
192};
193 164
194static struct platform_device palmtt_spi_device = { 165static struct platform_device palmtt_spi_device = {
195 .name = "spi_palmtt", 166 .name = "spi_palmtt",
@@ -234,7 +205,6 @@ static struct platform_device *palmtt_devices[] __initdata = {
234 &palmtt_flash_device, 205 &palmtt_flash_device,
235 &palmtt_kp_device, 206 &palmtt_kp_device,
236 &palmtt_lcd_device, 207 &palmtt_lcd_device,
237 &palmtt_irda_device,
238 &palmtt_spi_device, 208 &palmtt_spi_device,
239 &palmtt_backlight_device, 209 &palmtt_backlight_device,
240 &palmtt_led_device, 210 &palmtt_led_device,
diff --git a/arch/arm/mach-omap1/board-palmz71.c b/arch/arm/mach-omap1/board-palmz71.c
index 01c970071fd8..470e12d67360 100644
--- a/arch/arm/mach-omap1/board-palmz71.c
+++ b/arch/arm/mach-omap1/board-palmz71.c
@@ -40,14 +40,12 @@
40#include <mach/mux.h> 40#include <mach/mux.h>
41#include <linux/omap-dma.h> 41#include <linux/omap-dma.h>
42#include <mach/tc.h> 42#include <mach/tc.h>
43#include <mach/irda.h>
44#include <linux/platform_data/keypad-omap.h> 43#include <linux/platform_data/keypad-omap.h>
45 44
46#include <mach/hardware.h> 45#include <mach/hardware.h>
47#include <mach/usb.h> 46#include <mach/usb.h>
48 47
49#include "common.h" 48#include "common.h"
50#include "dma.h"
51 49
52#define PALMZ71_USBDETECT_GPIO 0 50#define PALMZ71_USBDETECT_GPIO 0
53#define PALMZ71_PENIRQ_GPIO 6 51#define PALMZ71_PENIRQ_GPIO 6
@@ -153,34 +151,6 @@ static struct platform_device palmz71_lcd_device = {
153 .id = -1, 151 .id = -1,
154}; 152};
155 153
156static struct omap_irda_config palmz71_irda_config = {
157 .transceiver_cap = IR_SIRMODE,
158 .rx_channel = OMAP_DMA_UART3_RX,
159 .tx_channel = OMAP_DMA_UART3_TX,
160 .dest_start = UART3_THR,
161 .src_start = UART3_RHR,
162 .tx_trigger = 0,
163 .rx_trigger = 0,
164};
165
166static struct resource palmz71_irda_resources[] = {
167 [0] = {
168 .start = INT_UART3,
169 .end = INT_UART3,
170 .flags = IORESOURCE_IRQ,
171 },
172};
173
174static struct platform_device palmz71_irda_device = {
175 .name = "omapirda",
176 .id = -1,
177 .dev = {
178 .platform_data = &palmz71_irda_config,
179 },
180 .num_resources = ARRAY_SIZE(palmz71_irda_resources),
181 .resource = palmz71_irda_resources,
182};
183
184static struct platform_device palmz71_spi_device = { 154static struct platform_device palmz71_spi_device = {
185 .name = "spi_palmz71", 155 .name = "spi_palmz71",
186 .id = -1, 156 .id = -1,
@@ -202,7 +172,6 @@ static struct platform_device *devices[] __initdata = {
202 &palmz71_rom_device, 172 &palmz71_rom_device,
203 &palmz71_kp_device, 173 &palmz71_kp_device,
204 &palmz71_lcd_device, 174 &palmz71_lcd_device,
205 &palmz71_irda_device,
206 &palmz71_spi_device, 175 &palmz71_spi_device,
207 &palmz71_backlight_device, 176 &palmz71_backlight_device,
208}; 177};
diff --git a/arch/arm/mach-omap1/board-sx1.c b/arch/arm/mach-omap1/board-sx1.c
index 9732a98f3e06..0a8d3349149c 100644
--- a/arch/arm/mach-omap1/board-sx1.c
+++ b/arch/arm/mach-omap1/board-sx1.c
@@ -37,7 +37,6 @@
37#include <mach/flash.h> 37#include <mach/flash.h>
38#include <mach/mux.h> 38#include <mach/mux.h>
39#include <linux/omap-dma.h> 39#include <linux/omap-dma.h>
40#include <mach/irda.h>
41#include <mach/tc.h> 40#include <mach/tc.h>
42#include <mach/board-sx1.h> 41#include <mach/board-sx1.h>
43 42
@@ -45,7 +44,6 @@
45#include <mach/usb.h> 44#include <mach/usb.h>
46 45
47#include "common.h" 46#include "common.h"
48#include "dma.h"
49 47
50/* Write to I2C device */ 48/* Write to I2C device */
51int sx1_i2c_write_byte(u8 devaddr, u8 regoffset, u8 value) 49int sx1_i2c_write_byte(u8 devaddr, u8 regoffset, u8 value)
@@ -228,39 +226,6 @@ static struct platform_device sx1_kp_device = {
228 .resource = sx1_kp_resources, 226 .resource = sx1_kp_resources,
229}; 227};
230 228
231/*----------- IRDA -------------------------*/
232
233static struct omap_irda_config sx1_irda_data = {
234 .transceiver_cap = IR_SIRMODE,
235 .rx_channel = OMAP_DMA_UART3_RX,
236 .tx_channel = OMAP_DMA_UART3_TX,
237 .dest_start = UART3_THR,
238 .src_start = UART3_RHR,
239 .tx_trigger = 0,
240 .rx_trigger = 0,
241};
242
243static struct resource sx1_irda_resources[] = {
244 [0] = {
245 .start = INT_UART3,
246 .end = INT_UART3,
247 .flags = IORESOURCE_IRQ,
248 },
249};
250
251static u64 irda_dmamask = 0xffffffff;
252
253static struct platform_device sx1_irda_device = {
254 .name = "omapirda",
255 .id = 0,
256 .dev = {
257 .platform_data = &sx1_irda_data,
258 .dma_mask = &irda_dmamask,
259 },
260 .num_resources = ARRAY_SIZE(sx1_irda_resources),
261 .resource = sx1_irda_resources,
262};
263
264/*----------- MTD -------------------------*/ 229/*----------- MTD -------------------------*/
265 230
266static struct mtd_partition sx1_partitions[] = { 231static struct mtd_partition sx1_partitions[] = {
@@ -366,7 +331,6 @@ static struct omap_lcd_config sx1_lcd_config __initdata = {
366static struct platform_device *sx1_devices[] __initdata = { 331static struct platform_device *sx1_devices[] __initdata = {
367 &sx1_flash_device, 332 &sx1_flash_device,
368 &sx1_kp_device, 333 &sx1_kp_device,
369 &sx1_irda_device,
370}; 334};
371 335
372/*-----------------------------------------*/ 336/*-----------------------------------------*/
diff --git a/arch/arm/mach-omap1/board-voiceblue.c b/arch/arm/mach-omap1/board-voiceblue.c
index 6c116e1a4b01..4677a9ccb3cb 100644
--- a/arch/arm/mach-omap1/board-voiceblue.c
+++ b/arch/arm/mach-omap1/board-voiceblue.c
@@ -26,6 +26,7 @@
26#include <linux/serial_reg.h> 26#include <linux/serial_reg.h>
27#include <linux/smc91x.h> 27#include <linux/smc91x.h>
28#include <linux/export.h> 28#include <linux/export.h>
29#include <linux/reboot.h>
29 30
30#include <asm/mach-types.h> 31#include <asm/mach-types.h>
31#include <asm/mach/arch.h> 32#include <asm/mach/arch.h>
@@ -215,7 +216,7 @@ void voiceblue_wdt_ping(void)
215 gpio_set_value(0, wdt_gpio_state); 216 gpio_set_value(0, wdt_gpio_state);
216} 217}
217 218
218static void voiceblue_restart(char mode, const char *cmd) 219static void voiceblue_restart(enum reboot_mode mode, const char *cmd)
219{ 220{
220 /* 221 /*
221 * Workaround for 5912/1611b bug mentioned in sprz209d.pdf p. 28 222 * Workaround for 5912/1611b bug mentioned in sprz209d.pdf p. 28
diff --git a/arch/arm/mach-omap1/common.h b/arch/arm/mach-omap1/common.h
index 14f7e9920479..abec019a5281 100644
--- a/arch/arm/mach-omap1/common.h
+++ b/arch/arm/mach-omap1/common.h
@@ -28,6 +28,7 @@
28 28
29#include <linux/mtd/mtd.h> 29#include <linux/mtd/mtd.h>
30#include <linux/i2c-omap.h> 30#include <linux/i2c-omap.h>
31#include <linux/reboot.h>
31 32
32#include <plat/i2c.h> 33#include <plat/i2c.h>
33 34
@@ -70,7 +71,7 @@ static inline int omap_serial_wakeup_init(void)
70void omap1_init_early(void); 71void omap1_init_early(void);
71void omap1_init_irq(void); 72void omap1_init_irq(void);
72void omap1_init_late(void); 73void omap1_init_late(void);
73void omap1_restart(char, const char *); 74void omap1_restart(enum reboot_mode, const char *);
74 75
75extern void __init omap_check_revision(void); 76extern void __init omap_check_revision(void);
76 77
diff --git a/arch/arm/mach-omap1/devices.c b/arch/arm/mach-omap1/devices.c
index 0af635205e8a..325e6030095e 100644
--- a/arch/arm/mach-omap1/devices.c
+++ b/arch/arm/mach-omap1/devices.c
@@ -30,7 +30,6 @@
30 30
31#include "common.h" 31#include "common.h"
32#include "clock.h" 32#include "clock.h"
33#include "dma.h"
34#include "mmc.h" 33#include "mmc.h"
35#include "sram.h" 34#include "sram.h"
36 35
@@ -223,16 +222,16 @@ void __init omap1_init_mmc(struct omap_mmc_platform_data **mmc_data,
223 case 0: 222 case 0:
224 base = OMAP1_MMC1_BASE; 223 base = OMAP1_MMC1_BASE;
225 irq = INT_MMC; 224 irq = INT_MMC;
226 rx_req = OMAP_DMA_MMC_RX; 225 rx_req = 22;
227 tx_req = OMAP_DMA_MMC_TX; 226 tx_req = 21;
228 break; 227 break;
229 case 1: 228 case 1:
230 if (!cpu_is_omap16xx()) 229 if (!cpu_is_omap16xx())
231 return; 230 return;
232 base = OMAP1_MMC2_BASE; 231 base = OMAP1_MMC2_BASE;
233 irq = INT_1610_MMC2; 232 irq = INT_1610_MMC2;
234 rx_req = OMAP_DMA_MMC2_RX; 233 rx_req = 55;
235 tx_req = OMAP_DMA_MMC2_TX; 234 tx_req = 54;
236 break; 235 break;
237 default: 236 default:
238 continue; 237 continue;
diff --git a/arch/arm/mach-omap1/dma.c b/arch/arm/mach-omap1/dma.c
index a94b3a718d1a..5bb8ce86d54b 100644
--- a/arch/arm/mach-omap1/dma.c
+++ b/arch/arm/mach-omap1/dma.c
@@ -30,8 +30,6 @@
30 30
31#include <mach/irqs.h> 31#include <mach/irqs.h>
32 32
33#include "dma.h"
34
35#define OMAP1_DMA_BASE (0xfffed800) 33#define OMAP1_DMA_BASE (0xfffed800)
36#define OMAP1_LOGICAL_DMA_CH_COUNT 17 34#define OMAP1_LOGICAL_DMA_CH_COUNT 17
37#define OMAP1_DMA_STRIDE 0x40 35#define OMAP1_DMA_STRIDE 0x40
diff --git a/arch/arm/mach-omap1/dma.h b/arch/arm/mach-omap1/dma.h
deleted file mode 100644
index d05909c96715..000000000000
--- a/arch/arm/mach-omap1/dma.h
+++ /dev/null
@@ -1,42 +0,0 @@
1/*
2 * OMAP1 DMA channel definitions
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
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 */
18
19#ifndef __OMAP1_DMA_CHANNEL_H
20#define __OMAP1_DMA_CHANNEL_H
21
22/* DMA channels for omap1 */
23#define OMAP_DMA_NO_DEVICE 0
24#define OMAP_DMA_MCBSP1_TX 8
25#define OMAP_DMA_MCBSP1_RX 9
26#define OMAP_DMA_MCBSP3_TX 10
27#define OMAP_DMA_MCBSP3_RX 11
28#define OMAP_DMA_MCBSP2_TX 16
29#define OMAP_DMA_MCBSP2_RX 17
30#define OMAP_DMA_UART3_TX 18
31#define OMAP_DMA_UART3_RX 19
32#define OMAP_DMA_CAMERA_IF_RX 20
33#define OMAP_DMA_MMC_TX 21
34#define OMAP_DMA_MMC_RX 22
35#define OMAP_DMA_USB_W2FC_RX0 26
36#define OMAP_DMA_USB_W2FC_TX0 29
37
38/* These are only for 1610 */
39#define OMAP_DMA_MMC2_TX 54
40#define OMAP_DMA_MMC2_RX 55
41
42#endif /* __OMAP1_DMA_CHANNEL_H */
diff --git a/arch/arm/mach-omap1/include/mach/irda.h b/arch/arm/mach-omap1/include/mach/irda.h
deleted file mode 100644
index 40f60339d1c6..000000000000
--- a/arch/arm/mach-omap1/include/mach/irda.h
+++ /dev/null
@@ -1,33 +0,0 @@
1/*
2 * arch/arm/plat-omap/include/mach/irda.h
3 *
4 * Copyright (C) 2005-2006 Komal Shah <komal_shah802003@yahoo.com>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
10#ifndef ASMARM_ARCH_IRDA_H
11#define ASMARM_ARCH_IRDA_H
12
13/* board specific transceiver capabilities */
14
15#define IR_SEL 1 /* Selects IrDA */
16#define IR_SIRMODE 2
17#define IR_FIRMODE 4
18#define IR_MIRMODE 8
19
20struct omap_irda_config {
21 int transceiver_cap;
22 int (*transceiver_mode)(struct device *dev, int mode);
23 int (*select_irda)(struct device *dev, int state);
24 int rx_channel;
25 int tx_channel;
26 unsigned long dest_start;
27 unsigned long src_start;
28 int tx_trigger;
29 int rx_trigger;
30 int mode;
31};
32
33#endif
diff --git a/arch/arm/mach-omap1/lcd_dma.c b/arch/arm/mach-omap1/lcd_dma.c
index 77924be37d41..26a2b01c7c4f 100644
--- a/arch/arm/mach-omap1/lcd_dma.c
+++ b/arch/arm/mach-omap1/lcd_dma.c
@@ -32,8 +32,6 @@
32#include <mach/hardware.h> 32#include <mach/hardware.h>
33#include <mach/lcdc.h> 33#include <mach/lcdc.h>
34 34
35#include "dma.h"
36
37int omap_lcd_dma_running(void) 35int omap_lcd_dma_running(void)
38{ 36{
39 /* 37 /*
diff --git a/arch/arm/mach-omap1/mailbox.c b/arch/arm/mach-omap1/mailbox.c
deleted file mode 100644
index efc8f207f6fc..000000000000
--- a/arch/arm/mach-omap1/mailbox.c
+++ /dev/null
@@ -1,199 +0,0 @@
1/*
2 * Mailbox reservation modules for OMAP1
3 *
4 * Copyright (C) 2006-2009 Nokia Corporation
5 * Written by: Hiroshi DOYU <Hiroshi.DOYU@nokia.com>
6 *
7 * This file is subject to the terms and conditions of the GNU General Public
8 * License. See the file "COPYING" in the main directory of this archive
9 * for more details.
10 */
11
12#include <linux/module.h>
13#include <linux/interrupt.h>
14#include <linux/platform_device.h>
15#include <linux/io.h>
16#include <plat/mailbox.h>
17
18#define MAILBOX_ARM2DSP1 0x00
19#define MAILBOX_ARM2DSP1b 0x04
20#define MAILBOX_DSP2ARM1 0x08
21#define MAILBOX_DSP2ARM1b 0x0c
22#define MAILBOX_DSP2ARM2 0x10
23#define MAILBOX_DSP2ARM2b 0x14
24#define MAILBOX_ARM2DSP1_Flag 0x18
25#define MAILBOX_DSP2ARM1_Flag 0x1c
26#define MAILBOX_DSP2ARM2_Flag 0x20
27
28static void __iomem *mbox_base;
29
30struct omap_mbox1_fifo {
31 unsigned long cmd;
32 unsigned long data;
33 unsigned long flag;
34};
35
36struct omap_mbox1_priv {
37 struct omap_mbox1_fifo tx_fifo;
38 struct omap_mbox1_fifo rx_fifo;
39};
40
41static inline int mbox_read_reg(size_t ofs)
42{
43 return __raw_readw(mbox_base + ofs);
44}
45
46static inline void mbox_write_reg(u32 val, size_t ofs)
47{
48 __raw_writew(val, mbox_base + ofs);
49}
50
51/* msg */
52static mbox_msg_t omap1_mbox_fifo_read(struct omap_mbox *mbox)
53{
54 struct omap_mbox1_fifo *fifo =
55 &((struct omap_mbox1_priv *)mbox->priv)->rx_fifo;
56 mbox_msg_t msg;
57
58 msg = mbox_read_reg(fifo->data);
59 msg |= ((mbox_msg_t) mbox_read_reg(fifo->cmd)) << 16;
60
61 return msg;
62}
63
64static void
65omap1_mbox_fifo_write(struct omap_mbox *mbox, mbox_msg_t msg)
66{
67 struct omap_mbox1_fifo *fifo =
68 &((struct omap_mbox1_priv *)mbox->priv)->tx_fifo;
69
70 mbox_write_reg(msg & 0xffff, fifo->data);
71 mbox_write_reg(msg >> 16, fifo->cmd);
72}
73
74static int omap1_mbox_fifo_empty(struct omap_mbox *mbox)
75{
76 return 0;
77}
78
79static int omap1_mbox_fifo_full(struct omap_mbox *mbox)
80{
81 struct omap_mbox1_fifo *fifo =
82 &((struct omap_mbox1_priv *)mbox->priv)->rx_fifo;
83
84 return mbox_read_reg(fifo->flag);
85}
86
87/* irq */
88static void
89omap1_mbox_enable_irq(struct omap_mbox *mbox, omap_mbox_type_t irq)
90{
91 if (irq == IRQ_RX)
92 enable_irq(mbox->irq);
93}
94
95static void
96omap1_mbox_disable_irq(struct omap_mbox *mbox, omap_mbox_type_t irq)
97{
98 if (irq == IRQ_RX)
99 disable_irq(mbox->irq);
100}
101
102static int
103omap1_mbox_is_irq(struct omap_mbox *mbox, omap_mbox_type_t irq)
104{
105 if (irq == IRQ_TX)
106 return 0;
107 return 1;
108}
109
110static struct omap_mbox_ops omap1_mbox_ops = {
111 .type = OMAP_MBOX_TYPE1,
112 .fifo_read = omap1_mbox_fifo_read,
113 .fifo_write = omap1_mbox_fifo_write,
114 .fifo_empty = omap1_mbox_fifo_empty,
115 .fifo_full = omap1_mbox_fifo_full,
116 .enable_irq = omap1_mbox_enable_irq,
117 .disable_irq = omap1_mbox_disable_irq,
118 .is_irq = omap1_mbox_is_irq,
119};
120
121/* FIXME: the following struct should be created automatically by the user id */
122
123/* DSP */
124static struct omap_mbox1_priv omap1_mbox_dsp_priv = {
125 .tx_fifo = {
126 .cmd = MAILBOX_ARM2DSP1b,
127 .data = MAILBOX_ARM2DSP1,
128 .flag = MAILBOX_ARM2DSP1_Flag,
129 },
130 .rx_fifo = {
131 .cmd = MAILBOX_DSP2ARM1b,
132 .data = MAILBOX_DSP2ARM1,
133 .flag = MAILBOX_DSP2ARM1_Flag,
134 },
135};
136
137static struct omap_mbox mbox_dsp_info = {
138 .name = "dsp",
139 .ops = &omap1_mbox_ops,
140 .priv = &omap1_mbox_dsp_priv,
141};
142
143static struct omap_mbox *omap1_mboxes[] = { &mbox_dsp_info, NULL };
144
145static int omap1_mbox_probe(struct platform_device *pdev)
146{
147 struct resource *mem;
148 int ret;
149 struct omap_mbox **list;
150
151 list = omap1_mboxes;
152 list[0]->irq = platform_get_irq_byname(pdev, "dsp");
153
154 mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
155 mbox_base = ioremap(mem->start, resource_size(mem));
156 if (!mbox_base)
157 return -ENOMEM;
158
159 ret = omap_mbox_register(&pdev->dev, list);
160 if (ret) {
161 iounmap(mbox_base);
162 return ret;
163 }
164
165 return 0;
166}
167
168static int omap1_mbox_remove(struct platform_device *pdev)
169{
170 omap_mbox_unregister();
171 iounmap(mbox_base);
172 return 0;
173}
174
175static struct platform_driver omap1_mbox_driver = {
176 .probe = omap1_mbox_probe,
177 .remove = omap1_mbox_remove,
178 .driver = {
179 .name = "omap-mailbox",
180 },
181};
182
183static int __init omap1_mbox_init(void)
184{
185 return platform_driver_register(&omap1_mbox_driver);
186}
187
188static void __exit omap1_mbox_exit(void)
189{
190 platform_driver_unregister(&omap1_mbox_driver);
191}
192
193module_init(omap1_mbox_init);
194module_exit(omap1_mbox_exit);
195
196MODULE_LICENSE("GPL v2");
197MODULE_DESCRIPTION("omap mailbox: omap1 architecture specific functions");
198MODULE_AUTHOR("Hiroshi DOYU <Hiroshi.DOYU@nokia.com>");
199MODULE_ALIAS("platform:omap1-mailbox");
diff --git a/arch/arm/mach-omap1/mcbsp.c b/arch/arm/mach-omap1/mcbsp.c
index b0d4723c9a90..8ed67f8d1762 100644
--- a/arch/arm/mach-omap1/mcbsp.c
+++ b/arch/arm/mach-omap1/mcbsp.c
@@ -27,7 +27,6 @@
27#include <mach/irqs.h> 27#include <mach/irqs.h>
28 28
29#include "iomap.h" 29#include "iomap.h"
30#include "dma.h"
31 30
32#define DPS_RSTCT2_PER_EN (1 << 0) 31#define DPS_RSTCT2_PER_EN (1 << 0)
33#define DSP_RSTCT2_WD_PER_EN (1 << 1) 32#define DSP_RSTCT2_WD_PER_EN (1 << 1)
@@ -114,12 +113,12 @@ struct resource omap7xx_mcbsp_res[][6] = {
114 }, 113 },
115 { 114 {
116 .name = "rx", 115 .name = "rx",
117 .start = OMAP_DMA_MCBSP1_RX, 116 .start = 9,
118 .flags = IORESOURCE_DMA, 117 .flags = IORESOURCE_DMA,
119 }, 118 },
120 { 119 {
121 .name = "tx", 120 .name = "tx",
122 .start = OMAP_DMA_MCBSP1_TX, 121 .start = 8,
123 .flags = IORESOURCE_DMA, 122 .flags = IORESOURCE_DMA,
124 }, 123 },
125 }, 124 },
@@ -141,12 +140,12 @@ struct resource omap7xx_mcbsp_res[][6] = {
141 }, 140 },
142 { 141 {
143 .name = "rx", 142 .name = "rx",
144 .start = OMAP_DMA_MCBSP3_RX, 143 .start = 11,
145 .flags = IORESOURCE_DMA, 144 .flags = IORESOURCE_DMA,
146 }, 145 },
147 { 146 {
148 .name = "tx", 147 .name = "tx",
149 .start = OMAP_DMA_MCBSP3_TX, 148 .start = 10,
150 .flags = IORESOURCE_DMA, 149 .flags = IORESOURCE_DMA,
151 }, 150 },
152 }, 151 },
@@ -191,12 +190,12 @@ struct resource omap15xx_mcbsp_res[][6] = {
191 }, 190 },
192 { 191 {
193 .name = "rx", 192 .name = "rx",
194 .start = OMAP_DMA_MCBSP1_RX, 193 .start = 9,
195 .flags = IORESOURCE_DMA, 194 .flags = IORESOURCE_DMA,
196 }, 195 },
197 { 196 {
198 .name = "tx", 197 .name = "tx",
199 .start = OMAP_DMA_MCBSP1_TX, 198 .start = 8,
200 .flags = IORESOURCE_DMA, 199 .flags = IORESOURCE_DMA,
201 }, 200 },
202 }, 201 },
@@ -218,12 +217,12 @@ struct resource omap15xx_mcbsp_res[][6] = {
218 }, 217 },
219 { 218 {
220 .name = "rx", 219 .name = "rx",
221 .start = OMAP_DMA_MCBSP2_RX, 220 .start = 17,
222 .flags = IORESOURCE_DMA, 221 .flags = IORESOURCE_DMA,
223 }, 222 },
224 { 223 {
225 .name = "tx", 224 .name = "tx",
226 .start = OMAP_DMA_MCBSP2_TX, 225 .start = 16,
227 .flags = IORESOURCE_DMA, 226 .flags = IORESOURCE_DMA,
228 }, 227 },
229 }, 228 },
@@ -245,12 +244,12 @@ struct resource omap15xx_mcbsp_res[][6] = {
245 }, 244 },
246 { 245 {
247 .name = "rx", 246 .name = "rx",
248 .start = OMAP_DMA_MCBSP3_RX, 247 .start = 11,
249 .flags = IORESOURCE_DMA, 248 .flags = IORESOURCE_DMA,
250 }, 249 },
251 { 250 {
252 .name = "tx", 251 .name = "tx",
253 .start = OMAP_DMA_MCBSP3_TX, 252 .start = 10,
254 .flags = IORESOURCE_DMA, 253 .flags = IORESOURCE_DMA,
255 }, 254 },
256 }, 255 },
@@ -298,12 +297,12 @@ struct resource omap16xx_mcbsp_res[][6] = {
298 }, 297 },
299 { 298 {
300 .name = "rx", 299 .name = "rx",
301 .start = OMAP_DMA_MCBSP1_RX, 300 .start = 9,
302 .flags = IORESOURCE_DMA, 301 .flags = IORESOURCE_DMA,
303 }, 302 },
304 { 303 {
305 .name = "tx", 304 .name = "tx",
306 .start = OMAP_DMA_MCBSP1_TX, 305 .start = 8,
307 .flags = IORESOURCE_DMA, 306 .flags = IORESOURCE_DMA,
308 }, 307 },
309 }, 308 },
@@ -325,12 +324,12 @@ struct resource omap16xx_mcbsp_res[][6] = {
325 }, 324 },
326 { 325 {
327 .name = "rx", 326 .name = "rx",
328 .start = OMAP_DMA_MCBSP2_RX, 327 .start = 17,
329 .flags = IORESOURCE_DMA, 328 .flags = IORESOURCE_DMA,
330 }, 329 },
331 { 330 {
332 .name = "tx", 331 .name = "tx",
333 .start = OMAP_DMA_MCBSP2_TX, 332 .start = 16,
334 .flags = IORESOURCE_DMA, 333 .flags = IORESOURCE_DMA,
335 }, 334 },
336 }, 335 },
@@ -352,12 +351,12 @@ struct resource omap16xx_mcbsp_res[][6] = {
352 }, 351 },
353 { 352 {
354 .name = "rx", 353 .name = "rx",
355 .start = OMAP_DMA_MCBSP3_RX, 354 .start = 11,
356 .flags = IORESOURCE_DMA, 355 .flags = IORESOURCE_DMA,
357 }, 356 },
358 { 357 {
359 .name = "tx", 358 .name = "tx",
360 .start = OMAP_DMA_MCBSP3_TX, 359 .start = 10,
361 .flags = IORESOURCE_DMA, 360 .flags = IORESOURCE_DMA,
362 }, 361 },
363 }, 362 },
diff --git a/arch/arm/mach-omap1/reset.c b/arch/arm/mach-omap1/reset.c
index 5eebd7e889d0..72bf4bf4a702 100644
--- a/arch/arm/mach-omap1/reset.c
+++ b/arch/arm/mach-omap1/reset.c
@@ -3,6 +3,7 @@
3 */ 3 */
4#include <linux/kernel.h> 4#include <linux/kernel.h>
5#include <linux/io.h> 5#include <linux/io.h>
6#include <linux/reboot.h>
6 7
7#include <mach/hardware.h> 8#include <mach/hardware.h>
8 9
@@ -22,7 +23,7 @@
22#define OMAP_EXTWARM_RST_SRC_ID_SHIFT 5 23#define OMAP_EXTWARM_RST_SRC_ID_SHIFT 5
23 24
24 25
25void omap1_restart(char mode, const char *cmd) 26void omap1_restart(enum reboot_mode mode, const char *cmd)
26{ 27{
27 /* 28 /*
28 * Workaround for 5912/1611b bug mentioned in sprz209d.pdf p. 28 29 * Workaround for 5912/1611b bug mentioned in sprz209d.pdf p. 28
diff --git a/arch/arm/mach-omap1/time.c b/arch/arm/mach-omap1/time.c
index 726ec23d29c7..80603d2fef77 100644
--- a/arch/arm/mach-omap1/time.c
+++ b/arch/arm/mach-omap1/time.c
@@ -43,9 +43,9 @@
43#include <linux/clocksource.h> 43#include <linux/clocksource.h>
44#include <linux/clockchips.h> 44#include <linux/clockchips.h>
45#include <linux/io.h> 45#include <linux/io.h>
46#include <linux/sched_clock.h>
46 47
47#include <asm/irq.h> 48#include <asm/irq.h>
48#include <asm/sched_clock.h>
49 49
50#include <mach/hardware.h> 50#include <mach/hardware.h>
51#include <asm/mach/irq.h> 51#include <asm/mach/irq.h>
diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig
index f49cd51e162a..3eed0006d189 100644
--- a/arch/arm/mach-omap2/Kconfig
+++ b/arch/arm/mach-omap2/Kconfig
@@ -1,61 +1,10 @@
1config ARCH_OMAP 1config ARCH_OMAP
2 bool 2 bool
3 3
4config ARCH_OMAP2PLUS
5 bool "TI OMAP2/3/4/5 SoCs with device tree support" if (ARCH_MULTI_V6 || ARCH_MULTI_V7)
6 select ARCH_HAS_CPUFREQ
7 select ARCH_HAS_HOLES_MEMORYMODEL
8 select ARCH_OMAP
9 select ARCH_REQUIRE_GPIOLIB
10 select CLKDEV_LOOKUP
11 select CLKSRC_MMIO
12 select GENERIC_CLOCKEVENTS
13 select GENERIC_IRQ_CHIP
14 select HAVE_CLK
15 select OMAP_DM_TIMER
16 select PINCTRL
17 select PROC_DEVICETREE if PROC_FS
18 select SOC_BUS
19 select SPARSE_IRQ
20 select USE_OF
21 help
22 Systems based on OMAP2, OMAP3, OMAP4 or OMAP5
23
24
25if ARCH_OMAP2PLUS
26
27menu "TI OMAP2/3/4 Specific Features"
28
29config ARCH_OMAP2PLUS_TYPICAL
30 bool "Typical OMAP configuration"
31 default y
32 select AEABI
33 select HIGHMEM
34 select I2C
35 select I2C_OMAP
36 select MENELAUS if ARCH_OMAP2
37 select NEON if ARCH_OMAP3 || ARCH_OMAP4 || SOC_OMAP5
38 select PM_RUNTIME
39 select REGULATOR
40 select TWL4030_CORE if ARCH_OMAP3 || ARCH_OMAP4
41 select TWL4030_POWER if ARCH_OMAP3 || ARCH_OMAP4
42 select VFP
43 help
44 Compile a kernel suitable for booting most boards
45
46config SOC_HAS_OMAP2_SDRC
47 bool "OMAP2 SDRAM Controller support"
48
49config SOC_HAS_REALTIME_COUNTER
50 bool "Real time free running counter"
51 depends on SOC_OMAP5
52 default y
53
54config ARCH_OMAP2 4config ARCH_OMAP2
55 bool "TI OMAP2" 5 bool "TI OMAP2"
56 depends on ARCH_OMAP2PLUS
57 depends on ARCH_MULTI_V6 6 depends on ARCH_MULTI_V6
58 default y 7 select ARCH_OMAP2PLUS
59 select CPU_V6 8 select CPU_V6
60 select MULTI_IRQ_HANDLER 9 select MULTI_IRQ_HANDLER
61 select SOC_HAS_OMAP2_SDRC 10 select SOC_HAS_OMAP2_SDRC
@@ -63,9 +12,8 @@ config ARCH_OMAP2
63 12
64config ARCH_OMAP3 13config ARCH_OMAP3
65 bool "TI OMAP3" 14 bool "TI OMAP3"
66 depends on ARCH_OMAP2PLUS
67 depends on ARCH_MULTI_V7 15 depends on ARCH_MULTI_V7
68 default y 16 select ARCH_OMAP2PLUS
69 select ARCH_HAS_OPP 17 select ARCH_HAS_OPP
70 select ARM_CPU_SUSPEND if PM 18 select ARM_CPU_SUSPEND if PM
71 select CPU_V7 19 select CPU_V7
@@ -79,9 +27,8 @@ config ARCH_OMAP3
79 27
80config ARCH_OMAP4 28config ARCH_OMAP4
81 bool "TI OMAP4" 29 bool "TI OMAP4"
82 default y
83 depends on ARCH_OMAP2PLUS
84 depends on ARCH_MULTI_V7 30 depends on ARCH_MULTI_V7
31 select ARCH_OMAP2PLUS
85 select ARCH_HAS_OPP 32 select ARCH_HAS_OPP
86 select ARCH_NEEDS_CPU_IDLE_COUPLED if SMP 33 select ARCH_NEEDS_CPU_IDLE_COUPLED if SMP
87 select ARM_CPU_SUSPEND if PM 34 select ARM_CPU_SUSPEND if PM
@@ -106,12 +53,87 @@ config ARCH_OMAP4
106config SOC_OMAP5 53config SOC_OMAP5
107 bool "TI OMAP5" 54 bool "TI OMAP5"
108 depends on ARCH_MULTI_V7 55 depends on ARCH_MULTI_V7
56 select ARCH_OMAP2PLUS
109 select ARM_CPU_SUSPEND if PM 57 select ARM_CPU_SUSPEND if PM
110 select ARM_GIC 58 select ARM_GIC
111 select CPU_V7 59 select CPU_V7
60 select HAVE_ARM_SCU if SMP
61 select HAVE_ARM_TWD if LOCAL_TIMERS
112 select HAVE_SMP 62 select HAVE_SMP
113 select COMMON_CLK 63 select COMMON_CLK
114 select HAVE_ARM_ARCH_TIMER 64 select HAVE_ARM_ARCH_TIMER
65 select ARM_ERRATA_798181 if SMP
66
67config SOC_AM33XX
68 bool "AM33XX support"
69 depends on ARCH_MULTI_V7
70 select ARCH_OMAP2PLUS
71 select ARM_CPU_SUSPEND if PM
72 select CPU_V7
73 select MULTI_IRQ_HANDLER
74 select COMMON_CLK
75
76config SOC_AM43XX
77 bool "TI AM43x"
78 depends on ARCH_MULTI_V7
79 select CPU_V7
80 select ARCH_OMAP2PLUS
81 select MULTI_IRQ_HANDLER
82 select ARM_GIC
83 select COMMON_CLK
84 select MACH_OMAP_GENERIC
85
86config ARCH_OMAP2PLUS
87 bool
88 select ARCH_HAS_BANDGAP
89 select ARCH_HAS_CPUFREQ
90 select ARCH_HAS_HOLES_MEMORYMODEL
91 select ARCH_OMAP
92 select ARCH_REQUIRE_GPIOLIB
93 select CLKDEV_LOOKUP
94 select CLKSRC_MMIO
95 select GENERIC_CLOCKEVENTS
96 select GENERIC_IRQ_CHIP
97 select HAVE_CLK
98 select OMAP_DM_TIMER
99 select PINCTRL
100 select PROC_DEVICETREE if PROC_FS
101 select SOC_BUS
102 select SPARSE_IRQ
103 select TI_PRIV_EDMA
104 select USE_OF
105 help
106 Systems based on OMAP2, OMAP3, OMAP4 or OMAP5
107
108
109if ARCH_OMAP2PLUS
110
111menu "TI OMAP2/3/4 Specific Features"
112
113config ARCH_OMAP2PLUS_TYPICAL
114 bool "Typical OMAP configuration"
115 default y
116 select AEABI
117 select HIGHMEM
118 select I2C
119 select I2C_OMAP
120 select MENELAUS if ARCH_OMAP2
121 select NEON if ARCH_OMAP3 || ARCH_OMAP4 || SOC_OMAP5
122 select PM_RUNTIME
123 select REGULATOR
124 select TWL4030_CORE if ARCH_OMAP3 || ARCH_OMAP4
125 select TWL4030_POWER if ARCH_OMAP3 || ARCH_OMAP4
126 select VFP
127 help
128 Compile a kernel suitable for booting most boards
129
130config SOC_HAS_OMAP2_SDRC
131 bool "OMAP2 SDRAM Controller support"
132
133config SOC_HAS_REALTIME_COUNTER
134 bool "Real time free running counter"
135 depends on SOC_OMAP5
136 default y
115 137
116comment "OMAP Core Type" 138comment "OMAP Core Type"
117 depends on ARCH_OMAP2 139 depends on ARCH_OMAP2
@@ -140,15 +162,6 @@ config SOC_TI81XX
140 depends on ARCH_OMAP3 162 depends on ARCH_OMAP3
141 default y 163 default y
142 164
143config SOC_AM33XX
144 bool "AM33XX support"
145 depends on ARCH_MULTI_V7
146 default y
147 select ARM_CPU_SUSPEND if PM
148 select CPU_V7
149 select MULTI_IRQ_HANDLER
150 select COMMON_CLK
151
152config OMAP_PACKAGE_ZAF 165config OMAP_PACKAGE_ZAF
153 bool 166 bool
154 167
@@ -167,12 +180,6 @@ config OMAP_PACKAGE_CUS
167config OMAP_PACKAGE_CBP 180config OMAP_PACKAGE_CBP
168 bool 181 bool
169 182
170config OMAP_PACKAGE_CBL
171 bool
172
173config OMAP_PACKAGE_CBS
174 bool
175
176comment "OMAP Board Type" 183comment "OMAP Board Type"
177 depends on ARCH_OMAP2PLUS 184 depends on ARCH_OMAP2PLUS
178 185
@@ -378,22 +385,6 @@ config MACH_TI8148EVM
378 depends on SOC_TI81XX 385 depends on SOC_TI81XX
379 default y 386 default y
380 387
381config MACH_OMAP_4430SDP
382 bool "OMAP 4430 SDP board"
383 default y
384 depends on ARCH_OMAP4
385 select OMAP_PACKAGE_CBL
386 select OMAP_PACKAGE_CBS
387 select REGULATOR_FIXED_VOLTAGE if REGULATOR
388
389config MACH_OMAP4_PANDA
390 bool "OMAP4 Panda Board"
391 default y
392 depends on ARCH_OMAP4
393 select OMAP_PACKAGE_CBL
394 select OMAP_PACKAGE_CBS
395 select REGULATOR_FIXED_VOLTAGE if REGULATOR
396
397config OMAP3_EMU 388config OMAP3_EMU
398 bool "OMAP3 debugging peripherals" 389 bool "OMAP3 debugging peripherals"
399 depends on ARCH_OMAP3 390 depends on ARCH_OMAP3
diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
index 55a9d6777683..d4f671547c37 100644
--- a/arch/arm/mach-omap2/Makefile
+++ b/arch/arm/mach-omap2/Makefile
@@ -22,6 +22,7 @@ obj-$(CONFIG_ARCH_OMAP3) += $(omap-2-3-common) $(hwmod-common) $(secure-common)
22obj-$(CONFIG_ARCH_OMAP4) += prm44xx.o $(hwmod-common) $(secure-common) 22obj-$(CONFIG_ARCH_OMAP4) += prm44xx.o $(hwmod-common) $(secure-common)
23obj-$(CONFIG_SOC_AM33XX) += irq.o $(hwmod-common) 23obj-$(CONFIG_SOC_AM33XX) += irq.o $(hwmod-common)
24obj-$(CONFIG_SOC_OMAP5) += prm44xx.o $(hwmod-common) $(secure-common) 24obj-$(CONFIG_SOC_OMAP5) += prm44xx.o $(hwmod-common) $(secure-common)
25obj-$(CONFIG_SOC_AM43XX) += $(hwmod-common) $(secure-common)
25 26
26ifneq ($(CONFIG_SND_OMAP_SOC_MCBSP),) 27ifneq ($(CONFIG_SND_OMAP_SOC_MCBSP),)
27obj-y += mcbsp.o 28obj-y += mcbsp.o
@@ -34,10 +35,10 @@ obj-$(CONFIG_SOC_HAS_OMAP2_SDRC) += sdrc.o
34 35
35smp-$(CONFIG_SMP) += omap-smp.o omap-headsmp.o 36smp-$(CONFIG_SMP) += omap-smp.o omap-headsmp.o
36smp-$(CONFIG_HOTPLUG_CPU) += omap-hotplug.o 37smp-$(CONFIG_HOTPLUG_CPU) += omap-hotplug.o
37omap-4-5-common = omap4-common.o omap-wakeupgen.o \ 38omap-4-5-common = omap4-common.o omap-wakeupgen.o
38 sleep44xx.o 39obj-$(CONFIG_ARCH_OMAP4) += $(omap-4-5-common) $(smp-y) sleep44xx.o
39obj-$(CONFIG_ARCH_OMAP4) += $(omap-4-5-common) $(smp-y) 40obj-$(CONFIG_SOC_OMAP5) += $(omap-4-5-common) $(smp-y) sleep44xx.o
40obj-$(CONFIG_SOC_OMAP5) += $(omap-4-5-common) $(smp-y) 41obj-$(CONFIG_SOC_AM43XX) += $(omap-4-5-common)
41 42
42plus_sec := $(call as-instr,.arch_extension sec,+sec) 43plus_sec := $(call as-instr,.arch_extension sec,+sec)
43AFLAGS_omap-headsmp.o :=-Wa,-march=armv7-a$(plus_sec) 44AFLAGS_omap-headsmp.o :=-Wa,-march=armv7-a$(plus_sec)
@@ -58,12 +59,13 @@ obj-$(CONFIG_SOC_OMAP2420) += omap2-restart.o
58obj-$(CONFIG_SOC_OMAP2430) += omap2-restart.o 59obj-$(CONFIG_SOC_OMAP2430) += omap2-restart.o
59obj-$(CONFIG_SOC_AM33XX) += am33xx-restart.o 60obj-$(CONFIG_SOC_AM33XX) += am33xx-restart.o
60obj-$(CONFIG_ARCH_OMAP3) += omap3-restart.o 61obj-$(CONFIG_ARCH_OMAP3) += omap3-restart.o
62obj-$(CONFIG_ARCH_OMAP4) += omap4-restart.o
63obj-$(CONFIG_SOC_OMAP5) += omap4-restart.o
61 64
62# Pin multiplexing 65# Pin multiplexing
63obj-$(CONFIG_SOC_OMAP2420) += mux2420.o 66obj-$(CONFIG_SOC_OMAP2420) += mux2420.o
64obj-$(CONFIG_SOC_OMAP2430) += mux2430.o 67obj-$(CONFIG_SOC_OMAP2430) += mux2430.o
65obj-$(CONFIG_ARCH_OMAP3) += mux34xx.o 68obj-$(CONFIG_ARCH_OMAP3) += mux34xx.o
66obj-$(CONFIG_ARCH_OMAP4) += mux44xx.o
67 69
68# SMS/SDRC 70# SMS/SDRC
69obj-$(CONFIG_ARCH_OMAP2) += sdrc2xxx.o 71obj-$(CONFIG_ARCH_OMAP2) += sdrc2xxx.o
@@ -93,10 +95,6 @@ obj-$(CONFIG_POWER_AVS_OMAP_CLASS3) += smartreflex-class3.o
93AFLAGS_sleep24xx.o :=-Wa,-march=armv6 95AFLAGS_sleep24xx.o :=-Wa,-march=armv6
94AFLAGS_sleep34xx.o :=-Wa,-march=armv7-a$(plus_sec) 96AFLAGS_sleep34xx.o :=-Wa,-march=armv7-a$(plus_sec)
95 97
96ifeq ($(CONFIG_PM_VERBOSE),y)
97CFLAGS_pm_bus.o += -DDEBUG
98endif
99
100endif 98endif
101 99
102ifeq ($(CONFIG_CPU_IDLE),y) 100ifeq ($(CONFIG_CPU_IDLE),y)
@@ -110,6 +108,7 @@ obj-$(CONFIG_ARCH_OMAP2) += prm2xxx_3xxx.o prm2xxx.o cm2xxx.o
110obj-$(CONFIG_ARCH_OMAP3) += prm2xxx_3xxx.o prm3xxx.o cm3xxx.o 108obj-$(CONFIG_ARCH_OMAP3) += prm2xxx_3xxx.o prm3xxx.o cm3xxx.o
111obj-$(CONFIG_ARCH_OMAP3) += vc3xxx_data.o vp3xxx_data.o 109obj-$(CONFIG_ARCH_OMAP3) += vc3xxx_data.o vp3xxx_data.o
112obj-$(CONFIG_SOC_AM33XX) += prm33xx.o cm33xx.o 110obj-$(CONFIG_SOC_AM33XX) += prm33xx.o cm33xx.o
111obj-$(CONFIG_SOC_AM43XX) += prm33xx.o cm33xx.o
113omap-prcm-4-5-common = cminst44xx.o cm44xx.o prm44xx.o \ 112omap-prcm-4-5-common = cminst44xx.o cm44xx.o prm44xx.o \
114 prcm_mpu44xx.o prminst44xx.o \ 113 prcm_mpu44xx.o prminst44xx.o \
115 vc44xx_data.o vp44xx_data.o 114 vc44xx_data.o vp44xx_data.o
@@ -125,8 +124,9 @@ obj-$(CONFIG_ARCH_OMAP3) += voltagedomains3xxx_data.o
125obj-$(CONFIG_ARCH_OMAP4) += $(voltagedomain-common) 124obj-$(CONFIG_ARCH_OMAP4) += $(voltagedomain-common)
126obj-$(CONFIG_ARCH_OMAP4) += voltagedomains44xx_data.o 125obj-$(CONFIG_ARCH_OMAP4) += voltagedomains44xx_data.o
127obj-$(CONFIG_SOC_AM33XX) += $(voltagedomain-common) 126obj-$(CONFIG_SOC_AM33XX) += $(voltagedomain-common)
128obj-$(CONFIG_SOC_AM33XX) += voltagedomains33xx_data.o 127obj-$(CONFIG_SOC_AM43XX) += $(voltagedomain-common)
129obj-$(CONFIG_SOC_OMAP5) += $(voltagedomain-common) 128obj-$(CONFIG_SOC_OMAP5) += $(voltagedomain-common)
129obj-$(CONFIG_SOC_OMAP5) += voltagedomains54xx_data.o
130 130
131# OMAP powerdomain framework 131# OMAP powerdomain framework
132powerdomain-common += powerdomain.o powerdomain-common.o 132powerdomain-common += powerdomain.o powerdomain-common.o
@@ -140,7 +140,9 @@ obj-$(CONFIG_ARCH_OMAP4) += $(powerdomain-common)
140obj-$(CONFIG_ARCH_OMAP4) += powerdomains44xx_data.o 140obj-$(CONFIG_ARCH_OMAP4) += powerdomains44xx_data.o
141obj-$(CONFIG_SOC_AM33XX) += $(powerdomain-common) 141obj-$(CONFIG_SOC_AM33XX) += $(powerdomain-common)
142obj-$(CONFIG_SOC_AM33XX) += powerdomains33xx_data.o 142obj-$(CONFIG_SOC_AM33XX) += powerdomains33xx_data.o
143obj-$(CONFIG_SOC_AM43XX) += $(powerdomain-common)
143obj-$(CONFIG_SOC_OMAP5) += $(powerdomain-common) 144obj-$(CONFIG_SOC_OMAP5) += $(powerdomain-common)
145obj-$(CONFIG_SOC_OMAP5) += powerdomains54xx_data.o
144 146
145# PRCM clockdomain control 147# PRCM clockdomain control
146clockdomain-common += clockdomain.o 148clockdomain-common += clockdomain.o
@@ -155,7 +157,9 @@ obj-$(CONFIG_ARCH_OMAP4) += $(clockdomain-common)
155obj-$(CONFIG_ARCH_OMAP4) += clockdomains44xx_data.o 157obj-$(CONFIG_ARCH_OMAP4) += clockdomains44xx_data.o
156obj-$(CONFIG_SOC_AM33XX) += $(clockdomain-common) 158obj-$(CONFIG_SOC_AM33XX) += $(clockdomain-common)
157obj-$(CONFIG_SOC_AM33XX) += clockdomains33xx_data.o 159obj-$(CONFIG_SOC_AM33XX) += clockdomains33xx_data.o
160obj-$(CONFIG_SOC_AM43XX) += $(clockdomain-common)
158obj-$(CONFIG_SOC_OMAP5) += $(clockdomain-common) 161obj-$(CONFIG_SOC_OMAP5) += $(clockdomain-common)
162obj-$(CONFIG_SOC_OMAP5) += clockdomains54xx_data.o
159 163
160# Clock framework 164# Clock framework
161obj-$(CONFIG_ARCH_OMAP2) += $(clock-common) clock2xxx.o 165obj-$(CONFIG_ARCH_OMAP2) += $(clock-common) clock2xxx.o
@@ -198,14 +202,12 @@ obj-$(CONFIG_ARCH_OMAP3) += omap_hwmod_2xxx_3xxx_interconnect_data.o
198obj-$(CONFIG_ARCH_OMAP3) += omap_hwmod_3xxx_data.o 202obj-$(CONFIG_ARCH_OMAP3) += omap_hwmod_3xxx_data.o
199obj-$(CONFIG_SOC_AM33XX) += omap_hwmod_33xx_data.o 203obj-$(CONFIG_SOC_AM33XX) += omap_hwmod_33xx_data.o
200obj-$(CONFIG_ARCH_OMAP4) += omap_hwmod_44xx_data.o 204obj-$(CONFIG_ARCH_OMAP4) += omap_hwmod_44xx_data.o
205obj-$(CONFIG_SOC_OMAP5) += omap_hwmod_54xx_data.o
201 206
202# EMU peripherals 207# EMU peripherals
203obj-$(CONFIG_OMAP3_EMU) += emu.o 208obj-$(CONFIG_OMAP3_EMU) += emu.o
204obj-$(CONFIG_HW_PERF_EVENTS) += pmu.o 209obj-$(CONFIG_HW_PERF_EVENTS) += pmu.o
205 210
206obj-$(CONFIG_OMAP_MBOX_FWK) += mailbox_mach.o
207mailbox_mach-objs := mailbox.o
208
209iommu-$(CONFIG_OMAP_IOMMU) := omap-iommu.o 211iommu-$(CONFIG_OMAP_IOMMU) := omap-iommu.o
210obj-y += $(iommu-m) $(iommu-y) 212obj-y += $(iommu-m) $(iommu-y)
211 213
@@ -251,8 +253,6 @@ obj-$(CONFIG_MACH_CM_T35) += board-cm-t35.o
251obj-$(CONFIG_MACH_CM_T3517) += board-cm-t3517.o 253obj-$(CONFIG_MACH_CM_T3517) += board-cm-t3517.o
252obj-$(CONFIG_MACH_IGEP0020) += board-igep0020.o 254obj-$(CONFIG_MACH_IGEP0020) += board-igep0020.o
253obj-$(CONFIG_MACH_TOUCHBOOK) += board-omap3touchbook.o 255obj-$(CONFIG_MACH_TOUCHBOOK) += board-omap3touchbook.o
254obj-$(CONFIG_MACH_OMAP_4430SDP) += board-4430sdp.o
255obj-$(CONFIG_MACH_OMAP4_PANDA) += board-omap4panda.o
256 256
257obj-$(CONFIG_MACH_OMAP3517EVM) += board-am3517evm.o 257obj-$(CONFIG_MACH_OMAP3517EVM) += board-am3517evm.o
258 258
diff --git a/arch/arm/mach-omap2/am33xx-restart.c b/arch/arm/mach-omap2/am33xx-restart.c
index 88e4fa8af031..1eae96212315 100644
--- a/arch/arm/mach-omap2/am33xx-restart.c
+++ b/arch/arm/mach-omap2/am33xx-restart.c
@@ -6,6 +6,7 @@
6 * published by the Free Software Foundation. 6 * published by the Free Software Foundation.
7 */ 7 */
8#include <linux/kernel.h> 8#include <linux/kernel.h>
9#include <linux/reboot.h>
9 10
10#include "common.h" 11#include "common.h"
11#include "prm-regbits-33xx.h" 12#include "prm-regbits-33xx.h"
@@ -19,7 +20,7 @@
19 * Resets the SoC. For @cmd, see the 'reboot' syscall in 20 * Resets the SoC. For @cmd, see the 'reboot' syscall in
20 * kernel/sys.c. No return value. 21 * kernel/sys.c. No return value.
21 */ 22 */
22void am33xx_restart(char mode, const char *cmd) 23void am33xx_restart(enum reboot_mode mode, const char *cmd)
23{ 24{
24 /* TODO: Handle mode and cmd if necessary */ 25 /* TODO: Handle mode and cmd if necessary */
25 26
diff --git a/arch/arm/mach-omap2/am33xx.h b/arch/arm/mach-omap2/am33xx.h
index 43296c1af9ee..5eef093e6738 100644
--- a/arch/arm/mach-omap2/am33xx.h
+++ b/arch/arm/mach-omap2/am33xx.h
@@ -21,6 +21,7 @@
21#define AM33XX_SCM_BASE 0x44E10000 21#define AM33XX_SCM_BASE 0x44E10000
22#define AM33XX_CTRL_BASE AM33XX_SCM_BASE 22#define AM33XX_CTRL_BASE AM33XX_SCM_BASE
23#define AM33XX_PRCM_BASE 0x44E00000 23#define AM33XX_PRCM_BASE 0x44E00000
24#define AM43XX_PRCM_BASE 0x44DF0000
24#define AM33XX_TAP_BASE (AM33XX_CTRL_BASE + 0x3FC) 25#define AM33XX_TAP_BASE (AM33XX_CTRL_BASE + 0x3FC)
25 26
26#endif /* __ASM_ARCH_AM33XX_H */ 27#endif /* __ASM_ARCH_AM33XX_H */
diff --git a/arch/arm/mach-omap2/board-4430sdp.c b/arch/arm/mach-omap2/board-4430sdp.c
deleted file mode 100644
index 56a9a4f855c7..000000000000
--- a/arch/arm/mach-omap2/board-4430sdp.c
+++ /dev/null
@@ -1,765 +0,0 @@
1/*
2 * Board support file for OMAP4430 SDP.
3 *
4 * Copyright (C) 2009 Texas Instruments
5 *
6 * Author: Santosh Shilimkar <santosh.shilimkar@ti.com>
7 *
8 * Based on mach-omap2/board-3430sdp.c
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License version 2 as
12 * published by the Free Software Foundation.
13 */
14
15#include <linux/kernel.h>
16#include <linux/init.h>
17#include <linux/platform_device.h>
18#include <linux/io.h>
19#include <linux/gpio.h>
20#include <linux/usb/otg.h>
21#include <linux/spi/spi.h>
22#include <linux/i2c/twl.h>
23#include <linux/mfd/twl6040.h>
24#include <linux/gpio_keys.h>
25#include <linux/regulator/machine.h>
26#include <linux/regulator/fixed.h>
27#include <linux/pwm.h>
28#include <linux/leds.h>
29#include <linux/leds_pwm.h>
30#include <linux/pwm_backlight.h>
31#include <linux/irqchip/arm-gic.h>
32#include <linux/platform_data/omap4-keypad.h>
33#include <linux/usb/musb.h>
34#include <linux/usb/phy.h>
35
36#include <asm/mach-types.h>
37#include <asm/mach/arch.h>
38#include <asm/mach/map.h>
39
40#include "common.h"
41#include "omap4-keypad.h"
42#include <linux/wl12xx.h>
43#include <linux/platform_data/omap-abe-twl6040.h>
44
45#include "soc.h"
46#include "mux.h"
47#include "mmc.h"
48#include "hsmmc.h"
49#include "control.h"
50#include "common-board-devices.h"
51#include "dss-common.h"
52
53#define ETH_KS8851_IRQ 34
54#define ETH_KS8851_POWER_ON 48
55#define ETH_KS8851_QUART 138
56#define OMAP4_SFH7741_SENSOR_OUTPUT_GPIO 184
57#define OMAP4_SFH7741_ENABLE_GPIO 188
58
59#define GPIO_WIFI_PMENA 54
60#define GPIO_WIFI_IRQ 53
61
62static const int sdp4430_keymap[] = {
63 KEY(0, 0, KEY_E),
64 KEY(0, 1, KEY_R),
65 KEY(0, 2, KEY_T),
66 KEY(0, 3, KEY_HOME),
67 KEY(0, 4, KEY_F5),
68 KEY(0, 5, KEY_UNKNOWN),
69 KEY(0, 6, KEY_I),
70 KEY(0, 7, KEY_LEFTSHIFT),
71
72 KEY(1, 0, KEY_D),
73 KEY(1, 1, KEY_F),
74 KEY(1, 2, KEY_G),
75 KEY(1, 3, KEY_SEND),
76 KEY(1, 4, KEY_F6),
77 KEY(1, 5, KEY_UNKNOWN),
78 KEY(1, 6, KEY_K),
79 KEY(1, 7, KEY_ENTER),
80
81 KEY(2, 0, KEY_X),
82 KEY(2, 1, KEY_C),
83 KEY(2, 2, KEY_V),
84 KEY(2, 3, KEY_END),
85 KEY(2, 4, KEY_F7),
86 KEY(2, 5, KEY_UNKNOWN),
87 KEY(2, 6, KEY_DOT),
88 KEY(2, 7, KEY_CAPSLOCK),
89
90 KEY(3, 0, KEY_Z),
91 KEY(3, 1, KEY_KPPLUS),
92 KEY(3, 2, KEY_B),
93 KEY(3, 3, KEY_F1),
94 KEY(3, 4, KEY_F8),
95 KEY(3, 5, KEY_UNKNOWN),
96 KEY(3, 6, KEY_O),
97 KEY(3, 7, KEY_SPACE),
98
99 KEY(4, 0, KEY_W),
100 KEY(4, 1, KEY_Y),
101 KEY(4, 2, KEY_U),
102 KEY(4, 3, KEY_F2),
103 KEY(4, 4, KEY_VOLUMEUP),
104 KEY(4, 5, KEY_UNKNOWN),
105 KEY(4, 6, KEY_L),
106 KEY(4, 7, KEY_LEFT),
107
108 KEY(5, 0, KEY_S),
109 KEY(5, 1, KEY_H),
110 KEY(5, 2, KEY_J),
111 KEY(5, 3, KEY_F3),
112 KEY(5, 4, KEY_F9),
113 KEY(5, 5, KEY_VOLUMEDOWN),
114 KEY(5, 6, KEY_M),
115 KEY(5, 7, KEY_RIGHT),
116
117 KEY(6, 0, KEY_Q),
118 KEY(6, 1, KEY_A),
119 KEY(6, 2, KEY_N),
120 KEY(6, 3, KEY_BACK),
121 KEY(6, 4, KEY_BACKSPACE),
122 KEY(6, 5, KEY_UNKNOWN),
123 KEY(6, 6, KEY_P),
124 KEY(6, 7, KEY_UP),
125
126 KEY(7, 0, KEY_PROG1),
127 KEY(7, 1, KEY_PROG2),
128 KEY(7, 2, KEY_PROG3),
129 KEY(7, 3, KEY_PROG4),
130 KEY(7, 4, KEY_F4),
131 KEY(7, 5, KEY_UNKNOWN),
132 KEY(7, 6, KEY_OK),
133 KEY(7, 7, KEY_DOWN),
134};
135static struct omap_device_pad keypad_pads[] = {
136 { .name = "kpd_col1.kpd_col1",
137 .enable = OMAP_WAKEUP_EN | OMAP_MUX_MODE1,
138 },
139 { .name = "kpd_col1.kpd_col1",
140 .enable = OMAP_WAKEUP_EN | OMAP_MUX_MODE1,
141 },
142 { .name = "kpd_col2.kpd_col2",
143 .enable = OMAP_WAKEUP_EN | OMAP_MUX_MODE1,
144 },
145 { .name = "kpd_col3.kpd_col3",
146 .enable = OMAP_WAKEUP_EN | OMAP_MUX_MODE1,
147 },
148 { .name = "kpd_col4.kpd_col4",
149 .enable = OMAP_WAKEUP_EN | OMAP_MUX_MODE1,
150 },
151 { .name = "kpd_col5.kpd_col5",
152 .enable = OMAP_WAKEUP_EN | OMAP_MUX_MODE1,
153 },
154 { .name = "gpmc_a23.kpd_col7",
155 .enable = OMAP_WAKEUP_EN | OMAP_MUX_MODE1,
156 },
157 { .name = "gpmc_a22.kpd_col6",
158 .enable = OMAP_WAKEUP_EN | OMAP_MUX_MODE1,
159 },
160 { .name = "kpd_row0.kpd_row0",
161 .enable = OMAP_PULL_ENA | OMAP_PULL_UP | OMAP_WAKEUP_EN |
162 OMAP_MUX_MODE1 | OMAP_INPUT_EN,
163 },
164 { .name = "kpd_row1.kpd_row1",
165 .enable = OMAP_PULL_ENA | OMAP_PULL_UP | OMAP_WAKEUP_EN |
166 OMAP_MUX_MODE1 | OMAP_INPUT_EN,
167 },
168 { .name = "kpd_row2.kpd_row2",
169 .enable = OMAP_PULL_ENA | OMAP_PULL_UP | OMAP_WAKEUP_EN |
170 OMAP_MUX_MODE1 | OMAP_INPUT_EN,
171 },
172 { .name = "kpd_row3.kpd_row3",
173 .enable = OMAP_PULL_ENA | OMAP_PULL_UP | OMAP_WAKEUP_EN |
174 OMAP_MUX_MODE1 | OMAP_INPUT_EN,
175 },
176 { .name = "kpd_row4.kpd_row4",
177 .enable = OMAP_PULL_ENA | OMAP_PULL_UP | OMAP_WAKEUP_EN |
178 OMAP_MUX_MODE1 | OMAP_INPUT_EN,
179 },
180 { .name = "kpd_row5.kpd_row5",
181 .enable = OMAP_PULL_ENA | OMAP_PULL_UP | OMAP_WAKEUP_EN |
182 OMAP_MUX_MODE1 | OMAP_INPUT_EN,
183 },
184 { .name = "gpmc_a18.kpd_row6",
185 .enable = OMAP_PULL_ENA | OMAP_PULL_UP | OMAP_WAKEUP_EN |
186 OMAP_MUX_MODE1 | OMAP_INPUT_EN,
187 },
188 { .name = "gpmc_a19.kpd_row7",
189 .enable = OMAP_PULL_ENA | OMAP_PULL_UP | OMAP_WAKEUP_EN |
190 OMAP_MUX_MODE1 | OMAP_INPUT_EN,
191 },
192};
193
194static struct matrix_keymap_data sdp4430_keymap_data = {
195 .keymap = sdp4430_keymap,
196 .keymap_size = ARRAY_SIZE(sdp4430_keymap),
197};
198
199static struct omap4_keypad_platform_data sdp4430_keypad_data = {
200 .keymap_data = &sdp4430_keymap_data,
201 .rows = 8,
202 .cols = 8,
203};
204
205static struct omap_board_data keypad_data = {
206 .id = 1,
207 .pads = keypad_pads,
208 .pads_cnt = ARRAY_SIZE(keypad_pads),
209};
210
211static struct gpio_led sdp4430_gpio_leds[] = {
212 {
213 .name = "omap4:green:debug0",
214 .gpio = 61,
215 },
216 {
217 .name = "omap4:green:debug1",
218 .gpio = 30,
219 },
220 {
221 .name = "omap4:green:debug2",
222 .gpio = 7,
223 },
224 {
225 .name = "omap4:green:debug3",
226 .gpio = 8,
227 },
228 {
229 .name = "omap4:green:debug4",
230 .gpio = 50,
231 },
232 {
233 .name = "omap4:blue:user",
234 .gpio = 169,
235 },
236 {
237 .name = "omap4:red:user",
238 .gpio = 170,
239 },
240 {
241 .name = "omap4:green:user",
242 .gpio = 139,
243 },
244
245};
246
247static struct gpio_keys_button sdp4430_gpio_keys[] = {
248 {
249 .desc = "Proximity Sensor",
250 .type = EV_SW,
251 .code = SW_FRONT_PROXIMITY,
252 .gpio = OMAP4_SFH7741_SENSOR_OUTPUT_GPIO,
253 .active_low = 0,
254 }
255};
256
257static struct gpio_led_platform_data sdp4430_led_data = {
258 .leds = sdp4430_gpio_leds,
259 .num_leds = ARRAY_SIZE(sdp4430_gpio_leds),
260};
261
262static struct pwm_lookup sdp4430_pwm_lookup[] = {
263 PWM_LOOKUP("twl-pwm", 0, "leds_pwm", "omap4::keypad"),
264 PWM_LOOKUP("twl-pwm", 1, "pwm-backlight", NULL),
265 PWM_LOOKUP("twl-pwmled", 0, "leds_pwm", "omap4:green:chrg"),
266};
267
268static struct led_pwm sdp4430_pwm_leds[] = {
269 {
270 .name = "omap4::keypad",
271 .max_brightness = 127,
272 .pwm_period_ns = 7812500,
273 },
274 {
275 .name = "omap4:green:chrg",
276 .max_brightness = 255,
277 .pwm_period_ns = 7812500,
278 },
279};
280
281static struct led_pwm_platform_data sdp4430_pwm_data = {
282 .num_leds = ARRAY_SIZE(sdp4430_pwm_leds),
283 .leds = sdp4430_pwm_leds,
284};
285
286static struct platform_device sdp4430_leds_pwm = {
287 .name = "leds_pwm",
288 .id = -1,
289 .dev = {
290 .platform_data = &sdp4430_pwm_data,
291 },
292};
293
294/* Dummy regulator for pwm-backlight driver */
295static struct regulator_consumer_supply backlight_supply =
296 REGULATOR_SUPPLY("enable", "pwm-backlight");
297
298static struct platform_pwm_backlight_data sdp4430_backlight_data = {
299 .max_brightness = 127,
300 .dft_brightness = 127,
301 .pwm_period_ns = 7812500,
302};
303
304static struct platform_device sdp4430_backlight_pwm = {
305 .name = "pwm-backlight",
306 .id = -1,
307 .dev = {
308 .platform_data = &sdp4430_backlight_data,
309 },
310};
311
312static int omap_prox_activate(struct device *dev)
313{
314 gpio_set_value(OMAP4_SFH7741_ENABLE_GPIO , 1);
315 return 0;
316}
317
318static void omap_prox_deactivate(struct device *dev)
319{
320 gpio_set_value(OMAP4_SFH7741_ENABLE_GPIO , 0);
321}
322
323static struct gpio_keys_platform_data sdp4430_gpio_keys_data = {
324 .buttons = sdp4430_gpio_keys,
325 .nbuttons = ARRAY_SIZE(sdp4430_gpio_keys),
326 .enable = omap_prox_activate,
327 .disable = omap_prox_deactivate,
328};
329
330static struct platform_device sdp4430_gpio_keys_device = {
331 .name = "gpio-keys",
332 .id = -1,
333 .dev = {
334 .platform_data = &sdp4430_gpio_keys_data,
335 },
336};
337
338static struct platform_device sdp4430_leds_gpio = {
339 .name = "leds-gpio",
340 .id = -1,
341 .dev = {
342 .platform_data = &sdp4430_led_data,
343 },
344};
345static struct spi_board_info sdp4430_spi_board_info[] __initdata = {
346 {
347 .modalias = "ks8851",
348 .bus_num = 1,
349 .chip_select = 0,
350 .max_speed_hz = 24000000,
351 /*
352 * .irq is set to gpio_to_irq(ETH_KS8851_IRQ)
353 * in omap_4430sdp_init
354 */
355 },
356};
357
358static struct gpio sdp4430_eth_gpios[] __initdata = {
359 { ETH_KS8851_POWER_ON, GPIOF_OUT_INIT_HIGH, "eth_power" },
360 { ETH_KS8851_QUART, GPIOF_OUT_INIT_HIGH, "quart" },
361 { ETH_KS8851_IRQ, GPIOF_IN, "eth_irq" },
362};
363
364static int __init omap_ethernet_init(void)
365{
366 int status;
367
368 /* Request of GPIO lines */
369 status = gpio_request_array(sdp4430_eth_gpios,
370 ARRAY_SIZE(sdp4430_eth_gpios));
371 if (status)
372 pr_err("Cannot request ETH GPIOs\n");
373
374 return status;
375}
376
377static struct regulator_consumer_supply sdp4430_vbat_supply[] = {
378 REGULATOR_SUPPLY("vddvibl", "twl6040-vibra"),
379 REGULATOR_SUPPLY("vddvibr", "twl6040-vibra"),
380};
381
382static struct regulator_init_data sdp4430_vbat_data = {
383 .constraints = {
384 .always_on = 1,
385 },
386 .num_consumer_supplies = ARRAY_SIZE(sdp4430_vbat_supply),
387 .consumer_supplies = sdp4430_vbat_supply,
388};
389
390static struct fixed_voltage_config sdp4430_vbat_pdata = {
391 .supply_name = "VBAT",
392 .microvolts = 3750000,
393 .init_data = &sdp4430_vbat_data,
394 .gpio = -EINVAL,
395};
396
397static struct platform_device sdp4430_vbat = {
398 .name = "reg-fixed-voltage",
399 .id = -1,
400 .dev = {
401 .platform_data = &sdp4430_vbat_pdata,
402 },
403};
404
405static struct platform_device sdp4430_dmic_codec = {
406 .name = "dmic-codec",
407 .id = -1,
408};
409
410static struct platform_device sdp4430_hdmi_audio_codec = {
411 .name = "hdmi-audio-codec",
412 .id = -1,
413};
414
415static struct omap_abe_twl6040_data sdp4430_abe_audio_data = {
416 .card_name = "SDP4430",
417 .has_hs = ABE_TWL6040_LEFT | ABE_TWL6040_RIGHT,
418 .has_hf = ABE_TWL6040_LEFT | ABE_TWL6040_RIGHT,
419 .has_ep = 1,
420 .has_aux = ABE_TWL6040_LEFT | ABE_TWL6040_RIGHT,
421 .has_vibra = ABE_TWL6040_LEFT | ABE_TWL6040_RIGHT,
422
423 .has_dmic = 1,
424 .has_hsmic = 1,
425 .has_mainmic = 1,
426 .has_submic = 1,
427 .has_afm = ABE_TWL6040_LEFT | ABE_TWL6040_RIGHT,
428
429 .jack_detection = 1,
430 /* MCLK input is 38.4MHz */
431 .mclk_freq = 38400000,
432};
433
434static struct platform_device sdp4430_abe_audio = {
435 .name = "omap-abe-twl6040",
436 .id = -1,
437 .dev = {
438 .platform_data = &sdp4430_abe_audio_data,
439 },
440};
441
442static struct platform_device *sdp4430_devices[] __initdata = {
443 &sdp4430_gpio_keys_device,
444 &sdp4430_leds_gpio,
445 &sdp4430_leds_pwm,
446 &sdp4430_backlight_pwm,
447 &sdp4430_vbat,
448 &sdp4430_dmic_codec,
449 &sdp4430_abe_audio,
450 &sdp4430_hdmi_audio_codec,
451};
452
453static struct omap_musb_board_data musb_board_data = {
454 .interface_type = MUSB_INTERFACE_UTMI,
455 .mode = MUSB_OTG,
456 .power = 100,
457};
458
459static struct omap2_hsmmc_info mmc[] = {
460 {
461 .mmc = 2,
462 .caps = MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA,
463 .gpio_cd = -EINVAL,
464 .gpio_wp = -EINVAL,
465 .nonremovable = true,
466 .ocr_mask = MMC_VDD_29_30,
467 .no_off_init = true,
468 },
469 {
470 .mmc = 1,
471 .caps = MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA,
472 .gpio_cd = -EINVAL,
473 .gpio_wp = -EINVAL,
474 },
475 {
476 .mmc = 5,
477 .caps = MMC_CAP_4_BIT_DATA | MMC_CAP_POWER_OFF_CARD,
478 .pm_caps = MMC_PM_KEEP_POWER,
479 .gpio_cd = -EINVAL,
480 .gpio_wp = -EINVAL,
481 .ocr_mask = MMC_VDD_165_195,
482 .nonremovable = true,
483 },
484 {} /* Terminator */
485};
486
487static struct regulator_consumer_supply sdp4430_vaux_supply[] = {
488 REGULATOR_SUPPLY("vmmc", "omap_hsmmc.1"),
489};
490
491static struct regulator_consumer_supply omap4_sdp4430_vmmc5_supply = {
492 .supply = "vmmc",
493 .dev_name = "omap_hsmmc.4",
494};
495
496static struct regulator_init_data sdp4430_vmmc5 = {
497 .constraints = {
498 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
499 },
500 .num_consumer_supplies = 1,
501 .consumer_supplies = &omap4_sdp4430_vmmc5_supply,
502};
503
504static struct fixed_voltage_config sdp4430_vwlan = {
505 .supply_name = "vwl1271",
506 .microvolts = 1800000, /* 1.8V */
507 .gpio = GPIO_WIFI_PMENA,
508 .startup_delay = 70000, /* 70msec */
509 .enable_high = 1,
510 .enabled_at_boot = 0,
511 .init_data = &sdp4430_vmmc5,
512};
513
514static struct platform_device omap_vwlan_device = {
515 .name = "reg-fixed-voltage",
516 .id = 1,
517 .dev = {
518 .platform_data = &sdp4430_vwlan,
519 },
520};
521
522static struct regulator_init_data sdp4430_vaux1 = {
523 .constraints = {
524 .min_uV = 1000000,
525 .max_uV = 3000000,
526 .apply_uV = true,
527 .valid_modes_mask = REGULATOR_MODE_NORMAL
528 | REGULATOR_MODE_STANDBY,
529 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE
530 | REGULATOR_CHANGE_MODE
531 | REGULATOR_CHANGE_STATUS,
532 },
533 .num_consumer_supplies = ARRAY_SIZE(sdp4430_vaux_supply),
534 .consumer_supplies = sdp4430_vaux_supply,
535};
536
537static struct regulator_init_data sdp4430_vusim = {
538 .constraints = {
539 .min_uV = 1200000,
540 .max_uV = 2900000,
541 .apply_uV = true,
542 .valid_modes_mask = REGULATOR_MODE_NORMAL
543 | REGULATOR_MODE_STANDBY,
544 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE
545 | REGULATOR_CHANGE_MODE
546 | REGULATOR_CHANGE_STATUS,
547 },
548};
549
550static struct twl6040_codec_data twl6040_codec = {
551 /* single-step ramp for headset and handsfree */
552 .hs_left_step = 0x0f,
553 .hs_right_step = 0x0f,
554 .hf_left_step = 0x1d,
555 .hf_right_step = 0x1d,
556};
557
558static struct twl6040_vibra_data twl6040_vibra = {
559 .vibldrv_res = 8,
560 .vibrdrv_res = 3,
561 .viblmotor_res = 10,
562 .vibrmotor_res = 10,
563 .vddvibl_uV = 0, /* fixed volt supply - VBAT */
564 .vddvibr_uV = 0, /* fixed volt supply - VBAT */
565};
566
567static struct twl6040_platform_data twl6040_data = {
568 .codec = &twl6040_codec,
569 .vibra = &twl6040_vibra,
570 .audpwron_gpio = 127,
571};
572
573static struct i2c_board_info __initdata sdp4430_i2c_1_boardinfo[] = {
574 {
575 I2C_BOARD_INFO("twl6040", 0x4b),
576 .irq = 119 + OMAP44XX_IRQ_GIC_START,
577 .platform_data = &twl6040_data,
578 },
579};
580
581static struct twl4030_platform_data sdp4430_twldata = {
582 /* Regulators */
583 .vusim = &sdp4430_vusim,
584 .vaux1 = &sdp4430_vaux1,
585};
586
587static struct i2c_board_info __initdata sdp4430_i2c_3_boardinfo[] = {
588 {
589 I2C_BOARD_INFO("tmp105", 0x48),
590 },
591 {
592 I2C_BOARD_INFO("bh1780", 0x29),
593 },
594};
595static struct i2c_board_info __initdata sdp4430_i2c_4_boardinfo[] = {
596 {
597 I2C_BOARD_INFO("hmc5843", 0x1e),
598 },
599};
600static int __init omap4_i2c_init(void)
601{
602 omap4_pmic_get_config(&sdp4430_twldata, TWL_COMMON_PDATA_USB,
603 TWL_COMMON_REGULATOR_VDAC |
604 TWL_COMMON_REGULATOR_VAUX2 |
605 TWL_COMMON_REGULATOR_VAUX3 |
606 TWL_COMMON_REGULATOR_VMMC |
607 TWL_COMMON_REGULATOR_VPP |
608 TWL_COMMON_REGULATOR_VANA |
609 TWL_COMMON_REGULATOR_VCXIO |
610 TWL_COMMON_REGULATOR_VUSB |
611 TWL_COMMON_REGULATOR_CLK32KG |
612 TWL_COMMON_REGULATOR_V1V8 |
613 TWL_COMMON_REGULATOR_V2V1);
614 omap4_pmic_init("twl6030", &sdp4430_twldata, sdp4430_i2c_1_boardinfo,
615 ARRAY_SIZE(sdp4430_i2c_1_boardinfo));
616 omap_register_i2c_bus(2, 400, NULL, 0);
617 omap_register_i2c_bus(3, 400, sdp4430_i2c_3_boardinfo,
618 ARRAY_SIZE(sdp4430_i2c_3_boardinfo));
619 omap_register_i2c_bus(4, 400, sdp4430_i2c_4_boardinfo,
620 ARRAY_SIZE(sdp4430_i2c_4_boardinfo));
621 return 0;
622}
623
624static void __init omap_sfh7741prox_init(void)
625{
626 int error;
627
628 error = gpio_request_one(OMAP4_SFH7741_ENABLE_GPIO,
629 GPIOF_OUT_INIT_LOW, "sfh7741");
630 if (error < 0)
631 pr_err("%s:failed to request GPIO %d, error %d\n",
632 __func__, OMAP4_SFH7741_ENABLE_GPIO, error);
633}
634
635#ifdef CONFIG_OMAP_MUX
636static struct omap_board_mux board_mux[] __initdata = {
637 OMAP4_MUX(USBB2_ULPITLL_CLK, OMAP_MUX_MODE4 | OMAP_PIN_OUTPUT),
638 /* NIRQ2 for twl6040 */
639 OMAP4_MUX(SYS_NIRQ2, OMAP_MUX_MODE0 |
640 OMAP_PIN_INPUT_PULLUP | OMAP_PIN_OFF_WAKEUPENABLE),
641 /* GPIO_127 for twl6040 */
642 OMAP4_MUX(HDQ_SIO, OMAP_MUX_MODE3 | OMAP_PIN_OUTPUT),
643 /* McPDM */
644 OMAP4_MUX(ABE_PDM_UL_DATA, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLDOWN),
645 OMAP4_MUX(ABE_PDM_DL_DATA, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLDOWN),
646 OMAP4_MUX(ABE_PDM_FRAME, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP),
647 OMAP4_MUX(ABE_PDM_LB_CLK, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLDOWN),
648 OMAP4_MUX(ABE_CLKS, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLDOWN),
649 /* DMIC */
650 OMAP4_MUX(ABE_DMIC_CLK1, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
651 OMAP4_MUX(ABE_DMIC_DIN1, OMAP_MUX_MODE0 | OMAP_PIN_INPUT),
652 OMAP4_MUX(ABE_DMIC_DIN2, OMAP_MUX_MODE0 | OMAP_PIN_INPUT),
653 OMAP4_MUX(ABE_DMIC_DIN3, OMAP_MUX_MODE0 | OMAP_PIN_INPUT),
654 /* McBSP1 */
655 OMAP4_MUX(ABE_MCBSP1_CLKX, OMAP_MUX_MODE0 | OMAP_PIN_INPUT),
656 OMAP4_MUX(ABE_MCBSP1_DR, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLDOWN),
657 OMAP4_MUX(ABE_MCBSP1_DX, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT |
658 OMAP_PULL_ENA),
659 OMAP4_MUX(ABE_MCBSP1_FSX, OMAP_MUX_MODE0 | OMAP_PIN_INPUT),
660 /* McBSP2 */
661 OMAP4_MUX(ABE_MCBSP2_CLKX, OMAP_MUX_MODE0 | OMAP_PIN_INPUT),
662 OMAP4_MUX(ABE_MCBSP2_DR, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLDOWN),
663 OMAP4_MUX(ABE_MCBSP2_DX, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT |
664 OMAP_PULL_ENA),
665 OMAP4_MUX(ABE_MCBSP2_FSX, OMAP_MUX_MODE0 | OMAP_PIN_INPUT),
666
667 { .reg_offset = OMAP_MUX_TERMINATOR },
668};
669
670#else
671#define board_mux NULL
672 #endif
673
674static void __init omap4_sdp4430_wifi_mux_init(void)
675{
676 omap_mux_init_gpio(GPIO_WIFI_IRQ, OMAP_PIN_INPUT |
677 OMAP_PIN_OFF_WAKEUPENABLE);
678 omap_mux_init_gpio(GPIO_WIFI_PMENA, OMAP_PIN_OUTPUT);
679
680 omap_mux_init_signal("sdmmc5_cmd.sdmmc5_cmd",
681 OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP);
682 omap_mux_init_signal("sdmmc5_clk.sdmmc5_clk",
683 OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP);
684 omap_mux_init_signal("sdmmc5_dat0.sdmmc5_dat0",
685 OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP);
686 omap_mux_init_signal("sdmmc5_dat1.sdmmc5_dat1",
687 OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP);
688 omap_mux_init_signal("sdmmc5_dat2.sdmmc5_dat2",
689 OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP);
690 omap_mux_init_signal("sdmmc5_dat3.sdmmc5_dat3",
691 OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP);
692
693}
694
695static struct wl12xx_platform_data omap4_sdp4430_wlan_data __initdata = {
696 .board_ref_clock = WL12XX_REFCLOCK_26,
697 .board_tcxo_clock = WL12XX_TCXOCLOCK_26,
698};
699
700static void __init omap4_sdp4430_wifi_init(void)
701{
702 int ret;
703
704 omap4_sdp4430_wifi_mux_init();
705 omap4_sdp4430_wlan_data.irq = gpio_to_irq(GPIO_WIFI_IRQ);
706 ret = wl12xx_set_platform_data(&omap4_sdp4430_wlan_data);
707 if (ret)
708 pr_err("Error setting wl12xx data: %d\n", ret);
709 ret = platform_device_register(&omap_vwlan_device);
710 if (ret)
711 pr_err("Error registering wl12xx device: %d\n", ret);
712}
713
714static void __init omap_4430sdp_init(void)
715{
716 int status;
717 int package = OMAP_PACKAGE_CBS;
718
719 if (omap_rev() == OMAP4430_REV_ES1_0)
720 package = OMAP_PACKAGE_CBL;
721 omap4_mux_init(board_mux, NULL, package);
722
723 omap4_i2c_init();
724 omap_sfh7741prox_init();
725 regulator_register_always_on(0, "backlight-enable",
726 &backlight_supply, 1, 0);
727 platform_add_devices(sdp4430_devices, ARRAY_SIZE(sdp4430_devices));
728 omap_serial_init();
729 omap_sdrc_init(NULL, NULL);
730 omap4_sdp4430_wifi_init();
731 omap4_twl6030_hsmmc_init(mmc);
732
733 usb_bind_phy("musb-hdrc.2.auto", 0, "omap-usb2.3.auto");
734 usb_musb_init(&musb_board_data);
735
736 status = omap_ethernet_init();
737 if (status) {
738 pr_err("Ethernet initialization failed: %d\n", status);
739 } else {
740 sdp4430_spi_board_info[0].irq = gpio_to_irq(ETH_KS8851_IRQ);
741 spi_register_board_info(sdp4430_spi_board_info,
742 ARRAY_SIZE(sdp4430_spi_board_info));
743 }
744
745 pwm_add_table(sdp4430_pwm_lookup, ARRAY_SIZE(sdp4430_pwm_lookup));
746 status = omap4_keyboard_init(&sdp4430_keypad_data, &keypad_data);
747 if (status)
748 pr_err("Keypad initialization failed: %d\n", status);
749
750 omap_4430sdp_display_init();
751}
752
753MACHINE_START(OMAP_4430SDP, "OMAP4430 4430SDP board")
754 /* Maintainer: Santosh Shilimkar - Texas Instruments Inc */
755 .atag_offset = 0x100,
756 .smp = smp_ops(omap4_smp_ops),
757 .reserve = omap_reserve,
758 .map_io = omap4_map_io,
759 .init_early = omap4430_init_early,
760 .init_irq = gic_init_irq,
761 .init_machine = omap_4430sdp_init,
762 .init_late = omap4430_init_late,
763 .init_time = omap4_local_timer_init,
764 .restart = omap44xx_restart,
765MACHINE_END
diff --git a/arch/arm/mach-omap2/board-cm-t35.c b/arch/arm/mach-omap2/board-cm-t35.c
index ee6218c74807..d4622ed26252 100644
--- a/arch/arm/mach-omap2/board-cm-t35.c
+++ b/arch/arm/mach-omap2/board-cm-t35.c
@@ -293,7 +293,8 @@ static struct regulator_consumer_supply cm_t35_vsim_supply[] = {
293static struct regulator_consumer_supply cm_t35_vio_supplies[] = { 293static struct regulator_consumer_supply cm_t35_vio_supplies[] = {
294 REGULATOR_SUPPLY("vcc", "spi1.0"), 294 REGULATOR_SUPPLY("vcc", "spi1.0"),
295 REGULATOR_SUPPLY("vdds_dsi", "omapdss"), 295 REGULATOR_SUPPLY("vdds_dsi", "omapdss"),
296 REGULATOR_SUPPLY("vdds_dsi", "omapdss_dsi1"), 296 REGULATOR_SUPPLY("vdds_dsi", "omapdss_dpi.0"),
297 REGULATOR_SUPPLY("vdds_dsi", "omapdss_dsi.0"),
297}; 298};
298 299
299/* VMMC1 for MMC1 pins CMD, CLK, DAT0..DAT3 (20 mA, plus card == max 220 mA) */ 300/* VMMC1 for MMC1 pins CMD, CLK, DAT0..DAT3 (20 mA, plus card == max 220 mA) */
diff --git a/arch/arm/mach-omap2/board-devkit8000.c b/arch/arm/mach-omap2/board-devkit8000.c
index 576420544178..f1d91ba5d1ac 100644
--- a/arch/arm/mach-omap2/board-devkit8000.c
+++ b/arch/arm/mach-omap2/board-devkit8000.c
@@ -222,6 +222,7 @@ static struct twl4030_gpio_platform_data devkit8000_gpio_data = {
222 222
223static struct regulator_consumer_supply devkit8000_vpll1_supplies[] = { 223static struct regulator_consumer_supply devkit8000_vpll1_supplies[] = {
224 REGULATOR_SUPPLY("vdds_dsi", "omapdss"), 224 REGULATOR_SUPPLY("vdds_dsi", "omapdss"),
225 REGULATOR_SUPPLY("vdds_dsi", "omapdss_dpi.0"),
225 REGULATOR_SUPPLY("vdds_dsi", "omapdss_dsi.0"), 226 REGULATOR_SUPPLY("vdds_dsi", "omapdss_dsi.0"),
226}; 227};
227 228
diff --git a/arch/arm/mach-omap2/board-flash.c b/arch/arm/mach-omap2/board-flash.c
index c33adea0247c..fc20a61f6b2a 100644
--- a/arch/arm/mach-omap2/board-flash.c
+++ b/arch/arm/mach-omap2/board-flash.c
@@ -112,6 +112,9 @@ struct gpmc_timings nand_default_timings[1] = {
112 .cs_rd_off = 36, 112 .cs_rd_off = 36,
113 .cs_wr_off = 36, 113 .cs_wr_off = 36,
114 114
115 .we_on = 6,
116 .oe_on = 6,
117
115 .adv_on = 6, 118 .adv_on = 6,
116 .adv_rd_off = 24, 119 .adv_rd_off = 24,
117 .adv_wr_off = 36, 120 .adv_wr_off = 36,
diff --git a/arch/arm/mach-omap2/board-generic.c b/arch/arm/mach-omap2/board-generic.c
index 88aa6b1835c3..be5d005ebad2 100644
--- a/arch/arm/mach-omap2/board-generic.c
+++ b/arch/arm/mach-omap2/board-generic.c
@@ -15,6 +15,7 @@
15#include <linux/of_irq.h> 15#include <linux/of_irq.h>
16#include <linux/of_platform.h> 16#include <linux/of_platform.h>
17#include <linux/irqdomain.h> 17#include <linux/irqdomain.h>
18#include <linux/clk.h>
18 19
19#include <asm/mach/arch.h> 20#include <asm/mach/arch.h>
20 21
@@ -35,6 +36,21 @@ static struct of_device_id omap_dt_match_table[] __initdata = {
35 { } 36 { }
36}; 37};
37 38
39/*
40 * Create alias for USB host PHY clock.
41 * Remove this when clock phandle can be provided via DT
42 */
43static void __init legacy_init_ehci_clk(char *clkname)
44{
45 int ret;
46
47 ret = clk_add_alias("main_clk", NULL, clkname, NULL);
48 if (ret) {
49 pr_err("%s:Failed to add main_clk alias to %s :%d\n",
50 __func__, clkname, ret);
51 }
52}
53
38static void __init omap_generic_init(void) 54static void __init omap_generic_init(void)
39{ 55{
40 omap_sdrc_init(NULL, NULL); 56 omap_sdrc_init(NULL, NULL);
@@ -45,10 +61,15 @@ static void __init omap_generic_init(void)
45 * HACK: call display setup code for selected boards to enable omapdss. 61 * HACK: call display setup code for selected boards to enable omapdss.
46 * This will be removed when omapdss supports DT. 62 * This will be removed when omapdss supports DT.
47 */ 63 */
48 if (of_machine_is_compatible("ti,omap4-panda")) 64 if (of_machine_is_compatible("ti,omap4-panda")) {
49 omap4_panda_display_init_of(); 65 omap4_panda_display_init_of();
66 legacy_init_ehci_clk("auxclk3_ck");
67
68 }
50 else if (of_machine_is_compatible("ti,omap4-sdp")) 69 else if (of_machine_is_compatible("ti,omap4-sdp"))
51 omap_4430sdp_display_init_of(); 70 omap_4430sdp_display_init_of();
71 else if (of_machine_is_compatible("ti,omap5-uevm"))
72 legacy_init_ehci_clk("auxclk1_ck");
52} 73}
53 74
54#ifdef CONFIG_SOC_OMAP2420 75#ifdef CONFIG_SOC_OMAP2420
@@ -185,3 +206,19 @@ DT_MACHINE_START(OMAP5_DT, "Generic OMAP5 (Flattened Device Tree)")
185 .restart = omap44xx_restart, 206 .restart = omap44xx_restart,
186MACHINE_END 207MACHINE_END
187#endif 208#endif
209
210#ifdef CONFIG_SOC_AM43XX
211static const char *am43_boards_compat[] __initdata = {
212 "ti,am43",
213 NULL,
214};
215
216DT_MACHINE_START(AM43_DT, "Generic AM43 (Flattened Device Tree)")
217 .map_io = am33xx_map_io,
218 .init_early = am43xx_init_early,
219 .init_irq = omap_gic_of_init,
220 .init_machine = omap_generic_init,
221 .init_time = omap3_sync32k_timer_init,
222 .dt_compat = am43_boards_compat,
223MACHINE_END
224#endif
diff --git a/arch/arm/mach-omap2/board-igep0020.c b/arch/arm/mach-omap2/board-igep0020.c
index b54562d1235e..87e65dde8e13 100644
--- a/arch/arm/mach-omap2/board-igep0020.c
+++ b/arch/arm/mach-omap2/board-igep0020.c
@@ -553,6 +553,37 @@ static struct usbhs_omap_platform_data igep3_usbhs_bdata __initdata = {
553 553
554#ifdef CONFIG_OMAP_MUX 554#ifdef CONFIG_OMAP_MUX
555static struct omap_board_mux board_mux[] __initdata = { 555static struct omap_board_mux board_mux[] __initdata = {
556 /* Display Sub System */
557 OMAP3_MUX(DSS_PCLK, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
558 OMAP3_MUX(DSS_HSYNC, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
559 OMAP3_MUX(DSS_VSYNC, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
560 OMAP3_MUX(DSS_ACBIAS, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
561 OMAP3_MUX(DSS_DATA0, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
562 OMAP3_MUX(DSS_DATA1, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
563 OMAP3_MUX(DSS_DATA2, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
564 OMAP3_MUX(DSS_DATA3, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
565 OMAP3_MUX(DSS_DATA4, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
566 OMAP3_MUX(DSS_DATA5, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
567 OMAP3_MUX(DSS_DATA6, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
568 OMAP3_MUX(DSS_DATA7, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
569 OMAP3_MUX(DSS_DATA8, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
570 OMAP3_MUX(DSS_DATA9, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
571 OMAP3_MUX(DSS_DATA10, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
572 OMAP3_MUX(DSS_DATA11, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
573 OMAP3_MUX(DSS_DATA12, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
574 OMAP3_MUX(DSS_DATA13, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
575 OMAP3_MUX(DSS_DATA14, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
576 OMAP3_MUX(DSS_DATA15, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
577 OMAP3_MUX(DSS_DATA16, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
578 OMAP3_MUX(DSS_DATA17, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
579 OMAP3_MUX(DSS_DATA18, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
580 OMAP3_MUX(DSS_DATA19, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
581 OMAP3_MUX(DSS_DATA20, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
582 OMAP3_MUX(DSS_DATA21, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
583 OMAP3_MUX(DSS_DATA22, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
584 OMAP3_MUX(DSS_DATA23, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
585 /* TFP410 PanelBus DVI Transmitte (GPIO_170) */
586 OMAP3_MUX(HDQ_SIO, OMAP_MUX_MODE4 | OMAP_PIN_OUTPUT),
556 /* SMSC9221 LAN Controller ETH IRQ (GPIO_176) */ 587 /* SMSC9221 LAN Controller ETH IRQ (GPIO_176) */
557 OMAP3_MUX(MCSPI1_CS2, OMAP_MUX_MODE4 | OMAP_PIN_INPUT), 588 OMAP3_MUX(MCSPI1_CS2, OMAP_MUX_MODE4 | OMAP_PIN_INPUT),
558 { .reg_offset = OMAP_MUX_TERMINATOR }, 589 { .reg_offset = OMAP_MUX_TERMINATOR },
diff --git a/arch/arm/mach-omap2/board-ldp.c b/arch/arm/mach-omap2/board-ldp.c
index d0d17bc58d9b..62e4f701b63b 100644
--- a/arch/arm/mach-omap2/board-ldp.c
+++ b/arch/arm/mach-omap2/board-ldp.c
@@ -272,7 +272,8 @@ static struct regulator_init_data ldp_vaux1 = {
272 272
273static struct regulator_consumer_supply ldp_vpll2_supplies[] = { 273static struct regulator_consumer_supply ldp_vpll2_supplies[] = {
274 REGULATOR_SUPPLY("vdds_dsi", "omapdss"), 274 REGULATOR_SUPPLY("vdds_dsi", "omapdss"),
275 REGULATOR_SUPPLY("vdds_dsi", "omapdss_dsi1"), 275 REGULATOR_SUPPLY("vdds_dsi", "omapdss_dpi.0"),
276 REGULATOR_SUPPLY("vdds_dsi", "omapdss_dsi.0"),
276}; 277};
277 278
278static struct regulator_init_data ldp_vpll2 = { 279static struct regulator_init_data ldp_vpll2 = {
diff --git a/arch/arm/mach-omap2/board-omap3evm.c b/arch/arm/mach-omap2/board-omap3evm.c
index f76d0de7b406..8c026269baca 100644
--- a/arch/arm/mach-omap2/board-omap3evm.c
+++ b/arch/arm/mach-omap2/board-omap3evm.c
@@ -174,6 +174,7 @@ static struct panel_sharp_ls037v7dw01_data omap3_evm_lcd_data = {
174 .ud_gpio = OMAP3EVM_LCD_PANEL_UD, 174 .ud_gpio = OMAP3EVM_LCD_PANEL_UD,
175}; 175};
176 176
177#ifdef CONFIG_BROKEN
177static void __init omap3_evm_display_init(void) 178static void __init omap3_evm_display_init(void)
178{ 179{
179 int r; 180 int r;
@@ -193,6 +194,7 @@ static void __init omap3_evm_display_init(void)
193 else 194 else
194 gpio_set_value_cansleep(OMAP3EVM_LCD_PANEL_BKLIGHT_GPIO, 1); 195 gpio_set_value_cansleep(OMAP3EVM_LCD_PANEL_BKLIGHT_GPIO, 1);
195} 196}
197#endif
196 198
197static struct omap_dss_device omap3_evm_lcd_device = { 199static struct omap_dss_device omap3_evm_lcd_device = {
198 .name = "lcd", 200 .name = "lcd",
@@ -715,7 +717,9 @@ static void __init omap3_evm_init(void)
715 717
716 omap_ads7846_init(1, OMAP3_EVM_TS_GPIO, 310, NULL); 718 omap_ads7846_init(1, OMAP3_EVM_TS_GPIO, 310, NULL);
717 omap3evm_init_smsc911x(); 719 omap3evm_init_smsc911x();
720#ifdef CONFIG_BROKEN
718 omap3_evm_display_init(); 721 omap3_evm_display_init();
722#endif
719 omap3_evm_wl12xx_init(); 723 omap3_evm_wl12xx_init();
720 omap_twl4030_audio_init("omap3evm", NULL); 724 omap_twl4030_audio_init("omap3evm", NULL);
721} 725}
diff --git a/arch/arm/mach-omap2/board-omap3pandora.c b/arch/arm/mach-omap2/board-omap3pandora.c
index 28133d5b4fed..b1547a0edfcd 100644
--- a/arch/arm/mach-omap2/board-omap3pandora.c
+++ b/arch/arm/mach-omap2/board-omap3pandora.c
@@ -343,6 +343,7 @@ static struct regulator_consumer_supply pandora_vmmc3_supply[] = {
343static struct regulator_consumer_supply pandora_vdds_supplies[] = { 343static struct regulator_consumer_supply pandora_vdds_supplies[] = {
344 REGULATOR_SUPPLY("vdds_sdi", "omapdss"), 344 REGULATOR_SUPPLY("vdds_sdi", "omapdss"),
345 REGULATOR_SUPPLY("vdds_dsi", "omapdss"), 345 REGULATOR_SUPPLY("vdds_dsi", "omapdss"),
346 REGULATOR_SUPPLY("vdds_dsi", "omapdss_dpi.0"),
346 REGULATOR_SUPPLY("vdds_dsi", "omapdss_dsi.0"), 347 REGULATOR_SUPPLY("vdds_dsi", "omapdss_dsi.0"),
347}; 348};
348 349
diff --git a/arch/arm/mach-omap2/board-omap4panda.c b/arch/arm/mach-omap2/board-omap4panda.c
deleted file mode 100644
index 1e2c75eee912..000000000000
--- a/arch/arm/mach-omap2/board-omap4panda.c
+++ /dev/null
@@ -1,455 +0,0 @@
1/*
2 * Board support file for OMAP4430 based PandaBoard.
3 *
4 * Copyright (C) 2010 Texas Instruments
5 *
6 * Author: David Anders <x0132446@ti.com>
7 *
8 * Based on mach-omap2/board-4430sdp.c
9 *
10 * Author: Santosh Shilimkar <santosh.shilimkar@ti.com>
11 *
12 * Based on mach-omap2/board-3430sdp.c
13 *
14 * This program is free software; you can redistribute it and/or modify
15 * it under the terms of the GNU General Public License version 2 as
16 * published by the Free Software Foundation.
17 */
18
19#include <linux/kernel.h>
20#include <linux/init.h>
21#include <linux/platform_device.h>
22#include <linux/clk.h>
23#include <linux/io.h>
24#include <linux/leds.h>
25#include <linux/gpio.h>
26#include <linux/usb/otg.h>
27#include <linux/i2c/twl.h>
28#include <linux/mfd/twl6040.h>
29#include <linux/regulator/machine.h>
30#include <linux/regulator/fixed.h>
31#include <linux/ti_wilink_st.h>
32#include <linux/usb/musb.h>
33#include <linux/usb/phy.h>
34#include <linux/usb/nop-usb-xceiv.h>
35#include <linux/wl12xx.h>
36#include <linux/irqchip/arm-gic.h>
37#include <linux/platform_data/omap-abe-twl6040.h>
38
39#include <asm/mach-types.h>
40#include <asm/mach/arch.h>
41#include <asm/mach/map.h>
42
43#include "common.h"
44#include "soc.h"
45#include "mmc.h"
46#include "hsmmc.h"
47#include "control.h"
48#include "mux.h"
49#include "common-board-devices.h"
50#include "dss-common.h"
51
52#define GPIO_HUB_POWER 1
53#define GPIO_HUB_NRESET 62
54#define GPIO_WIFI_PMENA 43
55#define GPIO_WIFI_IRQ 53
56
57/* wl127x BT, FM, GPS connectivity chip */
58static struct ti_st_plat_data wilink_platform_data = {
59 .nshutdown_gpio = 46,
60 .dev_name = "/dev/ttyO1",
61 .flow_cntrl = 1,
62 .baud_rate = 3000000,
63 .chip_enable = NULL,
64 .suspend = NULL,
65 .resume = NULL,
66};
67
68static struct platform_device wl1271_device = {
69 .name = "kim",
70 .id = -1,
71 .dev = {
72 .platform_data = &wilink_platform_data,
73 },
74};
75
76static struct gpio_led gpio_leds[] = {
77 {
78 .name = "pandaboard::status1",
79 .default_trigger = "heartbeat",
80 .gpio = 7,
81 },
82 {
83 .name = "pandaboard::status2",
84 .default_trigger = "mmc0",
85 .gpio = 8,
86 },
87};
88
89static struct gpio_led_platform_data gpio_led_info = {
90 .leds = gpio_leds,
91 .num_leds = ARRAY_SIZE(gpio_leds),
92};
93
94static struct platform_device leds_gpio = {
95 .name = "leds-gpio",
96 .id = -1,
97 .dev = {
98 .platform_data = &gpio_led_info,
99 },
100};
101
102static struct omap_abe_twl6040_data panda_abe_audio_data = {
103 /* Audio out */
104 .has_hs = ABE_TWL6040_LEFT | ABE_TWL6040_RIGHT,
105 /* HandsFree through expansion connector */
106 .has_hf = ABE_TWL6040_LEFT | ABE_TWL6040_RIGHT,
107 /* PandaBoard: FM TX, PandaBoardES: can be connected to audio out */
108 .has_aux = ABE_TWL6040_LEFT | ABE_TWL6040_RIGHT,
109 /* PandaBoard: FM RX, PandaBoardES: audio in */
110 .has_afm = ABE_TWL6040_LEFT | ABE_TWL6040_RIGHT,
111 /* No jack detection. */
112 .jack_detection = 0,
113 /* MCLK input is 38.4MHz */
114 .mclk_freq = 38400000,
115
116};
117
118static struct platform_device panda_abe_audio = {
119 .name = "omap-abe-twl6040",
120 .id = -1,
121 .dev = {
122 .platform_data = &panda_abe_audio_data,
123 },
124};
125
126static struct platform_device panda_hdmi_audio_codec = {
127 .name = "hdmi-audio-codec",
128 .id = -1,
129};
130
131static struct platform_device btwilink_device = {
132 .name = "btwilink",
133 .id = -1,
134};
135
136/* PHY device on HS USB Port 1 i.e. nop_usb_xceiv.1 */
137static struct nop_usb_xceiv_platform_data hsusb1_phy_data = {
138 /* FREF_CLK3 provides the 19.2 MHz reference clock to the PHY */
139 .clk_rate = 19200000,
140};
141
142static struct usbhs_phy_data phy_data[] __initdata = {
143 {
144 .port = 1,
145 .reset_gpio = GPIO_HUB_NRESET,
146 .vcc_gpio = GPIO_HUB_POWER,
147 .vcc_polarity = 1,
148 .platform_data = &hsusb1_phy_data,
149 },
150};
151
152static struct platform_device *panda_devices[] __initdata = {
153 &leds_gpio,
154 &wl1271_device,
155 &panda_abe_audio,
156 &panda_hdmi_audio_codec,
157 &btwilink_device,
158};
159
160static struct usbhs_omap_platform_data usbhs_bdata __initdata = {
161 .port_mode[0] = OMAP_EHCI_PORT_MODE_PHY,
162};
163
164static void __init omap4_ehci_init(void)
165{
166 int ret;
167
168 /* FREF_CLK3 provides the 19.2 MHz reference clock to the PHY */
169 ret = clk_add_alias("main_clk", "nop_usb_xceiv.1", "auxclk3_ck", NULL);
170 if (ret)
171 pr_err("Failed to add main_clk alias to auxclk3_ck\n");
172
173 usbhs_init_phys(phy_data, ARRAY_SIZE(phy_data));
174 usbhs_init(&usbhs_bdata);
175}
176
177static struct omap_musb_board_data musb_board_data = {
178 .interface_type = MUSB_INTERFACE_UTMI,
179 .mode = MUSB_OTG,
180 .power = 100,
181};
182
183static struct omap2_hsmmc_info mmc[] = {
184 {
185 .mmc = 1,
186 .caps = MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA,
187 .gpio_wp = -EINVAL,
188 .gpio_cd = -EINVAL,
189 },
190 {
191 .name = "wl1271",
192 .mmc = 5,
193 .caps = MMC_CAP_4_BIT_DATA | MMC_CAP_POWER_OFF_CARD,
194 .gpio_wp = -EINVAL,
195 .gpio_cd = -EINVAL,
196 .ocr_mask = MMC_VDD_165_195,
197 .nonremovable = true,
198 },
199 {} /* Terminator */
200};
201
202static struct regulator_consumer_supply omap4_panda_vmmc5_supply[] = {
203 REGULATOR_SUPPLY("vmmc", "omap_hsmmc.4"),
204};
205
206static struct regulator_init_data panda_vmmc5 = {
207 .constraints = {
208 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
209 },
210 .num_consumer_supplies = ARRAY_SIZE(omap4_panda_vmmc5_supply),
211 .consumer_supplies = omap4_panda_vmmc5_supply,
212};
213
214static struct fixed_voltage_config panda_vwlan = {
215 .supply_name = "vwl1271",
216 .microvolts = 1800000, /* 1.8V */
217 .gpio = GPIO_WIFI_PMENA,
218 .startup_delay = 70000, /* 70msec */
219 .enable_high = 1,
220 .enabled_at_boot = 0,
221 .init_data = &panda_vmmc5,
222};
223
224static struct platform_device omap_vwlan_device = {
225 .name = "reg-fixed-voltage",
226 .id = 1,
227 .dev = {
228 .platform_data = &panda_vwlan,
229 },
230};
231
232static struct wl12xx_platform_data omap_panda_wlan_data __initdata = {
233 .board_ref_clock = WL12XX_REFCLOCK_38, /* 38.4 MHz */
234};
235
236static struct twl6040_codec_data twl6040_codec = {
237 /* single-step ramp for headset and handsfree */
238 .hs_left_step = 0x0f,
239 .hs_right_step = 0x0f,
240 .hf_left_step = 0x1d,
241 .hf_right_step = 0x1d,
242};
243
244static struct twl6040_platform_data twl6040_data = {
245 .codec = &twl6040_codec,
246 .audpwron_gpio = 127,
247};
248
249static struct i2c_board_info __initdata panda_i2c_1_boardinfo[] = {
250 {
251 I2C_BOARD_INFO("twl6040", 0x4b),
252 .irq = 119 + OMAP44XX_IRQ_GIC_START,
253 .platform_data = &twl6040_data,
254 },
255};
256
257/* Panda board uses the common PMIC configuration */
258static struct twl4030_platform_data omap4_panda_twldata;
259
260/*
261 * Display monitor features are burnt in their EEPROM as EDID data. The EEPROM
262 * is connected as I2C slave device, and can be accessed at address 0x50
263 */
264static struct i2c_board_info __initdata panda_i2c_eeprom[] = {
265 {
266 I2C_BOARD_INFO("eeprom", 0x50),
267 },
268};
269
270static int __init omap4_panda_i2c_init(void)
271{
272 omap4_pmic_get_config(&omap4_panda_twldata, TWL_COMMON_PDATA_USB,
273 TWL_COMMON_REGULATOR_VDAC |
274 TWL_COMMON_REGULATOR_VAUX2 |
275 TWL_COMMON_REGULATOR_VAUX3 |
276 TWL_COMMON_REGULATOR_VMMC |
277 TWL_COMMON_REGULATOR_VPP |
278 TWL_COMMON_REGULATOR_VANA |
279 TWL_COMMON_REGULATOR_VCXIO |
280 TWL_COMMON_REGULATOR_VUSB |
281 TWL_COMMON_REGULATOR_CLK32KG |
282 TWL_COMMON_REGULATOR_V1V8 |
283 TWL_COMMON_REGULATOR_V2V1);
284 omap4_pmic_init("twl6030", &omap4_panda_twldata, panda_i2c_1_boardinfo,
285 ARRAY_SIZE(panda_i2c_1_boardinfo));
286 omap_register_i2c_bus(2, 400, NULL, 0);
287 /*
288 * Bus 3 is attached to the DVI port where devices like the pico DLP
289 * projector don't work reliably with 400kHz
290 */
291 omap_register_i2c_bus(3, 100, panda_i2c_eeprom,
292 ARRAY_SIZE(panda_i2c_eeprom));
293 omap_register_i2c_bus(4, 400, NULL, 0);
294 return 0;
295}
296
297#ifdef CONFIG_OMAP_MUX
298static struct omap_board_mux board_mux[] __initdata = {
299 /* WLAN IRQ - GPIO 53 */
300 OMAP4_MUX(GPMC_NCS3, OMAP_MUX_MODE3 | OMAP_PIN_INPUT),
301 /* WLAN POWER ENABLE - GPIO 43 */
302 OMAP4_MUX(GPMC_A19, OMAP_MUX_MODE3 | OMAP_PIN_OUTPUT),
303 /* WLAN SDIO: MMC5 CMD */
304 OMAP4_MUX(SDMMC5_CMD, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP),
305 /* WLAN SDIO: MMC5 CLK */
306 OMAP4_MUX(SDMMC5_CLK, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP),
307 /* WLAN SDIO: MMC5 DAT[0-3] */
308 OMAP4_MUX(SDMMC5_DAT0, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP),
309 OMAP4_MUX(SDMMC5_DAT1, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP),
310 OMAP4_MUX(SDMMC5_DAT2, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP),
311 OMAP4_MUX(SDMMC5_DAT3, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP),
312 /* gpio 0 - TFP410 PD */
313 OMAP4_MUX(KPD_COL1, OMAP_PIN_OUTPUT | OMAP_MUX_MODE3),
314 /* dispc2_data23 */
315 OMAP4_MUX(USBB2_ULPITLL_STP, OMAP_PIN_OUTPUT | OMAP_MUX_MODE5),
316 /* dispc2_data22 */
317 OMAP4_MUX(USBB2_ULPITLL_DIR, OMAP_PIN_OUTPUT | OMAP_MUX_MODE5),
318 /* dispc2_data21 */
319 OMAP4_MUX(USBB2_ULPITLL_NXT, OMAP_PIN_OUTPUT | OMAP_MUX_MODE5),
320 /* dispc2_data20 */
321 OMAP4_MUX(USBB2_ULPITLL_DAT0, OMAP_PIN_OUTPUT | OMAP_MUX_MODE5),
322 /* dispc2_data19 */
323 OMAP4_MUX(USBB2_ULPITLL_DAT1, OMAP_PIN_OUTPUT | OMAP_MUX_MODE5),
324 /* dispc2_data18 */
325 OMAP4_MUX(USBB2_ULPITLL_DAT2, OMAP_PIN_OUTPUT | OMAP_MUX_MODE5),
326 /* dispc2_data15 */
327 OMAP4_MUX(USBB2_ULPITLL_DAT3, OMAP_PIN_OUTPUT | OMAP_MUX_MODE5),
328 /* dispc2_data14 */
329 OMAP4_MUX(USBB2_ULPITLL_DAT4, OMAP_PIN_OUTPUT | OMAP_MUX_MODE5),
330 /* dispc2_data13 */
331 OMAP4_MUX(USBB2_ULPITLL_DAT5, OMAP_PIN_OUTPUT | OMAP_MUX_MODE5),
332 /* dispc2_data12 */
333 OMAP4_MUX(USBB2_ULPITLL_DAT6, OMAP_PIN_OUTPUT | OMAP_MUX_MODE5),
334 /* dispc2_data11 */
335 OMAP4_MUX(USBB2_ULPITLL_DAT7, OMAP_PIN_OUTPUT | OMAP_MUX_MODE5),
336 /* dispc2_data10 */
337 OMAP4_MUX(DPM_EMU3, OMAP_PIN_OUTPUT | OMAP_MUX_MODE5),
338 /* dispc2_data9 */
339 OMAP4_MUX(DPM_EMU4, OMAP_PIN_OUTPUT | OMAP_MUX_MODE5),
340 /* dispc2_data16 */
341 OMAP4_MUX(DPM_EMU5, OMAP_PIN_OUTPUT | OMAP_MUX_MODE5),
342 /* dispc2_data17 */
343 OMAP4_MUX(DPM_EMU6, OMAP_PIN_OUTPUT | OMAP_MUX_MODE5),
344 /* dispc2_hsync */
345 OMAP4_MUX(DPM_EMU7, OMAP_PIN_OUTPUT | OMAP_MUX_MODE5),
346 /* dispc2_pclk */
347 OMAP4_MUX(DPM_EMU8, OMAP_PIN_OUTPUT | OMAP_MUX_MODE5),
348 /* dispc2_vsync */
349 OMAP4_MUX(DPM_EMU9, OMAP_PIN_OUTPUT | OMAP_MUX_MODE5),
350 /* dispc2_de */
351 OMAP4_MUX(DPM_EMU10, OMAP_PIN_OUTPUT | OMAP_MUX_MODE5),
352 /* dispc2_data8 */
353 OMAP4_MUX(DPM_EMU11, OMAP_PIN_OUTPUT | OMAP_MUX_MODE5),
354 /* dispc2_data7 */
355 OMAP4_MUX(DPM_EMU12, OMAP_PIN_OUTPUT | OMAP_MUX_MODE5),
356 /* dispc2_data6 */
357 OMAP4_MUX(DPM_EMU13, OMAP_PIN_OUTPUT | OMAP_MUX_MODE5),
358 /* dispc2_data5 */
359 OMAP4_MUX(DPM_EMU14, OMAP_PIN_OUTPUT | OMAP_MUX_MODE5),
360 /* dispc2_data4 */
361 OMAP4_MUX(DPM_EMU15, OMAP_PIN_OUTPUT | OMAP_MUX_MODE5),
362 /* dispc2_data3 */
363 OMAP4_MUX(DPM_EMU16, OMAP_PIN_OUTPUT | OMAP_MUX_MODE5),
364 /* dispc2_data2 */
365 OMAP4_MUX(DPM_EMU17, OMAP_PIN_OUTPUT | OMAP_MUX_MODE5),
366 /* dispc2_data1 */
367 OMAP4_MUX(DPM_EMU18, OMAP_PIN_OUTPUT | OMAP_MUX_MODE5),
368 /* dispc2_data0 */
369 OMAP4_MUX(DPM_EMU19, OMAP_PIN_OUTPUT | OMAP_MUX_MODE5),
370 /* NIRQ2 for twl6040 */
371 OMAP4_MUX(SYS_NIRQ2, OMAP_MUX_MODE0 |
372 OMAP_PIN_INPUT_PULLUP | OMAP_PIN_OFF_WAKEUPENABLE),
373 /* GPIO_127 for twl6040 */
374 OMAP4_MUX(HDQ_SIO, OMAP_MUX_MODE3 | OMAP_PIN_OUTPUT),
375 /* McPDM */
376 OMAP4_MUX(ABE_PDM_UL_DATA, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLDOWN),
377 OMAP4_MUX(ABE_PDM_DL_DATA, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLDOWN),
378 OMAP4_MUX(ABE_PDM_FRAME, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP),
379 OMAP4_MUX(ABE_PDM_LB_CLK, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLDOWN),
380 OMAP4_MUX(ABE_CLKS, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLDOWN),
381 /* McBSP1 */
382 OMAP4_MUX(ABE_MCBSP1_CLKX, OMAP_MUX_MODE0 | OMAP_PIN_INPUT),
383 OMAP4_MUX(ABE_MCBSP1_DR, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLDOWN),
384 OMAP4_MUX(ABE_MCBSP1_DX, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT |
385 OMAP_PULL_ENA),
386 OMAP4_MUX(ABE_MCBSP1_FSX, OMAP_MUX_MODE0 | OMAP_PIN_INPUT),
387
388 /* UART2 - BT/FM/GPS shared transport */
389 OMAP4_MUX(UART2_CTS, OMAP_PIN_INPUT | OMAP_MUX_MODE0),
390 OMAP4_MUX(UART2_RTS, OMAP_PIN_OUTPUT | OMAP_MUX_MODE0),
391 OMAP4_MUX(UART2_RX, OMAP_PIN_INPUT | OMAP_MUX_MODE0),
392 OMAP4_MUX(UART2_TX, OMAP_PIN_OUTPUT | OMAP_MUX_MODE0),
393
394 { .reg_offset = OMAP_MUX_TERMINATOR },
395};
396
397#else
398#define board_mux NULL
399#endif
400
401
402static void omap4_panda_init_rev(void)
403{
404 if (cpu_is_omap443x()) {
405 /* PandaBoard 4430 */
406 /* ASoC audio configuration */
407 panda_abe_audio_data.card_name = "PandaBoard";
408 panda_abe_audio_data.has_hsmic = 1;
409 } else {
410 /* PandaBoard ES */
411 /* ASoC audio configuration */
412 panda_abe_audio_data.card_name = "PandaBoardES";
413 }
414}
415
416static void __init omap4_panda_init(void)
417{
418 int package = OMAP_PACKAGE_CBS;
419 int ret;
420
421 if (omap_rev() == OMAP4430_REV_ES1_0)
422 package = OMAP_PACKAGE_CBL;
423 omap4_mux_init(board_mux, NULL, package);
424
425 omap_panda_wlan_data.irq = gpio_to_irq(GPIO_WIFI_IRQ);
426 ret = wl12xx_set_platform_data(&omap_panda_wlan_data);
427 if (ret)
428 pr_err("error setting wl12xx data: %d\n", ret);
429
430 omap4_panda_init_rev();
431 omap4_panda_i2c_init();
432 platform_add_devices(panda_devices, ARRAY_SIZE(panda_devices));
433 platform_device_register(&omap_vwlan_device);
434 omap_serial_init();
435 omap_sdrc_init(NULL, NULL);
436 omap4_twl6030_hsmmc_init(mmc);
437 omap4_ehci_init();
438 usb_bind_phy("musb-hdrc.2.auto", 0, "omap-usb2.3.auto");
439 usb_musb_init(&musb_board_data);
440 omap4_panda_display_init();
441}
442
443MACHINE_START(OMAP4_PANDA, "OMAP4 Panda board")
444 /* Maintainer: David Anders - Texas Instruments Inc */
445 .atag_offset = 0x100,
446 .smp = smp_ops(omap4_smp_ops),
447 .reserve = omap_reserve,
448 .map_io = omap4_map_io,
449 .init_early = omap4430_init_early,
450 .init_irq = gic_init_irq,
451 .init_machine = omap4_panda_init,
452 .init_late = omap4430_init_late,
453 .init_time = omap4_local_timer_init,
454 .restart = omap44xx_restart,
455MACHINE_END
diff --git a/arch/arm/mach-omap2/board-overo.c b/arch/arm/mach-omap2/board-overo.c
index 4ca6b680aa72..5748b5d06c23 100644
--- a/arch/arm/mach-omap2/board-overo.c
+++ b/arch/arm/mach-omap2/board-overo.c
@@ -68,6 +68,7 @@
68 68
69#define OVERO_SMSC911X_CS 5 69#define OVERO_SMSC911X_CS 5
70#define OVERO_SMSC911X_GPIO 176 70#define OVERO_SMSC911X_GPIO 176
71#define OVERO_SMSC911X_NRESET 64
71#define OVERO_SMSC911X2_CS 4 72#define OVERO_SMSC911X2_CS 4
72#define OVERO_SMSC911X2_GPIO 65 73#define OVERO_SMSC911X2_GPIO 65
73 74
@@ -122,7 +123,7 @@ static struct omap_smsc911x_platform_data smsc911x_cfg = {
122 .id = 0, 123 .id = 0,
123 .cs = OVERO_SMSC911X_CS, 124 .cs = OVERO_SMSC911X_CS,
124 .gpio_irq = OVERO_SMSC911X_GPIO, 125 .gpio_irq = OVERO_SMSC911X_GPIO,
125 .gpio_reset = -EINVAL, 126 .gpio_reset = OVERO_SMSC911X_NRESET,
126 .flags = SMSC911X_USE_32BIT, 127 .flags = SMSC911X_USE_32BIT,
127}; 128};
128 129
diff --git a/arch/arm/mach-omap2/board-rx51-peripherals.c b/arch/arm/mach-omap2/board-rx51-peripherals.c
index 18ca61e300b3..9c2dd102fbbb 100644
--- a/arch/arm/mach-omap2/board-rx51-peripherals.c
+++ b/arch/arm/mach-omap2/board-rx51-peripherals.c
@@ -553,6 +553,7 @@ static struct regulator_consumer_supply rx51_vio_supplies[] = {
553 553
554static struct regulator_consumer_supply rx51_vaux1_consumers[] = { 554static struct regulator_consumer_supply rx51_vaux1_consumers[] = {
555 REGULATOR_SUPPLY("vdds_sdi", "omapdss"), 555 REGULATOR_SUPPLY("vdds_sdi", "omapdss"),
556 REGULATOR_SUPPLY("vdds_sdi", "omapdss_sdi.0"),
556 /* Si4713 supply */ 557 /* Si4713 supply */
557 REGULATOR_SUPPLY("vdd", "2-0063"), 558 REGULATOR_SUPPLY("vdd", "2-0063"),
558 /* lis3lv02d */ 559 /* lis3lv02d */
diff --git a/arch/arm/mach-omap2/board-rx51-video.c b/arch/arm/mach-omap2/board-rx51-video.c
index bd74f9f6063b..bdd1e3a179e1 100644
--- a/arch/arm/mach-omap2/board-rx51-video.c
+++ b/arch/arm/mach-omap2/board-rx51-video.c
@@ -61,7 +61,7 @@ static struct omap_dss_board_info rx51_dss_board_info = {
61 61
62static int __init rx51_video_init(void) 62static int __init rx51_video_init(void)
63{ 63{
64 if (!machine_is_nokia_rx51()) 64 if (!machine_is_nokia_rx51() && !of_machine_is_compatible("nokia,omap3-n900"))
65 return 0; 65 return 0;
66 66
67 if (omap_mux_init_gpio(RX51_LCD_RESET_GPIO, OMAP_PIN_OUTPUT)) { 67 if (omap_mux_init_gpio(RX51_LCD_RESET_GPIO, OMAP_PIN_OUTPUT)) {
diff --git a/arch/arm/mach-omap2/cclock33xx_data.c b/arch/arm/mach-omap2/cclock33xx_data.c
index af3544ce4f02..ba6534d7f155 100644
--- a/arch/arm/mach-omap2/cclock33xx_data.c
+++ b/arch/arm/mach-omap2/cclock33xx_data.c
@@ -431,15 +431,11 @@ DEFINE_STRUCT_CLK(aes0_fck, dpll_core_ck_parents, clk_ops_null);
431 * - Driver code is not yet migrated to use hwmod/runtime pm 431 * - Driver code is not yet migrated to use hwmod/runtime pm
432 * - Modules outside kernel access (to disable them by default) 432 * - Modules outside kernel access (to disable them by default)
433 * 433 *
434 * - debugss
435 * - mmu (gfx domain) 434 * - mmu (gfx domain)
436 * - cefuse 435 * - cefuse
437 * - usbotg_fck (its additional clock and not really a modulemode) 436 * - usbotg_fck (its additional clock and not really a modulemode)
438 * - ieee5000 437 * - ieee5000
439 */ 438 */
440DEFINE_CLK_GATE(debugss_ick, "dpll_core_m4_ck", &dpll_core_m4_ck, 0x0,
441 AM33XX_CM_WKUP_DEBUGSS_CLKCTRL, AM33XX_MODULEMODE_SWCTRL_SHIFT,
442 0x0, NULL);
443 439
444DEFINE_CLK_GATE(mmu_fck, "dpll_core_m4_ck", &dpll_core_m4_ck, 0x0, 440DEFINE_CLK_GATE(mmu_fck, "dpll_core_m4_ck", &dpll_core_m4_ck, 0x0,
445 AM33XX_CM_GFX_MMUDATA_CLKCTRL, AM33XX_MODULEMODE_SWCTRL_SHIFT, 441 AM33XX_CM_GFX_MMUDATA_CLKCTRL, AM33XX_MODULEMODE_SWCTRL_SHIFT,
@@ -862,6 +858,69 @@ static struct clk_hw_omap wdt1_fck_hw = {
862 858
863DEFINE_STRUCT_CLK(wdt1_fck, wdt_ck_parents, gpio_fck_ops); 859DEFINE_STRUCT_CLK(wdt1_fck, wdt_ck_parents, gpio_fck_ops);
864 860
861static const char *pwmss_clk_parents[] = {
862 "dpll_per_m2_ck",
863};
864
865static const struct clk_ops ehrpwm_tbclk_ops = {
866 .enable = &omap2_dflt_clk_enable,
867 .disable = &omap2_dflt_clk_disable,
868};
869
870DEFINE_CLK_OMAP_MUX_GATE(ehrpwm0_tbclk, "l4ls_clkdm",
871 NULL, NULL, 0,
872 AM33XX_CTRL_REGADDR(AM33XX_PWMSS_TBCLK_CLKCTRL),
873 AM33XX_PWMSS0_TBCLKEN_SHIFT,
874 NULL, pwmss_clk_parents, ehrpwm_tbclk_ops);
875
876DEFINE_CLK_OMAP_MUX_GATE(ehrpwm1_tbclk, "l4ls_clkdm",
877 NULL, NULL, 0,
878 AM33XX_CTRL_REGADDR(AM33XX_PWMSS_TBCLK_CLKCTRL),
879 AM33XX_PWMSS1_TBCLKEN_SHIFT,
880 NULL, pwmss_clk_parents, ehrpwm_tbclk_ops);
881
882DEFINE_CLK_OMAP_MUX_GATE(ehrpwm2_tbclk, "l4ls_clkdm",
883 NULL, NULL, 0,
884 AM33XX_CTRL_REGADDR(AM33XX_PWMSS_TBCLK_CLKCTRL),
885 AM33XX_PWMSS2_TBCLKEN_SHIFT,
886 NULL, pwmss_clk_parents, ehrpwm_tbclk_ops);
887
888/*
889 * debugss optional clocks
890 */
891DEFINE_CLK_GATE(dbg_sysclk_ck, "sys_clkin_ck", &sys_clkin_ck,
892 0x0, AM33XX_CM_WKUP_DEBUGSS_CLKCTRL,
893 AM33XX_OPTFCLKEN_DBGSYSCLK_SHIFT, 0x0, NULL);
894
895DEFINE_CLK_GATE(dbg_clka_ck, "dpll_core_m4_ck", &dpll_core_m4_ck,
896 0x0, AM33XX_CM_WKUP_DEBUGSS_CLKCTRL,
897 AM33XX_OPTCLK_DEBUG_CLKA_SHIFT, 0x0, NULL);
898
899static const char *stm_pmd_clock_mux_ck_parents[] = {
900 "dbg_sysclk_ck", "dbg_clka_ck",
901};
902
903DEFINE_CLK_MUX(stm_pmd_clock_mux_ck, stm_pmd_clock_mux_ck_parents, NULL, 0x0,
904 AM33XX_CM_WKUP_DEBUGSS_CLKCTRL, AM33XX_STM_PMD_CLKSEL_SHIFT,
905 AM33XX_STM_PMD_CLKSEL_WIDTH, 0x0, NULL);
906
907DEFINE_CLK_MUX(trace_pmd_clk_mux_ck, stm_pmd_clock_mux_ck_parents, NULL, 0x0,
908 AM33XX_CM_WKUP_DEBUGSS_CLKCTRL,
909 AM33XX_TRC_PMD_CLKSEL_SHIFT,
910 AM33XX_TRC_PMD_CLKSEL_WIDTH, 0x0, NULL);
911
912DEFINE_CLK_DIVIDER(stm_clk_div_ck, "stm_pmd_clock_mux_ck",
913 &stm_pmd_clock_mux_ck, 0x0, AM33XX_CM_WKUP_DEBUGSS_CLKCTRL,
914 AM33XX_STM_PMD_CLKDIVSEL_SHIFT,
915 AM33XX_STM_PMD_CLKDIVSEL_WIDTH, CLK_DIVIDER_POWER_OF_TWO,
916 NULL);
917
918DEFINE_CLK_DIVIDER(trace_clk_div_ck, "trace_pmd_clk_mux_ck",
919 &trace_pmd_clk_mux_ck, 0x0, AM33XX_CM_WKUP_DEBUGSS_CLKCTRL,
920 AM33XX_TRC_PMD_CLKDIVSEL_SHIFT,
921 AM33XX_TRC_PMD_CLKDIVSEL_WIDTH, CLK_DIVIDER_POWER_OF_TWO,
922 NULL);
923
865/* 924/*
866 * clkdev 925 * clkdev
867 */ 926 */
@@ -899,7 +958,6 @@ static struct omap_clk am33xx_clks[] = {
899 CLK("481cc000.d_can", NULL, &dcan0_fck), 958 CLK("481cc000.d_can", NULL, &dcan0_fck),
900 CLK(NULL, "dcan1_fck", &dcan1_fck), 959 CLK(NULL, "dcan1_fck", &dcan1_fck),
901 CLK("481d0000.d_can", NULL, &dcan1_fck), 960 CLK("481d0000.d_can", NULL, &dcan1_fck),
902 CLK(NULL, "debugss_ick", &debugss_ick),
903 CLK(NULL, "pruss_ocp_gclk", &pruss_ocp_gclk), 961 CLK(NULL, "pruss_ocp_gclk", &pruss_ocp_gclk),
904 CLK(NULL, "mcasp0_fck", &mcasp0_fck), 962 CLK(NULL, "mcasp0_fck", &mcasp0_fck),
905 CLK(NULL, "mcasp1_fck", &mcasp1_fck), 963 CLK(NULL, "mcasp1_fck", &mcasp1_fck),
@@ -942,6 +1000,16 @@ static struct omap_clk am33xx_clks[] = {
942 CLK(NULL, "clkout2_div_ck", &clkout2_div_ck), 1000 CLK(NULL, "clkout2_div_ck", &clkout2_div_ck),
943 CLK(NULL, "timer_32k_ck", &clkdiv32k_ick), 1001 CLK(NULL, "timer_32k_ck", &clkdiv32k_ick),
944 CLK(NULL, "timer_sys_ck", &sys_clkin_ck), 1002 CLK(NULL, "timer_sys_ck", &sys_clkin_ck),
1003 CLK(NULL, "dbg_sysclk_ck", &dbg_sysclk_ck),
1004 CLK(NULL, "dbg_clka_ck", &dbg_clka_ck),
1005 CLK(NULL, "stm_pmd_clock_mux_ck", &stm_pmd_clock_mux_ck),
1006 CLK(NULL, "trace_pmd_clk_mux_ck", &trace_pmd_clk_mux_ck),
1007 CLK(NULL, "stm_clk_div_ck", &stm_clk_div_ck),
1008 CLK(NULL, "trace_clk_div_ck", &trace_clk_div_ck),
1009 CLK(NULL, "clkout2_ck", &clkout2_ck),
1010 CLK("48300200.ehrpwm", "tbclk", &ehrpwm0_tbclk),
1011 CLK("48302200.ehrpwm", "tbclk", &ehrpwm1_tbclk),
1012 CLK("48304200.ehrpwm", "tbclk", &ehrpwm2_tbclk),
945}; 1013};
946 1014
947 1015
@@ -952,6 +1020,7 @@ static const char *enable_init_clks[] = {
952 "l4hs_gclk", 1020 "l4hs_gclk",
953 "l4fw_gclk", 1021 "l4fw_gclk",
954 "l4ls_gclk", 1022 "l4ls_gclk",
1023 "clkout2_ck", /* Required for external peripherals like, Audio codecs */
955}; 1024};
956 1025
957int __init am33xx_clk_init(void) 1026int __init am33xx_clk_init(void)
diff --git a/arch/arm/mach-omap2/cclock3xxx_data.c b/arch/arm/mach-omap2/cclock3xxx_data.c
index 45cd26430d1f..334b76745900 100644
--- a/arch/arm/mach-omap2/cclock3xxx_data.c
+++ b/arch/arm/mach-omap2/cclock3xxx_data.c
@@ -3329,11 +3329,7 @@ static struct omap_clk omap36xx_am35xx_omap3430es2plus_clks[] = {
3329 CLK(NULL, "cpefuse_fck", &cpefuse_fck), 3329 CLK(NULL, "cpefuse_fck", &cpefuse_fck),
3330 CLK(NULL, "ts_fck", &ts_fck), 3330 CLK(NULL, "ts_fck", &ts_fck),
3331 CLK(NULL, "usbtll_fck", &usbtll_fck), 3331 CLK(NULL, "usbtll_fck", &usbtll_fck),
3332 CLK("usbhs_omap", "usbtll_fck", &usbtll_fck),
3333 CLK("usbhs_tll", "usbtll_fck", &usbtll_fck),
3334 CLK(NULL, "usbtll_ick", &usbtll_ick), 3332 CLK(NULL, "usbtll_ick", &usbtll_ick),
3335 CLK("usbhs_omap", "usbtll_ick", &usbtll_ick),
3336 CLK("usbhs_tll", "usbtll_ick", &usbtll_ick),
3337 CLK("omap_hsmmc.2", "ick", &mmchs3_ick), 3333 CLK("omap_hsmmc.2", "ick", &mmchs3_ick),
3338 CLK(NULL, "mmchs3_ick", &mmchs3_ick), 3334 CLK(NULL, "mmchs3_ick", &mmchs3_ick),
3339 CLK(NULL, "mmchs3_fck", &mmchs3_fck), 3335 CLK(NULL, "mmchs3_fck", &mmchs3_fck),
@@ -3343,7 +3339,6 @@ static struct omap_clk omap36xx_am35xx_omap3430es2plus_clks[] = {
3343 CLK(NULL, "usbhost_120m_fck", &usbhost_120m_fck), 3339 CLK(NULL, "usbhost_120m_fck", &usbhost_120m_fck),
3344 CLK(NULL, "usbhost_48m_fck", &usbhost_48m_fck), 3340 CLK(NULL, "usbhost_48m_fck", &usbhost_48m_fck),
3345 CLK(NULL, "usbhost_ick", &usbhost_ick), 3341 CLK(NULL, "usbhost_ick", &usbhost_ick),
3346 CLK("usbhs_omap", "usbhost_ick", &usbhost_ick),
3347}; 3342};
3348 3343
3349/* 3344/*
@@ -3463,12 +3458,6 @@ static struct omap_clk omap3xxx_clks[] = {
3463 CLK(NULL, "utmi_p2_gfclk", &dummy_ck), 3458 CLK(NULL, "utmi_p2_gfclk", &dummy_ck),
3464 CLK(NULL, "xclk60mhsp1_ck", &dummy_ck), 3459 CLK(NULL, "xclk60mhsp1_ck", &dummy_ck),
3465 CLK(NULL, "xclk60mhsp2_ck", &dummy_ck), 3460 CLK(NULL, "xclk60mhsp2_ck", &dummy_ck),
3466 CLK(NULL, "usb_host_hs_utmi_p1_clk", &dummy_ck),
3467 CLK(NULL, "usb_host_hs_utmi_p2_clk", &dummy_ck),
3468 CLK("usbhs_omap", "usb_tll_hs_usb_ch0_clk", &dummy_ck),
3469 CLK("usbhs_omap", "usb_tll_hs_usb_ch1_clk", &dummy_ck),
3470 CLK("usbhs_tll", "usb_tll_hs_usb_ch0_clk", &dummy_ck),
3471 CLK("usbhs_tll", "usb_tll_hs_usb_ch1_clk", &dummy_ck),
3472 CLK(NULL, "init_60m_fclk", &dummy_ck), 3461 CLK(NULL, "init_60m_fclk", &dummy_ck),
3473 CLK(NULL, "gpt1_fck", &gpt1_fck), 3462 CLK(NULL, "gpt1_fck", &gpt1_fck),
3474 CLK(NULL, "aes2_ick", &aes2_ick), 3463 CLK(NULL, "aes2_ick", &aes2_ick),
diff --git a/arch/arm/mach-omap2/clockdomain.h b/arch/arm/mach-omap2/clockdomain.h
index 2da37656a693..daeecf1b89fa 100644
--- a/arch/arm/mach-omap2/clockdomain.h
+++ b/arch/arm/mach-omap2/clockdomain.h
@@ -216,6 +216,7 @@ extern void __init omap243x_clockdomains_init(void);
216extern void __init omap3xxx_clockdomains_init(void); 216extern void __init omap3xxx_clockdomains_init(void);
217extern void __init am33xx_clockdomains_init(void); 217extern void __init am33xx_clockdomains_init(void);
218extern void __init omap44xx_clockdomains_init(void); 218extern void __init omap44xx_clockdomains_init(void);
219extern void __init omap54xx_clockdomains_init(void);
219 220
220extern void clkdm_add_autodeps(struct clockdomain *clkdm); 221extern void clkdm_add_autodeps(struct clockdomain *clkdm);
221extern void clkdm_del_autodeps(struct clockdomain *clkdm); 222extern void clkdm_del_autodeps(struct clockdomain *clkdm);
diff --git a/arch/arm/mach-omap2/clockdomains54xx_data.c b/arch/arm/mach-omap2/clockdomains54xx_data.c
new file mode 100644
index 000000000000..1a3c69d2e14c
--- /dev/null
+++ b/arch/arm/mach-omap2/clockdomains54xx_data.c
@@ -0,0 +1,464 @@
1/*
2 * OMAP54XX Clock domains framework
3 *
4 * Copyright (C) 2013 Texas Instruments, Inc.
5 *
6 * Abhijit Pagare (abhijitpagare@ti.com)
7 * Benoit Cousson (b-cousson@ti.com)
8 * Paul Walmsley (paul@pwsan.com)
9 *
10 * This file is automatically generated from the OMAP hardware databases.
11 * We respectfully ask that any modifications to this file be coordinated
12 * with the public linux-omap@vger.kernel.org mailing list and the
13 * authors above to ensure that the autogeneration scripts are kept
14 * up-to-date with the file contents.
15 *
16 * This program is free software; you can redistribute it and/or modify
17 * it under the terms of the GNU General Public License version 2 as
18 * published by the Free Software Foundation.
19 */
20
21#include <linux/kernel.h>
22#include <linux/io.h>
23
24#include "clockdomain.h"
25#include "cm1_54xx.h"
26#include "cm2_54xx.h"
27
28#include "cm-regbits-54xx.h"
29#include "prm54xx.h"
30#include "prcm44xx.h"
31#include "prcm_mpu54xx.h"
32
33/* Static Dependencies for OMAP4 Clock Domains */
34
35static struct clkdm_dep c2c_wkup_sleep_deps[] = {
36 { .clkdm_name = "abe_clkdm" },
37 { .clkdm_name = "emif_clkdm" },
38 { .clkdm_name = "iva_clkdm" },
39 { .clkdm_name = "l3init_clkdm" },
40 { .clkdm_name = "l3main1_clkdm" },
41 { .clkdm_name = "l3main2_clkdm" },
42 { .clkdm_name = "l4cfg_clkdm" },
43 { .clkdm_name = "l4per_clkdm" },
44 { NULL },
45};
46
47static struct clkdm_dep cam_wkup_sleep_deps[] = {
48 { .clkdm_name = "emif_clkdm" },
49 { .clkdm_name = "iva_clkdm" },
50 { .clkdm_name = "l3main1_clkdm" },
51 { NULL },
52};
53
54static struct clkdm_dep dma_wkup_sleep_deps[] = {
55 { .clkdm_name = "abe_clkdm" },
56 { .clkdm_name = "dss_clkdm" },
57 { .clkdm_name = "emif_clkdm" },
58 { .clkdm_name = "ipu_clkdm" },
59 { .clkdm_name = "iva_clkdm" },
60 { .clkdm_name = "l3init_clkdm" },
61 { .clkdm_name = "l3main1_clkdm" },
62 { .clkdm_name = "l4cfg_clkdm" },
63 { .clkdm_name = "l4per_clkdm" },
64 { .clkdm_name = "l4sec_clkdm" },
65 { .clkdm_name = "wkupaon_clkdm" },
66 { NULL },
67};
68
69static struct clkdm_dep dsp_wkup_sleep_deps[] = {
70 { .clkdm_name = "abe_clkdm" },
71 { .clkdm_name = "emif_clkdm" },
72 { .clkdm_name = "iva_clkdm" },
73 { .clkdm_name = "l3init_clkdm" },
74 { .clkdm_name = "l3main1_clkdm" },
75 { .clkdm_name = "l3main2_clkdm" },
76 { .clkdm_name = "l4cfg_clkdm" },
77 { .clkdm_name = "l4per_clkdm" },
78 { .clkdm_name = "wkupaon_clkdm" },
79 { NULL },
80};
81
82static struct clkdm_dep dss_wkup_sleep_deps[] = {
83 { .clkdm_name = "emif_clkdm" },
84 { .clkdm_name = "iva_clkdm" },
85 { .clkdm_name = "l3main2_clkdm" },
86 { NULL },
87};
88
89static struct clkdm_dep gpu_wkup_sleep_deps[] = {
90 { .clkdm_name = "emif_clkdm" },
91 { .clkdm_name = "iva_clkdm" },
92 { .clkdm_name = "l3main1_clkdm" },
93 { NULL },
94};
95
96static struct clkdm_dep ipu_wkup_sleep_deps[] = {
97 { .clkdm_name = "abe_clkdm" },
98 { .clkdm_name = "dsp_clkdm" },
99 { .clkdm_name = "dss_clkdm" },
100 { .clkdm_name = "emif_clkdm" },
101 { .clkdm_name = "gpu_clkdm" },
102 { .clkdm_name = "iva_clkdm" },
103 { .clkdm_name = "l3init_clkdm" },
104 { .clkdm_name = "l3main1_clkdm" },
105 { .clkdm_name = "l3main2_clkdm" },
106 { .clkdm_name = "l4cfg_clkdm" },
107 { .clkdm_name = "l4per_clkdm" },
108 { .clkdm_name = "l4sec_clkdm" },
109 { .clkdm_name = "wkupaon_clkdm" },
110 { NULL },
111};
112
113static struct clkdm_dep iva_wkup_sleep_deps[] = {
114 { .clkdm_name = "emif_clkdm" },
115 { .clkdm_name = "l3main1_clkdm" },
116 { NULL },
117};
118
119static struct clkdm_dep l3init_wkup_sleep_deps[] = {
120 { .clkdm_name = "abe_clkdm" },
121 { .clkdm_name = "emif_clkdm" },
122 { .clkdm_name = "iva_clkdm" },
123 { .clkdm_name = "l4cfg_clkdm" },
124 { .clkdm_name = "l4per_clkdm" },
125 { .clkdm_name = "l4sec_clkdm" },
126 { .clkdm_name = "wkupaon_clkdm" },
127 { NULL },
128};
129
130static struct clkdm_dep l4sec_wkup_sleep_deps[] = {
131 { .clkdm_name = "emif_clkdm" },
132 { .clkdm_name = "l3main1_clkdm" },
133 { .clkdm_name = "l4per_clkdm" },
134 { NULL },
135};
136
137static struct clkdm_dep mipiext_wkup_sleep_deps[] = {
138 { .clkdm_name = "abe_clkdm" },
139 { .clkdm_name = "emif_clkdm" },
140 { .clkdm_name = "iva_clkdm" },
141 { .clkdm_name = "l3init_clkdm" },
142 { .clkdm_name = "l3main1_clkdm" },
143 { .clkdm_name = "l3main2_clkdm" },
144 { .clkdm_name = "l4cfg_clkdm" },
145 { .clkdm_name = "l4per_clkdm" },
146 { NULL },
147};
148
149static struct clkdm_dep mpu_wkup_sleep_deps[] = {
150 { .clkdm_name = "abe_clkdm" },
151 { .clkdm_name = "dsp_clkdm" },
152 { .clkdm_name = "dss_clkdm" },
153 { .clkdm_name = "emif_clkdm" },
154 { .clkdm_name = "gpu_clkdm" },
155 { .clkdm_name = "ipu_clkdm" },
156 { .clkdm_name = "iva_clkdm" },
157 { .clkdm_name = "l3init_clkdm" },
158 { .clkdm_name = "l3main1_clkdm" },
159 { .clkdm_name = "l3main2_clkdm" },
160 { .clkdm_name = "l4cfg_clkdm" },
161 { .clkdm_name = "l4per_clkdm" },
162 { .clkdm_name = "l4sec_clkdm" },
163 { .clkdm_name = "wkupaon_clkdm" },
164 { NULL },
165};
166
167static struct clockdomain l4sec_54xx_clkdm = {
168 .name = "l4sec_clkdm",
169 .pwrdm = { .name = "core_pwrdm" },
170 .prcm_partition = OMAP54XX_CM_CORE_PARTITION,
171 .cm_inst = OMAP54XX_CM_CORE_CORE_INST,
172 .clkdm_offs = OMAP54XX_CM_CORE_CORE_L4SEC_CDOFFS,
173 .dep_bit = OMAP54XX_L4SEC_STATDEP_SHIFT,
174 .wkdep_srcs = l4sec_wkup_sleep_deps,
175 .sleepdep_srcs = l4sec_wkup_sleep_deps,
176 .flags = CLKDM_CAN_HWSUP_SWSUP,
177};
178
179static struct clockdomain iva_54xx_clkdm = {
180 .name = "iva_clkdm",
181 .pwrdm = { .name = "iva_pwrdm" },
182 .prcm_partition = OMAP54XX_CM_CORE_PARTITION,
183 .cm_inst = OMAP54XX_CM_CORE_IVA_INST,
184 .clkdm_offs = OMAP54XX_CM_CORE_IVA_IVA_CDOFFS,
185 .dep_bit = OMAP54XX_IVA_STATDEP_SHIFT,
186 .wkdep_srcs = iva_wkup_sleep_deps,
187 .sleepdep_srcs = iva_wkup_sleep_deps,
188 .flags = CLKDM_CAN_HWSUP_SWSUP,
189};
190
191static struct clockdomain mipiext_54xx_clkdm = {
192 .name = "mipiext_clkdm",
193 .pwrdm = { .name = "core_pwrdm" },
194 .prcm_partition = OMAP54XX_CM_CORE_PARTITION,
195 .cm_inst = OMAP54XX_CM_CORE_CORE_INST,
196 .clkdm_offs = OMAP54XX_CM_CORE_CORE_MIPIEXT_CDOFFS,
197 .wkdep_srcs = mipiext_wkup_sleep_deps,
198 .sleepdep_srcs = mipiext_wkup_sleep_deps,
199 .flags = CLKDM_CAN_FORCE_WAKEUP | CLKDM_CAN_HWSUP,
200};
201
202static struct clockdomain l3main2_54xx_clkdm = {
203 .name = "l3main2_clkdm",
204 .pwrdm = { .name = "core_pwrdm" },
205 .prcm_partition = OMAP54XX_CM_CORE_PARTITION,
206 .cm_inst = OMAP54XX_CM_CORE_CORE_INST,
207 .clkdm_offs = OMAP54XX_CM_CORE_CORE_L3MAIN2_CDOFFS,
208 .dep_bit = OMAP54XX_L3MAIN2_STATDEP_SHIFT,
209 .flags = CLKDM_CAN_HWSUP,
210};
211
212static struct clockdomain l3main1_54xx_clkdm = {
213 .name = "l3main1_clkdm",
214 .pwrdm = { .name = "core_pwrdm" },
215 .prcm_partition = OMAP54XX_CM_CORE_PARTITION,
216 .cm_inst = OMAP54XX_CM_CORE_CORE_INST,
217 .clkdm_offs = OMAP54XX_CM_CORE_CORE_L3MAIN1_CDOFFS,
218 .dep_bit = OMAP54XX_L3MAIN1_STATDEP_SHIFT,
219 .flags = CLKDM_CAN_HWSUP,
220};
221
222static struct clockdomain custefuse_54xx_clkdm = {
223 .name = "custefuse_clkdm",
224 .pwrdm = { .name = "custefuse_pwrdm" },
225 .prcm_partition = OMAP54XX_CM_CORE_PARTITION,
226 .cm_inst = OMAP54XX_CM_CORE_CUSTEFUSE_INST,
227 .clkdm_offs = OMAP54XX_CM_CORE_CUSTEFUSE_CUSTEFUSE_CDOFFS,
228 .flags = CLKDM_CAN_FORCE_WAKEUP | CLKDM_CAN_HWSUP,
229};
230
231static struct clockdomain ipu_54xx_clkdm = {
232 .name = "ipu_clkdm",
233 .pwrdm = { .name = "core_pwrdm" },
234 .prcm_partition = OMAP54XX_CM_CORE_PARTITION,
235 .cm_inst = OMAP54XX_CM_CORE_CORE_INST,
236 .clkdm_offs = OMAP54XX_CM_CORE_CORE_IPU_CDOFFS,
237 .dep_bit = OMAP54XX_IPU_STATDEP_SHIFT,
238 .wkdep_srcs = ipu_wkup_sleep_deps,
239 .sleepdep_srcs = ipu_wkup_sleep_deps,
240 .flags = CLKDM_CAN_HWSUP_SWSUP,
241};
242
243static struct clockdomain l4cfg_54xx_clkdm = {
244 .name = "l4cfg_clkdm",
245 .pwrdm = { .name = "core_pwrdm" },
246 .prcm_partition = OMAP54XX_CM_CORE_PARTITION,
247 .cm_inst = OMAP54XX_CM_CORE_CORE_INST,
248 .clkdm_offs = OMAP54XX_CM_CORE_CORE_L4CFG_CDOFFS,
249 .dep_bit = OMAP54XX_L4CFG_STATDEP_SHIFT,
250 .flags = CLKDM_CAN_HWSUP,
251};
252
253static struct clockdomain abe_54xx_clkdm = {
254 .name = "abe_clkdm",
255 .pwrdm = { .name = "abe_pwrdm" },
256 .prcm_partition = OMAP54XX_CM_CORE_AON_PARTITION,
257 .cm_inst = OMAP54XX_CM_CORE_AON_ABE_INST,
258 .clkdm_offs = OMAP54XX_CM_CORE_AON_ABE_ABE_CDOFFS,
259 .dep_bit = OMAP54XX_ABE_STATDEP_SHIFT,
260 .flags = CLKDM_CAN_HWSUP_SWSUP,
261};
262
263static struct clockdomain dss_54xx_clkdm = {
264 .name = "dss_clkdm",
265 .pwrdm = { .name = "dss_pwrdm" },
266 .prcm_partition = OMAP54XX_CM_CORE_PARTITION,
267 .cm_inst = OMAP54XX_CM_CORE_DSS_INST,
268 .clkdm_offs = OMAP54XX_CM_CORE_DSS_DSS_CDOFFS,
269 .dep_bit = OMAP54XX_DSS_STATDEP_SHIFT,
270 .wkdep_srcs = dss_wkup_sleep_deps,
271 .sleepdep_srcs = dss_wkup_sleep_deps,
272 .flags = CLKDM_CAN_HWSUP_SWSUP,
273};
274
275static struct clockdomain dsp_54xx_clkdm = {
276 .name = "dsp_clkdm",
277 .pwrdm = { .name = "dsp_pwrdm" },
278 .prcm_partition = OMAP54XX_CM_CORE_AON_PARTITION,
279 .cm_inst = OMAP54XX_CM_CORE_AON_DSP_INST,
280 .clkdm_offs = OMAP54XX_CM_CORE_AON_DSP_DSP_CDOFFS,
281 .dep_bit = OMAP54XX_DSP_STATDEP_SHIFT,
282 .wkdep_srcs = dsp_wkup_sleep_deps,
283 .sleepdep_srcs = dsp_wkup_sleep_deps,
284 .flags = CLKDM_CAN_HWSUP_SWSUP,
285};
286
287static struct clockdomain c2c_54xx_clkdm = {
288 .name = "c2c_clkdm",
289 .pwrdm = { .name = "core_pwrdm" },
290 .prcm_partition = OMAP54XX_CM_CORE_PARTITION,
291 .cm_inst = OMAP54XX_CM_CORE_CORE_INST,
292 .clkdm_offs = OMAP54XX_CM_CORE_CORE_C2C_CDOFFS,
293 .wkdep_srcs = c2c_wkup_sleep_deps,
294 .sleepdep_srcs = c2c_wkup_sleep_deps,
295 .flags = CLKDM_CAN_FORCE_WAKEUP | CLKDM_CAN_HWSUP,
296};
297
298static struct clockdomain l4per_54xx_clkdm = {
299 .name = "l4per_clkdm",
300 .pwrdm = { .name = "core_pwrdm" },
301 .prcm_partition = OMAP54XX_CM_CORE_PARTITION,
302 .cm_inst = OMAP54XX_CM_CORE_CORE_INST,
303 .clkdm_offs = OMAP54XX_CM_CORE_CORE_L4PER_CDOFFS,
304 .dep_bit = OMAP54XX_L4PER_STATDEP_SHIFT,
305 .flags = CLKDM_CAN_HWSUP_SWSUP,
306};
307
308static struct clockdomain gpu_54xx_clkdm = {
309 .name = "gpu_clkdm",
310 .pwrdm = { .name = "gpu_pwrdm" },
311 .prcm_partition = OMAP54XX_CM_CORE_PARTITION,
312 .cm_inst = OMAP54XX_CM_CORE_GPU_INST,
313 .clkdm_offs = OMAP54XX_CM_CORE_GPU_GPU_CDOFFS,
314 .dep_bit = OMAP54XX_GPU_STATDEP_SHIFT,
315 .wkdep_srcs = gpu_wkup_sleep_deps,
316 .sleepdep_srcs = gpu_wkup_sleep_deps,
317 .flags = CLKDM_CAN_HWSUP_SWSUP,
318};
319
320static struct clockdomain wkupaon_54xx_clkdm = {
321 .name = "wkupaon_clkdm",
322 .pwrdm = { .name = "wkupaon_pwrdm" },
323 .prcm_partition = OMAP54XX_PRM_PARTITION,
324 .cm_inst = OMAP54XX_PRM_WKUPAON_CM_INST,
325 .clkdm_offs = OMAP54XX_PRM_WKUPAON_CM_WKUPAON_CDOFFS,
326 .dep_bit = OMAP54XX_WKUPAON_STATDEP_SHIFT,
327 .flags = CLKDM_CAN_FORCE_WAKEUP | CLKDM_CAN_HWSUP,
328};
329
330static struct clockdomain mpu0_54xx_clkdm = {
331 .name = "mpu0_clkdm",
332 .pwrdm = { .name = "cpu0_pwrdm" },
333 .prcm_partition = OMAP54XX_PRCM_MPU_PARTITION,
334 .cm_inst = OMAP54XX_PRCM_MPU_CM_C0_INST,
335 .clkdm_offs = OMAP54XX_PRCM_MPU_CM_C0_CPU0_CDOFFS,
336 .flags = CLKDM_CAN_FORCE_WAKEUP | CLKDM_CAN_HWSUP,
337};
338
339static struct clockdomain mpu1_54xx_clkdm = {
340 .name = "mpu1_clkdm",
341 .pwrdm = { .name = "cpu1_pwrdm" },
342 .prcm_partition = OMAP54XX_PRCM_MPU_PARTITION,
343 .cm_inst = OMAP54XX_PRCM_MPU_CM_C1_INST,
344 .clkdm_offs = OMAP54XX_PRCM_MPU_CM_C1_CPU1_CDOFFS,
345 .flags = CLKDM_CAN_FORCE_WAKEUP | CLKDM_CAN_HWSUP,
346};
347
348static struct clockdomain coreaon_54xx_clkdm = {
349 .name = "coreaon_clkdm",
350 .pwrdm = { .name = "coreaon_pwrdm" },
351 .prcm_partition = OMAP54XX_CM_CORE_PARTITION,
352 .cm_inst = OMAP54XX_CM_CORE_COREAON_INST,
353 .clkdm_offs = OMAP54XX_CM_CORE_COREAON_COREAON_CDOFFS,
354 .flags = CLKDM_CAN_FORCE_WAKEUP | CLKDM_CAN_HWSUP,
355};
356
357static struct clockdomain mpu_54xx_clkdm = {
358 .name = "mpu_clkdm",
359 .pwrdm = { .name = "mpu_pwrdm" },
360 .prcm_partition = OMAP54XX_CM_CORE_AON_PARTITION,
361 .cm_inst = OMAP54XX_CM_CORE_AON_MPU_INST,
362 .clkdm_offs = OMAP54XX_CM_CORE_AON_MPU_MPU_CDOFFS,
363 .wkdep_srcs = mpu_wkup_sleep_deps,
364 .sleepdep_srcs = mpu_wkup_sleep_deps,
365 .flags = CLKDM_CAN_FORCE_WAKEUP | CLKDM_CAN_HWSUP,
366};
367
368static struct clockdomain l3init_54xx_clkdm = {
369 .name = "l3init_clkdm",
370 .pwrdm = { .name = "l3init_pwrdm" },
371 .prcm_partition = OMAP54XX_CM_CORE_PARTITION,
372 .cm_inst = OMAP54XX_CM_CORE_L3INIT_INST,
373 .clkdm_offs = OMAP54XX_CM_CORE_L3INIT_L3INIT_CDOFFS,
374 .dep_bit = OMAP54XX_L3INIT_STATDEP_SHIFT,
375 .wkdep_srcs = l3init_wkup_sleep_deps,
376 .sleepdep_srcs = l3init_wkup_sleep_deps,
377 .flags = CLKDM_CAN_HWSUP_SWSUP,
378};
379
380static struct clockdomain dma_54xx_clkdm = {
381 .name = "dma_clkdm",
382 .pwrdm = { .name = "core_pwrdm" },
383 .prcm_partition = OMAP54XX_CM_CORE_PARTITION,
384 .cm_inst = OMAP54XX_CM_CORE_CORE_INST,
385 .clkdm_offs = OMAP54XX_CM_CORE_CORE_DMA_CDOFFS,
386 .wkdep_srcs = dma_wkup_sleep_deps,
387 .sleepdep_srcs = dma_wkup_sleep_deps,
388 .flags = CLKDM_CAN_FORCE_WAKEUP | CLKDM_CAN_HWSUP,
389};
390
391static struct clockdomain l3instr_54xx_clkdm = {
392 .name = "l3instr_clkdm",
393 .pwrdm = { .name = "core_pwrdm" },
394 .prcm_partition = OMAP54XX_CM_CORE_PARTITION,
395 .cm_inst = OMAP54XX_CM_CORE_CORE_INST,
396 .clkdm_offs = OMAP54XX_CM_CORE_CORE_L3INSTR_CDOFFS,
397};
398
399static struct clockdomain emif_54xx_clkdm = {
400 .name = "emif_clkdm",
401 .pwrdm = { .name = "core_pwrdm" },
402 .prcm_partition = OMAP54XX_CM_CORE_PARTITION,
403 .cm_inst = OMAP54XX_CM_CORE_CORE_INST,
404 .clkdm_offs = OMAP54XX_CM_CORE_CORE_EMIF_CDOFFS,
405 .dep_bit = OMAP54XX_EMIF_STATDEP_SHIFT,
406 .flags = CLKDM_CAN_FORCE_WAKEUP | CLKDM_CAN_HWSUP,
407};
408
409static struct clockdomain emu_54xx_clkdm = {
410 .name = "emu_clkdm",
411 .pwrdm = { .name = "emu_pwrdm" },
412 .prcm_partition = OMAP54XX_PRM_PARTITION,
413 .cm_inst = OMAP54XX_PRM_EMU_CM_INST,
414 .clkdm_offs = OMAP54XX_PRM_EMU_CM_EMU_CDOFFS,
415 .flags = CLKDM_CAN_FORCE_WAKEUP | CLKDM_CAN_HWSUP,
416};
417
418static struct clockdomain cam_54xx_clkdm = {
419 .name = "cam_clkdm",
420 .pwrdm = { .name = "cam_pwrdm" },
421 .prcm_partition = OMAP54XX_CM_CORE_PARTITION,
422 .cm_inst = OMAP54XX_CM_CORE_CAM_INST,
423 .clkdm_offs = OMAP54XX_CM_CORE_CAM_CAM_CDOFFS,
424 .wkdep_srcs = cam_wkup_sleep_deps,
425 .sleepdep_srcs = cam_wkup_sleep_deps,
426 .flags = CLKDM_CAN_HWSUP_SWSUP,
427};
428
429/* As clockdomains are added or removed above, this list must also be changed */
430static struct clockdomain *clockdomains_omap54xx[] __initdata = {
431 &l4sec_54xx_clkdm,
432 &iva_54xx_clkdm,
433 &mipiext_54xx_clkdm,
434 &l3main2_54xx_clkdm,
435 &l3main1_54xx_clkdm,
436 &custefuse_54xx_clkdm,
437 &ipu_54xx_clkdm,
438 &l4cfg_54xx_clkdm,
439 &abe_54xx_clkdm,
440 &dss_54xx_clkdm,
441 &dsp_54xx_clkdm,
442 &c2c_54xx_clkdm,
443 &l4per_54xx_clkdm,
444 &gpu_54xx_clkdm,
445 &wkupaon_54xx_clkdm,
446 &mpu0_54xx_clkdm,
447 &mpu1_54xx_clkdm,
448 &coreaon_54xx_clkdm,
449 &mpu_54xx_clkdm,
450 &l3init_54xx_clkdm,
451 &dma_54xx_clkdm,
452 &l3instr_54xx_clkdm,
453 &emif_54xx_clkdm,
454 &emu_54xx_clkdm,
455 &cam_54xx_clkdm,
456 NULL
457};
458
459void __init omap54xx_clockdomains_init(void)
460{
461 clkdm_register_platform_funcs(&omap4_clkdm_operations);
462 clkdm_register_clkdms(clockdomains_omap54xx);
463 clkdm_complete_init();
464}
diff --git a/arch/arm/mach-omap2/cm-regbits-54xx.h b/arch/arm/mach-omap2/cm-regbits-54xx.h
new file mode 100644
index 000000000000..e83b8e352b6e
--- /dev/null
+++ b/arch/arm/mach-omap2/cm-regbits-54xx.h
@@ -0,0 +1,1737 @@
1/*
2 * OMAP54xx Clock Management register bits
3 *
4 * Copyright (C) 2013 Texas Instruments Incorporated - http://www.ti.com
5 *
6 * Paul Walmsley (paul@pwsan.com)
7 * Rajendra Nayak (rnayak@ti.com)
8 * Benoit Cousson (b-cousson@ti.com)
9 *
10 * This file is automatically generated from the OMAP hardware databases.
11 * We respectfully ask that any modifications to this file be coordinated
12 * with the public linux-omap@vger.kernel.org mailing list and the
13 * authors above to ensure that the autogeneration scripts are kept
14 * up-to-date with the file contents.
15 *
16 * This program is free software; you can redistribute it and/or modify
17 * it under the terms of the GNU General Public License version 2 as
18 * published by the Free Software Foundation.
19 */
20
21#ifndef __ARCH_ARM_MACH_OMAP2_CM_REGBITS_54XX_H
22#define __ARCH_ARM_MACH_OMAP2_CM_REGBITS_54XX_H
23
24/* Used by CM_DSP_DYNAMICDEP, CM_L3MAIN1_DYNAMICDEP, CM_MPU_DYNAMICDEP */
25#define OMAP54XX_ABE_DYNDEP_SHIFT 3
26#define OMAP54XX_ABE_DYNDEP_WIDTH 0x1
27#define OMAP54XX_ABE_DYNDEP_MASK (1 << 3)
28
29/*
30 * Used by CM_C2C_STATICDEP, CM_DMA_STATICDEP, CM_DSP_STATICDEP,
31 * CM_IPU_STATICDEP, CM_L3INIT_STATICDEP, CM_MIPIEXT_STATICDEP, CM_MPU_STATICDEP
32 */
33#define OMAP54XX_ABE_STATDEP_SHIFT 3
34#define OMAP54XX_ABE_STATDEP_WIDTH 0x1
35#define OMAP54XX_ABE_STATDEP_MASK (1 << 3)
36
37/*
38 * Used by CM_AUTOIDLE_DPLL_ABE, CM_AUTOIDLE_DPLL_CORE, CM_AUTOIDLE_DPLL_IVA,
39 * CM_AUTOIDLE_DPLL_MPU, CM_AUTOIDLE_DPLL_PER, CM_AUTOIDLE_DPLL_UNIPRO1,
40 * CM_AUTOIDLE_DPLL_UNIPRO2, CM_AUTOIDLE_DPLL_USB
41 */
42#define OMAP54XX_AUTO_DPLL_MODE_SHIFT 0
43#define OMAP54XX_AUTO_DPLL_MODE_WIDTH 0x3
44#define OMAP54XX_AUTO_DPLL_MODE_MASK (0x7 << 0)
45
46/* Used by CM_L3MAIN2_DYNAMICDEP, CM_L4CFG_DYNAMICDEP */
47#define OMAP54XX_C2C_DYNDEP_SHIFT 18
48#define OMAP54XX_C2C_DYNDEP_WIDTH 0x1
49#define OMAP54XX_C2C_DYNDEP_MASK (1 << 18)
50
51/* Used by CM_MPU_STATICDEP */
52#define OMAP54XX_C2C_STATDEP_SHIFT 18
53#define OMAP54XX_C2C_STATDEP_WIDTH 0x1
54#define OMAP54XX_C2C_STATDEP_MASK (1 << 18)
55
56/* Used by CM_IPU_DYNAMICDEP, CM_L3MAIN2_DYNAMICDEP, CM_L4CFG_DYNAMICDEP */
57#define OMAP54XX_CAM_DYNDEP_SHIFT 9
58#define OMAP54XX_CAM_DYNDEP_WIDTH 0x1
59#define OMAP54XX_CAM_DYNDEP_MASK (1 << 9)
60
61/*
62 * Used by CM_DMA_STATICDEP, CM_DSP_STATICDEP, CM_IPU_STATICDEP,
63 * CM_MPU_STATICDEP
64 */
65#define OMAP54XX_CAM_STATDEP_SHIFT 9
66#define OMAP54XX_CAM_STATDEP_WIDTH 0x1
67#define OMAP54XX_CAM_STATDEP_MASK (1 << 9)
68
69/* Used by CM_ABE_CLKSTCTRL */
70#define OMAP54XX_CLKACTIVITY_ABE_24M_GFCLK_SHIFT 13
71#define OMAP54XX_CLKACTIVITY_ABE_24M_GFCLK_WIDTH 0x1
72#define OMAP54XX_CLKACTIVITY_ABE_24M_GFCLK_MASK (1 << 13)
73
74/* Used by CM_ABE_CLKSTCTRL */
75#define OMAP54XX_CLKACTIVITY_ABE_32K_CLK_SHIFT 12
76#define OMAP54XX_CLKACTIVITY_ABE_32K_CLK_WIDTH 0x1
77#define OMAP54XX_CLKACTIVITY_ABE_32K_CLK_MASK (1 << 12)
78
79/* Used by CM_ABE_CLKSTCTRL */
80#define OMAP54XX_CLKACTIVITY_ABE_GICLK_SHIFT 9
81#define OMAP54XX_CLKACTIVITY_ABE_GICLK_WIDTH 0x1
82#define OMAP54XX_CLKACTIVITY_ABE_GICLK_MASK (1 << 9)
83
84/* Used by CM_WKUPAON_CLKSTCTRL */
85#define OMAP54XX_CLKACTIVITY_ABE_LP_CLK_SHIFT 9
86#define OMAP54XX_CLKACTIVITY_ABE_LP_CLK_WIDTH 0x1
87#define OMAP54XX_CLKACTIVITY_ABE_LP_CLK_MASK (1 << 9)
88
89/* Used by CM_ABE_CLKSTCTRL */
90#define OMAP54XX_CLKACTIVITY_ABE_SYS_CLK_SHIFT 11
91#define OMAP54XX_CLKACTIVITY_ABE_SYS_CLK_WIDTH 0x1
92#define OMAP54XX_CLKACTIVITY_ABE_SYS_CLK_MASK (1 << 11)
93
94/* Used by CM_ABE_CLKSTCTRL */
95#define OMAP54XX_CLKACTIVITY_ABE_X2_CLK_SHIFT 8
96#define OMAP54XX_CLKACTIVITY_ABE_X2_CLK_WIDTH 0x1
97#define OMAP54XX_CLKACTIVITY_ABE_X2_CLK_MASK (1 << 8)
98
99/* Used by CM_DSS_CLKSTCTRL */
100#define OMAP54XX_CLKACTIVITY_BB2D_GFCLK_SHIFT 13
101#define OMAP54XX_CLKACTIVITY_BB2D_GFCLK_WIDTH 0x1
102#define OMAP54XX_CLKACTIVITY_BB2D_GFCLK_MASK (1 << 13)
103
104/* Used by CM_C2C_CLKSTCTRL */
105#define OMAP54XX_CLKACTIVITY_C2C_GFCLK_SHIFT 9
106#define OMAP54XX_CLKACTIVITY_C2C_GFCLK_WIDTH 0x1
107#define OMAP54XX_CLKACTIVITY_C2C_GFCLK_MASK (1 << 9)
108
109/* Used by CM_C2C_CLKSTCTRL */
110#define OMAP54XX_CLKACTIVITY_C2C_GICLK_SHIFT 10
111#define OMAP54XX_CLKACTIVITY_C2C_GICLK_WIDTH 0x1
112#define OMAP54XX_CLKACTIVITY_C2C_GICLK_MASK (1 << 10)
113
114/* Used by CM_C2C_CLKSTCTRL */
115#define OMAP54XX_CLKACTIVITY_C2C_L4_GICLK_SHIFT 8
116#define OMAP54XX_CLKACTIVITY_C2C_L4_GICLK_WIDTH 0x1
117#define OMAP54XX_CLKACTIVITY_C2C_L4_GICLK_MASK (1 << 8)
118
119/* Used by CM_CAM_CLKSTCTRL */
120#define OMAP54XX_CLKACTIVITY_CAM_BOOST_GCLK_SHIFT 11
121#define OMAP54XX_CLKACTIVITY_CAM_BOOST_GCLK_WIDTH 0x1
122#define OMAP54XX_CLKACTIVITY_CAM_BOOST_GCLK_MASK (1 << 11)
123
124/* Used by CM_CAM_CLKSTCTRL */
125#define OMAP54XX_CLKACTIVITY_CAM_GCLK_SHIFT 8
126#define OMAP54XX_CLKACTIVITY_CAM_GCLK_WIDTH 0x1
127#define OMAP54XX_CLKACTIVITY_CAM_GCLK_MASK (1 << 8)
128
129/* Used by CM_CAM_CLKSTCTRL */
130#define OMAP54XX_CLKACTIVITY_CAM_L3_GICLK_SHIFT 12
131#define OMAP54XX_CLKACTIVITY_CAM_L3_GICLK_WIDTH 0x1
132#define OMAP54XX_CLKACTIVITY_CAM_L3_GICLK_MASK (1 << 12)
133
134/* Used by CM_COREAON_CLKSTCTRL */
135#define OMAP54XX_CLKACTIVITY_COREAON_32K_GFCLK_SHIFT 12
136#define OMAP54XX_CLKACTIVITY_COREAON_32K_GFCLK_WIDTH 0x1
137#define OMAP54XX_CLKACTIVITY_COREAON_32K_GFCLK_MASK (1 << 12)
138
139/* Used by CM_COREAON_CLKSTCTRL */
140#define OMAP54XX_CLKACTIVITY_COREAON_IO_SRCOMP_GFCLK_SHIFT 14
141#define OMAP54XX_CLKACTIVITY_COREAON_IO_SRCOMP_GFCLK_WIDTH 0x1
142#define OMAP54XX_CLKACTIVITY_COREAON_IO_SRCOMP_GFCLK_MASK (1 << 14)
143
144/* Used by CM_COREAON_CLKSTCTRL */
145#define OMAP54XX_CLKACTIVITY_COREAON_L4_GICLK_SHIFT 8
146#define OMAP54XX_CLKACTIVITY_COREAON_L4_GICLK_WIDTH 0x1
147#define OMAP54XX_CLKACTIVITY_COREAON_L4_GICLK_MASK (1 << 8)
148
149/* Used by CM_CAM_CLKSTCTRL */
150#define OMAP54XX_CLKACTIVITY_CSI_PHY_GFCLK_SHIFT 9
151#define OMAP54XX_CLKACTIVITY_CSI_PHY_GFCLK_WIDTH 0x1
152#define OMAP54XX_CLKACTIVITY_CSI_PHY_GFCLK_MASK (1 << 9)
153
154/* Used by CM_CUSTEFUSE_CLKSTCTRL */
155#define OMAP54XX_CLKACTIVITY_CUSTEFUSE_L4_GICLK_SHIFT 8
156#define OMAP54XX_CLKACTIVITY_CUSTEFUSE_L4_GICLK_WIDTH 0x1
157#define OMAP54XX_CLKACTIVITY_CUSTEFUSE_L4_GICLK_MASK (1 << 8)
158
159/* Used by CM_CUSTEFUSE_CLKSTCTRL */
160#define OMAP54XX_CLKACTIVITY_CUSTEFUSE_SYS_GFCLK_SHIFT 9
161#define OMAP54XX_CLKACTIVITY_CUSTEFUSE_SYS_GFCLK_WIDTH 0x1
162#define OMAP54XX_CLKACTIVITY_CUSTEFUSE_SYS_GFCLK_MASK (1 << 9)
163
164/* Used by CM_EMIF_CLKSTCTRL */
165#define OMAP54XX_CLKACTIVITY_DLL_GCLK_SHIFT 9
166#define OMAP54XX_CLKACTIVITY_DLL_GCLK_WIDTH 0x1
167#define OMAP54XX_CLKACTIVITY_DLL_GCLK_MASK (1 << 9)
168
169/* Used by CM_DMA_CLKSTCTRL */
170#define OMAP54XX_CLKACTIVITY_DMA_L3_GICLK_SHIFT 8
171#define OMAP54XX_CLKACTIVITY_DMA_L3_GICLK_WIDTH 0x1
172#define OMAP54XX_CLKACTIVITY_DMA_L3_GICLK_MASK (1 << 8)
173
174/* Used by CM_DSP_CLKSTCTRL */
175#define OMAP54XX_CLKACTIVITY_DSP_GCLK_SHIFT 8
176#define OMAP54XX_CLKACTIVITY_DSP_GCLK_WIDTH 0x1
177#define OMAP54XX_CLKACTIVITY_DSP_GCLK_MASK (1 << 8)
178
179/* Used by CM_DSS_CLKSTCTRL */
180#define OMAP54XX_CLKACTIVITY_DSS_GFCLK_SHIFT 9
181#define OMAP54XX_CLKACTIVITY_DSS_GFCLK_WIDTH 0x1
182#define OMAP54XX_CLKACTIVITY_DSS_GFCLK_MASK (1 << 9)
183
184/* Used by CM_DSS_CLKSTCTRL */
185#define OMAP54XX_CLKACTIVITY_DSS_L3_GICLK_SHIFT 8
186#define OMAP54XX_CLKACTIVITY_DSS_L3_GICLK_WIDTH 0x1
187#define OMAP54XX_CLKACTIVITY_DSS_L3_GICLK_MASK (1 << 8)
188
189/* Used by CM_DSS_CLKSTCTRL */
190#define OMAP54XX_CLKACTIVITY_DSS_SYS_GFCLK_SHIFT 10
191#define OMAP54XX_CLKACTIVITY_DSS_SYS_GFCLK_WIDTH 0x1
192#define OMAP54XX_CLKACTIVITY_DSS_SYS_GFCLK_MASK (1 << 10)
193
194/* Used by CM_EMIF_CLKSTCTRL */
195#define OMAP54XX_CLKACTIVITY_EMIF_L3_GICLK_SHIFT 8
196#define OMAP54XX_CLKACTIVITY_EMIF_L3_GICLK_WIDTH 0x1
197#define OMAP54XX_CLKACTIVITY_EMIF_L3_GICLK_MASK (1 << 8)
198
199/* Used by CM_EMIF_CLKSTCTRL */
200#define OMAP54XX_CLKACTIVITY_EMIF_LL_GCLK_SHIFT 11
201#define OMAP54XX_CLKACTIVITY_EMIF_LL_GCLK_WIDTH 0x1
202#define OMAP54XX_CLKACTIVITY_EMIF_LL_GCLK_MASK (1 << 11)
203
204/* Used by CM_EMIF_CLKSTCTRL */
205#define OMAP54XX_CLKACTIVITY_EMIF_PHY_GCLK_SHIFT 10
206#define OMAP54XX_CLKACTIVITY_EMIF_PHY_GCLK_WIDTH 0x1
207#define OMAP54XX_CLKACTIVITY_EMIF_PHY_GCLK_MASK (1 << 10)
208
209/* Used by CM_EMU_CLKSTCTRL */
210#define OMAP54XX_CLKACTIVITY_EMU_SYS_GCLK_SHIFT 8
211#define OMAP54XX_CLKACTIVITY_EMU_SYS_GCLK_WIDTH 0x1
212#define OMAP54XX_CLKACTIVITY_EMU_SYS_GCLK_MASK (1 << 8)
213
214/* Used by CM_CAM_CLKSTCTRL */
215#define OMAP54XX_CLKACTIVITY_FDIF_GCLK_SHIFT 10
216#define OMAP54XX_CLKACTIVITY_FDIF_GCLK_WIDTH 0x1
217#define OMAP54XX_CLKACTIVITY_FDIF_GCLK_MASK (1 << 10)
218
219/* Used by CM_ABE_CLKSTCTRL */
220#define OMAP54XX_CLKACTIVITY_FUNC_24M_GFCLK_SHIFT 10
221#define OMAP54XX_CLKACTIVITY_FUNC_24M_GFCLK_WIDTH 0x1
222#define OMAP54XX_CLKACTIVITY_FUNC_24M_GFCLK_MASK (1 << 10)
223
224/* Used by CM_GPU_CLKSTCTRL */
225#define OMAP54XX_CLKACTIVITY_GPU_CORE_GCLK_SHIFT 9
226#define OMAP54XX_CLKACTIVITY_GPU_CORE_GCLK_WIDTH 0x1
227#define OMAP54XX_CLKACTIVITY_GPU_CORE_GCLK_MASK (1 << 9)
228
229/* Used by CM_GPU_CLKSTCTRL */
230#define OMAP54XX_CLKACTIVITY_GPU_HYD_GCLK_SHIFT 10
231#define OMAP54XX_CLKACTIVITY_GPU_HYD_GCLK_WIDTH 0x1
232#define OMAP54XX_CLKACTIVITY_GPU_HYD_GCLK_MASK (1 << 10)
233
234/* Used by CM_GPU_CLKSTCTRL */
235#define OMAP54XX_CLKACTIVITY_GPU_SYS_GCLK_SHIFT 8
236#define OMAP54XX_CLKACTIVITY_GPU_SYS_GCLK_WIDTH 0x1
237#define OMAP54XX_CLKACTIVITY_GPU_SYS_GCLK_MASK (1 << 8)
238
239/* Used by CM_DSS_CLKSTCTRL */
240#define OMAP54XX_CLKACTIVITY_HDMI_CEC_GFCLK_SHIFT 12
241#define OMAP54XX_CLKACTIVITY_HDMI_CEC_GFCLK_WIDTH 0x1
242#define OMAP54XX_CLKACTIVITY_HDMI_CEC_GFCLK_MASK (1 << 12)
243
244/* Used by CM_DSS_CLKSTCTRL */
245#define OMAP54XX_CLKACTIVITY_HDMI_PHY_GFCLK_SHIFT 11
246#define OMAP54XX_CLKACTIVITY_HDMI_PHY_GFCLK_WIDTH 0x1
247#define OMAP54XX_CLKACTIVITY_HDMI_PHY_GFCLK_MASK (1 << 11)
248
249/* Used by CM_L3INIT_CLKSTCTRL */
250#define OMAP54XX_CLKACTIVITY_HSIC_P1_480M_GFCLK_SHIFT 20
251#define OMAP54XX_CLKACTIVITY_HSIC_P1_480M_GFCLK_WIDTH 0x1
252#define OMAP54XX_CLKACTIVITY_HSIC_P1_480M_GFCLK_MASK (1 << 20)
253
254/* Used by CM_L3INIT_CLKSTCTRL */
255#define OMAP54XX_CLKACTIVITY_HSIC_P1_GFCLK_SHIFT 26
256#define OMAP54XX_CLKACTIVITY_HSIC_P1_GFCLK_WIDTH 0x1
257#define OMAP54XX_CLKACTIVITY_HSIC_P1_GFCLK_MASK (1 << 26)
258
259/* Used by CM_L3INIT_CLKSTCTRL */
260#define OMAP54XX_CLKACTIVITY_HSIC_P2_480M_GFCLK_SHIFT 21
261#define OMAP54XX_CLKACTIVITY_HSIC_P2_480M_GFCLK_WIDTH 0x1
262#define OMAP54XX_CLKACTIVITY_HSIC_P2_480M_GFCLK_MASK (1 << 21)
263
264/* Used by CM_L3INIT_CLKSTCTRL */
265#define OMAP54XX_CLKACTIVITY_HSIC_P2_GFCLK_SHIFT 27
266#define OMAP54XX_CLKACTIVITY_HSIC_P2_GFCLK_WIDTH 0x1
267#define OMAP54XX_CLKACTIVITY_HSIC_P2_GFCLK_MASK (1 << 27)
268
269/* Used by CM_L3INIT_CLKSTCTRL */
270#define OMAP54XX_CLKACTIVITY_HSIC_P3_480M_GFCLK_SHIFT 6
271#define OMAP54XX_CLKACTIVITY_HSIC_P3_480M_GFCLK_WIDTH 0x1
272#define OMAP54XX_CLKACTIVITY_HSIC_P3_480M_GFCLK_MASK (1 << 6)
273
274/* Used by CM_L3INIT_CLKSTCTRL */
275#define OMAP54XX_CLKACTIVITY_HSIC_P3_GFCLK_SHIFT 7
276#define OMAP54XX_CLKACTIVITY_HSIC_P3_GFCLK_WIDTH 0x1
277#define OMAP54XX_CLKACTIVITY_HSIC_P3_GFCLK_MASK (1 << 7)
278
279/* Used by CM_L3INIT_CLKSTCTRL */
280#define OMAP54XX_CLKACTIVITY_HSI_GFCLK_SHIFT 16
281#define OMAP54XX_CLKACTIVITY_HSI_GFCLK_WIDTH 0x1
282#define OMAP54XX_CLKACTIVITY_HSI_GFCLK_MASK (1 << 16)
283
284/* Used by CM_IPU_CLKSTCTRL */
285#define OMAP54XX_CLKACTIVITY_IPU_GCLK_SHIFT 8
286#define OMAP54XX_CLKACTIVITY_IPU_GCLK_WIDTH 0x1
287#define OMAP54XX_CLKACTIVITY_IPU_GCLK_MASK (1 << 8)
288
289/* Used by CM_IVA_CLKSTCTRL */
290#define OMAP54XX_CLKACTIVITY_IVA_GCLK_SHIFT 8
291#define OMAP54XX_CLKACTIVITY_IVA_GCLK_WIDTH 0x1
292#define OMAP54XX_CLKACTIVITY_IVA_GCLK_MASK (1 << 8)
293
294/* Used by CM_L3INIT_CLKSTCTRL */
295#define OMAP54XX_CLKACTIVITY_L3INIT_48M_GFCLK_SHIFT 12
296#define OMAP54XX_CLKACTIVITY_L3INIT_48M_GFCLK_WIDTH 0x1
297#define OMAP54XX_CLKACTIVITY_L3INIT_48M_GFCLK_MASK (1 << 12)
298
299/* Used by CM_L3INIT_CLKSTCTRL */
300#define OMAP54XX_CLKACTIVITY_L3INIT_60M_P1_GFCLK_SHIFT 28
301#define OMAP54XX_CLKACTIVITY_L3INIT_60M_P1_GFCLK_WIDTH 0x1
302#define OMAP54XX_CLKACTIVITY_L3INIT_60M_P1_GFCLK_MASK (1 << 28)
303
304/* Used by CM_L3INIT_CLKSTCTRL */
305#define OMAP54XX_CLKACTIVITY_L3INIT_60M_P2_GFCLK_SHIFT 29
306#define OMAP54XX_CLKACTIVITY_L3INIT_60M_P2_GFCLK_WIDTH 0x1
307#define OMAP54XX_CLKACTIVITY_L3INIT_60M_P2_GFCLK_MASK (1 << 29)
308
309/* Used by CM_L3INIT_CLKSTCTRL */
310#define OMAP54XX_CLKACTIVITY_L3INIT_L3_GICLK_SHIFT 8
311#define OMAP54XX_CLKACTIVITY_L3INIT_L3_GICLK_WIDTH 0x1
312#define OMAP54XX_CLKACTIVITY_L3INIT_L3_GICLK_MASK (1 << 8)
313
314/* Used by CM_L3INIT_CLKSTCTRL */
315#define OMAP54XX_CLKACTIVITY_L3INIT_L4_GICLK_SHIFT 9
316#define OMAP54XX_CLKACTIVITY_L3INIT_L4_GICLK_WIDTH 0x1
317#define OMAP54XX_CLKACTIVITY_L3INIT_L4_GICLK_MASK (1 << 9)
318
319/* Used by CM_L3INIT_CLKSTCTRL */
320#define OMAP54XX_CLKACTIVITY_L3INIT_USB_OTG_SS_LFPS_TX_GFCLK_SHIFT 11
321#define OMAP54XX_CLKACTIVITY_L3INIT_USB_OTG_SS_LFPS_TX_GFCLK_WIDTH 0x1
322#define OMAP54XX_CLKACTIVITY_L3INIT_USB_OTG_SS_LFPS_TX_GFCLK_MASK (1 << 11)
323
324/* Used by CM_L3INSTR_CLKSTCTRL */
325#define OMAP54XX_CLKACTIVITY_L3INSTR_DLL_AGING_GCLK_SHIFT 9
326#define OMAP54XX_CLKACTIVITY_L3INSTR_DLL_AGING_GCLK_WIDTH 0x1
327#define OMAP54XX_CLKACTIVITY_L3INSTR_DLL_AGING_GCLK_MASK (1 << 9)
328
329/* Used by CM_L3INSTR_CLKSTCTRL */
330#define OMAP54XX_CLKACTIVITY_L3INSTR_L3_GICLK_SHIFT 8
331#define OMAP54XX_CLKACTIVITY_L3INSTR_L3_GICLK_WIDTH 0x1
332#define OMAP54XX_CLKACTIVITY_L3INSTR_L3_GICLK_MASK (1 << 8)
333
334/* Used by CM_L3INSTR_CLKSTCTRL */
335#define OMAP54XX_CLKACTIVITY_L3INSTR_TS_GCLK_SHIFT 10
336#define OMAP54XX_CLKACTIVITY_L3INSTR_TS_GCLK_WIDTH 0x1
337#define OMAP54XX_CLKACTIVITY_L3INSTR_TS_GCLK_MASK (1 << 10)
338
339/* Used by CM_L3MAIN1_CLKSTCTRL */
340#define OMAP54XX_CLKACTIVITY_L3MAIN1_L3_GICLK_SHIFT 8
341#define OMAP54XX_CLKACTIVITY_L3MAIN1_L3_GICLK_WIDTH 0x1
342#define OMAP54XX_CLKACTIVITY_L3MAIN1_L3_GICLK_MASK (1 << 8)
343
344/* Used by CM_L3MAIN2_CLKSTCTRL */
345#define OMAP54XX_CLKACTIVITY_L3MAIN2_L3_GICLK_SHIFT 8
346#define OMAP54XX_CLKACTIVITY_L3MAIN2_L3_GICLK_WIDTH 0x1
347#define OMAP54XX_CLKACTIVITY_L3MAIN2_L3_GICLK_MASK (1 << 8)
348
349/* Used by CM_L4CFG_CLKSTCTRL */
350#define OMAP54XX_CLKACTIVITY_L4CFG_L4_GICLK_SHIFT 8
351#define OMAP54XX_CLKACTIVITY_L4CFG_L4_GICLK_WIDTH 0x1
352#define OMAP54XX_CLKACTIVITY_L4CFG_L4_GICLK_MASK (1 << 8)
353
354/* Used by CM_L4PER_CLKSTCTRL */
355#define OMAP54XX_CLKACTIVITY_L4PER_L4_GICLK_SHIFT 8
356#define OMAP54XX_CLKACTIVITY_L4PER_L4_GICLK_WIDTH 0x1
357#define OMAP54XX_CLKACTIVITY_L4PER_L4_GICLK_MASK (1 << 8)
358
359/* Used by CM_L4SEC_CLKSTCTRL */
360#define OMAP54XX_CLKACTIVITY_L4SEC_L3_GICLK_SHIFT 8
361#define OMAP54XX_CLKACTIVITY_L4SEC_L3_GICLK_WIDTH 0x1
362#define OMAP54XX_CLKACTIVITY_L4SEC_L3_GICLK_MASK (1 << 8)
363
364/* Used by CM_L4SEC_CLKSTCTRL */
365#define OMAP54XX_CLKACTIVITY_L4SEC_L4_GICLK_SHIFT 9
366#define OMAP54XX_CLKACTIVITY_L4SEC_L4_GICLK_WIDTH 0x1
367#define OMAP54XX_CLKACTIVITY_L4SEC_L4_GICLK_MASK (1 << 9)
368
369/* Used by CM_MIPIEXT_CLKSTCTRL */
370#define OMAP54XX_CLKACTIVITY_MIPIEXT_L3_GICLK_SHIFT 8
371#define OMAP54XX_CLKACTIVITY_MIPIEXT_L3_GICLK_WIDTH 0x1
372#define OMAP54XX_CLKACTIVITY_MIPIEXT_L3_GICLK_MASK (1 << 8)
373
374/* Used by CM_MIPIEXT_CLKSTCTRL */
375#define OMAP54XX_CLKACTIVITY_MIPIEXT_PHY_REF_GFCLK_SHIFT 11
376#define OMAP54XX_CLKACTIVITY_MIPIEXT_PHY_REF_GFCLK_WIDTH 0x1
377#define OMAP54XX_CLKACTIVITY_MIPIEXT_PHY_REF_GFCLK_MASK (1 << 11)
378
379/* Used by CM_L3INIT_CLKSTCTRL */
380#define OMAP54XX_CLKACTIVITY_MMC1_32K_GFCLK_SHIFT 2
381#define OMAP54XX_CLKACTIVITY_MMC1_32K_GFCLK_WIDTH 0x1
382#define OMAP54XX_CLKACTIVITY_MMC1_32K_GFCLK_MASK (1 << 2)
383
384/* Used by CM_L3INIT_CLKSTCTRL */
385#define OMAP54XX_CLKACTIVITY_MMC1_GFCLK_SHIFT 17
386#define OMAP54XX_CLKACTIVITY_MMC1_GFCLK_WIDTH 0x1
387#define OMAP54XX_CLKACTIVITY_MMC1_GFCLK_MASK (1 << 17)
388
389/* Used by CM_L3INIT_CLKSTCTRL */
390#define OMAP54XX_CLKACTIVITY_MMC2_GFCLK_SHIFT 18
391#define OMAP54XX_CLKACTIVITY_MMC2_GFCLK_WIDTH 0x1
392#define OMAP54XX_CLKACTIVITY_MMC2_GFCLK_MASK (1 << 18)
393
394/* Used by CM_MPU_CLKSTCTRL */
395#define OMAP54XX_CLKACTIVITY_MPU_GCLK_SHIFT 8
396#define OMAP54XX_CLKACTIVITY_MPU_GCLK_WIDTH 0x1
397#define OMAP54XX_CLKACTIVITY_MPU_GCLK_MASK (1 << 8)
398
399/* Used by CM_ABE_CLKSTCTRL */
400#define OMAP54XX_CLKACTIVITY_PAD_CLKS_SHIFT 14
401#define OMAP54XX_CLKACTIVITY_PAD_CLKS_WIDTH 0x1
402#define OMAP54XX_CLKACTIVITY_PAD_CLKS_MASK (1 << 14)
403
404/* Used by CM_ABE_CLKSTCTRL */
405#define OMAP54XX_CLKACTIVITY_PAD_SLIMBUS1_CLK_SHIFT 15
406#define OMAP54XX_CLKACTIVITY_PAD_SLIMBUS1_CLK_WIDTH 0x1
407#define OMAP54XX_CLKACTIVITY_PAD_SLIMBUS1_CLK_MASK (1 << 15)
408
409/* Used by CM_L3INIT_CLKSTCTRL */
410#define OMAP54XX_CLKACTIVITY_PAD_XCLK60MHSP1_SHIFT 3
411#define OMAP54XX_CLKACTIVITY_PAD_XCLK60MHSP1_WIDTH 0x1
412#define OMAP54XX_CLKACTIVITY_PAD_XCLK60MHSP1_MASK (1 << 3)
413
414/* Used by CM_L3INIT_CLKSTCTRL */
415#define OMAP54XX_CLKACTIVITY_PAD_XCLK60MHSP2_SHIFT 4
416#define OMAP54XX_CLKACTIVITY_PAD_XCLK60MHSP2_WIDTH 0x1
417#define OMAP54XX_CLKACTIVITY_PAD_XCLK60MHSP2_MASK (1 << 4)
418
419/* Used by CM_L4PER_CLKSTCTRL */
420#define OMAP54XX_CLKACTIVITY_PER_12M_GFCLK_SHIFT 15
421#define OMAP54XX_CLKACTIVITY_PER_12M_GFCLK_WIDTH 0x1
422#define OMAP54XX_CLKACTIVITY_PER_12M_GFCLK_MASK (1 << 15)
423
424/* Used by CM_L4PER_CLKSTCTRL */
425#define OMAP54XX_CLKACTIVITY_PER_32K_GFCLK_SHIFT 17
426#define OMAP54XX_CLKACTIVITY_PER_32K_GFCLK_WIDTH 0x1
427#define OMAP54XX_CLKACTIVITY_PER_32K_GFCLK_MASK (1 << 17)
428
429/* Used by CM_L4PER_CLKSTCTRL */
430#define OMAP54XX_CLKACTIVITY_PER_48M_GFCLK_SHIFT 18
431#define OMAP54XX_CLKACTIVITY_PER_48M_GFCLK_WIDTH 0x1
432#define OMAP54XX_CLKACTIVITY_PER_48M_GFCLK_MASK (1 << 18)
433
434/* Used by CM_L4PER_CLKSTCTRL */
435#define OMAP54XX_CLKACTIVITY_PER_96M_GFCLK_SHIFT 19
436#define OMAP54XX_CLKACTIVITY_PER_96M_GFCLK_WIDTH 0x1
437#define OMAP54XX_CLKACTIVITY_PER_96M_GFCLK_MASK (1 << 19)
438
439/* Used by CM_L3INIT_CLKSTCTRL */
440#define OMAP54XX_CLKACTIVITY_SATA_REF_GFCLK_SHIFT 19
441#define OMAP54XX_CLKACTIVITY_SATA_REF_GFCLK_WIDTH 0x1
442#define OMAP54XX_CLKACTIVITY_SATA_REF_GFCLK_MASK (1 << 19)
443
444/* Used by CM_COREAON_CLKSTCTRL */
445#define OMAP54XX_CLKACTIVITY_SR_CORE_SYS_GFCLK_SHIFT 11
446#define OMAP54XX_CLKACTIVITY_SR_CORE_SYS_GFCLK_WIDTH 0x1
447#define OMAP54XX_CLKACTIVITY_SR_CORE_SYS_GFCLK_MASK (1 << 11)
448
449/* Used by CM_COREAON_CLKSTCTRL */
450#define OMAP54XX_CLKACTIVITY_SR_MM_SYS_GFCLK_SHIFT 10
451#define OMAP54XX_CLKACTIVITY_SR_MM_SYS_GFCLK_WIDTH 0x1
452#define OMAP54XX_CLKACTIVITY_SR_MM_SYS_GFCLK_MASK (1 << 10)
453
454/* Used by CM_COREAON_CLKSTCTRL */
455#define OMAP54XX_CLKACTIVITY_SR_MPU_SYS_GFCLK_SHIFT 9
456#define OMAP54XX_CLKACTIVITY_SR_MPU_SYS_GFCLK_WIDTH 0x1
457#define OMAP54XX_CLKACTIVITY_SR_MPU_SYS_GFCLK_MASK (1 << 9)
458
459/* Used by CM_WKUPAON_CLKSTCTRL */
460#define OMAP54XX_CLKACTIVITY_SYS_CLK_SHIFT 8
461#define OMAP54XX_CLKACTIVITY_SYS_CLK_WIDTH 0x1
462#define OMAP54XX_CLKACTIVITY_SYS_CLK_MASK (1 << 8)
463
464/* Used by CM_WKUPAON_CLKSTCTRL */
465#define OMAP54XX_CLKACTIVITY_SYS_CLK_ALL_SHIFT 15
466#define OMAP54XX_CLKACTIVITY_SYS_CLK_ALL_WIDTH 0x1
467#define OMAP54XX_CLKACTIVITY_SYS_CLK_ALL_MASK (1 << 15)
468
469/* Used by CM_WKUPAON_CLKSTCTRL */
470#define OMAP54XX_CLKACTIVITY_SYS_CLK_FUNC_SHIFT 14
471#define OMAP54XX_CLKACTIVITY_SYS_CLK_FUNC_WIDTH 0x1
472#define OMAP54XX_CLKACTIVITY_SYS_CLK_FUNC_MASK (1 << 14)
473
474/* Used by CM_L4PER_CLKSTCTRL */
475#define OMAP54XX_CLKACTIVITY_TIMER10_GFCLK_SHIFT 9
476#define OMAP54XX_CLKACTIVITY_TIMER10_GFCLK_WIDTH 0x1
477#define OMAP54XX_CLKACTIVITY_TIMER10_GFCLK_MASK (1 << 9)
478
479/* Used by CM_L4PER_CLKSTCTRL */
480#define OMAP54XX_CLKACTIVITY_TIMER11_GFCLK_SHIFT 10
481#define OMAP54XX_CLKACTIVITY_TIMER11_GFCLK_WIDTH 0x1
482#define OMAP54XX_CLKACTIVITY_TIMER11_GFCLK_MASK (1 << 10)
483
484/* Used by CM_L4PER_CLKSTCTRL */
485#define OMAP54XX_CLKACTIVITY_TIMER2_GFCLK_SHIFT 11
486#define OMAP54XX_CLKACTIVITY_TIMER2_GFCLK_WIDTH 0x1
487#define OMAP54XX_CLKACTIVITY_TIMER2_GFCLK_MASK (1 << 11)
488
489/* Used by CM_L4PER_CLKSTCTRL */
490#define OMAP54XX_CLKACTIVITY_TIMER3_GFCLK_SHIFT 12
491#define OMAP54XX_CLKACTIVITY_TIMER3_GFCLK_WIDTH 0x1
492#define OMAP54XX_CLKACTIVITY_TIMER3_GFCLK_MASK (1 << 12)
493
494/* Used by CM_L4PER_CLKSTCTRL */
495#define OMAP54XX_CLKACTIVITY_TIMER4_GFCLK_SHIFT 13
496#define OMAP54XX_CLKACTIVITY_TIMER4_GFCLK_WIDTH 0x1
497#define OMAP54XX_CLKACTIVITY_TIMER4_GFCLK_MASK (1 << 13)
498
499/* Used by CM_L4PER_CLKSTCTRL */
500#define OMAP54XX_CLKACTIVITY_TIMER9_GFCLK_SHIFT 14
501#define OMAP54XX_CLKACTIVITY_TIMER9_GFCLK_WIDTH 0x1
502#define OMAP54XX_CLKACTIVITY_TIMER9_GFCLK_MASK (1 << 14)
503
504/* Used by CM_L3INIT_CLKSTCTRL */
505#define OMAP54XX_CLKACTIVITY_TLL_CH0_GFCLK_SHIFT 22
506#define OMAP54XX_CLKACTIVITY_TLL_CH0_GFCLK_WIDTH 0x1
507#define OMAP54XX_CLKACTIVITY_TLL_CH0_GFCLK_MASK (1 << 22)
508
509/* Used by CM_L3INIT_CLKSTCTRL */
510#define OMAP54XX_CLKACTIVITY_TLL_CH1_GFCLK_SHIFT 23
511#define OMAP54XX_CLKACTIVITY_TLL_CH1_GFCLK_WIDTH 0x1
512#define OMAP54XX_CLKACTIVITY_TLL_CH1_GFCLK_MASK (1 << 23)
513
514/* Used by CM_L3INIT_CLKSTCTRL */
515#define OMAP54XX_CLKACTIVITY_TLL_CH2_GFCLK_SHIFT 24
516#define OMAP54XX_CLKACTIVITY_TLL_CH2_GFCLK_WIDTH 0x1
517#define OMAP54XX_CLKACTIVITY_TLL_CH2_GFCLK_MASK (1 << 24)
518
519/* Used by CM_MIPIEXT_CLKSTCTRL */
520#define OMAP54XX_CLKACTIVITY_UNIPRO1_DPLL_CLK_SHIFT 10
521#define OMAP54XX_CLKACTIVITY_UNIPRO1_DPLL_CLK_WIDTH 0x1
522#define OMAP54XX_CLKACTIVITY_UNIPRO1_DPLL_CLK_MASK (1 << 10)
523
524/* Used by CM_MIPIEXT_CLKSTCTRL */
525#define OMAP54XX_CLKACTIVITY_UNIPRO1_PHY_GFCLK_SHIFT 13
526#define OMAP54XX_CLKACTIVITY_UNIPRO1_PHY_GFCLK_WIDTH 0x1
527#define OMAP54XX_CLKACTIVITY_UNIPRO1_PHY_GFCLK_MASK (1 << 13)
528
529/* Used by CM_MIPIEXT_CLKSTCTRL */
530#define OMAP54XX_CLKACTIVITY_UNIPRO1_TXPHY_LS_GFCLK_SHIFT 12
531#define OMAP54XX_CLKACTIVITY_UNIPRO1_TXPHY_LS_GFCLK_WIDTH 0x1
532#define OMAP54XX_CLKACTIVITY_UNIPRO1_TXPHY_LS_GFCLK_MASK (1 << 12)
533
534/* Used by CM_L3INIT_CLKSTCTRL */
535#define OMAP54XX_CLKACTIVITY_UNIPRO2_DPLL_CLK_SHIFT 10
536#define OMAP54XX_CLKACTIVITY_UNIPRO2_DPLL_CLK_WIDTH 0x1
537#define OMAP54XX_CLKACTIVITY_UNIPRO2_DPLL_CLK_MASK (1 << 10)
538
539/* Used by CM_L3INIT_CLKSTCTRL */
540#define OMAP54XX_CLKACTIVITY_UNIPRO2_PHY_GFCLK_SHIFT 13
541#define OMAP54XX_CLKACTIVITY_UNIPRO2_PHY_GFCLK_WIDTH 0x1
542#define OMAP54XX_CLKACTIVITY_UNIPRO2_PHY_GFCLK_MASK (1 << 13)
543
544/* Used by CM_L3INIT_CLKSTCTRL */
545#define OMAP54XX_CLKACTIVITY_UNIPRO2_PHY_REF_GFCLK_SHIFT 5
546#define OMAP54XX_CLKACTIVITY_UNIPRO2_PHY_REF_GFCLK_WIDTH 0x1
547#define OMAP54XX_CLKACTIVITY_UNIPRO2_PHY_REF_GFCLK_MASK (1 << 5)
548
549/* Used by CM_L3INIT_CLKSTCTRL */
550#define OMAP54XX_CLKACTIVITY_USB_DPLL_CLK_SHIFT 14
551#define OMAP54XX_CLKACTIVITY_USB_DPLL_CLK_WIDTH 0x1
552#define OMAP54XX_CLKACTIVITY_USB_DPLL_CLK_MASK (1 << 14)
553
554/* Used by CM_L3INIT_CLKSTCTRL */
555#define OMAP54XX_CLKACTIVITY_USB_DPLL_HS_CLK_SHIFT 15
556#define OMAP54XX_CLKACTIVITY_USB_DPLL_HS_CLK_WIDTH 0x1
557#define OMAP54XX_CLKACTIVITY_USB_DPLL_HS_CLK_MASK (1 << 15)
558
559/* Used by CM_L3INIT_CLKSTCTRL */
560#define OMAP54XX_CLKACTIVITY_USB_OTG_SS_REF_CLK_SHIFT 31
561#define OMAP54XX_CLKACTIVITY_USB_OTG_SS_REF_CLK_WIDTH 0x1
562#define OMAP54XX_CLKACTIVITY_USB_OTG_SS_REF_CLK_MASK (1 << 31)
563
564/* Used by CM_L3INIT_CLKSTCTRL */
565#define OMAP54XX_CLKACTIVITY_UTMI_P3_GFCLK_SHIFT 30
566#define OMAP54XX_CLKACTIVITY_UTMI_P3_GFCLK_WIDTH 0x1
567#define OMAP54XX_CLKACTIVITY_UTMI_P3_GFCLK_MASK (1 << 30)
568
569/* Used by CM_L3INIT_CLKSTCTRL */
570#define OMAP54XX_CLKACTIVITY_UTMI_ROOT_GFCLK_SHIFT 25
571#define OMAP54XX_CLKACTIVITY_UTMI_ROOT_GFCLK_WIDTH 0x1
572#define OMAP54XX_CLKACTIVITY_UTMI_ROOT_GFCLK_MASK (1 << 25)
573
574/* Used by CM_WKUPAON_CLKSTCTRL */
575#define OMAP54XX_CLKACTIVITY_WKUPAON_32K_GFCLK_SHIFT 11
576#define OMAP54XX_CLKACTIVITY_WKUPAON_32K_GFCLK_WIDTH 0x1
577#define OMAP54XX_CLKACTIVITY_WKUPAON_32K_GFCLK_MASK (1 << 11)
578
579/* Used by CM_WKUPAON_CLKSTCTRL */
580#define OMAP54XX_CLKACTIVITY_WKUPAON_GICLK_SHIFT 12
581#define OMAP54XX_CLKACTIVITY_WKUPAON_GICLK_WIDTH 0x1
582#define OMAP54XX_CLKACTIVITY_WKUPAON_GICLK_MASK (1 << 12)
583
584/* Used by CM_WKUPAON_CLKSTCTRL */
585#define OMAP54XX_CLKACTIVITY_WKUPAON_IO_SRCOMP_GFCLK_SHIFT 13
586#define OMAP54XX_CLKACTIVITY_WKUPAON_IO_SRCOMP_GFCLK_WIDTH 0x1
587#define OMAP54XX_CLKACTIVITY_WKUPAON_IO_SRCOMP_GFCLK_MASK (1 << 13)
588
589/* Used by CM_COREAON_IO_SRCOMP_CLKCTRL, CM_WKUPAON_IO_SRCOMP_CLKCTRL */
590#define OMAP54XX_CLKEN_SRCOMP_FCLK_SHIFT 8
591#define OMAP54XX_CLKEN_SRCOMP_FCLK_WIDTH 0x1
592#define OMAP54XX_CLKEN_SRCOMP_FCLK_MASK (1 << 8)
593
594/*
595 * Used by CM_ABE_TIMER5_CLKCTRL, CM_ABE_TIMER6_CLKCTRL, CM_ABE_TIMER7_CLKCTRL,
596 * CM_ABE_TIMER8_CLKCTRL, CM_L3INIT_HSI_CLKCTRL, CM_L4PER_TIMER10_CLKCTRL,
597 * CM_L4PER_TIMER11_CLKCTRL, CM_L4PER_TIMER2_CLKCTRL, CM_L4PER_TIMER3_CLKCTRL,
598 * CM_L4PER_TIMER4_CLKCTRL, CM_L4PER_TIMER9_CLKCTRL, CM_WKUPAON_TIMER1_CLKCTRL
599 */
600#define OMAP54XX_CLKSEL_SHIFT 24
601#define OMAP54XX_CLKSEL_WIDTH 0x1
602#define OMAP54XX_CLKSEL_MASK (1 << 24)
603
604/*
605 * Renamed from CLKSEL Used by CM_CLKSEL_ABE_DSS_SYS, CM_CLKSEL_ABE_PLL_REF,
606 * CM_CLKSEL_USB_60MHZ, CM_CLKSEL_WKUPAON
607 */
608#define OMAP54XX_CLKSEL_0_0_SHIFT 0
609#define OMAP54XX_CLKSEL_0_0_WIDTH 0x1
610#define OMAP54XX_CLKSEL_0_0_MASK (1 << 0)
611
612/* Renamed from CLKSEL Used by CM_BYPCLK_DPLL_IVA, CM_BYPCLK_DPLL_MPU */
613#define OMAP54XX_CLKSEL_0_1_SHIFT 0
614#define OMAP54XX_CLKSEL_0_1_WIDTH 0x2
615#define OMAP54XX_CLKSEL_0_1_MASK (0x3 << 0)
616
617/* Renamed from CLKSEL Used by CM_L3INSTR_CTRL_MODULE_BANDGAP_CLKCTRL */
618#define OMAP54XX_CLKSEL_24_25_SHIFT 24
619#define OMAP54XX_CLKSEL_24_25_WIDTH 0x2
620#define OMAP54XX_CLKSEL_24_25_MASK (0x3 << 24)
621
622/* Used by CM_MPU_MPU_CLKCTRL */
623#define OMAP54XX_CLKSEL_ABE_DIV_MODE_SHIFT 26
624#define OMAP54XX_CLKSEL_ABE_DIV_MODE_WIDTH 0x1
625#define OMAP54XX_CLKSEL_ABE_DIV_MODE_MASK (1 << 26)
626
627/* Used by CM_ABE_AESS_CLKCTRL */
628#define OMAP54XX_CLKSEL_AESS_FCLK_SHIFT 24
629#define OMAP54XX_CLKSEL_AESS_FCLK_WIDTH 0x1
630#define OMAP54XX_CLKSEL_AESS_FCLK_MASK (1 << 24)
631
632/* Used by CM_L3INIT_MMC1_CLKCTRL, CM_L3INIT_MMC2_CLKCTRL */
633#define OMAP54XX_CLKSEL_DIV_SHIFT 25
634#define OMAP54XX_CLKSEL_DIV_WIDTH 0x1
635#define OMAP54XX_CLKSEL_DIV_MASK (1 << 25)
636
637/* Used by CM_MPU_MPU_CLKCTRL */
638#define OMAP54XX_CLKSEL_EMIF_DIV_MODE_SHIFT 24
639#define OMAP54XX_CLKSEL_EMIF_DIV_MODE_WIDTH 0x2
640#define OMAP54XX_CLKSEL_EMIF_DIV_MODE_MASK (0x3 << 24)
641
642/* Used by CM_CAM_FDIF_CLKCTRL */
643#define OMAP54XX_CLKSEL_FCLK_SHIFT 24
644#define OMAP54XX_CLKSEL_FCLK_WIDTH 0x1
645#define OMAP54XX_CLKSEL_FCLK_MASK (1 << 24)
646
647/* Used by CM_GPU_GPU_CLKCTRL */
648#define OMAP54XX_CLKSEL_GPU_CORE_GCLK_SHIFT 24
649#define OMAP54XX_CLKSEL_GPU_CORE_GCLK_WIDTH 0x1
650#define OMAP54XX_CLKSEL_GPU_CORE_GCLK_MASK (1 << 24)
651
652/* Used by CM_GPU_GPU_CLKCTRL */
653#define OMAP54XX_CLKSEL_GPU_HYD_GCLK_SHIFT 25
654#define OMAP54XX_CLKSEL_GPU_HYD_GCLK_WIDTH 0x1
655#define OMAP54XX_CLKSEL_GPU_HYD_GCLK_MASK (1 << 25)
656
657/* Used by CM_GPU_GPU_CLKCTRL */
658#define OMAP54XX_CLKSEL_GPU_SYS_CLK_SHIFT 26
659#define OMAP54XX_CLKSEL_GPU_SYS_CLK_WIDTH 0x1
660#define OMAP54XX_CLKSEL_GPU_SYS_CLK_MASK (1 << 26)
661
662/*
663 * Used by CM_ABE_DMIC_CLKCTRL, CM_ABE_MCASP_CLKCTRL, CM_ABE_MCBSP1_CLKCTRL,
664 * CM_ABE_MCBSP2_CLKCTRL, CM_ABE_MCBSP3_CLKCTRL
665 */
666#define OMAP54XX_CLKSEL_INTERNAL_SOURCE_SHIFT 26
667#define OMAP54XX_CLKSEL_INTERNAL_SOURCE_WIDTH 0x2
668#define OMAP54XX_CLKSEL_INTERNAL_SOURCE_MASK (0x3 << 26)
669
670/* Used by CM_CLKSEL_CORE */
671#define OMAP54XX_CLKSEL_L3_SHIFT 4
672#define OMAP54XX_CLKSEL_L3_WIDTH 0x1
673#define OMAP54XX_CLKSEL_L3_MASK (1 << 4)
674
675/* Renamed from CLKSEL_L3 Used by CM_SHADOW_FREQ_CONFIG2 */
676#define OMAP54XX_CLKSEL_L3_1_1_SHIFT 1
677#define OMAP54XX_CLKSEL_L3_1_1_WIDTH 0x1
678#define OMAP54XX_CLKSEL_L3_1_1_MASK (1 << 1)
679
680/* Used by CM_CLKSEL_CORE */
681#define OMAP54XX_CLKSEL_L4_SHIFT 8
682#define OMAP54XX_CLKSEL_L4_WIDTH 0x1
683#define OMAP54XX_CLKSEL_L4_MASK (1 << 8)
684
685/* Used by CM_EMIF_EMIF1_CLKCTRL */
686#define OMAP54XX_CLKSEL_LL_SHIFT 24
687#define OMAP54XX_CLKSEL_LL_WIDTH 0x1
688#define OMAP54XX_CLKSEL_LL_MASK (1 << 24)
689
690/* Used by CM_CLKSEL_ABE */
691#define OMAP54XX_CLKSEL_OPP_SHIFT 0
692#define OMAP54XX_CLKSEL_OPP_WIDTH 0x2
693#define OMAP54XX_CLKSEL_OPP_MASK (0x3 << 0)
694
695/* Renamed from CLKSEL_OPP Used by CM_L3INIT_UNIPRO2_CLKCTRL */
696#define OMAP54XX_CLKSEL_OPP_24_24_SHIFT 24
697#define OMAP54XX_CLKSEL_OPP_24_24_WIDTH 0x1
698#define OMAP54XX_CLKSEL_OPP_24_24_MASK (1 << 24)
699
700/*
701 * Used by CM_ABE_DMIC_CLKCTRL, CM_ABE_MCASP_CLKCTRL, CM_ABE_MCBSP1_CLKCTRL,
702 * CM_ABE_MCBSP2_CLKCTRL, CM_ABE_MCBSP3_CLKCTRL
703 */
704#define OMAP54XX_CLKSEL_SOURCE_SHIFT 24
705#define OMAP54XX_CLKSEL_SOURCE_WIDTH 0x2
706#define OMAP54XX_CLKSEL_SOURCE_MASK (0x3 << 24)
707
708/*
709 * Renamed from CLKSEL_SOURCE Used by CM_L3INIT_MMC1_CLKCTRL,
710 * CM_L3INIT_MMC2_CLKCTRL
711 */
712#define OMAP54XX_CLKSEL_SOURCE_L3INIT_MMC1_SHIFT 24
713#define OMAP54XX_CLKSEL_SOURCE_L3INIT_MMC1_WIDTH 0x1
714#define OMAP54XX_CLKSEL_SOURCE_L3INIT_MMC1_MASK (1 << 24)
715
716/* Used by CM_L3INIT_USB_HOST_HS_CLKCTRL */
717#define OMAP54XX_CLKSEL_UTMI_P1_SHIFT 24
718#define OMAP54XX_CLKSEL_UTMI_P1_WIDTH 0x1
719#define OMAP54XX_CLKSEL_UTMI_P1_MASK (1 << 24)
720
721/* Used by CM_L3INIT_USB_HOST_HS_CLKCTRL */
722#define OMAP54XX_CLKSEL_UTMI_P2_SHIFT 25
723#define OMAP54XX_CLKSEL_UTMI_P2_WIDTH 0x1
724#define OMAP54XX_CLKSEL_UTMI_P2_MASK (1 << 25)
725
726/*
727 * Used by CM_DIV_H11_DPLL_CORE, CM_DIV_H11_DPLL_IVA, CM_DIV_H11_DPLL_PER,
728 * CM_DIV_H12_DPLL_CORE, CM_DIV_H12_DPLL_IVA, CM_DIV_H12_DPLL_PER,
729 * CM_DIV_H13_DPLL_CORE, CM_DIV_H13_DPLL_PER, CM_DIV_H14_DPLL_CORE,
730 * CM_DIV_H14_DPLL_PER, CM_DIV_H21_DPLL_CORE, CM_DIV_H22_DPLL_CORE,
731 * CM_DIV_H23_DPLL_CORE, CM_DIV_H24_DPLL_CORE, CM_DIV_M2_DPLL_ABE,
732 * CM_DIV_M2_DPLL_CORE, CM_DIV_M2_DPLL_MPU, CM_DIV_M2_DPLL_PER,
733 * CM_DIV_M2_DPLL_UNIPRO1, CM_DIV_M2_DPLL_UNIPRO2, CM_DIV_M2_DPLL_USB,
734 * CM_DIV_M3_DPLL_ABE, CM_DIV_M3_DPLL_CORE, CM_DIV_M3_DPLL_PER
735 */
736#define OMAP54XX_CLKST_SHIFT 9
737#define OMAP54XX_CLKST_WIDTH 0x1
738#define OMAP54XX_CLKST_MASK (1 << 9)
739
740/*
741 * Used by CM_ABE_CLKSTCTRL, CM_C2C_CLKSTCTRL, CM_CAM_CLKSTCTRL,
742 * CM_COREAON_CLKSTCTRL, CM_CUSTEFUSE_CLKSTCTRL, CM_DMA_CLKSTCTRL,
743 * CM_DSP_CLKSTCTRL, CM_DSS_CLKSTCTRL, CM_EMIF_CLKSTCTRL, CM_EMU_CLKSTCTRL,
744 * CM_GPU_CLKSTCTRL, CM_IPU_CLKSTCTRL, CM_IVA_CLKSTCTRL, CM_L3INIT_CLKSTCTRL,
745 * CM_L3INSTR_CLKSTCTRL, CM_L3MAIN1_CLKSTCTRL, CM_L3MAIN2_CLKSTCTRL,
746 * CM_L4CFG_CLKSTCTRL, CM_L4PER_CLKSTCTRL, CM_L4SEC_CLKSTCTRL,
747 * CM_MIPIEXT_CLKSTCTRL, CM_MPU_CLKSTCTRL, CM_WKUPAON_CLKSTCTRL
748 */
749#define OMAP54XX_CLKTRCTRL_SHIFT 0
750#define OMAP54XX_CLKTRCTRL_WIDTH 0x2
751#define OMAP54XX_CLKTRCTRL_MASK (0x3 << 0)
752
753/* Used by CM_DIV_M2_DPLL_ABE, CM_DIV_M2_DPLL_PER */
754#define OMAP54XX_CLKX2ST_SHIFT 11
755#define OMAP54XX_CLKX2ST_WIDTH 0x1
756#define OMAP54XX_CLKX2ST_MASK (1 << 11)
757
758/* Used by CM_L4CFG_DYNAMICDEP */
759#define OMAP54XX_COREAON_DYNDEP_SHIFT 16
760#define OMAP54XX_COREAON_DYNDEP_WIDTH 0x1
761#define OMAP54XX_COREAON_DYNDEP_MASK (1 << 16)
762
763/* Used by CM_DSP_STATICDEP, CM_IPU_STATICDEP, CM_MPU_STATICDEP */
764#define OMAP54XX_COREAON_STATDEP_SHIFT 16
765#define OMAP54XX_COREAON_STATDEP_WIDTH 0x1
766#define OMAP54XX_COREAON_STATDEP_MASK (1 << 16)
767
768/* Used by CM_L4CFG_DYNAMICDEP */
769#define OMAP54XX_CUSTEFUSE_DYNDEP_SHIFT 17
770#define OMAP54XX_CUSTEFUSE_DYNDEP_WIDTH 0x1
771#define OMAP54XX_CUSTEFUSE_DYNDEP_MASK (1 << 17)
772
773/* Used by CM_DSP_STATICDEP, CM_IPU_STATICDEP, CM_MPU_STATICDEP */
774#define OMAP54XX_CUSTEFUSE_STATDEP_SHIFT 17
775#define OMAP54XX_CUSTEFUSE_STATDEP_WIDTH 0x1
776#define OMAP54XX_CUSTEFUSE_STATDEP_MASK (1 << 17)
777
778/* Used by REVISION_CM_CORE, REVISION_CM_CORE_AON */
779#define OMAP54XX_CUSTOM_SHIFT 6
780#define OMAP54XX_CUSTOM_WIDTH 0x2
781#define OMAP54XX_CUSTOM_MASK (0x3 << 6)
782
783/*
784 * Used by CM_CLKSEL_DPLL_ABE, CM_CLKSEL_DPLL_CORE, CM_CLKSEL_DPLL_IVA,
785 * CM_CLKSEL_DPLL_MPU, CM_CLKSEL_DPLL_PER, CM_CLKSEL_DPLL_UNIPRO1,
786 * CM_CLKSEL_DPLL_UNIPRO2, CM_CLKSEL_DPLL_USB
787 */
788#define OMAP54XX_DCC_EN_SHIFT 22
789#define OMAP54XX_DCC_EN_WIDTH 0x1
790#define OMAP54XX_DCC_EN_MASK (1 << 22)
791
792/*
793 * Used by CM_CORE_AON_DEBUG_CM_CORE_AON_FD_TRANS,
794 * CM_CORE_AON_DEBUG_DSS_FD_TRANS, CM_CORE_AON_DEBUG_EMIF_FD_TRANS,
795 * CM_CORE_AON_DEBUG_L4SEC_FD_TRANS
796 */
797#define OMAP54XX_CM_DEBUG_OUT_SHIFT 0
798#define OMAP54XX_CM_DEBUG_OUT_WIDTH 0xd
799#define OMAP54XX_CM_DEBUG_OUT_MASK (0x1fff << 0)
800
801/*
802 * Renamed from DEBUG_OUT Used by CM_CORE_AON_DEBUG_ABE_FD_TRANS,
803 * CM_CORE_AON_DEBUG_L3INIT_FD_TRANS, CM_CORE_AON_DEBUG_L4PER_FD_TRANS
804 */
805#define OMAP54XX_DEBUG_OUT_0_31_SHIFT 0
806#define OMAP54XX_DEBUG_OUT_0_31_WIDTH 0x20
807#define OMAP54XX_DEBUG_OUT_0_31_MASK (0xffffffff << 0)
808
809/*
810 * Renamed from DEBUG_OUT Used by CM_CORE_AON_DEBUG_C2C_FD_TRANS,
811 * CM_CORE_AON_DEBUG_COREAON_FD_TRANS, CM_CORE_AON_DEBUG_L4CFG_FD_TRANS
812 */
813#define OMAP54XX_DEBUG_OUT_0_8_SHIFT 0
814#define OMAP54XX_DEBUG_OUT_0_8_WIDTH 0x9
815#define OMAP54XX_DEBUG_OUT_0_8_MASK (0x1ff << 0)
816
817/*
818 * Renamed from DEBUG_OUT Used by CM_CORE_AON_DEBUG_CUSTEFUSE_FD_TRANS,
819 * CM_CORE_AON_DEBUG_DMA_FD_TRANS, CM_CORE_AON_DEBUG_L3MAIN1_FD_TRANS
820 */
821#define OMAP54XX_DEBUG_OUT_0_4_SHIFT 0
822#define OMAP54XX_DEBUG_OUT_0_4_WIDTH 0x5
823#define OMAP54XX_DEBUG_OUT_0_4_MASK (0x1f << 0)
824
825/*
826 * Renamed from DEBUG_OUT Used by CM_CORE_AON_DEBUG_DSP_FD_TRANS,
827 * CM_CORE_AON_DEBUG_IPU_FD_TRANS, CM_CORE_AON_DEBUG_MPU_FD_TRANS
828 */
829#define OMAP54XX_DEBUG_OUT_0_5_SHIFT 0
830#define OMAP54XX_DEBUG_OUT_0_5_WIDTH 0x6
831#define OMAP54XX_DEBUG_OUT_0_5_MASK (0x3f << 0)
832
833/*
834 * Renamed from DEBUG_OUT Used by CM_CORE_AON_DEBUG_CAM_FD_TRANS,
835 * CM_CORE_AON_DEBUG_MIPIEXT_FD_TRANS
836 */
837#define OMAP54XX_DEBUG_OUT_0_10_SHIFT 0
838#define OMAP54XX_DEBUG_OUT_0_10_WIDTH 0xb
839#define OMAP54XX_DEBUG_OUT_0_10_MASK (0x7ff << 0)
840
841/*
842 * Renamed from DEBUG_OUT Used by CM_CORE_AON_DEBUG_IVA_FD_TRANS,
843 * CM_CORE_AON_DEBUG_L3MAIN2_FD_TRANS
844 */
845#define OMAP54XX_DEBUG_OUT_0_6_SHIFT 0
846#define OMAP54XX_DEBUG_OUT_0_6_WIDTH 0x7
847#define OMAP54XX_DEBUG_OUT_0_6_MASK (0x7f << 0)
848
849/* Renamed from DEBUG_OUT Used by CM_CORE_AON_DEBUG_ABE_FD_TRANS2 */
850#define OMAP54XX_DEBUG_OUT_0_19_SHIFT 0
851#define OMAP54XX_DEBUG_OUT_0_19_WIDTH 0x14
852#define OMAP54XX_DEBUG_OUT_0_19_MASK (0xfffff << 0)
853
854/* Renamed from DEBUG_OUT Used by CM_CORE_AON_DEBUG_GPU_FD_TRANS */
855#define OMAP54XX_DEBUG_OUT_0_9_SHIFT 0
856#define OMAP54XX_DEBUG_OUT_0_9_WIDTH 0xa
857#define OMAP54XX_DEBUG_OUT_0_9_MASK (0x3ff << 0)
858
859/* Renamed from DEBUG_OUT Used by CM_CORE_AON_DEBUG_L3INIT_FD_TRANS2 */
860#define OMAP54XX_DEBUG_OUT_0_26_SHIFT 0
861#define OMAP54XX_DEBUG_OUT_0_26_WIDTH 0x1b
862#define OMAP54XX_DEBUG_OUT_0_26_MASK (0x7ffffff << 0)
863
864/* Renamed from DEBUG_OUT Used by CM_CORE_AON_DEBUG_L3INSTR_FD_TRANS */
865#define OMAP54XX_DEBUG_OUT_0_13_SHIFT 0
866#define OMAP54XX_DEBUG_OUT_0_13_WIDTH 0xe
867#define OMAP54XX_DEBUG_OUT_0_13_MASK (0x3fff << 0)
868
869/* Renamed from DEBUG_OUT Used by CM_CORE_AON_DEBUG_L4PER_FD_TRANS2 */
870#define OMAP54XX_DEBUG_OUT_0_21_SHIFT 0
871#define OMAP54XX_DEBUG_OUT_0_21_WIDTH 0x16
872#define OMAP54XX_DEBUG_OUT_0_21_MASK (0x3fffff << 0)
873
874/*
875 * Used by CM_SSC_DELTAMSTEP_DPLL_ABE, CM_SSC_DELTAMSTEP_DPLL_CORE,
876 * CM_SSC_DELTAMSTEP_DPLL_IVA, CM_SSC_DELTAMSTEP_DPLL_MPU,
877 * CM_SSC_DELTAMSTEP_DPLL_PER
878 */
879#define OMAP54XX_DELTAMSTEP_SHIFT 0
880#define OMAP54XX_DELTAMSTEP_WIDTH 0x14
881#define OMAP54XX_DELTAMSTEP_MASK (0xfffff << 0)
882
883/*
884 * Renamed from DELTAMSTEP Used by CM_SSC_DELTAMSTEP_DPLL_UNIPRO1,
885 * CM_SSC_DELTAMSTEP_DPLL_UNIPRO2, CM_SSC_DELTAMSTEP_DPLL_USB
886 */
887#define OMAP54XX_DELTAMSTEP_0_20_SHIFT 0
888#define OMAP54XX_DELTAMSTEP_0_20_WIDTH 0x15
889#define OMAP54XX_DELTAMSTEP_0_20_MASK (0x1fffff << 0)
890
891/*
892 * Used by CM_DIV_H11_DPLL_CORE, CM_DIV_H11_DPLL_IVA, CM_DIV_H11_DPLL_PER,
893 * CM_DIV_H12_DPLL_CORE, CM_DIV_H12_DPLL_IVA, CM_DIV_H12_DPLL_PER,
894 * CM_DIV_H13_DPLL_CORE, CM_DIV_H13_DPLL_PER, CM_DIV_H14_DPLL_CORE,
895 * CM_DIV_H14_DPLL_PER, CM_DIV_H21_DPLL_CORE, CM_DIV_H22_DPLL_CORE,
896 * CM_DIV_H23_DPLL_CORE, CM_DIV_H24_DPLL_CORE
897 */
898#define OMAP54XX_DIVHS_SHIFT 0
899#define OMAP54XX_DIVHS_WIDTH 0x6
900#define OMAP54XX_DIVHS_MASK (0x3f << 0)
901
902/*
903 * Renamed from DIVHS Used by CM_DIV_M2_DPLL_ABE, CM_DIV_M2_DPLL_CORE,
904 * CM_DIV_M2_DPLL_MPU, CM_DIV_M2_DPLL_PER, CM_DIV_M3_DPLL_ABE,
905 * CM_DIV_M3_DPLL_CORE, CM_DIV_M3_DPLL_PER
906 */
907#define OMAP54XX_DIVHS_0_4_SHIFT 0
908#define OMAP54XX_DIVHS_0_4_WIDTH 0x5
909#define OMAP54XX_DIVHS_0_4_MASK (0x1f << 0)
910
911/*
912 * Renamed from DIVHS Used by CM_DIV_M2_DPLL_UNIPRO1, CM_DIV_M2_DPLL_UNIPRO2,
913 * CM_DIV_M2_DPLL_USB
914 */
915#define OMAP54XX_DIVHS_0_6_SHIFT 0
916#define OMAP54XX_DIVHS_0_6_WIDTH 0x7
917#define OMAP54XX_DIVHS_0_6_MASK (0x7f << 0)
918
919/* Used by CM_DLL_CTRL */
920#define OMAP54XX_DLL_OVERRIDE_SHIFT 0
921#define OMAP54XX_DLL_OVERRIDE_WIDTH 0x1
922#define OMAP54XX_DLL_OVERRIDE_MASK (1 << 0)
923
924/* Renamed from DLL_OVERRIDE Used by CM_SHADOW_FREQ_CONFIG1 */
925#define OMAP54XX_DLL_OVERRIDE_2_2_SHIFT 2
926#define OMAP54XX_DLL_OVERRIDE_2_2_WIDTH 0x1
927#define OMAP54XX_DLL_OVERRIDE_2_2_MASK (1 << 2)
928
929/* Used by CM_SHADOW_FREQ_CONFIG1 */
930#define OMAP54XX_DLL_RESET_SHIFT 3
931#define OMAP54XX_DLL_RESET_WIDTH 0x1
932#define OMAP54XX_DLL_RESET_MASK (1 << 3)
933
934/*
935 * Used by CM_CLKSEL_DPLL_ABE, CM_CLKSEL_DPLL_CORE, CM_CLKSEL_DPLL_IVA,
936 * CM_CLKSEL_DPLL_MPU, CM_CLKSEL_DPLL_PER, CM_CLKSEL_DPLL_UNIPRO1,
937 * CM_CLKSEL_DPLL_UNIPRO2, CM_CLKSEL_DPLL_USB
938 */
939#define OMAP54XX_DPLL_BYP_CLKSEL_SHIFT 23
940#define OMAP54XX_DPLL_BYP_CLKSEL_WIDTH 0x1
941#define OMAP54XX_DPLL_BYP_CLKSEL_MASK (1 << 23)
942
943/* Used by CM_CLKSEL_DPLL_CORE */
944#define OMAP54XX_DPLL_CLKOUTHIF_CLKSEL_SHIFT 20
945#define OMAP54XX_DPLL_CLKOUTHIF_CLKSEL_WIDTH 0x1
946#define OMAP54XX_DPLL_CLKOUTHIF_CLKSEL_MASK (1 << 20)
947
948/* Used by CM_SHADOW_FREQ_CONFIG1 */
949#define OMAP54XX_DPLL_CORE_DPLL_EN_SHIFT 8
950#define OMAP54XX_DPLL_CORE_DPLL_EN_WIDTH 0x3
951#define OMAP54XX_DPLL_CORE_DPLL_EN_MASK (0x7 << 8)
952
953/* Used by CM_SHADOW_FREQ_CONFIG2 */
954#define OMAP54XX_DPLL_CORE_H12_DIV_SHIFT 2
955#define OMAP54XX_DPLL_CORE_H12_DIV_WIDTH 0x6
956#define OMAP54XX_DPLL_CORE_H12_DIV_MASK (0x3f << 2)
957
958/* Used by CM_SHADOW_FREQ_CONFIG1 */
959#define OMAP54XX_DPLL_CORE_M2_DIV_SHIFT 11
960#define OMAP54XX_DPLL_CORE_M2_DIV_WIDTH 0x5
961#define OMAP54XX_DPLL_CORE_M2_DIV_MASK (0x1f << 11)
962
963/*
964 * Used by CM_CLKSEL_DPLL_ABE, CM_CLKSEL_DPLL_CORE, CM_CLKSEL_DPLL_IVA,
965 * CM_CLKSEL_DPLL_MPU, CM_CLKSEL_DPLL_PER
966 */
967#define OMAP54XX_DPLL_DIV_SHIFT 0
968#define OMAP54XX_DPLL_DIV_WIDTH 0x7
969#define OMAP54XX_DPLL_DIV_MASK (0x7f << 0)
970
971/*
972 * Renamed from DPLL_DIV Used by CM_CLKSEL_DPLL_UNIPRO1,
973 * CM_CLKSEL_DPLL_UNIPRO2, CM_CLKSEL_DPLL_USB
974 */
975#define OMAP54XX_DPLL_DIV_0_7_SHIFT 0
976#define OMAP54XX_DPLL_DIV_0_7_WIDTH 0x8
977#define OMAP54XX_DPLL_DIV_0_7_MASK (0xff << 0)
978
979/*
980 * Used by CM_CLKMODE_DPLL_ABE, CM_CLKMODE_DPLL_CORE, CM_CLKMODE_DPLL_IVA,
981 * CM_CLKMODE_DPLL_MPU, CM_CLKMODE_DPLL_PER
982 */
983#define OMAP54XX_DPLL_DRIFTGUARD_EN_SHIFT 8
984#define OMAP54XX_DPLL_DRIFTGUARD_EN_WIDTH 0x1
985#define OMAP54XX_DPLL_DRIFTGUARD_EN_MASK (1 << 8)
986
987/*
988 * Used by CM_CLKMODE_DPLL_ABE, CM_CLKMODE_DPLL_CORE, CM_CLKMODE_DPLL_IVA,
989 * CM_CLKMODE_DPLL_MPU, CM_CLKMODE_DPLL_PER, CM_CLKMODE_DPLL_UNIPRO1,
990 * CM_CLKMODE_DPLL_UNIPRO2, CM_CLKMODE_DPLL_USB
991 */
992#define OMAP54XX_DPLL_EN_SHIFT 0
993#define OMAP54XX_DPLL_EN_WIDTH 0x3
994#define OMAP54XX_DPLL_EN_MASK (0x7 << 0)
995
996/*
997 * Used by CM_CLKMODE_DPLL_ABE, CM_CLKMODE_DPLL_CORE, CM_CLKMODE_DPLL_IVA,
998 * CM_CLKMODE_DPLL_MPU, CM_CLKMODE_DPLL_PER
999 */
1000#define OMAP54XX_DPLL_LPMODE_EN_SHIFT 10
1001#define OMAP54XX_DPLL_LPMODE_EN_WIDTH 0x1
1002#define OMAP54XX_DPLL_LPMODE_EN_MASK (1 << 10)
1003
1004/*
1005 * Used by CM_CLKSEL_DPLL_ABE, CM_CLKSEL_DPLL_CORE, CM_CLKSEL_DPLL_IVA,
1006 * CM_CLKSEL_DPLL_MPU, CM_CLKSEL_DPLL_PER
1007 */
1008#define OMAP54XX_DPLL_MULT_SHIFT 8
1009#define OMAP54XX_DPLL_MULT_WIDTH 0xb
1010#define OMAP54XX_DPLL_MULT_MASK (0x7ff << 8)
1011
1012/*
1013 * Renamed from DPLL_MULT Used by CM_CLKSEL_DPLL_UNIPRO1,
1014 * CM_CLKSEL_DPLL_UNIPRO2, CM_CLKSEL_DPLL_USB
1015 */
1016#define OMAP54XX_DPLL_MULT_UNIPRO1_SHIFT 8
1017#define OMAP54XX_DPLL_MULT_UNIPRO1_WIDTH 0xc
1018#define OMAP54XX_DPLL_MULT_UNIPRO1_MASK (0xfff << 8)
1019
1020/*
1021 * Used by CM_CLKMODE_DPLL_ABE, CM_CLKMODE_DPLL_CORE, CM_CLKMODE_DPLL_IVA,
1022 * CM_CLKMODE_DPLL_MPU, CM_CLKMODE_DPLL_PER
1023 */
1024#define OMAP54XX_DPLL_REGM4XEN_SHIFT 11
1025#define OMAP54XX_DPLL_REGM4XEN_WIDTH 0x1
1026#define OMAP54XX_DPLL_REGM4XEN_MASK (1 << 11)
1027
1028/* Used by CM_CLKSEL_DPLL_UNIPRO1, CM_CLKSEL_DPLL_UNIPRO2, CM_CLKSEL_DPLL_USB */
1029#define OMAP54XX_DPLL_SD_DIV_SHIFT 24
1030#define OMAP54XX_DPLL_SD_DIV_WIDTH 0x8
1031#define OMAP54XX_DPLL_SD_DIV_MASK (0xff << 24)
1032
1033/* Used by CM_CLKSEL_DPLL_UNIPRO1, CM_CLKSEL_DPLL_UNIPRO2, CM_CLKSEL_DPLL_USB */
1034#define OMAP54XX_DPLL_SELFREQDCO_SHIFT 21
1035#define OMAP54XX_DPLL_SELFREQDCO_WIDTH 0x1
1036#define OMAP54XX_DPLL_SELFREQDCO_MASK (1 << 21)
1037
1038/*
1039 * Used by CM_CLKMODE_DPLL_ABE, CM_CLKMODE_DPLL_CORE, CM_CLKMODE_DPLL_IVA,
1040 * CM_CLKMODE_DPLL_MPU, CM_CLKMODE_DPLL_PER, CM_CLKMODE_DPLL_UNIPRO1,
1041 * CM_CLKMODE_DPLL_UNIPRO2, CM_CLKMODE_DPLL_USB
1042 */
1043#define OMAP54XX_DPLL_SSC_ACK_SHIFT 13
1044#define OMAP54XX_DPLL_SSC_ACK_WIDTH 0x1
1045#define OMAP54XX_DPLL_SSC_ACK_MASK (1 << 13)
1046
1047/*
1048 * Used by CM_CLKMODE_DPLL_ABE, CM_CLKMODE_DPLL_CORE, CM_CLKMODE_DPLL_IVA,
1049 * CM_CLKMODE_DPLL_MPU, CM_CLKMODE_DPLL_PER, CM_CLKMODE_DPLL_UNIPRO1,
1050 * CM_CLKMODE_DPLL_UNIPRO2, CM_CLKMODE_DPLL_USB
1051 */
1052#define OMAP54XX_DPLL_SSC_DOWNSPREAD_SHIFT 14
1053#define OMAP54XX_DPLL_SSC_DOWNSPREAD_WIDTH 0x1
1054#define OMAP54XX_DPLL_SSC_DOWNSPREAD_MASK (1 << 14)
1055
1056/*
1057 * Used by CM_CLKMODE_DPLL_ABE, CM_CLKMODE_DPLL_CORE, CM_CLKMODE_DPLL_IVA,
1058 * CM_CLKMODE_DPLL_MPU, CM_CLKMODE_DPLL_PER, CM_CLKMODE_DPLL_UNIPRO1,
1059 * CM_CLKMODE_DPLL_UNIPRO2, CM_CLKMODE_DPLL_USB
1060 */
1061#define OMAP54XX_DPLL_SSC_EN_SHIFT 12
1062#define OMAP54XX_DPLL_SSC_EN_WIDTH 0x1
1063#define OMAP54XX_DPLL_SSC_EN_MASK (1 << 12)
1064
1065/* Used by CM_L4CFG_DYNAMICDEP */
1066#define OMAP54XX_DSP_DYNDEP_SHIFT 1
1067#define OMAP54XX_DSP_DYNDEP_WIDTH 0x1
1068#define OMAP54XX_DSP_DYNDEP_MASK (1 << 1)
1069
1070/* Used by CM_IPU_STATICDEP, CM_MPU_STATICDEP */
1071#define OMAP54XX_DSP_STATDEP_SHIFT 1
1072#define OMAP54XX_DSP_STATDEP_WIDTH 0x1
1073#define OMAP54XX_DSP_STATDEP_MASK (1 << 1)
1074
1075/* Used by CM_L3MAIN2_DYNAMICDEP, CM_L4PER_DYNAMICDEP */
1076#define OMAP54XX_DSS_DYNDEP_SHIFT 8
1077#define OMAP54XX_DSS_DYNDEP_WIDTH 0x1
1078#define OMAP54XX_DSS_DYNDEP_MASK (1 << 8)
1079
1080/* Used by CM_DMA_STATICDEP, CM_IPU_STATICDEP, CM_MPU_STATICDEP */
1081#define OMAP54XX_DSS_STATDEP_SHIFT 8
1082#define OMAP54XX_DSS_STATDEP_WIDTH 0x1
1083#define OMAP54XX_DSS_STATDEP_MASK (1 << 8)
1084
1085/*
1086 * Used by CM_C2C_DYNAMICDEP, CM_L3MAIN1_DYNAMICDEP, CM_L4CFG_DYNAMICDEP,
1087 * CM_MIPIEXT_DYNAMICDEP, CM_MPU_DYNAMICDEP
1088 */
1089#define OMAP54XX_EMIF_DYNDEP_SHIFT 4
1090#define OMAP54XX_EMIF_DYNDEP_WIDTH 0x1
1091#define OMAP54XX_EMIF_DYNDEP_MASK (1 << 4)
1092
1093/*
1094 * Used by CM_C2C_STATICDEP, CM_CAM_STATICDEP, CM_DMA_STATICDEP,
1095 * CM_DSP_STATICDEP, CM_DSS_STATICDEP, CM_GPU_STATICDEP, CM_IPU_STATICDEP,
1096 * CM_IVA_STATICDEP, CM_L3INIT_STATICDEP, CM_L4SEC_STATICDEP,
1097 * CM_MIPIEXT_STATICDEP, CM_MPU_STATICDEP
1098 */
1099#define OMAP54XX_EMIF_STATDEP_SHIFT 4
1100#define OMAP54XX_EMIF_STATDEP_WIDTH 0x1
1101#define OMAP54XX_EMIF_STATDEP_MASK (1 << 4)
1102
1103/* Used by CM_SHADOW_FREQ_CONFIG1 */
1104#define OMAP54XX_FREQ_UPDATE_SHIFT 0
1105#define OMAP54XX_FREQ_UPDATE_WIDTH 0x1
1106#define OMAP54XX_FREQ_UPDATE_MASK (1 << 0)
1107
1108/* Used by REVISION_CM_CORE, REVISION_CM_CORE_AON */
1109#define OMAP54XX_FUNC_SHIFT 16
1110#define OMAP54XX_FUNC_WIDTH 0xc
1111#define OMAP54XX_FUNC_MASK (0xfff << 16)
1112
1113/* Used by CM_SHADOW_FREQ_CONFIG2 */
1114#define OMAP54XX_GPMC_FREQ_UPDATE_SHIFT 0
1115#define OMAP54XX_GPMC_FREQ_UPDATE_WIDTH 0x1
1116#define OMAP54XX_GPMC_FREQ_UPDATE_MASK (1 << 0)
1117
1118/* Used by CM_L3MAIN2_DYNAMICDEP */
1119#define OMAP54XX_GPU_DYNDEP_SHIFT 10
1120#define OMAP54XX_GPU_DYNDEP_WIDTH 0x1
1121#define OMAP54XX_GPU_DYNDEP_MASK (1 << 10)
1122
1123/* Used by CM_IPU_STATICDEP, CM_MPU_STATICDEP */
1124#define OMAP54XX_GPU_STATDEP_SHIFT 10
1125#define OMAP54XX_GPU_STATDEP_WIDTH 0x1
1126#define OMAP54XX_GPU_STATDEP_MASK (1 << 10)
1127
1128/*
1129 * Used by CM_ABE_AESS_CLKCTRL, CM_ABE_DMIC_CLKCTRL, CM_ABE_L4_ABE_CLKCTRL,
1130 * CM_ABE_MCASP_CLKCTRL, CM_ABE_MCBSP1_CLKCTRL, CM_ABE_MCBSP2_CLKCTRL,
1131 * CM_ABE_MCBSP3_CLKCTRL, CM_ABE_MCPDM_CLKCTRL, CM_ABE_SLIMBUS1_CLKCTRL,
1132 * CM_ABE_TIMER5_CLKCTRL, CM_ABE_TIMER6_CLKCTRL, CM_ABE_TIMER7_CLKCTRL,
1133 * CM_ABE_TIMER8_CLKCTRL, CM_ABE_WD_TIMER3_CLKCTRL, CM_C2C_C2C_CLKCTRL,
1134 * CM_C2C_C2C_OCP_FW_CLKCTRL, CM_C2C_MODEM_ICR_CLKCTRL, CM_CAM_CAL_CLKCTRL,
1135 * CM_CAM_FDIF_CLKCTRL, CM_CAM_ISS_CLKCTRL, CM_CM_CORE_AON_PROFILING_CLKCTRL,
1136 * CM_CM_CORE_PROFILING_CLKCTRL, CM_COREAON_SMARTREFLEX_CORE_CLKCTRL,
1137 * CM_COREAON_SMARTREFLEX_MM_CLKCTRL, CM_COREAON_SMARTREFLEX_MPU_CLKCTRL,
1138 * CM_CUSTEFUSE_EFUSE_CTRL_CUST_CLKCTRL, CM_DMA_DMA_SYSTEM_CLKCTRL,
1139 * CM_DSP_DSP_CLKCTRL, CM_DSS_BB2D_CLKCTRL, CM_DSS_DSS_CLKCTRL,
1140 * CM_EMIF_DMM_CLKCTRL, CM_EMIF_EMIF1_CLKCTRL, CM_EMIF_EMIF2_CLKCTRL,
1141 * CM_EMIF_EMIF_OCP_FW_CLKCTRL, CM_EMU_DEBUGSS_CLKCTRL,
1142 * CM_EMU_MPU_EMU_DBG_CLKCTRL, CM_GPU_GPU_CLKCTRL, CM_IPU_IPU_CLKCTRL,
1143 * CM_IVA_IVA_CLKCTRL, CM_IVA_SL2_CLKCTRL, CM_L3INIT_HSI_CLKCTRL,
1144 * CM_L3INIT_IEEE1500_2_OCP_CLKCTRL, CM_L3INIT_MMC1_CLKCTRL,
1145 * CM_L3INIT_MMC2_CLKCTRL, CM_L3INIT_MPHY_UNIPRO2_CLKCTRL,
1146 * CM_L3INIT_OCP2SCP1_CLKCTRL, CM_L3INIT_OCP2SCP3_CLKCTRL,
1147 * CM_L3INIT_SATA_CLKCTRL, CM_L3INIT_UNIPRO2_CLKCTRL,
1148 * CM_L3INIT_USB_HOST_HS_CLKCTRL, CM_L3INIT_USB_OTG_SS_CLKCTRL,
1149 * CM_L3INIT_USB_TLL_HS_CLKCTRL, CM_L3INSTR_CTRL_MODULE_BANDGAP_CLKCTRL,
1150 * CM_L3INSTR_DLL_AGING_CLKCTRL, CM_L3INSTR_L3_INSTR_CLKCTRL,
1151 * CM_L3INSTR_L3_MAIN_3_CLKCTRL, CM_L3INSTR_OCP_WP_NOC_CLKCTRL,
1152 * CM_L3MAIN1_L3_MAIN_1_CLKCTRL, CM_L3MAIN2_GPMC_CLKCTRL,
1153 * CM_L3MAIN2_L3_MAIN_2_CLKCTRL, CM_L3MAIN2_OCMC_RAM_CLKCTRL,
1154 * CM_L4CFG_L4_CFG_CLKCTRL, CM_L4CFG_MAILBOX_CLKCTRL,
1155 * CM_L4CFG_OCP2SCP2_CLKCTRL, CM_L4CFG_SAR_ROM_CLKCTRL,
1156 * CM_L4CFG_SPINLOCK_CLKCTRL, CM_L4PER_ELM_CLKCTRL, CM_L4PER_GPIO2_CLKCTRL,
1157 * CM_L4PER_GPIO3_CLKCTRL, CM_L4PER_GPIO4_CLKCTRL, CM_L4PER_GPIO5_CLKCTRL,
1158 * CM_L4PER_GPIO6_CLKCTRL, CM_L4PER_GPIO7_CLKCTRL, CM_L4PER_GPIO8_CLKCTRL,
1159 * CM_L4PER_HDQ1W_CLKCTRL, CM_L4PER_I2C1_CLKCTRL, CM_L4PER_I2C2_CLKCTRL,
1160 * CM_L4PER_I2C3_CLKCTRL, CM_L4PER_I2C4_CLKCTRL, CM_L4PER_I2C5_CLKCTRL,
1161 * CM_L4PER_L4_PER_CLKCTRL, CM_L4PER_MCSPI1_CLKCTRL, CM_L4PER_MCSPI2_CLKCTRL,
1162 * CM_L4PER_MCSPI3_CLKCTRL, CM_L4PER_MCSPI4_CLKCTRL, CM_L4PER_MMC3_CLKCTRL,
1163 * CM_L4PER_MMC4_CLKCTRL, CM_L4PER_MMC5_CLKCTRL, CM_L4PER_TIMER10_CLKCTRL,
1164 * CM_L4PER_TIMER11_CLKCTRL, CM_L4PER_TIMER2_CLKCTRL, CM_L4PER_TIMER3_CLKCTRL,
1165 * CM_L4PER_TIMER4_CLKCTRL, CM_L4PER_TIMER9_CLKCTRL, CM_L4PER_UART1_CLKCTRL,
1166 * CM_L4PER_UART2_CLKCTRL, CM_L4PER_UART3_CLKCTRL, CM_L4PER_UART4_CLKCTRL,
1167 * CM_L4PER_UART5_CLKCTRL, CM_L4PER_UART6_CLKCTRL, CM_L4SEC_AES1_CLKCTRL,
1168 * CM_L4SEC_AES2_CLKCTRL, CM_L4SEC_DES3DES_CLKCTRL,
1169 * CM_L4SEC_DMA_CRYPTO_CLKCTRL, CM_L4SEC_FPKA_CLKCTRL, CM_L4SEC_RNG_CLKCTRL,
1170 * CM_L4SEC_SHA2MD5_CLKCTRL, CM_MIPIEXT_LLI_CLKCTRL,
1171 * CM_MIPIEXT_LLI_OCP_FW_CLKCTRL, CM_MIPIEXT_MPHY_CLKCTRL, CM_MPU_MPU_CLKCTRL,
1172 * CM_MPU_MPU_MPU_DBG_CLKCTRL, CM_WKUPAON_COUNTER_32K_CLKCTRL,
1173 * CM_WKUPAON_GPIO1_CLKCTRL, CM_WKUPAON_KBD_CLKCTRL,
1174 * CM_WKUPAON_L4_WKUP_CLKCTRL, CM_WKUPAON_SAR_RAM_CLKCTRL,
1175 * CM_WKUPAON_TIMER12_CLKCTRL, CM_WKUPAON_TIMER1_CLKCTRL,
1176 * CM_WKUPAON_WD_TIMER1_CLKCTRL, CM_WKUPAON_WD_TIMER2_CLKCTRL
1177 */
1178#define OMAP54XX_IDLEST_SHIFT 16
1179#define OMAP54XX_IDLEST_WIDTH 0x2
1180#define OMAP54XX_IDLEST_MASK (0x3 << 16)
1181
1182/* Used by CM_L3MAIN2_DYNAMICDEP */
1183#define OMAP54XX_IPU_DYNDEP_SHIFT 0
1184#define OMAP54XX_IPU_DYNDEP_WIDTH 0x1
1185#define OMAP54XX_IPU_DYNDEP_MASK (1 << 0)
1186
1187/* Used by CM_DMA_STATICDEP, CM_MPU_STATICDEP */
1188#define OMAP54XX_IPU_STATDEP_SHIFT 0
1189#define OMAP54XX_IPU_STATDEP_WIDTH 0x1
1190#define OMAP54XX_IPU_STATDEP_MASK (1 << 0)
1191
1192/* Used by CM_DSP_DYNAMICDEP, CM_L3MAIN2_DYNAMICDEP */
1193#define OMAP54XX_IVA_DYNDEP_SHIFT 2
1194#define OMAP54XX_IVA_DYNDEP_WIDTH 0x1
1195#define OMAP54XX_IVA_DYNDEP_MASK (1 << 2)
1196
1197/*
1198 * Used by CM_C2C_STATICDEP, CM_CAM_STATICDEP, CM_DMA_STATICDEP,
1199 * CM_DSP_STATICDEP, CM_DSS_STATICDEP, CM_GPU_STATICDEP, CM_IPU_STATICDEP,
1200 * CM_L3INIT_STATICDEP, CM_MIPIEXT_STATICDEP, CM_MPU_STATICDEP
1201 */
1202#define OMAP54XX_IVA_STATDEP_SHIFT 2
1203#define OMAP54XX_IVA_STATDEP_WIDTH 0x1
1204#define OMAP54XX_IVA_STATDEP_MASK (1 << 2)
1205
1206/* Used by CM_L4CFG_DYNAMICDEP, CM_L4PER_DYNAMICDEP */
1207#define OMAP54XX_L3INIT_DYNDEP_SHIFT 7
1208#define OMAP54XX_L3INIT_DYNDEP_WIDTH 0x1
1209#define OMAP54XX_L3INIT_DYNDEP_MASK (1 << 7)
1210
1211/*
1212 * Used by CM_C2C_STATICDEP, CM_DMA_STATICDEP, CM_DSP_STATICDEP,
1213 * CM_IPU_STATICDEP, CM_MIPIEXT_STATICDEP, CM_MPU_STATICDEP
1214 */
1215#define OMAP54XX_L3INIT_STATDEP_SHIFT 7
1216#define OMAP54XX_L3INIT_STATDEP_WIDTH 0x1
1217#define OMAP54XX_L3INIT_STATDEP_MASK (1 << 7)
1218
1219/*
1220 * Used by CM_DSP_DYNAMICDEP, CM_DSS_DYNAMICDEP, CM_L3INIT_DYNAMICDEP,
1221 * CM_L3MAIN2_DYNAMICDEP, CM_L4CFG_DYNAMICDEP, CM_MPU_DYNAMICDEP
1222 */
1223#define OMAP54XX_L3MAIN1_DYNDEP_SHIFT 5
1224#define OMAP54XX_L3MAIN1_DYNDEP_WIDTH 0x1
1225#define OMAP54XX_L3MAIN1_DYNDEP_MASK (1 << 5)
1226
1227/*
1228 * Used by CM_C2C_STATICDEP, CM_CAM_STATICDEP, CM_DMA_STATICDEP,
1229 * CM_DSP_STATICDEP, CM_DSS_STATICDEP, CM_GPU_STATICDEP, CM_IPU_STATICDEP,
1230 * CM_IVA_STATICDEP, CM_L3INIT_STATICDEP, CM_L4SEC_STATICDEP,
1231 * CM_MIPIEXT_STATICDEP, CM_MPU_STATICDEP
1232 */
1233#define OMAP54XX_L3MAIN1_STATDEP_SHIFT 5
1234#define OMAP54XX_L3MAIN1_STATDEP_WIDTH 0x1
1235#define OMAP54XX_L3MAIN1_STATDEP_MASK (1 << 5)
1236
1237/*
1238 * Used by CM_C2C_DYNAMICDEP, CM_CAM_DYNAMICDEP, CM_DMA_DYNAMICDEP,
1239 * CM_DSS_DYNAMICDEP, CM_EMU_DYNAMICDEP, CM_GPU_DYNAMICDEP, CM_IPU_DYNAMICDEP,
1240 * CM_IVA_DYNAMICDEP, CM_L3INIT_DYNAMICDEP, CM_L3MAIN1_DYNAMICDEP,
1241 * CM_L4CFG_DYNAMICDEP, CM_L4SEC_DYNAMICDEP, CM_MIPIEXT_DYNAMICDEP
1242 */
1243#define OMAP54XX_L3MAIN2_DYNDEP_SHIFT 6
1244#define OMAP54XX_L3MAIN2_DYNDEP_WIDTH 0x1
1245#define OMAP54XX_L3MAIN2_DYNDEP_MASK (1 << 6)
1246
1247/*
1248 * Used by CM_C2C_STATICDEP, CM_CAM_STATICDEP, CM_DMA_STATICDEP,
1249 * CM_DSP_STATICDEP, CM_DSS_STATICDEP, CM_GPU_STATICDEP, CM_IPU_STATICDEP,
1250 * CM_IVA_STATICDEP, CM_L3INIT_STATICDEP, CM_L4SEC_STATICDEP,
1251 * CM_MIPIEXT_STATICDEP, CM_MPU_STATICDEP
1252 */
1253#define OMAP54XX_L3MAIN2_STATDEP_SHIFT 6
1254#define OMAP54XX_L3MAIN2_STATDEP_WIDTH 0x1
1255#define OMAP54XX_L3MAIN2_STATDEP_MASK (1 << 6)
1256
1257/* Used by CM_L3MAIN1_DYNAMICDEP */
1258#define OMAP54XX_L4CFG_DYNDEP_SHIFT 12
1259#define OMAP54XX_L4CFG_DYNDEP_WIDTH 0x1
1260#define OMAP54XX_L4CFG_DYNDEP_MASK (1 << 12)
1261
1262/*
1263 * Used by CM_C2C_STATICDEP, CM_DMA_STATICDEP, CM_DSP_STATICDEP,
1264 * CM_IPU_STATICDEP, CM_L3INIT_STATICDEP, CM_MIPIEXT_STATICDEP, CM_MPU_STATICDEP
1265 */
1266#define OMAP54XX_L4CFG_STATDEP_SHIFT 12
1267#define OMAP54XX_L4CFG_STATDEP_WIDTH 0x1
1268#define OMAP54XX_L4CFG_STATDEP_MASK (1 << 12)
1269
1270/* Used by CM_L3MAIN2_DYNAMICDEP */
1271#define OMAP54XX_L4PER_DYNDEP_SHIFT 13
1272#define OMAP54XX_L4PER_DYNDEP_WIDTH 0x1
1273#define OMAP54XX_L4PER_DYNDEP_MASK (1 << 13)
1274
1275/*
1276 * Used by CM_C2C_STATICDEP, CM_DMA_STATICDEP, CM_DSP_STATICDEP,
1277 * CM_IPU_STATICDEP, CM_L3INIT_STATICDEP, CM_L4SEC_STATICDEP,
1278 * CM_MIPIEXT_STATICDEP, CM_MPU_STATICDEP
1279 */
1280#define OMAP54XX_L4PER_STATDEP_SHIFT 13
1281#define OMAP54XX_L4PER_STATDEP_WIDTH 0x1
1282#define OMAP54XX_L4PER_STATDEP_MASK (1 << 13)
1283
1284/* Used by CM_L3MAIN2_DYNAMICDEP, CM_L4PER_DYNAMICDEP */
1285#define OMAP54XX_L4SEC_DYNDEP_SHIFT 14
1286#define OMAP54XX_L4SEC_DYNDEP_WIDTH 0x1
1287#define OMAP54XX_L4SEC_DYNDEP_MASK (1 << 14)
1288
1289/*
1290 * Used by CM_DMA_STATICDEP, CM_IPU_STATICDEP, CM_L3INIT_STATICDEP,
1291 * CM_MPU_STATICDEP
1292 */
1293#define OMAP54XX_L4SEC_STATDEP_SHIFT 14
1294#define OMAP54XX_L4SEC_STATDEP_WIDTH 0x1
1295#define OMAP54XX_L4SEC_STATDEP_MASK (1 << 14)
1296
1297/* Used by CM_L3MAIN2_DYNAMICDEP, CM_L4CFG_DYNAMICDEP */
1298#define OMAP54XX_MIPIEXT_DYNDEP_SHIFT 21
1299#define OMAP54XX_MIPIEXT_DYNDEP_WIDTH 0x1
1300#define OMAP54XX_MIPIEXT_DYNDEP_MASK (1 << 21)
1301
1302/* Used by CM_MPU_STATICDEP */
1303#define OMAP54XX_MIPIEXT_STATDEP_SHIFT 21
1304#define OMAP54XX_MIPIEXT_STATDEP_WIDTH 0x1
1305#define OMAP54XX_MIPIEXT_STATDEP_MASK (1 << 21)
1306
1307/*
1308 * Used by CM_SSC_MODFREQDIV_DPLL_ABE, CM_SSC_MODFREQDIV_DPLL_CORE,
1309 * CM_SSC_MODFREQDIV_DPLL_IVA, CM_SSC_MODFREQDIV_DPLL_MPU,
1310 * CM_SSC_MODFREQDIV_DPLL_PER, CM_SSC_MODFREQDIV_DPLL_UNIPRO1,
1311 * CM_SSC_MODFREQDIV_DPLL_UNIPRO2, CM_SSC_MODFREQDIV_DPLL_USB
1312 */
1313#define OMAP54XX_MODFREQDIV_EXPONENT_SHIFT 8
1314#define OMAP54XX_MODFREQDIV_EXPONENT_WIDTH 0x3
1315#define OMAP54XX_MODFREQDIV_EXPONENT_MASK (0x7 << 8)
1316
1317/*
1318 * Used by CM_SSC_MODFREQDIV_DPLL_ABE, CM_SSC_MODFREQDIV_DPLL_CORE,
1319 * CM_SSC_MODFREQDIV_DPLL_IVA, CM_SSC_MODFREQDIV_DPLL_MPU,
1320 * CM_SSC_MODFREQDIV_DPLL_PER, CM_SSC_MODFREQDIV_DPLL_UNIPRO1,
1321 * CM_SSC_MODFREQDIV_DPLL_UNIPRO2, CM_SSC_MODFREQDIV_DPLL_USB
1322 */
1323#define OMAP54XX_MODFREQDIV_MANTISSA_SHIFT 0
1324#define OMAP54XX_MODFREQDIV_MANTISSA_WIDTH 0x7
1325#define OMAP54XX_MODFREQDIV_MANTISSA_MASK (0x7f << 0)
1326
1327/*
1328 * Used by CM_ABE_AESS_CLKCTRL, CM_ABE_DMIC_CLKCTRL, CM_ABE_L4_ABE_CLKCTRL,
1329 * CM_ABE_MCASP_CLKCTRL, CM_ABE_MCBSP1_CLKCTRL, CM_ABE_MCBSP2_CLKCTRL,
1330 * CM_ABE_MCBSP3_CLKCTRL, CM_ABE_MCPDM_CLKCTRL, CM_ABE_SLIMBUS1_CLKCTRL,
1331 * CM_ABE_TIMER5_CLKCTRL, CM_ABE_TIMER6_CLKCTRL, CM_ABE_TIMER7_CLKCTRL,
1332 * CM_ABE_TIMER8_CLKCTRL, CM_ABE_WD_TIMER3_CLKCTRL, CM_C2C_C2C_CLKCTRL,
1333 * CM_C2C_C2C_OCP_FW_CLKCTRL, CM_C2C_MODEM_ICR_CLKCTRL, CM_CAM_CAL_CLKCTRL,
1334 * CM_CAM_FDIF_CLKCTRL, CM_CAM_ISS_CLKCTRL, CM_CM_CORE_AON_PROFILING_CLKCTRL,
1335 * CM_CM_CORE_PROFILING_CLKCTRL, CM_COREAON_SMARTREFLEX_CORE_CLKCTRL,
1336 * CM_COREAON_SMARTREFLEX_MM_CLKCTRL, CM_COREAON_SMARTREFLEX_MPU_CLKCTRL,
1337 * CM_CUSTEFUSE_EFUSE_CTRL_CUST_CLKCTRL, CM_DMA_DMA_SYSTEM_CLKCTRL,
1338 * CM_DSP_DSP_CLKCTRL, CM_DSS_BB2D_CLKCTRL, CM_DSS_DSS_CLKCTRL,
1339 * CM_EMIF_DMM_CLKCTRL, CM_EMIF_EMIF1_CLKCTRL, CM_EMIF_EMIF2_CLKCTRL,
1340 * CM_EMIF_EMIF_OCP_FW_CLKCTRL, CM_EMU_DEBUGSS_CLKCTRL,
1341 * CM_EMU_MPU_EMU_DBG_CLKCTRL, CM_GPU_GPU_CLKCTRL, CM_IPU_IPU_CLKCTRL,
1342 * CM_IVA_IVA_CLKCTRL, CM_IVA_SL2_CLKCTRL, CM_L3INIT_HSI_CLKCTRL,
1343 * CM_L3INIT_IEEE1500_2_OCP_CLKCTRL, CM_L3INIT_MMC1_CLKCTRL,
1344 * CM_L3INIT_MMC2_CLKCTRL, CM_L3INIT_MPHY_UNIPRO2_CLKCTRL,
1345 * CM_L3INIT_OCP2SCP1_CLKCTRL, CM_L3INIT_OCP2SCP3_CLKCTRL,
1346 * CM_L3INIT_SATA_CLKCTRL, CM_L3INIT_UNIPRO2_CLKCTRL,
1347 * CM_L3INIT_USB_HOST_HS_CLKCTRL, CM_L3INIT_USB_OTG_SS_CLKCTRL,
1348 * CM_L3INIT_USB_TLL_HS_CLKCTRL, CM_L3INSTR_CTRL_MODULE_BANDGAP_CLKCTRL,
1349 * CM_L3INSTR_DLL_AGING_CLKCTRL, CM_L3INSTR_L3_INSTR_CLKCTRL,
1350 * CM_L3INSTR_L3_MAIN_3_CLKCTRL, CM_L3INSTR_OCP_WP_NOC_CLKCTRL,
1351 * CM_L3MAIN1_L3_MAIN_1_CLKCTRL, CM_L3MAIN2_GPMC_CLKCTRL,
1352 * CM_L3MAIN2_L3_MAIN_2_CLKCTRL, CM_L3MAIN2_OCMC_RAM_CLKCTRL,
1353 * CM_L4CFG_L4_CFG_CLKCTRL, CM_L4CFG_MAILBOX_CLKCTRL,
1354 * CM_L4CFG_OCP2SCP2_CLKCTRL, CM_L4CFG_SAR_ROM_CLKCTRL,
1355 * CM_L4CFG_SPINLOCK_CLKCTRL, CM_L4PER_ELM_CLKCTRL, CM_L4PER_GPIO2_CLKCTRL,
1356 * CM_L4PER_GPIO3_CLKCTRL, CM_L4PER_GPIO4_CLKCTRL, CM_L4PER_GPIO5_CLKCTRL,
1357 * CM_L4PER_GPIO6_CLKCTRL, CM_L4PER_GPIO7_CLKCTRL, CM_L4PER_GPIO8_CLKCTRL,
1358 * CM_L4PER_HDQ1W_CLKCTRL, CM_L4PER_I2C1_CLKCTRL, CM_L4PER_I2C2_CLKCTRL,
1359 * CM_L4PER_I2C3_CLKCTRL, CM_L4PER_I2C4_CLKCTRL, CM_L4PER_I2C5_CLKCTRL,
1360 * CM_L4PER_L4_PER_CLKCTRL, CM_L4PER_MCSPI1_CLKCTRL, CM_L4PER_MCSPI2_CLKCTRL,
1361 * CM_L4PER_MCSPI3_CLKCTRL, CM_L4PER_MCSPI4_CLKCTRL, CM_L4PER_MMC3_CLKCTRL,
1362 * CM_L4PER_MMC4_CLKCTRL, CM_L4PER_MMC5_CLKCTRL, CM_L4PER_TIMER10_CLKCTRL,
1363 * CM_L4PER_TIMER11_CLKCTRL, CM_L4PER_TIMER2_CLKCTRL, CM_L4PER_TIMER3_CLKCTRL,
1364 * CM_L4PER_TIMER4_CLKCTRL, CM_L4PER_TIMER9_CLKCTRL, CM_L4PER_UART1_CLKCTRL,
1365 * CM_L4PER_UART2_CLKCTRL, CM_L4PER_UART3_CLKCTRL, CM_L4PER_UART4_CLKCTRL,
1366 * CM_L4PER_UART5_CLKCTRL, CM_L4PER_UART6_CLKCTRL, CM_L4SEC_AES1_CLKCTRL,
1367 * CM_L4SEC_AES2_CLKCTRL, CM_L4SEC_DES3DES_CLKCTRL,
1368 * CM_L4SEC_DMA_CRYPTO_CLKCTRL, CM_L4SEC_FPKA_CLKCTRL, CM_L4SEC_RNG_CLKCTRL,
1369 * CM_L4SEC_SHA2MD5_CLKCTRL, CM_MIPIEXT_LLI_CLKCTRL,
1370 * CM_MIPIEXT_LLI_OCP_FW_CLKCTRL, CM_MIPIEXT_MPHY_CLKCTRL, CM_MPU_MPU_CLKCTRL,
1371 * CM_MPU_MPU_MPU_DBG_CLKCTRL, CM_WKUPAON_COUNTER_32K_CLKCTRL,
1372 * CM_WKUPAON_GPIO1_CLKCTRL, CM_WKUPAON_KBD_CLKCTRL,
1373 * CM_WKUPAON_L4_WKUP_CLKCTRL, CM_WKUPAON_SAR_RAM_CLKCTRL,
1374 * CM_WKUPAON_TIMER12_CLKCTRL, CM_WKUPAON_TIMER1_CLKCTRL,
1375 * CM_WKUPAON_WD_TIMER1_CLKCTRL, CM_WKUPAON_WD_TIMER2_CLKCTRL
1376 */
1377#define OMAP54XX_MODULEMODE_SHIFT 0
1378#define OMAP54XX_MODULEMODE_WIDTH 0x2
1379#define OMAP54XX_MODULEMODE_MASK (0x3 << 0)
1380
1381/* Used by CM_L4CFG_DYNAMICDEP */
1382#define OMAP54XX_MPU_DYNDEP_SHIFT 19
1383#define OMAP54XX_MPU_DYNDEP_WIDTH 0x1
1384#define OMAP54XX_MPU_DYNDEP_MASK (1 << 19)
1385
1386/* Used by CM_DSS_DSS_CLKCTRL */
1387#define OMAP54XX_OPTFCLKEN_32KHZ_CLK_SHIFT 11
1388#define OMAP54XX_OPTFCLKEN_32KHZ_CLK_WIDTH 0x1
1389#define OMAP54XX_OPTFCLKEN_32KHZ_CLK_MASK (1 << 11)
1390
1391/* Renamed from OPTFCLKEN_32KHZ_CLK Used by CM_L3INIT_MMC1_CLKCTRL */
1392#define OMAP54XX_OPTFCLKEN_32KHZ_CLK_8_8_SHIFT 8
1393#define OMAP54XX_OPTFCLKEN_32KHZ_CLK_8_8_WIDTH 0x1
1394#define OMAP54XX_OPTFCLKEN_32KHZ_CLK_8_8_MASK (1 << 8)
1395
1396/* Used by CM_DSS_DSS_CLKCTRL */
1397#define OMAP54XX_OPTFCLKEN_48MHZ_CLK_SHIFT 9
1398#define OMAP54XX_OPTFCLKEN_48MHZ_CLK_WIDTH 0x1
1399#define OMAP54XX_OPTFCLKEN_48MHZ_CLK_MASK (1 << 9)
1400
1401/* Used by CM_COREAON_USB_PHY_CORE_CLKCTRL */
1402#define OMAP54XX_OPTFCLKEN_CLK32K_SHIFT 8
1403#define OMAP54XX_OPTFCLKEN_CLK32K_WIDTH 0x1
1404#define OMAP54XX_OPTFCLKEN_CLK32K_MASK (1 << 8)
1405
1406/* Used by CM_CAM_ISS_CLKCTRL */
1407#define OMAP54XX_OPTFCLKEN_CTRLCLK_SHIFT 8
1408#define OMAP54XX_OPTFCLKEN_CTRLCLK_WIDTH 0x1
1409#define OMAP54XX_OPTFCLKEN_CTRLCLK_MASK (1 << 8)
1410
1411/*
1412 * Used by CM_L4PER_GPIO2_CLKCTRL, CM_L4PER_GPIO3_CLKCTRL,
1413 * CM_L4PER_GPIO4_CLKCTRL, CM_L4PER_GPIO5_CLKCTRL, CM_L4PER_GPIO6_CLKCTRL,
1414 * CM_L4PER_GPIO7_CLKCTRL, CM_L4PER_GPIO8_CLKCTRL, CM_WKUPAON_GPIO1_CLKCTRL
1415 */
1416#define OMAP54XX_OPTFCLKEN_DBCLK_SHIFT 8
1417#define OMAP54XX_OPTFCLKEN_DBCLK_WIDTH 0x1
1418#define OMAP54XX_OPTFCLKEN_DBCLK_MASK (1 << 8)
1419
1420/* Used by CM_EMIF_EMIF_DLL_CLKCTRL */
1421#define OMAP54XX_OPTFCLKEN_DLL_CLK_SHIFT 8
1422#define OMAP54XX_OPTFCLKEN_DLL_CLK_WIDTH 0x1
1423#define OMAP54XX_OPTFCLKEN_DLL_CLK_MASK (1 << 8)
1424
1425/* Used by CM_DSS_DSS_CLKCTRL */
1426#define OMAP54XX_OPTFCLKEN_DSSCLK_SHIFT 8
1427#define OMAP54XX_OPTFCLKEN_DSSCLK_WIDTH 0x1
1428#define OMAP54XX_OPTFCLKEN_DSSCLK_MASK (1 << 8)
1429
1430/* Used by CM_ABE_SLIMBUS1_CLKCTRL */
1431#define OMAP54XX_OPTFCLKEN_FCLK0_SHIFT 8
1432#define OMAP54XX_OPTFCLKEN_FCLK0_WIDTH 0x1
1433#define OMAP54XX_OPTFCLKEN_FCLK0_MASK (1 << 8)
1434
1435/* Used by CM_ABE_SLIMBUS1_CLKCTRL */
1436#define OMAP54XX_OPTFCLKEN_FCLK1_SHIFT 9
1437#define OMAP54XX_OPTFCLKEN_FCLK1_WIDTH 0x1
1438#define OMAP54XX_OPTFCLKEN_FCLK1_MASK (1 << 9)
1439
1440/* Used by CM_ABE_SLIMBUS1_CLKCTRL */
1441#define OMAP54XX_OPTFCLKEN_FCLK2_SHIFT 10
1442#define OMAP54XX_OPTFCLKEN_FCLK2_WIDTH 0x1
1443#define OMAP54XX_OPTFCLKEN_FCLK2_MASK (1 << 10)
1444
1445/* Used by CM_L3INIT_USB_HOST_HS_CLKCTRL */
1446#define OMAP54XX_OPTFCLKEN_FUNC48M_CLK_SHIFT 15
1447#define OMAP54XX_OPTFCLKEN_FUNC48M_CLK_WIDTH 0x1
1448#define OMAP54XX_OPTFCLKEN_FUNC48M_CLK_MASK (1 << 15)
1449
1450/* Used by CM_L3INIT_USB_HOST_HS_CLKCTRL */
1451#define OMAP54XX_OPTFCLKEN_HSIC480M_P1_CLK_SHIFT 13
1452#define OMAP54XX_OPTFCLKEN_HSIC480M_P1_CLK_WIDTH 0x1
1453#define OMAP54XX_OPTFCLKEN_HSIC480M_P1_CLK_MASK (1 << 13)
1454
1455/* Used by CM_L3INIT_USB_HOST_HS_CLKCTRL */
1456#define OMAP54XX_OPTFCLKEN_HSIC480M_P2_CLK_SHIFT 14
1457#define OMAP54XX_OPTFCLKEN_HSIC480M_P2_CLK_WIDTH 0x1
1458#define OMAP54XX_OPTFCLKEN_HSIC480M_P2_CLK_MASK (1 << 14)
1459
1460/* Used by CM_L3INIT_USB_HOST_HS_CLKCTRL */
1461#define OMAP54XX_OPTFCLKEN_HSIC480M_P3_CLK_SHIFT 7
1462#define OMAP54XX_OPTFCLKEN_HSIC480M_P3_CLK_WIDTH 0x1
1463#define OMAP54XX_OPTFCLKEN_HSIC480M_P3_CLK_MASK (1 << 7)
1464
1465/* Used by CM_L3INIT_USB_HOST_HS_CLKCTRL */
1466#define OMAP54XX_OPTFCLKEN_HSIC60M_P1_CLK_SHIFT 11
1467#define OMAP54XX_OPTFCLKEN_HSIC60M_P1_CLK_WIDTH 0x1
1468#define OMAP54XX_OPTFCLKEN_HSIC60M_P1_CLK_MASK (1 << 11)
1469
1470/* Used by CM_L3INIT_USB_HOST_HS_CLKCTRL */
1471#define OMAP54XX_OPTFCLKEN_HSIC60M_P2_CLK_SHIFT 12
1472#define OMAP54XX_OPTFCLKEN_HSIC60M_P2_CLK_WIDTH 0x1
1473#define OMAP54XX_OPTFCLKEN_HSIC60M_P2_CLK_MASK (1 << 12)
1474
1475/* Used by CM_L3INIT_USB_HOST_HS_CLKCTRL */
1476#define OMAP54XX_OPTFCLKEN_HSIC60M_P3_CLK_SHIFT 6
1477#define OMAP54XX_OPTFCLKEN_HSIC60M_P3_CLK_WIDTH 0x1
1478#define OMAP54XX_OPTFCLKEN_HSIC60M_P3_CLK_MASK (1 << 6)
1479
1480/* Used by CM_L3INIT_USB_OTG_SS_CLKCTRL */
1481#define OMAP54XX_OPTFCLKEN_REFCLK960M_SHIFT 8
1482#define OMAP54XX_OPTFCLKEN_REFCLK960M_WIDTH 0x1
1483#define OMAP54XX_OPTFCLKEN_REFCLK960M_MASK (1 << 8)
1484
1485/* Used by CM_L3INIT_SATA_CLKCTRL */
1486#define OMAP54XX_OPTFCLKEN_REF_CLK_SHIFT 8
1487#define OMAP54XX_OPTFCLKEN_REF_CLK_WIDTH 0x1
1488#define OMAP54XX_OPTFCLKEN_REF_CLK_MASK (1 << 8)
1489
1490/* Used by CM_WKUPAON_SCRM_CLKCTRL */
1491#define OMAP54XX_OPTFCLKEN_SCRM_CORE_SHIFT 8
1492#define OMAP54XX_OPTFCLKEN_SCRM_CORE_WIDTH 0x1
1493#define OMAP54XX_OPTFCLKEN_SCRM_CORE_MASK (1 << 8)
1494
1495/* Used by CM_WKUPAON_SCRM_CLKCTRL */
1496#define OMAP54XX_OPTFCLKEN_SCRM_PER_SHIFT 9
1497#define OMAP54XX_OPTFCLKEN_SCRM_PER_WIDTH 0x1
1498#define OMAP54XX_OPTFCLKEN_SCRM_PER_MASK (1 << 9)
1499
1500/* Used by CM_ABE_SLIMBUS1_CLKCTRL */
1501#define OMAP54XX_OPTFCLKEN_SLIMBUS_CLK_SHIFT 11
1502#define OMAP54XX_OPTFCLKEN_SLIMBUS_CLK_WIDTH 0x1
1503#define OMAP54XX_OPTFCLKEN_SLIMBUS_CLK_MASK (1 << 11)
1504
1505/* Used by CM_DSS_DSS_CLKCTRL */
1506#define OMAP54XX_OPTFCLKEN_SYS_CLK_SHIFT 10
1507#define OMAP54XX_OPTFCLKEN_SYS_CLK_WIDTH 0x1
1508#define OMAP54XX_OPTFCLKEN_SYS_CLK_MASK (1 << 10)
1509
1510/* Used by CM_MIPIEXT_LLI_CLKCTRL */
1511#define OMAP54XX_OPTFCLKEN_TXPHY_CLK_SHIFT 8
1512#define OMAP54XX_OPTFCLKEN_TXPHY_CLK_WIDTH 0x1
1513#define OMAP54XX_OPTFCLKEN_TXPHY_CLK_MASK (1 << 8)
1514
1515/* Used by CM_MIPIEXT_LLI_CLKCTRL */
1516#define OMAP54XX_OPTFCLKEN_TXPHY_LS_CLK_SHIFT 9
1517#define OMAP54XX_OPTFCLKEN_TXPHY_LS_CLK_WIDTH 0x1
1518#define OMAP54XX_OPTFCLKEN_TXPHY_LS_CLK_MASK (1 << 9)
1519
1520/* Used by CM_L3INIT_USB_TLL_HS_CLKCTRL */
1521#define OMAP54XX_OPTFCLKEN_USB_CH0_CLK_SHIFT 8
1522#define OMAP54XX_OPTFCLKEN_USB_CH0_CLK_WIDTH 0x1
1523#define OMAP54XX_OPTFCLKEN_USB_CH0_CLK_MASK (1 << 8)
1524
1525/* Used by CM_L3INIT_USB_TLL_HS_CLKCTRL */
1526#define OMAP54XX_OPTFCLKEN_USB_CH1_CLK_SHIFT 9
1527#define OMAP54XX_OPTFCLKEN_USB_CH1_CLK_WIDTH 0x1
1528#define OMAP54XX_OPTFCLKEN_USB_CH1_CLK_MASK (1 << 9)
1529
1530/* Used by CM_L3INIT_USB_TLL_HS_CLKCTRL */
1531#define OMAP54XX_OPTFCLKEN_USB_CH2_CLK_SHIFT 10
1532#define OMAP54XX_OPTFCLKEN_USB_CH2_CLK_WIDTH 0x1
1533#define OMAP54XX_OPTFCLKEN_USB_CH2_CLK_MASK (1 << 10)
1534
1535/* Used by CM_L3INIT_USB_HOST_HS_CLKCTRL */
1536#define OMAP54XX_OPTFCLKEN_UTMI_P1_CLK_SHIFT 8
1537#define OMAP54XX_OPTFCLKEN_UTMI_P1_CLK_WIDTH 0x1
1538#define OMAP54XX_OPTFCLKEN_UTMI_P1_CLK_MASK (1 << 8)
1539
1540/* Used by CM_L3INIT_USB_HOST_HS_CLKCTRL */
1541#define OMAP54XX_OPTFCLKEN_UTMI_P2_CLK_SHIFT 9
1542#define OMAP54XX_OPTFCLKEN_UTMI_P2_CLK_WIDTH 0x1
1543#define OMAP54XX_OPTFCLKEN_UTMI_P2_CLK_MASK (1 << 9)
1544
1545/* Used by CM_L3INIT_USB_HOST_HS_CLKCTRL */
1546#define OMAP54XX_OPTFCLKEN_UTMI_P3_CLK_SHIFT 10
1547#define OMAP54XX_OPTFCLKEN_UTMI_P3_CLK_WIDTH 0x1
1548#define OMAP54XX_OPTFCLKEN_UTMI_P3_CLK_MASK (1 << 10)
1549
1550/* Used by CM_CORE_AON_DEBUG_OUT, CM_CORE_DEBUG_OUT */
1551#define OMAP54XX_OUTPUT_SHIFT 0
1552#define OMAP54XX_OUTPUT_WIDTH 0x20
1553#define OMAP54XX_OUTPUT_MASK (0xffffffff << 0)
1554
1555/* Used by CM_CLKSEL_ABE */
1556#define OMAP54XX_PAD_CLKS_GATE_SHIFT 8
1557#define OMAP54XX_PAD_CLKS_GATE_WIDTH 0x1
1558#define OMAP54XX_PAD_CLKS_GATE_MASK (1 << 8)
1559
1560/* Used by CM_RESTORE_ST */
1561#define OMAP54XX_PHASE1_COMPLETED_SHIFT 0
1562#define OMAP54XX_PHASE1_COMPLETED_WIDTH 0x1
1563#define OMAP54XX_PHASE1_COMPLETED_MASK (1 << 0)
1564
1565/* Used by CM_RESTORE_ST */
1566#define OMAP54XX_PHASE2A_COMPLETED_SHIFT 1
1567#define OMAP54XX_PHASE2A_COMPLETED_WIDTH 0x1
1568#define OMAP54XX_PHASE2A_COMPLETED_MASK (1 << 1)
1569
1570/* Used by CM_RESTORE_ST */
1571#define OMAP54XX_PHASE2B_COMPLETED_SHIFT 2
1572#define OMAP54XX_PHASE2B_COMPLETED_WIDTH 0x1
1573#define OMAP54XX_PHASE2B_COMPLETED_MASK (1 << 2)
1574
1575/* Used by CM_DYN_DEP_PRESCAL */
1576#define OMAP54XX_PRESCAL_SHIFT 0
1577#define OMAP54XX_PRESCAL_WIDTH 0x6
1578#define OMAP54XX_PRESCAL_MASK (0x3f << 0)
1579
1580/* Used by REVISION_CM_CORE, REVISION_CM_CORE_AON */
1581#define OMAP54XX_R_RTL_SHIFT 11
1582#define OMAP54XX_R_RTL_WIDTH 0x5
1583#define OMAP54XX_R_RTL_MASK (0x1f << 11)
1584
1585/* Used by CM_L3INIT_USB_HOST_HS_CLKCTRL, CM_L3INIT_USB_TLL_HS_CLKCTRL */
1586#define OMAP54XX_SAR_MODE_SHIFT 4
1587#define OMAP54XX_SAR_MODE_WIDTH 0x1
1588#define OMAP54XX_SAR_MODE_MASK (1 << 4)
1589
1590/* Used by REVISION_CM_CORE, REVISION_CM_CORE_AON */
1591#define OMAP54XX_SCHEME_SHIFT 30
1592#define OMAP54XX_SCHEME_WIDTH 0x2
1593#define OMAP54XX_SCHEME_MASK (0x3 << 30)
1594
1595/* Used by CM_L4CFG_DYNAMICDEP */
1596#define OMAP54XX_SDMA_DYNDEP_SHIFT 11
1597#define OMAP54XX_SDMA_DYNDEP_WIDTH 0x1
1598#define OMAP54XX_SDMA_DYNDEP_MASK (1 << 11)
1599
1600/* Used by CM_IPU_STATICDEP, CM_MPU_STATICDEP */
1601#define OMAP54XX_SDMA_STATDEP_SHIFT 11
1602#define OMAP54XX_SDMA_STATDEP_WIDTH 0x1
1603#define OMAP54XX_SDMA_STATDEP_MASK (1 << 11)
1604
1605/* Used by CM_CORE_AON_DEBUG_CFG */
1606#define OMAP54XX_SEL0_SHIFT 0
1607#define OMAP54XX_SEL0_WIDTH 0x7
1608#define OMAP54XX_SEL0_MASK (0x7f << 0)
1609
1610/* Renamed from SEL0 Used by CM_CORE_DEBUG_CFG */
1611#define OMAP54XX_SEL0_0_7_SHIFT 0
1612#define OMAP54XX_SEL0_0_7_WIDTH 0x8
1613#define OMAP54XX_SEL0_0_7_MASK (0xff << 0)
1614
1615/* Used by CM_CORE_AON_DEBUG_CFG */
1616#define OMAP54XX_SEL1_SHIFT 8
1617#define OMAP54XX_SEL1_WIDTH 0x7
1618#define OMAP54XX_SEL1_MASK (0x7f << 8)
1619
1620/* Renamed from SEL1 Used by CM_CORE_DEBUG_CFG */
1621#define OMAP54XX_SEL1_CORE_DEBUG_CFG_SHIFT 8
1622#define OMAP54XX_SEL1_CORE_DEBUG_CFG_WIDTH 0x8
1623#define OMAP54XX_SEL1_CORE_DEBUG_CFG_MASK (0xff << 8)
1624
1625/* Used by CM_CORE_AON_DEBUG_CFG */
1626#define OMAP54XX_SEL2_SHIFT 16
1627#define OMAP54XX_SEL2_WIDTH 0x7
1628#define OMAP54XX_SEL2_MASK (0x7f << 16)
1629
1630/* Renamed from SEL2 Used by CM_CORE_DEBUG_CFG */
1631#define OMAP54XX_SEL2_CORE_DEBUG_CFG_SHIFT 16
1632#define OMAP54XX_SEL2_CORE_DEBUG_CFG_WIDTH 0x8
1633#define OMAP54XX_SEL2_CORE_DEBUG_CFG_MASK (0xff << 16)
1634
1635/* Used by CM_CORE_AON_DEBUG_CFG */
1636#define OMAP54XX_SEL3_SHIFT 24
1637#define OMAP54XX_SEL3_WIDTH 0x7
1638#define OMAP54XX_SEL3_MASK (0x7f << 24)
1639
1640/* Renamed from SEL3 Used by CM_CORE_DEBUG_CFG */
1641#define OMAP54XX_SEL3_CORE_DEBUG_CFG_SHIFT 24
1642#define OMAP54XX_SEL3_CORE_DEBUG_CFG_WIDTH 0x8
1643#define OMAP54XX_SEL3_CORE_DEBUG_CFG_MASK (0xff << 24)
1644
1645/* Used by CM_CLKSEL_ABE */
1646#define OMAP54XX_SLIMBUS1_CLK_GATE_SHIFT 10
1647#define OMAP54XX_SLIMBUS1_CLK_GATE_WIDTH 0x1
1648#define OMAP54XX_SLIMBUS1_CLK_GATE_MASK (1 << 10)
1649
1650/*
1651 * Used by CM_ABE_AESS_CLKCTRL, CM_C2C_C2C_CLKCTRL, CM_CAM_FDIF_CLKCTRL,
1652 * CM_CAM_ISS_CLKCTRL, CM_DMA_DMA_SYSTEM_CLKCTRL, CM_DSP_DSP_CLKCTRL,
1653 * CM_DSS_BB2D_CLKCTRL, CM_DSS_DSS_CLKCTRL, CM_EMU_DEBUGSS_CLKCTRL,
1654 * CM_GPU_GPU_CLKCTRL, CM_IPU_IPU_CLKCTRL, CM_IVA_IVA_CLKCTRL,
1655 * CM_L3INIT_HSI_CLKCTRL, CM_L3INIT_IEEE1500_2_OCP_CLKCTRL,
1656 * CM_L3INIT_MMC1_CLKCTRL, CM_L3INIT_MMC2_CLKCTRL, CM_L3INIT_SATA_CLKCTRL,
1657 * CM_L3INIT_UNIPRO2_CLKCTRL, CM_L3INIT_USB_HOST_HS_CLKCTRL,
1658 * CM_L3INIT_USB_OTG_SS_CLKCTRL, CM_L4SEC_DMA_CRYPTO_CLKCTRL,
1659 * CM_MIPIEXT_LLI_CLKCTRL, CM_MPU_MPU_CLKCTRL
1660 */
1661#define OMAP54XX_STBYST_SHIFT 18
1662#define OMAP54XX_STBYST_WIDTH 0x1
1663#define OMAP54XX_STBYST_MASK (1 << 18)
1664
1665/*
1666 * Used by CM_IDLEST_DPLL_ABE, CM_IDLEST_DPLL_CORE, CM_IDLEST_DPLL_IVA,
1667 * CM_IDLEST_DPLL_MPU, CM_IDLEST_DPLL_PER, CM_IDLEST_DPLL_UNIPRO1,
1668 * CM_IDLEST_DPLL_UNIPRO2, CM_IDLEST_DPLL_USB
1669 */
1670#define OMAP54XX_ST_DPLL_CLK_SHIFT 0
1671#define OMAP54XX_ST_DPLL_CLK_WIDTH 0x1
1672#define OMAP54XX_ST_DPLL_CLK_MASK (1 << 0)
1673
1674/*
1675 * Used by CM_CLKDCOLDO_DPLL_UNIPRO1, CM_CLKDCOLDO_DPLL_UNIPRO2,
1676 * CM_CLKDCOLDO_DPLL_USB
1677 */
1678#define OMAP54XX_ST_DPLL_CLKDCOLDO_SHIFT 9
1679#define OMAP54XX_ST_DPLL_CLKDCOLDO_WIDTH 0x1
1680#define OMAP54XX_ST_DPLL_CLKDCOLDO_MASK (1 << 9)
1681
1682/*
1683 * Used by CM_IDLEST_DPLL_ABE, CM_IDLEST_DPLL_CORE, CM_IDLEST_DPLL_IVA,
1684 * CM_IDLEST_DPLL_MPU, CM_IDLEST_DPLL_PER, CM_IDLEST_DPLL_UNIPRO1,
1685 * CM_IDLEST_DPLL_UNIPRO2, CM_IDLEST_DPLL_USB
1686 */
1687#define OMAP54XX_ST_DPLL_INIT_SHIFT 4
1688#define OMAP54XX_ST_DPLL_INIT_WIDTH 0x1
1689#define OMAP54XX_ST_DPLL_INIT_MASK (1 << 4)
1690
1691/*
1692 * Used by CM_IDLEST_DPLL_ABE, CM_IDLEST_DPLL_CORE, CM_IDLEST_DPLL_IVA,
1693 * CM_IDLEST_DPLL_MPU, CM_IDLEST_DPLL_PER, CM_IDLEST_DPLL_UNIPRO1,
1694 * CM_IDLEST_DPLL_UNIPRO2, CM_IDLEST_DPLL_USB
1695 */
1696#define OMAP54XX_ST_DPLL_MODE_SHIFT 1
1697#define OMAP54XX_ST_DPLL_MODE_WIDTH 0x3
1698#define OMAP54XX_ST_DPLL_MODE_MASK (0x7 << 1)
1699
1700/* Used by CM_CLKSEL_SYS */
1701#define OMAP54XX_SYS_CLKSEL_SHIFT 0
1702#define OMAP54XX_SYS_CLKSEL_WIDTH 0x3
1703#define OMAP54XX_SYS_CLKSEL_MASK (0x7 << 0)
1704
1705/*
1706 * Used by CM_C2C_DYNAMICDEP, CM_DSP_DYNAMICDEP, CM_EMU_DYNAMICDEP,
1707 * CM_IPU_DYNAMICDEP, CM_L3MAIN1_DYNAMICDEP, CM_L3MAIN2_DYNAMICDEP,
1708 * CM_L4CFG_DYNAMICDEP, CM_L4PER_DYNAMICDEP, CM_MIPIEXT_DYNAMICDEP,
1709 * CM_MPU_DYNAMICDEP
1710 */
1711#define OMAP54XX_WINDOWSIZE_SHIFT 24
1712#define OMAP54XX_WINDOWSIZE_WIDTH 0x4
1713#define OMAP54XX_WINDOWSIZE_MASK (0xf << 24)
1714
1715/* Used by CM_L3MAIN1_DYNAMICDEP */
1716#define OMAP54XX_WKUPAON_DYNDEP_SHIFT 15
1717#define OMAP54XX_WKUPAON_DYNDEP_WIDTH 0x1
1718#define OMAP54XX_WKUPAON_DYNDEP_MASK (1 << 15)
1719
1720/*
1721 * Used by CM_DMA_STATICDEP, CM_DSP_STATICDEP, CM_IPU_STATICDEP,
1722 * CM_L3INIT_STATICDEP, CM_MPU_STATICDEP
1723 */
1724#define OMAP54XX_WKUPAON_STATDEP_SHIFT 15
1725#define OMAP54XX_WKUPAON_STATDEP_WIDTH 0x1
1726#define OMAP54XX_WKUPAON_STATDEP_MASK (1 << 15)
1727
1728/* Used by REVISION_CM_CORE, REVISION_CM_CORE_AON */
1729#define OMAP54XX_X_MAJOR_SHIFT 8
1730#define OMAP54XX_X_MAJOR_WIDTH 0x3
1731#define OMAP54XX_X_MAJOR_MASK (0x7 << 8)
1732
1733/* Used by REVISION_CM_CORE, REVISION_CM_CORE_AON */
1734#define OMAP54XX_Y_MINOR_SHIFT 0
1735#define OMAP54XX_Y_MINOR_WIDTH 0x6
1736#define OMAP54XX_Y_MINOR_MASK (0x3f << 0)
1737#endif
diff --git a/arch/arm/mach-omap2/cm1_44xx.h b/arch/arm/mach-omap2/cm1_44xx.h
index 1bc00dc4876c..5ae8fe39d6ee 100644
--- a/arch/arm/mach-omap2/cm1_44xx.h
+++ b/arch/arm/mach-omap2/cm1_44xx.h
@@ -25,6 +25,8 @@
25#ifndef __ARCH_ARM_MACH_OMAP2_CM1_44XX_H 25#ifndef __ARCH_ARM_MACH_OMAP2_CM1_44XX_H
26#define __ARCH_ARM_MACH_OMAP2_CM1_44XX_H 26#define __ARCH_ARM_MACH_OMAP2_CM1_44XX_H
27 27
28#include "cm_44xx_54xx.h"
29
28/* CM1 base address */ 30/* CM1 base address */
29#define OMAP4430_CM1_BASE 0x4a004000 31#define OMAP4430_CM1_BASE 0x4a004000
30 32
@@ -217,9 +219,4 @@
217#define OMAP4_CM1_ABE_WDT3_CLKCTRL_OFFSET 0x0088 219#define OMAP4_CM1_ABE_WDT3_CLKCTRL_OFFSET 0x0088
218#define OMAP4430_CM1_ABE_WDT3_CLKCTRL OMAP44XX_CM1_REGADDR(OMAP4430_CM1_ABE_INST, 0x0088) 220#define OMAP4430_CM1_ABE_WDT3_CLKCTRL OMAP44XX_CM1_REGADDR(OMAP4430_CM1_ABE_INST, 0x0088)
219 221
220/* Function prototypes */
221extern u32 omap4_cm1_read_inst_reg(s16 inst, u16 idx);
222extern void omap4_cm1_write_inst_reg(u32 val, s16 inst, u16 idx);
223extern u32 omap4_cm1_rmw_inst_reg_bits(u32 mask, u32 bits, s16 inst, s16 idx);
224
225#endif 222#endif
diff --git a/arch/arm/mach-omap2/cm1_54xx.h b/arch/arm/mach-omap2/cm1_54xx.h
new file mode 100644
index 000000000000..90b3348e6672
--- /dev/null
+++ b/arch/arm/mach-omap2/cm1_54xx.h
@@ -0,0 +1,213 @@
1/*
2 * OMAP54xx CM1 instance offset macros
3 *
4 * Copyright (C) 2013 Texas Instruments Incorporated - http://www.ti.com
5 *
6 * Paul Walmsley (paul@pwsan.com)
7 * Rajendra Nayak (rnayak@ti.com)
8 * Benoit Cousson (b-cousson@ti.com)
9 *
10 * This file is automatically generated from the OMAP hardware databases.
11 * We respectfully ask that any modifications to this file be coordinated
12 * with the public linux-omap@vger.kernel.org mailing list and the
13 * authors above to ensure that the autogeneration scripts are kept
14 * up-to-date with the file contents.
15 *
16 * This program is free software; you can redistribute it and/or modify
17 * it under the terms of the GNU General Public License version 2 as
18 * published by the Free Software Foundation.
19 *
20 */
21
22#ifndef __ARCH_ARM_MACH_OMAP2_CM1_54XX_H
23#define __ARCH_ARM_MACH_OMAP2_CM1_54XX_H
24
25#include "cm_44xx_54xx.h"
26
27/* CM1 base address */
28#define OMAP54XX_CM_CORE_AON_BASE 0x4a004000
29
30#define OMAP54XX_CM_CORE_AON_REGADDR(inst, reg) \
31 OMAP2_L4_IO_ADDRESS(OMAP54XX_CM_CORE_AON_BASE + (inst) + (reg))
32
33/* CM_CORE_AON instances */
34#define OMAP54XX_CM_CORE_AON_OCP_SOCKET_INST 0x0000
35#define OMAP54XX_CM_CORE_AON_CKGEN_INST 0x0100
36#define OMAP54XX_CM_CORE_AON_MPU_INST 0x0300
37#define OMAP54XX_CM_CORE_AON_DSP_INST 0x0400
38#define OMAP54XX_CM_CORE_AON_ABE_INST 0x0500
39#define OMAP54XX_CM_CORE_AON_RESTORE_INST 0x0e00
40#define OMAP54XX_CM_CORE_AON_INSTR_INST 0x0f00
41
42/* CM_CORE_AON clockdomain register offsets (from instance start) */
43#define OMAP54XX_CM_CORE_AON_MPU_MPU_CDOFFS 0x0000
44#define OMAP54XX_CM_CORE_AON_DSP_DSP_CDOFFS 0x0000
45#define OMAP54XX_CM_CORE_AON_ABE_ABE_CDOFFS 0x0000
46
47/* CM_CORE_AON */
48
49/* CM_CORE_AON.OCP_SOCKET_CM_CORE_AON register offsets */
50#define OMAP54XX_REVISION_CM_CORE_AON_OFFSET 0x0000
51#define OMAP54XX_CM_CM_CORE_AON_PROFILING_CLKCTRL_OFFSET 0x0040
52#define OMAP54XX_CM_CM_CORE_AON_PROFILING_CLKCTRL OMAP54XX_CM_CORE_AON_REGADDR(OMAP54XX_CM_CORE_AON_OCP_SOCKET_INST, 0x0040)
53#define OMAP54XX_CM_CORE_AON_DEBUG_CFG_OFFSET 0x0080
54#define OMAP54XX_CM_CORE_AON_DEBUG_OUT_OFFSET 0x0084
55#define OMAP54XX_CM_CORE_AON_DEBUG_MPU_FD_TRANS_OFFSET 0x0090
56#define OMAP54XX_CM_CORE_AON_DEBUG_DSP_FD_TRANS_OFFSET 0x0094
57#define OMAP54XX_CM_CORE_AON_DEBUG_ABE_FD_TRANS_OFFSET 0x0098
58#define OMAP54XX_CM_CORE_AON_DEBUG_ABE_FD_TRANS2_OFFSET 0x009c
59#define OMAP54XX_CM_CORE_AON_DEBUG_CM_CORE_AON_FD_TRANS_OFFSET 0x00a0
60#define OMAP54XX_CM_CORE_AON_DEBUG_C2C_FD_TRANS_OFFSET 0x00a4
61#define OMAP54XX_CM_CORE_AON_DEBUG_CAM_FD_TRANS_OFFSET 0x00a8
62#define OMAP54XX_CM_CORE_AON_DEBUG_COREAON_FD_TRANS_OFFSET 0x00ac
63#define OMAP54XX_CM_CORE_AON_DEBUG_CUSTEFUSE_FD_TRANS_OFFSET 0x00b0
64#define OMAP54XX_CM_CORE_AON_DEBUG_DMA_FD_TRANS_OFFSET 0x00b4
65#define OMAP54XX_CM_CORE_AON_DEBUG_DSS_FD_TRANS_OFFSET 0x00b8
66#define OMAP54XX_CM_CORE_AON_DEBUG_EMIF_FD_TRANS_OFFSET 0x00bc
67#define OMAP54XX_CM_CORE_AON_DEBUG_GPU_FD_TRANS_OFFSET 0x00c0
68#define OMAP54XX_CM_CORE_AON_DEBUG_IPU_FD_TRANS_OFFSET 0x00c4
69#define OMAP54XX_CM_CORE_AON_DEBUG_IVA_FD_TRANS_OFFSET 0x00c8
70#define OMAP54XX_CM_CORE_AON_DEBUG_L3INIT_FD_TRANS_OFFSET 0x00cc
71#define OMAP54XX_CM_CORE_AON_DEBUG_L3INIT_FD_TRANS2_OFFSET 0x00d0
72#define OMAP54XX_CM_CORE_AON_DEBUG_L3INSTR_FD_TRANS_OFFSET 0x00d4
73#define OMAP54XX_CM_CORE_AON_DEBUG_L3MAIN1_FD_TRANS_OFFSET 0x00d8
74#define OMAP54XX_CM_CORE_AON_DEBUG_L3MAIN2_FD_TRANS_OFFSET 0x00dc
75#define OMAP54XX_CM_CORE_AON_DEBUG_L4CFG_FD_TRANS_OFFSET 0x00e0
76#define OMAP54XX_CM_CORE_AON_DEBUG_L4PER_FD_TRANS_OFFSET 0x00e4
77#define OMAP54XX_CM_CORE_AON_DEBUG_L4PER_FD_TRANS2_OFFSET 0x00e8
78#define OMAP54XX_CM_CORE_AON_DEBUG_L4SEC_FD_TRANS_OFFSET 0x00ec
79#define OMAP54XX_CM_CORE_AON_DEBUG_MIPIEXT_FD_TRANS_OFFSET 0x00f0
80
81/* CM_CORE_AON.CKGEN_CM_CORE_AON register offsets */
82#define OMAP54XX_CM_CLKSEL_CORE_OFFSET 0x0000
83#define OMAP54XX_CM_CLKSEL_CORE OMAP54XX_CM_CORE_AON_REGADDR(OMAP54XX_CM_CORE_AON_CKGEN_INST, 0x0000)
84#define OMAP54XX_CM_CLKSEL_ABE_OFFSET 0x0008
85#define OMAP54XX_CM_CLKSEL_ABE OMAP54XX_CM_CORE_AON_REGADDR(OMAP54XX_CM_CORE_AON_CKGEN_INST, 0x0008)
86#define OMAP54XX_CM_DLL_CTRL_OFFSET 0x0010
87#define OMAP54XX_CM_CLKMODE_DPLL_CORE_OFFSET 0x0020
88#define OMAP54XX_CM_CLKMODE_DPLL_CORE OMAP54XX_CM_CORE_AON_REGADDR(OMAP54XX_CM_CORE_AON_CKGEN_INST, 0x0020)
89#define OMAP54XX_CM_IDLEST_DPLL_CORE_OFFSET 0x0024
90#define OMAP54XX_CM_IDLEST_DPLL_CORE OMAP54XX_CM_CORE_AON_REGADDR(OMAP54XX_CM_CORE_AON_CKGEN_INST, 0x0024)
91#define OMAP54XX_CM_AUTOIDLE_DPLL_CORE_OFFSET 0x0028
92#define OMAP54XX_CM_AUTOIDLE_DPLL_CORE OMAP54XX_CM_CORE_AON_REGADDR(OMAP54XX_CM_CORE_AON_CKGEN_INST, 0x0028)
93#define OMAP54XX_CM_CLKSEL_DPLL_CORE_OFFSET 0x002c
94#define OMAP54XX_CM_CLKSEL_DPLL_CORE OMAP54XX_CM_CORE_AON_REGADDR(OMAP54XX_CM_CORE_AON_CKGEN_INST, 0x002c)
95#define OMAP54XX_CM_DIV_M2_DPLL_CORE_OFFSET 0x0030
96#define OMAP54XX_CM_DIV_M2_DPLL_CORE OMAP54XX_CM_CORE_AON_REGADDR(OMAP54XX_CM_CORE_AON_CKGEN_INST, 0x0030)
97#define OMAP54XX_CM_DIV_M3_DPLL_CORE_OFFSET 0x0034
98#define OMAP54XX_CM_DIV_M3_DPLL_CORE OMAP54XX_CM_CORE_AON_REGADDR(OMAP54XX_CM_CORE_AON_CKGEN_INST, 0x0034)
99#define OMAP54XX_CM_DIV_H11_DPLL_CORE_OFFSET 0x0038
100#define OMAP54XX_CM_DIV_H11_DPLL_CORE OMAP54XX_CM_CORE_AON_REGADDR(OMAP54XX_CM_CORE_AON_CKGEN_INST, 0x0038)
101#define OMAP54XX_CM_DIV_H12_DPLL_CORE_OFFSET 0x003c
102#define OMAP54XX_CM_DIV_H12_DPLL_CORE OMAP54XX_CM_CORE_AON_REGADDR(OMAP54XX_CM_CORE_AON_CKGEN_INST, 0x003c)
103#define OMAP54XX_CM_DIV_H13_DPLL_CORE_OFFSET 0x0040
104#define OMAP54XX_CM_DIV_H13_DPLL_CORE OMAP54XX_CM_CORE_AON_REGADDR(OMAP54XX_CM_CORE_AON_CKGEN_INST, 0x0040)
105#define OMAP54XX_CM_DIV_H14_DPLL_CORE_OFFSET 0x0044
106#define OMAP54XX_CM_DIV_H14_DPLL_CORE OMAP54XX_CM_CORE_AON_REGADDR(OMAP54XX_CM_CORE_AON_CKGEN_INST, 0x0044)
107#define OMAP54XX_CM_SSC_DELTAMSTEP_DPLL_CORE_OFFSET 0x0048
108#define OMAP54XX_CM_SSC_MODFREQDIV_DPLL_CORE_OFFSET 0x004c
109#define OMAP54XX_CM_DIV_H21_DPLL_CORE_OFFSET 0x0050
110#define OMAP54XX_CM_DIV_H21_DPLL_CORE OMAP54XX_CM_CORE_AON_REGADDR(OMAP54XX_CM_CORE_AON_CKGEN_INST, 0x0050)
111#define OMAP54XX_CM_DIV_H22_DPLL_CORE_OFFSET 0x0054
112#define OMAP54XX_CM_DIV_H22_DPLL_CORE OMAP54XX_CM_CORE_AON_REGADDR(OMAP54XX_CM_CORE_AON_CKGEN_INST, 0x0054)
113#define OMAP54XX_CM_DIV_H23_DPLL_CORE_OFFSET 0x0058
114#define OMAP54XX_CM_DIV_H23_DPLL_CORE OMAP54XX_CM_CORE_AON_REGADDR(OMAP54XX_CM_CORE_AON_CKGEN_INST, 0x0058)
115#define OMAP54XX_CM_DIV_H24_DPLL_CORE_OFFSET 0x005c
116#define OMAP54XX_CM_DIV_H24_DPLL_CORE OMAP54XX_CM_CORE_AON_REGADDR(OMAP54XX_CM_CORE_AON_CKGEN_INST, 0x005c)
117#define OMAP54XX_CM_CLKMODE_DPLL_MPU_OFFSET 0x0060
118#define OMAP54XX_CM_CLKMODE_DPLL_MPU OMAP54XX_CM_CORE_AON_REGADDR(OMAP54XX_CM_CORE_AON_CKGEN_INST, 0x0060)
119#define OMAP54XX_CM_IDLEST_DPLL_MPU_OFFSET 0x0064
120#define OMAP54XX_CM_IDLEST_DPLL_MPU OMAP54XX_CM_CORE_AON_REGADDR(OMAP54XX_CM_CORE_AON_CKGEN_INST, 0x0064)
121#define OMAP54XX_CM_AUTOIDLE_DPLL_MPU_OFFSET 0x0068
122#define OMAP54XX_CM_AUTOIDLE_DPLL_MPU OMAP54XX_CM_CORE_AON_REGADDR(OMAP54XX_CM_CORE_AON_CKGEN_INST, 0x0068)
123#define OMAP54XX_CM_CLKSEL_DPLL_MPU_OFFSET 0x006c
124#define OMAP54XX_CM_CLKSEL_DPLL_MPU OMAP54XX_CM_CORE_AON_REGADDR(OMAP54XX_CM_CORE_AON_CKGEN_INST, 0x006c)
125#define OMAP54XX_CM_DIV_M2_DPLL_MPU_OFFSET 0x0070
126#define OMAP54XX_CM_DIV_M2_DPLL_MPU OMAP54XX_CM_CORE_AON_REGADDR(OMAP54XX_CM_CORE_AON_CKGEN_INST, 0x0070)
127#define OMAP54XX_CM_SSC_DELTAMSTEP_DPLL_MPU_OFFSET 0x0088
128#define OMAP54XX_CM_SSC_MODFREQDIV_DPLL_MPU_OFFSET 0x008c
129#define OMAP54XX_CM_BYPCLK_DPLL_MPU_OFFSET 0x009c
130#define OMAP54XX_CM_BYPCLK_DPLL_MPU OMAP54XX_CM_CORE_AON_REGADDR(OMAP54XX_CM_CORE_AON_CKGEN_INST, 0x009c)
131#define OMAP54XX_CM_CLKMODE_DPLL_IVA_OFFSET 0x00a0
132#define OMAP54XX_CM_CLKMODE_DPLL_IVA OMAP54XX_CM_CORE_AON_REGADDR(OMAP54XX_CM_CORE_AON_CKGEN_INST, 0x00a0)
133#define OMAP54XX_CM_IDLEST_DPLL_IVA_OFFSET 0x00a4
134#define OMAP54XX_CM_IDLEST_DPLL_IVA OMAP54XX_CM_CORE_AON_REGADDR(OMAP54XX_CM_CORE_AON_CKGEN_INST, 0x00a4)
135#define OMAP54XX_CM_AUTOIDLE_DPLL_IVA_OFFSET 0x00a8
136#define OMAP54XX_CM_AUTOIDLE_DPLL_IVA OMAP54XX_CM_CORE_AON_REGADDR(OMAP54XX_CM_CORE_AON_CKGEN_INST, 0x00a8)
137#define OMAP54XX_CM_CLKSEL_DPLL_IVA_OFFSET 0x00ac
138#define OMAP54XX_CM_CLKSEL_DPLL_IVA OMAP54XX_CM_CORE_AON_REGADDR(OMAP54XX_CM_CORE_AON_CKGEN_INST, 0x00ac)
139#define OMAP54XX_CM_DIV_H11_DPLL_IVA_OFFSET 0x00b8
140#define OMAP54XX_CM_DIV_H11_DPLL_IVA OMAP54XX_CM_CORE_AON_REGADDR(OMAP54XX_CM_CORE_AON_CKGEN_INST, 0x00b8)
141#define OMAP54XX_CM_DIV_H12_DPLL_IVA_OFFSET 0x00bc
142#define OMAP54XX_CM_DIV_H12_DPLL_IVA OMAP54XX_CM_CORE_AON_REGADDR(OMAP54XX_CM_CORE_AON_CKGEN_INST, 0x00bc)
143#define OMAP54XX_CM_SSC_DELTAMSTEP_DPLL_IVA_OFFSET 0x00c8
144#define OMAP54XX_CM_SSC_MODFREQDIV_DPLL_IVA_OFFSET 0x00cc
145#define OMAP54XX_CM_BYPCLK_DPLL_IVA_OFFSET 0x00dc
146#define OMAP54XX_CM_BYPCLK_DPLL_IVA OMAP54XX_CM_CORE_AON_REGADDR(OMAP54XX_CM_CORE_AON_CKGEN_INST, 0x00dc)
147#define OMAP54XX_CM_CLKMODE_DPLL_ABE_OFFSET 0x00e0
148#define OMAP54XX_CM_CLKMODE_DPLL_ABE OMAP54XX_CM_CORE_AON_REGADDR(OMAP54XX_CM_CORE_AON_CKGEN_INST, 0x00e0)
149#define OMAP54XX_CM_IDLEST_DPLL_ABE_OFFSET 0x00e4
150#define OMAP54XX_CM_IDLEST_DPLL_ABE OMAP54XX_CM_CORE_AON_REGADDR(OMAP54XX_CM_CORE_AON_CKGEN_INST, 0x00e4)
151#define OMAP54XX_CM_AUTOIDLE_DPLL_ABE_OFFSET 0x00e8
152#define OMAP54XX_CM_AUTOIDLE_DPLL_ABE OMAP54XX_CM_CORE_AON_REGADDR(OMAP54XX_CM_CORE_AON_CKGEN_INST, 0x00e8)
153#define OMAP54XX_CM_CLKSEL_DPLL_ABE_OFFSET 0x00ec
154#define OMAP54XX_CM_CLKSEL_DPLL_ABE OMAP54XX_CM_CORE_AON_REGADDR(OMAP54XX_CM_CORE_AON_CKGEN_INST, 0x00ec)
155#define OMAP54XX_CM_DIV_M2_DPLL_ABE_OFFSET 0x00f0
156#define OMAP54XX_CM_DIV_M2_DPLL_ABE OMAP54XX_CM_CORE_AON_REGADDR(OMAP54XX_CM_CORE_AON_CKGEN_INST, 0x00f0)
157#define OMAP54XX_CM_DIV_M3_DPLL_ABE_OFFSET 0x00f4
158#define OMAP54XX_CM_DIV_M3_DPLL_ABE OMAP54XX_CM_CORE_AON_REGADDR(OMAP54XX_CM_CORE_AON_CKGEN_INST, 0x00f4)
159#define OMAP54XX_CM_SSC_DELTAMSTEP_DPLL_ABE_OFFSET 0x0108
160#define OMAP54XX_CM_SSC_MODFREQDIV_DPLL_ABE_OFFSET 0x010c
161#define OMAP54XX_CM_SHADOW_FREQ_CONFIG1_OFFSET 0x0160
162#define OMAP54XX_CM_SHADOW_FREQ_CONFIG2_OFFSET 0x0164
163#define OMAP54XX_CM_DYN_DEP_PRESCAL_OFFSET 0x0170
164#define OMAP54XX_CM_RESTORE_ST_OFFSET 0x0180
165
166/* CM_CORE_AON.MPU_CM_CORE_AON register offsets */
167#define OMAP54XX_CM_MPU_CLKSTCTRL_OFFSET 0x0000
168#define OMAP54XX_CM_MPU_STATICDEP_OFFSET 0x0004
169#define OMAP54XX_CM_MPU_DYNAMICDEP_OFFSET 0x0008
170#define OMAP54XX_CM_MPU_MPU_CLKCTRL_OFFSET 0x0020
171#define OMAP54XX_CM_MPU_MPU_CLKCTRL OMAP54XX_CM_CORE_AON_REGADDR(OMAP54XX_CM_CORE_AON_MPU_INST, 0x0020)
172#define OMAP54XX_CM_MPU_MPU_MPU_DBG_CLKCTRL_OFFSET 0x0028
173#define OMAP54XX_CM_MPU_MPU_MPU_DBG_CLKCTRL OMAP54XX_CM_CORE_AON_REGADDR(OMAP54XX_CM_CORE_AON_MPU_INST, 0x0028)
174
175/* CM_CORE_AON.DSP_CM_CORE_AON register offsets */
176#define OMAP54XX_CM_DSP_CLKSTCTRL_OFFSET 0x0000
177#define OMAP54XX_CM_DSP_STATICDEP_OFFSET 0x0004
178#define OMAP54XX_CM_DSP_DYNAMICDEP_OFFSET 0x0008
179#define OMAP54XX_CM_DSP_DSP_CLKCTRL_OFFSET 0x0020
180#define OMAP54XX_CM_DSP_DSP_CLKCTRL OMAP54XX_CM_CORE_AON_REGADDR(OMAP54XX_CM_CORE_AON_DSP_INST, 0x0020)
181
182/* CM_CORE_AON.ABE_CM_CORE_AON register offsets */
183#define OMAP54XX_CM_ABE_CLKSTCTRL_OFFSET 0x0000
184#define OMAP54XX_CM_ABE_L4_ABE_CLKCTRL_OFFSET 0x0020
185#define OMAP54XX_CM_ABE_L4_ABE_CLKCTRL OMAP54XX_CM_CORE_AON_REGADDR(OMAP54XX_CM_CORE_AON_ABE_INST, 0x0020)
186#define OMAP54XX_CM_ABE_AESS_CLKCTRL_OFFSET 0x0028
187#define OMAP54XX_CM_ABE_AESS_CLKCTRL OMAP54XX_CM_CORE_AON_REGADDR(OMAP54XX_CM_CORE_AON_ABE_INST, 0x0028)
188#define OMAP54XX_CM_ABE_MCPDM_CLKCTRL_OFFSET 0x0030
189#define OMAP54XX_CM_ABE_MCPDM_CLKCTRL OMAP54XX_CM_CORE_AON_REGADDR(OMAP54XX_CM_CORE_AON_ABE_INST, 0x0030)
190#define OMAP54XX_CM_ABE_DMIC_CLKCTRL_OFFSET 0x0038
191#define OMAP54XX_CM_ABE_DMIC_CLKCTRL OMAP54XX_CM_CORE_AON_REGADDR(OMAP54XX_CM_CORE_AON_ABE_INST, 0x0038)
192#define OMAP54XX_CM_ABE_MCASP_CLKCTRL_OFFSET 0x0040
193#define OMAP54XX_CM_ABE_MCASP_CLKCTRL OMAP54XX_CM_CORE_AON_REGADDR(OMAP54XX_CM_CORE_AON_ABE_INST, 0x0040)
194#define OMAP54XX_CM_ABE_MCBSP1_CLKCTRL_OFFSET 0x0048
195#define OMAP54XX_CM_ABE_MCBSP1_CLKCTRL OMAP54XX_CM_CORE_AON_REGADDR(OMAP54XX_CM_CORE_AON_ABE_INST, 0x0048)
196#define OMAP54XX_CM_ABE_MCBSP2_CLKCTRL_OFFSET 0x0050
197#define OMAP54XX_CM_ABE_MCBSP2_CLKCTRL OMAP54XX_CM_CORE_AON_REGADDR(OMAP54XX_CM_CORE_AON_ABE_INST, 0x0050)
198#define OMAP54XX_CM_ABE_MCBSP3_CLKCTRL_OFFSET 0x0058
199#define OMAP54XX_CM_ABE_MCBSP3_CLKCTRL OMAP54XX_CM_CORE_AON_REGADDR(OMAP54XX_CM_CORE_AON_ABE_INST, 0x0058)
200#define OMAP54XX_CM_ABE_SLIMBUS1_CLKCTRL_OFFSET 0x0060
201#define OMAP54XX_CM_ABE_SLIMBUS1_CLKCTRL OMAP54XX_CM_CORE_AON_REGADDR(OMAP54XX_CM_CORE_AON_ABE_INST, 0x0060)
202#define OMAP54XX_CM_ABE_TIMER5_CLKCTRL_OFFSET 0x0068
203#define OMAP54XX_CM_ABE_TIMER5_CLKCTRL OMAP54XX_CM_CORE_AON_REGADDR(OMAP54XX_CM_CORE_AON_ABE_INST, 0x0068)
204#define OMAP54XX_CM_ABE_TIMER6_CLKCTRL_OFFSET 0x0070
205#define OMAP54XX_CM_ABE_TIMER6_CLKCTRL OMAP54XX_CM_CORE_AON_REGADDR(OMAP54XX_CM_CORE_AON_ABE_INST, 0x0070)
206#define OMAP54XX_CM_ABE_TIMER7_CLKCTRL_OFFSET 0x0078
207#define OMAP54XX_CM_ABE_TIMER7_CLKCTRL OMAP54XX_CM_CORE_AON_REGADDR(OMAP54XX_CM_CORE_AON_ABE_INST, 0x0078)
208#define OMAP54XX_CM_ABE_TIMER8_CLKCTRL_OFFSET 0x0080
209#define OMAP54XX_CM_ABE_TIMER8_CLKCTRL OMAP54XX_CM_CORE_AON_REGADDR(OMAP54XX_CM_CORE_AON_ABE_INST, 0x0080)
210#define OMAP54XX_CM_ABE_WD_TIMER3_CLKCTRL_OFFSET 0x0088
211#define OMAP54XX_CM_ABE_WD_TIMER3_CLKCTRL OMAP54XX_CM_CORE_AON_REGADDR(OMAP54XX_CM_CORE_AON_ABE_INST, 0x0088)
212
213#endif
diff --git a/arch/arm/mach-omap2/cm2_44xx.h b/arch/arm/mach-omap2/cm2_44xx.h
index b9de72da1a8e..ee5136d7cdda 100644
--- a/arch/arm/mach-omap2/cm2_44xx.h
+++ b/arch/arm/mach-omap2/cm2_44xx.h
@@ -25,6 +25,8 @@
25#ifndef __ARCH_ARM_MACH_OMAP2_CM2_44XX_H 25#ifndef __ARCH_ARM_MACH_OMAP2_CM2_44XX_H
26#define __ARCH_ARM_MACH_OMAP2_CM2_44XX_H 26#define __ARCH_ARM_MACH_OMAP2_CM2_44XX_H
27 27
28#include "cm_44xx_54xx.h"
29
28/* CM2 base address */ 30/* CM2 base address */
29#define OMAP4430_CM2_BASE 0x4a008000 31#define OMAP4430_CM2_BASE 0x4a008000
30 32
@@ -449,9 +451,4 @@
449#define OMAP4_CM_CEFUSE_CEFUSE_CLKCTRL_OFFSET 0x0020 451#define OMAP4_CM_CEFUSE_CEFUSE_CLKCTRL_OFFSET 0x0020
450#define OMAP4430_CM_CEFUSE_CEFUSE_CLKCTRL OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CEFUSE_INST, 0x0020) 452#define OMAP4430_CM_CEFUSE_CEFUSE_CLKCTRL OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CEFUSE_INST, 0x0020)
451 453
452/* Function prototypes */
453extern u32 omap4_cm2_read_inst_reg(s16 inst, u16 idx);
454extern void omap4_cm2_write_inst_reg(u32 val, s16 inst, u16 idx);
455extern u32 omap4_cm2_rmw_inst_reg_bits(u32 mask, u32 bits, s16 inst, s16 idx);
456
457#endif 454#endif
diff --git a/arch/arm/mach-omap2/cm2_54xx.h b/arch/arm/mach-omap2/cm2_54xx.h
new file mode 100644
index 000000000000..2683231b299b
--- /dev/null
+++ b/arch/arm/mach-omap2/cm2_54xx.h
@@ -0,0 +1,389 @@
1/*
2 * OMAP54xx CM2 instance offset macros
3 *
4 * Copyright (C) 2013 Texas Instruments Incorporated - http://www.ti.com
5 *
6 * Paul Walmsley (paul@pwsan.com)
7 * Rajendra Nayak (rnayak@ti.com)
8 * Benoit Cousson (b-cousson@ti.com)
9 *
10 * This file is automatically generated from the OMAP hardware databases.
11 * We respectfully ask that any modifications to this file be coordinated
12 * with the public linux-omap@vger.kernel.org mailing list and the
13 * authors above to ensure that the autogeneration scripts are kept
14 * up-to-date with the file contents.
15 *
16 * This program is free software; you can redistribute it and/or modify
17 * it under the terms of the GNU General Public License version 2 as
18 * published by the Free Software Foundation.
19 */
20
21#ifndef __ARCH_ARM_MACH_OMAP2_CM2_54XX_H
22#define __ARCH_ARM_MACH_OMAP2_CM2_54XX_H
23
24#include "cm_44xx_54xx.h"
25
26/* CM2 base address */
27#define OMAP54XX_CM_CORE_BASE 0x4a008000
28
29#define OMAP54XX_CM_CORE_REGADDR(inst, reg) \
30 OMAP2_L4_IO_ADDRESS(OMAP54XX_CM_CORE_BASE + (inst) + (reg))
31
32/* CM_CORE instances */
33#define OMAP54XX_CM_CORE_OCP_SOCKET_INST 0x0000
34#define OMAP54XX_CM_CORE_CKGEN_INST 0x0100
35#define OMAP54XX_CM_CORE_COREAON_INST 0x0600
36#define OMAP54XX_CM_CORE_CORE_INST 0x0700
37#define OMAP54XX_CM_CORE_IVA_INST 0x1200
38#define OMAP54XX_CM_CORE_CAM_INST 0x1300
39#define OMAP54XX_CM_CORE_DSS_INST 0x1400
40#define OMAP54XX_CM_CORE_GPU_INST 0x1500
41#define OMAP54XX_CM_CORE_L3INIT_INST 0x1600
42#define OMAP54XX_CM_CORE_CUSTEFUSE_INST 0x1700
43#define OMAP54XX_CM_CORE_RESTORE_INST 0x1e00
44#define OMAP54XX_CM_CORE_INSTR_INST 0x1f00
45
46/* CM_CORE clockdomain register offsets (from instance start) */
47#define OMAP54XX_CM_CORE_COREAON_COREAON_CDOFFS 0x0000
48#define OMAP54XX_CM_CORE_CORE_L3MAIN1_CDOFFS 0x0000
49#define OMAP54XX_CM_CORE_CORE_L3MAIN2_CDOFFS 0x0100
50#define OMAP54XX_CM_CORE_CORE_IPU_CDOFFS 0x0200
51#define OMAP54XX_CM_CORE_CORE_DMA_CDOFFS 0x0300
52#define OMAP54XX_CM_CORE_CORE_EMIF_CDOFFS 0x0400
53#define OMAP54XX_CM_CORE_CORE_C2C_CDOFFS 0x0500
54#define OMAP54XX_CM_CORE_CORE_L4CFG_CDOFFS 0x0600
55#define OMAP54XX_CM_CORE_CORE_L3INSTR_CDOFFS 0x0700
56#define OMAP54XX_CM_CORE_CORE_MIPIEXT_CDOFFS 0x0800
57#define OMAP54XX_CM_CORE_CORE_L4PER_CDOFFS 0x0900
58#define OMAP54XX_CM_CORE_CORE_L4SEC_CDOFFS 0x0a80
59#define OMAP54XX_CM_CORE_IVA_IVA_CDOFFS 0x0000
60#define OMAP54XX_CM_CORE_CAM_CAM_CDOFFS 0x0000
61#define OMAP54XX_CM_CORE_DSS_DSS_CDOFFS 0x0000
62#define OMAP54XX_CM_CORE_GPU_GPU_CDOFFS 0x0000
63#define OMAP54XX_CM_CORE_L3INIT_L3INIT_CDOFFS 0x0000
64#define OMAP54XX_CM_CORE_CUSTEFUSE_CUSTEFUSE_CDOFFS 0x0000
65
66/* CM_CORE */
67
68/* CM_CORE.OCP_SOCKET_CM_CORE register offsets */
69#define OMAP54XX_REVISION_CM_CORE_OFFSET 0x0000
70#define OMAP54XX_CM_CM_CORE_PROFILING_CLKCTRL_OFFSET 0x0040
71#define OMAP54XX_CM_CM_CORE_PROFILING_CLKCTRL OMAP54XX_CM_CORE_REGADDR(OMAP54XX_CM_CORE_OCP_SOCKET_INST, 0x0040)
72#define OMAP54XX_CM_CORE_DEBUG_CFG_OFFSET 0x0080
73#define OMAP54XX_CM_CORE_DEBUG_OUT_OFFSET 0x0084
74
75/* CM_CORE.CKGEN_CM_CORE register offsets */
76#define OMAP54XX_CM_CLKSEL_USB_60MHZ_OFFSET 0x0004
77#define OMAP54XX_CM_CLKSEL_USB_60MHZ OMAP54XX_CM_CORE_REGADDR(OMAP54XX_CM_CORE_CKGEN_INST, 0x0004)
78#define OMAP54XX_CM_CLKMODE_DPLL_PER_OFFSET 0x0040
79#define OMAP54XX_CM_CLKMODE_DPLL_PER OMAP54XX_CM_CORE_REGADDR(OMAP54XX_CM_CORE_CKGEN_INST, 0x0040)
80#define OMAP54XX_CM_IDLEST_DPLL_PER_OFFSET 0x0044
81#define OMAP54XX_CM_IDLEST_DPLL_PER OMAP54XX_CM_CORE_REGADDR(OMAP54XX_CM_CORE_CKGEN_INST, 0x0044)
82#define OMAP54XX_CM_AUTOIDLE_DPLL_PER_OFFSET 0x0048
83#define OMAP54XX_CM_AUTOIDLE_DPLL_PER OMAP54XX_CM_CORE_REGADDR(OMAP54XX_CM_CORE_CKGEN_INST, 0x0048)
84#define OMAP54XX_CM_CLKSEL_DPLL_PER_OFFSET 0x004c
85#define OMAP54XX_CM_CLKSEL_DPLL_PER OMAP54XX_CM_CORE_REGADDR(OMAP54XX_CM_CORE_CKGEN_INST, 0x004c)
86#define OMAP54XX_CM_DIV_M2_DPLL_PER_OFFSET 0x0050
87#define OMAP54XX_CM_DIV_M2_DPLL_PER OMAP54XX_CM_CORE_REGADDR(OMAP54XX_CM_CORE_CKGEN_INST, 0x0050)
88#define OMAP54XX_CM_DIV_M3_DPLL_PER_OFFSET 0x0054
89#define OMAP54XX_CM_DIV_M3_DPLL_PER OMAP54XX_CM_CORE_REGADDR(OMAP54XX_CM_CORE_CKGEN_INST, 0x0054)
90#define OMAP54XX_CM_DIV_H11_DPLL_PER_OFFSET 0x0058
91#define OMAP54XX_CM_DIV_H11_DPLL_PER OMAP54XX_CM_CORE_REGADDR(OMAP54XX_CM_CORE_CKGEN_INST, 0x0058)
92#define OMAP54XX_CM_DIV_H12_DPLL_PER_OFFSET 0x005c
93#define OMAP54XX_CM_DIV_H12_DPLL_PER OMAP54XX_CM_CORE_REGADDR(OMAP54XX_CM_CORE_CKGEN_INST, 0x005c)
94#define OMAP54XX_CM_DIV_H13_DPLL_PER_OFFSET 0x0060
95#define OMAP54XX_CM_DIV_H13_DPLL_PER OMAP54XX_CM_CORE_REGADDR(OMAP54XX_CM_CORE_CKGEN_INST, 0x0060)
96#define OMAP54XX_CM_DIV_H14_DPLL_PER_OFFSET 0x0064
97#define OMAP54XX_CM_DIV_H14_DPLL_PER OMAP54XX_CM_CORE_REGADDR(OMAP54XX_CM_CORE_CKGEN_INST, 0x0064)
98#define OMAP54XX_CM_SSC_DELTAMSTEP_DPLL_PER_OFFSET 0x0068
99#define OMAP54XX_CM_SSC_MODFREQDIV_DPLL_PER_OFFSET 0x006c
100#define OMAP54XX_CM_CLKMODE_DPLL_USB_OFFSET 0x0080
101#define OMAP54XX_CM_CLKMODE_DPLL_USB OMAP54XX_CM_CORE_REGADDR(OMAP54XX_CM_CORE_CKGEN_INST, 0x0080)
102#define OMAP54XX_CM_IDLEST_DPLL_USB_OFFSET 0x0084
103#define OMAP54XX_CM_IDLEST_DPLL_USB OMAP54XX_CM_CORE_REGADDR(OMAP54XX_CM_CORE_CKGEN_INST, 0x0084)
104#define OMAP54XX_CM_AUTOIDLE_DPLL_USB_OFFSET 0x0088
105#define OMAP54XX_CM_AUTOIDLE_DPLL_USB OMAP54XX_CM_CORE_REGADDR(OMAP54XX_CM_CORE_CKGEN_INST, 0x0088)
106#define OMAP54XX_CM_CLKSEL_DPLL_USB_OFFSET 0x008c
107#define OMAP54XX_CM_CLKSEL_DPLL_USB OMAP54XX_CM_CORE_REGADDR(OMAP54XX_CM_CORE_CKGEN_INST, 0x008c)
108#define OMAP54XX_CM_DIV_M2_DPLL_USB_OFFSET 0x0090
109#define OMAP54XX_CM_DIV_M2_DPLL_USB OMAP54XX_CM_CORE_REGADDR(OMAP54XX_CM_CORE_CKGEN_INST, 0x0090)
110#define OMAP54XX_CM_SSC_DELTAMSTEP_DPLL_USB_OFFSET 0x00a8
111#define OMAP54XX_CM_SSC_MODFREQDIV_DPLL_USB_OFFSET 0x00ac
112#define OMAP54XX_CM_CLKDCOLDO_DPLL_USB_OFFSET 0x00b4
113#define OMAP54XX_CM_CLKDCOLDO_DPLL_USB OMAP54XX_CM_CORE_REGADDR(OMAP54XX_CM_CORE_CKGEN_INST, 0x00b4)
114#define OMAP54XX_CM_CLKMODE_DPLL_UNIPRO2_OFFSET 0x00c0
115#define OMAP54XX_CM_CLKMODE_DPLL_UNIPRO2 OMAP54XX_CM_CORE_REGADDR(OMAP54XX_CM_CORE_CKGEN_INST, 0x00c0)
116#define OMAP54XX_CM_IDLEST_DPLL_UNIPRO2_OFFSET 0x00c4
117#define OMAP54XX_CM_IDLEST_DPLL_UNIPRO2 OMAP54XX_CM_CORE_REGADDR(OMAP54XX_CM_CORE_CKGEN_INST, 0x00c4)
118#define OMAP54XX_CM_AUTOIDLE_DPLL_UNIPRO2_OFFSET 0x00c8
119#define OMAP54XX_CM_AUTOIDLE_DPLL_UNIPRO2 OMAP54XX_CM_CORE_REGADDR(OMAP54XX_CM_CORE_CKGEN_INST, 0x00c8)
120#define OMAP54XX_CM_CLKSEL_DPLL_UNIPRO2_OFFSET 0x00cc
121#define OMAP54XX_CM_CLKSEL_DPLL_UNIPRO2 OMAP54XX_CM_CORE_REGADDR(OMAP54XX_CM_CORE_CKGEN_INST, 0x00cc)
122#define OMAP54XX_CM_DIV_M2_DPLL_UNIPRO2_OFFSET 0x00d0
123#define OMAP54XX_CM_DIV_M2_DPLL_UNIPRO2 OMAP54XX_CM_CORE_REGADDR(OMAP54XX_CM_CORE_CKGEN_INST, 0x00d0)
124#define OMAP54XX_CM_SSC_DELTAMSTEP_DPLL_UNIPRO2_OFFSET 0x00e8
125#define OMAP54XX_CM_SSC_MODFREQDIV_DPLL_UNIPRO2_OFFSET 0x00ec
126#define OMAP54XX_CM_CLKDCOLDO_DPLL_UNIPRO2_OFFSET 0x00f4
127#define OMAP54XX_CM_CLKDCOLDO_DPLL_UNIPRO2 OMAP54XX_CM_CORE_REGADDR(OMAP54XX_CM_CORE_CKGEN_INST, 0x00f4)
128#define OMAP54XX_CM_CLKMODE_DPLL_UNIPRO1_OFFSET 0x0100
129#define OMAP54XX_CM_CLKMODE_DPLL_UNIPRO1 OMAP54XX_CM_CORE_REGADDR(OMAP54XX_CM_CORE_CKGEN_INST, 0x0100)
130#define OMAP54XX_CM_IDLEST_DPLL_UNIPRO1_OFFSET 0x0104
131#define OMAP54XX_CM_IDLEST_DPLL_UNIPRO1 OMAP54XX_CM_CORE_REGADDR(OMAP54XX_CM_CORE_CKGEN_INST, 0x0104)
132#define OMAP54XX_CM_AUTOIDLE_DPLL_UNIPRO1_OFFSET 0x0108
133#define OMAP54XX_CM_AUTOIDLE_DPLL_UNIPRO1 OMAP54XX_CM_CORE_REGADDR(OMAP54XX_CM_CORE_CKGEN_INST, 0x0108)
134#define OMAP54XX_CM_CLKSEL_DPLL_UNIPRO1_OFFSET 0x010c
135#define OMAP54XX_CM_CLKSEL_DPLL_UNIPRO1 OMAP54XX_CM_CORE_REGADDR(OMAP54XX_CM_CORE_CKGEN_INST, 0x010c)
136#define OMAP54XX_CM_DIV_M2_DPLL_UNIPRO1_OFFSET 0x0110
137#define OMAP54XX_CM_DIV_M2_DPLL_UNIPRO1 OMAP54XX_CM_CORE_REGADDR(OMAP54XX_CM_CORE_CKGEN_INST, 0x0110)
138#define OMAP54XX_CM_SSC_DELTAMSTEP_DPLL_UNIPRO1_OFFSET 0x0128
139#define OMAP54XX_CM_SSC_MODFREQDIV_DPLL_UNIPRO1_OFFSET 0x012c
140#define OMAP54XX_CM_CLKDCOLDO_DPLL_UNIPRO1_OFFSET 0x0134
141#define OMAP54XX_CM_CLKDCOLDO_DPLL_UNIPRO1 OMAP54XX_CM_CORE_REGADDR(OMAP54XX_CM_CORE_CKGEN_INST, 0x0134)
142
143/* CM_CORE.COREAON_CM_CORE register offsets */
144#define OMAP54XX_CM_COREAON_CLKSTCTRL_OFFSET 0x0000
145#define OMAP54XX_CM_COREAON_SMARTREFLEX_MPU_CLKCTRL_OFFSET 0x0028
146#define OMAP54XX_CM_COREAON_SMARTREFLEX_MPU_CLKCTRL OMAP54XX_CM_CORE_REGADDR(OMAP54XX_CM_CORE_COREAON_INST, 0x0028)
147#define OMAP54XX_CM_COREAON_SMARTREFLEX_MM_CLKCTRL_OFFSET 0x0030
148#define OMAP54XX_CM_COREAON_SMARTREFLEX_MM_CLKCTRL OMAP54XX_CM_CORE_REGADDR(OMAP54XX_CM_CORE_COREAON_INST, 0x0030)
149#define OMAP54XX_CM_COREAON_SMARTREFLEX_CORE_CLKCTRL_OFFSET 0x0038
150#define OMAP54XX_CM_COREAON_SMARTREFLEX_CORE_CLKCTRL OMAP54XX_CM_CORE_REGADDR(OMAP54XX_CM_CORE_COREAON_INST, 0x0038)
151#define OMAP54XX_CM_COREAON_USB_PHY_CORE_CLKCTRL_OFFSET 0x0040
152#define OMAP54XX_CM_COREAON_USB_PHY_CORE_CLKCTRL OMAP54XX_CM_CORE_REGADDR(OMAP54XX_CM_CORE_COREAON_INST, 0x0040)
153#define OMAP54XX_CM_COREAON_IO_SRCOMP_CLKCTRL_OFFSET 0x0050
154#define OMAP54XX_CM_COREAON_IO_SRCOMP_CLKCTRL OMAP54XX_CM_CORE_REGADDR(OMAP54XX_CM_CORE_COREAON_INST, 0x0050)
155
156/* CM_CORE.CORE_CM_CORE register offsets */
157#define OMAP54XX_CM_L3MAIN1_CLKSTCTRL_OFFSET 0x0000
158#define OMAP54XX_CM_L3MAIN1_DYNAMICDEP_OFFSET 0x0008
159#define OMAP54XX_CM_L3MAIN1_L3_MAIN_1_CLKCTRL_OFFSET 0x0020
160#define OMAP54XX_CM_L3MAIN1_L3_MAIN_1_CLKCTRL OMAP54XX_CM_CORE_REGADDR(OMAP54XX_CM_CORE_CORE_INST, 0x0020)
161#define OMAP54XX_CM_L3MAIN2_CLKSTCTRL_OFFSET 0x0100
162#define OMAP54XX_CM_L3MAIN2_DYNAMICDEP_OFFSET 0x0108
163#define OMAP54XX_CM_L3MAIN2_L3_MAIN_2_CLKCTRL_OFFSET 0x0120
164#define OMAP54XX_CM_L3MAIN2_L3_MAIN_2_CLKCTRL OMAP54XX_CM_CORE_REGADDR(OMAP54XX_CM_CORE_CORE_INST, 0x0120)
165#define OMAP54XX_CM_L3MAIN2_GPMC_CLKCTRL_OFFSET 0x0128
166#define OMAP54XX_CM_L3MAIN2_GPMC_CLKCTRL OMAP54XX_CM_CORE_REGADDR(OMAP54XX_CM_CORE_CORE_INST, 0x0128)
167#define OMAP54XX_CM_L3MAIN2_OCMC_RAM_CLKCTRL_OFFSET 0x0130
168#define OMAP54XX_CM_L3MAIN2_OCMC_RAM_CLKCTRL OMAP54XX_CM_CORE_REGADDR(OMAP54XX_CM_CORE_CORE_INST, 0x0130)
169#define OMAP54XX_CM_IPU_CLKSTCTRL_OFFSET 0x0200
170#define OMAP54XX_CM_IPU_STATICDEP_OFFSET 0x0204
171#define OMAP54XX_CM_IPU_DYNAMICDEP_OFFSET 0x0208
172#define OMAP54XX_CM_IPU_IPU_CLKCTRL_OFFSET 0x0220
173#define OMAP54XX_CM_IPU_IPU_CLKCTRL OMAP54XX_CM_CORE_REGADDR(OMAP54XX_CM_CORE_CORE_INST, 0x0220)
174#define OMAP54XX_CM_DMA_CLKSTCTRL_OFFSET 0x0300
175#define OMAP54XX_CM_DMA_STATICDEP_OFFSET 0x0304
176#define OMAP54XX_CM_DMA_DYNAMICDEP_OFFSET 0x0308
177#define OMAP54XX_CM_DMA_DMA_SYSTEM_CLKCTRL_OFFSET 0x0320
178#define OMAP54XX_CM_DMA_DMA_SYSTEM_CLKCTRL OMAP54XX_CM_CORE_REGADDR(OMAP54XX_CM_CORE_CORE_INST, 0x0320)
179#define OMAP54XX_CM_EMIF_CLKSTCTRL_OFFSET 0x0400
180#define OMAP54XX_CM_EMIF_DMM_CLKCTRL_OFFSET 0x0420
181#define OMAP54XX_CM_EMIF_DMM_CLKCTRL OMAP54XX_CM_CORE_REGADDR(OMAP54XX_CM_CORE_CORE_INST, 0x0420)
182#define OMAP54XX_CM_EMIF_EMIF_OCP_FW_CLKCTRL_OFFSET 0x0428
183#define OMAP54XX_CM_EMIF_EMIF_OCP_FW_CLKCTRL OMAP54XX_CM_CORE_REGADDR(OMAP54XX_CM_CORE_CORE_INST, 0x0428)
184#define OMAP54XX_CM_EMIF_EMIF1_CLKCTRL_OFFSET 0x0430
185#define OMAP54XX_CM_EMIF_EMIF1_CLKCTRL OMAP54XX_CM_CORE_REGADDR(OMAP54XX_CM_CORE_CORE_INST, 0x0430)
186#define OMAP54XX_CM_EMIF_EMIF2_CLKCTRL_OFFSET 0x0438
187#define OMAP54XX_CM_EMIF_EMIF2_CLKCTRL OMAP54XX_CM_CORE_REGADDR(OMAP54XX_CM_CORE_CORE_INST, 0x0438)
188#define OMAP54XX_CM_EMIF_EMIF_DLL_CLKCTRL_OFFSET 0x0440
189#define OMAP54XX_CM_EMIF_EMIF_DLL_CLKCTRL OMAP54XX_CM_CORE_REGADDR(OMAP54XX_CM_CORE_CORE_INST, 0x0440)
190#define OMAP54XX_CM_C2C_CLKSTCTRL_OFFSET 0x0500
191#define OMAP54XX_CM_C2C_STATICDEP_OFFSET 0x0504
192#define OMAP54XX_CM_C2C_DYNAMICDEP_OFFSET 0x0508
193#define OMAP54XX_CM_C2C_C2C_CLKCTRL_OFFSET 0x0520
194#define OMAP54XX_CM_C2C_C2C_CLKCTRL OMAP54XX_CM_CORE_REGADDR(OMAP54XX_CM_CORE_CORE_INST, 0x0520)
195#define OMAP54XX_CM_C2C_MODEM_ICR_CLKCTRL_OFFSET 0x0528
196#define OMAP54XX_CM_C2C_MODEM_ICR_CLKCTRL OMAP54XX_CM_CORE_REGADDR(OMAP54XX_CM_CORE_CORE_INST, 0x0528)
197#define OMAP54XX_CM_C2C_C2C_OCP_FW_CLKCTRL_OFFSET 0x0530
198#define OMAP54XX_CM_C2C_C2C_OCP_FW_CLKCTRL OMAP54XX_CM_CORE_REGADDR(OMAP54XX_CM_CORE_CORE_INST, 0x0530)
199#define OMAP54XX_CM_L4CFG_CLKSTCTRL_OFFSET 0x0600
200#define OMAP54XX_CM_L4CFG_DYNAMICDEP_OFFSET 0x0608
201#define OMAP54XX_CM_L4CFG_L4_CFG_CLKCTRL_OFFSET 0x0620
202#define OMAP54XX_CM_L4CFG_L4_CFG_CLKCTRL OMAP54XX_CM_CORE_REGADDR(OMAP54XX_CM_CORE_CORE_INST, 0x0620)
203#define OMAP54XX_CM_L4CFG_SPINLOCK_CLKCTRL_OFFSET 0x0628
204#define OMAP54XX_CM_L4CFG_SPINLOCK_CLKCTRL OMAP54XX_CM_CORE_REGADDR(OMAP54XX_CM_CORE_CORE_INST, 0x0628)
205#define OMAP54XX_CM_L4CFG_MAILBOX_CLKCTRL_OFFSET 0x0630
206#define OMAP54XX_CM_L4CFG_MAILBOX_CLKCTRL OMAP54XX_CM_CORE_REGADDR(OMAP54XX_CM_CORE_CORE_INST, 0x0630)
207#define OMAP54XX_CM_L4CFG_SAR_ROM_CLKCTRL_OFFSET 0x0638
208#define OMAP54XX_CM_L4CFG_SAR_ROM_CLKCTRL OMAP54XX_CM_CORE_REGADDR(OMAP54XX_CM_CORE_CORE_INST, 0x0638)
209#define OMAP54XX_CM_L4CFG_OCP2SCP2_CLKCTRL_OFFSET 0x0640
210#define OMAP54XX_CM_L4CFG_OCP2SCP2_CLKCTRL OMAP54XX_CM_CORE_REGADDR(OMAP54XX_CM_CORE_CORE_INST, 0x0640)
211#define OMAP54XX_CM_L3INSTR_CLKSTCTRL_OFFSET 0x0700
212#define OMAP54XX_CM_L3INSTR_L3_MAIN_3_CLKCTRL_OFFSET 0x0720
213#define OMAP54XX_CM_L3INSTR_L3_MAIN_3_CLKCTRL OMAP54XX_CM_CORE_REGADDR(OMAP54XX_CM_CORE_CORE_INST, 0x0720)
214#define OMAP54XX_CM_L3INSTR_L3_INSTR_CLKCTRL_OFFSET 0x0728
215#define OMAP54XX_CM_L3INSTR_L3_INSTR_CLKCTRL OMAP54XX_CM_CORE_REGADDR(OMAP54XX_CM_CORE_CORE_INST, 0x0728)
216#define OMAP54XX_CM_L3INSTR_OCP_WP_NOC_CLKCTRL_OFFSET 0x0740
217#define OMAP54XX_CM_L3INSTR_OCP_WP_NOC_CLKCTRL OMAP54XX_CM_CORE_REGADDR(OMAP54XX_CM_CORE_CORE_INST, 0x0740)
218#define OMAP54XX_CM_L3INSTR_DLL_AGING_CLKCTRL_OFFSET 0x0748
219#define OMAP54XX_CM_L3INSTR_DLL_AGING_CLKCTRL OMAP54XX_CM_CORE_REGADDR(OMAP54XX_CM_CORE_CORE_INST, 0x0748)
220#define OMAP54XX_CM_L3INSTR_CTRL_MODULE_BANDGAP_CLKCTRL_OFFSET 0x0750
221#define OMAP54XX_CM_L3INSTR_CTRL_MODULE_BANDGAP_CLKCTRL OMAP54XX_CM_CORE_REGADDR(OMAP54XX_CM_CORE_CORE_INST, 0x0750)
222#define OMAP54XX_CM_MIPIEXT_CLKSTCTRL_OFFSET 0x0800
223#define OMAP54XX_CM_MIPIEXT_STATICDEP_OFFSET 0x0804
224#define OMAP54XX_CM_MIPIEXT_DYNAMICDEP_OFFSET 0x0808
225#define OMAP54XX_CM_MIPIEXT_LLI_CLKCTRL_OFFSET 0x0820
226#define OMAP54XX_CM_MIPIEXT_LLI_CLKCTRL OMAP54XX_CM_CORE_REGADDR(OMAP54XX_CM_CORE_CORE_INST, 0x0820)
227#define OMAP54XX_CM_MIPIEXT_LLI_OCP_FW_CLKCTRL_OFFSET 0x0828
228#define OMAP54XX_CM_MIPIEXT_LLI_OCP_FW_CLKCTRL OMAP54XX_CM_CORE_REGADDR(OMAP54XX_CM_CORE_CORE_INST, 0x0828)
229#define OMAP54XX_CM_MIPIEXT_MPHY_CLKCTRL_OFFSET 0x0830
230#define OMAP54XX_CM_MIPIEXT_MPHY_CLKCTRL OMAP54XX_CM_CORE_REGADDR(OMAP54XX_CM_CORE_CORE_INST, 0x0830)
231#define OMAP54XX_CM_L4PER_CLKSTCTRL_OFFSET 0x0900
232#define OMAP54XX_CM_L4PER_DYNAMICDEP_OFFSET 0x0908
233#define OMAP54XX_CM_L4PER_TIMER10_CLKCTRL_OFFSET 0x0928
234#define OMAP54XX_CM_L4PER_TIMER10_CLKCTRL OMAP54XX_CM_CORE_REGADDR(OMAP54XX_CM_CORE_CORE_INST, 0x0928)
235#define OMAP54XX_CM_L4PER_TIMER11_CLKCTRL_OFFSET 0x0930
236#define OMAP54XX_CM_L4PER_TIMER11_CLKCTRL OMAP54XX_CM_CORE_REGADDR(OMAP54XX_CM_CORE_CORE_INST, 0x0930)
237#define OMAP54XX_CM_L4PER_TIMER2_CLKCTRL_OFFSET 0x0938
238#define OMAP54XX_CM_L4PER_TIMER2_CLKCTRL OMAP54XX_CM_CORE_REGADDR(OMAP54XX_CM_CORE_CORE_INST, 0x0938)
239#define OMAP54XX_CM_L4PER_TIMER3_CLKCTRL_OFFSET 0x0940
240#define OMAP54XX_CM_L4PER_TIMER3_CLKCTRL OMAP54XX_CM_CORE_REGADDR(OMAP54XX_CM_CORE_CORE_INST, 0x0940)
241#define OMAP54XX_CM_L4PER_TIMER4_CLKCTRL_OFFSET 0x0948
242#define OMAP54XX_CM_L4PER_TIMER4_CLKCTRL OMAP54XX_CM_CORE_REGADDR(OMAP54XX_CM_CORE_CORE_INST, 0x0948)
243#define OMAP54XX_CM_L4PER_TIMER9_CLKCTRL_OFFSET 0x0950
244#define OMAP54XX_CM_L4PER_TIMER9_CLKCTRL OMAP54XX_CM_CORE_REGADDR(OMAP54XX_CM_CORE_CORE_INST, 0x0950)
245#define OMAP54XX_CM_L4PER_ELM_CLKCTRL_OFFSET 0x0958
246#define OMAP54XX_CM_L4PER_ELM_CLKCTRL OMAP54XX_CM_CORE_REGADDR(OMAP54XX_CM_CORE_CORE_INST, 0x0958)
247#define OMAP54XX_CM_L4PER_GPIO2_CLKCTRL_OFFSET 0x0960
248#define OMAP54XX_CM_L4PER_GPIO2_CLKCTRL OMAP54XX_CM_CORE_REGADDR(OMAP54XX_CM_CORE_CORE_INST, 0x0960)
249#define OMAP54XX_CM_L4PER_GPIO3_CLKCTRL_OFFSET 0x0968
250#define OMAP54XX_CM_L4PER_GPIO3_CLKCTRL OMAP54XX_CM_CORE_REGADDR(OMAP54XX_CM_CORE_CORE_INST, 0x0968)
251#define OMAP54XX_CM_L4PER_GPIO4_CLKCTRL_OFFSET 0x0970
252#define OMAP54XX_CM_L4PER_GPIO4_CLKCTRL OMAP54XX_CM_CORE_REGADDR(OMAP54XX_CM_CORE_CORE_INST, 0x0970)
253#define OMAP54XX_CM_L4PER_GPIO5_CLKCTRL_OFFSET 0x0978
254#define OMAP54XX_CM_L4PER_GPIO5_CLKCTRL OMAP54XX_CM_CORE_REGADDR(OMAP54XX_CM_CORE_CORE_INST, 0x0978)
255#define OMAP54XX_CM_L4PER_GPIO6_CLKCTRL_OFFSET 0x0980
256#define OMAP54XX_CM_L4PER_GPIO6_CLKCTRL OMAP54XX_CM_CORE_REGADDR(OMAP54XX_CM_CORE_CORE_INST, 0x0980)
257#define OMAP54XX_CM_L4PER_HDQ1W_CLKCTRL_OFFSET 0x0988
258#define OMAP54XX_CM_L4PER_HDQ1W_CLKCTRL OMAP54XX_CM_CORE_REGADDR(OMAP54XX_CM_CORE_CORE_INST, 0x0988)
259#define OMAP54XX_CM_L4PER_I2C1_CLKCTRL_OFFSET 0x09a0
260#define OMAP54XX_CM_L4PER_I2C1_CLKCTRL OMAP54XX_CM_CORE_REGADDR(OMAP54XX_CM_CORE_CORE_INST, 0x09a0)
261#define OMAP54XX_CM_L4PER_I2C2_CLKCTRL_OFFSET 0x09a8
262#define OMAP54XX_CM_L4PER_I2C2_CLKCTRL OMAP54XX_CM_CORE_REGADDR(OMAP54XX_CM_CORE_CORE_INST, 0x09a8)
263#define OMAP54XX_CM_L4PER_I2C3_CLKCTRL_OFFSET 0x09b0
264#define OMAP54XX_CM_L4PER_I2C3_CLKCTRL OMAP54XX_CM_CORE_REGADDR(OMAP54XX_CM_CORE_CORE_INST, 0x09b0)
265#define OMAP54XX_CM_L4PER_I2C4_CLKCTRL_OFFSET 0x09b8
266#define OMAP54XX_CM_L4PER_I2C4_CLKCTRL OMAP54XX_CM_CORE_REGADDR(OMAP54XX_CM_CORE_CORE_INST, 0x09b8)
267#define OMAP54XX_CM_L4PER_L4_PER_CLKCTRL_OFFSET 0x09c0
268#define OMAP54XX_CM_L4PER_L4_PER_CLKCTRL OMAP54XX_CM_CORE_REGADDR(OMAP54XX_CM_CORE_CORE_INST, 0x09c0)
269#define OMAP54XX_CM_L4PER_MCSPI1_CLKCTRL_OFFSET 0x09f0
270#define OMAP54XX_CM_L4PER_MCSPI1_CLKCTRL OMAP54XX_CM_CORE_REGADDR(OMAP54XX_CM_CORE_CORE_INST, 0x09f0)
271#define OMAP54XX_CM_L4PER_MCSPI2_CLKCTRL_OFFSET 0x09f8
272#define OMAP54XX_CM_L4PER_MCSPI2_CLKCTRL OMAP54XX_CM_CORE_REGADDR(OMAP54XX_CM_CORE_CORE_INST, 0x09f8)
273#define OMAP54XX_CM_L4PER_MCSPI3_CLKCTRL_OFFSET 0x0a00
274#define OMAP54XX_CM_L4PER_MCSPI3_CLKCTRL OMAP54XX_CM_CORE_REGADDR(OMAP54XX_CM_CORE_CORE_INST, 0x0a00)
275#define OMAP54XX_CM_L4PER_MCSPI4_CLKCTRL_OFFSET 0x0a08
276#define OMAP54XX_CM_L4PER_MCSPI4_CLKCTRL OMAP54XX_CM_CORE_REGADDR(OMAP54XX_CM_CORE_CORE_INST, 0x0a08)
277#define OMAP54XX_CM_L4PER_GPIO7_CLKCTRL_OFFSET 0x0a10
278#define OMAP54XX_CM_L4PER_GPIO7_CLKCTRL OMAP54XX_CM_CORE_REGADDR(OMAP54XX_CM_CORE_CORE_INST, 0x0a10)
279#define OMAP54XX_CM_L4PER_GPIO8_CLKCTRL_OFFSET 0x0a18
280#define OMAP54XX_CM_L4PER_GPIO8_CLKCTRL OMAP54XX_CM_CORE_REGADDR(OMAP54XX_CM_CORE_CORE_INST, 0x0a18)
281#define OMAP54XX_CM_L4PER_MMC3_CLKCTRL_OFFSET 0x0a20
282#define OMAP54XX_CM_L4PER_MMC3_CLKCTRL OMAP54XX_CM_CORE_REGADDR(OMAP54XX_CM_CORE_CORE_INST, 0x0a20)
283#define OMAP54XX_CM_L4PER_MMC4_CLKCTRL_OFFSET 0x0a28
284#define OMAP54XX_CM_L4PER_MMC4_CLKCTRL OMAP54XX_CM_CORE_REGADDR(OMAP54XX_CM_CORE_CORE_INST, 0x0a28)
285#define OMAP54XX_CM_L4PER_UART1_CLKCTRL_OFFSET 0x0a40
286#define OMAP54XX_CM_L4PER_UART1_CLKCTRL OMAP54XX_CM_CORE_REGADDR(OMAP54XX_CM_CORE_CORE_INST, 0x0a40)
287#define OMAP54XX_CM_L4PER_UART2_CLKCTRL_OFFSET 0x0a48
288#define OMAP54XX_CM_L4PER_UART2_CLKCTRL OMAP54XX_CM_CORE_REGADDR(OMAP54XX_CM_CORE_CORE_INST, 0x0a48)
289#define OMAP54XX_CM_L4PER_UART3_CLKCTRL_OFFSET 0x0a50
290#define OMAP54XX_CM_L4PER_UART3_CLKCTRL OMAP54XX_CM_CORE_REGADDR(OMAP54XX_CM_CORE_CORE_INST, 0x0a50)
291#define OMAP54XX_CM_L4PER_UART4_CLKCTRL_OFFSET 0x0a58
292#define OMAP54XX_CM_L4PER_UART4_CLKCTRL OMAP54XX_CM_CORE_REGADDR(OMAP54XX_CM_CORE_CORE_INST, 0x0a58)
293#define OMAP54XX_CM_L4PER_MMC5_CLKCTRL_OFFSET 0x0a60
294#define OMAP54XX_CM_L4PER_MMC5_CLKCTRL OMAP54XX_CM_CORE_REGADDR(OMAP54XX_CM_CORE_CORE_INST, 0x0a60)
295#define OMAP54XX_CM_L4PER_I2C5_CLKCTRL_OFFSET 0x0a68
296#define OMAP54XX_CM_L4PER_I2C5_CLKCTRL OMAP54XX_CM_CORE_REGADDR(OMAP54XX_CM_CORE_CORE_INST, 0x0a68)
297#define OMAP54XX_CM_L4PER_UART5_CLKCTRL_OFFSET 0x0a70
298#define OMAP54XX_CM_L4PER_UART5_CLKCTRL OMAP54XX_CM_CORE_REGADDR(OMAP54XX_CM_CORE_CORE_INST, 0x0a70)
299#define OMAP54XX_CM_L4PER_UART6_CLKCTRL_OFFSET 0x0a78
300#define OMAP54XX_CM_L4PER_UART6_CLKCTRL OMAP54XX_CM_CORE_REGADDR(OMAP54XX_CM_CORE_CORE_INST, 0x0a78)
301#define OMAP54XX_CM_L4SEC_CLKSTCTRL_OFFSET 0x0a80
302#define OMAP54XX_CM_L4SEC_STATICDEP_OFFSET 0x0a84
303#define OMAP54XX_CM_L4SEC_DYNAMICDEP_OFFSET 0x0a88
304#define OMAP54XX_CM_L4SEC_AES1_CLKCTRL_OFFSET 0x0aa0
305#define OMAP54XX_CM_L4SEC_AES1_CLKCTRL OMAP54XX_CM_CORE_REGADDR(OMAP54XX_CM_CORE_CORE_INST, 0x0aa0)
306#define OMAP54XX_CM_L4SEC_AES2_CLKCTRL_OFFSET 0x0aa8
307#define OMAP54XX_CM_L4SEC_AES2_CLKCTRL OMAP54XX_CM_CORE_REGADDR(OMAP54XX_CM_CORE_CORE_INST, 0x0aa8)
308#define OMAP54XX_CM_L4SEC_DES3DES_CLKCTRL_OFFSET 0x0ab0
309#define OMAP54XX_CM_L4SEC_DES3DES_CLKCTRL OMAP54XX_CM_CORE_REGADDR(OMAP54XX_CM_CORE_CORE_INST, 0x0ab0)
310#define OMAP54XX_CM_L4SEC_FPKA_CLKCTRL_OFFSET 0x0ab8
311#define OMAP54XX_CM_L4SEC_FPKA_CLKCTRL OMAP54XX_CM_CORE_REGADDR(OMAP54XX_CM_CORE_CORE_INST, 0x0ab8)
312#define OMAP54XX_CM_L4SEC_RNG_CLKCTRL_OFFSET 0x0ac0
313#define OMAP54XX_CM_L4SEC_RNG_CLKCTRL OMAP54XX_CM_CORE_REGADDR(OMAP54XX_CM_CORE_CORE_INST, 0x0ac0)
314#define OMAP54XX_CM_L4SEC_SHA2MD5_CLKCTRL_OFFSET 0x0ac8
315#define OMAP54XX_CM_L4SEC_SHA2MD5_CLKCTRL OMAP54XX_CM_CORE_REGADDR(OMAP54XX_CM_CORE_CORE_INST, 0x0ac8)
316#define OMAP54XX_CM_L4SEC_DMA_CRYPTO_CLKCTRL_OFFSET 0x0ad8
317#define OMAP54XX_CM_L4SEC_DMA_CRYPTO_CLKCTRL OMAP54XX_CM_CORE_REGADDR(OMAP54XX_CM_CORE_CORE_INST, 0x0ad8)
318
319/* CM_CORE.IVA_CM_CORE register offsets */
320#define OMAP54XX_CM_IVA_CLKSTCTRL_OFFSET 0x0000
321#define OMAP54XX_CM_IVA_STATICDEP_OFFSET 0x0004
322#define OMAP54XX_CM_IVA_DYNAMICDEP_OFFSET 0x0008
323#define OMAP54XX_CM_IVA_IVA_CLKCTRL_OFFSET 0x0020
324#define OMAP54XX_CM_IVA_IVA_CLKCTRL OMAP54XX_CM_CORE_REGADDR(OMAP54XX_CM_CORE_IVA_INST, 0x0020)
325#define OMAP54XX_CM_IVA_SL2_CLKCTRL_OFFSET 0x0028
326#define OMAP54XX_CM_IVA_SL2_CLKCTRL OMAP54XX_CM_CORE_REGADDR(OMAP54XX_CM_CORE_IVA_INST, 0x0028)
327
328/* CM_CORE.CAM_CM_CORE register offsets */
329#define OMAP54XX_CM_CAM_CLKSTCTRL_OFFSET 0x0000
330#define OMAP54XX_CM_CAM_STATICDEP_OFFSET 0x0004
331#define OMAP54XX_CM_CAM_DYNAMICDEP_OFFSET 0x0008
332#define OMAP54XX_CM_CAM_ISS_CLKCTRL_OFFSET 0x0020
333#define OMAP54XX_CM_CAM_ISS_CLKCTRL OMAP54XX_CM_CORE_REGADDR(OMAP54XX_CM_CORE_CAM_INST, 0x0020)
334#define OMAP54XX_CM_CAM_FDIF_CLKCTRL_OFFSET 0x0028
335#define OMAP54XX_CM_CAM_FDIF_CLKCTRL OMAP54XX_CM_CORE_REGADDR(OMAP54XX_CM_CORE_CAM_INST, 0x0028)
336#define OMAP54XX_CM_CAM_CAL_CLKCTRL_OFFSET 0x0030
337#define OMAP54XX_CM_CAM_CAL_CLKCTRL OMAP54XX_CM_CORE_REGADDR(OMAP54XX_CM_CORE_CAM_INST, 0x0030)
338
339/* CM_CORE.DSS_CM_CORE register offsets */
340#define OMAP54XX_CM_DSS_CLKSTCTRL_OFFSET 0x0000
341#define OMAP54XX_CM_DSS_STATICDEP_OFFSET 0x0004
342#define OMAP54XX_CM_DSS_DYNAMICDEP_OFFSET 0x0008
343#define OMAP54XX_CM_DSS_DSS_CLKCTRL_OFFSET 0x0020
344#define OMAP54XX_CM_DSS_DSS_CLKCTRL OMAP54XX_CM_CORE_REGADDR(OMAP54XX_CM_CORE_DSS_INST, 0x0020)
345#define OMAP54XX_CM_DSS_BB2D_CLKCTRL_OFFSET 0x0030
346#define OMAP54XX_CM_DSS_BB2D_CLKCTRL OMAP54XX_CM_CORE_REGADDR(OMAP54XX_CM_CORE_DSS_INST, 0x0030)
347
348/* CM_CORE.GPU_CM_CORE register offsets */
349#define OMAP54XX_CM_GPU_CLKSTCTRL_OFFSET 0x0000
350#define OMAP54XX_CM_GPU_STATICDEP_OFFSET 0x0004
351#define OMAP54XX_CM_GPU_DYNAMICDEP_OFFSET 0x0008
352#define OMAP54XX_CM_GPU_GPU_CLKCTRL_OFFSET 0x0020
353#define OMAP54XX_CM_GPU_GPU_CLKCTRL OMAP54XX_CM_CORE_REGADDR(OMAP54XX_CM_CORE_GPU_INST, 0x0020)
354
355/* CM_CORE.L3INIT_CM_CORE register offsets */
356#define OMAP54XX_CM_L3INIT_CLKSTCTRL_OFFSET 0x0000
357#define OMAP54XX_CM_L3INIT_STATICDEP_OFFSET 0x0004
358#define OMAP54XX_CM_L3INIT_DYNAMICDEP_OFFSET 0x0008
359#define OMAP54XX_CM_L3INIT_MMC1_CLKCTRL_OFFSET 0x0028
360#define OMAP54XX_CM_L3INIT_MMC1_CLKCTRL OMAP54XX_CM_CORE_REGADDR(OMAP54XX_CM_CORE_L3INIT_INST, 0x0028)
361#define OMAP54XX_CM_L3INIT_MMC2_CLKCTRL_OFFSET 0x0030
362#define OMAP54XX_CM_L3INIT_MMC2_CLKCTRL OMAP54XX_CM_CORE_REGADDR(OMAP54XX_CM_CORE_L3INIT_INST, 0x0030)
363#define OMAP54XX_CM_L3INIT_HSI_CLKCTRL_OFFSET 0x0038
364#define OMAP54XX_CM_L3INIT_HSI_CLKCTRL OMAP54XX_CM_CORE_REGADDR(OMAP54XX_CM_CORE_L3INIT_INST, 0x0038)
365#define OMAP54XX_CM_L3INIT_UNIPRO2_CLKCTRL_OFFSET 0x0040
366#define OMAP54XX_CM_L3INIT_UNIPRO2_CLKCTRL OMAP54XX_CM_CORE_REGADDR(OMAP54XX_CM_CORE_L3INIT_INST, 0x0040)
367#define OMAP54XX_CM_L3INIT_MPHY_UNIPRO2_CLKCTRL_OFFSET 0x0048
368#define OMAP54XX_CM_L3INIT_MPHY_UNIPRO2_CLKCTRL OMAP54XX_CM_CORE_REGADDR(OMAP54XX_CM_CORE_L3INIT_INST, 0x0048)
369#define OMAP54XX_CM_L3INIT_USB_HOST_HS_CLKCTRL_OFFSET 0x0058
370#define OMAP54XX_CM_L3INIT_USB_HOST_HS_CLKCTRL OMAP54XX_CM_CORE_REGADDR(OMAP54XX_CM_CORE_L3INIT_INST, 0x0058)
371#define OMAP54XX_CM_L3INIT_USB_TLL_HS_CLKCTRL_OFFSET 0x0068
372#define OMAP54XX_CM_L3INIT_USB_TLL_HS_CLKCTRL OMAP54XX_CM_CORE_REGADDR(OMAP54XX_CM_CORE_L3INIT_INST, 0x0068)
373#define OMAP54XX_CM_L3INIT_IEEE1500_2_OCP_CLKCTRL_OFFSET 0x0078
374#define OMAP54XX_CM_L3INIT_IEEE1500_2_OCP_CLKCTRL OMAP54XX_CM_CORE_REGADDR(OMAP54XX_CM_CORE_L3INIT_INST, 0x0078)
375#define OMAP54XX_CM_L3INIT_SATA_CLKCTRL_OFFSET 0x0088
376#define OMAP54XX_CM_L3INIT_SATA_CLKCTRL OMAP54XX_CM_CORE_REGADDR(OMAP54XX_CM_CORE_L3INIT_INST, 0x0088)
377#define OMAP54XX_CM_L3INIT_OCP2SCP1_CLKCTRL_OFFSET 0x00e0
378#define OMAP54XX_CM_L3INIT_OCP2SCP1_CLKCTRL OMAP54XX_CM_CORE_REGADDR(OMAP54XX_CM_CORE_L3INIT_INST, 0x00e0)
379#define OMAP54XX_CM_L3INIT_OCP2SCP3_CLKCTRL_OFFSET 0x00e8
380#define OMAP54XX_CM_L3INIT_OCP2SCP3_CLKCTRL OMAP54XX_CM_CORE_REGADDR(OMAP54XX_CM_CORE_L3INIT_INST, 0x00e8)
381#define OMAP54XX_CM_L3INIT_USB_OTG_SS_CLKCTRL_OFFSET 0x00f0
382#define OMAP54XX_CM_L3INIT_USB_OTG_SS_CLKCTRL OMAP54XX_CM_CORE_REGADDR(OMAP54XX_CM_CORE_L3INIT_INST, 0x00f0)
383
384/* CM_CORE.CUSTEFUSE_CM_CORE register offsets */
385#define OMAP54XX_CM_CUSTEFUSE_CLKSTCTRL_OFFSET 0x0000
386#define OMAP54XX_CM_CUSTEFUSE_EFUSE_CTRL_CUST_CLKCTRL_OFFSET 0x0020
387#define OMAP54XX_CM_CUSTEFUSE_EFUSE_CTRL_CUST_CLKCTRL OMAP54XX_CM_CORE_REGADDR(OMAP54XX_CM_CORE_CUSTEFUSE_INST, 0x0020)
388
389#endif
diff --git a/arch/arm/mach-omap2/cm33xx.h b/arch/arm/mach-omap2/cm33xx.h
index 64f4bafe7bd9..9d1f4fcdebbb 100644
--- a/arch/arm/mach-omap2/cm33xx.h
+++ b/arch/arm/mach-omap2/cm33xx.h
@@ -383,7 +383,7 @@ extern void am33xx_cm_clkdm_disable_hwsup(s16 inst, u16 cdoffs);
383extern void am33xx_cm_clkdm_force_sleep(s16 inst, u16 cdoffs); 383extern void am33xx_cm_clkdm_force_sleep(s16 inst, u16 cdoffs);
384extern void am33xx_cm_clkdm_force_wakeup(s16 inst, u16 cdoffs); 384extern void am33xx_cm_clkdm_force_wakeup(s16 inst, u16 cdoffs);
385 385
386#ifdef CONFIG_SOC_AM33XX 386#if defined(CONFIG_SOC_AM33XX) || defined(CONFIG_SOC_AM43XX)
387extern int am33xx_cm_wait_module_idle(u16 inst, s16 cdoffs, 387extern int am33xx_cm_wait_module_idle(u16 inst, s16 cdoffs,
388 u16 clkctrl_offs); 388 u16 clkctrl_offs);
389extern void am33xx_cm_module_enable(u8 mode, u16 inst, s16 cdoffs, 389extern void am33xx_cm_module_enable(u8 mode, u16 inst, s16 cdoffs,
diff --git a/arch/arm/mach-omap2/cm_44xx_54xx.h b/arch/arm/mach-omap2/cm_44xx_54xx.h
new file mode 100644
index 000000000000..cbb211690321
--- /dev/null
+++ b/arch/arm/mach-omap2/cm_44xx_54xx.h
@@ -0,0 +1,36 @@
1/*
2 * OMAP44xx and OMAP54xx CM1/CM2 function prototypes
3 *
4 * Copyright (C) 2009-2013 Texas Instruments, Inc.
5 * Copyright (C) 2009-2010 Nokia Corporation
6 *
7 * Paul Walmsley (paul@pwsan.com)
8 * Rajendra Nayak (rnayak@ti.com)
9 * Benoit Cousson (b-cousson@ti.com)
10 *
11 * This file is automatically generated from the OMAP hardware databases.
12 * We respectfully ask that any modifications to this file be coordinated
13 * with the public linux-omap@vger.kernel.org mailing list and the
14 * authors above to ensure that the autogeneration scripts are kept
15 * up-to-date with the file contents.
16 *
17 * This program is free software; you can redistribute it and/or modify
18 * it under the terms of the GNU General Public License version 2 as
19 * published by the Free Software Foundation.
20 *
21 */
22
23#ifndef __ARCH_ARM_MACH_OMAP2_CM_44XX_54XX_H
24#define __ARCH_ARM_MACH_OMAP2_CM_44XX_55XX_H
25
26/* CM1 Function prototypes */
27extern u32 omap4_cm1_read_inst_reg(s16 inst, u16 idx);
28extern void omap4_cm1_write_inst_reg(u32 val, s16 inst, u16 idx);
29extern u32 omap4_cm1_rmw_inst_reg_bits(u32 mask, u32 bits, s16 inst, s16 idx);
30
31/* CM2 Function prototypes */
32extern u32 omap4_cm2_read_inst_reg(s16 inst, u16 idx);
33extern void omap4_cm2_write_inst_reg(u32 val, s16 inst, u16 idx);
34extern u32 omap4_cm2_rmw_inst_reg_bits(u32 mask, u32 bits, s16 inst, s16 idx);
35
36#endif
diff --git a/arch/arm/mach-omap2/common.h b/arch/arm/mach-omap2/common.h
index d555cf2459e1..dfcc182ecff9 100644
--- a/arch/arm/mach-omap2/common.h
+++ b/arch/arm/mach-omap2/common.h
@@ -31,6 +31,7 @@
31#include <linux/i2c.h> 31#include <linux/i2c.h>
32#include <linux/i2c/twl.h> 32#include <linux/i2c/twl.h>
33#include <linux/i2c-omap.h> 33#include <linux/i2c-omap.h>
34#include <linux/reboot.h>
34 35
35#include <asm/proc-fns.h> 36#include <asm/proc-fns.h>
36 37
@@ -96,6 +97,7 @@ void am33xx_init_early(void);
96void am35xx_init_early(void); 97void am35xx_init_early(void);
97void ti81xx_init_early(void); 98void ti81xx_init_early(void);
98void am33xx_init_early(void); 99void am33xx_init_early(void);
100void am43xx_init_early(void);
99void omap4430_init_early(void); 101void omap4430_init_early(void);
100void omap5_init_early(void); 102void omap5_init_early(void);
101void omap3_init_late(void); /* Do not use this one */ 103void omap3_init_late(void); /* Do not use this one */
@@ -118,33 +120,33 @@ static inline void omap_soc_device_init(void)
118#endif 120#endif
119 121
120#if defined(CONFIG_SOC_OMAP2420) || defined(CONFIG_SOC_OMAP2430) 122#if defined(CONFIG_SOC_OMAP2420) || defined(CONFIG_SOC_OMAP2430)
121void omap2xxx_restart(char mode, const char *cmd); 123void omap2xxx_restart(enum reboot_mode mode, const char *cmd);
122#else 124#else
123static inline void omap2xxx_restart(char mode, const char *cmd) 125static inline void omap2xxx_restart(enum reboot_mode mode, const char *cmd)
124{ 126{
125} 127}
126#endif 128#endif
127 129
128#ifdef CONFIG_SOC_AM33XX 130#ifdef CONFIG_SOC_AM33XX
129void am33xx_restart(char mode, const char *cmd); 131void am33xx_restart(enum reboot_mode mode, const char *cmd);
130#else 132#else
131static inline void am33xx_restart(char mode, const char *cmd) 133static inline void am33xx_restart(enum reboot_mode mode, const char *cmd)
132{ 134{
133} 135}
134#endif 136#endif
135 137
136#ifdef CONFIG_ARCH_OMAP3 138#ifdef CONFIG_ARCH_OMAP3
137void omap3xxx_restart(char mode, const char *cmd); 139void omap3xxx_restart(enum reboot_mode mode, const char *cmd);
138#else 140#else
139static inline void omap3xxx_restart(char mode, const char *cmd) 141static inline void omap3xxx_restart(enum reboot_mode mode, const char *cmd)
140{ 142{
141} 143}
142#endif 144#endif
143 145
144#if defined(CONFIG_ARCH_OMAP4) || defined(CONFIG_SOC_OMAP5) 146#if defined(CONFIG_ARCH_OMAP4) || defined(CONFIG_SOC_OMAP5)
145void omap44xx_restart(char mode, const char *cmd); 147void omap44xx_restart(enum reboot_mode mode, const char *cmd);
146#else 148#else
147static inline void omap44xx_restart(char mode, const char *cmd) 149static inline void omap44xx_restart(enum reboot_mode mode, const char *cmd)
148{ 150{
149} 151}
150#endif 152#endif
@@ -237,8 +239,8 @@ extern void omap_do_wfi(void);
237 239
238#ifdef CONFIG_SMP 240#ifdef CONFIG_SMP
239/* Needed for secondary core boot */ 241/* Needed for secondary core boot */
240extern void omap_secondary_startup(void); 242extern void omap4_secondary_startup(void);
241extern void omap_secondary_startup_4460(void); 243extern void omap4460_secondary_startup(void);
242extern u32 omap_modify_auxcoreboot0(u32 set_mask, u32 clear_mask); 244extern u32 omap_modify_auxcoreboot0(u32 set_mask, u32 clear_mask);
243extern void omap_auxcoreboot_addr(u32 cpu_addr); 245extern void omap_auxcoreboot_addr(u32 cpu_addr);
244extern u32 omap_read_auxcoreboot0(void); 246extern u32 omap_read_auxcoreboot0(void);
diff --git a/arch/arm/mach-omap2/control.c b/arch/arm/mach-omap2/control.c
index 2adb2683f074..31e0dfe4a4ea 100644
--- a/arch/arm/mach-omap2/control.c
+++ b/arch/arm/mach-omap2/control.c
@@ -249,6 +249,7 @@ void omap_ctrl_write_dsp_boot_addr(u32 bootaddr)
249 u32 offset = cpu_is_omap243x() ? OMAP243X_CONTROL_IVA2_BOOTADDR : 249 u32 offset = cpu_is_omap243x() ? OMAP243X_CONTROL_IVA2_BOOTADDR :
250 cpu_is_omap34xx() ? OMAP343X_CONTROL_IVA2_BOOTADDR : 250 cpu_is_omap34xx() ? OMAP343X_CONTROL_IVA2_BOOTADDR :
251 cpu_is_omap44xx() ? OMAP4_CTRL_MODULE_CORE_DSP_BOOTADDR : 251 cpu_is_omap44xx() ? OMAP4_CTRL_MODULE_CORE_DSP_BOOTADDR :
252 soc_is_omap54xx() ? OMAP4_CTRL_MODULE_CORE_DSP_BOOTADDR :
252 0; 253 0;
253 254
254 if (!offset) { 255 if (!offset) {
diff --git a/arch/arm/mach-omap2/control.h b/arch/arm/mach-omap2/control.h
index e6c328128a0a..f7d7c2ef1b40 100644
--- a/arch/arm/mach-omap2/control.h
+++ b/arch/arm/mach-omap2/control.h
@@ -358,6 +358,18 @@
358#define AM33XX_CONTROL_STATUS_SYSBOOT1_WIDTH 0x2 358#define AM33XX_CONTROL_STATUS_SYSBOOT1_WIDTH 0x2
359#define AM33XX_CONTROL_STATUS_SYSBOOT1_MASK (0x3 << 22) 359#define AM33XX_CONTROL_STATUS_SYSBOOT1_MASK (0x3 << 22)
360 360
361/* AM33XX PWMSS Control register */
362#define AM33XX_PWMSS_TBCLK_CLKCTRL 0x664
363
364/* AM33XX PWMSS Control bitfields */
365#define AM33XX_PWMSS0_TBCLKEN_SHIFT 0
366#define AM33XX_PWMSS1_TBCLKEN_SHIFT 1
367#define AM33XX_PWMSS2_TBCLKEN_SHIFT 2
368
369/* DEV Feature register to identify AM33XX features */
370#define AM33XX_DEV_FEATURE 0x604
371#define AM33XX_SGX_MASK BIT(29)
372
361/* CONTROL OMAP STATUS register to identify OMAP3 features */ 373/* CONTROL OMAP STATUS register to identify OMAP3 features */
362#define OMAP3_CONTROL_OMAP_STATUS 0x044c 374#define OMAP3_CONTROL_OMAP_STATUS 0x044c
363 375
diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c
index 4269fc145698..3c1279f27d1f 100644
--- a/arch/arm/mach-omap2/devices.c
+++ b/arch/arm/mach-omap2/devices.c
@@ -19,8 +19,8 @@
19#include <linux/of.h> 19#include <linux/of.h>
20#include <linux/pinctrl/machine.h> 20#include <linux/pinctrl/machine.h>
21#include <linux/platform_data/omap4-keypad.h> 21#include <linux/platform_data/omap4-keypad.h>
22#include <linux/platform_data/omap_ocp2scp.h> 22#include <linux/wl12xx.h>
23#include <linux/usb/omap_control_usb.h> 23#include <linux/platform_data/mailbox-omap.h>
24 24
25#include <asm/mach-types.h> 25#include <asm/mach-types.h>
26#include <asm/mach/map.h> 26#include <asm/mach/map.h>
@@ -37,7 +37,6 @@
37#include "mux.h" 37#include "mux.h"
38#include "control.h" 38#include "control.h"
39#include "devices.h" 39#include "devices.h"
40#include "dma.h"
41 40
42#define L3_MODULES_MAX_LEN 12 41#define L3_MODULES_MAX_LEN 12
43#define L3_MODULES 3 42#define L3_MODULES 3
@@ -66,7 +65,7 @@ static int __init omap3_l3_init(void)
66 65
67 WARN(IS_ERR(pdev), "could not build omap_device for %s\n", oh_name); 66 WARN(IS_ERR(pdev), "could not build omap_device for %s\n", oh_name);
68 67
69 return IS_ERR(pdev) ? PTR_ERR(pdev) : 0; 68 return PTR_RET(pdev);
70} 69}
71omap_postcore_initcall(omap3_l3_init); 70omap_postcore_initcall(omap3_l3_init);
72 71
@@ -100,7 +99,7 @@ static int __init omap4_l3_init(void)
100 99
101 WARN(IS_ERR(pdev), "could not build omap_device for %s\n", oh_name); 100 WARN(IS_ERR(pdev), "could not build omap_device for %s\n", oh_name);
102 101
103 return IS_ERR(pdev) ? PTR_ERR(pdev) : 0; 102 return PTR_RET(pdev);
104} 103}
105omap_postcore_initcall(omap4_l3_init); 104omap_postcore_initcall(omap4_l3_init);
106 105
@@ -253,49 +252,6 @@ static inline void omap_init_camera(void)
253#endif 252#endif
254} 253}
255 254
256#if IS_ENABLED(CONFIG_OMAP_CONTROL_USB)
257static struct omap_control_usb_platform_data omap4_control_usb_pdata = {
258 .type = 1,
259};
260
261struct resource omap4_control_usb_res[] = {
262 {
263 .name = "control_dev_conf",
264 .start = 0x4a002300,
265 .end = 0x4a002303,
266 .flags = IORESOURCE_MEM,
267 },
268 {
269 .name = "otghs_control",
270 .start = 0x4a00233c,
271 .end = 0x4a00233f,
272 .flags = IORESOURCE_MEM,
273 },
274};
275
276static struct platform_device omap4_control_usb = {
277 .name = "omap-control-usb",
278 .id = -1,
279 .dev = {
280 .platform_data = &omap4_control_usb_pdata,
281 },
282 .num_resources = 2,
283 .resource = omap4_control_usb_res,
284};
285
286static inline void __init omap_init_control_usb(void)
287{
288 if (!cpu_is_omap44xx())
289 return;
290
291 if (platform_device_register(&omap4_control_usb))
292 pr_err("Error registering omap_control_usb device\n");
293}
294
295#else
296static inline void omap_init_control_usb(void) { }
297#endif /* CONFIG_OMAP_CONTROL_USB */
298
299int __init omap4_keyboard_init(struct omap4_keypad_platform_data 255int __init omap4_keyboard_init(struct omap4_keypad_platform_data
300 *sdp4430_keypad_data, struct omap_board_data *bdata) 256 *sdp4430_keypad_data, struct omap_board_data *bdata)
301{ 257{
@@ -327,25 +283,31 @@ int __init omap4_keyboard_init(struct omap4_keypad_platform_data
327 return 0; 283 return 0;
328} 284}
329 285
330#if defined(CONFIG_OMAP_MBOX_FWK) || defined(CONFIG_OMAP_MBOX_FWK_MODULE) 286#if defined(CONFIG_OMAP2PLUS_MBOX) || defined(CONFIG_OMAP2PLUS_MBOX_MODULE)
331static inline void __init omap_init_mbox(void) 287static inline void __init omap_init_mbox(void)
332{ 288{
333 struct omap_hwmod *oh; 289 struct omap_hwmod *oh;
334 struct platform_device *pdev; 290 struct platform_device *pdev;
291 struct omap_mbox_pdata *pdata;
335 292
336 oh = omap_hwmod_lookup("mailbox"); 293 oh = omap_hwmod_lookup("mailbox");
337 if (!oh) { 294 if (!oh) {
338 pr_err("%s: unable to find hwmod\n", __func__); 295 pr_err("%s: unable to find hwmod\n", __func__);
339 return; 296 return;
340 } 297 }
298 if (!oh->dev_attr) {
299 pr_err("%s: hwmod doesn't have valid attrs\n", __func__);
300 return;
301 }
341 302
342 pdev = omap_device_build("omap-mailbox", -1, oh, NULL, 0); 303 pdata = (struct omap_mbox_pdata *)oh->dev_attr;
304 pdev = omap_device_build("omap-mailbox", -1, oh, pdata, sizeof(*pdata));
343 WARN(IS_ERR(pdev), "%s: could not build device, err %ld\n", 305 WARN(IS_ERR(pdev), "%s: could not build device, err %ld\n",
344 __func__, PTR_ERR(pdev)); 306 __func__, PTR_ERR(pdev));
345} 307}
346#else 308#else
347static inline void omap_init_mbox(void) { } 309static inline void omap_init_mbox(void) { }
348#endif /* CONFIG_OMAP_MBOX_FWK */ 310#endif /* CONFIG_OMAP2PLUS_MBOX */
349 311
350static inline void omap_init_sti(void) {} 312static inline void omap_init_sti(void) {}
351 313
@@ -374,10 +336,8 @@ static void __init omap_init_mcpdm(void)
374 struct platform_device *pdev; 336 struct platform_device *pdev;
375 337
376 oh = omap_hwmod_lookup("mcpdm"); 338 oh = omap_hwmod_lookup("mcpdm");
377 if (!oh) { 339 if (!oh)
378 printk(KERN_ERR "Could not look up mcpdm hw_mod\n");
379 return; 340 return;
380 }
381 341
382 pdev = omap_device_build("omap-mcpdm", -1, oh, NULL, 0); 342 pdev = omap_device_build("omap-mcpdm", -1, oh, NULL, 0);
383 WARN(IS_ERR(pdev), "Can't build omap_device for omap-mcpdm.\n"); 343 WARN(IS_ERR(pdev), "Can't build omap_device for omap-mcpdm.\n");
@@ -395,10 +355,8 @@ static void __init omap_init_dmic(void)
395 struct platform_device *pdev; 355 struct platform_device *pdev;
396 356
397 oh = omap_hwmod_lookup("dmic"); 357 oh = omap_hwmod_lookup("dmic");
398 if (!oh) { 358 if (!oh)
399 pr_err("Could not look up dmic hw_mod\n");
400 return; 359 return;
401 }
402 360
403 pdev = omap_device_build("omap-dmic", -1, oh, NULL, 0); 361 pdev = omap_device_build("omap-dmic", -1, oh, NULL, 0);
404 WARN(IS_ERR(pdev), "Can't build omap_device for omap-dmic.\n"); 362 WARN(IS_ERR(pdev), "Can't build omap_device for omap-dmic.\n");
@@ -421,10 +379,8 @@ static void __init omap_init_hdmi_audio(void)
421 struct platform_device *pdev; 379 struct platform_device *pdev;
422 380
423 oh = omap_hwmod_lookup("dss_hdmi"); 381 oh = omap_hwmod_lookup("dss_hdmi");
424 if (!oh) { 382 if (!oh)
425 printk(KERN_ERR "Could not look up dss_hdmi hw_mod\n");
426 return; 383 return;
427 }
428 384
429 pdev = omap_device_build("omap-hdmi-audio-dai", -1, oh, NULL, 0); 385 pdev = omap_device_build("omap-hdmi-audio-dai", -1, oh, NULL, 0);
430 WARN(IS_ERR(pdev), 386 WARN(IS_ERR(pdev),
@@ -557,80 +513,38 @@ static void omap_init_vout(void)
557static inline void omap_init_vout(void) {} 513static inline void omap_init_vout(void) {}
558#endif 514#endif
559 515
560#if defined(CONFIG_OMAP_OCP2SCP) || defined(CONFIG_OMAP_OCP2SCP_MODULE) 516#if IS_ENABLED(CONFIG_WL12XX)
561static int count_ocp2scp_devices(struct omap_ocp2scp_dev *ocp2scp_dev)
562{
563 int cnt = 0;
564 517
565 while (ocp2scp_dev->drv_name != NULL) { 518static struct wl12xx_platform_data wl12xx __initdata;
566 cnt++;
567 ocp2scp_dev++;
568 }
569 519
570 return cnt; 520void __init omap_init_wl12xx_of(void)
571}
572
573static void __init omap_init_ocp2scp(void)
574{ 521{
575 struct omap_hwmod *oh; 522 int ret;
576 struct platform_device *pdev;
577 int bus_id = -1, dev_cnt = 0, i;
578 struct omap_ocp2scp_dev *ocp2scp_dev;
579 const char *oh_name, *name;
580 struct omap_ocp2scp_platform_data *pdata;
581
582 if (!cpu_is_omap44xx())
583 return;
584
585 oh_name = "ocp2scp_usb_phy";
586 name = "omap-ocp2scp";
587
588 oh = omap_hwmod_lookup(oh_name);
589 if (!oh) {
590 pr_err("%s: could not find omap_hwmod for %s\n", __func__,
591 oh_name);
592 return;
593 }
594 523
595 pdata = kzalloc(sizeof(*pdata), GFP_KERNEL); 524 if (!of_have_populated_dt())
596 if (!pdata) {
597 pr_err("%s: No memory for ocp2scp pdata\n", __func__);
598 return; 525 return;
599 }
600 526
601 ocp2scp_dev = oh->dev_attr; 527 if (of_machine_is_compatible("ti,omap4-sdp")) {
602 dev_cnt = count_ocp2scp_devices(ocp2scp_dev); 528 wl12xx.board_ref_clock = WL12XX_REFCLOCK_26;
603 529 wl12xx.board_tcxo_clock = WL12XX_TCXOCLOCK_26;
604 if (!dev_cnt) { 530 wl12xx.irq = gpio_to_irq(53);
605 pr_err("%s: No devices connected to ocp2scp\n", __func__); 531 } else if (of_machine_is_compatible("ti,omap4-panda")) {
606 kfree(pdata); 532 wl12xx.board_ref_clock = WL12XX_REFCLOCK_38;
533 wl12xx.irq = gpio_to_irq(53);
534 } else {
607 return; 535 return;
608 } 536 }
609 537
610 pdata->devices = kzalloc(sizeof(struct omap_ocp2scp_dev *) 538 ret = wl12xx_set_platform_data(&wl12xx);
611 * dev_cnt, GFP_KERNEL); 539 if (ret) {
612 if (!pdata->devices) { 540 pr_err("error setting wl12xx data: %d\n", ret);
613 pr_err("%s: No memory for ocp2scp pdata devices\n", __func__);
614 kfree(pdata);
615 return;
616 }
617
618 for (i = 0; i < dev_cnt; i++, ocp2scp_dev++)
619 pdata->devices[i] = ocp2scp_dev;
620
621 pdata->dev_cnt = dev_cnt;
622
623 pdev = omap_device_build(name, bus_id, oh, pdata, sizeof(*pdata));
624 if (IS_ERR(pdev)) {
625 pr_err("Could not build omap_device for %s %s\n",
626 name, oh_name);
627 kfree(pdata->devices);
628 kfree(pdata);
629 return; 541 return;
630 } 542 }
631} 543}
632#else 544#else
633static inline void omap_init_ocp2scp(void) { } 545static inline void omap_init_wl12xx_of(void)
546{
547}
634#endif 548#endif
635 549
636/*-------------------------------------------------------------------------*/ 550/*-------------------------------------------------------------------------*/
@@ -651,17 +565,18 @@ static int __init omap2_init_devices(void)
651 omap_init_mbox(); 565 omap_init_mbox();
652 /* If dtb is there, the devices will be created dynamically */ 566 /* If dtb is there, the devices will be created dynamically */
653 if (!of_have_populated_dt()) { 567 if (!of_have_populated_dt()) {
654 omap_init_control_usb();
655 omap_init_dmic(); 568 omap_init_dmic();
656 omap_init_mcpdm(); 569 omap_init_mcpdm();
657 omap_init_mcspi(); 570 omap_init_mcspi();
658 omap_init_sham(); 571 omap_init_sham();
659 omap_init_aes(); 572 omap_init_aes();
573 } else {
574 /* These can be removed when bindings are done */
575 omap_init_wl12xx_of();
660 } 576 }
661 omap_init_sti(); 577 omap_init_sti();
662 omap_init_rng(); 578 omap_init_rng();
663 omap_init_vout(); 579 omap_init_vout();
664 omap_init_ocp2scp();
665 580
666 return 0; 581 return 0;
667} 582}
diff --git a/arch/arm/mach-omap2/dma.h b/arch/arm/mach-omap2/dma.h
deleted file mode 100644
index 65f80cacf178..000000000000
--- a/arch/arm/mach-omap2/dma.h
+++ /dev/null
@@ -1,61 +0,0 @@
1/*
2 * OMAP2PLUS DMA channel definitions
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
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 */
18
19#ifndef __OMAP2PLUS_DMA_CHANNEL_H
20#define __OMAP2PLUS_DMA_CHANNEL_H
21
22
23/* DMA channels for 24xx */
24#define OMAP24XX_DMA_NO_DEVICE 0
25#define OMAP24XX_DMA_EXT_DMAREQ0 2 /* S_DMA_1 */
26#define OMAP24XX_DMA_EXT_DMAREQ1 3 /* S_DMA_2 */
27#define OMAP24XX_DMA_GPMC 4 /* S_DMA_3 */
28#define OMAP24XX_DMA_AES_TX 9 /* S_DMA_8 */
29#define OMAP24XX_DMA_AES_RX 10 /* S_DMA_9 */
30#define OMAP242X_DMA_EXT_DMAREQ2 14 /* S_DMA_13 */
31#define OMAP242X_DMA_EXT_DMAREQ3 15 /* S_DMA_14 */
32#define OMAP242X_DMA_EXT_DMAREQ4 16 /* S_DMA_15 */
33#define OMAP34XX_DMA_I2C3_TX 25 /* S_DMA_24 */
34#define OMAP34XX_DMA_I2C3_RX 26 /* S_DMA_25 */
35#define OMAP24XX_DMA_I2C1_TX 27 /* S_DMA_26 */
36#define OMAP24XX_DMA_I2C1_RX 28 /* S_DMA_27 */
37#define OMAP24XX_DMA_I2C2_TX 29 /* S_DMA_28 */
38#define OMAP24XX_DMA_I2C2_RX 30 /* S_DMA_29 */
39#define OMAP24XX_DMA_MMC2_TX 47 /* S_DMA_46 */
40#define OMAP24XX_DMA_MMC2_RX 48 /* S_DMA_47 */
41#define OMAP24XX_DMA_UART1_TX 49 /* S_DMA_48 */
42#define OMAP24XX_DMA_UART1_RX 50 /* S_DMA_49 */
43#define OMAP24XX_DMA_UART2_TX 51 /* S_DMA_50 */
44#define OMAP24XX_DMA_UART2_RX 52 /* S_DMA_51 */
45#define OMAP24XX_DMA_UART3_TX 53 /* S_DMA_52 */
46#define OMAP24XX_DMA_UART3_RX 54 /* S_DMA_53 */
47#define OMAP24XX_DMA_MMC1_TX 61 /* S_DMA_60 */
48#define OMAP24XX_DMA_MMC1_RX 62 /* S_DMA_61 */
49#define OMAP242X_DMA_EXT_DMAREQ5 64 /* S_DMA_63 */
50#define OMAP34XX_DMA_AES2_TX 65 /* S_DMA_64 */
51#define OMAP34XX_DMA_AES2_RX 66 /* S_DMA_65 */
52#define OMAP34XX_DMA_SHA1MD5_RX 69 /* S_DMA_68 */
53
54#define OMAP36XX_DMA_UART4_TX 81 /* S_DMA_80 */
55#define OMAP36XX_DMA_UART4_RX 82 /* S_DMA_81 */
56
57/* Only for AM35xx */
58#define AM35XX_DMA_UART4_TX 54
59#define AM35XX_DMA_UART4_RX 55
60
61#endif /* __OMAP2PLUS_DMA_CHANNEL_H */
diff --git a/arch/arm/mach-omap2/dss-common.c b/arch/arm/mach-omap2/dss-common.c
index 393aeefaebb0..043e5705f2a6 100644
--- a/arch/arm/mach-omap2/dss-common.c
+++ b/arch/arm/mach-omap2/dss-common.c
@@ -42,7 +42,7 @@
42 42
43/* Using generic display panel */ 43/* Using generic display panel */
44static struct tfp410_platform_data omap4_dvi_panel = { 44static struct tfp410_platform_data omap4_dvi_panel = {
45 .i2c_bus_num = 3, 45 .i2c_bus_num = 2,
46 .power_down_gpio = PANDA_DVI_TFP410_POWER_DOWN_GPIO, 46 .power_down_gpio = PANDA_DVI_TFP410_POWER_DOWN_GPIO,
47}; 47};
48 48
diff --git a/arch/arm/mach-omap2/fb.c b/arch/arm/mach-omap2/fb.c
index 190ae493c6ef..2ca33cc0c484 100644
--- a/arch/arm/mach-omap2/fb.c
+++ b/arch/arm/mach-omap2/fb.c
@@ -83,10 +83,7 @@ static int __init omap_init_vrfb(void)
83 pdev = platform_device_register_resndata(NULL, "omapvrfb", -1, 83 pdev = platform_device_register_resndata(NULL, "omapvrfb", -1,
84 res, num_res, NULL, 0); 84 res, num_res, NULL, 0);
85 85
86 if (IS_ERR(pdev)) 86 return PTR_RET(pdev);
87 return PTR_ERR(pdev);
88 else
89 return 0;
90} 87}
91 88
92omap_arch_initcall(omap_init_vrfb); 89omap_arch_initcall(omap_init_vrfb);
diff --git a/arch/arm/mach-omap2/gpmc-nand.c b/arch/arm/mach-omap2/gpmc-nand.c
index d9c27195caf0..662c7fd633cc 100644
--- a/arch/arm/mach-omap2/gpmc-nand.c
+++ b/arch/arm/mach-omap2/gpmc-nand.c
@@ -43,44 +43,6 @@ static struct platform_device gpmc_nand_device = {
43 .resource = gpmc_nand_resource, 43 .resource = gpmc_nand_resource,
44}; 44};
45 45
46static int omap2_nand_gpmc_retime(
47 struct omap_nand_platform_data *gpmc_nand_data,
48 struct gpmc_timings *gpmc_t)
49{
50 struct gpmc_timings t;
51 int err;
52
53 memset(&t, 0, sizeof(t));
54 t.sync_clk = gpmc_t->sync_clk;
55 t.cs_on = gpmc_t->cs_on;
56 t.adv_on = gpmc_t->adv_on;
57
58 /* Read */
59 t.adv_rd_off = gpmc_t->adv_rd_off;
60 t.oe_on = t.adv_on;
61 t.access = gpmc_t->access;
62 t.oe_off = gpmc_t->oe_off;
63 t.cs_rd_off = gpmc_t->cs_rd_off;
64 t.rd_cycle = gpmc_t->rd_cycle;
65
66 /* Write */
67 t.adv_wr_off = gpmc_t->adv_wr_off;
68 t.we_on = t.oe_on;
69 if (cpu_is_omap34xx()) {
70 t.wr_data_mux_bus = gpmc_t->wr_data_mux_bus;
71 t.wr_access = gpmc_t->wr_access;
72 }
73 t.we_off = gpmc_t->we_off;
74 t.cs_wr_off = gpmc_t->cs_wr_off;
75 t.wr_cycle = gpmc_t->wr_cycle;
76
77 err = gpmc_cs_set_timings(gpmc_nand_data->cs, &t);
78 if (err)
79 return err;
80
81 return 0;
82}
83
84static bool gpmc_hwecc_bch_capable(enum omap_ecc ecc_opt) 46static bool gpmc_hwecc_bch_capable(enum omap_ecc ecc_opt)
85{ 47{
86 /* support only OMAP3 class */ 48 /* support only OMAP3 class */
@@ -131,7 +93,7 @@ int gpmc_nand_init(struct omap_nand_platform_data *gpmc_nand_data,
131 gpmc_get_client_irq(GPMC_IRQ_COUNT_EVENT); 93 gpmc_get_client_irq(GPMC_IRQ_COUNT_EVENT);
132 94
133 if (gpmc_t) { 95 if (gpmc_t) {
134 err = omap2_nand_gpmc_retime(gpmc_nand_data, gpmc_t); 96 err = gpmc_cs_set_timings(gpmc_nand_data->cs, gpmc_t);
135 if (err < 0) { 97 if (err < 0) {
136 dev_err(dev, "Unable to set gpmc timings: %d\n", err); 98 dev_err(dev, "Unable to set gpmc timings: %d\n", err);
137 return err; 99 return err;
@@ -140,8 +102,6 @@ int gpmc_nand_init(struct omap_nand_platform_data *gpmc_nand_data,
140 if (gpmc_nand_data->of_node) { 102 if (gpmc_nand_data->of_node) {
141 gpmc_read_settings_dt(gpmc_nand_data->of_node, &s); 103 gpmc_read_settings_dt(gpmc_nand_data->of_node, &s);
142 } else { 104 } else {
143 s.device_nand = true;
144
145 /* Enable RD PIN Monitoring Reg */ 105 /* Enable RD PIN Monitoring Reg */
146 if (gpmc_nand_data->dev_ready) { 106 if (gpmc_nand_data->dev_ready) {
147 s.wait_on_read = true; 107 s.wait_on_read = true;
@@ -149,6 +109,8 @@ int gpmc_nand_init(struct omap_nand_platform_data *gpmc_nand_data,
149 } 109 }
150 } 110 }
151 111
112 s.device_nand = true;
113
152 if (gpmc_nand_data->devsize == NAND_BUSWIDTH_16) 114 if (gpmc_nand_data->devsize == NAND_BUSWIDTH_16)
153 s.device_width = GPMC_DEVWIDTH_16BIT; 115 s.device_width = GPMC_DEVWIDTH_16BIT;
154 else 116 else
diff --git a/arch/arm/mach-omap2/gpmc.c b/arch/arm/mach-omap2/gpmc.c
index 6c4da1254f53..f3fdd6afa213 100644
--- a/arch/arm/mach-omap2/gpmc.c
+++ b/arch/arm/mach-omap2/gpmc.c
@@ -30,6 +30,7 @@
30#include <linux/of_mtd.h> 30#include <linux/of_mtd.h>
31#include <linux/of_device.h> 31#include <linux/of_device.h>
32#include <linux/mtd/nand.h> 32#include <linux/mtd/nand.h>
33#include <linux/pm_runtime.h>
33 34
34#include <linux/platform_data/mtd-nand-omap2.h> 35#include <linux/platform_data/mtd-nand-omap2.h>
35 36
@@ -155,6 +156,7 @@ static struct resource gpmc_cs_mem[GPMC_CS_NUM];
155static DEFINE_SPINLOCK(gpmc_mem_lock); 156static DEFINE_SPINLOCK(gpmc_mem_lock);
156/* Define chip-selects as reserved by default until probe completes */ 157/* Define chip-selects as reserved by default until probe completes */
157static unsigned int gpmc_cs_map = ((1 << GPMC_CS_NUM) - 1); 158static unsigned int gpmc_cs_map = ((1 << GPMC_CS_NUM) - 1);
159static unsigned int gpmc_cs_num = GPMC_CS_NUM;
158static unsigned int gpmc_nr_waitpins; 160static unsigned int gpmc_nr_waitpins;
159static struct device *gpmc_dev; 161static struct device *gpmc_dev;
160static int gpmc_irq; 162static int gpmc_irq;
@@ -521,8 +523,10 @@ static int gpmc_cs_remap(int cs, u32 base)
521 int ret; 523 int ret;
522 u32 old_base, size; 524 u32 old_base, size;
523 525
524 if (cs > GPMC_CS_NUM) 526 if (cs > gpmc_cs_num) {
527 pr_err("%s: requested chip-select is disabled\n", __func__);
525 return -ENODEV; 528 return -ENODEV;
529 }
526 gpmc_cs_get_memconf(cs, &old_base, &size); 530 gpmc_cs_get_memconf(cs, &old_base, &size);
527 if (base == old_base) 531 if (base == old_base)
528 return 0; 532 return 0;
@@ -545,9 +549,10 @@ int gpmc_cs_request(int cs, unsigned long size, unsigned long *base)
545 struct resource *res = &gpmc_cs_mem[cs]; 549 struct resource *res = &gpmc_cs_mem[cs];
546 int r = -1; 550 int r = -1;
547 551
548 if (cs > GPMC_CS_NUM) 552 if (cs > gpmc_cs_num) {
553 pr_err("%s: requested chip-select is disabled\n", __func__);
549 return -ENODEV; 554 return -ENODEV;
550 555 }
551 size = gpmc_mem_align(size); 556 size = gpmc_mem_align(size);
552 if (size > (1 << GPMC_SECTION_SHIFT)) 557 if (size > (1 << GPMC_SECTION_SHIFT))
553 return -ENOMEM; 558 return -ENOMEM;
@@ -582,7 +587,7 @@ EXPORT_SYMBOL(gpmc_cs_request);
582void gpmc_cs_free(int cs) 587void gpmc_cs_free(int cs)
583{ 588{
584 spin_lock(&gpmc_mem_lock); 589 spin_lock(&gpmc_mem_lock);
585 if (cs >= GPMC_CS_NUM || cs < 0 || !gpmc_cs_reserved(cs)) { 590 if (cs >= gpmc_cs_num || cs < 0 || !gpmc_cs_reserved(cs)) {
586 printk(KERN_ERR "Trying to free non-reserved GPMC CS%d\n", cs); 591 printk(KERN_ERR "Trying to free non-reserved GPMC CS%d\n", cs);
587 BUG(); 592 BUG();
588 spin_unlock(&gpmc_mem_lock); 593 spin_unlock(&gpmc_mem_lock);
@@ -777,7 +782,7 @@ static void gpmc_mem_exit(void)
777{ 782{
778 int cs; 783 int cs;
779 784
780 for (cs = 0; cs < GPMC_CS_NUM; cs++) { 785 for (cs = 0; cs < gpmc_cs_num; cs++) {
781 if (!gpmc_cs_mem_enabled(cs)) 786 if (!gpmc_cs_mem_enabled(cs))
782 continue; 787 continue;
783 gpmc_cs_delete_mem(cs); 788 gpmc_cs_delete_mem(cs);
@@ -798,7 +803,7 @@ static void gpmc_mem_init(void)
798 gpmc_mem_root.end = GPMC_MEM_END; 803 gpmc_mem_root.end = GPMC_MEM_END;
799 804
800 /* Reserve all regions that has been set up by bootloader */ 805 /* Reserve all regions that has been set up by bootloader */
801 for (cs = 0; cs < GPMC_CS_NUM; cs++) { 806 for (cs = 0; cs < gpmc_cs_num; cs++) {
802 u32 base, size; 807 u32 base, size;
803 808
804 if (!gpmc_cs_mem_enabled(cs)) 809 if (!gpmc_cs_mem_enabled(cs))
@@ -1245,7 +1250,6 @@ void gpmc_read_settings_dt(struct device_node *np, struct gpmc_settings *p)
1245 1250
1246 p->sync_read = of_property_read_bool(np, "gpmc,sync-read"); 1251 p->sync_read = of_property_read_bool(np, "gpmc,sync-read");
1247 p->sync_write = of_property_read_bool(np, "gpmc,sync-write"); 1252 p->sync_write = of_property_read_bool(np, "gpmc,sync-write");
1248 p->device_nand = of_property_read_bool(np, "gpmc,device-nand");
1249 of_property_read_u32(np, "gpmc,device-width", &p->device_width); 1253 of_property_read_u32(np, "gpmc,device-width", &p->device_width);
1250 of_property_read_u32(np, "gpmc,mux-add-data", &p->mux_add_data); 1254 of_property_read_u32(np, "gpmc,mux-add-data", &p->mux_add_data);
1251 1255
@@ -1345,6 +1349,13 @@ static const char * const nand_ecc_opts[] = {
1345 [OMAP_ECC_BCH8_CODE_HW] = "bch8", 1349 [OMAP_ECC_BCH8_CODE_HW] = "bch8",
1346}; 1350};
1347 1351
1352static const char * const nand_xfer_types[] = {
1353 [NAND_OMAP_PREFETCH_POLLED] = "prefetch-polled",
1354 [NAND_OMAP_POLLED] = "polled",
1355 [NAND_OMAP_PREFETCH_DMA] = "prefetch-dma",
1356 [NAND_OMAP_PREFETCH_IRQ] = "prefetch-irq",
1357};
1358
1348static int gpmc_probe_nand_child(struct platform_device *pdev, 1359static int gpmc_probe_nand_child(struct platform_device *pdev,
1349 struct device_node *child) 1360 struct device_node *child)
1350{ 1361{
@@ -1374,6 +1385,13 @@ static int gpmc_probe_nand_child(struct platform_device *pdev,
1374 break; 1385 break;
1375 } 1386 }
1376 1387
1388 if (!of_property_read_string(child, "ti,nand-xfer-type", &s))
1389 for (val = 0; val < ARRAY_SIZE(nand_xfer_types); val++)
1390 if (!strcasecmp(s, nand_xfer_types[val])) {
1391 gpmc_nand_data->xfer_type = val;
1392 break;
1393 }
1394
1377 val = of_get_nand_bus_width(child); 1395 val = of_get_nand_bus_width(child);
1378 if (val == 16) 1396 if (val == 16)
1379 gpmc_nand_data->devsize = NAND_BUSWIDTH_16; 1397 gpmc_nand_data->devsize = NAND_BUSWIDTH_16;
@@ -1513,6 +1531,20 @@ static int gpmc_probe_dt(struct platform_device *pdev)
1513 if (!of_id) 1531 if (!of_id)
1514 return 0; 1532 return 0;
1515 1533
1534 ret = of_property_read_u32(pdev->dev.of_node, "gpmc,num-cs",
1535 &gpmc_cs_num);
1536 if (ret < 0) {
1537 pr_err("%s: number of chip-selects not defined\n", __func__);
1538 return ret;
1539 } else if (gpmc_cs_num < 1) {
1540 pr_err("%s: all chip-selects are disabled\n", __func__);
1541 return -EINVAL;
1542 } else if (gpmc_cs_num > GPMC_CS_NUM) {
1543 pr_err("%s: number of supported chip-selects cannot be > %d\n",
1544 __func__, GPMC_CS_NUM);
1545 return -EINVAL;
1546 }
1547
1516 ret = of_property_read_u32(pdev->dev.of_node, "gpmc,num-waitpins", 1548 ret = of_property_read_u32(pdev->dev.of_node, "gpmc,num-waitpins",
1517 &gpmc_nr_waitpins); 1549 &gpmc_nr_waitpins);
1518 if (ret < 0) { 1550 if (ret < 0) {
@@ -1577,7 +1609,8 @@ static int gpmc_probe(struct platform_device *pdev)
1577 return PTR_ERR(gpmc_l3_clk); 1609 return PTR_ERR(gpmc_l3_clk);
1578 } 1610 }
1579 1611
1580 clk_prepare_enable(gpmc_l3_clk); 1612 pm_runtime_enable(&pdev->dev);
1613 pm_runtime_get_sync(&pdev->dev);
1581 1614
1582 gpmc_dev = &pdev->dev; 1615 gpmc_dev = &pdev->dev;
1583 1616
@@ -1610,12 +1643,14 @@ static int gpmc_probe(struct platform_device *pdev)
1610 /* Now the GPMC is initialised, unreserve the chip-selects */ 1643 /* Now the GPMC is initialised, unreserve the chip-selects */
1611 gpmc_cs_map = 0; 1644 gpmc_cs_map = 0;
1612 1645
1613 if (!pdev->dev.of_node) 1646 if (!pdev->dev.of_node) {
1647 gpmc_cs_num = GPMC_CS_NUM;
1614 gpmc_nr_waitpins = GPMC_NR_WAITPINS; 1648 gpmc_nr_waitpins = GPMC_NR_WAITPINS;
1649 }
1615 1650
1616 rc = gpmc_probe_dt(pdev); 1651 rc = gpmc_probe_dt(pdev);
1617 if (rc < 0) { 1652 if (rc < 0) {
1618 clk_disable_unprepare(gpmc_l3_clk); 1653 pm_runtime_put_sync(&pdev->dev);
1619 clk_put(gpmc_l3_clk); 1654 clk_put(gpmc_l3_clk);
1620 dev_err(gpmc_dev, "failed to probe DT parameters\n"); 1655 dev_err(gpmc_dev, "failed to probe DT parameters\n");
1621 return rc; 1656 return rc;
@@ -1628,10 +1663,30 @@ static int gpmc_remove(struct platform_device *pdev)
1628{ 1663{
1629 gpmc_free_irq(); 1664 gpmc_free_irq();
1630 gpmc_mem_exit(); 1665 gpmc_mem_exit();
1666 pm_runtime_put_sync(&pdev->dev);
1667 pm_runtime_disable(&pdev->dev);
1631 gpmc_dev = NULL; 1668 gpmc_dev = NULL;
1632 return 0; 1669 return 0;
1633} 1670}
1634 1671
1672#ifdef CONFIG_PM_SLEEP
1673static int gpmc_suspend(struct device *dev)
1674{
1675 omap3_gpmc_save_context();
1676 pm_runtime_put_sync(dev);
1677 return 0;
1678}
1679
1680static int gpmc_resume(struct device *dev)
1681{
1682 pm_runtime_get_sync(dev);
1683 omap3_gpmc_restore_context();
1684 return 0;
1685}
1686#endif
1687
1688static SIMPLE_DEV_PM_OPS(gpmc_pm_ops, gpmc_suspend, gpmc_resume);
1689
1635static struct platform_driver gpmc_driver = { 1690static struct platform_driver gpmc_driver = {
1636 .probe = gpmc_probe, 1691 .probe = gpmc_probe,
1637 .remove = gpmc_remove, 1692 .remove = gpmc_remove,
@@ -1639,6 +1694,7 @@ static struct platform_driver gpmc_driver = {
1639 .name = DEVICE_NAME, 1694 .name = DEVICE_NAME,
1640 .owner = THIS_MODULE, 1695 .owner = THIS_MODULE,
1641 .of_match_table = of_match_ptr(gpmc_dt_ids), 1696 .of_match_table = of_match_ptr(gpmc_dt_ids),
1697 .pm = &gpmc_pm_ops,
1642 }, 1698 },
1643}; 1699};
1644 1700
@@ -1678,7 +1734,7 @@ static int __init omap_gpmc_init(void)
1678 pdev = omap_device_build(DEVICE_NAME, -1, oh, NULL, 0); 1734 pdev = omap_device_build(DEVICE_NAME, -1, oh, NULL, 0);
1679 WARN(IS_ERR(pdev), "could not build omap_device for %s\n", oh_name); 1735 WARN(IS_ERR(pdev), "could not build omap_device for %s\n", oh_name);
1680 1736
1681 return IS_ERR(pdev) ? PTR_ERR(pdev) : 0; 1737 return PTR_RET(pdev);
1682} 1738}
1683omap_postcore_initcall(omap_gpmc_init); 1739omap_postcore_initcall(omap_gpmc_init);
1684 1740
@@ -1701,7 +1757,6 @@ static irqreturn_t gpmc_handle_irq(int irq, void *dev)
1701 return IRQ_HANDLED; 1757 return IRQ_HANDLED;
1702} 1758}
1703 1759
1704#ifdef CONFIG_ARCH_OMAP3
1705static struct omap3_gpmc_regs gpmc_context; 1760static struct omap3_gpmc_regs gpmc_context;
1706 1761
1707void omap3_gpmc_save_context(void) 1762void omap3_gpmc_save_context(void)
@@ -1715,7 +1770,7 @@ void omap3_gpmc_save_context(void)
1715 gpmc_context.prefetch_config1 = gpmc_read_reg(GPMC_PREFETCH_CONFIG1); 1770 gpmc_context.prefetch_config1 = gpmc_read_reg(GPMC_PREFETCH_CONFIG1);
1716 gpmc_context.prefetch_config2 = gpmc_read_reg(GPMC_PREFETCH_CONFIG2); 1771 gpmc_context.prefetch_config2 = gpmc_read_reg(GPMC_PREFETCH_CONFIG2);
1717 gpmc_context.prefetch_control = gpmc_read_reg(GPMC_PREFETCH_CONTROL); 1772 gpmc_context.prefetch_control = gpmc_read_reg(GPMC_PREFETCH_CONTROL);
1718 for (i = 0; i < GPMC_CS_NUM; i++) { 1773 for (i = 0; i < gpmc_cs_num; i++) {
1719 gpmc_context.cs_context[i].is_valid = gpmc_cs_mem_enabled(i); 1774 gpmc_context.cs_context[i].is_valid = gpmc_cs_mem_enabled(i);
1720 if (gpmc_context.cs_context[i].is_valid) { 1775 if (gpmc_context.cs_context[i].is_valid) {
1721 gpmc_context.cs_context[i].config1 = 1776 gpmc_context.cs_context[i].config1 =
@@ -1747,7 +1802,7 @@ void omap3_gpmc_restore_context(void)
1747 gpmc_write_reg(GPMC_PREFETCH_CONFIG1, gpmc_context.prefetch_config1); 1802 gpmc_write_reg(GPMC_PREFETCH_CONFIG1, gpmc_context.prefetch_config1);
1748 gpmc_write_reg(GPMC_PREFETCH_CONFIG2, gpmc_context.prefetch_config2); 1803 gpmc_write_reg(GPMC_PREFETCH_CONFIG2, gpmc_context.prefetch_config2);
1749 gpmc_write_reg(GPMC_PREFETCH_CONTROL, gpmc_context.prefetch_control); 1804 gpmc_write_reg(GPMC_PREFETCH_CONTROL, gpmc_context.prefetch_control);
1750 for (i = 0; i < GPMC_CS_NUM; i++) { 1805 for (i = 0; i < gpmc_cs_num; i++) {
1751 if (gpmc_context.cs_context[i].is_valid) { 1806 if (gpmc_context.cs_context[i].is_valid) {
1752 gpmc_cs_write_reg(i, GPMC_CS_CONFIG1, 1807 gpmc_cs_write_reg(i, GPMC_CS_CONFIG1,
1753 gpmc_context.cs_context[i].config1); 1808 gpmc_context.cs_context[i].config1);
@@ -1766,4 +1821,3 @@ void omap3_gpmc_restore_context(void)
1766 } 1821 }
1767 } 1822 }
1768} 1823}
1769#endif /* CONFIG_ARCH_OMAP3 */
diff --git a/arch/arm/mach-omap2/hsmmc.c b/arch/arm/mach-omap2/hsmmc.c
index 2ef1f8714fcf..07d4c7b35754 100644
--- a/arch/arm/mach-omap2/hsmmc.c
+++ b/arch/arm/mach-omap2/hsmmc.c
@@ -29,7 +29,6 @@
29 29
30static u16 control_pbias_offset; 30static u16 control_pbias_offset;
31static u16 control_devconf1_offset; 31static u16 control_devconf1_offset;
32static u16 control_mmc1;
33 32
34#define HSMMC_NAME_LEN 9 33#define HSMMC_NAME_LEN 9
35 34
@@ -121,57 +120,6 @@ static void omap_hsmmc1_after_set_reg(struct device *dev, int slot,
121 } 120 }
122} 121}
123 122
124static void omap4_hsmmc1_before_set_reg(struct device *dev, int slot,
125 int power_on, int vdd)
126{
127 u32 reg;
128
129 /*
130 * Assume we power both OMAP VMMC1 (for CMD, CLK, DAT0..3) and the
131 * card with Vcc regulator (from twl4030 or whatever). OMAP has both
132 * 1.8V and 3.0V modes, controlled by the PBIAS register.
133 */
134 reg = omap4_ctrl_pad_readl(control_pbias_offset);
135 reg &= ~(OMAP4_MMC1_PBIASLITE_PWRDNZ_MASK |
136 OMAP4_MMC1_PWRDNZ_MASK |
137 OMAP4_MMC1_PBIASLITE_VMODE_MASK);
138 omap4_ctrl_pad_writel(reg, control_pbias_offset);
139}
140
141static void omap4_hsmmc1_after_set_reg(struct device *dev, int slot,
142 int power_on, int vdd)
143{
144 u32 reg;
145 unsigned long timeout;
146
147 if (power_on) {
148 reg = omap4_ctrl_pad_readl(control_pbias_offset);
149 reg |= OMAP4_MMC1_PBIASLITE_PWRDNZ_MASK;
150 if ((1 << vdd) <= MMC_VDD_165_195)
151 reg &= ~OMAP4_MMC1_PBIASLITE_VMODE_MASK;
152 else
153 reg |= OMAP4_MMC1_PBIASLITE_VMODE_MASK;
154 reg |= (OMAP4_MMC1_PBIASLITE_PWRDNZ_MASK |
155 OMAP4_MMC1_PWRDNZ_MASK);
156 omap4_ctrl_pad_writel(reg, control_pbias_offset);
157
158 timeout = jiffies + msecs_to_jiffies(5);
159 do {
160 reg = omap4_ctrl_pad_readl(control_pbias_offset);
161 if (!(reg & OMAP4_MMC1_PBIASLITE_VMODE_ERROR_MASK))
162 break;
163 usleep_range(100, 200);
164 } while (!time_after(jiffies, timeout));
165
166 if (reg & OMAP4_MMC1_PBIASLITE_VMODE_ERROR_MASK) {
167 pr_err("Pbias Voltage is not same as LDO\n");
168 /* Caution : On VMODE_ERROR Power Down MMC IO */
169 reg &= ~(OMAP4_MMC1_PWRDNZ_MASK);
170 omap4_ctrl_pad_writel(reg, control_pbias_offset);
171 }
172 }
173}
174
175static void hsmmc2_select_input_clk_src(struct omap_mmc_platform_data *mmc) 123static void hsmmc2_select_input_clk_src(struct omap_mmc_platform_data *mmc)
176{ 124{
177 u32 reg; 125 u32 reg;
@@ -317,11 +265,7 @@ static int __init omap_hsmmc_pdata_init(struct omap2_hsmmc_info *c,
317 mmc->slots[0].pm_caps = c->pm_caps; 265 mmc->slots[0].pm_caps = c->pm_caps;
318 mmc->slots[0].internal_clock = !c->ext_clock; 266 mmc->slots[0].internal_clock = !c->ext_clock;
319 mmc->max_freq = c->max_freq; 267 mmc->max_freq = c->max_freq;
320 if (cpu_is_omap44xx()) 268 mmc->reg_offset = 0;
321 mmc->reg_offset = OMAP4_MMC_REG_OFFSET;
322 else
323 mmc->reg_offset = 0;
324
325 mmc->get_context_loss_count = hsmmc_get_context_loss; 269 mmc->get_context_loss_count = hsmmc_get_context_loss;
326 270
327 mmc->slots[0].switch_pin = c->gpio_cd; 271 mmc->slots[0].switch_pin = c->gpio_cd;
@@ -368,24 +312,14 @@ static int __init omap_hsmmc_pdata_init(struct omap2_hsmmc_info *c,
368 if (!soc_is_am35xx()) 312 if (!soc_is_am35xx())
369 mmc->slots[0].features |= HSMMC_HAS_PBIAS; 313 mmc->slots[0].features |= HSMMC_HAS_PBIAS;
370 314
371 if (cpu_is_omap44xx() && (omap_rev() > OMAP4430_REV_ES1_0))
372 mmc->slots[0].features |= HSMMC_HAS_UPDATED_RESET;
373
374 switch (c->mmc) { 315 switch (c->mmc) {
375 case 1: 316 case 1:
376 if (mmc->slots[0].features & HSMMC_HAS_PBIAS) { 317 if (mmc->slots[0].features & HSMMC_HAS_PBIAS) {
377 /* on-chip level shifting via PBIAS0/PBIAS1 */ 318 /* on-chip level shifting via PBIAS0/PBIAS1 */
378 if (cpu_is_omap44xx()) { 319 mmc->slots[0].before_set_reg =
379 mmc->slots[0].before_set_reg = 320 omap_hsmmc1_before_set_reg;
380 omap4_hsmmc1_before_set_reg; 321 mmc->slots[0].after_set_reg =
381 mmc->slots[0].after_set_reg = 322 omap_hsmmc1_after_set_reg;
382 omap4_hsmmc1_after_set_reg;
383 } else {
384 mmc->slots[0].before_set_reg =
385 omap_hsmmc1_before_set_reg;
386 mmc->slots[0].after_set_reg =
387 omap_hsmmc1_after_set_reg;
388 }
389 } 323 }
390 324
391 if (soc_is_am35xx()) 325 if (soc_is_am35xx())
@@ -563,34 +497,17 @@ free_mmc:
563 497
564void __init omap_hsmmc_init(struct omap2_hsmmc_info *controllers) 498void __init omap_hsmmc_init(struct omap2_hsmmc_info *controllers)
565{ 499{
566 u32 reg;
567
568 if (omap_hsmmc_done) 500 if (omap_hsmmc_done)
569 return; 501 return;
570 502
571 omap_hsmmc_done = 1; 503 omap_hsmmc_done = 1;
572 504
573 if (!cpu_is_omap44xx()) { 505 if (cpu_is_omap2430()) {
574 if (cpu_is_omap2430()) { 506 control_pbias_offset = OMAP243X_CONTROL_PBIAS_LITE;
575 control_pbias_offset = OMAP243X_CONTROL_PBIAS_LITE; 507 control_devconf1_offset = OMAP243X_CONTROL_DEVCONF1;
576 control_devconf1_offset = OMAP243X_CONTROL_DEVCONF1;
577 } else {
578 control_pbias_offset = OMAP343X_CONTROL_PBIAS_LITE;
579 control_devconf1_offset = OMAP343X_CONTROL_DEVCONF1;
580 }
581 } else { 508 } else {
582 control_pbias_offset = 509 control_pbias_offset = OMAP343X_CONTROL_PBIAS_LITE;
583 OMAP4_CTRL_MODULE_PAD_CORE_CONTROL_PBIASLITE; 510 control_devconf1_offset = OMAP343X_CONTROL_DEVCONF1;
584 control_mmc1 = OMAP4_CTRL_MODULE_PAD_CORE_CONTROL_MMC1;
585 reg = omap4_ctrl_pad_readl(control_mmc1);
586 reg |= (OMAP4_SDMMC1_PUSTRENGTH_GRP0_MASK |
587 OMAP4_SDMMC1_PUSTRENGTH_GRP1_MASK);
588 reg &= ~(OMAP4_SDMMC1_PUSTRENGTH_GRP2_MASK |
589 OMAP4_SDMMC1_PUSTRENGTH_GRP3_MASK);
590 reg |= (OMAP4_SDMMC1_DR0_SPEEDCTRL_MASK |
591 OMAP4_SDMMC1_DR1_SPEEDCTRL_MASK |
592 OMAP4_SDMMC1_DR2_SPEEDCTRL_MASK);
593 omap4_ctrl_pad_writel(reg, control_mmc1);
594 } 511 }
595 512
596 for (; controllers->mmc; controllers++) 513 for (; controllers->mmc; controllers++)
diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c
index 1272c41d4749..2dc62a25f2c3 100644
--- a/arch/arm/mach-omap2/id.c
+++ b/arch/arm/mach-omap2/id.c
@@ -55,7 +55,7 @@ int omap_type(void)
55 55
56 if (cpu_is_omap24xx()) { 56 if (cpu_is_omap24xx()) {
57 val = omap_ctrl_readl(OMAP24XX_CONTROL_STATUS); 57 val = omap_ctrl_readl(OMAP24XX_CONTROL_STATUS);
58 } else if (soc_is_am33xx()) { 58 } else if (soc_is_am33xx() || soc_is_am43xx()) {
59 val = omap_ctrl_readl(AM33XX_CONTROL_STATUS); 59 val = omap_ctrl_readl(AM33XX_CONTROL_STATUS);
60 } else if (cpu_is_omap34xx()) { 60 } else if (cpu_is_omap34xx()) {
61 val = omap_ctrl_readl(OMAP343X_CONTROL_STATUS); 61 val = omap_ctrl_readl(OMAP343X_CONTROL_STATUS);
@@ -209,6 +209,8 @@ static void __init omap3_cpuinfo(void)
209 cpu_name = "TI816X"; 209 cpu_name = "TI816X";
210 } else if (soc_is_am335x()) { 210 } else if (soc_is_am335x()) {
211 cpu_name = "AM335X"; 211 cpu_name = "AM335X";
212 } else if (soc_is_am437x()) {
213 cpu_name = "AM437x";
212 } else if (cpu_is_ti814x()) { 214 } else if (cpu_is_ti814x()) {
213 cpu_name = "TI814X"; 215 cpu_name = "TI814X";
214 } else if (omap3_has_iva() && omap3_has_sgx()) { 216 } else if (omap3_has_iva() && omap3_has_sgx()) {
@@ -302,6 +304,19 @@ void __init ti81xx_check_features(void)
302 omap3_cpuinfo(); 304 omap3_cpuinfo();
303} 305}
304 306
307void __init am33xx_check_features(void)
308{
309 u32 status;
310
311 omap_features = OMAP3_HAS_NEON;
312
313 status = omap_ctrl_readl(AM33XX_DEV_FEATURE);
314 if (status & AM33XX_SGX_MASK)
315 omap_features |= OMAP3_HAS_SGX;
316
317 omap3_cpuinfo();
318}
319
305void __init omap3xxx_check_revision(void) 320void __init omap3xxx_check_revision(void)
306{ 321{
307 const char *cpu_rev; 322 const char *cpu_rev;
@@ -405,11 +420,18 @@ void __init omap3xxx_check_revision(void)
405 cpu_rev = "1.0"; 420 cpu_rev = "1.0";
406 break; 421 break;
407 case 1: 422 case 1:
408 /* FALLTHROUGH */
409 default:
410 omap_revision = TI8168_REV_ES1_1; 423 omap_revision = TI8168_REV_ES1_1;
411 cpu_rev = "1.1"; 424 cpu_rev = "1.1";
412 break; 425 break;
426 case 2:
427 omap_revision = TI8168_REV_ES2_0;
428 cpu_rev = "2.0";
429 break;
430 case 3:
431 /* FALLTHROUGH */
432 default:
433 omap_revision = TI8168_REV_ES2_1;
434 cpu_rev = "2.1";
413 } 435 }
414 break; 436 break;
415 case 0xb944: 437 case 0xb944:
@@ -430,6 +452,10 @@ void __init omap3xxx_check_revision(void)
430 break; 452 break;
431 } 453 }
432 break; 454 break;
455 case 0xb98c:
456 omap_revision = AM437X_REV_ES1_0;
457 cpu_rev = "1.0";
458 break;
433 case 0xb8f2: 459 case 0xb8f2:
434 switch (rev) { 460 switch (rev) {
435 case 0: 461 case 0:
@@ -601,7 +627,7 @@ void __init omap2_set_globals_tap(u32 class, void __iomem *tap)
601 627
602#ifdef CONFIG_SOC_BUS 628#ifdef CONFIG_SOC_BUS
603 629
604static const char const *omap_types[] = { 630static const char * const omap_types[] = {
605 [OMAP2_DEVICE_TYPE_TEST] = "TST", 631 [OMAP2_DEVICE_TYPE_TEST] = "TST",
606 [OMAP2_DEVICE_TYPE_EMU] = "EMU", 632 [OMAP2_DEVICE_TYPE_EMU] = "EMU",
607 [OMAP2_DEVICE_TYPE_SEC] = "HS", 633 [OMAP2_DEVICE_TYPE_SEC] = "HS",
diff --git a/arch/arm/mach-omap2/io.c b/arch/arm/mach-omap2/io.c
index 09abf99e9e57..4a3f06f02859 100644
--- a/arch/arm/mach-omap2/io.c
+++ b/arch/arm/mach-omap2/io.c
@@ -202,7 +202,7 @@ static struct map_desc omapti81xx_io_desc[] __initdata = {
202}; 202};
203#endif 203#endif
204 204
205#ifdef CONFIG_SOC_AM33XX 205#if defined(CONFIG_SOC_AM33XX) || defined(CONFIG_SOC_AM43XX)
206static struct map_desc omapam33xx_io_desc[] __initdata = { 206static struct map_desc omapam33xx_io_desc[] __initdata = {
207 { 207 {
208 .virtual = L4_34XX_VIRT, 208 .virtual = L4_34XX_VIRT,
@@ -318,7 +318,7 @@ void __init ti81xx_map_io(void)
318} 318}
319#endif 319#endif
320 320
321#ifdef CONFIG_SOC_AM33XX 321#if defined(CONFIG_SOC_AM33XX) || defined(CONFIG_SOC_AM43XX)
322void __init am33xx_map_io(void) 322void __init am33xx_map_io(void)
323{ 323{
324 iotable_init(omapam33xx_io_desc, ARRAY_SIZE(omapam33xx_io_desc)); 324 iotable_init(omapam33xx_io_desc, ARRAY_SIZE(omapam33xx_io_desc));
@@ -394,7 +394,7 @@ static void __init omap_hwmod_init_postsetup(void)
394 omap_pm_if_early_init(); 394 omap_pm_if_early_init();
395} 395}
396 396
397static void __init omap_common_late_init(void) 397static void __init __maybe_unused omap_common_late_init(void)
398{ 398{
399 omap_mux_late_init(); 399 omap_mux_late_init();
400 omap2_common_pm_late_init(); 400 omap2_common_pm_late_init();
@@ -576,8 +576,7 @@ void __init am33xx_init_early(void)
576 omap2_set_globals_prm(AM33XX_L4_WK_IO_ADDRESS(AM33XX_PRCM_BASE)); 576 omap2_set_globals_prm(AM33XX_L4_WK_IO_ADDRESS(AM33XX_PRCM_BASE));
577 omap2_set_globals_cm(AM33XX_L4_WK_IO_ADDRESS(AM33XX_PRCM_BASE), NULL); 577 omap2_set_globals_cm(AM33XX_L4_WK_IO_ADDRESS(AM33XX_PRCM_BASE), NULL);
578 omap3xxx_check_revision(); 578 omap3xxx_check_revision();
579 ti81xx_check_features(); 579 am33xx_check_features();
580 am33xx_voltagedomains_init();
581 am33xx_powerdomains_init(); 580 am33xx_powerdomains_init();
582 am33xx_clockdomains_init(); 581 am33xx_clockdomains_init();
583 am33xx_hwmod_init(); 582 am33xx_hwmod_init();
@@ -586,6 +585,19 @@ void __init am33xx_init_early(void)
586} 585}
587#endif 586#endif
588 587
588#ifdef CONFIG_SOC_AM43XX
589void __init am43xx_init_early(void)
590{
591 omap2_set_globals_tap(AM335X_CLASS,
592 AM33XX_L4_WK_IO_ADDRESS(AM33XX_TAP_BASE));
593 omap2_set_globals_control(AM33XX_L4_WK_IO_ADDRESS(AM33XX_CTRL_BASE),
594 NULL);
595 omap2_set_globals_prm(AM33XX_L4_WK_IO_ADDRESS(AM43XX_PRCM_BASE));
596 omap2_set_globals_cm(AM33XX_L4_WK_IO_ADDRESS(AM43XX_PRCM_BASE), NULL);
597 omap3xxx_check_revision();
598}
599#endif
600
589#ifdef CONFIG_ARCH_OMAP4 601#ifdef CONFIG_ARCH_OMAP4
590void __init omap4430_init_early(void) 602void __init omap4430_init_early(void)
591{ 603{
@@ -631,7 +643,13 @@ void __init omap5_init_early(void)
631 omap2_set_globals_prcm_mpu(OMAP2_L4_IO_ADDRESS(OMAP54XX_PRCM_MPU_BASE)); 643 omap2_set_globals_prcm_mpu(OMAP2_L4_IO_ADDRESS(OMAP54XX_PRCM_MPU_BASE));
632 omap_prm_base_init(); 644 omap_prm_base_init();
633 omap_cm_base_init(); 645 omap_cm_base_init();
646 omap44xx_prm_init();
634 omap5xxx_check_revision(); 647 omap5xxx_check_revision();
648 omap54xx_voltagedomains_init();
649 omap54xx_powerdomains_init();
650 omap54xx_clockdomains_init();
651 omap54xx_hwmod_init();
652 omap_hwmod_init_postsetup();
635} 653}
636#endif 654#endif
637 655
diff --git a/arch/arm/mach-omap2/mailbox.c b/arch/arm/mach-omap2/mailbox.c
deleted file mode 100644
index 0b080267b7f6..000000000000
--- a/arch/arm/mach-omap2/mailbox.c
+++ /dev/null
@@ -1,430 +0,0 @@
1/*
2 * Mailbox reservation modules for OMAP2/3
3 *
4 * Copyright (C) 2006-2009 Nokia Corporation
5 * Written by: Hiroshi DOYU <Hiroshi.DOYU@nokia.com>
6 * and Paul Mundt
7 *
8 * This file is subject to the terms and conditions of the GNU General Public
9 * License. See the file "COPYING" in the main directory of this archive
10 * for more details.
11 */
12
13#include <linux/module.h>
14#include <linux/clk.h>
15#include <linux/err.h>
16#include <linux/platform_device.h>
17#include <linux/io.h>
18#include <linux/pm_runtime.h>
19
20#include <plat/mailbox.h>
21
22#include "soc.h"
23
24#define MAILBOX_REVISION 0x000
25#define MAILBOX_MESSAGE(m) (0x040 + 4 * (m))
26#define MAILBOX_FIFOSTATUS(m) (0x080 + 4 * (m))
27#define MAILBOX_MSGSTATUS(m) (0x0c0 + 4 * (m))
28#define MAILBOX_IRQSTATUS(u) (0x100 + 8 * (u))
29#define MAILBOX_IRQENABLE(u) (0x104 + 8 * (u))
30
31#define OMAP4_MAILBOX_IRQSTATUS(u) (0x104 + 0x10 * (u))
32#define OMAP4_MAILBOX_IRQENABLE(u) (0x108 + 0x10 * (u))
33#define OMAP4_MAILBOX_IRQENABLE_CLR(u) (0x10c + 0x10 * (u))
34
35#define MAILBOX_IRQ_NEWMSG(m) (1 << (2 * (m)))
36#define MAILBOX_IRQ_NOTFULL(m) (1 << (2 * (m) + 1))
37
38#define MBOX_REG_SIZE 0x120
39
40#define OMAP4_MBOX_REG_SIZE 0x130
41
42#define MBOX_NR_REGS (MBOX_REG_SIZE / sizeof(u32))
43#define OMAP4_MBOX_NR_REGS (OMAP4_MBOX_REG_SIZE / sizeof(u32))
44
45static void __iomem *mbox_base;
46
47struct omap_mbox2_fifo {
48 unsigned long msg;
49 unsigned long fifo_stat;
50 unsigned long msg_stat;
51};
52
53struct omap_mbox2_priv {
54 struct omap_mbox2_fifo tx_fifo;
55 struct omap_mbox2_fifo rx_fifo;
56 unsigned long irqenable;
57 unsigned long irqstatus;
58 u32 newmsg_bit;
59 u32 notfull_bit;
60 u32 ctx[OMAP4_MBOX_NR_REGS];
61 unsigned long irqdisable;
62};
63
64static void omap2_mbox_enable_irq(struct omap_mbox *mbox,
65 omap_mbox_type_t irq);
66
67static inline unsigned int mbox_read_reg(size_t ofs)
68{
69 return __raw_readl(mbox_base + ofs);
70}
71
72static inline void mbox_write_reg(u32 val, size_t ofs)
73{
74 __raw_writel(val, mbox_base + ofs);
75}
76
77/* Mailbox H/W preparations */
78static int omap2_mbox_startup(struct omap_mbox *mbox)
79{
80 u32 l;
81
82 pm_runtime_enable(mbox->dev->parent);
83 pm_runtime_get_sync(mbox->dev->parent);
84
85 l = mbox_read_reg(MAILBOX_REVISION);
86 pr_debug("omap mailbox rev %d.%d\n", (l & 0xf0) >> 4, (l & 0x0f));
87
88 return 0;
89}
90
91static void omap2_mbox_shutdown(struct omap_mbox *mbox)
92{
93 pm_runtime_put_sync(mbox->dev->parent);
94 pm_runtime_disable(mbox->dev->parent);
95}
96
97/* Mailbox FIFO handle functions */
98static mbox_msg_t omap2_mbox_fifo_read(struct omap_mbox *mbox)
99{
100 struct omap_mbox2_fifo *fifo =
101 &((struct omap_mbox2_priv *)mbox->priv)->rx_fifo;
102 return (mbox_msg_t) mbox_read_reg(fifo->msg);
103}
104
105static void omap2_mbox_fifo_write(struct omap_mbox *mbox, mbox_msg_t msg)
106{
107 struct omap_mbox2_fifo *fifo =
108 &((struct omap_mbox2_priv *)mbox->priv)->tx_fifo;
109 mbox_write_reg(msg, fifo->msg);
110}
111
112static int omap2_mbox_fifo_empty(struct omap_mbox *mbox)
113{
114 struct omap_mbox2_fifo *fifo =
115 &((struct omap_mbox2_priv *)mbox->priv)->rx_fifo;
116 return (mbox_read_reg(fifo->msg_stat) == 0);
117}
118
119static int omap2_mbox_fifo_full(struct omap_mbox *mbox)
120{
121 struct omap_mbox2_fifo *fifo =
122 &((struct omap_mbox2_priv *)mbox->priv)->tx_fifo;
123 return mbox_read_reg(fifo->fifo_stat);
124}
125
126/* Mailbox IRQ handle functions */
127static void omap2_mbox_enable_irq(struct omap_mbox *mbox,
128 omap_mbox_type_t irq)
129{
130 struct omap_mbox2_priv *p = mbox->priv;
131 u32 l, bit = (irq == IRQ_TX) ? p->notfull_bit : p->newmsg_bit;
132
133 l = mbox_read_reg(p->irqenable);
134 l |= bit;
135 mbox_write_reg(l, p->irqenable);
136}
137
138static void omap2_mbox_disable_irq(struct omap_mbox *mbox,
139 omap_mbox_type_t irq)
140{
141 struct omap_mbox2_priv *p = mbox->priv;
142 u32 bit = (irq == IRQ_TX) ? p->notfull_bit : p->newmsg_bit;
143
144 if (!cpu_is_omap44xx())
145 bit = mbox_read_reg(p->irqdisable) & ~bit;
146
147 mbox_write_reg(bit, p->irqdisable);
148}
149
150static void omap2_mbox_ack_irq(struct omap_mbox *mbox,
151 omap_mbox_type_t irq)
152{
153 struct omap_mbox2_priv *p = mbox->priv;
154 u32 bit = (irq == IRQ_TX) ? p->notfull_bit : p->newmsg_bit;
155
156 mbox_write_reg(bit, p->irqstatus);
157
158 /* Flush posted write for irq status to avoid spurious interrupts */
159 mbox_read_reg(p->irqstatus);
160}
161
162static int omap2_mbox_is_irq(struct omap_mbox *mbox,
163 omap_mbox_type_t irq)
164{
165 struct omap_mbox2_priv *p = mbox->priv;
166 u32 bit = (irq == IRQ_TX) ? p->notfull_bit : p->newmsg_bit;
167 u32 enable = mbox_read_reg(p->irqenable);
168 u32 status = mbox_read_reg(p->irqstatus);
169
170 return (int)(enable & status & bit);
171}
172
173static void omap2_mbox_save_ctx(struct omap_mbox *mbox)
174{
175 int i;
176 struct omap_mbox2_priv *p = mbox->priv;
177 int nr_regs;
178 if (cpu_is_omap44xx())
179 nr_regs = OMAP4_MBOX_NR_REGS;
180 else
181 nr_regs = MBOX_NR_REGS;
182 for (i = 0; i < nr_regs; i++) {
183 p->ctx[i] = mbox_read_reg(i * sizeof(u32));
184
185 dev_dbg(mbox->dev, "%s: [%02x] %08x\n", __func__,
186 i, p->ctx[i]);
187 }
188}
189
190static void omap2_mbox_restore_ctx(struct omap_mbox *mbox)
191{
192 int i;
193 struct omap_mbox2_priv *p = mbox->priv;
194 int nr_regs;
195 if (cpu_is_omap44xx())
196 nr_regs = OMAP4_MBOX_NR_REGS;
197 else
198 nr_regs = MBOX_NR_REGS;
199 for (i = 0; i < nr_regs; i++) {
200 mbox_write_reg(p->ctx[i], i * sizeof(u32));
201
202 dev_dbg(mbox->dev, "%s: [%02x] %08x\n", __func__,
203 i, p->ctx[i]);
204 }
205}
206
207static struct omap_mbox_ops omap2_mbox_ops = {
208 .type = OMAP_MBOX_TYPE2,
209 .startup = omap2_mbox_startup,
210 .shutdown = omap2_mbox_shutdown,
211 .fifo_read = omap2_mbox_fifo_read,
212 .fifo_write = omap2_mbox_fifo_write,
213 .fifo_empty = omap2_mbox_fifo_empty,
214 .fifo_full = omap2_mbox_fifo_full,
215 .enable_irq = omap2_mbox_enable_irq,
216 .disable_irq = omap2_mbox_disable_irq,
217 .ack_irq = omap2_mbox_ack_irq,
218 .is_irq = omap2_mbox_is_irq,
219 .save_ctx = omap2_mbox_save_ctx,
220 .restore_ctx = omap2_mbox_restore_ctx,
221};
222
223/*
224 * MAILBOX 0: ARM -> DSP,
225 * MAILBOX 1: ARM <- DSP.
226 * MAILBOX 2: ARM -> IVA,
227 * MAILBOX 3: ARM <- IVA.
228 */
229
230/* FIXME: the following structs should be filled automatically by the user id */
231
232#if defined(CONFIG_ARCH_OMAP3) || defined(CONFIG_ARCH_OMAP2)
233/* DSP */
234static struct omap_mbox2_priv omap2_mbox_dsp_priv = {
235 .tx_fifo = {
236 .msg = MAILBOX_MESSAGE(0),
237 .fifo_stat = MAILBOX_FIFOSTATUS(0),
238 },
239 .rx_fifo = {
240 .msg = MAILBOX_MESSAGE(1),
241 .msg_stat = MAILBOX_MSGSTATUS(1),
242 },
243 .irqenable = MAILBOX_IRQENABLE(0),
244 .irqstatus = MAILBOX_IRQSTATUS(0),
245 .notfull_bit = MAILBOX_IRQ_NOTFULL(0),
246 .newmsg_bit = MAILBOX_IRQ_NEWMSG(1),
247 .irqdisable = MAILBOX_IRQENABLE(0),
248};
249
250struct omap_mbox mbox_dsp_info = {
251 .name = "dsp",
252 .ops = &omap2_mbox_ops,
253 .priv = &omap2_mbox_dsp_priv,
254};
255#endif
256
257#if defined(CONFIG_ARCH_OMAP3)
258struct omap_mbox *omap3_mboxes[] = { &mbox_dsp_info, NULL };
259#endif
260
261#if defined(CONFIG_SOC_OMAP2420)
262/* IVA */
263static struct omap_mbox2_priv omap2_mbox_iva_priv = {
264 .tx_fifo = {
265 .msg = MAILBOX_MESSAGE(2),
266 .fifo_stat = MAILBOX_FIFOSTATUS(2),
267 },
268 .rx_fifo = {
269 .msg = MAILBOX_MESSAGE(3),
270 .msg_stat = MAILBOX_MSGSTATUS(3),
271 },
272 .irqenable = MAILBOX_IRQENABLE(3),
273 .irqstatus = MAILBOX_IRQSTATUS(3),
274 .notfull_bit = MAILBOX_IRQ_NOTFULL(2),
275 .newmsg_bit = MAILBOX_IRQ_NEWMSG(3),
276 .irqdisable = MAILBOX_IRQENABLE(3),
277};
278
279static struct omap_mbox mbox_iva_info = {
280 .name = "iva",
281 .ops = &omap2_mbox_ops,
282 .priv = &omap2_mbox_iva_priv,
283};
284#endif
285
286#ifdef CONFIG_ARCH_OMAP2
287struct omap_mbox *omap2_mboxes[] = {
288 &mbox_dsp_info,
289#ifdef CONFIG_SOC_OMAP2420
290 &mbox_iva_info,
291#endif
292 NULL
293};
294#endif
295
296#if defined(CONFIG_ARCH_OMAP4)
297/* OMAP4 */
298static struct omap_mbox2_priv omap2_mbox_1_priv = {
299 .tx_fifo = {
300 .msg = MAILBOX_MESSAGE(0),
301 .fifo_stat = MAILBOX_FIFOSTATUS(0),
302 },
303 .rx_fifo = {
304 .msg = MAILBOX_MESSAGE(1),
305 .msg_stat = MAILBOX_MSGSTATUS(1),
306 },
307 .irqenable = OMAP4_MAILBOX_IRQENABLE(0),
308 .irqstatus = OMAP4_MAILBOX_IRQSTATUS(0),
309 .notfull_bit = MAILBOX_IRQ_NOTFULL(0),
310 .newmsg_bit = MAILBOX_IRQ_NEWMSG(1),
311 .irqdisable = OMAP4_MAILBOX_IRQENABLE_CLR(0),
312};
313
314struct omap_mbox mbox_1_info = {
315 .name = "mailbox-1",
316 .ops = &omap2_mbox_ops,
317 .priv = &omap2_mbox_1_priv,
318};
319
320static struct omap_mbox2_priv omap2_mbox_2_priv = {
321 .tx_fifo = {
322 .msg = MAILBOX_MESSAGE(3),
323 .fifo_stat = MAILBOX_FIFOSTATUS(3),
324 },
325 .rx_fifo = {
326 .msg = MAILBOX_MESSAGE(2),
327 .msg_stat = MAILBOX_MSGSTATUS(2),
328 },
329 .irqenable = OMAP4_MAILBOX_IRQENABLE(0),
330 .irqstatus = OMAP4_MAILBOX_IRQSTATUS(0),
331 .notfull_bit = MAILBOX_IRQ_NOTFULL(3),
332 .newmsg_bit = MAILBOX_IRQ_NEWMSG(2),
333 .irqdisable = OMAP4_MAILBOX_IRQENABLE_CLR(0),
334};
335
336struct omap_mbox mbox_2_info = {
337 .name = "mailbox-2",
338 .ops = &omap2_mbox_ops,
339 .priv = &omap2_mbox_2_priv,
340};
341
342struct omap_mbox *omap4_mboxes[] = { &mbox_1_info, &mbox_2_info, NULL };
343#endif
344
345static int omap2_mbox_probe(struct platform_device *pdev)
346{
347 struct resource *mem;
348 int ret;
349 struct omap_mbox **list;
350
351 if (false)
352 ;
353#if defined(CONFIG_ARCH_OMAP3)
354 else if (cpu_is_omap34xx()) {
355 list = omap3_mboxes;
356
357 list[0]->irq = platform_get_irq(pdev, 0);
358 }
359#endif
360#if defined(CONFIG_ARCH_OMAP2)
361 else if (cpu_is_omap2430()) {
362 list = omap2_mboxes;
363
364 list[0]->irq = platform_get_irq(pdev, 0);
365 } else if (cpu_is_omap2420()) {
366 list = omap2_mboxes;
367
368 list[0]->irq = platform_get_irq_byname(pdev, "dsp");
369 list[1]->irq = platform_get_irq_byname(pdev, "iva");
370 }
371#endif
372#if defined(CONFIG_ARCH_OMAP4)
373 else if (cpu_is_omap44xx()) {
374 list = omap4_mboxes;
375
376 list[0]->irq = list[1]->irq = platform_get_irq(pdev, 0);
377 }
378#endif
379 else {
380 pr_err("%s: platform not supported\n", __func__);
381 return -ENODEV;
382 }
383
384 mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
385 mbox_base = ioremap(mem->start, resource_size(mem));
386 if (!mbox_base)
387 return -ENOMEM;
388
389 ret = omap_mbox_register(&pdev->dev, list);
390 if (ret) {
391 iounmap(mbox_base);
392 return ret;
393 }
394
395 return 0;
396}
397
398static int omap2_mbox_remove(struct platform_device *pdev)
399{
400 omap_mbox_unregister();
401 iounmap(mbox_base);
402 return 0;
403}
404
405static struct platform_driver omap2_mbox_driver = {
406 .probe = omap2_mbox_probe,
407 .remove = omap2_mbox_remove,
408 .driver = {
409 .name = "omap-mailbox",
410 },
411};
412
413static int __init omap2_mbox_init(void)
414{
415 return platform_driver_register(&omap2_mbox_driver);
416}
417
418static void __exit omap2_mbox_exit(void)
419{
420 platform_driver_unregister(&omap2_mbox_driver);
421}
422
423module_init(omap2_mbox_init);
424module_exit(omap2_mbox_exit);
425
426MODULE_LICENSE("GPL v2");
427MODULE_DESCRIPTION("omap mailbox: omap2/3/4 architecture specific functions");
428MODULE_AUTHOR("Hiroshi DOYU <Hiroshi.DOYU@nokia.com>");
429MODULE_AUTHOR("Paul Mundt");
430MODULE_ALIAS("platform:omap2-mailbox");
diff --git a/arch/arm/mach-omap2/mux.h b/arch/arm/mach-omap2/mux.h
index fdb22f14021f..5d2080ef7923 100644
--- a/arch/arm/mach-omap2/mux.h
+++ b/arch/arm/mach-omap2/mux.h
@@ -10,7 +10,6 @@
10#include "mux2420.h" 10#include "mux2420.h"
11#include "mux2430.h" 11#include "mux2430.h"
12#include "mux34xx.h" 12#include "mux34xx.h"
13#include "mux44xx.h"
14 13
15#define OMAP_MUX_TERMINATOR 0xffff 14#define OMAP_MUX_TERMINATOR 0xffff
16 15
@@ -64,8 +63,6 @@
64 63
65/* Flags for omapX_mux_init */ 64/* Flags for omapX_mux_init */
66#define OMAP_PACKAGE_MASK 0xffff 65#define OMAP_PACKAGE_MASK 0xffff
67#define OMAP_PACKAGE_CBS 8 /* 547-pin 0.40 0.40 */
68#define OMAP_PACKAGE_CBL 7 /* 547-pin 0.40 0.40 */
69#define OMAP_PACKAGE_CBP 6 /* 515-pin 0.40 0.50 */ 66#define OMAP_PACKAGE_CBP 6 /* 515-pin 0.40 0.50 */
70#define OMAP_PACKAGE_CUS 5 /* 423-pin 0.65 */ 67#define OMAP_PACKAGE_CUS 5 /* 423-pin 0.65 */
71#define OMAP_PACKAGE_CBB 4 /* 515-pin 0.40 0.50 */ 68#define OMAP_PACKAGE_CBB 4 /* 515-pin 0.40 0.50 */
diff --git a/arch/arm/mach-omap2/mux44xx.c b/arch/arm/mach-omap2/mux44xx.c
deleted file mode 100644
index f5a74daab2ff..000000000000
--- a/arch/arm/mach-omap2/mux44xx.c
+++ /dev/null
@@ -1,1356 +0,0 @@
1/*
2 * OMAP44xx ES1.0 pin mux definition
3 *
4 * Copyright (C) 2010 Texas Instruments, Inc.
5 *
6 * Benoit Cousson (b-cousson@ti.com)
7 *
8 * - Based on mux34xx.c done by Tony Lindgren <tony@atomide.com>
9 *
10 * This file is automatically generated from the OMAP hardware databases.
11 * We respectfully ask that any modifications to this file be coordinated
12 * with the public linux-omap@vger.kernel.org mailing list and the
13 * authors above to ensure that the autogeneration scripts are kept
14 * up-to-date with the file contents.
15 *
16 * This program is free software; you can redistribute it and/or modify
17 * it under the terms of the GNU General Public License version 2 as
18 * published by the Free Software Foundation.
19 */
20#include <linux/module.h>
21#include <linux/init.h>
22
23#include "mux.h"
24
25#ifdef CONFIG_OMAP_MUX
26
27#define _OMAP4_MUXENTRY(M0, g, m0, m1, m2, m3, m4, m5, m6, m7) \
28{ \
29 .reg_offset = (OMAP4_CTRL_MODULE_PAD_##M0##_OFFSET), \
30 .gpio = (g), \
31 .muxnames = { m0, m1, m2, m3, m4, m5, m6, m7 }, \
32}
33
34#else
35
36#define _OMAP4_MUXENTRY(M0, g, m0, m1, m2, m3, m4, m5, m6, m7) \
37{ \
38 .reg_offset = (OMAP4_CTRL_MODULE_PAD_##M0##_OFFSET), \
39 .gpio = (g), \
40}
41
42#endif
43
44#define _OMAP4_BALLENTRY(M0, bb, bt) \
45{ \
46 .reg_offset = (OMAP4_CTRL_MODULE_PAD_##M0##_OFFSET), \
47 .balls = { bb, bt }, \
48}
49
50/*
51 * Superset of all mux modes for omap4 ES1.0
52 */
53static struct omap_mux __initdata omap4_core_muxmodes[] = {
54 _OMAP4_MUXENTRY(GPMC_AD0, 0, "gpmc_ad0", "sdmmc2_dat0", NULL, NULL,
55 NULL, NULL, NULL, NULL),
56 _OMAP4_MUXENTRY(GPMC_AD1, 0, "gpmc_ad1", "sdmmc2_dat1", NULL, NULL,
57 NULL, NULL, NULL, NULL),
58 _OMAP4_MUXENTRY(GPMC_AD2, 0, "gpmc_ad2", "sdmmc2_dat2", NULL, NULL,
59 NULL, NULL, NULL, NULL),
60 _OMAP4_MUXENTRY(GPMC_AD3, 0, "gpmc_ad3", "sdmmc2_dat3", NULL, NULL,
61 NULL, NULL, NULL, NULL),
62 _OMAP4_MUXENTRY(GPMC_AD4, 0, "gpmc_ad4", "sdmmc2_dat4",
63 "sdmmc2_dir_dat0", NULL, NULL, NULL, NULL, NULL),
64 _OMAP4_MUXENTRY(GPMC_AD5, 0, "gpmc_ad5", "sdmmc2_dat5",
65 "sdmmc2_dir_dat1", NULL, NULL, NULL, NULL, NULL),
66 _OMAP4_MUXENTRY(GPMC_AD6, 0, "gpmc_ad6", "sdmmc2_dat6",
67 "sdmmc2_dir_cmd", NULL, NULL, NULL, NULL, NULL),
68 _OMAP4_MUXENTRY(GPMC_AD7, 0, "gpmc_ad7", "sdmmc2_dat7",
69 "sdmmc2_clk_fdbk", NULL, NULL, NULL, NULL, NULL),
70 _OMAP4_MUXENTRY(GPMC_AD8, 32, "gpmc_ad8", "kpd_row0", "c2c_data15",
71 "gpio_32", NULL, NULL, NULL, NULL),
72 _OMAP4_MUXENTRY(GPMC_AD9, 33, "gpmc_ad9", "kpd_row1", "c2c_data14",
73 "gpio_33", NULL, NULL, NULL, NULL),
74 _OMAP4_MUXENTRY(GPMC_AD10, 34, "gpmc_ad10", "kpd_row2", "c2c_data13",
75 "gpio_34", NULL, NULL, NULL, NULL),
76 _OMAP4_MUXENTRY(GPMC_AD11, 35, "gpmc_ad11", "kpd_row3", "c2c_data12",
77 "gpio_35", NULL, NULL, NULL, NULL),
78 _OMAP4_MUXENTRY(GPMC_AD12, 36, "gpmc_ad12", "kpd_col0", "c2c_data11",
79 "gpio_36", NULL, NULL, NULL, NULL),
80 _OMAP4_MUXENTRY(GPMC_AD13, 37, "gpmc_ad13", "kpd_col1", "c2c_data10",
81 "gpio_37", NULL, NULL, NULL, NULL),
82 _OMAP4_MUXENTRY(GPMC_AD14, 38, "gpmc_ad14", "kpd_col2", "c2c_data9",
83 "gpio_38", NULL, NULL, NULL, NULL),
84 _OMAP4_MUXENTRY(GPMC_AD15, 39, "gpmc_ad15", "kpd_col3", "c2c_data8",
85 "gpio_39", NULL, NULL, NULL, NULL),
86 _OMAP4_MUXENTRY(GPMC_A16, 40, "gpmc_a16", "kpd_row4", "c2c_datain0",
87 "gpio_40", "venc_656_data0", NULL, NULL, NULL),
88 _OMAP4_MUXENTRY(GPMC_A17, 41, "gpmc_a17", "kpd_row5", "c2c_datain1",
89 "gpio_41", "venc_656_data1", NULL, NULL, "safe_mode"),
90 _OMAP4_MUXENTRY(GPMC_A18, 42, "gpmc_a18", "kpd_row6", "c2c_datain2",
91 "gpio_42", "venc_656_data2", NULL, NULL, "safe_mode"),
92 _OMAP4_MUXENTRY(GPMC_A19, 43, "gpmc_a19", "kpd_row7", "c2c_datain3",
93 "gpio_43", "venc_656_data3", NULL, NULL, "safe_mode"),
94 _OMAP4_MUXENTRY(GPMC_A20, 44, "gpmc_a20", "kpd_col4", "c2c_datain4",
95 "gpio_44", "venc_656_data4", NULL, NULL, "safe_mode"),
96 _OMAP4_MUXENTRY(GPMC_A21, 45, "gpmc_a21", "kpd_col5", "c2c_datain5",
97 "gpio_45", "venc_656_data5", NULL, NULL, "safe_mode"),
98 _OMAP4_MUXENTRY(GPMC_A22, 46, "gpmc_a22", "kpd_col6", "c2c_datain6",
99 "gpio_46", "venc_656_data6", NULL, NULL, "safe_mode"),
100 _OMAP4_MUXENTRY(GPMC_A23, 47, "gpmc_a23", "kpd_col7", "c2c_datain7",
101 "gpio_47", "venc_656_data7", NULL, NULL, "safe_mode"),
102 _OMAP4_MUXENTRY(GPMC_A24, 48, "gpmc_a24", NULL, "c2c_clkout0",
103 "gpio_48", NULL, NULL, NULL, "safe_mode"),
104 _OMAP4_MUXENTRY(GPMC_A25, 49, "gpmc_a25", NULL, "c2c_clkout1",
105 "gpio_49", NULL, NULL, NULL, "safe_mode"),
106 _OMAP4_MUXENTRY(GPMC_NCS0, 50, "gpmc_ncs0", NULL, NULL, "gpio_50",
107 "sys_ndmareq0", NULL, NULL, NULL),
108 _OMAP4_MUXENTRY(GPMC_NCS1, 51, "gpmc_ncs1", NULL, "c2c_dataout6",
109 "gpio_51", NULL, NULL, NULL, "safe_mode"),
110 _OMAP4_MUXENTRY(GPMC_NCS2, 52, "gpmc_ncs2", NULL, "c2c_dataout7",
111 "gpio_52", NULL, NULL, NULL, "safe_mode"),
112 _OMAP4_MUXENTRY(GPMC_NCS3, 53, "gpmc_ncs3", "gpmc_dir",
113 "c2c_dataout4", "gpio_53", NULL, NULL, NULL,
114 "safe_mode"),
115 _OMAP4_MUXENTRY(GPMC_NWP, 54, "gpmc_nwp", "dsi1_te0", NULL, "gpio_54",
116 "sys_ndmareq1", NULL, NULL, NULL),
117 _OMAP4_MUXENTRY(GPMC_CLK, 55, "gpmc_clk", NULL, NULL, "gpio_55",
118 "sys_ndmareq2", NULL, NULL, NULL),
119 _OMAP4_MUXENTRY(GPMC_NADV_ALE, 56, "gpmc_nadv_ale", "dsi1_te1", NULL,
120 "gpio_56", "sys_ndmareq3", NULL, NULL, NULL),
121 _OMAP4_MUXENTRY(GPMC_NOE, 0, "gpmc_noe", "sdmmc2_clk", NULL, NULL,
122 NULL, NULL, NULL, NULL),
123 _OMAP4_MUXENTRY(GPMC_NWE, 0, "gpmc_nwe", "sdmmc2_cmd", NULL, NULL,
124 NULL, NULL, NULL, NULL),
125 _OMAP4_MUXENTRY(GPMC_NBE0_CLE, 59, "gpmc_nbe0_cle", "dsi2_te0", NULL,
126 "gpio_59", NULL, NULL, NULL, NULL),
127 _OMAP4_MUXENTRY(GPMC_NBE1, 60, "gpmc_nbe1", NULL, "c2c_dataout5",
128 "gpio_60", NULL, NULL, NULL, "safe_mode"),
129 _OMAP4_MUXENTRY(GPMC_WAIT0, 61, "gpmc_wait0", "dsi2_te1", NULL,
130 "gpio_61", NULL, NULL, NULL, NULL),
131 _OMAP4_MUXENTRY(GPMC_WAIT1, 62, "gpmc_wait1", NULL, "c2c_dataout2",
132 "gpio_62", NULL, NULL, NULL, "safe_mode"),
133 _OMAP4_MUXENTRY(C2C_DATA11, 100, "c2c_data11", "usbc1_icusb_txen",
134 "c2c_dataout3", "gpio_100", "sys_ndmareq0", NULL,
135 NULL, "safe_mode"),
136 _OMAP4_MUXENTRY(C2C_DATA12, 101, "c2c_data12", "dsi1_te0",
137 "c2c_clkin0", "gpio_101", "sys_ndmareq1", NULL, NULL,
138 "safe_mode"),
139 _OMAP4_MUXENTRY(C2C_DATA13, 102, "c2c_data13", "dsi1_te1",
140 "c2c_clkin1", "gpio_102", "sys_ndmareq2", NULL, NULL,
141 "safe_mode"),
142 _OMAP4_MUXENTRY(C2C_DATA14, 103, "c2c_data14", "dsi2_te0",
143 "c2c_dataout0", "gpio_103", "sys_ndmareq3", NULL,
144 NULL, "safe_mode"),
145 _OMAP4_MUXENTRY(C2C_DATA15, 104, "c2c_data15", "dsi2_te1",
146 "c2c_dataout1", "gpio_104", NULL, NULL, NULL,
147 "safe_mode"),
148 _OMAP4_MUXENTRY(HDMI_HPD, 63, "hdmi_hpd", NULL, NULL, "gpio_63", NULL,
149 NULL, NULL, "safe_mode"),
150 _OMAP4_MUXENTRY(HDMI_CEC, 64, "hdmi_cec", NULL, NULL, "gpio_64", NULL,
151 NULL, NULL, "safe_mode"),
152 _OMAP4_MUXENTRY(HDMI_DDC_SCL, 65, "hdmi_ddc_scl", NULL, NULL,
153 "gpio_65", NULL, NULL, NULL, "safe_mode"),
154 _OMAP4_MUXENTRY(HDMI_DDC_SDA, 66, "hdmi_ddc_sda", NULL, NULL,
155 "gpio_66", NULL, NULL, NULL, "safe_mode"),
156 _OMAP4_MUXENTRY(CSI21_DX0, 0, "csi21_dx0", NULL, NULL, "gpi_67", NULL,
157 NULL, NULL, "safe_mode"),
158 _OMAP4_MUXENTRY(CSI21_DY0, 0, "csi21_dy0", NULL, NULL, "gpi_68", NULL,
159 NULL, NULL, "safe_mode"),
160 _OMAP4_MUXENTRY(CSI21_DX1, 0, "csi21_dx1", NULL, NULL, "gpi_69", NULL,
161 NULL, NULL, "safe_mode"),
162 _OMAP4_MUXENTRY(CSI21_DY1, 0, "csi21_dy1", NULL, NULL, "gpi_70", NULL,
163 NULL, NULL, "safe_mode"),
164 _OMAP4_MUXENTRY(CSI21_DX2, 0, "csi21_dx2", NULL, NULL, "gpi_71", NULL,
165 NULL, NULL, "safe_mode"),
166 _OMAP4_MUXENTRY(CSI21_DY2, 0, "csi21_dy2", NULL, NULL, "gpi_72", NULL,
167 NULL, NULL, "safe_mode"),
168 _OMAP4_MUXENTRY(CSI21_DX3, 0, "csi21_dx3", NULL, NULL, "gpi_73", NULL,
169 NULL, NULL, "safe_mode"),
170 _OMAP4_MUXENTRY(CSI21_DY3, 0, "csi21_dy3", NULL, NULL, "gpi_74", NULL,
171 NULL, NULL, "safe_mode"),
172 _OMAP4_MUXENTRY(CSI21_DX4, 0, "csi21_dx4", NULL, NULL, "gpi_75", NULL,
173 NULL, NULL, "safe_mode"),
174 _OMAP4_MUXENTRY(CSI21_DY4, 0, "csi21_dy4", NULL, NULL, "gpi_76", NULL,
175 NULL, NULL, "safe_mode"),
176 _OMAP4_MUXENTRY(CSI22_DX0, 0, "csi22_dx0", NULL, NULL, "gpi_77", NULL,
177 NULL, NULL, "safe_mode"),
178 _OMAP4_MUXENTRY(CSI22_DY0, 0, "csi22_dy0", NULL, NULL, "gpi_78", NULL,
179 NULL, NULL, "safe_mode"),
180 _OMAP4_MUXENTRY(CSI22_DX1, 0, "csi22_dx1", NULL, NULL, "gpi_79", NULL,
181 NULL, NULL, "safe_mode"),
182 _OMAP4_MUXENTRY(CSI22_DY1, 0, "csi22_dy1", NULL, NULL, "gpi_80", NULL,
183 NULL, NULL, "safe_mode"),
184 _OMAP4_MUXENTRY(CAM_SHUTTER, 81, "cam_shutter", NULL, NULL, "gpio_81",
185 NULL, NULL, NULL, "safe_mode"),
186 _OMAP4_MUXENTRY(CAM_STROBE, 82, "cam_strobe", NULL, NULL, "gpio_82",
187 NULL, NULL, NULL, "safe_mode"),
188 _OMAP4_MUXENTRY(CAM_GLOBALRESET, 83, "cam_globalreset", NULL, NULL,
189 "gpio_83", NULL, NULL, NULL, "safe_mode"),
190 _OMAP4_MUXENTRY(USBB1_ULPITLL_CLK, 84, "usbb1_ulpitll_clk",
191 "hsi1_cawake", NULL, "gpio_84", "usbb1_ulpiphy_clk",
192 NULL, "hw_dbg20", "safe_mode"),
193 _OMAP4_MUXENTRY(USBB1_ULPITLL_STP, 85, "usbb1_ulpitll_stp",
194 "hsi1_cadata", "mcbsp4_clkr", "gpio_85",
195 "usbb1_ulpiphy_stp", "usbb1_mm_rxdp", "hw_dbg21",
196 "safe_mode"),
197 _OMAP4_MUXENTRY(USBB1_ULPITLL_DIR, 86, "usbb1_ulpitll_dir",
198 "hsi1_caflag", "mcbsp4_fsr", "gpio_86",
199 "usbb1_ulpiphy_dir", NULL, "hw_dbg22", "safe_mode"),
200 _OMAP4_MUXENTRY(USBB1_ULPITLL_NXT, 87, "usbb1_ulpitll_nxt",
201 "hsi1_acready", "mcbsp4_fsx", "gpio_87",
202 "usbb1_ulpiphy_nxt", "usbb1_mm_rxdm", "hw_dbg23",
203 "safe_mode"),
204 _OMAP4_MUXENTRY(USBB1_ULPITLL_DAT0, 88, "usbb1_ulpitll_dat0",
205 "hsi1_acwake", "mcbsp4_clkx", "gpio_88",
206 "usbb1_ulpiphy_dat0", "usbb1_mm_rxrcv", "hw_dbg24",
207 "safe_mode"),
208 _OMAP4_MUXENTRY(USBB1_ULPITLL_DAT1, 89, "usbb1_ulpitll_dat1",
209 "hsi1_acdata", "mcbsp4_dx", "gpio_89",
210 "usbb1_ulpiphy_dat1", "usbb1_mm_txse0", "hw_dbg25",
211 "safe_mode"),
212 _OMAP4_MUXENTRY(USBB1_ULPITLL_DAT2, 90, "usbb1_ulpitll_dat2",
213 "hsi1_acflag", "mcbsp4_dr", "gpio_90",
214 "usbb1_ulpiphy_dat2", "usbb1_mm_txdat", "hw_dbg26",
215 "safe_mode"),
216 _OMAP4_MUXENTRY(USBB1_ULPITLL_DAT3, 91, "usbb1_ulpitll_dat3",
217 "hsi1_caready", NULL, "gpio_91", "usbb1_ulpiphy_dat3",
218 "usbb1_mm_txen", "hw_dbg27", "safe_mode"),
219 _OMAP4_MUXENTRY(USBB1_ULPITLL_DAT4, 92, "usbb1_ulpitll_dat4",
220 "dmtimer8_pwm_evt", "abe_mcbsp3_dr", "gpio_92",
221 "usbb1_ulpiphy_dat4", NULL, "hw_dbg28", "safe_mode"),
222 _OMAP4_MUXENTRY(USBB1_ULPITLL_DAT5, 93, "usbb1_ulpitll_dat5",
223 "dmtimer9_pwm_evt", "abe_mcbsp3_dx", "gpio_93",
224 "usbb1_ulpiphy_dat5", NULL, "hw_dbg29", "safe_mode"),
225 _OMAP4_MUXENTRY(USBB1_ULPITLL_DAT6, 94, "usbb1_ulpitll_dat6",
226 "dmtimer10_pwm_evt", "abe_mcbsp3_clkx", "gpio_94",
227 "usbb1_ulpiphy_dat6", "abe_dmic_din3", "hw_dbg30",
228 "safe_mode"),
229 _OMAP4_MUXENTRY(USBB1_ULPITLL_DAT7, 95, "usbb1_ulpitll_dat7",
230 "dmtimer11_pwm_evt", "abe_mcbsp3_fsx", "gpio_95",
231 "usbb1_ulpiphy_dat7", "abe_dmic_clk3", "hw_dbg31",
232 "safe_mode"),
233 _OMAP4_MUXENTRY(USBB1_HSIC_DATA, 96, "usbb1_hsic_data", NULL, NULL,
234 "gpio_96", NULL, NULL, NULL, "safe_mode"),
235 _OMAP4_MUXENTRY(USBB1_HSIC_STROBE, 97, "usbb1_hsic_strobe", NULL,
236 NULL, "gpio_97", NULL, NULL, NULL, "safe_mode"),
237 _OMAP4_MUXENTRY(USBC1_ICUSB_DP, 98, "usbc1_icusb_dp", NULL, NULL,
238 "gpio_98", NULL, NULL, NULL, "safe_mode"),
239 _OMAP4_MUXENTRY(USBC1_ICUSB_DM, 99, "usbc1_icusb_dm", NULL, NULL,
240 "gpio_99", NULL, NULL, NULL, "safe_mode"),
241 _OMAP4_MUXENTRY(SDMMC1_CLK, 100, "sdmmc1_clk", NULL, "dpm_emu19",
242 "gpio_100", NULL, NULL, NULL, "safe_mode"),
243 _OMAP4_MUXENTRY(SDMMC1_CMD, 101, "sdmmc1_cmd", NULL, "uart1_rx",
244 "gpio_101", NULL, NULL, NULL, "safe_mode"),
245 _OMAP4_MUXENTRY(SDMMC1_DAT0, 102, "sdmmc1_dat0", NULL, "dpm_emu18",
246 "gpio_102", NULL, NULL, NULL, "safe_mode"),
247 _OMAP4_MUXENTRY(SDMMC1_DAT1, 103, "sdmmc1_dat1", NULL, "dpm_emu17",
248 "gpio_103", NULL, NULL, NULL, "safe_mode"),
249 _OMAP4_MUXENTRY(SDMMC1_DAT2, 104, "sdmmc1_dat2", NULL, "dpm_emu16",
250 "gpio_104", "jtag_tms_tmsc", NULL, NULL, "safe_mode"),
251 _OMAP4_MUXENTRY(SDMMC1_DAT3, 105, "sdmmc1_dat3", NULL, "dpm_emu15",
252 "gpio_105", "jtag_tck", NULL, NULL, "safe_mode"),
253 _OMAP4_MUXENTRY(SDMMC1_DAT4, 106, "sdmmc1_dat4", NULL, NULL,
254 "gpio_106", NULL, NULL, NULL, "safe_mode"),
255 _OMAP4_MUXENTRY(SDMMC1_DAT5, 107, "sdmmc1_dat5", NULL, NULL,
256 "gpio_107", NULL, NULL, NULL, "safe_mode"),
257 _OMAP4_MUXENTRY(SDMMC1_DAT6, 108, "sdmmc1_dat6", NULL, NULL,
258 "gpio_108", NULL, NULL, NULL, "safe_mode"),
259 _OMAP4_MUXENTRY(SDMMC1_DAT7, 109, "sdmmc1_dat7", NULL, NULL,
260 "gpio_109", NULL, NULL, NULL, "safe_mode"),
261 _OMAP4_MUXENTRY(ABE_MCBSP2_CLKX, 110, "abe_mcbsp2_clkx", "mcspi2_clk",
262 "abe_mcasp_ahclkx", "gpio_110", "usbb2_mm_rxdm",
263 NULL, NULL, "safe_mode"),
264 _OMAP4_MUXENTRY(ABE_MCBSP2_DR, 111, "abe_mcbsp2_dr", "mcspi2_somi",
265 "abe_mcasp_axr", "gpio_111", "usbb2_mm_rxdp", NULL,
266 NULL, "safe_mode"),
267 _OMAP4_MUXENTRY(ABE_MCBSP2_DX, 112, "abe_mcbsp2_dx", "mcspi2_simo",
268 "abe_mcasp_amute", "gpio_112", "usbb2_mm_rxrcv", NULL,
269 NULL, "safe_mode"),
270 _OMAP4_MUXENTRY(ABE_MCBSP2_FSX, 113, "abe_mcbsp2_fsx", "mcspi2_cs0",
271 "abe_mcasp_afsx", "gpio_113", "usbb2_mm_txen", NULL,
272 NULL, "safe_mode"),
273 _OMAP4_MUXENTRY(ABE_MCBSP1_CLKX, 114, "abe_mcbsp1_clkx",
274 "abe_slimbus1_clock", NULL, "gpio_114", NULL, NULL,
275 NULL, "safe_mode"),
276 _OMAP4_MUXENTRY(ABE_MCBSP1_DR, 115, "abe_mcbsp1_dr",
277 "abe_slimbus1_data", NULL, "gpio_115", NULL, NULL,
278 NULL, "safe_mode"),
279 _OMAP4_MUXENTRY(ABE_MCBSP1_DX, 116, "abe_mcbsp1_dx", "sdmmc3_dat2",
280 "abe_mcasp_aclkx", "gpio_116", NULL, NULL, NULL,
281 "safe_mode"),
282 _OMAP4_MUXENTRY(ABE_MCBSP1_FSX, 117, "abe_mcbsp1_fsx", "sdmmc3_dat3",
283 "abe_mcasp_amutein", "gpio_117", NULL, NULL, NULL,
284 "safe_mode"),
285 _OMAP4_MUXENTRY(ABE_PDM_UL_DATA, 0, "abe_pdm_ul_data",
286 "abe_mcbsp3_dr", NULL, NULL, NULL, NULL, NULL,
287 "safe_mode"),
288 _OMAP4_MUXENTRY(ABE_PDM_DL_DATA, 0, "abe_pdm_dl_data",
289 "abe_mcbsp3_dx", NULL, NULL, NULL, NULL, NULL,
290 "safe_mode"),
291 _OMAP4_MUXENTRY(ABE_PDM_FRAME, 0, "abe_pdm_frame", "abe_mcbsp3_clkx",
292 NULL, NULL, NULL, NULL, NULL, "safe_mode"),
293 _OMAP4_MUXENTRY(ABE_PDM_LB_CLK, 0, "abe_pdm_lb_clk", "abe_mcbsp3_fsx",
294 NULL, NULL, NULL, NULL, NULL, "safe_mode"),
295 _OMAP4_MUXENTRY(ABE_CLKS, 118, "abe_clks", NULL, NULL, "gpio_118",
296 NULL, NULL, NULL, "safe_mode"),
297 _OMAP4_MUXENTRY(ABE_DMIC_CLK1, 119, "abe_dmic_clk1", NULL, NULL,
298 "gpio_119", "usbb2_mm_txse0", NULL, NULL,
299 "safe_mode"),
300 _OMAP4_MUXENTRY(ABE_DMIC_DIN1, 120, "abe_dmic_din1", NULL, NULL,
301 "gpio_120", "usbb2_mm_txdat", NULL, NULL,
302 "safe_mode"),
303 _OMAP4_MUXENTRY(ABE_DMIC_DIN2, 121, "abe_dmic_din2", "slimbus2_clock",
304 NULL, "gpio_121", NULL, NULL, NULL, "safe_mode"),
305 _OMAP4_MUXENTRY(ABE_DMIC_DIN3, 122, "abe_dmic_din3", "slimbus2_data",
306 "abe_dmic_clk2", "gpio_122", NULL, NULL, NULL,
307 "safe_mode"),
308 _OMAP4_MUXENTRY(UART2_CTS, 123, "uart2_cts", "sdmmc3_clk", NULL,
309 "gpio_123", NULL, NULL, NULL, "safe_mode"),
310 _OMAP4_MUXENTRY(UART2_RTS, 124, "uart2_rts", "sdmmc3_cmd", NULL,
311 "gpio_124", NULL, NULL, NULL, "safe_mode"),
312 _OMAP4_MUXENTRY(UART2_RX, 125, "uart2_rx", "sdmmc3_dat0", NULL,
313 "gpio_125", NULL, NULL, NULL, "safe_mode"),
314 _OMAP4_MUXENTRY(UART2_TX, 126, "uart2_tx", "sdmmc3_dat1", NULL,
315 "gpio_126", NULL, NULL, NULL, "safe_mode"),
316 _OMAP4_MUXENTRY(HDQ_SIO, 127, "hdq_sio", "i2c3_sccb", "i2c2_sccb",
317 "gpio_127", NULL, NULL, NULL, "safe_mode"),
318 _OMAP4_MUXENTRY(I2C1_SCL, 0, "i2c1_scl", NULL, NULL, NULL, NULL, NULL,
319 NULL, NULL),
320 _OMAP4_MUXENTRY(I2C1_SDA, 0, "i2c1_sda", NULL, NULL, NULL, NULL, NULL,
321 NULL, NULL),
322 _OMAP4_MUXENTRY(I2C2_SCL, 128, "i2c2_scl", "uart1_rx", NULL,
323 "gpio_128", NULL, NULL, NULL, "safe_mode"),
324 _OMAP4_MUXENTRY(I2C2_SDA, 129, "i2c2_sda", "uart1_tx", NULL,
325 "gpio_129", NULL, NULL, NULL, "safe_mode"),
326 _OMAP4_MUXENTRY(I2C3_SCL, 130, "i2c3_scl", NULL, NULL, "gpio_130",
327 NULL, NULL, NULL, "safe_mode"),
328 _OMAP4_MUXENTRY(I2C3_SDA, 131, "i2c3_sda", NULL, NULL, "gpio_131",
329 NULL, NULL, NULL, "safe_mode"),
330 _OMAP4_MUXENTRY(I2C4_SCL, 132, "i2c4_scl", NULL, NULL, "gpio_132",
331 NULL, NULL, NULL, "safe_mode"),
332 _OMAP4_MUXENTRY(I2C4_SDA, 133, "i2c4_sda", NULL, NULL, "gpio_133",
333 NULL, NULL, NULL, "safe_mode"),
334 _OMAP4_MUXENTRY(MCSPI1_CLK, 134, "mcspi1_clk", NULL, NULL, "gpio_134",
335 NULL, NULL, NULL, "safe_mode"),
336 _OMAP4_MUXENTRY(MCSPI1_SOMI, 135, "mcspi1_somi", NULL, NULL,
337 "gpio_135", NULL, NULL, NULL, "safe_mode"),
338 _OMAP4_MUXENTRY(MCSPI1_SIMO, 136, "mcspi1_simo", NULL, NULL,
339 "gpio_136", NULL, NULL, NULL, "safe_mode"),
340 _OMAP4_MUXENTRY(MCSPI1_CS0, 137, "mcspi1_cs0", NULL, NULL, "gpio_137",
341 NULL, NULL, NULL, "safe_mode"),
342 _OMAP4_MUXENTRY(MCSPI1_CS1, 138, "mcspi1_cs1", "uart1_rx", NULL,
343 "gpio_138", NULL, NULL, NULL, "safe_mode"),
344 _OMAP4_MUXENTRY(MCSPI1_CS2, 139, "mcspi1_cs2", "uart1_cts",
345 "slimbus2_clock", "gpio_139", NULL, NULL, NULL,
346 "safe_mode"),
347 _OMAP4_MUXENTRY(MCSPI1_CS3, 140, "mcspi1_cs3", "uart1_rts",
348 "slimbus2_data", "gpio_140", NULL, NULL, NULL,
349 "safe_mode"),
350 _OMAP4_MUXENTRY(UART3_CTS_RCTX, 141, "uart3_cts_rctx", "uart1_tx",
351 NULL, "gpio_141", NULL, NULL, NULL, "safe_mode"),
352 _OMAP4_MUXENTRY(UART3_RTS_SD, 142, "uart3_rts_sd", NULL, NULL,
353 "gpio_142", NULL, NULL, NULL, "safe_mode"),
354 _OMAP4_MUXENTRY(UART3_RX_IRRX, 143, "uart3_rx_irrx",
355 "dmtimer8_pwm_evt", NULL, "gpio_143", NULL, NULL,
356 NULL, "safe_mode"),
357 _OMAP4_MUXENTRY(UART3_TX_IRTX, 144, "uart3_tx_irtx",
358 "dmtimer9_pwm_evt", NULL, "gpio_144", NULL, NULL,
359 NULL, "safe_mode"),
360 _OMAP4_MUXENTRY(SDMMC5_CLK, 145, "sdmmc5_clk", "mcspi2_clk",
361 "usbc1_icusb_dp", "gpio_145", NULL, NULL, NULL,
362 "safe_mode"),
363 _OMAP4_MUXENTRY(SDMMC5_CMD, 146, "sdmmc5_cmd", "mcspi2_simo",
364 "usbc1_icusb_dm", "gpio_146", NULL, NULL, NULL,
365 "safe_mode"),
366 _OMAP4_MUXENTRY(SDMMC5_DAT0, 147, "sdmmc5_dat0", "mcspi2_somi",
367 "usbc1_icusb_rcv", "gpio_147", NULL, NULL, NULL,
368 "safe_mode"),
369 _OMAP4_MUXENTRY(SDMMC5_DAT1, 148, "sdmmc5_dat1", NULL,
370 "usbc1_icusb_txen", "gpio_148", NULL, NULL, NULL,
371 "safe_mode"),
372 _OMAP4_MUXENTRY(SDMMC5_DAT2, 149, "sdmmc5_dat2", "mcspi2_cs1", NULL,
373 "gpio_149", NULL, NULL, NULL, "safe_mode"),
374 _OMAP4_MUXENTRY(SDMMC5_DAT3, 150, "sdmmc5_dat3", "mcspi2_cs0", NULL,
375 "gpio_150", NULL, NULL, NULL, "safe_mode"),
376 _OMAP4_MUXENTRY(MCSPI4_CLK, 151, "mcspi4_clk", "sdmmc4_clk", NULL,
377 "gpio_151", NULL, NULL, NULL, "safe_mode"),
378 _OMAP4_MUXENTRY(MCSPI4_SIMO, 152, "mcspi4_simo", "sdmmc4_cmd", NULL,
379 "gpio_152", NULL, NULL, NULL, "safe_mode"),
380 _OMAP4_MUXENTRY(MCSPI4_SOMI, 153, "mcspi4_somi", "sdmmc4_dat0", NULL,
381 "gpio_153", NULL, NULL, NULL, "safe_mode"),
382 _OMAP4_MUXENTRY(MCSPI4_CS0, 154, "mcspi4_cs0", "sdmmc4_dat3", NULL,
383 "gpio_154", NULL, NULL, NULL, "safe_mode"),
384 _OMAP4_MUXENTRY(UART4_RX, 155, "uart4_rx", "sdmmc4_dat2", NULL,
385 "gpio_155", NULL, NULL, NULL, "safe_mode"),
386 _OMAP4_MUXENTRY(UART4_TX, 156, "uart4_tx", "sdmmc4_dat1", NULL,
387 "gpio_156", NULL, NULL, NULL, "safe_mode"),
388 _OMAP4_MUXENTRY(USBB2_ULPITLL_CLK, 157, "usbb2_ulpitll_clk",
389 "usbb2_ulpiphy_clk", "sdmmc4_cmd", "gpio_157",
390 "hsi2_cawake", NULL, NULL, "safe_mode"),
391 _OMAP4_MUXENTRY(USBB2_ULPITLL_STP, 158, "usbb2_ulpitll_stp",
392 "usbb2_ulpiphy_stp", "sdmmc4_clk", "gpio_158",
393 "hsi2_cadata", "dispc2_data23", NULL, "reserved"),
394 _OMAP4_MUXENTRY(USBB2_ULPITLL_DIR, 159, "usbb2_ulpitll_dir",
395 "usbb2_ulpiphy_dir", "sdmmc4_dat0", "gpio_159",
396 "hsi2_caflag", "dispc2_data22", NULL, "reserved"),
397 _OMAP4_MUXENTRY(USBB2_ULPITLL_NXT, 160, "usbb2_ulpitll_nxt",
398 "usbb2_ulpiphy_nxt", "sdmmc4_dat1", "gpio_160",
399 "hsi2_acready", "dispc2_data21", NULL, "reserved"),
400 _OMAP4_MUXENTRY(USBB2_ULPITLL_DAT0, 161, "usbb2_ulpitll_dat0",
401 "usbb2_ulpiphy_dat0", "sdmmc4_dat2", "gpio_161",
402 "hsi2_acwake", "dispc2_data20", NULL, "reserved"),
403 _OMAP4_MUXENTRY(USBB2_ULPITLL_DAT1, 162, "usbb2_ulpitll_dat1",
404 "usbb2_ulpiphy_dat1", "sdmmc4_dat3", "gpio_162",
405 "hsi2_acdata", "dispc2_data19", NULL, "reserved"),
406 _OMAP4_MUXENTRY(USBB2_ULPITLL_DAT2, 163, "usbb2_ulpitll_dat2",
407 "usbb2_ulpiphy_dat2", "sdmmc3_dat2", "gpio_163",
408 "hsi2_acflag", "dispc2_data18", NULL, "reserved"),
409 _OMAP4_MUXENTRY(USBB2_ULPITLL_DAT3, 164, "usbb2_ulpitll_dat3",
410 "usbb2_ulpiphy_dat3", "sdmmc3_dat1", "gpio_164",
411 "hsi2_caready", "dispc2_data15", NULL, "reserved"),
412 _OMAP4_MUXENTRY(USBB2_ULPITLL_DAT4, 165, "usbb2_ulpitll_dat4",
413 "usbb2_ulpiphy_dat4", "sdmmc3_dat0", "gpio_165",
414 "mcspi3_somi", "dispc2_data14", NULL, "reserved"),
415 _OMAP4_MUXENTRY(USBB2_ULPITLL_DAT5, 166, "usbb2_ulpitll_dat5",
416 "usbb2_ulpiphy_dat5", "sdmmc3_dat3", "gpio_166",
417 "mcspi3_cs0", "dispc2_data13", NULL, "reserved"),
418 _OMAP4_MUXENTRY(USBB2_ULPITLL_DAT6, 167, "usbb2_ulpitll_dat6",
419 "usbb2_ulpiphy_dat6", "sdmmc3_cmd", "gpio_167",
420 "mcspi3_simo", "dispc2_data12", NULL, "reserved"),
421 _OMAP4_MUXENTRY(USBB2_ULPITLL_DAT7, 168, "usbb2_ulpitll_dat7",
422 "usbb2_ulpiphy_dat7", "sdmmc3_clk", "gpio_168",
423 "mcspi3_clk", "dispc2_data11", NULL, "reserved"),
424 _OMAP4_MUXENTRY(USBB2_HSIC_DATA, 169, "usbb2_hsic_data", NULL, NULL,
425 "gpio_169", NULL, NULL, NULL, "safe_mode"),
426 _OMAP4_MUXENTRY(USBB2_HSIC_STROBE, 170, "usbb2_hsic_strobe", NULL,
427 NULL, "gpio_170", NULL, NULL, NULL, "safe_mode"),
428 _OMAP4_MUXENTRY(UNIPRO_TX0, 171, "unipro_tx0", "kpd_col0", NULL,
429 "gpio_171", NULL, NULL, NULL, "safe_mode"),
430 _OMAP4_MUXENTRY(UNIPRO_TY0, 172, "unipro_ty0", "kpd_col1", NULL,
431 "gpio_172", NULL, NULL, NULL, "safe_mode"),
432 _OMAP4_MUXENTRY(UNIPRO_TX1, 173, "unipro_tx1", "kpd_col2", NULL,
433 "gpio_173", NULL, NULL, NULL, "safe_mode"),
434 _OMAP4_MUXENTRY(UNIPRO_TY1, 174, "unipro_ty1", "kpd_col3", NULL,
435 "gpio_174", NULL, NULL, NULL, "safe_mode"),
436 _OMAP4_MUXENTRY(UNIPRO_TX2, 0, "unipro_tx2", "kpd_col4", NULL,
437 "gpio_0", NULL, NULL, NULL, "safe_mode"),
438 _OMAP4_MUXENTRY(UNIPRO_TY2, 1, "unipro_ty2", "kpd_col5", NULL,
439 "gpio_1", NULL, NULL, NULL, "safe_mode"),
440 _OMAP4_MUXENTRY(UNIPRO_RX0, 0, "unipro_rx0", "kpd_row0", NULL,
441 "gpi_175", NULL, NULL, NULL, "safe_mode"),
442 _OMAP4_MUXENTRY(UNIPRO_RY0, 0, "unipro_ry0", "kpd_row1", NULL,
443 "gpi_176", NULL, NULL, NULL, "safe_mode"),
444 _OMAP4_MUXENTRY(UNIPRO_RX1, 0, "unipro_rx1", "kpd_row2", NULL,
445 "gpi_177", NULL, NULL, NULL, "safe_mode"),
446 _OMAP4_MUXENTRY(UNIPRO_RY1, 0, "unipro_ry1", "kpd_row3", NULL,
447 "gpi_178", NULL, NULL, NULL, "safe_mode"),
448 _OMAP4_MUXENTRY(UNIPRO_RX2, 0, "unipro_rx2", "kpd_row4", NULL,
449 "gpi_2", NULL, NULL, NULL, "safe_mode"),
450 _OMAP4_MUXENTRY(UNIPRO_RY2, 0, "unipro_ry2", "kpd_row5", NULL,
451 "gpi_3", NULL, NULL, NULL, "safe_mode"),
452 _OMAP4_MUXENTRY(USBA0_OTG_CE, 0, "usba0_otg_ce", NULL, NULL, NULL,
453 NULL, NULL, NULL, NULL),
454 _OMAP4_MUXENTRY(USBA0_OTG_DP, 179, "usba0_otg_dp", "uart3_rx_irrx",
455 "uart2_rx", "gpio_179", NULL, NULL, NULL,
456 "safe_mode"),
457 _OMAP4_MUXENTRY(USBA0_OTG_DM, 180, "usba0_otg_dm", "uart3_tx_irtx",
458 "uart2_tx", "gpio_180", NULL, NULL, NULL,
459 "safe_mode"),
460 _OMAP4_MUXENTRY(FREF_CLK1_OUT, 181, "fref_clk1_out", NULL, NULL,
461 "gpio_181", NULL, NULL, NULL, "safe_mode"),
462 _OMAP4_MUXENTRY(FREF_CLK2_OUT, 182, "fref_clk2_out", NULL, NULL,
463 "gpio_182", NULL, NULL, NULL, "safe_mode"),
464 _OMAP4_MUXENTRY(SYS_NIRQ1, 0, "sys_nirq1", NULL, NULL, NULL, NULL,
465 NULL, NULL, "safe_mode"),
466 _OMAP4_MUXENTRY(SYS_NIRQ2, 183, "sys_nirq2", NULL, NULL, "gpio_183",
467 NULL, NULL, NULL, "safe_mode"),
468 _OMAP4_MUXENTRY(SYS_BOOT0, 184, "sys_boot0", NULL, NULL, "gpio_184",
469 NULL, NULL, NULL, "safe_mode"),
470 _OMAP4_MUXENTRY(SYS_BOOT1, 185, "sys_boot1", NULL, NULL, "gpio_185",
471 NULL, NULL, NULL, "safe_mode"),
472 _OMAP4_MUXENTRY(SYS_BOOT2, 186, "sys_boot2", NULL, NULL, "gpio_186",
473 NULL, NULL, NULL, "safe_mode"),
474 _OMAP4_MUXENTRY(SYS_BOOT3, 187, "sys_boot3", NULL, NULL, "gpio_187",
475 NULL, NULL, NULL, "safe_mode"),
476 _OMAP4_MUXENTRY(SYS_BOOT4, 188, "sys_boot4", NULL, NULL, "gpio_188",
477 NULL, NULL, NULL, "safe_mode"),
478 _OMAP4_MUXENTRY(SYS_BOOT5, 189, "sys_boot5", NULL, NULL, "gpio_189",
479 NULL, NULL, NULL, "safe_mode"),
480 _OMAP4_MUXENTRY(DPM_EMU0, 11, "dpm_emu0", NULL, NULL, "gpio_11", NULL,
481 NULL, "hw_dbg0", "safe_mode"),
482 _OMAP4_MUXENTRY(DPM_EMU1, 12, "dpm_emu1", NULL, NULL, "gpio_12", NULL,
483 NULL, "hw_dbg1", "safe_mode"),
484 _OMAP4_MUXENTRY(DPM_EMU2, 13, "dpm_emu2", "usba0_ulpiphy_clk", NULL,
485 "gpio_13", NULL, "dispc2_fid", "hw_dbg2", "reserved"),
486 _OMAP4_MUXENTRY(DPM_EMU3, 14, "dpm_emu3", "usba0_ulpiphy_stp", NULL,
487 "gpio_14", NULL, "dispc2_data10", "hw_dbg3",
488 "reserved"),
489 _OMAP4_MUXENTRY(DPM_EMU4, 15, "dpm_emu4", "usba0_ulpiphy_dir", NULL,
490 "gpio_15", NULL, "dispc2_data9", "hw_dbg4",
491 "reserved"),
492 _OMAP4_MUXENTRY(DPM_EMU5, 16, "dpm_emu5", "usba0_ulpiphy_nxt", NULL,
493 "gpio_16", "rfbi_te_vsync0", "dispc2_data16",
494 "hw_dbg5", "reserved"),
495 _OMAP4_MUXENTRY(DPM_EMU6, 17, "dpm_emu6", "usba0_ulpiphy_dat0",
496 "uart3_tx_irtx", "gpio_17", "rfbi_hsync0",
497 "dispc2_data17", "hw_dbg6", "reserved"),
498 _OMAP4_MUXENTRY(DPM_EMU7, 18, "dpm_emu7", "usba0_ulpiphy_dat1",
499 "uart3_rx_irrx", "gpio_18", "rfbi_cs0",
500 "dispc2_hsync", "hw_dbg7", "reserved"),
501 _OMAP4_MUXENTRY(DPM_EMU8, 19, "dpm_emu8", "usba0_ulpiphy_dat2",
502 "uart3_rts_sd", "gpio_19", "rfbi_re", "dispc2_pclk",
503 "hw_dbg8", "reserved"),
504 _OMAP4_MUXENTRY(DPM_EMU9, 20, "dpm_emu9", "usba0_ulpiphy_dat3",
505 "uart3_cts_rctx", "gpio_20", "rfbi_we",
506 "dispc2_vsync", "hw_dbg9", "reserved"),
507 _OMAP4_MUXENTRY(DPM_EMU10, 21, "dpm_emu10", "usba0_ulpiphy_dat4",
508 NULL, "gpio_21", "rfbi_a0", "dispc2_de", "hw_dbg10",
509 "reserved"),
510 _OMAP4_MUXENTRY(DPM_EMU11, 22, "dpm_emu11", "usba0_ulpiphy_dat5",
511 NULL, "gpio_22", "rfbi_data8", "dispc2_data8",
512 "hw_dbg11", "reserved"),
513 _OMAP4_MUXENTRY(DPM_EMU12, 23, "dpm_emu12", "usba0_ulpiphy_dat6",
514 NULL, "gpio_23", "rfbi_data7", "dispc2_data7",
515 "hw_dbg12", "reserved"),
516 _OMAP4_MUXENTRY(DPM_EMU13, 24, "dpm_emu13", "usba0_ulpiphy_dat7",
517 NULL, "gpio_24", "rfbi_data6", "dispc2_data6",
518 "hw_dbg13", "reserved"),
519 _OMAP4_MUXENTRY(DPM_EMU14, 25, "dpm_emu14", "sys_drm_msecure",
520 "uart1_rx", "gpio_25", "rfbi_data5", "dispc2_data5",
521 "hw_dbg14", "reserved"),
522 _OMAP4_MUXENTRY(DPM_EMU15, 26, "dpm_emu15", "sys_secure_indicator",
523 NULL, "gpio_26", "rfbi_data4", "dispc2_data4",
524 "hw_dbg15", "reserved"),
525 _OMAP4_MUXENTRY(DPM_EMU16, 27, "dpm_emu16", "dmtimer8_pwm_evt",
526 "dsi1_te0", "gpio_27", "rfbi_data3", "dispc2_data3",
527 "hw_dbg16", "reserved"),
528 _OMAP4_MUXENTRY(DPM_EMU17, 28, "dpm_emu17", "dmtimer9_pwm_evt",
529 "dsi1_te1", "gpio_28", "rfbi_data2", "dispc2_data2",
530 "hw_dbg17", "reserved"),
531 _OMAP4_MUXENTRY(DPM_EMU18, 190, "dpm_emu18", "dmtimer10_pwm_evt",
532 "dsi2_te0", "gpio_190", "rfbi_data1", "dispc2_data1",
533 "hw_dbg18", "reserved"),
534 _OMAP4_MUXENTRY(DPM_EMU19, 191, "dpm_emu19", "dmtimer11_pwm_evt",
535 "dsi2_te1", "gpio_191", "rfbi_data0", "dispc2_data0",
536 "hw_dbg19", "reserved"),
537 { .reg_offset = OMAP_MUX_TERMINATOR },
538};
539
540/*
541 * Balls for 44XX CBL package
542 * 547-pin CBL ES1.0 S-FPGA-N547, 0.40mm Ball Pitch (Top),
543 * 0.40mm Ball Pitch (Bottom)
544 */
545#if defined(CONFIG_OMAP_MUX) && defined(CONFIG_DEBUG_FS) \
546 && defined(CONFIG_OMAP_PACKAGE_CBL)
547static struct omap_ball __initdata omap4_core_cbl_ball[] = {
548 _OMAP4_BALLENTRY(GPMC_AD0, "c12", NULL),
549 _OMAP4_BALLENTRY(GPMC_AD1, "d12", NULL),
550 _OMAP4_BALLENTRY(GPMC_AD2, "c13", NULL),
551 _OMAP4_BALLENTRY(GPMC_AD3, "d13", NULL),
552 _OMAP4_BALLENTRY(GPMC_AD4, "c15", NULL),
553 _OMAP4_BALLENTRY(GPMC_AD5, "d15", NULL),
554 _OMAP4_BALLENTRY(GPMC_AD6, "a16", NULL),
555 _OMAP4_BALLENTRY(GPMC_AD7, "b16", NULL),
556 _OMAP4_BALLENTRY(GPMC_AD8, "c16", NULL),
557 _OMAP4_BALLENTRY(GPMC_AD9, "d16", NULL),
558 _OMAP4_BALLENTRY(GPMC_AD10, "c17", NULL),
559 _OMAP4_BALLENTRY(GPMC_AD11, "d17", NULL),
560 _OMAP4_BALLENTRY(GPMC_AD12, "c18", NULL),
561 _OMAP4_BALLENTRY(GPMC_AD13, "d18", NULL),
562 _OMAP4_BALLENTRY(GPMC_AD14, "c19", NULL),
563 _OMAP4_BALLENTRY(GPMC_AD15, "d19", NULL),
564 _OMAP4_BALLENTRY(GPMC_A16, "b17", NULL),
565 _OMAP4_BALLENTRY(GPMC_A17, "a18", NULL),
566 _OMAP4_BALLENTRY(GPMC_A18, "b18", NULL),
567 _OMAP4_BALLENTRY(GPMC_A19, "a19", NULL),
568 _OMAP4_BALLENTRY(GPMC_A20, "b19", NULL),
569 _OMAP4_BALLENTRY(GPMC_A21, "b20", NULL),
570 _OMAP4_BALLENTRY(GPMC_A22, "a21", NULL),
571 _OMAP4_BALLENTRY(GPMC_A23, "b21", NULL),
572 _OMAP4_BALLENTRY(GPMC_A24, "c20", NULL),
573 _OMAP4_BALLENTRY(GPMC_A25, "d20", NULL),
574 _OMAP4_BALLENTRY(GPMC_NCS0, "b25", NULL),
575 _OMAP4_BALLENTRY(GPMC_NCS1, "c21", NULL),
576 _OMAP4_BALLENTRY(GPMC_NCS2, "d21", NULL),
577 _OMAP4_BALLENTRY(GPMC_NCS3, "c22", NULL),
578 _OMAP4_BALLENTRY(GPMC_NWP, "c25", NULL),
579 _OMAP4_BALLENTRY(GPMC_CLK, "b22", NULL),
580 _OMAP4_BALLENTRY(GPMC_NADV_ALE, "d25", NULL),
581 _OMAP4_BALLENTRY(GPMC_NOE, "b11", NULL),
582 _OMAP4_BALLENTRY(GPMC_NWE, "b12", NULL),
583 _OMAP4_BALLENTRY(GPMC_NBE0_CLE, "c23", NULL),
584 _OMAP4_BALLENTRY(GPMC_NBE1, "d22", NULL),
585 _OMAP4_BALLENTRY(GPMC_WAIT0, "b26", NULL),
586 _OMAP4_BALLENTRY(GPMC_WAIT1, "b23", NULL),
587 _OMAP4_BALLENTRY(C2C_DATA11, "d23", NULL),
588 _OMAP4_BALLENTRY(C2C_DATA12, "a24", NULL),
589 _OMAP4_BALLENTRY(C2C_DATA13, "b24", NULL),
590 _OMAP4_BALLENTRY(C2C_DATA14, "c24", NULL),
591 _OMAP4_BALLENTRY(C2C_DATA15, "d24", NULL),
592 _OMAP4_BALLENTRY(HDMI_HPD, "b9", NULL),
593 _OMAP4_BALLENTRY(HDMI_CEC, "b10", NULL),
594 _OMAP4_BALLENTRY(HDMI_DDC_SCL, "a8", NULL),
595 _OMAP4_BALLENTRY(HDMI_DDC_SDA, "b8", NULL),
596 _OMAP4_BALLENTRY(CSI21_DX0, "r26", NULL),
597 _OMAP4_BALLENTRY(CSI21_DY0, "r25", NULL),
598 _OMAP4_BALLENTRY(CSI21_DX1, "t26", NULL),
599 _OMAP4_BALLENTRY(CSI21_DY1, "t25", NULL),
600 _OMAP4_BALLENTRY(CSI21_DX2, "u26", NULL),
601 _OMAP4_BALLENTRY(CSI21_DY2, "u25", NULL),
602 _OMAP4_BALLENTRY(CSI21_DX3, "v26", NULL),
603 _OMAP4_BALLENTRY(CSI21_DY3, "v25", NULL),
604 _OMAP4_BALLENTRY(CSI21_DX4, "w26", NULL),
605 _OMAP4_BALLENTRY(CSI21_DY4, "w25", NULL),
606 _OMAP4_BALLENTRY(CSI22_DX0, "m26", NULL),
607 _OMAP4_BALLENTRY(CSI22_DY0, "m25", NULL),
608 _OMAP4_BALLENTRY(CSI22_DX1, "n26", NULL),
609 _OMAP4_BALLENTRY(CSI22_DY1, "n25", NULL),
610 _OMAP4_BALLENTRY(CAM_SHUTTER, "t27", NULL),
611 _OMAP4_BALLENTRY(CAM_STROBE, "u27", NULL),
612 _OMAP4_BALLENTRY(CAM_GLOBALRESET, "v27", NULL),
613 _OMAP4_BALLENTRY(USBB1_ULPITLL_CLK, "ae18", NULL),
614 _OMAP4_BALLENTRY(USBB1_ULPITLL_STP, "ag19", NULL),
615 _OMAP4_BALLENTRY(USBB1_ULPITLL_DIR, "af19", NULL),
616 _OMAP4_BALLENTRY(USBB1_ULPITLL_NXT, "ae19", NULL),
617 _OMAP4_BALLENTRY(USBB1_ULPITLL_DAT0, "af18", NULL),
618 _OMAP4_BALLENTRY(USBB1_ULPITLL_DAT1, "ag18", NULL),
619 _OMAP4_BALLENTRY(USBB1_ULPITLL_DAT2, "ae17", NULL),
620 _OMAP4_BALLENTRY(USBB1_ULPITLL_DAT3, "af17", NULL),
621 _OMAP4_BALLENTRY(USBB1_ULPITLL_DAT4, "ah17", NULL),
622 _OMAP4_BALLENTRY(USBB1_ULPITLL_DAT5, "ae16", NULL),
623 _OMAP4_BALLENTRY(USBB1_ULPITLL_DAT6, "af16", NULL),
624 _OMAP4_BALLENTRY(USBB1_ULPITLL_DAT7, "ag16", NULL),
625 _OMAP4_BALLENTRY(USBB1_HSIC_DATA, "af14", NULL),
626 _OMAP4_BALLENTRY(USBB1_HSIC_STROBE, "ae14", NULL),
627 _OMAP4_BALLENTRY(USBC1_ICUSB_DP, "h2", NULL),
628 _OMAP4_BALLENTRY(USBC1_ICUSB_DM, "h3", NULL),
629 _OMAP4_BALLENTRY(SDMMC1_CLK, "d2", NULL),
630 _OMAP4_BALLENTRY(SDMMC1_CMD, "e3", NULL),
631 _OMAP4_BALLENTRY(SDMMC1_DAT0, "e4", NULL),
632 _OMAP4_BALLENTRY(SDMMC1_DAT1, "e2", NULL),
633 _OMAP4_BALLENTRY(SDMMC1_DAT2, "e1", NULL),
634 _OMAP4_BALLENTRY(SDMMC1_DAT3, "f4", NULL),
635 _OMAP4_BALLENTRY(SDMMC1_DAT4, "f3", NULL),
636 _OMAP4_BALLENTRY(SDMMC1_DAT5, "f1", NULL),
637 _OMAP4_BALLENTRY(SDMMC1_DAT6, "g4", NULL),
638 _OMAP4_BALLENTRY(SDMMC1_DAT7, "g3", NULL),
639 _OMAP4_BALLENTRY(ABE_MCBSP2_CLKX, "ad27", NULL),
640 _OMAP4_BALLENTRY(ABE_MCBSP2_DR, "ad26", NULL),
641 _OMAP4_BALLENTRY(ABE_MCBSP2_DX, "ad25", NULL),
642 _OMAP4_BALLENTRY(ABE_MCBSP2_FSX, "ac28", NULL),
643 _OMAP4_BALLENTRY(ABE_MCBSP1_CLKX, "ac26", NULL),
644 _OMAP4_BALLENTRY(ABE_MCBSP1_DR, "ac25", NULL),
645 _OMAP4_BALLENTRY(ABE_MCBSP1_DX, "ab25", NULL),
646 _OMAP4_BALLENTRY(ABE_MCBSP1_FSX, "ac27", NULL),
647 _OMAP4_BALLENTRY(ABE_PDM_UL_DATA, "ag25", NULL),
648 _OMAP4_BALLENTRY(ABE_PDM_DL_DATA, "af25", NULL),
649 _OMAP4_BALLENTRY(ABE_PDM_FRAME, "ae25", NULL),
650 _OMAP4_BALLENTRY(ABE_PDM_LB_CLK, "af26", NULL),
651 _OMAP4_BALLENTRY(ABE_CLKS, "ah26", NULL),
652 _OMAP4_BALLENTRY(ABE_DMIC_CLK1, "ae24", NULL),
653 _OMAP4_BALLENTRY(ABE_DMIC_DIN1, "af24", NULL),
654 _OMAP4_BALLENTRY(ABE_DMIC_DIN2, "ag24", NULL),
655 _OMAP4_BALLENTRY(ABE_DMIC_DIN3, "ah24", NULL),
656 _OMAP4_BALLENTRY(UART2_CTS, "ab26", NULL),
657 _OMAP4_BALLENTRY(UART2_RTS, "ab27", NULL),
658 _OMAP4_BALLENTRY(UART2_RX, "aa25", NULL),
659 _OMAP4_BALLENTRY(UART2_TX, "aa26", NULL),
660 _OMAP4_BALLENTRY(HDQ_SIO, "aa27", NULL),
661 _OMAP4_BALLENTRY(I2C1_SCL, "ae28", NULL),
662 _OMAP4_BALLENTRY(I2C1_SDA, "ae26", NULL),
663 _OMAP4_BALLENTRY(I2C2_SCL, "c26", NULL),
664 _OMAP4_BALLENTRY(I2C2_SDA, "d26", NULL),
665 _OMAP4_BALLENTRY(I2C3_SCL, "w27", NULL),
666 _OMAP4_BALLENTRY(I2C3_SDA, "y27", NULL),
667 _OMAP4_BALLENTRY(I2C4_SCL, "ag21", NULL),
668 _OMAP4_BALLENTRY(I2C4_SDA, "ah22", NULL),
669 _OMAP4_BALLENTRY(MCSPI1_CLK, "af22", NULL),
670 _OMAP4_BALLENTRY(MCSPI1_SOMI, "ae22", NULL),
671 _OMAP4_BALLENTRY(MCSPI1_SIMO, "ag22", NULL),
672 _OMAP4_BALLENTRY(MCSPI1_CS0, "ae23", NULL),
673 _OMAP4_BALLENTRY(MCSPI1_CS1, "af23", NULL),
674 _OMAP4_BALLENTRY(MCSPI1_CS2, "ag23", NULL),
675 _OMAP4_BALLENTRY(MCSPI1_CS3, "ah23", NULL),
676 _OMAP4_BALLENTRY(UART3_CTS_RCTX, "f27", NULL),
677 _OMAP4_BALLENTRY(UART3_RTS_SD, "f28", NULL),
678 _OMAP4_BALLENTRY(UART3_RX_IRRX, "g27", NULL),
679 _OMAP4_BALLENTRY(UART3_TX_IRTX, "g28", NULL),
680 _OMAP4_BALLENTRY(SDMMC5_CLK, "ae5", NULL),
681 _OMAP4_BALLENTRY(SDMMC5_CMD, "af5", NULL),
682 _OMAP4_BALLENTRY(SDMMC5_DAT0, "ae4", NULL),
683 _OMAP4_BALLENTRY(SDMMC5_DAT1, "af4", NULL),
684 _OMAP4_BALLENTRY(SDMMC5_DAT2, "ag3", NULL),
685 _OMAP4_BALLENTRY(SDMMC5_DAT3, "af3", NULL),
686 _OMAP4_BALLENTRY(MCSPI4_CLK, "ae21", NULL),
687 _OMAP4_BALLENTRY(MCSPI4_SIMO, "af20", NULL),
688 _OMAP4_BALLENTRY(MCSPI4_SOMI, "af21", NULL),
689 _OMAP4_BALLENTRY(MCSPI4_CS0, "ae20", NULL),
690 _OMAP4_BALLENTRY(UART4_RX, "ag20", NULL),
691 _OMAP4_BALLENTRY(UART4_TX, "ah19", NULL),
692 _OMAP4_BALLENTRY(USBB2_ULPITLL_CLK, "ag12", NULL),
693 _OMAP4_BALLENTRY(USBB2_ULPITLL_STP, "af12", NULL),
694 _OMAP4_BALLENTRY(USBB2_ULPITLL_DIR, "ae12", NULL),
695 _OMAP4_BALLENTRY(USBB2_ULPITLL_NXT, "ag13", NULL),
696 _OMAP4_BALLENTRY(USBB2_ULPITLL_DAT0, "ae11", NULL),
697 _OMAP4_BALLENTRY(USBB2_ULPITLL_DAT1, "af11", NULL),
698 _OMAP4_BALLENTRY(USBB2_ULPITLL_DAT2, "ag11", NULL),
699 _OMAP4_BALLENTRY(USBB2_ULPITLL_DAT3, "ah11", NULL),
700 _OMAP4_BALLENTRY(USBB2_ULPITLL_DAT4, "ae10", NULL),
701 _OMAP4_BALLENTRY(USBB2_ULPITLL_DAT5, "af10", NULL),
702 _OMAP4_BALLENTRY(USBB2_ULPITLL_DAT6, "ag10", NULL),
703 _OMAP4_BALLENTRY(USBB2_ULPITLL_DAT7, "ae9", NULL),
704 _OMAP4_BALLENTRY(USBB2_HSIC_DATA, "af13", NULL),
705 _OMAP4_BALLENTRY(USBB2_HSIC_STROBE, "ae13", NULL),
706 _OMAP4_BALLENTRY(UNIPRO_TX0, "g26", NULL),
707 _OMAP4_BALLENTRY(UNIPRO_TY0, "g25", NULL),
708 _OMAP4_BALLENTRY(UNIPRO_TX1, "h26", NULL),
709 _OMAP4_BALLENTRY(UNIPRO_TY1, "h25", NULL),
710 _OMAP4_BALLENTRY(UNIPRO_TX2, "j27", NULL),
711 _OMAP4_BALLENTRY(UNIPRO_TY2, "h27", NULL),
712 _OMAP4_BALLENTRY(UNIPRO_RX0, "j26", NULL),
713 _OMAP4_BALLENTRY(UNIPRO_RY0, "j25", NULL),
714 _OMAP4_BALLENTRY(UNIPRO_RX1, "k26", NULL),
715 _OMAP4_BALLENTRY(UNIPRO_RY1, "k25", NULL),
716 _OMAP4_BALLENTRY(UNIPRO_RX2, "l27", NULL),
717 _OMAP4_BALLENTRY(UNIPRO_RY2, "k27", NULL),
718 _OMAP4_BALLENTRY(USBA0_OTG_CE, "c3", NULL),
719 _OMAP4_BALLENTRY(USBA0_OTG_DP, "b5", NULL),
720 _OMAP4_BALLENTRY(USBA0_OTG_DM, "b4", NULL),
721 _OMAP4_BALLENTRY(FREF_CLK1_OUT, "aa28", NULL),
722 _OMAP4_BALLENTRY(FREF_CLK2_OUT, "y28", NULL),
723 _OMAP4_BALLENTRY(SYS_NIRQ1, "ae6", NULL),
724 _OMAP4_BALLENTRY(SYS_NIRQ2, "af6", NULL),
725 _OMAP4_BALLENTRY(SYS_BOOT0, "f26", NULL),
726 _OMAP4_BALLENTRY(SYS_BOOT1, "e27", NULL),
727 _OMAP4_BALLENTRY(SYS_BOOT2, "e26", NULL),
728 _OMAP4_BALLENTRY(SYS_BOOT3, "e25", NULL),
729 _OMAP4_BALLENTRY(SYS_BOOT4, "d28", NULL),
730 _OMAP4_BALLENTRY(SYS_BOOT5, "d27", NULL),
731 _OMAP4_BALLENTRY(DPM_EMU0, "m2", NULL),
732 _OMAP4_BALLENTRY(DPM_EMU1, "n2", NULL),
733 _OMAP4_BALLENTRY(DPM_EMU2, "p2", NULL),
734 _OMAP4_BALLENTRY(DPM_EMU3, "v1", NULL),
735 _OMAP4_BALLENTRY(DPM_EMU4, "v2", NULL),
736 _OMAP4_BALLENTRY(DPM_EMU5, "w1", NULL),
737 _OMAP4_BALLENTRY(DPM_EMU6, "w2", NULL),
738 _OMAP4_BALLENTRY(DPM_EMU7, "w3", NULL),
739 _OMAP4_BALLENTRY(DPM_EMU8, "w4", NULL),
740 _OMAP4_BALLENTRY(DPM_EMU9, "y2", NULL),
741 _OMAP4_BALLENTRY(DPM_EMU10, "y3", NULL),
742 _OMAP4_BALLENTRY(DPM_EMU11, "y4", NULL),
743 _OMAP4_BALLENTRY(DPM_EMU12, "aa1", NULL),
744 _OMAP4_BALLENTRY(DPM_EMU13, "aa2", NULL),
745 _OMAP4_BALLENTRY(DPM_EMU14, "aa3", NULL),
746 _OMAP4_BALLENTRY(DPM_EMU15, "aa4", NULL),
747 _OMAP4_BALLENTRY(DPM_EMU16, "ab2", NULL),
748 _OMAP4_BALLENTRY(DPM_EMU17, "ab3", NULL),
749 _OMAP4_BALLENTRY(DPM_EMU18, "ab4", NULL),
750 _OMAP4_BALLENTRY(DPM_EMU19, "ac4", NULL),
751 { .reg_offset = OMAP_MUX_TERMINATOR },
752};
753#else
754#define omap4_core_cbl_ball NULL
755#endif
756
757/*
758 * Signals different on ES2.0 compared to superset
759 */
760static struct omap_mux __initdata omap4_es2_core_subset[] = {
761 _OMAP4_MUXENTRY(GPMC_AD8, 32, "gpmc_ad8", "kpd_row0", "c2c_data15",
762 "gpio_32", NULL, "sdmmc1_dat0", NULL, NULL),
763 _OMAP4_MUXENTRY(GPMC_AD9, 33, "gpmc_ad9", "kpd_row1", "c2c_data14",
764 "gpio_33", NULL, "sdmmc1_dat1", NULL, NULL),
765 _OMAP4_MUXENTRY(GPMC_AD10, 34, "gpmc_ad10", "kpd_row2", "c2c_data13",
766 "gpio_34", NULL, "sdmmc1_dat2", NULL, NULL),
767 _OMAP4_MUXENTRY(GPMC_AD11, 35, "gpmc_ad11", "kpd_row3", "c2c_data12",
768 "gpio_35", NULL, "sdmmc1_dat3", NULL, NULL),
769 _OMAP4_MUXENTRY(GPMC_AD12, 36, "gpmc_ad12", "kpd_col0", "c2c_data11",
770 "gpio_36", NULL, "sdmmc1_dat4", NULL, NULL),
771 _OMAP4_MUXENTRY(GPMC_AD13, 37, "gpmc_ad13", "kpd_col1", "c2c_data10",
772 "gpio_37", NULL, "sdmmc1_dat5", NULL, NULL),
773 _OMAP4_MUXENTRY(GPMC_AD14, 38, "gpmc_ad14", "kpd_col2", "c2c_data9",
774 "gpio_38", NULL, "sdmmc1_dat6", NULL, NULL),
775 _OMAP4_MUXENTRY(GPMC_AD15, 39, "gpmc_ad15", "kpd_col3", "c2c_data8",
776 "gpio_39", NULL, "sdmmc1_dat7", NULL, NULL),
777 _OMAP4_MUXENTRY(GPMC_A16, 40, "gpmc_a16", "kpd_row4", "c2c_datain0",
778 "gpio_40", "venc_656_data0", NULL, NULL, "safe_mode"),
779 _OMAP4_MUXENTRY(GPMC_A24, 48, "gpmc_a24", "kpd_col8", "c2c_clkout0",
780 "gpio_48", NULL, NULL, NULL, "safe_mode"),
781 _OMAP4_MUXENTRY(GPMC_NCS2, 52, "gpmc_ncs2", "kpd_row8",
782 "c2c_dataout7", "gpio_52", NULL, NULL, NULL,
783 "safe_mode"),
784 _OMAP4_MUXENTRY(GPMC_CLK, 55, "gpmc_clk", NULL, NULL, "gpio_55",
785 "sys_ndmareq2", "sdmmc1_cmd", NULL, NULL),
786 _OMAP4_MUXENTRY(GPMC_NADV_ALE, 56, "gpmc_nadv_ale", "dsi1_te1", NULL,
787 "gpio_56", "sys_ndmareq3", "sdmmc1_clk", NULL, NULL),
788 _OMAP4_MUXENTRY(GPMC_WAIT2, 100, "gpmc_wait2", "usbc1_icusb_txen",
789 "c2c_dataout3", "gpio_100", "sys_ndmareq0", NULL,
790 NULL, "safe_mode"),
791 _OMAP4_MUXENTRY(GPMC_NCS4, 101, "gpmc_ncs4", "dsi1_te0", "c2c_clkin0",
792 "gpio_101", "sys_ndmareq1", NULL, NULL, "safe_mode"),
793 _OMAP4_MUXENTRY(GPMC_NCS5, 102, "gpmc_ncs5", "dsi1_te1", "c2c_clkin1",
794 "gpio_102", "sys_ndmareq2", NULL, NULL, "safe_mode"),
795 _OMAP4_MUXENTRY(GPMC_NCS6, 103, "gpmc_ncs6", "dsi2_te0",
796 "c2c_dataout0", "gpio_103", "sys_ndmareq3", NULL,
797 NULL, "safe_mode"),
798 _OMAP4_MUXENTRY(GPMC_NCS7, 104, "gpmc_ncs7", "dsi2_te1",
799 "c2c_dataout1", "gpio_104", NULL, NULL, NULL,
800 "safe_mode"),
801 _OMAP4_MUXENTRY(USBB1_ULPITLL_DAT0, 88, "usbb1_ulpitll_dat0",
802 "hsi1_acwake", "mcbsp4_clkx", "gpio_88",
803 "usbb1_ulpiphy_dat0", "usbb1_mm_txen", "hw_dbg24",
804 "safe_mode"),
805 _OMAP4_MUXENTRY(USBB1_ULPITLL_DAT1, 89, "usbb1_ulpitll_dat1",
806 "hsi1_acdata", "mcbsp4_dx", "gpio_89",
807 "usbb1_ulpiphy_dat1", "usbb1_mm_txdat", "hw_dbg25",
808 "safe_mode"),
809 _OMAP4_MUXENTRY(USBB1_ULPITLL_DAT2, 90, "usbb1_ulpitll_dat2",
810 "hsi1_acflag", "mcbsp4_dr", "gpio_90",
811 "usbb1_ulpiphy_dat2", "usbb1_mm_txse0", "hw_dbg26",
812 "safe_mode"),
813 _OMAP4_MUXENTRY(USBB1_ULPITLL_DAT3, 91, "usbb1_ulpitll_dat3",
814 "hsi1_caready", NULL, "gpio_91", "usbb1_ulpiphy_dat3",
815 "usbb1_mm_rxrcv", "hw_dbg27", "safe_mode"),
816 _OMAP4_MUXENTRY(ABE_DMIC_CLK1, 119, "abe_dmic_clk1", NULL, NULL,
817 "gpio_119", "usbb2_mm_txse0", "uart4_cts", NULL,
818 "safe_mode"),
819 _OMAP4_MUXENTRY(ABE_DMIC_DIN1, 120, "abe_dmic_din1", NULL, NULL,
820 "gpio_120", "usbb2_mm_txdat", "uart4_rts", NULL,
821 "safe_mode"),
822 _OMAP4_MUXENTRY(ABE_DMIC_DIN2, 121, "abe_dmic_din2", "slimbus2_clock",
823 "abe_mcasp_axr", "gpio_121", NULL,
824 "dmtimer11_pwm_evt", NULL, "safe_mode"),
825 _OMAP4_MUXENTRY(ABE_DMIC_DIN3, 122, "abe_dmic_din3", "slimbus2_data",
826 "abe_dmic_clk2", "gpio_122", NULL, "dmtimer9_pwm_evt",
827 NULL, "safe_mode"),
828 _OMAP4_MUXENTRY(SDMMC5_CLK, 145, "sdmmc5_clk", "mcspi2_clk",
829 "usbc1_icusb_dp", "gpio_145", NULL, "sdmmc2_clk",
830 NULL, "safe_mode"),
831 _OMAP4_MUXENTRY(SDMMC5_CMD, 146, "sdmmc5_cmd", "mcspi2_simo",
832 "usbc1_icusb_dm", "gpio_146", NULL, "sdmmc2_cmd",
833 NULL, "safe_mode"),
834 _OMAP4_MUXENTRY(SDMMC5_DAT0, 147, "sdmmc5_dat0", "mcspi2_somi",
835 "usbc1_icusb_rcv", "gpio_147", NULL, "sdmmc2_dat0",
836 NULL, "safe_mode"),
837 _OMAP4_MUXENTRY(SDMMC5_DAT1, 148, "sdmmc5_dat1", NULL,
838 "usbc1_icusb_txen", "gpio_148", NULL, "sdmmc2_dat1",
839 NULL, "safe_mode"),
840 _OMAP4_MUXENTRY(SDMMC5_DAT2, 149, "sdmmc5_dat2", "mcspi2_cs1", NULL,
841 "gpio_149", NULL, "sdmmc2_dat2", NULL, "safe_mode"),
842 _OMAP4_MUXENTRY(SDMMC5_DAT3, 150, "sdmmc5_dat3", "mcspi2_cs0", NULL,
843 "gpio_150", NULL, "sdmmc2_dat3", NULL, "safe_mode"),
844 _OMAP4_MUXENTRY(MCSPI4_CLK, 151, "mcspi4_clk", "sdmmc4_clk",
845 "kpd_col6", "gpio_151", NULL, NULL, NULL,
846 "safe_mode"),
847 _OMAP4_MUXENTRY(MCSPI4_SIMO, 152, "mcspi4_simo", "sdmmc4_cmd",
848 "kpd_col7", "gpio_152", NULL, NULL, NULL,
849 "safe_mode"),
850 _OMAP4_MUXENTRY(MCSPI4_SOMI, 153, "mcspi4_somi", "sdmmc4_dat0",
851 "kpd_row6", "gpio_153", NULL, NULL, NULL,
852 "safe_mode"),
853 _OMAP4_MUXENTRY(MCSPI4_CS0, 154, "mcspi4_cs0", "sdmmc4_dat3",
854 "kpd_row7", "gpio_154", NULL, NULL, NULL,
855 "safe_mode"),
856 _OMAP4_MUXENTRY(UART4_RX, 155, "uart4_rx", "sdmmc4_dat2", "kpd_row8",
857 "gpio_155", NULL, NULL, NULL, "safe_mode"),
858 _OMAP4_MUXENTRY(UART4_TX, 156, "uart4_tx", "sdmmc4_dat1", "kpd_col8",
859 "gpio_156", NULL, NULL, NULL, "safe_mode"),
860 _OMAP4_MUXENTRY(USBB2_ULPITLL_STP, 158, "usbb2_ulpitll_stp",
861 "usbb2_ulpiphy_stp", "sdmmc4_clk", "gpio_158",
862 "hsi2_cadata", "dispc2_data23", NULL, "safe_mode"),
863 _OMAP4_MUXENTRY(USBB2_ULPITLL_DIR, 159, "usbb2_ulpitll_dir",
864 "usbb2_ulpiphy_dir", "sdmmc4_dat0", "gpio_159",
865 "hsi2_caflag", "dispc2_data22", NULL, "safe_mode"),
866 _OMAP4_MUXENTRY(USBB2_ULPITLL_NXT, 160, "usbb2_ulpitll_nxt",
867 "usbb2_ulpiphy_nxt", "sdmmc4_dat1", "gpio_160",
868 "hsi2_acready", "dispc2_data21", NULL, "safe_mode"),
869 _OMAP4_MUXENTRY(USBB2_ULPITLL_DAT0, 161, "usbb2_ulpitll_dat0",
870 "usbb2_ulpiphy_dat0", "sdmmc4_dat2", "gpio_161",
871 "hsi2_acwake", "dispc2_data20", "usbb2_mm_txen",
872 "safe_mode"),
873 _OMAP4_MUXENTRY(USBB2_ULPITLL_DAT1, 162, "usbb2_ulpitll_dat1",
874 "usbb2_ulpiphy_dat1", "sdmmc4_dat3", "gpio_162",
875 "hsi2_acdata", "dispc2_data19", "usbb2_mm_txdat",
876 "safe_mode"),
877 _OMAP4_MUXENTRY(USBB2_ULPITLL_DAT2, 163, "usbb2_ulpitll_dat2",
878 "usbb2_ulpiphy_dat2", "sdmmc3_dat2", "gpio_163",
879 "hsi2_acflag", "dispc2_data18", "usbb2_mm_txse0",
880 "safe_mode"),
881 _OMAP4_MUXENTRY(USBB2_ULPITLL_DAT3, 164, "usbb2_ulpitll_dat3",
882 "usbb2_ulpiphy_dat3", "sdmmc3_dat1", "gpio_164",
883 "hsi2_caready", "dispc2_data15", "rfbi_data15",
884 "safe_mode"),
885 _OMAP4_MUXENTRY(USBB2_ULPITLL_DAT4, 165, "usbb2_ulpitll_dat4",
886 "usbb2_ulpiphy_dat4", "sdmmc3_dat0", "gpio_165",
887 "mcspi3_somi", "dispc2_data14", "rfbi_data14",
888 "safe_mode"),
889 _OMAP4_MUXENTRY(USBB2_ULPITLL_DAT5, 166, "usbb2_ulpitll_dat5",
890 "usbb2_ulpiphy_dat5", "sdmmc3_dat3", "gpio_166",
891 "mcspi3_cs0", "dispc2_data13", "rfbi_data13",
892 "safe_mode"),
893 _OMAP4_MUXENTRY(USBB2_ULPITLL_DAT6, 167, "usbb2_ulpitll_dat6",
894 "usbb2_ulpiphy_dat6", "sdmmc3_cmd", "gpio_167",
895 "mcspi3_simo", "dispc2_data12", "rfbi_data12",
896 "safe_mode"),
897 _OMAP4_MUXENTRY(USBB2_ULPITLL_DAT7, 168, "usbb2_ulpitll_dat7",
898 "usbb2_ulpiphy_dat7", "sdmmc3_clk", "gpio_168",
899 "mcspi3_clk", "dispc2_data11", "rfbi_data11",
900 "safe_mode"),
901 _OMAP4_MUXENTRY(KPD_COL3, 171, "kpd_col3", "kpd_col0", NULL,
902 "gpio_171", NULL, NULL, NULL, "safe_mode"),
903 _OMAP4_MUXENTRY(KPD_COL4, 172, "kpd_col4", "kpd_col1", NULL,
904 "gpio_172", NULL, NULL, NULL, "safe_mode"),
905 _OMAP4_MUXENTRY(KPD_COL5, 173, "kpd_col5", "kpd_col2", NULL,
906 "gpio_173", NULL, NULL, NULL, "safe_mode"),
907 _OMAP4_MUXENTRY(KPD_COL0, 174, "kpd_col0", "kpd_col3", NULL,
908 "gpio_174", NULL, NULL, NULL, "safe_mode"),
909 _OMAP4_MUXENTRY(KPD_COL1, 0, "kpd_col1", "kpd_col4", NULL, "gpio_0",
910 NULL, NULL, NULL, "safe_mode"),
911 _OMAP4_MUXENTRY(KPD_COL2, 1, "kpd_col2", "kpd_col5", NULL, "gpio_1",
912 NULL, NULL, NULL, "safe_mode"),
913 _OMAP4_MUXENTRY(KPD_ROW3, 175, "kpd_row3", "kpd_row0", NULL,
914 "gpio_175", NULL, NULL, NULL, "safe_mode"),
915 _OMAP4_MUXENTRY(KPD_ROW4, 176, "kpd_row4", "kpd_row1", NULL,
916 "gpio_176", NULL, NULL, NULL, "safe_mode"),
917 _OMAP4_MUXENTRY(KPD_ROW5, 177, "kpd_row5", "kpd_row2", NULL,
918 "gpio_177", NULL, NULL, NULL, "safe_mode"),
919 _OMAP4_MUXENTRY(KPD_ROW0, 178, "kpd_row0", "kpd_row3", NULL,
920 "gpio_178", NULL, NULL, NULL, "safe_mode"),
921 _OMAP4_MUXENTRY(KPD_ROW1, 2, "kpd_row1", "kpd_row4", NULL, "gpio_2",
922 NULL, NULL, NULL, "safe_mode"),
923 _OMAP4_MUXENTRY(KPD_ROW2, 3, "kpd_row2", "kpd_row5", NULL, "gpio_3",
924 NULL, NULL, NULL, "safe_mode"),
925 _OMAP4_MUXENTRY(USBA0_OTG_DP, 0, "usba0_otg_dp", "uart3_rx_irrx",
926 "uart2_rx", NULL, NULL, NULL, NULL, "safe_mode"),
927 _OMAP4_MUXENTRY(USBA0_OTG_DM, 0, "usba0_otg_dm", "uart3_tx_irtx",
928 "uart2_tx", NULL, NULL, NULL, NULL, "safe_mode"),
929 _OMAP4_MUXENTRY(DPM_EMU2, 13, "dpm_emu2", "usba0_ulpiphy_clk", NULL,
930 "gpio_13", NULL, "dispc2_fid", "hw_dbg2",
931 "safe_mode"),
932 _OMAP4_MUXENTRY(DPM_EMU3, 14, "dpm_emu3", "usba0_ulpiphy_stp", NULL,
933 "gpio_14", "rfbi_data10", "dispc2_data10", "hw_dbg3",
934 "safe_mode"),
935 _OMAP4_MUXENTRY(DPM_EMU4, 15, "dpm_emu4", "usba0_ulpiphy_dir", NULL,
936 "gpio_15", "rfbi_data9", "dispc2_data9", "hw_dbg4",
937 "safe_mode"),
938 _OMAP4_MUXENTRY(DPM_EMU5, 16, "dpm_emu5", "usba0_ulpiphy_nxt", NULL,
939 "gpio_16", "rfbi_te_vsync0", "dispc2_data16",
940 "hw_dbg5", "safe_mode"),
941 _OMAP4_MUXENTRY(DPM_EMU6, 17, "dpm_emu6", "usba0_ulpiphy_dat0",
942 "uart3_tx_irtx", "gpio_17", "rfbi_hsync0",
943 "dispc2_data17", "hw_dbg6", "safe_mode"),
944 _OMAP4_MUXENTRY(DPM_EMU7, 18, "dpm_emu7", "usba0_ulpiphy_dat1",
945 "uart3_rx_irrx", "gpio_18", "rfbi_cs0",
946 "dispc2_hsync", "hw_dbg7", "safe_mode"),
947 _OMAP4_MUXENTRY(DPM_EMU8, 19, "dpm_emu8", "usba0_ulpiphy_dat2",
948 "uart3_rts_sd", "gpio_19", "rfbi_re", "dispc2_pclk",
949 "hw_dbg8", "safe_mode"),
950 _OMAP4_MUXENTRY(DPM_EMU9, 20, "dpm_emu9", "usba0_ulpiphy_dat3",
951 "uart3_cts_rctx", "gpio_20", "rfbi_we",
952 "dispc2_vsync", "hw_dbg9", "safe_mode"),
953 _OMAP4_MUXENTRY(DPM_EMU10, 21, "dpm_emu10", "usba0_ulpiphy_dat4",
954 NULL, "gpio_21", "rfbi_a0", "dispc2_de", "hw_dbg10",
955 "safe_mode"),
956 _OMAP4_MUXENTRY(DPM_EMU11, 22, "dpm_emu11", "usba0_ulpiphy_dat5",
957 NULL, "gpio_22", "rfbi_data8", "dispc2_data8",
958 "hw_dbg11", "safe_mode"),
959 _OMAP4_MUXENTRY(DPM_EMU12, 23, "dpm_emu12", "usba0_ulpiphy_dat6",
960 NULL, "gpio_23", "rfbi_data7", "dispc2_data7",
961 "hw_dbg12", "safe_mode"),
962 _OMAP4_MUXENTRY(DPM_EMU13, 24, "dpm_emu13", "usba0_ulpiphy_dat7",
963 NULL, "gpio_24", "rfbi_data6", "dispc2_data6",
964 "hw_dbg13", "safe_mode"),
965 _OMAP4_MUXENTRY(DPM_EMU14, 25, "dpm_emu14", "sys_drm_msecure",
966 "uart1_rx", "gpio_25", "rfbi_data5", "dispc2_data5",
967 "hw_dbg14", "safe_mode"),
968 _OMAP4_MUXENTRY(DPM_EMU15, 26, "dpm_emu15", "sys_secure_indicator",
969 NULL, "gpio_26", "rfbi_data4", "dispc2_data4",
970 "hw_dbg15", "safe_mode"),
971 _OMAP4_MUXENTRY(DPM_EMU16, 27, "dpm_emu16", "dmtimer8_pwm_evt",
972 "dsi1_te0", "gpio_27", "rfbi_data3", "dispc2_data3",
973 "hw_dbg16", "safe_mode"),
974 _OMAP4_MUXENTRY(DPM_EMU17, 28, "dpm_emu17", "dmtimer9_pwm_evt",
975 "dsi1_te1", "gpio_28", "rfbi_data2", "dispc2_data2",
976 "hw_dbg17", "safe_mode"),
977 _OMAP4_MUXENTRY(DPM_EMU18, 190, "dpm_emu18", "dmtimer10_pwm_evt",
978 "dsi2_te0", "gpio_190", "rfbi_data1", "dispc2_data1",
979 "hw_dbg18", "safe_mode"),
980 _OMAP4_MUXENTRY(DPM_EMU19, 191, "dpm_emu19", "dmtimer11_pwm_evt",
981 "dsi2_te1", "gpio_191", "rfbi_data0", "dispc2_data0",
982 "hw_dbg19", "safe_mode"),
983 { .reg_offset = OMAP_MUX_TERMINATOR },
984};
985
986/*
987 * Balls for 44XX CBS package
988 * 547-pin CBL ES2.0 S-FPGA-N547, 0.40mm Ball Pitch (Top),
989 * 0.40mm Ball Pitch (Bottom)
990 */
991#if defined(CONFIG_OMAP_MUX) && defined(CONFIG_DEBUG_FS) \
992 && defined(CONFIG_OMAP_PACKAGE_CBS)
993static struct omap_ball __initdata omap4_core_cbs_ball[] = {
994 _OMAP4_BALLENTRY(GPMC_AD0, "c12", NULL),
995 _OMAP4_BALLENTRY(GPMC_AD1, "d12", NULL),
996 _OMAP4_BALLENTRY(GPMC_AD2, "c13", NULL),
997 _OMAP4_BALLENTRY(GPMC_AD3, "d13", NULL),
998 _OMAP4_BALLENTRY(GPMC_AD4, "c15", NULL),
999 _OMAP4_BALLENTRY(GPMC_AD5, "d15", NULL),
1000 _OMAP4_BALLENTRY(GPMC_AD6, "a16", NULL),
1001 _OMAP4_BALLENTRY(GPMC_AD7, "b16", NULL),
1002 _OMAP4_BALLENTRY(GPMC_AD8, "c16", NULL),
1003 _OMAP4_BALLENTRY(GPMC_AD9, "d16", NULL),
1004 _OMAP4_BALLENTRY(GPMC_AD10, "c17", NULL),
1005 _OMAP4_BALLENTRY(GPMC_AD11, "d17", NULL),
1006 _OMAP4_BALLENTRY(GPMC_AD12, "c18", NULL),
1007 _OMAP4_BALLENTRY(GPMC_AD13, "d18", NULL),
1008 _OMAP4_BALLENTRY(GPMC_AD14, "c19", NULL),
1009 _OMAP4_BALLENTRY(GPMC_AD15, "d19", NULL),
1010 _OMAP4_BALLENTRY(GPMC_A16, "b17", NULL),
1011 _OMAP4_BALLENTRY(GPMC_A17, "a18", NULL),
1012 _OMAP4_BALLENTRY(GPMC_A18, "b18", NULL),
1013 _OMAP4_BALLENTRY(GPMC_A19, "a19", NULL),
1014 _OMAP4_BALLENTRY(GPMC_A20, "b19", NULL),
1015 _OMAP4_BALLENTRY(GPMC_A21, "b20", NULL),
1016 _OMAP4_BALLENTRY(GPMC_A22, "a21", NULL),
1017 _OMAP4_BALLENTRY(GPMC_A23, "b21", NULL),
1018 _OMAP4_BALLENTRY(GPMC_A24, "c20", NULL),
1019 _OMAP4_BALLENTRY(GPMC_A25, "d20", NULL),
1020 _OMAP4_BALLENTRY(GPMC_NCS0, "b25", NULL),
1021 _OMAP4_BALLENTRY(GPMC_NCS1, "c21", NULL),
1022 _OMAP4_BALLENTRY(GPMC_NCS2, "d21", NULL),
1023 _OMAP4_BALLENTRY(GPMC_NCS3, "c22", NULL),
1024 _OMAP4_BALLENTRY(GPMC_NWP, "c25", NULL),
1025 _OMAP4_BALLENTRY(GPMC_CLK, "b22", NULL),
1026 _OMAP4_BALLENTRY(GPMC_NADV_ALE, "d25", NULL),
1027 _OMAP4_BALLENTRY(GPMC_NOE, "b11", NULL),
1028 _OMAP4_BALLENTRY(GPMC_NWE, "b12", NULL),
1029 _OMAP4_BALLENTRY(GPMC_NBE0_CLE, "c23", NULL),
1030 _OMAP4_BALLENTRY(GPMC_NBE1, "d22", NULL),
1031 _OMAP4_BALLENTRY(GPMC_WAIT0, "b26", NULL),
1032 _OMAP4_BALLENTRY(GPMC_WAIT1, "b23", NULL),
1033 _OMAP4_BALLENTRY(GPMC_WAIT2, "d23", NULL),
1034 _OMAP4_BALLENTRY(GPMC_NCS4, "a24", NULL),
1035 _OMAP4_BALLENTRY(GPMC_NCS5, "b24", NULL),
1036 _OMAP4_BALLENTRY(GPMC_NCS6, "c24", NULL),
1037 _OMAP4_BALLENTRY(GPMC_NCS7, "d24", NULL),
1038 _OMAP4_BALLENTRY(HDMI_HPD, "b9", NULL),
1039 _OMAP4_BALLENTRY(HDMI_CEC, "b10", NULL),
1040 _OMAP4_BALLENTRY(HDMI_DDC_SCL, "a8", NULL),
1041 _OMAP4_BALLENTRY(HDMI_DDC_SDA, "b8", NULL),
1042 _OMAP4_BALLENTRY(CSI21_DX0, "r26", NULL),
1043 _OMAP4_BALLENTRY(CSI21_DY0, "r25", NULL),
1044 _OMAP4_BALLENTRY(CSI21_DX1, "t26", NULL),
1045 _OMAP4_BALLENTRY(CSI21_DY1, "t25", NULL),
1046 _OMAP4_BALLENTRY(CSI21_DX2, "u26", NULL),
1047 _OMAP4_BALLENTRY(CSI21_DY2, "u25", NULL),
1048 _OMAP4_BALLENTRY(CSI21_DX3, "v26", NULL),
1049 _OMAP4_BALLENTRY(CSI21_DY3, "v25", NULL),
1050 _OMAP4_BALLENTRY(CSI21_DX4, "w26", NULL),
1051 _OMAP4_BALLENTRY(CSI21_DY4, "w25", NULL),
1052 _OMAP4_BALLENTRY(CSI22_DX0, "m26", NULL),
1053 _OMAP4_BALLENTRY(CSI22_DY0, "m25", NULL),
1054 _OMAP4_BALLENTRY(CSI22_DX1, "n26", NULL),
1055 _OMAP4_BALLENTRY(CSI22_DY1, "n25", NULL),
1056 _OMAP4_BALLENTRY(CAM_SHUTTER, "t27", NULL),
1057 _OMAP4_BALLENTRY(CAM_STROBE, "u27", NULL),
1058 _OMAP4_BALLENTRY(CAM_GLOBALRESET, "v27", NULL),
1059 _OMAP4_BALLENTRY(USBB1_ULPITLL_CLK, "ae18", NULL),
1060 _OMAP4_BALLENTRY(USBB1_ULPITLL_STP, "ag19", NULL),
1061 _OMAP4_BALLENTRY(USBB1_ULPITLL_DIR, "af19", NULL),
1062 _OMAP4_BALLENTRY(USBB1_ULPITLL_NXT, "ae19", NULL),
1063 _OMAP4_BALLENTRY(USBB1_ULPITLL_DAT0, "af18", NULL),
1064 _OMAP4_BALLENTRY(USBB1_ULPITLL_DAT1, "ag18", NULL),
1065 _OMAP4_BALLENTRY(USBB1_ULPITLL_DAT2, "ae17", NULL),
1066 _OMAP4_BALLENTRY(USBB1_ULPITLL_DAT3, "af17", NULL),
1067 _OMAP4_BALLENTRY(USBB1_ULPITLL_DAT4, "ah17", NULL),
1068 _OMAP4_BALLENTRY(USBB1_ULPITLL_DAT5, "ae16", NULL),
1069 _OMAP4_BALLENTRY(USBB1_ULPITLL_DAT6, "af16", NULL),
1070 _OMAP4_BALLENTRY(USBB1_ULPITLL_DAT7, "ag16", NULL),
1071 _OMAP4_BALLENTRY(USBB1_HSIC_DATA, "af14", NULL),
1072 _OMAP4_BALLENTRY(USBB1_HSIC_STROBE, "ae14", NULL),
1073 _OMAP4_BALLENTRY(USBC1_ICUSB_DP, "h2", NULL),
1074 _OMAP4_BALLENTRY(USBC1_ICUSB_DM, "h3", NULL),
1075 _OMAP4_BALLENTRY(SDMMC1_CLK, "d2", NULL),
1076 _OMAP4_BALLENTRY(SDMMC1_CMD, "e3", NULL),
1077 _OMAP4_BALLENTRY(SDMMC1_DAT0, "e4", NULL),
1078 _OMAP4_BALLENTRY(SDMMC1_DAT1, "e2", NULL),
1079 _OMAP4_BALLENTRY(SDMMC1_DAT2, "e1", NULL),
1080 _OMAP4_BALLENTRY(SDMMC1_DAT3, "f4", NULL),
1081 _OMAP4_BALLENTRY(SDMMC1_DAT4, "f3", NULL),
1082 _OMAP4_BALLENTRY(SDMMC1_DAT5, "f1", NULL),
1083 _OMAP4_BALLENTRY(SDMMC1_DAT6, "g4", NULL),
1084 _OMAP4_BALLENTRY(SDMMC1_DAT7, "g3", NULL),
1085 _OMAP4_BALLENTRY(ABE_MCBSP2_CLKX, "ad27", NULL),
1086 _OMAP4_BALLENTRY(ABE_MCBSP2_DR, "ad26", NULL),
1087 _OMAP4_BALLENTRY(ABE_MCBSP2_DX, "ad25", NULL),
1088 _OMAP4_BALLENTRY(ABE_MCBSP2_FSX, "ac28", NULL),
1089 _OMAP4_BALLENTRY(ABE_MCBSP1_CLKX, "ac26", NULL),
1090 _OMAP4_BALLENTRY(ABE_MCBSP1_DR, "ac25", NULL),
1091 _OMAP4_BALLENTRY(ABE_MCBSP1_DX, "ab25", NULL),
1092 _OMAP4_BALLENTRY(ABE_MCBSP1_FSX, "ac27", NULL),
1093 _OMAP4_BALLENTRY(ABE_PDM_UL_DATA, "ag25", NULL),
1094 _OMAP4_BALLENTRY(ABE_PDM_DL_DATA, "af25", NULL),
1095 _OMAP4_BALLENTRY(ABE_PDM_FRAME, "ae25", NULL),
1096 _OMAP4_BALLENTRY(ABE_PDM_LB_CLK, "af26", NULL),
1097 _OMAP4_BALLENTRY(ABE_CLKS, "ah26", NULL),
1098 _OMAP4_BALLENTRY(ABE_DMIC_CLK1, "ae24", NULL),
1099 _OMAP4_BALLENTRY(ABE_DMIC_DIN1, "af24", NULL),
1100 _OMAP4_BALLENTRY(ABE_DMIC_DIN2, "ag24", NULL),
1101 _OMAP4_BALLENTRY(ABE_DMIC_DIN3, "ah24", NULL),
1102 _OMAP4_BALLENTRY(UART2_CTS, "ab26", NULL),
1103 _OMAP4_BALLENTRY(UART2_RTS, "ab27", NULL),
1104 _OMAP4_BALLENTRY(UART2_RX, "aa25", NULL),
1105 _OMAP4_BALLENTRY(UART2_TX, "aa26", NULL),
1106 _OMAP4_BALLENTRY(HDQ_SIO, "aa27", NULL),
1107 _OMAP4_BALLENTRY(I2C1_SCL, "ae28", NULL),
1108 _OMAP4_BALLENTRY(I2C1_SDA, "ae26", NULL),
1109 _OMAP4_BALLENTRY(I2C2_SCL, "c26", NULL),
1110 _OMAP4_BALLENTRY(I2C2_SDA, "d26", NULL),
1111 _OMAP4_BALLENTRY(I2C3_SCL, "w27", NULL),
1112 _OMAP4_BALLENTRY(I2C3_SDA, "y27", NULL),
1113 _OMAP4_BALLENTRY(I2C4_SCL, "ag21", NULL),
1114 _OMAP4_BALLENTRY(I2C4_SDA, "ah22", NULL),
1115 _OMAP4_BALLENTRY(MCSPI1_CLK, "af22", NULL),
1116 _OMAP4_BALLENTRY(MCSPI1_SOMI, "ae22", NULL),
1117 _OMAP4_BALLENTRY(MCSPI1_SIMO, "ag22", NULL),
1118 _OMAP4_BALLENTRY(MCSPI1_CS0, "ae23", NULL),
1119 _OMAP4_BALLENTRY(MCSPI1_CS1, "af23", NULL),
1120 _OMAP4_BALLENTRY(MCSPI1_CS2, "ag23", NULL),
1121 _OMAP4_BALLENTRY(MCSPI1_CS3, "ah23", NULL),
1122 _OMAP4_BALLENTRY(UART3_CTS_RCTX, "f27", NULL),
1123 _OMAP4_BALLENTRY(UART3_RTS_SD, "f28", NULL),
1124 _OMAP4_BALLENTRY(UART3_RX_IRRX, "g27", NULL),
1125 _OMAP4_BALLENTRY(UART3_TX_IRTX, "g28", NULL),
1126 _OMAP4_BALLENTRY(SDMMC5_CLK, "ae5", NULL),
1127 _OMAP4_BALLENTRY(SDMMC5_CMD, "af5", NULL),
1128 _OMAP4_BALLENTRY(SDMMC5_DAT0, "ae4", NULL),
1129 _OMAP4_BALLENTRY(SDMMC5_DAT1, "af4", NULL),
1130 _OMAP4_BALLENTRY(SDMMC5_DAT2, "ag3", NULL),
1131 _OMAP4_BALLENTRY(SDMMC5_DAT3, "af3", NULL),
1132 _OMAP4_BALLENTRY(MCSPI4_CLK, "ae21", NULL),
1133 _OMAP4_BALLENTRY(MCSPI4_SIMO, "af20", NULL),
1134 _OMAP4_BALLENTRY(MCSPI4_SOMI, "af21", NULL),
1135 _OMAP4_BALLENTRY(MCSPI4_CS0, "ae20", NULL),
1136 _OMAP4_BALLENTRY(UART4_RX, "ag20", NULL),
1137 _OMAP4_BALLENTRY(UART4_TX, "ah19", NULL),
1138 _OMAP4_BALLENTRY(USBB2_ULPITLL_CLK, "ag12", NULL),
1139 _OMAP4_BALLENTRY(USBB2_ULPITLL_STP, "af12", NULL),
1140 _OMAP4_BALLENTRY(USBB2_ULPITLL_DIR, "ae12", NULL),
1141 _OMAP4_BALLENTRY(USBB2_ULPITLL_NXT, "ag13", NULL),
1142 _OMAP4_BALLENTRY(USBB2_ULPITLL_DAT0, "ae11", NULL),
1143 _OMAP4_BALLENTRY(USBB2_ULPITLL_DAT1, "af11", NULL),
1144 _OMAP4_BALLENTRY(USBB2_ULPITLL_DAT2, "ag11", NULL),
1145 _OMAP4_BALLENTRY(USBB2_ULPITLL_DAT3, "ah11", NULL),
1146 _OMAP4_BALLENTRY(USBB2_ULPITLL_DAT4, "ae10", NULL),
1147 _OMAP4_BALLENTRY(USBB2_ULPITLL_DAT5, "af10", NULL),
1148 _OMAP4_BALLENTRY(USBB2_ULPITLL_DAT6, "ag10", NULL),
1149 _OMAP4_BALLENTRY(USBB2_ULPITLL_DAT7, "ae9", NULL),
1150 _OMAP4_BALLENTRY(USBB2_HSIC_DATA, "af13", NULL),
1151 _OMAP4_BALLENTRY(USBB2_HSIC_STROBE, "ae13", NULL),
1152 _OMAP4_BALLENTRY(KPD_COL3, "g26", NULL),
1153 _OMAP4_BALLENTRY(KPD_COL4, "g25", NULL),
1154 _OMAP4_BALLENTRY(KPD_COL5, "h26", NULL),
1155 _OMAP4_BALLENTRY(KPD_COL0, "h25", NULL),
1156 _OMAP4_BALLENTRY(KPD_COL1, "j27", NULL),
1157 _OMAP4_BALLENTRY(KPD_COL2, "h27", NULL),
1158 _OMAP4_BALLENTRY(KPD_ROW3, "j26", NULL),
1159 _OMAP4_BALLENTRY(KPD_ROW4, "j25", NULL),
1160 _OMAP4_BALLENTRY(KPD_ROW5, "k26", NULL),
1161 _OMAP4_BALLENTRY(KPD_ROW0, "k25", NULL),
1162 _OMAP4_BALLENTRY(KPD_ROW1, "l27", NULL),
1163 _OMAP4_BALLENTRY(KPD_ROW2, "k27", NULL),
1164 _OMAP4_BALLENTRY(USBA0_OTG_CE, "c3", NULL),
1165 _OMAP4_BALLENTRY(USBA0_OTG_DP, "b5", NULL),
1166 _OMAP4_BALLENTRY(USBA0_OTG_DM, "b4", NULL),
1167 _OMAP4_BALLENTRY(FREF_CLK1_OUT, "aa28", NULL),
1168 _OMAP4_BALLENTRY(FREF_CLK2_OUT, "y28", NULL),
1169 _OMAP4_BALLENTRY(SYS_NIRQ1, "ae6", NULL),
1170 _OMAP4_BALLENTRY(SYS_NIRQ2, "af6", NULL),
1171 _OMAP4_BALLENTRY(SYS_BOOT0, "f26", NULL),
1172 _OMAP4_BALLENTRY(SYS_BOOT1, "e27", NULL),
1173 _OMAP4_BALLENTRY(SYS_BOOT2, "e26", NULL),
1174 _OMAP4_BALLENTRY(SYS_BOOT3, "e25", NULL),
1175 _OMAP4_BALLENTRY(SYS_BOOT4, "d28", NULL),
1176 _OMAP4_BALLENTRY(SYS_BOOT5, "d27", NULL),
1177 _OMAP4_BALLENTRY(DPM_EMU0, "m2", NULL),
1178 _OMAP4_BALLENTRY(DPM_EMU1, "n2", NULL),
1179 _OMAP4_BALLENTRY(DPM_EMU2, "p2", NULL),
1180 _OMAP4_BALLENTRY(DPM_EMU3, "v1", NULL),
1181 _OMAP4_BALLENTRY(DPM_EMU4, "v2", NULL),
1182 _OMAP4_BALLENTRY(DPM_EMU5, "w1", NULL),
1183 _OMAP4_BALLENTRY(DPM_EMU6, "w2", NULL),
1184 _OMAP4_BALLENTRY(DPM_EMU7, "w3", NULL),
1185 _OMAP4_BALLENTRY(DPM_EMU8, "w4", NULL),
1186 _OMAP4_BALLENTRY(DPM_EMU9, "y2", NULL),
1187 _OMAP4_BALLENTRY(DPM_EMU10, "y3", NULL),
1188 _OMAP4_BALLENTRY(DPM_EMU11, "y4", NULL),
1189 _OMAP4_BALLENTRY(DPM_EMU12, "aa1", NULL),
1190 _OMAP4_BALLENTRY(DPM_EMU13, "aa2", NULL),
1191 _OMAP4_BALLENTRY(DPM_EMU14, "aa3", NULL),
1192 _OMAP4_BALLENTRY(DPM_EMU15, "aa4", NULL),
1193 _OMAP4_BALLENTRY(DPM_EMU16, "ab2", NULL),
1194 _OMAP4_BALLENTRY(DPM_EMU17, "ab3", NULL),
1195 _OMAP4_BALLENTRY(DPM_EMU18, "ab4", NULL),
1196 _OMAP4_BALLENTRY(DPM_EMU19, "ac4", NULL),
1197 { .reg_offset = OMAP_MUX_TERMINATOR },
1198};
1199#else
1200#define omap4_core_cbs_ball NULL
1201#endif
1202
1203/*
1204 * Superset of all mux modes for omap4
1205 */
1206static struct omap_mux __initdata omap4_wkup_muxmodes[] = {
1207 _OMAP4_MUXENTRY(SIM_IO, 0, "sim_io", NULL, NULL, "gpio_wk0", NULL,
1208 NULL, NULL, "safe_mode"),
1209 _OMAP4_MUXENTRY(SIM_CLK, 1, "sim_clk", NULL, NULL, "gpio_wk1", NULL,
1210 NULL, NULL, "safe_mode"),
1211 _OMAP4_MUXENTRY(SIM_RESET, 2, "sim_reset", NULL, NULL, "gpio_wk2",
1212 NULL, NULL, NULL, "safe_mode"),
1213 _OMAP4_MUXENTRY(SIM_CD, 3, "sim_cd", NULL, NULL, "gpio_wk3", NULL,
1214 NULL, NULL, "safe_mode"),
1215 _OMAP4_MUXENTRY(SIM_PWRCTRL, 4, "sim_pwrctrl", NULL, NULL, "gpio_wk4",
1216 NULL, NULL, NULL, "safe_mode"),
1217 _OMAP4_MUXENTRY(SR_SCL, 0, "sr_scl", NULL, NULL, NULL, NULL, NULL,
1218 NULL, NULL),
1219 _OMAP4_MUXENTRY(SR_SDA, 0, "sr_sda", NULL, NULL, NULL, NULL, NULL,
1220 NULL, NULL),
1221 _OMAP4_MUXENTRY(FREF_XTAL_IN, 0, "fref_xtal_in", NULL, NULL, NULL,
1222 "c2c_wakereqin", NULL, NULL, NULL),
1223 _OMAP4_MUXENTRY(FREF_SLICER_IN, 0, "fref_slicer_in", NULL, NULL,
1224 "gpi_wk5", "c2c_wakereqin", NULL, NULL, "safe_mode"),
1225 _OMAP4_MUXENTRY(FREF_CLK_IOREQ, 0, "fref_clk_ioreq", NULL, NULL, NULL,
1226 NULL, NULL, NULL, NULL),
1227 _OMAP4_MUXENTRY(FREF_CLK0_OUT, 6, "fref_clk0_out", "fref_clk1_req",
1228 "sys_drm_msecure", "gpio_wk6", NULL, NULL, NULL,
1229 "safe_mode"),
1230 _OMAP4_MUXENTRY(FREF_CLK3_REQ, 30, "fref_clk3_req", "fref_clk1_req",
1231 "sys_drm_msecure", "gpio_wk30", "c2c_wakereqin", NULL,
1232 NULL, "safe_mode"),
1233 _OMAP4_MUXENTRY(FREF_CLK3_OUT, 31, "fref_clk3_out", "fref_clk2_req",
1234 "sys_secure_indicator", "gpio_wk31", "c2c_wakereqout",
1235 NULL, NULL, "safe_mode"),
1236 _OMAP4_MUXENTRY(FREF_CLK4_REQ, 7, "fref_clk4_req", "fref_clk5_out",
1237 NULL, "gpio_wk7", NULL, NULL, NULL, NULL),
1238 _OMAP4_MUXENTRY(FREF_CLK4_OUT, 8, "fref_clk4_out", NULL, NULL,
1239 "gpio_wk8", NULL, NULL, NULL, NULL),
1240 _OMAP4_MUXENTRY(SYS_32K, 0, "sys_32k", NULL, NULL, NULL, NULL, NULL,
1241 NULL, NULL),
1242 _OMAP4_MUXENTRY(SYS_NRESPWRON, 0, "sys_nrespwron", NULL, NULL, NULL,
1243 NULL, NULL, NULL, NULL),
1244 _OMAP4_MUXENTRY(SYS_NRESWARM, 0, "sys_nreswarm", NULL, NULL, NULL,
1245 NULL, NULL, NULL, NULL),
1246 _OMAP4_MUXENTRY(SYS_PWR_REQ, 0, "sys_pwr_req", NULL, NULL, NULL, NULL,
1247 NULL, NULL, NULL),
1248 _OMAP4_MUXENTRY(SYS_PWRON_RESET_OUT, 29, "sys_pwron_reset_out", NULL,
1249 NULL, "gpio_wk29", NULL, NULL, NULL, NULL),
1250 _OMAP4_MUXENTRY(SYS_BOOT6, 9, "sys_boot6", "dpm_emu18", NULL,
1251 "gpio_wk9", "c2c_wakereqout", NULL, NULL,
1252 "safe_mode"),
1253 _OMAP4_MUXENTRY(SYS_BOOT7, 10, "sys_boot7", "dpm_emu19", NULL,
1254 "gpio_wk10", NULL, NULL, NULL, "safe_mode"),
1255 _OMAP4_MUXENTRY(JTAG_NTRST, 0, "jtag_ntrst", NULL, NULL, NULL, NULL,
1256 NULL, NULL, NULL),
1257 _OMAP4_MUXENTRY(JTAG_TCK, 0, "jtag_tck", NULL, NULL, NULL, NULL, NULL,
1258 NULL, "safe_mode"),
1259 _OMAP4_MUXENTRY(JTAG_RTCK, 0, "jtag_rtck", NULL, NULL, NULL, NULL,
1260 NULL, NULL, NULL),
1261 _OMAP4_MUXENTRY(JTAG_TMS_TMSC, 0, "jtag_tms_tmsc", NULL, NULL, NULL,
1262 NULL, NULL, NULL, "safe_mode"),
1263 _OMAP4_MUXENTRY(JTAG_TDI, 0, "jtag_tdi", NULL, NULL, NULL, NULL, NULL,
1264 NULL, NULL),
1265 _OMAP4_MUXENTRY(JTAG_TDO, 0, "jtag_tdo", NULL, NULL, NULL, NULL, NULL,
1266 NULL, NULL),
1267 { .reg_offset = OMAP_MUX_TERMINATOR },
1268};
1269
1270/*
1271 * Balls for 44XX CBL & CBS package - wakeup partition
1272 * 547-pin CBL ES1.0 S-FPGA-N547, 0.40mm Ball Pitch (Top),
1273 * 0.40mm Ball Pitch (Bottom)
1274 */
1275#if defined(CONFIG_OMAP_MUX) && defined(CONFIG_DEBUG_FS) \
1276 && defined(CONFIG_OMAP_PACKAGE_CBL)
1277static struct omap_ball __initdata omap4_wkup_cbl_cbs_ball[] = {
1278 _OMAP4_BALLENTRY(SIM_IO, "h4", NULL),
1279 _OMAP4_BALLENTRY(SIM_CLK, "j2", NULL),
1280 _OMAP4_BALLENTRY(SIM_RESET, "g2", NULL),
1281 _OMAP4_BALLENTRY(SIM_CD, "j1", NULL),
1282 _OMAP4_BALLENTRY(SIM_PWRCTRL, "k1", NULL),
1283 _OMAP4_BALLENTRY(SR_SCL, "ag9", NULL),
1284 _OMAP4_BALLENTRY(SR_SDA, "af9", NULL),
1285 _OMAP4_BALLENTRY(FREF_XTAL_IN, "ah6", NULL),
1286 _OMAP4_BALLENTRY(FREF_SLICER_IN, "ag8", NULL),
1287 _OMAP4_BALLENTRY(FREF_CLK_IOREQ, "ad1", NULL),
1288 _OMAP4_BALLENTRY(FREF_CLK0_OUT, "ad2", NULL),
1289 _OMAP4_BALLENTRY(FREF_CLK3_REQ, "ad3", NULL),
1290 _OMAP4_BALLENTRY(FREF_CLK3_OUT, "ad4", NULL),
1291 _OMAP4_BALLENTRY(FREF_CLK4_REQ, "ac2", NULL),
1292 _OMAP4_BALLENTRY(FREF_CLK4_OUT, "ac3", NULL),
1293 _OMAP4_BALLENTRY(SYS_32K, "ag7", NULL),
1294 _OMAP4_BALLENTRY(SYS_NRESPWRON, "ae7", NULL),
1295 _OMAP4_BALLENTRY(SYS_NRESWARM, "af7", NULL),
1296 _OMAP4_BALLENTRY(SYS_PWR_REQ, "ah7", NULL),
1297 _OMAP4_BALLENTRY(SYS_PWRON_RESET_OUT, "ag6", NULL),
1298 _OMAP4_BALLENTRY(SYS_BOOT6, "af8", NULL),
1299 _OMAP4_BALLENTRY(SYS_BOOT7, "ae8", NULL),
1300 _OMAP4_BALLENTRY(JTAG_NTRST, "ah2", NULL),
1301 _OMAP4_BALLENTRY(JTAG_TCK, "ag1", NULL),
1302 _OMAP4_BALLENTRY(JTAG_RTCK, "ae3", NULL),
1303 _OMAP4_BALLENTRY(JTAG_TMS_TMSC, "ah1", NULL),
1304 _OMAP4_BALLENTRY(JTAG_TDI, "ae1", NULL),
1305 _OMAP4_BALLENTRY(JTAG_TDO, "ae2", NULL),
1306 { .reg_offset = OMAP_MUX_TERMINATOR },
1307};
1308#else
1309#define omap4_wkup_cbl_cbs_ball NULL
1310#endif
1311
1312int __init omap4_mux_init(struct omap_board_mux *board_subset,
1313 struct omap_board_mux *board_wkup_subset, int flags)
1314{
1315 struct omap_ball *package_balls_core;
1316 struct omap_ball *package_balls_wkup = omap4_wkup_cbl_cbs_ball;
1317 struct omap_mux *core_muxmodes;
1318 struct omap_mux *core_subset = NULL;
1319 int ret;
1320
1321 switch (flags & OMAP_PACKAGE_MASK) {
1322 case OMAP_PACKAGE_CBL:
1323 pr_debug("%s: OMAP4430 ES1.0 -> OMAP_PACKAGE_CBL\n", __func__);
1324 package_balls_core = omap4_core_cbl_ball;
1325 core_muxmodes = omap4_core_muxmodes;
1326 break;
1327 case OMAP_PACKAGE_CBS:
1328 pr_debug("%s: OMAP4430 ES2.X -> OMAP_PACKAGE_CBS\n", __func__);
1329 package_balls_core = omap4_core_cbs_ball;
1330 core_muxmodes = omap4_core_muxmodes;
1331 core_subset = omap4_es2_core_subset;
1332 break;
1333 default:
1334 pr_err("%s: Unknown omap package, mux disabled\n", __func__);
1335 return -EINVAL;
1336 }
1337
1338 ret = omap_mux_init("core",
1339 OMAP_MUX_GPIO_IN_MODE3,
1340 OMAP4_CTRL_MODULE_PAD_CORE_MUX_PBASE,
1341 OMAP4_CTRL_MODULE_PAD_CORE_MUX_SIZE,
1342 core_muxmodes, core_subset, board_subset,
1343 package_balls_core);
1344 if (ret)
1345 return ret;
1346
1347 ret = omap_mux_init("wkup",
1348 OMAP_MUX_GPIO_IN_MODE3,
1349 OMAP4_CTRL_MODULE_PAD_WKUP_MUX_PBASE,
1350 OMAP4_CTRL_MODULE_PAD_WKUP_MUX_SIZE,
1351 omap4_wkup_muxmodes, NULL, board_wkup_subset,
1352 package_balls_wkup);
1353
1354 return ret;
1355}
1356
diff --git a/arch/arm/mach-omap2/mux44xx.h b/arch/arm/mach-omap2/mux44xx.h
deleted file mode 100644
index c635026cd7e9..000000000000
--- a/arch/arm/mach-omap2/mux44xx.h
+++ /dev/null
@@ -1,298 +0,0 @@
1/*
2 * OMAP44xx MUX registers and bitfields
3 *
4 * Copyright (C) 2009-2010 Texas Instruments, Inc.
5 *
6 * Benoit Cousson (b-cousson@ti.com)
7 *
8 * This file is automatically generated from the OMAP hardware databases.
9 * We respectfully ask that any modifications to this file be coordinated
10 * with the public linux-omap@vger.kernel.org mailing list and the
11 * authors above to ensure that the autogeneration scripts are kept
12 * up-to-date with the file contents.
13 *
14 * This program is free software; you can redistribute it and/or modify
15 * it under the terms of the GNU General Public License version 2 as
16 * published by the Free Software Foundation.
17 */
18
19#ifndef __ARCH_ARM_MACH_OMAP2_MUX_44XX_H
20#define __ARCH_ARM_MACH_OMAP2_MUX_44XX_H
21
22#define OMAP4_MUX(M0, mux_value) \
23{ \
24 .reg_offset = (OMAP4_CTRL_MODULE_PAD_##M0##_OFFSET), \
25 .value = (mux_value), \
26}
27
28/* ctrl_module_pad_core base address */
29#define OMAP4_CTRL_MODULE_PAD_CORE_MUX_PBASE 0x4a100000
30
31/* ctrl_module_pad_core registers offset */
32#define OMAP4_CTRL_MODULE_PAD_GPMC_AD0_OFFSET 0x0040
33#define OMAP4_CTRL_MODULE_PAD_GPMC_AD1_OFFSET 0x0042
34#define OMAP4_CTRL_MODULE_PAD_GPMC_AD2_OFFSET 0x0044
35#define OMAP4_CTRL_MODULE_PAD_GPMC_AD3_OFFSET 0x0046
36#define OMAP4_CTRL_MODULE_PAD_GPMC_AD4_OFFSET 0x0048
37#define OMAP4_CTRL_MODULE_PAD_GPMC_AD5_OFFSET 0x004a
38#define OMAP4_CTRL_MODULE_PAD_GPMC_AD6_OFFSET 0x004c
39#define OMAP4_CTRL_MODULE_PAD_GPMC_AD7_OFFSET 0x004e
40#define OMAP4_CTRL_MODULE_PAD_GPMC_AD8_OFFSET 0x0050
41#define OMAP4_CTRL_MODULE_PAD_GPMC_AD9_OFFSET 0x0052
42#define OMAP4_CTRL_MODULE_PAD_GPMC_AD10_OFFSET 0x0054
43#define OMAP4_CTRL_MODULE_PAD_GPMC_AD11_OFFSET 0x0056
44#define OMAP4_CTRL_MODULE_PAD_GPMC_AD12_OFFSET 0x0058
45#define OMAP4_CTRL_MODULE_PAD_GPMC_AD13_OFFSET 0x005a
46#define OMAP4_CTRL_MODULE_PAD_GPMC_AD14_OFFSET 0x005c
47#define OMAP4_CTRL_MODULE_PAD_GPMC_AD15_OFFSET 0x005e
48#define OMAP4_CTRL_MODULE_PAD_GPMC_A16_OFFSET 0x0060
49#define OMAP4_CTRL_MODULE_PAD_GPMC_A17_OFFSET 0x0062
50#define OMAP4_CTRL_MODULE_PAD_GPMC_A18_OFFSET 0x0064
51#define OMAP4_CTRL_MODULE_PAD_GPMC_A19_OFFSET 0x0066
52#define OMAP4_CTRL_MODULE_PAD_GPMC_A20_OFFSET 0x0068
53#define OMAP4_CTRL_MODULE_PAD_GPMC_A21_OFFSET 0x006a
54#define OMAP4_CTRL_MODULE_PAD_GPMC_A22_OFFSET 0x006c
55#define OMAP4_CTRL_MODULE_PAD_GPMC_A23_OFFSET 0x006e
56#define OMAP4_CTRL_MODULE_PAD_GPMC_A24_OFFSET 0x0070
57#define OMAP4_CTRL_MODULE_PAD_GPMC_A25_OFFSET 0x0072
58#define OMAP4_CTRL_MODULE_PAD_GPMC_NCS0_OFFSET 0x0074
59#define OMAP4_CTRL_MODULE_PAD_GPMC_NCS1_OFFSET 0x0076
60#define OMAP4_CTRL_MODULE_PAD_GPMC_NCS2_OFFSET 0x0078
61#define OMAP4_CTRL_MODULE_PAD_GPMC_NCS3_OFFSET 0x007a
62#define OMAP4_CTRL_MODULE_PAD_GPMC_NWP_OFFSET 0x007c
63#define OMAP4_CTRL_MODULE_PAD_GPMC_CLK_OFFSET 0x007e
64#define OMAP4_CTRL_MODULE_PAD_GPMC_NADV_ALE_OFFSET 0x0080
65#define OMAP4_CTRL_MODULE_PAD_GPMC_NOE_OFFSET 0x0082
66#define OMAP4_CTRL_MODULE_PAD_GPMC_NWE_OFFSET 0x0084
67#define OMAP4_CTRL_MODULE_PAD_GPMC_NBE0_CLE_OFFSET 0x0086
68#define OMAP4_CTRL_MODULE_PAD_GPMC_NBE1_OFFSET 0x0088
69#define OMAP4_CTRL_MODULE_PAD_GPMC_WAIT0_OFFSET 0x008a
70#define OMAP4_CTRL_MODULE_PAD_GPMC_WAIT1_OFFSET 0x008c
71#define OMAP4_CTRL_MODULE_PAD_C2C_DATA11_OFFSET 0x008e
72#define OMAP4_CTRL_MODULE_PAD_C2C_DATA12_OFFSET 0x0090
73#define OMAP4_CTRL_MODULE_PAD_C2C_DATA13_OFFSET 0x0092
74#define OMAP4_CTRL_MODULE_PAD_C2C_DATA14_OFFSET 0x0094
75#define OMAP4_CTRL_MODULE_PAD_C2C_DATA15_OFFSET 0x0096
76#define OMAP4_CTRL_MODULE_PAD_HDMI_HPD_OFFSET 0x0098
77#define OMAP4_CTRL_MODULE_PAD_HDMI_CEC_OFFSET 0x009a
78#define OMAP4_CTRL_MODULE_PAD_HDMI_DDC_SCL_OFFSET 0x009c
79#define OMAP4_CTRL_MODULE_PAD_HDMI_DDC_SDA_OFFSET 0x009e
80#define OMAP4_CTRL_MODULE_PAD_CSI21_DX0_OFFSET 0x00a0
81#define OMAP4_CTRL_MODULE_PAD_CSI21_DY0_OFFSET 0x00a2
82#define OMAP4_CTRL_MODULE_PAD_CSI21_DX1_OFFSET 0x00a4
83#define OMAP4_CTRL_MODULE_PAD_CSI21_DY1_OFFSET 0x00a6
84#define OMAP4_CTRL_MODULE_PAD_CSI21_DX2_OFFSET 0x00a8
85#define OMAP4_CTRL_MODULE_PAD_CSI21_DY2_OFFSET 0x00aa
86#define OMAP4_CTRL_MODULE_PAD_CSI21_DX3_OFFSET 0x00ac
87#define OMAP4_CTRL_MODULE_PAD_CSI21_DY3_OFFSET 0x00ae
88#define OMAP4_CTRL_MODULE_PAD_CSI21_DX4_OFFSET 0x00b0
89#define OMAP4_CTRL_MODULE_PAD_CSI21_DY4_OFFSET 0x00b2
90#define OMAP4_CTRL_MODULE_PAD_CSI22_DX0_OFFSET 0x00b4
91#define OMAP4_CTRL_MODULE_PAD_CSI22_DY0_OFFSET 0x00b6
92#define OMAP4_CTRL_MODULE_PAD_CSI22_DX1_OFFSET 0x00b8
93#define OMAP4_CTRL_MODULE_PAD_CSI22_DY1_OFFSET 0x00ba
94#define OMAP4_CTRL_MODULE_PAD_CAM_SHUTTER_OFFSET 0x00bc
95#define OMAP4_CTRL_MODULE_PAD_CAM_STROBE_OFFSET 0x00be
96#define OMAP4_CTRL_MODULE_PAD_CAM_GLOBALRESET_OFFSET 0x00c0
97#define OMAP4_CTRL_MODULE_PAD_USBB1_ULPITLL_CLK_OFFSET 0x00c2
98#define OMAP4_CTRL_MODULE_PAD_USBB1_ULPITLL_STP_OFFSET 0x00c4
99#define OMAP4_CTRL_MODULE_PAD_USBB1_ULPITLL_DIR_OFFSET 0x00c6
100#define OMAP4_CTRL_MODULE_PAD_USBB1_ULPITLL_NXT_OFFSET 0x00c8
101#define OMAP4_CTRL_MODULE_PAD_USBB1_ULPITLL_DAT0_OFFSET 0x00ca
102#define OMAP4_CTRL_MODULE_PAD_USBB1_ULPITLL_DAT1_OFFSET 0x00cc
103#define OMAP4_CTRL_MODULE_PAD_USBB1_ULPITLL_DAT2_OFFSET 0x00ce
104#define OMAP4_CTRL_MODULE_PAD_USBB1_ULPITLL_DAT3_OFFSET 0x00d0
105#define OMAP4_CTRL_MODULE_PAD_USBB1_ULPITLL_DAT4_OFFSET 0x00d2
106#define OMAP4_CTRL_MODULE_PAD_USBB1_ULPITLL_DAT5_OFFSET 0x00d4
107#define OMAP4_CTRL_MODULE_PAD_USBB1_ULPITLL_DAT6_OFFSET 0x00d6
108#define OMAP4_CTRL_MODULE_PAD_USBB1_ULPITLL_DAT7_OFFSET 0x00d8
109#define OMAP4_CTRL_MODULE_PAD_USBB1_HSIC_DATA_OFFSET 0x00da
110#define OMAP4_CTRL_MODULE_PAD_USBB1_HSIC_STROBE_OFFSET 0x00dc
111#define OMAP4_CTRL_MODULE_PAD_USBC1_ICUSB_DP_OFFSET 0x00de
112#define OMAP4_CTRL_MODULE_PAD_USBC1_ICUSB_DM_OFFSET 0x00e0
113#define OMAP4_CTRL_MODULE_PAD_SDMMC1_CLK_OFFSET 0x00e2
114#define OMAP4_CTRL_MODULE_PAD_SDMMC1_CMD_OFFSET 0x00e4
115#define OMAP4_CTRL_MODULE_PAD_SDMMC1_DAT0_OFFSET 0x00e6
116#define OMAP4_CTRL_MODULE_PAD_SDMMC1_DAT1_OFFSET 0x00e8
117#define OMAP4_CTRL_MODULE_PAD_SDMMC1_DAT2_OFFSET 0x00ea
118#define OMAP4_CTRL_MODULE_PAD_SDMMC1_DAT3_OFFSET 0x00ec
119#define OMAP4_CTRL_MODULE_PAD_SDMMC1_DAT4_OFFSET 0x00ee
120#define OMAP4_CTRL_MODULE_PAD_SDMMC1_DAT5_OFFSET 0x00f0
121#define OMAP4_CTRL_MODULE_PAD_SDMMC1_DAT6_OFFSET 0x00f2
122#define OMAP4_CTRL_MODULE_PAD_SDMMC1_DAT7_OFFSET 0x00f4
123#define OMAP4_CTRL_MODULE_PAD_ABE_MCBSP2_CLKX_OFFSET 0x00f6
124#define OMAP4_CTRL_MODULE_PAD_ABE_MCBSP2_DR_OFFSET 0x00f8
125#define OMAP4_CTRL_MODULE_PAD_ABE_MCBSP2_DX_OFFSET 0x00fa
126#define OMAP4_CTRL_MODULE_PAD_ABE_MCBSP2_FSX_OFFSET 0x00fc
127#define OMAP4_CTRL_MODULE_PAD_ABE_MCBSP1_CLKX_OFFSET 0x00fe
128#define OMAP4_CTRL_MODULE_PAD_ABE_MCBSP1_DR_OFFSET 0x0100
129#define OMAP4_CTRL_MODULE_PAD_ABE_MCBSP1_DX_OFFSET 0x0102
130#define OMAP4_CTRL_MODULE_PAD_ABE_MCBSP1_FSX_OFFSET 0x0104
131#define OMAP4_CTRL_MODULE_PAD_ABE_PDM_UL_DATA_OFFSET 0x0106
132#define OMAP4_CTRL_MODULE_PAD_ABE_PDM_DL_DATA_OFFSET 0x0108
133#define OMAP4_CTRL_MODULE_PAD_ABE_PDM_FRAME_OFFSET 0x010a
134#define OMAP4_CTRL_MODULE_PAD_ABE_PDM_LB_CLK_OFFSET 0x010c
135#define OMAP4_CTRL_MODULE_PAD_ABE_CLKS_OFFSET 0x010e
136#define OMAP4_CTRL_MODULE_PAD_ABE_DMIC_CLK1_OFFSET 0x0110
137#define OMAP4_CTRL_MODULE_PAD_ABE_DMIC_DIN1_OFFSET 0x0112
138#define OMAP4_CTRL_MODULE_PAD_ABE_DMIC_DIN2_OFFSET 0x0114
139#define OMAP4_CTRL_MODULE_PAD_ABE_DMIC_DIN3_OFFSET 0x0116
140#define OMAP4_CTRL_MODULE_PAD_UART2_CTS_OFFSET 0x0118
141#define OMAP4_CTRL_MODULE_PAD_UART2_RTS_OFFSET 0x011a
142#define OMAP4_CTRL_MODULE_PAD_UART2_RX_OFFSET 0x011c
143#define OMAP4_CTRL_MODULE_PAD_UART2_TX_OFFSET 0x011e
144#define OMAP4_CTRL_MODULE_PAD_HDQ_SIO_OFFSET 0x0120
145#define OMAP4_CTRL_MODULE_PAD_I2C1_SCL_OFFSET 0x0122
146#define OMAP4_CTRL_MODULE_PAD_I2C1_SDA_OFFSET 0x0124
147#define OMAP4_CTRL_MODULE_PAD_I2C2_SCL_OFFSET 0x0126
148#define OMAP4_CTRL_MODULE_PAD_I2C2_SDA_OFFSET 0x0128
149#define OMAP4_CTRL_MODULE_PAD_I2C3_SCL_OFFSET 0x012a
150#define OMAP4_CTRL_MODULE_PAD_I2C3_SDA_OFFSET 0x012c
151#define OMAP4_CTRL_MODULE_PAD_I2C4_SCL_OFFSET 0x012e
152#define OMAP4_CTRL_MODULE_PAD_I2C4_SDA_OFFSET 0x0130
153#define OMAP4_CTRL_MODULE_PAD_MCSPI1_CLK_OFFSET 0x0132
154#define OMAP4_CTRL_MODULE_PAD_MCSPI1_SOMI_OFFSET 0x0134
155#define OMAP4_CTRL_MODULE_PAD_MCSPI1_SIMO_OFFSET 0x0136
156#define OMAP4_CTRL_MODULE_PAD_MCSPI1_CS0_OFFSET 0x0138
157#define OMAP4_CTRL_MODULE_PAD_MCSPI1_CS1_OFFSET 0x013a
158#define OMAP4_CTRL_MODULE_PAD_MCSPI1_CS2_OFFSET 0x013c
159#define OMAP4_CTRL_MODULE_PAD_MCSPI1_CS3_OFFSET 0x013e
160#define OMAP4_CTRL_MODULE_PAD_UART3_CTS_RCTX_OFFSET 0x0140
161#define OMAP4_CTRL_MODULE_PAD_UART3_RTS_SD_OFFSET 0x0142
162#define OMAP4_CTRL_MODULE_PAD_UART3_RX_IRRX_OFFSET 0x0144
163#define OMAP4_CTRL_MODULE_PAD_UART3_TX_IRTX_OFFSET 0x0146
164#define OMAP4_CTRL_MODULE_PAD_SDMMC5_CLK_OFFSET 0x0148
165#define OMAP4_CTRL_MODULE_PAD_SDMMC5_CMD_OFFSET 0x014a
166#define OMAP4_CTRL_MODULE_PAD_SDMMC5_DAT0_OFFSET 0x014c
167#define OMAP4_CTRL_MODULE_PAD_SDMMC5_DAT1_OFFSET 0x014e
168#define OMAP4_CTRL_MODULE_PAD_SDMMC5_DAT2_OFFSET 0x0150
169#define OMAP4_CTRL_MODULE_PAD_SDMMC5_DAT3_OFFSET 0x0152
170#define OMAP4_CTRL_MODULE_PAD_MCSPI4_CLK_OFFSET 0x0154
171#define OMAP4_CTRL_MODULE_PAD_MCSPI4_SIMO_OFFSET 0x0156
172#define OMAP4_CTRL_MODULE_PAD_MCSPI4_SOMI_OFFSET 0x0158
173#define OMAP4_CTRL_MODULE_PAD_MCSPI4_CS0_OFFSET 0x015a
174#define OMAP4_CTRL_MODULE_PAD_UART4_RX_OFFSET 0x015c
175#define OMAP4_CTRL_MODULE_PAD_UART4_TX_OFFSET 0x015e
176#define OMAP4_CTRL_MODULE_PAD_USBB2_ULPITLL_CLK_OFFSET 0x0160
177#define OMAP4_CTRL_MODULE_PAD_USBB2_ULPITLL_STP_OFFSET 0x0162
178#define OMAP4_CTRL_MODULE_PAD_USBB2_ULPITLL_DIR_OFFSET 0x0164
179#define OMAP4_CTRL_MODULE_PAD_USBB2_ULPITLL_NXT_OFFSET 0x0166
180#define OMAP4_CTRL_MODULE_PAD_USBB2_ULPITLL_DAT0_OFFSET 0x0168
181#define OMAP4_CTRL_MODULE_PAD_USBB2_ULPITLL_DAT1_OFFSET 0x016a
182#define OMAP4_CTRL_MODULE_PAD_USBB2_ULPITLL_DAT2_OFFSET 0x016c
183#define OMAP4_CTRL_MODULE_PAD_USBB2_ULPITLL_DAT3_OFFSET 0x016e
184#define OMAP4_CTRL_MODULE_PAD_USBB2_ULPITLL_DAT4_OFFSET 0x0170
185#define OMAP4_CTRL_MODULE_PAD_USBB2_ULPITLL_DAT5_OFFSET 0x0172
186#define OMAP4_CTRL_MODULE_PAD_USBB2_ULPITLL_DAT6_OFFSET 0x0174
187#define OMAP4_CTRL_MODULE_PAD_USBB2_ULPITLL_DAT7_OFFSET 0x0176
188#define OMAP4_CTRL_MODULE_PAD_USBB2_HSIC_DATA_OFFSET 0x0178
189#define OMAP4_CTRL_MODULE_PAD_USBB2_HSIC_STROBE_OFFSET 0x017a
190#define OMAP4_CTRL_MODULE_PAD_UNIPRO_TX0_OFFSET 0x017c
191#define OMAP4_CTRL_MODULE_PAD_UNIPRO_TY0_OFFSET 0x017e
192#define OMAP4_CTRL_MODULE_PAD_UNIPRO_TX1_OFFSET 0x0180
193#define OMAP4_CTRL_MODULE_PAD_UNIPRO_TY1_OFFSET 0x0182
194#define OMAP4_CTRL_MODULE_PAD_UNIPRO_TX2_OFFSET 0x0184
195#define OMAP4_CTRL_MODULE_PAD_UNIPRO_TY2_OFFSET 0x0186
196#define OMAP4_CTRL_MODULE_PAD_UNIPRO_RX0_OFFSET 0x0188
197#define OMAP4_CTRL_MODULE_PAD_UNIPRO_RY0_OFFSET 0x018a
198#define OMAP4_CTRL_MODULE_PAD_UNIPRO_RX1_OFFSET 0x018c
199#define OMAP4_CTRL_MODULE_PAD_UNIPRO_RY1_OFFSET 0x018e
200#define OMAP4_CTRL_MODULE_PAD_UNIPRO_RX2_OFFSET 0x0190
201#define OMAP4_CTRL_MODULE_PAD_UNIPRO_RY2_OFFSET 0x0192
202#define OMAP4_CTRL_MODULE_PAD_USBA0_OTG_CE_OFFSET 0x0194
203#define OMAP4_CTRL_MODULE_PAD_USBA0_OTG_DP_OFFSET 0x0196
204#define OMAP4_CTRL_MODULE_PAD_USBA0_OTG_DM_OFFSET 0x0198
205#define OMAP4_CTRL_MODULE_PAD_FREF_CLK1_OUT_OFFSET 0x019a
206#define OMAP4_CTRL_MODULE_PAD_FREF_CLK2_OUT_OFFSET 0x019c
207#define OMAP4_CTRL_MODULE_PAD_SYS_NIRQ1_OFFSET 0x019e
208#define OMAP4_CTRL_MODULE_PAD_SYS_NIRQ2_OFFSET 0x01a0
209#define OMAP4_CTRL_MODULE_PAD_SYS_BOOT0_OFFSET 0x01a2
210#define OMAP4_CTRL_MODULE_PAD_SYS_BOOT1_OFFSET 0x01a4
211#define OMAP4_CTRL_MODULE_PAD_SYS_BOOT2_OFFSET 0x01a6
212#define OMAP4_CTRL_MODULE_PAD_SYS_BOOT3_OFFSET 0x01a8
213#define OMAP4_CTRL_MODULE_PAD_SYS_BOOT4_OFFSET 0x01aa
214#define OMAP4_CTRL_MODULE_PAD_SYS_BOOT5_OFFSET 0x01ac
215#define OMAP4_CTRL_MODULE_PAD_DPM_EMU0_OFFSET 0x01ae
216#define OMAP4_CTRL_MODULE_PAD_DPM_EMU1_OFFSET 0x01b0
217#define OMAP4_CTRL_MODULE_PAD_DPM_EMU2_OFFSET 0x01b2
218#define OMAP4_CTRL_MODULE_PAD_DPM_EMU3_OFFSET 0x01b4
219#define OMAP4_CTRL_MODULE_PAD_DPM_EMU4_OFFSET 0x01b6
220#define OMAP4_CTRL_MODULE_PAD_DPM_EMU5_OFFSET 0x01b8
221#define OMAP4_CTRL_MODULE_PAD_DPM_EMU6_OFFSET 0x01ba
222#define OMAP4_CTRL_MODULE_PAD_DPM_EMU7_OFFSET 0x01bc
223#define OMAP4_CTRL_MODULE_PAD_DPM_EMU8_OFFSET 0x01be
224#define OMAP4_CTRL_MODULE_PAD_DPM_EMU9_OFFSET 0x01c0
225#define OMAP4_CTRL_MODULE_PAD_DPM_EMU10_OFFSET 0x01c2
226#define OMAP4_CTRL_MODULE_PAD_DPM_EMU11_OFFSET 0x01c4
227#define OMAP4_CTRL_MODULE_PAD_DPM_EMU12_OFFSET 0x01c6
228#define OMAP4_CTRL_MODULE_PAD_DPM_EMU13_OFFSET 0x01c8
229#define OMAP4_CTRL_MODULE_PAD_DPM_EMU14_OFFSET 0x01ca
230#define OMAP4_CTRL_MODULE_PAD_DPM_EMU15_OFFSET 0x01cc
231#define OMAP4_CTRL_MODULE_PAD_DPM_EMU16_OFFSET 0x01ce
232#define OMAP4_CTRL_MODULE_PAD_DPM_EMU17_OFFSET 0x01d0
233#define OMAP4_CTRL_MODULE_PAD_DPM_EMU18_OFFSET 0x01d2
234#define OMAP4_CTRL_MODULE_PAD_DPM_EMU19_OFFSET 0x01d4
235
236/* ES2.0 only */
237#define OMAP4_CTRL_MODULE_PAD_GPMC_WAIT2_OFFSET 0x008e
238#define OMAP4_CTRL_MODULE_PAD_GPMC_NCS4_OFFSET 0x0090
239#define OMAP4_CTRL_MODULE_PAD_GPMC_NCS5_OFFSET 0x0092
240#define OMAP4_CTRL_MODULE_PAD_GPMC_NCS6_OFFSET 0x0094
241#define OMAP4_CTRL_MODULE_PAD_GPMC_NCS7_OFFSET 0x0096
242
243#define OMAP4_CTRL_MODULE_PAD_KPD_COL3_OFFSET 0x017c
244#define OMAP4_CTRL_MODULE_PAD_KPD_COL4_OFFSET 0x017e
245#define OMAP4_CTRL_MODULE_PAD_KPD_COL5_OFFSET 0x0180
246#define OMAP4_CTRL_MODULE_PAD_KPD_COL0_OFFSET 0x0182
247#define OMAP4_CTRL_MODULE_PAD_KPD_COL1_OFFSET 0x0184
248#define OMAP4_CTRL_MODULE_PAD_KPD_COL2_OFFSET 0x0186
249#define OMAP4_CTRL_MODULE_PAD_KPD_ROW3_OFFSET 0x0188
250#define OMAP4_CTRL_MODULE_PAD_KPD_ROW4_OFFSET 0x018a
251#define OMAP4_CTRL_MODULE_PAD_KPD_ROW5_OFFSET 0x018c
252#define OMAP4_CTRL_MODULE_PAD_KPD_ROW0_OFFSET 0x018e
253#define OMAP4_CTRL_MODULE_PAD_KPD_ROW1_OFFSET 0x0190
254#define OMAP4_CTRL_MODULE_PAD_KPD_ROW2_OFFSET 0x0192
255
256
257#define OMAP4_CTRL_MODULE_PAD_CORE_MUX_SIZE \
258 (OMAP4_CTRL_MODULE_PAD_DPM_EMU19_OFFSET \
259 - OMAP4_CTRL_MODULE_PAD_GPMC_AD0_OFFSET + 2)
260
261/* ctrl_module_pad_wkup base address */
262#define OMAP4_CTRL_MODULE_PAD_WKUP_MUX_PBASE 0x4a31e000
263
264/* ctrl_module_pad_wkup registers offset */
265#define OMAP4_CTRL_MODULE_PAD_SIM_IO_OFFSET 0x0040
266#define OMAP4_CTRL_MODULE_PAD_SIM_CLK_OFFSET 0x0042
267#define OMAP4_CTRL_MODULE_PAD_SIM_RESET_OFFSET 0x0044
268#define OMAP4_CTRL_MODULE_PAD_SIM_CD_OFFSET 0x0046
269#define OMAP4_CTRL_MODULE_PAD_SIM_PWRCTRL_OFFSET 0x0048
270#define OMAP4_CTRL_MODULE_PAD_SR_SCL_OFFSET 0x004a
271#define OMAP4_CTRL_MODULE_PAD_SR_SDA_OFFSET 0x004c
272#define OMAP4_CTRL_MODULE_PAD_FREF_XTAL_IN_OFFSET 0x004e
273#define OMAP4_CTRL_MODULE_PAD_FREF_SLICER_IN_OFFSET 0x0050
274#define OMAP4_CTRL_MODULE_PAD_FREF_CLK_IOREQ_OFFSET 0x0052
275#define OMAP4_CTRL_MODULE_PAD_FREF_CLK0_OUT_OFFSET 0x0054
276#define OMAP4_CTRL_MODULE_PAD_FREF_CLK3_REQ_OFFSET 0x0056
277#define OMAP4_CTRL_MODULE_PAD_FREF_CLK3_OUT_OFFSET 0x0058
278#define OMAP4_CTRL_MODULE_PAD_FREF_CLK4_REQ_OFFSET 0x005a
279#define OMAP4_CTRL_MODULE_PAD_FREF_CLK4_OUT_OFFSET 0x005c
280#define OMAP4_CTRL_MODULE_PAD_SYS_32K_OFFSET 0x005e
281#define OMAP4_CTRL_MODULE_PAD_SYS_NRESPWRON_OFFSET 0x0060
282#define OMAP4_CTRL_MODULE_PAD_SYS_NRESWARM_OFFSET 0x0062
283#define OMAP4_CTRL_MODULE_PAD_SYS_PWR_REQ_OFFSET 0x0064
284#define OMAP4_CTRL_MODULE_PAD_SYS_PWRON_RESET_OUT_OFFSET 0x0066
285#define OMAP4_CTRL_MODULE_PAD_SYS_BOOT6_OFFSET 0x0068
286#define OMAP4_CTRL_MODULE_PAD_SYS_BOOT7_OFFSET 0x006a
287#define OMAP4_CTRL_MODULE_PAD_JTAG_NTRST_OFFSET 0x006c
288#define OMAP4_CTRL_MODULE_PAD_JTAG_TCK_OFFSET 0x006e
289#define OMAP4_CTRL_MODULE_PAD_JTAG_RTCK_OFFSET 0x0070
290#define OMAP4_CTRL_MODULE_PAD_JTAG_TMS_TMSC_OFFSET 0x0072
291#define OMAP4_CTRL_MODULE_PAD_JTAG_TDI_OFFSET 0x0074
292#define OMAP4_CTRL_MODULE_PAD_JTAG_TDO_OFFSET 0x0076
293
294#define OMAP4_CTRL_MODULE_PAD_WKUP_MUX_SIZE \
295 (OMAP4_CTRL_MODULE_PAD_JTAG_TDO_OFFSET \
296 - OMAP4_CTRL_MODULE_PAD_SIM_IO_OFFSET + 2)
297
298#endif
diff --git a/arch/arm/mach-omap2/omap-headsmp.S b/arch/arm/mach-omap2/omap-headsmp.S
index 0ea09faf327b..75e92952c18e 100644
--- a/arch/arm/mach-omap2/omap-headsmp.S
+++ b/arch/arm/mach-omap2/omap-headsmp.S
@@ -20,8 +20,6 @@
20 20
21#include "omap44xx.h" 21#include "omap44xx.h"
22 22
23 __CPUINIT
24
25/* Physical address needed since MMU not enabled yet on secondary core */ 23/* Physical address needed since MMU not enabled yet on secondary core */
26#define AUX_CORE_BOOT0_PA 0x48281800 24#define AUX_CORE_BOOT0_PA 0x48281800
27 25
@@ -49,7 +47,7 @@ END(omap5_secondary_startup)
49 * The primary core will update this flag using a hardware 47 * The primary core will update this flag using a hardware
50 * register AuxCoreBoot0. 48 * register AuxCoreBoot0.
51 */ 49 */
52ENTRY(omap_secondary_startup) 50ENTRY(omap4_secondary_startup)
53hold: ldr r12,=0x103 51hold: ldr r12,=0x103
54 dsb 52 dsb
55 smc #0 @ read from AuxCoreBoot0 53 smc #0 @ read from AuxCoreBoot0
@@ -64,9 +62,9 @@ hold: ldr r12,=0x103
64 * should now contain the SVC stack for this core 62 * should now contain the SVC stack for this core
65 */ 63 */
66 b secondary_startup 64 b secondary_startup
67ENDPROC(omap_secondary_startup) 65ENDPROC(omap4_secondary_startup)
68 66
69ENTRY(omap_secondary_startup_4460) 67ENTRY(omap4460_secondary_startup)
70hold_2: ldr r12,=0x103 68hold_2: ldr r12,=0x103
71 dsb 69 dsb
72 smc #0 @ read from AuxCoreBoot0 70 smc #0 @ read from AuxCoreBoot0
@@ -101,4 +99,4 @@ hold_2: ldr r12,=0x103
101 * should now contain the SVC stack for this core 99 * should now contain the SVC stack for this core
102 */ 100 */
103 b secondary_startup 101 b secondary_startup
104ENDPROC(omap_secondary_startup_4460) 102ENDPROC(omap4460_secondary_startup)
diff --git a/arch/arm/mach-omap2/omap-mpuss-lowpower.c b/arch/arm/mach-omap2/omap-mpuss-lowpower.c
index e80327b6c81f..f991016e2a6a 100644
--- a/arch/arm/mach-omap2/omap-mpuss-lowpower.c
+++ b/arch/arm/mach-omap2/omap-mpuss-lowpower.c
@@ -71,10 +71,43 @@ struct omap4_cpu_pm_info {
71 void (*secondary_startup)(void); 71 void (*secondary_startup)(void);
72}; 72};
73 73
74/**
75 * struct cpu_pm_ops - CPU pm operations
76 * @finish_suspend: CPU suspend finisher function pointer
77 * @resume: CPU resume function pointer
78 * @scu_prepare: CPU Snoop Control program function pointer
79 *
80 * Structure holds functions pointer for CPU low power operations like
81 * suspend, resume and scu programming.
82 */
83struct cpu_pm_ops {
84 int (*finish_suspend)(unsigned long cpu_state);
85 void (*resume)(void);
86 void (*scu_prepare)(unsigned int cpu_id, unsigned int cpu_state);
87};
88
74static DEFINE_PER_CPU(struct omap4_cpu_pm_info, omap4_pm_info); 89static DEFINE_PER_CPU(struct omap4_cpu_pm_info, omap4_pm_info);
75static struct powerdomain *mpuss_pd; 90static struct powerdomain *mpuss_pd;
76static void __iomem *sar_base; 91static void __iomem *sar_base;
77 92
93static int default_finish_suspend(unsigned long cpu_state)
94{
95 omap_do_wfi();
96 return 0;
97}
98
99static void dummy_cpu_resume(void)
100{}
101
102static void dummy_scu_prepare(unsigned int cpu_id, unsigned int cpu_state)
103{}
104
105struct cpu_pm_ops omap_pm_ops = {
106 .finish_suspend = default_finish_suspend,
107 .resume = dummy_cpu_resume,
108 .scu_prepare = dummy_scu_prepare,
109};
110
78/* 111/*
79 * Program the wakeup routine address for the CPU0 and CPU1 112 * Program the wakeup routine address for the CPU0 and CPU1
80 * used for OFF or DORMANT wakeup. 113 * used for OFF or DORMANT wakeup.
@@ -158,11 +191,12 @@ static void save_l2x0_context(void)
158{ 191{
159 u32 val; 192 u32 val;
160 void __iomem *l2x0_base = omap4_get_l2cache_base(); 193 void __iomem *l2x0_base = omap4_get_l2cache_base();
161 194 if (l2x0_base) {
162 val = __raw_readl(l2x0_base + L2X0_AUX_CTRL); 195 val = __raw_readl(l2x0_base + L2X0_AUX_CTRL);
163 __raw_writel(val, sar_base + L2X0_AUXCTRL_OFFSET); 196 __raw_writel(val, sar_base + L2X0_AUXCTRL_OFFSET);
164 val = __raw_readl(l2x0_base + L2X0_PREFETCH_CTRL); 197 val = __raw_readl(l2x0_base + L2X0_PREFETCH_CTRL);
165 __raw_writel(val, sar_base + L2X0_PREFETCH_CTRL_OFFSET); 198 __raw_writel(val, sar_base + L2X0_PREFETCH_CTRL_OFFSET);
199 }
166} 200}
167#else 201#else
168static void save_l2x0_context(void) 202static void save_l2x0_context(void)
@@ -225,14 +259,17 @@ int omap4_enter_lowpower(unsigned int cpu, unsigned int power_state)
225 259
226 cpu_clear_prev_logic_pwrst(cpu); 260 cpu_clear_prev_logic_pwrst(cpu);
227 pwrdm_set_next_pwrst(pm_info->pwrdm, power_state); 261 pwrdm_set_next_pwrst(pm_info->pwrdm, power_state);
228 set_cpu_wakeup_addr(cpu, virt_to_phys(omap4_cpu_resume)); 262 set_cpu_wakeup_addr(cpu, virt_to_phys(omap_pm_ops.resume));
229 scu_pwrst_prepare(cpu, power_state); 263 omap_pm_ops.scu_prepare(cpu, power_state);
230 l2x0_pwrst_prepare(cpu, save_state); 264 l2x0_pwrst_prepare(cpu, save_state);
231 265
232 /* 266 /*
233 * Call low level function with targeted low power state. 267 * Call low level function with targeted low power state.
234 */ 268 */
235 cpu_suspend(save_state, omap4_finish_suspend); 269 if (save_state)
270 cpu_suspend(save_state, omap_pm_ops.finish_suspend);
271 else
272 omap_pm_ops.finish_suspend(save_state);
236 273
237 /* 274 /*
238 * Restore the CPUx power state to ON otherwise CPUx 275 * Restore the CPUx power state to ON otherwise CPUx
@@ -254,7 +291,7 @@ int omap4_enter_lowpower(unsigned int cpu, unsigned int power_state)
254 * @cpu : CPU ID 291 * @cpu : CPU ID
255 * @power_state: CPU low power state. 292 * @power_state: CPU low power state.
256 */ 293 */
257int __cpuinit omap4_hotplug_cpu(unsigned int cpu, unsigned int power_state) 294int omap4_hotplug_cpu(unsigned int cpu, unsigned int power_state)
258{ 295{
259 struct omap4_cpu_pm_info *pm_info = &per_cpu(omap4_pm_info, cpu); 296 struct omap4_cpu_pm_info *pm_info = &per_cpu(omap4_pm_info, cpu);
260 unsigned int cpu_state = 0; 297 unsigned int cpu_state = 0;
@@ -268,14 +305,14 @@ int __cpuinit omap4_hotplug_cpu(unsigned int cpu, unsigned int power_state)
268 pwrdm_clear_all_prev_pwrst(pm_info->pwrdm); 305 pwrdm_clear_all_prev_pwrst(pm_info->pwrdm);
269 pwrdm_set_next_pwrst(pm_info->pwrdm, power_state); 306 pwrdm_set_next_pwrst(pm_info->pwrdm, power_state);
270 set_cpu_wakeup_addr(cpu, virt_to_phys(pm_info->secondary_startup)); 307 set_cpu_wakeup_addr(cpu, virt_to_phys(pm_info->secondary_startup));
271 scu_pwrst_prepare(cpu, power_state); 308 omap_pm_ops.scu_prepare(cpu, power_state);
272 309
273 /* 310 /*
274 * CPU never retuns back if targeted power state is OFF mode. 311 * CPU never retuns back if targeted power state is OFF mode.
275 * CPU ONLINE follows normal CPU ONLINE ptah via 312 * CPU ONLINE follows normal CPU ONLINE ptah via
276 * omap_secondary_startup(). 313 * omap4_secondary_startup().
277 */ 314 */
278 omap4_finish_suspend(cpu_state); 315 omap_pm_ops.finish_suspend(cpu_state);
279 316
280 pwrdm_set_next_pwrst(pm_info->pwrdm, PWRDM_POWER_ON); 317 pwrdm_set_next_pwrst(pm_info->pwrdm, PWRDM_POWER_ON);
281 return 0; 318 return 0;
@@ -319,9 +356,9 @@ int __init omap4_mpuss_init(void)
319 pm_info->wkup_sar_addr = sar_base + CPU1_WAKEUP_NS_PA_ADDR_OFFSET; 356 pm_info->wkup_sar_addr = sar_base + CPU1_WAKEUP_NS_PA_ADDR_OFFSET;
320 pm_info->l2x0_sar_addr = sar_base + L2X0_SAVE_OFFSET1; 357 pm_info->l2x0_sar_addr = sar_base + L2X0_SAVE_OFFSET1;
321 if (cpu_is_omap446x()) 358 if (cpu_is_omap446x())
322 pm_info->secondary_startup = omap_secondary_startup_4460; 359 pm_info->secondary_startup = omap4460_secondary_startup;
323 else 360 else
324 pm_info->secondary_startup = omap_secondary_startup; 361 pm_info->secondary_startup = omap4_secondary_startup;
325 362
326 pm_info->pwrdm = pwrdm_lookup("cpu1_pwrdm"); 363 pm_info->pwrdm = pwrdm_lookup("cpu1_pwrdm");
327 if (!pm_info->pwrdm) { 364 if (!pm_info->pwrdm) {
@@ -352,6 +389,12 @@ int __init omap4_mpuss_init(void)
352 389
353 save_l2x0_context(); 390 save_l2x0_context();
354 391
392 if (cpu_is_omap44xx()) {
393 omap_pm_ops.finish_suspend = omap4_finish_suspend;
394 omap_pm_ops.resume = omap4_cpu_resume;
395 omap_pm_ops.scu_prepare = scu_pwrst_prepare;
396 }
397
355 return 0; 398 return 0;
356} 399}
357 400
diff --git a/arch/arm/mach-omap2/omap-smp.c b/arch/arm/mach-omap2/omap-smp.c
index 2a551f997aea..8708b2a9da45 100644
--- a/arch/arm/mach-omap2/omap-smp.c
+++ b/arch/arm/mach-omap2/omap-smp.c
@@ -51,7 +51,7 @@ void __iomem *omap4_get_scu_base(void)
51 return scu_base; 51 return scu_base;
52} 52}
53 53
54static void __cpuinit omap4_secondary_init(unsigned int cpu) 54static void omap4_secondary_init(unsigned int cpu)
55{ 55{
56 /* 56 /*
57 * Configure ACTRL and enable NS SMP bit access on CPU1 on HS device. 57 * Configure ACTRL and enable NS SMP bit access on CPU1 on HS device.
@@ -72,7 +72,7 @@ static void __cpuinit omap4_secondary_init(unsigned int cpu)
72 spin_unlock(&boot_lock); 72 spin_unlock(&boot_lock);
73} 73}
74 74
75static int __cpuinit omap4_boot_secondary(unsigned int cpu, struct task_struct *idle) 75static int omap4_boot_secondary(unsigned int cpu, struct task_struct *idle)
76{ 76{
77 static struct clockdomain *cpu1_clkdm; 77 static struct clockdomain *cpu1_clkdm;
78 static bool booted; 78 static bool booted;
@@ -87,7 +87,7 @@ static int __cpuinit omap4_boot_secondary(unsigned int cpu, struct task_struct *
87 87
88 /* 88 /*
89 * Update the AuxCoreBoot0 with boot state for secondary core. 89 * Update the AuxCoreBoot0 with boot state for secondary core.
90 * omap_secondary_startup() routine will hold the secondary core till 90 * omap4_secondary_startup() routine will hold the secondary core till
91 * the AuxCoreBoot1 register is updated with cpu state 91 * the AuxCoreBoot1 register is updated with cpu state
92 * A barrier is added to ensure that write buffer is drained 92 * A barrier is added to ensure that write buffer is drained
93 */ 93 */
@@ -200,7 +200,7 @@ static void __init omap4_smp_init_cpus(void)
200 200
201static void __init omap4_smp_prepare_cpus(unsigned int max_cpus) 201static void __init omap4_smp_prepare_cpus(unsigned int max_cpus)
202{ 202{
203 void *startup_addr = omap_secondary_startup; 203 void *startup_addr = omap4_secondary_startup;
204 void __iomem *base = omap_get_wakeupgen_base(); 204 void __iomem *base = omap_get_wakeupgen_base();
205 205
206 /* 206 /*
@@ -211,7 +211,7 @@ static void __init omap4_smp_prepare_cpus(unsigned int max_cpus)
211 scu_enable(scu_base); 211 scu_enable(scu_base);
212 212
213 if (cpu_is_omap446x()) { 213 if (cpu_is_omap446x()) {
214 startup_addr = omap_secondary_startup_4460; 214 startup_addr = omap4460_secondary_startup;
215 pm44xx_errata |= PM_OMAP4_ROM_SMP_BOOT_ERRATUM_GICD; 215 pm44xx_errata |= PM_OMAP4_ROM_SMP_BOOT_ERRATUM_GICD;
216 } 216 }
217 217
diff --git a/arch/arm/mach-omap2/omap-wakeupgen.c b/arch/arm/mach-omap2/omap-wakeupgen.c
index f8bb3b9b6a76..813c61558a5f 100644
--- a/arch/arm/mach-omap2/omap-wakeupgen.c
+++ b/arch/arm/mach-omap2/omap-wakeupgen.c
@@ -323,8 +323,8 @@ static void irq_save_secure_context(void)
323#endif 323#endif
324 324
325#ifdef CONFIG_HOTPLUG_CPU 325#ifdef CONFIG_HOTPLUG_CPU
326static int __cpuinit irq_cpu_hotplug_notify(struct notifier_block *self, 326static int irq_cpu_hotplug_notify(struct notifier_block *self,
327 unsigned long action, void *hcpu) 327 unsigned long action, void *hcpu)
328{ 328{
329 unsigned int cpu = (unsigned int)hcpu; 329 unsigned int cpu = (unsigned int)hcpu;
330 330
diff --git a/arch/arm/mach-omap2/omap2-restart.c b/arch/arm/mach-omap2/omap2-restart.c
index 719b716a4494..68423e26399d 100644
--- a/arch/arm/mach-omap2/omap2-restart.c
+++ b/arch/arm/mach-omap2/omap2-restart.c
@@ -31,7 +31,7 @@ static struct clk *reset_virt_prcm_set_ck, *reset_sys_ck;
31 * Set the DPLL to bypass so that reboot completes successfully. No 31 * Set the DPLL to bypass so that reboot completes successfully. No
32 * return value. 32 * return value.
33 */ 33 */
34void omap2xxx_restart(char mode, const char *cmd) 34void omap2xxx_restart(enum reboot_mode mode, const char *cmd)
35{ 35{
36 u32 rate; 36 u32 rate;
37 37
diff --git a/arch/arm/mach-omap2/omap3-restart.c b/arch/arm/mach-omap2/omap3-restart.c
index 923c582189e5..5de2a0c2979d 100644
--- a/arch/arm/mach-omap2/omap3-restart.c
+++ b/arch/arm/mach-omap2/omap3-restart.c
@@ -12,6 +12,7 @@
12 */ 12 */
13#include <linux/kernel.h> 13#include <linux/kernel.h>
14#include <linux/init.h> 14#include <linux/init.h>
15#include <linux/reboot.h>
15 16
16#include "iomap.h" 17#include "iomap.h"
17#include "common.h" 18#include "common.h"
@@ -28,7 +29,7 @@
28 * Resets the SoC. For @cmd, see the 'reboot' syscall in 29 * Resets the SoC. For @cmd, see the 'reboot' syscall in
29 * kernel/sys.c. No return value. 30 * kernel/sys.c. No return value.
30 */ 31 */
31void omap3xxx_restart(char mode, const char *cmd) 32void omap3xxx_restart(enum reboot_mode mode, const char *cmd)
32{ 33{
33 omap3_ctrl_write_boot_mode((cmd ? (u8)*cmd : 0)); 34 omap3_ctrl_write_boot_mode((cmd ? (u8)*cmd : 0));
34 omap3xxx_prm_dpll3_reset(); /* never returns */ 35 omap3xxx_prm_dpll3_reset(); /* never returns */
diff --git a/arch/arm/mach-omap2/omap4-common.c b/arch/arm/mach-omap2/omap4-common.c
index 13b27ffaf45e..57911430324e 100644
--- a/arch/arm/mach-omap2/omap4-common.c
+++ b/arch/arm/mach-omap2/omap4-common.c
@@ -23,6 +23,7 @@
23#include <linux/export.h> 23#include <linux/export.h>
24#include <linux/irqchip/arm-gic.h> 24#include <linux/irqchip/arm-gic.h>
25#include <linux/of_address.h> 25#include <linux/of_address.h>
26#include <linux/reboot.h>
26 27
27#include <asm/hardware/cache-l2x0.h> 28#include <asm/hardware/cache-l2x0.h>
28#include <asm/mach/map.h> 29#include <asm/mach/map.h>
@@ -339,19 +340,3 @@ int __init omap4_twl6030_hsmmc_init(struct omap2_hsmmc_info *controllers)
339 return 0; 340 return 0;
340} 341}
341#endif 342#endif
342
343/**
344 * omap44xx_restart - trigger a software restart of the SoC
345 * @mode: the "reboot mode", see arch/arm/kernel/{setup,process}.c
346 * @cmd: passed from the userspace program rebooting the system (if provided)
347 *
348 * Resets the SoC. For @cmd, see the 'reboot' syscall in
349 * kernel/sys.c. No return value.
350 */
351void omap44xx_restart(char mode, const char *cmd)
352{
353 /* XXX Should save 'cmd' into scratchpad for use after reboot */
354 omap4_prminst_global_warm_sw_reset(); /* never returns */
355 while (1);
356}
357
diff --git a/arch/arm/mach-omap2/omap4-restart.c b/arch/arm/mach-omap2/omap4-restart.c
new file mode 100644
index 000000000000..41dfd7da8170
--- /dev/null
+++ b/arch/arm/mach-omap2/omap4-restart.c
@@ -0,0 +1,28 @@
1/*
2 * omap4-restart.c - Common to OMAP4 and OMAP5
3 *
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 2 as
7 * published by the Free Software Foundation.
8 */
9
10#include <linux/types.h>
11#include <linux/reboot.h>
12#include "prminst44xx.h"
13
14/**
15 * omap44xx_restart - trigger a software restart of the SoC
16 * @mode: the "reboot mode", see arch/arm/kernel/{setup,process}.c
17 * @cmd: passed from the userspace program rebooting the system (if provided)
18 *
19 * Resets the SoC. For @cmd, see the 'reboot' syscall in
20 * kernel/sys.c. No return value.
21 */
22void omap44xx_restart(enum reboot_mode mode, const char *cmd)
23{
24 /* XXX Should save 'cmd' into scratchpad for use after reboot */
25 omap4_prminst_global_warm_sw_reset(); /* never returns */
26 while (1)
27 ;
28}
diff --git a/arch/arm/mach-omap2/omap_device.c b/arch/arm/mach-omap2/omap_device.c
index e6d230700b2b..f99f68e1e85b 100644
--- a/arch/arm/mach-omap2/omap_device.c
+++ b/arch/arm/mach-omap2/omap_device.c
@@ -129,6 +129,7 @@ static int omap_device_build_from_dt(struct platform_device *pdev)
129 struct device_node *node = pdev->dev.of_node; 129 struct device_node *node = pdev->dev.of_node;
130 const char *oh_name; 130 const char *oh_name;
131 int oh_cnt, i, ret = 0; 131 int oh_cnt, i, ret = 0;
132 bool device_active = false;
132 133
133 oh_cnt = of_property_count_strings(node, "ti,hwmods"); 134 oh_cnt = of_property_count_strings(node, "ti,hwmods");
134 if (oh_cnt <= 0) { 135 if (oh_cnt <= 0) {
@@ -152,6 +153,8 @@ static int omap_device_build_from_dt(struct platform_device *pdev)
152 goto odbfd_exit1; 153 goto odbfd_exit1;
153 } 154 }
154 hwmods[i] = oh; 155 hwmods[i] = oh;
156 if (oh->flags & HWMOD_INIT_NO_IDLE)
157 device_active = true;
155 } 158 }
156 159
157 od = omap_device_alloc(pdev, hwmods, oh_cnt); 160 od = omap_device_alloc(pdev, hwmods, oh_cnt);
@@ -170,11 +173,13 @@ static int omap_device_build_from_dt(struct platform_device *pdev)
170 r->name = dev_name(&pdev->dev); 173 r->name = dev_name(&pdev->dev);
171 } 174 }
172 175
173 if (of_get_property(node, "ti,no_idle_on_suspend", NULL))
174 omap_device_disable_idle_on_suspend(pdev);
175
176 pdev->dev.pm_domain = &omap_device_pm_domain; 176 pdev->dev.pm_domain = &omap_device_pm_domain;
177 177
178 if (device_active) {
179 omap_device_enable(pdev);
180 pm_runtime_set_active(&pdev->dev);
181 }
182
178odbfd_exit1: 183odbfd_exit1:
179 kfree(hwmods); 184 kfree(hwmods);
180odbfd_exit: 185odbfd_exit:
@@ -591,11 +596,6 @@ static int _od_runtime_suspend(struct device *dev)
591 return ret; 596 return ret;
592} 597}
593 598
594static int _od_runtime_idle(struct device *dev)
595{
596 return pm_generic_runtime_idle(dev);
597}
598
599static int _od_runtime_resume(struct device *dev) 599static int _od_runtime_resume(struct device *dev)
600{ 600{
601 struct platform_device *pdev = to_platform_device(dev); 601 struct platform_device *pdev = to_platform_device(dev);
@@ -621,8 +621,7 @@ static int _od_suspend_noirq(struct device *dev)
621 621
622 if (!ret && !pm_runtime_status_suspended(dev)) { 622 if (!ret && !pm_runtime_status_suspended(dev)) {
623 if (pm_generic_runtime_suspend(dev) == 0) { 623 if (pm_generic_runtime_suspend(dev) == 0) {
624 if (!(od->flags & OMAP_DEVICE_NO_IDLE_ON_SUSPEND)) 624 omap_device_idle(pdev);
625 omap_device_idle(pdev);
626 od->flags |= OMAP_DEVICE_SUSPENDED; 625 od->flags |= OMAP_DEVICE_SUSPENDED;
627 } 626 }
628 } 627 }
@@ -638,8 +637,7 @@ static int _od_resume_noirq(struct device *dev)
638 if ((od->flags & OMAP_DEVICE_SUSPENDED) && 637 if ((od->flags & OMAP_DEVICE_SUSPENDED) &&
639 !pm_runtime_status_suspended(dev)) { 638 !pm_runtime_status_suspended(dev)) {
640 od->flags &= ~OMAP_DEVICE_SUSPENDED; 639 od->flags &= ~OMAP_DEVICE_SUSPENDED;
641 if (!(od->flags & OMAP_DEVICE_NO_IDLE_ON_SUSPEND)) 640 omap_device_enable(pdev);
642 omap_device_enable(pdev);
643 pm_generic_runtime_resume(dev); 641 pm_generic_runtime_resume(dev);
644 } 642 }
645 643
@@ -653,7 +651,7 @@ static int _od_resume_noirq(struct device *dev)
653struct dev_pm_domain omap_device_pm_domain = { 651struct dev_pm_domain omap_device_pm_domain = {
654 .ops = { 652 .ops = {
655 SET_RUNTIME_PM_OPS(_od_runtime_suspend, _od_runtime_resume, 653 SET_RUNTIME_PM_OPS(_od_runtime_suspend, _od_runtime_resume,
656 _od_runtime_idle) 654 NULL)
657 USE_PLATFORM_PM_SLEEP_OPS 655 USE_PLATFORM_PM_SLEEP_OPS
658 .suspend_noirq = _od_suspend_noirq, 656 .suspend_noirq = _od_suspend_noirq,
659 .resume_noirq = _od_resume_noirq, 657 .resume_noirq = _od_resume_noirq,
@@ -852,6 +850,7 @@ static int __init omap_device_late_idle(struct device *dev, void *data)
852{ 850{
853 struct platform_device *pdev = to_platform_device(dev); 851 struct platform_device *pdev = to_platform_device(dev);
854 struct omap_device *od = to_omap_device(pdev); 852 struct omap_device *od = to_omap_device(pdev);
853 int i;
855 854
856 if (!od) 855 if (!od)
857 return 0; 856 return 0;
@@ -860,6 +859,15 @@ static int __init omap_device_late_idle(struct device *dev, void *data)
860 * If omap_device state is enabled, but has no driver bound, 859 * If omap_device state is enabled, but has no driver bound,
861 * idle it. 860 * idle it.
862 */ 861 */
862
863 /*
864 * Some devices (like memory controllers) are always kept
865 * enabled, and should not be idled even with no drivers.
866 */
867 for (i = 0; i < od->hwmods_cnt; i++)
868 if (od->hwmods[i]->flags & HWMOD_INIT_NO_IDLE)
869 return 0;
870
863 if (od->_driver_status != BUS_NOTIFY_BOUND_DRIVER) { 871 if (od->_driver_status != BUS_NOTIFY_BOUND_DRIVER) {
864 if (od->_state == OMAP_DEVICE_STATE_ENABLED) { 872 if (od->_state == OMAP_DEVICE_STATE_ENABLED) {
865 dev_warn(dev, "%s: enabled but no driver. Idling\n", 873 dev_warn(dev, "%s: enabled but no driver. Idling\n",
diff --git a/arch/arm/mach-omap2/omap_device.h b/arch/arm/mach-omap2/omap_device.h
index 044c31d50e5b..17ca1aec2710 100644
--- a/arch/arm/mach-omap2/omap_device.h
+++ b/arch/arm/mach-omap2/omap_device.h
@@ -38,7 +38,6 @@ extern struct dev_pm_domain omap_device_pm_domain;
38 38
39/* omap_device.flags values */ 39/* omap_device.flags values */
40#define OMAP_DEVICE_SUSPENDED BIT(0) 40#define OMAP_DEVICE_SUSPENDED BIT(0)
41#define OMAP_DEVICE_NO_IDLE_ON_SUSPEND BIT(1)
42 41
43/** 42/**
44 * struct omap_device - omap_device wrapper for platform_devices 43 * struct omap_device - omap_device wrapper for platform_devices
@@ -101,13 +100,4 @@ static inline struct omap_device *to_omap_device(struct platform_device *pdev)
101{ 100{
102 return pdev ? pdev->archdata.od : NULL; 101 return pdev ? pdev->archdata.od : NULL;
103} 102}
104
105static inline
106void omap_device_disable_idle_on_suspend(struct platform_device *pdev)
107{
108 struct omap_device *od = to_omap_device(pdev);
109
110 od->flags |= OMAP_DEVICE_NO_IDLE_ON_SUSPEND;
111}
112
113#endif 103#endif
diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c
index 7341eff63f56..7f4db12b1459 100644
--- a/arch/arm/mach-omap2/omap_hwmod.c
+++ b/arch/arm/mach-omap2/omap_hwmod.c
@@ -2386,7 +2386,7 @@ static void __init _init_mpu_rt_base(struct omap_hwmod *oh, void *data)
2386 2386
2387 np = of_dev_hwmod_lookup(of_find_node_by_name(NULL, "ocp"), oh); 2387 np = of_dev_hwmod_lookup(of_find_node_by_name(NULL, "ocp"), oh);
2388 if (np) 2388 if (np)
2389 va_start = of_iomap(np, 0); 2389 va_start = of_iomap(np, oh->mpu_rt_idx);
2390 } else { 2390 } else {
2391 va_start = ioremap(mem->pa_start, mem->pa_end - mem->pa_start); 2391 va_start = ioremap(mem->pa_start, mem->pa_end - mem->pa_start);
2392 } 2392 }
diff --git a/arch/arm/mach-omap2/omap_hwmod.h b/arch/arm/mach-omap2/omap_hwmod.h
index 0c898f58ac9b..e1482a9b3bc2 100644
--- a/arch/arm/mach-omap2/omap_hwmod.h
+++ b/arch/arm/mach-omap2/omap_hwmod.h
@@ -95,6 +95,54 @@ extern struct omap_hwmod_sysc_fields omap_hwmod_sysc_type3;
95#define MODULEMODE_HWCTRL 1 95#define MODULEMODE_HWCTRL 1
96#define MODULEMODE_SWCTRL 2 96#define MODULEMODE_SWCTRL 2
97 97
98#define DEBUG_OMAP2UART1_FLAGS 0
99#define DEBUG_OMAP2UART2_FLAGS 0
100#define DEBUG_OMAP2UART3_FLAGS 0
101#define DEBUG_OMAP3UART3_FLAGS 0
102#define DEBUG_OMAP3UART4_FLAGS 0
103#define DEBUG_OMAP4UART3_FLAGS 0
104#define DEBUG_OMAP4UART4_FLAGS 0
105#define DEBUG_TI81XXUART1_FLAGS 0
106#define DEBUG_TI81XXUART2_FLAGS 0
107#define DEBUG_TI81XXUART3_FLAGS 0
108#define DEBUG_AM33XXUART1_FLAGS 0
109
110#define DEBUG_OMAPUART_FLAGS (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET)
111
112#if defined(CONFIG_DEBUG_OMAP2UART1)
113#undef DEBUG_OMAP2UART1_FLAGS
114#define DEBUG_OMAP2UART1_FLAGS DEBUG_OMAPUART_FLAGS
115#elif defined(CONFIG_DEBUG_OMAP2UART2)
116#undef DEBUG_OMAP2UART2_FLAGS
117#define DEBUG_OMAP2UART2_FLAGS DEBUG_OMAPUART_FLAGS
118#elif defined(CONFIG_DEBUG_OMAP2UART3)
119#undef DEBUG_OMAP2UART3_FLAGS
120#define DEBUG_OMAP2UART3_FLAGS DEBUG_OMAPUART_FLAGS
121#elif defined(CONFIG_DEBUG_OMAP3UART3)
122#undef DEBUG_OMAP3UART3_FLAGS
123#define DEBUG_OMAP3UART3_FLAGS DEBUG_OMAPUART_FLAGS
124#elif defined(CONFIG_DEBUG_OMAP3UART4)
125#undef DEBUG_OMAP3UART4_FLAGS
126#define DEBUG_OMAP3UART4_FLAGS DEBUG_OMAPUART_FLAGS
127#elif defined(CONFIG_DEBUG_OMAP4UART3)
128#undef DEBUG_OMAP4UART3_FLAGS
129#define DEBUG_OMAP4UART3_FLAGS DEBUG_OMAPUART_FLAGS
130#elif defined(CONFIG_DEBUG_OMAP4UART4)
131#undef DEBUG_OMAP4UART4_FLAGS
132#define DEBUG_OMAP4UART4_FLAGS DEBUG_OMAPUART_FLAGS
133#elif defined(CONFIG_DEBUG_TI81XXUART1)
134#undef DEBUG_TI81XXUART1_FLAGS
135#define DEBUG_TI81XXUART1_FLAGS DEBUG_OMAPUART_FLAGS
136#elif defined(CONFIG_DEBUG_TI81XXUART2)
137#undef DEBUG_TI81XXUART2_FLAGS
138#define DEBUG_TI81XXUART2_FLAGS DEBUG_OMAPUART_FLAGS
139#elif defined(CONFIG_DEBUG_TI81XXUART3)
140#undef DEBUG_TI81XXUART3_FLAGS
141#define DEBUG_TI81XXUART3_FLAGS DEBUG_OMAPUART_FLAGS
142#elif defined(CONFIG_DEBUG_AM33XXUART1)
143#undef DEBUG_AM33XXUART1_FLAGS
144#define DEBUG_AM33XXUART1_FLAGS DEBUG_OMAPUART_FLAGS
145#endif
98 146
99/** 147/**
100 * struct omap_hwmod_mux_info - hwmod specific mux configuration 148 * struct omap_hwmod_mux_info - hwmod specific mux configuration
@@ -568,6 +616,7 @@ struct omap_hwmod_link {
568 * @voltdm: pointer to voltage domain (filled in at runtime) 616 * @voltdm: pointer to voltage domain (filled in at runtime)
569 * @dev_attr: arbitrary device attributes that can be passed to the driver 617 * @dev_attr: arbitrary device attributes that can be passed to the driver
570 * @_sysc_cache: internal-use hwmod flags 618 * @_sysc_cache: internal-use hwmod flags
619 * @mpu_rt_idx: index of device address space for register target (for DT boot)
571 * @_mpu_rt_va: cached register target start address (internal use) 620 * @_mpu_rt_va: cached register target start address (internal use)
572 * @_mpu_port: cached MPU register target slave (internal use) 621 * @_mpu_port: cached MPU register target slave (internal use)
573 * @opt_clks_cnt: number of @opt_clks 622 * @opt_clks_cnt: number of @opt_clks
@@ -617,6 +666,7 @@ struct omap_hwmod {
617 struct list_head node; 666 struct list_head node;
618 struct omap_hwmod_ocp_if *_mpu_port; 667 struct omap_hwmod_ocp_if *_mpu_port;
619 u16 flags; 668 u16 flags;
669 u8 mpu_rt_idx;
620 u8 response_lat; 670 u8 response_lat;
621 u8 rst_lines_cnt; 671 u8 rst_lines_cnt;
622 u8 opt_clks_cnt; 672 u8 opt_clks_cnt;
@@ -699,6 +749,7 @@ extern int omap2420_hwmod_init(void);
699extern int omap2430_hwmod_init(void); 749extern int omap2430_hwmod_init(void);
700extern int omap3xxx_hwmod_init(void); 750extern int omap3xxx_hwmod_init(void);
701extern int omap44xx_hwmod_init(void); 751extern int omap44xx_hwmod_init(void);
752extern int omap54xx_hwmod_init(void);
702extern int am33xx_hwmod_init(void); 753extern int am33xx_hwmod_init(void);
703 754
704extern int __init omap_hwmod_register_links(struct omap_hwmod_ocp_if **ois); 755extern int __init omap_hwmod_register_links(struct omap_hwmod_ocp_if **ois);
diff --git a/arch/arm/mach-omap2/omap_hwmod_2420_data.c b/arch/arm/mach-omap2/omap_hwmod_2420_data.c
index 5137cc84b504..d8b9d60f854f 100644
--- a/arch/arm/mach-omap2/omap_hwmod_2420_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_2420_data.c
@@ -16,6 +16,7 @@
16#include <linux/i2c-omap.h> 16#include <linux/i2c-omap.h>
17#include <linux/platform_data/spi-omap2-mcspi.h> 17#include <linux/platform_data/spi-omap2-mcspi.h>
18#include <linux/omap-dma.h> 18#include <linux/omap-dma.h>
19#include <linux/platform_data/mailbox-omap.h>
19#include <plat/dmtimer.h> 20#include <plat/dmtimer.h>
20 21
21#include "omap_hwmod.h" 22#include "omap_hwmod.h"
@@ -166,6 +167,18 @@ static struct omap_hwmod omap2420_dma_system_hwmod = {
166}; 167};
167 168
168/* mailbox */ 169/* mailbox */
170static struct omap_mbox_dev_info omap2420_mailbox_info[] = {
171 { .name = "dsp", .tx_id = 0, .rx_id = 1, .irq_id = 0, .usr_id = 0 },
172 { .name = "iva", .tx_id = 2, .rx_id = 3, .irq_id = 1, .usr_id = 3 },
173};
174
175static struct omap_mbox_pdata omap2420_mailbox_attrs = {
176 .num_users = 4,
177 .num_fifos = 6,
178 .info_cnt = ARRAY_SIZE(omap2420_mailbox_info),
179 .info = omap2420_mailbox_info,
180};
181
169static struct omap_hwmod_irq_info omap2420_mailbox_irqs[] = { 182static struct omap_hwmod_irq_info omap2420_mailbox_irqs[] = {
170 { .name = "dsp", .irq = 26 + OMAP_INTC_START, }, 183 { .name = "dsp", .irq = 26 + OMAP_INTC_START, },
171 { .name = "iva", .irq = 34 + OMAP_INTC_START, }, 184 { .name = "iva", .irq = 34 + OMAP_INTC_START, },
@@ -186,6 +199,7 @@ static struct omap_hwmod omap2420_mailbox_hwmod = {
186 .idlest_idle_bit = OMAP24XX_ST_MAILBOXES_SHIFT, 199 .idlest_idle_bit = OMAP24XX_ST_MAILBOXES_SHIFT,
187 }, 200 },
188 }, 201 },
202 .dev_attr = &omap2420_mailbox_attrs,
189}; 203};
190 204
191/* 205/*
diff --git a/arch/arm/mach-omap2/omap_hwmod_2430_data.c b/arch/arm/mach-omap2/omap_hwmod_2430_data.c
index 4ce999ee3ee9..5b9083461dc5 100644
--- a/arch/arm/mach-omap2/omap_hwmod_2430_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_2430_data.c
@@ -17,6 +17,7 @@
17#include <linux/platform_data/asoc-ti-mcbsp.h> 17#include <linux/platform_data/asoc-ti-mcbsp.h>
18#include <linux/platform_data/spi-omap2-mcspi.h> 18#include <linux/platform_data/spi-omap2-mcspi.h>
19#include <linux/omap-dma.h> 19#include <linux/omap-dma.h>
20#include <linux/platform_data/mailbox-omap.h>
20#include <plat/dmtimer.h> 21#include <plat/dmtimer.h>
21 22
22#include "omap_hwmod.h" 23#include "omap_hwmod.h"
@@ -170,6 +171,17 @@ static struct omap_hwmod omap2430_dma_system_hwmod = {
170}; 171};
171 172
172/* mailbox */ 173/* mailbox */
174static struct omap_mbox_dev_info omap2430_mailbox_info[] = {
175 { .name = "dsp", .tx_id = 0, .rx_id = 1 },
176};
177
178static struct omap_mbox_pdata omap2430_mailbox_attrs = {
179 .num_users = 4,
180 .num_fifos = 6,
181 .info_cnt = ARRAY_SIZE(omap2430_mailbox_info),
182 .info = omap2430_mailbox_info,
183};
184
173static struct omap_hwmod_irq_info omap2430_mailbox_irqs[] = { 185static struct omap_hwmod_irq_info omap2430_mailbox_irqs[] = {
174 { .irq = 26 + OMAP_INTC_START, }, 186 { .irq = 26 + OMAP_INTC_START, },
175 { .irq = -1 }, 187 { .irq = -1 },
@@ -189,6 +201,7 @@ static struct omap_hwmod omap2430_mailbox_hwmod = {
189 .idlest_idle_bit = OMAP24XX_ST_MAILBOXES_SHIFT, 201 .idlest_idle_bit = OMAP24XX_ST_MAILBOXES_SHIFT,
190 }, 202 },
191 }, 203 },
204 .dev_attr = &omap2430_mailbox_attrs,
192}; 205};
193 206
194/* mcspi3 */ 207/* mcspi3 */
diff --git a/arch/arm/mach-omap2/omap_hwmod_2xxx_3xxx_ipblock_data.c b/arch/arm/mach-omap2/omap_hwmod_2xxx_3xxx_ipblock_data.c
index 534974e08add..5da7a42a6d90 100644
--- a/arch/arm/mach-omap2/omap_hwmod_2xxx_3xxx_ipblock_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_2xxx_3xxx_ipblock_data.c
@@ -17,7 +17,6 @@
17#include "hdq1w.h" 17#include "hdq1w.h"
18 18
19#include "omap_hwmod_common_data.h" 19#include "omap_hwmod_common_data.h"
20#include "dma.h"
21 20
22/* UART */ 21/* UART */
23 22
@@ -89,32 +88,32 @@ struct omap_hwmod_class omap2_venc_hwmod_class = {
89 88
90/* Common DMA request line data */ 89/* Common DMA request line data */
91struct omap_hwmod_dma_info omap2_uart1_sdma_reqs[] = { 90struct omap_hwmod_dma_info omap2_uart1_sdma_reqs[] = {
92 { .name = "rx", .dma_req = OMAP24XX_DMA_UART1_RX, }, 91 { .name = "rx", .dma_req = 50, },
93 { .name = "tx", .dma_req = OMAP24XX_DMA_UART1_TX, }, 92 { .name = "tx", .dma_req = 49, },
94 { .dma_req = -1 } 93 { .dma_req = -1 }
95}; 94};
96 95
97struct omap_hwmod_dma_info omap2_uart2_sdma_reqs[] = { 96struct omap_hwmod_dma_info omap2_uart2_sdma_reqs[] = {
98 { .name = "rx", .dma_req = OMAP24XX_DMA_UART2_RX, }, 97 { .name = "rx", .dma_req = 52, },
99 { .name = "tx", .dma_req = OMAP24XX_DMA_UART2_TX, }, 98 { .name = "tx", .dma_req = 51, },
100 { .dma_req = -1 } 99 { .dma_req = -1 }
101}; 100};
102 101
103struct omap_hwmod_dma_info omap2_uart3_sdma_reqs[] = { 102struct omap_hwmod_dma_info omap2_uart3_sdma_reqs[] = {
104 { .name = "rx", .dma_req = OMAP24XX_DMA_UART3_RX, }, 103 { .name = "rx", .dma_req = 54, },
105 { .name = "tx", .dma_req = OMAP24XX_DMA_UART3_TX, }, 104 { .name = "tx", .dma_req = 53, },
106 { .dma_req = -1 } 105 { .dma_req = -1 }
107}; 106};
108 107
109struct omap_hwmod_dma_info omap2_i2c1_sdma_reqs[] = { 108struct omap_hwmod_dma_info omap2_i2c1_sdma_reqs[] = {
110 { .name = "tx", .dma_req = OMAP24XX_DMA_I2C1_TX }, 109 { .name = "tx", .dma_req = 27 },
111 { .name = "rx", .dma_req = OMAP24XX_DMA_I2C1_RX }, 110 { .name = "rx", .dma_req = 28 },
112 { .dma_req = -1 } 111 { .dma_req = -1 }
113}; 112};
114 113
115struct omap_hwmod_dma_info omap2_i2c2_sdma_reqs[] = { 114struct omap_hwmod_dma_info omap2_i2c2_sdma_reqs[] = {
116 { .name = "tx", .dma_req = OMAP24XX_DMA_I2C2_TX }, 115 { .name = "tx", .dma_req = 29 },
117 { .name = "rx", .dma_req = OMAP24XX_DMA_I2C2_RX }, 116 { .name = "rx", .dma_req = 30 },
118 { .dma_req = -1 } 117 { .dma_req = -1 }
119}; 118};
120 119
diff --git a/arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c b/arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c
index d05fc7b54567..56cebb05509e 100644
--- a/arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c
@@ -512,7 +512,7 @@ struct omap_hwmod omap2xxx_uart1_hwmod = {
512 .mpu_irqs = omap2_uart1_mpu_irqs, 512 .mpu_irqs = omap2_uart1_mpu_irqs,
513 .sdma_reqs = omap2_uart1_sdma_reqs, 513 .sdma_reqs = omap2_uart1_sdma_reqs,
514 .main_clk = "uart1_fck", 514 .main_clk = "uart1_fck",
515 .flags = HWMOD_SWSUP_SIDLE_ACT, 515 .flags = DEBUG_OMAP2UART1_FLAGS | HWMOD_SWSUP_SIDLE_ACT,
516 .prcm = { 516 .prcm = {
517 .omap2 = { 517 .omap2 = {
518 .module_offs = CORE_MOD, 518 .module_offs = CORE_MOD,
@@ -532,7 +532,7 @@ struct omap_hwmod omap2xxx_uart2_hwmod = {
532 .mpu_irqs = omap2_uart2_mpu_irqs, 532 .mpu_irqs = omap2_uart2_mpu_irqs,
533 .sdma_reqs = omap2_uart2_sdma_reqs, 533 .sdma_reqs = omap2_uart2_sdma_reqs,
534 .main_clk = "uart2_fck", 534 .main_clk = "uart2_fck",
535 .flags = HWMOD_SWSUP_SIDLE_ACT, 535 .flags = DEBUG_OMAP2UART2_FLAGS | HWMOD_SWSUP_SIDLE_ACT,
536 .prcm = { 536 .prcm = {
537 .omap2 = { 537 .omap2 = {
538 .module_offs = CORE_MOD, 538 .module_offs = CORE_MOD,
@@ -552,7 +552,7 @@ struct omap_hwmod omap2xxx_uart3_hwmod = {
552 .mpu_irqs = omap2_uart3_mpu_irqs, 552 .mpu_irqs = omap2_uart3_mpu_irqs,
553 .sdma_reqs = omap2_uart3_sdma_reqs, 553 .sdma_reqs = omap2_uart3_sdma_reqs,
554 .main_clk = "uart3_fck", 554 .main_clk = "uart3_fck",
555 .flags = HWMOD_SWSUP_SIDLE_ACT, 555 .flags = DEBUG_OMAP2UART3_FLAGS | HWMOD_SWSUP_SIDLE_ACT,
556 .prcm = { 556 .prcm = {
557 .omap2 = { 557 .omap2 = {
558 .module_offs = CORE_MOD, 558 .module_offs = CORE_MOD,
diff --git a/arch/arm/mach-omap2/omap_hwmod_33xx_data.c b/arch/arm/mach-omap2/omap_hwmod_33xx_data.c
index 69337af748cc..eb2f3b93b51c 100644
--- a/arch/arm/mach-omap2/omap_hwmod_33xx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_33xx_data.c
@@ -35,29 +35,6 @@
35 */ 35 */
36 36
37/* 37/*
38 * 'emif_fw' class
39 * instance(s): emif_fw
40 */
41static struct omap_hwmod_class am33xx_emif_fw_hwmod_class = {
42 .name = "emif_fw",
43};
44
45/* emif_fw */
46static struct omap_hwmod am33xx_emif_fw_hwmod = {
47 .name = "emif_fw",
48 .class = &am33xx_emif_fw_hwmod_class,
49 .clkdm_name = "l4fw_clkdm",
50 .main_clk = "l4fw_gclk",
51 .flags = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET),
52 .prcm = {
53 .omap4 = {
54 .clkctrl_offs = AM33XX_CM_PER_EMIF_FW_CLKCTRL_OFFSET,
55 .modulemode = MODULEMODE_SWCTRL,
56 },
57 },
58};
59
60/*
61 * 'emif' class 38 * 'emif' class
62 * instance(s): emif 39 * instance(s): emif
63 */ 40 */
@@ -70,18 +47,12 @@ static struct omap_hwmod_class am33xx_emif_hwmod_class = {
70 .sysc = &am33xx_emif_sysc, 47 .sysc = &am33xx_emif_sysc,
71}; 48};
72 49
73static struct omap_hwmod_irq_info am33xx_emif_irqs[] = {
74 { .name = "ddrerr0", .irq = 101 + OMAP_INTC_START, },
75 { .irq = -1 },
76};
77
78/* emif */ 50/* emif */
79static struct omap_hwmod am33xx_emif_hwmod = { 51static struct omap_hwmod am33xx_emif_hwmod = {
80 .name = "emif", 52 .name = "emif",
81 .class = &am33xx_emif_hwmod_class, 53 .class = &am33xx_emif_hwmod_class,
82 .clkdm_name = "l3_clkdm", 54 .clkdm_name = "l3_clkdm",
83 .flags = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET), 55 .flags = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET),
84 .mpu_irqs = am33xx_emif_irqs,
85 .main_clk = "dpll_ddr_m2_div2_ck", 56 .main_clk = "dpll_ddr_m2_div2_ck",
86 .prcm = { 57 .prcm = {
87 .omap4 = { 58 .omap4 = {
@@ -99,19 +70,11 @@ static struct omap_hwmod_class am33xx_l3_hwmod_class = {
99 .name = "l3", 70 .name = "l3",
100}; 71};
101 72
102/* l3_main (l3_fast) */
103static struct omap_hwmod_irq_info am33xx_l3_main_irqs[] = {
104 { .name = "l3debug", .irq = 9 + OMAP_INTC_START, },
105 { .name = "l3appint", .irq = 10 + OMAP_INTC_START, },
106 { .irq = -1 },
107};
108
109static struct omap_hwmod am33xx_l3_main_hwmod = { 73static struct omap_hwmod am33xx_l3_main_hwmod = {
110 .name = "l3_main", 74 .name = "l3_main",
111 .class = &am33xx_l3_hwmod_class, 75 .class = &am33xx_l3_hwmod_class,
112 .clkdm_name = "l3_clkdm", 76 .clkdm_name = "l3_clkdm",
113 .flags = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET), 77 .flags = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET),
114 .mpu_irqs = am33xx_l3_main_irqs,
115 .main_clk = "l3_gclk", 78 .main_clk = "l3_gclk",
116 .prcm = { 79 .prcm = {
117 .omap4 = { 80 .omap4 = {
@@ -196,20 +159,6 @@ static struct omap_hwmod am33xx_l4_wkup_hwmod = {
196 }, 159 },
197}; 160};
198 161
199/* l4_fw */
200static struct omap_hwmod am33xx_l4_fw_hwmod = {
201 .name = "l4_fw",
202 .class = &am33xx_l4_hwmod_class,
203 .clkdm_name = "l4fw_clkdm",
204 .flags = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET),
205 .prcm = {
206 .omap4 = {
207 .clkctrl_offs = AM33XX_CM_PER_L4FW_CLKCTRL_OFFSET,
208 .modulemode = MODULEMODE_SWCTRL,
209 },
210 },
211};
212
213/* 162/*
214 * 'mpu' class 163 * 'mpu' class
215 */ 164 */
@@ -217,21 +166,11 @@ static struct omap_hwmod_class am33xx_mpu_hwmod_class = {
217 .name = "mpu", 166 .name = "mpu",
218}; 167};
219 168
220/* mpu */
221static struct omap_hwmod_irq_info am33xx_mpu_irqs[] = {
222 { .name = "emuint", .irq = 0 + OMAP_INTC_START, },
223 { .name = "commtx", .irq = 1 + OMAP_INTC_START, },
224 { .name = "commrx", .irq = 2 + OMAP_INTC_START, },
225 { .name = "bench", .irq = 3 + OMAP_INTC_START, },
226 { .irq = -1 },
227};
228
229static struct omap_hwmod am33xx_mpu_hwmod = { 169static struct omap_hwmod am33xx_mpu_hwmod = {
230 .name = "mpu", 170 .name = "mpu",
231 .class = &am33xx_mpu_hwmod_class, 171 .class = &am33xx_mpu_hwmod_class,
232 .clkdm_name = "mpu_clkdm", 172 .clkdm_name = "mpu_clkdm",
233 .flags = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET), 173 .flags = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET),
234 .mpu_irqs = am33xx_mpu_irqs,
235 .main_clk = "dpll_mpu_m2_ck", 174 .main_clk = "dpll_mpu_m2_ck",
236 .prcm = { 175 .prcm = {
237 .omap4 = { 176 .omap4 = {
@@ -253,11 +192,6 @@ static struct omap_hwmod_rst_info am33xx_wkup_m3_resets[] = {
253 { .name = "wkup_m3", .rst_shift = 3, .st_shift = 5 }, 192 { .name = "wkup_m3", .rst_shift = 3, .st_shift = 5 },
254}; 193};
255 194
256static struct omap_hwmod_irq_info am33xx_wkup_m3_irqs[] = {
257 { .name = "txev", .irq = 78 + OMAP_INTC_START, },
258 { .irq = -1 },
259};
260
261/* wkup_m3 */ 195/* wkup_m3 */
262static struct omap_hwmod am33xx_wkup_m3_hwmod = { 196static struct omap_hwmod am33xx_wkup_m3_hwmod = {
263 .name = "wkup_m3", 197 .name = "wkup_m3",
@@ -265,7 +199,6 @@ static struct omap_hwmod am33xx_wkup_m3_hwmod = {
265 .clkdm_name = "l4_wkup_aon_clkdm", 199 .clkdm_name = "l4_wkup_aon_clkdm",
266 /* Keep hardreset asserted */ 200 /* Keep hardreset asserted */
267 .flags = HWMOD_INIT_NO_RESET | HWMOD_NO_IDLEST, 201 .flags = HWMOD_INIT_NO_RESET | HWMOD_NO_IDLEST,
268 .mpu_irqs = am33xx_wkup_m3_irqs,
269 .main_clk = "dpll_core_m4_div2_ck", 202 .main_clk = "dpll_core_m4_div2_ck",
270 .prcm = { 203 .prcm = {
271 .omap4 = { 204 .omap4 = {
@@ -291,25 +224,12 @@ static struct omap_hwmod_rst_info am33xx_pruss_resets[] = {
291 { .name = "pruss", .rst_shift = 1 }, 224 { .name = "pruss", .rst_shift = 1 },
292}; 225};
293 226
294static struct omap_hwmod_irq_info am33xx_pruss_irqs[] = {
295 { .name = "evtout0", .irq = 20 + OMAP_INTC_START, },
296 { .name = "evtout1", .irq = 21 + OMAP_INTC_START, },
297 { .name = "evtout2", .irq = 22 + OMAP_INTC_START, },
298 { .name = "evtout3", .irq = 23 + OMAP_INTC_START, },
299 { .name = "evtout4", .irq = 24 + OMAP_INTC_START, },
300 { .name = "evtout5", .irq = 25 + OMAP_INTC_START, },
301 { .name = "evtout6", .irq = 26 + OMAP_INTC_START, },
302 { .name = "evtout7", .irq = 27 + OMAP_INTC_START, },
303 { .irq = -1 },
304};
305
306/* pru-icss */ 227/* pru-icss */
307/* Pseudo hwmod for reset control purpose only */ 228/* Pseudo hwmod for reset control purpose only */
308static struct omap_hwmod am33xx_pruss_hwmod = { 229static struct omap_hwmod am33xx_pruss_hwmod = {
309 .name = "pruss", 230 .name = "pruss",
310 .class = &am33xx_pruss_hwmod_class, 231 .class = &am33xx_pruss_hwmod_class,
311 .clkdm_name = "pruss_ocp_clkdm", 232 .clkdm_name = "pruss_ocp_clkdm",
312 .mpu_irqs = am33xx_pruss_irqs,
313 .main_clk = "pruss_ocp_gclk", 233 .main_clk = "pruss_ocp_gclk",
314 .prcm = { 234 .prcm = {
315 .omap4 = { 235 .omap4 = {
@@ -329,24 +249,19 @@ static struct omap_hwmod_class am33xx_gfx_hwmod_class = {
329}; 249};
330 250
331static struct omap_hwmod_rst_info am33xx_gfx_resets[] = { 251static struct omap_hwmod_rst_info am33xx_gfx_resets[] = {
332 { .name = "gfx", .rst_shift = 0 }, 252 { .name = "gfx", .rst_shift = 0, .st_shift = 0},
333};
334
335static struct omap_hwmod_irq_info am33xx_gfx_irqs[] = {
336 { .name = "gfxint", .irq = 37 + OMAP_INTC_START, },
337 { .irq = -1 },
338}; 253};
339 254
340static struct omap_hwmod am33xx_gfx_hwmod = { 255static struct omap_hwmod am33xx_gfx_hwmod = {
341 .name = "gfx", 256 .name = "gfx",
342 .class = &am33xx_gfx_hwmod_class, 257 .class = &am33xx_gfx_hwmod_class,
343 .clkdm_name = "gfx_l3_clkdm", 258 .clkdm_name = "gfx_l3_clkdm",
344 .mpu_irqs = am33xx_gfx_irqs,
345 .main_clk = "gfx_fck_div_ck", 259 .main_clk = "gfx_fck_div_ck",
346 .prcm = { 260 .prcm = {
347 .omap4 = { 261 .omap4 = {
348 .clkctrl_offs = AM33XX_CM_GFX_GFX_CLKCTRL_OFFSET, 262 .clkctrl_offs = AM33XX_CM_GFX_GFX_CLKCTRL_OFFSET,
349 .rstctrl_offs = AM33XX_RM_GFX_RSTCTRL_OFFSET, 263 .rstctrl_offs = AM33XX_RM_GFX_RSTCTRL_OFFSET,
264 .rstst_offs = AM33XX_RM_GFX_RSTST_OFFSET,
350 .modulemode = MODULEMODE_SWCTRL, 265 .modulemode = MODULEMODE_SWCTRL,
351 }, 266 },
352 }, 267 },
@@ -387,16 +302,10 @@ static struct omap_hwmod_class am33xx_adc_tsc_hwmod_class = {
387 .sysc = &am33xx_adc_tsc_sysc, 302 .sysc = &am33xx_adc_tsc_sysc,
388}; 303};
389 304
390static struct omap_hwmod_irq_info am33xx_adc_tsc_irqs[] = {
391 { .irq = 16 + OMAP_INTC_START, },
392 { .irq = -1 },
393};
394
395static struct omap_hwmod am33xx_adc_tsc_hwmod = { 305static struct omap_hwmod am33xx_adc_tsc_hwmod = {
396 .name = "adc_tsc", 306 .name = "adc_tsc",
397 .class = &am33xx_adc_tsc_hwmod_class, 307 .class = &am33xx_adc_tsc_hwmod_class,
398 .clkdm_name = "l4_wkup_clkdm", 308 .clkdm_name = "l4_wkup_clkdm",
399 .mpu_irqs = am33xx_adc_tsc_irqs,
400 .main_clk = "adc_tsc_fck", 309 .main_clk = "adc_tsc_fck",
401 .prcm = { 310 .prcm = {
402 .omap4 = { 311 .omap4 = {
@@ -515,23 +424,10 @@ static struct omap_hwmod_class am33xx_aes0_hwmod_class = {
515 .sysc = &am33xx_aes0_sysc, 424 .sysc = &am33xx_aes0_sysc,
516}; 425};
517 426
518static struct omap_hwmod_irq_info am33xx_aes0_irqs[] = {
519 { .irq = 103 + OMAP_INTC_START, },
520 { .irq = -1 },
521};
522
523static struct omap_hwmod_dma_info am33xx_aes0_edma_reqs[] = {
524 { .name = "tx", .dma_req = 6, },
525 { .name = "rx", .dma_req = 5, },
526 { .dma_req = -1 }
527};
528
529static struct omap_hwmod am33xx_aes0_hwmod = { 427static struct omap_hwmod am33xx_aes0_hwmod = {
530 .name = "aes", 428 .name = "aes",
531 .class = &am33xx_aes0_hwmod_class, 429 .class = &am33xx_aes0_hwmod_class,
532 .clkdm_name = "l3_clkdm", 430 .clkdm_name = "l3_clkdm",
533 .mpu_irqs = am33xx_aes0_irqs,
534 .sdma_reqs = am33xx_aes0_edma_reqs,
535 .main_clk = "aes0_fck", 431 .main_clk = "aes0_fck",
536 .prcm = { 432 .prcm = {
537 .omap4 = { 433 .omap4 = {
@@ -554,22 +450,10 @@ static struct omap_hwmod_class am33xx_sha0_hwmod_class = {
554 .sysc = &am33xx_sha0_sysc, 450 .sysc = &am33xx_sha0_sysc,
555}; 451};
556 452
557static struct omap_hwmod_irq_info am33xx_sha0_irqs[] = {
558 { .irq = 109 + OMAP_INTC_START, },
559 { .irq = -1 },
560};
561
562static struct omap_hwmod_dma_info am33xx_sha0_edma_reqs[] = {
563 { .name = "rx", .dma_req = 36, },
564 { .dma_req = -1 }
565};
566
567static struct omap_hwmod am33xx_sha0_hwmod = { 453static struct omap_hwmod am33xx_sha0_hwmod = {
568 .name = "sham", 454 .name = "sham",
569 .class = &am33xx_sha0_hwmod_class, 455 .class = &am33xx_sha0_hwmod_class,
570 .clkdm_name = "l3_clkdm", 456 .clkdm_name = "l3_clkdm",
571 .mpu_irqs = am33xx_sha0_irqs,
572 .sdma_reqs = am33xx_sha0_edma_reqs,
573 .main_clk = "l3_gclk", 457 .main_clk = "l3_gclk",
574 .prcm = { 458 .prcm = {
575 .omap4 = { 459 .omap4 = {
@@ -604,16 +488,10 @@ static struct omap_hwmod_class am33xx_smartreflex_hwmod_class = {
604}; 488};
605 489
606/* smartreflex0 */ 490/* smartreflex0 */
607static struct omap_hwmod_irq_info am33xx_smartreflex0_irqs[] = {
608 { .irq = 120 + OMAP_INTC_START, },
609 { .irq = -1 },
610};
611
612static struct omap_hwmod am33xx_smartreflex0_hwmod = { 491static struct omap_hwmod am33xx_smartreflex0_hwmod = {
613 .name = "smartreflex0", 492 .name = "smartreflex0",
614 .class = &am33xx_smartreflex_hwmod_class, 493 .class = &am33xx_smartreflex_hwmod_class,
615 .clkdm_name = "l4_wkup_clkdm", 494 .clkdm_name = "l4_wkup_clkdm",
616 .mpu_irqs = am33xx_smartreflex0_irqs,
617 .main_clk = "smartreflex0_fck", 495 .main_clk = "smartreflex0_fck",
618 .prcm = { 496 .prcm = {
619 .omap4 = { 497 .omap4 = {
@@ -624,16 +502,10 @@ static struct omap_hwmod am33xx_smartreflex0_hwmod = {
624}; 502};
625 503
626/* smartreflex1 */ 504/* smartreflex1 */
627static struct omap_hwmod_irq_info am33xx_smartreflex1_irqs[] = {
628 { .irq = 121 + OMAP_INTC_START, },
629 { .irq = -1 },
630};
631
632static struct omap_hwmod am33xx_smartreflex1_hwmod = { 505static struct omap_hwmod am33xx_smartreflex1_hwmod = {
633 .name = "smartreflex1", 506 .name = "smartreflex1",
634 .class = &am33xx_smartreflex_hwmod_class, 507 .class = &am33xx_smartreflex_hwmod_class,
635 .clkdm_name = "l4_wkup_clkdm", 508 .clkdm_name = "l4_wkup_clkdm",
636 .mpu_irqs = am33xx_smartreflex1_irqs,
637 .main_clk = "smartreflex1_fck", 509 .main_clk = "smartreflex1_fck",
638 .prcm = { 510 .prcm = {
639 .omap4 = { 511 .omap4 = {
@@ -650,17 +522,11 @@ static struct omap_hwmod_class am33xx_control_hwmod_class = {
650 .name = "control", 522 .name = "control",
651}; 523};
652 524
653static struct omap_hwmod_irq_info am33xx_control_irqs[] = {
654 { .irq = 8 + OMAP_INTC_START, },
655 { .irq = -1 },
656};
657
658static struct omap_hwmod am33xx_control_hwmod = { 525static struct omap_hwmod am33xx_control_hwmod = {
659 .name = "control", 526 .name = "control",
660 .class = &am33xx_control_hwmod_class, 527 .class = &am33xx_control_hwmod_class,
661 .clkdm_name = "l4_wkup_clkdm", 528 .clkdm_name = "l4_wkup_clkdm",
662 .flags = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET), 529 .flags = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET),
663 .mpu_irqs = am33xx_control_irqs,
664 .main_clk = "dpll_core_m4_div2_ck", 530 .main_clk = "dpll_core_m4_div2_ck",
665 .prcm = { 531 .prcm = {
666 .omap4 = { 532 .omap4 = {
@@ -690,21 +556,13 @@ static struct omap_hwmod_class am33xx_cpgmac0_hwmod_class = {
690 .sysc = &am33xx_cpgmac_sysc, 556 .sysc = &am33xx_cpgmac_sysc,
691}; 557};
692 558
693static struct omap_hwmod_irq_info am33xx_cpgmac0_irqs[] = {
694 { .name = "c0_rx_thresh_pend", .irq = 40 + OMAP_INTC_START, },
695 { .name = "c0_rx_pend", .irq = 41 + OMAP_INTC_START, },
696 { .name = "c0_tx_pend", .irq = 42 + OMAP_INTC_START, },
697 { .name = "c0_misc_pend", .irq = 43 + OMAP_INTC_START, },
698 { .irq = -1 },
699};
700
701static struct omap_hwmod am33xx_cpgmac0_hwmod = { 559static struct omap_hwmod am33xx_cpgmac0_hwmod = {
702 .name = "cpgmac0", 560 .name = "cpgmac0",
703 .class = &am33xx_cpgmac0_hwmod_class, 561 .class = &am33xx_cpgmac0_hwmod_class,
704 .clkdm_name = "cpsw_125mhz_clkdm", 562 .clkdm_name = "cpsw_125mhz_clkdm",
705 .flags = (HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY), 563 .flags = (HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY),
706 .mpu_irqs = am33xx_cpgmac0_irqs,
707 .main_clk = "cpsw_125mhz_gclk", 564 .main_clk = "cpsw_125mhz_gclk",
565 .mpu_rt_idx = 1,
708 .prcm = { 566 .prcm = {
709 .omap4 = { 567 .omap4 = {
710 .clkctrl_offs = AM33XX_CM_PER_CPGMAC0_CLKCTRL_OFFSET, 568 .clkctrl_offs = AM33XX_CM_PER_CPGMAC0_CLKCTRL_OFFSET,
@@ -735,17 +593,10 @@ static struct omap_hwmod_class am33xx_dcan_hwmod_class = {
735}; 593};
736 594
737/* dcan0 */ 595/* dcan0 */
738static struct omap_hwmod_irq_info am33xx_dcan0_irqs[] = {
739 { .name = "d_can_ms", .irq = 52 + OMAP_INTC_START, },
740 { .name = "d_can_mo", .irq = 53 + OMAP_INTC_START, },
741 { .irq = -1 },
742};
743
744static struct omap_hwmod am33xx_dcan0_hwmod = { 596static struct omap_hwmod am33xx_dcan0_hwmod = {
745 .name = "d_can0", 597 .name = "d_can0",
746 .class = &am33xx_dcan_hwmod_class, 598 .class = &am33xx_dcan_hwmod_class,
747 .clkdm_name = "l4ls_clkdm", 599 .clkdm_name = "l4ls_clkdm",
748 .mpu_irqs = am33xx_dcan0_irqs,
749 .main_clk = "dcan0_fck", 600 .main_clk = "dcan0_fck",
750 .prcm = { 601 .prcm = {
751 .omap4 = { 602 .omap4 = {
@@ -756,16 +607,10 @@ static struct omap_hwmod am33xx_dcan0_hwmod = {
756}; 607};
757 608
758/* dcan1 */ 609/* dcan1 */
759static struct omap_hwmod_irq_info am33xx_dcan1_irqs[] = {
760 { .name = "d_can_ms", .irq = 55 + OMAP_INTC_START, },
761 { .name = "d_can_mo", .irq = 56 + OMAP_INTC_START, },
762 { .irq = -1 },
763};
764static struct omap_hwmod am33xx_dcan1_hwmod = { 610static struct omap_hwmod am33xx_dcan1_hwmod = {
765 .name = "d_can1", 611 .name = "d_can1",
766 .class = &am33xx_dcan_hwmod_class, 612 .class = &am33xx_dcan_hwmod_class,
767 .clkdm_name = "l4ls_clkdm", 613 .clkdm_name = "l4ls_clkdm",
768 .mpu_irqs = am33xx_dcan1_irqs,
769 .main_clk = "dcan1_fck", 614 .main_clk = "dcan1_fck",
770 .prcm = { 615 .prcm = {
771 .omap4 = { 616 .omap4 = {
@@ -792,16 +637,10 @@ static struct omap_hwmod_class am33xx_elm_hwmod_class = {
792 .sysc = &am33xx_elm_sysc, 637 .sysc = &am33xx_elm_sysc,
793}; 638};
794 639
795static struct omap_hwmod_irq_info am33xx_elm_irqs[] = {
796 { .irq = 4 + OMAP_INTC_START, },
797 { .irq = -1 },
798};
799
800static struct omap_hwmod am33xx_elm_hwmod = { 640static struct omap_hwmod am33xx_elm_hwmod = {
801 .name = "elm", 641 .name = "elm",
802 .class = &am33xx_elm_hwmod_class, 642 .class = &am33xx_elm_hwmod_class,
803 .clkdm_name = "l4ls_clkdm", 643 .clkdm_name = "l4ls_clkdm",
804 .mpu_irqs = am33xx_elm_irqs,
805 .main_clk = "l4ls_gclk", 644 .main_clk = "l4ls_gclk",
806 .prcm = { 645 .prcm = {
807 .omap4 = { 646 .omap4 = {
@@ -854,45 +693,26 @@ static struct omap_hwmod am33xx_epwmss0_hwmod = {
854}; 693};
855 694
856/* ecap0 */ 695/* ecap0 */
857static struct omap_hwmod_irq_info am33xx_ecap0_irqs[] = {
858 { .irq = 31 + OMAP_INTC_START, },
859 { .irq = -1 },
860};
861
862static struct omap_hwmod am33xx_ecap0_hwmod = { 696static struct omap_hwmod am33xx_ecap0_hwmod = {
863 .name = "ecap0", 697 .name = "ecap0",
864 .class = &am33xx_ecap_hwmod_class, 698 .class = &am33xx_ecap_hwmod_class,
865 .clkdm_name = "l4ls_clkdm", 699 .clkdm_name = "l4ls_clkdm",
866 .mpu_irqs = am33xx_ecap0_irqs,
867 .main_clk = "l4ls_gclk", 700 .main_clk = "l4ls_gclk",
868}; 701};
869 702
870/* eqep0 */ 703/* eqep0 */
871static struct omap_hwmod_irq_info am33xx_eqep0_irqs[] = {
872 { .irq = 79 + OMAP_INTC_START, },
873 { .irq = -1 },
874};
875
876static struct omap_hwmod am33xx_eqep0_hwmod = { 704static struct omap_hwmod am33xx_eqep0_hwmod = {
877 .name = "eqep0", 705 .name = "eqep0",
878 .class = &am33xx_eqep_hwmod_class, 706 .class = &am33xx_eqep_hwmod_class,
879 .clkdm_name = "l4ls_clkdm", 707 .clkdm_name = "l4ls_clkdm",
880 .mpu_irqs = am33xx_eqep0_irqs,
881 .main_clk = "l4ls_gclk", 708 .main_clk = "l4ls_gclk",
882}; 709};
883 710
884/* ehrpwm0 */ 711/* ehrpwm0 */
885static struct omap_hwmod_irq_info am33xx_ehrpwm0_irqs[] = {
886 { .name = "int", .irq = 86 + OMAP_INTC_START, },
887 { .name = "tzint", .irq = 58 + OMAP_INTC_START, },
888 { .irq = -1 },
889};
890
891static struct omap_hwmod am33xx_ehrpwm0_hwmod = { 712static struct omap_hwmod am33xx_ehrpwm0_hwmod = {
892 .name = "ehrpwm0", 713 .name = "ehrpwm0",
893 .class = &am33xx_ehrpwm_hwmod_class, 714 .class = &am33xx_ehrpwm_hwmod_class,
894 .clkdm_name = "l4ls_clkdm", 715 .clkdm_name = "l4ls_clkdm",
895 .mpu_irqs = am33xx_ehrpwm0_irqs,
896 .main_clk = "l4ls_gclk", 716 .main_clk = "l4ls_gclk",
897}; 717};
898 718
@@ -911,45 +731,26 @@ static struct omap_hwmod am33xx_epwmss1_hwmod = {
911}; 731};
912 732
913/* ecap1 */ 733/* ecap1 */
914static struct omap_hwmod_irq_info am33xx_ecap1_irqs[] = {
915 { .irq = 47 + OMAP_INTC_START, },
916 { .irq = -1 },
917};
918
919static struct omap_hwmod am33xx_ecap1_hwmod = { 734static struct omap_hwmod am33xx_ecap1_hwmod = {
920 .name = "ecap1", 735 .name = "ecap1",
921 .class = &am33xx_ecap_hwmod_class, 736 .class = &am33xx_ecap_hwmod_class,
922 .clkdm_name = "l4ls_clkdm", 737 .clkdm_name = "l4ls_clkdm",
923 .mpu_irqs = am33xx_ecap1_irqs,
924 .main_clk = "l4ls_gclk", 738 .main_clk = "l4ls_gclk",
925}; 739};
926 740
927/* eqep1 */ 741/* eqep1 */
928static struct omap_hwmod_irq_info am33xx_eqep1_irqs[] = {
929 { .irq = 88 + OMAP_INTC_START, },
930 { .irq = -1 },
931};
932
933static struct omap_hwmod am33xx_eqep1_hwmod = { 742static struct omap_hwmod am33xx_eqep1_hwmod = {
934 .name = "eqep1", 743 .name = "eqep1",
935 .class = &am33xx_eqep_hwmod_class, 744 .class = &am33xx_eqep_hwmod_class,
936 .clkdm_name = "l4ls_clkdm", 745 .clkdm_name = "l4ls_clkdm",
937 .mpu_irqs = am33xx_eqep1_irqs,
938 .main_clk = "l4ls_gclk", 746 .main_clk = "l4ls_gclk",
939}; 747};
940 748
941/* ehrpwm1 */ 749/* ehrpwm1 */
942static struct omap_hwmod_irq_info am33xx_ehrpwm1_irqs[] = {
943 { .name = "int", .irq = 87 + OMAP_INTC_START, },
944 { .name = "tzint", .irq = 59 + OMAP_INTC_START, },
945 { .irq = -1 },
946};
947
948static struct omap_hwmod am33xx_ehrpwm1_hwmod = { 750static struct omap_hwmod am33xx_ehrpwm1_hwmod = {
949 .name = "ehrpwm1", 751 .name = "ehrpwm1",
950 .class = &am33xx_ehrpwm_hwmod_class, 752 .class = &am33xx_ehrpwm_hwmod_class,
951 .clkdm_name = "l4ls_clkdm", 753 .clkdm_name = "l4ls_clkdm",
952 .mpu_irqs = am33xx_ehrpwm1_irqs,
953 .main_clk = "l4ls_gclk", 754 .main_clk = "l4ls_gclk",
954}; 755};
955 756
@@ -968,45 +769,26 @@ static struct omap_hwmod am33xx_epwmss2_hwmod = {
968}; 769};
969 770
970/* ecap2 */ 771/* ecap2 */
971static struct omap_hwmod_irq_info am33xx_ecap2_irqs[] = {
972 { .irq = 61 + OMAP_INTC_START, },
973 { .irq = -1 },
974};
975
976static struct omap_hwmod am33xx_ecap2_hwmod = { 772static struct omap_hwmod am33xx_ecap2_hwmod = {
977 .name = "ecap2", 773 .name = "ecap2",
978 .class = &am33xx_ecap_hwmod_class, 774 .class = &am33xx_ecap_hwmod_class,
979 .clkdm_name = "l4ls_clkdm", 775 .clkdm_name = "l4ls_clkdm",
980 .mpu_irqs = am33xx_ecap2_irqs,
981 .main_clk = "l4ls_gclk", 776 .main_clk = "l4ls_gclk",
982}; 777};
983 778
984/* eqep2 */ 779/* eqep2 */
985static struct omap_hwmod_irq_info am33xx_eqep2_irqs[] = {
986 { .irq = 89 + OMAP_INTC_START, },
987 { .irq = -1 },
988};
989
990static struct omap_hwmod am33xx_eqep2_hwmod = { 780static struct omap_hwmod am33xx_eqep2_hwmod = {
991 .name = "eqep2", 781 .name = "eqep2",
992 .class = &am33xx_eqep_hwmod_class, 782 .class = &am33xx_eqep_hwmod_class,
993 .clkdm_name = "l4ls_clkdm", 783 .clkdm_name = "l4ls_clkdm",
994 .mpu_irqs = am33xx_eqep2_irqs,
995 .main_clk = "l4ls_gclk", 784 .main_clk = "l4ls_gclk",
996}; 785};
997 786
998/* ehrpwm2 */ 787/* ehrpwm2 */
999static struct omap_hwmod_irq_info am33xx_ehrpwm2_irqs[] = {
1000 { .name = "int", .irq = 39 + OMAP_INTC_START, },
1001 { .name = "tzint", .irq = 60 + OMAP_INTC_START, },
1002 { .irq = -1 },
1003};
1004
1005static struct omap_hwmod am33xx_ehrpwm2_hwmod = { 788static struct omap_hwmod am33xx_ehrpwm2_hwmod = {
1006 .name = "ehrpwm2", 789 .name = "ehrpwm2",
1007 .class = &am33xx_ehrpwm_hwmod_class, 790 .class = &am33xx_ehrpwm_hwmod_class,
1008 .clkdm_name = "l4ls_clkdm", 791 .clkdm_name = "l4ls_clkdm",
1009 .mpu_irqs = am33xx_ehrpwm2_irqs,
1010 .main_clk = "l4ls_gclk", 792 .main_clk = "l4ls_gclk",
1011}; 793};
1012 794
@@ -1041,17 +823,11 @@ static struct omap_hwmod_opt_clk gpio0_opt_clks[] = {
1041 { .role = "dbclk", .clk = "gpio0_dbclk" }, 823 { .role = "dbclk", .clk = "gpio0_dbclk" },
1042}; 824};
1043 825
1044static struct omap_hwmod_irq_info am33xx_gpio0_irqs[] = {
1045 { .irq = 96 + OMAP_INTC_START, },
1046 { .irq = -1 },
1047};
1048
1049static struct omap_hwmod am33xx_gpio0_hwmod = { 826static struct omap_hwmod am33xx_gpio0_hwmod = {
1050 .name = "gpio1", 827 .name = "gpio1",
1051 .class = &am33xx_gpio_hwmod_class, 828 .class = &am33xx_gpio_hwmod_class,
1052 .clkdm_name = "l4_wkup_clkdm", 829 .clkdm_name = "l4_wkup_clkdm",
1053 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET, 830 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
1054 .mpu_irqs = am33xx_gpio0_irqs,
1055 .main_clk = "dpll_core_m4_div2_ck", 831 .main_clk = "dpll_core_m4_div2_ck",
1056 .prcm = { 832 .prcm = {
1057 .omap4 = { 833 .omap4 = {
@@ -1065,11 +841,6 @@ static struct omap_hwmod am33xx_gpio0_hwmod = {
1065}; 841};
1066 842
1067/* gpio1 */ 843/* gpio1 */
1068static struct omap_hwmod_irq_info am33xx_gpio1_irqs[] = {
1069 { .irq = 98 + OMAP_INTC_START, },
1070 { .irq = -1 },
1071};
1072
1073static struct omap_hwmod_opt_clk gpio1_opt_clks[] = { 844static struct omap_hwmod_opt_clk gpio1_opt_clks[] = {
1074 { .role = "dbclk", .clk = "gpio1_dbclk" }, 845 { .role = "dbclk", .clk = "gpio1_dbclk" },
1075}; 846};
@@ -1079,7 +850,6 @@ static struct omap_hwmod am33xx_gpio1_hwmod = {
1079 .class = &am33xx_gpio_hwmod_class, 850 .class = &am33xx_gpio_hwmod_class,
1080 .clkdm_name = "l4ls_clkdm", 851 .clkdm_name = "l4ls_clkdm",
1081 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET, 852 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
1082 .mpu_irqs = am33xx_gpio1_irqs,
1083 .main_clk = "l4ls_gclk", 853 .main_clk = "l4ls_gclk",
1084 .prcm = { 854 .prcm = {
1085 .omap4 = { 855 .omap4 = {
@@ -1093,11 +863,6 @@ static struct omap_hwmod am33xx_gpio1_hwmod = {
1093}; 863};
1094 864
1095/* gpio2 */ 865/* gpio2 */
1096static struct omap_hwmod_irq_info am33xx_gpio2_irqs[] = {
1097 { .irq = 32 + OMAP_INTC_START, },
1098 { .irq = -1 },
1099};
1100
1101static struct omap_hwmod_opt_clk gpio2_opt_clks[] = { 866static struct omap_hwmod_opt_clk gpio2_opt_clks[] = {
1102 { .role = "dbclk", .clk = "gpio2_dbclk" }, 867 { .role = "dbclk", .clk = "gpio2_dbclk" },
1103}; 868};
@@ -1107,7 +872,6 @@ static struct omap_hwmod am33xx_gpio2_hwmod = {
1107 .class = &am33xx_gpio_hwmod_class, 872 .class = &am33xx_gpio_hwmod_class,
1108 .clkdm_name = "l4ls_clkdm", 873 .clkdm_name = "l4ls_clkdm",
1109 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET, 874 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
1110 .mpu_irqs = am33xx_gpio2_irqs,
1111 .main_clk = "l4ls_gclk", 875 .main_clk = "l4ls_gclk",
1112 .prcm = { 876 .prcm = {
1113 .omap4 = { 877 .omap4 = {
@@ -1121,11 +885,6 @@ static struct omap_hwmod am33xx_gpio2_hwmod = {
1121}; 885};
1122 886
1123/* gpio3 */ 887/* gpio3 */
1124static struct omap_hwmod_irq_info am33xx_gpio3_irqs[] = {
1125 { .irq = 62 + OMAP_INTC_START, },
1126 { .irq = -1 },
1127};
1128
1129static struct omap_hwmod_opt_clk gpio3_opt_clks[] = { 888static struct omap_hwmod_opt_clk gpio3_opt_clks[] = {
1130 { .role = "dbclk", .clk = "gpio3_dbclk" }, 889 { .role = "dbclk", .clk = "gpio3_dbclk" },
1131}; 890};
@@ -1135,7 +894,6 @@ static struct omap_hwmod am33xx_gpio3_hwmod = {
1135 .class = &am33xx_gpio_hwmod_class, 894 .class = &am33xx_gpio_hwmod_class,
1136 .clkdm_name = "l4ls_clkdm", 895 .clkdm_name = "l4ls_clkdm",
1137 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET, 896 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
1138 .mpu_irqs = am33xx_gpio3_irqs,
1139 .main_clk = "l4ls_gclk", 897 .main_clk = "l4ls_gclk",
1140 .prcm = { 898 .prcm = {
1141 .omap4 = { 899 .omap4 = {
@@ -1164,17 +922,11 @@ static struct omap_hwmod_class am33xx_gpmc_hwmod_class = {
1164 .sysc = &gpmc_sysc, 922 .sysc = &gpmc_sysc,
1165}; 923};
1166 924
1167static struct omap_hwmod_irq_info am33xx_gpmc_irqs[] = {
1168 { .irq = 100 + OMAP_INTC_START, },
1169 { .irq = -1 },
1170};
1171
1172static struct omap_hwmod am33xx_gpmc_hwmod = { 925static struct omap_hwmod am33xx_gpmc_hwmod = {
1173 .name = "gpmc", 926 .name = "gpmc",
1174 .class = &am33xx_gpmc_hwmod_class, 927 .class = &am33xx_gpmc_hwmod_class,
1175 .clkdm_name = "l3s_clkdm", 928 .clkdm_name = "l3s_clkdm",
1176 .flags = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET), 929 .flags = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET),
1177 .mpu_irqs = am33xx_gpmc_irqs,
1178 .main_clk = "l3s_gclk", 930 .main_clk = "l3s_gclk",
1179 .prcm = { 931 .prcm = {
1180 .omap4 = { 932 .omap4 = {
@@ -1208,23 +960,10 @@ static struct omap_i2c_dev_attr i2c_dev_attr = {
1208}; 960};
1209 961
1210/* i2c1 */ 962/* i2c1 */
1211static struct omap_hwmod_irq_info i2c1_mpu_irqs[] = {
1212 { .irq = 70 + OMAP_INTC_START, },
1213 { .irq = -1 },
1214};
1215
1216static struct omap_hwmod_dma_info i2c1_edma_reqs[] = {
1217 { .name = "tx", .dma_req = 0, },
1218 { .name = "rx", .dma_req = 0, },
1219 { .dma_req = -1 }
1220};
1221
1222static struct omap_hwmod am33xx_i2c1_hwmod = { 963static struct omap_hwmod am33xx_i2c1_hwmod = {
1223 .name = "i2c1", 964 .name = "i2c1",
1224 .class = &i2c_class, 965 .class = &i2c_class,
1225 .clkdm_name = "l4_wkup_clkdm", 966 .clkdm_name = "l4_wkup_clkdm",
1226 .mpu_irqs = i2c1_mpu_irqs,
1227 .sdma_reqs = i2c1_edma_reqs,
1228 .flags = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT, 967 .flags = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT,
1229 .main_clk = "dpll_per_m2_div4_wkupdm_ck", 968 .main_clk = "dpll_per_m2_div4_wkupdm_ck",
1230 .prcm = { 969 .prcm = {
@@ -1237,23 +976,10 @@ static struct omap_hwmod am33xx_i2c1_hwmod = {
1237}; 976};
1238 977
1239/* i2c1 */ 978/* i2c1 */
1240static struct omap_hwmod_irq_info i2c2_mpu_irqs[] = {
1241 { .irq = 71 + OMAP_INTC_START, },
1242 { .irq = -1 },
1243};
1244
1245static struct omap_hwmod_dma_info i2c2_edma_reqs[] = {
1246 { .name = "tx", .dma_req = 0, },
1247 { .name = "rx", .dma_req = 0, },
1248 { .dma_req = -1 }
1249};
1250
1251static struct omap_hwmod am33xx_i2c2_hwmod = { 979static struct omap_hwmod am33xx_i2c2_hwmod = {
1252 .name = "i2c2", 980 .name = "i2c2",
1253 .class = &i2c_class, 981 .class = &i2c_class,
1254 .clkdm_name = "l4ls_clkdm", 982 .clkdm_name = "l4ls_clkdm",
1255 .mpu_irqs = i2c2_mpu_irqs,
1256 .sdma_reqs = i2c2_edma_reqs,
1257 .flags = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT, 983 .flags = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT,
1258 .main_clk = "dpll_per_m2_div4_ck", 984 .main_clk = "dpll_per_m2_div4_ck",
1259 .prcm = { 985 .prcm = {
@@ -1266,23 +992,10 @@ static struct omap_hwmod am33xx_i2c2_hwmod = {
1266}; 992};
1267 993
1268/* i2c3 */ 994/* i2c3 */
1269static struct omap_hwmod_dma_info i2c3_edma_reqs[] = {
1270 { .name = "tx", .dma_req = 0, },
1271 { .name = "rx", .dma_req = 0, },
1272 { .dma_req = -1 }
1273};
1274
1275static struct omap_hwmod_irq_info i2c3_mpu_irqs[] = {
1276 { .irq = 30 + OMAP_INTC_START, },
1277 { .irq = -1 },
1278};
1279
1280static struct omap_hwmod am33xx_i2c3_hwmod = { 995static struct omap_hwmod am33xx_i2c3_hwmod = {
1281 .name = "i2c3", 996 .name = "i2c3",
1282 .class = &i2c_class, 997 .class = &i2c_class,
1283 .clkdm_name = "l4ls_clkdm", 998 .clkdm_name = "l4ls_clkdm",
1284 .mpu_irqs = i2c3_mpu_irqs,
1285 .sdma_reqs = i2c3_edma_reqs,
1286 .flags = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT, 999 .flags = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT,
1287 .main_clk = "dpll_per_m2_div4_ck", 1000 .main_clk = "dpll_per_m2_div4_ck",
1288 .prcm = { 1001 .prcm = {
@@ -1309,16 +1022,10 @@ static struct omap_hwmod_class am33xx_lcdc_hwmod_class = {
1309 .sysc = &lcdc_sysc, 1022 .sysc = &lcdc_sysc,
1310}; 1023};
1311 1024
1312static struct omap_hwmod_irq_info am33xx_lcdc_irqs[] = {
1313 { .irq = 36 + OMAP_INTC_START, },
1314 { .irq = -1 },
1315};
1316
1317static struct omap_hwmod am33xx_lcdc_hwmod = { 1025static struct omap_hwmod am33xx_lcdc_hwmod = {
1318 .name = "lcdc", 1026 .name = "lcdc",
1319 .class = &am33xx_lcdc_hwmod_class, 1027 .class = &am33xx_lcdc_hwmod_class,
1320 .clkdm_name = "lcdc_clkdm", 1028 .clkdm_name = "lcdc_clkdm",
1321 .mpu_irqs = am33xx_lcdc_irqs,
1322 .flags = HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY, 1029 .flags = HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY,
1323 .main_clk = "lcd_gclk", 1030 .main_clk = "lcd_gclk",
1324 .prcm = { 1031 .prcm = {
@@ -1348,16 +1055,10 @@ static struct omap_hwmod_class am33xx_mailbox_hwmod_class = {
1348 .sysc = &am33xx_mailbox_sysc, 1055 .sysc = &am33xx_mailbox_sysc,
1349}; 1056};
1350 1057
1351static struct omap_hwmod_irq_info am33xx_mailbox_irqs[] = {
1352 { .irq = 77 + OMAP_INTC_START, },
1353 { .irq = -1 },
1354};
1355
1356static struct omap_hwmod am33xx_mailbox_hwmod = { 1058static struct omap_hwmod am33xx_mailbox_hwmod = {
1357 .name = "mailbox", 1059 .name = "mailbox",
1358 .class = &am33xx_mailbox_hwmod_class, 1060 .class = &am33xx_mailbox_hwmod_class,
1359 .clkdm_name = "l4ls_clkdm", 1061 .clkdm_name = "l4ls_clkdm",
1360 .mpu_irqs = am33xx_mailbox_irqs,
1361 .main_clk = "l4ls_gclk", 1062 .main_clk = "l4ls_gclk",
1362 .prcm = { 1063 .prcm = {
1363 .omap4 = { 1064 .omap4 = {
@@ -1384,24 +1085,10 @@ static struct omap_hwmod_class am33xx_mcasp_hwmod_class = {
1384}; 1085};
1385 1086
1386/* mcasp0 */ 1087/* mcasp0 */
1387static struct omap_hwmod_irq_info am33xx_mcasp0_irqs[] = {
1388 { .name = "ax", .irq = 80 + OMAP_INTC_START, },
1389 { .name = "ar", .irq = 81 + OMAP_INTC_START, },
1390 { .irq = -1 },
1391};
1392
1393static struct omap_hwmod_dma_info am33xx_mcasp0_edma_reqs[] = {
1394 { .name = "tx", .dma_req = 8, },
1395 { .name = "rx", .dma_req = 9, },
1396 { .dma_req = -1 }
1397};
1398
1399static struct omap_hwmod am33xx_mcasp0_hwmod = { 1088static struct omap_hwmod am33xx_mcasp0_hwmod = {
1400 .name = "mcasp0", 1089 .name = "mcasp0",
1401 .class = &am33xx_mcasp_hwmod_class, 1090 .class = &am33xx_mcasp_hwmod_class,
1402 .clkdm_name = "l3s_clkdm", 1091 .clkdm_name = "l3s_clkdm",
1403 .mpu_irqs = am33xx_mcasp0_irqs,
1404 .sdma_reqs = am33xx_mcasp0_edma_reqs,
1405 .main_clk = "mcasp0_fck", 1092 .main_clk = "mcasp0_fck",
1406 .prcm = { 1093 .prcm = {
1407 .omap4 = { 1094 .omap4 = {
@@ -1412,24 +1099,10 @@ static struct omap_hwmod am33xx_mcasp0_hwmod = {
1412}; 1099};
1413 1100
1414/* mcasp1 */ 1101/* mcasp1 */
1415static struct omap_hwmod_irq_info am33xx_mcasp1_irqs[] = {
1416 { .name = "ax", .irq = 82 + OMAP_INTC_START, },
1417 { .name = "ar", .irq = 83 + OMAP_INTC_START, },
1418 { .irq = -1 },
1419};
1420
1421static struct omap_hwmod_dma_info am33xx_mcasp1_edma_reqs[] = {
1422 { .name = "tx", .dma_req = 10, },
1423 { .name = "rx", .dma_req = 11, },
1424 { .dma_req = -1 }
1425};
1426
1427static struct omap_hwmod am33xx_mcasp1_hwmod = { 1102static struct omap_hwmod am33xx_mcasp1_hwmod = {
1428 .name = "mcasp1", 1103 .name = "mcasp1",
1429 .class = &am33xx_mcasp_hwmod_class, 1104 .class = &am33xx_mcasp_hwmod_class,
1430 .clkdm_name = "l3s_clkdm", 1105 .clkdm_name = "l3s_clkdm",
1431 .mpu_irqs = am33xx_mcasp1_irqs,
1432 .sdma_reqs = am33xx_mcasp1_edma_reqs,
1433 .main_clk = "mcasp1_fck", 1106 .main_clk = "mcasp1_fck",
1434 .prcm = { 1107 .prcm = {
1435 .omap4 = { 1108 .omap4 = {
@@ -1457,17 +1130,6 @@ static struct omap_hwmod_class am33xx_mmc_hwmod_class = {
1457}; 1130};
1458 1131
1459/* mmc0 */ 1132/* mmc0 */
1460static struct omap_hwmod_irq_info am33xx_mmc0_irqs[] = {
1461 { .irq = 64 + OMAP_INTC_START, },
1462 { .irq = -1 },
1463};
1464
1465static struct omap_hwmod_dma_info am33xx_mmc0_edma_reqs[] = {
1466 { .name = "tx", .dma_req = 24, },
1467 { .name = "rx", .dma_req = 25, },
1468 { .dma_req = -1 }
1469};
1470
1471static struct omap_mmc_dev_attr am33xx_mmc0_dev_attr = { 1133static struct omap_mmc_dev_attr am33xx_mmc0_dev_attr = {
1472 .flags = OMAP_HSMMC_SUPPORTS_DUAL_VOLT, 1134 .flags = OMAP_HSMMC_SUPPORTS_DUAL_VOLT,
1473}; 1135};
@@ -1476,8 +1138,6 @@ static struct omap_hwmod am33xx_mmc0_hwmod = {
1476 .name = "mmc1", 1138 .name = "mmc1",
1477 .class = &am33xx_mmc_hwmod_class, 1139 .class = &am33xx_mmc_hwmod_class,
1478 .clkdm_name = "l4ls_clkdm", 1140 .clkdm_name = "l4ls_clkdm",
1479 .mpu_irqs = am33xx_mmc0_irqs,
1480 .sdma_reqs = am33xx_mmc0_edma_reqs,
1481 .main_clk = "mmc_clk", 1141 .main_clk = "mmc_clk",
1482 .prcm = { 1142 .prcm = {
1483 .omap4 = { 1143 .omap4 = {
@@ -1489,17 +1149,6 @@ static struct omap_hwmod am33xx_mmc0_hwmod = {
1489}; 1149};
1490 1150
1491/* mmc1 */ 1151/* mmc1 */
1492static struct omap_hwmod_irq_info am33xx_mmc1_irqs[] = {
1493 { .irq = 28 + OMAP_INTC_START, },
1494 { .irq = -1 },
1495};
1496
1497static struct omap_hwmod_dma_info am33xx_mmc1_edma_reqs[] = {
1498 { .name = "tx", .dma_req = 2, },
1499 { .name = "rx", .dma_req = 3, },
1500 { .dma_req = -1 }
1501};
1502
1503static struct omap_mmc_dev_attr am33xx_mmc1_dev_attr = { 1152static struct omap_mmc_dev_attr am33xx_mmc1_dev_attr = {
1504 .flags = OMAP_HSMMC_SUPPORTS_DUAL_VOLT, 1153 .flags = OMAP_HSMMC_SUPPORTS_DUAL_VOLT,
1505}; 1154};
@@ -1508,8 +1157,6 @@ static struct omap_hwmod am33xx_mmc1_hwmod = {
1508 .name = "mmc2", 1157 .name = "mmc2",
1509 .class = &am33xx_mmc_hwmod_class, 1158 .class = &am33xx_mmc_hwmod_class,
1510 .clkdm_name = "l4ls_clkdm", 1159 .clkdm_name = "l4ls_clkdm",
1511 .mpu_irqs = am33xx_mmc1_irqs,
1512 .sdma_reqs = am33xx_mmc1_edma_reqs,
1513 .main_clk = "mmc_clk", 1160 .main_clk = "mmc_clk",
1514 .prcm = { 1161 .prcm = {
1515 .omap4 = { 1162 .omap4 = {
@@ -1521,17 +1168,6 @@ static struct omap_hwmod am33xx_mmc1_hwmod = {
1521}; 1168};
1522 1169
1523/* mmc2 */ 1170/* mmc2 */
1524static struct omap_hwmod_irq_info am33xx_mmc2_irqs[] = {
1525 { .irq = 29 + OMAP_INTC_START, },
1526 { .irq = -1 },
1527};
1528
1529static struct omap_hwmod_dma_info am33xx_mmc2_edma_reqs[] = {
1530 { .name = "tx", .dma_req = 64, },
1531 { .name = "rx", .dma_req = 65, },
1532 { .dma_req = -1 }
1533};
1534
1535static struct omap_mmc_dev_attr am33xx_mmc2_dev_attr = { 1171static struct omap_mmc_dev_attr am33xx_mmc2_dev_attr = {
1536 .flags = OMAP_HSMMC_SUPPORTS_DUAL_VOLT, 1172 .flags = OMAP_HSMMC_SUPPORTS_DUAL_VOLT,
1537}; 1173};
@@ -1539,8 +1175,6 @@ static struct omap_hwmod am33xx_mmc2_hwmod = {
1539 .name = "mmc3", 1175 .name = "mmc3",
1540 .class = &am33xx_mmc_hwmod_class, 1176 .class = &am33xx_mmc_hwmod_class,
1541 .clkdm_name = "l3s_clkdm", 1177 .clkdm_name = "l3s_clkdm",
1542 .mpu_irqs = am33xx_mmc2_irqs,
1543 .sdma_reqs = am33xx_mmc2_edma_reqs,
1544 .main_clk = "mmc_clk", 1178 .main_clk = "mmc_clk",
1545 .prcm = { 1179 .prcm = {
1546 .omap4 = { 1180 .omap4 = {
@@ -1569,17 +1203,10 @@ static struct omap_hwmod_class am33xx_rtc_hwmod_class = {
1569 .sysc = &am33xx_rtc_sysc, 1203 .sysc = &am33xx_rtc_sysc,
1570}; 1204};
1571 1205
1572static struct omap_hwmod_irq_info am33xx_rtc_irqs[] = {
1573 { .name = "rtcint", .irq = 75 + OMAP_INTC_START, },
1574 { .name = "rtcalarmint", .irq = 76 + OMAP_INTC_START, },
1575 { .irq = -1 },
1576};
1577
1578static struct omap_hwmod am33xx_rtc_hwmod = { 1206static struct omap_hwmod am33xx_rtc_hwmod = {
1579 .name = "rtc", 1207 .name = "rtc",
1580 .class = &am33xx_rtc_hwmod_class, 1208 .class = &am33xx_rtc_hwmod_class,
1581 .clkdm_name = "l4_rtc_clkdm", 1209 .clkdm_name = "l4_rtc_clkdm",
1582 .mpu_irqs = am33xx_rtc_irqs,
1583 .main_clk = "clk_32768_ck", 1210 .main_clk = "clk_32768_ck",
1584 .prcm = { 1211 .prcm = {
1585 .omap4 = { 1212 .omap4 = {
@@ -1608,19 +1235,6 @@ static struct omap_hwmod_class am33xx_spi_hwmod_class = {
1608}; 1235};
1609 1236
1610/* spi0 */ 1237/* spi0 */
1611static struct omap_hwmod_irq_info am33xx_spi0_irqs[] = {
1612 { .irq = 65 + OMAP_INTC_START, },
1613 { .irq = -1 },
1614};
1615
1616static struct omap_hwmod_dma_info am33xx_mcspi0_edma_reqs[] = {
1617 { .name = "rx0", .dma_req = 17 },
1618 { .name = "tx0", .dma_req = 16 },
1619 { .name = "rx1", .dma_req = 19 },
1620 { .name = "tx1", .dma_req = 18 },
1621 { .dma_req = -1 }
1622};
1623
1624static struct omap2_mcspi_dev_attr mcspi_attrib = { 1238static struct omap2_mcspi_dev_attr mcspi_attrib = {
1625 .num_chipselect = 2, 1239 .num_chipselect = 2,
1626}; 1240};
@@ -1628,8 +1242,6 @@ static struct omap_hwmod am33xx_spi0_hwmod = {
1628 .name = "spi0", 1242 .name = "spi0",
1629 .class = &am33xx_spi_hwmod_class, 1243 .class = &am33xx_spi_hwmod_class,
1630 .clkdm_name = "l4ls_clkdm", 1244 .clkdm_name = "l4ls_clkdm",
1631 .mpu_irqs = am33xx_spi0_irqs,
1632 .sdma_reqs = am33xx_mcspi0_edma_reqs,
1633 .main_clk = "dpll_per_m2_div4_ck", 1245 .main_clk = "dpll_per_m2_div4_ck",
1634 .prcm = { 1246 .prcm = {
1635 .omap4 = { 1247 .omap4 = {
@@ -1641,25 +1253,10 @@ static struct omap_hwmod am33xx_spi0_hwmod = {
1641}; 1253};
1642 1254
1643/* spi1 */ 1255/* spi1 */
1644static struct omap_hwmod_irq_info am33xx_spi1_irqs[] = {
1645 { .irq = 125 + OMAP_INTC_START, },
1646 { .irq = -1 },
1647};
1648
1649static struct omap_hwmod_dma_info am33xx_mcspi1_edma_reqs[] = {
1650 { .name = "rx0", .dma_req = 43 },
1651 { .name = "tx0", .dma_req = 42 },
1652 { .name = "rx1", .dma_req = 45 },
1653 { .name = "tx1", .dma_req = 44 },
1654 { .dma_req = -1 }
1655};
1656
1657static struct omap_hwmod am33xx_spi1_hwmod = { 1256static struct omap_hwmod am33xx_spi1_hwmod = {
1658 .name = "spi1", 1257 .name = "spi1",
1659 .class = &am33xx_spi_hwmod_class, 1258 .class = &am33xx_spi_hwmod_class,
1660 .clkdm_name = "l4ls_clkdm", 1259 .clkdm_name = "l4ls_clkdm",
1661 .mpu_irqs = am33xx_spi1_irqs,
1662 .sdma_reqs = am33xx_mcspi1_edma_reqs,
1663 .main_clk = "dpll_per_m2_div4_ck", 1260 .main_clk = "dpll_per_m2_div4_ck",
1664 .prcm = { 1261 .prcm = {
1665 .omap4 = { 1262 .omap4 = {
@@ -1725,16 +1322,10 @@ static struct omap_hwmod_class am33xx_timer1ms_hwmod_class = {
1725 .sysc = &am33xx_timer1ms_sysc, 1322 .sysc = &am33xx_timer1ms_sysc,
1726}; 1323};
1727 1324
1728static struct omap_hwmod_irq_info am33xx_timer1_irqs[] = {
1729 { .irq = 67 + OMAP_INTC_START, },
1730 { .irq = -1 },
1731};
1732
1733static struct omap_hwmod am33xx_timer1_hwmod = { 1325static struct omap_hwmod am33xx_timer1_hwmod = {
1734 .name = "timer1", 1326 .name = "timer1",
1735 .class = &am33xx_timer1ms_hwmod_class, 1327 .class = &am33xx_timer1ms_hwmod_class,
1736 .clkdm_name = "l4_wkup_clkdm", 1328 .clkdm_name = "l4_wkup_clkdm",
1737 .mpu_irqs = am33xx_timer1_irqs,
1738 .main_clk = "timer1_fck", 1329 .main_clk = "timer1_fck",
1739 .prcm = { 1330 .prcm = {
1740 .omap4 = { 1331 .omap4 = {
@@ -1744,16 +1335,10 @@ static struct omap_hwmod am33xx_timer1_hwmod = {
1744 }, 1335 },
1745}; 1336};
1746 1337
1747static struct omap_hwmod_irq_info am33xx_timer2_irqs[] = {
1748 { .irq = 68 + OMAP_INTC_START, },
1749 { .irq = -1 },
1750};
1751
1752static struct omap_hwmod am33xx_timer2_hwmod = { 1338static struct omap_hwmod am33xx_timer2_hwmod = {
1753 .name = "timer2", 1339 .name = "timer2",
1754 .class = &am33xx_timer_hwmod_class, 1340 .class = &am33xx_timer_hwmod_class,
1755 .clkdm_name = "l4ls_clkdm", 1341 .clkdm_name = "l4ls_clkdm",
1756 .mpu_irqs = am33xx_timer2_irqs,
1757 .main_clk = "timer2_fck", 1342 .main_clk = "timer2_fck",
1758 .prcm = { 1343 .prcm = {
1759 .omap4 = { 1344 .omap4 = {
@@ -1763,16 +1348,10 @@ static struct omap_hwmod am33xx_timer2_hwmod = {
1763 }, 1348 },
1764}; 1349};
1765 1350
1766static struct omap_hwmod_irq_info am33xx_timer3_irqs[] = {
1767 { .irq = 69 + OMAP_INTC_START, },
1768 { .irq = -1 },
1769};
1770
1771static struct omap_hwmod am33xx_timer3_hwmod = { 1351static struct omap_hwmod am33xx_timer3_hwmod = {
1772 .name = "timer3", 1352 .name = "timer3",
1773 .class = &am33xx_timer_hwmod_class, 1353 .class = &am33xx_timer_hwmod_class,
1774 .clkdm_name = "l4ls_clkdm", 1354 .clkdm_name = "l4ls_clkdm",
1775 .mpu_irqs = am33xx_timer3_irqs,
1776 .main_clk = "timer3_fck", 1355 .main_clk = "timer3_fck",
1777 .prcm = { 1356 .prcm = {
1778 .omap4 = { 1357 .omap4 = {
@@ -1782,16 +1361,10 @@ static struct omap_hwmod am33xx_timer3_hwmod = {
1782 }, 1361 },
1783}; 1362};
1784 1363
1785static struct omap_hwmod_irq_info am33xx_timer4_irqs[] = {
1786 { .irq = 92 + OMAP_INTC_START, },
1787 { .irq = -1 },
1788};
1789
1790static struct omap_hwmod am33xx_timer4_hwmod = { 1364static struct omap_hwmod am33xx_timer4_hwmod = {
1791 .name = "timer4", 1365 .name = "timer4",
1792 .class = &am33xx_timer_hwmod_class, 1366 .class = &am33xx_timer_hwmod_class,
1793 .clkdm_name = "l4ls_clkdm", 1367 .clkdm_name = "l4ls_clkdm",
1794 .mpu_irqs = am33xx_timer4_irqs,
1795 .main_clk = "timer4_fck", 1368 .main_clk = "timer4_fck",
1796 .prcm = { 1369 .prcm = {
1797 .omap4 = { 1370 .omap4 = {
@@ -1801,16 +1374,10 @@ static struct omap_hwmod am33xx_timer4_hwmod = {
1801 }, 1374 },
1802}; 1375};
1803 1376
1804static struct omap_hwmod_irq_info am33xx_timer5_irqs[] = {
1805 { .irq = 93 + OMAP_INTC_START, },
1806 { .irq = -1 },
1807};
1808
1809static struct omap_hwmod am33xx_timer5_hwmod = { 1377static struct omap_hwmod am33xx_timer5_hwmod = {
1810 .name = "timer5", 1378 .name = "timer5",
1811 .class = &am33xx_timer_hwmod_class, 1379 .class = &am33xx_timer_hwmod_class,
1812 .clkdm_name = "l4ls_clkdm", 1380 .clkdm_name = "l4ls_clkdm",
1813 .mpu_irqs = am33xx_timer5_irqs,
1814 .main_clk = "timer5_fck", 1381 .main_clk = "timer5_fck",
1815 .prcm = { 1382 .prcm = {
1816 .omap4 = { 1383 .omap4 = {
@@ -1820,16 +1387,10 @@ static struct omap_hwmod am33xx_timer5_hwmod = {
1820 }, 1387 },
1821}; 1388};
1822 1389
1823static struct omap_hwmod_irq_info am33xx_timer6_irqs[] = {
1824 { .irq = 94 + OMAP_INTC_START, },
1825 { .irq = -1 },
1826};
1827
1828static struct omap_hwmod am33xx_timer6_hwmod = { 1390static struct omap_hwmod am33xx_timer6_hwmod = {
1829 .name = "timer6", 1391 .name = "timer6",
1830 .class = &am33xx_timer_hwmod_class, 1392 .class = &am33xx_timer_hwmod_class,
1831 .clkdm_name = "l4ls_clkdm", 1393 .clkdm_name = "l4ls_clkdm",
1832 .mpu_irqs = am33xx_timer6_irqs,
1833 .main_clk = "timer6_fck", 1394 .main_clk = "timer6_fck",
1834 .prcm = { 1395 .prcm = {
1835 .omap4 = { 1396 .omap4 = {
@@ -1839,16 +1400,10 @@ static struct omap_hwmod am33xx_timer6_hwmod = {
1839 }, 1400 },
1840}; 1401};
1841 1402
1842static struct omap_hwmod_irq_info am33xx_timer7_irqs[] = {
1843 { .irq = 95 + OMAP_INTC_START, },
1844 { .irq = -1 },
1845};
1846
1847static struct omap_hwmod am33xx_timer7_hwmod = { 1403static struct omap_hwmod am33xx_timer7_hwmod = {
1848 .name = "timer7", 1404 .name = "timer7",
1849 .class = &am33xx_timer_hwmod_class, 1405 .class = &am33xx_timer_hwmod_class,
1850 .clkdm_name = "l4ls_clkdm", 1406 .clkdm_name = "l4ls_clkdm",
1851 .mpu_irqs = am33xx_timer7_irqs,
1852 .main_clk = "timer7_fck", 1407 .main_clk = "timer7_fck",
1853 .prcm = { 1408 .prcm = {
1854 .omap4 = { 1409 .omap4 = {
@@ -1863,18 +1418,10 @@ static struct omap_hwmod_class am33xx_tpcc_hwmod_class = {
1863 .name = "tpcc", 1418 .name = "tpcc",
1864}; 1419};
1865 1420
1866static struct omap_hwmod_irq_info am33xx_tpcc_irqs[] = {
1867 { .name = "edma0", .irq = 12 + OMAP_INTC_START, },
1868 { .name = "edma0_mperr", .irq = 13 + OMAP_INTC_START, },
1869 { .name = "edma0_err", .irq = 14 + OMAP_INTC_START, },
1870 { .irq = -1 },
1871};
1872
1873static struct omap_hwmod am33xx_tpcc_hwmod = { 1421static struct omap_hwmod am33xx_tpcc_hwmod = {
1874 .name = "tpcc", 1422 .name = "tpcc",
1875 .class = &am33xx_tpcc_hwmod_class, 1423 .class = &am33xx_tpcc_hwmod_class,
1876 .clkdm_name = "l3_clkdm", 1424 .clkdm_name = "l3_clkdm",
1877 .mpu_irqs = am33xx_tpcc_irqs,
1878 .main_clk = "l3_gclk", 1425 .main_clk = "l3_gclk",
1879 .prcm = { 1426 .prcm = {
1880 .omap4 = { 1427 .omap4 = {
@@ -1900,16 +1447,10 @@ static struct omap_hwmod_class am33xx_tptc_hwmod_class = {
1900}; 1447};
1901 1448
1902/* tptc0 */ 1449/* tptc0 */
1903static struct omap_hwmod_irq_info am33xx_tptc0_irqs[] = {
1904 { .irq = 112 + OMAP_INTC_START, },
1905 { .irq = -1 },
1906};
1907
1908static struct omap_hwmod am33xx_tptc0_hwmod = { 1450static struct omap_hwmod am33xx_tptc0_hwmod = {
1909 .name = "tptc0", 1451 .name = "tptc0",
1910 .class = &am33xx_tptc_hwmod_class, 1452 .class = &am33xx_tptc_hwmod_class,
1911 .clkdm_name = "l3_clkdm", 1453 .clkdm_name = "l3_clkdm",
1912 .mpu_irqs = am33xx_tptc0_irqs,
1913 .flags = HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY, 1454 .flags = HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY,
1914 .main_clk = "l3_gclk", 1455 .main_clk = "l3_gclk",
1915 .prcm = { 1456 .prcm = {
@@ -1921,16 +1462,10 @@ static struct omap_hwmod am33xx_tptc0_hwmod = {
1921}; 1462};
1922 1463
1923/* tptc1 */ 1464/* tptc1 */
1924static struct omap_hwmod_irq_info am33xx_tptc1_irqs[] = {
1925 { .irq = 113 + OMAP_INTC_START, },
1926 { .irq = -1 },
1927};
1928
1929static struct omap_hwmod am33xx_tptc1_hwmod = { 1465static struct omap_hwmod am33xx_tptc1_hwmod = {
1930 .name = "tptc1", 1466 .name = "tptc1",
1931 .class = &am33xx_tptc_hwmod_class, 1467 .class = &am33xx_tptc_hwmod_class,
1932 .clkdm_name = "l3_clkdm", 1468 .clkdm_name = "l3_clkdm",
1933 .mpu_irqs = am33xx_tptc1_irqs,
1934 .flags = (HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY), 1469 .flags = (HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY),
1935 .main_clk = "l3_gclk", 1470 .main_clk = "l3_gclk",
1936 .prcm = { 1471 .prcm = {
@@ -1942,16 +1477,10 @@ static struct omap_hwmod am33xx_tptc1_hwmod = {
1942}; 1477};
1943 1478
1944/* tptc2 */ 1479/* tptc2 */
1945static struct omap_hwmod_irq_info am33xx_tptc2_irqs[] = {
1946 { .irq = 114 + OMAP_INTC_START, },
1947 { .irq = -1 },
1948};
1949
1950static struct omap_hwmod am33xx_tptc2_hwmod = { 1480static struct omap_hwmod am33xx_tptc2_hwmod = {
1951 .name = "tptc2", 1481 .name = "tptc2",
1952 .class = &am33xx_tptc_hwmod_class, 1482 .class = &am33xx_tptc_hwmod_class,
1953 .clkdm_name = "l3_clkdm", 1483 .clkdm_name = "l3_clkdm",
1954 .mpu_irqs = am33xx_tptc2_irqs,
1955 .flags = (HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY), 1484 .flags = (HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY),
1956 .main_clk = "l3_gclk", 1485 .main_clk = "l3_gclk",
1957 .prcm = { 1486 .prcm = {
@@ -1980,24 +1509,11 @@ static struct omap_hwmod_class uart_class = {
1980}; 1509};
1981 1510
1982/* uart1 */ 1511/* uart1 */
1983static struct omap_hwmod_dma_info uart1_edma_reqs[] = {
1984 { .name = "tx", .dma_req = 26, },
1985 { .name = "rx", .dma_req = 27, },
1986 { .dma_req = -1 }
1987};
1988
1989static struct omap_hwmod_irq_info am33xx_uart1_irqs[] = {
1990 { .irq = 72 + OMAP_INTC_START, },
1991 { .irq = -1 },
1992};
1993
1994static struct omap_hwmod am33xx_uart1_hwmod = { 1512static struct omap_hwmod am33xx_uart1_hwmod = {
1995 .name = "uart1", 1513 .name = "uart1",
1996 .class = &uart_class, 1514 .class = &uart_class,
1997 .clkdm_name = "l4_wkup_clkdm", 1515 .clkdm_name = "l4_wkup_clkdm",
1998 .flags = HWMOD_SWSUP_SIDLE_ACT, 1516 .flags = DEBUG_AM33XXUART1_FLAGS | HWMOD_SWSUP_SIDLE_ACT,
1999 .mpu_irqs = am33xx_uart1_irqs,
2000 .sdma_reqs = uart1_edma_reqs,
2001 .main_clk = "dpll_per_m2_div4_wkupdm_ck", 1517 .main_clk = "dpll_per_m2_div4_wkupdm_ck",
2002 .prcm = { 1518 .prcm = {
2003 .omap4 = { 1519 .omap4 = {
@@ -2007,25 +1523,11 @@ static struct omap_hwmod am33xx_uart1_hwmod = {
2007 }, 1523 },
2008}; 1524};
2009 1525
2010/* uart2 */
2011static struct omap_hwmod_dma_info uart2_edma_reqs[] = {
2012 { .name = "tx", .dma_req = 28, },
2013 { .name = "rx", .dma_req = 29, },
2014 { .dma_req = -1 }
2015};
2016
2017static struct omap_hwmod_irq_info am33xx_uart2_irqs[] = {
2018 { .irq = 73 + OMAP_INTC_START, },
2019 { .irq = -1 },
2020};
2021
2022static struct omap_hwmod am33xx_uart2_hwmod = { 1526static struct omap_hwmod am33xx_uart2_hwmod = {
2023 .name = "uart2", 1527 .name = "uart2",
2024 .class = &uart_class, 1528 .class = &uart_class,
2025 .clkdm_name = "l4ls_clkdm", 1529 .clkdm_name = "l4ls_clkdm",
2026 .flags = HWMOD_SWSUP_SIDLE_ACT, 1530 .flags = HWMOD_SWSUP_SIDLE_ACT,
2027 .mpu_irqs = am33xx_uart2_irqs,
2028 .sdma_reqs = uart2_edma_reqs,
2029 .main_clk = "dpll_per_m2_div4_ck", 1531 .main_clk = "dpll_per_m2_div4_ck",
2030 .prcm = { 1532 .prcm = {
2031 .omap4 = { 1533 .omap4 = {
@@ -2036,24 +1538,11 @@ static struct omap_hwmod am33xx_uart2_hwmod = {
2036}; 1538};
2037 1539
2038/* uart3 */ 1540/* uart3 */
2039static struct omap_hwmod_dma_info uart3_edma_reqs[] = {
2040 { .name = "tx", .dma_req = 30, },
2041 { .name = "rx", .dma_req = 31, },
2042 { .dma_req = -1 }
2043};
2044
2045static struct omap_hwmod_irq_info am33xx_uart3_irqs[] = {
2046 { .irq = 74 + OMAP_INTC_START, },
2047 { .irq = -1 },
2048};
2049
2050static struct omap_hwmod am33xx_uart3_hwmod = { 1541static struct omap_hwmod am33xx_uart3_hwmod = {
2051 .name = "uart3", 1542 .name = "uart3",
2052 .class = &uart_class, 1543 .class = &uart_class,
2053 .clkdm_name = "l4ls_clkdm", 1544 .clkdm_name = "l4ls_clkdm",
2054 .flags = HWMOD_SWSUP_SIDLE_ACT, 1545 .flags = HWMOD_SWSUP_SIDLE_ACT,
2055 .mpu_irqs = am33xx_uart3_irqs,
2056 .sdma_reqs = uart3_edma_reqs,
2057 .main_clk = "dpll_per_m2_div4_ck", 1546 .main_clk = "dpll_per_m2_div4_ck",
2058 .prcm = { 1547 .prcm = {
2059 .omap4 = { 1548 .omap4 = {
@@ -2063,18 +1552,11 @@ static struct omap_hwmod am33xx_uart3_hwmod = {
2063 }, 1552 },
2064}; 1553};
2065 1554
2066static struct omap_hwmod_irq_info am33xx_uart4_irqs[] = {
2067 { .irq = 44 + OMAP_INTC_START, },
2068 { .irq = -1 },
2069};
2070
2071static struct omap_hwmod am33xx_uart4_hwmod = { 1555static struct omap_hwmod am33xx_uart4_hwmod = {
2072 .name = "uart4", 1556 .name = "uart4",
2073 .class = &uart_class, 1557 .class = &uart_class,
2074 .clkdm_name = "l4ls_clkdm", 1558 .clkdm_name = "l4ls_clkdm",
2075 .flags = HWMOD_SWSUP_SIDLE_ACT, 1559 .flags = HWMOD_SWSUP_SIDLE_ACT,
2076 .mpu_irqs = am33xx_uart4_irqs,
2077 .sdma_reqs = uart1_edma_reqs,
2078 .main_clk = "dpll_per_m2_div4_ck", 1560 .main_clk = "dpll_per_m2_div4_ck",
2079 .prcm = { 1561 .prcm = {
2080 .omap4 = { 1562 .omap4 = {
@@ -2084,18 +1566,11 @@ static struct omap_hwmod am33xx_uart4_hwmod = {
2084 }, 1566 },
2085}; 1567};
2086 1568
2087static struct omap_hwmod_irq_info am33xx_uart5_irqs[] = {
2088 { .irq = 45 + OMAP_INTC_START, },
2089 { .irq = -1 },
2090};
2091
2092static struct omap_hwmod am33xx_uart5_hwmod = { 1569static struct omap_hwmod am33xx_uart5_hwmod = {
2093 .name = "uart5", 1570 .name = "uart5",
2094 .class = &uart_class, 1571 .class = &uart_class,
2095 .clkdm_name = "l4ls_clkdm", 1572 .clkdm_name = "l4ls_clkdm",
2096 .flags = HWMOD_SWSUP_SIDLE_ACT, 1573 .flags = HWMOD_SWSUP_SIDLE_ACT,
2097 .mpu_irqs = am33xx_uart5_irqs,
2098 .sdma_reqs = uart1_edma_reqs,
2099 .main_clk = "dpll_per_m2_div4_ck", 1574 .main_clk = "dpll_per_m2_div4_ck",
2100 .prcm = { 1575 .prcm = {
2101 .omap4 = { 1576 .omap4 = {
@@ -2105,18 +1580,11 @@ static struct omap_hwmod am33xx_uart5_hwmod = {
2105 }, 1580 },
2106}; 1581};
2107 1582
2108static struct omap_hwmod_irq_info am33xx_uart6_irqs[] = {
2109 { .irq = 46 + OMAP_INTC_START, },
2110 { .irq = -1 },
2111};
2112
2113static struct omap_hwmod am33xx_uart6_hwmod = { 1583static struct omap_hwmod am33xx_uart6_hwmod = {
2114 .name = "uart6", 1584 .name = "uart6",
2115 .class = &uart_class, 1585 .class = &uart_class,
2116 .clkdm_name = "l4ls_clkdm", 1586 .clkdm_name = "l4ls_clkdm",
2117 .flags = HWMOD_SWSUP_SIDLE_ACT, 1587 .flags = HWMOD_SWSUP_SIDLE_ACT,
2118 .mpu_irqs = am33xx_uart6_irqs,
2119 .sdma_reqs = uart1_edma_reqs,
2120 .main_clk = "dpll_per_m2_div4_ck", 1588 .main_clk = "dpll_per_m2_div4_ck",
2121 .prcm = { 1589 .prcm = {
2122 .omap4 = { 1590 .omap4 = {
@@ -2180,18 +1648,10 @@ static struct omap_hwmod_class am33xx_usbotg_class = {
2180 .sysc = &am33xx_usbhsotg_sysc, 1648 .sysc = &am33xx_usbhsotg_sysc,
2181}; 1649};
2182 1650
2183static struct omap_hwmod_irq_info am33xx_usbss_mpu_irqs[] = {
2184 { .name = "usbss-irq", .irq = 17 + OMAP_INTC_START, },
2185 { .name = "musb0-irq", .irq = 18 + OMAP_INTC_START, },
2186 { .name = "musb1-irq", .irq = 19 + OMAP_INTC_START, },
2187 { .irq = -1, },
2188};
2189
2190static struct omap_hwmod am33xx_usbss_hwmod = { 1651static struct omap_hwmod am33xx_usbss_hwmod = {
2191 .name = "usb_otg_hs", 1652 .name = "usb_otg_hs",
2192 .class = &am33xx_usbotg_class, 1653 .class = &am33xx_usbotg_class,
2193 .clkdm_name = "l3s_clkdm", 1654 .clkdm_name = "l3s_clkdm",
2194 .mpu_irqs = am33xx_usbss_mpu_irqs,
2195 .flags = HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY, 1655 .flags = HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY,
2196 .main_clk = "usbotg_fck", 1656 .main_clk = "usbotg_fck",
2197 .prcm = { 1657 .prcm = {
@@ -2207,14 +1667,6 @@ static struct omap_hwmod am33xx_usbss_hwmod = {
2207 * Interfaces 1667 * Interfaces
2208 */ 1668 */
2209 1669
2210/* l4 fw -> emif fw */
2211static struct omap_hwmod_ocp_if am33xx_l4_fw__emif_fw = {
2212 .master = &am33xx_l4_fw_hwmod,
2213 .slave = &am33xx_emif_fw_hwmod,
2214 .clk = "l4fw_gclk",
2215 .user = OCP_USER_MPU,
2216};
2217
2218static struct omap_hwmod_addr_space am33xx_emif_addrs[] = { 1670static struct omap_hwmod_addr_space am33xx_emif_addrs[] = {
2219 { 1671 {
2220 .pa_start = 0x4c000000, 1672 .pa_start = 0x4c000000,
@@ -2272,14 +1724,6 @@ static struct omap_hwmod_ocp_if am33xx_l3_s__l4_wkup = {
2272 .user = OCP_USER_MPU | OCP_USER_SDMA, 1724 .user = OCP_USER_MPU | OCP_USER_SDMA,
2273}; 1725};
2274 1726
2275/* l3 s -> l4 fw */
2276static struct omap_hwmod_ocp_if am33xx_l3_s__l4_fw = {
2277 .master = &am33xx_l3_s_hwmod,
2278 .slave = &am33xx_l4_fw_hwmod,
2279 .clk = "l3s_gclk",
2280 .user = OCP_USER_MPU | OCP_USER_SDMA,
2281};
2282
2283/* l3 main -> l3 instr */ 1727/* l3 main -> l3 instr */
2284static struct omap_hwmod_ocp_if am33xx_l3_main__l3_instr = { 1728static struct omap_hwmod_ocp_if am33xx_l3_main__l3_instr = {
2285 .master = &am33xx_l3_main_hwmod, 1729 .master = &am33xx_l3_main_hwmod,
@@ -2329,261 +1773,114 @@ static struct omap_hwmod_ocp_if am33xx_gfx__l3_main = {
2329}; 1773};
2330 1774
2331/* l4 wkup -> wkup m3 */ 1775/* l4 wkup -> wkup m3 */
2332static struct omap_hwmod_addr_space am33xx_wkup_m3_addrs[] = {
2333 {
2334 .name = "umem",
2335 .pa_start = 0x44d00000,
2336 .pa_end = 0x44d00000 + SZ_16K - 1,
2337 .flags = ADDR_TYPE_RT
2338 },
2339 {
2340 .name = "dmem",
2341 .pa_start = 0x44d80000,
2342 .pa_end = 0x44d80000 + SZ_8K - 1,
2343 .flags = ADDR_TYPE_RT
2344 },
2345 { }
2346};
2347
2348static struct omap_hwmod_ocp_if am33xx_l4_wkup__wkup_m3 = { 1776static struct omap_hwmod_ocp_if am33xx_l4_wkup__wkup_m3 = {
2349 .master = &am33xx_l4_wkup_hwmod, 1777 .master = &am33xx_l4_wkup_hwmod,
2350 .slave = &am33xx_wkup_m3_hwmod, 1778 .slave = &am33xx_wkup_m3_hwmod,
2351 .clk = "dpll_core_m4_div2_ck", 1779 .clk = "dpll_core_m4_div2_ck",
2352 .addr = am33xx_wkup_m3_addrs,
2353 .user = OCP_USER_MPU | OCP_USER_SDMA, 1780 .user = OCP_USER_MPU | OCP_USER_SDMA,
2354}; 1781};
2355 1782
2356/* l4 hs -> pru-icss */ 1783/* l4 hs -> pru-icss */
2357static struct omap_hwmod_addr_space am33xx_pruss_addrs[] = {
2358 {
2359 .pa_start = 0x4a300000,
2360 .pa_end = 0x4a300000 + SZ_512K - 1,
2361 .flags = ADDR_TYPE_RT
2362 },
2363 { }
2364};
2365
2366static struct omap_hwmod_ocp_if am33xx_l4_hs__pruss = { 1784static struct omap_hwmod_ocp_if am33xx_l4_hs__pruss = {
2367 .master = &am33xx_l4_hs_hwmod, 1785 .master = &am33xx_l4_hs_hwmod,
2368 .slave = &am33xx_pruss_hwmod, 1786 .slave = &am33xx_pruss_hwmod,
2369 .clk = "dpll_core_m4_ck", 1787 .clk = "dpll_core_m4_ck",
2370 .addr = am33xx_pruss_addrs,
2371 .user = OCP_USER_MPU | OCP_USER_SDMA, 1788 .user = OCP_USER_MPU | OCP_USER_SDMA,
2372}; 1789};
2373 1790
2374/* l3 main -> gfx */ 1791/* l3 main -> gfx */
2375static struct omap_hwmod_addr_space am33xx_gfx_addrs[] = {
2376 {
2377 .pa_start = 0x56000000,
2378 .pa_end = 0x56000000 + SZ_16M - 1,
2379 .flags = ADDR_TYPE_RT
2380 },
2381 { }
2382};
2383
2384static struct omap_hwmod_ocp_if am33xx_l3_main__gfx = { 1792static struct omap_hwmod_ocp_if am33xx_l3_main__gfx = {
2385 .master = &am33xx_l3_main_hwmod, 1793 .master = &am33xx_l3_main_hwmod,
2386 .slave = &am33xx_gfx_hwmod, 1794 .slave = &am33xx_gfx_hwmod,
2387 .clk = "dpll_core_m4_ck", 1795 .clk = "dpll_core_m4_ck",
2388 .addr = am33xx_gfx_addrs,
2389 .user = OCP_USER_MPU | OCP_USER_SDMA, 1796 .user = OCP_USER_MPU | OCP_USER_SDMA,
2390}; 1797};
2391 1798
2392/* l4 wkup -> smartreflex0 */ 1799/* l4 wkup -> smartreflex0 */
2393static struct omap_hwmod_addr_space am33xx_smartreflex0_addrs[] = {
2394 {
2395 .pa_start = 0x44e37000,
2396 .pa_end = 0x44e37000 + SZ_4K - 1,
2397 .flags = ADDR_TYPE_RT
2398 },
2399 { }
2400};
2401
2402static struct omap_hwmod_ocp_if am33xx_l4_wkup__smartreflex0 = { 1800static struct omap_hwmod_ocp_if am33xx_l4_wkup__smartreflex0 = {
2403 .master = &am33xx_l4_wkup_hwmod, 1801 .master = &am33xx_l4_wkup_hwmod,
2404 .slave = &am33xx_smartreflex0_hwmod, 1802 .slave = &am33xx_smartreflex0_hwmod,
2405 .clk = "dpll_core_m4_div2_ck", 1803 .clk = "dpll_core_m4_div2_ck",
2406 .addr = am33xx_smartreflex0_addrs,
2407 .user = OCP_USER_MPU, 1804 .user = OCP_USER_MPU,
2408}; 1805};
2409 1806
2410/* l4 wkup -> smartreflex1 */ 1807/* l4 wkup -> smartreflex1 */
2411static struct omap_hwmod_addr_space am33xx_smartreflex1_addrs[] = {
2412 {
2413 .pa_start = 0x44e39000,
2414 .pa_end = 0x44e39000 + SZ_4K - 1,
2415 .flags = ADDR_TYPE_RT
2416 },
2417 { }
2418};
2419
2420static struct omap_hwmod_ocp_if am33xx_l4_wkup__smartreflex1 = { 1808static struct omap_hwmod_ocp_if am33xx_l4_wkup__smartreflex1 = {
2421 .master = &am33xx_l4_wkup_hwmod, 1809 .master = &am33xx_l4_wkup_hwmod,
2422 .slave = &am33xx_smartreflex1_hwmod, 1810 .slave = &am33xx_smartreflex1_hwmod,
2423 .clk = "dpll_core_m4_div2_ck", 1811 .clk = "dpll_core_m4_div2_ck",
2424 .addr = am33xx_smartreflex1_addrs,
2425 .user = OCP_USER_MPU, 1812 .user = OCP_USER_MPU,
2426}; 1813};
2427 1814
2428/* l4 wkup -> control */ 1815/* l4 wkup -> control */
2429static struct omap_hwmod_addr_space am33xx_control_addrs[] = {
2430 {
2431 .pa_start = 0x44e10000,
2432 .pa_end = 0x44e10000 + SZ_8K - 1,
2433 .flags = ADDR_TYPE_RT
2434 },
2435 { }
2436};
2437
2438static struct omap_hwmod_ocp_if am33xx_l4_wkup__control = { 1816static struct omap_hwmod_ocp_if am33xx_l4_wkup__control = {
2439 .master = &am33xx_l4_wkup_hwmod, 1817 .master = &am33xx_l4_wkup_hwmod,
2440 .slave = &am33xx_control_hwmod, 1818 .slave = &am33xx_control_hwmod,
2441 .clk = "dpll_core_m4_div2_ck", 1819 .clk = "dpll_core_m4_div2_ck",
2442 .addr = am33xx_control_addrs,
2443 .user = OCP_USER_MPU, 1820 .user = OCP_USER_MPU,
2444}; 1821};
2445 1822
2446/* l4 wkup -> rtc */ 1823/* l4 wkup -> rtc */
2447static struct omap_hwmod_addr_space am33xx_rtc_addrs[] = {
2448 {
2449 .pa_start = 0x44e3e000,
2450 .pa_end = 0x44e3e000 + SZ_4K - 1,
2451 .flags = ADDR_TYPE_RT
2452 },
2453 { }
2454};
2455
2456static struct omap_hwmod_ocp_if am33xx_l4_wkup__rtc = { 1824static struct omap_hwmod_ocp_if am33xx_l4_wkup__rtc = {
2457 .master = &am33xx_l4_wkup_hwmod, 1825 .master = &am33xx_l4_wkup_hwmod,
2458 .slave = &am33xx_rtc_hwmod, 1826 .slave = &am33xx_rtc_hwmod,
2459 .clk = "clkdiv32k_ick", 1827 .clk = "clkdiv32k_ick",
2460 .addr = am33xx_rtc_addrs,
2461 .user = OCP_USER_MPU, 1828 .user = OCP_USER_MPU,
2462}; 1829};
2463 1830
2464/* l4 per/ls -> DCAN0 */ 1831/* l4 per/ls -> DCAN0 */
2465static struct omap_hwmod_addr_space am33xx_dcan0_addrs[] = {
2466 {
2467 .pa_start = 0x481CC000,
2468 .pa_end = 0x481CC000 + SZ_4K - 1,
2469 .flags = ADDR_TYPE_RT
2470 },
2471 { }
2472};
2473
2474static struct omap_hwmod_ocp_if am33xx_l4_per__dcan0 = { 1832static struct omap_hwmod_ocp_if am33xx_l4_per__dcan0 = {
2475 .master = &am33xx_l4_ls_hwmod, 1833 .master = &am33xx_l4_ls_hwmod,
2476 .slave = &am33xx_dcan0_hwmod, 1834 .slave = &am33xx_dcan0_hwmod,
2477 .clk = "l4ls_gclk", 1835 .clk = "l4ls_gclk",
2478 .addr = am33xx_dcan0_addrs,
2479 .user = OCP_USER_MPU | OCP_USER_SDMA, 1836 .user = OCP_USER_MPU | OCP_USER_SDMA,
2480}; 1837};
2481 1838
2482/* l4 per/ls -> DCAN1 */ 1839/* l4 per/ls -> DCAN1 */
2483static struct omap_hwmod_addr_space am33xx_dcan1_addrs[] = {
2484 {
2485 .pa_start = 0x481D0000,
2486 .pa_end = 0x481D0000 + SZ_4K - 1,
2487 .flags = ADDR_TYPE_RT
2488 },
2489 { }
2490};
2491
2492static struct omap_hwmod_ocp_if am33xx_l4_per__dcan1 = { 1840static struct omap_hwmod_ocp_if am33xx_l4_per__dcan1 = {
2493 .master = &am33xx_l4_ls_hwmod, 1841 .master = &am33xx_l4_ls_hwmod,
2494 .slave = &am33xx_dcan1_hwmod, 1842 .slave = &am33xx_dcan1_hwmod,
2495 .clk = "l4ls_gclk", 1843 .clk = "l4ls_gclk",
2496 .addr = am33xx_dcan1_addrs,
2497 .user = OCP_USER_MPU | OCP_USER_SDMA, 1844 .user = OCP_USER_MPU | OCP_USER_SDMA,
2498}; 1845};
2499 1846
2500/* l4 per/ls -> GPIO2 */ 1847/* l4 per/ls -> GPIO2 */
2501static struct omap_hwmod_addr_space am33xx_gpio1_addrs[] = {
2502 {
2503 .pa_start = 0x4804C000,
2504 .pa_end = 0x4804C000 + SZ_4K - 1,
2505 .flags = ADDR_TYPE_RT,
2506 },
2507 { }
2508};
2509
2510static struct omap_hwmod_ocp_if am33xx_l4_per__gpio1 = { 1848static struct omap_hwmod_ocp_if am33xx_l4_per__gpio1 = {
2511 .master = &am33xx_l4_ls_hwmod, 1849 .master = &am33xx_l4_ls_hwmod,
2512 .slave = &am33xx_gpio1_hwmod, 1850 .slave = &am33xx_gpio1_hwmod,
2513 .clk = "l4ls_gclk", 1851 .clk = "l4ls_gclk",
2514 .addr = am33xx_gpio1_addrs,
2515 .user = OCP_USER_MPU | OCP_USER_SDMA, 1852 .user = OCP_USER_MPU | OCP_USER_SDMA,
2516}; 1853};
2517 1854
2518/* l4 per/ls -> gpio3 */ 1855/* l4 per/ls -> gpio3 */
2519static struct omap_hwmod_addr_space am33xx_gpio2_addrs[] = {
2520 {
2521 .pa_start = 0x481AC000,
2522 .pa_end = 0x481AC000 + SZ_4K - 1,
2523 .flags = ADDR_TYPE_RT,
2524 },
2525 { }
2526};
2527
2528static struct omap_hwmod_ocp_if am33xx_l4_per__gpio2 = { 1856static struct omap_hwmod_ocp_if am33xx_l4_per__gpio2 = {
2529 .master = &am33xx_l4_ls_hwmod, 1857 .master = &am33xx_l4_ls_hwmod,
2530 .slave = &am33xx_gpio2_hwmod, 1858 .slave = &am33xx_gpio2_hwmod,
2531 .clk = "l4ls_gclk", 1859 .clk = "l4ls_gclk",
2532 .addr = am33xx_gpio2_addrs,
2533 .user = OCP_USER_MPU | OCP_USER_SDMA, 1860 .user = OCP_USER_MPU | OCP_USER_SDMA,
2534}; 1861};
2535 1862
2536/* l4 per/ls -> gpio4 */ 1863/* l4 per/ls -> gpio4 */
2537static struct omap_hwmod_addr_space am33xx_gpio3_addrs[] = {
2538 {
2539 .pa_start = 0x481AE000,
2540 .pa_end = 0x481AE000 + SZ_4K - 1,
2541 .flags = ADDR_TYPE_RT,
2542 },
2543 { }
2544};
2545
2546static struct omap_hwmod_ocp_if am33xx_l4_per__gpio3 = { 1864static struct omap_hwmod_ocp_if am33xx_l4_per__gpio3 = {
2547 .master = &am33xx_l4_ls_hwmod, 1865 .master = &am33xx_l4_ls_hwmod,
2548 .slave = &am33xx_gpio3_hwmod, 1866 .slave = &am33xx_gpio3_hwmod,
2549 .clk = "l4ls_gclk", 1867 .clk = "l4ls_gclk",
2550 .addr = am33xx_gpio3_addrs,
2551 .user = OCP_USER_MPU | OCP_USER_SDMA, 1868 .user = OCP_USER_MPU | OCP_USER_SDMA,
2552}; 1869};
2553 1870
2554/* L4 WKUP -> I2C1 */ 1871/* L4 WKUP -> I2C1 */
2555static struct omap_hwmod_addr_space am33xx_i2c1_addr_space[] = {
2556 {
2557 .pa_start = 0x44E0B000,
2558 .pa_end = 0x44E0B000 + SZ_4K - 1,
2559 .flags = ADDR_TYPE_RT,
2560 },
2561 { }
2562};
2563
2564static struct omap_hwmod_ocp_if am33xx_l4_wkup__i2c1 = { 1872static struct omap_hwmod_ocp_if am33xx_l4_wkup__i2c1 = {
2565 .master = &am33xx_l4_wkup_hwmod, 1873 .master = &am33xx_l4_wkup_hwmod,
2566 .slave = &am33xx_i2c1_hwmod, 1874 .slave = &am33xx_i2c1_hwmod,
2567 .clk = "dpll_core_m4_div2_ck", 1875 .clk = "dpll_core_m4_div2_ck",
2568 .addr = am33xx_i2c1_addr_space,
2569 .user = OCP_USER_MPU, 1876 .user = OCP_USER_MPU,
2570}; 1877};
2571 1878
2572/* L4 WKUP -> GPIO1 */ 1879/* L4 WKUP -> GPIO1 */
2573static struct omap_hwmod_addr_space am33xx_gpio0_addrs[] = {
2574 {
2575 .pa_start = 0x44E07000,
2576 .pa_end = 0x44E07000 + SZ_4K - 1,
2577 .flags = ADDR_TYPE_RT,
2578 },
2579 { }
2580};
2581
2582static struct omap_hwmod_ocp_if am33xx_l4_wkup__gpio0 = { 1880static struct omap_hwmod_ocp_if am33xx_l4_wkup__gpio0 = {
2583 .master = &am33xx_l4_wkup_hwmod, 1881 .master = &am33xx_l4_wkup_hwmod,
2584 .slave = &am33xx_gpio0_hwmod, 1882 .slave = &am33xx_gpio0_hwmod,
2585 .clk = "dpll_core_m4_div2_ck", 1883 .clk = "dpll_core_m4_div2_ck",
2586 .addr = am33xx_gpio0_addrs,
2587 .user = OCP_USER_MPU | OCP_USER_SDMA, 1884 .user = OCP_USER_MPU | OCP_USER_SDMA,
2588}; 1885};
2589 1886
@@ -2605,41 +1902,16 @@ static struct omap_hwmod_ocp_if am33xx_l4_wkup__adc_tsc = {
2605 .user = OCP_USER_MPU, 1902 .user = OCP_USER_MPU,
2606}; 1903};
2607 1904
2608static struct omap_hwmod_addr_space am33xx_cpgmac0_addr_space[] = {
2609 /* cpsw ss */
2610 {
2611 .pa_start = 0x4a100000,
2612 .pa_end = 0x4a100000 + SZ_2K - 1,
2613 },
2614 /* cpsw wr */
2615 {
2616 .pa_start = 0x4a101200,
2617 .pa_end = 0x4a101200 + SZ_256 - 1,
2618 .flags = ADDR_TYPE_RT,
2619 },
2620 { }
2621};
2622
2623static struct omap_hwmod_ocp_if am33xx_l4_hs__cpgmac0 = { 1905static struct omap_hwmod_ocp_if am33xx_l4_hs__cpgmac0 = {
2624 .master = &am33xx_l4_hs_hwmod, 1906 .master = &am33xx_l4_hs_hwmod,
2625 .slave = &am33xx_cpgmac0_hwmod, 1907 .slave = &am33xx_cpgmac0_hwmod,
2626 .clk = "cpsw_125mhz_gclk", 1908 .clk = "cpsw_125mhz_gclk",
2627 .addr = am33xx_cpgmac0_addr_space,
2628 .user = OCP_USER_MPU, 1909 .user = OCP_USER_MPU,
2629}; 1910};
2630 1911
2631static struct omap_hwmod_addr_space am33xx_mdio_addr_space[] = {
2632 {
2633 .pa_start = 0x4A101000,
2634 .pa_end = 0x4A101000 + SZ_256 - 1,
2635 },
2636 { }
2637};
2638
2639static struct omap_hwmod_ocp_if am33xx_cpgmac0__mdio = { 1912static struct omap_hwmod_ocp_if am33xx_cpgmac0__mdio = {
2640 .master = &am33xx_cpgmac0_hwmod, 1913 .master = &am33xx_cpgmac0_hwmod,
2641 .slave = &am33xx_mdio_hwmod, 1914 .slave = &am33xx_mdio_hwmod,
2642 .addr = am33xx_mdio_addr_space,
2643 .user = OCP_USER_MPU, 1915 .user = OCP_USER_MPU,
2644}; 1916};
2645 1917
@@ -2677,51 +1949,24 @@ static struct omap_hwmod_ocp_if am33xx_l4_ls__epwmss0 = {
2677 .user = OCP_USER_MPU, 1949 .user = OCP_USER_MPU,
2678}; 1950};
2679 1951
2680static struct omap_hwmod_addr_space am33xx_ecap0_addr_space[] = {
2681 {
2682 .pa_start = 0x48300100,
2683 .pa_end = 0x48300100 + SZ_128 - 1,
2684 },
2685 { }
2686};
2687
2688static struct omap_hwmod_ocp_if am33xx_epwmss0__ecap0 = { 1952static struct omap_hwmod_ocp_if am33xx_epwmss0__ecap0 = {
2689 .master = &am33xx_epwmss0_hwmod, 1953 .master = &am33xx_epwmss0_hwmod,
2690 .slave = &am33xx_ecap0_hwmod, 1954 .slave = &am33xx_ecap0_hwmod,
2691 .clk = "l4ls_gclk", 1955 .clk = "l4ls_gclk",
2692 .addr = am33xx_ecap0_addr_space,
2693 .user = OCP_USER_MPU, 1956 .user = OCP_USER_MPU,
2694}; 1957};
2695 1958
2696static struct omap_hwmod_addr_space am33xx_eqep0_addr_space[] = {
2697 {
2698 .pa_start = 0x48300180,
2699 .pa_end = 0x48300180 + SZ_128 - 1,
2700 },
2701 { }
2702};
2703
2704static struct omap_hwmod_ocp_if am33xx_epwmss0__eqep0 = { 1959static struct omap_hwmod_ocp_if am33xx_epwmss0__eqep0 = {
2705 .master = &am33xx_epwmss0_hwmod, 1960 .master = &am33xx_epwmss0_hwmod,
2706 .slave = &am33xx_eqep0_hwmod, 1961 .slave = &am33xx_eqep0_hwmod,
2707 .clk = "l4ls_gclk", 1962 .clk = "l4ls_gclk",
2708 .addr = am33xx_eqep0_addr_space,
2709 .user = OCP_USER_MPU, 1963 .user = OCP_USER_MPU,
2710}; 1964};
2711 1965
2712static struct omap_hwmod_addr_space am33xx_ehrpwm0_addr_space[] = {
2713 {
2714 .pa_start = 0x48300200,
2715 .pa_end = 0x48300200 + SZ_128 - 1,
2716 },
2717 { }
2718};
2719
2720static struct omap_hwmod_ocp_if am33xx_epwmss0__ehrpwm0 = { 1966static struct omap_hwmod_ocp_if am33xx_epwmss0__ehrpwm0 = {
2721 .master = &am33xx_epwmss0_hwmod, 1967 .master = &am33xx_epwmss0_hwmod,
2722 .slave = &am33xx_ehrpwm0_hwmod, 1968 .slave = &am33xx_ehrpwm0_hwmod,
2723 .clk = "l4ls_gclk", 1969 .clk = "l4ls_gclk",
2724 .addr = am33xx_ehrpwm0_addr_space,
2725 .user = OCP_USER_MPU, 1970 .user = OCP_USER_MPU,
2726}; 1971};
2727 1972
@@ -2743,51 +1988,24 @@ static struct omap_hwmod_ocp_if am33xx_l4_ls__epwmss1 = {
2743 .user = OCP_USER_MPU, 1988 .user = OCP_USER_MPU,
2744}; 1989};
2745 1990
2746static struct omap_hwmod_addr_space am33xx_ecap1_addr_space[] = {
2747 {
2748 .pa_start = 0x48302100,
2749 .pa_end = 0x48302100 + SZ_128 - 1,
2750 },
2751 { }
2752};
2753
2754static struct omap_hwmod_ocp_if am33xx_epwmss1__ecap1 = { 1991static struct omap_hwmod_ocp_if am33xx_epwmss1__ecap1 = {
2755 .master = &am33xx_epwmss1_hwmod, 1992 .master = &am33xx_epwmss1_hwmod,
2756 .slave = &am33xx_ecap1_hwmod, 1993 .slave = &am33xx_ecap1_hwmod,
2757 .clk = "l4ls_gclk", 1994 .clk = "l4ls_gclk",
2758 .addr = am33xx_ecap1_addr_space,
2759 .user = OCP_USER_MPU, 1995 .user = OCP_USER_MPU,
2760}; 1996};
2761 1997
2762static struct omap_hwmod_addr_space am33xx_eqep1_addr_space[] = {
2763 {
2764 .pa_start = 0x48302180,
2765 .pa_end = 0x48302180 + SZ_128 - 1,
2766 },
2767 { }
2768};
2769
2770static struct omap_hwmod_ocp_if am33xx_epwmss1__eqep1 = { 1998static struct omap_hwmod_ocp_if am33xx_epwmss1__eqep1 = {
2771 .master = &am33xx_epwmss1_hwmod, 1999 .master = &am33xx_epwmss1_hwmod,
2772 .slave = &am33xx_eqep1_hwmod, 2000 .slave = &am33xx_eqep1_hwmod,
2773 .clk = "l4ls_gclk", 2001 .clk = "l4ls_gclk",
2774 .addr = am33xx_eqep1_addr_space,
2775 .user = OCP_USER_MPU, 2002 .user = OCP_USER_MPU,
2776}; 2003};
2777 2004
2778static struct omap_hwmod_addr_space am33xx_ehrpwm1_addr_space[] = {
2779 {
2780 .pa_start = 0x48302200,
2781 .pa_end = 0x48302200 + SZ_128 - 1,
2782 },
2783 { }
2784};
2785
2786static struct omap_hwmod_ocp_if am33xx_epwmss1__ehrpwm1 = { 2005static struct omap_hwmod_ocp_if am33xx_epwmss1__ehrpwm1 = {
2787 .master = &am33xx_epwmss1_hwmod, 2006 .master = &am33xx_epwmss1_hwmod,
2788 .slave = &am33xx_ehrpwm1_hwmod, 2007 .slave = &am33xx_ehrpwm1_hwmod,
2789 .clk = "l4ls_gclk", 2008 .clk = "l4ls_gclk",
2790 .addr = am33xx_ehrpwm1_addr_space,
2791 .user = OCP_USER_MPU, 2009 .user = OCP_USER_MPU,
2792}; 2010};
2793 2011
@@ -2808,51 +2026,24 @@ static struct omap_hwmod_ocp_if am33xx_l4_ls__epwmss2 = {
2808 .user = OCP_USER_MPU, 2026 .user = OCP_USER_MPU,
2809}; 2027};
2810 2028
2811static struct omap_hwmod_addr_space am33xx_ecap2_addr_space[] = {
2812 {
2813 .pa_start = 0x48304100,
2814 .pa_end = 0x48304100 + SZ_128 - 1,
2815 },
2816 { }
2817};
2818
2819static struct omap_hwmod_ocp_if am33xx_epwmss2__ecap2 = { 2029static struct omap_hwmod_ocp_if am33xx_epwmss2__ecap2 = {
2820 .master = &am33xx_epwmss2_hwmod, 2030 .master = &am33xx_epwmss2_hwmod,
2821 .slave = &am33xx_ecap2_hwmod, 2031 .slave = &am33xx_ecap2_hwmod,
2822 .clk = "l4ls_gclk", 2032 .clk = "l4ls_gclk",
2823 .addr = am33xx_ecap2_addr_space,
2824 .user = OCP_USER_MPU, 2033 .user = OCP_USER_MPU,
2825}; 2034};
2826 2035
2827static struct omap_hwmod_addr_space am33xx_eqep2_addr_space[] = {
2828 {
2829 .pa_start = 0x48304180,
2830 .pa_end = 0x48304180 + SZ_128 - 1,
2831 },
2832 { }
2833};
2834
2835static struct omap_hwmod_ocp_if am33xx_epwmss2__eqep2 = { 2036static struct omap_hwmod_ocp_if am33xx_epwmss2__eqep2 = {
2836 .master = &am33xx_epwmss2_hwmod, 2037 .master = &am33xx_epwmss2_hwmod,
2837 .slave = &am33xx_eqep2_hwmod, 2038 .slave = &am33xx_eqep2_hwmod,
2838 .clk = "l4ls_gclk", 2039 .clk = "l4ls_gclk",
2839 .addr = am33xx_eqep2_addr_space,
2840 .user = OCP_USER_MPU, 2040 .user = OCP_USER_MPU,
2841}; 2041};
2842 2042
2843static struct omap_hwmod_addr_space am33xx_ehrpwm2_addr_space[] = {
2844 {
2845 .pa_start = 0x48304200,
2846 .pa_end = 0x48304200 + SZ_128 - 1,
2847 },
2848 { }
2849};
2850
2851static struct omap_hwmod_ocp_if am33xx_epwmss2__ehrpwm2 = { 2043static struct omap_hwmod_ocp_if am33xx_epwmss2__ehrpwm2 = {
2852 .master = &am33xx_epwmss2_hwmod, 2044 .master = &am33xx_epwmss2_hwmod,
2853 .slave = &am33xx_ehrpwm2_hwmod, 2045 .slave = &am33xx_ehrpwm2_hwmod,
2854 .clk = "l4ls_gclk", 2046 .clk = "l4ls_gclk",
2855 .addr = am33xx_ehrpwm2_addr_space,
2856 .user = OCP_USER_MPU, 2047 .user = OCP_USER_MPU,
2857}; 2048};
2858 2049
@@ -2875,37 +2066,17 @@ static struct omap_hwmod_ocp_if am33xx_l3_s__gpmc = {
2875}; 2066};
2876 2067
2877/* i2c2 */ 2068/* i2c2 */
2878static struct omap_hwmod_addr_space am33xx_i2c2_addr_space[] = {
2879 {
2880 .pa_start = 0x4802A000,
2881 .pa_end = 0x4802A000 + SZ_4K - 1,
2882 .flags = ADDR_TYPE_RT,
2883 },
2884 { }
2885};
2886
2887static struct omap_hwmod_ocp_if am33xx_l4_per__i2c2 = { 2069static struct omap_hwmod_ocp_if am33xx_l4_per__i2c2 = {
2888 .master = &am33xx_l4_ls_hwmod, 2070 .master = &am33xx_l4_ls_hwmod,
2889 .slave = &am33xx_i2c2_hwmod, 2071 .slave = &am33xx_i2c2_hwmod,
2890 .clk = "l4ls_gclk", 2072 .clk = "l4ls_gclk",
2891 .addr = am33xx_i2c2_addr_space,
2892 .user = OCP_USER_MPU, 2073 .user = OCP_USER_MPU,
2893}; 2074};
2894 2075
2895static struct omap_hwmod_addr_space am33xx_i2c3_addr_space[] = {
2896 {
2897 .pa_start = 0x4819C000,
2898 .pa_end = 0x4819C000 + SZ_4K - 1,
2899 .flags = ADDR_TYPE_RT
2900 },
2901 { }
2902};
2903
2904static struct omap_hwmod_ocp_if am33xx_l4_per__i2c3 = { 2076static struct omap_hwmod_ocp_if am33xx_l4_per__i2c3 = {
2905 .master = &am33xx_l4_ls_hwmod, 2077 .master = &am33xx_l4_ls_hwmod,
2906 .slave = &am33xx_i2c3_hwmod, 2078 .slave = &am33xx_i2c3_hwmod,
2907 .clk = "l4ls_gclk", 2079 .clk = "l4ls_gclk",
2908 .addr = am33xx_i2c3_addr_space,
2909 .user = OCP_USER_MPU, 2080 .user = OCP_USER_MPU,
2910}; 2081};
2911 2082
@@ -2945,20 +2116,10 @@ static struct omap_hwmod_ocp_if am33xx_l4_per__mailbox = {
2945}; 2116};
2946 2117
2947/* l4 ls -> spinlock */ 2118/* l4 ls -> spinlock */
2948static struct omap_hwmod_addr_space am33xx_spinlock_addrs[] = {
2949 {
2950 .pa_start = 0x480Ca000,
2951 .pa_end = 0x480Ca000 + SZ_4K - 1,
2952 .flags = ADDR_TYPE_RT
2953 },
2954 { }
2955};
2956
2957static struct omap_hwmod_ocp_if am33xx_l4_ls__spinlock = { 2119static struct omap_hwmod_ocp_if am33xx_l4_ls__spinlock = {
2958 .master = &am33xx_l4_ls_hwmod, 2120 .master = &am33xx_l4_ls_hwmod,
2959 .slave = &am33xx_spinlock_hwmod, 2121 .slave = &am33xx_spinlock_hwmod,
2960 .clk = "l4ls_gclk", 2122 .clk = "l4ls_gclk",
2961 .addr = am33xx_spinlock_addrs,
2962 .user = OCP_USER_MPU, 2123 .user = OCP_USER_MPU,
2963}; 2124};
2964 2125
@@ -2980,24 +2141,6 @@ static struct omap_hwmod_ocp_if am33xx_l4_ls__mcasp0 = {
2980 .user = OCP_USER_MPU, 2141 .user = OCP_USER_MPU,
2981}; 2142};
2982 2143
2983/* l3 s -> mcasp0 data */
2984static struct omap_hwmod_addr_space am33xx_mcasp0_data_addr_space[] = {
2985 {
2986 .pa_start = 0x46000000,
2987 .pa_end = 0x46000000 + SZ_4M - 1,
2988 .flags = ADDR_TYPE_RT
2989 },
2990 { }
2991};
2992
2993static struct omap_hwmod_ocp_if am33xx_l3_s__mcasp0_data = {
2994 .master = &am33xx_l3_s_hwmod,
2995 .slave = &am33xx_mcasp0_hwmod,
2996 .clk = "l3s_gclk",
2997 .addr = am33xx_mcasp0_data_addr_space,
2998 .user = OCP_USER_SDMA,
2999};
3000
3001/* l4 ls -> mcasp1 */ 2144/* l4 ls -> mcasp1 */
3002static struct omap_hwmod_addr_space am33xx_mcasp1_addr_space[] = { 2145static struct omap_hwmod_addr_space am33xx_mcasp1_addr_space[] = {
3003 { 2146 {
@@ -3016,24 +2159,6 @@ static struct omap_hwmod_ocp_if am33xx_l4_ls__mcasp1 = {
3016 .user = OCP_USER_MPU, 2159 .user = OCP_USER_MPU,
3017}; 2160};
3018 2161
3019/* l3 s -> mcasp1 data */
3020static struct omap_hwmod_addr_space am33xx_mcasp1_data_addr_space[] = {
3021 {
3022 .pa_start = 0x46400000,
3023 .pa_end = 0x46400000 + SZ_4M - 1,
3024 .flags = ADDR_TYPE_RT
3025 },
3026 { }
3027};
3028
3029static struct omap_hwmod_ocp_if am33xx_l3_s__mcasp1_data = {
3030 .master = &am33xx_l3_s_hwmod,
3031 .slave = &am33xx_mcasp1_hwmod,
3032 .clk = "l3s_gclk",
3033 .addr = am33xx_mcasp1_data_addr_space,
3034 .user = OCP_USER_SDMA,
3035};
3036
3037/* l4 ls -> mmc0 */ 2162/* l4 ls -> mmc0 */
3038static struct omap_hwmod_addr_space am33xx_mmc0_addr_space[] = { 2163static struct omap_hwmod_addr_space am33xx_mmc0_addr_space[] = {
3039 { 2164 {
@@ -3089,182 +2214,82 @@ static struct omap_hwmod_ocp_if am33xx_l3_s__mmc2 = {
3089}; 2214};
3090 2215
3091/* l4 ls -> mcspi0 */ 2216/* l4 ls -> mcspi0 */
3092static struct omap_hwmod_addr_space am33xx_mcspi0_addr_space[] = {
3093 {
3094 .pa_start = 0x48030000,
3095 .pa_end = 0x48030000 + SZ_1K - 1,
3096 .flags = ADDR_TYPE_RT,
3097 },
3098 { }
3099};
3100
3101static struct omap_hwmod_ocp_if am33xx_l4_ls__mcspi0 = { 2217static struct omap_hwmod_ocp_if am33xx_l4_ls__mcspi0 = {
3102 .master = &am33xx_l4_ls_hwmod, 2218 .master = &am33xx_l4_ls_hwmod,
3103 .slave = &am33xx_spi0_hwmod, 2219 .slave = &am33xx_spi0_hwmod,
3104 .clk = "l4ls_gclk", 2220 .clk = "l4ls_gclk",
3105 .addr = am33xx_mcspi0_addr_space,
3106 .user = OCP_USER_MPU, 2221 .user = OCP_USER_MPU,
3107}; 2222};
3108 2223
3109/* l4 ls -> mcspi1 */ 2224/* l4 ls -> mcspi1 */
3110static struct omap_hwmod_addr_space am33xx_mcspi1_addr_space[] = {
3111 {
3112 .pa_start = 0x481A0000,
3113 .pa_end = 0x481A0000 + SZ_1K - 1,
3114 .flags = ADDR_TYPE_RT,
3115 },
3116 { }
3117};
3118
3119static struct omap_hwmod_ocp_if am33xx_l4_ls__mcspi1 = { 2225static struct omap_hwmod_ocp_if am33xx_l4_ls__mcspi1 = {
3120 .master = &am33xx_l4_ls_hwmod, 2226 .master = &am33xx_l4_ls_hwmod,
3121 .slave = &am33xx_spi1_hwmod, 2227 .slave = &am33xx_spi1_hwmod,
3122 .clk = "l4ls_gclk", 2228 .clk = "l4ls_gclk",
3123 .addr = am33xx_mcspi1_addr_space,
3124 .user = OCP_USER_MPU, 2229 .user = OCP_USER_MPU,
3125}; 2230};
3126 2231
3127/* l4 wkup -> timer1 */ 2232/* l4 wkup -> timer1 */
3128static struct omap_hwmod_addr_space am33xx_timer1_addr_space[] = {
3129 {
3130 .pa_start = 0x44E31000,
3131 .pa_end = 0x44E31000 + SZ_1K - 1,
3132 .flags = ADDR_TYPE_RT
3133 },
3134 { }
3135};
3136
3137static struct omap_hwmod_ocp_if am33xx_l4_wkup__timer1 = { 2233static struct omap_hwmod_ocp_if am33xx_l4_wkup__timer1 = {
3138 .master = &am33xx_l4_wkup_hwmod, 2234 .master = &am33xx_l4_wkup_hwmod,
3139 .slave = &am33xx_timer1_hwmod, 2235 .slave = &am33xx_timer1_hwmod,
3140 .clk = "dpll_core_m4_div2_ck", 2236 .clk = "dpll_core_m4_div2_ck",
3141 .addr = am33xx_timer1_addr_space,
3142 .user = OCP_USER_MPU, 2237 .user = OCP_USER_MPU,
3143}; 2238};
3144 2239
3145/* l4 per -> timer2 */ 2240/* l4 per -> timer2 */
3146static struct omap_hwmod_addr_space am33xx_timer2_addr_space[] = {
3147 {
3148 .pa_start = 0x48040000,
3149 .pa_end = 0x48040000 + SZ_1K - 1,
3150 .flags = ADDR_TYPE_RT
3151 },
3152 { }
3153};
3154
3155static struct omap_hwmod_ocp_if am33xx_l4_ls__timer2 = { 2241static struct omap_hwmod_ocp_if am33xx_l4_ls__timer2 = {
3156 .master = &am33xx_l4_ls_hwmod, 2242 .master = &am33xx_l4_ls_hwmod,
3157 .slave = &am33xx_timer2_hwmod, 2243 .slave = &am33xx_timer2_hwmod,
3158 .clk = "l4ls_gclk", 2244 .clk = "l4ls_gclk",
3159 .addr = am33xx_timer2_addr_space,
3160 .user = OCP_USER_MPU, 2245 .user = OCP_USER_MPU,
3161}; 2246};
3162 2247
3163/* l4 per -> timer3 */ 2248/* l4 per -> timer3 */
3164static struct omap_hwmod_addr_space am33xx_timer3_addr_space[] = {
3165 {
3166 .pa_start = 0x48042000,
3167 .pa_end = 0x48042000 + SZ_1K - 1,
3168 .flags = ADDR_TYPE_RT
3169 },
3170 { }
3171};
3172
3173static struct omap_hwmod_ocp_if am33xx_l4_ls__timer3 = { 2249static struct omap_hwmod_ocp_if am33xx_l4_ls__timer3 = {
3174 .master = &am33xx_l4_ls_hwmod, 2250 .master = &am33xx_l4_ls_hwmod,
3175 .slave = &am33xx_timer3_hwmod, 2251 .slave = &am33xx_timer3_hwmod,
3176 .clk = "l4ls_gclk", 2252 .clk = "l4ls_gclk",
3177 .addr = am33xx_timer3_addr_space,
3178 .user = OCP_USER_MPU, 2253 .user = OCP_USER_MPU,
3179}; 2254};
3180 2255
3181/* l4 per -> timer4 */ 2256/* l4 per -> timer4 */
3182static struct omap_hwmod_addr_space am33xx_timer4_addr_space[] = {
3183 {
3184 .pa_start = 0x48044000,
3185 .pa_end = 0x48044000 + SZ_1K - 1,
3186 .flags = ADDR_TYPE_RT
3187 },
3188 { }
3189};
3190
3191static struct omap_hwmod_ocp_if am33xx_l4_ls__timer4 = { 2257static struct omap_hwmod_ocp_if am33xx_l4_ls__timer4 = {
3192 .master = &am33xx_l4_ls_hwmod, 2258 .master = &am33xx_l4_ls_hwmod,
3193 .slave = &am33xx_timer4_hwmod, 2259 .slave = &am33xx_timer4_hwmod,
3194 .clk = "l4ls_gclk", 2260 .clk = "l4ls_gclk",
3195 .addr = am33xx_timer4_addr_space,
3196 .user = OCP_USER_MPU, 2261 .user = OCP_USER_MPU,
3197}; 2262};
3198 2263
3199/* l4 per -> timer5 */ 2264/* l4 per -> timer5 */
3200static struct omap_hwmod_addr_space am33xx_timer5_addr_space[] = {
3201 {
3202 .pa_start = 0x48046000,
3203 .pa_end = 0x48046000 + SZ_1K - 1,
3204 .flags = ADDR_TYPE_RT
3205 },
3206 { }
3207};
3208
3209static struct omap_hwmod_ocp_if am33xx_l4_ls__timer5 = { 2265static struct omap_hwmod_ocp_if am33xx_l4_ls__timer5 = {
3210 .master = &am33xx_l4_ls_hwmod, 2266 .master = &am33xx_l4_ls_hwmod,
3211 .slave = &am33xx_timer5_hwmod, 2267 .slave = &am33xx_timer5_hwmod,
3212 .clk = "l4ls_gclk", 2268 .clk = "l4ls_gclk",
3213 .addr = am33xx_timer5_addr_space,
3214 .user = OCP_USER_MPU, 2269 .user = OCP_USER_MPU,
3215}; 2270};
3216 2271
3217/* l4 per -> timer6 */ 2272/* l4 per -> timer6 */
3218static struct omap_hwmod_addr_space am33xx_timer6_addr_space[] = {
3219 {
3220 .pa_start = 0x48048000,
3221 .pa_end = 0x48048000 + SZ_1K - 1,
3222 .flags = ADDR_TYPE_RT
3223 },
3224 { }
3225};
3226
3227static struct omap_hwmod_ocp_if am33xx_l4_ls__timer6 = { 2273static struct omap_hwmod_ocp_if am33xx_l4_ls__timer6 = {
3228 .master = &am33xx_l4_ls_hwmod, 2274 .master = &am33xx_l4_ls_hwmod,
3229 .slave = &am33xx_timer6_hwmod, 2275 .slave = &am33xx_timer6_hwmod,
3230 .clk = "l4ls_gclk", 2276 .clk = "l4ls_gclk",
3231 .addr = am33xx_timer6_addr_space,
3232 .user = OCP_USER_MPU, 2277 .user = OCP_USER_MPU,
3233}; 2278};
3234 2279
3235/* l4 per -> timer7 */ 2280/* l4 per -> timer7 */
3236static struct omap_hwmod_addr_space am33xx_timer7_addr_space[] = {
3237 {
3238 .pa_start = 0x4804A000,
3239 .pa_end = 0x4804A000 + SZ_1K - 1,
3240 .flags = ADDR_TYPE_RT
3241 },
3242 { }
3243};
3244
3245static struct omap_hwmod_ocp_if am33xx_l4_ls__timer7 = { 2281static struct omap_hwmod_ocp_if am33xx_l4_ls__timer7 = {
3246 .master = &am33xx_l4_ls_hwmod, 2282 .master = &am33xx_l4_ls_hwmod,
3247 .slave = &am33xx_timer7_hwmod, 2283 .slave = &am33xx_timer7_hwmod,
3248 .clk = "l4ls_gclk", 2284 .clk = "l4ls_gclk",
3249 .addr = am33xx_timer7_addr_space,
3250 .user = OCP_USER_MPU, 2285 .user = OCP_USER_MPU,
3251}; 2286};
3252 2287
3253/* l3 main -> tpcc */ 2288/* l3 main -> tpcc */
3254static struct omap_hwmod_addr_space am33xx_tpcc_addr_space[] = {
3255 {
3256 .pa_start = 0x49000000,
3257 .pa_end = 0x49000000 + SZ_32K - 1,
3258 .flags = ADDR_TYPE_RT
3259 },
3260 { }
3261};
3262
3263static struct omap_hwmod_ocp_if am33xx_l3_main__tpcc = { 2289static struct omap_hwmod_ocp_if am33xx_l3_main__tpcc = {
3264 .master = &am33xx_l3_main_hwmod, 2290 .master = &am33xx_l3_main_hwmod,
3265 .slave = &am33xx_tpcc_hwmod, 2291 .slave = &am33xx_tpcc_hwmod,
3266 .clk = "l3_gclk", 2292 .clk = "l3_gclk",
3267 .addr = am33xx_tpcc_addr_space,
3268 .user = OCP_USER_MPU, 2293 .user = OCP_USER_MPU,
3269}; 2294};
3270 2295
@@ -3323,160 +2348,67 @@ static struct omap_hwmod_ocp_if am33xx_l3_main__tptc2 = {
3323}; 2348};
3324 2349
3325/* l4 wkup -> uart1 */ 2350/* l4 wkup -> uart1 */
3326static struct omap_hwmod_addr_space am33xx_uart1_addr_space[] = {
3327 {
3328 .pa_start = 0x44E09000,
3329 .pa_end = 0x44E09000 + SZ_8K - 1,
3330 .flags = ADDR_TYPE_RT,
3331 },
3332 { }
3333};
3334
3335static struct omap_hwmod_ocp_if am33xx_l4_wkup__uart1 = { 2351static struct omap_hwmod_ocp_if am33xx_l4_wkup__uart1 = {
3336 .master = &am33xx_l4_wkup_hwmod, 2352 .master = &am33xx_l4_wkup_hwmod,
3337 .slave = &am33xx_uart1_hwmod, 2353 .slave = &am33xx_uart1_hwmod,
3338 .clk = "dpll_core_m4_div2_ck", 2354 .clk = "dpll_core_m4_div2_ck",
3339 .addr = am33xx_uart1_addr_space,
3340 .user = OCP_USER_MPU, 2355 .user = OCP_USER_MPU,
3341}; 2356};
3342 2357
3343/* l4 ls -> uart2 */ 2358/* l4 ls -> uart2 */
3344static struct omap_hwmod_addr_space am33xx_uart2_addr_space[] = {
3345 {
3346 .pa_start = 0x48022000,
3347 .pa_end = 0x48022000 + SZ_8K - 1,
3348 .flags = ADDR_TYPE_RT,
3349 },
3350 { }
3351};
3352
3353static struct omap_hwmod_ocp_if am33xx_l4_ls__uart2 = { 2359static struct omap_hwmod_ocp_if am33xx_l4_ls__uart2 = {
3354 .master = &am33xx_l4_ls_hwmod, 2360 .master = &am33xx_l4_ls_hwmod,
3355 .slave = &am33xx_uart2_hwmod, 2361 .slave = &am33xx_uart2_hwmod,
3356 .clk = "l4ls_gclk", 2362 .clk = "l4ls_gclk",
3357 .addr = am33xx_uart2_addr_space,
3358 .user = OCP_USER_MPU, 2363 .user = OCP_USER_MPU,
3359}; 2364};
3360 2365
3361/* l4 ls -> uart3 */ 2366/* l4 ls -> uart3 */
3362static struct omap_hwmod_addr_space am33xx_uart3_addr_space[] = {
3363 {
3364 .pa_start = 0x48024000,
3365 .pa_end = 0x48024000 + SZ_8K - 1,
3366 .flags = ADDR_TYPE_RT,
3367 },
3368 { }
3369};
3370
3371static struct omap_hwmod_ocp_if am33xx_l4_ls__uart3 = { 2367static struct omap_hwmod_ocp_if am33xx_l4_ls__uart3 = {
3372 .master = &am33xx_l4_ls_hwmod, 2368 .master = &am33xx_l4_ls_hwmod,
3373 .slave = &am33xx_uart3_hwmod, 2369 .slave = &am33xx_uart3_hwmod,
3374 .clk = "l4ls_gclk", 2370 .clk = "l4ls_gclk",
3375 .addr = am33xx_uart3_addr_space,
3376 .user = OCP_USER_MPU, 2371 .user = OCP_USER_MPU,
3377}; 2372};
3378 2373
3379/* l4 ls -> uart4 */ 2374/* l4 ls -> uart4 */
3380static struct omap_hwmod_addr_space am33xx_uart4_addr_space[] = {
3381 {
3382 .pa_start = 0x481A6000,
3383 .pa_end = 0x481A6000 + SZ_8K - 1,
3384 .flags = ADDR_TYPE_RT,
3385 },
3386 { }
3387};
3388
3389static struct omap_hwmod_ocp_if am33xx_l4_ls__uart4 = { 2375static struct omap_hwmod_ocp_if am33xx_l4_ls__uart4 = {
3390 .master = &am33xx_l4_ls_hwmod, 2376 .master = &am33xx_l4_ls_hwmod,
3391 .slave = &am33xx_uart4_hwmod, 2377 .slave = &am33xx_uart4_hwmod,
3392 .clk = "l4ls_gclk", 2378 .clk = "l4ls_gclk",
3393 .addr = am33xx_uart4_addr_space,
3394 .user = OCP_USER_MPU, 2379 .user = OCP_USER_MPU,
3395}; 2380};
3396 2381
3397/* l4 ls -> uart5 */ 2382/* l4 ls -> uart5 */
3398static struct omap_hwmod_addr_space am33xx_uart5_addr_space[] = {
3399 {
3400 .pa_start = 0x481A8000,
3401 .pa_end = 0x481A8000 + SZ_8K - 1,
3402 .flags = ADDR_TYPE_RT,
3403 },
3404 { }
3405};
3406
3407static struct omap_hwmod_ocp_if am33xx_l4_ls__uart5 = { 2383static struct omap_hwmod_ocp_if am33xx_l4_ls__uart5 = {
3408 .master = &am33xx_l4_ls_hwmod, 2384 .master = &am33xx_l4_ls_hwmod,
3409 .slave = &am33xx_uart5_hwmod, 2385 .slave = &am33xx_uart5_hwmod,
3410 .clk = "l4ls_gclk", 2386 .clk = "l4ls_gclk",
3411 .addr = am33xx_uart5_addr_space,
3412 .user = OCP_USER_MPU, 2387 .user = OCP_USER_MPU,
3413}; 2388};
3414 2389
3415/* l4 ls -> uart6 */ 2390/* l4 ls -> uart6 */
3416static struct omap_hwmod_addr_space am33xx_uart6_addr_space[] = {
3417 {
3418 .pa_start = 0x481aa000,
3419 .pa_end = 0x481aa000 + SZ_8K - 1,
3420 .flags = ADDR_TYPE_RT,
3421 },
3422 { }
3423};
3424
3425static struct omap_hwmod_ocp_if am33xx_l4_ls__uart6 = { 2391static struct omap_hwmod_ocp_if am33xx_l4_ls__uart6 = {
3426 .master = &am33xx_l4_ls_hwmod, 2392 .master = &am33xx_l4_ls_hwmod,
3427 .slave = &am33xx_uart6_hwmod, 2393 .slave = &am33xx_uart6_hwmod,
3428 .clk = "l4ls_gclk", 2394 .clk = "l4ls_gclk",
3429 .addr = am33xx_uart6_addr_space,
3430 .user = OCP_USER_MPU, 2395 .user = OCP_USER_MPU,
3431}; 2396};
3432 2397
3433/* l4 wkup -> wd_timer1 */ 2398/* l4 wkup -> wd_timer1 */
3434static struct omap_hwmod_addr_space am33xx_wd_timer1_addrs[] = {
3435 {
3436 .pa_start = 0x44e35000,
3437 .pa_end = 0x44e35000 + SZ_4K - 1,
3438 .flags = ADDR_TYPE_RT
3439 },
3440 { }
3441};
3442
3443static struct omap_hwmod_ocp_if am33xx_l4_wkup__wd_timer1 = { 2399static struct omap_hwmod_ocp_if am33xx_l4_wkup__wd_timer1 = {
3444 .master = &am33xx_l4_wkup_hwmod, 2400 .master = &am33xx_l4_wkup_hwmod,
3445 .slave = &am33xx_wd_timer1_hwmod, 2401 .slave = &am33xx_wd_timer1_hwmod,
3446 .clk = "dpll_core_m4_div2_ck", 2402 .clk = "dpll_core_m4_div2_ck",
3447 .addr = am33xx_wd_timer1_addrs,
3448 .user = OCP_USER_MPU, 2403 .user = OCP_USER_MPU,
3449}; 2404};
3450 2405
3451/* usbss */ 2406/* usbss */
3452/* l3 s -> USBSS interface */ 2407/* l3 s -> USBSS interface */
3453static struct omap_hwmod_addr_space am33xx_usbss_addr_space[] = {
3454 {
3455 .name = "usbss",
3456 .pa_start = 0x47400000,
3457 .pa_end = 0x47400000 + SZ_4K - 1,
3458 .flags = ADDR_TYPE_RT
3459 },
3460 {
3461 .name = "musb0",
3462 .pa_start = 0x47401000,
3463 .pa_end = 0x47401000 + SZ_2K - 1,
3464 .flags = ADDR_TYPE_RT
3465 },
3466 {
3467 .name = "musb1",
3468 .pa_start = 0x47401800,
3469 .pa_end = 0x47401800 + SZ_2K - 1,
3470 .flags = ADDR_TYPE_RT
3471 },
3472 { }
3473};
3474
3475static struct omap_hwmod_ocp_if am33xx_l3_s__usbss = { 2408static struct omap_hwmod_ocp_if am33xx_l3_s__usbss = {
3476 .master = &am33xx_l3_s_hwmod, 2409 .master = &am33xx_l3_s_hwmod,
3477 .slave = &am33xx_usbss_hwmod, 2410 .slave = &am33xx_usbss_hwmod,
3478 .clk = "l3s_gclk", 2411 .clk = "l3s_gclk",
3479 .addr = am33xx_usbss_addr_space,
3480 .user = OCP_USER_MPU, 2412 .user = OCP_USER_MPU,
3481 .flags = OCPIF_SWSUP_IDLE, 2413 .flags = OCPIF_SWSUP_IDLE,
3482}; 2414};
@@ -3525,13 +2457,11 @@ static struct omap_hwmod_ocp_if am33xx_l3_main__aes0 = {
3525}; 2457};
3526 2458
3527static struct omap_hwmod_ocp_if *am33xx_hwmod_ocp_ifs[] __initdata = { 2459static struct omap_hwmod_ocp_if *am33xx_hwmod_ocp_ifs[] __initdata = {
3528 &am33xx_l4_fw__emif_fw,
3529 &am33xx_l3_main__emif, 2460 &am33xx_l3_main__emif,
3530 &am33xx_mpu__l3_main, 2461 &am33xx_mpu__l3_main,
3531 &am33xx_mpu__prcm, 2462 &am33xx_mpu__prcm,
3532 &am33xx_l3_s__l4_ls, 2463 &am33xx_l3_s__l4_ls,
3533 &am33xx_l3_s__l4_wkup, 2464 &am33xx_l3_s__l4_wkup,
3534 &am33xx_l3_s__l4_fw,
3535 &am33xx_l3_main__l4_hs, 2465 &am33xx_l3_main__l4_hs,
3536 &am33xx_l3_main__l3_s, 2466 &am33xx_l3_main__l3_s,
3537 &am33xx_l3_main__l3_instr, 2467 &am33xx_l3_main__l3_instr,
@@ -3561,9 +2491,7 @@ static struct omap_hwmod_ocp_if *am33xx_hwmod_ocp_ifs[] __initdata = {
3561 &am33xx_l4_per__i2c3, 2491 &am33xx_l4_per__i2c3,
3562 &am33xx_l4_per__mailbox, 2492 &am33xx_l4_per__mailbox,
3563 &am33xx_l4_ls__mcasp0, 2493 &am33xx_l4_ls__mcasp0,
3564 &am33xx_l3_s__mcasp0_data,
3565 &am33xx_l4_ls__mcasp1, 2494 &am33xx_l4_ls__mcasp1,
3566 &am33xx_l3_s__mcasp1_data,
3567 &am33xx_l4_ls__mmc0, 2495 &am33xx_l4_ls__mmc0,
3568 &am33xx_l4_ls__mmc1, 2496 &am33xx_l4_ls__mmc1,
3569 &am33xx_l3_s__mmc2, 2497 &am33xx_l3_s__mmc2,
diff --git a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
index 31c7126eb3bb..0c3a427da544 100644
--- a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
@@ -25,6 +25,7 @@
25#include <linux/platform_data/asoc-ti-mcbsp.h> 25#include <linux/platform_data/asoc-ti-mcbsp.h>
26#include <linux/platform_data/spi-omap2-mcspi.h> 26#include <linux/platform_data/spi-omap2-mcspi.h>
27#include <linux/platform_data/iommu-omap.h> 27#include <linux/platform_data/iommu-omap.h>
28#include <linux/platform_data/mailbox-omap.h>
28#include <plat/dmtimer.h> 29#include <plat/dmtimer.h>
29 30
30#include "am35xx.h" 31#include "am35xx.h"
@@ -35,7 +36,6 @@
35#include "prm-regbits-34xx.h" 36#include "prm-regbits-34xx.h"
36#include "cm-regbits-34xx.h" 37#include "cm-regbits-34xx.h"
37 38
38#include "dma.h"
39#include "i2c.h" 39#include "i2c.h"
40#include "mmc.h" 40#include "mmc.h"
41#include "wd_timer.h" 41#include "wd_timer.h"
@@ -490,7 +490,7 @@ static struct omap_hwmod omap3xxx_uart1_hwmod = {
490 .mpu_irqs = omap2_uart1_mpu_irqs, 490 .mpu_irqs = omap2_uart1_mpu_irqs,
491 .sdma_reqs = omap2_uart1_sdma_reqs, 491 .sdma_reqs = omap2_uart1_sdma_reqs,
492 .main_clk = "uart1_fck", 492 .main_clk = "uart1_fck",
493 .flags = HWMOD_SWSUP_SIDLE_ACT, 493 .flags = DEBUG_TI81XXUART1_FLAGS | HWMOD_SWSUP_SIDLE_ACT,
494 .prcm = { 494 .prcm = {
495 .omap2 = { 495 .omap2 = {
496 .module_offs = CORE_MOD, 496 .module_offs = CORE_MOD,
@@ -509,7 +509,7 @@ static struct omap_hwmod omap3xxx_uart2_hwmod = {
509 .mpu_irqs = omap2_uart2_mpu_irqs, 509 .mpu_irqs = omap2_uart2_mpu_irqs,
510 .sdma_reqs = omap2_uart2_sdma_reqs, 510 .sdma_reqs = omap2_uart2_sdma_reqs,
511 .main_clk = "uart2_fck", 511 .main_clk = "uart2_fck",
512 .flags = HWMOD_SWSUP_SIDLE_ACT, 512 .flags = DEBUG_TI81XXUART2_FLAGS | HWMOD_SWSUP_SIDLE_ACT,
513 .prcm = { 513 .prcm = {
514 .omap2 = { 514 .omap2 = {
515 .module_offs = CORE_MOD, 515 .module_offs = CORE_MOD,
@@ -528,7 +528,8 @@ static struct omap_hwmod omap3xxx_uart3_hwmod = {
528 .mpu_irqs = omap2_uart3_mpu_irqs, 528 .mpu_irqs = omap2_uart3_mpu_irqs,
529 .sdma_reqs = omap2_uart3_sdma_reqs, 529 .sdma_reqs = omap2_uart3_sdma_reqs,
530 .main_clk = "uart3_fck", 530 .main_clk = "uart3_fck",
531 .flags = HWMOD_SWSUP_SIDLE_ACT, 531 .flags = DEBUG_OMAP3UART3_FLAGS | DEBUG_TI81XXUART3_FLAGS |
532 HWMOD_SWSUP_SIDLE_ACT,
532 .prcm = { 533 .prcm = {
533 .omap2 = { 534 .omap2 = {
534 .module_offs = OMAP3430_PER_MOD, 535 .module_offs = OMAP3430_PER_MOD,
@@ -548,8 +549,8 @@ static struct omap_hwmod_irq_info uart4_mpu_irqs[] = {
548}; 549};
549 550
550static struct omap_hwmod_dma_info uart4_sdma_reqs[] = { 551static struct omap_hwmod_dma_info uart4_sdma_reqs[] = {
551 { .name = "rx", .dma_req = OMAP36XX_DMA_UART4_RX, }, 552 { .name = "rx", .dma_req = 82, },
552 { .name = "tx", .dma_req = OMAP36XX_DMA_UART4_TX, }, 553 { .name = "tx", .dma_req = 81, },
553 { .dma_req = -1 } 554 { .dma_req = -1 }
554}; 555};
555 556
@@ -558,7 +559,7 @@ static struct omap_hwmod omap36xx_uart4_hwmod = {
558 .mpu_irqs = uart4_mpu_irqs, 559 .mpu_irqs = uart4_mpu_irqs,
559 .sdma_reqs = uart4_sdma_reqs, 560 .sdma_reqs = uart4_sdma_reqs,
560 .main_clk = "uart4_fck", 561 .main_clk = "uart4_fck",
561 .flags = HWMOD_SWSUP_SIDLE_ACT, 562 .flags = DEBUG_OMAP3UART4_FLAGS | HWMOD_SWSUP_SIDLE_ACT,
562 .prcm = { 563 .prcm = {
563 .omap2 = { 564 .omap2 = {
564 .module_offs = OMAP3430_PER_MOD, 565 .module_offs = OMAP3430_PER_MOD,
@@ -577,8 +578,8 @@ static struct omap_hwmod_irq_info am35xx_uart4_mpu_irqs[] = {
577}; 578};
578 579
579static struct omap_hwmod_dma_info am35xx_uart4_sdma_reqs[] = { 580static struct omap_hwmod_dma_info am35xx_uart4_sdma_reqs[] = {
580 { .name = "rx", .dma_req = AM35XX_DMA_UART4_RX, }, 581 { .name = "rx", .dma_req = 55, },
581 { .name = "tx", .dma_req = AM35XX_DMA_UART4_TX, }, 582 { .name = "tx", .dma_req = 54, },
582 { .dma_req = -1 } 583 { .dma_req = -1 }
583}; 584};
584 585
@@ -857,8 +858,8 @@ static struct omap_hwmod_irq_info i2c3_mpu_irqs[] = {
857}; 858};
858 859
859static struct omap_hwmod_dma_info i2c3_sdma_reqs[] = { 860static struct omap_hwmod_dma_info i2c3_sdma_reqs[] = {
860 { .name = "tx", .dma_req = OMAP34XX_DMA_I2C3_TX }, 861 { .name = "tx", .dma_req = 25 },
861 { .name = "rx", .dma_req = OMAP34XX_DMA_I2C3_RX }, 862 { .name = "rx", .dma_req = 26 },
862 { .dma_req = -1 } 863 { .dma_req = -1 }
863}; 864};
864 865
@@ -1505,6 +1506,17 @@ static struct omap_hwmod_class omap3xxx_mailbox_hwmod_class = {
1505 .sysc = &omap3xxx_mailbox_sysc, 1506 .sysc = &omap3xxx_mailbox_sysc,
1506}; 1507};
1507 1508
1509static struct omap_mbox_dev_info omap3xxx_mailbox_info[] = {
1510 { .name = "dsp", .tx_id = 0, .rx_id = 1 },
1511};
1512
1513static struct omap_mbox_pdata omap3xxx_mailbox_attrs = {
1514 .num_users = 2,
1515 .num_fifos = 2,
1516 .info_cnt = ARRAY_SIZE(omap3xxx_mailbox_info),
1517 .info = omap3xxx_mailbox_info,
1518};
1519
1508static struct omap_hwmod_irq_info omap3xxx_mailbox_irqs[] = { 1520static struct omap_hwmod_irq_info omap3xxx_mailbox_irqs[] = {
1509 { .irq = 26 + OMAP_INTC_START, }, 1521 { .irq = 26 + OMAP_INTC_START, },
1510 { .irq = -1 }, 1522 { .irq = -1 },
@@ -1524,6 +1536,7 @@ static struct omap_hwmod omap3xxx_mailbox_hwmod = {
1524 .idlest_idle_bit = OMAP3430_ST_MAILBOXES_SHIFT, 1536 .idlest_idle_bit = OMAP3430_ST_MAILBOXES_SHIFT,
1525 }, 1537 },
1526 }, 1538 },
1539 .dev_attr = &omap3xxx_mailbox_attrs,
1527}; 1540};
1528 1541
1529/* 1542/*
@@ -3581,7 +3594,7 @@ static struct omap_hwmod_irq_info omap3_sham_mpu_irqs[] = {
3581}; 3594};
3582 3595
3583static struct omap_hwmod_dma_info omap3_sham_sdma_reqs[] = { 3596static struct omap_hwmod_dma_info omap3_sham_sdma_reqs[] = {
3584 { .name = "rx", .dma_req = OMAP34XX_DMA_SHA1MD5_RX, }, 3597 { .name = "rx", .dma_req = 69, },
3585 { .dma_req = -1 } 3598 { .dma_req = -1 }
3586}; 3599};
3587 3600
@@ -3642,8 +3655,8 @@ static struct omap_hwmod_class omap3xxx_aes_class = {
3642}; 3655};
3643 3656
3644static struct omap_hwmod_dma_info omap3_aes_sdma_reqs[] = { 3657static struct omap_hwmod_dma_info omap3_aes_sdma_reqs[] = {
3645 { .name = "tx", .dma_req = OMAP34XX_DMA_AES2_TX, }, 3658 { .name = "tx", .dma_req = 65, },
3646 { .name = "rx", .dma_req = OMAP34XX_DMA_AES2_RX, }, 3659 { .name = "rx", .dma_req = 66, },
3647 { .dma_req = -1 } 3660 { .dma_req = -1 }
3648}; 3661};
3649 3662
diff --git a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
index 848b6dc67590..9c3b504477d7 100644
--- a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
@@ -12,6 +12,8 @@
12 * with the public linux-omap@vger.kernel.org mailing list and the 12 * with the public linux-omap@vger.kernel.org mailing list and the
13 * authors above to ensure that the autogeneration scripts are kept 13 * authors above to ensure that the autogeneration scripts are kept
14 * up-to-date with the file contents. 14 * up-to-date with the file contents.
15 * Note that this file is currently not in sync with autogeneration scripts.
16 * The above note to be removed, once it is synced up.
15 * 17 *
16 * This program is free software; you can redistribute it and/or modify 18 * This program is free software; you can redistribute it and/or modify
17 * it under the terms of the GNU General Public License version 2 as 19 * it under the terms of the GNU General Public License version 2 as
@@ -21,7 +23,6 @@
21#include <linux/io.h> 23#include <linux/io.h>
22#include <linux/platform_data/gpio-omap.h> 24#include <linux/platform_data/gpio-omap.h>
23#include <linux/power/smartreflex.h> 25#include <linux/power/smartreflex.h>
24#include <linux/platform_data/omap_ocp2scp.h>
25#include <linux/i2c-omap.h> 26#include <linux/i2c-omap.h>
26 27
27#include <linux/omap-dma.h> 28#include <linux/omap-dma.h>
@@ -52,27 +53,6 @@
52 */ 53 */
53 54
54/* 55/*
55 * 'c2c_target_fw' class
56 * instance(s): c2c_target_fw
57 */
58static struct omap_hwmod_class omap44xx_c2c_target_fw_hwmod_class = {
59 .name = "c2c_target_fw",
60};
61
62/* c2c_target_fw */
63static struct omap_hwmod omap44xx_c2c_target_fw_hwmod = {
64 .name = "c2c_target_fw",
65 .class = &omap44xx_c2c_target_fw_hwmod_class,
66 .clkdm_name = "d2d_clkdm",
67 .prcm = {
68 .omap4 = {
69 .clkctrl_offs = OMAP4_CM_D2D_SAD2D_FW_CLKCTRL_OFFSET,
70 .context_offs = OMAP4_RM_D2D_SAD2D_FW_CONTEXT_OFFSET,
71 },
72 },
73};
74
75/*
76 * 'dmm' class 56 * 'dmm' class
77 * instance(s): dmm 57 * instance(s): dmm
78 */ 58 */
@@ -81,16 +61,10 @@ static struct omap_hwmod_class omap44xx_dmm_hwmod_class = {
81}; 61};
82 62
83/* dmm */ 63/* dmm */
84static struct omap_hwmod_irq_info omap44xx_dmm_irqs[] = {
85 { .irq = 113 + OMAP44XX_IRQ_GIC_START },
86 { .irq = -1 }
87};
88
89static struct omap_hwmod omap44xx_dmm_hwmod = { 64static struct omap_hwmod omap44xx_dmm_hwmod = {
90 .name = "dmm", 65 .name = "dmm",
91 .class = &omap44xx_dmm_hwmod_class, 66 .class = &omap44xx_dmm_hwmod_class,
92 .clkdm_name = "l3_emif_clkdm", 67 .clkdm_name = "l3_emif_clkdm",
93 .mpu_irqs = omap44xx_dmm_irqs,
94 .prcm = { 68 .prcm = {
95 .omap4 = { 69 .omap4 = {
96 .clkctrl_offs = OMAP4_CM_MEMIF_DMM_CLKCTRL_OFFSET, 70 .clkctrl_offs = OMAP4_CM_MEMIF_DMM_CLKCTRL_OFFSET,
@@ -100,27 +74,6 @@ static struct omap_hwmod omap44xx_dmm_hwmod = {
100}; 74};
101 75
102/* 76/*
103 * 'emif_fw' class
104 * instance(s): emif_fw
105 */
106static struct omap_hwmod_class omap44xx_emif_fw_hwmod_class = {
107 .name = "emif_fw",
108};
109
110/* emif_fw */
111static struct omap_hwmod omap44xx_emif_fw_hwmod = {
112 .name = "emif_fw",
113 .class = &omap44xx_emif_fw_hwmod_class,
114 .clkdm_name = "l3_emif_clkdm",
115 .prcm = {
116 .omap4 = {
117 .clkctrl_offs = OMAP4_CM_MEMIF_EMIF_FW_CLKCTRL_OFFSET,
118 .context_offs = OMAP4_RM_MEMIF_EMIF_FW_CONTEXT_OFFSET,
119 },
120 },
121};
122
123/*
124 * 'l3' class 77 * 'l3' class
125 * instance(s): l3_instr, l3_main_1, l3_main_2, l3_main_3 78 * instance(s): l3_instr, l3_main_1, l3_main_2, l3_main_3
126 */ 79 */
@@ -143,17 +96,10 @@ static struct omap_hwmod omap44xx_l3_instr_hwmod = {
143}; 96};
144 97
145/* l3_main_1 */ 98/* l3_main_1 */
146static struct omap_hwmod_irq_info omap44xx_l3_main_1_irqs[] = {
147 { .name = "dbg_err", .irq = 9 + OMAP44XX_IRQ_GIC_START },
148 { .name = "app_err", .irq = 10 + OMAP44XX_IRQ_GIC_START },
149 { .irq = -1 }
150};
151
152static struct omap_hwmod omap44xx_l3_main_1_hwmod = { 99static struct omap_hwmod omap44xx_l3_main_1_hwmod = {
153 .name = "l3_main_1", 100 .name = "l3_main_1",
154 .class = &omap44xx_l3_hwmod_class, 101 .class = &omap44xx_l3_hwmod_class,
155 .clkdm_name = "l3_1_clkdm", 102 .clkdm_name = "l3_1_clkdm",
156 .mpu_irqs = omap44xx_l3_main_1_irqs,
157 .prcm = { 103 .prcm = {
158 .omap4 = { 104 .omap4 = {
159 .clkctrl_offs = OMAP4_CM_L3_1_L3_1_CLKCTRL_OFFSET, 105 .clkctrl_offs = OMAP4_CM_L3_1_L3_1_CLKCTRL_OFFSET,
@@ -326,29 +272,10 @@ static struct omap_hwmod_class omap44xx_aess_hwmod_class = {
326}; 272};
327 273
328/* aess */ 274/* aess */
329static struct omap_hwmod_irq_info omap44xx_aess_irqs[] = {
330 { .irq = 99 + OMAP44XX_IRQ_GIC_START },
331 { .irq = -1 }
332};
333
334static struct omap_hwmod_dma_info omap44xx_aess_sdma_reqs[] = {
335 { .name = "fifo0", .dma_req = 100 + OMAP44XX_DMA_REQ_START },
336 { .name = "fifo1", .dma_req = 101 + OMAP44XX_DMA_REQ_START },
337 { .name = "fifo2", .dma_req = 102 + OMAP44XX_DMA_REQ_START },
338 { .name = "fifo3", .dma_req = 103 + OMAP44XX_DMA_REQ_START },
339 { .name = "fifo4", .dma_req = 104 + OMAP44XX_DMA_REQ_START },
340 { .name = "fifo5", .dma_req = 105 + OMAP44XX_DMA_REQ_START },
341 { .name = "fifo6", .dma_req = 106 + OMAP44XX_DMA_REQ_START },
342 { .name = "fifo7", .dma_req = 107 + OMAP44XX_DMA_REQ_START },
343 { .dma_req = -1 }
344};
345
346static struct omap_hwmod omap44xx_aess_hwmod = { 275static struct omap_hwmod omap44xx_aess_hwmod = {
347 .name = "aess", 276 .name = "aess",
348 .class = &omap44xx_aess_hwmod_class, 277 .class = &omap44xx_aess_hwmod_class,
349 .clkdm_name = "abe_clkdm", 278 .clkdm_name = "abe_clkdm",
350 .mpu_irqs = omap44xx_aess_irqs,
351 .sdma_reqs = omap44xx_aess_sdma_reqs,
352 .main_clk = "aess_fclk", 279 .main_clk = "aess_fclk",
353 .prcm = { 280 .prcm = {
354 .omap4 = { 281 .omap4 = {
@@ -371,22 +298,10 @@ static struct omap_hwmod_class omap44xx_c2c_hwmod_class = {
371}; 298};
372 299
373/* c2c */ 300/* c2c */
374static struct omap_hwmod_irq_info omap44xx_c2c_irqs[] = {
375 { .irq = 88 + OMAP44XX_IRQ_GIC_START },
376 { .irq = -1 }
377};
378
379static struct omap_hwmod_dma_info omap44xx_c2c_sdma_reqs[] = {
380 { .dma_req = 68 + OMAP44XX_DMA_REQ_START },
381 { .dma_req = -1 }
382};
383
384static struct omap_hwmod omap44xx_c2c_hwmod = { 301static struct omap_hwmod omap44xx_c2c_hwmod = {
385 .name = "c2c", 302 .name = "c2c",
386 .class = &omap44xx_c2c_hwmod_class, 303 .class = &omap44xx_c2c_hwmod_class,
387 .clkdm_name = "d2d_clkdm", 304 .clkdm_name = "d2d_clkdm",
388 .mpu_irqs = omap44xx_c2c_irqs,
389 .sdma_reqs = omap44xx_c2c_sdma_reqs,
390 .prcm = { 305 .prcm = {
391 .omap4 = { 306 .omap4 = {
392 .clkctrl_offs = OMAP4_CM_D2D_SAD2D_CLKCTRL_OFFSET, 307 .clkctrl_offs = OMAP4_CM_D2D_SAD2D_CLKCTRL_OFFSET,
@@ -449,16 +364,10 @@ static struct omap_hwmod_class omap44xx_ctrl_module_hwmod_class = {
449}; 364};
450 365
451/* ctrl_module_core */ 366/* ctrl_module_core */
452static struct omap_hwmod_irq_info omap44xx_ctrl_module_core_irqs[] = {
453 { .irq = 8 + OMAP44XX_IRQ_GIC_START },
454 { .irq = -1 }
455};
456
457static struct omap_hwmod omap44xx_ctrl_module_core_hwmod = { 367static struct omap_hwmod omap44xx_ctrl_module_core_hwmod = {
458 .name = "ctrl_module_core", 368 .name = "ctrl_module_core",
459 .class = &omap44xx_ctrl_module_hwmod_class, 369 .class = &omap44xx_ctrl_module_hwmod_class,
460 .clkdm_name = "l4_cfg_clkdm", 370 .clkdm_name = "l4_cfg_clkdm",
461 .mpu_irqs = omap44xx_ctrl_module_core_irqs,
462 .prcm = { 371 .prcm = {
463 .omap4 = { 372 .omap4 = {
464 .flags = HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT, 373 .flags = HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT,
@@ -601,22 +510,10 @@ static struct omap_hwmod_class omap44xx_dmic_hwmod_class = {
601}; 510};
602 511
603/* dmic */ 512/* dmic */
604static struct omap_hwmod_irq_info omap44xx_dmic_irqs[] = {
605 { .irq = 114 + OMAP44XX_IRQ_GIC_START },
606 { .irq = -1 }
607};
608
609static struct omap_hwmod_dma_info omap44xx_dmic_sdma_reqs[] = {
610 { .dma_req = 66 + OMAP44XX_DMA_REQ_START },
611 { .dma_req = -1 }
612};
613
614static struct omap_hwmod omap44xx_dmic_hwmod = { 513static struct omap_hwmod omap44xx_dmic_hwmod = {
615 .name = "dmic", 514 .name = "dmic",
616 .class = &omap44xx_dmic_hwmod_class, 515 .class = &omap44xx_dmic_hwmod_class,
617 .clkdm_name = "abe_clkdm", 516 .clkdm_name = "abe_clkdm",
618 .mpu_irqs = omap44xx_dmic_irqs,
619 .sdma_reqs = omap44xx_dmic_sdma_reqs,
620 .main_clk = "func_dmic_abe_gfclk", 517 .main_clk = "func_dmic_abe_gfclk",
621 .prcm = { 518 .prcm = {
622 .omap4 = { 519 .omap4 = {
@@ -637,11 +534,6 @@ static struct omap_hwmod_class omap44xx_dsp_hwmod_class = {
637}; 534};
638 535
639/* dsp */ 536/* dsp */
640static struct omap_hwmod_irq_info omap44xx_dsp_irqs[] = {
641 { .irq = 28 + OMAP44XX_IRQ_GIC_START },
642 { .irq = -1 }
643};
644
645static struct omap_hwmod_rst_info omap44xx_dsp_resets[] = { 537static struct omap_hwmod_rst_info omap44xx_dsp_resets[] = {
646 { .name = "dsp", .rst_shift = 0 }, 538 { .name = "dsp", .rst_shift = 0 },
647}; 539};
@@ -650,7 +542,6 @@ static struct omap_hwmod omap44xx_dsp_hwmod = {
650 .name = "dsp", 542 .name = "dsp",
651 .class = &omap44xx_dsp_hwmod_class, 543 .class = &omap44xx_dsp_hwmod_class,
652 .clkdm_name = "tesla_clkdm", 544 .clkdm_name = "tesla_clkdm",
653 .mpu_irqs = omap44xx_dsp_irqs,
654 .rst_lines = omap44xx_dsp_resets, 545 .rst_lines = omap44xx_dsp_resets,
655 .rst_lines_cnt = ARRAY_SIZE(omap44xx_dsp_resets), 546 .rst_lines_cnt = ARRAY_SIZE(omap44xx_dsp_resets),
656 .main_clk = "dpll_iva_m4x2_ck", 547 .main_clk = "dpll_iva_m4x2_ck",
@@ -992,16 +883,10 @@ static struct omap_hwmod_class omap44xx_elm_hwmod_class = {
992}; 883};
993 884
994/* elm */ 885/* elm */
995static struct omap_hwmod_irq_info omap44xx_elm_irqs[] = {
996 { .irq = 4 + OMAP44XX_IRQ_GIC_START },
997 { .irq = -1 }
998};
999
1000static struct omap_hwmod omap44xx_elm_hwmod = { 886static struct omap_hwmod omap44xx_elm_hwmod = {
1001 .name = "elm", 887 .name = "elm",
1002 .class = &omap44xx_elm_hwmod_class, 888 .class = &omap44xx_elm_hwmod_class,
1003 .clkdm_name = "l4_per_clkdm", 889 .clkdm_name = "l4_per_clkdm",
1004 .mpu_irqs = omap44xx_elm_irqs,
1005 .prcm = { 890 .prcm = {
1006 .omap4 = { 891 .omap4 = {
1007 .clkctrl_offs = OMAP4_CM_L4PER_ELM_CLKCTRL_OFFSET, 892 .clkctrl_offs = OMAP4_CM_L4PER_ELM_CLKCTRL_OFFSET,
@@ -1025,17 +910,11 @@ static struct omap_hwmod_class omap44xx_emif_hwmod_class = {
1025}; 910};
1026 911
1027/* emif1 */ 912/* emif1 */
1028static struct omap_hwmod_irq_info omap44xx_emif1_irqs[] = {
1029 { .irq = 110 + OMAP44XX_IRQ_GIC_START },
1030 { .irq = -1 }
1031};
1032
1033static struct omap_hwmod omap44xx_emif1_hwmod = { 913static struct omap_hwmod omap44xx_emif1_hwmod = {
1034 .name = "emif1", 914 .name = "emif1",
1035 .class = &omap44xx_emif_hwmod_class, 915 .class = &omap44xx_emif_hwmod_class,
1036 .clkdm_name = "l3_emif_clkdm", 916 .clkdm_name = "l3_emif_clkdm",
1037 .flags = HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET, 917 .flags = HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET,
1038 .mpu_irqs = omap44xx_emif1_irqs,
1039 .main_clk = "ddrphy_ck", 918 .main_clk = "ddrphy_ck",
1040 .prcm = { 919 .prcm = {
1041 .omap4 = { 920 .omap4 = {
@@ -1047,17 +926,11 @@ static struct omap_hwmod omap44xx_emif1_hwmod = {
1047}; 926};
1048 927
1049/* emif2 */ 928/* emif2 */
1050static struct omap_hwmod_irq_info omap44xx_emif2_irqs[] = {
1051 { .irq = 111 + OMAP44XX_IRQ_GIC_START },
1052 { .irq = -1 }
1053};
1054
1055static struct omap_hwmod omap44xx_emif2_hwmod = { 929static struct omap_hwmod omap44xx_emif2_hwmod = {
1056 .name = "emif2", 930 .name = "emif2",
1057 .class = &omap44xx_emif_hwmod_class, 931 .class = &omap44xx_emif_hwmod_class,
1058 .clkdm_name = "l3_emif_clkdm", 932 .clkdm_name = "l3_emif_clkdm",
1059 .flags = HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET, 933 .flags = HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET,
1060 .mpu_irqs = omap44xx_emif2_irqs,
1061 .main_clk = "ddrphy_ck", 934 .main_clk = "ddrphy_ck",
1062 .prcm = { 935 .prcm = {
1063 .omap4 = { 936 .omap4 = {
@@ -1098,16 +971,10 @@ static struct omap_hwmod_class omap44xx_fdif_hwmod_class = {
1098}; 971};
1099 972
1100/* fdif */ 973/* fdif */
1101static struct omap_hwmod_irq_info omap44xx_fdif_irqs[] = {
1102 { .irq = 69 + OMAP44XX_IRQ_GIC_START },
1103 { .irq = -1 }
1104};
1105
1106static struct omap_hwmod omap44xx_fdif_hwmod = { 974static struct omap_hwmod omap44xx_fdif_hwmod = {
1107 .name = "fdif", 975 .name = "fdif",
1108 .class = &omap44xx_fdif_hwmod_class, 976 .class = &omap44xx_fdif_hwmod_class,
1109 .clkdm_name = "iss_clkdm", 977 .clkdm_name = "iss_clkdm",
1110 .mpu_irqs = omap44xx_fdif_irqs,
1111 .main_clk = "fdif_fck", 978 .main_clk = "fdif_fck",
1112 .prcm = { 979 .prcm = {
1113 .omap4 = { 980 .omap4 = {
@@ -1148,11 +1015,6 @@ static struct omap_gpio_dev_attr gpio_dev_attr = {
1148}; 1015};
1149 1016
1150/* gpio1 */ 1017/* gpio1 */
1151static struct omap_hwmod_irq_info omap44xx_gpio1_irqs[] = {
1152 { .irq = 29 + OMAP44XX_IRQ_GIC_START },
1153 { .irq = -1 }
1154};
1155
1156static struct omap_hwmod_opt_clk gpio1_opt_clks[] = { 1018static struct omap_hwmod_opt_clk gpio1_opt_clks[] = {
1157 { .role = "dbclk", .clk = "gpio1_dbclk" }, 1019 { .role = "dbclk", .clk = "gpio1_dbclk" },
1158}; 1020};
@@ -1161,7 +1023,6 @@ static struct omap_hwmod omap44xx_gpio1_hwmod = {
1161 .name = "gpio1", 1023 .name = "gpio1",
1162 .class = &omap44xx_gpio_hwmod_class, 1024 .class = &omap44xx_gpio_hwmod_class,
1163 .clkdm_name = "l4_wkup_clkdm", 1025 .clkdm_name = "l4_wkup_clkdm",
1164 .mpu_irqs = omap44xx_gpio1_irqs,
1165 .main_clk = "l4_wkup_clk_mux_ck", 1026 .main_clk = "l4_wkup_clk_mux_ck",
1166 .prcm = { 1027 .prcm = {
1167 .omap4 = { 1028 .omap4 = {
@@ -1176,11 +1037,6 @@ static struct omap_hwmod omap44xx_gpio1_hwmod = {
1176}; 1037};
1177 1038
1178/* gpio2 */ 1039/* gpio2 */
1179static struct omap_hwmod_irq_info omap44xx_gpio2_irqs[] = {
1180 { .irq = 30 + OMAP44XX_IRQ_GIC_START },
1181 { .irq = -1 }
1182};
1183
1184static struct omap_hwmod_opt_clk gpio2_opt_clks[] = { 1040static struct omap_hwmod_opt_clk gpio2_opt_clks[] = {
1185 { .role = "dbclk", .clk = "gpio2_dbclk" }, 1041 { .role = "dbclk", .clk = "gpio2_dbclk" },
1186}; 1042};
@@ -1190,7 +1046,6 @@ static struct omap_hwmod omap44xx_gpio2_hwmod = {
1190 .class = &omap44xx_gpio_hwmod_class, 1046 .class = &omap44xx_gpio_hwmod_class,
1191 .clkdm_name = "l4_per_clkdm", 1047 .clkdm_name = "l4_per_clkdm",
1192 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET, 1048 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
1193 .mpu_irqs = omap44xx_gpio2_irqs,
1194 .main_clk = "l4_div_ck", 1049 .main_clk = "l4_div_ck",
1195 .prcm = { 1050 .prcm = {
1196 .omap4 = { 1051 .omap4 = {
@@ -1205,11 +1060,6 @@ static struct omap_hwmod omap44xx_gpio2_hwmod = {
1205}; 1060};
1206 1061
1207/* gpio3 */ 1062/* gpio3 */
1208static struct omap_hwmod_irq_info omap44xx_gpio3_irqs[] = {
1209 { .irq = 31 + OMAP44XX_IRQ_GIC_START },
1210 { .irq = -1 }
1211};
1212
1213static struct omap_hwmod_opt_clk gpio3_opt_clks[] = { 1063static struct omap_hwmod_opt_clk gpio3_opt_clks[] = {
1214 { .role = "dbclk", .clk = "gpio3_dbclk" }, 1064 { .role = "dbclk", .clk = "gpio3_dbclk" },
1215}; 1065};
@@ -1219,7 +1069,6 @@ static struct omap_hwmod omap44xx_gpio3_hwmod = {
1219 .class = &omap44xx_gpio_hwmod_class, 1069 .class = &omap44xx_gpio_hwmod_class,
1220 .clkdm_name = "l4_per_clkdm", 1070 .clkdm_name = "l4_per_clkdm",
1221 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET, 1071 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
1222 .mpu_irqs = omap44xx_gpio3_irqs,
1223 .main_clk = "l4_div_ck", 1072 .main_clk = "l4_div_ck",
1224 .prcm = { 1073 .prcm = {
1225 .omap4 = { 1074 .omap4 = {
@@ -1234,11 +1083,6 @@ static struct omap_hwmod omap44xx_gpio3_hwmod = {
1234}; 1083};
1235 1084
1236/* gpio4 */ 1085/* gpio4 */
1237static struct omap_hwmod_irq_info omap44xx_gpio4_irqs[] = {
1238 { .irq = 32 + OMAP44XX_IRQ_GIC_START },
1239 { .irq = -1 }
1240};
1241
1242static struct omap_hwmod_opt_clk gpio4_opt_clks[] = { 1086static struct omap_hwmod_opt_clk gpio4_opt_clks[] = {
1243 { .role = "dbclk", .clk = "gpio4_dbclk" }, 1087 { .role = "dbclk", .clk = "gpio4_dbclk" },
1244}; 1088};
@@ -1248,7 +1092,6 @@ static struct omap_hwmod omap44xx_gpio4_hwmod = {
1248 .class = &omap44xx_gpio_hwmod_class, 1092 .class = &omap44xx_gpio_hwmod_class,
1249 .clkdm_name = "l4_per_clkdm", 1093 .clkdm_name = "l4_per_clkdm",
1250 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET, 1094 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
1251 .mpu_irqs = omap44xx_gpio4_irqs,
1252 .main_clk = "l4_div_ck", 1095 .main_clk = "l4_div_ck",
1253 .prcm = { 1096 .prcm = {
1254 .omap4 = { 1097 .omap4 = {
@@ -1263,11 +1106,6 @@ static struct omap_hwmod omap44xx_gpio4_hwmod = {
1263}; 1106};
1264 1107
1265/* gpio5 */ 1108/* gpio5 */
1266static struct omap_hwmod_irq_info omap44xx_gpio5_irqs[] = {
1267 { .irq = 33 + OMAP44XX_IRQ_GIC_START },
1268 { .irq = -1 }
1269};
1270
1271static struct omap_hwmod_opt_clk gpio5_opt_clks[] = { 1109static struct omap_hwmod_opt_clk gpio5_opt_clks[] = {
1272 { .role = "dbclk", .clk = "gpio5_dbclk" }, 1110 { .role = "dbclk", .clk = "gpio5_dbclk" },
1273}; 1111};
@@ -1277,7 +1115,6 @@ static struct omap_hwmod omap44xx_gpio5_hwmod = {
1277 .class = &omap44xx_gpio_hwmod_class, 1115 .class = &omap44xx_gpio_hwmod_class,
1278 .clkdm_name = "l4_per_clkdm", 1116 .clkdm_name = "l4_per_clkdm",
1279 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET, 1117 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
1280 .mpu_irqs = omap44xx_gpio5_irqs,
1281 .main_clk = "l4_div_ck", 1118 .main_clk = "l4_div_ck",
1282 .prcm = { 1119 .prcm = {
1283 .omap4 = { 1120 .omap4 = {
@@ -1292,11 +1129,6 @@ static struct omap_hwmod omap44xx_gpio5_hwmod = {
1292}; 1129};
1293 1130
1294/* gpio6 */ 1131/* gpio6 */
1295static struct omap_hwmod_irq_info omap44xx_gpio6_irqs[] = {
1296 { .irq = 34 + OMAP44XX_IRQ_GIC_START },
1297 { .irq = -1 }
1298};
1299
1300static struct omap_hwmod_opt_clk gpio6_opt_clks[] = { 1132static struct omap_hwmod_opt_clk gpio6_opt_clks[] = {
1301 { .role = "dbclk", .clk = "gpio6_dbclk" }, 1133 { .role = "dbclk", .clk = "gpio6_dbclk" },
1302}; 1134};
@@ -1306,7 +1138,6 @@ static struct omap_hwmod omap44xx_gpio6_hwmod = {
1306 .class = &omap44xx_gpio_hwmod_class, 1138 .class = &omap44xx_gpio_hwmod_class,
1307 .clkdm_name = "l4_per_clkdm", 1139 .clkdm_name = "l4_per_clkdm",
1308 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET, 1140 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
1309 .mpu_irqs = omap44xx_gpio6_irqs,
1310 .main_clk = "l4_div_ck", 1141 .main_clk = "l4_div_ck",
1311 .prcm = { 1142 .prcm = {
1312 .omap4 = { 1143 .omap4 = {
@@ -1341,16 +1172,6 @@ static struct omap_hwmod_class omap44xx_gpmc_hwmod_class = {
1341}; 1172};
1342 1173
1343/* gpmc */ 1174/* gpmc */
1344static struct omap_hwmod_irq_info omap44xx_gpmc_irqs[] = {
1345 { .irq = 20 + OMAP44XX_IRQ_GIC_START },
1346 { .irq = -1 }
1347};
1348
1349static struct omap_hwmod_dma_info omap44xx_gpmc_sdma_reqs[] = {
1350 { .dma_req = 3 + OMAP44XX_DMA_REQ_START },
1351 { .dma_req = -1 }
1352};
1353
1354static struct omap_hwmod omap44xx_gpmc_hwmod = { 1175static struct omap_hwmod omap44xx_gpmc_hwmod = {
1355 .name = "gpmc", 1176 .name = "gpmc",
1356 .class = &omap44xx_gpmc_hwmod_class, 1177 .class = &omap44xx_gpmc_hwmod_class,
@@ -1364,8 +1185,6 @@ static struct omap_hwmod omap44xx_gpmc_hwmod = {
1364 * HWMOD_INIT_NO_RESET should be removed ASAP. 1185 * HWMOD_INIT_NO_RESET should be removed ASAP.
1365 */ 1186 */
1366 .flags = HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET, 1187 .flags = HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET,
1367 .mpu_irqs = omap44xx_gpmc_irqs,
1368 .sdma_reqs = omap44xx_gpmc_sdma_reqs,
1369 .prcm = { 1188 .prcm = {
1370 .omap4 = { 1189 .omap4 = {
1371 .clkctrl_offs = OMAP4_CM_L3_2_GPMC_CLKCTRL_OFFSET, 1190 .clkctrl_offs = OMAP4_CM_L3_2_GPMC_CLKCTRL_OFFSET,
@@ -1396,16 +1215,10 @@ static struct omap_hwmod_class omap44xx_gpu_hwmod_class = {
1396}; 1215};
1397 1216
1398/* gpu */ 1217/* gpu */
1399static struct omap_hwmod_irq_info omap44xx_gpu_irqs[] = {
1400 { .irq = 21 + OMAP44XX_IRQ_GIC_START },
1401 { .irq = -1 }
1402};
1403
1404static struct omap_hwmod omap44xx_gpu_hwmod = { 1218static struct omap_hwmod omap44xx_gpu_hwmod = {
1405 .name = "gpu", 1219 .name = "gpu",
1406 .class = &omap44xx_gpu_hwmod_class, 1220 .class = &omap44xx_gpu_hwmod_class,
1407 .clkdm_name = "l3_gfx_clkdm", 1221 .clkdm_name = "l3_gfx_clkdm",
1408 .mpu_irqs = omap44xx_gpu_irqs,
1409 .main_clk = "sgx_clk_mux", 1222 .main_clk = "sgx_clk_mux",
1410 .prcm = { 1223 .prcm = {
1411 .omap4 = { 1224 .omap4 = {
@@ -1436,17 +1249,11 @@ static struct omap_hwmod_class omap44xx_hdq1w_hwmod_class = {
1436}; 1249};
1437 1250
1438/* hdq1w */ 1251/* hdq1w */
1439static struct omap_hwmod_irq_info omap44xx_hdq1w_irqs[] = {
1440 { .irq = 58 + OMAP44XX_IRQ_GIC_START },
1441 { .irq = -1 }
1442};
1443
1444static struct omap_hwmod omap44xx_hdq1w_hwmod = { 1252static struct omap_hwmod omap44xx_hdq1w_hwmod = {
1445 .name = "hdq1w", 1253 .name = "hdq1w",
1446 .class = &omap44xx_hdq1w_hwmod_class, 1254 .class = &omap44xx_hdq1w_hwmod_class,
1447 .clkdm_name = "l4_per_clkdm", 1255 .clkdm_name = "l4_per_clkdm",
1448 .flags = HWMOD_INIT_NO_RESET, /* XXX temporary */ 1256 .flags = HWMOD_INIT_NO_RESET, /* XXX temporary */
1449 .mpu_irqs = omap44xx_hdq1w_irqs,
1450 .main_clk = "func_12m_fclk", 1257 .main_clk = "func_12m_fclk",
1451 .prcm = { 1258 .prcm = {
1452 .omap4 = { 1259 .omap4 = {
@@ -1482,18 +1289,10 @@ static struct omap_hwmod_class omap44xx_hsi_hwmod_class = {
1482}; 1289};
1483 1290
1484/* hsi */ 1291/* hsi */
1485static struct omap_hwmod_irq_info omap44xx_hsi_irqs[] = {
1486 { .name = "mpu_p1", .irq = 67 + OMAP44XX_IRQ_GIC_START },
1487 { .name = "mpu_p2", .irq = 68 + OMAP44XX_IRQ_GIC_START },
1488 { .name = "mpu_dma", .irq = 71 + OMAP44XX_IRQ_GIC_START },
1489 { .irq = -1 }
1490};
1491
1492static struct omap_hwmod omap44xx_hsi_hwmod = { 1292static struct omap_hwmod omap44xx_hsi_hwmod = {
1493 .name = "hsi", 1293 .name = "hsi",
1494 .class = &omap44xx_hsi_hwmod_class, 1294 .class = &omap44xx_hsi_hwmod_class,
1495 .clkdm_name = "l3_init_clkdm", 1295 .clkdm_name = "l3_init_clkdm",
1496 .mpu_irqs = omap44xx_hsi_irqs,
1497 .main_clk = "hsi_fck", 1296 .main_clk = "hsi_fck",
1498 .prcm = { 1297 .prcm = {
1499 .omap4 = { 1298 .omap4 = {
@@ -1533,24 +1332,11 @@ static struct omap_i2c_dev_attr i2c_dev_attr = {
1533}; 1332};
1534 1333
1535/* i2c1 */ 1334/* i2c1 */
1536static struct omap_hwmod_irq_info omap44xx_i2c1_irqs[] = {
1537 { .irq = 56 + OMAP44XX_IRQ_GIC_START },
1538 { .irq = -1 }
1539};
1540
1541static struct omap_hwmod_dma_info omap44xx_i2c1_sdma_reqs[] = {
1542 { .name = "tx", .dma_req = 26 + OMAP44XX_DMA_REQ_START },
1543 { .name = "rx", .dma_req = 27 + OMAP44XX_DMA_REQ_START },
1544 { .dma_req = -1 }
1545};
1546
1547static struct omap_hwmod omap44xx_i2c1_hwmod = { 1335static struct omap_hwmod omap44xx_i2c1_hwmod = {
1548 .name = "i2c1", 1336 .name = "i2c1",
1549 .class = &omap44xx_i2c_hwmod_class, 1337 .class = &omap44xx_i2c_hwmod_class,
1550 .clkdm_name = "l4_per_clkdm", 1338 .clkdm_name = "l4_per_clkdm",
1551 .flags = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT, 1339 .flags = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT,
1552 .mpu_irqs = omap44xx_i2c1_irqs,
1553 .sdma_reqs = omap44xx_i2c1_sdma_reqs,
1554 .main_clk = "func_96m_fclk", 1340 .main_clk = "func_96m_fclk",
1555 .prcm = { 1341 .prcm = {
1556 .omap4 = { 1342 .omap4 = {
@@ -1563,24 +1349,11 @@ static struct omap_hwmod omap44xx_i2c1_hwmod = {
1563}; 1349};
1564 1350
1565/* i2c2 */ 1351/* i2c2 */
1566static struct omap_hwmod_irq_info omap44xx_i2c2_irqs[] = {
1567 { .irq = 57 + OMAP44XX_IRQ_GIC_START },
1568 { .irq = -1 }
1569};
1570
1571static struct omap_hwmod_dma_info omap44xx_i2c2_sdma_reqs[] = {
1572 { .name = "tx", .dma_req = 28 + OMAP44XX_DMA_REQ_START },
1573 { .name = "rx", .dma_req = 29 + OMAP44XX_DMA_REQ_START },
1574 { .dma_req = -1 }
1575};
1576
1577static struct omap_hwmod omap44xx_i2c2_hwmod = { 1352static struct omap_hwmod omap44xx_i2c2_hwmod = {
1578 .name = "i2c2", 1353 .name = "i2c2",
1579 .class = &omap44xx_i2c_hwmod_class, 1354 .class = &omap44xx_i2c_hwmod_class,
1580 .clkdm_name = "l4_per_clkdm", 1355 .clkdm_name = "l4_per_clkdm",
1581 .flags = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT, 1356 .flags = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT,
1582 .mpu_irqs = omap44xx_i2c2_irqs,
1583 .sdma_reqs = omap44xx_i2c2_sdma_reqs,
1584 .main_clk = "func_96m_fclk", 1357 .main_clk = "func_96m_fclk",
1585 .prcm = { 1358 .prcm = {
1586 .omap4 = { 1359 .omap4 = {
@@ -1593,24 +1366,11 @@ static struct omap_hwmod omap44xx_i2c2_hwmod = {
1593}; 1366};
1594 1367
1595/* i2c3 */ 1368/* i2c3 */
1596static struct omap_hwmod_irq_info omap44xx_i2c3_irqs[] = {
1597 { .irq = 61 + OMAP44XX_IRQ_GIC_START },
1598 { .irq = -1 }
1599};
1600
1601static struct omap_hwmod_dma_info omap44xx_i2c3_sdma_reqs[] = {
1602 { .name = "tx", .dma_req = 24 + OMAP44XX_DMA_REQ_START },
1603 { .name = "rx", .dma_req = 25 + OMAP44XX_DMA_REQ_START },
1604 { .dma_req = -1 }
1605};
1606
1607static struct omap_hwmod omap44xx_i2c3_hwmod = { 1369static struct omap_hwmod omap44xx_i2c3_hwmod = {
1608 .name = "i2c3", 1370 .name = "i2c3",
1609 .class = &omap44xx_i2c_hwmod_class, 1371 .class = &omap44xx_i2c_hwmod_class,
1610 .clkdm_name = "l4_per_clkdm", 1372 .clkdm_name = "l4_per_clkdm",
1611 .flags = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT, 1373 .flags = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT,
1612 .mpu_irqs = omap44xx_i2c3_irqs,
1613 .sdma_reqs = omap44xx_i2c3_sdma_reqs,
1614 .main_clk = "func_96m_fclk", 1374 .main_clk = "func_96m_fclk",
1615 .prcm = { 1375 .prcm = {
1616 .omap4 = { 1376 .omap4 = {
@@ -1623,24 +1383,11 @@ static struct omap_hwmod omap44xx_i2c3_hwmod = {
1623}; 1383};
1624 1384
1625/* i2c4 */ 1385/* i2c4 */
1626static struct omap_hwmod_irq_info omap44xx_i2c4_irqs[] = {
1627 { .irq = 62 + OMAP44XX_IRQ_GIC_START },
1628 { .irq = -1 }
1629};
1630
1631static struct omap_hwmod_dma_info omap44xx_i2c4_sdma_reqs[] = {
1632 { .name = "tx", .dma_req = 123 + OMAP44XX_DMA_REQ_START },
1633 { .name = "rx", .dma_req = 124 + OMAP44XX_DMA_REQ_START },
1634 { .dma_req = -1 }
1635};
1636
1637static struct omap_hwmod omap44xx_i2c4_hwmod = { 1386static struct omap_hwmod omap44xx_i2c4_hwmod = {
1638 .name = "i2c4", 1387 .name = "i2c4",
1639 .class = &omap44xx_i2c_hwmod_class, 1388 .class = &omap44xx_i2c_hwmod_class,
1640 .clkdm_name = "l4_per_clkdm", 1389 .clkdm_name = "l4_per_clkdm",
1641 .flags = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT, 1390 .flags = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT,
1642 .mpu_irqs = omap44xx_i2c4_irqs,
1643 .sdma_reqs = omap44xx_i2c4_sdma_reqs,
1644 .main_clk = "func_96m_fclk", 1391 .main_clk = "func_96m_fclk",
1645 .prcm = { 1392 .prcm = {
1646 .omap4 = { 1393 .omap4 = {
@@ -1662,11 +1409,6 @@ static struct omap_hwmod_class omap44xx_ipu_hwmod_class = {
1662}; 1409};
1663 1410
1664/* ipu */ 1411/* ipu */
1665static struct omap_hwmod_irq_info omap44xx_ipu_irqs[] = {
1666 { .irq = 100 + OMAP44XX_IRQ_GIC_START },
1667 { .irq = -1 }
1668};
1669
1670static struct omap_hwmod_rst_info omap44xx_ipu_resets[] = { 1412static struct omap_hwmod_rst_info omap44xx_ipu_resets[] = {
1671 { .name = "cpu0", .rst_shift = 0 }, 1413 { .name = "cpu0", .rst_shift = 0 },
1672 { .name = "cpu1", .rst_shift = 1 }, 1414 { .name = "cpu1", .rst_shift = 1 },
@@ -1676,7 +1418,6 @@ static struct omap_hwmod omap44xx_ipu_hwmod = {
1676 .name = "ipu", 1418 .name = "ipu",
1677 .class = &omap44xx_ipu_hwmod_class, 1419 .class = &omap44xx_ipu_hwmod_class,
1678 .clkdm_name = "ducati_clkdm", 1420 .clkdm_name = "ducati_clkdm",
1679 .mpu_irqs = omap44xx_ipu_irqs,
1680 .rst_lines = omap44xx_ipu_resets, 1421 .rst_lines = omap44xx_ipu_resets,
1681 .rst_lines_cnt = ARRAY_SIZE(omap44xx_ipu_resets), 1422 .rst_lines_cnt = ARRAY_SIZE(omap44xx_ipu_resets),
1682 .main_clk = "ducati_clk_mux_ck", 1423 .main_clk = "ducati_clk_mux_ck",
@@ -1721,19 +1462,6 @@ static struct omap_hwmod_class omap44xx_iss_hwmod_class = {
1721}; 1462};
1722 1463
1723/* iss */ 1464/* iss */
1724static struct omap_hwmod_irq_info omap44xx_iss_irqs[] = {
1725 { .irq = 24 + OMAP44XX_IRQ_GIC_START },
1726 { .irq = -1 }
1727};
1728
1729static struct omap_hwmod_dma_info omap44xx_iss_sdma_reqs[] = {
1730 { .name = "1", .dma_req = 8 + OMAP44XX_DMA_REQ_START },
1731 { .name = "2", .dma_req = 9 + OMAP44XX_DMA_REQ_START },
1732 { .name = "3", .dma_req = 11 + OMAP44XX_DMA_REQ_START },
1733 { .name = "4", .dma_req = 12 + OMAP44XX_DMA_REQ_START },
1734 { .dma_req = -1 }
1735};
1736
1737static struct omap_hwmod_opt_clk iss_opt_clks[] = { 1465static struct omap_hwmod_opt_clk iss_opt_clks[] = {
1738 { .role = "ctrlclk", .clk = "iss_ctrlclk" }, 1466 { .role = "ctrlclk", .clk = "iss_ctrlclk" },
1739}; 1467};
@@ -1742,8 +1470,6 @@ static struct omap_hwmod omap44xx_iss_hwmod = {
1742 .name = "iss", 1470 .name = "iss",
1743 .class = &omap44xx_iss_hwmod_class, 1471 .class = &omap44xx_iss_hwmod_class,
1744 .clkdm_name = "iss_clkdm", 1472 .clkdm_name = "iss_clkdm",
1745 .mpu_irqs = omap44xx_iss_irqs,
1746 .sdma_reqs = omap44xx_iss_sdma_reqs,
1747 .main_clk = "ducati_clk_mux_ck", 1473 .main_clk = "ducati_clk_mux_ck",
1748 .prcm = { 1474 .prcm = {
1749 .omap4 = { 1475 .omap4 = {
@@ -1766,13 +1492,6 @@ static struct omap_hwmod_class omap44xx_iva_hwmod_class = {
1766}; 1492};
1767 1493
1768/* iva */ 1494/* iva */
1769static struct omap_hwmod_irq_info omap44xx_iva_irqs[] = {
1770 { .name = "sync_1", .irq = 103 + OMAP44XX_IRQ_GIC_START },
1771 { .name = "sync_0", .irq = 104 + OMAP44XX_IRQ_GIC_START },
1772 { .name = "mailbox_0", .irq = 107 + OMAP44XX_IRQ_GIC_START },
1773 { .irq = -1 }
1774};
1775
1776static struct omap_hwmod_rst_info omap44xx_iva_resets[] = { 1495static struct omap_hwmod_rst_info omap44xx_iva_resets[] = {
1777 { .name = "seq0", .rst_shift = 0 }, 1496 { .name = "seq0", .rst_shift = 0 },
1778 { .name = "seq1", .rst_shift = 1 }, 1497 { .name = "seq1", .rst_shift = 1 },
@@ -1783,7 +1502,6 @@ static struct omap_hwmod omap44xx_iva_hwmod = {
1783 .name = "iva", 1502 .name = "iva",
1784 .class = &omap44xx_iva_hwmod_class, 1503 .class = &omap44xx_iva_hwmod_class,
1785 .clkdm_name = "ivahd_clkdm", 1504 .clkdm_name = "ivahd_clkdm",
1786 .mpu_irqs = omap44xx_iva_irqs,
1787 .rst_lines = omap44xx_iva_resets, 1505 .rst_lines = omap44xx_iva_resets,
1788 .rst_lines_cnt = ARRAY_SIZE(omap44xx_iva_resets), 1506 .rst_lines_cnt = ARRAY_SIZE(omap44xx_iva_resets),
1789 .main_clk = "dpll_iva_m5x2_ck", 1507 .main_clk = "dpll_iva_m5x2_ck",
@@ -1820,16 +1538,10 @@ static struct omap_hwmod_class omap44xx_kbd_hwmod_class = {
1820}; 1538};
1821 1539
1822/* kbd */ 1540/* kbd */
1823static struct omap_hwmod_irq_info omap44xx_kbd_irqs[] = {
1824 { .irq = 120 + OMAP44XX_IRQ_GIC_START },
1825 { .irq = -1 }
1826};
1827
1828static struct omap_hwmod omap44xx_kbd_hwmod = { 1541static struct omap_hwmod omap44xx_kbd_hwmod = {
1829 .name = "kbd", 1542 .name = "kbd",
1830 .class = &omap44xx_kbd_hwmod_class, 1543 .class = &omap44xx_kbd_hwmod_class,
1831 .clkdm_name = "l4_wkup_clkdm", 1544 .clkdm_name = "l4_wkup_clkdm",
1832 .mpu_irqs = omap44xx_kbd_irqs,
1833 .main_clk = "sys_32k_ck", 1545 .main_clk = "sys_32k_ck",
1834 .prcm = { 1546 .prcm = {
1835 .omap4 = { 1547 .omap4 = {
@@ -1861,16 +1573,10 @@ static struct omap_hwmod_class omap44xx_mailbox_hwmod_class = {
1861}; 1573};
1862 1574
1863/* mailbox */ 1575/* mailbox */
1864static struct omap_hwmod_irq_info omap44xx_mailbox_irqs[] = {
1865 { .irq = 26 + OMAP44XX_IRQ_GIC_START },
1866 { .irq = -1 }
1867};
1868
1869static struct omap_hwmod omap44xx_mailbox_hwmod = { 1576static struct omap_hwmod omap44xx_mailbox_hwmod = {
1870 .name = "mailbox", 1577 .name = "mailbox",
1871 .class = &omap44xx_mailbox_hwmod_class, 1578 .class = &omap44xx_mailbox_hwmod_class,
1872 .clkdm_name = "l4_cfg_clkdm", 1579 .clkdm_name = "l4_cfg_clkdm",
1873 .mpu_irqs = omap44xx_mailbox_irqs,
1874 .prcm = { 1580 .prcm = {
1875 .omap4 = { 1581 .omap4 = {
1876 .clkctrl_offs = OMAP4_CM_L4CFG_MAILBOX_CLKCTRL_OFFSET, 1582 .clkctrl_offs = OMAP4_CM_L4CFG_MAILBOX_CLKCTRL_OFFSET,
@@ -1903,24 +1609,10 @@ static struct omap_hwmod_class omap44xx_mcasp_hwmod_class = {
1903}; 1609};
1904 1610
1905/* mcasp */ 1611/* mcasp */
1906static struct omap_hwmod_irq_info omap44xx_mcasp_irqs[] = {
1907 { .name = "arevt", .irq = 108 + OMAP44XX_IRQ_GIC_START },
1908 { .name = "axevt", .irq = 109 + OMAP44XX_IRQ_GIC_START },
1909 { .irq = -1 }
1910};
1911
1912static struct omap_hwmod_dma_info omap44xx_mcasp_sdma_reqs[] = {
1913 { .name = "axevt", .dma_req = 7 + OMAP44XX_DMA_REQ_START },
1914 { .name = "arevt", .dma_req = 10 + OMAP44XX_DMA_REQ_START },
1915 { .dma_req = -1 }
1916};
1917
1918static struct omap_hwmod omap44xx_mcasp_hwmod = { 1612static struct omap_hwmod omap44xx_mcasp_hwmod = {
1919 .name = "mcasp", 1613 .name = "mcasp",
1920 .class = &omap44xx_mcasp_hwmod_class, 1614 .class = &omap44xx_mcasp_hwmod_class,
1921 .clkdm_name = "abe_clkdm", 1615 .clkdm_name = "abe_clkdm",
1922 .mpu_irqs = omap44xx_mcasp_irqs,
1923 .sdma_reqs = omap44xx_mcasp_sdma_reqs,
1924 .main_clk = "func_mcasp_abe_gfclk", 1616 .main_clk = "func_mcasp_abe_gfclk",
1925 .prcm = { 1617 .prcm = {
1926 .omap4 = { 1618 .omap4 = {
@@ -1951,17 +1643,6 @@ static struct omap_hwmod_class omap44xx_mcbsp_hwmod_class = {
1951}; 1643};
1952 1644
1953/* mcbsp1 */ 1645/* mcbsp1 */
1954static struct omap_hwmod_irq_info omap44xx_mcbsp1_irqs[] = {
1955 { .name = "common", .irq = 17 + OMAP44XX_IRQ_GIC_START },
1956 { .irq = -1 }
1957};
1958
1959static struct omap_hwmod_dma_info omap44xx_mcbsp1_sdma_reqs[] = {
1960 { .name = "tx", .dma_req = 32 + OMAP44XX_DMA_REQ_START },
1961 { .name = "rx", .dma_req = 33 + OMAP44XX_DMA_REQ_START },
1962 { .dma_req = -1 }
1963};
1964
1965static struct omap_hwmod_opt_clk mcbsp1_opt_clks[] = { 1646static struct omap_hwmod_opt_clk mcbsp1_opt_clks[] = {
1966 { .role = "pad_fck", .clk = "pad_clks_ck" }, 1647 { .role = "pad_fck", .clk = "pad_clks_ck" },
1967 { .role = "prcm_fck", .clk = "mcbsp1_sync_mux_ck" }, 1648 { .role = "prcm_fck", .clk = "mcbsp1_sync_mux_ck" },
@@ -1971,8 +1652,6 @@ static struct omap_hwmod omap44xx_mcbsp1_hwmod = {
1971 .name = "mcbsp1", 1652 .name = "mcbsp1",
1972 .class = &omap44xx_mcbsp_hwmod_class, 1653 .class = &omap44xx_mcbsp_hwmod_class,
1973 .clkdm_name = "abe_clkdm", 1654 .clkdm_name = "abe_clkdm",
1974 .mpu_irqs = omap44xx_mcbsp1_irqs,
1975 .sdma_reqs = omap44xx_mcbsp1_sdma_reqs,
1976 .main_clk = "func_mcbsp1_gfclk", 1655 .main_clk = "func_mcbsp1_gfclk",
1977 .prcm = { 1656 .prcm = {
1978 .omap4 = { 1657 .omap4 = {
@@ -1986,17 +1665,6 @@ static struct omap_hwmod omap44xx_mcbsp1_hwmod = {
1986}; 1665};
1987 1666
1988/* mcbsp2 */ 1667/* mcbsp2 */
1989static struct omap_hwmod_irq_info omap44xx_mcbsp2_irqs[] = {
1990 { .name = "common", .irq = 22 + OMAP44XX_IRQ_GIC_START },
1991 { .irq = -1 }
1992};
1993
1994static struct omap_hwmod_dma_info omap44xx_mcbsp2_sdma_reqs[] = {
1995 { .name = "tx", .dma_req = 16 + OMAP44XX_DMA_REQ_START },
1996 { .name = "rx", .dma_req = 17 + OMAP44XX_DMA_REQ_START },
1997 { .dma_req = -1 }
1998};
1999
2000static struct omap_hwmod_opt_clk mcbsp2_opt_clks[] = { 1668static struct omap_hwmod_opt_clk mcbsp2_opt_clks[] = {
2001 { .role = "pad_fck", .clk = "pad_clks_ck" }, 1669 { .role = "pad_fck", .clk = "pad_clks_ck" },
2002 { .role = "prcm_fck", .clk = "mcbsp2_sync_mux_ck" }, 1670 { .role = "prcm_fck", .clk = "mcbsp2_sync_mux_ck" },
@@ -2006,8 +1674,6 @@ static struct omap_hwmod omap44xx_mcbsp2_hwmod = {
2006 .name = "mcbsp2", 1674 .name = "mcbsp2",
2007 .class = &omap44xx_mcbsp_hwmod_class, 1675 .class = &omap44xx_mcbsp_hwmod_class,
2008 .clkdm_name = "abe_clkdm", 1676 .clkdm_name = "abe_clkdm",
2009 .mpu_irqs = omap44xx_mcbsp2_irqs,
2010 .sdma_reqs = omap44xx_mcbsp2_sdma_reqs,
2011 .main_clk = "func_mcbsp2_gfclk", 1677 .main_clk = "func_mcbsp2_gfclk",
2012 .prcm = { 1678 .prcm = {
2013 .omap4 = { 1679 .omap4 = {
@@ -2021,17 +1687,6 @@ static struct omap_hwmod omap44xx_mcbsp2_hwmod = {
2021}; 1687};
2022 1688
2023/* mcbsp3 */ 1689/* mcbsp3 */
2024static struct omap_hwmod_irq_info omap44xx_mcbsp3_irqs[] = {
2025 { .name = "common", .irq = 23 + OMAP44XX_IRQ_GIC_START },
2026 { .irq = -1 }
2027};
2028
2029static struct omap_hwmod_dma_info omap44xx_mcbsp3_sdma_reqs[] = {
2030 { .name = "tx", .dma_req = 18 + OMAP44XX_DMA_REQ_START },
2031 { .name = "rx", .dma_req = 19 + OMAP44XX_DMA_REQ_START },
2032 { .dma_req = -1 }
2033};
2034
2035static struct omap_hwmod_opt_clk mcbsp3_opt_clks[] = { 1690static struct omap_hwmod_opt_clk mcbsp3_opt_clks[] = {
2036 { .role = "pad_fck", .clk = "pad_clks_ck" }, 1691 { .role = "pad_fck", .clk = "pad_clks_ck" },
2037 { .role = "prcm_fck", .clk = "mcbsp3_sync_mux_ck" }, 1692 { .role = "prcm_fck", .clk = "mcbsp3_sync_mux_ck" },
@@ -2041,8 +1696,6 @@ static struct omap_hwmod omap44xx_mcbsp3_hwmod = {
2041 .name = "mcbsp3", 1696 .name = "mcbsp3",
2042 .class = &omap44xx_mcbsp_hwmod_class, 1697 .class = &omap44xx_mcbsp_hwmod_class,
2043 .clkdm_name = "abe_clkdm", 1698 .clkdm_name = "abe_clkdm",
2044 .mpu_irqs = omap44xx_mcbsp3_irqs,
2045 .sdma_reqs = omap44xx_mcbsp3_sdma_reqs,
2046 .main_clk = "func_mcbsp3_gfclk", 1699 .main_clk = "func_mcbsp3_gfclk",
2047 .prcm = { 1700 .prcm = {
2048 .omap4 = { 1701 .omap4 = {
@@ -2056,17 +1709,6 @@ static struct omap_hwmod omap44xx_mcbsp3_hwmod = {
2056}; 1709};
2057 1710
2058/* mcbsp4 */ 1711/* mcbsp4 */
2059static struct omap_hwmod_irq_info omap44xx_mcbsp4_irqs[] = {
2060 { .name = "common", .irq = 16 + OMAP44XX_IRQ_GIC_START },
2061 { .irq = -1 }
2062};
2063
2064static struct omap_hwmod_dma_info omap44xx_mcbsp4_sdma_reqs[] = {
2065 { .name = "tx", .dma_req = 30 + OMAP44XX_DMA_REQ_START },
2066 { .name = "rx", .dma_req = 31 + OMAP44XX_DMA_REQ_START },
2067 { .dma_req = -1 }
2068};
2069
2070static struct omap_hwmod_opt_clk mcbsp4_opt_clks[] = { 1712static struct omap_hwmod_opt_clk mcbsp4_opt_clks[] = {
2071 { .role = "pad_fck", .clk = "pad_clks_ck" }, 1713 { .role = "pad_fck", .clk = "pad_clks_ck" },
2072 { .role = "prcm_fck", .clk = "mcbsp4_sync_mux_ck" }, 1714 { .role = "prcm_fck", .clk = "mcbsp4_sync_mux_ck" },
@@ -2076,8 +1718,6 @@ static struct omap_hwmod omap44xx_mcbsp4_hwmod = {
2076 .name = "mcbsp4", 1718 .name = "mcbsp4",
2077 .class = &omap44xx_mcbsp_hwmod_class, 1719 .class = &omap44xx_mcbsp_hwmod_class,
2078 .clkdm_name = "l4_per_clkdm", 1720 .clkdm_name = "l4_per_clkdm",
2079 .mpu_irqs = omap44xx_mcbsp4_irqs,
2080 .sdma_reqs = omap44xx_mcbsp4_sdma_reqs,
2081 .main_clk = "per_mcbsp4_gfclk", 1721 .main_clk = "per_mcbsp4_gfclk",
2082 .prcm = { 1722 .prcm = {
2083 .omap4 = { 1723 .omap4 = {
@@ -2112,17 +1752,6 @@ static struct omap_hwmod_class omap44xx_mcpdm_hwmod_class = {
2112}; 1752};
2113 1753
2114/* mcpdm */ 1754/* mcpdm */
2115static struct omap_hwmod_irq_info omap44xx_mcpdm_irqs[] = {
2116 { .irq = 112 + OMAP44XX_IRQ_GIC_START },
2117 { .irq = -1 }
2118};
2119
2120static struct omap_hwmod_dma_info omap44xx_mcpdm_sdma_reqs[] = {
2121 { .name = "up_link", .dma_req = 64 + OMAP44XX_DMA_REQ_START },
2122 { .name = "dn_link", .dma_req = 65 + OMAP44XX_DMA_REQ_START },
2123 { .dma_req = -1 }
2124};
2125
2126static struct omap_hwmod omap44xx_mcpdm_hwmod = { 1755static struct omap_hwmod omap44xx_mcpdm_hwmod = {
2127 .name = "mcpdm", 1756 .name = "mcpdm",
2128 .class = &omap44xx_mcpdm_hwmod_class, 1757 .class = &omap44xx_mcpdm_hwmod_class,
@@ -2139,8 +1768,6 @@ static struct omap_hwmod omap44xx_mcpdm_hwmod = {
2139 * results 'slow motion' audio playback. 1768 * results 'slow motion' audio playback.
2140 */ 1769 */
2141 .flags = HWMOD_EXT_OPT_MAIN_CLK | HWMOD_SWSUP_SIDLE, 1770 .flags = HWMOD_EXT_OPT_MAIN_CLK | HWMOD_SWSUP_SIDLE,
2142 .mpu_irqs = omap44xx_mcpdm_irqs,
2143 .sdma_reqs = omap44xx_mcpdm_sdma_reqs,
2144 .main_clk = "pad_clks_ck", 1771 .main_clk = "pad_clks_ck",
2145 .prcm = { 1772 .prcm = {
2146 .omap4 = { 1773 .omap4 = {
@@ -2174,11 +1801,6 @@ static struct omap_hwmod_class omap44xx_mcspi_hwmod_class = {
2174}; 1801};
2175 1802
2176/* mcspi1 */ 1803/* mcspi1 */
2177static struct omap_hwmod_irq_info omap44xx_mcspi1_irqs[] = {
2178 { .irq = 65 + OMAP44XX_IRQ_GIC_START },
2179 { .irq = -1 }
2180};
2181
2182static struct omap_hwmod_dma_info omap44xx_mcspi1_sdma_reqs[] = { 1804static struct omap_hwmod_dma_info omap44xx_mcspi1_sdma_reqs[] = {
2183 { .name = "tx0", .dma_req = 34 + OMAP44XX_DMA_REQ_START }, 1805 { .name = "tx0", .dma_req = 34 + OMAP44XX_DMA_REQ_START },
2184 { .name = "rx0", .dma_req = 35 + OMAP44XX_DMA_REQ_START }, 1806 { .name = "rx0", .dma_req = 35 + OMAP44XX_DMA_REQ_START },
@@ -2200,7 +1822,6 @@ static struct omap_hwmod omap44xx_mcspi1_hwmod = {
2200 .name = "mcspi1", 1822 .name = "mcspi1",
2201 .class = &omap44xx_mcspi_hwmod_class, 1823 .class = &omap44xx_mcspi_hwmod_class,
2202 .clkdm_name = "l4_per_clkdm", 1824 .clkdm_name = "l4_per_clkdm",
2203 .mpu_irqs = omap44xx_mcspi1_irqs,
2204 .sdma_reqs = omap44xx_mcspi1_sdma_reqs, 1825 .sdma_reqs = omap44xx_mcspi1_sdma_reqs,
2205 .main_clk = "func_48m_fclk", 1826 .main_clk = "func_48m_fclk",
2206 .prcm = { 1827 .prcm = {
@@ -2214,11 +1835,6 @@ static struct omap_hwmod omap44xx_mcspi1_hwmod = {
2214}; 1835};
2215 1836
2216/* mcspi2 */ 1837/* mcspi2 */
2217static struct omap_hwmod_irq_info omap44xx_mcspi2_irqs[] = {
2218 { .irq = 66 + OMAP44XX_IRQ_GIC_START },
2219 { .irq = -1 }
2220};
2221
2222static struct omap_hwmod_dma_info omap44xx_mcspi2_sdma_reqs[] = { 1838static struct omap_hwmod_dma_info omap44xx_mcspi2_sdma_reqs[] = {
2223 { .name = "tx0", .dma_req = 42 + OMAP44XX_DMA_REQ_START }, 1839 { .name = "tx0", .dma_req = 42 + OMAP44XX_DMA_REQ_START },
2224 { .name = "rx0", .dma_req = 43 + OMAP44XX_DMA_REQ_START }, 1840 { .name = "rx0", .dma_req = 43 + OMAP44XX_DMA_REQ_START },
@@ -2236,7 +1852,6 @@ static struct omap_hwmod omap44xx_mcspi2_hwmod = {
2236 .name = "mcspi2", 1852 .name = "mcspi2",
2237 .class = &omap44xx_mcspi_hwmod_class, 1853 .class = &omap44xx_mcspi_hwmod_class,
2238 .clkdm_name = "l4_per_clkdm", 1854 .clkdm_name = "l4_per_clkdm",
2239 .mpu_irqs = omap44xx_mcspi2_irqs,
2240 .sdma_reqs = omap44xx_mcspi2_sdma_reqs, 1855 .sdma_reqs = omap44xx_mcspi2_sdma_reqs,
2241 .main_clk = "func_48m_fclk", 1856 .main_clk = "func_48m_fclk",
2242 .prcm = { 1857 .prcm = {
@@ -2250,11 +1865,6 @@ static struct omap_hwmod omap44xx_mcspi2_hwmod = {
2250}; 1865};
2251 1866
2252/* mcspi3 */ 1867/* mcspi3 */
2253static struct omap_hwmod_irq_info omap44xx_mcspi3_irqs[] = {
2254 { .irq = 91 + OMAP44XX_IRQ_GIC_START },
2255 { .irq = -1 }
2256};
2257
2258static struct omap_hwmod_dma_info omap44xx_mcspi3_sdma_reqs[] = { 1868static struct omap_hwmod_dma_info omap44xx_mcspi3_sdma_reqs[] = {
2259 { .name = "tx0", .dma_req = 14 + OMAP44XX_DMA_REQ_START }, 1869 { .name = "tx0", .dma_req = 14 + OMAP44XX_DMA_REQ_START },
2260 { .name = "rx0", .dma_req = 15 + OMAP44XX_DMA_REQ_START }, 1870 { .name = "rx0", .dma_req = 15 + OMAP44XX_DMA_REQ_START },
@@ -2272,7 +1882,6 @@ static struct omap_hwmod omap44xx_mcspi3_hwmod = {
2272 .name = "mcspi3", 1882 .name = "mcspi3",
2273 .class = &omap44xx_mcspi_hwmod_class, 1883 .class = &omap44xx_mcspi_hwmod_class,
2274 .clkdm_name = "l4_per_clkdm", 1884 .clkdm_name = "l4_per_clkdm",
2275 .mpu_irqs = omap44xx_mcspi3_irqs,
2276 .sdma_reqs = omap44xx_mcspi3_sdma_reqs, 1885 .sdma_reqs = omap44xx_mcspi3_sdma_reqs,
2277 .main_clk = "func_48m_fclk", 1886 .main_clk = "func_48m_fclk",
2278 .prcm = { 1887 .prcm = {
@@ -2286,11 +1895,6 @@ static struct omap_hwmod omap44xx_mcspi3_hwmod = {
2286}; 1895};
2287 1896
2288/* mcspi4 */ 1897/* mcspi4 */
2289static struct omap_hwmod_irq_info omap44xx_mcspi4_irqs[] = {
2290 { .irq = 48 + OMAP44XX_IRQ_GIC_START },
2291 { .irq = -1 }
2292};
2293
2294static struct omap_hwmod_dma_info omap44xx_mcspi4_sdma_reqs[] = { 1898static struct omap_hwmod_dma_info omap44xx_mcspi4_sdma_reqs[] = {
2295 { .name = "tx0", .dma_req = 69 + OMAP44XX_DMA_REQ_START }, 1899 { .name = "tx0", .dma_req = 69 + OMAP44XX_DMA_REQ_START },
2296 { .name = "rx0", .dma_req = 70 + OMAP44XX_DMA_REQ_START }, 1900 { .name = "rx0", .dma_req = 70 + OMAP44XX_DMA_REQ_START },
@@ -2306,7 +1910,6 @@ static struct omap_hwmod omap44xx_mcspi4_hwmod = {
2306 .name = "mcspi4", 1910 .name = "mcspi4",
2307 .class = &omap44xx_mcspi_hwmod_class, 1911 .class = &omap44xx_mcspi_hwmod_class,
2308 .clkdm_name = "l4_per_clkdm", 1912 .clkdm_name = "l4_per_clkdm",
2309 .mpu_irqs = omap44xx_mcspi4_irqs,
2310 .sdma_reqs = omap44xx_mcspi4_sdma_reqs, 1913 .sdma_reqs = omap44xx_mcspi4_sdma_reqs,
2311 .main_clk = "func_48m_fclk", 1914 .main_clk = "func_48m_fclk",
2312 .prcm = { 1915 .prcm = {
@@ -2342,11 +1945,6 @@ static struct omap_hwmod_class omap44xx_mmc_hwmod_class = {
2342}; 1945};
2343 1946
2344/* mmc1 */ 1947/* mmc1 */
2345static struct omap_hwmod_irq_info omap44xx_mmc1_irqs[] = {
2346 { .irq = 83 + OMAP44XX_IRQ_GIC_START },
2347 { .irq = -1 }
2348};
2349
2350static struct omap_hwmod_dma_info omap44xx_mmc1_sdma_reqs[] = { 1948static struct omap_hwmod_dma_info omap44xx_mmc1_sdma_reqs[] = {
2351 { .name = "tx", .dma_req = 60 + OMAP44XX_DMA_REQ_START }, 1949 { .name = "tx", .dma_req = 60 + OMAP44XX_DMA_REQ_START },
2352 { .name = "rx", .dma_req = 61 + OMAP44XX_DMA_REQ_START }, 1950 { .name = "rx", .dma_req = 61 + OMAP44XX_DMA_REQ_START },
@@ -2362,7 +1960,6 @@ static struct omap_hwmod omap44xx_mmc1_hwmod = {
2362 .name = "mmc1", 1960 .name = "mmc1",
2363 .class = &omap44xx_mmc_hwmod_class, 1961 .class = &omap44xx_mmc_hwmod_class,
2364 .clkdm_name = "l3_init_clkdm", 1962 .clkdm_name = "l3_init_clkdm",
2365 .mpu_irqs = omap44xx_mmc1_irqs,
2366 .sdma_reqs = omap44xx_mmc1_sdma_reqs, 1963 .sdma_reqs = omap44xx_mmc1_sdma_reqs,
2367 .main_clk = "hsmmc1_fclk", 1964 .main_clk = "hsmmc1_fclk",
2368 .prcm = { 1965 .prcm = {
@@ -2376,11 +1973,6 @@ static struct omap_hwmod omap44xx_mmc1_hwmod = {
2376}; 1973};
2377 1974
2378/* mmc2 */ 1975/* mmc2 */
2379static struct omap_hwmod_irq_info omap44xx_mmc2_irqs[] = {
2380 { .irq = 86 + OMAP44XX_IRQ_GIC_START },
2381 { .irq = -1 }
2382};
2383
2384static struct omap_hwmod_dma_info omap44xx_mmc2_sdma_reqs[] = { 1976static struct omap_hwmod_dma_info omap44xx_mmc2_sdma_reqs[] = {
2385 { .name = "tx", .dma_req = 46 + OMAP44XX_DMA_REQ_START }, 1977 { .name = "tx", .dma_req = 46 + OMAP44XX_DMA_REQ_START },
2386 { .name = "rx", .dma_req = 47 + OMAP44XX_DMA_REQ_START }, 1978 { .name = "rx", .dma_req = 47 + OMAP44XX_DMA_REQ_START },
@@ -2391,7 +1983,6 @@ static struct omap_hwmod omap44xx_mmc2_hwmod = {
2391 .name = "mmc2", 1983 .name = "mmc2",
2392 .class = &omap44xx_mmc_hwmod_class, 1984 .class = &omap44xx_mmc_hwmod_class,
2393 .clkdm_name = "l3_init_clkdm", 1985 .clkdm_name = "l3_init_clkdm",
2394 .mpu_irqs = omap44xx_mmc2_irqs,
2395 .sdma_reqs = omap44xx_mmc2_sdma_reqs, 1986 .sdma_reqs = omap44xx_mmc2_sdma_reqs,
2396 .main_clk = "hsmmc2_fclk", 1987 .main_clk = "hsmmc2_fclk",
2397 .prcm = { 1988 .prcm = {
@@ -2404,11 +1995,6 @@ static struct omap_hwmod omap44xx_mmc2_hwmod = {
2404}; 1995};
2405 1996
2406/* mmc3 */ 1997/* mmc3 */
2407static struct omap_hwmod_irq_info omap44xx_mmc3_irqs[] = {
2408 { .irq = 94 + OMAP44XX_IRQ_GIC_START },
2409 { .irq = -1 }
2410};
2411
2412static struct omap_hwmod_dma_info omap44xx_mmc3_sdma_reqs[] = { 1998static struct omap_hwmod_dma_info omap44xx_mmc3_sdma_reqs[] = {
2413 { .name = "tx", .dma_req = 76 + OMAP44XX_DMA_REQ_START }, 1999 { .name = "tx", .dma_req = 76 + OMAP44XX_DMA_REQ_START },
2414 { .name = "rx", .dma_req = 77 + OMAP44XX_DMA_REQ_START }, 2000 { .name = "rx", .dma_req = 77 + OMAP44XX_DMA_REQ_START },
@@ -2419,7 +2005,6 @@ static struct omap_hwmod omap44xx_mmc3_hwmod = {
2419 .name = "mmc3", 2005 .name = "mmc3",
2420 .class = &omap44xx_mmc_hwmod_class, 2006 .class = &omap44xx_mmc_hwmod_class,
2421 .clkdm_name = "l4_per_clkdm", 2007 .clkdm_name = "l4_per_clkdm",
2422 .mpu_irqs = omap44xx_mmc3_irqs,
2423 .sdma_reqs = omap44xx_mmc3_sdma_reqs, 2008 .sdma_reqs = omap44xx_mmc3_sdma_reqs,
2424 .main_clk = "func_48m_fclk", 2009 .main_clk = "func_48m_fclk",
2425 .prcm = { 2010 .prcm = {
@@ -2432,11 +2017,6 @@ static struct omap_hwmod omap44xx_mmc3_hwmod = {
2432}; 2017};
2433 2018
2434/* mmc4 */ 2019/* mmc4 */
2435static struct omap_hwmod_irq_info omap44xx_mmc4_irqs[] = {
2436 { .irq = 96 + OMAP44XX_IRQ_GIC_START },
2437 { .irq = -1 }
2438};
2439
2440static struct omap_hwmod_dma_info omap44xx_mmc4_sdma_reqs[] = { 2020static struct omap_hwmod_dma_info omap44xx_mmc4_sdma_reqs[] = {
2441 { .name = "tx", .dma_req = 56 + OMAP44XX_DMA_REQ_START }, 2021 { .name = "tx", .dma_req = 56 + OMAP44XX_DMA_REQ_START },
2442 { .name = "rx", .dma_req = 57 + OMAP44XX_DMA_REQ_START }, 2022 { .name = "rx", .dma_req = 57 + OMAP44XX_DMA_REQ_START },
@@ -2447,7 +2027,6 @@ static struct omap_hwmod omap44xx_mmc4_hwmod = {
2447 .name = "mmc4", 2027 .name = "mmc4",
2448 .class = &omap44xx_mmc_hwmod_class, 2028 .class = &omap44xx_mmc_hwmod_class,
2449 .clkdm_name = "l4_per_clkdm", 2029 .clkdm_name = "l4_per_clkdm",
2450 .mpu_irqs = omap44xx_mmc4_irqs,
2451 .sdma_reqs = omap44xx_mmc4_sdma_reqs, 2030 .sdma_reqs = omap44xx_mmc4_sdma_reqs,
2452 .main_clk = "func_48m_fclk", 2031 .main_clk = "func_48m_fclk",
2453 .prcm = { 2032 .prcm = {
@@ -2460,11 +2039,6 @@ static struct omap_hwmod omap44xx_mmc4_hwmod = {
2460}; 2039};
2461 2040
2462/* mmc5 */ 2041/* mmc5 */
2463static struct omap_hwmod_irq_info omap44xx_mmc5_irqs[] = {
2464 { .irq = 59 + OMAP44XX_IRQ_GIC_START },
2465 { .irq = -1 }
2466};
2467
2468static struct omap_hwmod_dma_info omap44xx_mmc5_sdma_reqs[] = { 2042static struct omap_hwmod_dma_info omap44xx_mmc5_sdma_reqs[] = {
2469 { .name = "tx", .dma_req = 58 + OMAP44XX_DMA_REQ_START }, 2043 { .name = "tx", .dma_req = 58 + OMAP44XX_DMA_REQ_START },
2470 { .name = "rx", .dma_req = 59 + OMAP44XX_DMA_REQ_START }, 2044 { .name = "rx", .dma_req = 59 + OMAP44XX_DMA_REQ_START },
@@ -2475,7 +2049,6 @@ static struct omap_hwmod omap44xx_mmc5_hwmod = {
2475 .name = "mmc5", 2049 .name = "mmc5",
2476 .class = &omap44xx_mmc_hwmod_class, 2050 .class = &omap44xx_mmc_hwmod_class,
2477 .clkdm_name = "l4_per_clkdm", 2051 .clkdm_name = "l4_per_clkdm",
2478 .mpu_irqs = omap44xx_mmc5_irqs,
2479 .sdma_reqs = omap44xx_mmc5_sdma_reqs, 2052 .sdma_reqs = omap44xx_mmc5_sdma_reqs,
2480 .main_clk = "func_48m_fclk", 2053 .main_clk = "func_48m_fclk",
2481 .prcm = { 2054 .prcm = {
@@ -2517,11 +2090,6 @@ static struct omap_mmu_dev_attr mmu_ipu_dev_attr = {
2517}; 2090};
2518 2091
2519static struct omap_hwmod omap44xx_mmu_ipu_hwmod; 2092static struct omap_hwmod omap44xx_mmu_ipu_hwmod;
2520static struct omap_hwmod_irq_info omap44xx_mmu_ipu_irqs[] = {
2521 { .irq = 100 + OMAP44XX_IRQ_GIC_START, },
2522 { .irq = -1 }
2523};
2524
2525static struct omap_hwmod_rst_info omap44xx_mmu_ipu_resets[] = { 2093static struct omap_hwmod_rst_info omap44xx_mmu_ipu_resets[] = {
2526 { .name = "mmu_cache", .rst_shift = 2 }, 2094 { .name = "mmu_cache", .rst_shift = 2 },
2527}; 2095};
@@ -2548,7 +2116,6 @@ static struct omap_hwmod omap44xx_mmu_ipu_hwmod = {
2548 .name = "mmu_ipu", 2116 .name = "mmu_ipu",
2549 .class = &omap44xx_mmu_hwmod_class, 2117 .class = &omap44xx_mmu_hwmod_class,
2550 .clkdm_name = "ducati_clkdm", 2118 .clkdm_name = "ducati_clkdm",
2551 .mpu_irqs = omap44xx_mmu_ipu_irqs,
2552 .rst_lines = omap44xx_mmu_ipu_resets, 2119 .rst_lines = omap44xx_mmu_ipu_resets,
2553 .rst_lines_cnt = ARRAY_SIZE(omap44xx_mmu_ipu_resets), 2120 .rst_lines_cnt = ARRAY_SIZE(omap44xx_mmu_ipu_resets),
2554 .main_clk = "ducati_clk_mux_ck", 2121 .main_clk = "ducati_clk_mux_ck",
@@ -2572,11 +2139,6 @@ static struct omap_mmu_dev_attr mmu_dsp_dev_attr = {
2572}; 2139};
2573 2140
2574static struct omap_hwmod omap44xx_mmu_dsp_hwmod; 2141static struct omap_hwmod omap44xx_mmu_dsp_hwmod;
2575static struct omap_hwmod_irq_info omap44xx_mmu_dsp_irqs[] = {
2576 { .irq = 28 + OMAP44XX_IRQ_GIC_START },
2577 { .irq = -1 }
2578};
2579
2580static struct omap_hwmod_rst_info omap44xx_mmu_dsp_resets[] = { 2142static struct omap_hwmod_rst_info omap44xx_mmu_dsp_resets[] = {
2581 { .name = "mmu_cache", .rst_shift = 1 }, 2143 { .name = "mmu_cache", .rst_shift = 1 },
2582}; 2144};
@@ -2603,7 +2165,6 @@ static struct omap_hwmod omap44xx_mmu_dsp_hwmod = {
2603 .name = "mmu_dsp", 2165 .name = "mmu_dsp",
2604 .class = &omap44xx_mmu_hwmod_class, 2166 .class = &omap44xx_mmu_hwmod_class,
2605 .clkdm_name = "tesla_clkdm", 2167 .clkdm_name = "tesla_clkdm",
2606 .mpu_irqs = omap44xx_mmu_dsp_irqs,
2607 .rst_lines = omap44xx_mmu_dsp_resets, 2168 .rst_lines = omap44xx_mmu_dsp_resets,
2608 .rst_lines_cnt = ARRAY_SIZE(omap44xx_mmu_dsp_resets), 2169 .rst_lines_cnt = ARRAY_SIZE(omap44xx_mmu_dsp_resets),
2609 .main_clk = "dpll_iva_m4x2_ck", 2170 .main_clk = "dpll_iva_m4x2_ck",
@@ -2628,21 +2189,11 @@ static struct omap_hwmod_class omap44xx_mpu_hwmod_class = {
2628}; 2189};
2629 2190
2630/* mpu */ 2191/* mpu */
2631static struct omap_hwmod_irq_info omap44xx_mpu_irqs[] = {
2632 { .name = "pmu0", .irq = 54 + OMAP44XX_IRQ_GIC_START },
2633 { .name = "pmu1", .irq = 55 + OMAP44XX_IRQ_GIC_START },
2634 { .name = "pl310", .irq = 0 + OMAP44XX_IRQ_GIC_START },
2635 { .name = "cti0", .irq = 1 + OMAP44XX_IRQ_GIC_START },
2636 { .name = "cti1", .irq = 2 + OMAP44XX_IRQ_GIC_START },
2637 { .irq = -1 }
2638};
2639
2640static struct omap_hwmod omap44xx_mpu_hwmod = { 2192static struct omap_hwmod omap44xx_mpu_hwmod = {
2641 .name = "mpu", 2193 .name = "mpu",
2642 .class = &omap44xx_mpu_hwmod_class, 2194 .class = &omap44xx_mpu_hwmod_class,
2643 .clkdm_name = "mpuss_clkdm", 2195 .clkdm_name = "mpuss_clkdm",
2644 .flags = HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET, 2196 .flags = HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET,
2645 .mpu_irqs = omap44xx_mpu_irqs,
2646 .main_clk = "dpll_mpu_m2_ck", 2197 .main_clk = "dpll_mpu_m2_ck",
2647 .prcm = { 2198 .prcm = {
2648 .omap4 = { 2199 .omap4 = {
@@ -2695,25 +2246,6 @@ static struct omap_hwmod_class omap44xx_ocp2scp_hwmod_class = {
2695 .sysc = &omap44xx_ocp2scp_sysc, 2246 .sysc = &omap44xx_ocp2scp_sysc,
2696}; 2247};
2697 2248
2698/* ocp2scp dev_attr */
2699static struct resource omap44xx_usb_phy_and_pll_addrs[] = {
2700 {
2701 .name = "usb_phy",
2702 .start = 0x4a0ad080,
2703 .end = 0x4a0ae000,
2704 .flags = IORESOURCE_MEM,
2705 },
2706 { }
2707};
2708
2709static struct omap_ocp2scp_dev ocp2scp_dev_attr[] = {
2710 {
2711 .drv_name = "omap-usb2",
2712 .res = omap44xx_usb_phy_and_pll_addrs,
2713 },
2714 { }
2715};
2716
2717/* ocp2scp_usb_phy */ 2249/* ocp2scp_usb_phy */
2718static struct omap_hwmod omap44xx_ocp2scp_usb_phy_hwmod = { 2250static struct omap_hwmod omap44xx_ocp2scp_usb_phy_hwmod = {
2719 .name = "ocp2scp_usb_phy", 2251 .name = "ocp2scp_usb_phy",
@@ -2737,7 +2269,6 @@ static struct omap_hwmod omap44xx_ocp2scp_usb_phy_hwmod = {
2737 .modulemode = MODULEMODE_HWCTRL, 2269 .modulemode = MODULEMODE_HWCTRL,
2738 }, 2270 },
2739 }, 2271 },
2740 .dev_attr = ocp2scp_dev_attr,
2741}; 2272};
2742 2273
2743/* 2274/*
@@ -2788,11 +2319,6 @@ static struct omap_hwmod omap44xx_cm_core_hwmod = {
2788}; 2319};
2789 2320
2790/* prm */ 2321/* prm */
2791static struct omap_hwmod_irq_info omap44xx_prm_irqs[] = {
2792 { .irq = 11 + OMAP44XX_IRQ_GIC_START },
2793 { .irq = -1 }
2794};
2795
2796static struct omap_hwmod_rst_info omap44xx_prm_resets[] = { 2322static struct omap_hwmod_rst_info omap44xx_prm_resets[] = {
2797 { .name = "rst_global_warm_sw", .rst_shift = 0 }, 2323 { .name = "rst_global_warm_sw", .rst_shift = 0 },
2798 { .name = "rst_global_cold_sw", .rst_shift = 1 }, 2324 { .name = "rst_global_cold_sw", .rst_shift = 1 },
@@ -2801,7 +2327,6 @@ static struct omap_hwmod_rst_info omap44xx_prm_resets[] = {
2801static struct omap_hwmod omap44xx_prm_hwmod = { 2327static struct omap_hwmod omap44xx_prm_hwmod = {
2802 .name = "prm", 2328 .name = "prm",
2803 .class = &omap44xx_prcm_hwmod_class, 2329 .class = &omap44xx_prcm_hwmod_class,
2804 .mpu_irqs = omap44xx_prm_irqs,
2805 .rst_lines = omap44xx_prm_resets, 2330 .rst_lines = omap44xx_prm_resets,
2806 .rst_lines_cnt = ARRAY_SIZE(omap44xx_prm_resets), 2331 .rst_lines_cnt = ARRAY_SIZE(omap44xx_prm_resets),
2807}; 2332};
@@ -2872,23 +2397,6 @@ static struct omap_hwmod_class omap44xx_slimbus_hwmod_class = {
2872}; 2397};
2873 2398
2874/* slimbus1 */ 2399/* slimbus1 */
2875static struct omap_hwmod_irq_info omap44xx_slimbus1_irqs[] = {
2876 { .irq = 97 + OMAP44XX_IRQ_GIC_START },
2877 { .irq = -1 }
2878};
2879
2880static struct omap_hwmod_dma_info omap44xx_slimbus1_sdma_reqs[] = {
2881 { .name = "tx0", .dma_req = 84 + OMAP44XX_DMA_REQ_START },
2882 { .name = "tx1", .dma_req = 85 + OMAP44XX_DMA_REQ_START },
2883 { .name = "tx2", .dma_req = 86 + OMAP44XX_DMA_REQ_START },
2884 { .name = "tx3", .dma_req = 87 + OMAP44XX_DMA_REQ_START },
2885 { .name = "rx0", .dma_req = 88 + OMAP44XX_DMA_REQ_START },
2886 { .name = "rx1", .dma_req = 89 + OMAP44XX_DMA_REQ_START },
2887 { .name = "rx2", .dma_req = 90 + OMAP44XX_DMA_REQ_START },
2888 { .name = "rx3", .dma_req = 91 + OMAP44XX_DMA_REQ_START },
2889 { .dma_req = -1 }
2890};
2891
2892static struct omap_hwmod_opt_clk slimbus1_opt_clks[] = { 2400static struct omap_hwmod_opt_clk slimbus1_opt_clks[] = {
2893 { .role = "fclk_1", .clk = "slimbus1_fclk_1" }, 2401 { .role = "fclk_1", .clk = "slimbus1_fclk_1" },
2894 { .role = "fclk_0", .clk = "slimbus1_fclk_0" }, 2402 { .role = "fclk_0", .clk = "slimbus1_fclk_0" },
@@ -2900,8 +2408,6 @@ static struct omap_hwmod omap44xx_slimbus1_hwmod = {
2900 .name = "slimbus1", 2408 .name = "slimbus1",
2901 .class = &omap44xx_slimbus_hwmod_class, 2409 .class = &omap44xx_slimbus_hwmod_class,
2902 .clkdm_name = "abe_clkdm", 2410 .clkdm_name = "abe_clkdm",
2903 .mpu_irqs = omap44xx_slimbus1_irqs,
2904 .sdma_reqs = omap44xx_slimbus1_sdma_reqs,
2905 .prcm = { 2411 .prcm = {
2906 .omap4 = { 2412 .omap4 = {
2907 .clkctrl_offs = OMAP4_CM1_ABE_SLIMBUS_CLKCTRL_OFFSET, 2413 .clkctrl_offs = OMAP4_CM1_ABE_SLIMBUS_CLKCTRL_OFFSET,
@@ -2914,23 +2420,6 @@ static struct omap_hwmod omap44xx_slimbus1_hwmod = {
2914}; 2420};
2915 2421
2916/* slimbus2 */ 2422/* slimbus2 */
2917static struct omap_hwmod_irq_info omap44xx_slimbus2_irqs[] = {
2918 { .irq = 98 + OMAP44XX_IRQ_GIC_START },
2919 { .irq = -1 }
2920};
2921
2922static struct omap_hwmod_dma_info omap44xx_slimbus2_sdma_reqs[] = {
2923 { .name = "tx0", .dma_req = 92 + OMAP44XX_DMA_REQ_START },
2924 { .name = "tx1", .dma_req = 93 + OMAP44XX_DMA_REQ_START },
2925 { .name = "tx2", .dma_req = 94 + OMAP44XX_DMA_REQ_START },
2926 { .name = "tx3", .dma_req = 95 + OMAP44XX_DMA_REQ_START },
2927 { .name = "rx0", .dma_req = 96 + OMAP44XX_DMA_REQ_START },
2928 { .name = "rx1", .dma_req = 97 + OMAP44XX_DMA_REQ_START },
2929 { .name = "rx2", .dma_req = 98 + OMAP44XX_DMA_REQ_START },
2930 { .name = "rx3", .dma_req = 99 + OMAP44XX_DMA_REQ_START },
2931 { .dma_req = -1 }
2932};
2933
2934static struct omap_hwmod_opt_clk slimbus2_opt_clks[] = { 2423static struct omap_hwmod_opt_clk slimbus2_opt_clks[] = {
2935 { .role = "fclk_1", .clk = "slimbus2_fclk_1" }, 2424 { .role = "fclk_1", .clk = "slimbus2_fclk_1" },
2936 { .role = "fclk_0", .clk = "slimbus2_fclk_0" }, 2425 { .role = "fclk_0", .clk = "slimbus2_fclk_0" },
@@ -2941,8 +2430,6 @@ static struct omap_hwmod omap44xx_slimbus2_hwmod = {
2941 .name = "slimbus2", 2430 .name = "slimbus2",
2942 .class = &omap44xx_slimbus_hwmod_class, 2431 .class = &omap44xx_slimbus_hwmod_class,
2943 .clkdm_name = "l4_per_clkdm", 2432 .clkdm_name = "l4_per_clkdm",
2944 .mpu_irqs = omap44xx_slimbus2_irqs,
2945 .sdma_reqs = omap44xx_slimbus2_sdma_reqs,
2946 .prcm = { 2433 .prcm = {
2947 .omap4 = { 2434 .omap4 = {
2948 .clkctrl_offs = OMAP4_CM_L4PER_SLIMBUS2_CLKCTRL_OFFSET, 2435 .clkctrl_offs = OMAP4_CM_L4PER_SLIMBUS2_CLKCTRL_OFFSET,
@@ -2985,16 +2472,10 @@ static struct omap_smartreflex_dev_attr smartreflex_core_dev_attr = {
2985 .sensor_voltdm_name = "core", 2472 .sensor_voltdm_name = "core",
2986}; 2473};
2987 2474
2988static struct omap_hwmod_irq_info omap44xx_smartreflex_core_irqs[] = {
2989 { .irq = 19 + OMAP44XX_IRQ_GIC_START },
2990 { .irq = -1 }
2991};
2992
2993static struct omap_hwmod omap44xx_smartreflex_core_hwmod = { 2475static struct omap_hwmod omap44xx_smartreflex_core_hwmod = {
2994 .name = "smartreflex_core", 2476 .name = "smartreflex_core",
2995 .class = &omap44xx_smartreflex_hwmod_class, 2477 .class = &omap44xx_smartreflex_hwmod_class,
2996 .clkdm_name = "l4_ao_clkdm", 2478 .clkdm_name = "l4_ao_clkdm",
2997 .mpu_irqs = omap44xx_smartreflex_core_irqs,
2998 2479
2999 .main_clk = "smartreflex_core_fck", 2480 .main_clk = "smartreflex_core_fck",
3000 .prcm = { 2481 .prcm = {
@@ -3012,16 +2493,10 @@ static struct omap_smartreflex_dev_attr smartreflex_iva_dev_attr = {
3012 .sensor_voltdm_name = "iva", 2493 .sensor_voltdm_name = "iva",
3013}; 2494};
3014 2495
3015static struct omap_hwmod_irq_info omap44xx_smartreflex_iva_irqs[] = {
3016 { .irq = 102 + OMAP44XX_IRQ_GIC_START },
3017 { .irq = -1 }
3018};
3019
3020static struct omap_hwmod omap44xx_smartreflex_iva_hwmod = { 2496static struct omap_hwmod omap44xx_smartreflex_iva_hwmod = {
3021 .name = "smartreflex_iva", 2497 .name = "smartreflex_iva",
3022 .class = &omap44xx_smartreflex_hwmod_class, 2498 .class = &omap44xx_smartreflex_hwmod_class,
3023 .clkdm_name = "l4_ao_clkdm", 2499 .clkdm_name = "l4_ao_clkdm",
3024 .mpu_irqs = omap44xx_smartreflex_iva_irqs,
3025 .main_clk = "smartreflex_iva_fck", 2500 .main_clk = "smartreflex_iva_fck",
3026 .prcm = { 2501 .prcm = {
3027 .omap4 = { 2502 .omap4 = {
@@ -3038,16 +2513,10 @@ static struct omap_smartreflex_dev_attr smartreflex_mpu_dev_attr = {
3038 .sensor_voltdm_name = "mpu", 2513 .sensor_voltdm_name = "mpu",
3039}; 2514};
3040 2515
3041static struct omap_hwmod_irq_info omap44xx_smartreflex_mpu_irqs[] = {
3042 { .irq = 18 + OMAP44XX_IRQ_GIC_START },
3043 { .irq = -1 }
3044};
3045
3046static struct omap_hwmod omap44xx_smartreflex_mpu_hwmod = { 2516static struct omap_hwmod omap44xx_smartreflex_mpu_hwmod = {
3047 .name = "smartreflex_mpu", 2517 .name = "smartreflex_mpu",
3048 .class = &omap44xx_smartreflex_hwmod_class, 2518 .class = &omap44xx_smartreflex_hwmod_class,
3049 .clkdm_name = "l4_ao_clkdm", 2519 .clkdm_name = "l4_ao_clkdm",
3050 .mpu_irqs = omap44xx_smartreflex_mpu_irqs,
3051 .main_clk = "smartreflex_mpu_fck", 2520 .main_clk = "smartreflex_mpu_fck",
3052 .prcm = { 2521 .prcm = {
3053 .omap4 = { 2522 .omap4 = {
@@ -3155,17 +2624,11 @@ static struct omap_timer_capability_dev_attr capability_dsp_pwm_dev_attr = {
3155}; 2624};
3156 2625
3157/* timer1 */ 2626/* timer1 */
3158static struct omap_hwmod_irq_info omap44xx_timer1_irqs[] = {
3159 { .irq = 37 + OMAP44XX_IRQ_GIC_START },
3160 { .irq = -1 }
3161};
3162
3163static struct omap_hwmod omap44xx_timer1_hwmod = { 2627static struct omap_hwmod omap44xx_timer1_hwmod = {
3164 .name = "timer1", 2628 .name = "timer1",
3165 .class = &omap44xx_timer_1ms_hwmod_class, 2629 .class = &omap44xx_timer_1ms_hwmod_class,
3166 .clkdm_name = "l4_wkup_clkdm", 2630 .clkdm_name = "l4_wkup_clkdm",
3167 .flags = HWMOD_SET_DEFAULT_CLOCKACT, 2631 .flags = HWMOD_SET_DEFAULT_CLOCKACT,
3168 .mpu_irqs = omap44xx_timer1_irqs,
3169 .main_clk = "dmt1_clk_mux", 2632 .main_clk = "dmt1_clk_mux",
3170 .prcm = { 2633 .prcm = {
3171 .omap4 = { 2634 .omap4 = {
@@ -3178,17 +2641,11 @@ static struct omap_hwmod omap44xx_timer1_hwmod = {
3178}; 2641};
3179 2642
3180/* timer2 */ 2643/* timer2 */
3181static struct omap_hwmod_irq_info omap44xx_timer2_irqs[] = {
3182 { .irq = 38 + OMAP44XX_IRQ_GIC_START },
3183 { .irq = -1 }
3184};
3185
3186static struct omap_hwmod omap44xx_timer2_hwmod = { 2644static struct omap_hwmod omap44xx_timer2_hwmod = {
3187 .name = "timer2", 2645 .name = "timer2",
3188 .class = &omap44xx_timer_1ms_hwmod_class, 2646 .class = &omap44xx_timer_1ms_hwmod_class,
3189 .clkdm_name = "l4_per_clkdm", 2647 .clkdm_name = "l4_per_clkdm",
3190 .flags = HWMOD_SET_DEFAULT_CLOCKACT, 2648 .flags = HWMOD_SET_DEFAULT_CLOCKACT,
3191 .mpu_irqs = omap44xx_timer2_irqs,
3192 .main_clk = "cm2_dm2_mux", 2649 .main_clk = "cm2_dm2_mux",
3193 .prcm = { 2650 .prcm = {
3194 .omap4 = { 2651 .omap4 = {
@@ -3200,16 +2657,10 @@ static struct omap_hwmod omap44xx_timer2_hwmod = {
3200}; 2657};
3201 2658
3202/* timer3 */ 2659/* timer3 */
3203static struct omap_hwmod_irq_info omap44xx_timer3_irqs[] = {
3204 { .irq = 39 + OMAP44XX_IRQ_GIC_START },
3205 { .irq = -1 }
3206};
3207
3208static struct omap_hwmod omap44xx_timer3_hwmod = { 2660static struct omap_hwmod omap44xx_timer3_hwmod = {
3209 .name = "timer3", 2661 .name = "timer3",
3210 .class = &omap44xx_timer_hwmod_class, 2662 .class = &omap44xx_timer_hwmod_class,
3211 .clkdm_name = "l4_per_clkdm", 2663 .clkdm_name = "l4_per_clkdm",
3212 .mpu_irqs = omap44xx_timer3_irqs,
3213 .main_clk = "cm2_dm3_mux", 2664 .main_clk = "cm2_dm3_mux",
3214 .prcm = { 2665 .prcm = {
3215 .omap4 = { 2666 .omap4 = {
@@ -3221,16 +2672,10 @@ static struct omap_hwmod omap44xx_timer3_hwmod = {
3221}; 2672};
3222 2673
3223/* timer4 */ 2674/* timer4 */
3224static struct omap_hwmod_irq_info omap44xx_timer4_irqs[] = {
3225 { .irq = 40 + OMAP44XX_IRQ_GIC_START },
3226 { .irq = -1 }
3227};
3228
3229static struct omap_hwmod omap44xx_timer4_hwmod = { 2675static struct omap_hwmod omap44xx_timer4_hwmod = {
3230 .name = "timer4", 2676 .name = "timer4",
3231 .class = &omap44xx_timer_hwmod_class, 2677 .class = &omap44xx_timer_hwmod_class,
3232 .clkdm_name = "l4_per_clkdm", 2678 .clkdm_name = "l4_per_clkdm",
3233 .mpu_irqs = omap44xx_timer4_irqs,
3234 .main_clk = "cm2_dm4_mux", 2679 .main_clk = "cm2_dm4_mux",
3235 .prcm = { 2680 .prcm = {
3236 .omap4 = { 2681 .omap4 = {
@@ -3242,16 +2687,10 @@ static struct omap_hwmod omap44xx_timer4_hwmod = {
3242}; 2687};
3243 2688
3244/* timer5 */ 2689/* timer5 */
3245static struct omap_hwmod_irq_info omap44xx_timer5_irqs[] = {
3246 { .irq = 41 + OMAP44XX_IRQ_GIC_START },
3247 { .irq = -1 }
3248};
3249
3250static struct omap_hwmod omap44xx_timer5_hwmod = { 2690static struct omap_hwmod omap44xx_timer5_hwmod = {
3251 .name = "timer5", 2691 .name = "timer5",
3252 .class = &omap44xx_timer_hwmod_class, 2692 .class = &omap44xx_timer_hwmod_class,
3253 .clkdm_name = "abe_clkdm", 2693 .clkdm_name = "abe_clkdm",
3254 .mpu_irqs = omap44xx_timer5_irqs,
3255 .main_clk = "timer5_sync_mux", 2694 .main_clk = "timer5_sync_mux",
3256 .prcm = { 2695 .prcm = {
3257 .omap4 = { 2696 .omap4 = {
@@ -3264,16 +2703,10 @@ static struct omap_hwmod omap44xx_timer5_hwmod = {
3264}; 2703};
3265 2704
3266/* timer6 */ 2705/* timer6 */
3267static struct omap_hwmod_irq_info omap44xx_timer6_irqs[] = {
3268 { .irq = 42 + OMAP44XX_IRQ_GIC_START },
3269 { .irq = -1 }
3270};
3271
3272static struct omap_hwmod omap44xx_timer6_hwmod = { 2706static struct omap_hwmod omap44xx_timer6_hwmod = {
3273 .name = "timer6", 2707 .name = "timer6",
3274 .class = &omap44xx_timer_hwmod_class, 2708 .class = &omap44xx_timer_hwmod_class,
3275 .clkdm_name = "abe_clkdm", 2709 .clkdm_name = "abe_clkdm",
3276 .mpu_irqs = omap44xx_timer6_irqs,
3277 .main_clk = "timer6_sync_mux", 2710 .main_clk = "timer6_sync_mux",
3278 .prcm = { 2711 .prcm = {
3279 .omap4 = { 2712 .omap4 = {
@@ -3286,16 +2719,10 @@ static struct omap_hwmod omap44xx_timer6_hwmod = {
3286}; 2719};
3287 2720
3288/* timer7 */ 2721/* timer7 */
3289static struct omap_hwmod_irq_info omap44xx_timer7_irqs[] = {
3290 { .irq = 43 + OMAP44XX_IRQ_GIC_START },
3291 { .irq = -1 }
3292};
3293
3294static struct omap_hwmod omap44xx_timer7_hwmod = { 2722static struct omap_hwmod omap44xx_timer7_hwmod = {
3295 .name = "timer7", 2723 .name = "timer7",
3296 .class = &omap44xx_timer_hwmod_class, 2724 .class = &omap44xx_timer_hwmod_class,
3297 .clkdm_name = "abe_clkdm", 2725 .clkdm_name = "abe_clkdm",
3298 .mpu_irqs = omap44xx_timer7_irqs,
3299 .main_clk = "timer7_sync_mux", 2726 .main_clk = "timer7_sync_mux",
3300 .prcm = { 2727 .prcm = {
3301 .omap4 = { 2728 .omap4 = {
@@ -3308,16 +2735,10 @@ static struct omap_hwmod omap44xx_timer7_hwmod = {
3308}; 2735};
3309 2736
3310/* timer8 */ 2737/* timer8 */
3311static struct omap_hwmod_irq_info omap44xx_timer8_irqs[] = {
3312 { .irq = 44 + OMAP44XX_IRQ_GIC_START },
3313 { .irq = -1 }
3314};
3315
3316static struct omap_hwmod omap44xx_timer8_hwmod = { 2738static struct omap_hwmod omap44xx_timer8_hwmod = {
3317 .name = "timer8", 2739 .name = "timer8",
3318 .class = &omap44xx_timer_hwmod_class, 2740 .class = &omap44xx_timer_hwmod_class,
3319 .clkdm_name = "abe_clkdm", 2741 .clkdm_name = "abe_clkdm",
3320 .mpu_irqs = omap44xx_timer8_irqs,
3321 .main_clk = "timer8_sync_mux", 2742 .main_clk = "timer8_sync_mux",
3322 .prcm = { 2743 .prcm = {
3323 .omap4 = { 2744 .omap4 = {
@@ -3330,16 +2751,10 @@ static struct omap_hwmod omap44xx_timer8_hwmod = {
3330}; 2751};
3331 2752
3332/* timer9 */ 2753/* timer9 */
3333static struct omap_hwmod_irq_info omap44xx_timer9_irqs[] = {
3334 { .irq = 45 + OMAP44XX_IRQ_GIC_START },
3335 { .irq = -1 }
3336};
3337
3338static struct omap_hwmod omap44xx_timer9_hwmod = { 2754static struct omap_hwmod omap44xx_timer9_hwmod = {
3339 .name = "timer9", 2755 .name = "timer9",
3340 .class = &omap44xx_timer_hwmod_class, 2756 .class = &omap44xx_timer_hwmod_class,
3341 .clkdm_name = "l4_per_clkdm", 2757 .clkdm_name = "l4_per_clkdm",
3342 .mpu_irqs = omap44xx_timer9_irqs,
3343 .main_clk = "cm2_dm9_mux", 2758 .main_clk = "cm2_dm9_mux",
3344 .prcm = { 2759 .prcm = {
3345 .omap4 = { 2760 .omap4 = {
@@ -3352,17 +2767,11 @@ static struct omap_hwmod omap44xx_timer9_hwmod = {
3352}; 2767};
3353 2768
3354/* timer10 */ 2769/* timer10 */
3355static struct omap_hwmod_irq_info omap44xx_timer10_irqs[] = {
3356 { .irq = 46 + OMAP44XX_IRQ_GIC_START },
3357 { .irq = -1 }
3358};
3359
3360static struct omap_hwmod omap44xx_timer10_hwmod = { 2770static struct omap_hwmod omap44xx_timer10_hwmod = {
3361 .name = "timer10", 2771 .name = "timer10",
3362 .class = &omap44xx_timer_1ms_hwmod_class, 2772 .class = &omap44xx_timer_1ms_hwmod_class,
3363 .clkdm_name = "l4_per_clkdm", 2773 .clkdm_name = "l4_per_clkdm",
3364 .flags = HWMOD_SET_DEFAULT_CLOCKACT, 2774 .flags = HWMOD_SET_DEFAULT_CLOCKACT,
3365 .mpu_irqs = omap44xx_timer10_irqs,
3366 .main_clk = "cm2_dm10_mux", 2775 .main_clk = "cm2_dm10_mux",
3367 .prcm = { 2776 .prcm = {
3368 .omap4 = { 2777 .omap4 = {
@@ -3375,16 +2784,10 @@ static struct omap_hwmod omap44xx_timer10_hwmod = {
3375}; 2784};
3376 2785
3377/* timer11 */ 2786/* timer11 */
3378static struct omap_hwmod_irq_info omap44xx_timer11_irqs[] = {
3379 { .irq = 47 + OMAP44XX_IRQ_GIC_START },
3380 { .irq = -1 }
3381};
3382
3383static struct omap_hwmod omap44xx_timer11_hwmod = { 2787static struct omap_hwmod omap44xx_timer11_hwmod = {
3384 .name = "timer11", 2788 .name = "timer11",
3385 .class = &omap44xx_timer_hwmod_class, 2789 .class = &omap44xx_timer_hwmod_class,
3386 .clkdm_name = "l4_per_clkdm", 2790 .clkdm_name = "l4_per_clkdm",
3387 .mpu_irqs = omap44xx_timer11_irqs,
3388 .main_clk = "cm2_dm11_mux", 2791 .main_clk = "cm2_dm11_mux",
3389 .prcm = { 2792 .prcm = {
3390 .omap4 = { 2793 .omap4 = {
@@ -3419,24 +2822,11 @@ static struct omap_hwmod_class omap44xx_uart_hwmod_class = {
3419}; 2822};
3420 2823
3421/* uart1 */ 2824/* uart1 */
3422static struct omap_hwmod_irq_info omap44xx_uart1_irqs[] = {
3423 { .irq = 72 + OMAP44XX_IRQ_GIC_START },
3424 { .irq = -1 }
3425};
3426
3427static struct omap_hwmod_dma_info omap44xx_uart1_sdma_reqs[] = {
3428 { .name = "tx", .dma_req = 48 + OMAP44XX_DMA_REQ_START },
3429 { .name = "rx", .dma_req = 49 + OMAP44XX_DMA_REQ_START },
3430 { .dma_req = -1 }
3431};
3432
3433static struct omap_hwmod omap44xx_uart1_hwmod = { 2825static struct omap_hwmod omap44xx_uart1_hwmod = {
3434 .name = "uart1", 2826 .name = "uart1",
3435 .class = &omap44xx_uart_hwmod_class, 2827 .class = &omap44xx_uart_hwmod_class,
3436 .clkdm_name = "l4_per_clkdm", 2828 .clkdm_name = "l4_per_clkdm",
3437 .flags = HWMOD_SWSUP_SIDLE_ACT, 2829 .flags = HWMOD_SWSUP_SIDLE_ACT,
3438 .mpu_irqs = omap44xx_uart1_irqs,
3439 .sdma_reqs = omap44xx_uart1_sdma_reqs,
3440 .main_clk = "func_48m_fclk", 2830 .main_clk = "func_48m_fclk",
3441 .prcm = { 2831 .prcm = {
3442 .omap4 = { 2832 .omap4 = {
@@ -3448,24 +2838,11 @@ static struct omap_hwmod omap44xx_uart1_hwmod = {
3448}; 2838};
3449 2839
3450/* uart2 */ 2840/* uart2 */
3451static struct omap_hwmod_irq_info omap44xx_uart2_irqs[] = {
3452 { .irq = 73 + OMAP44XX_IRQ_GIC_START },
3453 { .irq = -1 }
3454};
3455
3456static struct omap_hwmod_dma_info omap44xx_uart2_sdma_reqs[] = {
3457 { .name = "tx", .dma_req = 50 + OMAP44XX_DMA_REQ_START },
3458 { .name = "rx", .dma_req = 51 + OMAP44XX_DMA_REQ_START },
3459 { .dma_req = -1 }
3460};
3461
3462static struct omap_hwmod omap44xx_uart2_hwmod = { 2841static struct omap_hwmod omap44xx_uart2_hwmod = {
3463 .name = "uart2", 2842 .name = "uart2",
3464 .class = &omap44xx_uart_hwmod_class, 2843 .class = &omap44xx_uart_hwmod_class,
3465 .clkdm_name = "l4_per_clkdm", 2844 .clkdm_name = "l4_per_clkdm",
3466 .flags = HWMOD_SWSUP_SIDLE_ACT, 2845 .flags = HWMOD_SWSUP_SIDLE_ACT,
3467 .mpu_irqs = omap44xx_uart2_irqs,
3468 .sdma_reqs = omap44xx_uart2_sdma_reqs,
3469 .main_clk = "func_48m_fclk", 2846 .main_clk = "func_48m_fclk",
3470 .prcm = { 2847 .prcm = {
3471 .omap4 = { 2848 .omap4 = {
@@ -3477,25 +2854,11 @@ static struct omap_hwmod omap44xx_uart2_hwmod = {
3477}; 2854};
3478 2855
3479/* uart3 */ 2856/* uart3 */
3480static struct omap_hwmod_irq_info omap44xx_uart3_irqs[] = {
3481 { .irq = 74 + OMAP44XX_IRQ_GIC_START },
3482 { .irq = -1 }
3483};
3484
3485static struct omap_hwmod_dma_info omap44xx_uart3_sdma_reqs[] = {
3486 { .name = "tx", .dma_req = 52 + OMAP44XX_DMA_REQ_START },
3487 { .name = "rx", .dma_req = 53 + OMAP44XX_DMA_REQ_START },
3488 { .dma_req = -1 }
3489};
3490
3491static struct omap_hwmod omap44xx_uart3_hwmod = { 2857static struct omap_hwmod omap44xx_uart3_hwmod = {
3492 .name = "uart3", 2858 .name = "uart3",
3493 .class = &omap44xx_uart_hwmod_class, 2859 .class = &omap44xx_uart_hwmod_class,
3494 .clkdm_name = "l4_per_clkdm", 2860 .clkdm_name = "l4_per_clkdm",
3495 .flags = HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET | 2861 .flags = DEBUG_OMAP4UART3_FLAGS | HWMOD_SWSUP_SIDLE_ACT,
3496 HWMOD_SWSUP_SIDLE_ACT,
3497 .mpu_irqs = omap44xx_uart3_irqs,
3498 .sdma_reqs = omap44xx_uart3_sdma_reqs,
3499 .main_clk = "func_48m_fclk", 2862 .main_clk = "func_48m_fclk",
3500 .prcm = { 2863 .prcm = {
3501 .omap4 = { 2864 .omap4 = {
@@ -3507,24 +2870,11 @@ static struct omap_hwmod omap44xx_uart3_hwmod = {
3507}; 2870};
3508 2871
3509/* uart4 */ 2872/* uart4 */
3510static struct omap_hwmod_irq_info omap44xx_uart4_irqs[] = {
3511 { .irq = 70 + OMAP44XX_IRQ_GIC_START },
3512 { .irq = -1 }
3513};
3514
3515static struct omap_hwmod_dma_info omap44xx_uart4_sdma_reqs[] = {
3516 { .name = "tx", .dma_req = 54 + OMAP44XX_DMA_REQ_START },
3517 { .name = "rx", .dma_req = 55 + OMAP44XX_DMA_REQ_START },
3518 { .dma_req = -1 }
3519};
3520
3521static struct omap_hwmod omap44xx_uart4_hwmod = { 2873static struct omap_hwmod omap44xx_uart4_hwmod = {
3522 .name = "uart4", 2874 .name = "uart4",
3523 .class = &omap44xx_uart_hwmod_class, 2875 .class = &omap44xx_uart_hwmod_class,
3524 .clkdm_name = "l4_per_clkdm", 2876 .clkdm_name = "l4_per_clkdm",
3525 .flags = HWMOD_SWSUP_SIDLE_ACT, 2877 .flags = DEBUG_OMAP4UART4_FLAGS | HWMOD_SWSUP_SIDLE_ACT,
3526 .mpu_irqs = omap44xx_uart4_irqs,
3527 .sdma_reqs = omap44xx_uart4_sdma_reqs,
3528 .main_clk = "func_48m_fclk", 2878 .main_clk = "func_48m_fclk",
3529 .prcm = { 2879 .prcm = {
3530 .omap4 = { 2880 .omap4 = {
@@ -3563,17 +2913,10 @@ static struct omap_hwmod_class omap44xx_usb_host_fs_hwmod_class = {
3563}; 2913};
3564 2914
3565/* usb_host_fs */ 2915/* usb_host_fs */
3566static struct omap_hwmod_irq_info omap44xx_usb_host_fs_irqs[] = {
3567 { .name = "std", .irq = 89 + OMAP44XX_IRQ_GIC_START },
3568 { .name = "smi", .irq = 90 + OMAP44XX_IRQ_GIC_START },
3569 { .irq = -1 }
3570};
3571
3572static struct omap_hwmod omap44xx_usb_host_fs_hwmod = { 2916static struct omap_hwmod omap44xx_usb_host_fs_hwmod = {
3573 .name = "usb_host_fs", 2917 .name = "usb_host_fs",
3574 .class = &omap44xx_usb_host_fs_hwmod_class, 2918 .class = &omap44xx_usb_host_fs_hwmod_class,
3575 .clkdm_name = "l3_init_clkdm", 2919 .clkdm_name = "l3_init_clkdm",
3576 .mpu_irqs = omap44xx_usb_host_fs_irqs,
3577 .main_clk = "usb_host_fs_fck", 2920 .main_clk = "usb_host_fs_fck",
3578 .prcm = { 2921 .prcm = {
3579 .omap4 = { 2922 .omap4 = {
@@ -3607,12 +2950,6 @@ static struct omap_hwmod_class omap44xx_usb_host_hs_hwmod_class = {
3607}; 2950};
3608 2951
3609/* usb_host_hs */ 2952/* usb_host_hs */
3610static struct omap_hwmod_irq_info omap44xx_usb_host_hs_irqs[] = {
3611 { .name = "ohci-irq", .irq = 76 + OMAP44XX_IRQ_GIC_START },
3612 { .name = "ehci-irq", .irq = 77 + OMAP44XX_IRQ_GIC_START },
3613 { .irq = -1 }
3614};
3615
3616static struct omap_hwmod omap44xx_usb_host_hs_hwmod = { 2953static struct omap_hwmod omap44xx_usb_host_hs_hwmod = {
3617 .name = "usb_host_hs", 2954 .name = "usb_host_hs",
3618 .class = &omap44xx_usb_host_hs_hwmod_class, 2955 .class = &omap44xx_usb_host_hs_hwmod_class,
@@ -3625,7 +2962,6 @@ static struct omap_hwmod omap44xx_usb_host_hs_hwmod = {
3625 .modulemode = MODULEMODE_SWCTRL, 2962 .modulemode = MODULEMODE_SWCTRL,
3626 }, 2963 },
3627 }, 2964 },
3628 .mpu_irqs = omap44xx_usb_host_hs_irqs,
3629 2965
3630 /* 2966 /*
3631 * Errata: USBHOST Configured In Smart-Idle Can Lead To a Deadlock 2967 * Errata: USBHOST Configured In Smart-Idle Can Lead To a Deadlock
@@ -3700,12 +3036,6 @@ static struct omap_hwmod_class omap44xx_usb_otg_hs_hwmod_class = {
3700}; 3036};
3701 3037
3702/* usb_otg_hs */ 3038/* usb_otg_hs */
3703static struct omap_hwmod_irq_info omap44xx_usb_otg_hs_irqs[] = {
3704 { .name = "mc", .irq = 92 + OMAP44XX_IRQ_GIC_START },
3705 { .name = "dma", .irq = 93 + OMAP44XX_IRQ_GIC_START },
3706 { .irq = -1 }
3707};
3708
3709static struct omap_hwmod_opt_clk usb_otg_hs_opt_clks[] = { 3039static struct omap_hwmod_opt_clk usb_otg_hs_opt_clks[] = {
3710 { .role = "xclk", .clk = "usb_otg_hs_xclk" }, 3040 { .role = "xclk", .clk = "usb_otg_hs_xclk" },
3711}; 3041};
@@ -3715,7 +3045,6 @@ static struct omap_hwmod omap44xx_usb_otg_hs_hwmod = {
3715 .class = &omap44xx_usb_otg_hs_hwmod_class, 3045 .class = &omap44xx_usb_otg_hs_hwmod_class,
3716 .clkdm_name = "l3_init_clkdm", 3046 .clkdm_name = "l3_init_clkdm",
3717 .flags = HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY, 3047 .flags = HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY,
3718 .mpu_irqs = omap44xx_usb_otg_hs_irqs,
3719 .main_clk = "usb_otg_hs_ick", 3048 .main_clk = "usb_otg_hs_ick",
3720 .prcm = { 3049 .prcm = {
3721 .omap4 = { 3050 .omap4 = {
@@ -3749,16 +3078,10 @@ static struct omap_hwmod_class omap44xx_usb_tll_hs_hwmod_class = {
3749 .sysc = &omap44xx_usb_tll_hs_sysc, 3078 .sysc = &omap44xx_usb_tll_hs_sysc,
3750}; 3079};
3751 3080
3752static struct omap_hwmod_irq_info omap44xx_usb_tll_hs_irqs[] = {
3753 { .name = "tll-irq", .irq = 78 + OMAP44XX_IRQ_GIC_START },
3754 { .irq = -1 }
3755};
3756
3757static struct omap_hwmod omap44xx_usb_tll_hs_hwmod = { 3081static struct omap_hwmod omap44xx_usb_tll_hs_hwmod = {
3758 .name = "usb_tll_hs", 3082 .name = "usb_tll_hs",
3759 .class = &omap44xx_usb_tll_hs_hwmod_class, 3083 .class = &omap44xx_usb_tll_hs_hwmod_class,
3760 .clkdm_name = "l3_init_clkdm", 3084 .clkdm_name = "l3_init_clkdm",
3761 .mpu_irqs = omap44xx_usb_tll_hs_irqs,
3762 .main_clk = "usb_tll_hs_ick", 3085 .main_clk = "usb_tll_hs_ick",
3763 .prcm = { 3086 .prcm = {
3764 .omap4 = { 3087 .omap4 = {
@@ -3794,16 +3117,10 @@ static struct omap_hwmod_class omap44xx_wd_timer_hwmod_class = {
3794}; 3117};
3795 3118
3796/* wd_timer2 */ 3119/* wd_timer2 */
3797static struct omap_hwmod_irq_info omap44xx_wd_timer2_irqs[] = {
3798 { .irq = 80 + OMAP44XX_IRQ_GIC_START },
3799 { .irq = -1 }
3800};
3801
3802static struct omap_hwmod omap44xx_wd_timer2_hwmod = { 3120static struct omap_hwmod omap44xx_wd_timer2_hwmod = {
3803 .name = "wd_timer2", 3121 .name = "wd_timer2",
3804 .class = &omap44xx_wd_timer_hwmod_class, 3122 .class = &omap44xx_wd_timer_hwmod_class,
3805 .clkdm_name = "l4_wkup_clkdm", 3123 .clkdm_name = "l4_wkup_clkdm",
3806 .mpu_irqs = omap44xx_wd_timer2_irqs,
3807 .main_clk = "sys_32k_ck", 3124 .main_clk = "sys_32k_ck",
3808 .prcm = { 3125 .prcm = {
3809 .omap4 = { 3126 .omap4 = {
@@ -3815,16 +3132,10 @@ static struct omap_hwmod omap44xx_wd_timer2_hwmod = {
3815}; 3132};
3816 3133
3817/* wd_timer3 */ 3134/* wd_timer3 */
3818static struct omap_hwmod_irq_info omap44xx_wd_timer3_irqs[] = {
3819 { .irq = 36 + OMAP44XX_IRQ_GIC_START },
3820 { .irq = -1 }
3821};
3822
3823static struct omap_hwmod omap44xx_wd_timer3_hwmod = { 3135static struct omap_hwmod omap44xx_wd_timer3_hwmod = {
3824 .name = "wd_timer3", 3136 .name = "wd_timer3",
3825 .class = &omap44xx_wd_timer_hwmod_class, 3137 .class = &omap44xx_wd_timer_hwmod_class,
3826 .clkdm_name = "abe_clkdm", 3138 .clkdm_name = "abe_clkdm",
3827 .mpu_irqs = omap44xx_wd_timer3_irqs,
3828 .main_clk = "sys_32k_ck", 3139 .main_clk = "sys_32k_ck",
3829 .prcm = { 3140 .prcm = {
3830 .omap4 = { 3141 .omap4 = {
@@ -3840,32 +3151,6 @@ static struct omap_hwmod omap44xx_wd_timer3_hwmod = {
3840 * interfaces 3151 * interfaces
3841 */ 3152 */
3842 3153
3843static struct omap_hwmod_addr_space omap44xx_c2c_target_fw_addrs[] = {
3844 {
3845 .pa_start = 0x4a204000,
3846 .pa_end = 0x4a2040ff,
3847 .flags = ADDR_TYPE_RT
3848 },
3849 { }
3850};
3851
3852/* c2c -> c2c_target_fw */
3853static struct omap_hwmod_ocp_if omap44xx_c2c__c2c_target_fw = {
3854 .master = &omap44xx_c2c_hwmod,
3855 .slave = &omap44xx_c2c_target_fw_hwmod,
3856 .clk = "div_core_ck",
3857 .addr = omap44xx_c2c_target_fw_addrs,
3858 .user = OCP_USER_MPU,
3859};
3860
3861/* l4_cfg -> c2c_target_fw */
3862static struct omap_hwmod_ocp_if omap44xx_l4_cfg__c2c_target_fw = {
3863 .master = &omap44xx_l4_cfg_hwmod,
3864 .slave = &omap44xx_c2c_target_fw_hwmod,
3865 .clk = "l4_div_ck",
3866 .user = OCP_USER_MPU | OCP_USER_SDMA,
3867};
3868
3869/* l3_main_1 -> dmm */ 3154/* l3_main_1 -> dmm */
3870static struct omap_hwmod_ocp_if omap44xx_l3_main_1__dmm = { 3155static struct omap_hwmod_ocp_if omap44xx_l3_main_1__dmm = {
3871 .master = &omap44xx_l3_main_1_hwmod, 3156 .master = &omap44xx_l3_main_1_hwmod,
@@ -3874,55 +3159,11 @@ static struct omap_hwmod_ocp_if omap44xx_l3_main_1__dmm = {
3874 .user = OCP_USER_SDMA, 3159 .user = OCP_USER_SDMA,
3875}; 3160};
3876 3161
3877static struct omap_hwmod_addr_space omap44xx_dmm_addrs[] = {
3878 {
3879 .pa_start = 0x4e000000,
3880 .pa_end = 0x4e0007ff,
3881 .flags = ADDR_TYPE_RT
3882 },
3883 { }
3884};
3885
3886/* mpu -> dmm */ 3162/* mpu -> dmm */
3887static struct omap_hwmod_ocp_if omap44xx_mpu__dmm = { 3163static struct omap_hwmod_ocp_if omap44xx_mpu__dmm = {
3888 .master = &omap44xx_mpu_hwmod, 3164 .master = &omap44xx_mpu_hwmod,
3889 .slave = &omap44xx_dmm_hwmod, 3165 .slave = &omap44xx_dmm_hwmod,
3890 .clk = "l3_div_ck", 3166 .clk = "l3_div_ck",
3891 .addr = omap44xx_dmm_addrs,
3892 .user = OCP_USER_MPU,
3893};
3894
3895/* c2c -> emif_fw */
3896static struct omap_hwmod_ocp_if omap44xx_c2c__emif_fw = {
3897 .master = &omap44xx_c2c_hwmod,
3898 .slave = &omap44xx_emif_fw_hwmod,
3899 .clk = "div_core_ck",
3900 .user = OCP_USER_MPU | OCP_USER_SDMA,
3901};
3902
3903/* dmm -> emif_fw */
3904static struct omap_hwmod_ocp_if omap44xx_dmm__emif_fw = {
3905 .master = &omap44xx_dmm_hwmod,
3906 .slave = &omap44xx_emif_fw_hwmod,
3907 .clk = "l3_div_ck",
3908 .user = OCP_USER_MPU | OCP_USER_SDMA,
3909};
3910
3911static struct omap_hwmod_addr_space omap44xx_emif_fw_addrs[] = {
3912 {
3913 .pa_start = 0x4a20c000,
3914 .pa_end = 0x4a20c0ff,
3915 .flags = ADDR_TYPE_RT
3916 },
3917 { }
3918};
3919
3920/* l4_cfg -> emif_fw */
3921static struct omap_hwmod_ocp_if omap44xx_l4_cfg__emif_fw = {
3922 .master = &omap44xx_l4_cfg_hwmod,
3923 .slave = &omap44xx_emif_fw_hwmod,
3924 .clk = "l4_div_ck",
3925 .addr = omap44xx_emif_fw_addrs,
3926 .user = OCP_USER_MPU, 3167 .user = OCP_USER_MPU,
3927}; 3168};
3928 3169
@@ -3998,32 +3239,14 @@ static struct omap_hwmod_ocp_if omap44xx_mmc2__l3_main_1 = {
3998 .user = OCP_USER_MPU | OCP_USER_SDMA, 3239 .user = OCP_USER_MPU | OCP_USER_SDMA,
3999}; 3240};
4000 3241
4001static struct omap_hwmod_addr_space omap44xx_l3_main_1_addrs[] = {
4002 {
4003 .pa_start = 0x44000000,
4004 .pa_end = 0x44000fff,
4005 .flags = ADDR_TYPE_RT
4006 },
4007 { }
4008};
4009
4010/* mpu -> l3_main_1 */ 3242/* mpu -> l3_main_1 */
4011static struct omap_hwmod_ocp_if omap44xx_mpu__l3_main_1 = { 3243static struct omap_hwmod_ocp_if omap44xx_mpu__l3_main_1 = {
4012 .master = &omap44xx_mpu_hwmod, 3244 .master = &omap44xx_mpu_hwmod,
4013 .slave = &omap44xx_l3_main_1_hwmod, 3245 .slave = &omap44xx_l3_main_1_hwmod,
4014 .clk = "l3_div_ck", 3246 .clk = "l3_div_ck",
4015 .addr = omap44xx_l3_main_1_addrs,
4016 .user = OCP_USER_MPU, 3247 .user = OCP_USER_MPU,
4017}; 3248};
4018 3249
4019/* c2c_target_fw -> l3_main_2 */
4020static struct omap_hwmod_ocp_if omap44xx_c2c_target_fw__l3_main_2 = {
4021 .master = &omap44xx_c2c_target_fw_hwmod,
4022 .slave = &omap44xx_l3_main_2_hwmod,
4023 .clk = "l3_div_ck",
4024 .user = OCP_USER_MPU | OCP_USER_SDMA,
4025};
4026
4027/* debugss -> l3_main_2 */ 3250/* debugss -> l3_main_2 */
4028static struct omap_hwmod_ocp_if omap44xx_debugss__l3_main_2 = { 3251static struct omap_hwmod_ocp_if omap44xx_debugss__l3_main_2 = {
4029 .master = &omap44xx_debugss_hwmod, 3252 .master = &omap44xx_debugss_hwmod,
@@ -4088,21 +3311,11 @@ static struct omap_hwmod_ocp_if omap44xx_iva__l3_main_2 = {
4088 .user = OCP_USER_MPU | OCP_USER_SDMA, 3311 .user = OCP_USER_MPU | OCP_USER_SDMA,
4089}; 3312};
4090 3313
4091static struct omap_hwmod_addr_space omap44xx_l3_main_2_addrs[] = {
4092 {
4093 .pa_start = 0x44800000,
4094 .pa_end = 0x44801fff,
4095 .flags = ADDR_TYPE_RT
4096 },
4097 { }
4098};
4099
4100/* l3_main_1 -> l3_main_2 */ 3314/* l3_main_1 -> l3_main_2 */
4101static struct omap_hwmod_ocp_if omap44xx_l3_main_1__l3_main_2 = { 3315static struct omap_hwmod_ocp_if omap44xx_l3_main_1__l3_main_2 = {
4102 .master = &omap44xx_l3_main_1_hwmod, 3316 .master = &omap44xx_l3_main_1_hwmod,
4103 .slave = &omap44xx_l3_main_2_hwmod, 3317 .slave = &omap44xx_l3_main_2_hwmod,
4104 .clk = "l3_div_ck", 3318 .clk = "l3_div_ck",
4105 .addr = omap44xx_l3_main_2_addrs,
4106 .user = OCP_USER_MPU, 3319 .user = OCP_USER_MPU,
4107}; 3320};
4108 3321
@@ -4138,21 +3351,11 @@ static struct omap_hwmod_ocp_if omap44xx_usb_otg_hs__l3_main_2 = {
4138 .user = OCP_USER_MPU | OCP_USER_SDMA, 3351 .user = OCP_USER_MPU | OCP_USER_SDMA,
4139}; 3352};
4140 3353
4141static struct omap_hwmod_addr_space omap44xx_l3_main_3_addrs[] = {
4142 {
4143 .pa_start = 0x45000000,
4144 .pa_end = 0x45000fff,
4145 .flags = ADDR_TYPE_RT
4146 },
4147 { }
4148};
4149
4150/* l3_main_1 -> l3_main_3 */ 3354/* l3_main_1 -> l3_main_3 */
4151static struct omap_hwmod_ocp_if omap44xx_l3_main_1__l3_main_3 = { 3355static struct omap_hwmod_ocp_if omap44xx_l3_main_1__l3_main_3 = {
4152 .master = &omap44xx_l3_main_1_hwmod, 3356 .master = &omap44xx_l3_main_1_hwmod,
4153 .slave = &omap44xx_l3_main_3_hwmod, 3357 .slave = &omap44xx_l3_main_3_hwmod,
4154 .clk = "l3_div_ck", 3358 .clk = "l3_div_ck",
4155 .addr = omap44xx_l3_main_3_addrs,
4156 .user = OCP_USER_MPU, 3359 .user = OCP_USER_MPU,
4157}; 3360};
4158 3361
@@ -4236,21 +3439,11 @@ static struct omap_hwmod_ocp_if omap44xx_mpu__mpu_private = {
4236 .user = OCP_USER_MPU | OCP_USER_SDMA, 3439 .user = OCP_USER_MPU | OCP_USER_SDMA,
4237}; 3440};
4238 3441
4239static struct omap_hwmod_addr_space omap44xx_ocp_wp_noc_addrs[] = {
4240 {
4241 .pa_start = 0x4a102000,
4242 .pa_end = 0x4a10207f,
4243 .flags = ADDR_TYPE_RT
4244 },
4245 { }
4246};
4247
4248/* l4_cfg -> ocp_wp_noc */ 3442/* l4_cfg -> ocp_wp_noc */
4249static struct omap_hwmod_ocp_if omap44xx_l4_cfg__ocp_wp_noc = { 3443static struct omap_hwmod_ocp_if omap44xx_l4_cfg__ocp_wp_noc = {
4250 .master = &omap44xx_l4_cfg_hwmod, 3444 .master = &omap44xx_l4_cfg_hwmod,
4251 .slave = &omap44xx_ocp_wp_noc_hwmod, 3445 .slave = &omap44xx_ocp_wp_noc_hwmod,
4252 .clk = "l4_div_ck", 3446 .clk = "l4_div_ck",
4253 .addr = omap44xx_ocp_wp_noc_addrs,
4254 .user = OCP_USER_MPU | OCP_USER_SDMA, 3447 .user = OCP_USER_MPU | OCP_USER_SDMA,
4255}; 3448};
4256 3449
@@ -4340,21 +3533,11 @@ static struct omap_hwmod_ocp_if omap44xx_l3_main_2__c2c = {
4340 .user = OCP_USER_MPU | OCP_USER_SDMA, 3533 .user = OCP_USER_MPU | OCP_USER_SDMA,
4341}; 3534};
4342 3535
4343static struct omap_hwmod_addr_space omap44xx_counter_32k_addrs[] = {
4344 {
4345 .pa_start = 0x4a304000,
4346 .pa_end = 0x4a30401f,
4347 .flags = ADDR_TYPE_RT
4348 },
4349 { }
4350};
4351
4352/* l4_wkup -> counter_32k */ 3536/* l4_wkup -> counter_32k */
4353static struct omap_hwmod_ocp_if omap44xx_l4_wkup__counter_32k = { 3537static struct omap_hwmod_ocp_if omap44xx_l4_wkup__counter_32k = {
4354 .master = &omap44xx_l4_wkup_hwmod, 3538 .master = &omap44xx_l4_wkup_hwmod,
4355 .slave = &omap44xx_counter_32k_hwmod, 3539 .slave = &omap44xx_counter_32k_hwmod,
4356 .clk = "l4_wkup_clk_mux_ck", 3540 .clk = "l4_wkup_clk_mux_ck",
4357 .addr = omap44xx_counter_32k_addrs,
4358 .user = OCP_USER_MPU | OCP_USER_SDMA, 3541 .user = OCP_USER_MPU | OCP_USER_SDMA,
4359}; 3542};
4360 3543
@@ -4430,21 +3613,11 @@ static struct omap_hwmod_ocp_if omap44xx_l4_wkup__ctrl_module_pad_wkup = {
4430 .user = OCP_USER_MPU | OCP_USER_SDMA, 3613 .user = OCP_USER_MPU | OCP_USER_SDMA,
4431}; 3614};
4432 3615
4433static struct omap_hwmod_addr_space omap44xx_debugss_addrs[] = {
4434 {
4435 .pa_start = 0x54160000,
4436 .pa_end = 0x54167fff,
4437 .flags = ADDR_TYPE_RT
4438 },
4439 { }
4440};
4441
4442/* l3_instr -> debugss */ 3616/* l3_instr -> debugss */
4443static struct omap_hwmod_ocp_if omap44xx_l3_instr__debugss = { 3617static struct omap_hwmod_ocp_if omap44xx_l3_instr__debugss = {
4444 .master = &omap44xx_l3_instr_hwmod, 3618 .master = &omap44xx_l3_instr_hwmod,
4445 .slave = &omap44xx_debugss_hwmod, 3619 .slave = &omap44xx_debugss_hwmod,
4446 .clk = "l3_div_ck", 3620 .clk = "l3_div_ck",
4447 .addr = omap44xx_debugss_addrs,
4448 .user = OCP_USER_MPU | OCP_USER_SDMA, 3621 .user = OCP_USER_MPU | OCP_USER_SDMA,
4449}; 3622};
4450 3623
@@ -4466,41 +3639,19 @@ static struct omap_hwmod_ocp_if omap44xx_l4_cfg__dma_system = {
4466 .user = OCP_USER_MPU | OCP_USER_SDMA, 3639 .user = OCP_USER_MPU | OCP_USER_SDMA,
4467}; 3640};
4468 3641
4469static struct omap_hwmod_addr_space omap44xx_dmic_addrs[] = {
4470 {
4471 .name = "mpu",
4472 .pa_start = 0x4012e000,
4473 .pa_end = 0x4012e07f,
4474 .flags = ADDR_TYPE_RT
4475 },
4476 { }
4477};
4478
4479/* l4_abe -> dmic */ 3642/* l4_abe -> dmic */
4480static struct omap_hwmod_ocp_if omap44xx_l4_abe__dmic = { 3643static struct omap_hwmod_ocp_if omap44xx_l4_abe__dmic = {
4481 .master = &omap44xx_l4_abe_hwmod, 3644 .master = &omap44xx_l4_abe_hwmod,
4482 .slave = &omap44xx_dmic_hwmod, 3645 .slave = &omap44xx_dmic_hwmod,
4483 .clk = "ocp_abe_iclk", 3646 .clk = "ocp_abe_iclk",
4484 .addr = omap44xx_dmic_addrs,
4485 .user = OCP_USER_MPU, 3647 .user = OCP_USER_MPU,
4486}; 3648};
4487 3649
4488static struct omap_hwmod_addr_space omap44xx_dmic_dma_addrs[] = {
4489 {
4490 .name = "dma",
4491 .pa_start = 0x4902e000,
4492 .pa_end = 0x4902e07f,
4493 .flags = ADDR_TYPE_RT
4494 },
4495 { }
4496};
4497
4498/* l4_abe -> dmic (dma) */ 3650/* l4_abe -> dmic (dma) */
4499static struct omap_hwmod_ocp_if omap44xx_l4_abe__dmic_dma = { 3651static struct omap_hwmod_ocp_if omap44xx_l4_abe__dmic_dma = {
4500 .master = &omap44xx_l4_abe_hwmod, 3652 .master = &omap44xx_l4_abe_hwmod,
4501 .slave = &omap44xx_dmic_hwmod, 3653 .slave = &omap44xx_dmic_hwmod,
4502 .clk = "ocp_abe_iclk", 3654 .clk = "ocp_abe_iclk",
4503 .addr = omap44xx_dmic_dma_addrs,
4504 .user = OCP_USER_SDMA, 3655 .user = OCP_USER_SDMA,
4505}; 3656};
4506 3657
@@ -4798,42 +3949,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_per__elm = {
4798 .user = OCP_USER_MPU | OCP_USER_SDMA, 3949 .user = OCP_USER_MPU | OCP_USER_SDMA,
4799}; 3950};
4800 3951
4801static struct omap_hwmod_addr_space omap44xx_emif1_addrs[] = {
4802 {
4803 .pa_start = 0x4c000000,
4804 .pa_end = 0x4c0000ff,
4805 .flags = ADDR_TYPE_RT
4806 },
4807 { }
4808};
4809
4810/* emif_fw -> emif1 */
4811static struct omap_hwmod_ocp_if omap44xx_emif_fw__emif1 = {
4812 .master = &omap44xx_emif_fw_hwmod,
4813 .slave = &omap44xx_emif1_hwmod,
4814 .clk = "l3_div_ck",
4815 .addr = omap44xx_emif1_addrs,
4816 .user = OCP_USER_MPU | OCP_USER_SDMA,
4817};
4818
4819static struct omap_hwmod_addr_space omap44xx_emif2_addrs[] = {
4820 {
4821 .pa_start = 0x4d000000,
4822 .pa_end = 0x4d0000ff,
4823 .flags = ADDR_TYPE_RT
4824 },
4825 { }
4826};
4827
4828/* emif_fw -> emif2 */
4829static struct omap_hwmod_ocp_if omap44xx_emif_fw__emif2 = {
4830 .master = &omap44xx_emif_fw_hwmod,
4831 .slave = &omap44xx_emif2_hwmod,
4832 .clk = "l3_div_ck",
4833 .addr = omap44xx_emif2_addrs,
4834 .user = OCP_USER_MPU | OCP_USER_SDMA,
4835};
4836
4837static struct omap_hwmod_addr_space omap44xx_fdif_addrs[] = { 3952static struct omap_hwmod_addr_space omap44xx_fdif_addrs[] = {
4838 { 3953 {
4839 .pa_start = 0x4a10a000, 3954 .pa_start = 0x4a10a000,
@@ -4852,129 +3967,59 @@ static struct omap_hwmod_ocp_if omap44xx_l4_cfg__fdif = {
4852 .user = OCP_USER_MPU | OCP_USER_SDMA, 3967 .user = OCP_USER_MPU | OCP_USER_SDMA,
4853}; 3968};
4854 3969
4855static struct omap_hwmod_addr_space omap44xx_gpio1_addrs[] = {
4856 {
4857 .pa_start = 0x4a310000,
4858 .pa_end = 0x4a3101ff,
4859 .flags = ADDR_TYPE_RT
4860 },
4861 { }
4862};
4863
4864/* l4_wkup -> gpio1 */ 3970/* l4_wkup -> gpio1 */
4865static struct omap_hwmod_ocp_if omap44xx_l4_wkup__gpio1 = { 3971static struct omap_hwmod_ocp_if omap44xx_l4_wkup__gpio1 = {
4866 .master = &omap44xx_l4_wkup_hwmod, 3972 .master = &omap44xx_l4_wkup_hwmod,
4867 .slave = &omap44xx_gpio1_hwmod, 3973 .slave = &omap44xx_gpio1_hwmod,
4868 .clk = "l4_wkup_clk_mux_ck", 3974 .clk = "l4_wkup_clk_mux_ck",
4869 .addr = omap44xx_gpio1_addrs,
4870 .user = OCP_USER_MPU | OCP_USER_SDMA, 3975 .user = OCP_USER_MPU | OCP_USER_SDMA,
4871}; 3976};
4872 3977
4873static struct omap_hwmod_addr_space omap44xx_gpio2_addrs[] = {
4874 {
4875 .pa_start = 0x48055000,
4876 .pa_end = 0x480551ff,
4877 .flags = ADDR_TYPE_RT
4878 },
4879 { }
4880};
4881
4882/* l4_per -> gpio2 */ 3978/* l4_per -> gpio2 */
4883static struct omap_hwmod_ocp_if omap44xx_l4_per__gpio2 = { 3979static struct omap_hwmod_ocp_if omap44xx_l4_per__gpio2 = {
4884 .master = &omap44xx_l4_per_hwmod, 3980 .master = &omap44xx_l4_per_hwmod,
4885 .slave = &omap44xx_gpio2_hwmod, 3981 .slave = &omap44xx_gpio2_hwmod,
4886 .clk = "l4_div_ck", 3982 .clk = "l4_div_ck",
4887 .addr = omap44xx_gpio2_addrs,
4888 .user = OCP_USER_MPU | OCP_USER_SDMA, 3983 .user = OCP_USER_MPU | OCP_USER_SDMA,
4889}; 3984};
4890 3985
4891static struct omap_hwmod_addr_space omap44xx_gpio3_addrs[] = {
4892 {
4893 .pa_start = 0x48057000,
4894 .pa_end = 0x480571ff,
4895 .flags = ADDR_TYPE_RT
4896 },
4897 { }
4898};
4899
4900/* l4_per -> gpio3 */ 3986/* l4_per -> gpio3 */
4901static struct omap_hwmod_ocp_if omap44xx_l4_per__gpio3 = { 3987static struct omap_hwmod_ocp_if omap44xx_l4_per__gpio3 = {
4902 .master = &omap44xx_l4_per_hwmod, 3988 .master = &omap44xx_l4_per_hwmod,
4903 .slave = &omap44xx_gpio3_hwmod, 3989 .slave = &omap44xx_gpio3_hwmod,
4904 .clk = "l4_div_ck", 3990 .clk = "l4_div_ck",
4905 .addr = omap44xx_gpio3_addrs,
4906 .user = OCP_USER_MPU | OCP_USER_SDMA, 3991 .user = OCP_USER_MPU | OCP_USER_SDMA,
4907}; 3992};
4908 3993
4909static struct omap_hwmod_addr_space omap44xx_gpio4_addrs[] = {
4910 {
4911 .pa_start = 0x48059000,
4912 .pa_end = 0x480591ff,
4913 .flags = ADDR_TYPE_RT
4914 },
4915 { }
4916};
4917
4918/* l4_per -> gpio4 */ 3994/* l4_per -> gpio4 */
4919static struct omap_hwmod_ocp_if omap44xx_l4_per__gpio4 = { 3995static struct omap_hwmod_ocp_if omap44xx_l4_per__gpio4 = {
4920 .master = &omap44xx_l4_per_hwmod, 3996 .master = &omap44xx_l4_per_hwmod,
4921 .slave = &omap44xx_gpio4_hwmod, 3997 .slave = &omap44xx_gpio4_hwmod,
4922 .clk = "l4_div_ck", 3998 .clk = "l4_div_ck",
4923 .addr = omap44xx_gpio4_addrs,
4924 .user = OCP_USER_MPU | OCP_USER_SDMA, 3999 .user = OCP_USER_MPU | OCP_USER_SDMA,
4925}; 4000};
4926 4001
4927static struct omap_hwmod_addr_space omap44xx_gpio5_addrs[] = {
4928 {
4929 .pa_start = 0x4805b000,
4930 .pa_end = 0x4805b1ff,
4931 .flags = ADDR_TYPE_RT
4932 },
4933 { }
4934};
4935
4936/* l4_per -> gpio5 */ 4002/* l4_per -> gpio5 */
4937static struct omap_hwmod_ocp_if omap44xx_l4_per__gpio5 = { 4003static struct omap_hwmod_ocp_if omap44xx_l4_per__gpio5 = {
4938 .master = &omap44xx_l4_per_hwmod, 4004 .master = &omap44xx_l4_per_hwmod,
4939 .slave = &omap44xx_gpio5_hwmod, 4005 .slave = &omap44xx_gpio5_hwmod,
4940 .clk = "l4_div_ck", 4006 .clk = "l4_div_ck",
4941 .addr = omap44xx_gpio5_addrs,
4942 .user = OCP_USER_MPU | OCP_USER_SDMA, 4007 .user = OCP_USER_MPU | OCP_USER_SDMA,
4943}; 4008};
4944 4009
4945static struct omap_hwmod_addr_space omap44xx_gpio6_addrs[] = {
4946 {
4947 .pa_start = 0x4805d000,
4948 .pa_end = 0x4805d1ff,
4949 .flags = ADDR_TYPE_RT
4950 },
4951 { }
4952};
4953
4954/* l4_per -> gpio6 */ 4010/* l4_per -> gpio6 */
4955static struct omap_hwmod_ocp_if omap44xx_l4_per__gpio6 = { 4011static struct omap_hwmod_ocp_if omap44xx_l4_per__gpio6 = {
4956 .master = &omap44xx_l4_per_hwmod, 4012 .master = &omap44xx_l4_per_hwmod,
4957 .slave = &omap44xx_gpio6_hwmod, 4013 .slave = &omap44xx_gpio6_hwmod,
4958 .clk = "l4_div_ck", 4014 .clk = "l4_div_ck",
4959 .addr = omap44xx_gpio6_addrs,
4960 .user = OCP_USER_MPU | OCP_USER_SDMA, 4015 .user = OCP_USER_MPU | OCP_USER_SDMA,
4961}; 4016};
4962 4017
4963static struct omap_hwmod_addr_space omap44xx_gpmc_addrs[] = {
4964 {
4965 .pa_start = 0x50000000,
4966 .pa_end = 0x500003ff,
4967 .flags = ADDR_TYPE_RT
4968 },
4969 { }
4970};
4971
4972/* l3_main_2 -> gpmc */ 4018/* l3_main_2 -> gpmc */
4973static struct omap_hwmod_ocp_if omap44xx_l3_main_2__gpmc = { 4019static struct omap_hwmod_ocp_if omap44xx_l3_main_2__gpmc = {
4974 .master = &omap44xx_l3_main_2_hwmod, 4020 .master = &omap44xx_l3_main_2_hwmod,
4975 .slave = &omap44xx_gpmc_hwmod, 4021 .slave = &omap44xx_gpmc_hwmod,
4976 .clk = "l3_div_ck", 4022 .clk = "l3_div_ck",
4977 .addr = omap44xx_gpmc_addrs,
4978 .user = OCP_USER_MPU | OCP_USER_SDMA, 4023 .user = OCP_USER_MPU | OCP_USER_SDMA,
4979}; 4024};
4980 4025
@@ -5032,75 +4077,35 @@ static struct omap_hwmod_ocp_if omap44xx_l4_cfg__hsi = {
5032 .user = OCP_USER_MPU | OCP_USER_SDMA, 4077 .user = OCP_USER_MPU | OCP_USER_SDMA,
5033}; 4078};
5034 4079
5035static struct omap_hwmod_addr_space omap44xx_i2c1_addrs[] = {
5036 {
5037 .pa_start = 0x48070000,
5038 .pa_end = 0x480700ff,
5039 .flags = ADDR_TYPE_RT
5040 },
5041 { }
5042};
5043
5044/* l4_per -> i2c1 */ 4080/* l4_per -> i2c1 */
5045static struct omap_hwmod_ocp_if omap44xx_l4_per__i2c1 = { 4081static struct omap_hwmod_ocp_if omap44xx_l4_per__i2c1 = {
5046 .master = &omap44xx_l4_per_hwmod, 4082 .master = &omap44xx_l4_per_hwmod,
5047 .slave = &omap44xx_i2c1_hwmod, 4083 .slave = &omap44xx_i2c1_hwmod,
5048 .clk = "l4_div_ck", 4084 .clk = "l4_div_ck",
5049 .addr = omap44xx_i2c1_addrs,
5050 .user = OCP_USER_MPU | OCP_USER_SDMA, 4085 .user = OCP_USER_MPU | OCP_USER_SDMA,
5051}; 4086};
5052 4087
5053static struct omap_hwmod_addr_space omap44xx_i2c2_addrs[] = {
5054 {
5055 .pa_start = 0x48072000,
5056 .pa_end = 0x480720ff,
5057 .flags = ADDR_TYPE_RT
5058 },
5059 { }
5060};
5061
5062/* l4_per -> i2c2 */ 4088/* l4_per -> i2c2 */
5063static struct omap_hwmod_ocp_if omap44xx_l4_per__i2c2 = { 4089static struct omap_hwmod_ocp_if omap44xx_l4_per__i2c2 = {
5064 .master = &omap44xx_l4_per_hwmod, 4090 .master = &omap44xx_l4_per_hwmod,
5065 .slave = &omap44xx_i2c2_hwmod, 4091 .slave = &omap44xx_i2c2_hwmod,
5066 .clk = "l4_div_ck", 4092 .clk = "l4_div_ck",
5067 .addr = omap44xx_i2c2_addrs,
5068 .user = OCP_USER_MPU | OCP_USER_SDMA, 4093 .user = OCP_USER_MPU | OCP_USER_SDMA,
5069}; 4094};
5070 4095
5071static struct omap_hwmod_addr_space omap44xx_i2c3_addrs[] = {
5072 {
5073 .pa_start = 0x48060000,
5074 .pa_end = 0x480600ff,
5075 .flags = ADDR_TYPE_RT
5076 },
5077 { }
5078};
5079
5080/* l4_per -> i2c3 */ 4096/* l4_per -> i2c3 */
5081static struct omap_hwmod_ocp_if omap44xx_l4_per__i2c3 = { 4097static struct omap_hwmod_ocp_if omap44xx_l4_per__i2c3 = {
5082 .master = &omap44xx_l4_per_hwmod, 4098 .master = &omap44xx_l4_per_hwmod,
5083 .slave = &omap44xx_i2c3_hwmod, 4099 .slave = &omap44xx_i2c3_hwmod,
5084 .clk = "l4_div_ck", 4100 .clk = "l4_div_ck",
5085 .addr = omap44xx_i2c3_addrs,
5086 .user = OCP_USER_MPU | OCP_USER_SDMA, 4101 .user = OCP_USER_MPU | OCP_USER_SDMA,
5087}; 4102};
5088 4103
5089static struct omap_hwmod_addr_space omap44xx_i2c4_addrs[] = {
5090 {
5091 .pa_start = 0x48350000,
5092 .pa_end = 0x483500ff,
5093 .flags = ADDR_TYPE_RT
5094 },
5095 { }
5096};
5097
5098/* l4_per -> i2c4 */ 4104/* l4_per -> i2c4 */
5099static struct omap_hwmod_ocp_if omap44xx_l4_per__i2c4 = { 4105static struct omap_hwmod_ocp_if omap44xx_l4_per__i2c4 = {
5100 .master = &omap44xx_l4_per_hwmod, 4106 .master = &omap44xx_l4_per_hwmod,
5101 .slave = &omap44xx_i2c4_hwmod, 4107 .slave = &omap44xx_i2c4_hwmod,
5102 .clk = "l4_div_ck", 4108 .clk = "l4_div_ck",
5103 .addr = omap44xx_i2c4_addrs,
5104 .user = OCP_USER_MPU | OCP_USER_SDMA, 4109 .user = OCP_USER_MPU | OCP_USER_SDMA,
5105}; 4110};
5106 4111
@@ -5138,39 +4143,19 @@ static struct omap_hwmod_ocp_if __maybe_unused omap44xx_iva__sl2if = {
5138 .user = OCP_USER_IVA, 4143 .user = OCP_USER_IVA,
5139}; 4144};
5140 4145
5141static struct omap_hwmod_addr_space omap44xx_iva_addrs[] = {
5142 {
5143 .pa_start = 0x5a000000,
5144 .pa_end = 0x5a07ffff,
5145 .flags = ADDR_TYPE_RT
5146 },
5147 { }
5148};
5149
5150/* l3_main_2 -> iva */ 4146/* l3_main_2 -> iva */
5151static struct omap_hwmod_ocp_if omap44xx_l3_main_2__iva = { 4147static struct omap_hwmod_ocp_if omap44xx_l3_main_2__iva = {
5152 .master = &omap44xx_l3_main_2_hwmod, 4148 .master = &omap44xx_l3_main_2_hwmod,
5153 .slave = &omap44xx_iva_hwmod, 4149 .slave = &omap44xx_iva_hwmod,
5154 .clk = "l3_div_ck", 4150 .clk = "l3_div_ck",
5155 .addr = omap44xx_iva_addrs,
5156 .user = OCP_USER_MPU, 4151 .user = OCP_USER_MPU,
5157}; 4152};
5158 4153
5159static struct omap_hwmod_addr_space omap44xx_kbd_addrs[] = {
5160 {
5161 .pa_start = 0x4a31c000,
5162 .pa_end = 0x4a31c07f,
5163 .flags = ADDR_TYPE_RT
5164 },
5165 { }
5166};
5167
5168/* l4_wkup -> kbd */ 4154/* l4_wkup -> kbd */
5169static struct omap_hwmod_ocp_if omap44xx_l4_wkup__kbd = { 4155static struct omap_hwmod_ocp_if omap44xx_l4_wkup__kbd = {
5170 .master = &omap44xx_l4_wkup_hwmod, 4156 .master = &omap44xx_l4_wkup_hwmod,
5171 .slave = &omap44xx_kbd_hwmod, 4157 .slave = &omap44xx_kbd_hwmod,
5172 .clk = "l4_wkup_clk_mux_ck", 4158 .clk = "l4_wkup_clk_mux_ck",
5173 .addr = omap44xx_kbd_addrs,
5174 .user = OCP_USER_MPU | OCP_USER_SDMA, 4159 .user = OCP_USER_MPU | OCP_USER_SDMA,
5175}; 4160};
5176 4161
@@ -5228,335 +4213,147 @@ static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcasp_dma = {
5228 .user = OCP_USER_SDMA, 4213 .user = OCP_USER_SDMA,
5229}; 4214};
5230 4215
5231static struct omap_hwmod_addr_space omap44xx_mcbsp1_addrs[] = {
5232 {
5233 .name = "mpu",
5234 .pa_start = 0x40122000,
5235 .pa_end = 0x401220ff,
5236 .flags = ADDR_TYPE_RT
5237 },
5238 { }
5239};
5240
5241/* l4_abe -> mcbsp1 */ 4216/* l4_abe -> mcbsp1 */
5242static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcbsp1 = { 4217static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcbsp1 = {
5243 .master = &omap44xx_l4_abe_hwmod, 4218 .master = &omap44xx_l4_abe_hwmod,
5244 .slave = &omap44xx_mcbsp1_hwmod, 4219 .slave = &omap44xx_mcbsp1_hwmod,
5245 .clk = "ocp_abe_iclk", 4220 .clk = "ocp_abe_iclk",
5246 .addr = omap44xx_mcbsp1_addrs,
5247 .user = OCP_USER_MPU, 4221 .user = OCP_USER_MPU,
5248}; 4222};
5249 4223
5250static struct omap_hwmod_addr_space omap44xx_mcbsp1_dma_addrs[] = {
5251 {
5252 .name = "dma",
5253 .pa_start = 0x49022000,
5254 .pa_end = 0x490220ff,
5255 .flags = ADDR_TYPE_RT
5256 },
5257 { }
5258};
5259
5260/* l4_abe -> mcbsp1 (dma) */ 4224/* l4_abe -> mcbsp1 (dma) */
5261static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcbsp1_dma = { 4225static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcbsp1_dma = {
5262 .master = &omap44xx_l4_abe_hwmod, 4226 .master = &omap44xx_l4_abe_hwmod,
5263 .slave = &omap44xx_mcbsp1_hwmod, 4227 .slave = &omap44xx_mcbsp1_hwmod,
5264 .clk = "ocp_abe_iclk", 4228 .clk = "ocp_abe_iclk",
5265 .addr = omap44xx_mcbsp1_dma_addrs,
5266 .user = OCP_USER_SDMA, 4229 .user = OCP_USER_SDMA,
5267}; 4230};
5268 4231
5269static struct omap_hwmod_addr_space omap44xx_mcbsp2_addrs[] = {
5270 {
5271 .name = "mpu",
5272 .pa_start = 0x40124000,
5273 .pa_end = 0x401240ff,
5274 .flags = ADDR_TYPE_RT
5275 },
5276 { }
5277};
5278
5279/* l4_abe -> mcbsp2 */ 4232/* l4_abe -> mcbsp2 */
5280static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcbsp2 = { 4233static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcbsp2 = {
5281 .master = &omap44xx_l4_abe_hwmod, 4234 .master = &omap44xx_l4_abe_hwmod,
5282 .slave = &omap44xx_mcbsp2_hwmod, 4235 .slave = &omap44xx_mcbsp2_hwmod,
5283 .clk = "ocp_abe_iclk", 4236 .clk = "ocp_abe_iclk",
5284 .addr = omap44xx_mcbsp2_addrs,
5285 .user = OCP_USER_MPU, 4237 .user = OCP_USER_MPU,
5286}; 4238};
5287 4239
5288static struct omap_hwmod_addr_space omap44xx_mcbsp2_dma_addrs[] = {
5289 {
5290 .name = "dma",
5291 .pa_start = 0x49024000,
5292 .pa_end = 0x490240ff,
5293 .flags = ADDR_TYPE_RT
5294 },
5295 { }
5296};
5297
5298/* l4_abe -> mcbsp2 (dma) */ 4240/* l4_abe -> mcbsp2 (dma) */
5299static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcbsp2_dma = { 4241static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcbsp2_dma = {
5300 .master = &omap44xx_l4_abe_hwmod, 4242 .master = &omap44xx_l4_abe_hwmod,
5301 .slave = &omap44xx_mcbsp2_hwmod, 4243 .slave = &omap44xx_mcbsp2_hwmod,
5302 .clk = "ocp_abe_iclk", 4244 .clk = "ocp_abe_iclk",
5303 .addr = omap44xx_mcbsp2_dma_addrs,
5304 .user = OCP_USER_SDMA, 4245 .user = OCP_USER_SDMA,
5305}; 4246};
5306 4247
5307static struct omap_hwmod_addr_space omap44xx_mcbsp3_addrs[] = {
5308 {
5309 .name = "mpu",
5310 .pa_start = 0x40126000,
5311 .pa_end = 0x401260ff,
5312 .flags = ADDR_TYPE_RT
5313 },
5314 { }
5315};
5316
5317/* l4_abe -> mcbsp3 */ 4248/* l4_abe -> mcbsp3 */
5318static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcbsp3 = { 4249static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcbsp3 = {
5319 .master = &omap44xx_l4_abe_hwmod, 4250 .master = &omap44xx_l4_abe_hwmod,
5320 .slave = &omap44xx_mcbsp3_hwmod, 4251 .slave = &omap44xx_mcbsp3_hwmod,
5321 .clk = "ocp_abe_iclk", 4252 .clk = "ocp_abe_iclk",
5322 .addr = omap44xx_mcbsp3_addrs,
5323 .user = OCP_USER_MPU, 4253 .user = OCP_USER_MPU,
5324}; 4254};
5325 4255
5326static struct omap_hwmod_addr_space omap44xx_mcbsp3_dma_addrs[] = {
5327 {
5328 .name = "dma",
5329 .pa_start = 0x49026000,
5330 .pa_end = 0x490260ff,
5331 .flags = ADDR_TYPE_RT
5332 },
5333 { }
5334};
5335
5336/* l4_abe -> mcbsp3 (dma) */ 4256/* l4_abe -> mcbsp3 (dma) */
5337static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcbsp3_dma = { 4257static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcbsp3_dma = {
5338 .master = &omap44xx_l4_abe_hwmod, 4258 .master = &omap44xx_l4_abe_hwmod,
5339 .slave = &omap44xx_mcbsp3_hwmod, 4259 .slave = &omap44xx_mcbsp3_hwmod,
5340 .clk = "ocp_abe_iclk", 4260 .clk = "ocp_abe_iclk",
5341 .addr = omap44xx_mcbsp3_dma_addrs,
5342 .user = OCP_USER_SDMA, 4261 .user = OCP_USER_SDMA,
5343}; 4262};
5344 4263
5345static struct omap_hwmod_addr_space omap44xx_mcbsp4_addrs[] = {
5346 {
5347 .pa_start = 0x48096000,
5348 .pa_end = 0x480960ff,
5349 .flags = ADDR_TYPE_RT
5350 },
5351 { }
5352};
5353
5354/* l4_per -> mcbsp4 */ 4264/* l4_per -> mcbsp4 */
5355static struct omap_hwmod_ocp_if omap44xx_l4_per__mcbsp4 = { 4265static struct omap_hwmod_ocp_if omap44xx_l4_per__mcbsp4 = {
5356 .master = &omap44xx_l4_per_hwmod, 4266 .master = &omap44xx_l4_per_hwmod,
5357 .slave = &omap44xx_mcbsp4_hwmod, 4267 .slave = &omap44xx_mcbsp4_hwmod,
5358 .clk = "l4_div_ck", 4268 .clk = "l4_div_ck",
5359 .addr = omap44xx_mcbsp4_addrs,
5360 .user = OCP_USER_MPU | OCP_USER_SDMA, 4269 .user = OCP_USER_MPU | OCP_USER_SDMA,
5361}; 4270};
5362 4271
5363static struct omap_hwmod_addr_space omap44xx_mcpdm_addrs[] = {
5364 {
5365 .name = "mpu",
5366 .pa_start = 0x40132000,
5367 .pa_end = 0x4013207f,
5368 .flags = ADDR_TYPE_RT
5369 },
5370 { }
5371};
5372
5373/* l4_abe -> mcpdm */ 4272/* l4_abe -> mcpdm */
5374static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcpdm = { 4273static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcpdm = {
5375 .master = &omap44xx_l4_abe_hwmod, 4274 .master = &omap44xx_l4_abe_hwmod,
5376 .slave = &omap44xx_mcpdm_hwmod, 4275 .slave = &omap44xx_mcpdm_hwmod,
5377 .clk = "ocp_abe_iclk", 4276 .clk = "ocp_abe_iclk",
5378 .addr = omap44xx_mcpdm_addrs,
5379 .user = OCP_USER_MPU, 4277 .user = OCP_USER_MPU,
5380}; 4278};
5381 4279
5382static struct omap_hwmod_addr_space omap44xx_mcpdm_dma_addrs[] = {
5383 {
5384 .name = "dma",
5385 .pa_start = 0x49032000,
5386 .pa_end = 0x4903207f,
5387 .flags = ADDR_TYPE_RT
5388 },
5389 { }
5390};
5391
5392/* l4_abe -> mcpdm (dma) */ 4280/* l4_abe -> mcpdm (dma) */
5393static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcpdm_dma = { 4281static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcpdm_dma = {
5394 .master = &omap44xx_l4_abe_hwmod, 4282 .master = &omap44xx_l4_abe_hwmod,
5395 .slave = &omap44xx_mcpdm_hwmod, 4283 .slave = &omap44xx_mcpdm_hwmod,
5396 .clk = "ocp_abe_iclk", 4284 .clk = "ocp_abe_iclk",
5397 .addr = omap44xx_mcpdm_dma_addrs,
5398 .user = OCP_USER_SDMA, 4285 .user = OCP_USER_SDMA,
5399}; 4286};
5400 4287
5401static struct omap_hwmod_addr_space omap44xx_mcspi1_addrs[] = {
5402 {
5403 .pa_start = 0x48098000,
5404 .pa_end = 0x480981ff,
5405 .flags = ADDR_TYPE_RT
5406 },
5407 { }
5408};
5409
5410/* l4_per -> mcspi1 */ 4288/* l4_per -> mcspi1 */
5411static struct omap_hwmod_ocp_if omap44xx_l4_per__mcspi1 = { 4289static struct omap_hwmod_ocp_if omap44xx_l4_per__mcspi1 = {
5412 .master = &omap44xx_l4_per_hwmod, 4290 .master = &omap44xx_l4_per_hwmod,
5413 .slave = &omap44xx_mcspi1_hwmod, 4291 .slave = &omap44xx_mcspi1_hwmod,
5414 .clk = "l4_div_ck", 4292 .clk = "l4_div_ck",
5415 .addr = omap44xx_mcspi1_addrs,
5416 .user = OCP_USER_MPU | OCP_USER_SDMA, 4293 .user = OCP_USER_MPU | OCP_USER_SDMA,
5417}; 4294};
5418 4295
5419static struct omap_hwmod_addr_space omap44xx_mcspi2_addrs[] = {
5420 {
5421 .pa_start = 0x4809a000,
5422 .pa_end = 0x4809a1ff,
5423 .flags = ADDR_TYPE_RT
5424 },
5425 { }
5426};
5427
5428/* l4_per -> mcspi2 */ 4296/* l4_per -> mcspi2 */
5429static struct omap_hwmod_ocp_if omap44xx_l4_per__mcspi2 = { 4297static struct omap_hwmod_ocp_if omap44xx_l4_per__mcspi2 = {
5430 .master = &omap44xx_l4_per_hwmod, 4298 .master = &omap44xx_l4_per_hwmod,
5431 .slave = &omap44xx_mcspi2_hwmod, 4299 .slave = &omap44xx_mcspi2_hwmod,
5432 .clk = "l4_div_ck", 4300 .clk = "l4_div_ck",
5433 .addr = omap44xx_mcspi2_addrs,
5434 .user = OCP_USER_MPU | OCP_USER_SDMA, 4301 .user = OCP_USER_MPU | OCP_USER_SDMA,
5435}; 4302};
5436 4303
5437static struct omap_hwmod_addr_space omap44xx_mcspi3_addrs[] = {
5438 {
5439 .pa_start = 0x480b8000,
5440 .pa_end = 0x480b81ff,
5441 .flags = ADDR_TYPE_RT
5442 },
5443 { }
5444};
5445
5446/* l4_per -> mcspi3 */ 4304/* l4_per -> mcspi3 */
5447static struct omap_hwmod_ocp_if omap44xx_l4_per__mcspi3 = { 4305static struct omap_hwmod_ocp_if omap44xx_l4_per__mcspi3 = {
5448 .master = &omap44xx_l4_per_hwmod, 4306 .master = &omap44xx_l4_per_hwmod,
5449 .slave = &omap44xx_mcspi3_hwmod, 4307 .slave = &omap44xx_mcspi3_hwmod,
5450 .clk = "l4_div_ck", 4308 .clk = "l4_div_ck",
5451 .addr = omap44xx_mcspi3_addrs,
5452 .user = OCP_USER_MPU | OCP_USER_SDMA, 4309 .user = OCP_USER_MPU | OCP_USER_SDMA,
5453}; 4310};
5454 4311
5455static struct omap_hwmod_addr_space omap44xx_mcspi4_addrs[] = {
5456 {
5457 .pa_start = 0x480ba000,
5458 .pa_end = 0x480ba1ff,
5459 .flags = ADDR_TYPE_RT
5460 },
5461 { }
5462};
5463
5464/* l4_per -> mcspi4 */ 4312/* l4_per -> mcspi4 */
5465static struct omap_hwmod_ocp_if omap44xx_l4_per__mcspi4 = { 4313static struct omap_hwmod_ocp_if omap44xx_l4_per__mcspi4 = {
5466 .master = &omap44xx_l4_per_hwmod, 4314 .master = &omap44xx_l4_per_hwmod,
5467 .slave = &omap44xx_mcspi4_hwmod, 4315 .slave = &omap44xx_mcspi4_hwmod,
5468 .clk = "l4_div_ck", 4316 .clk = "l4_div_ck",
5469 .addr = omap44xx_mcspi4_addrs,
5470 .user = OCP_USER_MPU | OCP_USER_SDMA, 4317 .user = OCP_USER_MPU | OCP_USER_SDMA,
5471}; 4318};
5472 4319
5473static struct omap_hwmod_addr_space omap44xx_mmc1_addrs[] = {
5474 {
5475 .pa_start = 0x4809c000,
5476 .pa_end = 0x4809c3ff,
5477 .flags = ADDR_TYPE_RT
5478 },
5479 { }
5480};
5481
5482/* l4_per -> mmc1 */ 4320/* l4_per -> mmc1 */
5483static struct omap_hwmod_ocp_if omap44xx_l4_per__mmc1 = { 4321static struct omap_hwmod_ocp_if omap44xx_l4_per__mmc1 = {
5484 .master = &omap44xx_l4_per_hwmod, 4322 .master = &omap44xx_l4_per_hwmod,
5485 .slave = &omap44xx_mmc1_hwmod, 4323 .slave = &omap44xx_mmc1_hwmod,
5486 .clk = "l4_div_ck", 4324 .clk = "l4_div_ck",
5487 .addr = omap44xx_mmc1_addrs,
5488 .user = OCP_USER_MPU | OCP_USER_SDMA, 4325 .user = OCP_USER_MPU | OCP_USER_SDMA,
5489}; 4326};
5490 4327
5491static struct omap_hwmod_addr_space omap44xx_mmc2_addrs[] = {
5492 {
5493 .pa_start = 0x480b4000,
5494 .pa_end = 0x480b43ff,
5495 .flags = ADDR_TYPE_RT
5496 },
5497 { }
5498};
5499
5500/* l4_per -> mmc2 */ 4328/* l4_per -> mmc2 */
5501static struct omap_hwmod_ocp_if omap44xx_l4_per__mmc2 = { 4329static struct omap_hwmod_ocp_if omap44xx_l4_per__mmc2 = {
5502 .master = &omap44xx_l4_per_hwmod, 4330 .master = &omap44xx_l4_per_hwmod,
5503 .slave = &omap44xx_mmc2_hwmod, 4331 .slave = &omap44xx_mmc2_hwmod,
5504 .clk = "l4_div_ck", 4332 .clk = "l4_div_ck",
5505 .addr = omap44xx_mmc2_addrs,
5506 .user = OCP_USER_MPU | OCP_USER_SDMA, 4333 .user = OCP_USER_MPU | OCP_USER_SDMA,
5507}; 4334};
5508 4335
5509static struct omap_hwmod_addr_space omap44xx_mmc3_addrs[] = {
5510 {
5511 .pa_start = 0x480ad000,
5512 .pa_end = 0x480ad3ff,
5513 .flags = ADDR_TYPE_RT
5514 },
5515 { }
5516};
5517
5518/* l4_per -> mmc3 */ 4336/* l4_per -> mmc3 */
5519static struct omap_hwmod_ocp_if omap44xx_l4_per__mmc3 = { 4337static struct omap_hwmod_ocp_if omap44xx_l4_per__mmc3 = {
5520 .master = &omap44xx_l4_per_hwmod, 4338 .master = &omap44xx_l4_per_hwmod,
5521 .slave = &omap44xx_mmc3_hwmod, 4339 .slave = &omap44xx_mmc3_hwmod,
5522 .clk = "l4_div_ck", 4340 .clk = "l4_div_ck",
5523 .addr = omap44xx_mmc3_addrs,
5524 .user = OCP_USER_MPU | OCP_USER_SDMA, 4341 .user = OCP_USER_MPU | OCP_USER_SDMA,
5525}; 4342};
5526 4343
5527static struct omap_hwmod_addr_space omap44xx_mmc4_addrs[] = {
5528 {
5529 .pa_start = 0x480d1000,
5530 .pa_end = 0x480d13ff,
5531 .flags = ADDR_TYPE_RT
5532 },
5533 { }
5534};
5535
5536/* l4_per -> mmc4 */ 4344/* l4_per -> mmc4 */
5537static struct omap_hwmod_ocp_if omap44xx_l4_per__mmc4 = { 4345static struct omap_hwmod_ocp_if omap44xx_l4_per__mmc4 = {
5538 .master = &omap44xx_l4_per_hwmod, 4346 .master = &omap44xx_l4_per_hwmod,
5539 .slave = &omap44xx_mmc4_hwmod, 4347 .slave = &omap44xx_mmc4_hwmod,
5540 .clk = "l4_div_ck", 4348 .clk = "l4_div_ck",
5541 .addr = omap44xx_mmc4_addrs,
5542 .user = OCP_USER_MPU | OCP_USER_SDMA, 4349 .user = OCP_USER_MPU | OCP_USER_SDMA,
5543}; 4350};
5544 4351
5545static struct omap_hwmod_addr_space omap44xx_mmc5_addrs[] = {
5546 {
5547 .pa_start = 0x480d5000,
5548 .pa_end = 0x480d53ff,
5549 .flags = ADDR_TYPE_RT
5550 },
5551 { }
5552};
5553
5554/* l4_per -> mmc5 */ 4352/* l4_per -> mmc5 */
5555static struct omap_hwmod_ocp_if omap44xx_l4_per__mmc5 = { 4353static struct omap_hwmod_ocp_if omap44xx_l4_per__mmc5 = {
5556 .master = &omap44xx_l4_per_hwmod, 4354 .master = &omap44xx_l4_per_hwmod,
5557 .slave = &omap44xx_mmc5_hwmod, 4355 .slave = &omap44xx_mmc5_hwmod,
5558 .clk = "l4_div_ck", 4356 .clk = "l4_div_ck",
5559 .addr = omap44xx_mmc5_addrs,
5560 .user = OCP_USER_MPU | OCP_USER_SDMA, 4357 .user = OCP_USER_MPU | OCP_USER_SDMA,
5561}; 4358};
5562 4359
@@ -5568,111 +4365,51 @@ static struct omap_hwmod_ocp_if omap44xx_l3_main_2__ocmc_ram = {
5568 .user = OCP_USER_MPU | OCP_USER_SDMA, 4365 .user = OCP_USER_MPU | OCP_USER_SDMA,
5569}; 4366};
5570 4367
5571static struct omap_hwmod_addr_space omap44xx_ocp2scp_usb_phy_addrs[] = {
5572 {
5573 .pa_start = 0x4a0ad000,
5574 .pa_end = 0x4a0ad01f,
5575 .flags = ADDR_TYPE_RT
5576 },
5577 { }
5578};
5579
5580/* l4_cfg -> ocp2scp_usb_phy */ 4368/* l4_cfg -> ocp2scp_usb_phy */
5581static struct omap_hwmod_ocp_if omap44xx_l4_cfg__ocp2scp_usb_phy = { 4369static struct omap_hwmod_ocp_if omap44xx_l4_cfg__ocp2scp_usb_phy = {
5582 .master = &omap44xx_l4_cfg_hwmod, 4370 .master = &omap44xx_l4_cfg_hwmod,
5583 .slave = &omap44xx_ocp2scp_usb_phy_hwmod, 4371 .slave = &omap44xx_ocp2scp_usb_phy_hwmod,
5584 .clk = "l4_div_ck", 4372 .clk = "l4_div_ck",
5585 .addr = omap44xx_ocp2scp_usb_phy_addrs,
5586 .user = OCP_USER_MPU | OCP_USER_SDMA, 4373 .user = OCP_USER_MPU | OCP_USER_SDMA,
5587}; 4374};
5588 4375
5589static struct omap_hwmod_addr_space omap44xx_prcm_mpu_addrs[] = {
5590 {
5591 .pa_start = 0x48243000,
5592 .pa_end = 0x48243fff,
5593 .flags = ADDR_TYPE_RT
5594 },
5595 { }
5596};
5597
5598/* mpu_private -> prcm_mpu */ 4376/* mpu_private -> prcm_mpu */
5599static struct omap_hwmod_ocp_if omap44xx_mpu_private__prcm_mpu = { 4377static struct omap_hwmod_ocp_if omap44xx_mpu_private__prcm_mpu = {
5600 .master = &omap44xx_mpu_private_hwmod, 4378 .master = &omap44xx_mpu_private_hwmod,
5601 .slave = &omap44xx_prcm_mpu_hwmod, 4379 .slave = &omap44xx_prcm_mpu_hwmod,
5602 .clk = "l3_div_ck", 4380 .clk = "l3_div_ck",
5603 .addr = omap44xx_prcm_mpu_addrs,
5604 .user = OCP_USER_MPU | OCP_USER_SDMA, 4381 .user = OCP_USER_MPU | OCP_USER_SDMA,
5605}; 4382};
5606 4383
5607static struct omap_hwmod_addr_space omap44xx_cm_core_aon_addrs[] = {
5608 {
5609 .pa_start = 0x4a004000,
5610 .pa_end = 0x4a004fff,
5611 .flags = ADDR_TYPE_RT
5612 },
5613 { }
5614};
5615
5616/* l4_wkup -> cm_core_aon */ 4384/* l4_wkup -> cm_core_aon */
5617static struct omap_hwmod_ocp_if omap44xx_l4_wkup__cm_core_aon = { 4385static struct omap_hwmod_ocp_if omap44xx_l4_wkup__cm_core_aon = {
5618 .master = &omap44xx_l4_wkup_hwmod, 4386 .master = &omap44xx_l4_wkup_hwmod,
5619 .slave = &omap44xx_cm_core_aon_hwmod, 4387 .slave = &omap44xx_cm_core_aon_hwmod,
5620 .clk = "l4_wkup_clk_mux_ck", 4388 .clk = "l4_wkup_clk_mux_ck",
5621 .addr = omap44xx_cm_core_aon_addrs,
5622 .user = OCP_USER_MPU | OCP_USER_SDMA, 4389 .user = OCP_USER_MPU | OCP_USER_SDMA,
5623}; 4390};
5624 4391
5625static struct omap_hwmod_addr_space omap44xx_cm_core_addrs[] = {
5626 {
5627 .pa_start = 0x4a008000,
5628 .pa_end = 0x4a009fff,
5629 .flags = ADDR_TYPE_RT
5630 },
5631 { }
5632};
5633
5634/* l4_cfg -> cm_core */ 4392/* l4_cfg -> cm_core */
5635static struct omap_hwmod_ocp_if omap44xx_l4_cfg__cm_core = { 4393static struct omap_hwmod_ocp_if omap44xx_l4_cfg__cm_core = {
5636 .master = &omap44xx_l4_cfg_hwmod, 4394 .master = &omap44xx_l4_cfg_hwmod,
5637 .slave = &omap44xx_cm_core_hwmod, 4395 .slave = &omap44xx_cm_core_hwmod,
5638 .clk = "l4_div_ck", 4396 .clk = "l4_div_ck",
5639 .addr = omap44xx_cm_core_addrs,
5640 .user = OCP_USER_MPU | OCP_USER_SDMA, 4397 .user = OCP_USER_MPU | OCP_USER_SDMA,
5641}; 4398};
5642 4399
5643static struct omap_hwmod_addr_space omap44xx_prm_addrs[] = {
5644 {
5645 .pa_start = 0x4a306000,
5646 .pa_end = 0x4a307fff,
5647 .flags = ADDR_TYPE_RT
5648 },
5649 { }
5650};
5651
5652/* l4_wkup -> prm */ 4400/* l4_wkup -> prm */
5653static struct omap_hwmod_ocp_if omap44xx_l4_wkup__prm = { 4401static struct omap_hwmod_ocp_if omap44xx_l4_wkup__prm = {
5654 .master = &omap44xx_l4_wkup_hwmod, 4402 .master = &omap44xx_l4_wkup_hwmod,
5655 .slave = &omap44xx_prm_hwmod, 4403 .slave = &omap44xx_prm_hwmod,
5656 .clk = "l4_wkup_clk_mux_ck", 4404 .clk = "l4_wkup_clk_mux_ck",
5657 .addr = omap44xx_prm_addrs,
5658 .user = OCP_USER_MPU | OCP_USER_SDMA, 4405 .user = OCP_USER_MPU | OCP_USER_SDMA,
5659}; 4406};
5660 4407
5661static struct omap_hwmod_addr_space omap44xx_scrm_addrs[] = {
5662 {
5663 .pa_start = 0x4a30a000,
5664 .pa_end = 0x4a30a7ff,
5665 .flags = ADDR_TYPE_RT
5666 },
5667 { }
5668};
5669
5670/* l4_wkup -> scrm */ 4408/* l4_wkup -> scrm */
5671static struct omap_hwmod_ocp_if omap44xx_l4_wkup__scrm = { 4409static struct omap_hwmod_ocp_if omap44xx_l4_wkup__scrm = {
5672 .master = &omap44xx_l4_wkup_hwmod, 4410 .master = &omap44xx_l4_wkup_hwmod,
5673 .slave = &omap44xx_scrm_hwmod, 4411 .slave = &omap44xx_scrm_hwmod,
5674 .clk = "l4_wkup_clk_mux_ck", 4412 .clk = "l4_wkup_clk_mux_ck",
5675 .addr = omap44xx_scrm_addrs,
5676 .user = OCP_USER_MPU | OCP_USER_SDMA, 4413 .user = OCP_USER_MPU | OCP_USER_SDMA,
5677}; 4414};
5678 4415
@@ -5810,447 +4547,195 @@ static struct omap_hwmod_ocp_if omap44xx_l4_cfg__spinlock = {
5810 .user = OCP_USER_MPU | OCP_USER_SDMA, 4547 .user = OCP_USER_MPU | OCP_USER_SDMA,
5811}; 4548};
5812 4549
5813static struct omap_hwmod_addr_space omap44xx_timer1_addrs[] = {
5814 {
5815 .pa_start = 0x4a318000,
5816 .pa_end = 0x4a31807f,
5817 .flags = ADDR_TYPE_RT
5818 },
5819 { }
5820};
5821
5822/* l4_wkup -> timer1 */ 4550/* l4_wkup -> timer1 */
5823static struct omap_hwmod_ocp_if omap44xx_l4_wkup__timer1 = { 4551static struct omap_hwmod_ocp_if omap44xx_l4_wkup__timer1 = {
5824 .master = &omap44xx_l4_wkup_hwmod, 4552 .master = &omap44xx_l4_wkup_hwmod,
5825 .slave = &omap44xx_timer1_hwmod, 4553 .slave = &omap44xx_timer1_hwmod,
5826 .clk = "l4_wkup_clk_mux_ck", 4554 .clk = "l4_wkup_clk_mux_ck",
5827 .addr = omap44xx_timer1_addrs,
5828 .user = OCP_USER_MPU | OCP_USER_SDMA, 4555 .user = OCP_USER_MPU | OCP_USER_SDMA,
5829}; 4556};
5830 4557
5831static struct omap_hwmod_addr_space omap44xx_timer2_addrs[] = {
5832 {
5833 .pa_start = 0x48032000,
5834 .pa_end = 0x4803207f,
5835 .flags = ADDR_TYPE_RT
5836 },
5837 { }
5838};
5839
5840/* l4_per -> timer2 */ 4558/* l4_per -> timer2 */
5841static struct omap_hwmod_ocp_if omap44xx_l4_per__timer2 = { 4559static struct omap_hwmod_ocp_if omap44xx_l4_per__timer2 = {
5842 .master = &omap44xx_l4_per_hwmod, 4560 .master = &omap44xx_l4_per_hwmod,
5843 .slave = &omap44xx_timer2_hwmod, 4561 .slave = &omap44xx_timer2_hwmod,
5844 .clk = "l4_div_ck", 4562 .clk = "l4_div_ck",
5845 .addr = omap44xx_timer2_addrs,
5846 .user = OCP_USER_MPU | OCP_USER_SDMA, 4563 .user = OCP_USER_MPU | OCP_USER_SDMA,
5847}; 4564};
5848 4565
5849static struct omap_hwmod_addr_space omap44xx_timer3_addrs[] = {
5850 {
5851 .pa_start = 0x48034000,
5852 .pa_end = 0x4803407f,
5853 .flags = ADDR_TYPE_RT
5854 },
5855 { }
5856};
5857
5858/* l4_per -> timer3 */ 4566/* l4_per -> timer3 */
5859static struct omap_hwmod_ocp_if omap44xx_l4_per__timer3 = { 4567static struct omap_hwmod_ocp_if omap44xx_l4_per__timer3 = {
5860 .master = &omap44xx_l4_per_hwmod, 4568 .master = &omap44xx_l4_per_hwmod,
5861 .slave = &omap44xx_timer3_hwmod, 4569 .slave = &omap44xx_timer3_hwmod,
5862 .clk = "l4_div_ck", 4570 .clk = "l4_div_ck",
5863 .addr = omap44xx_timer3_addrs,
5864 .user = OCP_USER_MPU | OCP_USER_SDMA, 4571 .user = OCP_USER_MPU | OCP_USER_SDMA,
5865}; 4572};
5866 4573
5867static struct omap_hwmod_addr_space omap44xx_timer4_addrs[] = {
5868 {
5869 .pa_start = 0x48036000,
5870 .pa_end = 0x4803607f,
5871 .flags = ADDR_TYPE_RT
5872 },
5873 { }
5874};
5875
5876/* l4_per -> timer4 */ 4574/* l4_per -> timer4 */
5877static struct omap_hwmod_ocp_if omap44xx_l4_per__timer4 = { 4575static struct omap_hwmod_ocp_if omap44xx_l4_per__timer4 = {
5878 .master = &omap44xx_l4_per_hwmod, 4576 .master = &omap44xx_l4_per_hwmod,
5879 .slave = &omap44xx_timer4_hwmod, 4577 .slave = &omap44xx_timer4_hwmod,
5880 .clk = "l4_div_ck", 4578 .clk = "l4_div_ck",
5881 .addr = omap44xx_timer4_addrs,
5882 .user = OCP_USER_MPU | OCP_USER_SDMA, 4579 .user = OCP_USER_MPU | OCP_USER_SDMA,
5883}; 4580};
5884 4581
5885static struct omap_hwmod_addr_space omap44xx_timer5_addrs[] = {
5886 {
5887 .pa_start = 0x40138000,
5888 .pa_end = 0x4013807f,
5889 .flags = ADDR_TYPE_RT
5890 },
5891 { }
5892};
5893
5894/* l4_abe -> timer5 */ 4582/* l4_abe -> timer5 */
5895static struct omap_hwmod_ocp_if omap44xx_l4_abe__timer5 = { 4583static struct omap_hwmod_ocp_if omap44xx_l4_abe__timer5 = {
5896 .master = &omap44xx_l4_abe_hwmod, 4584 .master = &omap44xx_l4_abe_hwmod,
5897 .slave = &omap44xx_timer5_hwmod, 4585 .slave = &omap44xx_timer5_hwmod,
5898 .clk = "ocp_abe_iclk", 4586 .clk = "ocp_abe_iclk",
5899 .addr = omap44xx_timer5_addrs,
5900 .user = OCP_USER_MPU, 4587 .user = OCP_USER_MPU,
5901}; 4588};
5902 4589
5903static struct omap_hwmod_addr_space omap44xx_timer5_dma_addrs[] = {
5904 {
5905 .pa_start = 0x49038000,
5906 .pa_end = 0x4903807f,
5907 .flags = ADDR_TYPE_RT
5908 },
5909 { }
5910};
5911
5912/* l4_abe -> timer5 (dma) */ 4590/* l4_abe -> timer5 (dma) */
5913static struct omap_hwmod_ocp_if omap44xx_l4_abe__timer5_dma = { 4591static struct omap_hwmod_ocp_if omap44xx_l4_abe__timer5_dma = {
5914 .master = &omap44xx_l4_abe_hwmod, 4592 .master = &omap44xx_l4_abe_hwmod,
5915 .slave = &omap44xx_timer5_hwmod, 4593 .slave = &omap44xx_timer5_hwmod,
5916 .clk = "ocp_abe_iclk", 4594 .clk = "ocp_abe_iclk",
5917 .addr = omap44xx_timer5_dma_addrs,
5918 .user = OCP_USER_SDMA, 4595 .user = OCP_USER_SDMA,
5919}; 4596};
5920 4597
5921static struct omap_hwmod_addr_space omap44xx_timer6_addrs[] = {
5922 {
5923 .pa_start = 0x4013a000,
5924 .pa_end = 0x4013a07f,
5925 .flags = ADDR_TYPE_RT
5926 },
5927 { }
5928};
5929
5930/* l4_abe -> timer6 */ 4598/* l4_abe -> timer6 */
5931static struct omap_hwmod_ocp_if omap44xx_l4_abe__timer6 = { 4599static struct omap_hwmod_ocp_if omap44xx_l4_abe__timer6 = {
5932 .master = &omap44xx_l4_abe_hwmod, 4600 .master = &omap44xx_l4_abe_hwmod,
5933 .slave = &omap44xx_timer6_hwmod, 4601 .slave = &omap44xx_timer6_hwmod,
5934 .clk = "ocp_abe_iclk", 4602 .clk = "ocp_abe_iclk",
5935 .addr = omap44xx_timer6_addrs,
5936 .user = OCP_USER_MPU, 4603 .user = OCP_USER_MPU,
5937}; 4604};
5938 4605
5939static struct omap_hwmod_addr_space omap44xx_timer6_dma_addrs[] = {
5940 {
5941 .pa_start = 0x4903a000,
5942 .pa_end = 0x4903a07f,
5943 .flags = ADDR_TYPE_RT
5944 },
5945 { }
5946};
5947
5948/* l4_abe -> timer6 (dma) */ 4606/* l4_abe -> timer6 (dma) */
5949static struct omap_hwmod_ocp_if omap44xx_l4_abe__timer6_dma = { 4607static struct omap_hwmod_ocp_if omap44xx_l4_abe__timer6_dma = {
5950 .master = &omap44xx_l4_abe_hwmod, 4608 .master = &omap44xx_l4_abe_hwmod,
5951 .slave = &omap44xx_timer6_hwmod, 4609 .slave = &omap44xx_timer6_hwmod,
5952 .clk = "ocp_abe_iclk", 4610 .clk = "ocp_abe_iclk",
5953 .addr = omap44xx_timer6_dma_addrs,
5954 .user = OCP_USER_SDMA, 4611 .user = OCP_USER_SDMA,
5955}; 4612};
5956 4613
5957static struct omap_hwmod_addr_space omap44xx_timer7_addrs[] = {
5958 {
5959 .pa_start = 0x4013c000,
5960 .pa_end = 0x4013c07f,
5961 .flags = ADDR_TYPE_RT
5962 },
5963 { }
5964};
5965
5966/* l4_abe -> timer7 */ 4614/* l4_abe -> timer7 */
5967static struct omap_hwmod_ocp_if omap44xx_l4_abe__timer7 = { 4615static struct omap_hwmod_ocp_if omap44xx_l4_abe__timer7 = {
5968 .master = &omap44xx_l4_abe_hwmod, 4616 .master = &omap44xx_l4_abe_hwmod,
5969 .slave = &omap44xx_timer7_hwmod, 4617 .slave = &omap44xx_timer7_hwmod,
5970 .clk = "ocp_abe_iclk", 4618 .clk = "ocp_abe_iclk",
5971 .addr = omap44xx_timer7_addrs,
5972 .user = OCP_USER_MPU, 4619 .user = OCP_USER_MPU,
5973}; 4620};
5974 4621
5975static struct omap_hwmod_addr_space omap44xx_timer7_dma_addrs[] = {
5976 {
5977 .pa_start = 0x4903c000,
5978 .pa_end = 0x4903c07f,
5979 .flags = ADDR_TYPE_RT
5980 },
5981 { }
5982};
5983
5984/* l4_abe -> timer7 (dma) */ 4622/* l4_abe -> timer7 (dma) */
5985static struct omap_hwmod_ocp_if omap44xx_l4_abe__timer7_dma = { 4623static struct omap_hwmod_ocp_if omap44xx_l4_abe__timer7_dma = {
5986 .master = &omap44xx_l4_abe_hwmod, 4624 .master = &omap44xx_l4_abe_hwmod,
5987 .slave = &omap44xx_timer7_hwmod, 4625 .slave = &omap44xx_timer7_hwmod,
5988 .clk = "ocp_abe_iclk", 4626 .clk = "ocp_abe_iclk",
5989 .addr = omap44xx_timer7_dma_addrs,
5990 .user = OCP_USER_SDMA, 4627 .user = OCP_USER_SDMA,
5991}; 4628};
5992 4629
5993static struct omap_hwmod_addr_space omap44xx_timer8_addrs[] = {
5994 {
5995 .pa_start = 0x4013e000,
5996 .pa_end = 0x4013e07f,
5997 .flags = ADDR_TYPE_RT
5998 },
5999 { }
6000};
6001
6002/* l4_abe -> timer8 */ 4630/* l4_abe -> timer8 */
6003static struct omap_hwmod_ocp_if omap44xx_l4_abe__timer8 = { 4631static struct omap_hwmod_ocp_if omap44xx_l4_abe__timer8 = {
6004 .master = &omap44xx_l4_abe_hwmod, 4632 .master = &omap44xx_l4_abe_hwmod,
6005 .slave = &omap44xx_timer8_hwmod, 4633 .slave = &omap44xx_timer8_hwmod,
6006 .clk = "ocp_abe_iclk", 4634 .clk = "ocp_abe_iclk",
6007 .addr = omap44xx_timer8_addrs,
6008 .user = OCP_USER_MPU, 4635 .user = OCP_USER_MPU,
6009}; 4636};
6010 4637
6011static struct omap_hwmod_addr_space omap44xx_timer8_dma_addrs[] = {
6012 {
6013 .pa_start = 0x4903e000,
6014 .pa_end = 0x4903e07f,
6015 .flags = ADDR_TYPE_RT
6016 },
6017 { }
6018};
6019
6020/* l4_abe -> timer8 (dma) */ 4638/* l4_abe -> timer8 (dma) */
6021static struct omap_hwmod_ocp_if omap44xx_l4_abe__timer8_dma = { 4639static struct omap_hwmod_ocp_if omap44xx_l4_abe__timer8_dma = {
6022 .master = &omap44xx_l4_abe_hwmod, 4640 .master = &omap44xx_l4_abe_hwmod,
6023 .slave = &omap44xx_timer8_hwmod, 4641 .slave = &omap44xx_timer8_hwmod,
6024 .clk = "ocp_abe_iclk", 4642 .clk = "ocp_abe_iclk",
6025 .addr = omap44xx_timer8_dma_addrs,
6026 .user = OCP_USER_SDMA, 4643 .user = OCP_USER_SDMA,
6027}; 4644};
6028 4645
6029static struct omap_hwmod_addr_space omap44xx_timer9_addrs[] = {
6030 {
6031 .pa_start = 0x4803e000,
6032 .pa_end = 0x4803e07f,
6033 .flags = ADDR_TYPE_RT
6034 },
6035 { }
6036};
6037
6038/* l4_per -> timer9 */ 4646/* l4_per -> timer9 */
6039static struct omap_hwmod_ocp_if omap44xx_l4_per__timer9 = { 4647static struct omap_hwmod_ocp_if omap44xx_l4_per__timer9 = {
6040 .master = &omap44xx_l4_per_hwmod, 4648 .master = &omap44xx_l4_per_hwmod,
6041 .slave = &omap44xx_timer9_hwmod, 4649 .slave = &omap44xx_timer9_hwmod,
6042 .clk = "l4_div_ck", 4650 .clk = "l4_div_ck",
6043 .addr = omap44xx_timer9_addrs,
6044 .user = OCP_USER_MPU | OCP_USER_SDMA, 4651 .user = OCP_USER_MPU | OCP_USER_SDMA,
6045}; 4652};
6046 4653
6047static struct omap_hwmod_addr_space omap44xx_timer10_addrs[] = {
6048 {
6049 .pa_start = 0x48086000,
6050 .pa_end = 0x4808607f,
6051 .flags = ADDR_TYPE_RT
6052 },
6053 { }
6054};
6055
6056/* l4_per -> timer10 */ 4654/* l4_per -> timer10 */
6057static struct omap_hwmod_ocp_if omap44xx_l4_per__timer10 = { 4655static struct omap_hwmod_ocp_if omap44xx_l4_per__timer10 = {
6058 .master = &omap44xx_l4_per_hwmod, 4656 .master = &omap44xx_l4_per_hwmod,
6059 .slave = &omap44xx_timer10_hwmod, 4657 .slave = &omap44xx_timer10_hwmod,
6060 .clk = "l4_div_ck", 4658 .clk = "l4_div_ck",
6061 .addr = omap44xx_timer10_addrs,
6062 .user = OCP_USER_MPU | OCP_USER_SDMA, 4659 .user = OCP_USER_MPU | OCP_USER_SDMA,
6063}; 4660};
6064 4661
6065static struct omap_hwmod_addr_space omap44xx_timer11_addrs[] = {
6066 {
6067 .pa_start = 0x48088000,
6068 .pa_end = 0x4808807f,
6069 .flags = ADDR_TYPE_RT
6070 },
6071 { }
6072};
6073
6074/* l4_per -> timer11 */ 4662/* l4_per -> timer11 */
6075static struct omap_hwmod_ocp_if omap44xx_l4_per__timer11 = { 4663static struct omap_hwmod_ocp_if omap44xx_l4_per__timer11 = {
6076 .master = &omap44xx_l4_per_hwmod, 4664 .master = &omap44xx_l4_per_hwmod,
6077 .slave = &omap44xx_timer11_hwmod, 4665 .slave = &omap44xx_timer11_hwmod,
6078 .clk = "l4_div_ck", 4666 .clk = "l4_div_ck",
6079 .addr = omap44xx_timer11_addrs,
6080 .user = OCP_USER_MPU | OCP_USER_SDMA, 4667 .user = OCP_USER_MPU | OCP_USER_SDMA,
6081}; 4668};
6082 4669
6083static struct omap_hwmod_addr_space omap44xx_uart1_addrs[] = {
6084 {
6085 .pa_start = 0x4806a000,
6086 .pa_end = 0x4806a0ff,
6087 .flags = ADDR_TYPE_RT
6088 },
6089 { }
6090};
6091
6092/* l4_per -> uart1 */ 4670/* l4_per -> uart1 */
6093static struct omap_hwmod_ocp_if omap44xx_l4_per__uart1 = { 4671static struct omap_hwmod_ocp_if omap44xx_l4_per__uart1 = {
6094 .master = &omap44xx_l4_per_hwmod, 4672 .master = &omap44xx_l4_per_hwmod,
6095 .slave = &omap44xx_uart1_hwmod, 4673 .slave = &omap44xx_uart1_hwmod,
6096 .clk = "l4_div_ck", 4674 .clk = "l4_div_ck",
6097 .addr = omap44xx_uart1_addrs,
6098 .user = OCP_USER_MPU | OCP_USER_SDMA, 4675 .user = OCP_USER_MPU | OCP_USER_SDMA,
6099}; 4676};
6100 4677
6101static struct omap_hwmod_addr_space omap44xx_uart2_addrs[] = {
6102 {
6103 .pa_start = 0x4806c000,
6104 .pa_end = 0x4806c0ff,
6105 .flags = ADDR_TYPE_RT
6106 },
6107 { }
6108};
6109
6110/* l4_per -> uart2 */ 4678/* l4_per -> uart2 */
6111static struct omap_hwmod_ocp_if omap44xx_l4_per__uart2 = { 4679static struct omap_hwmod_ocp_if omap44xx_l4_per__uart2 = {
6112 .master = &omap44xx_l4_per_hwmod, 4680 .master = &omap44xx_l4_per_hwmod,
6113 .slave = &omap44xx_uart2_hwmod, 4681 .slave = &omap44xx_uart2_hwmod,
6114 .clk = "l4_div_ck", 4682 .clk = "l4_div_ck",
6115 .addr = omap44xx_uart2_addrs,
6116 .user = OCP_USER_MPU | OCP_USER_SDMA, 4683 .user = OCP_USER_MPU | OCP_USER_SDMA,
6117}; 4684};
6118 4685
6119static struct omap_hwmod_addr_space omap44xx_uart3_addrs[] = {
6120 {
6121 .pa_start = 0x48020000,
6122 .pa_end = 0x480200ff,
6123 .flags = ADDR_TYPE_RT
6124 },
6125 { }
6126};
6127
6128/* l4_per -> uart3 */ 4686/* l4_per -> uart3 */
6129static struct omap_hwmod_ocp_if omap44xx_l4_per__uart3 = { 4687static struct omap_hwmod_ocp_if omap44xx_l4_per__uart3 = {
6130 .master = &omap44xx_l4_per_hwmod, 4688 .master = &omap44xx_l4_per_hwmod,
6131 .slave = &omap44xx_uart3_hwmod, 4689 .slave = &omap44xx_uart3_hwmod,
6132 .clk = "l4_div_ck", 4690 .clk = "l4_div_ck",
6133 .addr = omap44xx_uart3_addrs,
6134 .user = OCP_USER_MPU | OCP_USER_SDMA, 4691 .user = OCP_USER_MPU | OCP_USER_SDMA,
6135}; 4692};
6136 4693
6137static struct omap_hwmod_addr_space omap44xx_uart4_addrs[] = {
6138 {
6139 .pa_start = 0x4806e000,
6140 .pa_end = 0x4806e0ff,
6141 .flags = ADDR_TYPE_RT
6142 },
6143 { }
6144};
6145
6146/* l4_per -> uart4 */ 4694/* l4_per -> uart4 */
6147static struct omap_hwmod_ocp_if omap44xx_l4_per__uart4 = { 4695static struct omap_hwmod_ocp_if omap44xx_l4_per__uart4 = {
6148 .master = &omap44xx_l4_per_hwmod, 4696 .master = &omap44xx_l4_per_hwmod,
6149 .slave = &omap44xx_uart4_hwmod, 4697 .slave = &omap44xx_uart4_hwmod,
6150 .clk = "l4_div_ck", 4698 .clk = "l4_div_ck",
6151 .addr = omap44xx_uart4_addrs,
6152 .user = OCP_USER_MPU | OCP_USER_SDMA, 4699 .user = OCP_USER_MPU | OCP_USER_SDMA,
6153}; 4700};
6154 4701
6155static struct omap_hwmod_addr_space omap44xx_usb_host_fs_addrs[] = {
6156 {
6157 .pa_start = 0x4a0a9000,
6158 .pa_end = 0x4a0a93ff,
6159 .flags = ADDR_TYPE_RT
6160 },
6161 { }
6162};
6163
6164/* l4_cfg -> usb_host_fs */ 4702/* l4_cfg -> usb_host_fs */
6165static struct omap_hwmod_ocp_if __maybe_unused omap44xx_l4_cfg__usb_host_fs = { 4703static struct omap_hwmod_ocp_if __maybe_unused omap44xx_l4_cfg__usb_host_fs = {
6166 .master = &omap44xx_l4_cfg_hwmod, 4704 .master = &omap44xx_l4_cfg_hwmod,
6167 .slave = &omap44xx_usb_host_fs_hwmod, 4705 .slave = &omap44xx_usb_host_fs_hwmod,
6168 .clk = "l4_div_ck", 4706 .clk = "l4_div_ck",
6169 .addr = omap44xx_usb_host_fs_addrs,
6170 .user = OCP_USER_MPU | OCP_USER_SDMA, 4707 .user = OCP_USER_MPU | OCP_USER_SDMA,
6171}; 4708};
6172 4709
6173static struct omap_hwmod_addr_space omap44xx_usb_host_hs_addrs[] = {
6174 {
6175 .name = "uhh",
6176 .pa_start = 0x4a064000,
6177 .pa_end = 0x4a0647ff,
6178 .flags = ADDR_TYPE_RT
6179 },
6180 {
6181 .name = "ohci",
6182 .pa_start = 0x4a064800,
6183 .pa_end = 0x4a064bff,
6184 },
6185 {
6186 .name = "ehci",
6187 .pa_start = 0x4a064c00,
6188 .pa_end = 0x4a064fff,
6189 },
6190 {}
6191};
6192
6193/* l4_cfg -> usb_host_hs */ 4710/* l4_cfg -> usb_host_hs */
6194static struct omap_hwmod_ocp_if omap44xx_l4_cfg__usb_host_hs = { 4711static struct omap_hwmod_ocp_if omap44xx_l4_cfg__usb_host_hs = {
6195 .master = &omap44xx_l4_cfg_hwmod, 4712 .master = &omap44xx_l4_cfg_hwmod,
6196 .slave = &omap44xx_usb_host_hs_hwmod, 4713 .slave = &omap44xx_usb_host_hs_hwmod,
6197 .clk = "l4_div_ck", 4714 .clk = "l4_div_ck",
6198 .addr = omap44xx_usb_host_hs_addrs,
6199 .user = OCP_USER_MPU | OCP_USER_SDMA, 4715 .user = OCP_USER_MPU | OCP_USER_SDMA,
6200}; 4716};
6201 4717
6202static struct omap_hwmod_addr_space omap44xx_usb_otg_hs_addrs[] = {
6203 {
6204 .pa_start = 0x4a0ab000,
6205 .pa_end = 0x4a0ab7ff,
6206 .flags = ADDR_TYPE_RT
6207 },
6208 { }
6209};
6210
6211/* l4_cfg -> usb_otg_hs */ 4718/* l4_cfg -> usb_otg_hs */
6212static struct omap_hwmod_ocp_if omap44xx_l4_cfg__usb_otg_hs = { 4719static struct omap_hwmod_ocp_if omap44xx_l4_cfg__usb_otg_hs = {
6213 .master = &omap44xx_l4_cfg_hwmod, 4720 .master = &omap44xx_l4_cfg_hwmod,
6214 .slave = &omap44xx_usb_otg_hs_hwmod, 4721 .slave = &omap44xx_usb_otg_hs_hwmod,
6215 .clk = "l4_div_ck", 4722 .clk = "l4_div_ck",
6216 .addr = omap44xx_usb_otg_hs_addrs,
6217 .user = OCP_USER_MPU | OCP_USER_SDMA, 4723 .user = OCP_USER_MPU | OCP_USER_SDMA,
6218}; 4724};
6219 4725
6220static struct omap_hwmod_addr_space omap44xx_usb_tll_hs_addrs[] = {
6221 {
6222 .name = "tll",
6223 .pa_start = 0x4a062000,
6224 .pa_end = 0x4a063fff,
6225 .flags = ADDR_TYPE_RT
6226 },
6227 {}
6228};
6229
6230/* l4_cfg -> usb_tll_hs */ 4726/* l4_cfg -> usb_tll_hs */
6231static struct omap_hwmod_ocp_if omap44xx_l4_cfg__usb_tll_hs = { 4727static struct omap_hwmod_ocp_if omap44xx_l4_cfg__usb_tll_hs = {
6232 .master = &omap44xx_l4_cfg_hwmod, 4728 .master = &omap44xx_l4_cfg_hwmod,
6233 .slave = &omap44xx_usb_tll_hs_hwmod, 4729 .slave = &omap44xx_usb_tll_hs_hwmod,
6234 .clk = "l4_div_ck", 4730 .clk = "l4_div_ck",
6235 .addr = omap44xx_usb_tll_hs_addrs,
6236 .user = OCP_USER_MPU | OCP_USER_SDMA, 4731 .user = OCP_USER_MPU | OCP_USER_SDMA,
6237}; 4732};
6238 4733
6239static struct omap_hwmod_addr_space omap44xx_wd_timer2_addrs[] = {
6240 {
6241 .pa_start = 0x4a314000,
6242 .pa_end = 0x4a31407f,
6243 .flags = ADDR_TYPE_RT
6244 },
6245 { }
6246};
6247
6248/* l4_wkup -> wd_timer2 */ 4734/* l4_wkup -> wd_timer2 */
6249static struct omap_hwmod_ocp_if omap44xx_l4_wkup__wd_timer2 = { 4735static struct omap_hwmod_ocp_if omap44xx_l4_wkup__wd_timer2 = {
6250 .master = &omap44xx_l4_wkup_hwmod, 4736 .master = &omap44xx_l4_wkup_hwmod,
6251 .slave = &omap44xx_wd_timer2_hwmod, 4737 .slave = &omap44xx_wd_timer2_hwmod,
6252 .clk = "l4_wkup_clk_mux_ck", 4738 .clk = "l4_wkup_clk_mux_ck",
6253 .addr = omap44xx_wd_timer2_addrs,
6254 .user = OCP_USER_MPU | OCP_USER_SDMA, 4739 .user = OCP_USER_MPU | OCP_USER_SDMA,
6255}; 4740};
6256 4741
@@ -6290,14 +4775,25 @@ static struct omap_hwmod_ocp_if omap44xx_l4_abe__wd_timer3_dma = {
6290 .user = OCP_USER_SDMA, 4775 .user = OCP_USER_SDMA,
6291}; 4776};
6292 4777
4778/* mpu -> emif1 */
4779static struct omap_hwmod_ocp_if omap44xx_mpu__emif1 = {
4780 .master = &omap44xx_mpu_hwmod,
4781 .slave = &omap44xx_emif1_hwmod,
4782 .clk = "l3_div_ck",
4783 .user = OCP_USER_MPU | OCP_USER_SDMA,
4784};
4785
4786/* mpu -> emif2 */
4787static struct omap_hwmod_ocp_if omap44xx_mpu__emif2 = {
4788 .master = &omap44xx_mpu_hwmod,
4789 .slave = &omap44xx_emif2_hwmod,
4790 .clk = "l3_div_ck",
4791 .user = OCP_USER_MPU | OCP_USER_SDMA,
4792};
4793
6293static struct omap_hwmod_ocp_if *omap44xx_hwmod_ocp_ifs[] __initdata = { 4794static struct omap_hwmod_ocp_if *omap44xx_hwmod_ocp_ifs[] __initdata = {
6294 &omap44xx_c2c__c2c_target_fw,
6295 &omap44xx_l4_cfg__c2c_target_fw,
6296 &omap44xx_l3_main_1__dmm, 4795 &omap44xx_l3_main_1__dmm,
6297 &omap44xx_mpu__dmm, 4796 &omap44xx_mpu__dmm,
6298 &omap44xx_c2c__emif_fw,
6299 &omap44xx_dmm__emif_fw,
6300 &omap44xx_l4_cfg__emif_fw,
6301 &omap44xx_iva__l3_instr, 4797 &omap44xx_iva__l3_instr,
6302 &omap44xx_l3_main_3__l3_instr, 4798 &omap44xx_l3_main_3__l3_instr,
6303 &omap44xx_ocp_wp_noc__l3_instr, 4799 &omap44xx_ocp_wp_noc__l3_instr,
@@ -6308,7 +4804,6 @@ static struct omap_hwmod_ocp_if *omap44xx_hwmod_ocp_ifs[] __initdata = {
6308 &omap44xx_mmc1__l3_main_1, 4804 &omap44xx_mmc1__l3_main_1,
6309 &omap44xx_mmc2__l3_main_1, 4805 &omap44xx_mmc2__l3_main_1,
6310 &omap44xx_mpu__l3_main_1, 4806 &omap44xx_mpu__l3_main_1,
6311 &omap44xx_c2c_target_fw__l3_main_2,
6312 &omap44xx_debugss__l3_main_2, 4807 &omap44xx_debugss__l3_main_2,
6313 &omap44xx_dma_system__l3_main_2, 4808 &omap44xx_dma_system__l3_main_2,
6314 &omap44xx_fdif__l3_main_2, 4809 &omap44xx_fdif__l3_main_2,
@@ -6364,8 +4859,6 @@ static struct omap_hwmod_ocp_if *omap44xx_hwmod_ocp_ifs[] __initdata = {
6364 &omap44xx_l3_main_2__dss_venc, 4859 &omap44xx_l3_main_2__dss_venc,
6365 &omap44xx_l4_per__dss_venc, 4860 &omap44xx_l4_per__dss_venc,
6366 &omap44xx_l4_per__elm, 4861 &omap44xx_l4_per__elm,
6367 &omap44xx_emif_fw__emif1,
6368 &omap44xx_emif_fw__emif2,
6369 &omap44xx_l4_cfg__fdif, 4862 &omap44xx_l4_cfg__fdif,
6370 &omap44xx_l4_wkup__gpio1, 4863 &omap44xx_l4_wkup__gpio1,
6371 &omap44xx_l4_per__gpio2, 4864 &omap44xx_l4_per__gpio2,
@@ -6450,6 +4943,8 @@ static struct omap_hwmod_ocp_if *omap44xx_hwmod_ocp_ifs[] __initdata = {
6450 &omap44xx_l4_wkup__wd_timer2, 4943 &omap44xx_l4_wkup__wd_timer2,
6451 &omap44xx_l4_abe__wd_timer3, 4944 &omap44xx_l4_abe__wd_timer3,
6452 &omap44xx_l4_abe__wd_timer3_dma, 4945 &omap44xx_l4_abe__wd_timer3_dma,
4946 &omap44xx_mpu__emif1,
4947 &omap44xx_mpu__emif2,
6453 NULL, 4948 NULL,
6454}; 4949};
6455 4950
diff --git a/arch/arm/mach-omap2/omap_hwmod_54xx_data.c b/arch/arm/mach-omap2/omap_hwmod_54xx_data.c
new file mode 100644
index 000000000000..3c70f5c1860f
--- /dev/null
+++ b/arch/arm/mach-omap2/omap_hwmod_54xx_data.c
@@ -0,0 +1,2151 @@
1/*
2 * Hardware modules present on the OMAP54xx chips
3 *
4 * Copyright (C) 2013 Texas Instruments Incorporated - http://www.ti.com
5 *
6 * Paul Walmsley
7 * Benoit Cousson
8 *
9 * This file is automatically generated from the OMAP hardware databases.
10 * We respectfully ask that any modifications to this file be coordinated
11 * with the public linux-omap@vger.kernel.org mailing list and the
12 * authors above to ensure that the autogeneration scripts are kept
13 * up-to-date with the file contents.
14 *
15 * This program is free software; you can redistribute it and/or modify
16 * it under the terms of the GNU General Public License version 2 as
17 * published by the Free Software Foundation.
18 */
19
20#include <linux/io.h>
21#include <linux/platform_data/gpio-omap.h>
22#include <linux/power/smartreflex.h>
23#include <linux/i2c-omap.h>
24
25#include <linux/omap-dma.h>
26#include <linux/platform_data/spi-omap2-mcspi.h>
27#include <linux/platform_data/asoc-ti-mcbsp.h>
28#include <plat/dmtimer.h>
29
30#include "omap_hwmod.h"
31#include "omap_hwmod_common_data.h"
32#include "cm1_54xx.h"
33#include "cm2_54xx.h"
34#include "prm54xx.h"
35#include "prm-regbits-54xx.h"
36#include "i2c.h"
37#include "mmc.h"
38#include "wd_timer.h"
39
40/* Base offset for all OMAP5 interrupts external to MPUSS */
41#define OMAP54XX_IRQ_GIC_START 32
42
43/* Base offset for all OMAP5 dma requests */
44#define OMAP54XX_DMA_REQ_START 1
45
46
47/*
48 * IP blocks
49 */
50
51/*
52 * 'dmm' class
53 * instance(s): dmm
54 */
55static struct omap_hwmod_class omap54xx_dmm_hwmod_class = {
56 .name = "dmm",
57};
58
59/* dmm */
60static struct omap_hwmod omap54xx_dmm_hwmod = {
61 .name = "dmm",
62 .class = &omap54xx_dmm_hwmod_class,
63 .clkdm_name = "emif_clkdm",
64 .prcm = {
65 .omap4 = {
66 .clkctrl_offs = OMAP54XX_CM_EMIF_DMM_CLKCTRL_OFFSET,
67 .context_offs = OMAP54XX_RM_EMIF_DMM_CONTEXT_OFFSET,
68 },
69 },
70};
71
72/*
73 * 'l3' class
74 * instance(s): l3_instr, l3_main_1, l3_main_2, l3_main_3
75 */
76static struct omap_hwmod_class omap54xx_l3_hwmod_class = {
77 .name = "l3",
78};
79
80/* l3_instr */
81static struct omap_hwmod omap54xx_l3_instr_hwmod = {
82 .name = "l3_instr",
83 .class = &omap54xx_l3_hwmod_class,
84 .clkdm_name = "l3instr_clkdm",
85 .prcm = {
86 .omap4 = {
87 .clkctrl_offs = OMAP54XX_CM_L3INSTR_L3_INSTR_CLKCTRL_OFFSET,
88 .context_offs = OMAP54XX_RM_L3INSTR_L3_INSTR_CONTEXT_OFFSET,
89 .modulemode = MODULEMODE_HWCTRL,
90 },
91 },
92};
93
94/* l3_main_1 */
95static struct omap_hwmod omap54xx_l3_main_1_hwmod = {
96 .name = "l3_main_1",
97 .class = &omap54xx_l3_hwmod_class,
98 .clkdm_name = "l3main1_clkdm",
99 .prcm = {
100 .omap4 = {
101 .clkctrl_offs = OMAP54XX_CM_L3MAIN1_L3_MAIN_1_CLKCTRL_OFFSET,
102 .context_offs = OMAP54XX_RM_L3MAIN1_L3_MAIN_1_CONTEXT_OFFSET,
103 },
104 },
105};
106
107/* l3_main_2 */
108static struct omap_hwmod omap54xx_l3_main_2_hwmod = {
109 .name = "l3_main_2",
110 .class = &omap54xx_l3_hwmod_class,
111 .clkdm_name = "l3main2_clkdm",
112 .prcm = {
113 .omap4 = {
114 .clkctrl_offs = OMAP54XX_CM_L3MAIN2_L3_MAIN_2_CLKCTRL_OFFSET,
115 .context_offs = OMAP54XX_RM_L3MAIN2_L3_MAIN_2_CONTEXT_OFFSET,
116 },
117 },
118};
119
120/* l3_main_3 */
121static struct omap_hwmod omap54xx_l3_main_3_hwmod = {
122 .name = "l3_main_3",
123 .class = &omap54xx_l3_hwmod_class,
124 .clkdm_name = "l3instr_clkdm",
125 .prcm = {
126 .omap4 = {
127 .clkctrl_offs = OMAP54XX_CM_L3INSTR_L3_MAIN_3_CLKCTRL_OFFSET,
128 .context_offs = OMAP54XX_RM_L3INSTR_L3_MAIN_3_CONTEXT_OFFSET,
129 .modulemode = MODULEMODE_HWCTRL,
130 },
131 },
132};
133
134/*
135 * 'l4' class
136 * instance(s): l4_abe, l4_cfg, l4_per, l4_wkup
137 */
138static struct omap_hwmod_class omap54xx_l4_hwmod_class = {
139 .name = "l4",
140};
141
142/* l4_abe */
143static struct omap_hwmod omap54xx_l4_abe_hwmod = {
144 .name = "l4_abe",
145 .class = &omap54xx_l4_hwmod_class,
146 .clkdm_name = "abe_clkdm",
147 .prcm = {
148 .omap4 = {
149 .clkctrl_offs = OMAP54XX_CM_ABE_L4_ABE_CLKCTRL_OFFSET,
150 .flags = HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT,
151 },
152 },
153};
154
155/* l4_cfg */
156static struct omap_hwmod omap54xx_l4_cfg_hwmod = {
157 .name = "l4_cfg",
158 .class = &omap54xx_l4_hwmod_class,
159 .clkdm_name = "l4cfg_clkdm",
160 .prcm = {
161 .omap4 = {
162 .clkctrl_offs = OMAP54XX_CM_L4CFG_L4_CFG_CLKCTRL_OFFSET,
163 .context_offs = OMAP54XX_RM_L4CFG_L4_CFG_CONTEXT_OFFSET,
164 },
165 },
166};
167
168/* l4_per */
169static struct omap_hwmod omap54xx_l4_per_hwmod = {
170 .name = "l4_per",
171 .class = &omap54xx_l4_hwmod_class,
172 .clkdm_name = "l4per_clkdm",
173 .prcm = {
174 .omap4 = {
175 .clkctrl_offs = OMAP54XX_CM_L4PER_L4_PER_CLKCTRL_OFFSET,
176 .context_offs = OMAP54XX_RM_L4PER_L4_PER_CONTEXT_OFFSET,
177 },
178 },
179};
180
181/* l4_wkup */
182static struct omap_hwmod omap54xx_l4_wkup_hwmod = {
183 .name = "l4_wkup",
184 .class = &omap54xx_l4_hwmod_class,
185 .clkdm_name = "wkupaon_clkdm",
186 .prcm = {
187 .omap4 = {
188 .clkctrl_offs = OMAP54XX_CM_WKUPAON_L4_WKUP_CLKCTRL_OFFSET,
189 .context_offs = OMAP54XX_RM_WKUPAON_L4_WKUP_CONTEXT_OFFSET,
190 },
191 },
192};
193
194/*
195 * 'mpu_bus' class
196 * instance(s): mpu_private
197 */
198static struct omap_hwmod_class omap54xx_mpu_bus_hwmod_class = {
199 .name = "mpu_bus",
200};
201
202/* mpu_private */
203static struct omap_hwmod omap54xx_mpu_private_hwmod = {
204 .name = "mpu_private",
205 .class = &omap54xx_mpu_bus_hwmod_class,
206 .clkdm_name = "mpu_clkdm",
207 .prcm = {
208 .omap4 = {
209 .flags = HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT,
210 },
211 },
212};
213
214/*
215 * 'counter' class
216 * 32-bit ordinary counter, clocked by the falling edge of the 32 khz clock
217 */
218
219static struct omap_hwmod_class_sysconfig omap54xx_counter_sysc = {
220 .rev_offs = 0x0000,
221 .sysc_offs = 0x0010,
222 .sysc_flags = SYSC_HAS_SIDLEMODE,
223 .idlemodes = (SIDLE_FORCE | SIDLE_NO),
224 .sysc_fields = &omap_hwmod_sysc_type1,
225};
226
227static struct omap_hwmod_class omap54xx_counter_hwmod_class = {
228 .name = "counter",
229 .sysc = &omap54xx_counter_sysc,
230};
231
232/* counter_32k */
233static struct omap_hwmod omap54xx_counter_32k_hwmod = {
234 .name = "counter_32k",
235 .class = &omap54xx_counter_hwmod_class,
236 .clkdm_name = "wkupaon_clkdm",
237 .flags = HWMOD_SWSUP_SIDLE,
238 .main_clk = "wkupaon_iclk_mux",
239 .prcm = {
240 .omap4 = {
241 .clkctrl_offs = OMAP54XX_CM_WKUPAON_COUNTER_32K_CLKCTRL_OFFSET,
242 .context_offs = OMAP54XX_RM_WKUPAON_COUNTER_32K_CONTEXT_OFFSET,
243 },
244 },
245};
246
247/*
248 * 'dma' class
249 * dma controller for data exchange between memory to memory (i.e. internal or
250 * external memory) and gp peripherals to memory or memory to gp peripherals
251 */
252
253static struct omap_hwmod_class_sysconfig omap54xx_dma_sysc = {
254 .rev_offs = 0x0000,
255 .sysc_offs = 0x002c,
256 .syss_offs = 0x0028,
257 .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY |
258 SYSC_HAS_EMUFREE | SYSC_HAS_MIDLEMODE |
259 SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
260 SYSS_HAS_RESET_STATUS),
261 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
262 MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
263 .sysc_fields = &omap_hwmod_sysc_type1,
264};
265
266static struct omap_hwmod_class omap54xx_dma_hwmod_class = {
267 .name = "dma",
268 .sysc = &omap54xx_dma_sysc,
269};
270
271/* dma dev_attr */
272static struct omap_dma_dev_attr dma_dev_attr = {
273 .dev_caps = RESERVE_CHANNEL | DMA_LINKED_LCH | GLOBAL_PRIORITY |
274 IS_CSSA_32 | IS_CDSA_32 | IS_RW_PRIORITY,
275 .lch_count = 32,
276};
277
278/* dma_system */
279static struct omap_hwmod_irq_info omap54xx_dma_system_irqs[] = {
280 { .name = "0", .irq = 12 + OMAP54XX_IRQ_GIC_START },
281 { .name = "1", .irq = 13 + OMAP54XX_IRQ_GIC_START },
282 { .name = "2", .irq = 14 + OMAP54XX_IRQ_GIC_START },
283 { .name = "3", .irq = 15 + OMAP54XX_IRQ_GIC_START },
284 { .irq = -1 }
285};
286
287static struct omap_hwmod omap54xx_dma_system_hwmod = {
288 .name = "dma_system",
289 .class = &omap54xx_dma_hwmod_class,
290 .clkdm_name = "dma_clkdm",
291 .mpu_irqs = omap54xx_dma_system_irqs,
292 .main_clk = "l3_iclk_div",
293 .prcm = {
294 .omap4 = {
295 .clkctrl_offs = OMAP54XX_CM_DMA_DMA_SYSTEM_CLKCTRL_OFFSET,
296 .context_offs = OMAP54XX_RM_DMA_DMA_SYSTEM_CONTEXT_OFFSET,
297 },
298 },
299 .dev_attr = &dma_dev_attr,
300};
301
302/*
303 * 'dmic' class
304 * digital microphone controller
305 */
306
307static struct omap_hwmod_class_sysconfig omap54xx_dmic_sysc = {
308 .rev_offs = 0x0000,
309 .sysc_offs = 0x0010,
310 .sysc_flags = (SYSC_HAS_EMUFREE | SYSC_HAS_RESET_STATUS |
311 SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET),
312 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
313 SIDLE_SMART_WKUP),
314 .sysc_fields = &omap_hwmod_sysc_type2,
315};
316
317static struct omap_hwmod_class omap54xx_dmic_hwmod_class = {
318 .name = "dmic",
319 .sysc = &omap54xx_dmic_sysc,
320};
321
322/* dmic */
323static struct omap_hwmod omap54xx_dmic_hwmod = {
324 .name = "dmic",
325 .class = &omap54xx_dmic_hwmod_class,
326 .clkdm_name = "abe_clkdm",
327 .main_clk = "dmic_gfclk",
328 .prcm = {
329 .omap4 = {
330 .clkctrl_offs = OMAP54XX_CM_ABE_DMIC_CLKCTRL_OFFSET,
331 .context_offs = OMAP54XX_RM_ABE_DMIC_CONTEXT_OFFSET,
332 .modulemode = MODULEMODE_SWCTRL,
333 },
334 },
335};
336
337/*
338 * 'emif' class
339 * external memory interface no1 (wrapper)
340 */
341
342static struct omap_hwmod_class_sysconfig omap54xx_emif_sysc = {
343 .rev_offs = 0x0000,
344};
345
346static struct omap_hwmod_class omap54xx_emif_hwmod_class = {
347 .name = "emif",
348 .sysc = &omap54xx_emif_sysc,
349};
350
351/* emif1 */
352static struct omap_hwmod omap54xx_emif1_hwmod = {
353 .name = "emif1",
354 .class = &omap54xx_emif_hwmod_class,
355 .clkdm_name = "emif_clkdm",
356 .flags = HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET,
357 .main_clk = "dpll_core_h11x2_ck",
358 .prcm = {
359 .omap4 = {
360 .clkctrl_offs = OMAP54XX_CM_EMIF_EMIF1_CLKCTRL_OFFSET,
361 .context_offs = OMAP54XX_RM_EMIF_EMIF1_CONTEXT_OFFSET,
362 .modulemode = MODULEMODE_HWCTRL,
363 },
364 },
365};
366
367/* emif2 */
368static struct omap_hwmod omap54xx_emif2_hwmod = {
369 .name = "emif2",
370 .class = &omap54xx_emif_hwmod_class,
371 .clkdm_name = "emif_clkdm",
372 .flags = HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET,
373 .main_clk = "dpll_core_h11x2_ck",
374 .prcm = {
375 .omap4 = {
376 .clkctrl_offs = OMAP54XX_CM_EMIF_EMIF2_CLKCTRL_OFFSET,
377 .context_offs = OMAP54XX_RM_EMIF_EMIF2_CONTEXT_OFFSET,
378 .modulemode = MODULEMODE_HWCTRL,
379 },
380 },
381};
382
383/*
384 * 'gpio' class
385 * general purpose io module
386 */
387
388static struct omap_hwmod_class_sysconfig omap54xx_gpio_sysc = {
389 .rev_offs = 0x0000,
390 .sysc_offs = 0x0010,
391 .syss_offs = 0x0114,
392 .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_ENAWAKEUP |
393 SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
394 SYSS_HAS_RESET_STATUS),
395 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
396 SIDLE_SMART_WKUP),
397 .sysc_fields = &omap_hwmod_sysc_type1,
398};
399
400static struct omap_hwmod_class omap54xx_gpio_hwmod_class = {
401 .name = "gpio",
402 .sysc = &omap54xx_gpio_sysc,
403 .rev = 2,
404};
405
406/* gpio dev_attr */
407static struct omap_gpio_dev_attr gpio_dev_attr = {
408 .bank_width = 32,
409 .dbck_flag = true,
410};
411
412/* gpio1 */
413static struct omap_hwmod_opt_clk gpio1_opt_clks[] = {
414 { .role = "dbclk", .clk = "gpio1_dbclk" },
415};
416
417static struct omap_hwmod omap54xx_gpio1_hwmod = {
418 .name = "gpio1",
419 .class = &omap54xx_gpio_hwmod_class,
420 .clkdm_name = "wkupaon_clkdm",
421 .main_clk = "wkupaon_iclk_mux",
422 .prcm = {
423 .omap4 = {
424 .clkctrl_offs = OMAP54XX_CM_WKUPAON_GPIO1_CLKCTRL_OFFSET,
425 .context_offs = OMAP54XX_RM_WKUPAON_GPIO1_CONTEXT_OFFSET,
426 .modulemode = MODULEMODE_HWCTRL,
427 },
428 },
429 .opt_clks = gpio1_opt_clks,
430 .opt_clks_cnt = ARRAY_SIZE(gpio1_opt_clks),
431 .dev_attr = &gpio_dev_attr,
432};
433
434/* gpio2 */
435static struct omap_hwmod_opt_clk gpio2_opt_clks[] = {
436 { .role = "dbclk", .clk = "gpio2_dbclk" },
437};
438
439static struct omap_hwmod omap54xx_gpio2_hwmod = {
440 .name = "gpio2",
441 .class = &omap54xx_gpio_hwmod_class,
442 .clkdm_name = "l4per_clkdm",
443 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
444 .main_clk = "l4_root_clk_div",
445 .prcm = {
446 .omap4 = {
447 .clkctrl_offs = OMAP54XX_CM_L4PER_GPIO2_CLKCTRL_OFFSET,
448 .context_offs = OMAP54XX_RM_L4PER_GPIO2_CONTEXT_OFFSET,
449 .modulemode = MODULEMODE_HWCTRL,
450 },
451 },
452 .opt_clks = gpio2_opt_clks,
453 .opt_clks_cnt = ARRAY_SIZE(gpio2_opt_clks),
454 .dev_attr = &gpio_dev_attr,
455};
456
457/* gpio3 */
458static struct omap_hwmod_opt_clk gpio3_opt_clks[] = {
459 { .role = "dbclk", .clk = "gpio3_dbclk" },
460};
461
462static struct omap_hwmod omap54xx_gpio3_hwmod = {
463 .name = "gpio3",
464 .class = &omap54xx_gpio_hwmod_class,
465 .clkdm_name = "l4per_clkdm",
466 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
467 .main_clk = "l4_root_clk_div",
468 .prcm = {
469 .omap4 = {
470 .clkctrl_offs = OMAP54XX_CM_L4PER_GPIO3_CLKCTRL_OFFSET,
471 .context_offs = OMAP54XX_RM_L4PER_GPIO3_CONTEXT_OFFSET,
472 .modulemode = MODULEMODE_HWCTRL,
473 },
474 },
475 .opt_clks = gpio3_opt_clks,
476 .opt_clks_cnt = ARRAY_SIZE(gpio3_opt_clks),
477 .dev_attr = &gpio_dev_attr,
478};
479
480/* gpio4 */
481static struct omap_hwmod_opt_clk gpio4_opt_clks[] = {
482 { .role = "dbclk", .clk = "gpio4_dbclk" },
483};
484
485static struct omap_hwmod omap54xx_gpio4_hwmod = {
486 .name = "gpio4",
487 .class = &omap54xx_gpio_hwmod_class,
488 .clkdm_name = "l4per_clkdm",
489 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
490 .main_clk = "l4_root_clk_div",
491 .prcm = {
492 .omap4 = {
493 .clkctrl_offs = OMAP54XX_CM_L4PER_GPIO4_CLKCTRL_OFFSET,
494 .context_offs = OMAP54XX_RM_L4PER_GPIO4_CONTEXT_OFFSET,
495 .modulemode = MODULEMODE_HWCTRL,
496 },
497 },
498 .opt_clks = gpio4_opt_clks,
499 .opt_clks_cnt = ARRAY_SIZE(gpio4_opt_clks),
500 .dev_attr = &gpio_dev_attr,
501};
502
503/* gpio5 */
504static struct omap_hwmod_opt_clk gpio5_opt_clks[] = {
505 { .role = "dbclk", .clk = "gpio5_dbclk" },
506};
507
508static struct omap_hwmod omap54xx_gpio5_hwmod = {
509 .name = "gpio5",
510 .class = &omap54xx_gpio_hwmod_class,
511 .clkdm_name = "l4per_clkdm",
512 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
513 .main_clk = "l4_root_clk_div",
514 .prcm = {
515 .omap4 = {
516 .clkctrl_offs = OMAP54XX_CM_L4PER_GPIO5_CLKCTRL_OFFSET,
517 .context_offs = OMAP54XX_RM_L4PER_GPIO5_CONTEXT_OFFSET,
518 .modulemode = MODULEMODE_HWCTRL,
519 },
520 },
521 .opt_clks = gpio5_opt_clks,
522 .opt_clks_cnt = ARRAY_SIZE(gpio5_opt_clks),
523 .dev_attr = &gpio_dev_attr,
524};
525
526/* gpio6 */
527static struct omap_hwmod_opt_clk gpio6_opt_clks[] = {
528 { .role = "dbclk", .clk = "gpio6_dbclk" },
529};
530
531static struct omap_hwmod omap54xx_gpio6_hwmod = {
532 .name = "gpio6",
533 .class = &omap54xx_gpio_hwmod_class,
534 .clkdm_name = "l4per_clkdm",
535 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
536 .main_clk = "l4_root_clk_div",
537 .prcm = {
538 .omap4 = {
539 .clkctrl_offs = OMAP54XX_CM_L4PER_GPIO6_CLKCTRL_OFFSET,
540 .context_offs = OMAP54XX_RM_L4PER_GPIO6_CONTEXT_OFFSET,
541 .modulemode = MODULEMODE_HWCTRL,
542 },
543 },
544 .opt_clks = gpio6_opt_clks,
545 .opt_clks_cnt = ARRAY_SIZE(gpio6_opt_clks),
546 .dev_attr = &gpio_dev_attr,
547};
548
549/* gpio7 */
550static struct omap_hwmod_opt_clk gpio7_opt_clks[] = {
551 { .role = "dbclk", .clk = "gpio7_dbclk" },
552};
553
554static struct omap_hwmod omap54xx_gpio7_hwmod = {
555 .name = "gpio7",
556 .class = &omap54xx_gpio_hwmod_class,
557 .clkdm_name = "l4per_clkdm",
558 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
559 .main_clk = "l4_root_clk_div",
560 .prcm = {
561 .omap4 = {
562 .clkctrl_offs = OMAP54XX_CM_L4PER_GPIO7_CLKCTRL_OFFSET,
563 .context_offs = OMAP54XX_RM_L4PER_GPIO7_CONTEXT_OFFSET,
564 .modulemode = MODULEMODE_HWCTRL,
565 },
566 },
567 .opt_clks = gpio7_opt_clks,
568 .opt_clks_cnt = ARRAY_SIZE(gpio7_opt_clks),
569 .dev_attr = &gpio_dev_attr,
570};
571
572/* gpio8 */
573static struct omap_hwmod_opt_clk gpio8_opt_clks[] = {
574 { .role = "dbclk", .clk = "gpio8_dbclk" },
575};
576
577static struct omap_hwmod omap54xx_gpio8_hwmod = {
578 .name = "gpio8",
579 .class = &omap54xx_gpio_hwmod_class,
580 .clkdm_name = "l4per_clkdm",
581 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
582 .main_clk = "l4_root_clk_div",
583 .prcm = {
584 .omap4 = {
585 .clkctrl_offs = OMAP54XX_CM_L4PER_GPIO8_CLKCTRL_OFFSET,
586 .context_offs = OMAP54XX_RM_L4PER_GPIO8_CONTEXT_OFFSET,
587 .modulemode = MODULEMODE_HWCTRL,
588 },
589 },
590 .opt_clks = gpio8_opt_clks,
591 .opt_clks_cnt = ARRAY_SIZE(gpio8_opt_clks),
592 .dev_attr = &gpio_dev_attr,
593};
594
595/*
596 * 'i2c' class
597 * multimaster high-speed i2c controller
598 */
599
600static struct omap_hwmod_class_sysconfig omap54xx_i2c_sysc = {
601 .sysc_offs = 0x0010,
602 .syss_offs = 0x0090,
603 .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY |
604 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SIDLEMODE |
605 SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
606 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
607 SIDLE_SMART_WKUP),
608 .clockact = CLOCKACT_TEST_ICLK,
609 .sysc_fields = &omap_hwmod_sysc_type1,
610};
611
612static struct omap_hwmod_class omap54xx_i2c_hwmod_class = {
613 .name = "i2c",
614 .sysc = &omap54xx_i2c_sysc,
615 .reset = &omap_i2c_reset,
616 .rev = OMAP_I2C_IP_VERSION_2,
617};
618
619/* i2c dev_attr */
620static struct omap_i2c_dev_attr i2c_dev_attr = {
621 .flags = OMAP_I2C_FLAG_BUS_SHIFT_NONE,
622};
623
624/* i2c1 */
625static struct omap_hwmod omap54xx_i2c1_hwmod = {
626 .name = "i2c1",
627 .class = &omap54xx_i2c_hwmod_class,
628 .clkdm_name = "l4per_clkdm",
629 .flags = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT,
630 .main_clk = "func_96m_fclk",
631 .prcm = {
632 .omap4 = {
633 .clkctrl_offs = OMAP54XX_CM_L4PER_I2C1_CLKCTRL_OFFSET,
634 .context_offs = OMAP54XX_RM_L4PER_I2C1_CONTEXT_OFFSET,
635 .modulemode = MODULEMODE_SWCTRL,
636 },
637 },
638 .dev_attr = &i2c_dev_attr,
639};
640
641/* i2c2 */
642static struct omap_hwmod omap54xx_i2c2_hwmod = {
643 .name = "i2c2",
644 .class = &omap54xx_i2c_hwmod_class,
645 .clkdm_name = "l4per_clkdm",
646 .flags = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT,
647 .main_clk = "func_96m_fclk",
648 .prcm = {
649 .omap4 = {
650 .clkctrl_offs = OMAP54XX_CM_L4PER_I2C2_CLKCTRL_OFFSET,
651 .context_offs = OMAP54XX_RM_L4PER_I2C2_CONTEXT_OFFSET,
652 .modulemode = MODULEMODE_SWCTRL,
653 },
654 },
655 .dev_attr = &i2c_dev_attr,
656};
657
658/* i2c3 */
659static struct omap_hwmod omap54xx_i2c3_hwmod = {
660 .name = "i2c3",
661 .class = &omap54xx_i2c_hwmod_class,
662 .clkdm_name = "l4per_clkdm",
663 .flags = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT,
664 .main_clk = "func_96m_fclk",
665 .prcm = {
666 .omap4 = {
667 .clkctrl_offs = OMAP54XX_CM_L4PER_I2C3_CLKCTRL_OFFSET,
668 .context_offs = OMAP54XX_RM_L4PER_I2C3_CONTEXT_OFFSET,
669 .modulemode = MODULEMODE_SWCTRL,
670 },
671 },
672 .dev_attr = &i2c_dev_attr,
673};
674
675/* i2c4 */
676static struct omap_hwmod omap54xx_i2c4_hwmod = {
677 .name = "i2c4",
678 .class = &omap54xx_i2c_hwmod_class,
679 .clkdm_name = "l4per_clkdm",
680 .flags = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT,
681 .main_clk = "func_96m_fclk",
682 .prcm = {
683 .omap4 = {
684 .clkctrl_offs = OMAP54XX_CM_L4PER_I2C4_CLKCTRL_OFFSET,
685 .context_offs = OMAP54XX_RM_L4PER_I2C4_CONTEXT_OFFSET,
686 .modulemode = MODULEMODE_SWCTRL,
687 },
688 },
689 .dev_attr = &i2c_dev_attr,
690};
691
692/* i2c5 */
693static struct omap_hwmod omap54xx_i2c5_hwmod = {
694 .name = "i2c5",
695 .class = &omap54xx_i2c_hwmod_class,
696 .clkdm_name = "l4per_clkdm",
697 .flags = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT,
698 .main_clk = "func_96m_fclk",
699 .prcm = {
700 .omap4 = {
701 .clkctrl_offs = OMAP54XX_CM_L4PER_I2C5_CLKCTRL_OFFSET,
702 .context_offs = OMAP54XX_RM_L4PER_I2C5_CONTEXT_OFFSET,
703 .modulemode = MODULEMODE_SWCTRL,
704 },
705 },
706 .dev_attr = &i2c_dev_attr,
707};
708
709/*
710 * 'kbd' class
711 * keyboard controller
712 */
713
714static struct omap_hwmod_class_sysconfig omap54xx_kbd_sysc = {
715 .rev_offs = 0x0000,
716 .sysc_offs = 0x0010,
717 .sysc_flags = (SYSC_HAS_EMUFREE | SYSC_HAS_SIDLEMODE |
718 SYSC_HAS_SOFTRESET),
719 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
720 .sysc_fields = &omap_hwmod_sysc_type1,
721};
722
723static struct omap_hwmod_class omap54xx_kbd_hwmod_class = {
724 .name = "kbd",
725 .sysc = &omap54xx_kbd_sysc,
726};
727
728/* kbd */
729static struct omap_hwmod omap54xx_kbd_hwmod = {
730 .name = "kbd",
731 .class = &omap54xx_kbd_hwmod_class,
732 .clkdm_name = "wkupaon_clkdm",
733 .main_clk = "sys_32k_ck",
734 .prcm = {
735 .omap4 = {
736 .clkctrl_offs = OMAP54XX_CM_WKUPAON_KBD_CLKCTRL_OFFSET,
737 .context_offs = OMAP54XX_RM_WKUPAON_KBD_CONTEXT_OFFSET,
738 .modulemode = MODULEMODE_SWCTRL,
739 },
740 },
741};
742
743/*
744 * 'mcbsp' class
745 * multi channel buffered serial port controller
746 */
747
748static struct omap_hwmod_class_sysconfig omap54xx_mcbsp_sysc = {
749 .sysc_offs = 0x008c,
750 .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_ENAWAKEUP |
751 SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET),
752 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
753 .sysc_fields = &omap_hwmod_sysc_type1,
754};
755
756static struct omap_hwmod_class omap54xx_mcbsp_hwmod_class = {
757 .name = "mcbsp",
758 .sysc = &omap54xx_mcbsp_sysc,
759 .rev = MCBSP_CONFIG_TYPE4,
760};
761
762/* mcbsp1 */
763static struct omap_hwmod_opt_clk mcbsp1_opt_clks[] = {
764 { .role = "pad_fck", .clk = "pad_clks_ck" },
765 { .role = "prcm_fck", .clk = "mcbsp1_sync_mux_ck" },
766};
767
768static struct omap_hwmod omap54xx_mcbsp1_hwmod = {
769 .name = "mcbsp1",
770 .class = &omap54xx_mcbsp_hwmod_class,
771 .clkdm_name = "abe_clkdm",
772 .main_clk = "mcbsp1_gfclk",
773 .prcm = {
774 .omap4 = {
775 .clkctrl_offs = OMAP54XX_CM_ABE_MCBSP1_CLKCTRL_OFFSET,
776 .context_offs = OMAP54XX_RM_ABE_MCBSP1_CONTEXT_OFFSET,
777 .modulemode = MODULEMODE_SWCTRL,
778 },
779 },
780 .opt_clks = mcbsp1_opt_clks,
781 .opt_clks_cnt = ARRAY_SIZE(mcbsp1_opt_clks),
782};
783
784/* mcbsp2 */
785static struct omap_hwmod_opt_clk mcbsp2_opt_clks[] = {
786 { .role = "pad_fck", .clk = "pad_clks_ck" },
787 { .role = "prcm_fck", .clk = "mcbsp2_sync_mux_ck" },
788};
789
790static struct omap_hwmod omap54xx_mcbsp2_hwmod = {
791 .name = "mcbsp2",
792 .class = &omap54xx_mcbsp_hwmod_class,
793 .clkdm_name = "abe_clkdm",
794 .main_clk = "mcbsp2_gfclk",
795 .prcm = {
796 .omap4 = {
797 .clkctrl_offs = OMAP54XX_CM_ABE_MCBSP2_CLKCTRL_OFFSET,
798 .context_offs = OMAP54XX_RM_ABE_MCBSP2_CONTEXT_OFFSET,
799 .modulemode = MODULEMODE_SWCTRL,
800 },
801 },
802 .opt_clks = mcbsp2_opt_clks,
803 .opt_clks_cnt = ARRAY_SIZE(mcbsp2_opt_clks),
804};
805
806/* mcbsp3 */
807static struct omap_hwmod_opt_clk mcbsp3_opt_clks[] = {
808 { .role = "pad_fck", .clk = "pad_clks_ck" },
809 { .role = "prcm_fck", .clk = "mcbsp3_sync_mux_ck" },
810};
811
812static struct omap_hwmod omap54xx_mcbsp3_hwmod = {
813 .name = "mcbsp3",
814 .class = &omap54xx_mcbsp_hwmod_class,
815 .clkdm_name = "abe_clkdm",
816 .main_clk = "mcbsp3_gfclk",
817 .prcm = {
818 .omap4 = {
819 .clkctrl_offs = OMAP54XX_CM_ABE_MCBSP3_CLKCTRL_OFFSET,
820 .context_offs = OMAP54XX_RM_ABE_MCBSP3_CONTEXT_OFFSET,
821 .modulemode = MODULEMODE_SWCTRL,
822 },
823 },
824 .opt_clks = mcbsp3_opt_clks,
825 .opt_clks_cnt = ARRAY_SIZE(mcbsp3_opt_clks),
826};
827
828/*
829 * 'mcpdm' class
830 * multi channel pdm controller (proprietary interface with phoenix power
831 * ic)
832 */
833
834static struct omap_hwmod_class_sysconfig omap54xx_mcpdm_sysc = {
835 .rev_offs = 0x0000,
836 .sysc_offs = 0x0010,
837 .sysc_flags = (SYSC_HAS_EMUFREE | SYSC_HAS_RESET_STATUS |
838 SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET),
839 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
840 SIDLE_SMART_WKUP),
841 .sysc_fields = &omap_hwmod_sysc_type2,
842};
843
844static struct omap_hwmod_class omap54xx_mcpdm_hwmod_class = {
845 .name = "mcpdm",
846 .sysc = &omap54xx_mcpdm_sysc,
847};
848
849/* mcpdm */
850static struct omap_hwmod omap54xx_mcpdm_hwmod = {
851 .name = "mcpdm",
852 .class = &omap54xx_mcpdm_hwmod_class,
853 .clkdm_name = "abe_clkdm",
854 /*
855 * It's suspected that the McPDM requires an off-chip main
856 * functional clock, controlled via I2C. This IP block is
857 * currently reset very early during boot, before I2C is
858 * available, so it doesn't seem that we have any choice in
859 * the kernel other than to avoid resetting it. XXX This is
860 * really a hardware issue workaround: every IP block should
861 * be able to source its main functional clock from either
862 * on-chip or off-chip sources. McPDM seems to be the only
863 * current exception.
864 */
865
866 .flags = HWMOD_EXT_OPT_MAIN_CLK,
867 .main_clk = "pad_clks_ck",
868 .prcm = {
869 .omap4 = {
870 .clkctrl_offs = OMAP54XX_CM_ABE_MCPDM_CLKCTRL_OFFSET,
871 .context_offs = OMAP54XX_RM_ABE_MCPDM_CONTEXT_OFFSET,
872 .modulemode = MODULEMODE_SWCTRL,
873 },
874 },
875};
876
877/*
878 * 'mcspi' class
879 * multichannel serial port interface (mcspi) / master/slave synchronous serial
880 * bus
881 */
882
883static struct omap_hwmod_class_sysconfig omap54xx_mcspi_sysc = {
884 .rev_offs = 0x0000,
885 .sysc_offs = 0x0010,
886 .sysc_flags = (SYSC_HAS_EMUFREE | SYSC_HAS_RESET_STATUS |
887 SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET),
888 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
889 SIDLE_SMART_WKUP),
890 .sysc_fields = &omap_hwmod_sysc_type2,
891};
892
893static struct omap_hwmod_class omap54xx_mcspi_hwmod_class = {
894 .name = "mcspi",
895 .sysc = &omap54xx_mcspi_sysc,
896 .rev = OMAP4_MCSPI_REV,
897};
898
899/* mcspi1 */
900/* mcspi1 dev_attr */
901static struct omap2_mcspi_dev_attr mcspi1_dev_attr = {
902 .num_chipselect = 4,
903};
904
905static struct omap_hwmod omap54xx_mcspi1_hwmod = {
906 .name = "mcspi1",
907 .class = &omap54xx_mcspi_hwmod_class,
908 .clkdm_name = "l4per_clkdm",
909 .main_clk = "func_48m_fclk",
910 .prcm = {
911 .omap4 = {
912 .clkctrl_offs = OMAP54XX_CM_L4PER_MCSPI1_CLKCTRL_OFFSET,
913 .context_offs = OMAP54XX_RM_L4PER_MCSPI1_CONTEXT_OFFSET,
914 .modulemode = MODULEMODE_SWCTRL,
915 },
916 },
917 .dev_attr = &mcspi1_dev_attr,
918};
919
920/* mcspi2 */
921/* mcspi2 dev_attr */
922static struct omap2_mcspi_dev_attr mcspi2_dev_attr = {
923 .num_chipselect = 2,
924};
925
926static struct omap_hwmod omap54xx_mcspi2_hwmod = {
927 .name = "mcspi2",
928 .class = &omap54xx_mcspi_hwmod_class,
929 .clkdm_name = "l4per_clkdm",
930 .main_clk = "func_48m_fclk",
931 .prcm = {
932 .omap4 = {
933 .clkctrl_offs = OMAP54XX_CM_L4PER_MCSPI2_CLKCTRL_OFFSET,
934 .context_offs = OMAP54XX_RM_L4PER_MCSPI2_CONTEXT_OFFSET,
935 .modulemode = MODULEMODE_SWCTRL,
936 },
937 },
938 .dev_attr = &mcspi2_dev_attr,
939};
940
941/* mcspi3 */
942/* mcspi3 dev_attr */
943static struct omap2_mcspi_dev_attr mcspi3_dev_attr = {
944 .num_chipselect = 2,
945};
946
947static struct omap_hwmod omap54xx_mcspi3_hwmod = {
948 .name = "mcspi3",
949 .class = &omap54xx_mcspi_hwmod_class,
950 .clkdm_name = "l4per_clkdm",
951 .main_clk = "func_48m_fclk",
952 .prcm = {
953 .omap4 = {
954 .clkctrl_offs = OMAP54XX_CM_L4PER_MCSPI3_CLKCTRL_OFFSET,
955 .context_offs = OMAP54XX_RM_L4PER_MCSPI3_CONTEXT_OFFSET,
956 .modulemode = MODULEMODE_SWCTRL,
957 },
958 },
959 .dev_attr = &mcspi3_dev_attr,
960};
961
962/* mcspi4 */
963/* mcspi4 dev_attr */
964static struct omap2_mcspi_dev_attr mcspi4_dev_attr = {
965 .num_chipselect = 1,
966};
967
968static struct omap_hwmod omap54xx_mcspi4_hwmod = {
969 .name = "mcspi4",
970 .class = &omap54xx_mcspi_hwmod_class,
971 .clkdm_name = "l4per_clkdm",
972 .main_clk = "func_48m_fclk",
973 .prcm = {
974 .omap4 = {
975 .clkctrl_offs = OMAP54XX_CM_L4PER_MCSPI4_CLKCTRL_OFFSET,
976 .context_offs = OMAP54XX_RM_L4PER_MCSPI4_CONTEXT_OFFSET,
977 .modulemode = MODULEMODE_SWCTRL,
978 },
979 },
980 .dev_attr = &mcspi4_dev_attr,
981};
982
983/*
984 * 'mmc' class
985 * multimedia card high-speed/sd/sdio (mmc/sd/sdio) host controller
986 */
987
988static struct omap_hwmod_class_sysconfig omap54xx_mmc_sysc = {
989 .rev_offs = 0x0000,
990 .sysc_offs = 0x0010,
991 .sysc_flags = (SYSC_HAS_EMUFREE | SYSC_HAS_MIDLEMODE |
992 SYSC_HAS_RESET_STATUS | SYSC_HAS_SIDLEMODE |
993 SYSC_HAS_SOFTRESET),
994 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
995 SIDLE_SMART_WKUP | MSTANDBY_FORCE | MSTANDBY_NO |
996 MSTANDBY_SMART | MSTANDBY_SMART_WKUP),
997 .sysc_fields = &omap_hwmod_sysc_type2,
998};
999
1000static struct omap_hwmod_class omap54xx_mmc_hwmod_class = {
1001 .name = "mmc",
1002 .sysc = &omap54xx_mmc_sysc,
1003};
1004
1005/* mmc1 */
1006static struct omap_hwmod_opt_clk mmc1_opt_clks[] = {
1007 { .role = "32khz_clk", .clk = "mmc1_32khz_clk" },
1008};
1009
1010/* mmc1 dev_attr */
1011static struct omap_mmc_dev_attr mmc1_dev_attr = {
1012 .flags = OMAP_HSMMC_SUPPORTS_DUAL_VOLT,
1013};
1014
1015static struct omap_hwmod omap54xx_mmc1_hwmod = {
1016 .name = "mmc1",
1017 .class = &omap54xx_mmc_hwmod_class,
1018 .clkdm_name = "l3init_clkdm",
1019 .main_clk = "mmc1_fclk",
1020 .prcm = {
1021 .omap4 = {
1022 .clkctrl_offs = OMAP54XX_CM_L3INIT_MMC1_CLKCTRL_OFFSET,
1023 .context_offs = OMAP54XX_RM_L3INIT_MMC1_CONTEXT_OFFSET,
1024 .modulemode = MODULEMODE_SWCTRL,
1025 },
1026 },
1027 .opt_clks = mmc1_opt_clks,
1028 .opt_clks_cnt = ARRAY_SIZE(mmc1_opt_clks),
1029 .dev_attr = &mmc1_dev_attr,
1030};
1031
1032/* mmc2 */
1033static struct omap_hwmod omap54xx_mmc2_hwmod = {
1034 .name = "mmc2",
1035 .class = &omap54xx_mmc_hwmod_class,
1036 .clkdm_name = "l3init_clkdm",
1037 .main_clk = "mmc2_fclk",
1038 .prcm = {
1039 .omap4 = {
1040 .clkctrl_offs = OMAP54XX_CM_L3INIT_MMC2_CLKCTRL_OFFSET,
1041 .context_offs = OMAP54XX_RM_L3INIT_MMC2_CONTEXT_OFFSET,
1042 .modulemode = MODULEMODE_SWCTRL,
1043 },
1044 },
1045};
1046
1047/* mmc3 */
1048static struct omap_hwmod omap54xx_mmc3_hwmod = {
1049 .name = "mmc3",
1050 .class = &omap54xx_mmc_hwmod_class,
1051 .clkdm_name = "l4per_clkdm",
1052 .main_clk = "func_48m_fclk",
1053 .prcm = {
1054 .omap4 = {
1055 .clkctrl_offs = OMAP54XX_CM_L4PER_MMC3_CLKCTRL_OFFSET,
1056 .context_offs = OMAP54XX_RM_L4PER_MMC3_CONTEXT_OFFSET,
1057 .modulemode = MODULEMODE_SWCTRL,
1058 },
1059 },
1060};
1061
1062/* mmc4 */
1063static struct omap_hwmod omap54xx_mmc4_hwmod = {
1064 .name = "mmc4",
1065 .class = &omap54xx_mmc_hwmod_class,
1066 .clkdm_name = "l4per_clkdm",
1067 .main_clk = "func_48m_fclk",
1068 .prcm = {
1069 .omap4 = {
1070 .clkctrl_offs = OMAP54XX_CM_L4PER_MMC4_CLKCTRL_OFFSET,
1071 .context_offs = OMAP54XX_RM_L4PER_MMC4_CONTEXT_OFFSET,
1072 .modulemode = MODULEMODE_SWCTRL,
1073 },
1074 },
1075};
1076
1077/* mmc5 */
1078static struct omap_hwmod omap54xx_mmc5_hwmod = {
1079 .name = "mmc5",
1080 .class = &omap54xx_mmc_hwmod_class,
1081 .clkdm_name = "l4per_clkdm",
1082 .main_clk = "func_96m_fclk",
1083 .prcm = {
1084 .omap4 = {
1085 .clkctrl_offs = OMAP54XX_CM_L4PER_MMC5_CLKCTRL_OFFSET,
1086 .context_offs = OMAP54XX_RM_L4PER_MMC5_CONTEXT_OFFSET,
1087 .modulemode = MODULEMODE_SWCTRL,
1088 },
1089 },
1090};
1091
1092/*
1093 * 'mpu' class
1094 * mpu sub-system
1095 */
1096
1097static struct omap_hwmod_class omap54xx_mpu_hwmod_class = {
1098 .name = "mpu",
1099};
1100
1101/* mpu */
1102static struct omap_hwmod omap54xx_mpu_hwmod = {
1103 .name = "mpu",
1104 .class = &omap54xx_mpu_hwmod_class,
1105 .clkdm_name = "mpu_clkdm",
1106 .flags = HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET,
1107 .main_clk = "dpll_mpu_m2_ck",
1108 .prcm = {
1109 .omap4 = {
1110 .clkctrl_offs = OMAP54XX_CM_MPU_MPU_CLKCTRL_OFFSET,
1111 .context_offs = OMAP54XX_RM_MPU_MPU_CONTEXT_OFFSET,
1112 },
1113 },
1114};
1115
1116/*
1117 * 'timer' class
1118 * general purpose timer module with accurate 1ms tick
1119 * This class contains several variants: ['timer_1ms', 'timer']
1120 */
1121
1122static struct omap_hwmod_class_sysconfig omap54xx_timer_1ms_sysc = {
1123 .rev_offs = 0x0000,
1124 .sysc_offs = 0x0010,
1125 .sysc_flags = (SYSC_HAS_EMUFREE | SYSC_HAS_RESET_STATUS |
1126 SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET),
1127 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
1128 SIDLE_SMART_WKUP),
1129 .sysc_fields = &omap_hwmod_sysc_type2,
1130 .clockact = CLOCKACT_TEST_ICLK,
1131};
1132
1133static struct omap_hwmod_class omap54xx_timer_1ms_hwmod_class = {
1134 .name = "timer",
1135 .sysc = &omap54xx_timer_1ms_sysc,
1136};
1137
1138static struct omap_hwmod_class_sysconfig omap54xx_timer_sysc = {
1139 .rev_offs = 0x0000,
1140 .sysc_offs = 0x0010,
1141 .sysc_flags = (SYSC_HAS_EMUFREE | SYSC_HAS_RESET_STATUS |
1142 SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET),
1143 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
1144 SIDLE_SMART_WKUP),
1145 .sysc_fields = &omap_hwmod_sysc_type2,
1146};
1147
1148static struct omap_hwmod_class omap54xx_timer_hwmod_class = {
1149 .name = "timer",
1150 .sysc = &omap54xx_timer_sysc,
1151};
1152
1153/* timer1 */
1154static struct omap_hwmod omap54xx_timer1_hwmod = {
1155 .name = "timer1",
1156 .class = &omap54xx_timer_1ms_hwmod_class,
1157 .clkdm_name = "wkupaon_clkdm",
1158 .main_clk = "timer1_gfclk_mux",
1159 .flags = HWMOD_SET_DEFAULT_CLOCKACT,
1160 .prcm = {
1161 .omap4 = {
1162 .clkctrl_offs = OMAP54XX_CM_WKUPAON_TIMER1_CLKCTRL_OFFSET,
1163 .context_offs = OMAP54XX_RM_WKUPAON_TIMER1_CONTEXT_OFFSET,
1164 .modulemode = MODULEMODE_SWCTRL,
1165 },
1166 },
1167};
1168
1169/* timer2 */
1170static struct omap_hwmod omap54xx_timer2_hwmod = {
1171 .name = "timer2",
1172 .class = &omap54xx_timer_1ms_hwmod_class,
1173 .clkdm_name = "l4per_clkdm",
1174 .main_clk = "timer2_gfclk_mux",
1175 .flags = HWMOD_SET_DEFAULT_CLOCKACT,
1176 .prcm = {
1177 .omap4 = {
1178 .clkctrl_offs = OMAP54XX_CM_L4PER_TIMER2_CLKCTRL_OFFSET,
1179 .context_offs = OMAP54XX_RM_L4PER_TIMER2_CONTEXT_OFFSET,
1180 .modulemode = MODULEMODE_SWCTRL,
1181 },
1182 },
1183};
1184
1185/* timer3 */
1186static struct omap_hwmod omap54xx_timer3_hwmod = {
1187 .name = "timer3",
1188 .class = &omap54xx_timer_hwmod_class,
1189 .clkdm_name = "l4per_clkdm",
1190 .main_clk = "timer3_gfclk_mux",
1191 .prcm = {
1192 .omap4 = {
1193 .clkctrl_offs = OMAP54XX_CM_L4PER_TIMER3_CLKCTRL_OFFSET,
1194 .context_offs = OMAP54XX_RM_L4PER_TIMER3_CONTEXT_OFFSET,
1195 .modulemode = MODULEMODE_SWCTRL,
1196 },
1197 },
1198};
1199
1200/* timer4 */
1201static struct omap_hwmod omap54xx_timer4_hwmod = {
1202 .name = "timer4",
1203 .class = &omap54xx_timer_hwmod_class,
1204 .clkdm_name = "l4per_clkdm",
1205 .main_clk = "timer4_gfclk_mux",
1206 .prcm = {
1207 .omap4 = {
1208 .clkctrl_offs = OMAP54XX_CM_L4PER_TIMER4_CLKCTRL_OFFSET,
1209 .context_offs = OMAP54XX_RM_L4PER_TIMER4_CONTEXT_OFFSET,
1210 .modulemode = MODULEMODE_SWCTRL,
1211 },
1212 },
1213};
1214
1215/* timer5 */
1216static struct omap_hwmod omap54xx_timer5_hwmod = {
1217 .name = "timer5",
1218 .class = &omap54xx_timer_hwmod_class,
1219 .clkdm_name = "abe_clkdm",
1220 .main_clk = "timer5_gfclk_mux",
1221 .prcm = {
1222 .omap4 = {
1223 .clkctrl_offs = OMAP54XX_CM_ABE_TIMER5_CLKCTRL_OFFSET,
1224 .context_offs = OMAP54XX_RM_ABE_TIMER5_CONTEXT_OFFSET,
1225 .modulemode = MODULEMODE_SWCTRL,
1226 },
1227 },
1228};
1229
1230/* timer6 */
1231static struct omap_hwmod omap54xx_timer6_hwmod = {
1232 .name = "timer6",
1233 .class = &omap54xx_timer_hwmod_class,
1234 .clkdm_name = "abe_clkdm",
1235 .main_clk = "timer6_gfclk_mux",
1236 .prcm = {
1237 .omap4 = {
1238 .clkctrl_offs = OMAP54XX_CM_ABE_TIMER6_CLKCTRL_OFFSET,
1239 .context_offs = OMAP54XX_RM_ABE_TIMER6_CONTEXT_OFFSET,
1240 .modulemode = MODULEMODE_SWCTRL,
1241 },
1242 },
1243};
1244
1245/* timer7 */
1246static struct omap_hwmod omap54xx_timer7_hwmod = {
1247 .name = "timer7",
1248 .class = &omap54xx_timer_hwmod_class,
1249 .clkdm_name = "abe_clkdm",
1250 .main_clk = "timer7_gfclk_mux",
1251 .prcm = {
1252 .omap4 = {
1253 .clkctrl_offs = OMAP54XX_CM_ABE_TIMER7_CLKCTRL_OFFSET,
1254 .context_offs = OMAP54XX_RM_ABE_TIMER7_CONTEXT_OFFSET,
1255 .modulemode = MODULEMODE_SWCTRL,
1256 },
1257 },
1258};
1259
1260/* timer8 */
1261static struct omap_hwmod omap54xx_timer8_hwmod = {
1262 .name = "timer8",
1263 .class = &omap54xx_timer_hwmod_class,
1264 .clkdm_name = "abe_clkdm",
1265 .main_clk = "timer8_gfclk_mux",
1266 .prcm = {
1267 .omap4 = {
1268 .clkctrl_offs = OMAP54XX_CM_ABE_TIMER8_CLKCTRL_OFFSET,
1269 .context_offs = OMAP54XX_RM_ABE_TIMER8_CONTEXT_OFFSET,
1270 .modulemode = MODULEMODE_SWCTRL,
1271 },
1272 },
1273};
1274
1275/* timer9 */
1276static struct omap_hwmod omap54xx_timer9_hwmod = {
1277 .name = "timer9",
1278 .class = &omap54xx_timer_hwmod_class,
1279 .clkdm_name = "l4per_clkdm",
1280 .main_clk = "timer9_gfclk_mux",
1281 .prcm = {
1282 .omap4 = {
1283 .clkctrl_offs = OMAP54XX_CM_L4PER_TIMER9_CLKCTRL_OFFSET,
1284 .context_offs = OMAP54XX_RM_L4PER_TIMER9_CONTEXT_OFFSET,
1285 .modulemode = MODULEMODE_SWCTRL,
1286 },
1287 },
1288};
1289
1290/* timer10 */
1291static struct omap_hwmod omap54xx_timer10_hwmod = {
1292 .name = "timer10",
1293 .class = &omap54xx_timer_1ms_hwmod_class,
1294 .clkdm_name = "l4per_clkdm",
1295 .main_clk = "timer10_gfclk_mux",
1296 .flags = HWMOD_SET_DEFAULT_CLOCKACT,
1297 .prcm = {
1298 .omap4 = {
1299 .clkctrl_offs = OMAP54XX_CM_L4PER_TIMER10_CLKCTRL_OFFSET,
1300 .context_offs = OMAP54XX_RM_L4PER_TIMER10_CONTEXT_OFFSET,
1301 .modulemode = MODULEMODE_SWCTRL,
1302 },
1303 },
1304};
1305
1306/* timer11 */
1307static struct omap_hwmod omap54xx_timer11_hwmod = {
1308 .name = "timer11",
1309 .class = &omap54xx_timer_hwmod_class,
1310 .clkdm_name = "l4per_clkdm",
1311 .main_clk = "timer11_gfclk_mux",
1312 .prcm = {
1313 .omap4 = {
1314 .clkctrl_offs = OMAP54XX_CM_L4PER_TIMER11_CLKCTRL_OFFSET,
1315 .context_offs = OMAP54XX_RM_L4PER_TIMER11_CONTEXT_OFFSET,
1316 .modulemode = MODULEMODE_SWCTRL,
1317 },
1318 },
1319};
1320
1321/*
1322 * 'uart' class
1323 * universal asynchronous receiver/transmitter (uart)
1324 */
1325
1326static struct omap_hwmod_class_sysconfig omap54xx_uart_sysc = {
1327 .rev_offs = 0x0050,
1328 .sysc_offs = 0x0054,
1329 .syss_offs = 0x0058,
1330 .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_ENAWAKEUP |
1331 SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
1332 SYSS_HAS_RESET_STATUS),
1333 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
1334 SIDLE_SMART_WKUP),
1335 .sysc_fields = &omap_hwmod_sysc_type1,
1336};
1337
1338static struct omap_hwmod_class omap54xx_uart_hwmod_class = {
1339 .name = "uart",
1340 .sysc = &omap54xx_uart_sysc,
1341};
1342
1343/* uart1 */
1344static struct omap_hwmod omap54xx_uart1_hwmod = {
1345 .name = "uart1",
1346 .class = &omap54xx_uart_hwmod_class,
1347 .clkdm_name = "l4per_clkdm",
1348 .main_clk = "func_48m_fclk",
1349 .prcm = {
1350 .omap4 = {
1351 .clkctrl_offs = OMAP54XX_CM_L4PER_UART1_CLKCTRL_OFFSET,
1352 .context_offs = OMAP54XX_RM_L4PER_UART1_CONTEXT_OFFSET,
1353 .modulemode = MODULEMODE_SWCTRL,
1354 },
1355 },
1356};
1357
1358/* uart2 */
1359static struct omap_hwmod omap54xx_uart2_hwmod = {
1360 .name = "uart2",
1361 .class = &omap54xx_uart_hwmod_class,
1362 .clkdm_name = "l4per_clkdm",
1363 .main_clk = "func_48m_fclk",
1364 .prcm = {
1365 .omap4 = {
1366 .clkctrl_offs = OMAP54XX_CM_L4PER_UART2_CLKCTRL_OFFSET,
1367 .context_offs = OMAP54XX_RM_L4PER_UART2_CONTEXT_OFFSET,
1368 .modulemode = MODULEMODE_SWCTRL,
1369 },
1370 },
1371};
1372
1373/* uart3 */
1374static struct omap_hwmod omap54xx_uart3_hwmod = {
1375 .name = "uart3",
1376 .class = &omap54xx_uart_hwmod_class,
1377 .clkdm_name = "l4per_clkdm",
1378 .flags = DEBUG_OMAP4UART3_FLAGS,
1379 .main_clk = "func_48m_fclk",
1380 .prcm = {
1381 .omap4 = {
1382 .clkctrl_offs = OMAP54XX_CM_L4PER_UART3_CLKCTRL_OFFSET,
1383 .context_offs = OMAP54XX_RM_L4PER_UART3_CONTEXT_OFFSET,
1384 .modulemode = MODULEMODE_SWCTRL,
1385 },
1386 },
1387};
1388
1389/* uart4 */
1390static struct omap_hwmod omap54xx_uart4_hwmod = {
1391 .name = "uart4",
1392 .class = &omap54xx_uart_hwmod_class,
1393 .clkdm_name = "l4per_clkdm",
1394 .flags = DEBUG_OMAP4UART4_FLAGS,
1395 .main_clk = "func_48m_fclk",
1396 .prcm = {
1397 .omap4 = {
1398 .clkctrl_offs = OMAP54XX_CM_L4PER_UART4_CLKCTRL_OFFSET,
1399 .context_offs = OMAP54XX_RM_L4PER_UART4_CONTEXT_OFFSET,
1400 .modulemode = MODULEMODE_SWCTRL,
1401 },
1402 },
1403};
1404
1405/* uart5 */
1406static struct omap_hwmod omap54xx_uart5_hwmod = {
1407 .name = "uart5",
1408 .class = &omap54xx_uart_hwmod_class,
1409 .clkdm_name = "l4per_clkdm",
1410 .main_clk = "func_48m_fclk",
1411 .prcm = {
1412 .omap4 = {
1413 .clkctrl_offs = OMAP54XX_CM_L4PER_UART5_CLKCTRL_OFFSET,
1414 .context_offs = OMAP54XX_RM_L4PER_UART5_CONTEXT_OFFSET,
1415 .modulemode = MODULEMODE_SWCTRL,
1416 },
1417 },
1418};
1419
1420/* uart6 */
1421static struct omap_hwmod omap54xx_uart6_hwmod = {
1422 .name = "uart6",
1423 .class = &omap54xx_uart_hwmod_class,
1424 .clkdm_name = "l4per_clkdm",
1425 .main_clk = "func_48m_fclk",
1426 .prcm = {
1427 .omap4 = {
1428 .clkctrl_offs = OMAP54XX_CM_L4PER_UART6_CLKCTRL_OFFSET,
1429 .context_offs = OMAP54XX_RM_L4PER_UART6_CONTEXT_OFFSET,
1430 .modulemode = MODULEMODE_SWCTRL,
1431 },
1432 },
1433};
1434
1435/*
1436 * 'usb_otg_ss' class
1437 * 2.0 super speed (usb_otg_ss) controller
1438 */
1439
1440static struct omap_hwmod_class_sysconfig omap54xx_usb_otg_ss_sysc = {
1441 .rev_offs = 0x0000,
1442 .sysc_offs = 0x0010,
1443 .sysc_flags = (SYSC_HAS_DMADISABLE | SYSC_HAS_MIDLEMODE |
1444 SYSC_HAS_SIDLEMODE),
1445 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
1446 SIDLE_SMART_WKUP | MSTANDBY_FORCE | MSTANDBY_NO |
1447 MSTANDBY_SMART | MSTANDBY_SMART_WKUP),
1448 .sysc_fields = &omap_hwmod_sysc_type2,
1449};
1450
1451static struct omap_hwmod_class omap54xx_usb_otg_ss_hwmod_class = {
1452 .name = "usb_otg_ss",
1453 .sysc = &omap54xx_usb_otg_ss_sysc,
1454};
1455
1456/* usb_otg_ss */
1457static struct omap_hwmod_opt_clk usb_otg_ss_opt_clks[] = {
1458 { .role = "refclk960m", .clk = "usb_otg_ss_refclk960m" },
1459};
1460
1461static struct omap_hwmod omap54xx_usb_otg_ss_hwmod = {
1462 .name = "usb_otg_ss",
1463 .class = &omap54xx_usb_otg_ss_hwmod_class,
1464 .clkdm_name = "l3init_clkdm",
1465 .flags = HWMOD_SWSUP_SIDLE,
1466 .main_clk = "dpll_core_h13x2_ck",
1467 .prcm = {
1468 .omap4 = {
1469 .clkctrl_offs = OMAP54XX_CM_L3INIT_USB_OTG_SS_CLKCTRL_OFFSET,
1470 .context_offs = OMAP54XX_RM_L3INIT_USB_OTG_SS_CONTEXT_OFFSET,
1471 .modulemode = MODULEMODE_HWCTRL,
1472 },
1473 },
1474 .opt_clks = usb_otg_ss_opt_clks,
1475 .opt_clks_cnt = ARRAY_SIZE(usb_otg_ss_opt_clks),
1476};
1477
1478/*
1479 * 'wd_timer' class
1480 * 32-bit watchdog upward counter that generates a pulse on the reset pin on
1481 * overflow condition
1482 */
1483
1484static struct omap_hwmod_class_sysconfig omap54xx_wd_timer_sysc = {
1485 .rev_offs = 0x0000,
1486 .sysc_offs = 0x0010,
1487 .syss_offs = 0x0014,
1488 .sysc_flags = (SYSC_HAS_EMUFREE | SYSC_HAS_SIDLEMODE |
1489 SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
1490 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
1491 SIDLE_SMART_WKUP),
1492 .sysc_fields = &omap_hwmod_sysc_type1,
1493};
1494
1495static struct omap_hwmod_class omap54xx_wd_timer_hwmod_class = {
1496 .name = "wd_timer",
1497 .sysc = &omap54xx_wd_timer_sysc,
1498 .pre_shutdown = &omap2_wd_timer_disable,
1499};
1500
1501/* wd_timer2 */
1502static struct omap_hwmod omap54xx_wd_timer2_hwmod = {
1503 .name = "wd_timer2",
1504 .class = &omap54xx_wd_timer_hwmod_class,
1505 .clkdm_name = "wkupaon_clkdm",
1506 .main_clk = "sys_32k_ck",
1507 .prcm = {
1508 .omap4 = {
1509 .clkctrl_offs = OMAP54XX_CM_WKUPAON_WD_TIMER2_CLKCTRL_OFFSET,
1510 .context_offs = OMAP54XX_RM_WKUPAON_WD_TIMER2_CONTEXT_OFFSET,
1511 .modulemode = MODULEMODE_SWCTRL,
1512 },
1513 },
1514};
1515
1516
1517/*
1518 * Interfaces
1519 */
1520
1521/* l3_main_1 -> dmm */
1522static struct omap_hwmod_ocp_if omap54xx_l3_main_1__dmm = {
1523 .master = &omap54xx_l3_main_1_hwmod,
1524 .slave = &omap54xx_dmm_hwmod,
1525 .clk = "l3_iclk_div",
1526 .user = OCP_USER_SDMA,
1527};
1528
1529/* l3_main_3 -> l3_instr */
1530static struct omap_hwmod_ocp_if omap54xx_l3_main_3__l3_instr = {
1531 .master = &omap54xx_l3_main_3_hwmod,
1532 .slave = &omap54xx_l3_instr_hwmod,
1533 .clk = "l3_iclk_div",
1534 .user = OCP_USER_MPU | OCP_USER_SDMA,
1535};
1536
1537/* l3_main_2 -> l3_main_1 */
1538static struct omap_hwmod_ocp_if omap54xx_l3_main_2__l3_main_1 = {
1539 .master = &omap54xx_l3_main_2_hwmod,
1540 .slave = &omap54xx_l3_main_1_hwmod,
1541 .clk = "l3_iclk_div",
1542 .user = OCP_USER_MPU | OCP_USER_SDMA,
1543};
1544
1545/* l4_cfg -> l3_main_1 */
1546static struct omap_hwmod_ocp_if omap54xx_l4_cfg__l3_main_1 = {
1547 .master = &omap54xx_l4_cfg_hwmod,
1548 .slave = &omap54xx_l3_main_1_hwmod,
1549 .clk = "l3_iclk_div",
1550 .user = OCP_USER_MPU | OCP_USER_SDMA,
1551};
1552
1553/* mpu -> l3_main_1 */
1554static struct omap_hwmod_ocp_if omap54xx_mpu__l3_main_1 = {
1555 .master = &omap54xx_mpu_hwmod,
1556 .slave = &omap54xx_l3_main_1_hwmod,
1557 .clk = "l3_iclk_div",
1558 .user = OCP_USER_MPU,
1559};
1560
1561/* l3_main_1 -> l3_main_2 */
1562static struct omap_hwmod_ocp_if omap54xx_l3_main_1__l3_main_2 = {
1563 .master = &omap54xx_l3_main_1_hwmod,
1564 .slave = &omap54xx_l3_main_2_hwmod,
1565 .clk = "l3_iclk_div",
1566 .user = OCP_USER_MPU,
1567};
1568
1569/* l4_cfg -> l3_main_2 */
1570static struct omap_hwmod_ocp_if omap54xx_l4_cfg__l3_main_2 = {
1571 .master = &omap54xx_l4_cfg_hwmod,
1572 .slave = &omap54xx_l3_main_2_hwmod,
1573 .clk = "l3_iclk_div",
1574 .user = OCP_USER_MPU | OCP_USER_SDMA,
1575};
1576
1577/* l3_main_1 -> l3_main_3 */
1578static struct omap_hwmod_ocp_if omap54xx_l3_main_1__l3_main_3 = {
1579 .master = &omap54xx_l3_main_1_hwmod,
1580 .slave = &omap54xx_l3_main_3_hwmod,
1581 .clk = "l3_iclk_div",
1582 .user = OCP_USER_MPU,
1583};
1584
1585/* l3_main_2 -> l3_main_3 */
1586static struct omap_hwmod_ocp_if omap54xx_l3_main_2__l3_main_3 = {
1587 .master = &omap54xx_l3_main_2_hwmod,
1588 .slave = &omap54xx_l3_main_3_hwmod,
1589 .clk = "l3_iclk_div",
1590 .user = OCP_USER_MPU | OCP_USER_SDMA,
1591};
1592
1593/* l4_cfg -> l3_main_3 */
1594static struct omap_hwmod_ocp_if omap54xx_l4_cfg__l3_main_3 = {
1595 .master = &omap54xx_l4_cfg_hwmod,
1596 .slave = &omap54xx_l3_main_3_hwmod,
1597 .clk = "l3_iclk_div",
1598 .user = OCP_USER_MPU | OCP_USER_SDMA,
1599};
1600
1601/* l3_main_1 -> l4_abe */
1602static struct omap_hwmod_ocp_if omap54xx_l3_main_1__l4_abe = {
1603 .master = &omap54xx_l3_main_1_hwmod,
1604 .slave = &omap54xx_l4_abe_hwmod,
1605 .clk = "abe_iclk",
1606 .user = OCP_USER_MPU | OCP_USER_SDMA,
1607};
1608
1609/* mpu -> l4_abe */
1610static struct omap_hwmod_ocp_if omap54xx_mpu__l4_abe = {
1611 .master = &omap54xx_mpu_hwmod,
1612 .slave = &omap54xx_l4_abe_hwmod,
1613 .clk = "abe_iclk",
1614 .user = OCP_USER_MPU | OCP_USER_SDMA,
1615};
1616
1617/* l3_main_1 -> l4_cfg */
1618static struct omap_hwmod_ocp_if omap54xx_l3_main_1__l4_cfg = {
1619 .master = &omap54xx_l3_main_1_hwmod,
1620 .slave = &omap54xx_l4_cfg_hwmod,
1621 .clk = "l4_root_clk_div",
1622 .user = OCP_USER_MPU | OCP_USER_SDMA,
1623};
1624
1625/* l3_main_2 -> l4_per */
1626static struct omap_hwmod_ocp_if omap54xx_l3_main_2__l4_per = {
1627 .master = &omap54xx_l3_main_2_hwmod,
1628 .slave = &omap54xx_l4_per_hwmod,
1629 .clk = "l4_root_clk_div",
1630 .user = OCP_USER_MPU | OCP_USER_SDMA,
1631};
1632
1633/* l3_main_1 -> l4_wkup */
1634static struct omap_hwmod_ocp_if omap54xx_l3_main_1__l4_wkup = {
1635 .master = &omap54xx_l3_main_1_hwmod,
1636 .slave = &omap54xx_l4_wkup_hwmod,
1637 .clk = "wkupaon_iclk_mux",
1638 .user = OCP_USER_MPU | OCP_USER_SDMA,
1639};
1640
1641/* mpu -> mpu_private */
1642static struct omap_hwmod_ocp_if omap54xx_mpu__mpu_private = {
1643 .master = &omap54xx_mpu_hwmod,
1644 .slave = &omap54xx_mpu_private_hwmod,
1645 .clk = "l3_iclk_div",
1646 .user = OCP_USER_MPU | OCP_USER_SDMA,
1647};
1648
1649/* l4_wkup -> counter_32k */
1650static struct omap_hwmod_ocp_if omap54xx_l4_wkup__counter_32k = {
1651 .master = &omap54xx_l4_wkup_hwmod,
1652 .slave = &omap54xx_counter_32k_hwmod,
1653 .clk = "wkupaon_iclk_mux",
1654 .user = OCP_USER_MPU | OCP_USER_SDMA,
1655};
1656
1657static struct omap_hwmod_addr_space omap54xx_dma_system_addrs[] = {
1658 {
1659 .pa_start = 0x4a056000,
1660 .pa_end = 0x4a056fff,
1661 .flags = ADDR_TYPE_RT
1662 },
1663 { }
1664};
1665
1666/* l4_cfg -> dma_system */
1667static struct omap_hwmod_ocp_if omap54xx_l4_cfg__dma_system = {
1668 .master = &omap54xx_l4_cfg_hwmod,
1669 .slave = &omap54xx_dma_system_hwmod,
1670 .clk = "l4_root_clk_div",
1671 .addr = omap54xx_dma_system_addrs,
1672 .user = OCP_USER_MPU | OCP_USER_SDMA,
1673};
1674
1675/* l4_abe -> dmic */
1676static struct omap_hwmod_ocp_if omap54xx_l4_abe__dmic = {
1677 .master = &omap54xx_l4_abe_hwmod,
1678 .slave = &omap54xx_dmic_hwmod,
1679 .clk = "abe_iclk",
1680 .user = OCP_USER_MPU,
1681};
1682
1683/* mpu -> emif1 */
1684static struct omap_hwmod_ocp_if omap54xx_mpu__emif1 = {
1685 .master = &omap54xx_mpu_hwmod,
1686 .slave = &omap54xx_emif1_hwmod,
1687 .clk = "dpll_core_h11x2_ck",
1688 .user = OCP_USER_MPU | OCP_USER_SDMA,
1689};
1690
1691/* mpu -> emif2 */
1692static struct omap_hwmod_ocp_if omap54xx_mpu__emif2 = {
1693 .master = &omap54xx_mpu_hwmod,
1694 .slave = &omap54xx_emif2_hwmod,
1695 .clk = "dpll_core_h11x2_ck",
1696 .user = OCP_USER_MPU | OCP_USER_SDMA,
1697};
1698
1699/* l4_wkup -> gpio1 */
1700static struct omap_hwmod_ocp_if omap54xx_l4_wkup__gpio1 = {
1701 .master = &omap54xx_l4_wkup_hwmod,
1702 .slave = &omap54xx_gpio1_hwmod,
1703 .clk = "wkupaon_iclk_mux",
1704 .user = OCP_USER_MPU | OCP_USER_SDMA,
1705};
1706
1707/* l4_per -> gpio2 */
1708static struct omap_hwmod_ocp_if omap54xx_l4_per__gpio2 = {
1709 .master = &omap54xx_l4_per_hwmod,
1710 .slave = &omap54xx_gpio2_hwmod,
1711 .clk = "l4_root_clk_div",
1712 .user = OCP_USER_MPU | OCP_USER_SDMA,
1713};
1714
1715/* l4_per -> gpio3 */
1716static struct omap_hwmod_ocp_if omap54xx_l4_per__gpio3 = {
1717 .master = &omap54xx_l4_per_hwmod,
1718 .slave = &omap54xx_gpio3_hwmod,
1719 .clk = "l4_root_clk_div",
1720 .user = OCP_USER_MPU | OCP_USER_SDMA,
1721};
1722
1723/* l4_per -> gpio4 */
1724static struct omap_hwmod_ocp_if omap54xx_l4_per__gpio4 = {
1725 .master = &omap54xx_l4_per_hwmod,
1726 .slave = &omap54xx_gpio4_hwmod,
1727 .clk = "l4_root_clk_div",
1728 .user = OCP_USER_MPU | OCP_USER_SDMA,
1729};
1730
1731/* l4_per -> gpio5 */
1732static struct omap_hwmod_ocp_if omap54xx_l4_per__gpio5 = {
1733 .master = &omap54xx_l4_per_hwmod,
1734 .slave = &omap54xx_gpio5_hwmod,
1735 .clk = "l4_root_clk_div",
1736 .user = OCP_USER_MPU | OCP_USER_SDMA,
1737};
1738
1739/* l4_per -> gpio6 */
1740static struct omap_hwmod_ocp_if omap54xx_l4_per__gpio6 = {
1741 .master = &omap54xx_l4_per_hwmod,
1742 .slave = &omap54xx_gpio6_hwmod,
1743 .clk = "l4_root_clk_div",
1744 .user = OCP_USER_MPU | OCP_USER_SDMA,
1745};
1746
1747/* l4_per -> gpio7 */
1748static struct omap_hwmod_ocp_if omap54xx_l4_per__gpio7 = {
1749 .master = &omap54xx_l4_per_hwmod,
1750 .slave = &omap54xx_gpio7_hwmod,
1751 .clk = "l4_root_clk_div",
1752 .user = OCP_USER_MPU | OCP_USER_SDMA,
1753};
1754
1755/* l4_per -> gpio8 */
1756static struct omap_hwmod_ocp_if omap54xx_l4_per__gpio8 = {
1757 .master = &omap54xx_l4_per_hwmod,
1758 .slave = &omap54xx_gpio8_hwmod,
1759 .clk = "l4_root_clk_div",
1760 .user = OCP_USER_MPU | OCP_USER_SDMA,
1761};
1762
1763/* l4_per -> i2c1 */
1764static struct omap_hwmod_ocp_if omap54xx_l4_per__i2c1 = {
1765 .master = &omap54xx_l4_per_hwmod,
1766 .slave = &omap54xx_i2c1_hwmod,
1767 .clk = "l4_root_clk_div",
1768 .user = OCP_USER_MPU | OCP_USER_SDMA,
1769};
1770
1771/* l4_per -> i2c2 */
1772static struct omap_hwmod_ocp_if omap54xx_l4_per__i2c2 = {
1773 .master = &omap54xx_l4_per_hwmod,
1774 .slave = &omap54xx_i2c2_hwmod,
1775 .clk = "l4_root_clk_div",
1776 .user = OCP_USER_MPU | OCP_USER_SDMA,
1777};
1778
1779/* l4_per -> i2c3 */
1780static struct omap_hwmod_ocp_if omap54xx_l4_per__i2c3 = {
1781 .master = &omap54xx_l4_per_hwmod,
1782 .slave = &omap54xx_i2c3_hwmod,
1783 .clk = "l4_root_clk_div",
1784 .user = OCP_USER_MPU | OCP_USER_SDMA,
1785};
1786
1787/* l4_per -> i2c4 */
1788static struct omap_hwmod_ocp_if omap54xx_l4_per__i2c4 = {
1789 .master = &omap54xx_l4_per_hwmod,
1790 .slave = &omap54xx_i2c4_hwmod,
1791 .clk = "l4_root_clk_div",
1792 .user = OCP_USER_MPU | OCP_USER_SDMA,
1793};
1794
1795/* l4_per -> i2c5 */
1796static struct omap_hwmod_ocp_if omap54xx_l4_per__i2c5 = {
1797 .master = &omap54xx_l4_per_hwmod,
1798 .slave = &omap54xx_i2c5_hwmod,
1799 .clk = "l4_root_clk_div",
1800 .user = OCP_USER_MPU | OCP_USER_SDMA,
1801};
1802
1803/* l4_wkup -> kbd */
1804static struct omap_hwmod_ocp_if omap54xx_l4_wkup__kbd = {
1805 .master = &omap54xx_l4_wkup_hwmod,
1806 .slave = &omap54xx_kbd_hwmod,
1807 .clk = "wkupaon_iclk_mux",
1808 .user = OCP_USER_MPU | OCP_USER_SDMA,
1809};
1810
1811/* l4_abe -> mcbsp1 */
1812static struct omap_hwmod_ocp_if omap54xx_l4_abe__mcbsp1 = {
1813 .master = &omap54xx_l4_abe_hwmod,
1814 .slave = &omap54xx_mcbsp1_hwmod,
1815 .clk = "abe_iclk",
1816 .user = OCP_USER_MPU,
1817};
1818
1819/* l4_abe -> mcbsp2 */
1820static struct omap_hwmod_ocp_if omap54xx_l4_abe__mcbsp2 = {
1821 .master = &omap54xx_l4_abe_hwmod,
1822 .slave = &omap54xx_mcbsp2_hwmod,
1823 .clk = "abe_iclk",
1824 .user = OCP_USER_MPU,
1825};
1826
1827/* l4_abe -> mcbsp3 */
1828static struct omap_hwmod_ocp_if omap54xx_l4_abe__mcbsp3 = {
1829 .master = &omap54xx_l4_abe_hwmod,
1830 .slave = &omap54xx_mcbsp3_hwmod,
1831 .clk = "abe_iclk",
1832 .user = OCP_USER_MPU,
1833};
1834
1835/* l4_abe -> mcpdm */
1836static struct omap_hwmod_ocp_if omap54xx_l4_abe__mcpdm = {
1837 .master = &omap54xx_l4_abe_hwmod,
1838 .slave = &omap54xx_mcpdm_hwmod,
1839 .clk = "abe_iclk",
1840 .user = OCP_USER_MPU,
1841};
1842
1843/* l4_per -> mcspi1 */
1844static struct omap_hwmod_ocp_if omap54xx_l4_per__mcspi1 = {
1845 .master = &omap54xx_l4_per_hwmod,
1846 .slave = &omap54xx_mcspi1_hwmod,
1847 .clk = "l4_root_clk_div",
1848 .user = OCP_USER_MPU | OCP_USER_SDMA,
1849};
1850
1851/* l4_per -> mcspi2 */
1852static struct omap_hwmod_ocp_if omap54xx_l4_per__mcspi2 = {
1853 .master = &omap54xx_l4_per_hwmod,
1854 .slave = &omap54xx_mcspi2_hwmod,
1855 .clk = "l4_root_clk_div",
1856 .user = OCP_USER_MPU | OCP_USER_SDMA,
1857};
1858
1859/* l4_per -> mcspi3 */
1860static struct omap_hwmod_ocp_if omap54xx_l4_per__mcspi3 = {
1861 .master = &omap54xx_l4_per_hwmod,
1862 .slave = &omap54xx_mcspi3_hwmod,
1863 .clk = "l4_root_clk_div",
1864 .user = OCP_USER_MPU | OCP_USER_SDMA,
1865};
1866
1867/* l4_per -> mcspi4 */
1868static struct omap_hwmod_ocp_if omap54xx_l4_per__mcspi4 = {
1869 .master = &omap54xx_l4_per_hwmod,
1870 .slave = &omap54xx_mcspi4_hwmod,
1871 .clk = "l4_root_clk_div",
1872 .user = OCP_USER_MPU | OCP_USER_SDMA,
1873};
1874
1875/* l4_per -> mmc1 */
1876static struct omap_hwmod_ocp_if omap54xx_l4_per__mmc1 = {
1877 .master = &omap54xx_l4_per_hwmod,
1878 .slave = &omap54xx_mmc1_hwmod,
1879 .clk = "l3_iclk_div",
1880 .user = OCP_USER_MPU | OCP_USER_SDMA,
1881};
1882
1883/* l4_per -> mmc2 */
1884static struct omap_hwmod_ocp_if omap54xx_l4_per__mmc2 = {
1885 .master = &omap54xx_l4_per_hwmod,
1886 .slave = &omap54xx_mmc2_hwmod,
1887 .clk = "l3_iclk_div",
1888 .user = OCP_USER_MPU | OCP_USER_SDMA,
1889};
1890
1891/* l4_per -> mmc3 */
1892static struct omap_hwmod_ocp_if omap54xx_l4_per__mmc3 = {
1893 .master = &omap54xx_l4_per_hwmod,
1894 .slave = &omap54xx_mmc3_hwmod,
1895 .clk = "l4_root_clk_div",
1896 .user = OCP_USER_MPU | OCP_USER_SDMA,
1897};
1898
1899/* l4_per -> mmc4 */
1900static struct omap_hwmod_ocp_if omap54xx_l4_per__mmc4 = {
1901 .master = &omap54xx_l4_per_hwmod,
1902 .slave = &omap54xx_mmc4_hwmod,
1903 .clk = "l4_root_clk_div",
1904 .user = OCP_USER_MPU | OCP_USER_SDMA,
1905};
1906
1907/* l4_per -> mmc5 */
1908static struct omap_hwmod_ocp_if omap54xx_l4_per__mmc5 = {
1909 .master = &omap54xx_l4_per_hwmod,
1910 .slave = &omap54xx_mmc5_hwmod,
1911 .clk = "l4_root_clk_div",
1912 .user = OCP_USER_MPU | OCP_USER_SDMA,
1913};
1914
1915/* l4_cfg -> mpu */
1916static struct omap_hwmod_ocp_if omap54xx_l4_cfg__mpu = {
1917 .master = &omap54xx_l4_cfg_hwmod,
1918 .slave = &omap54xx_mpu_hwmod,
1919 .clk = "l4_root_clk_div",
1920 .user = OCP_USER_MPU | OCP_USER_SDMA,
1921};
1922
1923/* l4_wkup -> timer1 */
1924static struct omap_hwmod_ocp_if omap54xx_l4_wkup__timer1 = {
1925 .master = &omap54xx_l4_wkup_hwmod,
1926 .slave = &omap54xx_timer1_hwmod,
1927 .clk = "wkupaon_iclk_mux",
1928 .user = OCP_USER_MPU | OCP_USER_SDMA,
1929};
1930
1931/* l4_per -> timer2 */
1932static struct omap_hwmod_ocp_if omap54xx_l4_per__timer2 = {
1933 .master = &omap54xx_l4_per_hwmod,
1934 .slave = &omap54xx_timer2_hwmod,
1935 .clk = "l4_root_clk_div",
1936 .user = OCP_USER_MPU | OCP_USER_SDMA,
1937};
1938
1939/* l4_per -> timer3 */
1940static struct omap_hwmod_ocp_if omap54xx_l4_per__timer3 = {
1941 .master = &omap54xx_l4_per_hwmod,
1942 .slave = &omap54xx_timer3_hwmod,
1943 .clk = "l4_root_clk_div",
1944 .user = OCP_USER_MPU | OCP_USER_SDMA,
1945};
1946
1947/* l4_per -> timer4 */
1948static struct omap_hwmod_ocp_if omap54xx_l4_per__timer4 = {
1949 .master = &omap54xx_l4_per_hwmod,
1950 .slave = &omap54xx_timer4_hwmod,
1951 .clk = "l4_root_clk_div",
1952 .user = OCP_USER_MPU | OCP_USER_SDMA,
1953};
1954
1955/* l4_abe -> timer5 */
1956static struct omap_hwmod_ocp_if omap54xx_l4_abe__timer5 = {
1957 .master = &omap54xx_l4_abe_hwmod,
1958 .slave = &omap54xx_timer5_hwmod,
1959 .clk = "abe_iclk",
1960 .user = OCP_USER_MPU,
1961};
1962
1963/* l4_abe -> timer6 */
1964static struct omap_hwmod_ocp_if omap54xx_l4_abe__timer6 = {
1965 .master = &omap54xx_l4_abe_hwmod,
1966 .slave = &omap54xx_timer6_hwmod,
1967 .clk = "abe_iclk",
1968 .user = OCP_USER_MPU,
1969};
1970
1971/* l4_abe -> timer7 */
1972static struct omap_hwmod_ocp_if omap54xx_l4_abe__timer7 = {
1973 .master = &omap54xx_l4_abe_hwmod,
1974 .slave = &omap54xx_timer7_hwmod,
1975 .clk = "abe_iclk",
1976 .user = OCP_USER_MPU,
1977};
1978
1979/* l4_abe -> timer8 */
1980static struct omap_hwmod_ocp_if omap54xx_l4_abe__timer8 = {
1981 .master = &omap54xx_l4_abe_hwmod,
1982 .slave = &omap54xx_timer8_hwmod,
1983 .clk = "abe_iclk",
1984 .user = OCP_USER_MPU,
1985};
1986
1987/* l4_per -> timer9 */
1988static struct omap_hwmod_ocp_if omap54xx_l4_per__timer9 = {
1989 .master = &omap54xx_l4_per_hwmod,
1990 .slave = &omap54xx_timer9_hwmod,
1991 .clk = "l4_root_clk_div",
1992 .user = OCP_USER_MPU | OCP_USER_SDMA,
1993};
1994
1995/* l4_per -> timer10 */
1996static struct omap_hwmod_ocp_if omap54xx_l4_per__timer10 = {
1997 .master = &omap54xx_l4_per_hwmod,
1998 .slave = &omap54xx_timer10_hwmod,
1999 .clk = "l4_root_clk_div",
2000 .user = OCP_USER_MPU | OCP_USER_SDMA,
2001};
2002
2003/* l4_per -> timer11 */
2004static struct omap_hwmod_ocp_if omap54xx_l4_per__timer11 = {
2005 .master = &omap54xx_l4_per_hwmod,
2006 .slave = &omap54xx_timer11_hwmod,
2007 .clk = "l4_root_clk_div",
2008 .user = OCP_USER_MPU | OCP_USER_SDMA,
2009};
2010
2011/* l4_per -> uart1 */
2012static struct omap_hwmod_ocp_if omap54xx_l4_per__uart1 = {
2013 .master = &omap54xx_l4_per_hwmod,
2014 .slave = &omap54xx_uart1_hwmod,
2015 .clk = "l4_root_clk_div",
2016 .user = OCP_USER_MPU | OCP_USER_SDMA,
2017};
2018
2019/* l4_per -> uart2 */
2020static struct omap_hwmod_ocp_if omap54xx_l4_per__uart2 = {
2021 .master = &omap54xx_l4_per_hwmod,
2022 .slave = &omap54xx_uart2_hwmod,
2023 .clk = "l4_root_clk_div",
2024 .user = OCP_USER_MPU | OCP_USER_SDMA,
2025};
2026
2027/* l4_per -> uart3 */
2028static struct omap_hwmod_ocp_if omap54xx_l4_per__uart3 = {
2029 .master = &omap54xx_l4_per_hwmod,
2030 .slave = &omap54xx_uart3_hwmod,
2031 .clk = "l4_root_clk_div",
2032 .user = OCP_USER_MPU | OCP_USER_SDMA,
2033};
2034
2035/* l4_per -> uart4 */
2036static struct omap_hwmod_ocp_if omap54xx_l4_per__uart4 = {
2037 .master = &omap54xx_l4_per_hwmod,
2038 .slave = &omap54xx_uart4_hwmod,
2039 .clk = "l4_root_clk_div",
2040 .user = OCP_USER_MPU | OCP_USER_SDMA,
2041};
2042
2043/* l4_per -> uart5 */
2044static struct omap_hwmod_ocp_if omap54xx_l4_per__uart5 = {
2045 .master = &omap54xx_l4_per_hwmod,
2046 .slave = &omap54xx_uart5_hwmod,
2047 .clk = "l4_root_clk_div",
2048 .user = OCP_USER_MPU | OCP_USER_SDMA,
2049};
2050
2051/* l4_per -> uart6 */
2052static struct omap_hwmod_ocp_if omap54xx_l4_per__uart6 = {
2053 .master = &omap54xx_l4_per_hwmod,
2054 .slave = &omap54xx_uart6_hwmod,
2055 .clk = "l4_root_clk_div",
2056 .user = OCP_USER_MPU | OCP_USER_SDMA,
2057};
2058
2059/* l4_cfg -> usb_otg_ss */
2060static struct omap_hwmod_ocp_if omap54xx_l4_cfg__usb_otg_ss = {
2061 .master = &omap54xx_l4_cfg_hwmod,
2062 .slave = &omap54xx_usb_otg_ss_hwmod,
2063 .clk = "dpll_core_h13x2_ck",
2064 .user = OCP_USER_MPU | OCP_USER_SDMA,
2065};
2066
2067/* l4_wkup -> wd_timer2 */
2068static struct omap_hwmod_ocp_if omap54xx_l4_wkup__wd_timer2 = {
2069 .master = &omap54xx_l4_wkup_hwmod,
2070 .slave = &omap54xx_wd_timer2_hwmod,
2071 .clk = "wkupaon_iclk_mux",
2072 .user = OCP_USER_MPU | OCP_USER_SDMA,
2073};
2074
2075static struct omap_hwmod_ocp_if *omap54xx_hwmod_ocp_ifs[] __initdata = {
2076 &omap54xx_l3_main_1__dmm,
2077 &omap54xx_l3_main_3__l3_instr,
2078 &omap54xx_l3_main_2__l3_main_1,
2079 &omap54xx_l4_cfg__l3_main_1,
2080 &omap54xx_mpu__l3_main_1,
2081 &omap54xx_l3_main_1__l3_main_2,
2082 &omap54xx_l4_cfg__l3_main_2,
2083 &omap54xx_l3_main_1__l3_main_3,
2084 &omap54xx_l3_main_2__l3_main_3,
2085 &omap54xx_l4_cfg__l3_main_3,
2086 &omap54xx_l3_main_1__l4_abe,
2087 &omap54xx_mpu__l4_abe,
2088 &omap54xx_l3_main_1__l4_cfg,
2089 &omap54xx_l3_main_2__l4_per,
2090 &omap54xx_l3_main_1__l4_wkup,
2091 &omap54xx_mpu__mpu_private,
2092 &omap54xx_l4_wkup__counter_32k,
2093 &omap54xx_l4_cfg__dma_system,
2094 &omap54xx_l4_abe__dmic,
2095 &omap54xx_mpu__emif1,
2096 &omap54xx_mpu__emif2,
2097 &omap54xx_l4_wkup__gpio1,
2098 &omap54xx_l4_per__gpio2,
2099 &omap54xx_l4_per__gpio3,
2100 &omap54xx_l4_per__gpio4,
2101 &omap54xx_l4_per__gpio5,
2102 &omap54xx_l4_per__gpio6,
2103 &omap54xx_l4_per__gpio7,
2104 &omap54xx_l4_per__gpio8,
2105 &omap54xx_l4_per__i2c1,
2106 &omap54xx_l4_per__i2c2,
2107 &omap54xx_l4_per__i2c3,
2108 &omap54xx_l4_per__i2c4,
2109 &omap54xx_l4_per__i2c5,
2110 &omap54xx_l4_wkup__kbd,
2111 &omap54xx_l4_abe__mcbsp1,
2112 &omap54xx_l4_abe__mcbsp2,
2113 &omap54xx_l4_abe__mcbsp3,
2114 &omap54xx_l4_abe__mcpdm,
2115 &omap54xx_l4_per__mcspi1,
2116 &omap54xx_l4_per__mcspi2,
2117 &omap54xx_l4_per__mcspi3,
2118 &omap54xx_l4_per__mcspi4,
2119 &omap54xx_l4_per__mmc1,
2120 &omap54xx_l4_per__mmc2,
2121 &omap54xx_l4_per__mmc3,
2122 &omap54xx_l4_per__mmc4,
2123 &omap54xx_l4_per__mmc5,
2124 &omap54xx_l4_cfg__mpu,
2125 &omap54xx_l4_wkup__timer1,
2126 &omap54xx_l4_per__timer2,
2127 &omap54xx_l4_per__timer3,
2128 &omap54xx_l4_per__timer4,
2129 &omap54xx_l4_abe__timer5,
2130 &omap54xx_l4_abe__timer6,
2131 &omap54xx_l4_abe__timer7,
2132 &omap54xx_l4_abe__timer8,
2133 &omap54xx_l4_per__timer9,
2134 &omap54xx_l4_per__timer10,
2135 &omap54xx_l4_per__timer11,
2136 &omap54xx_l4_per__uart1,
2137 &omap54xx_l4_per__uart2,
2138 &omap54xx_l4_per__uart3,
2139 &omap54xx_l4_per__uart4,
2140 &omap54xx_l4_per__uart5,
2141 &omap54xx_l4_per__uart6,
2142 &omap54xx_l4_cfg__usb_otg_ss,
2143 &omap54xx_l4_wkup__wd_timer2,
2144 NULL,
2145};
2146
2147int __init omap54xx_hwmod_init(void)
2148{
2149 omap_hwmod_init();
2150 return omap_hwmod_register_links(omap54xx_hwmod_ocp_ifs);
2151}
diff --git a/arch/arm/mach-omap2/pm44xx.c b/arch/arm/mach-omap2/pm44xx.c
index a251f87fa2a2..82f0698933d8 100644
--- a/arch/arm/mach-omap2/pm44xx.c
+++ b/arch/arm/mach-omap2/pm44xx.c
@@ -1,7 +1,7 @@
1/* 1/*
2 * OMAP4 Power Management Routines 2 * OMAP4+ Power Management Routines
3 * 3 *
4 * Copyright (C) 2010-2011 Texas Instruments, Inc. 4 * Copyright (C) 2010-2013 Texas Instruments, Inc.
5 * Rajendra Nayak <rnayak@ti.com> 5 * Rajendra Nayak <rnayak@ti.com>
6 * Santosh Shilimkar <santosh.shilimkar@ti.com> 6 * Santosh Shilimkar <santosh.shilimkar@ti.com>
7 * 7 *
@@ -135,16 +135,16 @@ static void omap_default_idle(void)
135} 135}
136 136
137/** 137/**
138 * omap4_pm_init - Init routine for OMAP4 PM 138 * omap4_init_static_deps - Add OMAP4 static dependencies
139 * 139 *
140 * Initializes all powerdomain and clockdomain target states 140 * Add needed static clockdomain dependencies on OMAP4 devices.
141 * and all PRCM settings. 141 * Return: 0 on success or 'err' on failures
142 */ 142 */
143int __init omap4_pm_init(void) 143static inline int omap4_init_static_deps(void)
144{ 144{
145 int ret;
146 struct clockdomain *emif_clkdm, *mpuss_clkdm, *l3_1_clkdm; 145 struct clockdomain *emif_clkdm, *mpuss_clkdm, *l3_1_clkdm;
147 struct clockdomain *ducati_clkdm, *l3_2_clkdm; 146 struct clockdomain *ducati_clkdm, *l3_2_clkdm;
147 int ret = 0;
148 148
149 if (omap_rev() == OMAP4430_REV_ES1_0) { 149 if (omap_rev() == OMAP4430_REV_ES1_0) {
150 WARN(1, "Power Management not supported on OMAP4430 ES1.0\n"); 150 WARN(1, "Power Management not supported on OMAP4430 ES1.0\n");
@@ -163,7 +163,7 @@ int __init omap4_pm_init(void)
163 ret = pwrdm_for_each(pwrdms_setup, NULL); 163 ret = pwrdm_for_each(pwrdms_setup, NULL);
164 if (ret) { 164 if (ret) {
165 pr_err("Failed to setup powerdomains\n"); 165 pr_err("Failed to setup powerdomains\n");
166 goto err2; 166 return ret;
167 } 167 }
168 168
169 /* 169 /*
@@ -171,6 +171,10 @@ int __init omap4_pm_init(void)
171 * MPUSS -> L4_PER/L3_* and DUCATI -> L3_* doesn't work as 171 * MPUSS -> L4_PER/L3_* and DUCATI -> L3_* doesn't work as
172 * expected. The hardware recommendation is to enable static 172 * expected. The hardware recommendation is to enable static
173 * dependencies for these to avoid system lock ups or random crashes. 173 * dependencies for these to avoid system lock ups or random crashes.
174 * The L4 wakeup depedency is added to workaround the OCP sync hardware
175 * BUG with 32K synctimer which lead to incorrect timer value read
176 * from the 32K counter. The BUG applies for GPTIMER1 and WDT2 which
177 * are part of L4 wakeup clockdomain.
174 */ 178 */
175 mpuss_clkdm = clkdm_lookup("mpuss_clkdm"); 179 mpuss_clkdm = clkdm_lookup("mpuss_clkdm");
176 emif_clkdm = clkdm_lookup("l3_emif_clkdm"); 180 emif_clkdm = clkdm_lookup("l3_emif_clkdm");
@@ -179,7 +183,7 @@ int __init omap4_pm_init(void)
179 ducati_clkdm = clkdm_lookup("ducati_clkdm"); 183 ducati_clkdm = clkdm_lookup("ducati_clkdm");
180 if ((!mpuss_clkdm) || (!emif_clkdm) || (!l3_1_clkdm) || 184 if ((!mpuss_clkdm) || (!emif_clkdm) || (!l3_1_clkdm) ||
181 (!l3_2_clkdm) || (!ducati_clkdm)) 185 (!l3_2_clkdm) || (!ducati_clkdm))
182 goto err2; 186 return -EINVAL;
183 187
184 ret = clkdm_add_wkdep(mpuss_clkdm, emif_clkdm); 188 ret = clkdm_add_wkdep(mpuss_clkdm, emif_clkdm);
185 ret |= clkdm_add_wkdep(mpuss_clkdm, l3_1_clkdm); 189 ret |= clkdm_add_wkdep(mpuss_clkdm, l3_1_clkdm);
@@ -188,9 +192,42 @@ int __init omap4_pm_init(void)
188 ret |= clkdm_add_wkdep(ducati_clkdm, l3_2_clkdm); 192 ret |= clkdm_add_wkdep(ducati_clkdm, l3_2_clkdm);
189 if (ret) { 193 if (ret) {
190 pr_err("Failed to add MPUSS -> L3/EMIF/L4PER, DUCATI -> L3 wakeup dependency\n"); 194 pr_err("Failed to add MPUSS -> L3/EMIF/L4PER, DUCATI -> L3 wakeup dependency\n");
195 return -EINVAL;
196 }
197
198 return ret;
199}
200
201/**
202 * omap4_pm_init - Init routine for OMAP4+ devices
203 *
204 * Initializes all powerdomain and clockdomain target states
205 * and all PRCM settings.
206 * Return: Returns the error code returned by called functions.
207 */
208int __init omap4_pm_init(void)
209{
210 int ret = 0;
211
212 if (omap_rev() == OMAP4430_REV_ES1_0) {
213 WARN(1, "Power Management not supported on OMAP4430 ES1.0\n");
214 return -ENODEV;
215 }
216
217 pr_info("Power Management for TI OMAP4+ devices.\n");
218
219 ret = pwrdm_for_each(pwrdms_setup, NULL);
220 if (ret) {
221 pr_err("Failed to setup powerdomains.\n");
191 goto err2; 222 goto err2;
192 } 223 }
193 224
225 if (cpu_is_omap44xx()) {
226 ret = omap4_init_static_deps();
227 if (ret)
228 goto err2;
229 }
230
194 ret = omap4_mpuss_init(); 231 ret = omap4_mpuss_init();
195 if (ret) { 232 if (ret) {
196 pr_err("Failed to initialise OMAP4 MPUSS\n"); 233 pr_err("Failed to initialise OMAP4 MPUSS\n");
@@ -206,7 +243,8 @@ int __init omap4_pm_init(void)
206 /* Overwrite the default cpu_do_idle() */ 243 /* Overwrite the default cpu_do_idle() */
207 arm_pm_idle = omap_default_idle; 244 arm_pm_idle = omap_default_idle;
208 245
209 omap4_idle_init(); 246 if (cpu_is_omap44xx())
247 omap4_idle_init();
210 248
211err2: 249err2:
212 return ret; 250 return ret;
diff --git a/arch/arm/mach-omap2/pmu.c b/arch/arm/mach-omap2/pmu.c
index 9ace8eae7ee8..33c8846b4193 100644
--- a/arch/arm/mach-omap2/pmu.c
+++ b/arch/arm/mach-omap2/pmu.c
@@ -54,10 +54,7 @@ static int __init omap2_init_pmu(unsigned oh_num, char *oh_names[])
54 WARN(IS_ERR(omap_pmu_dev), "Can't build omap_device for %s.\n", 54 WARN(IS_ERR(omap_pmu_dev), "Can't build omap_device for %s.\n",
55 dev_name); 55 dev_name);
56 56
57 if (IS_ERR(omap_pmu_dev)) 57 return PTR_RET(omap_pmu_dev);
58 return PTR_ERR(omap_pmu_dev);
59
60 return 0;
61} 58}
62 59
63static int __init omap_init_pmu(void) 60static int __init omap_init_pmu(void)
diff --git a/arch/arm/mach-omap2/powerdomain.c b/arch/arm/mach-omap2/powerdomain.c
index 86babd740d41..e233dfcbc186 100644
--- a/arch/arm/mach-omap2/powerdomain.c
+++ b/arch/arm/mach-omap2/powerdomain.c
@@ -102,6 +102,10 @@ static int _pwrdm_register(struct powerdomain *pwrdm)
102 if (_pwrdm_lookup(pwrdm->name)) 102 if (_pwrdm_lookup(pwrdm->name))
103 return -EEXIST; 103 return -EEXIST;
104 104
105 if (arch_pwrdm && arch_pwrdm->pwrdm_has_voltdm)
106 if (!arch_pwrdm->pwrdm_has_voltdm())
107 goto skip_voltdm;
108
105 voltdm = voltdm_lookup(pwrdm->voltdm.name); 109 voltdm = voltdm_lookup(pwrdm->voltdm.name);
106 if (!voltdm) { 110 if (!voltdm) {
107 pr_err("powerdomain: %s: voltagedomain %s does not exist\n", 111 pr_err("powerdomain: %s: voltagedomain %s does not exist\n",
@@ -111,6 +115,7 @@ static int _pwrdm_register(struct powerdomain *pwrdm)
111 pwrdm->voltdm.ptr = voltdm; 115 pwrdm->voltdm.ptr = voltdm;
112 INIT_LIST_HEAD(&pwrdm->voltdm_node); 116 INIT_LIST_HEAD(&pwrdm->voltdm_node);
113 voltdm_add_pwrdm(voltdm, pwrdm); 117 voltdm_add_pwrdm(voltdm, pwrdm);
118skip_voltdm:
114 spin_lock_init(&pwrdm->_lock); 119 spin_lock_init(&pwrdm->_lock);
115 120
116 list_add(&pwrdm->node, &pwrdm_list); 121 list_add(&pwrdm->node, &pwrdm_list);
diff --git a/arch/arm/mach-omap2/powerdomain.h b/arch/arm/mach-omap2/powerdomain.h
index 140c36074fed..e4d7bd6f94b8 100644
--- a/arch/arm/mach-omap2/powerdomain.h
+++ b/arch/arm/mach-omap2/powerdomain.h
@@ -166,6 +166,7 @@ struct powerdomain {
166 * @pwrdm_disable_hdwr_sar: Disable Hardware Save-Restore feature for a pd 166 * @pwrdm_disable_hdwr_sar: Disable Hardware Save-Restore feature for a pd
167 * @pwrdm_set_lowpwrstchange: Enable pd transitions from a shallow to deep sleep 167 * @pwrdm_set_lowpwrstchange: Enable pd transitions from a shallow to deep sleep
168 * @pwrdm_wait_transition: Wait for a pd state transition to complete 168 * @pwrdm_wait_transition: Wait for a pd state transition to complete
169 * @pwrdm_has_voltdm: Check if a voltdm association is needed
169 * 170 *
170 * Regarding @pwrdm_set_lowpwrstchange: On the OMAP2 and 3-family 171 * Regarding @pwrdm_set_lowpwrstchange: On the OMAP2 and 3-family
171 * chips, a powerdomain's power state is not allowed to directly 172 * chips, a powerdomain's power state is not allowed to directly
@@ -196,6 +197,7 @@ struct pwrdm_ops {
196 int (*pwrdm_disable_hdwr_sar)(struct powerdomain *pwrdm); 197 int (*pwrdm_disable_hdwr_sar)(struct powerdomain *pwrdm);
197 int (*pwrdm_set_lowpwrstchange)(struct powerdomain *pwrdm); 198 int (*pwrdm_set_lowpwrstchange)(struct powerdomain *pwrdm);
198 int (*pwrdm_wait_transition)(struct powerdomain *pwrdm); 199 int (*pwrdm_wait_transition)(struct powerdomain *pwrdm);
200 int (*pwrdm_has_voltdm)(void);
199}; 201};
200 202
201int pwrdm_register_platform_funcs(struct pwrdm_ops *custom_funcs); 203int pwrdm_register_platform_funcs(struct pwrdm_ops *custom_funcs);
@@ -253,6 +255,7 @@ extern void omap243x_powerdomains_init(void);
253extern void omap3xxx_powerdomains_init(void); 255extern void omap3xxx_powerdomains_init(void);
254extern void am33xx_powerdomains_init(void); 256extern void am33xx_powerdomains_init(void);
255extern void omap44xx_powerdomains_init(void); 257extern void omap44xx_powerdomains_init(void);
258extern void omap54xx_powerdomains_init(void);
256 259
257extern struct pwrdm_ops omap2_pwrdm_operations; 260extern struct pwrdm_ops omap2_pwrdm_operations;
258extern struct pwrdm_ops omap3_pwrdm_operations; 261extern struct pwrdm_ops omap3_pwrdm_operations;
diff --git a/arch/arm/mach-omap2/powerdomains3xxx_data.c b/arch/arm/mach-omap2/powerdomains3xxx_data.c
index f0e14e9efe5a..e2d4bd804523 100644
--- a/arch/arm/mach-omap2/powerdomains3xxx_data.c
+++ b/arch/arm/mach-omap2/powerdomains3xxx_data.c
@@ -336,6 +336,54 @@ static struct powerdomain dpll5_pwrdm = {
336 .voltdm = { .name = "core" }, 336 .voltdm = { .name = "core" },
337}; 337};
338 338
339static struct powerdomain device_81xx_pwrdm = {
340 .name = "device_pwrdm",
341 .prcm_offs = TI81XX_PRM_DEVICE_MOD,
342 .voltdm = { .name = "core" },
343};
344
345static struct powerdomain active_816x_pwrdm = {
346 .name = "active_pwrdm",
347 .prcm_offs = TI816X_PRM_ACTIVE_MOD,
348 .pwrsts = PWRSTS_OFF_ON,
349 .voltdm = { .name = "core" },
350};
351
352static struct powerdomain default_816x_pwrdm = {
353 .name = "default_pwrdm",
354 .prcm_offs = TI81XX_PRM_DEFAULT_MOD,
355 .pwrsts = PWRSTS_OFF_ON,
356 .voltdm = { .name = "core" },
357};
358
359static struct powerdomain ivahd0_816x_pwrdm = {
360 .name = "ivahd0_pwrdm",
361 .prcm_offs = TI816X_PRM_IVAHD0_MOD,
362 .pwrsts = PWRSTS_OFF_ON,
363 .voltdm = { .name = "mpu_iva" },
364};
365
366static struct powerdomain ivahd1_816x_pwrdm = {
367 .name = "ivahd1_pwrdm",
368 .prcm_offs = TI816X_PRM_IVAHD1_MOD,
369 .pwrsts = PWRSTS_OFF_ON,
370 .voltdm = { .name = "mpu_iva" },
371};
372
373static struct powerdomain ivahd2_816x_pwrdm = {
374 .name = "ivahd2_pwrdm",
375 .prcm_offs = TI816X_PRM_IVAHD2_MOD,
376 .pwrsts = PWRSTS_OFF_ON,
377 .voltdm = { .name = "mpu_iva" },
378};
379
380static struct powerdomain sgx_816x_pwrdm = {
381 .name = "sgx_pwrdm",
382 .prcm_offs = TI816X_PRM_SGX_MOD,
383 .pwrsts = PWRSTS_OFF_ON,
384 .voltdm = { .name = "core" },
385};
386
339/* As powerdomains are added or removed above, this list must also be changed */ 387/* As powerdomains are added or removed above, this list must also be changed */
340static struct powerdomain *powerdomains_omap3430_common[] __initdata = { 388static struct powerdomain *powerdomains_omap3430_common[] __initdata = {
341 &wkup_omap2_pwrdm, 389 &wkup_omap2_pwrdm,
@@ -393,6 +441,17 @@ static struct powerdomain *powerdomains_am35x[] __initdata = {
393 NULL 441 NULL
394}; 442};
395 443
444static struct powerdomain *powerdomains_ti81xx[] __initdata = {
445 &device_81xx_pwrdm,
446 &active_816x_pwrdm,
447 &default_816x_pwrdm,
448 &ivahd0_816x_pwrdm,
449 &ivahd1_816x_pwrdm,
450 &ivahd2_816x_pwrdm,
451 &sgx_816x_pwrdm,
452 NULL
453};
454
396void __init omap3xxx_powerdomains_init(void) 455void __init omap3xxx_powerdomains_init(void)
397{ 456{
398 unsigned int rev; 457 unsigned int rev;
@@ -406,6 +465,9 @@ void __init omap3xxx_powerdomains_init(void)
406 465
407 if (rev == AM35XX_REV_ES1_0 || rev == AM35XX_REV_ES1_1) { 466 if (rev == AM35XX_REV_ES1_0 || rev == AM35XX_REV_ES1_1) {
408 pwrdm_register_pwrdms(powerdomains_am35x); 467 pwrdm_register_pwrdms(powerdomains_am35x);
468 } else if (rev == TI8168_REV_ES1_0 || rev == TI8168_REV_ES1_1
469 || rev == TI8168_REV_ES2_0 || rev == TI8168_REV_ES2_1) {
470 pwrdm_register_pwrdms(powerdomains_ti81xx);
409 } else { 471 } else {
410 pwrdm_register_pwrdms(powerdomains_omap3430_common); 472 pwrdm_register_pwrdms(powerdomains_omap3430_common);
411 473
diff --git a/arch/arm/mach-omap2/powerdomains54xx_data.c b/arch/arm/mach-omap2/powerdomains54xx_data.c
new file mode 100644
index 000000000000..81f8a7cc26ee
--- /dev/null
+++ b/arch/arm/mach-omap2/powerdomains54xx_data.c
@@ -0,0 +1,331 @@
1/*
2 * OMAP54XX Power domains framework
3 *
4 * Copyright (C) 2013 Texas Instruments, Inc.
5 *
6 * Abhijit Pagare (abhijitpagare@ti.com)
7 * Benoit Cousson (b-cousson@ti.com)
8 * Paul Walmsley (paul@pwsan.com)
9 *
10 * This file is automatically generated from the OMAP hardware databases.
11 * We respectfully ask that any modifications to this file be coordinated
12 * with the public linux-omap@vger.kernel.org mailing list and the
13 * authors above to ensure that the autogeneration scripts are kept
14 * up-to-date with the file contents.
15 *
16 * This program is free software; you can redistribute it and/or modify
17 * it under the terms of the GNU General Public License version 2 as
18 * published by the Free Software Foundation.
19 */
20
21#include <linux/kernel.h>
22#include <linux/init.h>
23
24#include "powerdomain.h"
25
26#include "prcm-common.h"
27#include "prcm44xx.h"
28#include "prm-regbits-54xx.h"
29#include "prm54xx.h"
30#include "prcm_mpu54xx.h"
31
32/* core_54xx_pwrdm: CORE power domain */
33static struct powerdomain core_54xx_pwrdm = {
34 .name = "core_pwrdm",
35 .voltdm = { .name = "core" },
36 .prcm_offs = OMAP54XX_PRM_CORE_INST,
37 .prcm_partition = OMAP54XX_PRM_PARTITION,
38 .pwrsts = PWRSTS_RET_ON,
39 .pwrsts_logic_ret = PWRSTS_OFF_RET,
40 .banks = 5,
41 .pwrsts_mem_ret = {
42 [0] = PWRSTS_OFF_RET, /* core_nret_bank */
43 [1] = PWRSTS_OFF_RET, /* core_ocmram */
44 [2] = PWRSTS_OFF_RET, /* core_other_bank */
45 [3] = PWRSTS_OFF_RET, /* ipu_l2ram */
46 [4] = PWRSTS_OFF_RET, /* ipu_unicache */
47 },
48 .pwrsts_mem_on = {
49 [0] = PWRSTS_OFF_RET, /* core_nret_bank */
50 [1] = PWRSTS_OFF_RET, /* core_ocmram */
51 [2] = PWRSTS_OFF_RET, /* core_other_bank */
52 [3] = PWRSTS_OFF_RET, /* ipu_l2ram */
53 [4] = PWRSTS_OFF_RET, /* ipu_unicache */
54 },
55 .flags = PWRDM_HAS_LOWPOWERSTATECHANGE,
56};
57
58/* abe_54xx_pwrdm: Audio back end power domain */
59static struct powerdomain abe_54xx_pwrdm = {
60 .name = "abe_pwrdm",
61 .voltdm = { .name = "core" },
62 .prcm_offs = OMAP54XX_PRM_ABE_INST,
63 .prcm_partition = OMAP54XX_PRM_PARTITION,
64 .pwrsts = PWRSTS_OFF_RET_ON,
65 .pwrsts_logic_ret = PWRSTS_OFF,
66 .banks = 2,
67 .pwrsts_mem_ret = {
68 [0] = PWRSTS_OFF_RET, /* aessmem */
69 [1] = PWRSTS_OFF_RET, /* periphmem */
70 },
71 .pwrsts_mem_on = {
72 [0] = PWRSTS_OFF_RET, /* aessmem */
73 [1] = PWRSTS_OFF_RET, /* periphmem */
74 },
75 .flags = PWRDM_HAS_LOWPOWERSTATECHANGE,
76};
77
78/* coreaon_54xx_pwrdm: Always ON logic that sits in VDD_CORE voltage domain */
79static struct powerdomain coreaon_54xx_pwrdm = {
80 .name = "coreaon_pwrdm",
81 .voltdm = { .name = "core" },
82 .prcm_offs = OMAP54XX_PRM_COREAON_INST,
83 .prcm_partition = OMAP54XX_PRM_PARTITION,
84 .pwrsts = PWRSTS_ON,
85};
86
87/* dss_54xx_pwrdm: Display subsystem power domain */
88static struct powerdomain dss_54xx_pwrdm = {
89 .name = "dss_pwrdm",
90 .voltdm = { .name = "core" },
91 .prcm_offs = OMAP54XX_PRM_DSS_INST,
92 .prcm_partition = OMAP54XX_PRM_PARTITION,
93 .pwrsts = PWRSTS_OFF_RET_ON,
94 .pwrsts_logic_ret = PWRSTS_OFF,
95 .banks = 1,
96 .pwrsts_mem_ret = {
97 [0] = PWRSTS_OFF_RET, /* dss_mem */
98 },
99 .pwrsts_mem_on = {
100 [0] = PWRSTS_OFF_RET, /* dss_mem */
101 },
102 .flags = PWRDM_HAS_LOWPOWERSTATECHANGE,
103};
104
105/* cpu0_54xx_pwrdm: MPU0 processor and Neon coprocessor power domain */
106static struct powerdomain cpu0_54xx_pwrdm = {
107 .name = "cpu0_pwrdm",
108 .voltdm = { .name = "mpu" },
109 .prcm_offs = OMAP54XX_PRCM_MPU_PRM_C0_INST,
110 .prcm_partition = OMAP54XX_PRCM_MPU_PARTITION,
111 .pwrsts = PWRSTS_OFF_RET_ON,
112 .pwrsts_logic_ret = PWRSTS_OFF_RET,
113 .banks = 1,
114 .pwrsts_mem_ret = {
115 [0] = PWRSTS_OFF_RET, /* cpu0_l1 */
116 },
117 .pwrsts_mem_on = {
118 [0] = PWRSTS_ON, /* cpu0_l1 */
119 },
120};
121
122/* cpu1_54xx_pwrdm: MPU1 processor and Neon coprocessor power domain */
123static struct powerdomain cpu1_54xx_pwrdm = {
124 .name = "cpu1_pwrdm",
125 .voltdm = { .name = "mpu" },
126 .prcm_offs = OMAP54XX_PRCM_MPU_PRM_C1_INST,
127 .prcm_partition = OMAP54XX_PRCM_MPU_PARTITION,
128 .pwrsts = PWRSTS_OFF_RET_ON,
129 .pwrsts_logic_ret = PWRSTS_OFF_RET,
130 .banks = 1,
131 .pwrsts_mem_ret = {
132 [0] = PWRSTS_OFF_RET, /* cpu1_l1 */
133 },
134 .pwrsts_mem_on = {
135 [0] = PWRSTS_ON, /* cpu1_l1 */
136 },
137};
138
139/* emu_54xx_pwrdm: Emulation power domain */
140static struct powerdomain emu_54xx_pwrdm = {
141 .name = "emu_pwrdm",
142 .voltdm = { .name = "wkup" },
143 .prcm_offs = OMAP54XX_PRM_EMU_INST,
144 .prcm_partition = OMAP54XX_PRM_PARTITION,
145 .pwrsts = PWRSTS_OFF_ON,
146 .banks = 1,
147 .pwrsts_mem_ret = {
148 [0] = PWRSTS_OFF_RET, /* emu_bank */
149 },
150 .pwrsts_mem_on = {
151 [0] = PWRSTS_OFF_RET, /* emu_bank */
152 },
153};
154
155/* mpu_54xx_pwrdm: Modena processor and the Neon coprocessor power domain */
156static struct powerdomain mpu_54xx_pwrdm = {
157 .name = "mpu_pwrdm",
158 .voltdm = { .name = "mpu" },
159 .prcm_offs = OMAP54XX_PRM_MPU_INST,
160 .prcm_partition = OMAP54XX_PRM_PARTITION,
161 .pwrsts = PWRSTS_RET_ON,
162 .pwrsts_logic_ret = PWRSTS_OFF_RET,
163 .banks = 2,
164 .pwrsts_mem_ret = {
165 [0] = PWRSTS_OFF_RET, /* mpu_l2 */
166 [1] = PWRSTS_RET, /* mpu_ram */
167 },
168 .pwrsts_mem_on = {
169 [0] = PWRSTS_OFF_RET, /* mpu_l2 */
170 [1] = PWRSTS_OFF_RET, /* mpu_ram */
171 },
172};
173
174/* custefuse_54xx_pwrdm: Customer efuse controller power domain */
175static struct powerdomain custefuse_54xx_pwrdm = {
176 .name = "custefuse_pwrdm",
177 .voltdm = { .name = "core" },
178 .prcm_offs = OMAP54XX_PRM_CUSTEFUSE_INST,
179 .prcm_partition = OMAP54XX_PRM_PARTITION,
180 .pwrsts = PWRSTS_OFF_ON,
181 .flags = PWRDM_HAS_LOWPOWERSTATECHANGE,
182};
183
184/* dsp_54xx_pwrdm: Tesla processor power domain */
185static struct powerdomain dsp_54xx_pwrdm = {
186 .name = "dsp_pwrdm",
187 .voltdm = { .name = "mm" },
188 .prcm_offs = OMAP54XX_PRM_DSP_INST,
189 .prcm_partition = OMAP54XX_PRM_PARTITION,
190 .pwrsts = PWRSTS_OFF_RET_ON,
191 .pwrsts_logic_ret = PWRSTS_OFF_RET,
192 .banks = 3,
193 .pwrsts_mem_ret = {
194 [0] = PWRSTS_OFF_RET, /* dsp_edma */
195 [1] = PWRSTS_OFF_RET, /* dsp_l1 */
196 [2] = PWRSTS_OFF_RET, /* dsp_l2 */
197 },
198 .pwrsts_mem_on = {
199 [0] = PWRSTS_OFF_RET, /* dsp_edma */
200 [1] = PWRSTS_OFF_RET, /* dsp_l1 */
201 [2] = PWRSTS_OFF_RET, /* dsp_l2 */
202 },
203 .flags = PWRDM_HAS_LOWPOWERSTATECHANGE,
204};
205
206/* cam_54xx_pwrdm: Camera subsystem power domain */
207static struct powerdomain cam_54xx_pwrdm = {
208 .name = "cam_pwrdm",
209 .voltdm = { .name = "core" },
210 .prcm_offs = OMAP54XX_PRM_CAM_INST,
211 .prcm_partition = OMAP54XX_PRM_PARTITION,
212 .pwrsts = PWRSTS_OFF_ON,
213 .banks = 1,
214 .pwrsts_mem_ret = {
215 [0] = PWRSTS_OFF_RET, /* cam_mem */
216 },
217 .pwrsts_mem_on = {
218 [0] = PWRSTS_OFF_RET, /* cam_mem */
219 },
220 .flags = PWRDM_HAS_LOWPOWERSTATECHANGE,
221};
222
223/* l3init_54xx_pwrdm: L3 initators pheripherals power domain */
224static struct powerdomain l3init_54xx_pwrdm = {
225 .name = "l3init_pwrdm",
226 .voltdm = { .name = "core" },
227 .prcm_offs = OMAP54XX_PRM_L3INIT_INST,
228 .prcm_partition = OMAP54XX_PRM_PARTITION,
229 .pwrsts = PWRSTS_RET_ON,
230 .pwrsts_logic_ret = PWRSTS_OFF_RET,
231 .banks = 2,
232 .pwrsts_mem_ret = {
233 [0] = PWRSTS_OFF_RET, /* l3init_bank1 */
234 [1] = PWRSTS_OFF_RET, /* l3init_bank2 */
235 },
236 .pwrsts_mem_on = {
237 [0] = PWRSTS_OFF_RET, /* l3init_bank1 */
238 [1] = PWRSTS_OFF_RET, /* l3init_bank2 */
239 },
240 .flags = PWRDM_HAS_LOWPOWERSTATECHANGE,
241};
242
243/* gpu_54xx_pwrdm: 3D accelerator power domain */
244static struct powerdomain gpu_54xx_pwrdm = {
245 .name = "gpu_pwrdm",
246 .voltdm = { .name = "mm" },
247 .prcm_offs = OMAP54XX_PRM_GPU_INST,
248 .prcm_partition = OMAP54XX_PRM_PARTITION,
249 .pwrsts = PWRSTS_OFF_ON,
250 .banks = 1,
251 .pwrsts_mem_ret = {
252 [0] = PWRSTS_OFF_RET, /* gpu_mem */
253 },
254 .pwrsts_mem_on = {
255 [0] = PWRSTS_OFF_RET, /* gpu_mem */
256 },
257 .flags = PWRDM_HAS_LOWPOWERSTATECHANGE,
258};
259
260/* wkupaon_54xx_pwrdm: Wake-up power domain */
261static struct powerdomain wkupaon_54xx_pwrdm = {
262 .name = "wkupaon_pwrdm",
263 .voltdm = { .name = "wkup" },
264 .prcm_offs = OMAP54XX_PRM_WKUPAON_INST,
265 .prcm_partition = OMAP54XX_PRM_PARTITION,
266 .pwrsts = PWRSTS_ON,
267 .banks = 1,
268 .pwrsts_mem_ret = {
269 },
270 .pwrsts_mem_on = {
271 [0] = PWRSTS_ON, /* wkup_bank */
272 },
273};
274
275/* iva_54xx_pwrdm: IVA-HD power domain */
276static struct powerdomain iva_54xx_pwrdm = {
277 .name = "iva_pwrdm",
278 .voltdm = { .name = "mm" },
279 .prcm_offs = OMAP54XX_PRM_IVA_INST,
280 .prcm_partition = OMAP54XX_PRM_PARTITION,
281 .pwrsts = PWRSTS_OFF_RET_ON,
282 .pwrsts_logic_ret = PWRSTS_OFF,
283 .banks = 4,
284 .pwrsts_mem_ret = {
285 [0] = PWRSTS_OFF_RET, /* hwa_mem */
286 [1] = PWRSTS_OFF_RET, /* sl2_mem */
287 [2] = PWRSTS_OFF_RET, /* tcm1_mem */
288 [3] = PWRSTS_OFF_RET, /* tcm2_mem */
289 },
290 .pwrsts_mem_on = {
291 [0] = PWRSTS_OFF_RET, /* hwa_mem */
292 [1] = PWRSTS_OFF_RET, /* sl2_mem */
293 [2] = PWRSTS_OFF_RET, /* tcm1_mem */
294 [3] = PWRSTS_OFF_RET, /* tcm2_mem */
295 },
296 .flags = PWRDM_HAS_LOWPOWERSTATECHANGE,
297};
298
299/*
300 * The following power domains are not under SW control
301 *
302 * mpuaon
303 * mmaon
304 */
305
306/* As powerdomains are added or removed above, this list must also be changed */
307static struct powerdomain *powerdomains_omap54xx[] __initdata = {
308 &core_54xx_pwrdm,
309 &abe_54xx_pwrdm,
310 &coreaon_54xx_pwrdm,
311 &dss_54xx_pwrdm,
312 &cpu0_54xx_pwrdm,
313 &cpu1_54xx_pwrdm,
314 &emu_54xx_pwrdm,
315 &mpu_54xx_pwrdm,
316 &custefuse_54xx_pwrdm,
317 &dsp_54xx_pwrdm,
318 &cam_54xx_pwrdm,
319 &l3init_54xx_pwrdm,
320 &gpu_54xx_pwrdm,
321 &wkupaon_54xx_pwrdm,
322 &iva_54xx_pwrdm,
323 NULL
324};
325
326void __init omap54xx_powerdomains_init(void)
327{
328 pwrdm_register_platform_funcs(&omap4_pwrdm_operations);
329 pwrdm_register_pwrdms(powerdomains_omap54xx);
330 pwrdm_complete_init();
331}
diff --git a/arch/arm/mach-omap2/prcm-common.h b/arch/arm/mach-omap2/prcm-common.h
index c7d355fafd24..ff1ac4a82a04 100644
--- a/arch/arm/mach-omap2/prcm-common.h
+++ b/arch/arm/mach-omap2/prcm-common.h
@@ -48,6 +48,17 @@
48#define OMAP3430_NEON_MOD 0xb00 48#define OMAP3430_NEON_MOD 0xb00
49#define OMAP3430ES2_USBHOST_MOD 0xc00 49#define OMAP3430ES2_USBHOST_MOD 0xc00
50 50
51/*
52 * TI81XX PRM module offsets
53 */
54#define TI81XX_PRM_DEVICE_MOD 0x0000
55#define TI816X_PRM_ACTIVE_MOD 0x0a00
56#define TI81XX_PRM_DEFAULT_MOD 0x0b00
57#define TI816X_PRM_IVAHD0_MOD 0x0c00
58#define TI816X_PRM_IVAHD1_MOD 0x0d00
59#define TI816X_PRM_IVAHD2_MOD 0x0e00
60#define TI816X_PRM_SGX_MOD 0x0f00
61
51/* 24XX register bits shared between CM & PRM registers */ 62/* 24XX register bits shared between CM & PRM registers */
52 63
53/* CM_FCLKEN1_CORE, CM_ICLKEN1_CORE, PM_WKEN1_CORE shared bits */ 64/* CM_FCLKEN1_CORE, CM_ICLKEN1_CORE, PM_WKEN1_CORE shared bits */
diff --git a/arch/arm/mach-omap2/prcm44xx.h b/arch/arm/mach-omap2/prcm44xx.h
index 7334ffb9d2c1..f429cdd5a118 100644
--- a/arch/arm/mach-omap2/prcm44xx.h
+++ b/arch/arm/mach-omap2/prcm44xx.h
@@ -32,6 +32,12 @@
32#define OMAP4430_SCRM_PARTITION 4 32#define OMAP4430_SCRM_PARTITION 4
33#define OMAP4430_PRCM_MPU_PARTITION 5 33#define OMAP4430_PRCM_MPU_PARTITION 5
34 34
35#define OMAP54XX_PRM_PARTITION 1
36#define OMAP54XX_CM_CORE_AON_PARTITION 2
37#define OMAP54XX_CM_CORE_PARTITION 3
38#define OMAP54XX_SCRM_PARTITION 4
39#define OMAP54XX_PRCM_MPU_PARTITION 5
40
35/* 41/*
36 * OMAP4_MAX_PRCM_PARTITIONS: set to the highest value of the PRCM partition 42 * OMAP4_MAX_PRCM_PARTITIONS: set to the highest value of the PRCM partition
37 * IDs, plus one 43 * IDs, plus one
diff --git a/arch/arm/mach-omap2/prcm_mpu44xx.h b/arch/arm/mach-omap2/prcm_mpu44xx.h
index 884af7bb4afd..059bd4f49035 100644
--- a/arch/arm/mach-omap2/prcm_mpu44xx.h
+++ b/arch/arm/mach-omap2/prcm_mpu44xx.h
@@ -25,12 +25,9 @@
25#ifndef __ARCH_ARM_MACH_OMAP2_PRCM_MPU44XX_H 25#ifndef __ARCH_ARM_MACH_OMAP2_PRCM_MPU44XX_H
26#define __ARCH_ARM_MACH_OMAP2_PRCM_MPU44XX_H 26#define __ARCH_ARM_MACH_OMAP2_PRCM_MPU44XX_H
27 27
28#include "prcm_mpu_44xx_54xx.h"
28#include "common.h" 29#include "common.h"
29 30
30# ifndef __ASSEMBLER__
31extern void __iomem *prcm_mpu_base;
32# endif
33
34#define OMAP4430_PRCM_MPU_BASE 0x48243000 31#define OMAP4430_PRCM_MPU_BASE 0x48243000
35 32
36#define OMAP44XX_PRCM_MPU_REGADDR(inst, reg) \ 33#define OMAP44XX_PRCM_MPU_REGADDR(inst, reg) \
@@ -98,13 +95,4 @@ extern void __iomem *prcm_mpu_base;
98#define OMAP4_CM_CPU1_CLKSTCTRL_OFFSET 0x0018 95#define OMAP4_CM_CPU1_CLKSTCTRL_OFFSET 0x0018
99#define OMAP4430_CM_CPU1_CLKSTCTRL OMAP44XX_PRCM_MPU_REGADDR(OMAP4430_PRCM_MPU_CPU1_INST, 0x0018) 96#define OMAP4430_CM_CPU1_CLKSTCTRL OMAP44XX_PRCM_MPU_REGADDR(OMAP4430_PRCM_MPU_CPU1_INST, 0x0018)
100 97
101/* Function prototypes */
102# ifndef __ASSEMBLER__
103extern u32 omap4_prcm_mpu_read_inst_reg(s16 inst, u16 idx);
104extern void omap4_prcm_mpu_write_inst_reg(u32 val, s16 inst, u16 idx);
105extern u32 omap4_prcm_mpu_rmw_inst_reg_bits(u32 mask, u32 bits, s16 inst,
106 s16 idx);
107extern void __init omap2_set_globals_prcm_mpu(void __iomem *prcm_mpu);
108# endif
109
110#endif 98#endif
diff --git a/arch/arm/mach-omap2/prcm_mpu54xx.h b/arch/arm/mach-omap2/prcm_mpu54xx.h
new file mode 100644
index 000000000000..bc2ce3288315
--- /dev/null
+++ b/arch/arm/mach-omap2/prcm_mpu54xx.h
@@ -0,0 +1,87 @@
1/*
2 * OMAP54xx PRCM MPU instance offset macros
3 *
4 * Copyright (C) 2013 Texas Instruments Incorporated - http://www.ti.com
5 *
6 * Paul Walmsley (paul@pwsan.com)
7 * Rajendra Nayak (rnayak@ti.com)
8 * Benoit Cousson (b-cousson@ti.com)
9 *
10 * This file is automatically generated from the OMAP hardware databases.
11 * We respectfully ask that any modifications to this file be coordinated
12 * with the public linux-omap@vger.kernel.org mailing list and the
13 * authors above to ensure that the autogeneration scripts are kept
14 * up-to-date with the file contents.
15 *
16 * This program is free software; you can redistribute it and/or modify
17 * it under the terms of the GNU General Public License version 2 as
18 * published by the Free Software Foundation.
19 */
20
21#ifndef __ARCH_ARM_MACH_OMAP2_PRCM_MPU54XX_H
22#define __ARCH_ARM_MACH_OMAP2_PRCM_MPU54XX_H
23
24#include "prcm_mpu_44xx_54xx.h"
25#include "common.h"
26
27#define OMAP54XX_PRCM_MPU_BASE 0x48243000
28
29#define OMAP54XX_PRCM_MPU_REGADDR(inst, reg) \
30 OMAP2_L4_IO_ADDRESS(OMAP54XX_PRCM_MPU_BASE + (inst) + (reg))
31
32/* PRCM_MPU instances */
33#define OMAP54XX_PRCM_MPU_OCP_SOCKET_INST 0x0000
34#define OMAP54XX_PRCM_MPU_DEVICE_INST 0x0200
35#define OMAP54XX_PRCM_MPU_PRM_C0_INST 0x0400
36#define OMAP54XX_PRCM_MPU_CM_C0_INST 0x0600
37#define OMAP54XX_PRCM_MPU_PRM_C1_INST 0x0800
38#define OMAP54XX_PRCM_MPU_CM_C1_INST 0x0a00
39
40/* PRCM_MPU clockdomain register offsets (from instance start) */
41#define OMAP54XX_PRCM_MPU_CM_C0_CPU0_CDOFFS 0x0000
42#define OMAP54XX_PRCM_MPU_CM_C1_CPU1_CDOFFS 0x0000
43
44
45/*
46 * PRCM_MPU
47 *
48 * The PRCM_MPU is a local PRCM inside the MPU subsystem. For the PRCM (global)
49 * point of view the PRCM_MPU is a single entity. It shares the same
50 * programming model as the global PRCM and thus can be assimilate as two new
51 * MOD inside the PRCM
52 */
53
54/* PRCM_MPU.PRCM_MPU_OCP_SOCKET register offsets */
55#define OMAP54XX_REVISION_PRCM_MPU_OFFSET 0x0000
56
57/* PRCM_MPU.PRCM_MPU_DEVICE register offsets */
58#define OMAP54XX_PRCM_MPU_PRM_RSTST_OFFSET 0x0000
59#define OMAP54XX_PRCM_MPU_PRM_PSCON_COUNT_OFFSET 0x0004
60#define OMAP54XX_PRM_FRAC_INCREMENTER_NUMERATOR_OFFSET 0x0010
61#define OMAP54XX_PRM_FRAC_INCREMENTER_DENUMERATOR_RELOAD_OFFSET 0x0014
62
63/* PRCM_MPU.PRCM_MPU_PRM_C0 register offsets */
64#define OMAP54XX_PM_CPU0_PWRSTCTRL_OFFSET 0x0000
65#define OMAP54XX_PM_CPU0_PWRSTST_OFFSET 0x0004
66#define OMAP54XX_RM_CPU0_CPU0_RSTCTRL_OFFSET 0x0010
67#define OMAP54XX_RM_CPU0_CPU0_RSTST_OFFSET 0x0014
68#define OMAP54XX_RM_CPU0_CPU0_CONTEXT_OFFSET 0x0024
69
70/* PRCM_MPU.PRCM_MPU_CM_C0 register offsets */
71#define OMAP54XX_CM_CPU0_CLKSTCTRL_OFFSET 0x0000
72#define OMAP54XX_CM_CPU0_CPU0_CLKCTRL_OFFSET 0x0020
73#define OMAP54XX_CM_CPU0_CPU0_CLKCTRL OMAP54XX_PRCM_MPU_REGADDR(OMAP54XX_PRCM_MPU_CM_C0_INST, 0x0020)
74
75/* PRCM_MPU.PRCM_MPU_PRM_C1 register offsets */
76#define OMAP54XX_PM_CPU1_PWRSTCTRL_OFFSET 0x0000
77#define OMAP54XX_PM_CPU1_PWRSTST_OFFSET 0x0004
78#define OMAP54XX_RM_CPU1_CPU1_RSTCTRL_OFFSET 0x0010
79#define OMAP54XX_RM_CPU1_CPU1_RSTST_OFFSET 0x0014
80#define OMAP54XX_RM_CPU1_CPU1_CONTEXT_OFFSET 0x0024
81
82/* PRCM_MPU.PRCM_MPU_CM_C1 register offsets */
83#define OMAP54XX_CM_CPU1_CLKSTCTRL_OFFSET 0x0000
84#define OMAP54XX_CM_CPU1_CPU1_CLKCTRL_OFFSET 0x0020
85#define OMAP54XX_CM_CPU1_CPU1_CLKCTRL OMAP54XX_PRCM_MPU_REGADDR(OMAP54XX_PRCM_MPU_CM_C1_INST, 0x0020)
86
87#endif
diff --git a/arch/arm/mach-omap2/prcm_mpu_44xx_54xx.h b/arch/arm/mach-omap2/prcm_mpu_44xx_54xx.h
new file mode 100644
index 000000000000..ca149e70bed0
--- /dev/null
+++ b/arch/arm/mach-omap2/prcm_mpu_44xx_54xx.h
@@ -0,0 +1,36 @@
1/*
2 * OMAP44xx and OMAP54xx PRCM MPU function prototypes
3 *
4 * Copyright (C) 2010, 2013 Texas Instruments, Inc.
5 * Copyright (C) 2010 Nokia Corporation
6 *
7 * Paul Walmsley (paul@pwsan.com)
8 * Rajendra Nayak (rnayak@ti.com)
9 * Benoit Cousson (b-cousson@ti.com)
10 *
11 * This file is automatically generated from the OMAP hardware databases.
12 * We respectfully ask that any modifications to this file be coordinated
13 * with the public linux-omap@vger.kernel.org mailing list and the
14 * authors above to ensure that the autogeneration scripts are kept
15 * up-to-date with the file contents.
16 *
17 * This program is free software; you can redistribute it and/or modify
18 * it under the terms of the GNU General Public License version 2 as
19 * published by the Free Software Foundation.
20 *
21 */
22
23#ifndef __ARCH_ARM_MACH_OMAP2_PRCM_MPU_44XX_54XX_H
24#define __ARCH_ARM_MACH_OMAP2_PRCM_MPU_44XX_54XX_H
25
26#ifndef __ASSEMBLER__
27extern void __iomem *prcm_mpu_base;
28
29extern u32 omap4_prcm_mpu_read_inst_reg(s16 inst, u16 idx);
30extern void omap4_prcm_mpu_write_inst_reg(u32 val, s16 inst, u16 idx);
31extern u32 omap4_prcm_mpu_rmw_inst_reg_bits(u32 mask, u32 bits, s16 inst,
32 s16 idx);
33extern void __init omap2_set_globals_prcm_mpu(void __iomem *prcm_mpu);
34#endif
35
36#endif
diff --git a/arch/arm/mach-omap2/prm-regbits-54xx.h b/arch/arm/mach-omap2/prm-regbits-54xx.h
new file mode 100644
index 000000000000..be31b21aa9c6
--- /dev/null
+++ b/arch/arm/mach-omap2/prm-regbits-54xx.h
@@ -0,0 +1,2701 @@
1/*
2 * OMAP54xx Power Management register bits
3 *
4 * Copyright (C) 2013 Texas Instruments Incorporated - http://www.ti.com
5 *
6 * Paul Walmsley (paul@pwsan.com)
7 * Rajendra Nayak (rnayak@ti.com)
8 * Benoit Cousson (b-cousson@ti.com)
9 *
10 * This file is automatically generated from the OMAP hardware databases.
11 * We respectfully ask that any modifications to this file be coordinated
12 * with the public linux-omap@vger.kernel.org mailing list and the
13 * authors above to ensure that the autogeneration scripts are kept
14 * up-to-date with the file contents.
15 *
16 * This program is free software; you can redistribute it and/or modify
17 * it under the terms of the GNU General Public License version 2 as
18 * published by the Free Software Foundation.
19 */
20
21#ifndef __ARCH_ARM_MACH_OMAP2_PRM_REGBITS_54XX_H
22#define __ARCH_ARM_MACH_OMAP2_PRM_REGBITS_54XX_H
23
24/* Used by PRM_SLDO_CORE_SETUP, PRM_SLDO_MM_SETUP, PRM_SLDO_MPU_SETUP */
25#define OMAP54XX_ABBOFF_ACT_SHIFT 1
26#define OMAP54XX_ABBOFF_ACT_WIDTH 0x1
27#define OMAP54XX_ABBOFF_ACT_MASK (1 << 1)
28
29/* Used by PRM_SLDO_CORE_SETUP, PRM_SLDO_MM_SETUP, PRM_SLDO_MPU_SETUP */
30#define OMAP54XX_ABBOFF_SLEEP_SHIFT 2
31#define OMAP54XX_ABBOFF_SLEEP_WIDTH 0x1
32#define OMAP54XX_ABBOFF_SLEEP_MASK (1 << 2)
33
34/* Used by PRM_IRQENABLE_IPU, PRM_IRQENABLE_MPU */
35#define OMAP54XX_ABB_MM_DONE_EN_SHIFT 31
36#define OMAP54XX_ABB_MM_DONE_EN_WIDTH 0x1
37#define OMAP54XX_ABB_MM_DONE_EN_MASK (1 << 31)
38
39/* Used by PRM_IRQSTATUS_IPU, PRM_IRQSTATUS_MPU */
40#define OMAP54XX_ABB_MM_DONE_ST_SHIFT 31
41#define OMAP54XX_ABB_MM_DONE_ST_WIDTH 0x1
42#define OMAP54XX_ABB_MM_DONE_ST_MASK (1 << 31)
43
44/* Used by PRM_IRQENABLE_MPU_2 */
45#define OMAP54XX_ABB_MPU_DONE_EN_SHIFT 7
46#define OMAP54XX_ABB_MPU_DONE_EN_WIDTH 0x1
47#define OMAP54XX_ABB_MPU_DONE_EN_MASK (1 << 7)
48
49/* Used by PRM_IRQSTATUS_MPU_2 */
50#define OMAP54XX_ABB_MPU_DONE_ST_SHIFT 7
51#define OMAP54XX_ABB_MPU_DONE_ST_WIDTH 0x1
52#define OMAP54XX_ABB_MPU_DONE_ST_MASK (1 << 7)
53
54/* Used by PRM_ABBLDO_MM_SETUP, PRM_ABBLDO_MPU_SETUP */
55#define OMAP54XX_ACTIVE_FBB_SEL_SHIFT 2
56#define OMAP54XX_ACTIVE_FBB_SEL_WIDTH 0x1
57#define OMAP54XX_ACTIVE_FBB_SEL_MASK (1 << 2)
58
59/* Used by PM_ABE_PWRSTCTRL */
60#define OMAP54XX_AESSMEM_ONSTATE_SHIFT 16
61#define OMAP54XX_AESSMEM_ONSTATE_WIDTH 0x2
62#define OMAP54XX_AESSMEM_ONSTATE_MASK (0x3 << 16)
63
64/* Used by PM_ABE_PWRSTCTRL */
65#define OMAP54XX_AESSMEM_RETSTATE_SHIFT 8
66#define OMAP54XX_AESSMEM_RETSTATE_WIDTH 0x1
67#define OMAP54XX_AESSMEM_RETSTATE_MASK (1 << 8)
68
69/* Used by PM_ABE_PWRSTST */
70#define OMAP54XX_AESSMEM_STATEST_SHIFT 4
71#define OMAP54XX_AESSMEM_STATEST_WIDTH 0x2
72#define OMAP54XX_AESSMEM_STATEST_MASK (0x3 << 4)
73
74/* Used by PRM_SLDO_CORE_SETUP, PRM_SLDO_MM_SETUP, PRM_SLDO_MPU_SETUP */
75#define OMAP54XX_AIPOFF_SHIFT 8
76#define OMAP54XX_AIPOFF_WIDTH 0x1
77#define OMAP54XX_AIPOFF_MASK (1 << 8)
78
79/* Used by PRM_VOLTCTRL */
80#define OMAP54XX_AUTO_CTRL_VDD_CORE_L_SHIFT 0
81#define OMAP54XX_AUTO_CTRL_VDD_CORE_L_WIDTH 0x2
82#define OMAP54XX_AUTO_CTRL_VDD_CORE_L_MASK (0x3 << 0)
83
84/* Used by PRM_VOLTCTRL */
85#define OMAP54XX_AUTO_CTRL_VDD_MM_L_SHIFT 4
86#define OMAP54XX_AUTO_CTRL_VDD_MM_L_WIDTH 0x2
87#define OMAP54XX_AUTO_CTRL_VDD_MM_L_MASK (0x3 << 4)
88
89/* Used by PRM_VOLTCTRL */
90#define OMAP54XX_AUTO_CTRL_VDD_MPU_L_SHIFT 2
91#define OMAP54XX_AUTO_CTRL_VDD_MPU_L_WIDTH 0x2
92#define OMAP54XX_AUTO_CTRL_VDD_MPU_L_MASK (0x3 << 2)
93
94/* Used by PRM_VC_BYPASS_ERRST */
95#define OMAP54XX_BYPS_RA_ERR_SHIFT 1
96#define OMAP54XX_BYPS_RA_ERR_WIDTH 0x1
97#define OMAP54XX_BYPS_RA_ERR_MASK (1 << 1)
98
99/* Used by PRM_VC_BYPASS_ERRST */
100#define OMAP54XX_BYPS_SA_ERR_SHIFT 0
101#define OMAP54XX_BYPS_SA_ERR_WIDTH 0x1
102#define OMAP54XX_BYPS_SA_ERR_MASK (1 << 0)
103
104/* Used by PRM_VC_BYPASS_ERRST */
105#define OMAP54XX_BYPS_TIMEOUT_ERR_SHIFT 2
106#define OMAP54XX_BYPS_TIMEOUT_ERR_WIDTH 0x1
107#define OMAP54XX_BYPS_TIMEOUT_ERR_MASK (1 << 2)
108
109/* Used by PRM_RSTST */
110#define OMAP54XX_C2C_RST_SHIFT 10
111#define OMAP54XX_C2C_RST_WIDTH 0x1
112#define OMAP54XX_C2C_RST_MASK (1 << 10)
113
114/* Used by PM_CAM_PWRSTCTRL */
115#define OMAP54XX_CAM_MEM_ONSTATE_SHIFT 16
116#define OMAP54XX_CAM_MEM_ONSTATE_WIDTH 0x2
117#define OMAP54XX_CAM_MEM_ONSTATE_MASK (0x3 << 16)
118
119/* Used by PM_CAM_PWRSTST */
120#define OMAP54XX_CAM_MEM_STATEST_SHIFT 4
121#define OMAP54XX_CAM_MEM_STATEST_WIDTH 0x2
122#define OMAP54XX_CAM_MEM_STATEST_MASK (0x3 << 4)
123
124/* Used by PRM_CLKREQCTRL */
125#define OMAP54XX_CLKREQ_COND_SHIFT 0
126#define OMAP54XX_CLKREQ_COND_WIDTH 0x3
127#define OMAP54XX_CLKREQ_COND_MASK (0x7 << 0)
128
129/* Used by PRM_VC_SMPS_CORE_CONFIG */
130#define OMAP54XX_CMDRA_VDD_CORE_L_SHIFT 16
131#define OMAP54XX_CMDRA_VDD_CORE_L_WIDTH 0x8
132#define OMAP54XX_CMDRA_VDD_CORE_L_MASK (0xff << 16)
133
134/* Used by PRM_VC_SMPS_MM_CONFIG */
135#define OMAP54XX_CMDRA_VDD_MM_L_SHIFT 16
136#define OMAP54XX_CMDRA_VDD_MM_L_WIDTH 0x8
137#define OMAP54XX_CMDRA_VDD_MM_L_MASK (0xff << 16)
138
139/* Used by PRM_VC_SMPS_MPU_CONFIG */
140#define OMAP54XX_CMDRA_VDD_MPU_L_SHIFT 16
141#define OMAP54XX_CMDRA_VDD_MPU_L_WIDTH 0x8
142#define OMAP54XX_CMDRA_VDD_MPU_L_MASK (0xff << 16)
143
144/* Used by PRM_VC_SMPS_CORE_CONFIG */
145#define OMAP54XX_CMD_VDD_CORE_L_SHIFT 28
146#define OMAP54XX_CMD_VDD_CORE_L_WIDTH 0x1
147#define OMAP54XX_CMD_VDD_CORE_L_MASK (1 << 28)
148
149/* Used by PRM_VC_SMPS_MM_CONFIG */
150#define OMAP54XX_CMD_VDD_MM_L_SHIFT 28
151#define OMAP54XX_CMD_VDD_MM_L_WIDTH 0x1
152#define OMAP54XX_CMD_VDD_MM_L_MASK (1 << 28)
153
154/* Used by PRM_VC_SMPS_MPU_CONFIG */
155#define OMAP54XX_CMD_VDD_MPU_L_SHIFT 28
156#define OMAP54XX_CMD_VDD_MPU_L_WIDTH 0x1
157#define OMAP54XX_CMD_VDD_MPU_L_MASK (1 << 28)
158
159/* Used by PM_CORE_PWRSTCTRL */
160#define OMAP54XX_CORE_OCMRAM_ONSTATE_SHIFT 18
161#define OMAP54XX_CORE_OCMRAM_ONSTATE_WIDTH 0x2
162#define OMAP54XX_CORE_OCMRAM_ONSTATE_MASK (0x3 << 18)
163
164/* Used by PM_CORE_PWRSTCTRL */
165#define OMAP54XX_CORE_OCMRAM_RETSTATE_SHIFT 9
166#define OMAP54XX_CORE_OCMRAM_RETSTATE_WIDTH 0x1
167#define OMAP54XX_CORE_OCMRAM_RETSTATE_MASK (1 << 9)
168
169/* Used by PM_CORE_PWRSTST */
170#define OMAP54XX_CORE_OCMRAM_STATEST_SHIFT 6
171#define OMAP54XX_CORE_OCMRAM_STATEST_WIDTH 0x2
172#define OMAP54XX_CORE_OCMRAM_STATEST_MASK (0x3 << 6)
173
174/* Used by PM_CORE_PWRSTCTRL */
175#define OMAP54XX_CORE_OTHER_BANK_ONSTATE_SHIFT 16
176#define OMAP54XX_CORE_OTHER_BANK_ONSTATE_WIDTH 0x2
177#define OMAP54XX_CORE_OTHER_BANK_ONSTATE_MASK (0x3 << 16)
178
179/* Used by PM_CORE_PWRSTCTRL */
180#define OMAP54XX_CORE_OTHER_BANK_RETSTATE_SHIFT 8
181#define OMAP54XX_CORE_OTHER_BANK_RETSTATE_WIDTH 0x1
182#define OMAP54XX_CORE_OTHER_BANK_RETSTATE_MASK (1 << 8)
183
184/* Used by PM_CORE_PWRSTST */
185#define OMAP54XX_CORE_OTHER_BANK_STATEST_SHIFT 4
186#define OMAP54XX_CORE_OTHER_BANK_STATEST_WIDTH 0x2
187#define OMAP54XX_CORE_OTHER_BANK_STATEST_MASK (0x3 << 4)
188
189/* Used by REVISION_PRM */
190#define OMAP54XX_CUSTOM_SHIFT 6
191#define OMAP54XX_CUSTOM_WIDTH 0x2
192#define OMAP54XX_CUSTOM_MASK (0x3 << 6)
193
194/* Used by PRM_VC_VAL_BYPASS */
195#define OMAP54XX_DATA_SHIFT 16
196#define OMAP54XX_DATA_WIDTH 0x8
197#define OMAP54XX_DATA_MASK (0xff << 16)
198
199/* Used by PRM_DEBUG_CORE_RET_TRANS */
200#define OMAP54XX_PRM_DEBUG_OUT_SHIFT 0
201#define OMAP54XX_PRM_DEBUG_OUT_WIDTH 0x1c
202#define OMAP54XX_PRM_DEBUG_OUT_MASK (0xfffffff << 0)
203
204/* Renamed from DEBUG_OUT Used by PRM_DEBUG_MM_RET_TRANS */
205#define OMAP54XX_DEBUG_OUT_0_9_SHIFT 0
206#define OMAP54XX_DEBUG_OUT_0_9_WIDTH 0xa
207#define OMAP54XX_DEBUG_OUT_0_9_MASK (0x3ff << 0)
208
209/* Renamed from DEBUG_OUT Used by PRM_DEBUG_MPU_RET_TRANS */
210#define OMAP54XX_DEBUG_OUT_0_6_SHIFT 0
211#define OMAP54XX_DEBUG_OUT_0_6_WIDTH 0x7
212#define OMAP54XX_DEBUG_OUT_0_6_MASK (0x7f << 0)
213
214/* Renamed from DEBUG_OUT Used by PRM_DEBUG_OFF_TRANS */
215#define OMAP54XX_DEBUG_OUT_0_31_SHIFT 0
216#define OMAP54XX_DEBUG_OUT_0_31_WIDTH 0x20
217#define OMAP54XX_DEBUG_OUT_0_31_MASK (0xffffffff << 0)
218
219/* Renamed from DEBUG_OUT Used by PRM_DEBUG_WKUPAON_FD_TRANS */
220#define OMAP54XX_DEBUG_OUT_0_11_SHIFT 0
221#define OMAP54XX_DEBUG_OUT_0_11_WIDTH 0xc
222#define OMAP54XX_DEBUG_OUT_0_11_MASK (0xfff << 0)
223
224/* Used by PRM_DEVICE_OFF_CTRL */
225#define OMAP54XX_DEVICE_OFF_ENABLE_SHIFT 0
226#define OMAP54XX_DEVICE_OFF_ENABLE_WIDTH 0x1
227#define OMAP54XX_DEVICE_OFF_ENABLE_MASK (1 << 0)
228
229/* Used by PRM_VC_CFG_I2C_MODE */
230#define OMAP54XX_DFILTEREN_SHIFT 6
231#define OMAP54XX_DFILTEREN_WIDTH 0x1
232#define OMAP54XX_DFILTEREN_MASK (1 << 6)
233
234/* Used by PRM_IRQENABLE_DSP, PRM_IRQENABLE_IPU, PRM_IRQENABLE_MPU */
235#define OMAP54XX_DPLL_ABE_RECAL_EN_SHIFT 4
236#define OMAP54XX_DPLL_ABE_RECAL_EN_WIDTH 0x1
237#define OMAP54XX_DPLL_ABE_RECAL_EN_MASK (1 << 4)
238
239/* Used by PRM_IRQSTATUS_DSP, PRM_IRQSTATUS_IPU, PRM_IRQSTATUS_MPU */
240#define OMAP54XX_DPLL_ABE_RECAL_ST_SHIFT 4
241#define OMAP54XX_DPLL_ABE_RECAL_ST_WIDTH 0x1
242#define OMAP54XX_DPLL_ABE_RECAL_ST_MASK (1 << 4)
243
244/* Used by PRM_IRQENABLE_IPU, PRM_IRQENABLE_MPU */
245#define OMAP54XX_DPLL_CORE_RECAL_EN_SHIFT 0
246#define OMAP54XX_DPLL_CORE_RECAL_EN_WIDTH 0x1
247#define OMAP54XX_DPLL_CORE_RECAL_EN_MASK (1 << 0)
248
249/* Used by PRM_IRQSTATUS_IPU, PRM_IRQSTATUS_MPU */
250#define OMAP54XX_DPLL_CORE_RECAL_ST_SHIFT 0
251#define OMAP54XX_DPLL_CORE_RECAL_ST_WIDTH 0x1
252#define OMAP54XX_DPLL_CORE_RECAL_ST_MASK (1 << 0)
253
254/* Used by PRM_IRQENABLE_DSP, PRM_IRQENABLE_IPU, PRM_IRQENABLE_MPU */
255#define OMAP54XX_DPLL_IVA_RECAL_EN_SHIFT 2
256#define OMAP54XX_DPLL_IVA_RECAL_EN_WIDTH 0x1
257#define OMAP54XX_DPLL_IVA_RECAL_EN_MASK (1 << 2)
258
259/* Used by PRM_IRQSTATUS_DSP, PRM_IRQSTATUS_IPU, PRM_IRQSTATUS_MPU */
260#define OMAP54XX_DPLL_IVA_RECAL_ST_SHIFT 2
261#define OMAP54XX_DPLL_IVA_RECAL_ST_WIDTH 0x1
262#define OMAP54XX_DPLL_IVA_RECAL_ST_MASK (1 << 2)
263
264/* Used by PRM_IRQENABLE_MPU */
265#define OMAP54XX_DPLL_MPU_RECAL_EN_SHIFT 1
266#define OMAP54XX_DPLL_MPU_RECAL_EN_WIDTH 0x1
267#define OMAP54XX_DPLL_MPU_RECAL_EN_MASK (1 << 1)
268
269/* Used by PRM_IRQSTATUS_MPU */
270#define OMAP54XX_DPLL_MPU_RECAL_ST_SHIFT 1
271#define OMAP54XX_DPLL_MPU_RECAL_ST_WIDTH 0x1
272#define OMAP54XX_DPLL_MPU_RECAL_ST_MASK (1 << 1)
273
274/* Used by PRM_IRQENABLE_IPU, PRM_IRQENABLE_MPU */
275#define OMAP54XX_DPLL_PER_RECAL_EN_SHIFT 3
276#define OMAP54XX_DPLL_PER_RECAL_EN_WIDTH 0x1
277#define OMAP54XX_DPLL_PER_RECAL_EN_MASK (1 << 3)
278
279/* Used by PRM_IRQSTATUS_IPU, PRM_IRQSTATUS_MPU */
280#define OMAP54XX_DPLL_PER_RECAL_ST_SHIFT 3
281#define OMAP54XX_DPLL_PER_RECAL_ST_WIDTH 0x1
282#define OMAP54XX_DPLL_PER_RECAL_ST_MASK (1 << 3)
283
284/* Used by PM_DSP_PWRSTCTRL */
285#define OMAP54XX_DSP_EDMA_ONSTATE_SHIFT 20
286#define OMAP54XX_DSP_EDMA_ONSTATE_WIDTH 0x2
287#define OMAP54XX_DSP_EDMA_ONSTATE_MASK (0x3 << 20)
288
289/* Used by PM_DSP_PWRSTCTRL */
290#define OMAP54XX_DSP_EDMA_RETSTATE_SHIFT 10
291#define OMAP54XX_DSP_EDMA_RETSTATE_WIDTH 0x1
292#define OMAP54XX_DSP_EDMA_RETSTATE_MASK (1 << 10)
293
294/* Used by PM_DSP_PWRSTST */
295#define OMAP54XX_DSP_EDMA_STATEST_SHIFT 8
296#define OMAP54XX_DSP_EDMA_STATEST_WIDTH 0x2
297#define OMAP54XX_DSP_EDMA_STATEST_MASK (0x3 << 8)
298
299/* Used by PM_DSP_PWRSTCTRL */
300#define OMAP54XX_DSP_L1_ONSTATE_SHIFT 16
301#define OMAP54XX_DSP_L1_ONSTATE_WIDTH 0x2
302#define OMAP54XX_DSP_L1_ONSTATE_MASK (0x3 << 16)
303
304/* Used by PM_DSP_PWRSTCTRL */
305#define OMAP54XX_DSP_L1_RETSTATE_SHIFT 8
306#define OMAP54XX_DSP_L1_RETSTATE_WIDTH 0x1
307#define OMAP54XX_DSP_L1_RETSTATE_MASK (1 << 8)
308
309/* Used by PM_DSP_PWRSTST */
310#define OMAP54XX_DSP_L1_STATEST_SHIFT 4
311#define OMAP54XX_DSP_L1_STATEST_WIDTH 0x2
312#define OMAP54XX_DSP_L1_STATEST_MASK (0x3 << 4)
313
314/* Used by PM_DSP_PWRSTCTRL */
315#define OMAP54XX_DSP_L2_ONSTATE_SHIFT 18
316#define OMAP54XX_DSP_L2_ONSTATE_WIDTH 0x2
317#define OMAP54XX_DSP_L2_ONSTATE_MASK (0x3 << 18)
318
319/* Used by PM_DSP_PWRSTCTRL */
320#define OMAP54XX_DSP_L2_RETSTATE_SHIFT 9
321#define OMAP54XX_DSP_L2_RETSTATE_WIDTH 0x1
322#define OMAP54XX_DSP_L2_RETSTATE_MASK (1 << 9)
323
324/* Used by PM_DSP_PWRSTST */
325#define OMAP54XX_DSP_L2_STATEST_SHIFT 6
326#define OMAP54XX_DSP_L2_STATEST_WIDTH 0x2
327#define OMAP54XX_DSP_L2_STATEST_MASK (0x3 << 6)
328
329/* Used by PM_DSS_PWRSTCTRL */
330#define OMAP54XX_DSS_MEM_ONSTATE_SHIFT 16
331#define OMAP54XX_DSS_MEM_ONSTATE_WIDTH 0x2
332#define OMAP54XX_DSS_MEM_ONSTATE_MASK (0x3 << 16)
333
334/* Used by PM_DSS_PWRSTCTRL */
335#define OMAP54XX_DSS_MEM_RETSTATE_SHIFT 8
336#define OMAP54XX_DSS_MEM_RETSTATE_WIDTH 0x1
337#define OMAP54XX_DSS_MEM_RETSTATE_MASK (1 << 8)
338
339/* Used by PM_DSS_PWRSTST */
340#define OMAP54XX_DSS_MEM_STATEST_SHIFT 4
341#define OMAP54XX_DSS_MEM_STATEST_WIDTH 0x2
342#define OMAP54XX_DSS_MEM_STATEST_MASK (0x3 << 4)
343
344/* Used by PRM_DEVICE_OFF_CTRL */
345#define OMAP54XX_EMIF1_OFFWKUP_DISABLE_SHIFT 8
346#define OMAP54XX_EMIF1_OFFWKUP_DISABLE_WIDTH 0x1
347#define OMAP54XX_EMIF1_OFFWKUP_DISABLE_MASK (1 << 8)
348
349/* Used by PRM_DEVICE_OFF_CTRL */
350#define OMAP54XX_EMIF2_OFFWKUP_DISABLE_SHIFT 9
351#define OMAP54XX_EMIF2_OFFWKUP_DISABLE_WIDTH 0x1
352#define OMAP54XX_EMIF2_OFFWKUP_DISABLE_MASK (1 << 9)
353
354/* Used by PM_EMU_PWRSTCTRL */
355#define OMAP54XX_EMU_BANK_ONSTATE_SHIFT 16
356#define OMAP54XX_EMU_BANK_ONSTATE_WIDTH 0x2
357#define OMAP54XX_EMU_BANK_ONSTATE_MASK (0x3 << 16)
358
359/* Used by PM_EMU_PWRSTST */
360#define OMAP54XX_EMU_BANK_STATEST_SHIFT 4
361#define OMAP54XX_EMU_BANK_STATEST_WIDTH 0x2
362#define OMAP54XX_EMU_BANK_STATEST_MASK (0x3 << 4)
363
364/*
365 * Used by PRM_SLDO_CORE_SETUP, PRM_SLDO_MM_SETUP, PRM_SLDO_MPU_SETUP,
366 * PRM_SRAM_WKUP_SETUP
367 */
368#define OMAP54XX_ENABLE_RTA_SHIFT 0
369#define OMAP54XX_ENABLE_RTA_WIDTH 0x1
370#define OMAP54XX_ENABLE_RTA_MASK (1 << 0)
371
372/* Used by PRM_SLDO_CORE_SETUP, PRM_SLDO_MM_SETUP, PRM_SLDO_MPU_SETUP */
373#define OMAP54XX_ENFUNC1_SHIFT 3
374#define OMAP54XX_ENFUNC1_WIDTH 0x1
375#define OMAP54XX_ENFUNC1_MASK (1 << 3)
376
377/* Used by PRM_SLDO_CORE_SETUP, PRM_SLDO_MM_SETUP, PRM_SLDO_MPU_SETUP */
378#define OMAP54XX_ENFUNC2_SHIFT 4
379#define OMAP54XX_ENFUNC2_WIDTH 0x1
380#define OMAP54XX_ENFUNC2_MASK (1 << 4)
381
382/* Used by PRM_SLDO_CORE_SETUP, PRM_SLDO_MM_SETUP, PRM_SLDO_MPU_SETUP */
383#define OMAP54XX_ENFUNC3_SHIFT 5
384#define OMAP54XX_ENFUNC3_WIDTH 0x1
385#define OMAP54XX_ENFUNC3_MASK (1 << 5)
386
387/* Used by PRM_SLDO_CORE_SETUP, PRM_SLDO_MM_SETUP, PRM_SLDO_MPU_SETUP */
388#define OMAP54XX_ENFUNC4_SHIFT 6
389#define OMAP54XX_ENFUNC4_WIDTH 0x1
390#define OMAP54XX_ENFUNC4_MASK (1 << 6)
391
392/* Used by PRM_SLDO_CORE_SETUP, PRM_SLDO_MM_SETUP, PRM_SLDO_MPU_SETUP */
393#define OMAP54XX_ENFUNC5_SHIFT 7
394#define OMAP54XX_ENFUNC5_WIDTH 0x1
395#define OMAP54XX_ENFUNC5_MASK (1 << 7)
396
397/* Used by PRM_VP_CORE_CONFIG, PRM_VP_MM_CONFIG, PRM_VP_MPU_CONFIG */
398#define OMAP54XX_ERRORGAIN_SHIFT 16
399#define OMAP54XX_ERRORGAIN_WIDTH 0x8
400#define OMAP54XX_ERRORGAIN_MASK (0xff << 16)
401
402/* Used by PRM_VP_CORE_CONFIG, PRM_VP_MM_CONFIG, PRM_VP_MPU_CONFIG */
403#define OMAP54XX_ERROROFFSET_SHIFT 24
404#define OMAP54XX_ERROROFFSET_WIDTH 0x8
405#define OMAP54XX_ERROROFFSET_MASK (0xff << 24)
406
407/* Used by PRM_RSTST */
408#define OMAP54XX_EXTERNAL_WARM_RST_SHIFT 5
409#define OMAP54XX_EXTERNAL_WARM_RST_WIDTH 0x1
410#define OMAP54XX_EXTERNAL_WARM_RST_MASK (1 << 5)
411
412/* Used by PRM_VP_CORE_CONFIG, PRM_VP_MM_CONFIG, PRM_VP_MPU_CONFIG */
413#define OMAP54XX_FORCEUPDATE_SHIFT 1
414#define OMAP54XX_FORCEUPDATE_WIDTH 0x1
415#define OMAP54XX_FORCEUPDATE_MASK (1 << 1)
416
417/* Used by PRM_VP_CORE_VOLTAGE, PRM_VP_MM_VOLTAGE, PRM_VP_MPU_VOLTAGE */
418#define OMAP54XX_FORCEUPDATEWAIT_SHIFT 8
419#define OMAP54XX_FORCEUPDATEWAIT_WIDTH 0x18
420#define OMAP54XX_FORCEUPDATEWAIT_MASK (0xffffff << 8)
421
422/* Used by PRM_IRQENABLE_DSP, PRM_IRQENABLE_IPU */
423#define OMAP54XX_FORCEWKUP_EN_SHIFT 10
424#define OMAP54XX_FORCEWKUP_EN_WIDTH 0x1
425#define OMAP54XX_FORCEWKUP_EN_MASK (1 << 10)
426
427/* Used by PRM_IRQSTATUS_DSP, PRM_IRQSTATUS_IPU */
428#define OMAP54XX_FORCEWKUP_ST_SHIFT 10
429#define OMAP54XX_FORCEWKUP_ST_WIDTH 0x1
430#define OMAP54XX_FORCEWKUP_ST_MASK (1 << 10)
431
432/* Used by REVISION_PRM */
433#define OMAP54XX_FUNC_SHIFT 16
434#define OMAP54XX_FUNC_WIDTH 0xc
435#define OMAP54XX_FUNC_MASK (0xfff << 16)
436
437/* Used by PRM_RSTST */
438#define OMAP54XX_GLOBAL_COLD_RST_SHIFT 0
439#define OMAP54XX_GLOBAL_COLD_RST_WIDTH 0x1
440#define OMAP54XX_GLOBAL_COLD_RST_MASK (1 << 0)
441
442/* Used by PRM_RSTST */
443#define OMAP54XX_GLOBAL_WARM_SW_RST_SHIFT 1
444#define OMAP54XX_GLOBAL_WARM_SW_RST_WIDTH 0x1
445#define OMAP54XX_GLOBAL_WARM_SW_RST_MASK (1 << 1)
446
447/* Used by PRM_IO_PMCTRL */
448#define OMAP54XX_GLOBAL_WUEN_SHIFT 16
449#define OMAP54XX_GLOBAL_WUEN_WIDTH 0x1
450#define OMAP54XX_GLOBAL_WUEN_MASK (1 << 16)
451
452/* Used by PM_GPU_PWRSTCTRL */
453#define OMAP54XX_GPU_MEM_ONSTATE_SHIFT 16
454#define OMAP54XX_GPU_MEM_ONSTATE_WIDTH 0x2
455#define OMAP54XX_GPU_MEM_ONSTATE_MASK (0x3 << 16)
456
457/* Used by PM_GPU_PWRSTST */
458#define OMAP54XX_GPU_MEM_STATEST_SHIFT 4
459#define OMAP54XX_GPU_MEM_STATEST_WIDTH 0x2
460#define OMAP54XX_GPU_MEM_STATEST_MASK (0x3 << 4)
461
462/* Used by PRM_VC_CFG_I2C_MODE */
463#define OMAP54XX_HSMCODE_SHIFT 0
464#define OMAP54XX_HSMCODE_WIDTH 0x3
465#define OMAP54XX_HSMCODE_MASK (0x7 << 0)
466
467/* Used by PRM_VC_CFG_I2C_MODE */
468#define OMAP54XX_HSMODEEN_SHIFT 3
469#define OMAP54XX_HSMODEEN_WIDTH 0x1
470#define OMAP54XX_HSMODEEN_MASK (1 << 3)
471
472/* Used by PRM_VC_CFG_I2C_CLK */
473#define OMAP54XX_HSSCLH_SHIFT 16
474#define OMAP54XX_HSSCLH_WIDTH 0x8
475#define OMAP54XX_HSSCLH_MASK (0xff << 16)
476
477/* Used by PRM_VC_CFG_I2C_CLK */
478#define OMAP54XX_HSSCLL_SHIFT 24
479#define OMAP54XX_HSSCLL_WIDTH 0x8
480#define OMAP54XX_HSSCLL_MASK (0xff << 24)
481
482/* Used by PM_IVA_PWRSTCTRL */
483#define OMAP54XX_HWA_MEM_ONSTATE_SHIFT 16
484#define OMAP54XX_HWA_MEM_ONSTATE_WIDTH 0x2
485#define OMAP54XX_HWA_MEM_ONSTATE_MASK (0x3 << 16)
486
487/* Used by PM_IVA_PWRSTCTRL */
488#define OMAP54XX_HWA_MEM_RETSTATE_SHIFT 8
489#define OMAP54XX_HWA_MEM_RETSTATE_WIDTH 0x1
490#define OMAP54XX_HWA_MEM_RETSTATE_MASK (1 << 8)
491
492/* Used by PM_IVA_PWRSTST */
493#define OMAP54XX_HWA_MEM_STATEST_SHIFT 4
494#define OMAP54XX_HWA_MEM_STATEST_WIDTH 0x2
495#define OMAP54XX_HWA_MEM_STATEST_MASK (0x3 << 4)
496
497/* Used by PRM_RSTST */
498#define OMAP54XX_ICEPICK_RST_SHIFT 9
499#define OMAP54XX_ICEPICK_RST_WIDTH 0x1
500#define OMAP54XX_ICEPICK_RST_MASK (1 << 9)
501
502/* Used by PRM_VP_CORE_CONFIG, PRM_VP_MM_CONFIG, PRM_VP_MPU_CONFIG */
503#define OMAP54XX_INITVDD_SHIFT 2
504#define OMAP54XX_INITVDD_WIDTH 0x1
505#define OMAP54XX_INITVDD_MASK (1 << 2)
506
507/* Used by PRM_VP_CORE_CONFIG, PRM_VP_MM_CONFIG, PRM_VP_MPU_CONFIG */
508#define OMAP54XX_INITVOLTAGE_SHIFT 8
509#define OMAP54XX_INITVOLTAGE_WIDTH 0x8
510#define OMAP54XX_INITVOLTAGE_MASK (0xff << 8)
511
512/*
513 * Used by PM_ABE_PWRSTST, PM_CAM_PWRSTST, PM_CORE_PWRSTST,
514 * PM_CUSTEFUSE_PWRSTST, PM_DSP_PWRSTST, PM_DSS_PWRSTST, PM_EMU_PWRSTST,
515 * PM_GPU_PWRSTST, PM_IVA_PWRSTST, PM_L3INIT_PWRSTST, PM_MPU_PWRSTST,
516 * PRM_VOLTST_MM, PRM_VOLTST_MPU
517 */
518#define OMAP54XX_INTRANSITION_SHIFT 20
519#define OMAP54XX_INTRANSITION_WIDTH 0x1
520#define OMAP54XX_INTRANSITION_MASK (1 << 20)
521
522/* Used by PRM_IRQENABLE_IPU, PRM_IRQENABLE_MPU */
523#define OMAP54XX_IO_EN_SHIFT 9
524#define OMAP54XX_IO_EN_WIDTH 0x1
525#define OMAP54XX_IO_EN_MASK (1 << 9)
526
527/* Used by PRM_IO_PMCTRL */
528#define OMAP54XX_IO_ON_STATUS_SHIFT 5
529#define OMAP54XX_IO_ON_STATUS_WIDTH 0x1
530#define OMAP54XX_IO_ON_STATUS_MASK (1 << 5)
531
532/* Used by PRM_IRQSTATUS_IPU, PRM_IRQSTATUS_MPU */
533#define OMAP54XX_IO_ST_SHIFT 9
534#define OMAP54XX_IO_ST_WIDTH 0x1
535#define OMAP54XX_IO_ST_MASK (1 << 9)
536
537/* Used by PM_CORE_PWRSTCTRL */
538#define OMAP54XX_IPU_L2RAM_ONSTATE_SHIFT 20
539#define OMAP54XX_IPU_L2RAM_ONSTATE_WIDTH 0x2
540#define OMAP54XX_IPU_L2RAM_ONSTATE_MASK (0x3 << 20)
541
542/* Used by PM_CORE_PWRSTCTRL */
543#define OMAP54XX_IPU_L2RAM_RETSTATE_SHIFT 10
544#define OMAP54XX_IPU_L2RAM_RETSTATE_WIDTH 0x1
545#define OMAP54XX_IPU_L2RAM_RETSTATE_MASK (1 << 10)
546
547/* Used by PM_CORE_PWRSTST */
548#define OMAP54XX_IPU_L2RAM_STATEST_SHIFT 8
549#define OMAP54XX_IPU_L2RAM_STATEST_WIDTH 0x2
550#define OMAP54XX_IPU_L2RAM_STATEST_MASK (0x3 << 8)
551
552/* Used by PM_CORE_PWRSTCTRL */
553#define OMAP54XX_IPU_UNICACHE_ONSTATE_SHIFT 22
554#define OMAP54XX_IPU_UNICACHE_ONSTATE_WIDTH 0x2
555#define OMAP54XX_IPU_UNICACHE_ONSTATE_MASK (0x3 << 22)
556
557/* Used by PM_CORE_PWRSTCTRL */
558#define OMAP54XX_IPU_UNICACHE_RETSTATE_SHIFT 11
559#define OMAP54XX_IPU_UNICACHE_RETSTATE_WIDTH 0x1
560#define OMAP54XX_IPU_UNICACHE_RETSTATE_MASK (1 << 11)
561
562/* Used by PM_CORE_PWRSTST */
563#define OMAP54XX_IPU_UNICACHE_STATEST_SHIFT 10
564#define OMAP54XX_IPU_UNICACHE_STATEST_WIDTH 0x2
565#define OMAP54XX_IPU_UNICACHE_STATEST_MASK (0x3 << 10)
566
567/* Used by PRM_IO_PMCTRL */
568#define OMAP54XX_ISOCLK_OVERRIDE_SHIFT 0
569#define OMAP54XX_ISOCLK_OVERRIDE_WIDTH 0x1
570#define OMAP54XX_ISOCLK_OVERRIDE_MASK (1 << 0)
571
572/* Used by PRM_IO_PMCTRL */
573#define OMAP54XX_ISOCLK_STATUS_SHIFT 1
574#define OMAP54XX_ISOCLK_STATUS_WIDTH 0x1
575#define OMAP54XX_ISOCLK_STATUS_MASK (1 << 1)
576
577/* Used by PRM_IO_PMCTRL */
578#define OMAP54XX_ISOOVR_EXTEND_SHIFT 4
579#define OMAP54XX_ISOOVR_EXTEND_WIDTH 0x1
580#define OMAP54XX_ISOOVR_EXTEND_MASK (1 << 4)
581
582/* Used by PRM_IO_COUNT */
583#define OMAP54XX_ISO_2_ON_TIME_SHIFT 0
584#define OMAP54XX_ISO_2_ON_TIME_WIDTH 0x8
585#define OMAP54XX_ISO_2_ON_TIME_MASK (0xff << 0)
586
587/* Used by PM_L3INIT_PWRSTCTRL */
588#define OMAP54XX_L3INIT_BANK1_ONSTATE_SHIFT 16
589#define OMAP54XX_L3INIT_BANK1_ONSTATE_WIDTH 0x2
590#define OMAP54XX_L3INIT_BANK1_ONSTATE_MASK (0x3 << 16)
591
592/* Used by PM_L3INIT_PWRSTCTRL */
593#define OMAP54XX_L3INIT_BANK1_RETSTATE_SHIFT 8
594#define OMAP54XX_L3INIT_BANK1_RETSTATE_WIDTH 0x1
595#define OMAP54XX_L3INIT_BANK1_RETSTATE_MASK (1 << 8)
596
597/* Used by PM_L3INIT_PWRSTST */
598#define OMAP54XX_L3INIT_BANK1_STATEST_SHIFT 4
599#define OMAP54XX_L3INIT_BANK1_STATEST_WIDTH 0x2
600#define OMAP54XX_L3INIT_BANK1_STATEST_MASK (0x3 << 4)
601
602/* Used by PM_L3INIT_PWRSTCTRL */
603#define OMAP54XX_L3INIT_BANK2_ONSTATE_SHIFT 18
604#define OMAP54XX_L3INIT_BANK2_ONSTATE_WIDTH 0x2
605#define OMAP54XX_L3INIT_BANK2_ONSTATE_MASK (0x3 << 18)
606
607/* Used by PM_L3INIT_PWRSTCTRL */
608#define OMAP54XX_L3INIT_BANK2_RETSTATE_SHIFT 9
609#define OMAP54XX_L3INIT_BANK2_RETSTATE_WIDTH 0x1
610#define OMAP54XX_L3INIT_BANK2_RETSTATE_MASK (1 << 9)
611
612/* Used by PM_L3INIT_PWRSTST */
613#define OMAP54XX_L3INIT_BANK2_STATEST_SHIFT 6
614#define OMAP54XX_L3INIT_BANK2_STATEST_WIDTH 0x2
615#define OMAP54XX_L3INIT_BANK2_STATEST_MASK (0x3 << 6)
616
617/*
618 * Used by PM_ABE_PWRSTST, PM_CAM_PWRSTST, PM_CORE_PWRSTST,
619 * PM_CUSTEFUSE_PWRSTST, PM_DSP_PWRSTST, PM_DSS_PWRSTST, PM_EMU_PWRSTST,
620 * PM_GPU_PWRSTST, PM_IVA_PWRSTST, PM_L3INIT_PWRSTST, PM_MPU_PWRSTST
621 */
622#define OMAP54XX_LASTPOWERSTATEENTERED_SHIFT 24
623#define OMAP54XX_LASTPOWERSTATEENTERED_WIDTH 0x2
624#define OMAP54XX_LASTPOWERSTATEENTERED_MASK (0x3 << 24)
625
626/* Used by PRM_RSTST */
627#define OMAP54XX_LLI_RST_SHIFT 14
628#define OMAP54XX_LLI_RST_WIDTH 0x1
629#define OMAP54XX_LLI_RST_MASK (1 << 14)
630
631/*
632 * Used by PM_ABE_PWRSTCTRL, PM_CORE_PWRSTCTRL, PM_DSP_PWRSTCTRL,
633 * PM_DSS_PWRSTCTRL, PM_IVA_PWRSTCTRL, PM_L3INIT_PWRSTCTRL, PM_MPU_PWRSTCTRL
634 */
635#define OMAP54XX_LOGICRETSTATE_SHIFT 2
636#define OMAP54XX_LOGICRETSTATE_WIDTH 0x1
637#define OMAP54XX_LOGICRETSTATE_MASK (1 << 2)
638
639/*
640 * Used by PM_ABE_PWRSTST, PM_CAM_PWRSTST, PM_CORE_PWRSTST,
641 * PM_CUSTEFUSE_PWRSTST, PM_DSP_PWRSTST, PM_DSS_PWRSTST, PM_EMU_PWRSTST,
642 * PM_GPU_PWRSTST, PM_IVA_PWRSTST, PM_L3INIT_PWRSTST, PM_MPU_PWRSTST
643 */
644#define OMAP54XX_LOGICSTATEST_SHIFT 2
645#define OMAP54XX_LOGICSTATEST_WIDTH 0x1
646#define OMAP54XX_LOGICSTATEST_MASK (1 << 2)
647
648/*
649 * Used by RM_ABE_AESS_CONTEXT, RM_ABE_DMIC_CONTEXT, RM_ABE_MCASP_CONTEXT,
650 * RM_ABE_MCBSP1_CONTEXT, RM_ABE_MCBSP2_CONTEXT, RM_ABE_MCBSP3_CONTEXT,
651 * RM_ABE_MCPDM_CONTEXT, RM_ABE_SLIMBUS1_CONTEXT, RM_ABE_TIMER5_CONTEXT,
652 * RM_ABE_TIMER6_CONTEXT, RM_ABE_TIMER7_CONTEXT, RM_ABE_TIMER8_CONTEXT,
653 * RM_ABE_WD_TIMER3_CONTEXT, RM_C2C_C2C_CONTEXT, RM_C2C_C2C_OCP_FW_CONTEXT,
654 * RM_CAM_CAL_CONTEXT, RM_CAM_FDIF_CONTEXT, RM_CAM_ISS_CONTEXT,
655 * RM_COREAON_SMARTREFLEX_CORE_CONTEXT, RM_COREAON_SMARTREFLEX_MM_CONTEXT,
656 * RM_COREAON_SMARTREFLEX_MPU_CONTEXT, RM_CUSTEFUSE_EFUSE_CTRL_CUST_CONTEXT,
657 * RM_DSP_DSP_CONTEXT, RM_DSS_BB2D_CONTEXT, RM_DSS_DSS_CONTEXT,
658 * RM_EMIF_DMM_CONTEXT, RM_EMIF_EMIF1_CONTEXT, RM_EMIF_EMIF2_CONTEXT,
659 * RM_EMIF_EMIF_DLL_CONTEXT, RM_EMIF_EMIF_OCP_FW_CONTEXT,
660 * RM_EMU_DEBUGSS_CONTEXT, RM_GPU_GPU_CONTEXT, RM_IPU_IPU_CONTEXT,
661 * RM_IVA_IVA_CONTEXT, RM_IVA_SL2_CONTEXT, RM_L3INIT_IEEE1500_2_OCP_CONTEXT,
662 * RM_L3INIT_OCP2SCP1_CONTEXT, RM_L3INIT_OCP2SCP3_CONTEXT,
663 * RM_L3INIT_SATA_CONTEXT, RM_L3INIT_UNIPRO2_CONTEXT,
664 * RM_L3INSTR_L3_INSTR_CONTEXT, RM_L3INSTR_L3_MAIN_3_CONTEXT,
665 * RM_L3INSTR_OCP_WP_NOC_CONTEXT, RM_L3MAIN1_L3_MAIN_1_CONTEXT,
666 * RM_L3MAIN2_L3_MAIN_2_CONTEXT, RM_L3MAIN2_OCMC_RAM_CONTEXT,
667 * RM_L4CFG_L4_CFG_CONTEXT, RM_L4CFG_OCP2SCP2_CONTEXT,
668 * RM_L4CFG_SAR_ROM_CONTEXT, RM_L4PER_ELM_CONTEXT, RM_L4PER_HDQ1W_CONTEXT,
669 * RM_L4PER_I2C2_CONTEXT, RM_L4PER_I2C3_CONTEXT, RM_L4PER_I2C4_CONTEXT,
670 * RM_L4PER_I2C5_CONTEXT, RM_L4PER_L4_PER_CONTEXT, RM_L4PER_MCSPI1_CONTEXT,
671 * RM_L4PER_MCSPI2_CONTEXT, RM_L4PER_MCSPI3_CONTEXT, RM_L4PER_MCSPI4_CONTEXT,
672 * RM_L4PER_MMC3_CONTEXT, RM_L4PER_MMC4_CONTEXT, RM_L4PER_MMC5_CONTEXT,
673 * RM_L4PER_TIMER10_CONTEXT, RM_L4PER_TIMER11_CONTEXT, RM_L4PER_TIMER2_CONTEXT,
674 * RM_L4PER_TIMER3_CONTEXT, RM_L4PER_TIMER4_CONTEXT, RM_L4PER_TIMER9_CONTEXT,
675 * RM_L4SEC_FPKA_CONTEXT, RM_MIPIEXT_LLI_CONTEXT,
676 * RM_MIPIEXT_LLI_OCP_FW_CONTEXT, RM_MIPIEXT_MPHY_CONTEXT, RM_MPU_MPU_CONTEXT,
677 * RM_WKUPAON_COUNTER_32K_CONTEXT, RM_WKUPAON_GPIO1_CONTEXT,
678 * RM_WKUPAON_KBD_CONTEXT, RM_WKUPAON_L4_WKUP_CONTEXT,
679 * RM_WKUPAON_SAR_RAM_CONTEXT, RM_WKUPAON_TIMER12_CONTEXT,
680 * RM_WKUPAON_TIMER1_CONTEXT, RM_WKUPAON_WD_TIMER1_CONTEXT,
681 * RM_WKUPAON_WD_TIMER2_CONTEXT
682 */
683#define OMAP54XX_LOSTCONTEXT_DFF_SHIFT 0
684#define OMAP54XX_LOSTCONTEXT_DFF_WIDTH 0x1
685#define OMAP54XX_LOSTCONTEXT_DFF_MASK (1 << 0)
686
687/*
688 * Used by RM_C2C_C2C_CONTEXT, RM_C2C_C2C_OCP_FW_CONTEXT,
689 * RM_C2C_MODEM_ICR_CONTEXT, RM_DMA_DMA_SYSTEM_CONTEXT, RM_DSP_DSP_CONTEXT,
690 * RM_DSS_DSS_CONTEXT, RM_EMIF_DMM_CONTEXT, RM_EMIF_EMIF1_CONTEXT,
691 * RM_EMIF_EMIF2_CONTEXT, RM_EMIF_EMIF_OCP_FW_CONTEXT, RM_IPU_IPU_CONTEXT,
692 * RM_L3INIT_HSI_CONTEXT, RM_L3INIT_MMC1_CONTEXT, RM_L3INIT_MMC2_CONTEXT,
693 * RM_L3INIT_USB_HOST_HS_CONTEXT, RM_L3INIT_USB_OTG_SS_CONTEXT,
694 * RM_L3INIT_USB_TLL_HS_CONTEXT, RM_L3INSTR_L3_MAIN_3_CONTEXT,
695 * RM_L3INSTR_OCP_WP_NOC_CONTEXT, RM_L3MAIN1_L3_MAIN_1_CONTEXT,
696 * RM_L3MAIN2_GPMC_CONTEXT, RM_L3MAIN2_L3_MAIN_2_CONTEXT,
697 * RM_L4CFG_L4_CFG_CONTEXT, RM_L4CFG_MAILBOX_CONTEXT,
698 * RM_L4CFG_SPINLOCK_CONTEXT, RM_L4PER_GPIO2_CONTEXT, RM_L4PER_GPIO3_CONTEXT,
699 * RM_L4PER_GPIO4_CONTEXT, RM_L4PER_GPIO5_CONTEXT, RM_L4PER_GPIO6_CONTEXT,
700 * RM_L4PER_GPIO7_CONTEXT, RM_L4PER_GPIO8_CONTEXT, RM_L4PER_I2C1_CONTEXT,
701 * RM_L4PER_L4_PER_CONTEXT, RM_L4PER_UART1_CONTEXT, RM_L4PER_UART2_CONTEXT,
702 * RM_L4PER_UART3_CONTEXT, RM_L4PER_UART4_CONTEXT, RM_L4PER_UART5_CONTEXT,
703 * RM_L4PER_UART6_CONTEXT, RM_L4SEC_AES1_CONTEXT, RM_L4SEC_AES2_CONTEXT,
704 * RM_L4SEC_DES3DES_CONTEXT, RM_L4SEC_DMA_CRYPTO_CONTEXT, RM_L4SEC_RNG_CONTEXT,
705 * RM_L4SEC_SHA2MD5_CONTEXT, RM_MIPIEXT_LLI_CONTEXT,
706 * RM_MIPIEXT_LLI_OCP_FW_CONTEXT, RM_MIPIEXT_MPHY_CONTEXT, RM_MPU_MPU_CONTEXT
707 */
708#define OMAP54XX_LOSTCONTEXT_RFF_SHIFT 1
709#define OMAP54XX_LOSTCONTEXT_RFF_WIDTH 0x1
710#define OMAP54XX_LOSTCONTEXT_RFF_MASK (1 << 1)
711
712/* Used by RM_ABE_AESS_CONTEXT */
713#define OMAP54XX_LOSTMEM_AESSMEM_SHIFT 8
714#define OMAP54XX_LOSTMEM_AESSMEM_WIDTH 0x1
715#define OMAP54XX_LOSTMEM_AESSMEM_MASK (1 << 8)
716
717/* Used by RM_CAM_CAL_CONTEXT */
718#define OMAP54XX_LOSTMEM_CAL_MEM_SHIFT 8
719#define OMAP54XX_LOSTMEM_CAL_MEM_WIDTH 0x1
720#define OMAP54XX_LOSTMEM_CAL_MEM_MASK (1 << 8)
721
722/* Used by RM_CAM_FDIF_CONTEXT, RM_CAM_ISS_CONTEXT */
723#define OMAP54XX_LOSTMEM_CAM_MEM_SHIFT 8
724#define OMAP54XX_LOSTMEM_CAM_MEM_WIDTH 0x1
725#define OMAP54XX_LOSTMEM_CAM_MEM_MASK (1 << 8)
726
727/* Used by RM_EMIF_DMM_CONTEXT */
728#define OMAP54XX_LOSTMEM_CORE_NRET_BANK_SHIFT 9
729#define OMAP54XX_LOSTMEM_CORE_NRET_BANK_WIDTH 0x1
730#define OMAP54XX_LOSTMEM_CORE_NRET_BANK_MASK (1 << 9)
731
732/* Renamed from LOSTMEM_CORE_NRET_BANK Used by RM_L3INSTR_OCP_WP_NOC_CONTEXT */
733#define OMAP54XX_LOSTMEM_CORE_NRET_BANK_8_8_SHIFT 8
734#define OMAP54XX_LOSTMEM_CORE_NRET_BANK_8_8_WIDTH 0x1
735#define OMAP54XX_LOSTMEM_CORE_NRET_BANK_8_8_MASK (1 << 8)
736
737/* Used by RM_L3MAIN2_OCMC_RAM_CONTEXT */
738#define OMAP54XX_LOSTMEM_CORE_OCMRAM_SHIFT 8
739#define OMAP54XX_LOSTMEM_CORE_OCMRAM_WIDTH 0x1
740#define OMAP54XX_LOSTMEM_CORE_OCMRAM_MASK (1 << 8)
741
742/* Used by RM_DMA_DMA_SYSTEM_CONTEXT, RM_EMIF_DMM_CONTEXT */
743#define OMAP54XX_LOSTMEM_CORE_OTHER_BANK_SHIFT 8
744#define OMAP54XX_LOSTMEM_CORE_OTHER_BANK_WIDTH 0x1
745#define OMAP54XX_LOSTMEM_CORE_OTHER_BANK_MASK (1 << 8)
746
747/* Used by RM_DSP_DSP_CONTEXT */
748#define OMAP54XX_LOSTMEM_DSP_EDMA_SHIFT 10
749#define OMAP54XX_LOSTMEM_DSP_EDMA_WIDTH 0x1
750#define OMAP54XX_LOSTMEM_DSP_EDMA_MASK (1 << 10)
751
752/* Used by RM_DSP_DSP_CONTEXT */
753#define OMAP54XX_LOSTMEM_DSP_L1_SHIFT 8
754#define OMAP54XX_LOSTMEM_DSP_L1_WIDTH 0x1
755#define OMAP54XX_LOSTMEM_DSP_L1_MASK (1 << 8)
756
757/* Used by RM_DSP_DSP_CONTEXT */
758#define OMAP54XX_LOSTMEM_DSP_L2_SHIFT 9
759#define OMAP54XX_LOSTMEM_DSP_L2_WIDTH 0x1
760#define OMAP54XX_LOSTMEM_DSP_L2_MASK (1 << 9)
761
762/* Used by RM_DSS_BB2D_CONTEXT, RM_DSS_DSS_CONTEXT */
763#define OMAP54XX_LOSTMEM_DSS_MEM_SHIFT 8
764#define OMAP54XX_LOSTMEM_DSS_MEM_WIDTH 0x1
765#define OMAP54XX_LOSTMEM_DSS_MEM_MASK (1 << 8)
766
767/* Used by RM_EMU_DEBUGSS_CONTEXT */
768#define OMAP54XX_LOSTMEM_EMU_BANK_SHIFT 8
769#define OMAP54XX_LOSTMEM_EMU_BANK_WIDTH 0x1
770#define OMAP54XX_LOSTMEM_EMU_BANK_MASK (1 << 8)
771
772/* Used by RM_GPU_GPU_CONTEXT */
773#define OMAP54XX_LOSTMEM_GPU_MEM_SHIFT 8
774#define OMAP54XX_LOSTMEM_GPU_MEM_WIDTH 0x1
775#define OMAP54XX_LOSTMEM_GPU_MEM_MASK (1 << 8)
776
777/* Used by RM_IVA_IVA_CONTEXT */
778#define OMAP54XX_LOSTMEM_HWA_MEM_SHIFT 10
779#define OMAP54XX_LOSTMEM_HWA_MEM_WIDTH 0x1
780#define OMAP54XX_LOSTMEM_HWA_MEM_MASK (1 << 10)
781
782/* Used by RM_IPU_IPU_CONTEXT */
783#define OMAP54XX_LOSTMEM_IPU_L2RAM_SHIFT 9
784#define OMAP54XX_LOSTMEM_IPU_L2RAM_WIDTH 0x1
785#define OMAP54XX_LOSTMEM_IPU_L2RAM_MASK (1 << 9)
786
787/* Used by RM_IPU_IPU_CONTEXT */
788#define OMAP54XX_LOSTMEM_IPU_UNICACHE_SHIFT 8
789#define OMAP54XX_LOSTMEM_IPU_UNICACHE_WIDTH 0x1
790#define OMAP54XX_LOSTMEM_IPU_UNICACHE_MASK (1 << 8)
791
792/*
793 * Used by RM_L3INIT_HSI_CONTEXT, RM_L3INIT_MMC1_CONTEXT,
794 * RM_L3INIT_MMC2_CONTEXT, RM_L3INIT_SATA_CONTEXT, RM_L3INIT_UNIPRO2_CONTEXT,
795 * RM_L3INIT_USB_OTG_SS_CONTEXT
796 */
797#define OMAP54XX_LOSTMEM_L3INIT_BANK1_SHIFT 8
798#define OMAP54XX_LOSTMEM_L3INIT_BANK1_WIDTH 0x1
799#define OMAP54XX_LOSTMEM_L3INIT_BANK1_MASK (1 << 8)
800
801/* Used by RM_MPU_MPU_CONTEXT */
802#define OMAP54XX_LOSTMEM_MPU_L2_SHIFT 9
803#define OMAP54XX_LOSTMEM_MPU_L2_WIDTH 0x1
804#define OMAP54XX_LOSTMEM_MPU_L2_MASK (1 << 9)
805
806/* Used by RM_MPU_MPU_CONTEXT */
807#define OMAP54XX_LOSTMEM_MPU_RAM_SHIFT 10
808#define OMAP54XX_LOSTMEM_MPU_RAM_WIDTH 0x1
809#define OMAP54XX_LOSTMEM_MPU_RAM_MASK (1 << 10)
810
811/*
812 * Used by RM_L4PER_MMC3_CONTEXT, RM_L4PER_MMC4_CONTEXT, RM_L4PER_MMC5_CONTEXT,
813 * RM_L4SEC_FPKA_CONTEXT
814 */
815#define OMAP54XX_LOSTMEM_NONRETAINED_BANK_SHIFT 8
816#define OMAP54XX_LOSTMEM_NONRETAINED_BANK_WIDTH 0x1
817#define OMAP54XX_LOSTMEM_NONRETAINED_BANK_MASK (1 << 8)
818
819/*
820 * Used by RM_ABE_DMIC_CONTEXT, RM_ABE_MCBSP1_CONTEXT, RM_ABE_MCBSP2_CONTEXT,
821 * RM_ABE_MCBSP3_CONTEXT, RM_ABE_MCPDM_CONTEXT, RM_ABE_SLIMBUS1_CONTEXT
822 */
823#define OMAP54XX_LOSTMEM_PERIHPMEM_SHIFT 8
824#define OMAP54XX_LOSTMEM_PERIHPMEM_WIDTH 0x1
825#define OMAP54XX_LOSTMEM_PERIHPMEM_MASK (1 << 8)
826
827/*
828 * Used by RM_L4PER_UART1_CONTEXT, RM_L4PER_UART2_CONTEXT,
829 * RM_L4PER_UART3_CONTEXT, RM_L4PER_UART4_CONTEXT, RM_L4PER_UART5_CONTEXT,
830 * RM_L4PER_UART6_CONTEXT, RM_L4SEC_DMA_CRYPTO_CONTEXT
831 */
832#define OMAP54XX_LOSTMEM_RETAINED_BANK_SHIFT 8
833#define OMAP54XX_LOSTMEM_RETAINED_BANK_WIDTH 0x1
834#define OMAP54XX_LOSTMEM_RETAINED_BANK_MASK (1 << 8)
835
836/* Used by RM_IVA_SL2_CONTEXT */
837#define OMAP54XX_LOSTMEM_SL2_MEM_SHIFT 8
838#define OMAP54XX_LOSTMEM_SL2_MEM_WIDTH 0x1
839#define OMAP54XX_LOSTMEM_SL2_MEM_MASK (1 << 8)
840
841/* Used by RM_IVA_IVA_CONTEXT */
842#define OMAP54XX_LOSTMEM_TCM1_MEM_SHIFT 8
843#define OMAP54XX_LOSTMEM_TCM1_MEM_WIDTH 0x1
844#define OMAP54XX_LOSTMEM_TCM1_MEM_MASK (1 << 8)
845
846/* Used by RM_IVA_IVA_CONTEXT */
847#define OMAP54XX_LOSTMEM_TCM2_MEM_SHIFT 9
848#define OMAP54XX_LOSTMEM_TCM2_MEM_WIDTH 0x1
849#define OMAP54XX_LOSTMEM_TCM2_MEM_MASK (1 << 9)
850
851/* Used by RM_WKUPAON_SAR_RAM_CONTEXT */
852#define OMAP54XX_LOSTMEM_WKUP_BANK_SHIFT 8
853#define OMAP54XX_LOSTMEM_WKUP_BANK_WIDTH 0x1
854#define OMAP54XX_LOSTMEM_WKUP_BANK_MASK (1 << 8)
855
856/*
857 * Used by PM_ABE_PWRSTCTRL, PM_CAM_PWRSTCTRL, PM_CORE_PWRSTCTRL,
858 * PM_CUSTEFUSE_PWRSTCTRL, PM_DSP_PWRSTCTRL, PM_DSS_PWRSTCTRL,
859 * PM_GPU_PWRSTCTRL, PM_IVA_PWRSTCTRL, PM_L3INIT_PWRSTCTRL, PM_MPU_PWRSTCTRL
860 */
861#define OMAP54XX_LOWPOWERSTATECHANGE_SHIFT 4
862#define OMAP54XX_LOWPOWERSTATECHANGE_WIDTH 0x1
863#define OMAP54XX_LOWPOWERSTATECHANGE_MASK (1 << 4)
864
865/* Used by PRM_DEBUG_TRANS_CFG */
866#define OMAP54XX_MODE_SHIFT 0
867#define OMAP54XX_MODE_WIDTH 0x2
868#define OMAP54XX_MODE_MASK (0x3 << 0)
869
870/* Used by PRM_MODEM_IF_CTRL */
871#define OMAP54XX_MODEM_SHUTDOWN_IRQ_SHIFT 9
872#define OMAP54XX_MODEM_SHUTDOWN_IRQ_WIDTH 0x1
873#define OMAP54XX_MODEM_SHUTDOWN_IRQ_MASK (1 << 9)
874
875/* Used by PRM_MODEM_IF_CTRL */
876#define OMAP54XX_MODEM_WAKE_IRQ_SHIFT 8
877#define OMAP54XX_MODEM_WAKE_IRQ_WIDTH 0x1
878#define OMAP54XX_MODEM_WAKE_IRQ_MASK (1 << 8)
879
880/* Used by PM_MPU_PWRSTCTRL */
881#define OMAP54XX_MPU_L2_ONSTATE_SHIFT 18
882#define OMAP54XX_MPU_L2_ONSTATE_WIDTH 0x2
883#define OMAP54XX_MPU_L2_ONSTATE_MASK (0x3 << 18)
884
885/* Used by PM_MPU_PWRSTCTRL */
886#define OMAP54XX_MPU_L2_RETSTATE_SHIFT 9
887#define OMAP54XX_MPU_L2_RETSTATE_WIDTH 0x1
888#define OMAP54XX_MPU_L2_RETSTATE_MASK (1 << 9)
889
890/* Used by PM_MPU_PWRSTST */
891#define OMAP54XX_MPU_L2_STATEST_SHIFT 6
892#define OMAP54XX_MPU_L2_STATEST_WIDTH 0x2
893#define OMAP54XX_MPU_L2_STATEST_MASK (0x3 << 6)
894
895/* Used by PM_MPU_PWRSTCTRL */
896#define OMAP54XX_MPU_RAM_ONSTATE_SHIFT 20
897#define OMAP54XX_MPU_RAM_ONSTATE_WIDTH 0x2
898#define OMAP54XX_MPU_RAM_ONSTATE_MASK (0x3 << 20)
899
900/* Used by PM_MPU_PWRSTCTRL */
901#define OMAP54XX_MPU_RAM_RETSTATE_SHIFT 10
902#define OMAP54XX_MPU_RAM_RETSTATE_WIDTH 0x1
903#define OMAP54XX_MPU_RAM_RETSTATE_MASK (1 << 10)
904
905/* Used by PM_MPU_PWRSTST */
906#define OMAP54XX_MPU_RAM_STATEST_SHIFT 8
907#define OMAP54XX_MPU_RAM_STATEST_WIDTH 0x2
908#define OMAP54XX_MPU_RAM_STATEST_MASK (0x3 << 8)
909
910/* Used by PRM_RSTST */
911#define OMAP54XX_MPU_SECURITY_VIOL_RST_SHIFT 2
912#define OMAP54XX_MPU_SECURITY_VIOL_RST_WIDTH 0x1
913#define OMAP54XX_MPU_SECURITY_VIOL_RST_MASK (1 << 2)
914
915/* Used by PRM_RSTST */
916#define OMAP54XX_MPU_WDT_RST_SHIFT 3
917#define OMAP54XX_MPU_WDT_RST_WIDTH 0x1
918#define OMAP54XX_MPU_WDT_RST_MASK (1 << 3)
919
920/* Used by PRM_ABBLDO_MM_SETUP, PRM_ABBLDO_MPU_SETUP */
921#define OMAP54XX_NOCAP_SHIFT 4
922#define OMAP54XX_NOCAP_WIDTH 0x1
923#define OMAP54XX_NOCAP_MASK (1 << 4)
924
925/* Used by PM_CORE_PWRSTCTRL */
926#define OMAP54XX_OCP_NRET_BANK_ONSTATE_SHIFT 24
927#define OMAP54XX_OCP_NRET_BANK_ONSTATE_WIDTH 0x2
928#define OMAP54XX_OCP_NRET_BANK_ONSTATE_MASK (0x3 << 24)
929
930/* Used by PM_CORE_PWRSTCTRL */
931#define OMAP54XX_OCP_NRET_BANK_RETSTATE_SHIFT 12
932#define OMAP54XX_OCP_NRET_BANK_RETSTATE_WIDTH 0x1
933#define OMAP54XX_OCP_NRET_BANK_RETSTATE_MASK (1 << 12)
934
935/* Used by PM_CORE_PWRSTST */
936#define OMAP54XX_OCP_NRET_BANK_STATEST_SHIFT 12
937#define OMAP54XX_OCP_NRET_BANK_STATEST_WIDTH 0x2
938#define OMAP54XX_OCP_NRET_BANK_STATEST_MASK (0x3 << 12)
939
940/*
941 * Used by PRM_VC_VAL_CMD_VDD_CORE_L, PRM_VC_VAL_CMD_VDD_MM_L,
942 * PRM_VC_VAL_CMD_VDD_MPU_L
943 */
944#define OMAP54XX_OFF_SHIFT 0
945#define OMAP54XX_OFF_WIDTH 0x8
946#define OMAP54XX_OFF_MASK (0xff << 0)
947
948/*
949 * Used by PRM_VC_VAL_CMD_VDD_CORE_L, PRM_VC_VAL_CMD_VDD_MM_L,
950 * PRM_VC_VAL_CMD_VDD_MPU_L
951 */
952#define OMAP54XX_ON_SHIFT 24
953#define OMAP54XX_ON_WIDTH 0x8
954#define OMAP54XX_ON_MASK (0xff << 24)
955
956/*
957 * Used by PRM_VC_VAL_CMD_VDD_CORE_L, PRM_VC_VAL_CMD_VDD_MM_L,
958 * PRM_VC_VAL_CMD_VDD_MPU_L
959 */
960#define OMAP54XX_ONLP_SHIFT 16
961#define OMAP54XX_ONLP_WIDTH 0x8
962#define OMAP54XX_ONLP_MASK (0xff << 16)
963
964/* Used by PRM_ABBLDO_MM_CTRL, PRM_ABBLDO_MPU_CTRL */
965#define OMAP54XX_OPP_CHANGE_SHIFT 2
966#define OMAP54XX_OPP_CHANGE_WIDTH 0x1
967#define OMAP54XX_OPP_CHANGE_MASK (1 << 2)
968
969/* Used by PRM_VC_VAL_BYPASS */
970#define OMAP54XX_OPP_CHANGE_EMIF_LVL_SHIFT 25
971#define OMAP54XX_OPP_CHANGE_EMIF_LVL_WIDTH 0x1
972#define OMAP54XX_OPP_CHANGE_EMIF_LVL_MASK (1 << 25)
973
974/* Used by PRM_ABBLDO_MM_CTRL, PRM_ABBLDO_MPU_CTRL */
975#define OMAP54XX_OPP_SEL_SHIFT 0
976#define OMAP54XX_OPP_SEL_WIDTH 0x2
977#define OMAP54XX_OPP_SEL_MASK (0x3 << 0)
978
979/* Used by PRM_DEBUG_OUT */
980#define OMAP54XX_OUTPUT_SHIFT 0
981#define OMAP54XX_OUTPUT_WIDTH 0x20
982#define OMAP54XX_OUTPUT_MASK (0xffffffff << 0)
983
984/* Used by PRM_SRAM_COUNT */
985#define OMAP54XX_PCHARGECNT_VALUE_SHIFT 0
986#define OMAP54XX_PCHARGECNT_VALUE_WIDTH 0x6
987#define OMAP54XX_PCHARGECNT_VALUE_MASK (0x3f << 0)
988
989/* Used by PRM_PSCON_COUNT */
990#define OMAP54XX_PCHARGE_TIME_SHIFT 0
991#define OMAP54XX_PCHARGE_TIME_WIDTH 0x8
992#define OMAP54XX_PCHARGE_TIME_MASK (0xff << 0)
993
994/* Used by PM_ABE_PWRSTCTRL */
995#define OMAP54XX_PERIPHMEM_ONSTATE_SHIFT 20
996#define OMAP54XX_PERIPHMEM_ONSTATE_WIDTH 0x2
997#define OMAP54XX_PERIPHMEM_ONSTATE_MASK (0x3 << 20)
998
999/* Used by PM_ABE_PWRSTCTRL */
1000#define OMAP54XX_PERIPHMEM_RETSTATE_SHIFT 10
1001#define OMAP54XX_PERIPHMEM_RETSTATE_WIDTH 0x1
1002#define OMAP54XX_PERIPHMEM_RETSTATE_MASK (1 << 10)
1003
1004/* Used by PM_ABE_PWRSTST */
1005#define OMAP54XX_PERIPHMEM_STATEST_SHIFT 8
1006#define OMAP54XX_PERIPHMEM_STATEST_WIDTH 0x2
1007#define OMAP54XX_PERIPHMEM_STATEST_MASK (0x3 << 8)
1008
1009/* Used by PRM_PHASE1_CNDP */
1010#define OMAP54XX_PHASE1_CNDP_SHIFT 0
1011#define OMAP54XX_PHASE1_CNDP_WIDTH 0x20
1012#define OMAP54XX_PHASE1_CNDP_MASK (0xffffffff << 0)
1013
1014/* Used by PRM_PHASE2A_CNDP */
1015#define OMAP54XX_PHASE2A_CNDP_SHIFT 0
1016#define OMAP54XX_PHASE2A_CNDP_WIDTH 0x20
1017#define OMAP54XX_PHASE2A_CNDP_MASK (0xffffffff << 0)
1018
1019/* Used by PRM_PHASE2B_CNDP */
1020#define OMAP54XX_PHASE2B_CNDP_SHIFT 0
1021#define OMAP54XX_PHASE2B_CNDP_WIDTH 0x20
1022#define OMAP54XX_PHASE2B_CNDP_MASK (0xffffffff << 0)
1023
1024/* Used by PRM_PSCON_COUNT */
1025#define OMAP54XX_PONOUT_2_PGOODIN_TIME_SHIFT 8
1026#define OMAP54XX_PONOUT_2_PGOODIN_TIME_WIDTH 0x8
1027#define OMAP54XX_PONOUT_2_PGOODIN_TIME_MASK (0xff << 8)
1028
1029/*
1030 * Used by PM_ABE_PWRSTCTRL, PM_CAM_PWRSTCTRL, PM_CORE_PWRSTCTRL,
1031 * PM_CUSTEFUSE_PWRSTCTRL, PM_DSP_PWRSTCTRL, PM_DSS_PWRSTCTRL,
1032 * PM_EMU_PWRSTCTRL, PM_GPU_PWRSTCTRL, PM_IVA_PWRSTCTRL, PM_L3INIT_PWRSTCTRL,
1033 * PM_MPU_PWRSTCTRL
1034 */
1035#define OMAP54XX_POWERSTATE_SHIFT 0
1036#define OMAP54XX_POWERSTATE_WIDTH 0x2
1037#define OMAP54XX_POWERSTATE_MASK (0x3 << 0)
1038
1039/*
1040 * Used by PM_ABE_PWRSTST, PM_CAM_PWRSTST, PM_CORE_PWRSTST,
1041 * PM_CUSTEFUSE_PWRSTST, PM_DSP_PWRSTST, PM_DSS_PWRSTST, PM_EMU_PWRSTST,
1042 * PM_GPU_PWRSTST, PM_IVA_PWRSTST, PM_L3INIT_PWRSTST, PM_MPU_PWRSTST
1043 */
1044#define OMAP54XX_POWERSTATEST_SHIFT 0
1045#define OMAP54XX_POWERSTATEST_WIDTH 0x2
1046#define OMAP54XX_POWERSTATEST_MASK (0x3 << 0)
1047
1048/* Used by PRM_PWRREQCTRL */
1049#define OMAP54XX_PWRREQ_COND_SHIFT 0
1050#define OMAP54XX_PWRREQ_COND_WIDTH 0x2
1051#define OMAP54XX_PWRREQ_COND_MASK (0x3 << 0)
1052
1053/* Used by PRM_VC_SMPS_CORE_CONFIG */
1054#define OMAP54XX_RACEN_VDD_CORE_L_SHIFT 27
1055#define OMAP54XX_RACEN_VDD_CORE_L_WIDTH 0x1
1056#define OMAP54XX_RACEN_VDD_CORE_L_MASK (1 << 27)
1057
1058/* Used by PRM_VC_SMPS_MM_CONFIG */
1059#define OMAP54XX_RACEN_VDD_MM_L_SHIFT 27
1060#define OMAP54XX_RACEN_VDD_MM_L_WIDTH 0x1
1061#define OMAP54XX_RACEN_VDD_MM_L_MASK (1 << 27)
1062
1063/* Used by PRM_VC_SMPS_MPU_CONFIG */
1064#define OMAP54XX_RACEN_VDD_MPU_L_SHIFT 27
1065#define OMAP54XX_RACEN_VDD_MPU_L_WIDTH 0x1
1066#define OMAP54XX_RACEN_VDD_MPU_L_MASK (1 << 27)
1067
1068/* Used by PRM_VC_SMPS_CORE_CONFIG */
1069#define OMAP54XX_RAC_VDD_CORE_L_SHIFT 26
1070#define OMAP54XX_RAC_VDD_CORE_L_WIDTH 0x1
1071#define OMAP54XX_RAC_VDD_CORE_L_MASK (1 << 26)
1072
1073/* Used by PRM_VC_SMPS_MM_CONFIG */
1074#define OMAP54XX_RAC_VDD_MM_L_SHIFT 26
1075#define OMAP54XX_RAC_VDD_MM_L_WIDTH 0x1
1076#define OMAP54XX_RAC_VDD_MM_L_MASK (1 << 26)
1077
1078/* Used by PRM_VC_SMPS_MPU_CONFIG */
1079#define OMAP54XX_RAC_VDD_MPU_L_SHIFT 26
1080#define OMAP54XX_RAC_VDD_MPU_L_WIDTH 0x1
1081#define OMAP54XX_RAC_VDD_MPU_L_MASK (1 << 26)
1082
1083/*
1084 * Used by PRM_VOLTSETUP_CORE_OFF, PRM_VOLTSETUP_CORE_RET_SLEEP,
1085 * PRM_VOLTSETUP_MM_OFF, PRM_VOLTSETUP_MM_RET_SLEEP, PRM_VOLTSETUP_MPU_OFF,
1086 * PRM_VOLTSETUP_MPU_RET_SLEEP
1087 */
1088#define OMAP54XX_RAMP_DOWN_COUNT_SHIFT 16
1089#define OMAP54XX_RAMP_DOWN_COUNT_WIDTH 0x6
1090#define OMAP54XX_RAMP_DOWN_COUNT_MASK (0x3f << 16)
1091
1092/*
1093 * Used by PRM_VOLTSETUP_CORE_OFF, PRM_VOLTSETUP_CORE_RET_SLEEP,
1094 * PRM_VOLTSETUP_MM_OFF, PRM_VOLTSETUP_MM_RET_SLEEP, PRM_VOLTSETUP_MPU_OFF,
1095 * PRM_VOLTSETUP_MPU_RET_SLEEP
1096 */
1097#define OMAP54XX_RAMP_DOWN_PRESCAL_SHIFT 24
1098#define OMAP54XX_RAMP_DOWN_PRESCAL_WIDTH 0x2
1099#define OMAP54XX_RAMP_DOWN_PRESCAL_MASK (0x3 << 24)
1100
1101/*
1102 * Used by PRM_VOLTSETUP_CORE_OFF, PRM_VOLTSETUP_CORE_RET_SLEEP,
1103 * PRM_VOLTSETUP_MM_OFF, PRM_VOLTSETUP_MM_RET_SLEEP, PRM_VOLTSETUP_MPU_OFF,
1104 * PRM_VOLTSETUP_MPU_RET_SLEEP
1105 */
1106#define OMAP54XX_RAMP_UP_COUNT_SHIFT 0
1107#define OMAP54XX_RAMP_UP_COUNT_WIDTH 0x6
1108#define OMAP54XX_RAMP_UP_COUNT_MASK (0x3f << 0)
1109
1110/*
1111 * Used by PRM_VOLTSETUP_CORE_OFF, PRM_VOLTSETUP_CORE_RET_SLEEP,
1112 * PRM_VOLTSETUP_MM_OFF, PRM_VOLTSETUP_MM_RET_SLEEP, PRM_VOLTSETUP_MPU_OFF,
1113 * PRM_VOLTSETUP_MPU_RET_SLEEP
1114 */
1115#define OMAP54XX_RAMP_UP_PRESCAL_SHIFT 8
1116#define OMAP54XX_RAMP_UP_PRESCAL_WIDTH 0x2
1117#define OMAP54XX_RAMP_UP_PRESCAL_MASK (0x3 << 8)
1118
1119/* Used by PRM_VC_SMPS_CORE_CONFIG */
1120#define OMAP54XX_RAV_VDD_CORE_L_SHIFT 25
1121#define OMAP54XX_RAV_VDD_CORE_L_WIDTH 0x1
1122#define OMAP54XX_RAV_VDD_CORE_L_MASK (1 << 25)
1123
1124/* Used by PRM_VC_SMPS_MM_CONFIG */
1125#define OMAP54XX_RAV_VDD_MM_L_SHIFT 25
1126#define OMAP54XX_RAV_VDD_MM_L_WIDTH 0x1
1127#define OMAP54XX_RAV_VDD_MM_L_MASK (1 << 25)
1128
1129/* Used by PRM_VC_SMPS_MPU_CONFIG */
1130#define OMAP54XX_RAV_VDD_MPU_L_SHIFT 25
1131#define OMAP54XX_RAV_VDD_MPU_L_WIDTH 0x1
1132#define OMAP54XX_RAV_VDD_MPU_L_MASK (1 << 25)
1133
1134/* Used by PRM_VC_VAL_BYPASS */
1135#define OMAP54XX_REGADDR_SHIFT 8
1136#define OMAP54XX_REGADDR_WIDTH 0x8
1137#define OMAP54XX_REGADDR_MASK (0xff << 8)
1138
1139/*
1140 * Used by PRM_VC_VAL_CMD_VDD_CORE_L, PRM_VC_VAL_CMD_VDD_MM_L,
1141 * PRM_VC_VAL_CMD_VDD_MPU_L
1142 */
1143#define OMAP54XX_RET_SHIFT 8
1144#define OMAP54XX_RET_WIDTH 0x8
1145#define OMAP54XX_RET_MASK (0xff << 8)
1146
1147/* Used by PRM_SLDO_CORE_CTRL, PRM_SLDO_MM_CTRL, PRM_SLDO_MPU_CTRL */
1148#define OMAP54XX_RETMODE_ENABLE_SHIFT 0
1149#define OMAP54XX_RETMODE_ENABLE_WIDTH 0x1
1150#define OMAP54XX_RETMODE_ENABLE_MASK (1 << 0)
1151
1152/* Used by PRM_RSTTIME */
1153#define OMAP54XX_RSTTIME1_SHIFT 0
1154#define OMAP54XX_RSTTIME1_WIDTH 0xa
1155#define OMAP54XX_RSTTIME1_MASK (0x3ff << 0)
1156
1157/* Used by PRM_RSTTIME */
1158#define OMAP54XX_RSTTIME2_SHIFT 10
1159#define OMAP54XX_RSTTIME2_WIDTH 0x5
1160#define OMAP54XX_RSTTIME2_MASK (0x1f << 10)
1161
1162/* Used by RM_IPU_RSTCTRL, RM_IPU_RSTST */
1163#define OMAP54XX_RST_CPU0_SHIFT 0
1164#define OMAP54XX_RST_CPU0_WIDTH 0x1
1165#define OMAP54XX_RST_CPU0_MASK (1 << 0)
1166
1167/* Used by RM_IPU_RSTCTRL, RM_IPU_RSTST */
1168#define OMAP54XX_RST_CPU1_SHIFT 1
1169#define OMAP54XX_RST_CPU1_WIDTH 0x1
1170#define OMAP54XX_RST_CPU1_MASK (1 << 1)
1171
1172/* Used by RM_DSP_RSTCTRL, RM_DSP_RSTST */
1173#define OMAP54XX_RST_DSP_SHIFT 0
1174#define OMAP54XX_RST_DSP_WIDTH 0x1
1175#define OMAP54XX_RST_DSP_MASK (1 << 0)
1176
1177/* Used by RM_DSP_RSTST */
1178#define OMAP54XX_RST_DSP_EMU_SHIFT 2
1179#define OMAP54XX_RST_DSP_EMU_WIDTH 0x1
1180#define OMAP54XX_RST_DSP_EMU_MASK (1 << 2)
1181
1182/* Used by RM_DSP_RSTST */
1183#define OMAP54XX_RST_DSP_EMU_REQ_SHIFT 3
1184#define OMAP54XX_RST_DSP_EMU_REQ_WIDTH 0x1
1185#define OMAP54XX_RST_DSP_EMU_REQ_MASK (1 << 3)
1186
1187/* Used by RM_DSP_RSTCTRL, RM_DSP_RSTST */
1188#define OMAP54XX_RST_DSP_MMU_CACHE_SHIFT 1
1189#define OMAP54XX_RST_DSP_MMU_CACHE_WIDTH 0x1
1190#define OMAP54XX_RST_DSP_MMU_CACHE_MASK (1 << 1)
1191
1192/* Used by RM_IPU_RSTST */
1193#define OMAP54XX_RST_EMULATION_CPU0_SHIFT 3
1194#define OMAP54XX_RST_EMULATION_CPU0_WIDTH 0x1
1195#define OMAP54XX_RST_EMULATION_CPU0_MASK (1 << 3)
1196
1197/* Used by RM_IPU_RSTST */
1198#define OMAP54XX_RST_EMULATION_CPU1_SHIFT 4
1199#define OMAP54XX_RST_EMULATION_CPU1_WIDTH 0x1
1200#define OMAP54XX_RST_EMULATION_CPU1_MASK (1 << 4)
1201
1202/* Used by RM_IVA_RSTST */
1203#define OMAP54XX_RST_EMULATION_SEQ1_SHIFT 3
1204#define OMAP54XX_RST_EMULATION_SEQ1_WIDTH 0x1
1205#define OMAP54XX_RST_EMULATION_SEQ1_MASK (1 << 3)
1206
1207/* Used by RM_IVA_RSTST */
1208#define OMAP54XX_RST_EMULATION_SEQ2_SHIFT 4
1209#define OMAP54XX_RST_EMULATION_SEQ2_WIDTH 0x1
1210#define OMAP54XX_RST_EMULATION_SEQ2_MASK (1 << 4)
1211
1212/* Used by PRM_RSTCTRL */
1213#define OMAP54XX_RST_GLOBAL_COLD_SW_SHIFT 1
1214#define OMAP54XX_RST_GLOBAL_COLD_SW_WIDTH 0x1
1215#define OMAP54XX_RST_GLOBAL_COLD_SW_MASK (1 << 1)
1216
1217/* Used by PRM_RSTCTRL */
1218#define OMAP54XX_RST_GLOBAL_WARM_SW_SHIFT 0
1219#define OMAP54XX_RST_GLOBAL_WARM_SW_WIDTH 0x1
1220#define OMAP54XX_RST_GLOBAL_WARM_SW_MASK (1 << 0)
1221
1222/* Used by RM_IPU_RSTST */
1223#define OMAP54XX_RST_ICECRUSHER_CPU0_SHIFT 5
1224#define OMAP54XX_RST_ICECRUSHER_CPU0_WIDTH 0x1
1225#define OMAP54XX_RST_ICECRUSHER_CPU0_MASK (1 << 5)
1226
1227/* Used by RM_IPU_RSTST */
1228#define OMAP54XX_RST_ICECRUSHER_CPU1_SHIFT 6
1229#define OMAP54XX_RST_ICECRUSHER_CPU1_WIDTH 0x1
1230#define OMAP54XX_RST_ICECRUSHER_CPU1_MASK (1 << 6)
1231
1232/* Used by RM_IVA_RSTST */
1233#define OMAP54XX_RST_ICECRUSHER_SEQ1_SHIFT 5
1234#define OMAP54XX_RST_ICECRUSHER_SEQ1_WIDTH 0x1
1235#define OMAP54XX_RST_ICECRUSHER_SEQ1_MASK (1 << 5)
1236
1237/* Used by RM_IVA_RSTST */
1238#define OMAP54XX_RST_ICECRUSHER_SEQ2_SHIFT 6
1239#define OMAP54XX_RST_ICECRUSHER_SEQ2_WIDTH 0x1
1240#define OMAP54XX_RST_ICECRUSHER_SEQ2_MASK (1 << 6)
1241
1242/* Used by RM_IPU_RSTCTRL, RM_IPU_RSTST */
1243#define OMAP54XX_RST_IPU_MMU_CACHE_SHIFT 2
1244#define OMAP54XX_RST_IPU_MMU_CACHE_WIDTH 0x1
1245#define OMAP54XX_RST_IPU_MMU_CACHE_MASK (1 << 2)
1246
1247/* Used by RM_IVA_RSTCTRL, RM_IVA_RSTST */
1248#define OMAP54XX_RST_LOGIC_SHIFT 2
1249#define OMAP54XX_RST_LOGIC_WIDTH 0x1
1250#define OMAP54XX_RST_LOGIC_MASK (1 << 2)
1251
1252/* Used by RM_IVA_RSTCTRL, RM_IVA_RSTST */
1253#define OMAP54XX_RST_SEQ1_SHIFT 0
1254#define OMAP54XX_RST_SEQ1_WIDTH 0x1
1255#define OMAP54XX_RST_SEQ1_MASK (1 << 0)
1256
1257/* Used by RM_IVA_RSTCTRL, RM_IVA_RSTST */
1258#define OMAP54XX_RST_SEQ2_SHIFT 1
1259#define OMAP54XX_RST_SEQ2_WIDTH 0x1
1260#define OMAP54XX_RST_SEQ2_MASK (1 << 1)
1261
1262/* Used by REVISION_PRM */
1263#define OMAP54XX_R_RTL_SHIFT 11
1264#define OMAP54XX_R_RTL_WIDTH 0x5
1265#define OMAP54XX_R_RTL_MASK (0x1f << 11)
1266
1267/* Used by PRM_VC_SMPS_CORE_CONFIG */
1268#define OMAP54XX_SA_VDD_CORE_L_SHIFT 0
1269#define OMAP54XX_SA_VDD_CORE_L_WIDTH 0x7
1270#define OMAP54XX_SA_VDD_CORE_L_MASK (0x7f << 0)
1271
1272/* Used by PRM_VC_SMPS_MM_CONFIG */
1273#define OMAP54XX_SA_VDD_MM_L_SHIFT 0
1274#define OMAP54XX_SA_VDD_MM_L_WIDTH 0x7
1275#define OMAP54XX_SA_VDD_MM_L_MASK (0x7f << 0)
1276
1277/* Used by PRM_VC_SMPS_MPU_CONFIG */
1278#define OMAP54XX_SA_VDD_MPU_L_SHIFT 0
1279#define OMAP54XX_SA_VDD_MPU_L_WIDTH 0x7
1280#define OMAP54XX_SA_VDD_MPU_L_MASK (0x7f << 0)
1281
1282/* Used by REVISION_PRM */
1283#define OMAP54XX_SCHEME_SHIFT 30
1284#define OMAP54XX_SCHEME_WIDTH 0x2
1285#define OMAP54XX_SCHEME_MASK (0x3 << 30)
1286
1287/* Used by PRM_VC_CFG_I2C_CLK */
1288#define OMAP54XX_SCLH_SHIFT 0
1289#define OMAP54XX_SCLH_WIDTH 0x8
1290#define OMAP54XX_SCLH_MASK (0xff << 0)
1291
1292/* Used by PRM_VC_CFG_I2C_CLK */
1293#define OMAP54XX_SCLL_SHIFT 8
1294#define OMAP54XX_SCLL_WIDTH 0x8
1295#define OMAP54XX_SCLL_MASK (0xff << 8)
1296
1297/* Used by PRM_RSTST */
1298#define OMAP54XX_SECURE_WDT_RST_SHIFT 4
1299#define OMAP54XX_SECURE_WDT_RST_WIDTH 0x1
1300#define OMAP54XX_SECURE_WDT_RST_MASK (1 << 4)
1301
1302/* Used by PRM_VC_SMPS_CORE_CONFIG */
1303#define OMAP54XX_SEL_SA_VDD_CORE_L_SHIFT 24
1304#define OMAP54XX_SEL_SA_VDD_CORE_L_WIDTH 0x1
1305#define OMAP54XX_SEL_SA_VDD_CORE_L_MASK (1 << 24)
1306
1307/* Used by PRM_VC_SMPS_MM_CONFIG */
1308#define OMAP54XX_SEL_SA_VDD_MM_L_SHIFT 24
1309#define OMAP54XX_SEL_SA_VDD_MM_L_WIDTH 0x1
1310#define OMAP54XX_SEL_SA_VDD_MM_L_MASK (1 << 24)
1311
1312/* Used by PRM_VC_SMPS_MPU_CONFIG */
1313#define OMAP54XX_SEL_SA_VDD_MPU_L_SHIFT 24
1314#define OMAP54XX_SEL_SA_VDD_MPU_L_WIDTH 0x1
1315#define OMAP54XX_SEL_SA_VDD_MPU_L_MASK (1 << 24)
1316
1317/* Used by PM_IVA_PWRSTCTRL */
1318#define OMAP54XX_SL2_MEM_ONSTATE_SHIFT 18
1319#define OMAP54XX_SL2_MEM_ONSTATE_WIDTH 0x2
1320#define OMAP54XX_SL2_MEM_ONSTATE_MASK (0x3 << 18)
1321
1322/* Used by PM_IVA_PWRSTCTRL */
1323#define OMAP54XX_SL2_MEM_RETSTATE_SHIFT 9
1324#define OMAP54XX_SL2_MEM_RETSTATE_WIDTH 0x1
1325#define OMAP54XX_SL2_MEM_RETSTATE_MASK (1 << 9)
1326
1327/* Used by PM_IVA_PWRSTST */
1328#define OMAP54XX_SL2_MEM_STATEST_SHIFT 6
1329#define OMAP54XX_SL2_MEM_STATEST_WIDTH 0x2
1330#define OMAP54XX_SL2_MEM_STATEST_MASK (0x3 << 6)
1331
1332/* Used by PRM_VC_VAL_BYPASS */
1333#define OMAP54XX_SLAVEADDR_SHIFT 0
1334#define OMAP54XX_SLAVEADDR_WIDTH 0x7
1335#define OMAP54XX_SLAVEADDR_MASK (0x7f << 0)
1336
1337/* Used by PRM_SRAM_COUNT */
1338#define OMAP54XX_SLPCNT_VALUE_SHIFT 16
1339#define OMAP54XX_SLPCNT_VALUE_WIDTH 0x8
1340#define OMAP54XX_SLPCNT_VALUE_MASK (0xff << 16)
1341
1342/* Used by PRM_VP_CORE_VSTEPMAX, PRM_VP_MM_VSTEPMAX, PRM_VP_MPU_VSTEPMAX */
1343#define OMAP54XX_SMPSWAITTIMEMAX_SHIFT 8
1344#define OMAP54XX_SMPSWAITTIMEMAX_WIDTH 0x10
1345#define OMAP54XX_SMPSWAITTIMEMAX_MASK (0xffff << 8)
1346
1347/* Used by PRM_VP_CORE_VSTEPMIN, PRM_VP_MM_VSTEPMIN, PRM_VP_MPU_VSTEPMIN */
1348#define OMAP54XX_SMPSWAITTIMEMIN_SHIFT 8
1349#define OMAP54XX_SMPSWAITTIMEMIN_WIDTH 0x10
1350#define OMAP54XX_SMPSWAITTIMEMIN_MASK (0xffff << 8)
1351
1352/* Used by PRM_VC_CORE_ERRST */
1353#define OMAP54XX_SMPS_RA_ERR_CORE_SHIFT 1
1354#define OMAP54XX_SMPS_RA_ERR_CORE_WIDTH 0x1
1355#define OMAP54XX_SMPS_RA_ERR_CORE_MASK (1 << 1)
1356
1357/* Used by PRM_VC_MM_ERRST */
1358#define OMAP54XX_SMPS_RA_ERR_MM_SHIFT 1
1359#define OMAP54XX_SMPS_RA_ERR_MM_WIDTH 0x1
1360#define OMAP54XX_SMPS_RA_ERR_MM_MASK (1 << 1)
1361
1362/* Used by PRM_VC_MPU_ERRST */
1363#define OMAP54XX_SMPS_RA_ERR_MPU_SHIFT 1
1364#define OMAP54XX_SMPS_RA_ERR_MPU_WIDTH 0x1
1365#define OMAP54XX_SMPS_RA_ERR_MPU_MASK (1 << 1)
1366
1367/* Used by PRM_VC_CORE_ERRST */
1368#define OMAP54XX_SMPS_SA_ERR_CORE_SHIFT 0
1369#define OMAP54XX_SMPS_SA_ERR_CORE_WIDTH 0x1
1370#define OMAP54XX_SMPS_SA_ERR_CORE_MASK (1 << 0)
1371
1372/* Used by PRM_VC_MM_ERRST */
1373#define OMAP54XX_SMPS_SA_ERR_MM_SHIFT 0
1374#define OMAP54XX_SMPS_SA_ERR_MM_WIDTH 0x1
1375#define OMAP54XX_SMPS_SA_ERR_MM_MASK (1 << 0)
1376
1377/* Used by PRM_VC_MPU_ERRST */
1378#define OMAP54XX_SMPS_SA_ERR_MPU_SHIFT 0
1379#define OMAP54XX_SMPS_SA_ERR_MPU_WIDTH 0x1
1380#define OMAP54XX_SMPS_SA_ERR_MPU_MASK (1 << 0)
1381
1382/* Used by PRM_VC_CORE_ERRST */
1383#define OMAP54XX_SMPS_TIMEOUT_ERR_CORE_SHIFT 2
1384#define OMAP54XX_SMPS_TIMEOUT_ERR_CORE_WIDTH 0x1
1385#define OMAP54XX_SMPS_TIMEOUT_ERR_CORE_MASK (1 << 2)
1386
1387/* Used by PRM_VC_MM_ERRST */
1388#define OMAP54XX_SMPS_TIMEOUT_ERR_MM_SHIFT 2
1389#define OMAP54XX_SMPS_TIMEOUT_ERR_MM_WIDTH 0x1
1390#define OMAP54XX_SMPS_TIMEOUT_ERR_MM_MASK (1 << 2)
1391
1392/* Used by PRM_VC_MPU_ERRST */
1393#define OMAP54XX_SMPS_TIMEOUT_ERR_MPU_SHIFT 2
1394#define OMAP54XX_SMPS_TIMEOUT_ERR_MPU_WIDTH 0x1
1395#define OMAP54XX_SMPS_TIMEOUT_ERR_MPU_MASK (1 << 2)
1396
1397/* Used by PRM_ABBLDO_MM_SETUP, PRM_ABBLDO_MPU_SETUP */
1398#define OMAP54XX_SR2EN_SHIFT 0
1399#define OMAP54XX_SR2EN_WIDTH 0x1
1400#define OMAP54XX_SR2EN_MASK (1 << 0)
1401
1402/* Used by PRM_ABBLDO_MM_CTRL, PRM_ABBLDO_MPU_CTRL */
1403#define OMAP54XX_SR2_IN_TRANSITION_SHIFT 6
1404#define OMAP54XX_SR2_IN_TRANSITION_WIDTH 0x1
1405#define OMAP54XX_SR2_IN_TRANSITION_MASK (1 << 6)
1406
1407/* Used by PRM_ABBLDO_MM_CTRL, PRM_ABBLDO_MPU_CTRL */
1408#define OMAP54XX_SR2_STATUS_SHIFT 3
1409#define OMAP54XX_SR2_STATUS_WIDTH 0x2
1410#define OMAP54XX_SR2_STATUS_MASK (0x3 << 3)
1411
1412/* Used by PRM_ABBLDO_MM_SETUP, PRM_ABBLDO_MPU_SETUP */
1413#define OMAP54XX_SR2_WTCNT_VALUE_SHIFT 8
1414#define OMAP54XX_SR2_WTCNT_VALUE_WIDTH 0x8
1415#define OMAP54XX_SR2_WTCNT_VALUE_MASK (0xff << 8)
1416
1417/* Used by PRM_SLDO_CORE_CTRL, PRM_SLDO_MM_CTRL, PRM_SLDO_MPU_CTRL */
1418#define OMAP54XX_SRAMLDO_STATUS_SHIFT 8
1419#define OMAP54XX_SRAMLDO_STATUS_WIDTH 0x1
1420#define OMAP54XX_SRAMLDO_STATUS_MASK (1 << 8)
1421
1422/* Used by PRM_SLDO_CORE_CTRL, PRM_SLDO_MM_CTRL, PRM_SLDO_MPU_CTRL */
1423#define OMAP54XX_SRAM_IN_TRANSITION_SHIFT 9
1424#define OMAP54XX_SRAM_IN_TRANSITION_WIDTH 0x1
1425#define OMAP54XX_SRAM_IN_TRANSITION_MASK (1 << 9)
1426
1427/* Used by PRM_VC_CFG_I2C_MODE */
1428#define OMAP54XX_SRMODEEN_SHIFT 4
1429#define OMAP54XX_SRMODEEN_WIDTH 0x1
1430#define OMAP54XX_SRMODEEN_MASK (1 << 4)
1431
1432/* Used by PRM_VOLTSETUP_WARMRESET */
1433#define OMAP54XX_STABLE_COUNT_SHIFT 0
1434#define OMAP54XX_STABLE_COUNT_WIDTH 0x6
1435#define OMAP54XX_STABLE_COUNT_MASK (0x3f << 0)
1436
1437/* Used by PRM_VOLTSETUP_WARMRESET */
1438#define OMAP54XX_STABLE_PRESCAL_SHIFT 8
1439#define OMAP54XX_STABLE_PRESCAL_WIDTH 0x2
1440#define OMAP54XX_STABLE_PRESCAL_MASK (0x3 << 8)
1441
1442/* Used by PRM_BANDGAP_SETUP */
1443#define OMAP54XX_STARTUP_COUNT_SHIFT 0
1444#define OMAP54XX_STARTUP_COUNT_WIDTH 0x8
1445#define OMAP54XX_STARTUP_COUNT_MASK (0xff << 0)
1446
1447/* Renamed from STARTUP_COUNT Used by PRM_SRAM_COUNT */
1448#define OMAP54XX_STARTUP_COUNT_24_31_SHIFT 24
1449#define OMAP54XX_STARTUP_COUNT_24_31_WIDTH 0x8
1450#define OMAP54XX_STARTUP_COUNT_24_31_MASK (0xff << 24)
1451
1452/* Used by PM_IVA_PWRSTCTRL */
1453#define OMAP54XX_TCM1_MEM_ONSTATE_SHIFT 20
1454#define OMAP54XX_TCM1_MEM_ONSTATE_WIDTH 0x2
1455#define OMAP54XX_TCM1_MEM_ONSTATE_MASK (0x3 << 20)
1456
1457/* Used by PM_IVA_PWRSTCTRL */
1458#define OMAP54XX_TCM1_MEM_RETSTATE_SHIFT 10
1459#define OMAP54XX_TCM1_MEM_RETSTATE_WIDTH 0x1
1460#define OMAP54XX_TCM1_MEM_RETSTATE_MASK (1 << 10)
1461
1462/* Used by PM_IVA_PWRSTST */
1463#define OMAP54XX_TCM1_MEM_STATEST_SHIFT 8
1464#define OMAP54XX_TCM1_MEM_STATEST_WIDTH 0x2
1465#define OMAP54XX_TCM1_MEM_STATEST_MASK (0x3 << 8)
1466
1467/* Used by PM_IVA_PWRSTCTRL */
1468#define OMAP54XX_TCM2_MEM_ONSTATE_SHIFT 22
1469#define OMAP54XX_TCM2_MEM_ONSTATE_WIDTH 0x2
1470#define OMAP54XX_TCM2_MEM_ONSTATE_MASK (0x3 << 22)
1471
1472/* Used by PM_IVA_PWRSTCTRL */
1473#define OMAP54XX_TCM2_MEM_RETSTATE_SHIFT 11
1474#define OMAP54XX_TCM2_MEM_RETSTATE_WIDTH 0x1
1475#define OMAP54XX_TCM2_MEM_RETSTATE_MASK (1 << 11)
1476
1477/* Used by PM_IVA_PWRSTST */
1478#define OMAP54XX_TCM2_MEM_STATEST_SHIFT 10
1479#define OMAP54XX_TCM2_MEM_STATEST_WIDTH 0x2
1480#define OMAP54XX_TCM2_MEM_STATEST_MASK (0x3 << 10)
1481
1482/* Used by PRM_VP_CORE_VLIMITTO, PRM_VP_MM_VLIMITTO, PRM_VP_MPU_VLIMITTO */
1483#define OMAP54XX_TIMEOUT_SHIFT 0
1484#define OMAP54XX_TIMEOUT_WIDTH 0x10
1485#define OMAP54XX_TIMEOUT_MASK (0xffff << 0)
1486
1487/* Used by PRM_VP_CORE_CONFIG, PRM_VP_MM_CONFIG, PRM_VP_MPU_CONFIG */
1488#define OMAP54XX_TIMEOUTEN_SHIFT 3
1489#define OMAP54XX_TIMEOUTEN_WIDTH 0x1
1490#define OMAP54XX_TIMEOUTEN_MASK (1 << 3)
1491
1492/* Used by PRM_IRQENABLE_IPU, PRM_IRQENABLE_MPU */
1493#define OMAP54XX_TRANSITION_EN_SHIFT 8
1494#define OMAP54XX_TRANSITION_EN_WIDTH 0x1
1495#define OMAP54XX_TRANSITION_EN_MASK (1 << 8)
1496
1497/* Used by PRM_IRQSTATUS_IPU, PRM_IRQSTATUS_MPU */
1498#define OMAP54XX_TRANSITION_ST_SHIFT 8
1499#define OMAP54XX_TRANSITION_ST_WIDTH 0x1
1500#define OMAP54XX_TRANSITION_ST_MASK (1 << 8)
1501
1502/* Used by PRM_DEBUG_TRANS_CFG */
1503#define OMAP54XX_TRIGGER_CLEAR_SHIFT 2
1504#define OMAP54XX_TRIGGER_CLEAR_WIDTH 0x1
1505#define OMAP54XX_TRIGGER_CLEAR_MASK (1 << 2)
1506
1507/* Used by PRM_RSTST */
1508#define OMAP54XX_TSHUT_CORE_RST_SHIFT 13
1509#define OMAP54XX_TSHUT_CORE_RST_WIDTH 0x1
1510#define OMAP54XX_TSHUT_CORE_RST_MASK (1 << 13)
1511
1512/* Used by PRM_RSTST */
1513#define OMAP54XX_TSHUT_MM_RST_SHIFT 12
1514#define OMAP54XX_TSHUT_MM_RST_WIDTH 0x1
1515#define OMAP54XX_TSHUT_MM_RST_MASK (1 << 12)
1516
1517/* Used by PRM_RSTST */
1518#define OMAP54XX_TSHUT_MPU_RST_SHIFT 11
1519#define OMAP54XX_TSHUT_MPU_RST_WIDTH 0x1
1520#define OMAP54XX_TSHUT_MPU_RST_MASK (1 << 11)
1521
1522/* Used by PRM_VC_VAL_BYPASS */
1523#define OMAP54XX_VALID_SHIFT 24
1524#define OMAP54XX_VALID_WIDTH 0x1
1525#define OMAP54XX_VALID_MASK (1 << 24)
1526
1527/* Used by PRM_IRQENABLE_IPU, PRM_IRQENABLE_MPU */
1528#define OMAP54XX_VC_BYPASSACK_EN_SHIFT 14
1529#define OMAP54XX_VC_BYPASSACK_EN_WIDTH 0x1
1530#define OMAP54XX_VC_BYPASSACK_EN_MASK (1 << 14)
1531
1532/* Used by PRM_IRQSTATUS_IPU, PRM_IRQSTATUS_MPU */
1533#define OMAP54XX_VC_BYPASSACK_ST_SHIFT 14
1534#define OMAP54XX_VC_BYPASSACK_ST_WIDTH 0x1
1535#define OMAP54XX_VC_BYPASSACK_ST_MASK (1 << 14)
1536
1537/* Used by PRM_IRQENABLE_IPU, PRM_IRQENABLE_MPU */
1538#define OMAP54XX_VC_CORE_VPACK_EN_SHIFT 22
1539#define OMAP54XX_VC_CORE_VPACK_EN_WIDTH 0x1
1540#define OMAP54XX_VC_CORE_VPACK_EN_MASK (1 << 22)
1541
1542/* Used by PRM_IRQSTATUS_IPU, PRM_IRQSTATUS_MPU */
1543#define OMAP54XX_VC_CORE_VPACK_ST_SHIFT 22
1544#define OMAP54XX_VC_CORE_VPACK_ST_WIDTH 0x1
1545#define OMAP54XX_VC_CORE_VPACK_ST_MASK (1 << 22)
1546
1547/* Used by PRM_IRQENABLE_IPU, PRM_IRQENABLE_MPU */
1548#define OMAP54XX_VC_MM_VPACK_EN_SHIFT 30
1549#define OMAP54XX_VC_MM_VPACK_EN_WIDTH 0x1
1550#define OMAP54XX_VC_MM_VPACK_EN_MASK (1 << 30)
1551
1552/* Used by PRM_IRQSTATUS_IPU, PRM_IRQSTATUS_MPU */
1553#define OMAP54XX_VC_MM_VPACK_ST_SHIFT 30
1554#define OMAP54XX_VC_MM_VPACK_ST_WIDTH 0x1
1555#define OMAP54XX_VC_MM_VPACK_ST_MASK (1 << 30)
1556
1557/* Used by PRM_IRQENABLE_MPU_2 */
1558#define OMAP54XX_VC_MPU_VPACK_EN_SHIFT 6
1559#define OMAP54XX_VC_MPU_VPACK_EN_WIDTH 0x1
1560#define OMAP54XX_VC_MPU_VPACK_EN_MASK (1 << 6)
1561
1562/* Used by PRM_IRQSTATUS_MPU_2 */
1563#define OMAP54XX_VC_MPU_VPACK_ST_SHIFT 6
1564#define OMAP54XX_VC_MPU_VPACK_ST_WIDTH 0x1
1565#define OMAP54XX_VC_MPU_VPACK_ST_MASK (1 << 6)
1566
1567/* Used by PRM_IRQENABLE_IPU, PRM_IRQENABLE_MPU */
1568#define OMAP54XX_VC_RAERR_EN_SHIFT 12
1569#define OMAP54XX_VC_RAERR_EN_WIDTH 0x1
1570#define OMAP54XX_VC_RAERR_EN_MASK (1 << 12)
1571
1572/* Used by PRM_IRQSTATUS_IPU, PRM_IRQSTATUS_MPU */
1573#define OMAP54XX_VC_RAERR_ST_SHIFT 12
1574#define OMAP54XX_VC_RAERR_ST_WIDTH 0x1
1575#define OMAP54XX_VC_RAERR_ST_MASK (1 << 12)
1576
1577/* Used by PRM_IRQENABLE_IPU, PRM_IRQENABLE_MPU */
1578#define OMAP54XX_VC_SAERR_EN_SHIFT 11
1579#define OMAP54XX_VC_SAERR_EN_WIDTH 0x1
1580#define OMAP54XX_VC_SAERR_EN_MASK (1 << 11)
1581
1582/* Used by PRM_IRQSTATUS_IPU, PRM_IRQSTATUS_MPU */
1583#define OMAP54XX_VC_SAERR_ST_SHIFT 11
1584#define OMAP54XX_VC_SAERR_ST_WIDTH 0x1
1585#define OMAP54XX_VC_SAERR_ST_MASK (1 << 11)
1586
1587/* Used by PRM_IRQENABLE_IPU, PRM_IRQENABLE_MPU */
1588#define OMAP54XX_VC_TOERR_EN_SHIFT 13
1589#define OMAP54XX_VC_TOERR_EN_WIDTH 0x1
1590#define OMAP54XX_VC_TOERR_EN_MASK (1 << 13)
1591
1592/* Used by PRM_IRQSTATUS_IPU, PRM_IRQSTATUS_MPU */
1593#define OMAP54XX_VC_TOERR_ST_SHIFT 13
1594#define OMAP54XX_VC_TOERR_ST_WIDTH 0x1
1595#define OMAP54XX_VC_TOERR_ST_MASK (1 << 13)
1596
1597/* Used by PRM_VP_CORE_VLIMITTO, PRM_VP_MM_VLIMITTO, PRM_VP_MPU_VLIMITTO */
1598#define OMAP54XX_VDDMAX_SHIFT 24
1599#define OMAP54XX_VDDMAX_WIDTH 0x8
1600#define OMAP54XX_VDDMAX_MASK (0xff << 24)
1601
1602/* Used by PRM_VP_CORE_VLIMITTO, PRM_VP_MM_VLIMITTO, PRM_VP_MPU_VLIMITTO */
1603#define OMAP54XX_VDDMIN_SHIFT 16
1604#define OMAP54XX_VDDMIN_WIDTH 0x8
1605#define OMAP54XX_VDDMIN_MASK (0xff << 16)
1606
1607/* Used by PRM_VOLTCTRL */
1608#define OMAP54XX_VDD_CORE_I2C_DISABLE_SHIFT 12
1609#define OMAP54XX_VDD_CORE_I2C_DISABLE_WIDTH 0x1
1610#define OMAP54XX_VDD_CORE_I2C_DISABLE_MASK (1 << 12)
1611
1612/* Used by PRM_RSTST */
1613#define OMAP54XX_VDD_CORE_VOLT_MGR_RST_SHIFT 8
1614#define OMAP54XX_VDD_CORE_VOLT_MGR_RST_WIDTH 0x1
1615#define OMAP54XX_VDD_CORE_VOLT_MGR_RST_MASK (1 << 8)
1616
1617/* Used by PRM_VOLTCTRL */
1618#define OMAP54XX_VDD_MM_I2C_DISABLE_SHIFT 14
1619#define OMAP54XX_VDD_MM_I2C_DISABLE_WIDTH 0x1
1620#define OMAP54XX_VDD_MM_I2C_DISABLE_MASK (1 << 14)
1621
1622/* Used by PRM_VOLTCTRL */
1623#define OMAP54XX_VDD_MM_PRESENCE_SHIFT 9
1624#define OMAP54XX_VDD_MM_PRESENCE_WIDTH 0x1
1625#define OMAP54XX_VDD_MM_PRESENCE_MASK (1 << 9)
1626
1627/* Used by PRM_RSTST */
1628#define OMAP54XX_VDD_MM_VOLT_MGR_RST_SHIFT 7
1629#define OMAP54XX_VDD_MM_VOLT_MGR_RST_WIDTH 0x1
1630#define OMAP54XX_VDD_MM_VOLT_MGR_RST_MASK (1 << 7)
1631
1632/* Used by PRM_VOLTCTRL */
1633#define OMAP54XX_VDD_MPU_I2C_DISABLE_SHIFT 13
1634#define OMAP54XX_VDD_MPU_I2C_DISABLE_WIDTH 0x1
1635#define OMAP54XX_VDD_MPU_I2C_DISABLE_MASK (1 << 13)
1636
1637/* Used by PRM_VOLTCTRL */
1638#define OMAP54XX_VDD_MPU_PRESENCE_SHIFT 8
1639#define OMAP54XX_VDD_MPU_PRESENCE_WIDTH 0x1
1640#define OMAP54XX_VDD_MPU_PRESENCE_MASK (1 << 8)
1641
1642/* Used by PRM_RSTST */
1643#define OMAP54XX_VDD_MPU_VOLT_MGR_RST_SHIFT 6
1644#define OMAP54XX_VDD_MPU_VOLT_MGR_RST_WIDTH 0x1
1645#define OMAP54XX_VDD_MPU_VOLT_MGR_RST_MASK (1 << 6)
1646
1647/* Used by PRM_VC_CORE_ERRST */
1648#define OMAP54XX_VFSM_RA_ERR_CORE_SHIFT 4
1649#define OMAP54XX_VFSM_RA_ERR_CORE_WIDTH 0x1
1650#define OMAP54XX_VFSM_RA_ERR_CORE_MASK (1 << 4)
1651
1652/* Used by PRM_VC_MM_ERRST */
1653#define OMAP54XX_VFSM_RA_ERR_MM_SHIFT 4
1654#define OMAP54XX_VFSM_RA_ERR_MM_WIDTH 0x1
1655#define OMAP54XX_VFSM_RA_ERR_MM_MASK (1 << 4)
1656
1657/* Used by PRM_VC_MPU_ERRST */
1658#define OMAP54XX_VFSM_RA_ERR_MPU_SHIFT 4
1659#define OMAP54XX_VFSM_RA_ERR_MPU_WIDTH 0x1
1660#define OMAP54XX_VFSM_RA_ERR_MPU_MASK (1 << 4)
1661
1662/* Used by PRM_VC_CORE_ERRST */
1663#define OMAP54XX_VFSM_SA_ERR_CORE_SHIFT 3
1664#define OMAP54XX_VFSM_SA_ERR_CORE_WIDTH 0x1
1665#define OMAP54XX_VFSM_SA_ERR_CORE_MASK (1 << 3)
1666
1667/* Used by PRM_VC_MM_ERRST */
1668#define OMAP54XX_VFSM_SA_ERR_MM_SHIFT 3
1669#define OMAP54XX_VFSM_SA_ERR_MM_WIDTH 0x1
1670#define OMAP54XX_VFSM_SA_ERR_MM_MASK (1 << 3)
1671
1672/* Used by PRM_VC_MPU_ERRST */
1673#define OMAP54XX_VFSM_SA_ERR_MPU_SHIFT 3
1674#define OMAP54XX_VFSM_SA_ERR_MPU_WIDTH 0x1
1675#define OMAP54XX_VFSM_SA_ERR_MPU_MASK (1 << 3)
1676
1677/* Used by PRM_VC_CORE_ERRST */
1678#define OMAP54XX_VFSM_TIMEOUT_ERR_CORE_SHIFT 5
1679#define OMAP54XX_VFSM_TIMEOUT_ERR_CORE_WIDTH 0x1
1680#define OMAP54XX_VFSM_TIMEOUT_ERR_CORE_MASK (1 << 5)
1681
1682/* Used by PRM_VC_MM_ERRST */
1683#define OMAP54XX_VFSM_TIMEOUT_ERR_MM_SHIFT 5
1684#define OMAP54XX_VFSM_TIMEOUT_ERR_MM_WIDTH 0x1
1685#define OMAP54XX_VFSM_TIMEOUT_ERR_MM_MASK (1 << 5)
1686
1687/* Used by PRM_VC_MPU_ERRST */
1688#define OMAP54XX_VFSM_TIMEOUT_ERR_MPU_SHIFT 5
1689#define OMAP54XX_VFSM_TIMEOUT_ERR_MPU_WIDTH 0x1
1690#define OMAP54XX_VFSM_TIMEOUT_ERR_MPU_MASK (1 << 5)
1691
1692/* Used by PRM_VC_SMPS_CORE_CONFIG */
1693#define OMAP54XX_VOLRA_VDD_CORE_L_SHIFT 8
1694#define OMAP54XX_VOLRA_VDD_CORE_L_WIDTH 0x8
1695#define OMAP54XX_VOLRA_VDD_CORE_L_MASK (0xff << 8)
1696
1697/* Used by PRM_VC_SMPS_MM_CONFIG */
1698#define OMAP54XX_VOLRA_VDD_MM_L_SHIFT 8
1699#define OMAP54XX_VOLRA_VDD_MM_L_WIDTH 0x8
1700#define OMAP54XX_VOLRA_VDD_MM_L_MASK (0xff << 8)
1701
1702/* Used by PRM_VC_SMPS_MPU_CONFIG */
1703#define OMAP54XX_VOLRA_VDD_MPU_L_SHIFT 8
1704#define OMAP54XX_VOLRA_VDD_MPU_L_WIDTH 0x8
1705#define OMAP54XX_VOLRA_VDD_MPU_L_MASK (0xff << 8)
1706
1707/* Used by PRM_VOLTST_MM, PRM_VOLTST_MPU */
1708#define OMAP54XX_VOLTSTATEST_SHIFT 0
1709#define OMAP54XX_VOLTSTATEST_WIDTH 0x2
1710#define OMAP54XX_VOLTSTATEST_MASK (0x3 << 0)
1711
1712/* Used by PRM_VP_CORE_CONFIG, PRM_VP_MM_CONFIG, PRM_VP_MPU_CONFIG */
1713#define OMAP54XX_VPENABLE_SHIFT 0
1714#define OMAP54XX_VPENABLE_WIDTH 0x1
1715#define OMAP54XX_VPENABLE_MASK (1 << 0)
1716
1717/* Used by PRM_VP_CORE_STATUS, PRM_VP_MM_STATUS, PRM_VP_MPU_STATUS */
1718#define OMAP54XX_VPINIDLE_SHIFT 0
1719#define OMAP54XX_VPINIDLE_WIDTH 0x1
1720#define OMAP54XX_VPINIDLE_MASK (1 << 0)
1721
1722/* Used by PRM_VP_CORE_VOLTAGE, PRM_VP_MM_VOLTAGE, PRM_VP_MPU_VOLTAGE */
1723#define OMAP54XX_VPVOLTAGE_SHIFT 0
1724#define OMAP54XX_VPVOLTAGE_WIDTH 0x8
1725#define OMAP54XX_VPVOLTAGE_MASK (0xff << 0)
1726
1727/* Used by PRM_IRQENABLE_IPU, PRM_IRQENABLE_MPU */
1728#define OMAP54XX_VP_CORE_EQVALUE_EN_SHIFT 20
1729#define OMAP54XX_VP_CORE_EQVALUE_EN_WIDTH 0x1
1730#define OMAP54XX_VP_CORE_EQVALUE_EN_MASK (1 << 20)
1731
1732/* Used by PRM_IRQSTATUS_IPU, PRM_IRQSTATUS_MPU */
1733#define OMAP54XX_VP_CORE_EQVALUE_ST_SHIFT 20
1734#define OMAP54XX_VP_CORE_EQVALUE_ST_WIDTH 0x1
1735#define OMAP54XX_VP_CORE_EQVALUE_ST_MASK (1 << 20)
1736
1737/* Used by PRM_IRQENABLE_IPU, PRM_IRQENABLE_MPU */
1738#define OMAP54XX_VP_CORE_MAXVDD_EN_SHIFT 18
1739#define OMAP54XX_VP_CORE_MAXVDD_EN_WIDTH 0x1
1740#define OMAP54XX_VP_CORE_MAXVDD_EN_MASK (1 << 18)
1741
1742/* Used by PRM_IRQSTATUS_IPU, PRM_IRQSTATUS_MPU */
1743#define OMAP54XX_VP_CORE_MAXVDD_ST_SHIFT 18
1744#define OMAP54XX_VP_CORE_MAXVDD_ST_WIDTH 0x1
1745#define OMAP54XX_VP_CORE_MAXVDD_ST_MASK (1 << 18)
1746
1747/* Used by PRM_IRQENABLE_IPU, PRM_IRQENABLE_MPU */
1748#define OMAP54XX_VP_CORE_MINVDD_EN_SHIFT 17
1749#define OMAP54XX_VP_CORE_MINVDD_EN_WIDTH 0x1
1750#define OMAP54XX_VP_CORE_MINVDD_EN_MASK (1 << 17)
1751
1752/* Used by PRM_IRQSTATUS_IPU, PRM_IRQSTATUS_MPU */
1753#define OMAP54XX_VP_CORE_MINVDD_ST_SHIFT 17
1754#define OMAP54XX_VP_CORE_MINVDD_ST_WIDTH 0x1
1755#define OMAP54XX_VP_CORE_MINVDD_ST_MASK (1 << 17)
1756
1757/* Used by PRM_IRQENABLE_IPU, PRM_IRQENABLE_MPU */
1758#define OMAP54XX_VP_CORE_NOSMPSACK_EN_SHIFT 19
1759#define OMAP54XX_VP_CORE_NOSMPSACK_EN_WIDTH 0x1
1760#define OMAP54XX_VP_CORE_NOSMPSACK_EN_MASK (1 << 19)
1761
1762/* Used by PRM_IRQSTATUS_IPU, PRM_IRQSTATUS_MPU */
1763#define OMAP54XX_VP_CORE_NOSMPSACK_ST_SHIFT 19
1764#define OMAP54XX_VP_CORE_NOSMPSACK_ST_WIDTH 0x1
1765#define OMAP54XX_VP_CORE_NOSMPSACK_ST_MASK (1 << 19)
1766
1767/* Used by PRM_IRQENABLE_IPU, PRM_IRQENABLE_MPU */
1768#define OMAP54XX_VP_CORE_OPPCHANGEDONE_EN_SHIFT 16
1769#define OMAP54XX_VP_CORE_OPPCHANGEDONE_EN_WIDTH 0x1
1770#define OMAP54XX_VP_CORE_OPPCHANGEDONE_EN_MASK (1 << 16)
1771
1772/* Used by PRM_IRQSTATUS_IPU, PRM_IRQSTATUS_MPU */
1773#define OMAP54XX_VP_CORE_OPPCHANGEDONE_ST_SHIFT 16
1774#define OMAP54XX_VP_CORE_OPPCHANGEDONE_ST_WIDTH 0x1
1775#define OMAP54XX_VP_CORE_OPPCHANGEDONE_ST_MASK (1 << 16)
1776
1777/* Used by PRM_IRQENABLE_IPU, PRM_IRQENABLE_MPU */
1778#define OMAP54XX_VP_CORE_TRANXDONE_EN_SHIFT 21
1779#define OMAP54XX_VP_CORE_TRANXDONE_EN_WIDTH 0x1
1780#define OMAP54XX_VP_CORE_TRANXDONE_EN_MASK (1 << 21)
1781
1782/* Used by PRM_IRQSTATUS_IPU, PRM_IRQSTATUS_MPU */
1783#define OMAP54XX_VP_CORE_TRANXDONE_ST_SHIFT 21
1784#define OMAP54XX_VP_CORE_TRANXDONE_ST_WIDTH 0x1
1785#define OMAP54XX_VP_CORE_TRANXDONE_ST_MASK (1 << 21)
1786
1787/* Used by PRM_IRQENABLE_IPU, PRM_IRQENABLE_MPU */
1788#define OMAP54XX_VP_MM_EQVALUE_EN_SHIFT 28
1789#define OMAP54XX_VP_MM_EQVALUE_EN_WIDTH 0x1
1790#define OMAP54XX_VP_MM_EQVALUE_EN_MASK (1 << 28)
1791
1792/* Used by PRM_IRQSTATUS_IPU, PRM_IRQSTATUS_MPU */
1793#define OMAP54XX_VP_MM_EQVALUE_ST_SHIFT 28
1794#define OMAP54XX_VP_MM_EQVALUE_ST_WIDTH 0x1
1795#define OMAP54XX_VP_MM_EQVALUE_ST_MASK (1 << 28)
1796
1797/* Used by PRM_IRQENABLE_IPU, PRM_IRQENABLE_MPU */
1798#define OMAP54XX_VP_MM_MAXVDD_EN_SHIFT 26
1799#define OMAP54XX_VP_MM_MAXVDD_EN_WIDTH 0x1
1800#define OMAP54XX_VP_MM_MAXVDD_EN_MASK (1 << 26)
1801
1802/* Used by PRM_IRQSTATUS_IPU, PRM_IRQSTATUS_MPU */
1803#define OMAP54XX_VP_MM_MAXVDD_ST_SHIFT 26
1804#define OMAP54XX_VP_MM_MAXVDD_ST_WIDTH 0x1
1805#define OMAP54XX_VP_MM_MAXVDD_ST_MASK (1 << 26)
1806
1807/* Used by PRM_IRQENABLE_IPU, PRM_IRQENABLE_MPU */
1808#define OMAP54XX_VP_MM_MINVDD_EN_SHIFT 25
1809#define OMAP54XX_VP_MM_MINVDD_EN_WIDTH 0x1
1810#define OMAP54XX_VP_MM_MINVDD_EN_MASK (1 << 25)
1811
1812/* Used by PRM_IRQSTATUS_IPU, PRM_IRQSTATUS_MPU */
1813#define OMAP54XX_VP_MM_MINVDD_ST_SHIFT 25
1814#define OMAP54XX_VP_MM_MINVDD_ST_WIDTH 0x1
1815#define OMAP54XX_VP_MM_MINVDD_ST_MASK (1 << 25)
1816
1817/* Used by PRM_IRQENABLE_IPU, PRM_IRQENABLE_MPU */
1818#define OMAP54XX_VP_MM_NOSMPSACK_EN_SHIFT 27
1819#define OMAP54XX_VP_MM_NOSMPSACK_EN_WIDTH 0x1
1820#define OMAP54XX_VP_MM_NOSMPSACK_EN_MASK (1 << 27)
1821
1822/* Used by PRM_IRQSTATUS_IPU, PRM_IRQSTATUS_MPU */
1823#define OMAP54XX_VP_MM_NOSMPSACK_ST_SHIFT 27
1824#define OMAP54XX_VP_MM_NOSMPSACK_ST_WIDTH 0x1
1825#define OMAP54XX_VP_MM_NOSMPSACK_ST_MASK (1 << 27)
1826
1827/* Used by PRM_IRQENABLE_IPU, PRM_IRQENABLE_MPU */
1828#define OMAP54XX_VP_MM_OPPCHANGEDONE_EN_SHIFT 24
1829#define OMAP54XX_VP_MM_OPPCHANGEDONE_EN_WIDTH 0x1
1830#define OMAP54XX_VP_MM_OPPCHANGEDONE_EN_MASK (1 << 24)
1831
1832/* Used by PRM_IRQSTATUS_IPU, PRM_IRQSTATUS_MPU */
1833#define OMAP54XX_VP_MM_OPPCHANGEDONE_ST_SHIFT 24
1834#define OMAP54XX_VP_MM_OPPCHANGEDONE_ST_WIDTH 0x1
1835#define OMAP54XX_VP_MM_OPPCHANGEDONE_ST_MASK (1 << 24)
1836
1837/* Used by PRM_IRQENABLE_IPU, PRM_IRQENABLE_MPU */
1838#define OMAP54XX_VP_MM_TRANXDONE_EN_SHIFT 29
1839#define OMAP54XX_VP_MM_TRANXDONE_EN_WIDTH 0x1
1840#define OMAP54XX_VP_MM_TRANXDONE_EN_MASK (1 << 29)
1841
1842/* Used by PRM_IRQSTATUS_IPU, PRM_IRQSTATUS_MPU */
1843#define OMAP54XX_VP_MM_TRANXDONE_ST_SHIFT 29
1844#define OMAP54XX_VP_MM_TRANXDONE_ST_WIDTH 0x1
1845#define OMAP54XX_VP_MM_TRANXDONE_ST_MASK (1 << 29)
1846
1847/* Used by PRM_IRQENABLE_MPU_2 */
1848#define OMAP54XX_VP_MPU_EQVALUE_EN_SHIFT 4
1849#define OMAP54XX_VP_MPU_EQVALUE_EN_WIDTH 0x1
1850#define OMAP54XX_VP_MPU_EQVALUE_EN_MASK (1 << 4)
1851
1852/* Used by PRM_IRQSTATUS_MPU_2 */
1853#define OMAP54XX_VP_MPU_EQVALUE_ST_SHIFT 4
1854#define OMAP54XX_VP_MPU_EQVALUE_ST_WIDTH 0x1
1855#define OMAP54XX_VP_MPU_EQVALUE_ST_MASK (1 << 4)
1856
1857/* Used by PRM_IRQENABLE_MPU_2 */
1858#define OMAP54XX_VP_MPU_MAXVDD_EN_SHIFT 2
1859#define OMAP54XX_VP_MPU_MAXVDD_EN_WIDTH 0x1
1860#define OMAP54XX_VP_MPU_MAXVDD_EN_MASK (1 << 2)
1861
1862/* Used by PRM_IRQSTATUS_MPU_2 */
1863#define OMAP54XX_VP_MPU_MAXVDD_ST_SHIFT 2
1864#define OMAP54XX_VP_MPU_MAXVDD_ST_WIDTH 0x1
1865#define OMAP54XX_VP_MPU_MAXVDD_ST_MASK (1 << 2)
1866
1867/* Used by PRM_IRQENABLE_MPU_2 */
1868#define OMAP54XX_VP_MPU_MINVDD_EN_SHIFT 1
1869#define OMAP54XX_VP_MPU_MINVDD_EN_WIDTH 0x1
1870#define OMAP54XX_VP_MPU_MINVDD_EN_MASK (1 << 1)
1871
1872/* Used by PRM_IRQSTATUS_MPU_2 */
1873#define OMAP54XX_VP_MPU_MINVDD_ST_SHIFT 1
1874#define OMAP54XX_VP_MPU_MINVDD_ST_WIDTH 0x1
1875#define OMAP54XX_VP_MPU_MINVDD_ST_MASK (1 << 1)
1876
1877/* Used by PRM_IRQENABLE_MPU_2 */
1878#define OMAP54XX_VP_MPU_NOSMPSACK_EN_SHIFT 3
1879#define OMAP54XX_VP_MPU_NOSMPSACK_EN_WIDTH 0x1
1880#define OMAP54XX_VP_MPU_NOSMPSACK_EN_MASK (1 << 3)
1881
1882/* Used by PRM_IRQSTATUS_MPU_2 */
1883#define OMAP54XX_VP_MPU_NOSMPSACK_ST_SHIFT 3
1884#define OMAP54XX_VP_MPU_NOSMPSACK_ST_WIDTH 0x1
1885#define OMAP54XX_VP_MPU_NOSMPSACK_ST_MASK (1 << 3)
1886
1887/* Used by PRM_IRQENABLE_MPU_2 */
1888#define OMAP54XX_VP_MPU_OPPCHANGEDONE_EN_SHIFT 0
1889#define OMAP54XX_VP_MPU_OPPCHANGEDONE_EN_WIDTH 0x1
1890#define OMAP54XX_VP_MPU_OPPCHANGEDONE_EN_MASK (1 << 0)
1891
1892/* Used by PRM_IRQSTATUS_MPU_2 */
1893#define OMAP54XX_VP_MPU_OPPCHANGEDONE_ST_SHIFT 0
1894#define OMAP54XX_VP_MPU_OPPCHANGEDONE_ST_WIDTH 0x1
1895#define OMAP54XX_VP_MPU_OPPCHANGEDONE_ST_MASK (1 << 0)
1896
1897/* Used by PRM_IRQENABLE_MPU_2 */
1898#define OMAP54XX_VP_MPU_TRANXDONE_EN_SHIFT 5
1899#define OMAP54XX_VP_MPU_TRANXDONE_EN_WIDTH 0x1
1900#define OMAP54XX_VP_MPU_TRANXDONE_EN_MASK (1 << 5)
1901
1902/* Used by PRM_IRQSTATUS_MPU_2 */
1903#define OMAP54XX_VP_MPU_TRANXDONE_ST_SHIFT 5
1904#define OMAP54XX_VP_MPU_TRANXDONE_ST_WIDTH 0x1
1905#define OMAP54XX_VP_MPU_TRANXDONE_ST_MASK (1 << 5)
1906
1907/* Used by PRM_SRAM_COUNT */
1908#define OMAP54XX_VSETUPCNT_VALUE_SHIFT 8
1909#define OMAP54XX_VSETUPCNT_VALUE_WIDTH 0x8
1910#define OMAP54XX_VSETUPCNT_VALUE_MASK (0xff << 8)
1911
1912/* Used by PRM_VP_CORE_VSTEPMAX, PRM_VP_MM_VSTEPMAX, PRM_VP_MPU_VSTEPMAX */
1913#define OMAP54XX_VSTEPMAX_SHIFT 0
1914#define OMAP54XX_VSTEPMAX_WIDTH 0x8
1915#define OMAP54XX_VSTEPMAX_MASK (0xff << 0)
1916
1917/* Used by PRM_VP_CORE_VSTEPMIN, PRM_VP_MM_VSTEPMIN, PRM_VP_MPU_VSTEPMIN */
1918#define OMAP54XX_VSTEPMIN_SHIFT 0
1919#define OMAP54XX_VSTEPMIN_WIDTH 0x8
1920#define OMAP54XX_VSTEPMIN_MASK (0xff << 0)
1921
1922/* Used by PM_DSS_DSS_WKDEP */
1923#define OMAP54XX_WKUPDEP_DISPC_DSP_SHIFT 2
1924#define OMAP54XX_WKUPDEP_DISPC_DSP_WIDTH 0x1
1925#define OMAP54XX_WKUPDEP_DISPC_DSP_MASK (1 << 2)
1926
1927/* Used by PM_DSS_DSS_WKDEP */
1928#define OMAP54XX_WKUPDEP_DISPC_IPU_SHIFT 1
1929#define OMAP54XX_WKUPDEP_DISPC_IPU_WIDTH 0x1
1930#define OMAP54XX_WKUPDEP_DISPC_IPU_MASK (1 << 1)
1931
1932/* Used by PM_DSS_DSS_WKDEP */
1933#define OMAP54XX_WKUPDEP_DISPC_MPU_SHIFT 0
1934#define OMAP54XX_WKUPDEP_DISPC_MPU_WIDTH 0x1
1935#define OMAP54XX_WKUPDEP_DISPC_MPU_MASK (1 << 0)
1936
1937/* Used by PM_DSS_DSS_WKDEP */
1938#define OMAP54XX_WKUPDEP_DISPC_SDMA_SHIFT 3
1939#define OMAP54XX_WKUPDEP_DISPC_SDMA_WIDTH 0x1
1940#define OMAP54XX_WKUPDEP_DISPC_SDMA_MASK (1 << 3)
1941
1942/* Used by PM_ABE_DMIC_WKDEP */
1943#define OMAP54XX_WKUPDEP_DMIC_DMA_DSP_SHIFT 6
1944#define OMAP54XX_WKUPDEP_DMIC_DMA_DSP_WIDTH 0x1
1945#define OMAP54XX_WKUPDEP_DMIC_DMA_DSP_MASK (1 << 6)
1946
1947/* Used by PM_ABE_DMIC_WKDEP */
1948#define OMAP54XX_WKUPDEP_DMIC_DMA_SDMA_SHIFT 7
1949#define OMAP54XX_WKUPDEP_DMIC_DMA_SDMA_WIDTH 0x1
1950#define OMAP54XX_WKUPDEP_DMIC_DMA_SDMA_MASK (1 << 7)
1951
1952/* Used by PM_ABE_DMIC_WKDEP */
1953#define OMAP54XX_WKUPDEP_DMIC_IRQ_DSP_SHIFT 2
1954#define OMAP54XX_WKUPDEP_DMIC_IRQ_DSP_WIDTH 0x1
1955#define OMAP54XX_WKUPDEP_DMIC_IRQ_DSP_MASK (1 << 2)
1956
1957/* Used by PM_ABE_DMIC_WKDEP */
1958#define OMAP54XX_WKUPDEP_DMIC_IRQ_MPU_SHIFT 0
1959#define OMAP54XX_WKUPDEP_DMIC_IRQ_MPU_WIDTH 0x1
1960#define OMAP54XX_WKUPDEP_DMIC_IRQ_MPU_MASK (1 << 0)
1961
1962/* Used by PM_DSS_DSS_WKDEP */
1963#define OMAP54XX_WKUPDEP_DSI1_A_DSP_SHIFT 6
1964#define OMAP54XX_WKUPDEP_DSI1_A_DSP_WIDTH 0x1
1965#define OMAP54XX_WKUPDEP_DSI1_A_DSP_MASK (1 << 6)
1966
1967/* Used by PM_DSS_DSS_WKDEP */
1968#define OMAP54XX_WKUPDEP_DSI1_A_IPU_SHIFT 5
1969#define OMAP54XX_WKUPDEP_DSI1_A_IPU_WIDTH 0x1
1970#define OMAP54XX_WKUPDEP_DSI1_A_IPU_MASK (1 << 5)
1971
1972/* Used by PM_DSS_DSS_WKDEP */
1973#define OMAP54XX_WKUPDEP_DSI1_A_MPU_SHIFT 4
1974#define OMAP54XX_WKUPDEP_DSI1_A_MPU_WIDTH 0x1
1975#define OMAP54XX_WKUPDEP_DSI1_A_MPU_MASK (1 << 4)
1976
1977/* Used by PM_DSS_DSS_WKDEP */
1978#define OMAP54XX_WKUPDEP_DSI1_A_SDMA_SHIFT 7
1979#define OMAP54XX_WKUPDEP_DSI1_A_SDMA_WIDTH 0x1
1980#define OMAP54XX_WKUPDEP_DSI1_A_SDMA_MASK (1 << 7)
1981
1982/* Used by PM_DSS_DSS_WKDEP */
1983#define OMAP54XX_WKUPDEP_DSI1_B_DSP_SHIFT 10
1984#define OMAP54XX_WKUPDEP_DSI1_B_DSP_WIDTH 0x1
1985#define OMAP54XX_WKUPDEP_DSI1_B_DSP_MASK (1 << 10)
1986
1987/* Used by PM_DSS_DSS_WKDEP */
1988#define OMAP54XX_WKUPDEP_DSI1_B_IPU_SHIFT 9
1989#define OMAP54XX_WKUPDEP_DSI1_B_IPU_WIDTH 0x1
1990#define OMAP54XX_WKUPDEP_DSI1_B_IPU_MASK (1 << 9)
1991
1992/* Used by PM_DSS_DSS_WKDEP */
1993#define OMAP54XX_WKUPDEP_DSI1_B_MPU_SHIFT 8
1994#define OMAP54XX_WKUPDEP_DSI1_B_MPU_WIDTH 0x1
1995#define OMAP54XX_WKUPDEP_DSI1_B_MPU_MASK (1 << 8)
1996
1997/* Used by PM_DSS_DSS_WKDEP */
1998#define OMAP54XX_WKUPDEP_DSI1_B_SDMA_SHIFT 11
1999#define OMAP54XX_WKUPDEP_DSI1_B_SDMA_WIDTH 0x1
2000#define OMAP54XX_WKUPDEP_DSI1_B_SDMA_MASK (1 << 11)
2001
2002/* Used by PM_DSS_DSS_WKDEP */
2003#define OMAP54XX_WKUPDEP_DSI1_C_DSP_SHIFT 17
2004#define OMAP54XX_WKUPDEP_DSI1_C_DSP_WIDTH 0x1
2005#define OMAP54XX_WKUPDEP_DSI1_C_DSP_MASK (1 << 17)
2006
2007/* Used by PM_DSS_DSS_WKDEP */
2008#define OMAP54XX_WKUPDEP_DSI1_C_IPU_SHIFT 16
2009#define OMAP54XX_WKUPDEP_DSI1_C_IPU_WIDTH 0x1
2010#define OMAP54XX_WKUPDEP_DSI1_C_IPU_MASK (1 << 16)
2011
2012/* Used by PM_DSS_DSS_WKDEP */
2013#define OMAP54XX_WKUPDEP_DSI1_C_MPU_SHIFT 15
2014#define OMAP54XX_WKUPDEP_DSI1_C_MPU_WIDTH 0x1
2015#define OMAP54XX_WKUPDEP_DSI1_C_MPU_MASK (1 << 15)
2016
2017/* Used by PM_DSS_DSS_WKDEP */
2018#define OMAP54XX_WKUPDEP_DSI1_C_SDMA_SHIFT 18
2019#define OMAP54XX_WKUPDEP_DSI1_C_SDMA_WIDTH 0x1
2020#define OMAP54XX_WKUPDEP_DSI1_C_SDMA_MASK (1 << 18)
2021
2022/* Used by PM_WKUPAON_GPIO1_WKDEP */
2023#define OMAP54XX_WKUPDEP_GPIO1_IRQ1_IPU_SHIFT 1
2024#define OMAP54XX_WKUPDEP_GPIO1_IRQ1_IPU_WIDTH 0x1
2025#define OMAP54XX_WKUPDEP_GPIO1_IRQ1_IPU_MASK (1 << 1)
2026
2027/* Used by PM_WKUPAON_GPIO1_WKDEP */
2028#define OMAP54XX_WKUPDEP_GPIO1_IRQ1_MPU_SHIFT 0
2029#define OMAP54XX_WKUPDEP_GPIO1_IRQ1_MPU_WIDTH 0x1
2030#define OMAP54XX_WKUPDEP_GPIO1_IRQ1_MPU_MASK (1 << 0)
2031
2032/* Used by PM_WKUPAON_GPIO1_WKDEP */
2033#define OMAP54XX_WKUPDEP_GPIO1_IRQ2_DSP_SHIFT 6
2034#define OMAP54XX_WKUPDEP_GPIO1_IRQ2_DSP_WIDTH 0x1
2035#define OMAP54XX_WKUPDEP_GPIO1_IRQ2_DSP_MASK (1 << 6)
2036
2037/* Used by PM_L4PER_GPIO2_WKDEP */
2038#define OMAP54XX_WKUPDEP_GPIO2_IRQ1_IPU_SHIFT 1
2039#define OMAP54XX_WKUPDEP_GPIO2_IRQ1_IPU_WIDTH 0x1
2040#define OMAP54XX_WKUPDEP_GPIO2_IRQ1_IPU_MASK (1 << 1)
2041
2042/* Used by PM_L4PER_GPIO2_WKDEP */
2043#define OMAP54XX_WKUPDEP_GPIO2_IRQ1_MPU_SHIFT 0
2044#define OMAP54XX_WKUPDEP_GPIO2_IRQ1_MPU_WIDTH 0x1
2045#define OMAP54XX_WKUPDEP_GPIO2_IRQ1_MPU_MASK (1 << 0)
2046
2047/* Used by PM_L4PER_GPIO2_WKDEP */
2048#define OMAP54XX_WKUPDEP_GPIO2_IRQ2_DSP_SHIFT 6
2049#define OMAP54XX_WKUPDEP_GPIO2_IRQ2_DSP_WIDTH 0x1
2050#define OMAP54XX_WKUPDEP_GPIO2_IRQ2_DSP_MASK (1 << 6)
2051
2052/* Used by PM_L4PER_GPIO3_WKDEP */
2053#define OMAP54XX_WKUPDEP_GPIO3_IRQ1_MPU_SHIFT 0
2054#define OMAP54XX_WKUPDEP_GPIO3_IRQ1_MPU_WIDTH 0x1
2055#define OMAP54XX_WKUPDEP_GPIO3_IRQ1_MPU_MASK (1 << 0)
2056
2057/* Used by PM_L4PER_GPIO3_WKDEP */
2058#define OMAP54XX_WKUPDEP_GPIO3_IRQ2_DSP_SHIFT 6
2059#define OMAP54XX_WKUPDEP_GPIO3_IRQ2_DSP_WIDTH 0x1
2060#define OMAP54XX_WKUPDEP_GPIO3_IRQ2_DSP_MASK (1 << 6)
2061
2062/* Used by PM_L4PER_GPIO4_WKDEP */
2063#define OMAP54XX_WKUPDEP_GPIO4_IRQ1_MPU_SHIFT 0
2064#define OMAP54XX_WKUPDEP_GPIO4_IRQ1_MPU_WIDTH 0x1
2065#define OMAP54XX_WKUPDEP_GPIO4_IRQ1_MPU_MASK (1 << 0)
2066
2067/* Used by PM_L4PER_GPIO4_WKDEP */
2068#define OMAP54XX_WKUPDEP_GPIO4_IRQ2_DSP_SHIFT 6
2069#define OMAP54XX_WKUPDEP_GPIO4_IRQ2_DSP_WIDTH 0x1
2070#define OMAP54XX_WKUPDEP_GPIO4_IRQ2_DSP_MASK (1 << 6)
2071
2072/* Used by PM_L4PER_GPIO5_WKDEP */
2073#define OMAP54XX_WKUPDEP_GPIO5_IRQ1_MPU_SHIFT 0
2074#define OMAP54XX_WKUPDEP_GPIO5_IRQ1_MPU_WIDTH 0x1
2075#define OMAP54XX_WKUPDEP_GPIO5_IRQ1_MPU_MASK (1 << 0)
2076
2077/* Used by PM_L4PER_GPIO5_WKDEP */
2078#define OMAP54XX_WKUPDEP_GPIO5_IRQ2_DSP_SHIFT 6
2079#define OMAP54XX_WKUPDEP_GPIO5_IRQ2_DSP_WIDTH 0x1
2080#define OMAP54XX_WKUPDEP_GPIO5_IRQ2_DSP_MASK (1 << 6)
2081
2082/* Used by PM_L4PER_GPIO6_WKDEP */
2083#define OMAP54XX_WKUPDEP_GPIO6_IRQ1_MPU_SHIFT 0
2084#define OMAP54XX_WKUPDEP_GPIO6_IRQ1_MPU_WIDTH 0x1
2085#define OMAP54XX_WKUPDEP_GPIO6_IRQ1_MPU_MASK (1 << 0)
2086
2087/* Used by PM_L4PER_GPIO6_WKDEP */
2088#define OMAP54XX_WKUPDEP_GPIO6_IRQ2_DSP_SHIFT 6
2089#define OMAP54XX_WKUPDEP_GPIO6_IRQ2_DSP_WIDTH 0x1
2090#define OMAP54XX_WKUPDEP_GPIO6_IRQ2_DSP_MASK (1 << 6)
2091
2092/* Used by PM_L4PER_GPIO7_WKDEP */
2093#define OMAP54XX_WKUPDEP_GPIO7_IRQ1_MPU_SHIFT 0
2094#define OMAP54XX_WKUPDEP_GPIO7_IRQ1_MPU_WIDTH 0x1
2095#define OMAP54XX_WKUPDEP_GPIO7_IRQ1_MPU_MASK (1 << 0)
2096
2097/* Used by PM_L4PER_GPIO8_WKDEP */
2098#define OMAP54XX_WKUPDEP_GPIO8_IRQ1_MPU_SHIFT 0
2099#define OMAP54XX_WKUPDEP_GPIO8_IRQ1_MPU_WIDTH 0x1
2100#define OMAP54XX_WKUPDEP_GPIO8_IRQ1_MPU_MASK (1 << 0)
2101
2102/* Used by PM_DSS_DSS_WKDEP */
2103#define OMAP54XX_WKUPDEP_HDMIDMA_SDMA_SHIFT 19
2104#define OMAP54XX_WKUPDEP_HDMIDMA_SDMA_WIDTH 0x1
2105#define OMAP54XX_WKUPDEP_HDMIDMA_SDMA_MASK (1 << 19)
2106
2107/* Used by PM_DSS_DSS_WKDEP */
2108#define OMAP54XX_WKUPDEP_HDMIIRQ_DSP_SHIFT 14
2109#define OMAP54XX_WKUPDEP_HDMIIRQ_DSP_WIDTH 0x1
2110#define OMAP54XX_WKUPDEP_HDMIIRQ_DSP_MASK (1 << 14)
2111
2112/* Used by PM_DSS_DSS_WKDEP */
2113#define OMAP54XX_WKUPDEP_HDMIIRQ_IPU_SHIFT 13
2114#define OMAP54XX_WKUPDEP_HDMIIRQ_IPU_WIDTH 0x1
2115#define OMAP54XX_WKUPDEP_HDMIIRQ_IPU_MASK (1 << 13)
2116
2117/* Used by PM_DSS_DSS_WKDEP */
2118#define OMAP54XX_WKUPDEP_HDMIIRQ_MPU_SHIFT 12
2119#define OMAP54XX_WKUPDEP_HDMIIRQ_MPU_WIDTH 0x1
2120#define OMAP54XX_WKUPDEP_HDMIIRQ_MPU_MASK (1 << 12)
2121
2122/* Used by PM_L3INIT_HSI_WKDEP */
2123#define OMAP54XX_WKUPDEP_HSI_DSP_DSP_SHIFT 6
2124#define OMAP54XX_WKUPDEP_HSI_DSP_DSP_WIDTH 0x1
2125#define OMAP54XX_WKUPDEP_HSI_DSP_DSP_MASK (1 << 6)
2126
2127/* Used by PM_L3INIT_HSI_WKDEP */
2128#define OMAP54XX_WKUPDEP_HSI_MCU_IPU_SHIFT 1
2129#define OMAP54XX_WKUPDEP_HSI_MCU_IPU_WIDTH 0x1
2130#define OMAP54XX_WKUPDEP_HSI_MCU_IPU_MASK (1 << 1)
2131
2132/* Used by PM_L3INIT_HSI_WKDEP */
2133#define OMAP54XX_WKUPDEP_HSI_MCU_MPU_SHIFT 0
2134#define OMAP54XX_WKUPDEP_HSI_MCU_MPU_WIDTH 0x1
2135#define OMAP54XX_WKUPDEP_HSI_MCU_MPU_MASK (1 << 0)
2136
2137/* Used by PM_L4PER_I2C1_WKDEP */
2138#define OMAP54XX_WKUPDEP_I2C1_DMA_SDMA_SHIFT 7
2139#define OMAP54XX_WKUPDEP_I2C1_DMA_SDMA_WIDTH 0x1
2140#define OMAP54XX_WKUPDEP_I2C1_DMA_SDMA_MASK (1 << 7)
2141
2142/* Used by PM_L4PER_I2C1_WKDEP */
2143#define OMAP54XX_WKUPDEP_I2C1_IRQ_IPU_SHIFT 1
2144#define OMAP54XX_WKUPDEP_I2C1_IRQ_IPU_WIDTH 0x1
2145#define OMAP54XX_WKUPDEP_I2C1_IRQ_IPU_MASK (1 << 1)
2146
2147/* Used by PM_L4PER_I2C1_WKDEP */
2148#define OMAP54XX_WKUPDEP_I2C1_IRQ_MPU_SHIFT 0
2149#define OMAP54XX_WKUPDEP_I2C1_IRQ_MPU_WIDTH 0x1
2150#define OMAP54XX_WKUPDEP_I2C1_IRQ_MPU_MASK (1 << 0)
2151
2152/* Used by PM_L4PER_I2C2_WKDEP */
2153#define OMAP54XX_WKUPDEP_I2C2_DMA_SDMA_SHIFT 7
2154#define OMAP54XX_WKUPDEP_I2C2_DMA_SDMA_WIDTH 0x1
2155#define OMAP54XX_WKUPDEP_I2C2_DMA_SDMA_MASK (1 << 7)
2156
2157/* Used by PM_L4PER_I2C2_WKDEP */
2158#define OMAP54XX_WKUPDEP_I2C2_IRQ_IPU_SHIFT 1
2159#define OMAP54XX_WKUPDEP_I2C2_IRQ_IPU_WIDTH 0x1
2160#define OMAP54XX_WKUPDEP_I2C2_IRQ_IPU_MASK (1 << 1)
2161
2162/* Used by PM_L4PER_I2C2_WKDEP */
2163#define OMAP54XX_WKUPDEP_I2C2_IRQ_MPU_SHIFT 0
2164#define OMAP54XX_WKUPDEP_I2C2_IRQ_MPU_WIDTH 0x1
2165#define OMAP54XX_WKUPDEP_I2C2_IRQ_MPU_MASK (1 << 0)
2166
2167/* Used by PM_L4PER_I2C3_WKDEP */
2168#define OMAP54XX_WKUPDEP_I2C3_DMA_SDMA_SHIFT 7
2169#define OMAP54XX_WKUPDEP_I2C3_DMA_SDMA_WIDTH 0x1
2170#define OMAP54XX_WKUPDEP_I2C3_DMA_SDMA_MASK (1 << 7)
2171
2172/* Used by PM_L4PER_I2C3_WKDEP */
2173#define OMAP54XX_WKUPDEP_I2C3_IRQ_IPU_SHIFT 1
2174#define OMAP54XX_WKUPDEP_I2C3_IRQ_IPU_WIDTH 0x1
2175#define OMAP54XX_WKUPDEP_I2C3_IRQ_IPU_MASK (1 << 1)
2176
2177/* Used by PM_L4PER_I2C3_WKDEP */
2178#define OMAP54XX_WKUPDEP_I2C3_IRQ_MPU_SHIFT 0
2179#define OMAP54XX_WKUPDEP_I2C3_IRQ_MPU_WIDTH 0x1
2180#define OMAP54XX_WKUPDEP_I2C3_IRQ_MPU_MASK (1 << 0)
2181
2182/* Used by PM_L4PER_I2C4_WKDEP */
2183#define OMAP54XX_WKUPDEP_I2C4_DMA_SDMA_SHIFT 7
2184#define OMAP54XX_WKUPDEP_I2C4_DMA_SDMA_WIDTH 0x1
2185#define OMAP54XX_WKUPDEP_I2C4_DMA_SDMA_MASK (1 << 7)
2186
2187/* Used by PM_L4PER_I2C4_WKDEP */
2188#define OMAP54XX_WKUPDEP_I2C4_IRQ_IPU_SHIFT 1
2189#define OMAP54XX_WKUPDEP_I2C4_IRQ_IPU_WIDTH 0x1
2190#define OMAP54XX_WKUPDEP_I2C4_IRQ_IPU_MASK (1 << 1)
2191
2192/* Used by PM_L4PER_I2C4_WKDEP */
2193#define OMAP54XX_WKUPDEP_I2C4_IRQ_MPU_SHIFT 0
2194#define OMAP54XX_WKUPDEP_I2C4_IRQ_MPU_WIDTH 0x1
2195#define OMAP54XX_WKUPDEP_I2C4_IRQ_MPU_MASK (1 << 0)
2196
2197/* Used by PM_L4PER_I2C5_WKDEP */
2198#define OMAP54XX_WKUPDEP_I2C5_IRQ_MPU_SHIFT 0
2199#define OMAP54XX_WKUPDEP_I2C5_IRQ_MPU_WIDTH 0x1
2200#define OMAP54XX_WKUPDEP_I2C5_IRQ_MPU_MASK (1 << 0)
2201
2202/* Used by PM_WKUPAON_KBD_WKDEP */
2203#define OMAP54XX_WKUPDEP_KBD_MPU_SHIFT 0
2204#define OMAP54XX_WKUPDEP_KBD_MPU_WIDTH 0x1
2205#define OMAP54XX_WKUPDEP_KBD_MPU_MASK (1 << 0)
2206
2207/* Used by PM_ABE_MCASP_WKDEP */
2208#define OMAP54XX_WKUPDEP_MCASP_DMA_DSP_SHIFT 6
2209#define OMAP54XX_WKUPDEP_MCASP_DMA_DSP_WIDTH 0x1
2210#define OMAP54XX_WKUPDEP_MCASP_DMA_DSP_MASK (1 << 6)
2211
2212/* Used by PM_ABE_MCASP_WKDEP */
2213#define OMAP54XX_WKUPDEP_MCASP_DMA_SDMA_SHIFT 7
2214#define OMAP54XX_WKUPDEP_MCASP_DMA_SDMA_WIDTH 0x1
2215#define OMAP54XX_WKUPDEP_MCASP_DMA_SDMA_MASK (1 << 7)
2216
2217/* Used by PM_ABE_MCASP_WKDEP */
2218#define OMAP54XX_WKUPDEP_MCASP_IRQ_DSP_SHIFT 2
2219#define OMAP54XX_WKUPDEP_MCASP_IRQ_DSP_WIDTH 0x1
2220#define OMAP54XX_WKUPDEP_MCASP_IRQ_DSP_MASK (1 << 2)
2221
2222/* Used by PM_ABE_MCASP_WKDEP */
2223#define OMAP54XX_WKUPDEP_MCASP_IRQ_MPU_SHIFT 0
2224#define OMAP54XX_WKUPDEP_MCASP_IRQ_MPU_WIDTH 0x1
2225#define OMAP54XX_WKUPDEP_MCASP_IRQ_MPU_MASK (1 << 0)
2226
2227/* Used by PM_ABE_MCBSP1_WKDEP */
2228#define OMAP54XX_WKUPDEP_MCBSP1_DSP_SHIFT 2
2229#define OMAP54XX_WKUPDEP_MCBSP1_DSP_WIDTH 0x1
2230#define OMAP54XX_WKUPDEP_MCBSP1_DSP_MASK (1 << 2)
2231
2232/* Used by PM_ABE_MCBSP1_WKDEP */
2233#define OMAP54XX_WKUPDEP_MCBSP1_MPU_SHIFT 0
2234#define OMAP54XX_WKUPDEP_MCBSP1_MPU_WIDTH 0x1
2235#define OMAP54XX_WKUPDEP_MCBSP1_MPU_MASK (1 << 0)
2236
2237/* Used by PM_ABE_MCBSP1_WKDEP */
2238#define OMAP54XX_WKUPDEP_MCBSP1_SDMA_SHIFT 3
2239#define OMAP54XX_WKUPDEP_MCBSP1_SDMA_WIDTH 0x1
2240#define OMAP54XX_WKUPDEP_MCBSP1_SDMA_MASK (1 << 3)
2241
2242/* Used by PM_ABE_MCBSP2_WKDEP */
2243#define OMAP54XX_WKUPDEP_MCBSP2_DSP_SHIFT 2
2244#define OMAP54XX_WKUPDEP_MCBSP2_DSP_WIDTH 0x1
2245#define OMAP54XX_WKUPDEP_MCBSP2_DSP_MASK (1 << 2)
2246
2247/* Used by PM_ABE_MCBSP2_WKDEP */
2248#define OMAP54XX_WKUPDEP_MCBSP2_MPU_SHIFT 0
2249#define OMAP54XX_WKUPDEP_MCBSP2_MPU_WIDTH 0x1
2250#define OMAP54XX_WKUPDEP_MCBSP2_MPU_MASK (1 << 0)
2251
2252/* Used by PM_ABE_MCBSP2_WKDEP */
2253#define OMAP54XX_WKUPDEP_MCBSP2_SDMA_SHIFT 3
2254#define OMAP54XX_WKUPDEP_MCBSP2_SDMA_WIDTH 0x1
2255#define OMAP54XX_WKUPDEP_MCBSP2_SDMA_MASK (1 << 3)
2256
2257/* Used by PM_ABE_MCBSP3_WKDEP */
2258#define OMAP54XX_WKUPDEP_MCBSP3_DSP_SHIFT 2
2259#define OMAP54XX_WKUPDEP_MCBSP3_DSP_WIDTH 0x1
2260#define OMAP54XX_WKUPDEP_MCBSP3_DSP_MASK (1 << 2)
2261
2262/* Used by PM_ABE_MCBSP3_WKDEP */
2263#define OMAP54XX_WKUPDEP_MCBSP3_MPU_SHIFT 0
2264#define OMAP54XX_WKUPDEP_MCBSP3_MPU_WIDTH 0x1
2265#define OMAP54XX_WKUPDEP_MCBSP3_MPU_MASK (1 << 0)
2266
2267/* Used by PM_ABE_MCBSP3_WKDEP */
2268#define OMAP54XX_WKUPDEP_MCBSP3_SDMA_SHIFT 3
2269#define OMAP54XX_WKUPDEP_MCBSP3_SDMA_WIDTH 0x1
2270#define OMAP54XX_WKUPDEP_MCBSP3_SDMA_MASK (1 << 3)
2271
2272/* Used by PM_ABE_MCPDM_WKDEP */
2273#define OMAP54XX_WKUPDEP_MCPDM_DMA_DSP_SHIFT 6
2274#define OMAP54XX_WKUPDEP_MCPDM_DMA_DSP_WIDTH 0x1
2275#define OMAP54XX_WKUPDEP_MCPDM_DMA_DSP_MASK (1 << 6)
2276
2277/* Used by PM_ABE_MCPDM_WKDEP */
2278#define OMAP54XX_WKUPDEP_MCPDM_DMA_SDMA_SHIFT 7
2279#define OMAP54XX_WKUPDEP_MCPDM_DMA_SDMA_WIDTH 0x1
2280#define OMAP54XX_WKUPDEP_MCPDM_DMA_SDMA_MASK (1 << 7)
2281
2282/* Used by PM_ABE_MCPDM_WKDEP */
2283#define OMAP54XX_WKUPDEP_MCPDM_IRQ_DSP_SHIFT 2
2284#define OMAP54XX_WKUPDEP_MCPDM_IRQ_DSP_WIDTH 0x1
2285#define OMAP54XX_WKUPDEP_MCPDM_IRQ_DSP_MASK (1 << 2)
2286
2287/* Used by PM_ABE_MCPDM_WKDEP */
2288#define OMAP54XX_WKUPDEP_MCPDM_IRQ_MPU_SHIFT 0
2289#define OMAP54XX_WKUPDEP_MCPDM_IRQ_MPU_WIDTH 0x1
2290#define OMAP54XX_WKUPDEP_MCPDM_IRQ_MPU_MASK (1 << 0)
2291
2292/* Used by PM_L4PER_MCSPI1_WKDEP */
2293#define OMAP54XX_WKUPDEP_MCSPI1_DSP_SHIFT 2
2294#define OMAP54XX_WKUPDEP_MCSPI1_DSP_WIDTH 0x1
2295#define OMAP54XX_WKUPDEP_MCSPI1_DSP_MASK (1 << 2)
2296
2297/* Used by PM_L4PER_MCSPI1_WKDEP */
2298#define OMAP54XX_WKUPDEP_MCSPI1_IPU_SHIFT 1
2299#define OMAP54XX_WKUPDEP_MCSPI1_IPU_WIDTH 0x1
2300#define OMAP54XX_WKUPDEP_MCSPI1_IPU_MASK (1 << 1)
2301
2302/* Used by PM_L4PER_MCSPI1_WKDEP */
2303#define OMAP54XX_WKUPDEP_MCSPI1_MPU_SHIFT 0
2304#define OMAP54XX_WKUPDEP_MCSPI1_MPU_WIDTH 0x1
2305#define OMAP54XX_WKUPDEP_MCSPI1_MPU_MASK (1 << 0)
2306
2307/* Used by PM_L4PER_MCSPI1_WKDEP */
2308#define OMAP54XX_WKUPDEP_MCSPI1_SDMA_SHIFT 3
2309#define OMAP54XX_WKUPDEP_MCSPI1_SDMA_WIDTH 0x1
2310#define OMAP54XX_WKUPDEP_MCSPI1_SDMA_MASK (1 << 3)
2311
2312/* Used by PM_L4PER_MCSPI2_WKDEP */
2313#define OMAP54XX_WKUPDEP_MCSPI2_IPU_SHIFT 1
2314#define OMAP54XX_WKUPDEP_MCSPI2_IPU_WIDTH 0x1
2315#define OMAP54XX_WKUPDEP_MCSPI2_IPU_MASK (1 << 1)
2316
2317/* Used by PM_L4PER_MCSPI2_WKDEP */
2318#define OMAP54XX_WKUPDEP_MCSPI2_MPU_SHIFT 0
2319#define OMAP54XX_WKUPDEP_MCSPI2_MPU_WIDTH 0x1
2320#define OMAP54XX_WKUPDEP_MCSPI2_MPU_MASK (1 << 0)
2321
2322/* Used by PM_L4PER_MCSPI2_WKDEP */
2323#define OMAP54XX_WKUPDEP_MCSPI2_SDMA_SHIFT 3
2324#define OMAP54XX_WKUPDEP_MCSPI2_SDMA_WIDTH 0x1
2325#define OMAP54XX_WKUPDEP_MCSPI2_SDMA_MASK (1 << 3)
2326
2327/* Used by PM_L4PER_MCSPI3_WKDEP */
2328#define OMAP54XX_WKUPDEP_MCSPI3_MPU_SHIFT 0
2329#define OMAP54XX_WKUPDEP_MCSPI3_MPU_WIDTH 0x1
2330#define OMAP54XX_WKUPDEP_MCSPI3_MPU_MASK (1 << 0)
2331
2332/* Used by PM_L4PER_MCSPI3_WKDEP */
2333#define OMAP54XX_WKUPDEP_MCSPI3_SDMA_SHIFT 3
2334#define OMAP54XX_WKUPDEP_MCSPI3_SDMA_WIDTH 0x1
2335#define OMAP54XX_WKUPDEP_MCSPI3_SDMA_MASK (1 << 3)
2336
2337/* Used by PM_L4PER_MCSPI4_WKDEP */
2338#define OMAP54XX_WKUPDEP_MCSPI4_MPU_SHIFT 0
2339#define OMAP54XX_WKUPDEP_MCSPI4_MPU_WIDTH 0x1
2340#define OMAP54XX_WKUPDEP_MCSPI4_MPU_MASK (1 << 0)
2341
2342/* Used by PM_L4PER_MCSPI4_WKDEP */
2343#define OMAP54XX_WKUPDEP_MCSPI4_SDMA_SHIFT 3
2344#define OMAP54XX_WKUPDEP_MCSPI4_SDMA_WIDTH 0x1
2345#define OMAP54XX_WKUPDEP_MCSPI4_SDMA_MASK (1 << 3)
2346
2347/* Used by PM_L3INIT_MMC1_WKDEP */
2348#define OMAP54XX_WKUPDEP_MMC1_DSP_SHIFT 2
2349#define OMAP54XX_WKUPDEP_MMC1_DSP_WIDTH 0x1
2350#define OMAP54XX_WKUPDEP_MMC1_DSP_MASK (1 << 2)
2351
2352/* Used by PM_L3INIT_MMC1_WKDEP */
2353#define OMAP54XX_WKUPDEP_MMC1_IPU_SHIFT 1
2354#define OMAP54XX_WKUPDEP_MMC1_IPU_WIDTH 0x1
2355#define OMAP54XX_WKUPDEP_MMC1_IPU_MASK (1 << 1)
2356
2357/* Used by PM_L3INIT_MMC1_WKDEP */
2358#define OMAP54XX_WKUPDEP_MMC1_MPU_SHIFT 0
2359#define OMAP54XX_WKUPDEP_MMC1_MPU_WIDTH 0x1
2360#define OMAP54XX_WKUPDEP_MMC1_MPU_MASK (1 << 0)
2361
2362/* Used by PM_L3INIT_MMC1_WKDEP */
2363#define OMAP54XX_WKUPDEP_MMC1_SDMA_SHIFT 3
2364#define OMAP54XX_WKUPDEP_MMC1_SDMA_WIDTH 0x1
2365#define OMAP54XX_WKUPDEP_MMC1_SDMA_MASK (1 << 3)
2366
2367/* Used by PM_L3INIT_MMC2_WKDEP */
2368#define OMAP54XX_WKUPDEP_MMC2_DSP_SHIFT 2
2369#define OMAP54XX_WKUPDEP_MMC2_DSP_WIDTH 0x1
2370#define OMAP54XX_WKUPDEP_MMC2_DSP_MASK (1 << 2)
2371
2372/* Used by PM_L3INIT_MMC2_WKDEP */
2373#define OMAP54XX_WKUPDEP_MMC2_IPU_SHIFT 1
2374#define OMAP54XX_WKUPDEP_MMC2_IPU_WIDTH 0x1
2375#define OMAP54XX_WKUPDEP_MMC2_IPU_MASK (1 << 1)
2376
2377/* Used by PM_L3INIT_MMC2_WKDEP */
2378#define OMAP54XX_WKUPDEP_MMC2_MPU_SHIFT 0
2379#define OMAP54XX_WKUPDEP_MMC2_MPU_WIDTH 0x1
2380#define OMAP54XX_WKUPDEP_MMC2_MPU_MASK (1 << 0)
2381
2382/* Used by PM_L3INIT_MMC2_WKDEP */
2383#define OMAP54XX_WKUPDEP_MMC2_SDMA_SHIFT 3
2384#define OMAP54XX_WKUPDEP_MMC2_SDMA_WIDTH 0x1
2385#define OMAP54XX_WKUPDEP_MMC2_SDMA_MASK (1 << 3)
2386
2387/* Used by PM_L4PER_MMC3_WKDEP */
2388#define OMAP54XX_WKUPDEP_MMC3_IPU_SHIFT 1
2389#define OMAP54XX_WKUPDEP_MMC3_IPU_WIDTH 0x1
2390#define OMAP54XX_WKUPDEP_MMC3_IPU_MASK (1 << 1)
2391
2392/* Used by PM_L4PER_MMC3_WKDEP */
2393#define OMAP54XX_WKUPDEP_MMC3_MPU_SHIFT 0
2394#define OMAP54XX_WKUPDEP_MMC3_MPU_WIDTH 0x1
2395#define OMAP54XX_WKUPDEP_MMC3_MPU_MASK (1 << 0)
2396
2397/* Used by PM_L4PER_MMC3_WKDEP */
2398#define OMAP54XX_WKUPDEP_MMC3_SDMA_SHIFT 3
2399#define OMAP54XX_WKUPDEP_MMC3_SDMA_WIDTH 0x1
2400#define OMAP54XX_WKUPDEP_MMC3_SDMA_MASK (1 << 3)
2401
2402/* Used by PM_L4PER_MMC4_WKDEP */
2403#define OMAP54XX_WKUPDEP_MMC4_MPU_SHIFT 0
2404#define OMAP54XX_WKUPDEP_MMC4_MPU_WIDTH 0x1
2405#define OMAP54XX_WKUPDEP_MMC4_MPU_MASK (1 << 0)
2406
2407/* Used by PM_L4PER_MMC4_WKDEP */
2408#define OMAP54XX_WKUPDEP_MMC4_SDMA_SHIFT 3
2409#define OMAP54XX_WKUPDEP_MMC4_SDMA_WIDTH 0x1
2410#define OMAP54XX_WKUPDEP_MMC4_SDMA_MASK (1 << 3)
2411
2412/* Used by PM_L4PER_MMC5_WKDEP */
2413#define OMAP54XX_WKUPDEP_MMC5_MPU_SHIFT 0
2414#define OMAP54XX_WKUPDEP_MMC5_MPU_WIDTH 0x1
2415#define OMAP54XX_WKUPDEP_MMC5_MPU_MASK (1 << 0)
2416
2417/* Used by PM_L4PER_MMC5_WKDEP */
2418#define OMAP54XX_WKUPDEP_MMC5_SDMA_SHIFT 3
2419#define OMAP54XX_WKUPDEP_MMC5_SDMA_WIDTH 0x1
2420#define OMAP54XX_WKUPDEP_MMC5_SDMA_MASK (1 << 3)
2421
2422/* Used by PM_L3INIT_SATA_WKDEP */
2423#define OMAP54XX_WKUPDEP_SATA_MPU_SHIFT 0
2424#define OMAP54XX_WKUPDEP_SATA_MPU_WIDTH 0x1
2425#define OMAP54XX_WKUPDEP_SATA_MPU_MASK (1 << 0)
2426
2427/* Used by PM_ABE_SLIMBUS1_WKDEP */
2428#define OMAP54XX_WKUPDEP_SLIMBUS1_DMA_DSP_SHIFT 6
2429#define OMAP54XX_WKUPDEP_SLIMBUS1_DMA_DSP_WIDTH 0x1
2430#define OMAP54XX_WKUPDEP_SLIMBUS1_DMA_DSP_MASK (1 << 6)
2431
2432/* Used by PM_ABE_SLIMBUS1_WKDEP */
2433#define OMAP54XX_WKUPDEP_SLIMBUS1_DMA_SDMA_SHIFT 7
2434#define OMAP54XX_WKUPDEP_SLIMBUS1_DMA_SDMA_WIDTH 0x1
2435#define OMAP54XX_WKUPDEP_SLIMBUS1_DMA_SDMA_MASK (1 << 7)
2436
2437/* Used by PM_ABE_SLIMBUS1_WKDEP */
2438#define OMAP54XX_WKUPDEP_SLIMBUS1_IRQ_DSP_SHIFT 2
2439#define OMAP54XX_WKUPDEP_SLIMBUS1_IRQ_DSP_WIDTH 0x1
2440#define OMAP54XX_WKUPDEP_SLIMBUS1_IRQ_DSP_MASK (1 << 2)
2441
2442/* Used by PM_ABE_SLIMBUS1_WKDEP */
2443#define OMAP54XX_WKUPDEP_SLIMBUS1_IRQ_MPU_SHIFT 0
2444#define OMAP54XX_WKUPDEP_SLIMBUS1_IRQ_MPU_WIDTH 0x1
2445#define OMAP54XX_WKUPDEP_SLIMBUS1_IRQ_MPU_MASK (1 << 0)
2446
2447/* Used by PM_COREAON_SMARTREFLEX_CORE_WKDEP */
2448#define OMAP54XX_WKUPDEP_SMARTREFLEX_CORE_IPU_SHIFT 1
2449#define OMAP54XX_WKUPDEP_SMARTREFLEX_CORE_IPU_WIDTH 0x1
2450#define OMAP54XX_WKUPDEP_SMARTREFLEX_CORE_IPU_MASK (1 << 1)
2451
2452/* Used by PM_COREAON_SMARTREFLEX_CORE_WKDEP */
2453#define OMAP54XX_WKUPDEP_SMARTREFLEX_CORE_MPU_SHIFT 0
2454#define OMAP54XX_WKUPDEP_SMARTREFLEX_CORE_MPU_WIDTH 0x1
2455#define OMAP54XX_WKUPDEP_SMARTREFLEX_CORE_MPU_MASK (1 << 0)
2456
2457/* Used by PM_COREAON_SMARTREFLEX_MM_WKDEP */
2458#define OMAP54XX_WKUPDEP_SMARTREFLEX_MM_MPU_SHIFT 0
2459#define OMAP54XX_WKUPDEP_SMARTREFLEX_MM_MPU_WIDTH 0x1
2460#define OMAP54XX_WKUPDEP_SMARTREFLEX_MM_MPU_MASK (1 << 0)
2461
2462/* Used by PM_COREAON_SMARTREFLEX_MPU_WKDEP */
2463#define OMAP54XX_WKUPDEP_SMARTREFLEX_MPU_MPU_SHIFT 0
2464#define OMAP54XX_WKUPDEP_SMARTREFLEX_MPU_MPU_WIDTH 0x1
2465#define OMAP54XX_WKUPDEP_SMARTREFLEX_MPU_MPU_MASK (1 << 0)
2466
2467/* Used by PM_L4PER_TIMER10_WKDEP */
2468#define OMAP54XX_WKUPDEP_TIMER10_MPU_SHIFT 0
2469#define OMAP54XX_WKUPDEP_TIMER10_MPU_WIDTH 0x1
2470#define OMAP54XX_WKUPDEP_TIMER10_MPU_MASK (1 << 0)
2471
2472/* Used by PM_L4PER_TIMER11_WKDEP */
2473#define OMAP54XX_WKUPDEP_TIMER11_IPU_SHIFT 1
2474#define OMAP54XX_WKUPDEP_TIMER11_IPU_WIDTH 0x1
2475#define OMAP54XX_WKUPDEP_TIMER11_IPU_MASK (1 << 1)
2476
2477/* Used by PM_L4PER_TIMER11_WKDEP */
2478#define OMAP54XX_WKUPDEP_TIMER11_MPU_SHIFT 0
2479#define OMAP54XX_WKUPDEP_TIMER11_MPU_WIDTH 0x1
2480#define OMAP54XX_WKUPDEP_TIMER11_MPU_MASK (1 << 0)
2481
2482/* Used by PM_WKUPAON_TIMER12_WKDEP */
2483#define OMAP54XX_WKUPDEP_TIMER12_MPU_SHIFT 0
2484#define OMAP54XX_WKUPDEP_TIMER12_MPU_WIDTH 0x1
2485#define OMAP54XX_WKUPDEP_TIMER12_MPU_MASK (1 << 0)
2486
2487/* Used by PM_WKUPAON_TIMER1_WKDEP */
2488#define OMAP54XX_WKUPDEP_TIMER1_MPU_SHIFT 0
2489#define OMAP54XX_WKUPDEP_TIMER1_MPU_WIDTH 0x1
2490#define OMAP54XX_WKUPDEP_TIMER1_MPU_MASK (1 << 0)
2491
2492/* Used by PM_L4PER_TIMER2_WKDEP */
2493#define OMAP54XX_WKUPDEP_TIMER2_MPU_SHIFT 0
2494#define OMAP54XX_WKUPDEP_TIMER2_MPU_WIDTH 0x1
2495#define OMAP54XX_WKUPDEP_TIMER2_MPU_MASK (1 << 0)
2496
2497/* Used by PM_L4PER_TIMER3_WKDEP */
2498#define OMAP54XX_WKUPDEP_TIMER3_IPU_SHIFT 1
2499#define OMAP54XX_WKUPDEP_TIMER3_IPU_WIDTH 0x1
2500#define OMAP54XX_WKUPDEP_TIMER3_IPU_MASK (1 << 1)
2501
2502/* Used by PM_L4PER_TIMER3_WKDEP */
2503#define OMAP54XX_WKUPDEP_TIMER3_MPU_SHIFT 0
2504#define OMAP54XX_WKUPDEP_TIMER3_MPU_WIDTH 0x1
2505#define OMAP54XX_WKUPDEP_TIMER3_MPU_MASK (1 << 0)
2506
2507/* Used by PM_L4PER_TIMER4_WKDEP */
2508#define OMAP54XX_WKUPDEP_TIMER4_IPU_SHIFT 1
2509#define OMAP54XX_WKUPDEP_TIMER4_IPU_WIDTH 0x1
2510#define OMAP54XX_WKUPDEP_TIMER4_IPU_MASK (1 << 1)
2511
2512/* Used by PM_L4PER_TIMER4_WKDEP */
2513#define OMAP54XX_WKUPDEP_TIMER4_MPU_SHIFT 0
2514#define OMAP54XX_WKUPDEP_TIMER4_MPU_WIDTH 0x1
2515#define OMAP54XX_WKUPDEP_TIMER4_MPU_MASK (1 << 0)
2516
2517/* Used by PM_ABE_TIMER5_WKDEP */
2518#define OMAP54XX_WKUPDEP_TIMER5_DSP_SHIFT 2
2519#define OMAP54XX_WKUPDEP_TIMER5_DSP_WIDTH 0x1
2520#define OMAP54XX_WKUPDEP_TIMER5_DSP_MASK (1 << 2)
2521
2522/* Used by PM_ABE_TIMER5_WKDEP */
2523#define OMAP54XX_WKUPDEP_TIMER5_MPU_SHIFT 0
2524#define OMAP54XX_WKUPDEP_TIMER5_MPU_WIDTH 0x1
2525#define OMAP54XX_WKUPDEP_TIMER5_MPU_MASK (1 << 0)
2526
2527/* Used by PM_ABE_TIMER6_WKDEP */
2528#define OMAP54XX_WKUPDEP_TIMER6_DSP_SHIFT 2
2529#define OMAP54XX_WKUPDEP_TIMER6_DSP_WIDTH 0x1
2530#define OMAP54XX_WKUPDEP_TIMER6_DSP_MASK (1 << 2)
2531
2532/* Used by PM_ABE_TIMER6_WKDEP */
2533#define OMAP54XX_WKUPDEP_TIMER6_MPU_SHIFT 0
2534#define OMAP54XX_WKUPDEP_TIMER6_MPU_WIDTH 0x1
2535#define OMAP54XX_WKUPDEP_TIMER6_MPU_MASK (1 << 0)
2536
2537/* Used by PM_ABE_TIMER7_WKDEP */
2538#define OMAP54XX_WKUPDEP_TIMER7_DSP_SHIFT 2
2539#define OMAP54XX_WKUPDEP_TIMER7_DSP_WIDTH 0x1
2540#define OMAP54XX_WKUPDEP_TIMER7_DSP_MASK (1 << 2)
2541
2542/* Used by PM_ABE_TIMER7_WKDEP */
2543#define OMAP54XX_WKUPDEP_TIMER7_MPU_SHIFT 0
2544#define OMAP54XX_WKUPDEP_TIMER7_MPU_WIDTH 0x1
2545#define OMAP54XX_WKUPDEP_TIMER7_MPU_MASK (1 << 0)
2546
2547/* Used by PM_ABE_TIMER8_WKDEP */
2548#define OMAP54XX_WKUPDEP_TIMER8_DSP_SHIFT 2
2549#define OMAP54XX_WKUPDEP_TIMER8_DSP_WIDTH 0x1
2550#define OMAP54XX_WKUPDEP_TIMER8_DSP_MASK (1 << 2)
2551
2552/* Used by PM_ABE_TIMER8_WKDEP */
2553#define OMAP54XX_WKUPDEP_TIMER8_MPU_SHIFT 0
2554#define OMAP54XX_WKUPDEP_TIMER8_MPU_WIDTH 0x1
2555#define OMAP54XX_WKUPDEP_TIMER8_MPU_MASK (1 << 0)
2556
2557/* Used by PM_L4PER_TIMER9_WKDEP */
2558#define OMAP54XX_WKUPDEP_TIMER9_IPU_SHIFT 1
2559#define OMAP54XX_WKUPDEP_TIMER9_IPU_WIDTH 0x1
2560#define OMAP54XX_WKUPDEP_TIMER9_IPU_MASK (1 << 1)
2561
2562/* Used by PM_L4PER_TIMER9_WKDEP */
2563#define OMAP54XX_WKUPDEP_TIMER9_MPU_SHIFT 0
2564#define OMAP54XX_WKUPDEP_TIMER9_MPU_WIDTH 0x1
2565#define OMAP54XX_WKUPDEP_TIMER9_MPU_MASK (1 << 0)
2566
2567/* Used by PM_L4PER_UART1_WKDEP */
2568#define OMAP54XX_WKUPDEP_UART1_MPU_SHIFT 0
2569#define OMAP54XX_WKUPDEP_UART1_MPU_WIDTH 0x1
2570#define OMAP54XX_WKUPDEP_UART1_MPU_MASK (1 << 0)
2571
2572/* Used by PM_L4PER_UART1_WKDEP */
2573#define OMAP54XX_WKUPDEP_UART1_SDMA_SHIFT 3
2574#define OMAP54XX_WKUPDEP_UART1_SDMA_WIDTH 0x1
2575#define OMAP54XX_WKUPDEP_UART1_SDMA_MASK (1 << 3)
2576
2577/* Used by PM_L4PER_UART2_WKDEP */
2578#define OMAP54XX_WKUPDEP_UART2_MPU_SHIFT 0
2579#define OMAP54XX_WKUPDEP_UART2_MPU_WIDTH 0x1
2580#define OMAP54XX_WKUPDEP_UART2_MPU_MASK (1 << 0)
2581
2582/* Used by PM_L4PER_UART2_WKDEP */
2583#define OMAP54XX_WKUPDEP_UART2_SDMA_SHIFT 3
2584#define OMAP54XX_WKUPDEP_UART2_SDMA_WIDTH 0x1
2585#define OMAP54XX_WKUPDEP_UART2_SDMA_MASK (1 << 3)
2586
2587/* Used by PM_L4PER_UART3_WKDEP */
2588#define OMAP54XX_WKUPDEP_UART3_DSP_SHIFT 2
2589#define OMAP54XX_WKUPDEP_UART3_DSP_WIDTH 0x1
2590#define OMAP54XX_WKUPDEP_UART3_DSP_MASK (1 << 2)
2591
2592/* Used by PM_L4PER_UART3_WKDEP */
2593#define OMAP54XX_WKUPDEP_UART3_IPU_SHIFT 1
2594#define OMAP54XX_WKUPDEP_UART3_IPU_WIDTH 0x1
2595#define OMAP54XX_WKUPDEP_UART3_IPU_MASK (1 << 1)
2596
2597/* Used by PM_L4PER_UART3_WKDEP */
2598#define OMAP54XX_WKUPDEP_UART3_MPU_SHIFT 0
2599#define OMAP54XX_WKUPDEP_UART3_MPU_WIDTH 0x1
2600#define OMAP54XX_WKUPDEP_UART3_MPU_MASK (1 << 0)
2601
2602/* Used by PM_L4PER_UART3_WKDEP */
2603#define OMAP54XX_WKUPDEP_UART3_SDMA_SHIFT 3
2604#define OMAP54XX_WKUPDEP_UART3_SDMA_WIDTH 0x1
2605#define OMAP54XX_WKUPDEP_UART3_SDMA_MASK (1 << 3)
2606
2607/* Used by PM_L4PER_UART4_WKDEP */
2608#define OMAP54XX_WKUPDEP_UART4_MPU_SHIFT 0
2609#define OMAP54XX_WKUPDEP_UART4_MPU_WIDTH 0x1
2610#define OMAP54XX_WKUPDEP_UART4_MPU_MASK (1 << 0)
2611
2612/* Used by PM_L4PER_UART4_WKDEP */
2613#define OMAP54XX_WKUPDEP_UART4_SDMA_SHIFT 3
2614#define OMAP54XX_WKUPDEP_UART4_SDMA_WIDTH 0x1
2615#define OMAP54XX_WKUPDEP_UART4_SDMA_MASK (1 << 3)
2616
2617/* Used by PM_L4PER_UART5_WKDEP */
2618#define OMAP54XX_WKUPDEP_UART5_MPU_SHIFT 0
2619#define OMAP54XX_WKUPDEP_UART5_MPU_WIDTH 0x1
2620#define OMAP54XX_WKUPDEP_UART5_MPU_MASK (1 << 0)
2621
2622/* Used by PM_L4PER_UART5_WKDEP */
2623#define OMAP54XX_WKUPDEP_UART5_SDMA_SHIFT 3
2624#define OMAP54XX_WKUPDEP_UART5_SDMA_WIDTH 0x1
2625#define OMAP54XX_WKUPDEP_UART5_SDMA_MASK (1 << 3)
2626
2627/* Used by PM_L4PER_UART6_WKDEP */
2628#define OMAP54XX_WKUPDEP_UART6_MPU_SHIFT 0
2629#define OMAP54XX_WKUPDEP_UART6_MPU_WIDTH 0x1
2630#define OMAP54XX_WKUPDEP_UART6_MPU_MASK (1 << 0)
2631
2632/* Used by PM_L4PER_UART6_WKDEP */
2633#define OMAP54XX_WKUPDEP_UART6_SDMA_SHIFT 3
2634#define OMAP54XX_WKUPDEP_UART6_SDMA_WIDTH 0x1
2635#define OMAP54XX_WKUPDEP_UART6_SDMA_MASK (1 << 3)
2636
2637/* Used by PM_L3INIT_UNIPRO2_WKDEP */
2638#define OMAP54XX_WKUPDEP_UNIPRO2_MPU_SHIFT 0
2639#define OMAP54XX_WKUPDEP_UNIPRO2_MPU_WIDTH 0x1
2640#define OMAP54XX_WKUPDEP_UNIPRO2_MPU_MASK (1 << 0)
2641
2642/* Used by PM_L3INIT_USB_HOST_HS_WKDEP */
2643#define OMAP54XX_WKUPDEP_USB_HOST_HS_IPU_SHIFT 1
2644#define OMAP54XX_WKUPDEP_USB_HOST_HS_IPU_WIDTH 0x1
2645#define OMAP54XX_WKUPDEP_USB_HOST_HS_IPU_MASK (1 << 1)
2646
2647/* Used by PM_L3INIT_USB_HOST_HS_WKDEP */
2648#define OMAP54XX_WKUPDEP_USB_HOST_HS_MPU_SHIFT 0
2649#define OMAP54XX_WKUPDEP_USB_HOST_HS_MPU_WIDTH 0x1
2650#define OMAP54XX_WKUPDEP_USB_HOST_HS_MPU_MASK (1 << 0)
2651
2652/* Used by PM_L3INIT_USB_OTG_SS_WKDEP */
2653#define OMAP54XX_WKUPDEP_USB_OTG_SS_IPU_SHIFT 1
2654#define OMAP54XX_WKUPDEP_USB_OTG_SS_IPU_WIDTH 0x1
2655#define OMAP54XX_WKUPDEP_USB_OTG_SS_IPU_MASK (1 << 1)
2656
2657/* Used by PM_L3INIT_USB_OTG_SS_WKDEP */
2658#define OMAP54XX_WKUPDEP_USB_OTG_SS_MPU_SHIFT 0
2659#define OMAP54XX_WKUPDEP_USB_OTG_SS_MPU_WIDTH 0x1
2660#define OMAP54XX_WKUPDEP_USB_OTG_SS_MPU_MASK (1 << 0)
2661
2662/* Used by PM_L3INIT_USB_TLL_HS_WKDEP */
2663#define OMAP54XX_WKUPDEP_USB_TLL_HS_IPU_SHIFT 1
2664#define OMAP54XX_WKUPDEP_USB_TLL_HS_IPU_WIDTH 0x1
2665#define OMAP54XX_WKUPDEP_USB_TLL_HS_IPU_MASK (1 << 1)
2666
2667/* Used by PM_L3INIT_USB_TLL_HS_WKDEP */
2668#define OMAP54XX_WKUPDEP_USB_TLL_HS_MPU_SHIFT 0
2669#define OMAP54XX_WKUPDEP_USB_TLL_HS_MPU_WIDTH 0x1
2670#define OMAP54XX_WKUPDEP_USB_TLL_HS_MPU_MASK (1 << 0)
2671
2672/* Used by PM_WKUPAON_WD_TIMER2_WKDEP */
2673#define OMAP54XX_WKUPDEP_WD_TIMER2_MPU_SHIFT 0
2674#define OMAP54XX_WKUPDEP_WD_TIMER2_MPU_WIDTH 0x1
2675#define OMAP54XX_WKUPDEP_WD_TIMER2_MPU_MASK (1 << 0)
2676
2677/* Used by PM_ABE_WD_TIMER3_WKDEP */
2678#define OMAP54XX_WKUPDEP_WD_TIMER3_MPU_SHIFT 0
2679#define OMAP54XX_WKUPDEP_WD_TIMER3_MPU_WIDTH 0x1
2680#define OMAP54XX_WKUPDEP_WD_TIMER3_MPU_MASK (1 << 0)
2681
2682/* Used by PRM_IO_PMCTRL */
2683#define OMAP54XX_WUCLK_CTRL_SHIFT 8
2684#define OMAP54XX_WUCLK_CTRL_WIDTH 0x1
2685#define OMAP54XX_WUCLK_CTRL_MASK (1 << 8)
2686
2687/* Used by PRM_IO_PMCTRL */
2688#define OMAP54XX_WUCLK_STATUS_SHIFT 9
2689#define OMAP54XX_WUCLK_STATUS_WIDTH 0x1
2690#define OMAP54XX_WUCLK_STATUS_MASK (1 << 9)
2691
2692/* Used by REVISION_PRM */
2693#define OMAP54XX_X_MAJOR_SHIFT 8
2694#define OMAP54XX_X_MAJOR_WIDTH 0x3
2695#define OMAP54XX_X_MAJOR_MASK (0x7 << 8)
2696
2697/* Used by REVISION_PRM */
2698#define OMAP54XX_Y_MINOR_SHIFT 0
2699#define OMAP54XX_Y_MINOR_WIDTH 0x6
2700#define OMAP54XX_Y_MINOR_MASK (0x3f << 0)
2701#endif
diff --git a/arch/arm/mach-omap2/prm33xx.c b/arch/arm/mach-omap2/prm33xx.c
index 44c0d7216aa7..720440737744 100644
--- a/arch/arm/mach-omap2/prm33xx.c
+++ b/arch/arm/mach-omap2/prm33xx.c
@@ -320,6 +320,12 @@ static int am33xx_pwrdm_wait_transition(struct powerdomain *pwrdm)
320 return 0; 320 return 0;
321} 321}
322 322
323static int am33xx_check_vcvp(void)
324{
325 /* No VC/VP on am33xx devices */
326 return 0;
327}
328
323struct pwrdm_ops am33xx_pwrdm_operations = { 329struct pwrdm_ops am33xx_pwrdm_operations = {
324 .pwrdm_set_next_pwrst = am33xx_pwrdm_set_next_pwrst, 330 .pwrdm_set_next_pwrst = am33xx_pwrdm_set_next_pwrst,
325 .pwrdm_read_next_pwrst = am33xx_pwrdm_read_next_pwrst, 331 .pwrdm_read_next_pwrst = am33xx_pwrdm_read_next_pwrst,
@@ -335,4 +341,5 @@ struct pwrdm_ops am33xx_pwrdm_operations = {
335 .pwrdm_set_mem_onst = am33xx_pwrdm_set_mem_onst, 341 .pwrdm_set_mem_onst = am33xx_pwrdm_set_mem_onst,
336 .pwrdm_set_mem_retst = am33xx_pwrdm_set_mem_retst, 342 .pwrdm_set_mem_retst = am33xx_pwrdm_set_mem_retst,
337 .pwrdm_wait_transition = am33xx_pwrdm_wait_transition, 343 .pwrdm_wait_transition = am33xx_pwrdm_wait_transition,
344 .pwrdm_has_voltdm = am33xx_check_vcvp,
338}; 345};
diff --git a/arch/arm/mach-omap2/prm44xx.h b/arch/arm/mach-omap2/prm44xx.h
index 8ee1fbdec561..7db2422faa16 100644
--- a/arch/arm/mach-omap2/prm44xx.h
+++ b/arch/arm/mach-omap2/prm44xx.h
@@ -25,6 +25,7 @@
25#ifndef __ARCH_ARM_MACH_OMAP2_PRM44XX_H 25#ifndef __ARCH_ARM_MACH_OMAP2_PRM44XX_H
26#define __ARCH_ARM_MACH_OMAP2_PRM44XX_H 26#define __ARCH_ARM_MACH_OMAP2_PRM44XX_H
27 27
28#include "prm44xx_54xx.h"
28#include "prcm-common.h" 29#include "prcm-common.h"
29#include "prm.h" 30#include "prm.h"
30 31
@@ -744,36 +745,4 @@
744#define OMAP4_PRM_VC_ERRST_OFFSET 0x00f8 745#define OMAP4_PRM_VC_ERRST_OFFSET 0x00f8
745#define OMAP4430_PRM_VC_ERRST OMAP44XX_PRM_REGADDR(OMAP4430_PRM_DEVICE_INST, 0x00f8) 746#define OMAP4430_PRM_VC_ERRST OMAP44XX_PRM_REGADDR(OMAP4430_PRM_DEVICE_INST, 0x00f8)
746 747
747/* Function prototypes */
748# ifndef __ASSEMBLER__
749
750extern u32 omap4_prm_read_inst_reg(s16 inst, u16 idx);
751extern void omap4_prm_write_inst_reg(u32 val, s16 inst, u16 idx);
752extern u32 omap4_prm_rmw_inst_reg_bits(u32 mask, u32 bits, s16 inst, s16 idx);
753
754/* OMAP4-specific VP functions */
755u32 omap4_prm_vp_check_txdone(u8 vp_id);
756void omap4_prm_vp_clear_txdone(u8 vp_id);
757
758/*
759 * OMAP4 access functions for voltage controller (VC) and
760 * voltage proccessor (VP) in the PRM.
761 */
762extern u32 omap4_prm_vcvp_read(u8 offset);
763extern void omap4_prm_vcvp_write(u32 val, u8 offset);
764extern u32 omap4_prm_vcvp_rmw(u32 mask, u32 bits, u8 offset);
765
766extern void omap44xx_prm_reconfigure_io_chain(void);
767
768/* PRM interrupt-related functions */
769extern void omap44xx_prm_read_pending_irqs(unsigned long *events);
770extern void omap44xx_prm_ocp_barrier(void);
771extern void omap44xx_prm_save_and_clear_irqen(u32 *saved_mask);
772extern void omap44xx_prm_restore_irqen(u32 *saved_mask);
773
774extern int __init omap44xx_prm_init(void);
775extern u32 omap44xx_prm_get_reset_sources(void);
776
777# endif
778
779#endif 748#endif
diff --git a/arch/arm/mach-omap2/prm44xx_54xx.h b/arch/arm/mach-omap2/prm44xx_54xx.h
new file mode 100644
index 000000000000..7cd22abb8f15
--- /dev/null
+++ b/arch/arm/mach-omap2/prm44xx_54xx.h
@@ -0,0 +1,58 @@
1/*
2 * OMAP44xx and 54xx PRM common functions
3 *
4 * Copyright (C) 2009-2013 Texas Instruments, Inc.
5 * Copyright (C) 2009-2010 Nokia Corporation
6 *
7 * Paul Walmsley (paul@pwsan.com)
8 * Rajendra Nayak (rnayak@ti.com)
9 * Benoit Cousson (b-cousson@ti.com)
10 *
11 * This file is automatically generated from the OMAP hardware databases.
12 * We respectfully ask that any modifications to this file be coordinated
13 * with the public linux-omap@vger.kernel.org mailing list and the
14 * authors above to ensure that the autogeneration scripts are kept
15 * up-to-date with the file contents.
16 *
17 * This program is free software; you can redistribute it and/or modify
18 * it under the terms of the GNU General Public License version 2 as
19 * published by the Free Software Foundation.
20 *
21 */
22
23#ifndef __ARCH_ARM_MACH_OMAP2_PRM44XX_54XX_H
24#define __ARCH_ARM_MACH_OMAP2_PRM44XX_54XX_H
25
26/* Function prototypes */
27#ifndef __ASSEMBLER__
28
29extern u32 omap4_prm_read_inst_reg(s16 inst, u16 idx);
30extern void omap4_prm_write_inst_reg(u32 val, s16 inst, u16 idx);
31extern u32 omap4_prm_rmw_inst_reg_bits(u32 mask, u32 bits, s16 inst, s16 idx);
32
33/* OMAP4/OMAP5-specific VP functions */
34u32 omap4_prm_vp_check_txdone(u8 vp_id);
35void omap4_prm_vp_clear_txdone(u8 vp_id);
36
37/*
38 * OMAP4/OMAP5 access functions for voltage controller (VC) and
39 * voltage proccessor (VP) in the PRM.
40 */
41extern u32 omap4_prm_vcvp_read(u8 offset);
42extern void omap4_prm_vcvp_write(u32 val, u8 offset);
43extern u32 omap4_prm_vcvp_rmw(u32 mask, u32 bits, u8 offset);
44
45extern void omap44xx_prm_reconfigure_io_chain(void);
46
47/* PRM interrupt-related functions */
48extern void omap44xx_prm_read_pending_irqs(unsigned long *events);
49extern void omap44xx_prm_ocp_barrier(void);
50extern void omap44xx_prm_save_and_clear_irqen(u32 *saved_mask);
51extern void omap44xx_prm_restore_irqen(u32 *saved_mask);
52
53extern int __init omap44xx_prm_init(void);
54extern u32 omap44xx_prm_get_reset_sources(void);
55
56#endif
57
58#endif
diff --git a/arch/arm/mach-omap2/prm54xx.h b/arch/arm/mach-omap2/prm54xx.h
new file mode 100644
index 000000000000..e4411010309c
--- /dev/null
+++ b/arch/arm/mach-omap2/prm54xx.h
@@ -0,0 +1,421 @@
1/*
2 * OMAP54xx PRM instance offset macros
3 *
4 * Copyright (C) 2013 Texas Instruments Incorporated - http://www.ti.com
5 *
6 * Paul Walmsley (paul@pwsan.com)
7 * Rajendra Nayak (rnayak@ti.com)
8 * Benoit Cousson (b-cousson@ti.com)
9 *
10 * This file is automatically generated from the OMAP hardware databases.
11 * We respectfully ask that any modifications to this file be coordinated
12 * with the public linux-omap@vger.kernel.org mailing list and the
13 * authors above to ensure that the autogeneration scripts are kept
14 * up-to-date with the file contents.
15 *
16 * This program is free software; you can redistribute it and/or modify
17 * it under the terms of the GNU General Public License version 2 as
18 * published by the Free Software Foundation.
19 */
20
21#ifndef __ARCH_ARM_MACH_OMAP2_PRM54XX_H
22#define __ARCH_ARM_MACH_OMAP2_PRM54XX_H
23
24#include "prm44xx_54xx.h"
25#include "prcm-common.h"
26#include "prm.h"
27
28#define OMAP54XX_PRM_BASE 0x4ae06000
29
30#define OMAP54XX_PRM_REGADDR(inst, reg) \
31 OMAP2_L4_IO_ADDRESS(OMAP54XX_PRM_BASE + (inst) + (reg))
32
33
34/* PRM instances */
35#define OMAP54XX_PRM_OCP_SOCKET_INST 0x0000
36#define OMAP54XX_PRM_CKGEN_INST 0x0100
37#define OMAP54XX_PRM_MPU_INST 0x0300
38#define OMAP54XX_PRM_DSP_INST 0x0400
39#define OMAP54XX_PRM_ABE_INST 0x0500
40#define OMAP54XX_PRM_COREAON_INST 0x0600
41#define OMAP54XX_PRM_CORE_INST 0x0700
42#define OMAP54XX_PRM_IVA_INST 0x1200
43#define OMAP54XX_PRM_CAM_INST 0x1300
44#define OMAP54XX_PRM_DSS_INST 0x1400
45#define OMAP54XX_PRM_GPU_INST 0x1500
46#define OMAP54XX_PRM_L3INIT_INST 0x1600
47#define OMAP54XX_PRM_CUSTEFUSE_INST 0x1700
48#define OMAP54XX_PRM_WKUPAON_INST 0x1800
49#define OMAP54XX_PRM_WKUPAON_CM_INST 0x1900
50#define OMAP54XX_PRM_EMU_INST 0x1a00
51#define OMAP54XX_PRM_EMU_CM_INST 0x1b00
52#define OMAP54XX_PRM_DEVICE_INST 0x1c00
53#define OMAP54XX_PRM_INSTR_INST 0x1f00
54
55/* PRM clockdomain register offsets (from instance start) */
56#define OMAP54XX_PRM_WKUPAON_CM_WKUPAON_CDOFFS 0x0000
57#define OMAP54XX_PRM_EMU_CM_EMU_CDOFFS 0x0000
58
59/* PRM */
60
61/* PRM.OCP_SOCKET_PRM register offsets */
62#define OMAP54XX_REVISION_PRM_OFFSET 0x0000
63#define OMAP54XX_PRM_IRQSTATUS_MPU_OFFSET 0x0010
64#define OMAP54XX_PRM_IRQSTATUS_MPU_2_OFFSET 0x0014
65#define OMAP54XX_PRM_IRQENABLE_MPU_OFFSET 0x0018
66#define OMAP54XX_PRM_IRQENABLE_MPU_2_OFFSET 0x001c
67#define OMAP54XX_PRM_IRQSTATUS_IPU_OFFSET 0x0020
68#define OMAP54XX_PRM_IRQENABLE_IPU_OFFSET 0x0028
69#define OMAP54XX_PRM_IRQSTATUS_DSP_OFFSET 0x0030
70#define OMAP54XX_PRM_IRQENABLE_DSP_OFFSET 0x0038
71#define OMAP54XX_CM_PRM_PROFILING_CLKCTRL_OFFSET 0x0040
72#define OMAP54XX_CM_PRM_PROFILING_CLKCTRL OMAP54XX_PRM_REGADDR(OMAP54XX_PRM_OCP_SOCKET_INST, 0x0040)
73#define OMAP54XX_PRM_DEBUG_OUT_OFFSET 0x0084
74#define OMAP54XX_PRM_DEBUG_TRANS_CFG_OFFSET 0x0090
75#define OMAP54XX_PRM_DEBUG_OFF_TRANS_OFFSET 0x0094
76#define OMAP54XX_PRM_DEBUG_CORE_RET_TRANS_OFFSET 0x0098
77#define OMAP54XX_PRM_DEBUG_MPU_RET_TRANS_OFFSET 0x009c
78#define OMAP54XX_PRM_DEBUG_MM_RET_TRANS_OFFSET 0x00a0
79#define OMAP54XX_PRM_DEBUG_WKUPAON_FD_TRANS_OFFSET 0x00a4
80
81/* PRM.CKGEN_PRM register offsets */
82#define OMAP54XX_CM_CLKSEL_ABE_DSS_SYS_OFFSET 0x0000
83#define OMAP54XX_CM_CLKSEL_ABE_DSS_SYS OMAP54XX_PRM_REGADDR(OMAP54XX_PRM_CKGEN_INST, 0x0000)
84#define OMAP54XX_CM_CLKSEL_WKUPAON_OFFSET 0x0008
85#define OMAP54XX_CM_CLKSEL_WKUPAON OMAP54XX_PRM_REGADDR(OMAP54XX_PRM_CKGEN_INST, 0x0008)
86#define OMAP54XX_CM_CLKSEL_ABE_PLL_REF_OFFSET 0x000c
87#define OMAP54XX_CM_CLKSEL_ABE_PLL_REF OMAP54XX_PRM_REGADDR(OMAP54XX_PRM_CKGEN_INST, 0x000c)
88#define OMAP54XX_CM_CLKSEL_SYS_OFFSET 0x0010
89#define OMAP54XX_CM_CLKSEL_SYS OMAP54XX_PRM_REGADDR(OMAP54XX_PRM_CKGEN_INST, 0x0010)
90
91/* PRM.MPU_PRM register offsets */
92#define OMAP54XX_PM_MPU_PWRSTCTRL_OFFSET 0x0000
93#define OMAP54XX_PM_MPU_PWRSTST_OFFSET 0x0004
94#define OMAP54XX_RM_MPU_MPU_CONTEXT_OFFSET 0x0024
95
96/* PRM.DSP_PRM register offsets */
97#define OMAP54XX_PM_DSP_PWRSTCTRL_OFFSET 0x0000
98#define OMAP54XX_PM_DSP_PWRSTST_OFFSET 0x0004
99#define OMAP54XX_RM_DSP_RSTCTRL_OFFSET 0x0010
100#define OMAP54XX_RM_DSP_RSTST_OFFSET 0x0014
101#define OMAP54XX_RM_DSP_DSP_CONTEXT_OFFSET 0x0024
102
103/* PRM.ABE_PRM register offsets */
104#define OMAP54XX_PM_ABE_PWRSTCTRL_OFFSET 0x0000
105#define OMAP54XX_PM_ABE_PWRSTST_OFFSET 0x0004
106#define OMAP54XX_RM_ABE_AESS_CONTEXT_OFFSET 0x002c
107#define OMAP54XX_PM_ABE_MCPDM_WKDEP_OFFSET 0x0030
108#define OMAP54XX_RM_ABE_MCPDM_CONTEXT_OFFSET 0x0034
109#define OMAP54XX_PM_ABE_DMIC_WKDEP_OFFSET 0x0038
110#define OMAP54XX_RM_ABE_DMIC_CONTEXT_OFFSET 0x003c
111#define OMAP54XX_PM_ABE_MCASP_WKDEP_OFFSET 0x0040
112#define OMAP54XX_RM_ABE_MCASP_CONTEXT_OFFSET 0x0044
113#define OMAP54XX_PM_ABE_MCBSP1_WKDEP_OFFSET 0x0048
114#define OMAP54XX_RM_ABE_MCBSP1_CONTEXT_OFFSET 0x004c
115#define OMAP54XX_PM_ABE_MCBSP2_WKDEP_OFFSET 0x0050
116#define OMAP54XX_RM_ABE_MCBSP2_CONTEXT_OFFSET 0x0054
117#define OMAP54XX_PM_ABE_MCBSP3_WKDEP_OFFSET 0x0058
118#define OMAP54XX_RM_ABE_MCBSP3_CONTEXT_OFFSET 0x005c
119#define OMAP54XX_PM_ABE_SLIMBUS1_WKDEP_OFFSET 0x0060
120#define OMAP54XX_RM_ABE_SLIMBUS1_CONTEXT_OFFSET 0x0064
121#define OMAP54XX_PM_ABE_TIMER5_WKDEP_OFFSET 0x0068
122#define OMAP54XX_RM_ABE_TIMER5_CONTEXT_OFFSET 0x006c
123#define OMAP54XX_PM_ABE_TIMER6_WKDEP_OFFSET 0x0070
124#define OMAP54XX_RM_ABE_TIMER6_CONTEXT_OFFSET 0x0074
125#define OMAP54XX_PM_ABE_TIMER7_WKDEP_OFFSET 0x0078
126#define OMAP54XX_RM_ABE_TIMER7_CONTEXT_OFFSET 0x007c
127#define OMAP54XX_PM_ABE_TIMER8_WKDEP_OFFSET 0x0080
128#define OMAP54XX_RM_ABE_TIMER8_CONTEXT_OFFSET 0x0084
129#define OMAP54XX_PM_ABE_WD_TIMER3_WKDEP_OFFSET 0x0088
130#define OMAP54XX_RM_ABE_WD_TIMER3_CONTEXT_OFFSET 0x008c
131
132/* PRM.COREAON_PRM register offsets */
133#define OMAP54XX_PM_COREAON_SMARTREFLEX_MPU_WKDEP_OFFSET 0x0028
134#define OMAP54XX_RM_COREAON_SMARTREFLEX_MPU_CONTEXT_OFFSET 0x002c
135#define OMAP54XX_PM_COREAON_SMARTREFLEX_MM_WKDEP_OFFSET 0x0030
136#define OMAP54XX_RM_COREAON_SMARTREFLEX_MM_CONTEXT_OFFSET 0x0034
137#define OMAP54XX_PM_COREAON_SMARTREFLEX_CORE_WKDEP_OFFSET 0x0038
138#define OMAP54XX_RM_COREAON_SMARTREFLEX_CORE_CONTEXT_OFFSET 0x003c
139
140/* PRM.CORE_PRM register offsets */
141#define OMAP54XX_PM_CORE_PWRSTCTRL_OFFSET 0x0000
142#define OMAP54XX_PM_CORE_PWRSTST_OFFSET 0x0004
143#define OMAP54XX_RM_L3MAIN1_L3_MAIN_1_CONTEXT_OFFSET 0x0024
144#define OMAP54XX_RM_L3MAIN2_L3_MAIN_2_CONTEXT_OFFSET 0x0124
145#define OMAP54XX_RM_L3MAIN2_GPMC_CONTEXT_OFFSET 0x012c
146#define OMAP54XX_RM_L3MAIN2_OCMC_RAM_CONTEXT_OFFSET 0x0134
147#define OMAP54XX_RM_IPU_RSTCTRL_OFFSET 0x0210
148#define OMAP54XX_RM_IPU_RSTST_OFFSET 0x0214
149#define OMAP54XX_RM_IPU_IPU_CONTEXT_OFFSET 0x0224
150#define OMAP54XX_RM_DMA_DMA_SYSTEM_CONTEXT_OFFSET 0x0324
151#define OMAP54XX_RM_EMIF_DMM_CONTEXT_OFFSET 0x0424
152#define OMAP54XX_RM_EMIF_EMIF_OCP_FW_CONTEXT_OFFSET 0x042c
153#define OMAP54XX_RM_EMIF_EMIF1_CONTEXT_OFFSET 0x0434
154#define OMAP54XX_RM_EMIF_EMIF2_CONTEXT_OFFSET 0x043c
155#define OMAP54XX_RM_EMIF_EMIF_DLL_CONTEXT_OFFSET 0x0444
156#define OMAP54XX_RM_C2C_C2C_CONTEXT_OFFSET 0x0524
157#define OMAP54XX_RM_C2C_MODEM_ICR_CONTEXT_OFFSET 0x052c
158#define OMAP54XX_RM_C2C_C2C_OCP_FW_CONTEXT_OFFSET 0x0534
159#define OMAP54XX_RM_L4CFG_L4_CFG_CONTEXT_OFFSET 0x0624
160#define OMAP54XX_RM_L4CFG_SPINLOCK_CONTEXT_OFFSET 0x062c
161#define OMAP54XX_RM_L4CFG_MAILBOX_CONTEXT_OFFSET 0x0634
162#define OMAP54XX_RM_L4CFG_SAR_ROM_CONTEXT_OFFSET 0x063c
163#define OMAP54XX_RM_L4CFG_OCP2SCP2_CONTEXT_OFFSET 0x0644
164#define OMAP54XX_RM_L3INSTR_L3_MAIN_3_CONTEXT_OFFSET 0x0724
165#define OMAP54XX_RM_L3INSTR_L3_INSTR_CONTEXT_OFFSET 0x072c
166#define OMAP54XX_RM_L3INSTR_OCP_WP_NOC_CONTEXT_OFFSET 0x0744
167#define OMAP54XX_RM_MIPIEXT_LLI_CONTEXT_OFFSET 0x0824
168#define OMAP54XX_RM_MIPIEXT_LLI_OCP_FW_CONTEXT_OFFSET 0x082c
169#define OMAP54XX_RM_MIPIEXT_MPHY_CONTEXT_OFFSET 0x0834
170#define OMAP54XX_PM_L4PER_TIMER10_WKDEP_OFFSET 0x0928
171#define OMAP54XX_RM_L4PER_TIMER10_CONTEXT_OFFSET 0x092c
172#define OMAP54XX_PM_L4PER_TIMER11_WKDEP_OFFSET 0x0930
173#define OMAP54XX_RM_L4PER_TIMER11_CONTEXT_OFFSET 0x0934
174#define OMAP54XX_PM_L4PER_TIMER2_WKDEP_OFFSET 0x0938
175#define OMAP54XX_RM_L4PER_TIMER2_CONTEXT_OFFSET 0x093c
176#define OMAP54XX_PM_L4PER_TIMER3_WKDEP_OFFSET 0x0940
177#define OMAP54XX_RM_L4PER_TIMER3_CONTEXT_OFFSET 0x0944
178#define OMAP54XX_PM_L4PER_TIMER4_WKDEP_OFFSET 0x0948
179#define OMAP54XX_RM_L4PER_TIMER4_CONTEXT_OFFSET 0x094c
180#define OMAP54XX_PM_L4PER_TIMER9_WKDEP_OFFSET 0x0950
181#define OMAP54XX_RM_L4PER_TIMER9_CONTEXT_OFFSET 0x0954
182#define OMAP54XX_RM_L4PER_ELM_CONTEXT_OFFSET 0x095c
183#define OMAP54XX_PM_L4PER_GPIO2_WKDEP_OFFSET 0x0960
184#define OMAP54XX_RM_L4PER_GPIO2_CONTEXT_OFFSET 0x0964
185#define OMAP54XX_PM_L4PER_GPIO3_WKDEP_OFFSET 0x0968
186#define OMAP54XX_RM_L4PER_GPIO3_CONTEXT_OFFSET 0x096c
187#define OMAP54XX_PM_L4PER_GPIO4_WKDEP_OFFSET 0x0970
188#define OMAP54XX_RM_L4PER_GPIO4_CONTEXT_OFFSET 0x0974
189#define OMAP54XX_PM_L4PER_GPIO5_WKDEP_OFFSET 0x0978
190#define OMAP54XX_RM_L4PER_GPIO5_CONTEXT_OFFSET 0x097c
191#define OMAP54XX_PM_L4PER_GPIO6_WKDEP_OFFSET 0x0980
192#define OMAP54XX_RM_L4PER_GPIO6_CONTEXT_OFFSET 0x0984
193#define OMAP54XX_RM_L4PER_HDQ1W_CONTEXT_OFFSET 0x098c
194#define OMAP54XX_PM_L4PER_I2C1_WKDEP_OFFSET 0x09a0
195#define OMAP54XX_RM_L4PER_I2C1_CONTEXT_OFFSET 0x09a4
196#define OMAP54XX_PM_L4PER_I2C2_WKDEP_OFFSET 0x09a8
197#define OMAP54XX_RM_L4PER_I2C2_CONTEXT_OFFSET 0x09ac
198#define OMAP54XX_PM_L4PER_I2C3_WKDEP_OFFSET 0x09b0
199#define OMAP54XX_RM_L4PER_I2C3_CONTEXT_OFFSET 0x09b4
200#define OMAP54XX_PM_L4PER_I2C4_WKDEP_OFFSET 0x09b8
201#define OMAP54XX_RM_L4PER_I2C4_CONTEXT_OFFSET 0x09bc
202#define OMAP54XX_RM_L4PER_L4_PER_CONTEXT_OFFSET 0x09c0
203#define OMAP54XX_PM_L4PER_MCSPI1_WKDEP_OFFSET 0x09f0
204#define OMAP54XX_RM_L4PER_MCSPI1_CONTEXT_OFFSET 0x09f4
205#define OMAP54XX_PM_L4PER_MCSPI2_WKDEP_OFFSET 0x09f8
206#define OMAP54XX_RM_L4PER_MCSPI2_CONTEXT_OFFSET 0x09fc
207#define OMAP54XX_PM_L4PER_MCSPI3_WKDEP_OFFSET 0x0a00
208#define OMAP54XX_RM_L4PER_MCSPI3_CONTEXT_OFFSET 0x0a04
209#define OMAP54XX_PM_L4PER_MCSPI4_WKDEP_OFFSET 0x0a08
210#define OMAP54XX_RM_L4PER_MCSPI4_CONTEXT_OFFSET 0x0a0c
211#define OMAP54XX_PM_L4PER_GPIO7_WKDEP_OFFSET 0x0a10
212#define OMAP54XX_RM_L4PER_GPIO7_CONTEXT_OFFSET 0x0a14
213#define OMAP54XX_PM_L4PER_GPIO8_WKDEP_OFFSET 0x0a18
214#define OMAP54XX_RM_L4PER_GPIO8_CONTEXT_OFFSET 0x0a1c
215#define OMAP54XX_PM_L4PER_MMC3_WKDEP_OFFSET 0x0a20
216#define OMAP54XX_RM_L4PER_MMC3_CONTEXT_OFFSET 0x0a24
217#define OMAP54XX_PM_L4PER_MMC4_WKDEP_OFFSET 0x0a28
218#define OMAP54XX_RM_L4PER_MMC4_CONTEXT_OFFSET 0x0a2c
219#define OMAP54XX_PM_L4PER_UART1_WKDEP_OFFSET 0x0a40
220#define OMAP54XX_RM_L4PER_UART1_CONTEXT_OFFSET 0x0a44
221#define OMAP54XX_PM_L4PER_UART2_WKDEP_OFFSET 0x0a48
222#define OMAP54XX_RM_L4PER_UART2_CONTEXT_OFFSET 0x0a4c
223#define OMAP54XX_PM_L4PER_UART3_WKDEP_OFFSET 0x0a50
224#define OMAP54XX_RM_L4PER_UART3_CONTEXT_OFFSET 0x0a54
225#define OMAP54XX_RM_L4PER_UART4_CONTEXT_OFFSET 0x0a58
226#define OMAP54XX_PM_L4PER_UART4_WKDEP_OFFSET 0x0a5c
227#define OMAP54XX_PM_L4PER_MMC5_WKDEP_OFFSET 0x0a60
228#define OMAP54XX_RM_L4PER_MMC5_CONTEXT_OFFSET 0x0a64
229#define OMAP54XX_PM_L4PER_I2C5_WKDEP_OFFSET 0x0a68
230#define OMAP54XX_RM_L4PER_I2C5_CONTEXT_OFFSET 0x0a6c
231#define OMAP54XX_PM_L4PER_UART5_WKDEP_OFFSET 0x0a70
232#define OMAP54XX_RM_L4PER_UART5_CONTEXT_OFFSET 0x0a74
233#define OMAP54XX_PM_L4PER_UART6_WKDEP_OFFSET 0x0a78
234#define OMAP54XX_RM_L4PER_UART6_CONTEXT_OFFSET 0x0a7c
235#define OMAP54XX_RM_L4SEC_AES1_CONTEXT_OFFSET 0x0aa4
236#define OMAP54XX_RM_L4SEC_AES2_CONTEXT_OFFSET 0x0aac
237#define OMAP54XX_RM_L4SEC_DES3DES_CONTEXT_OFFSET 0x0ab4
238#define OMAP54XX_RM_L4SEC_FPKA_CONTEXT_OFFSET 0x0abc
239#define OMAP54XX_RM_L4SEC_RNG_CONTEXT_OFFSET 0x0ac4
240#define OMAP54XX_RM_L4SEC_SHA2MD5_CONTEXT_OFFSET 0x0acc
241#define OMAP54XX_RM_L4SEC_DMA_CRYPTO_CONTEXT_OFFSET 0x0adc
242
243/* PRM.IVA_PRM register offsets */
244#define OMAP54XX_PM_IVA_PWRSTCTRL_OFFSET 0x0000
245#define OMAP54XX_PM_IVA_PWRSTST_OFFSET 0x0004
246#define OMAP54XX_RM_IVA_RSTCTRL_OFFSET 0x0010
247#define OMAP54XX_RM_IVA_RSTST_OFFSET 0x0014
248#define OMAP54XX_RM_IVA_IVA_CONTEXT_OFFSET 0x0024
249#define OMAP54XX_RM_IVA_SL2_CONTEXT_OFFSET 0x002c
250
251/* PRM.CAM_PRM register offsets */
252#define OMAP54XX_PM_CAM_PWRSTCTRL_OFFSET 0x0000
253#define OMAP54XX_PM_CAM_PWRSTST_OFFSET 0x0004
254#define OMAP54XX_RM_CAM_ISS_CONTEXT_OFFSET 0x0024
255#define OMAP54XX_RM_CAM_FDIF_CONTEXT_OFFSET 0x002c
256#define OMAP54XX_RM_CAM_CAL_CONTEXT_OFFSET 0x0034
257
258/* PRM.DSS_PRM register offsets */
259#define OMAP54XX_PM_DSS_PWRSTCTRL_OFFSET 0x0000
260#define OMAP54XX_PM_DSS_PWRSTST_OFFSET 0x0004
261#define OMAP54XX_PM_DSS_DSS_WKDEP_OFFSET 0x0020
262#define OMAP54XX_RM_DSS_DSS_CONTEXT_OFFSET 0x0024
263#define OMAP54XX_RM_DSS_BB2D_CONTEXT_OFFSET 0x0034
264
265/* PRM.GPU_PRM register offsets */
266#define OMAP54XX_PM_GPU_PWRSTCTRL_OFFSET 0x0000
267#define OMAP54XX_PM_GPU_PWRSTST_OFFSET 0x0004
268#define OMAP54XX_RM_GPU_GPU_CONTEXT_OFFSET 0x0024
269
270/* PRM.L3INIT_PRM register offsets */
271#define OMAP54XX_PM_L3INIT_PWRSTCTRL_OFFSET 0x0000
272#define OMAP54XX_PM_L3INIT_PWRSTST_OFFSET 0x0004
273#define OMAP54XX_PM_L3INIT_MMC1_WKDEP_OFFSET 0x0028
274#define OMAP54XX_RM_L3INIT_MMC1_CONTEXT_OFFSET 0x002c
275#define OMAP54XX_PM_L3INIT_MMC2_WKDEP_OFFSET 0x0030
276#define OMAP54XX_RM_L3INIT_MMC2_CONTEXT_OFFSET 0x0034
277#define OMAP54XX_PM_L3INIT_HSI_WKDEP_OFFSET 0x0038
278#define OMAP54XX_RM_L3INIT_HSI_CONTEXT_OFFSET 0x003c
279#define OMAP54XX_PM_L3INIT_UNIPRO2_WKDEP_OFFSET 0x0040
280#define OMAP54XX_RM_L3INIT_UNIPRO2_CONTEXT_OFFSET 0x0044
281#define OMAP54XX_PM_L3INIT_USB_HOST_HS_WKDEP_OFFSET 0x0058
282#define OMAP54XX_RM_L3INIT_USB_HOST_HS_CONTEXT_OFFSET 0x005c
283#define OMAP54XX_PM_L3INIT_USB_TLL_HS_WKDEP_OFFSET 0x0068
284#define OMAP54XX_RM_L3INIT_USB_TLL_HS_CONTEXT_OFFSET 0x006c
285#define OMAP54XX_RM_L3INIT_IEEE1500_2_OCP_CONTEXT_OFFSET 0x007c
286#define OMAP54XX_PM_L3INIT_SATA_WKDEP_OFFSET 0x0088
287#define OMAP54XX_RM_L3INIT_SATA_CONTEXT_OFFSET 0x008c
288#define OMAP54XX_RM_L3INIT_OCP2SCP1_CONTEXT_OFFSET 0x00e4
289#define OMAP54XX_RM_L3INIT_OCP2SCP3_CONTEXT_OFFSET 0x00ec
290#define OMAP54XX_PM_L3INIT_USB_OTG_SS_WKDEP_OFFSET 0x00f0
291#define OMAP54XX_RM_L3INIT_USB_OTG_SS_CONTEXT_OFFSET 0x00f4
292
293/* PRM.CUSTEFUSE_PRM register offsets */
294#define OMAP54XX_PM_CUSTEFUSE_PWRSTCTRL_OFFSET 0x0000
295#define OMAP54XX_PM_CUSTEFUSE_PWRSTST_OFFSET 0x0004
296#define OMAP54XX_RM_CUSTEFUSE_EFUSE_CTRL_CUST_CONTEXT_OFFSET 0x0024
297
298/* PRM.WKUPAON_PRM register offsets */
299#define OMAP54XX_RM_WKUPAON_L4_WKUP_CONTEXT_OFFSET 0x0024
300#define OMAP54XX_RM_WKUPAON_WD_TIMER1_CONTEXT_OFFSET 0x002c
301#define OMAP54XX_PM_WKUPAON_WD_TIMER2_WKDEP_OFFSET 0x0030
302#define OMAP54XX_RM_WKUPAON_WD_TIMER2_CONTEXT_OFFSET 0x0034
303#define OMAP54XX_PM_WKUPAON_GPIO1_WKDEP_OFFSET 0x0038
304#define OMAP54XX_RM_WKUPAON_GPIO1_CONTEXT_OFFSET 0x003c
305#define OMAP54XX_PM_WKUPAON_TIMER1_WKDEP_OFFSET 0x0040
306#define OMAP54XX_RM_WKUPAON_TIMER1_CONTEXT_OFFSET 0x0044
307#define OMAP54XX_PM_WKUPAON_TIMER12_WKDEP_OFFSET 0x0048
308#define OMAP54XX_RM_WKUPAON_TIMER12_CONTEXT_OFFSET 0x004c
309#define OMAP54XX_RM_WKUPAON_COUNTER_32K_CONTEXT_OFFSET 0x0054
310#define OMAP54XX_RM_WKUPAON_SAR_RAM_CONTEXT_OFFSET 0x0064
311#define OMAP54XX_PM_WKUPAON_KBD_WKDEP_OFFSET 0x0078
312#define OMAP54XX_RM_WKUPAON_KBD_CONTEXT_OFFSET 0x007c
313
314/* PRM.WKUPAON_CM register offsets */
315#define OMAP54XX_CM_WKUPAON_CLKSTCTRL_OFFSET 0x0000
316#define OMAP54XX_CM_WKUPAON_L4_WKUP_CLKCTRL_OFFSET 0x0020
317#define OMAP54XX_CM_WKUPAON_L4_WKUP_CLKCTRL OMAP54XX_PRM_REGADDR(OMAP54XX_PRM_WKUPAON_CM_INST, 0x0020)
318#define OMAP54XX_CM_WKUPAON_WD_TIMER1_CLKCTRL_OFFSET 0x0028
319#define OMAP54XX_CM_WKUPAON_WD_TIMER1_CLKCTRL OMAP54XX_PRM_REGADDR(OMAP54XX_PRM_WKUPAON_CM_INST, 0x0028)
320#define OMAP54XX_CM_WKUPAON_WD_TIMER2_CLKCTRL_OFFSET 0x0030
321#define OMAP54XX_CM_WKUPAON_WD_TIMER2_CLKCTRL OMAP54XX_PRM_REGADDR(OMAP54XX_PRM_WKUPAON_CM_INST, 0x0030)
322#define OMAP54XX_CM_WKUPAON_GPIO1_CLKCTRL_OFFSET 0x0038
323#define OMAP54XX_CM_WKUPAON_GPIO1_CLKCTRL OMAP54XX_PRM_REGADDR(OMAP54XX_PRM_WKUPAON_CM_INST, 0x0038)
324#define OMAP54XX_CM_WKUPAON_TIMER1_CLKCTRL_OFFSET 0x0040
325#define OMAP54XX_CM_WKUPAON_TIMER1_CLKCTRL OMAP54XX_PRM_REGADDR(OMAP54XX_PRM_WKUPAON_CM_INST, 0x0040)
326#define OMAP54XX_CM_WKUPAON_TIMER12_CLKCTRL_OFFSET 0x0048
327#define OMAP54XX_CM_WKUPAON_TIMER12_CLKCTRL OMAP54XX_PRM_REGADDR(OMAP54XX_PRM_WKUPAON_CM_INST, 0x0048)
328#define OMAP54XX_CM_WKUPAON_COUNTER_32K_CLKCTRL_OFFSET 0x0050
329#define OMAP54XX_CM_WKUPAON_COUNTER_32K_CLKCTRL OMAP54XX_PRM_REGADDR(OMAP54XX_PRM_WKUPAON_CM_INST, 0x0050)
330#define OMAP54XX_CM_WKUPAON_SAR_RAM_CLKCTRL_OFFSET 0x0060
331#define OMAP54XX_CM_WKUPAON_SAR_RAM_CLKCTRL OMAP54XX_PRM_REGADDR(OMAP54XX_PRM_WKUPAON_CM_INST, 0x0060)
332#define OMAP54XX_CM_WKUPAON_KBD_CLKCTRL_OFFSET 0x0078
333#define OMAP54XX_CM_WKUPAON_KBD_CLKCTRL OMAP54XX_PRM_REGADDR(OMAP54XX_PRM_WKUPAON_CM_INST, 0x0078)
334#define OMAP54XX_CM_WKUPAON_SCRM_CLKCTRL_OFFSET 0x0090
335#define OMAP54XX_CM_WKUPAON_SCRM_CLKCTRL OMAP54XX_PRM_REGADDR(OMAP54XX_PRM_WKUPAON_CM_INST, 0x0090)
336#define OMAP54XX_CM_WKUPAON_IO_SRCOMP_CLKCTRL_OFFSET 0x0098
337#define OMAP54XX_CM_WKUPAON_IO_SRCOMP_CLKCTRL OMAP54XX_PRM_REGADDR(OMAP54XX_PRM_WKUPAON_CM_INST, 0x0098)
338
339/* PRM.EMU_PRM register offsets */
340#define OMAP54XX_PM_EMU_PWRSTCTRL_OFFSET 0x0000
341#define OMAP54XX_PM_EMU_PWRSTST_OFFSET 0x0004
342#define OMAP54XX_RM_EMU_DEBUGSS_CONTEXT_OFFSET 0x0024
343
344/* PRM.EMU_CM register offsets */
345#define OMAP54XX_CM_EMU_CLKSTCTRL_OFFSET 0x0000
346#define OMAP54XX_CM_EMU_DYNAMICDEP_OFFSET 0x0008
347#define OMAP54XX_CM_EMU_DEBUGSS_CLKCTRL_OFFSET 0x0020
348#define OMAP54XX_CM_EMU_DEBUGSS_CLKCTRL OMAP54XX_PRM_REGADDR(OMAP54XX_PRM_EMU_CM_INST, 0x0020)
349#define OMAP54XX_CM_EMU_MPU_EMU_DBG_CLKCTRL_OFFSET 0x0028
350#define OMAP54XX_CM_EMU_MPU_EMU_DBG_CLKCTRL OMAP54XX_PRM_REGADDR(OMAP54XX_PRM_EMU_CM_INST, 0x0028)
351
352/* PRM.DEVICE_PRM register offsets */
353#define OMAP54XX_PRM_RSTCTRL_OFFSET 0x0000
354#define OMAP54XX_PRM_RSTST_OFFSET 0x0004
355#define OMAP54XX_PRM_RSTTIME_OFFSET 0x0008
356#define OMAP54XX_PRM_CLKREQCTRL_OFFSET 0x000c
357#define OMAP54XX_PRM_VOLTCTRL_OFFSET 0x0010
358#define OMAP54XX_PRM_PWRREQCTRL_OFFSET 0x0014
359#define OMAP54XX_PRM_PSCON_COUNT_OFFSET 0x0018
360#define OMAP54XX_PRM_IO_COUNT_OFFSET 0x001c
361#define OMAP54XX_PRM_IO_PMCTRL_OFFSET 0x0020
362#define OMAP54XX_PRM_VOLTSETUP_WARMRESET_OFFSET 0x0024
363#define OMAP54XX_PRM_VOLTSETUP_CORE_OFF_OFFSET 0x0028
364#define OMAP54XX_PRM_VOLTSETUP_MPU_OFF_OFFSET 0x002c
365#define OMAP54XX_PRM_VOLTSETUP_MM_OFF_OFFSET 0x0030
366#define OMAP54XX_PRM_VOLTSETUP_CORE_RET_SLEEP_OFFSET 0x0034
367#define OMAP54XX_PRM_VOLTSETUP_MPU_RET_SLEEP_OFFSET 0x0038
368#define OMAP54XX_PRM_VOLTSETUP_MM_RET_SLEEP_OFFSET 0x003c
369#define OMAP54XX_PRM_VP_CORE_CONFIG_OFFSET 0x0040
370#define OMAP54XX_PRM_VP_CORE_STATUS_OFFSET 0x0044
371#define OMAP54XX_PRM_VP_CORE_VLIMITTO_OFFSET 0x0048
372#define OMAP54XX_PRM_VP_CORE_VOLTAGE_OFFSET 0x004c
373#define OMAP54XX_PRM_VP_CORE_VSTEPMAX_OFFSET 0x0050
374#define OMAP54XX_PRM_VP_CORE_VSTEPMIN_OFFSET 0x0054
375#define OMAP54XX_PRM_VP_MPU_CONFIG_OFFSET 0x0058
376#define OMAP54XX_PRM_VP_MPU_STATUS_OFFSET 0x005c
377#define OMAP54XX_PRM_VP_MPU_VLIMITTO_OFFSET 0x0060
378#define OMAP54XX_PRM_VP_MPU_VOLTAGE_OFFSET 0x0064
379#define OMAP54XX_PRM_VP_MPU_VSTEPMAX_OFFSET 0x0068
380#define OMAP54XX_PRM_VP_MPU_VSTEPMIN_OFFSET 0x006c
381#define OMAP54XX_PRM_VP_MM_CONFIG_OFFSET 0x0070
382#define OMAP54XX_PRM_VP_MM_STATUS_OFFSET 0x0074
383#define OMAP54XX_PRM_VP_MM_VLIMITTO_OFFSET 0x0078
384#define OMAP54XX_PRM_VP_MM_VOLTAGE_OFFSET 0x007c
385#define OMAP54XX_PRM_VP_MM_VSTEPMAX_OFFSET 0x0080
386#define OMAP54XX_PRM_VP_MM_VSTEPMIN_OFFSET 0x0084
387#define OMAP54XX_PRM_VC_SMPS_CORE_CONFIG_OFFSET 0x0088
388#define OMAP54XX_PRM_VC_SMPS_MM_CONFIG_OFFSET 0x008c
389#define OMAP54XX_PRM_VC_SMPS_MPU_CONFIG_OFFSET 0x0090
390#define OMAP54XX_PRM_VC_VAL_CMD_VDD_CORE_L_OFFSET 0x0094
391#define OMAP54XX_PRM_VC_VAL_CMD_VDD_MM_L_OFFSET 0x0098
392#define OMAP54XX_PRM_VC_VAL_CMD_VDD_MPU_L_OFFSET 0x009c
393#define OMAP54XX_PRM_VC_VAL_BYPASS_OFFSET 0x00a0
394#define OMAP54XX_PRM_VC_CORE_ERRST_OFFSET 0x00a4
395#define OMAP54XX_PRM_VC_MM_ERRST_OFFSET 0x00a8
396#define OMAP54XX_PRM_VC_MPU_ERRST_OFFSET 0x00ac
397#define OMAP54XX_PRM_VC_BYPASS_ERRST_OFFSET 0x00b0
398#define OMAP54XX_PRM_VC_CFG_I2C_MODE_OFFSET 0x00b4
399#define OMAP54XX_PRM_VC_CFG_I2C_CLK_OFFSET 0x00b8
400#define OMAP54XX_PRM_SRAM_COUNT_OFFSET 0x00bc
401#define OMAP54XX_PRM_SRAM_WKUP_SETUP_OFFSET 0x00c0
402#define OMAP54XX_PRM_SLDO_CORE_SETUP_OFFSET 0x00c4
403#define OMAP54XX_PRM_SLDO_CORE_CTRL_OFFSET 0x00c8
404#define OMAP54XX_PRM_SLDO_MPU_SETUP_OFFSET 0x00cc
405#define OMAP54XX_PRM_SLDO_MPU_CTRL_OFFSET 0x00d0
406#define OMAP54XX_PRM_SLDO_MM_SETUP_OFFSET 0x00d4
407#define OMAP54XX_PRM_SLDO_MM_CTRL_OFFSET 0x00d8
408#define OMAP54XX_PRM_ABBLDO_MPU_SETUP_OFFSET 0x00dc
409#define OMAP54XX_PRM_ABBLDO_MPU_CTRL_OFFSET 0x00e0
410#define OMAP54XX_PRM_ABBLDO_MM_SETUP_OFFSET 0x00e4
411#define OMAP54XX_PRM_ABBLDO_MM_CTRL_OFFSET 0x00e8
412#define OMAP54XX_PRM_BANDGAP_SETUP_OFFSET 0x00ec
413#define OMAP54XX_PRM_DEVICE_OFF_CTRL_OFFSET 0x00f0
414#define OMAP54XX_PRM_PHASE1_CNDP_OFFSET 0x00f4
415#define OMAP54XX_PRM_PHASE2A_CNDP_OFFSET 0x00f8
416#define OMAP54XX_PRM_PHASE2B_CNDP_OFFSET 0x00fc
417#define OMAP54XX_PRM_MODEM_IF_CTRL_OFFSET 0x0100
418#define OMAP54XX_PRM_VOLTST_MPU_OFFSET 0x0110
419#define OMAP54XX_PRM_VOLTST_MM_OFFSET 0x0114
420
421#endif
diff --git a/arch/arm/mach-omap2/scrm54xx.h b/arch/arm/mach-omap2/scrm54xx.h
new file mode 100644
index 000000000000..57e86c8f8239
--- /dev/null
+++ b/arch/arm/mach-omap2/scrm54xx.h
@@ -0,0 +1,231 @@
1/*
2 * OMAP54XX SCRM registers and bitfields
3 *
4 * Copyright (C) 2013 Texas Instruments Incorporated - http://www.ti.com
5 *
6 * Benoit Cousson (b-cousson@ti.com)
7 *
8 * This file is automatically generated from the OMAP hardware databases.
9 * We respectfully ask that any modifications to this file be coordinated
10 * with the public linux-omap@vger.kernel.org mailing list and the
11 * authors above to ensure that the autogeneration scripts are kept
12 * up-to-date with the file contents.
13 *
14 * This program is free software; you can redistribute it and/or modify
15 * it under the terms of the GNU General Public License version 2 as
16 * published by the Free Software Foundation.
17 */
18
19#ifndef __ARCH_ARM_MACH_OMAP2_SCRM_54XX_H
20#define __ARCH_ARM_MACH_OMAP2_SCRM_54XX_H
21
22#define OMAP5_SCRM_BASE 0x4ae0a000
23
24#define OMAP54XX_SCRM_REGADDR(reg) \
25 OMAP2_L4_IO_ADDRESS(OMAP5_SCRM_BASE + (reg))
26
27/* SCRM */
28
29/* SCRM.SCRM register offsets */
30#define OMAP5_SCRM_REVISION_SCRM_OFFSET 0x0000
31#define OMAP5_SCRM_REVISION_SCRM OMAP54XX_SCRM_REGADDR(0x0000)
32#define OMAP5_SCRM_CLKSETUPTIME_OFFSET 0x0100
33#define OMAP5_SCRM_CLKSETUPTIME OMAP54XX_SCRM_REGADDR(0x0100)
34#define OMAP5_SCRM_PMICSETUPTIME_OFFSET 0x0104
35#define OMAP5_SCRM_PMICSETUPTIME OMAP54XX_SCRM_REGADDR(0x0104)
36#define OMAP5_SCRM_ALTCLKSRC_OFFSET 0x0110
37#define OMAP5_SCRM_ALTCLKSRC OMAP54XX_SCRM_REGADDR(0x0110)
38#define OMAP5_SCRM_MODEMCLKM_OFFSET 0x0118
39#define OMAP5_SCRM_MODEMCLKM OMAP54XX_SCRM_REGADDR(0x0118)
40#define OMAP5_SCRM_D2DCLKM_OFFSET 0x011c
41#define OMAP5_SCRM_D2DCLKM OMAP54XX_SCRM_REGADDR(0x011c)
42#define OMAP5_SCRM_EXTCLKREQ_OFFSET 0x0200
43#define OMAP5_SCRM_EXTCLKREQ OMAP54XX_SCRM_REGADDR(0x0200)
44#define OMAP5_SCRM_ACCCLKREQ_OFFSET 0x0204
45#define OMAP5_SCRM_ACCCLKREQ OMAP54XX_SCRM_REGADDR(0x0204)
46#define OMAP5_SCRM_PWRREQ_OFFSET 0x0208
47#define OMAP5_SCRM_PWRREQ OMAP54XX_SCRM_REGADDR(0x0208)
48#define OMAP5_SCRM_AUXCLKREQ0_OFFSET 0x0210
49#define OMAP5_SCRM_AUXCLKREQ0 OMAP54XX_SCRM_REGADDR(0x0210)
50#define OMAP5_SCRM_AUXCLKREQ1_OFFSET 0x0214
51#define OMAP5_SCRM_AUXCLKREQ1 OMAP54XX_SCRM_REGADDR(0x0214)
52#define OMAP5_SCRM_AUXCLKREQ2_OFFSET 0x0218
53#define OMAP5_SCRM_AUXCLKREQ2 OMAP54XX_SCRM_REGADDR(0x0218)
54#define OMAP5_SCRM_AUXCLKREQ3_OFFSET 0x021c
55#define OMAP5_SCRM_AUXCLKREQ3 OMAP54XX_SCRM_REGADDR(0x021c)
56#define OMAP5_SCRM_AUXCLKREQ4_OFFSET 0x0220
57#define OMAP5_SCRM_AUXCLKREQ4 OMAP54XX_SCRM_REGADDR(0x0220)
58#define OMAP5_SCRM_AUXCLKREQ5_OFFSET 0x0224
59#define OMAP5_SCRM_AUXCLKREQ5 OMAP54XX_SCRM_REGADDR(0x0224)
60#define OMAP5_SCRM_D2DCLKREQ_OFFSET 0x0234
61#define OMAP5_SCRM_D2DCLKREQ OMAP54XX_SCRM_REGADDR(0x0234)
62#define OMAP5_SCRM_AUXCLK0_OFFSET 0x0310
63#define OMAP5_SCRM_AUXCLK0 OMAP54XX_SCRM_REGADDR(0x0310)
64#define OMAP5_SCRM_AUXCLK1_OFFSET 0x0314
65#define OMAP5_SCRM_AUXCLK1 OMAP54XX_SCRM_REGADDR(0x0314)
66#define OMAP5_SCRM_AUXCLK2_OFFSET 0x0318
67#define OMAP5_SCRM_AUXCLK2 OMAP54XX_SCRM_REGADDR(0x0318)
68#define OMAP5_SCRM_AUXCLK3_OFFSET 0x031c
69#define OMAP5_SCRM_AUXCLK3 OMAP54XX_SCRM_REGADDR(0x031c)
70#define OMAP5_SCRM_AUXCLK4_OFFSET 0x0320
71#define OMAP5_SCRM_AUXCLK4 OMAP54XX_SCRM_REGADDR(0x0320)
72#define OMAP5_SCRM_AUXCLK5_OFFSET 0x0324
73#define OMAP5_SCRM_AUXCLK5 OMAP54XX_SCRM_REGADDR(0x0324)
74#define OMAP5_SCRM_RSTTIME_OFFSET 0x0400
75#define OMAP5_SCRM_RSTTIME OMAP54XX_SCRM_REGADDR(0x0400)
76#define OMAP5_SCRM_MODEMRSTCTRL_OFFSET 0x0418
77#define OMAP5_SCRM_MODEMRSTCTRL OMAP54XX_SCRM_REGADDR(0x0418)
78#define OMAP5_SCRM_D2DRSTCTRL_OFFSET 0x041c
79#define OMAP5_SCRM_D2DRSTCTRL OMAP54XX_SCRM_REGADDR(0x041c)
80#define OMAP5_SCRM_EXTPWRONRSTCTRL_OFFSET 0x0420
81#define OMAP5_SCRM_EXTPWRONRSTCTRL OMAP54XX_SCRM_REGADDR(0x0420)
82#define OMAP5_SCRM_EXTWARMRSTST_OFFSET 0x0510
83#define OMAP5_SCRM_EXTWARMRSTST OMAP54XX_SCRM_REGADDR(0x0510)
84#define OMAP5_SCRM_APEWARMRSTST_OFFSET 0x0514
85#define OMAP5_SCRM_APEWARMRSTST OMAP54XX_SCRM_REGADDR(0x0514)
86#define OMAP5_SCRM_MODEMWARMRSTST_OFFSET 0x0518
87#define OMAP5_SCRM_MODEMWARMRSTST OMAP54XX_SCRM_REGADDR(0x0518)
88#define OMAP5_SCRM_D2DWARMRSTST_OFFSET 0x051c
89#define OMAP5_SCRM_D2DWARMRSTST OMAP54XX_SCRM_REGADDR(0x051c)
90
91/*
92 * Used by AUXCLKREQ0, AUXCLKREQ1, AUXCLKREQ2, AUXCLKREQ3, AUXCLKREQ4,
93 * AUXCLKREQ5, D2DCLKREQ
94 */
95#define OMAP5_ACCURACY_SHIFT 1
96#define OMAP5_ACCURACY_WIDTH 0x1
97#define OMAP5_ACCURACY_MASK (1 << 1)
98
99/* Used by APEWARMRSTST */
100#define OMAP5_APEWARMRSTST_SHIFT 1
101#define OMAP5_APEWARMRSTST_WIDTH 0x1
102#define OMAP5_APEWARMRSTST_MASK (1 << 1)
103
104/* Used by AUXCLK0, AUXCLK1, AUXCLK2, AUXCLK3, AUXCLK4, AUXCLK5 */
105#define OMAP5_CLKDIV_SHIFT 16
106#define OMAP5_CLKDIV_WIDTH 0x4
107#define OMAP5_CLKDIV_MASK (0xf << 16)
108
109/* Used by D2DCLKM, MODEMCLKM */
110#define OMAP5_CLK_32KHZ_SHIFT 0
111#define OMAP5_CLK_32KHZ_WIDTH 0x1
112#define OMAP5_CLK_32KHZ_MASK (1 << 0)
113
114/* Used by D2DRSTCTRL, MODEMRSTCTRL */
115#define OMAP5_COLDRST_SHIFT 0
116#define OMAP5_COLDRST_WIDTH 0x1
117#define OMAP5_COLDRST_MASK (1 << 0)
118
119/* Used by D2DWARMRSTST */
120#define OMAP5_D2DWARMRSTST_SHIFT 3
121#define OMAP5_D2DWARMRSTST_WIDTH 0x1
122#define OMAP5_D2DWARMRSTST_MASK (1 << 3)
123
124/* Used by AUXCLK0 */
125#define OMAP5_DISABLECLK_SHIFT 9
126#define OMAP5_DISABLECLK_WIDTH 0x1
127#define OMAP5_DISABLECLK_MASK (1 << 9)
128
129/* Used by CLKSETUPTIME */
130#define OMAP5_DOWNTIME_SHIFT 16
131#define OMAP5_DOWNTIME_WIDTH 0x6
132#define OMAP5_DOWNTIME_MASK (0x3f << 16)
133
134/* Used by AUXCLK0, AUXCLK1, AUXCLK2, AUXCLK3, AUXCLK4, AUXCLK5 */
135#define OMAP5_ENABLE_SHIFT 8
136#define OMAP5_ENABLE_WIDTH 0x1
137#define OMAP5_ENABLE_MASK (1 << 8)
138
139/* Renamed from ENABLE Used by EXTPWRONRSTCTRL */
140#define OMAP5_ENABLE_0_0_SHIFT 0
141#define OMAP5_ENABLE_0_0_WIDTH 0x1
142#define OMAP5_ENABLE_0_0_MASK (1 << 0)
143
144/* Used by ALTCLKSRC */
145#define OMAP5_ENABLE_EXT_SHIFT 3
146#define OMAP5_ENABLE_EXT_WIDTH 0x1
147#define OMAP5_ENABLE_EXT_MASK (1 << 3)
148
149/* Used by ALTCLKSRC */
150#define OMAP5_ENABLE_INT_SHIFT 2
151#define OMAP5_ENABLE_INT_WIDTH 0x1
152#define OMAP5_ENABLE_INT_MASK (1 << 2)
153
154/* Used by EXTWARMRSTST */
155#define OMAP5_EXTWARMRSTST_SHIFT 0
156#define OMAP5_EXTWARMRSTST_WIDTH 0x1
157#define OMAP5_EXTWARMRSTST_MASK (1 << 0)
158
159/*
160 * Used by AUXCLKREQ0, AUXCLKREQ1, AUXCLKREQ2, AUXCLKREQ3, AUXCLKREQ4,
161 * AUXCLKREQ5
162 */
163#define OMAP5_MAPPING_SHIFT 2
164#define OMAP5_MAPPING_WIDTH 0x3
165#define OMAP5_MAPPING_MASK (0x7 << 2)
166
167/* Used by ALTCLKSRC */
168#define OMAP5_MODE_SHIFT 0
169#define OMAP5_MODE_WIDTH 0x2
170#define OMAP5_MODE_MASK (0x3 << 0)
171
172/* Used by MODEMWARMRSTST */
173#define OMAP5_MODEMWARMRSTST_SHIFT 2
174#define OMAP5_MODEMWARMRSTST_WIDTH 0x1
175#define OMAP5_MODEMWARMRSTST_MASK (1 << 2)
176
177/*
178 * Used by ACCCLKREQ, AUXCLK0, AUXCLK1, AUXCLK2, AUXCLK3, AUXCLK4, AUXCLK5,
179 * AUXCLKREQ0, AUXCLKREQ1, AUXCLKREQ2, AUXCLKREQ3, AUXCLKREQ4, AUXCLKREQ5,
180 * D2DCLKREQ, EXTCLKREQ, PWRREQ
181 */
182#define OMAP5_POLARITY_SHIFT 0
183#define OMAP5_POLARITY_WIDTH 0x1
184#define OMAP5_POLARITY_MASK (1 << 0)
185
186/* Used by EXTPWRONRSTCTRL */
187#define OMAP5_PWRONRST_SHIFT 1
188#define OMAP5_PWRONRST_WIDTH 0x1
189#define OMAP5_PWRONRST_MASK (1 << 1)
190
191/* Used by REVISION_SCRM */
192#define OMAP5_REV_SHIFT 0
193#define OMAP5_REV_WIDTH 0x8
194#define OMAP5_REV_MASK (0xff << 0)
195
196/* Used by RSTTIME */
197#define OMAP5_RSTTIME_SHIFT 0
198#define OMAP5_RSTTIME_WIDTH 0x4
199#define OMAP5_RSTTIME_MASK (0xf << 0)
200
201/* Used by CLKSETUPTIME */
202#define OMAP5_SETUPTIME_SHIFT 0
203#define OMAP5_SETUPTIME_WIDTH 0xc
204#define OMAP5_SETUPTIME_MASK (0xfff << 0)
205
206/* Used by PMICSETUPTIME */
207#define OMAP5_SLEEPTIME_SHIFT 0
208#define OMAP5_SLEEPTIME_WIDTH 0x6
209#define OMAP5_SLEEPTIME_MASK (0x3f << 0)
210
211/* Used by AUXCLK0, AUXCLK1, AUXCLK2, AUXCLK3, AUXCLK4, AUXCLK5 */
212#define OMAP5_SRCSELECT_SHIFT 1
213#define OMAP5_SRCSELECT_WIDTH 0x2
214#define OMAP5_SRCSELECT_MASK (0x3 << 1)
215
216/* Used by D2DCLKM */
217#define OMAP5_SYSCLK_SHIFT 1
218#define OMAP5_SYSCLK_WIDTH 0x1
219#define OMAP5_SYSCLK_MASK (1 << 1)
220
221/* Used by PMICSETUPTIME */
222#define OMAP5_WAKEUPTIME_SHIFT 16
223#define OMAP5_WAKEUPTIME_WIDTH 0x6
224#define OMAP5_WAKEUPTIME_MASK (0x3f << 16)
225
226/* Used by D2DRSTCTRL, MODEMRSTCTRL */
227#define OMAP5_WARMRST_SHIFT 1
228#define OMAP5_WARMRST_WIDTH 0x1
229#define OMAP5_WARMRST_MASK (1 << 1)
230
231#endif
diff --git a/arch/arm/mach-omap2/serial.c b/arch/arm/mach-omap2/serial.c
index f6601563aa69..a388f8c1bcb3 100644
--- a/arch/arm/mach-omap2/serial.c
+++ b/arch/arm/mach-omap2/serial.c
@@ -63,7 +63,6 @@ struct omap_uart_state {
63static LIST_HEAD(uart_list); 63static LIST_HEAD(uart_list);
64static u8 num_uarts; 64static u8 num_uarts;
65static u8 console_uart_id = -1; 65static u8 console_uart_id = -1;
66static u8 no_console_suspend;
67static u8 uart_debug; 66static u8 uart_debug;
68 67
69#define DEFAULT_RXDMA_POLLRATE 1 /* RX DMA polling rate (us) */ 68#define DEFAULT_RXDMA_POLLRATE 1 /* RX DMA polling rate (us) */
@@ -176,6 +175,9 @@ static char *cmdline_find_option(char *str)
176 175
177static int __init omap_serial_early_init(void) 176static int __init omap_serial_early_init(void)
178{ 177{
178 if (of_have_populated_dt())
179 return -ENODEV;
180
179 do { 181 do {
180 char oh_name[MAX_UART_HWMOD_NAME_LEN]; 182 char oh_name[MAX_UART_HWMOD_NAME_LEN];
181 struct omap_hwmod *oh; 183 struct omap_hwmod *oh;
@@ -206,20 +208,6 @@ static int __init omap_serial_early_init(void)
206 pr_info("%s used as console in debug mode: uart%d clocks will not be gated", 208 pr_info("%s used as console in debug mode: uart%d clocks will not be gated",
207 uart_name, uart->num); 209 uart_name, uart->num);
208 } 210 }
209
210 if (cmdline_find_option("no_console_suspend"))
211 no_console_suspend = true;
212
213 /*
214 * omap-uart can be used for earlyprintk logs
215 * So if omap-uart is used as console then prevent
216 * uart reset and idle to get logs from omap-uart
217 * until uart console driver is available to take
218 * care for console messages.
219 * Idling or resetting omap-uart while printing logs
220 * early boot logs can stall the boot-up.
221 */
222 oh->flags |= HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET;
223 } 211 }
224 } while (1); 212 } while (1);
225 213
@@ -292,9 +280,6 @@ void __init omap_serial_init_port(struct omap_board_data *bdata,
292 return; 280 return;
293 } 281 }
294 282
295 if ((console_uart_id == bdata->id) && no_console_suspend)
296 omap_device_disable_idle_on_suspend(pdev);
297
298 oh->mux = omap_hwmod_mux_init(bdata->pads, bdata->pads_cnt); 283 oh->mux = omap_hwmod_mux_init(bdata->pads, bdata->pads_cnt);
299 284
300 if (console_uart_id == bdata->id) { 285 if (console_uart_id == bdata->id) {
diff --git a/arch/arm/mach-omap2/sleep44xx.S b/arch/arm/mach-omap2/sleep44xx.S
index 88ff83a0942e..9086ce03ae12 100644
--- a/arch/arm/mach-omap2/sleep44xx.S
+++ b/arch/arm/mach-omap2/sleep44xx.S
@@ -34,6 +34,8 @@ ppa_zero_params:
34ppa_por_params: 34ppa_por_params:
35 .word 1, 0 35 .word 1, 0
36 36
37#ifdef CONFIG_ARCH_OMAP4
38
37/* 39/*
38 * ============================= 40 * =============================
39 * == CPU suspend finisher == 41 * == CPU suspend finisher ==
@@ -326,7 +328,9 @@ skip_l2en:
326 328
327 b cpu_resume @ Jump to generic resume 329 b cpu_resume @ Jump to generic resume
328ENDPROC(omap4_cpu_resume) 330ENDPROC(omap4_cpu_resume)
329#endif 331#endif /* CONFIG_ARCH_OMAP4 */
332
333#endif /* defined(CONFIG_SMP) && defined(CONFIG_PM) */
330 334
331#ifndef CONFIG_OMAP4_ERRATA_I688 335#ifndef CONFIG_OMAP4_ERRATA_I688
332ENTRY(omap_bus_sync) 336ENTRY(omap_bus_sync)
diff --git a/arch/arm/mach-omap2/smartreflex-class3.c b/arch/arm/mach-omap2/smartreflex-class3.c
index aee3c8940a30..7a42e1960c3b 100644
--- a/arch/arm/mach-omap2/smartreflex-class3.c
+++ b/arch/arm/mach-omap2/smartreflex-class3.c
@@ -26,14 +26,14 @@ static int sr_class3_enable(struct omap_sr *sr)
26 } 26 }
27 27
28 omap_vp_enable(sr->voltdm); 28 omap_vp_enable(sr->voltdm);
29 return sr_enable(sr->voltdm, volt); 29 return sr_enable(sr, volt);
30} 30}
31 31
32static int sr_class3_disable(struct omap_sr *sr, int is_volt_reset) 32static int sr_class3_disable(struct omap_sr *sr, int is_volt_reset)
33{ 33{
34 sr_disable_errgen(sr->voltdm); 34 sr_disable_errgen(sr);
35 omap_vp_disable(sr->voltdm); 35 omap_vp_disable(sr->voltdm);
36 sr_disable(sr->voltdm); 36 sr_disable(sr);
37 if (is_volt_reset) 37 if (is_volt_reset)
38 voltdm_reset(sr->voltdm); 38 voltdm_reset(sr->voltdm);
39 39
@@ -42,7 +42,7 @@ static int sr_class3_disable(struct omap_sr *sr, int is_volt_reset)
42 42
43static int sr_class3_configure(struct omap_sr *sr) 43static int sr_class3_configure(struct omap_sr *sr)
44{ 44{
45 return sr_configure_errgen(sr->voltdm); 45 return sr_configure_errgen(sr);
46} 46}
47 47
48/* SR class3 structure */ 48/* SR class3 structure */
diff --git a/arch/arm/mach-omap2/soc.h b/arch/arm/mach-omap2/soc.h
index 197cc16870d9..8c616e436bc7 100644
--- a/arch/arm/mach-omap2/soc.h
+++ b/arch/arm/mach-omap2/soc.h
@@ -96,6 +96,15 @@
96# endif 96# endif
97#endif 97#endif
98 98
99#ifdef CONFIG_SOC_AM43XX
100# ifdef OMAP_NAME
101# undef MULTI_OMAP2
102# define MULTI_OMAP2
103# else
104# define OMAP_NAME am43xx
105# endif
106#endif
107
99/* 108/*
100 * Omap device type i.e. EMU/HS/TST/GP/BAD 109 * Omap device type i.e. EMU/HS/TST/GP/BAD
101 */ 110 */
@@ -187,6 +196,7 @@ IS_OMAP_CLASS(44xx, 0x44)
187IS_AM_CLASS(35xx, 0x35) 196IS_AM_CLASS(35xx, 0x35)
188IS_OMAP_CLASS(54xx, 0x54) 197IS_OMAP_CLASS(54xx, 0x54)
189IS_AM_CLASS(33xx, 0x33) 198IS_AM_CLASS(33xx, 0x33)
199IS_AM_CLASS(43xx, 0x43)
190 200
191IS_TI_CLASS(81xx, 0x81) 201IS_TI_CLASS(81xx, 0x81)
192 202
@@ -202,6 +212,7 @@ IS_OMAP_SUBCLASS(543x, 0x543)
202IS_TI_SUBCLASS(816x, 0x816) 212IS_TI_SUBCLASS(816x, 0x816)
203IS_TI_SUBCLASS(814x, 0x814) 213IS_TI_SUBCLASS(814x, 0x814)
204IS_AM_SUBCLASS(335x, 0x335) 214IS_AM_SUBCLASS(335x, 0x335)
215IS_AM_SUBCLASS(437x, 0x437)
205 216
206#define cpu_is_omap24xx() 0 217#define cpu_is_omap24xx() 0
207#define cpu_is_omap242x() 0 218#define cpu_is_omap242x() 0
@@ -214,6 +225,8 @@ IS_AM_SUBCLASS(335x, 0x335)
214#define soc_is_am35xx() 0 225#define soc_is_am35xx() 0
215#define soc_is_am33xx() 0 226#define soc_is_am33xx() 0
216#define soc_is_am335x() 0 227#define soc_is_am335x() 0
228#define soc_is_am43xx() 0
229#define soc_is_am437x() 0
217#define cpu_is_omap44xx() 0 230#define cpu_is_omap44xx() 0
218#define cpu_is_omap443x() 0 231#define cpu_is_omap443x() 0
219#define cpu_is_omap446x() 0 232#define cpu_is_omap446x() 0
@@ -341,6 +354,13 @@ IS_OMAP_TYPE(3430, 0x3430)
341# define soc_is_am335x() is_am335x() 354# define soc_is_am335x() is_am335x()
342#endif 355#endif
343 356
357#ifdef CONFIG_SOC_AM43XX
358# undef soc_is_am43xx
359# undef soc_is_am437x
360# define soc_is_am43xx() is_am43xx()
361# define soc_is_am437x() is_am437x()
362#endif
363
344# if defined(CONFIG_ARCH_OMAP4) 364# if defined(CONFIG_ARCH_OMAP4)
345# undef cpu_is_omap44xx 365# undef cpu_is_omap44xx
346# undef cpu_is_omap443x 366# undef cpu_is_omap443x
@@ -383,6 +403,8 @@ IS_OMAP_TYPE(3430, 0x3430)
383#define TI816X_CLASS 0x81600034 403#define TI816X_CLASS 0x81600034
384#define TI8168_REV_ES1_0 TI816X_CLASS 404#define TI8168_REV_ES1_0 TI816X_CLASS
385#define TI8168_REV_ES1_1 (TI816X_CLASS | (0x1 << 8)) 405#define TI8168_REV_ES1_1 (TI816X_CLASS | (0x1 << 8))
406#define TI8168_REV_ES2_0 (TI816X_CLASS | (0x2 << 8))
407#define TI8168_REV_ES2_1 (TI816X_CLASS | (0x3 << 8))
386 408
387#define TI814X_CLASS 0x81400034 409#define TI814X_CLASS 0x81400034
388#define TI8148_REV_ES1_0 TI814X_CLASS 410#define TI8148_REV_ES1_0 TI814X_CLASS
@@ -398,6 +420,9 @@ IS_OMAP_TYPE(3430, 0x3430)
398#define AM335X_REV_ES2_0 (AM335X_CLASS | (0x1 << 8)) 420#define AM335X_REV_ES2_0 (AM335X_CLASS | (0x1 << 8))
399#define AM335X_REV_ES2_1 (AM335X_CLASS | (0x2 << 8)) 421#define AM335X_REV_ES2_1 (AM335X_CLASS | (0x2 << 8))
400 422
423#define AM437X_CLASS 0x43700000
424#define AM437X_REV_ES1_0 AM437X_CLASS
425
401#define OMAP443X_CLASS 0x44300044 426#define OMAP443X_CLASS 0x44300044
402#define OMAP4430_REV_ES1_0 (OMAP443X_CLASS | (0x10 << 8)) 427#define OMAP4430_REV_ES1_0 (OMAP443X_CLASS | (0x10 << 8))
403#define OMAP4430_REV_ES2_0 (OMAP443X_CLASS | (0x20 << 8)) 428#define OMAP4430_REV_ES2_0 (OMAP443X_CLASS | (0x20 << 8))
@@ -424,6 +449,7 @@ void omap4xxx_check_revision(void);
424void omap5xxx_check_revision(void); 449void omap5xxx_check_revision(void);
425void omap3xxx_check_features(void); 450void omap3xxx_check_features(void);
426void ti81xx_check_features(void); 451void ti81xx_check_features(void);
452void am33xx_check_features(void);
427void omap4xxx_check_features(void); 453void omap4xxx_check_features(void);
428 454
429/* 455/*
diff --git a/arch/arm/mach-omap2/sram.c b/arch/arm/mach-omap2/sram.c
index 0ff0f068bea8..4bd096836235 100644
--- a/arch/arm/mach-omap2/sram.c
+++ b/arch/arm/mach-omap2/sram.c
@@ -119,6 +119,9 @@ static void __init omap_detect_sram(void)
119 if (soc_is_am33xx()) { 119 if (soc_is_am33xx()) {
120 omap_sram_start = AM33XX_SRAM_PA; 120 omap_sram_start = AM33XX_SRAM_PA;
121 omap_sram_size = 0x10000; /* 64K */ 121 omap_sram_size = 0x10000; /* 64K */
122 } else if (soc_is_am43xx()) {
123 omap_sram_start = AM33XX_SRAM_PA;
124 omap_sram_size = SZ_256K;
122 } else if (cpu_is_omap34xx()) { 125 } else if (cpu_is_omap34xx()) {
123 omap_sram_start = OMAP3_SRAM_PA; 126 omap_sram_start = OMAP3_SRAM_PA;
124 omap_sram_size = 0x10000; /* 64K */ 127 omap_sram_size = 0x10000; /* 64K */
diff --git a/arch/arm/mach-omap2/timer.c b/arch/arm/mach-omap2/timer.c
index f8b23b8040d9..b37e1fcbad56 100644
--- a/arch/arm/mach-omap2/timer.c
+++ b/arch/arm/mach-omap2/timer.c
@@ -41,10 +41,10 @@
41#include <linux/of_irq.h> 41#include <linux/of_irq.h>
42#include <linux/platform_device.h> 42#include <linux/platform_device.h>
43#include <linux/platform_data/dmtimer-omap.h> 43#include <linux/platform_data/dmtimer-omap.h>
44#include <linux/sched_clock.h>
44 45
45#include <asm/mach/time.h> 46#include <asm/mach/time.h>
46#include <asm/smp_twd.h> 47#include <asm/smp_twd.h>
47#include <asm/sched_clock.h>
48 48
49#include "omap_hwmod.h" 49#include "omap_hwmod.h"
50#include "omap_device.h" 50#include "omap_device.h"
@@ -220,7 +220,7 @@ static int __init omap_dm_timer_init_one(struct omap_dm_timer *timer,
220 int posted) 220 int posted)
221{ 221{
222 char name[10]; /* 10 = sizeof("gptXX_Xck0") */ 222 char name[10]; /* 10 = sizeof("gptXX_Xck0") */
223 const char *oh_name; 223 const char *oh_name = NULL;
224 struct device_node *np; 224 struct device_node *np;
225 struct omap_hwmod *oh; 225 struct omap_hwmod *oh;
226 struct resource irq, mem; 226 struct resource irq, mem;
@@ -582,7 +582,7 @@ OMAP_SYS_32K_TIMER_INIT(2, 1, "timer_32k_ck", "ti,timer-alwon",
582 2, "timer_sys_ck", NULL); 582 2, "timer_sys_ck", NULL);
583#endif /* CONFIG_ARCH_OMAP2 */ 583#endif /* CONFIG_ARCH_OMAP2 */
584 584
585#ifdef CONFIG_ARCH_OMAP3 585#if defined(CONFIG_ARCH_OMAP3) || defined(CONFIG_SOC_AM43XX)
586OMAP_SYS_32K_TIMER_INIT(3, 1, "timer_32k_ck", "ti,timer-alwon", 586OMAP_SYS_32K_TIMER_INIT(3, 1, "timer_32k_ck", "ti,timer-alwon",
587 2, "timer_sys_ck", NULL); 587 2, "timer_sys_ck", NULL);
588OMAP_SYS_32K_TIMER_INIT(3_secure, 12, "secure_32k_fck", "ti,timer-secure", 588OMAP_SYS_32K_TIMER_INIT(3_secure, 12, "secure_32k_fck", "ti,timer-secure",
diff --git a/arch/arm/mach-omap2/twl-common.c b/arch/arm/mach-omap2/twl-common.c
index 51e138cc5398..c05898fbd634 100644
--- a/arch/arm/mach-omap2/twl-common.c
+++ b/arch/arm/mach-omap2/twl-common.c
@@ -140,6 +140,7 @@ static struct regulator_init_data omap3_vdac_idata = {
140 140
141static struct regulator_consumer_supply omap3_vpll2_supplies[] = { 141static struct regulator_consumer_supply omap3_vpll2_supplies[] = {
142 REGULATOR_SUPPLY("vdds_dsi", "omapdss"), 142 REGULATOR_SUPPLY("vdds_dsi", "omapdss"),
143 REGULATOR_SUPPLY("vdds_dsi", "omapdss_dpi.0"),
143 REGULATOR_SUPPLY("vdds_dsi", "omapdss_dsi.0"), 144 REGULATOR_SUPPLY("vdds_dsi", "omapdss_dsi.0"),
144}; 145};
145 146
diff --git a/arch/arm/mach-omap2/usb-host.c b/arch/arm/mach-omap2/usb-host.c
index aa27d7f5cbb7..2eb19d4d0aa1 100644
--- a/arch/arm/mach-omap2/usb-host.c
+++ b/arch/arm/mach-omap2/usb-host.c
@@ -28,6 +28,7 @@
28#include <linux/io.h> 28#include <linux/io.h>
29#include <linux/gpio.h> 29#include <linux/gpio.h>
30#include <linux/usb/phy.h> 30#include <linux/usb/phy.h>
31#include <linux/usb/nop-usb-xceiv.h>
31 32
32#include "soc.h" 33#include "soc.h"
33#include "omap_device.h" 34#include "omap_device.h"
@@ -188,125 +189,6 @@ static void __init setup_ehci_io_mux(const enum usbhs_omap_port_mode *port_mode)
188 return; 189 return;
189} 190}
190 191
191static
192void __init setup_4430ehci_io_mux(const enum usbhs_omap_port_mode *port_mode)
193{
194 switch (port_mode[0]) {
195 case OMAP_EHCI_PORT_MODE_PHY:
196 omap_mux_init_signal("usbb1_ulpiphy_stp",
197 OMAP_PIN_OUTPUT);
198 omap_mux_init_signal("usbb1_ulpiphy_clk",
199 OMAP_PIN_INPUT_PULLDOWN);
200 omap_mux_init_signal("usbb1_ulpiphy_dir",
201 OMAP_PIN_INPUT_PULLDOWN);
202 omap_mux_init_signal("usbb1_ulpiphy_nxt",
203 OMAP_PIN_INPUT_PULLDOWN);
204 omap_mux_init_signal("usbb1_ulpiphy_dat0",
205 OMAP_PIN_INPUT_PULLDOWN);
206 omap_mux_init_signal("usbb1_ulpiphy_dat1",
207 OMAP_PIN_INPUT_PULLDOWN);
208 omap_mux_init_signal("usbb1_ulpiphy_dat2",
209 OMAP_PIN_INPUT_PULLDOWN);
210 omap_mux_init_signal("usbb1_ulpiphy_dat3",
211 OMAP_PIN_INPUT_PULLDOWN);
212 omap_mux_init_signal("usbb1_ulpiphy_dat4",
213 OMAP_PIN_INPUT_PULLDOWN);
214 omap_mux_init_signal("usbb1_ulpiphy_dat5",
215 OMAP_PIN_INPUT_PULLDOWN);
216 omap_mux_init_signal("usbb1_ulpiphy_dat6",
217 OMAP_PIN_INPUT_PULLDOWN);
218 omap_mux_init_signal("usbb1_ulpiphy_dat7",
219 OMAP_PIN_INPUT_PULLDOWN);
220 break;
221 case OMAP_EHCI_PORT_MODE_TLL:
222 omap_mux_init_signal("usbb1_ulpitll_stp",
223 OMAP_PIN_INPUT_PULLUP);
224 omap_mux_init_signal("usbb1_ulpitll_clk",
225 OMAP_PIN_INPUT_PULLDOWN);
226 omap_mux_init_signal("usbb1_ulpitll_dir",
227 OMAP_PIN_INPUT_PULLDOWN);
228 omap_mux_init_signal("usbb1_ulpitll_nxt",
229 OMAP_PIN_INPUT_PULLDOWN);
230 omap_mux_init_signal("usbb1_ulpitll_dat0",
231 OMAP_PIN_INPUT_PULLDOWN);
232 omap_mux_init_signal("usbb1_ulpitll_dat1",
233 OMAP_PIN_INPUT_PULLDOWN);
234 omap_mux_init_signal("usbb1_ulpitll_dat2",
235 OMAP_PIN_INPUT_PULLDOWN);
236 omap_mux_init_signal("usbb1_ulpitll_dat3",
237 OMAP_PIN_INPUT_PULLDOWN);
238 omap_mux_init_signal("usbb1_ulpitll_dat4",
239 OMAP_PIN_INPUT_PULLDOWN);
240 omap_mux_init_signal("usbb1_ulpitll_dat5",
241 OMAP_PIN_INPUT_PULLDOWN);
242 omap_mux_init_signal("usbb1_ulpitll_dat6",
243 OMAP_PIN_INPUT_PULLDOWN);
244 omap_mux_init_signal("usbb1_ulpitll_dat7",
245 OMAP_PIN_INPUT_PULLDOWN);
246 break;
247 case OMAP_USBHS_PORT_MODE_UNUSED:
248 default:
249 break;
250 }
251 switch (port_mode[1]) {
252 case OMAP_EHCI_PORT_MODE_PHY:
253 omap_mux_init_signal("usbb2_ulpiphy_stp",
254 OMAP_PIN_OUTPUT);
255 omap_mux_init_signal("usbb2_ulpiphy_clk",
256 OMAP_PIN_INPUT_PULLDOWN);
257 omap_mux_init_signal("usbb2_ulpiphy_dir",
258 OMAP_PIN_INPUT_PULLDOWN);
259 omap_mux_init_signal("usbb2_ulpiphy_nxt",
260 OMAP_PIN_INPUT_PULLDOWN);
261 omap_mux_init_signal("usbb2_ulpiphy_dat0",
262 OMAP_PIN_INPUT_PULLDOWN);
263 omap_mux_init_signal("usbb2_ulpiphy_dat1",
264 OMAP_PIN_INPUT_PULLDOWN);
265 omap_mux_init_signal("usbb2_ulpiphy_dat2",
266 OMAP_PIN_INPUT_PULLDOWN);
267 omap_mux_init_signal("usbb2_ulpiphy_dat3",
268 OMAP_PIN_INPUT_PULLDOWN);
269 omap_mux_init_signal("usbb2_ulpiphy_dat4",
270 OMAP_PIN_INPUT_PULLDOWN);
271 omap_mux_init_signal("usbb2_ulpiphy_dat5",
272 OMAP_PIN_INPUT_PULLDOWN);
273 omap_mux_init_signal("usbb2_ulpiphy_dat6",
274 OMAP_PIN_INPUT_PULLDOWN);
275 omap_mux_init_signal("usbb2_ulpiphy_dat7",
276 OMAP_PIN_INPUT_PULLDOWN);
277 break;
278 case OMAP_EHCI_PORT_MODE_TLL:
279 omap_mux_init_signal("usbb2_ulpitll_stp",
280 OMAP_PIN_INPUT_PULLUP);
281 omap_mux_init_signal("usbb2_ulpitll_clk",
282 OMAP_PIN_INPUT_PULLDOWN);
283 omap_mux_init_signal("usbb2_ulpitll_dir",
284 OMAP_PIN_INPUT_PULLDOWN);
285 omap_mux_init_signal("usbb2_ulpitll_nxt",
286 OMAP_PIN_INPUT_PULLDOWN);
287 omap_mux_init_signal("usbb2_ulpitll_dat0",
288 OMAP_PIN_INPUT_PULLDOWN);
289 omap_mux_init_signal("usbb2_ulpitll_dat1",
290 OMAP_PIN_INPUT_PULLDOWN);
291 omap_mux_init_signal("usbb2_ulpitll_dat2",
292 OMAP_PIN_INPUT_PULLDOWN);
293 omap_mux_init_signal("usbb2_ulpitll_dat3",
294 OMAP_PIN_INPUT_PULLDOWN);
295 omap_mux_init_signal("usbb2_ulpitll_dat4",
296 OMAP_PIN_INPUT_PULLDOWN);
297 omap_mux_init_signal("usbb2_ulpitll_dat5",
298 OMAP_PIN_INPUT_PULLDOWN);
299 omap_mux_init_signal("usbb2_ulpitll_dat6",
300 OMAP_PIN_INPUT_PULLDOWN);
301 omap_mux_init_signal("usbb2_ulpitll_dat7",
302 OMAP_PIN_INPUT_PULLDOWN);
303 break;
304 case OMAP_USBHS_PORT_MODE_UNUSED:
305 default:
306 break;
307 }
308}
309
310static void __init setup_ohci_io_mux(const enum usbhs_omap_port_mode *port_mode) 192static void __init setup_ohci_io_mux(const enum usbhs_omap_port_mode *port_mode)
311{ 193{
312 switch (port_mode[0]) { 194 switch (port_mode[0]) {
@@ -404,78 +286,6 @@ static void __init setup_ohci_io_mux(const enum usbhs_omap_port_mode *port_mode)
404 } 286 }
405} 287}
406 288
407static
408void __init setup_4430ohci_io_mux(const enum usbhs_omap_port_mode *port_mode)
409{
410 switch (port_mode[0]) {
411 case OMAP_OHCI_PORT_MODE_PHY_6PIN_DATSE0:
412 case OMAP_OHCI_PORT_MODE_PHY_6PIN_DPDM:
413 case OMAP_OHCI_PORT_MODE_TLL_6PIN_DATSE0:
414 case OMAP_OHCI_PORT_MODE_TLL_6PIN_DPDM:
415 omap_mux_init_signal("usbb1_mm_rxdp",
416 OMAP_PIN_INPUT_PULLDOWN);
417 omap_mux_init_signal("usbb1_mm_rxdm",
418 OMAP_PIN_INPUT_PULLDOWN);
419
420 case OMAP_OHCI_PORT_MODE_PHY_4PIN_DPDM:
421 case OMAP_OHCI_PORT_MODE_TLL_4PIN_DPDM:
422 omap_mux_init_signal("usbb1_mm_rxrcv",
423 OMAP_PIN_INPUT_PULLDOWN);
424
425 case OMAP_OHCI_PORT_MODE_PHY_3PIN_DATSE0:
426 case OMAP_OHCI_PORT_MODE_TLL_3PIN_DATSE0:
427 omap_mux_init_signal("usbb1_mm_txen",
428 OMAP_PIN_INPUT_PULLDOWN);
429
430
431 case OMAP_OHCI_PORT_MODE_TLL_2PIN_DATSE0:
432 case OMAP_OHCI_PORT_MODE_TLL_2PIN_DPDM:
433 omap_mux_init_signal("usbb1_mm_txdat",
434 OMAP_PIN_INPUT_PULLDOWN);
435 omap_mux_init_signal("usbb1_mm_txse0",
436 OMAP_PIN_INPUT_PULLDOWN);
437 break;
438
439 case OMAP_USBHS_PORT_MODE_UNUSED:
440 default:
441 break;
442 }
443
444 switch (port_mode[1]) {
445 case OMAP_OHCI_PORT_MODE_PHY_6PIN_DATSE0:
446 case OMAP_OHCI_PORT_MODE_PHY_6PIN_DPDM:
447 case OMAP_OHCI_PORT_MODE_TLL_6PIN_DATSE0:
448 case OMAP_OHCI_PORT_MODE_TLL_6PIN_DPDM:
449 omap_mux_init_signal("usbb2_mm_rxdp",
450 OMAP_PIN_INPUT_PULLDOWN);
451 omap_mux_init_signal("usbb2_mm_rxdm",
452 OMAP_PIN_INPUT_PULLDOWN);
453
454 case OMAP_OHCI_PORT_MODE_PHY_4PIN_DPDM:
455 case OMAP_OHCI_PORT_MODE_TLL_4PIN_DPDM:
456 omap_mux_init_signal("usbb2_mm_rxrcv",
457 OMAP_PIN_INPUT_PULLDOWN);
458
459 case OMAP_OHCI_PORT_MODE_PHY_3PIN_DATSE0:
460 case OMAP_OHCI_PORT_MODE_TLL_3PIN_DATSE0:
461 omap_mux_init_signal("usbb2_mm_txen",
462 OMAP_PIN_INPUT_PULLDOWN);
463
464
465 case OMAP_OHCI_PORT_MODE_TLL_2PIN_DATSE0:
466 case OMAP_OHCI_PORT_MODE_TLL_2PIN_DPDM:
467 omap_mux_init_signal("usbb2_mm_txdat",
468 OMAP_PIN_INPUT_PULLDOWN);
469 omap_mux_init_signal("usbb2_mm_txse0",
470 OMAP_PIN_INPUT_PULLDOWN);
471 break;
472
473 case OMAP_USBHS_PORT_MODE_UNUSED:
474 default:
475 break;
476 }
477}
478
479void __init usbhs_init(struct usbhs_omap_platform_data *pdata) 289void __init usbhs_init(struct usbhs_omap_platform_data *pdata)
480{ 290{
481 struct omap_hwmod *uhh_hwm, *tll_hwm; 291 struct omap_hwmod *uhh_hwm, *tll_hwm;
@@ -489,9 +299,6 @@ void __init usbhs_init(struct usbhs_omap_platform_data *pdata)
489 if (omap_rev() <= OMAP3430_REV_ES2_1) 299 if (omap_rev() <= OMAP3430_REV_ES2_1)
490 pdata->single_ulpi_bypass = true; 300 pdata->single_ulpi_bypass = true;
491 301
492 } else if (cpu_is_omap44xx()) {
493 setup_4430ehci_io_mux(pdata->port_mode);
494 setup_4430ohci_io_mux(pdata->port_mode);
495 } 302 }
496 303
497 uhh_hwm = omap_hwmod_lookup(USBHS_UHH_HWMODNAME); 304 uhh_hwm = omap_hwmod_lookup(USBHS_UHH_HWMODNAME);
@@ -560,7 +367,8 @@ static int usbhs_add_regulator(char *name, char *dev_id, char *dev_supply,
560 struct regulator_init_data *reg_data; 367 struct regulator_init_data *reg_data;
561 struct fixed_voltage_config *config; 368 struct fixed_voltage_config *config;
562 struct platform_device *pdev; 369 struct platform_device *pdev;
563 int ret; 370 struct platform_device_info pdevinfo;
371 int ret = -ENOMEM;
564 372
565 supplies = kzalloc(sizeof(*supplies), GFP_KERNEL); 373 supplies = kzalloc(sizeof(*supplies), GFP_KERNEL);
566 if (!supplies) 374 if (!supplies)
@@ -571,7 +379,7 @@ static int usbhs_add_regulator(char *name, char *dev_id, char *dev_supply,
571 379
572 reg_data = kzalloc(sizeof(*reg_data), GFP_KERNEL); 380 reg_data = kzalloc(sizeof(*reg_data), GFP_KERNEL);
573 if (!reg_data) 381 if (!reg_data)
574 return -ENOMEM; 382 goto err_data;
575 383
576 reg_data->constraints.valid_ops_mask = REGULATOR_CHANGE_STATUS; 384 reg_data->constraints.valid_ops_mask = REGULATOR_CHANGE_STATUS;
577 reg_data->consumer_supplies = supplies; 385 reg_data->consumer_supplies = supplies;
@@ -580,39 +388,53 @@ static int usbhs_add_regulator(char *name, char *dev_id, char *dev_supply,
580 config = kmemdup(&hsusb_reg_config, sizeof(hsusb_reg_config), 388 config = kmemdup(&hsusb_reg_config, sizeof(hsusb_reg_config),
581 GFP_KERNEL); 389 GFP_KERNEL);
582 if (!config) 390 if (!config)
583 return -ENOMEM; 391 goto err_config;
392
393 config->supply_name = kstrdup(name, GFP_KERNEL);
394 if (!config->supply_name)
395 goto err_supplyname;
584 396
585 config->supply_name = name;
586 config->gpio = gpio; 397 config->gpio = gpio;
587 config->enable_high = polarity; 398 config->enable_high = polarity;
588 config->init_data = reg_data; 399 config->init_data = reg_data;
589 400
590 /* create a regulator device */ 401 /* create a regulator device */
591 pdev = kzalloc(sizeof(*pdev), GFP_KERNEL); 402 memset(&pdevinfo, 0, sizeof(pdevinfo));
592 if (!pdev) 403 pdevinfo.name = reg_name;
593 return -ENOMEM; 404 pdevinfo.id = PLATFORM_DEVID_AUTO;
405 pdevinfo.data = config;
406 pdevinfo.size_data = sizeof(*config);
594 407
595 pdev->id = PLATFORM_DEVID_AUTO; 408 pdev = platform_device_register_full(&pdevinfo);
596 pdev->name = reg_name; 409 if (IS_ERR(pdev)) {
597 pdev->dev.platform_data = config; 410 ret = PTR_ERR(pdev);
411 pr_err("%s: Failed registering regulator %s for %s : %d\n",
412 __func__, name, dev_id, ret);
413 goto err_register;
414 }
598 415
599 ret = platform_device_register(pdev); 416 return 0;
600 if (ret)
601 pr_err("%s: Failed registering regulator %s for %s\n",
602 __func__, name, dev_id);
603 417
418err_register:
419 kfree(config->supply_name);
420err_supplyname:
421 kfree(config);
422err_config:
423 kfree(reg_data);
424err_data:
425 kfree(supplies);
604 return ret; 426 return ret;
605} 427}
606 428
429#define MAX_STR 20
430
607int usbhs_init_phys(struct usbhs_phy_data *phy, int num_phys) 431int usbhs_init_phys(struct usbhs_phy_data *phy, int num_phys)
608{ 432{
609 char *rail_name; 433 char rail_name[MAX_STR];
610 int i, len; 434 int i;
611 struct platform_device *pdev; 435 struct platform_device *pdev;
612 char *phy_id; 436 char *phy_id;
613 437 struct platform_device_info pdevinfo;
614 /* the phy_id will be something like "nop_usb_xceiv.1" */
615 len = strlen(nop_name) + 3; /* 3 -> ".1" and NULL terminator */
616 438
617 for (i = 0; i < num_phys; i++) { 439 for (i = 0; i < num_phys; i++) {
618 440
@@ -627,25 +449,26 @@ int usbhs_init_phys(struct usbhs_phy_data *phy, int num_phys)
627 !gpio_is_valid(phy->vcc_gpio)) 449 !gpio_is_valid(phy->vcc_gpio))
628 continue; 450 continue;
629 451
630 /* create a NOP PHY device */ 452 phy_id = kmalloc(MAX_STR, GFP_KERNEL);
631 pdev = kzalloc(sizeof(*pdev), GFP_KERNEL); 453 if (!phy_id) {
632 if (!pdev) 454 pr_err("%s: kmalloc() failed\n", __func__);
633 return -ENOMEM; 455 return -ENOMEM;
456 }
634 457
635 pdev->id = phy->port; 458 /* create a NOP PHY device */
636 pdev->name = nop_name; 459 memset(&pdevinfo, 0, sizeof(pdevinfo));
637 pdev->dev.platform_data = phy->platform_data; 460 pdevinfo.name = nop_name;
638 461 pdevinfo.id = phy->port;
639 phy_id = kmalloc(len, GFP_KERNEL); 462 pdevinfo.data = phy->platform_data;
640 if (!phy_id) 463 pdevinfo.size_data = sizeof(struct nop_usb_xceiv_platform_data);
641 return -ENOMEM; 464
642 465 scnprintf(phy_id, MAX_STR, "nop_usb_xceiv.%d",
643 scnprintf(phy_id, len, "nop_usb_xceiv.%d\n", 466 phy->port);
644 pdev->id); 467 pdev = platform_device_register_full(&pdevinfo);
645 468 if (IS_ERR(pdev)) {
646 if (platform_device_register(pdev)) { 469 pr_err("%s: Failed to register device %s : %ld\n",
647 pr_err("%s: Failed to register device %s\n", 470 __func__, phy_id, PTR_ERR(pdev));
648 __func__, phy_id); 471 kfree(phy_id);
649 continue; 472 continue;
650 } 473 }
651 474
@@ -653,26 +476,15 @@ int usbhs_init_phys(struct usbhs_phy_data *phy, int num_phys)
653 476
654 /* Do we need RESET regulator ? */ 477 /* Do we need RESET regulator ? */
655 if (gpio_is_valid(phy->reset_gpio)) { 478 if (gpio_is_valid(phy->reset_gpio)) {
656 479 scnprintf(rail_name, MAX_STR,
657 rail_name = kmalloc(13, GFP_KERNEL); 480 "hsusb%d_reset", phy->port);
658 if (!rail_name)
659 return -ENOMEM;
660
661 scnprintf(rail_name, 13, "hsusb%d_reset", phy->port);
662
663 usbhs_add_regulator(rail_name, phy_id, "reset", 481 usbhs_add_regulator(rail_name, phy_id, "reset",
664 phy->reset_gpio, 1); 482 phy->reset_gpio, 1);
665 } 483 }
666 484
667 /* Do we need VCC regulator ? */ 485 /* Do we need VCC regulator ? */
668 if (gpio_is_valid(phy->vcc_gpio)) { 486 if (gpio_is_valid(phy->vcc_gpio)) {
669 487 scnprintf(rail_name, MAX_STR, "hsusb%d_vcc", phy->port);
670 rail_name = kmalloc(13, GFP_KERNEL);
671 if (!rail_name)
672 return -ENOMEM;
673
674 scnprintf(rail_name, 13, "hsusb%d_vcc", phy->port);
675
676 usbhs_add_regulator(rail_name, phy_id, "vcc", 488 usbhs_add_regulator(rail_name, phy_id, "vcc",
677 phy->vcc_gpio, phy->vcc_polarity); 489 phy->vcc_gpio, phy->vcc_polarity);
678 } 490 }
diff --git a/arch/arm/mach-omap2/usb-musb.c b/arch/arm/mach-omap2/usb-musb.c
index 3242a554ad6b..8c4de2708cf2 100644
--- a/arch/arm/mach-omap2/usb-musb.c
+++ b/arch/arm/mach-omap2/usb-musb.c
@@ -85,9 +85,6 @@ void __init usb_musb_init(struct omap_musb_board_data *musb_board_data)
85 musb_plat.mode = board_data->mode; 85 musb_plat.mode = board_data->mode;
86 musb_plat.extvbus = board_data->extvbus; 86 musb_plat.extvbus = board_data->extvbus;
87 87
88 if (cpu_is_omap44xx())
89 musb_plat.has_mailbox = true;
90
91 if (soc_is_am35xx()) { 88 if (soc_is_am35xx()) {
92 oh_name = "am35x_otg_hs"; 89 oh_name = "am35x_otg_hs";
93 name = "musb-am35x"; 90 name = "musb-am35x";
diff --git a/arch/arm/mach-omap2/voltage.h b/arch/arm/mach-omap2/voltage.h
index a0ce4f10ff13..f7f2879b31b0 100644
--- a/arch/arm/mach-omap2/voltage.h
+++ b/arch/arm/mach-omap2/voltage.h
@@ -169,8 +169,8 @@ int omap_voltage_late_init(void);
169 169
170extern void omap2xxx_voltagedomains_init(void); 170extern void omap2xxx_voltagedomains_init(void);
171extern void omap3xxx_voltagedomains_init(void); 171extern void omap3xxx_voltagedomains_init(void);
172extern void am33xx_voltagedomains_init(void);
173extern void omap44xx_voltagedomains_init(void); 172extern void omap44xx_voltagedomains_init(void);
173extern void omap54xx_voltagedomains_init(void);
174 174
175struct voltagedomain *voltdm_lookup(const char *name); 175struct voltagedomain *voltdm_lookup(const char *name);
176void voltdm_init(struct voltagedomain **voltdm_list); 176void voltdm_init(struct voltagedomain **voltdm_list);
diff --git a/arch/arm/mach-omap2/voltagedomains33xx_data.c b/arch/arm/mach-omap2/voltagedomains33xx_data.c
deleted file mode 100644
index 965458dc0cb9..000000000000
--- a/arch/arm/mach-omap2/voltagedomains33xx_data.c
+++ /dev/null
@@ -1,43 +0,0 @@
1/*
2 * AM33XX voltage domain data
3 *
4 * Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License as
8 * published by the Free Software Foundation version 2.
9 *
10 * This program is distributed "as is" WITHOUT ANY WARRANTY of any
11 * kind, whether express or implied; without even the implied warranty
12 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 */
15
16#include <linux/kernel.h>
17#include <linux/init.h>
18
19#include "voltage.h"
20
21static struct voltagedomain am33xx_voltdm_mpu = {
22 .name = "mpu",
23};
24
25static struct voltagedomain am33xx_voltdm_core = {
26 .name = "core",
27};
28
29static struct voltagedomain am33xx_voltdm_rtc = {
30 .name = "rtc",
31};
32
33static struct voltagedomain *voltagedomains_am33xx[] __initdata = {
34 &am33xx_voltdm_mpu,
35 &am33xx_voltdm_core,
36 &am33xx_voltdm_rtc,
37 NULL,
38};
39
40void __init am33xx_voltagedomains_init(void)
41{
42 voltdm_init(voltagedomains_am33xx);
43}
diff --git a/arch/arm/mach-omap2/voltagedomains54xx_data.c b/arch/arm/mach-omap2/voltagedomains54xx_data.c
new file mode 100644
index 000000000000..33d22b87252d
--- /dev/null
+++ b/arch/arm/mach-omap2/voltagedomains54xx_data.c
@@ -0,0 +1,92 @@
1/*
2 * OMAP5 Voltage Management Routines
3 *
4 * Based on voltagedomains44xx_data.c
5 *
6 * Copyright (C) 2013 Texas Instruments Incorporated - http://www.ti.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#include <linux/kernel.h>
13#include <linux/err.h>
14#include <linux/init.h>
15
16#include "common.h"
17
18#include "prm54xx.h"
19#include "voltage.h"
20#include "omap_opp_data.h"
21#include "vc.h"
22#include "vp.h"
23
24static const struct omap_vfsm_instance omap5_vdd_mpu_vfsm = {
25 .voltsetup_reg = OMAP54XX_PRM_VOLTSETUP_MPU_RET_SLEEP_OFFSET,
26};
27
28static const struct omap_vfsm_instance omap5_vdd_mm_vfsm = {
29 .voltsetup_reg = OMAP54XX_PRM_VOLTSETUP_MM_RET_SLEEP_OFFSET,
30};
31
32static const struct omap_vfsm_instance omap5_vdd_core_vfsm = {
33 .voltsetup_reg = OMAP54XX_PRM_VOLTSETUP_CORE_RET_SLEEP_OFFSET,
34};
35
36static struct voltagedomain omap5_voltdm_mpu = {
37 .name = "mpu",
38 .scalable = true,
39 .read = omap4_prm_vcvp_read,
40 .write = omap4_prm_vcvp_write,
41 .rmw = omap4_prm_vcvp_rmw,
42 .vc = &omap4_vc_mpu,
43 .vfsm = &omap5_vdd_mpu_vfsm,
44 .vp = &omap4_vp_mpu,
45};
46
47static struct voltagedomain omap5_voltdm_mm = {
48 .name = "mm",
49 .scalable = true,
50 .read = omap4_prm_vcvp_read,
51 .write = omap4_prm_vcvp_write,
52 .rmw = omap4_prm_vcvp_rmw,
53 .vc = &omap4_vc_iva,
54 .vfsm = &omap5_vdd_mm_vfsm,
55 .vp = &omap4_vp_iva,
56};
57
58static struct voltagedomain omap5_voltdm_core = {
59 .name = "core",
60 .scalable = true,
61 .read = omap4_prm_vcvp_read,
62 .write = omap4_prm_vcvp_write,
63 .rmw = omap4_prm_vcvp_rmw,
64 .vc = &omap4_vc_core,
65 .vfsm = &omap5_vdd_core_vfsm,
66 .vp = &omap4_vp_core,
67};
68
69static struct voltagedomain omap5_voltdm_wkup = {
70 .name = "wkup",
71};
72
73static struct voltagedomain *voltagedomains_omap5[] __initdata = {
74 &omap5_voltdm_mpu,
75 &omap5_voltdm_mm,
76 &omap5_voltdm_core,
77 &omap5_voltdm_wkup,
78 NULL,
79};
80
81static const char *sys_clk_name __initdata = "sys_clkin";
82
83void __init omap54xx_voltagedomains_init(void)
84{
85 struct voltagedomain *voltdm;
86 int i;
87
88 for (i = 0; voltdm = voltagedomains_omap5[i], voltdm; i++)
89 voltdm->sys_clk.name = sys_clk_name;
90
91 voltdm_init(voltagedomains_omap5);
92};
diff --git a/arch/arm/mach-orion5x/common.c b/arch/arm/mach-orion5x/common.c
index f8a6db9239bf..b41599f98a8e 100644
--- a/arch/arm/mach-orion5x/common.c
+++ b/arch/arm/mach-orion5x/common.c
@@ -347,7 +347,7 @@ void __init orion5x_init(void)
347 orion5x_wdt_init(); 347 orion5x_wdt_init();
348} 348}
349 349
350void orion5x_restart(char mode, const char *cmd) 350void orion5x_restart(enum reboot_mode mode, const char *cmd)
351{ 351{
352 /* 352 /*
353 * Enable and issue soft reset 353 * Enable and issue soft reset
diff --git a/arch/arm/mach-orion5x/common.h b/arch/arm/mach-orion5x/common.h
index cdaa01f3d186..a909afb384fb 100644
--- a/arch/arm/mach-orion5x/common.h
+++ b/arch/arm/mach-orion5x/common.h
@@ -1,6 +1,8 @@
1#ifndef __ARCH_ORION5X_COMMON_H 1#ifndef __ARCH_ORION5X_COMMON_H
2#define __ARCH_ORION5X_COMMON_H 2#define __ARCH_ORION5X_COMMON_H
3 3
4#include <linux/reboot.h>
5
4struct dsa_platform_data; 6struct dsa_platform_data;
5struct mv643xx_eth_platform_data; 7struct mv643xx_eth_platform_data;
6struct mv_sata_platform_data; 8struct mv_sata_platform_data;
@@ -29,7 +31,7 @@ void orion5x_spi_init(void);
29void orion5x_uart0_init(void); 31void orion5x_uart0_init(void);
30void orion5x_uart1_init(void); 32void orion5x_uart1_init(void);
31void orion5x_xor_init(void); 33void orion5x_xor_init(void);
32void orion5x_restart(char, const char *); 34void orion5x_restart(enum reboot_mode, const char *);
33 35
34/* 36/*
35 * PCIe/PCI functions. 37 * PCIe/PCI functions.
diff --git a/arch/arm/mach-orion5x/include/mach/bridge-regs.h b/arch/arm/mach-orion5x/include/mach/bridge-regs.h
index 461fd69a10ae..f727d03f1688 100644
--- a/arch/arm/mach-orion5x/include/mach/bridge-regs.h
+++ b/arch/arm/mach-orion5x/include/mach/bridge-regs.h
@@ -18,7 +18,6 @@
18#define CPU_CTRL (ORION5X_BRIDGE_VIRT_BASE + 0x104) 18#define CPU_CTRL (ORION5X_BRIDGE_VIRT_BASE + 0x104)
19 19
20#define RSTOUTn_MASK (ORION5X_BRIDGE_VIRT_BASE + 0x108) 20#define RSTOUTn_MASK (ORION5X_BRIDGE_VIRT_BASE + 0x108)
21#define WDT_RESET_OUT_EN 0x0002
22 21
23#define CPU_SOFT_RESET (ORION5X_BRIDGE_VIRT_BASE + 0x10c) 22#define CPU_SOFT_RESET (ORION5X_BRIDGE_VIRT_BASE + 0x10c)
24 23
@@ -26,8 +25,6 @@
26 25
27#define POWER_MNG_CTRL_REG (ORION5X_BRIDGE_VIRT_BASE + 0x11C) 26#define POWER_MNG_CTRL_REG (ORION5X_BRIDGE_VIRT_BASE + 0x11C)
28 27
29#define WDT_INT_REQ 0x0008
30
31#define BRIDGE_INT_TIMER1_CLR (~0x0004) 28#define BRIDGE_INT_TIMER1_CLR (~0x0004)
32 29
33#define MAIN_IRQ_CAUSE (ORION5X_BRIDGE_VIRT_BASE + 0x200) 30#define MAIN_IRQ_CAUSE (ORION5X_BRIDGE_VIRT_BASE + 0x200)
diff --git a/arch/arm/mach-orion5x/ls-chl-setup.c b/arch/arm/mach-orion5x/ls-chl-setup.c
index 24f4e14e5893..6234977b5aea 100644
--- a/arch/arm/mach-orion5x/ls-chl-setup.c
+++ b/arch/arm/mach-orion5x/ls-chl-setup.c
@@ -139,7 +139,7 @@ static struct mv_sata_platform_data lschl_sata_data = {
139 139
140static void lschl_power_off(void) 140static void lschl_power_off(void)
141{ 141{
142 orion5x_restart('h', NULL); 142 orion5x_restart(REBOOT_HARD, NULL);
143} 143}
144 144
145/***************************************************************************** 145/*****************************************************************************
diff --git a/arch/arm/mach-orion5x/ls_hgl-setup.c b/arch/arm/mach-orion5x/ls_hgl-setup.c
index fc653bb41e78..fe04c4b64569 100644
--- a/arch/arm/mach-orion5x/ls_hgl-setup.c
+++ b/arch/arm/mach-orion5x/ls_hgl-setup.c
@@ -185,7 +185,7 @@ static struct mv_sata_platform_data ls_hgl_sata_data = {
185 185
186static void ls_hgl_power_off(void) 186static void ls_hgl_power_off(void)
187{ 187{
188 orion5x_restart('h', NULL); 188 orion5x_restart(REBOOT_HARD, NULL);
189} 189}
190 190
191 191
diff --git a/arch/arm/mach-orion5x/lsmini-setup.c b/arch/arm/mach-orion5x/lsmini-setup.c
index 18e66e617dc2..ca4dbe973daf 100644
--- a/arch/arm/mach-orion5x/lsmini-setup.c
+++ b/arch/arm/mach-orion5x/lsmini-setup.c
@@ -185,7 +185,7 @@ static struct mv_sata_platform_data lsmini_sata_data = {
185 185
186static void lsmini_power_off(void) 186static void lsmini_power_off(void)
187{ 187{
188 orion5x_restart('h', NULL); 188 orion5x_restart(REBOOT_HARD, NULL);
189} 189}
190 190
191 191
diff --git a/arch/arm/mach-picoxcell/Kconfig b/arch/arm/mach-picoxcell/Kconfig
index 13bae78b215a..b1022f4315f7 100644
--- a/arch/arm/mach-picoxcell/Kconfig
+++ b/arch/arm/mach-picoxcell/Kconfig
@@ -4,7 +4,6 @@ config ARCH_PICOXCELL
4 select ARM_PATCH_PHYS_VIRT 4 select ARM_PATCH_PHYS_VIRT
5 select ARM_VIC 5 select ARM_VIC
6 select CPU_V6K 6 select CPU_V6K
7 select DW_APB_TIMER
8 select DW_APB_TIMER_OF 7 select DW_APB_TIMER_OF
9 select GENERIC_CLOCKEVENTS 8 select GENERIC_CLOCKEVENTS
10 select HAVE_TCM 9 select HAVE_TCM
diff --git a/arch/arm/mach-picoxcell/common.c b/arch/arm/mach-picoxcell/common.c
index 70b441ad1d18..ec79fea82704 100644
--- a/arch/arm/mach-picoxcell/common.c
+++ b/arch/arm/mach-picoxcell/common.c
@@ -8,20 +8,14 @@
8 * All enquiries to support@picochip.com 8 * All enquiries to support@picochip.com
9 */ 9 */
10#include <linux/delay.h> 10#include <linux/delay.h>
11#include <linux/irq.h>
12#include <linux/irqchip.h>
13#include <linux/irqdomain.h>
14#include <linux/of.h> 11#include <linux/of.h>
15#include <linux/of_address.h> 12#include <linux/of_address.h>
16#include <linux/of_irq.h>
17#include <linux/of_platform.h> 13#include <linux/of_platform.h>
18#include <linux/dw_apb_timer.h> 14#include <linux/reboot.h>
19 15
20#include <asm/mach/arch.h> 16#include <asm/mach/arch.h>
21#include <asm/mach/map.h> 17#include <asm/mach/map.h>
22 18
23#include "common.h"
24
25#define PHYS_TO_IO(x) (((x) & 0x00ffffff) | 0xfe000000) 19#define PHYS_TO_IO(x) (((x) & 0x00ffffff) | 0xfe000000)
26#define PICOXCELL_PERIPH_BASE 0x80000000 20#define PICOXCELL_PERIPH_BASE 0x80000000
27#define PICOXCELL_PERIPH_LENGTH SZ_4M 21#define PICOXCELL_PERIPH_LENGTH SZ_4M
@@ -70,7 +64,7 @@ static const char *picoxcell_dt_match[] = {
70 NULL 64 NULL
71}; 65};
72 66
73static void picoxcell_wdt_restart(char mode, const char *cmd) 67static void picoxcell_wdt_restart(enum reboot_mode mode, const char *cmd)
74{ 68{
75 /* 69 /*
76 * Configure the watchdog to reset with the shortest possible timeout 70 * Configure the watchdog to reset with the shortest possible timeout
@@ -86,9 +80,6 @@ static void picoxcell_wdt_restart(char mode, const char *cmd)
86 80
87DT_MACHINE_START(PICOXCELL, "Picochip picoXcell") 81DT_MACHINE_START(PICOXCELL, "Picochip picoXcell")
88 .map_io = picoxcell_map_io, 82 .map_io = picoxcell_map_io,
89 .nr_irqs = NR_IRQS_LEGACY,
90 .init_irq = irqchip_init,
91 .init_time = dw_apb_timer_init,
92 .init_machine = picoxcell_init_machine, 83 .init_machine = picoxcell_init_machine,
93 .dt_compat = picoxcell_dt_match, 84 .dt_compat = picoxcell_dt_match,
94 .restart = picoxcell_wdt_restart, 85 .restart = picoxcell_wdt_restart,
diff --git a/arch/arm/mach-picoxcell/common.h b/arch/arm/mach-picoxcell/common.h
deleted file mode 100644
index 481b42a4ef15..000000000000
--- a/arch/arm/mach-picoxcell/common.h
+++ /dev/null
@@ -1,17 +0,0 @@
1/*
2 * Copyright (c) 2011 Picochip Ltd., Jamie Iles
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
7 *
8 * All enquiries to support@picochip.com
9 */
10#ifndef __PICOXCELL_COMMON_H__
11#define __PICOXCELL_COMMON_H__
12
13#include <asm/mach/time.h>
14
15extern void dw_apb_timer_init(void);
16
17#endif /* __PICOXCELL_COMMON_H__ */
diff --git a/arch/arm/mach-prima2/common.c b/arch/arm/mach-prima2/common.c
index 4f94cd87972a..2c70f74fed5d 100644
--- a/arch/arm/mach-prima2/common.c
+++ b/arch/arm/mach-prima2/common.c
@@ -9,7 +9,6 @@
9#include <linux/clocksource.h> 9#include <linux/clocksource.h>
10#include <linux/init.h> 10#include <linux/init.h>
11#include <linux/kernel.h> 11#include <linux/kernel.h>
12#include <linux/irqchip.h>
13#include <asm/sizes.h> 12#include <asm/sizes.h>
14#include <asm/mach-types.h> 13#include <asm/mach-types.h>
15#include <asm/mach/arch.h> 14#include <asm/mach/arch.h>
@@ -17,16 +16,6 @@
17#include <linux/of_platform.h> 16#include <linux/of_platform.h>
18#include "common.h" 17#include "common.h"
19 18
20static struct of_device_id sirfsoc_of_bus_ids[] __initdata = {
21 { .compatible = "simple-bus", },
22 {},
23};
24
25void __init sirfsoc_mach_init(void)
26{
27 of_platform_bus_probe(NULL, sirfsoc_of_bus_ids, NULL);
28}
29
30void __init sirfsoc_init_late(void) 19void __init sirfsoc_init_late(void)
31{ 20{
32 sirfsoc_pm_init(); 21 sirfsoc_pm_init();
@@ -55,9 +44,7 @@ DT_MACHINE_START(ATLAS6_DT, "Generic ATLAS6 (Flattened Device Tree)")
55 /* Maintainer: Barry Song <baohua.song@csr.com> */ 44 /* Maintainer: Barry Song <baohua.song@csr.com> */
56 .nr_irqs = 128, 45 .nr_irqs = 128,
57 .map_io = sirfsoc_map_io, 46 .map_io = sirfsoc_map_io,
58 .init_irq = irqchip_init,
59 .init_time = sirfsoc_init_time, 47 .init_time = sirfsoc_init_time,
60 .init_machine = sirfsoc_mach_init,
61 .init_late = sirfsoc_init_late, 48 .init_late = sirfsoc_init_late,
62 .dt_compat = atlas6_dt_match, 49 .dt_compat = atlas6_dt_match,
63 .restart = sirfsoc_restart, 50 .restart = sirfsoc_restart,
@@ -66,18 +53,16 @@ MACHINE_END
66 53
67#ifdef CONFIG_ARCH_PRIMA2 54#ifdef CONFIG_ARCH_PRIMA2
68static const char *prima2_dt_match[] __initdata = { 55static const char *prima2_dt_match[] __initdata = {
69 "sirf,prima2", 56 "sirf,prima2",
70 NULL 57 NULL
71}; 58};
72 59
73DT_MACHINE_START(PRIMA2_DT, "Generic PRIMA2 (Flattened Device Tree)") 60DT_MACHINE_START(PRIMA2_DT, "Generic PRIMA2 (Flattened Device Tree)")
74 /* Maintainer: Barry Song <baohua.song@csr.com> */ 61 /* Maintainer: Barry Song <baohua.song@csr.com> */
75 .nr_irqs = 128, 62 .nr_irqs = 128,
76 .map_io = sirfsoc_map_io, 63 .map_io = sirfsoc_map_io,
77 .init_irq = irqchip_init,
78 .init_time = sirfsoc_init_time, 64 .init_time = sirfsoc_init_time,
79 .dma_zone_size = SZ_256M, 65 .dma_zone_size = SZ_256M,
80 .init_machine = sirfsoc_mach_init,
81 .init_late = sirfsoc_init_late, 66 .init_late = sirfsoc_init_late,
82 .dt_compat = prima2_dt_match, 67 .dt_compat = prima2_dt_match,
83 .restart = sirfsoc_restart, 68 .restart = sirfsoc_restart,
@@ -94,9 +79,7 @@ DT_MACHINE_START(MARCO_DT, "Generic MARCO (Flattened Device Tree)")
94 /* Maintainer: Barry Song <baohua.song@csr.com> */ 79 /* Maintainer: Barry Song <baohua.song@csr.com> */
95 .smp = smp_ops(sirfsoc_smp_ops), 80 .smp = smp_ops(sirfsoc_smp_ops),
96 .map_io = sirfsoc_map_io, 81 .map_io = sirfsoc_map_io,
97 .init_irq = irqchip_init,
98 .init_time = sirfsoc_init_time, 82 .init_time = sirfsoc_init_time,
99 .init_machine = sirfsoc_mach_init,
100 .init_late = sirfsoc_init_late, 83 .init_late = sirfsoc_init_late,
101 .dt_compat = marco_dt_match, 84 .dt_compat = marco_dt_match,
102 .restart = sirfsoc_restart, 85 .restart = sirfsoc_restart,
diff --git a/arch/arm/mach-prima2/common.h b/arch/arm/mach-prima2/common.h
index 81135cd88e54..a6304858474a 100644
--- a/arch/arm/mach-prima2/common.h
+++ b/arch/arm/mach-prima2/common.h
@@ -10,6 +10,8 @@
10#define __MACH_PRIMA2_COMMON_H__ 10#define __MACH_PRIMA2_COMMON_H__
11 11
12#include <linux/init.h> 12#include <linux/init.h>
13#include <linux/reboot.h>
14
13#include <asm/mach/time.h> 15#include <asm/mach/time.h>
14#include <asm/exception.h> 16#include <asm/exception.h>
15 17
@@ -22,7 +24,7 @@ extern void sirfsoc_cpu_die(unsigned int cpu);
22 24
23extern void __init sirfsoc_of_irq_init(void); 25extern void __init sirfsoc_of_irq_init(void);
24extern void __init sirfsoc_of_clk_init(void); 26extern void __init sirfsoc_of_clk_init(void);
25extern void sirfsoc_restart(char, const char *); 27extern void sirfsoc_restart(enum reboot_mode, const char *);
26extern asmlinkage void __exception_irq_entry sirfsoc_handle_irq(struct pt_regs *regs); 28extern asmlinkage void __exception_irq_entry sirfsoc_handle_irq(struct pt_regs *regs);
27 29
28#ifndef CONFIG_DEBUG_LL 30#ifndef CONFIG_DEBUG_LL
diff --git a/arch/arm/mach-prima2/headsmp.S b/arch/arm/mach-prima2/headsmp.S
index 5b8a408d8921..d86fe33c5f53 100644
--- a/arch/arm/mach-prima2/headsmp.S
+++ b/arch/arm/mach-prima2/headsmp.S
@@ -9,8 +9,6 @@
9#include <linux/linkage.h> 9#include <linux/linkage.h>
10#include <linux/init.h> 10#include <linux/init.h>
11 11
12 __CPUINIT
13
14/* 12/*
15 * SIRFSOC specific entry point for secondary CPUs. This provides 13 * SIRFSOC specific entry point for secondary CPUs. This provides
16 * a "holding pen" into which all secondary cores are held until we're 14 * a "holding pen" into which all secondary cores are held until we're
diff --git a/arch/arm/mach-prima2/platsmp.c b/arch/arm/mach-prima2/platsmp.c
index 1c3de7bed841..3dbcb1ab6e37 100644
--- a/arch/arm/mach-prima2/platsmp.c
+++ b/arch/arm/mach-prima2/platsmp.c
@@ -44,7 +44,7 @@ void __init sirfsoc_map_scu(void)
44 scu_base = (void __iomem *)SIRFSOC_VA(base); 44 scu_base = (void __iomem *)SIRFSOC_VA(base);
45} 45}
46 46
47static void __cpuinit sirfsoc_secondary_init(unsigned int cpu) 47static void sirfsoc_secondary_init(unsigned int cpu)
48{ 48{
49 /* 49 /*
50 * let the primary processor know we're out of the 50 * let the primary processor know we're out of the
@@ -65,7 +65,7 @@ static struct of_device_id rsc_ids[] = {
65 {}, 65 {},
66}; 66};
67 67
68static int __cpuinit sirfsoc_boot_secondary(unsigned int cpu, struct task_struct *idle) 68static int sirfsoc_boot_secondary(unsigned int cpu, struct task_struct *idle)
69{ 69{
70 unsigned long timeout; 70 unsigned long timeout;
71 struct device_node *np; 71 struct device_node *np;
diff --git a/arch/arm/mach-prima2/pm.c b/arch/arm/mach-prima2/pm.c
index 8f595c0cc8d9..02cc34388b05 100644
--- a/arch/arm/mach-prima2/pm.c
+++ b/arch/arm/mach-prima2/pm.c
@@ -9,7 +9,7 @@
9#include <linux/kernel.h> 9#include <linux/kernel.h>
10#include <linux/suspend.h> 10#include <linux/suspend.h>
11#include <linux/slab.h> 11#include <linux/slab.h>
12#include <linux/module.h> 12#include <linux/export.h>
13#include <linux/of.h> 13#include <linux/of.h>
14#include <linux/of_address.h> 14#include <linux/of_address.h>
15#include <linux/of_device.h> 15#include <linux/of_device.h>
diff --git a/arch/arm/mach-prima2/rstc.c b/arch/arm/mach-prima2/rstc.c
index d5e0cbc934c0..ccb53391147a 100644
--- a/arch/arm/mach-prima2/rstc.c
+++ b/arch/arm/mach-prima2/rstc.c
@@ -13,6 +13,7 @@
13#include <linux/device.h> 13#include <linux/device.h>
14#include <linux/of.h> 14#include <linux/of.h>
15#include <linux/of_address.h> 15#include <linux/of_address.h>
16#include <linux/reboot.h>
16 17
17void __iomem *sirfsoc_rstc_base; 18void __iomem *sirfsoc_rstc_base;
18static DEFINE_MUTEX(rstc_lock); 19static DEFINE_MUTEX(rstc_lock);
@@ -84,7 +85,7 @@ int sirfsoc_reset_device(struct device *dev)
84 85
85#define SIRFSOC_SYS_RST_BIT BIT(31) 86#define SIRFSOC_SYS_RST_BIT BIT(31)
86 87
87void sirfsoc_restart(char mode, const char *cmd) 88void sirfsoc_restart(enum reboot_mode mode, const char *cmd)
88{ 89{
89 writel(SIRFSOC_SYS_RST_BIT, sirfsoc_rstc_base); 90 writel(SIRFSOC_SYS_RST_BIT, sirfsoc_rstc_base);
90} 91}
diff --git a/arch/arm/mach-pxa/Kconfig b/arch/arm/mach-pxa/Kconfig
index 96100dbf5a2e..a8427115ee07 100644
--- a/arch/arm/mach-pxa/Kconfig
+++ b/arch/arm/mach-pxa/Kconfig
@@ -615,12 +615,14 @@ endmenu
615config PXA25x 615config PXA25x
616 bool 616 bool
617 select CPU_XSCALE 617 select CPU_XSCALE
618 select CPU_FREQ_TABLE if CPU_FREQ
618 help 619 help
619 Select code specific to PXA21x/25x/26x variants 620 Select code specific to PXA21x/25x/26x variants
620 621
621config PXA27x 622config PXA27x
622 bool 623 bool
623 select CPU_XSCALE 624 select CPU_XSCALE
625 select CPU_FREQ_TABLE if CPU_FREQ
624 help 626 help
625 Select code specific to PXA27x variants 627 Select code specific to PXA27x variants
626 628
@@ -633,6 +635,7 @@ config CPU_PXA26x
633config PXA3xx 635config PXA3xx
634 bool 636 bool
635 select CPU_XSC3 637 select CPU_XSC3
638 select CPU_FREQ_TABLE if CPU_FREQ
636 help 639 help
637 Select code specific to PXA3xx variants 640 Select code specific to PXA3xx variants
638 641
diff --git a/arch/arm/mach-pxa/corgi.c b/arch/arm/mach-pxa/corgi.c
index a5b8fead7d61..f162f1b77cd2 100644
--- a/arch/arm/mach-pxa/corgi.c
+++ b/arch/arm/mach-pxa/corgi.c
@@ -663,16 +663,16 @@ static void corgi_poweroff(void)
663 /* Green LED off tells the bootloader to halt */ 663 /* Green LED off tells the bootloader to halt */
664 gpio_set_value(CORGI_GPIO_LED_GREEN, 0); 664 gpio_set_value(CORGI_GPIO_LED_GREEN, 0);
665 665
666 pxa_restart('h', NULL); 666 pxa_restart(REBOOT_HARD, NULL);
667} 667}
668 668
669static void corgi_restart(char mode, const char *cmd) 669static void corgi_restart(enum reboot_mode mode, const char *cmd)
670{ 670{
671 if (!machine_is_corgi()) 671 if (!machine_is_corgi())
672 /* Green LED on tells the bootloader to reboot */ 672 /* Green LED on tells the bootloader to reboot */
673 gpio_set_value(CORGI_GPIO_LED_GREEN, 1); 673 gpio_set_value(CORGI_GPIO_LED_GREEN, 1);
674 674
675 pxa_restart('h', cmd); 675 pxa_restart(REBOOT_HARD, cmd);
676} 676}
677 677
678static void __init corgi_init(void) 678static void __init corgi_init(void)
diff --git a/arch/arm/mach-pxa/em-x270.c b/arch/arm/mach-pxa/em-x270.c
index 446563a7d1ad..3a3362fa793e 100644
--- a/arch/arm/mach-pxa/em-x270.c
+++ b/arch/arm/mach-pxa/em-x270.c
@@ -477,16 +477,24 @@ static int em_x270_usb_hub_init(void)
477 /* USB Hub power-on and reset */ 477 /* USB Hub power-on and reset */
478 gpio_direction_output(usb_hub_reset, 1); 478 gpio_direction_output(usb_hub_reset, 1);
479 gpio_direction_output(GPIO9_USB_VBUS_EN, 0); 479 gpio_direction_output(GPIO9_USB_VBUS_EN, 0);
480 regulator_enable(em_x270_usb_ldo); 480 err = regulator_enable(em_x270_usb_ldo);
481 if (err)
482 goto err_free_rst_gpio;
483
481 gpio_set_value(usb_hub_reset, 0); 484 gpio_set_value(usb_hub_reset, 0);
482 gpio_set_value(usb_hub_reset, 1); 485 gpio_set_value(usb_hub_reset, 1);
483 regulator_disable(em_x270_usb_ldo); 486 regulator_disable(em_x270_usb_ldo);
484 regulator_enable(em_x270_usb_ldo); 487 err = regulator_enable(em_x270_usb_ldo);
488 if (err)
489 goto err_free_rst_gpio;
490
485 gpio_set_value(usb_hub_reset, 0); 491 gpio_set_value(usb_hub_reset, 0);
486 gpio_set_value(GPIO9_USB_VBUS_EN, 1); 492 gpio_set_value(GPIO9_USB_VBUS_EN, 1);
487 493
488 return 0; 494 return 0;
489 495
496err_free_rst_gpio:
497 gpio_free(usb_hub_reset);
490err_free_vbus_gpio: 498err_free_vbus_gpio:
491 gpio_free(GPIO9_USB_VBUS_EN); 499 gpio_free(GPIO9_USB_VBUS_EN);
492err_free_usb_ldo: 500err_free_usb_ldo:
@@ -592,7 +600,7 @@ err_irq:
592 return err; 600 return err;
593} 601}
594 602
595static void em_x270_mci_setpower(struct device *dev, unsigned int vdd) 603static int em_x270_mci_setpower(struct device *dev, unsigned int vdd)
596{ 604{
597 struct pxamci_platform_data* p_d = dev->platform_data; 605 struct pxamci_platform_data* p_d = dev->platform_data;
598 606
@@ -600,10 +608,11 @@ static void em_x270_mci_setpower(struct device *dev, unsigned int vdd)
600 int vdd_uV = (2000 + (vdd - __ffs(MMC_VDD_20_21)) * 100) * 1000; 608 int vdd_uV = (2000 + (vdd - __ffs(MMC_VDD_20_21)) * 100) * 1000;
601 609
602 regulator_set_voltage(em_x270_sdio_ldo, vdd_uV, vdd_uV); 610 regulator_set_voltage(em_x270_sdio_ldo, vdd_uV, vdd_uV);
603 regulator_enable(em_x270_sdio_ldo); 611 return regulator_enable(em_x270_sdio_ldo);
604 } else { 612 } else {
605 regulator_disable(em_x270_sdio_ldo); 613 regulator_disable(em_x270_sdio_ldo);
606 } 614 }
615 return 0;
607} 616}
608 617
609static void em_x270_mci_exit(struct device *dev, void *data) 618static void em_x270_mci_exit(struct device *dev, void *data)
@@ -833,21 +842,25 @@ static inline void em_x270_init_ac97(void) {}
833#endif 842#endif
834 843
835#if defined(CONFIG_KEYBOARD_PXA27x) || defined(CONFIG_KEYBOARD_PXA27x_MODULE) 844#if defined(CONFIG_KEYBOARD_PXA27x) || defined(CONFIG_KEYBOARD_PXA27x_MODULE)
836static unsigned int em_x270_module_matrix_keys[] = { 845static const unsigned int em_x270_module_matrix_keys[] = {
837 KEY(0, 0, KEY_A), KEY(1, 0, KEY_UP), KEY(2, 1, KEY_B), 846 KEY(0, 0, KEY_A), KEY(1, 0, KEY_UP), KEY(2, 1, KEY_B),
838 KEY(0, 2, KEY_LEFT), KEY(1, 1, KEY_ENTER), KEY(2, 0, KEY_RIGHT), 847 KEY(0, 2, KEY_LEFT), KEY(1, 1, KEY_ENTER), KEY(2, 0, KEY_RIGHT),
839 KEY(0, 1, KEY_C), KEY(1, 2, KEY_DOWN), KEY(2, 2, KEY_D), 848 KEY(0, 1, KEY_C), KEY(1, 2, KEY_DOWN), KEY(2, 2, KEY_D),
840}; 849};
841 850
851static struct matrix_keymap_data em_x270_matrix_keymap_data = {
852 .keymap = em_x270_module_matrix_keys,
853 .keymap_size = ARRAY_SIZE(em_x270_module_matrix_keys),
854};
855
842struct pxa27x_keypad_platform_data em_x270_module_keypad_info = { 856struct pxa27x_keypad_platform_data em_x270_module_keypad_info = {
843 /* code map for the matrix keys */ 857 /* code map for the matrix keys */
844 .matrix_key_rows = 3, 858 .matrix_key_rows = 3,
845 .matrix_key_cols = 3, 859 .matrix_key_cols = 3,
846 .matrix_key_map = em_x270_module_matrix_keys, 860 .matrix_keymap_data = &em_x270_matrix_keymap_data,
847 .matrix_key_map_size = ARRAY_SIZE(em_x270_module_matrix_keys),
848}; 861};
849 862
850static unsigned int em_x270_exeda_matrix_keys[] = { 863static const unsigned int em_x270_exeda_matrix_keys[] = {
851 KEY(0, 0, KEY_RIGHTSHIFT), KEY(0, 1, KEY_RIGHTCTRL), 864 KEY(0, 0, KEY_RIGHTSHIFT), KEY(0, 1, KEY_RIGHTCTRL),
852 KEY(0, 2, KEY_RIGHTALT), KEY(0, 3, KEY_SPACE), 865 KEY(0, 2, KEY_RIGHTALT), KEY(0, 3, KEY_SPACE),
853 KEY(0, 4, KEY_LEFTALT), KEY(0, 5, KEY_LEFTCTRL), 866 KEY(0, 4, KEY_LEFTALT), KEY(0, 5, KEY_LEFTCTRL),
@@ -889,12 +902,16 @@ static unsigned int em_x270_exeda_matrix_keys[] = {
889 KEY(7, 6, 0), KEY(7, 7, 0), 902 KEY(7, 6, 0), KEY(7, 7, 0),
890}; 903};
891 904
905static struct matrix_keymap_data em_x270_exeda_matrix_keymap_data = {
906 .keymap = em_x270_exeda_matrix_keys,
907 .keymap_size = ARRAY_SIZE(em_x270_exeda_matrix_keys),
908};
909
892struct pxa27x_keypad_platform_data em_x270_exeda_keypad_info = { 910struct pxa27x_keypad_platform_data em_x270_exeda_keypad_info = {
893 /* code map for the matrix keys */ 911 /* code map for the matrix keys */
894 .matrix_key_rows = 8, 912 .matrix_key_rows = 8,
895 .matrix_key_cols = 8, 913 .matrix_key_cols = 8,
896 .matrix_key_map = em_x270_exeda_matrix_keys, 914 .matrix_keymap_data = &em_x270_exeda_matrix_keymap_data,
897 .matrix_key_map_size = ARRAY_SIZE(em_x270_exeda_matrix_keys),
898}; 915};
899 916
900static void __init em_x270_init_keypad(void) 917static void __init em_x270_init_keypad(void)
diff --git a/arch/arm/mach-pxa/ezx.c b/arch/arm/mach-pxa/ezx.c
index dca10709be8f..fe2eb8394dff 100644
--- a/arch/arm/mach-pxa/ezx.c
+++ b/arch/arm/mach-pxa/ezx.c
@@ -392,7 +392,7 @@ static unsigned long e6_pin_config[] __initdata = {
392 392
393/* KEYPAD */ 393/* KEYPAD */
394#ifdef CONFIG_MACH_EZX_A780 394#ifdef CONFIG_MACH_EZX_A780
395static unsigned int a780_key_map[] = { 395static const unsigned int a780_key_map[] = {
396 KEY(0, 0, KEY_SEND), 396 KEY(0, 0, KEY_SEND),
397 KEY(0, 1, KEY_BACK), 397 KEY(0, 1, KEY_BACK),
398 KEY(0, 2, KEY_END), 398 KEY(0, 2, KEY_END),
@@ -424,11 +424,15 @@ static unsigned int a780_key_map[] = {
424 KEY(4, 4, KEY_DOWN), 424 KEY(4, 4, KEY_DOWN),
425}; 425};
426 426
427static struct matrix_keymap_data a780_matrix_keymap_data = {
428 .keymap = a780_key_map,
429 .keymap_size = ARRAY_SIZE(a780_key_map),
430};
431
427static struct pxa27x_keypad_platform_data a780_keypad_platform_data = { 432static struct pxa27x_keypad_platform_data a780_keypad_platform_data = {
428 .matrix_key_rows = 5, 433 .matrix_key_rows = 5,
429 .matrix_key_cols = 5, 434 .matrix_key_cols = 5,
430 .matrix_key_map = a780_key_map, 435 .matrix_keymap_data = &a780_matrix_keymap_data,
431 .matrix_key_map_size = ARRAY_SIZE(a780_key_map),
432 436
433 .direct_key_map = { KEY_CAMERA }, 437 .direct_key_map = { KEY_CAMERA },
434 .direct_key_num = 1, 438 .direct_key_num = 1,
@@ -438,7 +442,7 @@ static struct pxa27x_keypad_platform_data a780_keypad_platform_data = {
438#endif /* CONFIG_MACH_EZX_A780 */ 442#endif /* CONFIG_MACH_EZX_A780 */
439 443
440#ifdef CONFIG_MACH_EZX_E680 444#ifdef CONFIG_MACH_EZX_E680
441static unsigned int e680_key_map[] = { 445static const unsigned int e680_key_map[] = {
442 KEY(0, 0, KEY_UP), 446 KEY(0, 0, KEY_UP),
443 KEY(0, 1, KEY_RIGHT), 447 KEY(0, 1, KEY_RIGHT),
444 KEY(0, 2, KEY_RESERVED), 448 KEY(0, 2, KEY_RESERVED),
@@ -455,11 +459,15 @@ static unsigned int e680_key_map[] = {
455 KEY(2, 3, KEY_KPENTER), 459 KEY(2, 3, KEY_KPENTER),
456}; 460};
457 461
462static struct matrix_keymap_data e680_matrix_keymap_data = {
463 .keymap = e680_key_map,
464 .keymap_size = ARRAY_SIZE(e680_key_map),
465};
466
458static struct pxa27x_keypad_platform_data e680_keypad_platform_data = { 467static struct pxa27x_keypad_platform_data e680_keypad_platform_data = {
459 .matrix_key_rows = 3, 468 .matrix_key_rows = 3,
460 .matrix_key_cols = 4, 469 .matrix_key_cols = 4,
461 .matrix_key_map = e680_key_map, 470 .matrix_keymap_data = &e680_matrix_keymap_data,
462 .matrix_key_map_size = ARRAY_SIZE(e680_key_map),
463 471
464 .direct_key_map = { 472 .direct_key_map = {
465 KEY_CAMERA, 473 KEY_CAMERA,
@@ -476,7 +484,7 @@ static struct pxa27x_keypad_platform_data e680_keypad_platform_data = {
476#endif /* CONFIG_MACH_EZX_E680 */ 484#endif /* CONFIG_MACH_EZX_E680 */
477 485
478#ifdef CONFIG_MACH_EZX_A1200 486#ifdef CONFIG_MACH_EZX_A1200
479static unsigned int a1200_key_map[] = { 487static const unsigned int a1200_key_map[] = {
480 KEY(0, 0, KEY_RESERVED), 488 KEY(0, 0, KEY_RESERVED),
481 KEY(0, 1, KEY_RIGHT), 489 KEY(0, 1, KEY_RIGHT),
482 KEY(0, 2, KEY_PAGEDOWN), 490 KEY(0, 2, KEY_PAGEDOWN),
@@ -513,18 +521,22 @@ static unsigned int a1200_key_map[] = {
513 KEY(4, 5, KEY_RESERVED), 521 KEY(4, 5, KEY_RESERVED),
514}; 522};
515 523
524static struct matrix_keymap_data a1200_matrix_keymap_data = {
525 .keymap = a1200_key_map,
526 .keymap_size = ARRAY_SIZE(a1200_key_map),
527};
528
516static struct pxa27x_keypad_platform_data a1200_keypad_platform_data = { 529static struct pxa27x_keypad_platform_data a1200_keypad_platform_data = {
517 .matrix_key_rows = 5, 530 .matrix_key_rows = 5,
518 .matrix_key_cols = 6, 531 .matrix_key_cols = 6,
519 .matrix_key_map = a1200_key_map, 532 .matrix_keymap_data = &a1200_matrix_keymap_data,
520 .matrix_key_map_size = ARRAY_SIZE(a1200_key_map),
521 533
522 .debounce_interval = 30, 534 .debounce_interval = 30,
523}; 535};
524#endif /* CONFIG_MACH_EZX_A1200 */ 536#endif /* CONFIG_MACH_EZX_A1200 */
525 537
526#ifdef CONFIG_MACH_EZX_E6 538#ifdef CONFIG_MACH_EZX_E6
527static unsigned int e6_key_map[] = { 539static const unsigned int e6_key_map[] = {
528 KEY(0, 0, KEY_RESERVED), 540 KEY(0, 0, KEY_RESERVED),
529 KEY(0, 1, KEY_RIGHT), 541 KEY(0, 1, KEY_RIGHT),
530 KEY(0, 2, KEY_PAGEDOWN), 542 KEY(0, 2, KEY_PAGEDOWN),
@@ -561,18 +573,22 @@ static unsigned int e6_key_map[] = {
561 KEY(4, 5, KEY_PREVIOUSSONG), 573 KEY(4, 5, KEY_PREVIOUSSONG),
562}; 574};
563 575
576static struct matrix_keymap_data e6_keymap_data = {
577 .keymap = e6_key_map,
578 .keymap_size = ARRAY_SIZE(e6_key_map),
579};
580
564static struct pxa27x_keypad_platform_data e6_keypad_platform_data = { 581static struct pxa27x_keypad_platform_data e6_keypad_platform_data = {
565 .matrix_key_rows = 5, 582 .matrix_key_rows = 5,
566 .matrix_key_cols = 6, 583 .matrix_key_cols = 6,
567 .matrix_key_map = e6_key_map, 584 .matrix_keymap_data = &e6_keymap_data,
568 .matrix_key_map_size = ARRAY_SIZE(e6_key_map),
569 585
570 .debounce_interval = 30, 586 .debounce_interval = 30,
571}; 587};
572#endif /* CONFIG_MACH_EZX_E6 */ 588#endif /* CONFIG_MACH_EZX_E6 */
573 589
574#ifdef CONFIG_MACH_EZX_A910 590#ifdef CONFIG_MACH_EZX_A910
575static unsigned int a910_key_map[] = { 591static const unsigned int a910_key_map[] = {
576 KEY(0, 0, KEY_NUMERIC_6), 592 KEY(0, 0, KEY_NUMERIC_6),
577 KEY(0, 1, KEY_RIGHT), 593 KEY(0, 1, KEY_RIGHT),
578 KEY(0, 2, KEY_PAGEDOWN), 594 KEY(0, 2, KEY_PAGEDOWN),
@@ -609,18 +625,22 @@ static unsigned int a910_key_map[] = {
609 KEY(4, 5, KEY_RESERVED), 625 KEY(4, 5, KEY_RESERVED),
610}; 626};
611 627
628static struct matrix_keymap_data a910_matrix_keymap_data = {
629 .keymap = a910_key_map,
630 .keymap_size = ARRAY_SIZE(a910_key_map),
631};
632
612static struct pxa27x_keypad_platform_data a910_keypad_platform_data = { 633static struct pxa27x_keypad_platform_data a910_keypad_platform_data = {
613 .matrix_key_rows = 5, 634 .matrix_key_rows = 5,
614 .matrix_key_cols = 6, 635 .matrix_key_cols = 6,
615 .matrix_key_map = a910_key_map, 636 .matrix_keymap_data = &a910_matrix_keymap_data,
616 .matrix_key_map_size = ARRAY_SIZE(a910_key_map),
617 637
618 .debounce_interval = 30, 638 .debounce_interval = 30,
619}; 639};
620#endif /* CONFIG_MACH_EZX_A910 */ 640#endif /* CONFIG_MACH_EZX_A910 */
621 641
622#ifdef CONFIG_MACH_EZX_E2 642#ifdef CONFIG_MACH_EZX_E2
623static unsigned int e2_key_map[] = { 643static const unsigned int e2_key_map[] = {
624 KEY(0, 0, KEY_NUMERIC_6), 644 KEY(0, 0, KEY_NUMERIC_6),
625 KEY(0, 1, KEY_RIGHT), 645 KEY(0, 1, KEY_RIGHT),
626 KEY(0, 2, KEY_NUMERIC_9), 646 KEY(0, 2, KEY_NUMERIC_9),
@@ -657,11 +677,15 @@ static unsigned int e2_key_map[] = {
657 KEY(4, 5, KEY_RESERVED), 677 KEY(4, 5, KEY_RESERVED),
658}; 678};
659 679
680static struct matrix_keymap_data e2_matrix_keymap_data = {
681 .keymap = e2_key_map,
682 .keymap_size = ARRAY_SIZE(e2_key_map),
683};
684
660static struct pxa27x_keypad_platform_data e2_keypad_platform_data = { 685static struct pxa27x_keypad_platform_data e2_keypad_platform_data = {
661 .matrix_key_rows = 5, 686 .matrix_key_rows = 5,
662 .matrix_key_cols = 6, 687 .matrix_key_cols = 6,
663 .matrix_key_map = e2_key_map, 688 .matrix_keymap_data = &e2_matrix_keymap_data,
664 .matrix_key_map_size = ARRAY_SIZE(e2_key_map),
665 689
666 .debounce_interval = 30, 690 .debounce_interval = 30,
667}; 691};
diff --git a/arch/arm/mach-pxa/generic.h b/arch/arm/mach-pxa/generic.h
index fd7ea39b78c0..8963984d1f43 100644
--- a/arch/arm/mach-pxa/generic.h
+++ b/arch/arm/mach-pxa/generic.h
@@ -9,6 +9,8 @@
9 * published by the Free Software Foundation. 9 * published by the Free Software Foundation.
10 */ 10 */
11 11
12#include <linux/reboot.h>
13
12struct irq_data; 14struct irq_data;
13 15
14extern void pxa_timer_init(void); 16extern void pxa_timer_init(void);
@@ -56,4 +58,4 @@ void __init pxa_set_btuart_info(void *info);
56void __init pxa_set_stuart_info(void *info); 58void __init pxa_set_stuart_info(void *info);
57void __init pxa_set_hwuart_info(void *info); 59void __init pxa_set_hwuart_info(void *info);
58 60
59void pxa_restart(char, const char *); 61void pxa_restart(enum reboot_mode, const char *);
diff --git a/arch/arm/mach-pxa/littleton.c b/arch/arm/mach-pxa/littleton.c
index e848c4607baf..5d665588c7eb 100644
--- a/arch/arm/mach-pxa/littleton.c
+++ b/arch/arm/mach-pxa/littleton.c
@@ -222,7 +222,7 @@ static inline void littleton_init_spi(void) {}
222#endif 222#endif
223 223
224#if defined(CONFIG_KEYBOARD_PXA27x) || defined(CONFIG_KEYBOARD_PXA27x_MODULE) 224#if defined(CONFIG_KEYBOARD_PXA27x) || defined(CONFIG_KEYBOARD_PXA27x_MODULE)
225static unsigned int littleton_matrix_key_map[] = { 225static const unsigned int littleton_matrix_key_map[] = {
226 /* KEY(row, col, key_code) */ 226 /* KEY(row, col, key_code) */
227 KEY(1, 3, KEY_0), KEY(0, 0, KEY_1), KEY(1, 0, KEY_2), KEY(2, 0, KEY_3), 227 KEY(1, 3, KEY_0), KEY(0, 0, KEY_1), KEY(1, 0, KEY_2), KEY(2, 0, KEY_3),
228 KEY(0, 1, KEY_4), KEY(1, 1, KEY_5), KEY(2, 1, KEY_6), KEY(0, 2, KEY_7), 228 KEY(0, 1, KEY_4), KEY(1, 1, KEY_5), KEY(2, 1, KEY_6), KEY(0, 2, KEY_7),
@@ -249,11 +249,15 @@ static unsigned int littleton_matrix_key_map[] = {
249 KEY(3, 1, KEY_F23), /* soft2 */ 249 KEY(3, 1, KEY_F23), /* soft2 */
250}; 250};
251 251
252static struct matrix_keymap_data littleton_matrix_keymap_data = {
253 .keymap = littleton_matrix_key_map,
254 .keymap_size = ARRAY_SIZE(littleton_matrix_key_map),
255};
256
252static struct pxa27x_keypad_platform_data littleton_keypad_info = { 257static struct pxa27x_keypad_platform_data littleton_keypad_info = {
253 .matrix_key_rows = 6, 258 .matrix_key_rows = 6,
254 .matrix_key_cols = 5, 259 .matrix_key_cols = 5,
255 .matrix_key_map = littleton_matrix_key_map, 260 .matrix_keymap_data = &littleton_matrix_keymap_data,
256 .matrix_key_map_size = ARRAY_SIZE(littleton_matrix_key_map),
257 261
258 .enable_rotary0 = 1, 262 .enable_rotary0 = 1,
259 .rotary0_up_key = KEY_UP, 263 .rotary0_up_key = KEY_UP,
diff --git a/arch/arm/mach-pxa/mainstone.c b/arch/arm/mach-pxa/mainstone.c
index 7a12c1ba90ff..dd70343c8708 100644
--- a/arch/arm/mach-pxa/mainstone.c
+++ b/arch/arm/mach-pxa/mainstone.c
@@ -408,7 +408,7 @@ static int mainstone_mci_init(struct device *dev, irq_handler_t mstone_detect_in
408 return err; 408 return err;
409} 409}
410 410
411static void mainstone_mci_setpower(struct device *dev, unsigned int vdd) 411static int mainstone_mci_setpower(struct device *dev, unsigned int vdd)
412{ 412{
413 struct pxamci_platform_data* p_d = dev->platform_data; 413 struct pxamci_platform_data* p_d = dev->platform_data;
414 414
@@ -420,6 +420,7 @@ static void mainstone_mci_setpower(struct device *dev, unsigned int vdd)
420 printk(KERN_DEBUG "%s: off\n", __func__); 420 printk(KERN_DEBUG "%s: off\n", __func__);
421 MST_MSCWR1 &= ~MST_MSCWR1_MMC_ON; 421 MST_MSCWR1 &= ~MST_MSCWR1_MMC_ON;
422 } 422 }
423 return 0;
423} 424}
424 425
425static void mainstone_mci_exit(struct device *dev, void *data) 426static void mainstone_mci_exit(struct device *dev, void *data)
@@ -498,7 +499,7 @@ static struct pxaohci_platform_data mainstone_ohci_platform_data = {
498}; 499};
499 500
500#if defined(CONFIG_KEYBOARD_PXA27x) || defined(CONFIG_KEYBOARD_PXA27x_MODULE) 501#if defined(CONFIG_KEYBOARD_PXA27x) || defined(CONFIG_KEYBOARD_PXA27x_MODULE)
501static unsigned int mainstone_matrix_keys[] = { 502static const unsigned int mainstone_matrix_keys[] = {
502 KEY(0, 0, KEY_A), KEY(1, 0, KEY_B), KEY(2, 0, KEY_C), 503 KEY(0, 0, KEY_A), KEY(1, 0, KEY_B), KEY(2, 0, KEY_C),
503 KEY(3, 0, KEY_D), KEY(4, 0, KEY_E), KEY(5, 0, KEY_F), 504 KEY(3, 0, KEY_D), KEY(4, 0, KEY_E), KEY(5, 0, KEY_F),
504 KEY(0, 1, KEY_G), KEY(1, 1, KEY_H), KEY(2, 1, KEY_I), 505 KEY(0, 1, KEY_G), KEY(1, 1, KEY_H), KEY(2, 1, KEY_I),
@@ -527,11 +528,15 @@ static unsigned int mainstone_matrix_keys[] = {
527 KEY(4, 6, KEY_SELECT), 528 KEY(4, 6, KEY_SELECT),
528}; 529};
529 530
531static struct matrix_keymap_data mainstone_matrix_keymap_data = {
532 .keymap = mainstone_matrix_keys,
533 .keymap_size = ARRAY_SIZE(mainstone_matrix_keys),
534};
535
530struct pxa27x_keypad_platform_data mainstone_keypad_info = { 536struct pxa27x_keypad_platform_data mainstone_keypad_info = {
531 .matrix_key_rows = 6, 537 .matrix_key_rows = 6,
532 .matrix_key_cols = 7, 538 .matrix_key_cols = 7,
533 .matrix_key_map = mainstone_matrix_keys, 539 .matrix_keymap_data = &mainstone_matrix_keymap_data,
534 .matrix_key_map_size = ARRAY_SIZE(mainstone_matrix_keys),
535 540
536 .enable_rotary0 = 1, 541 .enable_rotary0 = 1,
537 .rotary0_up_key = KEY_UP, 542 .rotary0_up_key = KEY_UP,
diff --git a/arch/arm/mach-pxa/mioa701.c b/arch/arm/mach-pxa/mioa701.c
index f8979b943cbf..acc9d3cc0762 100644
--- a/arch/arm/mach-pxa/mioa701.c
+++ b/arch/arm/mach-pxa/mioa701.c
@@ -37,6 +37,7 @@
37#include <linux/wm97xx.h> 37#include <linux/wm97xx.h>
38#include <linux/mtd/physmap.h> 38#include <linux/mtd/physmap.h>
39#include <linux/usb/gpio_vbus.h> 39#include <linux/usb/gpio_vbus.h>
40#include <linux/reboot.h>
40#include <linux/regulator/max1586.h> 41#include <linux/regulator/max1586.h>
41#include <linux/slab.h> 42#include <linux/slab.h>
42#include <linux/i2c/pxa-i2c.h> 43#include <linux/i2c/pxa-i2c.h>
@@ -222,7 +223,7 @@ static struct pxafb_mach_info mioa701_pxafb_info = {
222/* 223/*
223 * Keyboard configuration 224 * Keyboard configuration
224 */ 225 */
225static unsigned int mioa701_matrix_keys[] = { 226static const unsigned int mioa701_matrix_keys[] = {
226 KEY(0, 0, KEY_UP), 227 KEY(0, 0, KEY_UP),
227 KEY(0, 1, KEY_RIGHT), 228 KEY(0, 1, KEY_RIGHT),
228 KEY(0, 2, KEY_MEDIA), 229 KEY(0, 2, KEY_MEDIA),
@@ -233,11 +234,16 @@ static unsigned int mioa701_matrix_keys[] = {
233 KEY(2, 1, KEY_PHONE), /* Phone Green key */ 234 KEY(2, 1, KEY_PHONE), /* Phone Green key */
234 KEY(2, 2, KEY_CAMERA) /* Camera key */ 235 KEY(2, 2, KEY_CAMERA) /* Camera key */
235}; 236};
237
238static struct matrix_keymap_data mioa701_matrix_keymap_data = {
239 .keymap = mioa701_matrix_keys,
240 .keymap_size = ARRAY_SIZE(mioa701_matrix_keys),
241};
242
236static struct pxa27x_keypad_platform_data mioa701_keypad_info = { 243static struct pxa27x_keypad_platform_data mioa701_keypad_info = {
237 .matrix_key_rows = 3, 244 .matrix_key_rows = 3,
238 .matrix_key_cols = 3, 245 .matrix_key_cols = 3,
239 .matrix_key_map = mioa701_matrix_keys, 246 .matrix_keymap_data = &mioa701_matrix_keymap_data,
240 .matrix_key_map_size = ARRAY_SIZE(mioa701_matrix_keys),
241}; 247};
242 248
243/* 249/*
@@ -691,13 +697,13 @@ static void mioa701_machine_exit(void);
691static void mioa701_poweroff(void) 697static void mioa701_poweroff(void)
692{ 698{
693 mioa701_machine_exit(); 699 mioa701_machine_exit();
694 pxa_restart('s', NULL); 700 pxa_restart(REBOOT_SOFT, NULL);
695} 701}
696 702
697static void mioa701_restart(char c, const char *cmd) 703static void mioa701_restart(enum reboot_mode c, const char *cmd)
698{ 704{
699 mioa701_machine_exit(); 705 mioa701_machine_exit();
700 pxa_restart('s', cmd); 706 pxa_restart(REBOOT_SOFT, cmd);
701} 707}
702 708
703static struct gpio global_gpios[] = { 709static struct gpio global_gpios[] = {
@@ -756,7 +762,6 @@ static void mioa701_machine_exit(void)
756 762
757MACHINE_START(MIOA701, "MIO A701") 763MACHINE_START(MIOA701, "MIO A701")
758 .atag_offset = 0x100, 764 .atag_offset = 0x100,
759 .restart_mode = 's',
760 .map_io = &pxa27x_map_io, 765 .map_io = &pxa27x_map_io,
761 .nr_irqs = PXA_NR_IRQS, 766 .nr_irqs = PXA_NR_IRQS,
762 .init_irq = &pxa27x_init_irq, 767 .init_irq = &pxa27x_init_irq,
diff --git a/arch/arm/mach-pxa/palmld.c b/arch/arm/mach-pxa/palmld.c
index 909b713e5789..cf210b11ffcc 100644
--- a/arch/arm/mach-pxa/palmld.c
+++ b/arch/arm/mach-pxa/palmld.c
@@ -173,7 +173,7 @@ static inline void palmld_nor_init(void) {}
173 * GPIO keyboard 173 * GPIO keyboard
174 ******************************************************************************/ 174 ******************************************************************************/
175#if defined(CONFIG_KEYBOARD_PXA27x) || defined(CONFIG_KEYBOARD_PXA27x_MODULE) 175#if defined(CONFIG_KEYBOARD_PXA27x) || defined(CONFIG_KEYBOARD_PXA27x_MODULE)
176static unsigned int palmld_matrix_keys[] = { 176static const unsigned int palmld_matrix_keys[] = {
177 KEY(0, 1, KEY_F2), 177 KEY(0, 1, KEY_F2),
178 KEY(0, 2, KEY_UP), 178 KEY(0, 2, KEY_UP),
179 179
@@ -190,11 +190,15 @@ static unsigned int palmld_matrix_keys[] = {
190 KEY(3, 2, KEY_LEFT), 190 KEY(3, 2, KEY_LEFT),
191}; 191};
192 192
193static struct matrix_keymap_data palmld_matrix_keymap_data = {
194 .keymap = palmld_matrix_keys,
195 .keymap_size = ARRAY_SIZE(palmld_matrix_keys),
196};
197
193static struct pxa27x_keypad_platform_data palmld_keypad_platform_data = { 198static struct pxa27x_keypad_platform_data palmld_keypad_platform_data = {
194 .matrix_key_rows = 4, 199 .matrix_key_rows = 4,
195 .matrix_key_cols = 3, 200 .matrix_key_cols = 3,
196 .matrix_key_map = palmld_matrix_keys, 201 .matrix_keymap_data = &palmld_matrix_keymap_data,
197 .matrix_key_map_size = ARRAY_SIZE(palmld_matrix_keys),
198 202
199 .debounce_interval = 30, 203 .debounce_interval = 30,
200}; 204};
diff --git a/arch/arm/mach-pxa/palmt5.c b/arch/arm/mach-pxa/palmt5.c
index 5033fd07968f..3ed9b029428b 100644
--- a/arch/arm/mach-pxa/palmt5.c
+++ b/arch/arm/mach-pxa/palmt5.c
@@ -108,7 +108,7 @@ static unsigned long palmt5_pin_config[] __initdata = {
108 * GPIO keyboard 108 * GPIO keyboard
109 ******************************************************************************/ 109 ******************************************************************************/
110#if defined(CONFIG_KEYBOARD_PXA27x) || defined(CONFIG_KEYBOARD_PXA27x_MODULE) 110#if defined(CONFIG_KEYBOARD_PXA27x) || defined(CONFIG_KEYBOARD_PXA27x_MODULE)
111static unsigned int palmt5_matrix_keys[] = { 111static const unsigned int palmt5_matrix_keys[] = {
112 KEY(0, 0, KEY_POWER), 112 KEY(0, 0, KEY_POWER),
113 KEY(0, 1, KEY_F1), 113 KEY(0, 1, KEY_F1),
114 KEY(0, 2, KEY_ENTER), 114 KEY(0, 2, KEY_ENTER),
@@ -124,11 +124,15 @@ static unsigned int palmt5_matrix_keys[] = {
124 KEY(3, 2, KEY_LEFT), 124 KEY(3, 2, KEY_LEFT),
125}; 125};
126 126
127static struct matrix_keymap_data palmt5_matrix_keymap_data = {
128 .keymap = palmt5_matrix_keys,
129 .keymap_size = ARRAY_SIZE(palmt5_matrix_keys),
130};
131
127static struct pxa27x_keypad_platform_data palmt5_keypad_platform_data = { 132static struct pxa27x_keypad_platform_data palmt5_keypad_platform_data = {
128 .matrix_key_rows = 4, 133 .matrix_key_rows = 4,
129 .matrix_key_cols = 3, 134 .matrix_key_cols = 3,
130 .matrix_key_map = palmt5_matrix_keys, 135 .matrix_keymap_data = &palmt5_matrix_keymap_data,
131 .matrix_key_map_size = ARRAY_SIZE(palmt5_matrix_keys),
132 136
133 .debounce_interval = 30, 137 .debounce_interval = 30,
134}; 138};
diff --git a/arch/arm/mach-pxa/palmtreo.c b/arch/arm/mach-pxa/palmtreo.c
index d82a50b4a803..d8b937c870de 100644
--- a/arch/arm/mach-pxa/palmtreo.c
+++ b/arch/arm/mach-pxa/palmtreo.c
@@ -168,7 +168,7 @@ static unsigned long centro685_pin_config[] __initdata = {
168 * GPIO keyboard 168 * GPIO keyboard
169 ******************************************************************************/ 169 ******************************************************************************/
170#if IS_ENABLED(CONFIG_KEYBOARD_PXA27x) 170#if IS_ENABLED(CONFIG_KEYBOARD_PXA27x)
171static unsigned int treo680_matrix_keys[] = { 171static const unsigned int treo680_matrix_keys[] = {
172 KEY(0, 0, KEY_F8), /* Red/Off/Power */ 172 KEY(0, 0, KEY_F8), /* Red/Off/Power */
173 KEY(0, 1, KEY_LEFT), 173 KEY(0, 1, KEY_LEFT),
174 KEY(0, 2, KEY_LEFTCTRL), /* Alternate */ 174 KEY(0, 2, KEY_LEFTCTRL), /* Alternate */
@@ -227,7 +227,7 @@ static unsigned int treo680_matrix_keys[] = {
227 KEY(7, 5, KEY_I), 227 KEY(7, 5, KEY_I),
228}; 228};
229 229
230static unsigned int centro_matrix_keys[] = { 230static const unsigned int centro_matrix_keys[] = {
231 KEY(0, 0, KEY_F9), /* Home */ 231 KEY(0, 0, KEY_F9), /* Home */
232 KEY(0, 1, KEY_LEFT), 232 KEY(0, 1, KEY_LEFT),
233 KEY(0, 2, KEY_LEFTCTRL), /* Alternate */ 233 KEY(0, 2, KEY_LEFTCTRL), /* Alternate */
@@ -286,11 +286,20 @@ static unsigned int centro_matrix_keys[] = {
286 KEY(7, 5, KEY_I), 286 KEY(7, 5, KEY_I),
287}; 287};
288 288
289static struct matrix_keymap_data treo680_matrix_keymap_data = {
290 .keymap = treo680_matrix_keys,
291 .keymap_size = ARRAY_SIZE(treo680_matrix_keys),
292};
293
294static struct matrix_keymap_data centro_matrix_keymap_data = {
295 .keymap = centro_matrix_keys,
296 .keymap_size = ARRAY_SIZE(centro_matrix_keys),
297};
298
289static struct pxa27x_keypad_platform_data treo680_keypad_pdata = { 299static struct pxa27x_keypad_platform_data treo680_keypad_pdata = {
290 .matrix_key_rows = 8, 300 .matrix_key_rows = 8,
291 .matrix_key_cols = 7, 301 .matrix_key_cols = 7,
292 .matrix_key_map = treo680_matrix_keys, 302 .matrix_keymap_data = &treo680_matrix_keymap_data,
293 .matrix_key_map_size = ARRAY_SIZE(treo680_matrix_keys),
294 .direct_key_map = { KEY_CONNECT }, 303 .direct_key_map = { KEY_CONNECT },
295 .direct_key_num = 1, 304 .direct_key_num = 1,
296 305
@@ -301,10 +310,8 @@ static void __init palmtreo_kpc_init(void)
301{ 310{
302 static struct pxa27x_keypad_platform_data *data = &treo680_keypad_pdata; 311 static struct pxa27x_keypad_platform_data *data = &treo680_keypad_pdata;
303 312
304 if (machine_is_centro()) { 313 if (machine_is_centro())
305 data->matrix_key_map = centro_matrix_keys; 314 data->matrix_keymap_data = &centro_matrix_keymap_data;
306 data->matrix_key_map_size = ARRAY_SIZE(centro_matrix_keys);
307 }
308 315
309 pxa_set_keypad_info(&treo680_keypad_pdata); 316 pxa_set_keypad_info(&treo680_keypad_pdata);
310} 317}
diff --git a/arch/arm/mach-pxa/palmtx.c b/arch/arm/mach-pxa/palmtx.c
index 627c93a7364c..83f830dd8ad8 100644
--- a/arch/arm/mach-pxa/palmtx.c
+++ b/arch/arm/mach-pxa/palmtx.c
@@ -176,7 +176,7 @@ static inline void palmtx_nor_init(void) {}
176 * GPIO keyboard 176 * GPIO keyboard
177 ******************************************************************************/ 177 ******************************************************************************/
178#if defined(CONFIG_KEYBOARD_PXA27x) || defined(CONFIG_KEYBOARD_PXA27x_MODULE) 178#if defined(CONFIG_KEYBOARD_PXA27x) || defined(CONFIG_KEYBOARD_PXA27x_MODULE)
179static unsigned int palmtx_matrix_keys[] = { 179static const unsigned int palmtx_matrix_keys[] = {
180 KEY(0, 0, KEY_POWER), 180 KEY(0, 0, KEY_POWER),
181 KEY(0, 1, KEY_F1), 181 KEY(0, 1, KEY_F1),
182 KEY(0, 2, KEY_ENTER), 182 KEY(0, 2, KEY_ENTER),
@@ -192,11 +192,15 @@ static unsigned int palmtx_matrix_keys[] = {
192 KEY(3, 2, KEY_LEFT), 192 KEY(3, 2, KEY_LEFT),
193}; 193};
194 194
195static struct matrix_keymap_data palmtx_matrix_keymap_data = {
196 .keymap = palmtx_matrix_keys,
197 .keymap_size = ARRAY_SIZE(palmtx_matrix_keys),
198};
199
195static struct pxa27x_keypad_platform_data palmtx_keypad_platform_data = { 200static struct pxa27x_keypad_platform_data palmtx_keypad_platform_data = {
196 .matrix_key_rows = 4, 201 .matrix_key_rows = 4,
197 .matrix_key_cols = 3, 202 .matrix_key_cols = 3,
198 .matrix_key_map = palmtx_matrix_keys, 203 .matrix_keymap_data = &palmtx_matrix_keymap_data,
199 .matrix_key_map_size = ARRAY_SIZE(palmtx_matrix_keys),
200 204
201 .debounce_interval = 30, 205 .debounce_interval = 30,
202}; 206};
diff --git a/arch/arm/mach-pxa/palmz72.c b/arch/arm/mach-pxa/palmz72.c
index 18b7fcd98592..1a35ddf218da 100644
--- a/arch/arm/mach-pxa/palmz72.c
+++ b/arch/arm/mach-pxa/palmz72.c
@@ -140,7 +140,7 @@ static unsigned long palmz72_pin_config[] __initdata = {
140 * GPIO keyboard 140 * GPIO keyboard
141 ******************************************************************************/ 141 ******************************************************************************/
142#if defined(CONFIG_KEYBOARD_PXA27x) || defined(CONFIG_KEYBOARD_PXA27x_MODULE) 142#if defined(CONFIG_KEYBOARD_PXA27x) || defined(CONFIG_KEYBOARD_PXA27x_MODULE)
143static unsigned int palmz72_matrix_keys[] = { 143static const unsigned int palmz72_matrix_keys[] = {
144 KEY(0, 0, KEY_POWER), 144 KEY(0, 0, KEY_POWER),
145 KEY(0, 1, KEY_F1), 145 KEY(0, 1, KEY_F1),
146 KEY(0, 2, KEY_ENTER), 146 KEY(0, 2, KEY_ENTER),
@@ -156,11 +156,15 @@ static unsigned int palmz72_matrix_keys[] = {
156 KEY(3, 2, KEY_LEFT), 156 KEY(3, 2, KEY_LEFT),
157}; 157};
158 158
159static struct matrix_keymap_data almz72_matrix_keymap_data = {
160 .keymap = palmz72_matrix_keys,
161 .keymap_size = ARRAY_SIZE(palmz72_matrix_keys),
162};
163
159static struct pxa27x_keypad_platform_data palmz72_keypad_platform_data = { 164static struct pxa27x_keypad_platform_data palmz72_keypad_platform_data = {
160 .matrix_key_rows = 4, 165 .matrix_key_rows = 4,
161 .matrix_key_cols = 3, 166 .matrix_key_cols = 3,
162 .matrix_key_map = palmz72_matrix_keys, 167 .matrix_keymap_data = &almz72_matrix_keymap_data,
163 .matrix_key_map_size = ARRAY_SIZE(palmz72_matrix_keys),
164 168
165 .debounce_interval = 30, 169 .debounce_interval = 30,
166}; 170};
diff --git a/arch/arm/mach-pxa/pcm990-baseboard.c b/arch/arm/mach-pxa/pcm990-baseboard.c
index fb7f1d1627dc..13e5b00eae90 100644
--- a/arch/arm/mach-pxa/pcm990-baseboard.c
+++ b/arch/arm/mach-pxa/pcm990-baseboard.c
@@ -335,7 +335,7 @@ static int pcm990_mci_init(struct device *dev, irq_handler_t mci_detect_int,
335 return err; 335 return err;
336} 336}
337 337
338static void pcm990_mci_setpower(struct device *dev, unsigned int vdd) 338static int pcm990_mci_setpower(struct device *dev, unsigned int vdd)
339{ 339{
340 struct pxamci_platform_data *p_d = dev->platform_data; 340 struct pxamci_platform_data *p_d = dev->platform_data;
341 u8 val; 341 u8 val;
@@ -348,6 +348,7 @@ static void pcm990_mci_setpower(struct device *dev, unsigned int vdd)
348 val &= ~PCM990_CTRL_MMC2PWR; 348 val &= ~PCM990_CTRL_MMC2PWR;
349 349
350 pcm990_cpld_writeb(PCM990_CTRL_MMC2PWR, PCM990_CTRL_REG5); 350 pcm990_cpld_writeb(PCM990_CTRL_MMC2PWR, PCM990_CTRL_REG5);
351 return 0;
351} 352}
352 353
353static void pcm990_mci_exit(struct device *dev, void *data) 354static void pcm990_mci_exit(struct device *dev, void *data)
diff --git a/arch/arm/mach-pxa/poodle.c b/arch/arm/mach-pxa/poodle.c
index 50ccd5f1d560..aedf053a1de5 100644
--- a/arch/arm/mach-pxa/poodle.c
+++ b/arch/arm/mach-pxa/poodle.c
@@ -258,7 +258,7 @@ err_free_2:
258 return err; 258 return err;
259} 259}
260 260
261static void poodle_mci_setpower(struct device *dev, unsigned int vdd) 261static int poodle_mci_setpower(struct device *dev, unsigned int vdd)
262{ 262{
263 struct pxamci_platform_data* p_d = dev->platform_data; 263 struct pxamci_platform_data* p_d = dev->platform_data;
264 264
@@ -270,6 +270,8 @@ static void poodle_mci_setpower(struct device *dev, unsigned int vdd)
270 gpio_set_value(POODLE_GPIO_SD_PWR1, 0); 270 gpio_set_value(POODLE_GPIO_SD_PWR1, 0);
271 gpio_set_value(POODLE_GPIO_SD_PWR, 0); 271 gpio_set_value(POODLE_GPIO_SD_PWR, 0);
272 } 272 }
273
274 return 0;
273} 275}
274 276
275static void poodle_mci_exit(struct device *dev, void *data) 277static void poodle_mci_exit(struct device *dev, void *data)
@@ -422,7 +424,7 @@ static struct i2c_board_info __initdata poodle_i2c_devices[] = {
422 424
423static void poodle_poweroff(void) 425static void poodle_poweroff(void)
424{ 426{
425 pxa_restart('h', NULL); 427 pxa_restart(REBOOT_HARD, NULL);
426} 428}
427 429
428static void __init poodle_init(void) 430static void __init poodle_init(void)
diff --git a/arch/arm/mach-pxa/reset.c b/arch/arm/mach-pxa/reset.c
index 3fab583755d4..0d5dd646f61f 100644
--- a/arch/arm/mach-pxa/reset.c
+++ b/arch/arm/mach-pxa/reset.c
@@ -83,7 +83,7 @@ static void do_hw_reset(void)
83 writel_relaxed(readl_relaxed(OSCR) + 368640, OSMR3); 83 writel_relaxed(readl_relaxed(OSCR) + 368640, OSMR3);
84} 84}
85 85
86void pxa_restart(char mode, const char *cmd) 86void pxa_restart(enum reboot_mode mode, const char *cmd)
87{ 87{
88 local_irq_disable(); 88 local_irq_disable();
89 local_fiq_disable(); 89 local_fiq_disable();
@@ -91,14 +91,14 @@ void pxa_restart(char mode, const char *cmd)
91 clear_reset_status(RESET_STATUS_ALL); 91 clear_reset_status(RESET_STATUS_ALL);
92 92
93 switch (mode) { 93 switch (mode) {
94 case 's': 94 case REBOOT_SOFT:
95 /* Jump into ROM at address 0 */ 95 /* Jump into ROM at address 0 */
96 soft_restart(0); 96 soft_restart(0);
97 break; 97 break;
98 case 'g': 98 case REBOOT_GPIO:
99 do_gpio_reset(); 99 do_gpio_reset();
100 break; 100 break;
101 case 'h': 101 case REBOOT_HARD:
102 default: 102 default:
103 do_hw_reset(); 103 do_hw_reset();
104 break; 104 break;
diff --git a/arch/arm/mach-pxa/spitz.c b/arch/arm/mach-pxa/spitz.c
index 362726c49c70..4c29173026e8 100644
--- a/arch/arm/mach-pxa/spitz.c
+++ b/arch/arm/mach-pxa/spitz.c
@@ -31,6 +31,7 @@
31#include <linux/regulator/machine.h> 31#include <linux/regulator/machine.h>
32#include <linux/io.h> 32#include <linux/io.h>
33#include <linux/module.h> 33#include <linux/module.h>
34#include <linux/reboot.h>
34 35
35#include <asm/setup.h> 36#include <asm/setup.h>
36#include <asm/mach-types.h> 37#include <asm/mach-types.h>
@@ -597,7 +598,7 @@ static inline void spitz_spi_init(void) {}
597 * NOTE: The card detect interrupt isn't debounced so we delay it by 250ms to 598 * NOTE: The card detect interrupt isn't debounced so we delay it by 250ms to
598 * give the card a chance to fully insert/eject. 599 * give the card a chance to fully insert/eject.
599 */ 600 */
600static void spitz_mci_setpower(struct device *dev, unsigned int vdd) 601static int spitz_mci_setpower(struct device *dev, unsigned int vdd)
601{ 602{
602 struct pxamci_platform_data* p_d = dev->platform_data; 603 struct pxamci_platform_data* p_d = dev->platform_data;
603 604
@@ -605,6 +606,8 @@ static void spitz_mci_setpower(struct device *dev, unsigned int vdd)
605 spitz_card_pwr_ctrl(SCOOP_CPR_SD_3V, SCOOP_CPR_SD_3V); 606 spitz_card_pwr_ctrl(SCOOP_CPR_SD_3V, SCOOP_CPR_SD_3V);
606 else 607 else
607 spitz_card_pwr_ctrl(SCOOP_CPR_SD_3V, 0x0); 608 spitz_card_pwr_ctrl(SCOOP_CPR_SD_3V, 0x0);
609
610 return 0;
608} 611}
609 612
610static struct pxamci_platform_data spitz_mci_platform_data = { 613static struct pxamci_platform_data spitz_mci_platform_data = {
@@ -924,10 +927,10 @@ static inline void spitz_i2c_init(void) {}
924 ******************************************************************************/ 927 ******************************************************************************/
925static void spitz_poweroff(void) 928static void spitz_poweroff(void)
926{ 929{
927 pxa_restart('g', NULL); 930 pxa_restart(REBOOT_GPIO, NULL);
928} 931}
929 932
930static void spitz_restart(char mode, const char *cmd) 933static void spitz_restart(enum reboot_mode mode, const char *cmd)
931{ 934{
932 uint32_t msc0 = __raw_readl(MSC0); 935 uint32_t msc0 = __raw_readl(MSC0);
933 /* Bootloader magic for a reboot */ 936 /* Bootloader magic for a reboot */
@@ -979,7 +982,6 @@ static void __init spitz_fixup(struct tag *tags, char **cmdline,
979 982
980#ifdef CONFIG_MACH_SPITZ 983#ifdef CONFIG_MACH_SPITZ
981MACHINE_START(SPITZ, "SHARP Spitz") 984MACHINE_START(SPITZ, "SHARP Spitz")
982 .restart_mode = 'g',
983 .fixup = spitz_fixup, 985 .fixup = spitz_fixup,
984 .map_io = pxa27x_map_io, 986 .map_io = pxa27x_map_io,
985 .nr_irqs = PXA_NR_IRQS, 987 .nr_irqs = PXA_NR_IRQS,
@@ -993,7 +995,6 @@ MACHINE_END
993 995
994#ifdef CONFIG_MACH_BORZOI 996#ifdef CONFIG_MACH_BORZOI
995MACHINE_START(BORZOI, "SHARP Borzoi") 997MACHINE_START(BORZOI, "SHARP Borzoi")
996 .restart_mode = 'g',
997 .fixup = spitz_fixup, 998 .fixup = spitz_fixup,
998 .map_io = pxa27x_map_io, 999 .map_io = pxa27x_map_io,
999 .nr_irqs = PXA_NR_IRQS, 1000 .nr_irqs = PXA_NR_IRQS,
@@ -1007,7 +1008,6 @@ MACHINE_END
1007 1008
1008#ifdef CONFIG_MACH_AKITA 1009#ifdef CONFIG_MACH_AKITA
1009MACHINE_START(AKITA, "SHARP Akita") 1010MACHINE_START(AKITA, "SHARP Akita")
1010 .restart_mode = 'g',
1011 .fixup = spitz_fixup, 1011 .fixup = spitz_fixup,
1012 .map_io = pxa27x_map_io, 1012 .map_io = pxa27x_map_io,
1013 .nr_irqs = PXA_NR_IRQS, 1013 .nr_irqs = PXA_NR_IRQS,
diff --git a/arch/arm/mach-pxa/stargate2.c b/arch/arm/mach-pxa/stargate2.c
index 88fde43c948c..62aea3e835f3 100644
--- a/arch/arm/mach-pxa/stargate2.c
+++ b/arch/arm/mach-pxa/stargate2.c
@@ -734,9 +734,10 @@ static int stargate2_mci_init(struct device *dev,
734 * 734 *
735 * Very simple control. Either it is on or off and is controlled by 735 * Very simple control. Either it is on or off and is controlled by
736 * a gpio pin */ 736 * a gpio pin */
737static void stargate2_mci_setpower(struct device *dev, unsigned int vdd) 737static int stargate2_mci_setpower(struct device *dev, unsigned int vdd)
738{ 738{
739 gpio_set_value(SG2_SD_POWER_ENABLE, !!vdd); 739 gpio_set_value(SG2_SD_POWER_ENABLE, !!vdd);
740 return 0;
740} 741}
741 742
742static void stargate2_mci_exit(struct device *dev, void *data) 743static void stargate2_mci_exit(struct device *dev, void *data)
diff --git a/arch/arm/mach-pxa/tavorevb.c b/arch/arm/mach-pxa/tavorevb.c
index f55979c09a5f..4680efe55345 100644
--- a/arch/arm/mach-pxa/tavorevb.c
+++ b/arch/arm/mach-pxa/tavorevb.c
@@ -106,7 +106,7 @@ static struct platform_device smc91x_device = {
106}; 106};
107 107
108#if defined(CONFIG_KEYBOARD_PXA27x) || defined(CONFIG_KEYBOARD_PXA27x_MODULE) 108#if defined(CONFIG_KEYBOARD_PXA27x) || defined(CONFIG_KEYBOARD_PXA27x_MODULE)
109static unsigned int tavorevb_matrix_key_map[] = { 109static const unsigned int tavorevb_matrix_key_map[] = {
110 /* KEY(row, col, key_code) */ 110 /* KEY(row, col, key_code) */
111 KEY(0, 4, KEY_A), KEY(0, 5, KEY_B), KEY(0, 6, KEY_C), 111 KEY(0, 4, KEY_A), KEY(0, 5, KEY_B), KEY(0, 6, KEY_C),
112 KEY(1, 4, KEY_E), KEY(1, 5, KEY_F), KEY(1, 6, KEY_G), 112 KEY(1, 4, KEY_E), KEY(1, 5, KEY_F), KEY(1, 6, KEY_G),
@@ -147,11 +147,15 @@ static unsigned int tavorevb_matrix_key_map[] = {
147 KEY(3, 3, KEY_F23), /* soft2 */ 147 KEY(3, 3, KEY_F23), /* soft2 */
148}; 148};
149 149
150static struct matrix_keymap_data tavorevb_matrix_keymap_data = {
151 .keymap = tavorevb_matrix_key_map,
152 .keymap_size = ARRAY_SIZE(tavorevb_matrix_key_map),
153};
154
150static struct pxa27x_keypad_platform_data tavorevb_keypad_info = { 155static struct pxa27x_keypad_platform_data tavorevb_keypad_info = {
151 .matrix_key_rows = 7, 156 .matrix_key_rows = 7,
152 .matrix_key_cols = 7, 157 .matrix_key_cols = 7,
153 .matrix_key_map = tavorevb_matrix_key_map, 158 .matrix_keymap_data = &tavorevb_matrix_keymap_data,
154 .matrix_key_map_size = ARRAY_SIZE(tavorevb_matrix_key_map),
155 .debounce_interval = 30, 159 .debounce_interval = 30,
156}; 160};
157 161
diff --git a/arch/arm/mach-pxa/time.c b/arch/arm/mach-pxa/time.c
index 8f1ee92aea30..9aa852a8fab9 100644
--- a/arch/arm/mach-pxa/time.c
+++ b/arch/arm/mach-pxa/time.c
@@ -16,11 +16,11 @@
16#include <linux/init.h> 16#include <linux/init.h>
17#include <linux/interrupt.h> 17#include <linux/interrupt.h>
18#include <linux/clockchips.h> 18#include <linux/clockchips.h>
19#include <linux/sched_clock.h>
19 20
20#include <asm/div64.h> 21#include <asm/div64.h>
21#include <asm/mach/irq.h> 22#include <asm/mach/irq.h>
22#include <asm/mach/time.h> 23#include <asm/mach/time.h>
23#include <asm/sched_clock.h>
24#include <mach/regs-ost.h> 24#include <mach/regs-ost.h>
25#include <mach/irqs.h> 25#include <mach/irqs.h>
26 26
diff --git a/arch/arm/mach-pxa/tosa.c b/arch/arm/mach-pxa/tosa.c
index 3d91d2e5bf3a..0206b915a6f6 100644
--- a/arch/arm/mach-pxa/tosa.c
+++ b/arch/arm/mach-pxa/tosa.c
@@ -36,6 +36,7 @@
36#include <linux/input/matrix_keypad.h> 36#include <linux/input/matrix_keypad.h>
37#include <linux/i2c/pxa-i2c.h> 37#include <linux/i2c/pxa-i2c.h>
38#include <linux/usb/gpio_vbus.h> 38#include <linux/usb/gpio_vbus.h>
39#include <linux/reboot.h>
39 40
40#include <asm/setup.h> 41#include <asm/setup.h>
41#include <asm/mach-types.h> 42#include <asm/mach-types.h>
@@ -911,10 +912,10 @@ static struct platform_device *devices[] __initdata = {
911 912
912static void tosa_poweroff(void) 913static void tosa_poweroff(void)
913{ 914{
914 pxa_restart('g', NULL); 915 pxa_restart(REBOOT_GPIO, NULL);
915} 916}
916 917
917static void tosa_restart(char mode, const char *cmd) 918static void tosa_restart(enum reboot_mode mode, const char *cmd)
918{ 919{
919 uint32_t msc0 = __raw_readl(MSC0); 920 uint32_t msc0 = __raw_readl(MSC0);
920 921
@@ -969,7 +970,6 @@ static void __init fixup_tosa(struct tag *tags, char **cmdline,
969} 970}
970 971
971MACHINE_START(TOSA, "SHARP Tosa") 972MACHINE_START(TOSA, "SHARP Tosa")
972 .restart_mode = 'g',
973 .fixup = fixup_tosa, 973 .fixup = fixup_tosa,
974 .map_io = pxa25x_map_io, 974 .map_io = pxa25x_map_io,
975 .nr_irqs = TOSA_NR_IRQS, 975 .nr_irqs = TOSA_NR_IRQS,
diff --git a/arch/arm/mach-pxa/z2.c b/arch/arm/mach-pxa/z2.c
index 989903a7e467..2513d8f4931f 100644
--- a/arch/arm/mach-pxa/z2.c
+++ b/arch/arm/mach-pxa/z2.c
@@ -345,7 +345,7 @@ static inline void z2_leds_init(void) {}
345 * GPIO keyboard 345 * GPIO keyboard
346 ******************************************************************************/ 346 ******************************************************************************/
347#if defined(CONFIG_KEYBOARD_PXA27x) || defined(CONFIG_KEYBOARD_PXA27x_MODULE) 347#if defined(CONFIG_KEYBOARD_PXA27x) || defined(CONFIG_KEYBOARD_PXA27x_MODULE)
348static unsigned int z2_matrix_keys[] = { 348static const unsigned int z2_matrix_keys[] = {
349 KEY(0, 0, KEY_OPTION), 349 KEY(0, 0, KEY_OPTION),
350 KEY(1, 0, KEY_UP), 350 KEY(1, 0, KEY_UP),
351 KEY(2, 0, KEY_DOWN), 351 KEY(2, 0, KEY_DOWN),
@@ -405,11 +405,15 @@ static unsigned int z2_matrix_keys[] = {
405 KEY(5, 7, KEY_DOT), 405 KEY(5, 7, KEY_DOT),
406}; 406};
407 407
408static struct matrix_keymap_data z2_matrix_keymap_data = {
409 .keymap = z2_matrix_keys,
410 .keymap_size = ARRAY_SIZE(z2_matrix_keys),
411};
412
408static struct pxa27x_keypad_platform_data z2_keypad_platform_data = { 413static struct pxa27x_keypad_platform_data z2_keypad_platform_data = {
409 .matrix_key_rows = 7, 414 .matrix_key_rows = 7,
410 .matrix_key_cols = 8, 415 .matrix_key_cols = 8,
411 .matrix_key_map = z2_matrix_keys, 416 .matrix_keymap_data = &z2_matrix_keymap_data,
412 .matrix_key_map_size = ARRAY_SIZE(z2_matrix_keys),
413 417
414 .debounce_interval = 30, 418 .debounce_interval = 30,
415}; 419};
diff --git a/arch/arm/mach-pxa/zylonite.c b/arch/arm/mach-pxa/zylonite.c
index 1f00d650ac27..36cf7cf95ec1 100644
--- a/arch/arm/mach-pxa/zylonite.c
+++ b/arch/arm/mach-pxa/zylonite.c
@@ -263,7 +263,7 @@ static inline void zylonite_init_mmc(void) {}
263#endif 263#endif
264 264
265#if defined(CONFIG_KEYBOARD_PXA27x) || defined(CONFIG_KEYBOARD_PXA27x_MODULE) 265#if defined(CONFIG_KEYBOARD_PXA27x) || defined(CONFIG_KEYBOARD_PXA27x_MODULE)
266static unsigned int zylonite_matrix_key_map[] = { 266static const unsigned int zylonite_matrix_key_map[] = {
267 /* KEY(row, col, key_code) */ 267 /* KEY(row, col, key_code) */
268 KEY(0, 0, KEY_A), KEY(0, 1, KEY_B), KEY(0, 2, KEY_C), KEY(0, 5, KEY_D), 268 KEY(0, 0, KEY_A), KEY(0, 1, KEY_B), KEY(0, 2, KEY_C), KEY(0, 5, KEY_D),
269 KEY(1, 0, KEY_E), KEY(1, 1, KEY_F), KEY(1, 2, KEY_G), KEY(1, 5, KEY_H), 269 KEY(1, 0, KEY_E), KEY(1, 1, KEY_F), KEY(1, 2, KEY_G), KEY(1, 5, KEY_H),
@@ -306,11 +306,15 @@ static unsigned int zylonite_matrix_key_map[] = {
306 KEY(0, 3, KEY_AUX), /* contact */ 306 KEY(0, 3, KEY_AUX), /* contact */
307}; 307};
308 308
309static struct matrix_keymap_data zylonite_matrix_keymap_data = {
310 .keymap = zylonite_matrix_key_map,
311 .keymap_size = ARRAY_SIZE(zylonite_matrix_key_map),
312};
313
309static struct pxa27x_keypad_platform_data zylonite_keypad_info = { 314static struct pxa27x_keypad_platform_data zylonite_keypad_info = {
310 .matrix_key_rows = 8, 315 .matrix_key_rows = 8,
311 .matrix_key_cols = 8, 316 .matrix_key_cols = 8,
312 .matrix_key_map = zylonite_matrix_key_map, 317 .matrix_keymap_data = &zylonite_matrix_keymap_data,
313 .matrix_key_map_size = ARRAY_SIZE(zylonite_matrix_key_map),
314 318
315 .enable_rotary0 = 1, 319 .enable_rotary0 = 1,
316 .rotary0_up_key = KEY_UP, 320 .rotary0_up_key = KEY_UP,
diff --git a/arch/arm/mach-realview/realview_eb.c b/arch/arm/mach-realview/realview_eb.c
index 5b1c8bfe6fa9..c85ddb2a0ad0 100644
--- a/arch/arm/mach-realview/realview_eb.c
+++ b/arch/arm/mach-realview/realview_eb.c
@@ -29,6 +29,7 @@
29#include <linux/io.h> 29#include <linux/io.h>
30#include <linux/irqchip/arm-gic.h> 30#include <linux/irqchip/arm-gic.h>
31#include <linux/platform_data/clk-realview.h> 31#include <linux/platform_data/clk-realview.h>
32#include <linux/reboot.h>
32 33
33#include <mach/hardware.h> 34#include <mach/hardware.h>
34#include <asm/irq.h> 35#include <asm/irq.h>
@@ -418,7 +419,7 @@ static void __init realview_eb_timer_init(void)
418 realview_eb_twd_init(); 419 realview_eb_twd_init();
419} 420}
420 421
421static void realview_eb_restart(char mode, const char *cmd) 422static void realview_eb_restart(enum reboot_mode mode, const char *cmd)
422{ 423{
423 void __iomem *reset_ctrl = __io_address(REALVIEW_SYS_RESETCTL); 424 void __iomem *reset_ctrl = __io_address(REALVIEW_SYS_RESETCTL);
424 void __iomem *lock_ctrl = __io_address(REALVIEW_SYS_LOCK); 425 void __iomem *lock_ctrl = __io_address(REALVIEW_SYS_LOCK);
diff --git a/arch/arm/mach-realview/realview_pb1176.c b/arch/arm/mach-realview/realview_pb1176.c
index d5e83a1f6982..c5eade76461b 100644
--- a/arch/arm/mach-realview/realview_pb1176.c
+++ b/arch/arm/mach-realview/realview_pb1176.c
@@ -31,6 +31,7 @@
31#include <linux/io.h> 31#include <linux/io.h>
32#include <linux/irqchip/arm-gic.h> 32#include <linux/irqchip/arm-gic.h>
33#include <linux/platform_data/clk-realview.h> 33#include <linux/platform_data/clk-realview.h>
34#include <linux/reboot.h>
34 35
35#include <mach/hardware.h> 36#include <mach/hardware.h>
36#include <asm/irq.h> 37#include <asm/irq.h>
@@ -329,7 +330,7 @@ static void __init realview_pb1176_timer_init(void)
329 realview_timer_init(IRQ_DC1176_TIMER0); 330 realview_timer_init(IRQ_DC1176_TIMER0);
330} 331}
331 332
332static void realview_pb1176_restart(char mode, const char *cmd) 333static void realview_pb1176_restart(enum reboot_mode mode, const char *cmd)
333{ 334{
334 void __iomem *reset_ctrl = __io_address(REALVIEW_SYS_RESETCTL); 335 void __iomem *reset_ctrl = __io_address(REALVIEW_SYS_RESETCTL);
335 void __iomem *lock_ctrl = __io_address(REALVIEW_SYS_LOCK); 336 void __iomem *lock_ctrl = __io_address(REALVIEW_SYS_LOCK);
diff --git a/arch/arm/mach-realview/realview_pb11mp.c b/arch/arm/mach-realview/realview_pb11mp.c
index c3cfe213b5e6..f4b0962578fe 100644
--- a/arch/arm/mach-realview/realview_pb11mp.c
+++ b/arch/arm/mach-realview/realview_pb11mp.c
@@ -29,6 +29,7 @@
29#include <linux/io.h> 29#include <linux/io.h>
30#include <linux/irqchip/arm-gic.h> 30#include <linux/irqchip/arm-gic.h>
31#include <linux/platform_data/clk-realview.h> 31#include <linux/platform_data/clk-realview.h>
32#include <linux/reboot.h>
32 33
33#include <mach/hardware.h> 34#include <mach/hardware.h>
34#include <asm/irq.h> 35#include <asm/irq.h>
@@ -316,7 +317,7 @@ static void __init realview_pb11mp_timer_init(void)
316 realview_pb11mp_twd_init(); 317 realview_pb11mp_twd_init();
317} 318}
318 319
319static void realview_pb11mp_restart(char mode, const char *cmd) 320static void realview_pb11mp_restart(enum reboot_mode mode, const char *cmd)
320{ 321{
321 void __iomem *reset_ctrl = __io_address(REALVIEW_SYS_RESETCTL); 322 void __iomem *reset_ctrl = __io_address(REALVIEW_SYS_RESETCTL);
322 void __iomem *lock_ctrl = __io_address(REALVIEW_SYS_LOCK); 323 void __iomem *lock_ctrl = __io_address(REALVIEW_SYS_LOCK);
diff --git a/arch/arm/mach-realview/realview_pba8.c b/arch/arm/mach-realview/realview_pba8.c
index dde652a59620..10a3e1d76891 100644
--- a/arch/arm/mach-realview/realview_pba8.c
+++ b/arch/arm/mach-realview/realview_pba8.c
@@ -29,6 +29,7 @@
29#include <linux/io.h> 29#include <linux/io.h>
30#include <linux/irqchip/arm-gic.h> 30#include <linux/irqchip/arm-gic.h>
31#include <linux/platform_data/clk-realview.h> 31#include <linux/platform_data/clk-realview.h>
32#include <linux/reboot.h>
32 33
33#include <asm/irq.h> 34#include <asm/irq.h>
34#include <asm/mach-types.h> 35#include <asm/mach-types.h>
@@ -264,7 +265,7 @@ static void __init realview_pba8_timer_init(void)
264 realview_timer_init(IRQ_PBA8_TIMER0_1); 265 realview_timer_init(IRQ_PBA8_TIMER0_1);
265} 266}
266 267
267static void realview_pba8_restart(char mode, const char *cmd) 268static void realview_pba8_restart(enum reboot_mode mode, const char *cmd)
268{ 269{
269 void __iomem *reset_ctrl = __io_address(REALVIEW_SYS_RESETCTL); 270 void __iomem *reset_ctrl = __io_address(REALVIEW_SYS_RESETCTL);
270 void __iomem *lock_ctrl = __io_address(REALVIEW_SYS_LOCK); 271 void __iomem *lock_ctrl = __io_address(REALVIEW_SYS_LOCK);
diff --git a/arch/arm/mach-realview/realview_pbx.c b/arch/arm/mach-realview/realview_pbx.c
index 54f0185b01e3..9d75493e3f0c 100644
--- a/arch/arm/mach-realview/realview_pbx.c
+++ b/arch/arm/mach-realview/realview_pbx.c
@@ -28,6 +28,7 @@
28#include <linux/io.h> 28#include <linux/io.h>
29#include <linux/irqchip/arm-gic.h> 29#include <linux/irqchip/arm-gic.h>
30#include <linux/platform_data/clk-realview.h> 30#include <linux/platform_data/clk-realview.h>
31#include <linux/reboot.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>
@@ -344,7 +345,7 @@ static void realview_pbx_fixup(struct tag *tags, char **from,
344#endif 345#endif
345} 346}
346 347
347static void realview_pbx_restart(char mode, const char *cmd) 348static void realview_pbx_restart(enum reboot_mode mode, const char *cmd)
348{ 349{
349 void __iomem *reset_ctrl = __io_address(REALVIEW_SYS_RESETCTL); 350 void __iomem *reset_ctrl = __io_address(REALVIEW_SYS_RESETCTL);
350 void __iomem *lock_ctrl = __io_address(REALVIEW_SYS_LOCK); 351 void __iomem *lock_ctrl = __io_address(REALVIEW_SYS_LOCK);
diff --git a/arch/arm/mach-rockchip/Kconfig b/arch/arm/mach-rockchip/Kconfig
new file mode 100644
index 000000000000..25ee12b21f01
--- /dev/null
+++ b/arch/arm/mach-rockchip/Kconfig
@@ -0,0 +1,16 @@
1config ARCH_ROCKCHIP
2 bool "Rockchip RK2928 and RK3xxx SOCs" if ARCH_MULTI_V7
3 select PINCTRL
4 select PINCTRL_ROCKCHIP
5 select ARCH_REQUIRE_GPIOLIB
6 select ARM_GIC
7 select CACHE_L2X0
8 select HAVE_ARM_TWD if LOCAL_TIMERS
9 select HAVE_SMP
10 select LOCAL_TIMERS if SMP
11 select COMMON_CLK
12 select GENERIC_CLOCKEVENTS
13 select DW_APB_TIMER_OF
14 help
15 Support for Rockchip's Cortex-A9 Single-to-Quad-Core-SoCs
16 containing the RK2928, RK30xx and RK31xx series.
diff --git a/arch/arm/mach-rockchip/Makefile b/arch/arm/mach-rockchip/Makefile
new file mode 100644
index 000000000000..1547d4fc920a
--- /dev/null
+++ b/arch/arm/mach-rockchip/Makefile
@@ -0,0 +1 @@
obj-$(CONFIG_ARCH_ROCKCHIP) += rockchip.o
diff --git a/arch/arm/mach-rockchip/rockchip.c b/arch/arm/mach-rockchip/rockchip.c
new file mode 100644
index 000000000000..724d2d81f976
--- /dev/null
+++ b/arch/arm/mach-rockchip/rockchip.c
@@ -0,0 +1,52 @@
1/*
2 * Device Tree support for Rockchip SoCs
3 *
4 * Copyright (c) 2013 MundoReader S.L.
5 * Author: Heiko Stuebner <heiko@sntech.de>
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
18#include <linux/kernel.h>
19#include <linux/init.h>
20#include <linux/of_platform.h>
21#include <linux/irqchip.h>
22#include <linux/dw_apb_timer.h>
23#include <linux/clk-provider.h>
24#include <asm/mach/arch.h>
25#include <asm/mach/map.h>
26#include <asm/hardware/cache-l2x0.h>
27
28static void __init rockchip_timer_init(void)
29{
30 of_clk_init(NULL);
31 clocksource_of_init();
32}
33
34static void __init rockchip_dt_init(void)
35{
36 l2x0_of_init(0, ~0UL);
37 of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
38}
39
40static const char * const rockchip_board_dt_compat[] = {
41 "rockchip,rk2928",
42 "rockchip,rk3066a",
43 "rockchip,rk3066b",
44 "rockchip,rk3188",
45 NULL,
46};
47
48DT_MACHINE_START(ROCKCHIP_DT, "Rockchip Cortex-A9 (Device Tree)")
49 .init_machine = rockchip_dt_init,
50 .init_time = rockchip_timer_init,
51 .dt_compat = rockchip_board_dt_compat,
52MACHINE_END
diff --git a/arch/arm/mach-rpc/riscpc.c b/arch/arm/mach-rpc/riscpc.c
index a302cf5e0fc7..09d602b10d57 100644
--- a/arch/arm/mach-rpc/riscpc.c
+++ b/arch/arm/mach-rpc/riscpc.c
@@ -20,6 +20,7 @@
20#include <linux/ata_platform.h> 20#include <linux/ata_platform.h>
21#include <linux/io.h> 21#include <linux/io.h>
22#include <linux/i2c.h> 22#include <linux/i2c.h>
23#include <linux/reboot.h>
23 24
24#include <asm/elf.h> 25#include <asm/elf.h>
25#include <asm/mach-types.h> 26#include <asm/mach-types.h>
@@ -201,7 +202,7 @@ static int __init rpc_init(void)
201 202
202arch_initcall(rpc_init); 203arch_initcall(rpc_init);
203 204
204static void rpc_restart(char mode, const char *cmd) 205static void rpc_restart(enum reboot_mode mode, const char *cmd)
205{ 206{
206 iomd_writeb(0, IOMD_ROMCR0); 207 iomd_writeb(0, IOMD_ROMCR0);
207 208
diff --git a/arch/arm/mach-s3c24xx/Kconfig b/arch/arm/mach-s3c24xx/Kconfig
index f2f7088bfd22..7791ac76f945 100644
--- a/arch/arm/mach-s3c24xx/Kconfig
+++ b/arch/arm/mach-s3c24xx/Kconfig
@@ -28,9 +28,10 @@ config CPU_S3C2410
28 select CPU_ARM920T 28 select CPU_ARM920T
29 select CPU_LLSERIAL_S3C2410 29 select CPU_LLSERIAL_S3C2410
30 select S3C2410_CLOCK 30 select S3C2410_CLOCK
31 select S3C2410_CPUFREQ if CPU_FREQ_S3C24XX 31 select ARM_S3C2410_CPUFREQ if ARM_S3C24XX_CPUFREQ
32 select S3C2410_PM if PM 32 select S3C2410_PM if PM
33 select SAMSUNG_HRT 33 select SAMSUNG_HRT
34 select SAMSUNG_WDT_RESET
34 help 35 help
35 Support for S3C2410 and S3C2410A family from the S3C24XX line 36 Support for S3C2410 and S3C2410A family from the S3C24XX line
36 of Samsung Mobile CPUs. 37 of Samsung Mobile CPUs.
@@ -81,6 +82,7 @@ config CPU_S3C2442
81config CPU_S3C244X 82config CPU_S3C244X
82 def_bool y 83 def_bool y
83 depends on CPU_S3C2440 || CPU_S3C2442 84 depends on CPU_S3C2440 || CPU_S3C2442
85 select SAMSUNG_WDT_RESET
84 86
85config CPU_S3C2443 87config CPU_S3C2443
86 bool "SAMSUNG S3C2443" 88 bool "SAMSUNG S3C2443"
@@ -204,27 +206,38 @@ config S3C24XX_GPIO_EXTRA128
204 Add an extra 128 gpio numbers to the available GPIO pool. This is 206 Add an extra 128 gpio numbers to the available GPIO pool. This is
205 available for boards that need extra gpios for external devices. 207 available for boards that need extra gpios for external devices.
206 208
209config S3C24XX_PLL
210 bool "Support CPUfreq changing of PLL frequency (EXPERIMENTAL)"
211 depends on ARM_S3C24XX_CPUFREQ
212 help
213 Compile in support for changing the PLL frequency from the
214 S3C24XX series CPUfreq driver. The PLL takes time to settle
215 after a frequency change, so by default it is not enabled.
216
217 This also means that the PLL tables for the selected CPU(s) will
218 be built which may increase the size of the kernel image.
219
207# cpu frequency items common between s3c2410 and s3c2440/s3c2442 220# cpu frequency items common between s3c2410 and s3c2440/s3c2442
208 221
209config S3C2410_IOTIMING 222config S3C2410_IOTIMING
210 bool 223 bool
211 depends on CPU_FREQ_S3C24XX 224 depends on ARM_S3C24XX_CPUFREQ
212 help 225 help
213 Internal node to select io timing code that is common to the s3c2410 226 Internal node to select io timing code that is common to the s3c2410
214 and s3c2440/s3c2442 cpu frequency support. 227 and s3c2440/s3c2442 cpu frequency support.
215 228
216config S3C2410_CPUFREQ_UTILS 229config S3C2410_CPUFREQ_UTILS
217 bool 230 bool
218 depends on CPU_FREQ_S3C24XX 231 depends on ARM_S3C24XX_CPUFREQ
219 help 232 help
220 Internal node to select timing code that is common to the s3c2410 233 Internal node to select timing code that is common to the s3c2410
221 and s3c2440/s3c244 cpu frequency support. 234 and s3c2440/s3c244 cpu frequency support.
222 235
223# cpu frequency support common to s3c2412, s3c2413 and s3c2442 236# cpu frequency support common to s3c2412, s3c2413 and s3c2442
224 237
225config S3C2412_IOTIMING 238config S3C2412_IOTIMING
226 bool 239 bool
227 depends on CPU_FREQ_S3C24XX && (CPU_S3C2412 || CPU_S3C2443) 240 depends on ARM_S3C24XX_CPUFREQ && (CPU_S3C2412 || CPU_S3C2443)
228 help 241 help
229 Intel node to select io timing code that is common to the s3c2412 242 Intel node to select io timing code that is common to the s3c2412
230 and the s3c2443. 243 and the s3c2443.
@@ -233,16 +246,9 @@ config S3C2412_IOTIMING
233 246
234if CPU_S3C2410 247if CPU_S3C2410
235 248
236config S3C2410_CPUFREQ
237 bool
238 depends on CPU_FREQ_S3C24XX
239 select S3C2410_CPUFREQ_UTILS
240 help
241 CPU Frequency scaling support for S3C2410
242
243config S3C2410_PLL 249config S3C2410_PLL
244 bool 250 bool
245 depends on S3C2410_CPUFREQ && CPU_FREQ_S3C24XX_PLL 251 depends on ARM_S3C2410_CPUFREQ && S3C24XX_PLL
246 default y 252 default y
247 help 253 help
248 Select the PLL table for the S3C2410 254 Select the PLL table for the S3C2410
@@ -278,7 +284,7 @@ config ARCH_BAST
278 bool "Simtec Electronics BAST (EB2410ITX)" 284 bool "Simtec Electronics BAST (EB2410ITX)"
279 select ISA 285 select ISA
280 select MACH_BAST_IDE 286 select MACH_BAST_IDE
281 select S3C2410_IOTIMING if S3C2410_CPUFREQ 287 select S3C2410_IOTIMING if ARM_S3C2410_CPUFREQ
282 select S3C24XX_DCLK 288 select S3C24XX_DCLK
283 select S3C24XX_SIMTEC_NOR 289 select S3C24XX_SIMTEC_NOR
284 select S3C24XX_SIMTEC_PM if PM 290 select S3C24XX_SIMTEC_PM if PM
@@ -385,14 +391,6 @@ config CPU_S3C2412_ONLY
385 !CPU_S3C2442 && !CPU_S3C2443 391 !CPU_S3C2442 && !CPU_S3C2443
386 default y 392 default y
387 393
388config S3C2412_CPUFREQ
389 bool
390 depends on CPU_FREQ_S3C24XX
391 default y
392 select S3C2412_IOTIMING
393 help
394 CPU Frequency scaling support for S3C2412 and S3C2413 SoC CPUs.
395
396config S3C2412_DMA 394config S3C2412_DMA
397 bool 395 bool
398 help 396 help
@@ -490,18 +488,22 @@ config MACH_SMDK2416
490 help 488 help
491 Say Y here if you are using an SMDK2416 489 Say Y here if you are using an SMDK2416
492 490
491config MACH_S3C2416_DT
492 bool "Samsung S3C2416 machine using devicetree"
493 select CLKSRC_OF
494 select USE_OF
495 select PINCTRL
496 select PINCTRL_S3C24XX
497 help
498 Machine support for Samsung S3C2416 machines with device tree enabled.
499 Select this if a fdt blob is available for the S3C2416 SoC based board.
500 Note: This is under development and not all peripherals can be supported
501 with this machine file.
502
493endif # CPU_S3C2416 503endif # CPU_S3C2416
494 504
495if CPU_S3C2440 505if CPU_S3C2440
496 506
497config S3C2440_CPUFREQ
498 bool "S3C2440/S3C2442 CPU Frequency scaling support"
499 depends on CPU_FREQ_S3C24XX && (CPU_S3C2440 || CPU_S3C2442)
500 default y
501 select S3C2410_CPUFREQ_UTILS
502 help
503 CPU Frequency scaling support for S3C2440 and S3C2442 SoC CPUs.
504
505config S3C2440_DMA 507config S3C2440_DMA
506 bool 508 bool
507 help 509 help
@@ -521,15 +523,15 @@ config S3C2440_XTAL_16934400
521 523
522config S3C2440_PLL_12000000 524config S3C2440_PLL_12000000
523 bool 525 bool
524 depends on S3C2440_CPUFREQ && S3C2440_XTAL_12000000 526 depends on ARM_S3C2440_CPUFREQ && S3C2440_XTAL_12000000
525 default y if CPU_FREQ_S3C24XX_PLL 527 default y if S3C24XX_PLL
526 help 528 help
527 PLL tables for S3C2440 or S3C2442 CPUs with 12MHz crystals. 529 PLL tables for S3C2440 or S3C2442 CPUs with 12MHz crystals.
528 530
529config S3C2440_PLL_16934400 531config S3C2440_PLL_16934400
530 bool 532 bool
531 depends on S3C2440_CPUFREQ && S3C2440_XTAL_16934400 533 depends on ARM_S3C2440_CPUFREQ && S3C2440_XTAL_16934400
532 default y if CPU_FREQ_S3C24XX_PLL 534 default y if S3C24XX_PLL
533 help 535 help
534 PLL tables for S3C2440 or S3C2442 CPUs with 16.934MHz crystals. 536 PLL tables for S3C2440 or S3C2442 CPUs with 16.934MHz crystals.
535 537
@@ -583,7 +585,7 @@ config MACH_NEXCODER_2440
583 585
584config MACH_OSIRIS 586config MACH_OSIRIS
585 bool "Simtec IM2440D20 (OSIRIS) module" 587 bool "Simtec IM2440D20 (OSIRIS) module"
586 select S3C2410_IOTIMING if S3C2440_CPUFREQ 588 select S3C2410_IOTIMING if ARM_S3C2440_CPUFREQ
587 select S3C2440_XTAL_12000000 589 select S3C2440_XTAL_12000000
588 select S3C24XX_DCLK 590 select S3C24XX_DCLK
589 select S3C24XX_GPIO_EXTRA128 591 select S3C24XX_GPIO_EXTRA128
@@ -655,7 +657,7 @@ config MACH_RX1950
655 bool "HP iPAQ rx1950" 657 bool "HP iPAQ rx1950"
656 select I2C 658 select I2C
657 select PM_H1940 if PM 659 select PM_H1940 if PM
658 select S3C2410_IOTIMING if S3C2440_CPUFREQ 660 select S3C2410_IOTIMING if ARM_S3C2440_CPUFREQ
659 select S3C2440_XTAL_16934400 661 select S3C2440_XTAL_16934400
660 select S3C24XX_DCLK 662 select S3C24XX_DCLK
661 select S3C24XX_PWM 663 select S3C24XX_PWM
diff --git a/arch/arm/mach-s3c24xx/Makefile b/arch/arm/mach-s3c24xx/Makefile
index 6f46ecfc8396..7f54e5b954ca 100644
--- a/arch/arm/mach-s3c24xx/Makefile
+++ b/arch/arm/mach-s3c24xx/Makefile
@@ -17,13 +17,11 @@ obj- :=
17obj-y += common.o 17obj-y += common.o
18 18
19obj-$(CONFIG_CPU_S3C2410) += s3c2410.o 19obj-$(CONFIG_CPU_S3C2410) += s3c2410.o
20obj-$(CONFIG_S3C2410_CPUFREQ) += cpufreq-s3c2410.o
21obj-$(CONFIG_S3C2410_DMA) += dma-s3c2410.o 20obj-$(CONFIG_S3C2410_DMA) += dma-s3c2410.o
22obj-$(CONFIG_S3C2410_PLL) += pll-s3c2410.o 21obj-$(CONFIG_S3C2410_PLL) += pll-s3c2410.o
23obj-$(CONFIG_S3C2410_PM) += pm-s3c2410.o sleep-s3c2410.o 22obj-$(CONFIG_S3C2410_PM) += pm-s3c2410.o sleep-s3c2410.o
24 23
25obj-$(CONFIG_CPU_S3C2412) += s3c2412.o clock-s3c2412.o 24obj-$(CONFIG_CPU_S3C2412) += s3c2412.o clock-s3c2412.o
26obj-$(CONFIG_S3C2412_CPUFREQ) += cpufreq-s3c2412.o
27obj-$(CONFIG_S3C2412_DMA) += dma-s3c2412.o 25obj-$(CONFIG_S3C2412_DMA) += dma-s3c2412.o
28obj-$(CONFIG_S3C2412_PM) += pm-s3c2412.o 26obj-$(CONFIG_S3C2412_PM) += pm-s3c2412.o
29obj-$(CONFIG_S3C2412_PM_SLEEP) += sleep-s3c2412.o 27obj-$(CONFIG_S3C2412_PM_SLEEP) += sleep-s3c2412.o
@@ -34,7 +32,6 @@ obj-$(CONFIG_S3C2416_PM) += pm-s3c2416.o
34obj-$(CONFIG_CPU_S3C2440) += s3c2440.o clock-s3c2440.o 32obj-$(CONFIG_CPU_S3C2440) += s3c2440.o clock-s3c2440.o
35obj-$(CONFIG_CPU_S3C2442) += s3c2442.o 33obj-$(CONFIG_CPU_S3C2442) += s3c2442.o
36obj-$(CONFIG_CPU_S3C244X) += s3c244x.o clock-s3c244x.o 34obj-$(CONFIG_CPU_S3C244X) += s3c244x.o clock-s3c244x.o
37obj-$(CONFIG_S3C2440_CPUFREQ) += cpufreq-s3c2440.o
38obj-$(CONFIG_S3C2440_DMA) += dma-s3c2440.o 35obj-$(CONFIG_S3C2440_DMA) += dma-s3c2440.o
39obj-$(CONFIG_S3C2440_PLL_12000000) += pll-s3c2440-12000000.o 36obj-$(CONFIG_S3C2440_PLL_12000000) += pll-s3c2440-12000000.o
40obj-$(CONFIG_S3C2440_PLL_16934400) += pll-s3c2440-16934400.o 37obj-$(CONFIG_S3C2440_PLL_16934400) += pll-s3c2440-16934400.o
@@ -59,9 +56,6 @@ obj-$(CONFIG_S3C2412_IOTIMING) += iotiming-s3c2412.o
59obj-$(CONFIG_S3C2443_COMMON) += common-s3c2443.o 56obj-$(CONFIG_S3C2443_COMMON) += common-s3c2443.o
60obj-$(CONFIG_S3C2443_DMA) += dma-s3c2443.o 57obj-$(CONFIG_S3C2443_DMA) += dma-s3c2443.o
61 58
62obj-$(CONFIG_CPU_FREQ_S3C24XX) += cpufreq.o
63obj-$(CONFIG_CPU_FREQ_S3C24XX_DEBUGFS) += cpufreq-debugfs.o
64
65# 59#
66# machine support 60# machine support
67# following is ordered alphabetically by option text. 61# following is ordered alphabetically by option text.
@@ -85,6 +79,7 @@ obj-$(CONFIG_MACH_SMDK2413) += mach-smdk2413.o
85obj-$(CONFIG_MACH_VSTMS) += mach-vstms.o 79obj-$(CONFIG_MACH_VSTMS) += mach-vstms.o
86 80
87obj-$(CONFIG_MACH_SMDK2416) += mach-smdk2416.o 81obj-$(CONFIG_MACH_SMDK2416) += mach-smdk2416.o
82obj-$(CONFIG_MACH_S3C2416_DT) += mach-s3c2416-dt.o
88 83
89obj-$(CONFIG_MACH_ANUBIS) += mach-anubis.o 84obj-$(CONFIG_MACH_ANUBIS) += mach-anubis.o
90obj-$(CONFIG_MACH_AT2440EVB) += mach-at2440evb.o 85obj-$(CONFIG_MACH_AT2440EVB) += mach-at2440evb.o
diff --git a/arch/arm/mach-s3c24xx/clock-s3c2410.c b/arch/arm/mach-s3c24xx/clock-s3c2410.c
index 34fffdf6fc1d..564553694b54 100644
--- a/arch/arm/mach-s3c24xx/clock-s3c2410.c
+++ b/arch/arm/mach-s3c24xx/clock-s3c2410.c
@@ -119,66 +119,101 @@ static struct clk init_clocks_off[] = {
119 } 119 }
120}; 120};
121 121
122static struct clk init_clocks[] = { 122static struct clk clk_lcd = {
123 { 123 .name = "lcd",
124 .name = "lcd", 124 .parent = &clk_h,
125 .parent = &clk_h, 125 .enable = s3c2410_clkcon_enable,
126 .enable = s3c2410_clkcon_enable, 126 .ctrlbit = S3C2410_CLKCON_LCDC,
127 .ctrlbit = S3C2410_CLKCON_LCDC, 127};
128 }, { 128
129 .name = "gpio", 129static struct clk clk_gpio = {
130 .parent = &clk_p, 130 .name = "gpio",
131 .enable = s3c2410_clkcon_enable, 131 .parent = &clk_p,
132 .ctrlbit = S3C2410_CLKCON_GPIO, 132 .enable = s3c2410_clkcon_enable,
133 }, { 133 .ctrlbit = S3C2410_CLKCON_GPIO,
134 .name = "usb-host", 134};
135 .parent = &clk_h, 135
136 .enable = s3c2410_clkcon_enable, 136static struct clk clk_usb_host = {
137 .ctrlbit = S3C2410_CLKCON_USBH, 137 .name = "usb-host",
138 }, { 138 .parent = &clk_h,
139 .name = "usb-device", 139 .enable = s3c2410_clkcon_enable,
140 .parent = &clk_h, 140 .ctrlbit = S3C2410_CLKCON_USBH,
141 .enable = s3c2410_clkcon_enable, 141};
142 .ctrlbit = S3C2410_CLKCON_USBD, 142
143 }, { 143static struct clk clk_usb_device = {
144 .name = "timers", 144 .name = "usb-device",
145 .parent = &clk_p, 145 .parent = &clk_h,
146 .enable = s3c2410_clkcon_enable, 146 .enable = s3c2410_clkcon_enable,
147 .ctrlbit = S3C2410_CLKCON_PWMT, 147 .ctrlbit = S3C2410_CLKCON_USBD,
148 }, { 148};
149 .name = "uart", 149
150 .devname = "s3c2410-uart.0", 150static struct clk clk_timers = {
151 .parent = &clk_p, 151 .name = "timers",
152 .enable = s3c2410_clkcon_enable, 152 .parent = &clk_p,
153 .ctrlbit = S3C2410_CLKCON_UART0, 153 .enable = s3c2410_clkcon_enable,
154 }, { 154 .ctrlbit = S3C2410_CLKCON_PWMT,
155 .name = "uart", 155};
156 .devname = "s3c2410-uart.1", 156
157 .parent = &clk_p, 157struct clk s3c24xx_clk_uart0 = {
158 .enable = s3c2410_clkcon_enable, 158 .name = "uart",
159 .ctrlbit = S3C2410_CLKCON_UART1, 159 .devname = "s3c2410-uart.0",
160 }, { 160 .parent = &clk_p,
161 .name = "uart", 161 .enable = s3c2410_clkcon_enable,
162 .devname = "s3c2410-uart.2", 162 .ctrlbit = S3C2410_CLKCON_UART0,
163 .parent = &clk_p, 163};
164 .enable = s3c2410_clkcon_enable, 164
165 .ctrlbit = S3C2410_CLKCON_UART2, 165struct clk s3c24xx_clk_uart1 = {
166 }, { 166 .name = "uart",
167 .name = "rtc", 167 .devname = "s3c2410-uart.1",
168 .parent = &clk_p, 168 .parent = &clk_p,
169 .enable = s3c2410_clkcon_enable, 169 .enable = s3c2410_clkcon_enable,
170 .ctrlbit = S3C2410_CLKCON_RTC, 170 .ctrlbit = S3C2410_CLKCON_UART1,
171 }, { 171};
172 .name = "watchdog", 172
173 .parent = &clk_p, 173struct clk s3c24xx_clk_uart2 = {
174 .ctrlbit = 0, 174 .name = "uart",
175 }, { 175 .devname = "s3c2410-uart.2",
176 .name = "usb-bus-host", 176 .parent = &clk_p,
177 .parent = &clk_usb_bus, 177 .enable = s3c2410_clkcon_enable,
178 }, { 178 .ctrlbit = S3C2410_CLKCON_UART2,
179 .name = "usb-bus-gadget", 179};
180 .parent = &clk_usb_bus, 180
181 }, 181static struct clk clk_rtc = {
182 .name = "rtc",
183 .parent = &clk_p,
184 .enable = s3c2410_clkcon_enable,
185 .ctrlbit = S3C2410_CLKCON_RTC,
186};
187
188static struct clk clk_watchdog = {
189 .name = "watchdog",
190 .parent = &clk_p,
191 .ctrlbit = 0,
192};
193
194static struct clk clk_usb_bus_host = {
195 .name = "usb-bus-host",
196 .parent = &clk_usb_bus,
197};
198
199static struct clk clk_usb_bus_gadget = {
200 .name = "usb-bus-gadget",
201 .parent = &clk_usb_bus,
202};
203
204static struct clk *init_clocks[] = {
205 &clk_lcd,
206 &clk_gpio,
207 &clk_usb_host,
208 &clk_usb_device,
209 &clk_timers,
210 &s3c24xx_clk_uart0,
211 &s3c24xx_clk_uart1,
212 &s3c24xx_clk_uart2,
213 &clk_rtc,
214 &clk_watchdog,
215 &clk_usb_bus_host,
216 &clk_usb_bus_gadget,
182}; 217};
183 218
184/* s3c2410_baseclk_add() 219/* s3c2410_baseclk_add()
@@ -195,7 +230,6 @@ int __init s3c2410_baseclk_add(void)
195{ 230{
196 unsigned long clkslow = __raw_readl(S3C2410_CLKSLOW); 231 unsigned long clkslow = __raw_readl(S3C2410_CLKSLOW);
197 unsigned long clkcon = __raw_readl(S3C2410_CLKCON); 232 unsigned long clkcon = __raw_readl(S3C2410_CLKCON);
198 struct clk *clkp;
199 struct clk *xtal; 233 struct clk *xtal;
200 int ret; 234 int ret;
201 int ptr; 235 int ptr;
@@ -207,8 +241,9 @@ int __init s3c2410_baseclk_add(void)
207 241
208 /* register clocks from clock array */ 242 /* register clocks from clock array */
209 243
210 clkp = init_clocks; 244 for (ptr = 0; ptr < ARRAY_SIZE(init_clocks); ptr++) {
211 for (ptr = 0; ptr < ARRAY_SIZE(init_clocks); ptr++, clkp++) { 245 struct clk *clkp = init_clocks[ptr];
246
212 /* ensure that we note the clock state */ 247 /* ensure that we note the clock state */
213 248
214 clkp->usage = clkcon & clkp->ctrlbit ? 1 : 0; 249 clkp->usage = clkcon & clkp->ctrlbit ? 1 : 0;
diff --git a/arch/arm/mach-s3c24xx/clock-s3c2440.c b/arch/arm/mach-s3c24xx/clock-s3c2440.c
index 1069b5680826..aaf006d1d6dc 100644
--- a/arch/arm/mach-s3c24xx/clock-s3c2440.c
+++ b/arch/arm/mach-s3c24xx/clock-s3c2440.c
@@ -166,6 +166,9 @@ static struct clk_lookup s3c2440_clk_lookup[] = {
166 CLKDEV_INIT(NULL, "clk_uart_baud1", &s3c24xx_uclk), 166 CLKDEV_INIT(NULL, "clk_uart_baud1", &s3c24xx_uclk),
167 CLKDEV_INIT(NULL, "clk_uart_baud2", &clk_p), 167 CLKDEV_INIT(NULL, "clk_uart_baud2", &clk_p),
168 CLKDEV_INIT(NULL, "clk_uart_baud3", &s3c2440_clk_fclk_n), 168 CLKDEV_INIT(NULL, "clk_uart_baud3", &s3c2440_clk_fclk_n),
169 CLKDEV_INIT("s3c2440-uart.0", "uart", &s3c24xx_clk_uart0),
170 CLKDEV_INIT("s3c2440-uart.1", "uart", &s3c24xx_clk_uart1),
171 CLKDEV_INIT("s3c2440-uart.2", "uart", &s3c24xx_clk_uart2),
169 CLKDEV_INIT("s3c2440-camif", "camera", &s3c2440_clk_cam_upll), 172 CLKDEV_INIT("s3c2440-camif", "camera", &s3c2440_clk_cam_upll),
170}; 173};
171 174
diff --git a/arch/arm/mach-s3c24xx/common.h b/arch/arm/mach-s3c24xx/common.h
index 307c3714be55..84b280654f4c 100644
--- a/arch/arm/mach-s3c24xx/common.h
+++ b/arch/arm/mach-s3c24xx/common.h
@@ -12,6 +12,8 @@
12#ifndef __ARCH_ARM_MACH_S3C24XX_COMMON_H 12#ifndef __ARCH_ARM_MACH_S3C24XX_COMMON_H
13#define __ARCH_ARM_MACH_S3C24XX_COMMON_H __FILE__ 13#define __ARCH_ARM_MACH_S3C24XX_COMMON_H __FILE__
14 14
15#include <linux/reboot.h>
16
15struct s3c2410_uartcfg; 17struct s3c2410_uartcfg;
16 18
17#ifdef CONFIG_CPU_S3C2410 19#ifdef CONFIG_CPU_S3C2410
@@ -20,7 +22,7 @@ extern int s3c2410a_init(void);
20extern void s3c2410_map_io(void); 22extern void s3c2410_map_io(void);
21extern void s3c2410_init_uarts(struct s3c2410_uartcfg *cfg, int no); 23extern void s3c2410_init_uarts(struct s3c2410_uartcfg *cfg, int no);
22extern void s3c2410_init_clocks(int xtal); 24extern void s3c2410_init_clocks(int xtal);
23extern void s3c2410_restart(char mode, const char *cmd); 25extern void s3c2410_restart(enum reboot_mode mode, const char *cmd);
24extern void s3c2410_init_irq(void); 26extern void s3c2410_init_irq(void);
25#else 27#else
26#define s3c2410_init_clocks NULL 28#define s3c2410_init_clocks NULL
@@ -36,7 +38,7 @@ extern void s3c2412_map_io(void);
36extern void s3c2412_init_uarts(struct s3c2410_uartcfg *cfg, int no); 38extern void s3c2412_init_uarts(struct s3c2410_uartcfg *cfg, int no);
37extern void s3c2412_init_clocks(int xtal); 39extern void s3c2412_init_clocks(int xtal);
38extern int s3c2412_baseclk_add(void); 40extern int s3c2412_baseclk_add(void);
39extern void s3c2412_restart(char mode, const char *cmd); 41extern void s3c2412_restart(enum reboot_mode mode, const char *cmd);
40extern void s3c2412_init_irq(void); 42extern void s3c2412_init_irq(void);
41#else 43#else
42#define s3c2412_init_clocks NULL 44#define s3c2412_init_clocks NULL
@@ -51,7 +53,7 @@ extern void s3c2416_map_io(void);
51extern void s3c2416_init_uarts(struct s3c2410_uartcfg *cfg, int no); 53extern void s3c2416_init_uarts(struct s3c2410_uartcfg *cfg, int no);
52extern void s3c2416_init_clocks(int xtal); 54extern void s3c2416_init_clocks(int xtal);
53extern int s3c2416_baseclk_add(void); 55extern int s3c2416_baseclk_add(void);
54extern void s3c2416_restart(char mode, const char *cmd); 56extern void s3c2416_restart(enum reboot_mode mode, const char *cmd);
55extern void s3c2416_init_irq(void); 57extern void s3c2416_init_irq(void);
56 58
57extern struct syscore_ops s3c2416_irq_syscore_ops; 59extern struct syscore_ops s3c2416_irq_syscore_ops;
@@ -66,7 +68,7 @@ extern struct syscore_ops s3c2416_irq_syscore_ops;
66extern void s3c244x_map_io(void); 68extern void s3c244x_map_io(void);
67extern void s3c244x_init_uarts(struct s3c2410_uartcfg *cfg, int no); 69extern void s3c244x_init_uarts(struct s3c2410_uartcfg *cfg, int no);
68extern void s3c244x_init_clocks(int xtal); 70extern void s3c244x_init_clocks(int xtal);
69extern void s3c244x_restart(char mode, const char *cmd); 71extern void s3c244x_restart(enum reboot_mode mode, const char *cmd);
70#else 72#else
71#define s3c244x_init_clocks NULL 73#define s3c244x_init_clocks NULL
72#define s3c244x_init_uarts NULL 74#define s3c244x_init_uarts NULL
@@ -96,7 +98,7 @@ extern void s3c2443_map_io(void);
96extern void s3c2443_init_uarts(struct s3c2410_uartcfg *cfg, int no); 98extern void s3c2443_init_uarts(struct s3c2410_uartcfg *cfg, int no);
97extern void s3c2443_init_clocks(int xtal); 99extern void s3c2443_init_clocks(int xtal);
98extern int s3c2443_baseclk_add(void); 100extern int s3c2443_baseclk_add(void);
99extern void s3c2443_restart(char mode, const char *cmd); 101extern void s3c2443_restart(enum reboot_mode mode, const char *cmd);
100extern void s3c2443_init_irq(void); 102extern void s3c2443_init_irq(void);
101#else 103#else
102#define s3c2443_init_clocks NULL 104#define s3c2443_init_clocks NULL
diff --git a/arch/arm/mach-s3c24xx/cpufreq-debugfs.c b/arch/arm/mach-s3c24xx/cpufreq-debugfs.c
deleted file mode 100644
index 9b7b4289d66c..000000000000
--- a/arch/arm/mach-s3c24xx/cpufreq-debugfs.c
+++ /dev/null
@@ -1,198 +0,0 @@
1/*
2 * Copyright (c) 2009 Simtec Electronics
3 * http://armlinux.simtec.co.uk/
4 * Ben Dooks <ben@simtec.co.uk>
5 *
6 * S3C24XX CPU Frequency scaling - debugfs status 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/init.h>
14#include <linux/export.h>
15#include <linux/interrupt.h>
16#include <linux/ioport.h>
17#include <linux/cpufreq.h>
18#include <linux/debugfs.h>
19#include <linux/seq_file.h>
20#include <linux/err.h>
21
22#include <plat/cpu-freq-core.h>
23
24static struct dentry *dbgfs_root;
25static struct dentry *dbgfs_file_io;
26static struct dentry *dbgfs_file_info;
27static struct dentry *dbgfs_file_board;
28
29#define print_ns(x) ((x) / 10), ((x) % 10)
30
31static void show_max(struct seq_file *seq, struct s3c_freq *f)
32{
33 seq_printf(seq, "MAX: F=%lu, H=%lu, P=%lu, A=%lu\n",
34 f->fclk, f->hclk, f->pclk, f->armclk);
35}
36
37static int board_show(struct seq_file *seq, void *p)
38{
39 struct s3c_cpufreq_config *cfg;
40 struct s3c_cpufreq_board *brd;
41
42 cfg = s3c_cpufreq_getconfig();
43 if (!cfg) {
44 seq_printf(seq, "no configuration registered\n");
45 return 0;
46 }
47
48 brd = cfg->board;
49 if (!brd) {
50 seq_printf(seq, "no board definition set?\n");
51 return 0;
52 }
53
54 seq_printf(seq, "SDRAM refresh %u ns\n", brd->refresh);
55 seq_printf(seq, "auto_io=%u\n", brd->auto_io);
56 seq_printf(seq, "need_io=%u\n", brd->need_io);
57
58 show_max(seq, &brd->max);
59
60
61 return 0;
62}
63
64static int fops_board_open(struct inode *inode, struct file *file)
65{
66 return single_open(file, board_show, NULL);
67}
68
69static const struct file_operations fops_board = {
70 .open = fops_board_open,
71 .read = seq_read,
72 .llseek = seq_lseek,
73 .release = single_release,
74 .owner = THIS_MODULE,
75};
76
77static int info_show(struct seq_file *seq, void *p)
78{
79 struct s3c_cpufreq_config *cfg;
80
81 cfg = s3c_cpufreq_getconfig();
82 if (!cfg) {
83 seq_printf(seq, "no configuration registered\n");
84 return 0;
85 }
86
87 seq_printf(seq, " FCLK %ld Hz\n", cfg->freq.fclk);
88 seq_printf(seq, " HCLK %ld Hz (%lu.%lu ns)\n",
89 cfg->freq.hclk, print_ns(cfg->freq.hclk_tns));
90 seq_printf(seq, " PCLK %ld Hz\n", cfg->freq.hclk);
91 seq_printf(seq, "ARMCLK %ld Hz\n", cfg->freq.armclk);
92 seq_printf(seq, "\n");
93
94 show_max(seq, &cfg->max);
95
96 seq_printf(seq, "Divisors: P=%d, H=%d, A=%d, dvs=%s\n",
97 cfg->divs.h_divisor, cfg->divs.p_divisor,
98 cfg->divs.arm_divisor, cfg->divs.dvs ? "on" : "off");
99 seq_printf(seq, "\n");
100
101 seq_printf(seq, "lock_pll=%u\n", cfg->lock_pll);
102
103 return 0;
104}
105
106static int fops_info_open(struct inode *inode, struct file *file)
107{
108 return single_open(file, info_show, NULL);
109}
110
111static const struct file_operations fops_info = {
112 .open = fops_info_open,
113 .read = seq_read,
114 .llseek = seq_lseek,
115 .release = single_release,
116 .owner = THIS_MODULE,
117};
118
119static int io_show(struct seq_file *seq, void *p)
120{
121 void (*show_bank)(struct seq_file *, struct s3c_cpufreq_config *, union s3c_iobank *);
122 struct s3c_cpufreq_config *cfg;
123 struct s3c_iotimings *iot;
124 union s3c_iobank *iob;
125 int bank;
126
127 cfg = s3c_cpufreq_getconfig();
128 if (!cfg) {
129 seq_printf(seq, "no configuration registered\n");
130 return 0;
131 }
132
133 show_bank = cfg->info->debug_io_show;
134 if (!show_bank) {
135 seq_printf(seq, "no code to show bank timing\n");
136 return 0;
137 }
138
139 iot = s3c_cpufreq_getiotimings();
140 if (!iot) {
141 seq_printf(seq, "no io timings registered\n");
142 return 0;
143 }
144
145 seq_printf(seq, "hclk period is %lu.%lu ns\n", print_ns(cfg->freq.hclk_tns));
146
147 for (bank = 0; bank < MAX_BANKS; bank++) {
148 iob = &iot->bank[bank];
149
150 seq_printf(seq, "bank %d: ", bank);
151
152 if (!iob->io_2410) {
153 seq_printf(seq, "nothing set\n");
154 continue;
155 }
156
157 show_bank(seq, cfg, iob);
158 }
159
160 return 0;
161}
162
163static int fops_io_open(struct inode *inode, struct file *file)
164{
165 return single_open(file, io_show, NULL);
166}
167
168static const struct file_operations fops_io = {
169 .open = fops_io_open,
170 .read = seq_read,
171 .llseek = seq_lseek,
172 .release = single_release,
173 .owner = THIS_MODULE,
174};
175
176
177static int __init s3c_freq_debugfs_init(void)
178{
179 dbgfs_root = debugfs_create_dir("s3c-cpufreq", NULL);
180 if (IS_ERR(dbgfs_root)) {
181 printk(KERN_ERR "%s: error creating debugfs root\n", __func__);
182 return PTR_ERR(dbgfs_root);
183 }
184
185 dbgfs_file_io = debugfs_create_file("io-timing", S_IRUGO, dbgfs_root,
186 NULL, &fops_io);
187
188 dbgfs_file_info = debugfs_create_file("info", S_IRUGO, dbgfs_root,
189 NULL, &fops_info);
190
191 dbgfs_file_board = debugfs_create_file("board", S_IRUGO, dbgfs_root,
192 NULL, &fops_board);
193
194 return 0;
195}
196
197late_initcall(s3c_freq_debugfs_init);
198
diff --git a/arch/arm/mach-s3c24xx/cpufreq-s3c2410.c b/arch/arm/mach-s3c24xx/cpufreq-s3c2410.c
deleted file mode 100644
index cfa0dd8723ec..000000000000
--- a/arch/arm/mach-s3c24xx/cpufreq-s3c2410.c
+++ /dev/null
@@ -1,160 +0,0 @@
1/*
2 * Copyright (c) 2006-2008 Simtec Electronics
3 * http://armlinux.simtec.co.uk/
4 * Ben Dooks <ben@simtec.co.uk>
5 *
6 * S3C2410 CPU Frequency scaling
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/init.h>
14#include <linux/module.h>
15#include <linux/interrupt.h>
16#include <linux/ioport.h>
17#include <linux/cpufreq.h>
18#include <linux/device.h>
19#include <linux/clk.h>
20#include <linux/err.h>
21#include <linux/io.h>
22
23#include <asm/mach/arch.h>
24#include <asm/mach/map.h>
25
26#include <mach/regs-clock.h>
27
28#include <plat/cpu.h>
29#include <plat/clock.h>
30#include <plat/cpu-freq-core.h>
31
32/* Note, 2410A has an extra mode for 1:4:4 ratio, bit 2 of CLKDIV */
33
34static void s3c2410_cpufreq_setdivs(struct s3c_cpufreq_config *cfg)
35{
36 u32 clkdiv = 0;
37
38 if (cfg->divs.h_divisor == 2)
39 clkdiv |= S3C2410_CLKDIVN_HDIVN;
40
41 if (cfg->divs.p_divisor != cfg->divs.h_divisor)
42 clkdiv |= S3C2410_CLKDIVN_PDIVN;
43
44 __raw_writel(clkdiv, S3C2410_CLKDIVN);
45}
46
47static int s3c2410_cpufreq_calcdivs(struct s3c_cpufreq_config *cfg)
48{
49 unsigned long hclk, fclk, pclk;
50 unsigned int hdiv, pdiv;
51 unsigned long hclk_max;
52
53 fclk = cfg->freq.fclk;
54 hclk_max = cfg->max.hclk;
55
56 cfg->freq.armclk = fclk;
57
58 s3c_freq_dbg("%s: fclk is %lu, max hclk %lu\n",
59 __func__, fclk, hclk_max);
60
61 hdiv = (fclk > cfg->max.hclk) ? 2 : 1;
62 hclk = fclk / hdiv;
63
64 if (hclk > cfg->max.hclk) {
65 s3c_freq_dbg("%s: hclk too big\n", __func__);
66 return -EINVAL;
67 }
68
69 pdiv = (hclk > cfg->max.pclk) ? 2 : 1;
70 pclk = hclk / pdiv;
71
72 if (pclk > cfg->max.pclk) {
73 s3c_freq_dbg("%s: pclk too big\n", __func__);
74 return -EINVAL;
75 }
76
77 pdiv *= hdiv;
78
79 /* record the result */
80 cfg->divs.p_divisor = pdiv;
81 cfg->divs.h_divisor = hdiv;
82
83 return 0;
84}
85
86static struct s3c_cpufreq_info s3c2410_cpufreq_info = {
87 .max = {
88 .fclk = 200000000,
89 .hclk = 100000000,
90 .pclk = 50000000,
91 },
92
93 /* transition latency is about 5ms worst-case, so
94 * set 10ms to be sure */
95 .latency = 10000000,
96
97 .locktime_m = 150,
98 .locktime_u = 150,
99 .locktime_bits = 12,
100
101 .need_pll = 1,
102
103 .name = "s3c2410",
104 .calc_iotiming = s3c2410_iotiming_calc,
105 .set_iotiming = s3c2410_iotiming_set,
106 .get_iotiming = s3c2410_iotiming_get,
107 .resume_clocks = s3c2410_setup_clocks,
108
109 .set_fvco = s3c2410_set_fvco,
110 .set_refresh = s3c2410_cpufreq_setrefresh,
111 .set_divs = s3c2410_cpufreq_setdivs,
112 .calc_divs = s3c2410_cpufreq_calcdivs,
113
114 .debug_io_show = s3c_cpufreq_debugfs_call(s3c2410_iotiming_debugfs),
115};
116
117static int s3c2410_cpufreq_add(struct device *dev,
118 struct subsys_interface *sif)
119{
120 return s3c_cpufreq_register(&s3c2410_cpufreq_info);
121}
122
123static struct subsys_interface s3c2410_cpufreq_interface = {
124 .name = "s3c2410_cpufreq",
125 .subsys = &s3c2410_subsys,
126 .add_dev = s3c2410_cpufreq_add,
127};
128
129static int __init s3c2410_cpufreq_init(void)
130{
131 return subsys_interface_register(&s3c2410_cpufreq_interface);
132}
133arch_initcall(s3c2410_cpufreq_init);
134
135static int s3c2410a_cpufreq_add(struct device *dev,
136 struct subsys_interface *sif)
137{
138 /* alter the maximum freq settings for S3C2410A. If a board knows
139 * it only has a maximum of 200, then it should register its own
140 * limits. */
141
142 s3c2410_cpufreq_info.max.fclk = 266000000;
143 s3c2410_cpufreq_info.max.hclk = 133000000;
144 s3c2410_cpufreq_info.max.pclk = 66500000;
145 s3c2410_cpufreq_info.name = "s3c2410a";
146
147 return s3c2410_cpufreq_add(dev, sif);
148}
149
150static struct subsys_interface s3c2410a_cpufreq_interface = {
151 .name = "s3c2410a_cpufreq",
152 .subsys = &s3c2410a_subsys,
153 .add_dev = s3c2410a_cpufreq_add,
154};
155
156static int __init s3c2410a_cpufreq_init(void)
157{
158 return subsys_interface_register(&s3c2410a_cpufreq_interface);
159}
160arch_initcall(s3c2410a_cpufreq_init);
diff --git a/arch/arm/mach-s3c24xx/cpufreq-s3c2412.c b/arch/arm/mach-s3c24xx/cpufreq-s3c2412.c
deleted file mode 100644
index 8bf0f3a77476..000000000000
--- a/arch/arm/mach-s3c24xx/cpufreq-s3c2412.c
+++ /dev/null
@@ -1,258 +0,0 @@
1/*
2 * Copyright 2008 Simtec Electronics
3 * http://armlinux.simtec.co.uk/
4 * Ben Dooks <ben@simtec.co.uk>
5 *
6 * S3C2412 CPU Frequency scalling
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/init.h>
14#include <linux/module.h>
15#include <linux/interrupt.h>
16#include <linux/ioport.h>
17#include <linux/cpufreq.h>
18#include <linux/device.h>
19#include <linux/delay.h>
20#include <linux/clk.h>
21#include <linux/err.h>
22#include <linux/io.h>
23
24#include <asm/mach/arch.h>
25#include <asm/mach/map.h>
26
27#include <mach/regs-clock.h>
28
29#include <plat/cpu.h>
30#include <plat/clock.h>
31#include <plat/cpu-freq-core.h>
32
33#include "s3c2412.h"
34
35/* our clock resources. */
36static struct clk *xtal;
37static struct clk *fclk;
38static struct clk *hclk;
39static struct clk *armclk;
40
41/* HDIV: 1, 2, 3, 4, 6, 8 */
42
43static int s3c2412_cpufreq_calcdivs(struct s3c_cpufreq_config *cfg)
44{
45 unsigned int hdiv, pdiv, armdiv, dvs;
46 unsigned long hclk, fclk, armclk, armdiv_clk;
47 unsigned long hclk_max;
48
49 fclk = cfg->freq.fclk;
50 armclk = cfg->freq.armclk;
51 hclk_max = cfg->max.hclk;
52
53 /* We can't run hclk above armclk as at the best we have to
54 * have armclk and hclk in dvs mode. */
55
56 if (hclk_max > armclk)
57 hclk_max = armclk;
58
59 s3c_freq_dbg("%s: fclk=%lu, armclk=%lu, hclk_max=%lu\n",
60 __func__, fclk, armclk, hclk_max);
61 s3c_freq_dbg("%s: want f=%lu, arm=%lu, h=%lu, p=%lu\n",
62 __func__, cfg->freq.fclk, cfg->freq.armclk,
63 cfg->freq.hclk, cfg->freq.pclk);
64
65 armdiv = fclk / armclk;
66
67 if (armdiv < 1)
68 armdiv = 1;
69 if (armdiv > 2)
70 armdiv = 2;
71
72 cfg->divs.arm_divisor = armdiv;
73 armdiv_clk = fclk / armdiv;
74
75 hdiv = armdiv_clk / hclk_max;
76 if (hdiv < 1)
77 hdiv = 1;
78
79 cfg->freq.hclk = hclk = armdiv_clk / hdiv;
80
81 /* set dvs depending on whether we reached armclk or not. */
82 cfg->divs.dvs = dvs = armclk < armdiv_clk;
83
84 /* update the actual armclk we achieved. */
85 cfg->freq.armclk = dvs ? hclk : armdiv_clk;
86
87 s3c_freq_dbg("%s: armclk %lu, hclk %lu, armdiv %d, hdiv %d, dvs %d\n",
88 __func__, armclk, hclk, armdiv, hdiv, cfg->divs.dvs);
89
90 if (hdiv > 4)
91 goto invalid;
92
93 pdiv = (hclk > cfg->max.pclk) ? 2 : 1;
94
95 if ((hclk / pdiv) > cfg->max.pclk)
96 pdiv++;
97
98 cfg->freq.pclk = hclk / pdiv;
99
100 s3c_freq_dbg("%s: pdiv %d\n", __func__, pdiv);
101
102 if (pdiv > 2)
103 goto invalid;
104
105 pdiv *= hdiv;
106
107 /* store the result, and then return */
108
109 cfg->divs.h_divisor = hdiv * armdiv;
110 cfg->divs.p_divisor = pdiv * armdiv;
111
112 return 0;
113
114invalid:
115 return -EINVAL;
116}
117
118static void s3c2412_cpufreq_setdivs(struct s3c_cpufreq_config *cfg)
119{
120 unsigned long clkdiv;
121 unsigned long olddiv;
122
123 olddiv = clkdiv = __raw_readl(S3C2410_CLKDIVN);
124
125 /* clear off current clock info */
126
127 clkdiv &= ~S3C2412_CLKDIVN_ARMDIVN;
128 clkdiv &= ~S3C2412_CLKDIVN_HDIVN_MASK;
129 clkdiv &= ~S3C2412_CLKDIVN_PDIVN;
130
131 if (cfg->divs.arm_divisor == 2)
132 clkdiv |= S3C2412_CLKDIVN_ARMDIVN;
133
134 clkdiv |= ((cfg->divs.h_divisor / cfg->divs.arm_divisor) - 1);
135
136 if (cfg->divs.p_divisor != cfg->divs.h_divisor)
137 clkdiv |= S3C2412_CLKDIVN_PDIVN;
138
139 s3c_freq_dbg("%s: div %08lx => %08lx\n", __func__, olddiv, clkdiv);
140 __raw_writel(clkdiv, S3C2410_CLKDIVN);
141
142 clk_set_parent(armclk, cfg->divs.dvs ? hclk : fclk);
143}
144
145static void s3c2412_cpufreq_setrefresh(struct s3c_cpufreq_config *cfg)
146{
147 struct s3c_cpufreq_board *board = cfg->board;
148 unsigned long refresh;
149
150 s3c_freq_dbg("%s: refresh %u ns, hclk %lu\n", __func__,
151 board->refresh, cfg->freq.hclk);
152
153 /* Reduce both the refresh time (in ns) and the frequency (in MHz)
154 * by 10 each to ensure that we do not overflow 32 bit numbers. This
155 * should work for HCLK up to 133MHz and refresh period up to 30usec.
156 */
157
158 refresh = (board->refresh / 10);
159 refresh *= (cfg->freq.hclk / 100);
160 refresh /= (1 * 1000 * 1000); /* 10^6 */
161
162 s3c_freq_dbg("%s: setting refresh 0x%08lx\n", __func__, refresh);
163 __raw_writel(refresh, S3C2412_REFRESH);
164}
165
166/* set the default cpu frequency information, based on an 200MHz part
167 * as we have no other way of detecting the speed rating in software.
168 */
169
170static struct s3c_cpufreq_info s3c2412_cpufreq_info = {
171 .max = {
172 .fclk = 200000000,
173 .hclk = 100000000,
174 .pclk = 50000000,
175 },
176
177 .latency = 5000000, /* 5ms */
178
179 .locktime_m = 150,
180 .locktime_u = 150,
181 .locktime_bits = 16,
182
183 .name = "s3c2412",
184 .set_refresh = s3c2412_cpufreq_setrefresh,
185 .set_divs = s3c2412_cpufreq_setdivs,
186 .calc_divs = s3c2412_cpufreq_calcdivs,
187
188 .calc_iotiming = s3c2412_iotiming_calc,
189 .set_iotiming = s3c2412_iotiming_set,
190 .get_iotiming = s3c2412_iotiming_get,
191
192 .resume_clocks = s3c2412_setup_clocks,
193
194 .debug_io_show = s3c_cpufreq_debugfs_call(s3c2412_iotiming_debugfs),
195};
196
197static int s3c2412_cpufreq_add(struct device *dev,
198 struct subsys_interface *sif)
199{
200 unsigned long fclk_rate;
201
202 hclk = clk_get(NULL, "hclk");
203 if (IS_ERR(hclk)) {
204 printk(KERN_ERR "%s: cannot find hclk clock\n", __func__);
205 return -ENOENT;
206 }
207
208 fclk = clk_get(NULL, "fclk");
209 if (IS_ERR(fclk)) {
210 printk(KERN_ERR "%s: cannot find fclk clock\n", __func__);
211 goto err_fclk;
212 }
213
214 fclk_rate = clk_get_rate(fclk);
215 if (fclk_rate > 200000000) {
216 printk(KERN_INFO
217 "%s: fclk %ld MHz, assuming 266MHz capable part\n",
218 __func__, fclk_rate / 1000000);
219 s3c2412_cpufreq_info.max.fclk = 266000000;
220 s3c2412_cpufreq_info.max.hclk = 133000000;
221 s3c2412_cpufreq_info.max.pclk = 66000000;
222 }
223
224 armclk = clk_get(NULL, "armclk");
225 if (IS_ERR(armclk)) {
226 printk(KERN_ERR "%s: cannot find arm clock\n", __func__);
227 goto err_armclk;
228 }
229
230 xtal = clk_get(NULL, "xtal");
231 if (IS_ERR(xtal)) {
232 printk(KERN_ERR "%s: cannot find xtal clock\n", __func__);
233 goto err_xtal;
234 }
235
236 return s3c_cpufreq_register(&s3c2412_cpufreq_info);
237
238err_xtal:
239 clk_put(armclk);
240err_armclk:
241 clk_put(fclk);
242err_fclk:
243 clk_put(hclk);
244
245 return -ENOENT;
246}
247
248static struct subsys_interface s3c2412_cpufreq_interface = {
249 .name = "s3c2412_cpufreq",
250 .subsys = &s3c2412_subsys,
251 .add_dev = s3c2412_cpufreq_add,
252};
253
254static int s3c2412_cpufreq_init(void)
255{
256 return subsys_interface_register(&s3c2412_cpufreq_interface);
257}
258arch_initcall(s3c2412_cpufreq_init);
diff --git a/arch/arm/mach-s3c24xx/cpufreq-s3c2440.c b/arch/arm/mach-s3c24xx/cpufreq-s3c2440.c
deleted file mode 100644
index 72b2cc8a5a85..000000000000
--- a/arch/arm/mach-s3c24xx/cpufreq-s3c2440.c
+++ /dev/null
@@ -1,312 +0,0 @@
1/*
2 * Copyright (c) 2006-2009 Simtec Electronics
3 * http://armlinux.simtec.co.uk/
4 * Ben Dooks <ben@simtec.co.uk>
5 * Vincent Sanders <vince@simtec.co.uk>
6 *
7 * S3C2440/S3C2442 CPU Frequency scaling
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License version 2 as
11 * published by the Free Software Foundation.
12*/
13
14#include <linux/init.h>
15#include <linux/module.h>
16#include <linux/interrupt.h>
17#include <linux/ioport.h>
18#include <linux/cpufreq.h>
19#include <linux/device.h>
20#include <linux/delay.h>
21#include <linux/clk.h>
22#include <linux/err.h>
23#include <linux/io.h>
24
25#include <mach/hardware.h>
26
27#include <asm/mach/arch.h>
28#include <asm/mach/map.h>
29
30#include <mach/regs-clock.h>
31
32#include <plat/cpu.h>
33#include <plat/cpu-freq-core.h>
34#include <plat/clock.h>
35
36static struct clk *xtal;
37static struct clk *fclk;
38static struct clk *hclk;
39static struct clk *armclk;
40
41/* HDIV: 1, 2, 3, 4, 6, 8 */
42
43static inline int within_khz(unsigned long a, unsigned long b)
44{
45 long diff = a - b;
46
47 return (diff >= -1000 && diff <= 1000);
48}
49
50/**
51 * s3c2440_cpufreq_calcdivs - calculate divider settings
52 * @cfg: The cpu frequency settings.
53 *
54 * Calcualte the divider values for the given frequency settings
55 * specified in @cfg. The values are stored in @cfg for later use
56 * by the relevant set routine if the request settings can be reached.
57 */
58int s3c2440_cpufreq_calcdivs(struct s3c_cpufreq_config *cfg)
59{
60 unsigned int hdiv, pdiv;
61 unsigned long hclk, fclk, armclk;
62 unsigned long hclk_max;
63
64 fclk = cfg->freq.fclk;
65 armclk = cfg->freq.armclk;
66 hclk_max = cfg->max.hclk;
67
68 s3c_freq_dbg("%s: fclk is %lu, armclk %lu, max hclk %lu\n",
69 __func__, fclk, armclk, hclk_max);
70
71 if (armclk > fclk) {
72 printk(KERN_WARNING "%s: armclk > fclk\n", __func__);
73 armclk = fclk;
74 }
75
76 /* if we are in DVS, we need HCLK to be <= ARMCLK */
77 if (armclk < fclk && armclk < hclk_max)
78 hclk_max = armclk;
79
80 for (hdiv = 1; hdiv < 9; hdiv++) {
81 if (hdiv == 5 || hdiv == 7)
82 hdiv++;
83
84 hclk = (fclk / hdiv);
85 if (hclk <= hclk_max || within_khz(hclk, hclk_max))
86 break;
87 }
88
89 s3c_freq_dbg("%s: hclk %lu, div %d\n", __func__, hclk, hdiv);
90
91 if (hdiv > 8)
92 goto invalid;
93
94 pdiv = (hclk > cfg->max.pclk) ? 2 : 1;
95
96 if ((hclk / pdiv) > cfg->max.pclk)
97 pdiv++;
98
99 s3c_freq_dbg("%s: pdiv %d\n", __func__, pdiv);
100
101 if (pdiv > 2)
102 goto invalid;
103
104 pdiv *= hdiv;
105
106 /* calculate a valid armclk */
107
108 if (armclk < hclk)
109 armclk = hclk;
110
111 /* if we're running armclk lower than fclk, this really means
112 * that the system should go into dvs mode, which means that
113 * armclk is connected to hclk. */
114 if (armclk < fclk) {
115 cfg->divs.dvs = 1;
116 armclk = hclk;
117 } else
118 cfg->divs.dvs = 0;
119
120 cfg->freq.armclk = armclk;
121
122 /* store the result, and then return */
123
124 cfg->divs.h_divisor = hdiv;
125 cfg->divs.p_divisor = pdiv;
126
127 return 0;
128
129 invalid:
130 return -EINVAL;
131}
132
133#define CAMDIVN_HCLK_HALF (S3C2440_CAMDIVN_HCLK3_HALF | \
134 S3C2440_CAMDIVN_HCLK4_HALF)
135
136/**
137 * s3c2440_cpufreq_setdivs - set the cpu frequency divider settings
138 * @cfg: The cpu frequency settings.
139 *
140 * Set the divisors from the settings in @cfg, which where generated
141 * during the calculation phase by s3c2440_cpufreq_calcdivs().
142 */
143static void s3c2440_cpufreq_setdivs(struct s3c_cpufreq_config *cfg)
144{
145 unsigned long clkdiv, camdiv;
146
147 s3c_freq_dbg("%s: divsiors: h=%d, p=%d\n", __func__,
148 cfg->divs.h_divisor, cfg->divs.p_divisor);
149
150 clkdiv = __raw_readl(S3C2410_CLKDIVN);
151 camdiv = __raw_readl(S3C2440_CAMDIVN);
152
153 clkdiv &= ~(S3C2440_CLKDIVN_HDIVN_MASK | S3C2440_CLKDIVN_PDIVN);
154 camdiv &= ~CAMDIVN_HCLK_HALF;
155
156 switch (cfg->divs.h_divisor) {
157 case 1:
158 clkdiv |= S3C2440_CLKDIVN_HDIVN_1;
159 break;
160
161 case 2:
162 clkdiv |= S3C2440_CLKDIVN_HDIVN_2;
163 break;
164
165 case 6:
166 camdiv |= S3C2440_CAMDIVN_HCLK3_HALF;
167 case 3:
168 clkdiv |= S3C2440_CLKDIVN_HDIVN_3_6;
169 break;
170
171 case 8:
172 camdiv |= S3C2440_CAMDIVN_HCLK4_HALF;
173 case 4:
174 clkdiv |= S3C2440_CLKDIVN_HDIVN_4_8;
175 break;
176
177 default:
178 BUG(); /* we don't expect to get here. */
179 }
180
181 if (cfg->divs.p_divisor != cfg->divs.h_divisor)
182 clkdiv |= S3C2440_CLKDIVN_PDIVN;
183
184 /* todo - set pclk. */
185
186 /* Write the divisors first with hclk intentionally halved so that
187 * when we write clkdiv we will under-frequency instead of over. We
188 * then make a short delay and remove the hclk halving if necessary.
189 */
190
191 __raw_writel(camdiv | CAMDIVN_HCLK_HALF, S3C2440_CAMDIVN);
192 __raw_writel(clkdiv, S3C2410_CLKDIVN);
193
194 ndelay(20);
195 __raw_writel(camdiv, S3C2440_CAMDIVN);
196
197 clk_set_parent(armclk, cfg->divs.dvs ? hclk : fclk);
198}
199
200static int run_freq_for(unsigned long max_hclk, unsigned long fclk,
201 int *divs,
202 struct cpufreq_frequency_table *table,
203 size_t table_size)
204{
205 unsigned long freq;
206 int index = 0;
207 int div;
208
209 for (div = *divs; div > 0; div = *divs++) {
210 freq = fclk / div;
211
212 if (freq > max_hclk && div != 1)
213 continue;
214
215 freq /= 1000; /* table is in kHz */
216 index = s3c_cpufreq_addfreq(table, index, table_size, freq);
217 if (index < 0)
218 break;
219 }
220
221 return index;
222}
223
224static int hclk_divs[] = { 1, 2, 3, 4, 6, 8, -1 };
225
226static int s3c2440_cpufreq_calctable(struct s3c_cpufreq_config *cfg,
227 struct cpufreq_frequency_table *table,
228 size_t table_size)
229{
230 int ret;
231
232 WARN_ON(cfg->info == NULL);
233 WARN_ON(cfg->board == NULL);
234
235 ret = run_freq_for(cfg->info->max.hclk,
236 cfg->info->max.fclk,
237 hclk_divs,
238 table, table_size);
239
240 s3c_freq_dbg("%s: returning %d\n", __func__, ret);
241
242 return ret;
243}
244
245struct s3c_cpufreq_info s3c2440_cpufreq_info = {
246 .max = {
247 .fclk = 400000000,
248 .hclk = 133333333,
249 .pclk = 66666666,
250 },
251
252 .locktime_m = 300,
253 .locktime_u = 300,
254 .locktime_bits = 16,
255
256 .name = "s3c244x",
257 .calc_iotiming = s3c2410_iotiming_calc,
258 .set_iotiming = s3c2410_iotiming_set,
259 .get_iotiming = s3c2410_iotiming_get,
260 .set_fvco = s3c2410_set_fvco,
261
262 .set_refresh = s3c2410_cpufreq_setrefresh,
263 .set_divs = s3c2440_cpufreq_setdivs,
264 .calc_divs = s3c2440_cpufreq_calcdivs,
265 .calc_freqtable = s3c2440_cpufreq_calctable,
266
267 .resume_clocks = s3c244x_setup_clocks,
268
269 .debug_io_show = s3c_cpufreq_debugfs_call(s3c2410_iotiming_debugfs),
270};
271
272static int s3c2440_cpufreq_add(struct device *dev,
273 struct subsys_interface *sif)
274{
275 xtal = s3c_cpufreq_clk_get(NULL, "xtal");
276 hclk = s3c_cpufreq_clk_get(NULL, "hclk");
277 fclk = s3c_cpufreq_clk_get(NULL, "fclk");
278 armclk = s3c_cpufreq_clk_get(NULL, "armclk");
279
280 if (IS_ERR(xtal) || IS_ERR(hclk) || IS_ERR(fclk) || IS_ERR(armclk)) {
281 printk(KERN_ERR "%s: failed to get clocks\n", __func__);
282 return -ENOENT;
283 }
284
285 return s3c_cpufreq_register(&s3c2440_cpufreq_info);
286}
287
288static struct subsys_interface s3c2440_cpufreq_interface = {
289 .name = "s3c2440_cpufreq",
290 .subsys = &s3c2440_subsys,
291 .add_dev = s3c2440_cpufreq_add,
292};
293
294static int s3c2440_cpufreq_init(void)
295{
296 return subsys_interface_register(&s3c2440_cpufreq_interface);
297}
298
299/* arch_initcall adds the clocks we need, so use subsys_initcall. */
300subsys_initcall(s3c2440_cpufreq_init);
301
302static struct subsys_interface s3c2442_cpufreq_interface = {
303 .name = "s3c2442_cpufreq",
304 .subsys = &s3c2442_subsys,
305 .add_dev = s3c2440_cpufreq_add,
306};
307
308static int s3c2442_cpufreq_init(void)
309{
310 return subsys_interface_register(&s3c2442_cpufreq_interface);
311}
312subsys_initcall(s3c2442_cpufreq_init);
diff --git a/arch/arm/mach-s3c24xx/cpufreq-utils.c b/arch/arm/mach-s3c24xx/cpufreq-utils.c
index ddd8280e3875..2a0aa5684e72 100644
--- a/arch/arm/mach-s3c24xx/cpufreq-utils.c
+++ b/arch/arm/mach-s3c24xx/cpufreq-utils.c
@@ -60,5 +60,5 @@ void s3c2410_cpufreq_setrefresh(struct s3c_cpufreq_config *cfg)
60 */ 60 */
61void s3c2410_set_fvco(struct s3c_cpufreq_config *cfg) 61void s3c2410_set_fvco(struct s3c_cpufreq_config *cfg)
62{ 62{
63 __raw_writel(cfg->pll.index, S3C2410_MPLLCON); 63 __raw_writel(cfg->pll.driver_data, S3C2410_MPLLCON);
64} 64}
diff --git a/arch/arm/mach-s3c24xx/cpufreq.c b/arch/arm/mach-s3c24xx/cpufreq.c
deleted file mode 100644
index 3c0e78ede0da..000000000000
--- a/arch/arm/mach-s3c24xx/cpufreq.c
+++ /dev/null
@@ -1,711 +0,0 @@
1/*
2 * Copyright (c) 2006-2008 Simtec Electronics
3 * http://armlinux.simtec.co.uk/
4 * Ben Dooks <ben@simtec.co.uk>
5 *
6 * S3C24XX CPU Frequency scaling
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/init.h>
14#include <linux/module.h>
15#include <linux/interrupt.h>
16#include <linux/ioport.h>
17#include <linux/cpufreq.h>
18#include <linux/cpu.h>
19#include <linux/clk.h>
20#include <linux/err.h>
21#include <linux/io.h>
22#include <linux/device.h>
23#include <linux/sysfs.h>
24#include <linux/slab.h>
25
26#include <asm/mach/arch.h>
27#include <asm/mach/map.h>
28
29#include <plat/cpu.h>
30#include <plat/clock.h>
31#include <plat/cpu-freq-core.h>
32
33#include <mach/regs-clock.h>
34
35/* note, cpufreq support deals in kHz, no Hz */
36
37static struct cpufreq_driver s3c24xx_driver;
38static struct s3c_cpufreq_config cpu_cur;
39static struct s3c_iotimings s3c24xx_iotiming;
40static struct cpufreq_frequency_table *pll_reg;
41static unsigned int last_target = ~0;
42static unsigned int ftab_size;
43static struct cpufreq_frequency_table *ftab;
44
45static struct clk *_clk_mpll;
46static struct clk *_clk_xtal;
47static struct clk *clk_fclk;
48static struct clk *clk_hclk;
49static struct clk *clk_pclk;
50static struct clk *clk_arm;
51
52#ifdef CONFIG_CPU_FREQ_S3C24XX_DEBUGFS
53struct s3c_cpufreq_config *s3c_cpufreq_getconfig(void)
54{
55 return &cpu_cur;
56}
57
58struct s3c_iotimings *s3c_cpufreq_getiotimings(void)
59{
60 return &s3c24xx_iotiming;
61}
62#endif /* CONFIG_CPU_FREQ_S3C24XX_DEBUGFS */
63
64static void s3c_cpufreq_getcur(struct s3c_cpufreq_config *cfg)
65{
66 unsigned long fclk, pclk, hclk, armclk;
67
68 cfg->freq.fclk = fclk = clk_get_rate(clk_fclk);
69 cfg->freq.hclk = hclk = clk_get_rate(clk_hclk);
70 cfg->freq.pclk = pclk = clk_get_rate(clk_pclk);
71 cfg->freq.armclk = armclk = clk_get_rate(clk_arm);
72
73 cfg->pll.index = __raw_readl(S3C2410_MPLLCON);
74 cfg->pll.frequency = fclk;
75
76 cfg->freq.hclk_tns = 1000000000 / (cfg->freq.hclk / 10);
77
78 cfg->divs.h_divisor = fclk / hclk;
79 cfg->divs.p_divisor = fclk / pclk;
80}
81
82static inline void s3c_cpufreq_calc(struct s3c_cpufreq_config *cfg)
83{
84 unsigned long pll = cfg->pll.frequency;
85
86 cfg->freq.fclk = pll;
87 cfg->freq.hclk = pll / cfg->divs.h_divisor;
88 cfg->freq.pclk = pll / cfg->divs.p_divisor;
89
90 /* convert hclk into 10ths of nanoseconds for io calcs */
91 cfg->freq.hclk_tns = 1000000000 / (cfg->freq.hclk / 10);
92}
93
94static inline int closer(unsigned int target, unsigned int n, unsigned int c)
95{
96 int diff_cur = abs(target - c);
97 int diff_new = abs(target - n);
98
99 return (diff_new < diff_cur);
100}
101
102static void s3c_cpufreq_show(const char *pfx,
103 struct s3c_cpufreq_config *cfg)
104{
105 s3c_freq_dbg("%s: Fvco=%u, F=%lu, A=%lu, H=%lu (%u), P=%lu (%u)\n",
106 pfx, cfg->pll.frequency, cfg->freq.fclk, cfg->freq.armclk,
107 cfg->freq.hclk, cfg->divs.h_divisor,
108 cfg->freq.pclk, cfg->divs.p_divisor);
109}
110
111/* functions to wrapper the driver info calls to do the cpu specific work */
112
113static void s3c_cpufreq_setio(struct s3c_cpufreq_config *cfg)
114{
115 if (cfg->info->set_iotiming)
116 (cfg->info->set_iotiming)(cfg, &s3c24xx_iotiming);
117}
118
119static int s3c_cpufreq_calcio(struct s3c_cpufreq_config *cfg)
120{
121 if (cfg->info->calc_iotiming)
122 return (cfg->info->calc_iotiming)(cfg, &s3c24xx_iotiming);
123
124 return 0;
125}
126
127static void s3c_cpufreq_setrefresh(struct s3c_cpufreq_config *cfg)
128{
129 (cfg->info->set_refresh)(cfg);
130}
131
132static void s3c_cpufreq_setdivs(struct s3c_cpufreq_config *cfg)
133{
134 (cfg->info->set_divs)(cfg);
135}
136
137static int s3c_cpufreq_calcdivs(struct s3c_cpufreq_config *cfg)
138{
139 return (cfg->info->calc_divs)(cfg);
140}
141
142static void s3c_cpufreq_setfvco(struct s3c_cpufreq_config *cfg)
143{
144 (cfg->info->set_fvco)(cfg);
145}
146
147static inline void s3c_cpufreq_resume_clocks(void)
148{
149 cpu_cur.info->resume_clocks();
150}
151
152static inline void s3c_cpufreq_updateclk(struct clk *clk,
153 unsigned int freq)
154{
155 clk_set_rate(clk, freq);
156}
157
158static int s3c_cpufreq_settarget(struct cpufreq_policy *policy,
159 unsigned int target_freq,
160 struct cpufreq_frequency_table *pll)
161{
162 struct s3c_cpufreq_freqs freqs;
163 struct s3c_cpufreq_config cpu_new;
164 unsigned long flags;
165
166 cpu_new = cpu_cur; /* copy new from current */
167
168 s3c_cpufreq_show("cur", &cpu_cur);
169
170 /* TODO - check for DMA currently outstanding */
171
172 cpu_new.pll = pll ? *pll : cpu_cur.pll;
173
174 if (pll)
175 freqs.pll_changing = 1;
176
177 /* update our frequencies */
178
179 cpu_new.freq.armclk = target_freq;
180 cpu_new.freq.fclk = cpu_new.pll.frequency;
181
182 if (s3c_cpufreq_calcdivs(&cpu_new) < 0) {
183 printk(KERN_ERR "no divisors for %d\n", target_freq);
184 goto err_notpossible;
185 }
186
187 s3c_freq_dbg("%s: got divs\n", __func__);
188
189 s3c_cpufreq_calc(&cpu_new);
190
191 s3c_freq_dbg("%s: calculated frequencies for new\n", __func__);
192
193 if (cpu_new.freq.hclk != cpu_cur.freq.hclk) {
194 if (s3c_cpufreq_calcio(&cpu_new) < 0) {
195 printk(KERN_ERR "%s: no IO timings\n", __func__);
196 goto err_notpossible;
197 }
198 }
199
200 s3c_cpufreq_show("new", &cpu_new);
201
202 /* setup our cpufreq parameters */
203
204 freqs.old = cpu_cur.freq;
205 freqs.new = cpu_new.freq;
206
207 freqs.freqs.old = cpu_cur.freq.armclk / 1000;
208 freqs.freqs.new = cpu_new.freq.armclk / 1000;
209
210 /* update f/h/p clock settings before we issue the change
211 * notification, so that drivers do not need to do anything
212 * special if they want to recalculate on CPUFREQ_PRECHANGE. */
213
214 s3c_cpufreq_updateclk(_clk_mpll, cpu_new.pll.frequency);
215 s3c_cpufreq_updateclk(clk_fclk, cpu_new.freq.fclk);
216 s3c_cpufreq_updateclk(clk_hclk, cpu_new.freq.hclk);
217 s3c_cpufreq_updateclk(clk_pclk, cpu_new.freq.pclk);
218
219 /* start the frequency change */
220 cpufreq_notify_transition(policy, &freqs.freqs, CPUFREQ_PRECHANGE);
221
222 /* If hclk is staying the same, then we do not need to
223 * re-write the IO or the refresh timings whilst we are changing
224 * speed. */
225
226 local_irq_save(flags);
227
228 /* is our memory clock slowing down? */
229 if (cpu_new.freq.hclk < cpu_cur.freq.hclk) {
230 s3c_cpufreq_setrefresh(&cpu_new);
231 s3c_cpufreq_setio(&cpu_new);
232 }
233
234 if (cpu_new.freq.fclk == cpu_cur.freq.fclk) {
235 /* not changing PLL, just set the divisors */
236
237 s3c_cpufreq_setdivs(&cpu_new);
238 } else {
239 if (cpu_new.freq.fclk < cpu_cur.freq.fclk) {
240 /* slow the cpu down, then set divisors */
241
242 s3c_cpufreq_setfvco(&cpu_new);
243 s3c_cpufreq_setdivs(&cpu_new);
244 } else {
245 /* set the divisors, then speed up */
246
247 s3c_cpufreq_setdivs(&cpu_new);
248 s3c_cpufreq_setfvco(&cpu_new);
249 }
250 }
251
252 /* did our memory clock speed up */
253 if (cpu_new.freq.hclk > cpu_cur.freq.hclk) {
254 s3c_cpufreq_setrefresh(&cpu_new);
255 s3c_cpufreq_setio(&cpu_new);
256 }
257
258 /* update our current settings */
259 cpu_cur = cpu_new;
260
261 local_irq_restore(flags);
262
263 /* notify everyone we've done this */
264 cpufreq_notify_transition(policy, &freqs.freqs, CPUFREQ_POSTCHANGE);
265
266 s3c_freq_dbg("%s: finished\n", __func__);
267 return 0;
268
269 err_notpossible:
270 printk(KERN_ERR "no compatible settings for %d\n", target_freq);
271 return -EINVAL;
272}
273
274/* s3c_cpufreq_target
275 *
276 * called by the cpufreq core to adjust the frequency that the CPU
277 * is currently running at.
278 */
279
280static int s3c_cpufreq_target(struct cpufreq_policy *policy,
281 unsigned int target_freq,
282 unsigned int relation)
283{
284 struct cpufreq_frequency_table *pll;
285 unsigned int index;
286
287 /* avoid repeated calls which cause a needless amout of duplicated
288 * logging output (and CPU time as the calculation process is
289 * done) */
290 if (target_freq == last_target)
291 return 0;
292
293 last_target = target_freq;
294
295 s3c_freq_dbg("%s: policy %p, target %u, relation %u\n",
296 __func__, policy, target_freq, relation);
297
298 if (ftab) {
299 if (cpufreq_frequency_table_target(policy, ftab,
300 target_freq, relation,
301 &index)) {
302 s3c_freq_dbg("%s: table failed\n", __func__);
303 return -EINVAL;
304 }
305
306 s3c_freq_dbg("%s: adjust %d to entry %d (%u)\n", __func__,
307 target_freq, index, ftab[index].frequency);
308 target_freq = ftab[index].frequency;
309 }
310
311 target_freq *= 1000; /* convert target to Hz */
312
313 /* find the settings for our new frequency */
314
315 if (!pll_reg || cpu_cur.lock_pll) {
316 /* either we've not got any PLL values, or we've locked
317 * to the current one. */
318 pll = NULL;
319 } else {
320 struct cpufreq_policy tmp_policy;
321 int ret;
322
323 /* we keep the cpu pll table in Hz, to ensure we get an
324 * accurate value for the PLL output. */
325
326 tmp_policy.min = policy->min * 1000;
327 tmp_policy.max = policy->max * 1000;
328 tmp_policy.cpu = policy->cpu;
329
330 /* cpufreq_frequency_table_target uses a pointer to 'index'
331 * which is the number of the table entry, not the value of
332 * the table entry's index field. */
333
334 ret = cpufreq_frequency_table_target(&tmp_policy, pll_reg,
335 target_freq, relation,
336 &index);
337
338 if (ret < 0) {
339 printk(KERN_ERR "%s: no PLL available\n", __func__);
340 goto err_notpossible;
341 }
342
343 pll = pll_reg + index;
344
345 s3c_freq_dbg("%s: target %u => %u\n",
346 __func__, target_freq, pll->frequency);
347
348 target_freq = pll->frequency;
349 }
350
351 return s3c_cpufreq_settarget(policy, target_freq, pll);
352
353 err_notpossible:
354 printk(KERN_ERR "no compatible settings for %d\n", target_freq);
355 return -EINVAL;
356}
357
358static unsigned int s3c_cpufreq_get(unsigned int cpu)
359{
360 return clk_get_rate(clk_arm) / 1000;
361}
362
363struct clk *s3c_cpufreq_clk_get(struct device *dev, const char *name)
364{
365 struct clk *clk;
366
367 clk = clk_get(dev, name);
368 if (IS_ERR(clk))
369 printk(KERN_ERR "cpufreq: failed to get clock '%s'\n", name);
370
371 return clk;
372}
373
374static int s3c_cpufreq_init(struct cpufreq_policy *policy)
375{
376 printk(KERN_INFO "%s: initialising policy %p\n", __func__, policy);
377
378 if (policy->cpu != 0)
379 return -EINVAL;
380
381 policy->cur = s3c_cpufreq_get(0);
382 policy->min = policy->cpuinfo.min_freq = 0;
383 policy->max = policy->cpuinfo.max_freq = cpu_cur.info->max.fclk / 1000;
384 policy->governor = CPUFREQ_DEFAULT_GOVERNOR;
385
386 /* feed the latency information from the cpu driver */
387 policy->cpuinfo.transition_latency = cpu_cur.info->latency;
388
389 if (ftab)
390 cpufreq_frequency_table_cpuinfo(policy, ftab);
391
392 return 0;
393}
394
395static __init int s3c_cpufreq_initclks(void)
396{
397 _clk_mpll = s3c_cpufreq_clk_get(NULL, "mpll");
398 _clk_xtal = s3c_cpufreq_clk_get(NULL, "xtal");
399 clk_fclk = s3c_cpufreq_clk_get(NULL, "fclk");
400 clk_hclk = s3c_cpufreq_clk_get(NULL, "hclk");
401 clk_pclk = s3c_cpufreq_clk_get(NULL, "pclk");
402 clk_arm = s3c_cpufreq_clk_get(NULL, "armclk");
403
404 if (IS_ERR(clk_fclk) || IS_ERR(clk_hclk) || IS_ERR(clk_pclk) ||
405 IS_ERR(_clk_mpll) || IS_ERR(clk_arm) || IS_ERR(_clk_xtal)) {
406 printk(KERN_ERR "%s: could not get clock(s)\n", __func__);
407 return -ENOENT;
408 }
409
410 printk(KERN_INFO "%s: clocks f=%lu,h=%lu,p=%lu,a=%lu\n", __func__,
411 clk_get_rate(clk_fclk) / 1000,
412 clk_get_rate(clk_hclk) / 1000,
413 clk_get_rate(clk_pclk) / 1000,
414 clk_get_rate(clk_arm) / 1000);
415
416 return 0;
417}
418
419static int s3c_cpufreq_verify(struct cpufreq_policy *policy)
420{
421 if (policy->cpu != 0)
422 return -EINVAL;
423
424 return 0;
425}
426
427#ifdef CONFIG_PM
428static struct cpufreq_frequency_table suspend_pll;
429static unsigned int suspend_freq;
430
431static int s3c_cpufreq_suspend(struct cpufreq_policy *policy)
432{
433 suspend_pll.frequency = clk_get_rate(_clk_mpll);
434 suspend_pll.index = __raw_readl(S3C2410_MPLLCON);
435 suspend_freq = s3c_cpufreq_get(0) * 1000;
436
437 return 0;
438}
439
440static int s3c_cpufreq_resume(struct cpufreq_policy *policy)
441{
442 int ret;
443
444 s3c_freq_dbg("%s: resuming with policy %p\n", __func__, policy);
445
446 last_target = ~0; /* invalidate last_target setting */
447
448 /* first, find out what speed we resumed at. */
449 s3c_cpufreq_resume_clocks();
450
451 /* whilst we will be called later on, we try and re-set the
452 * cpu frequencies as soon as possible so that we do not end
453 * up resuming devices and then immediately having to re-set
454 * a number of settings once these devices have restarted.
455 *
456 * as a note, it is expected devices are not used until they
457 * have been un-suspended and at that time they should have
458 * used the updated clock settings.
459 */
460
461 ret = s3c_cpufreq_settarget(NULL, suspend_freq, &suspend_pll);
462 if (ret) {
463 printk(KERN_ERR "%s: failed to reset pll/freq\n", __func__);
464 return ret;
465 }
466
467 return 0;
468}
469#else
470#define s3c_cpufreq_resume NULL
471#define s3c_cpufreq_suspend NULL
472#endif
473
474static struct cpufreq_driver s3c24xx_driver = {
475 .flags = CPUFREQ_STICKY,
476 .verify = s3c_cpufreq_verify,
477 .target = s3c_cpufreq_target,
478 .get = s3c_cpufreq_get,
479 .init = s3c_cpufreq_init,
480 .suspend = s3c_cpufreq_suspend,
481 .resume = s3c_cpufreq_resume,
482 .name = "s3c24xx",
483};
484
485
486int __init s3c_cpufreq_register(struct s3c_cpufreq_info *info)
487{
488 if (!info || !info->name) {
489 printk(KERN_ERR "%s: failed to pass valid information\n",
490 __func__);
491 return -EINVAL;
492 }
493
494 printk(KERN_INFO "S3C24XX CPU Frequency driver, %s cpu support\n",
495 info->name);
496
497 /* check our driver info has valid data */
498
499 BUG_ON(info->set_refresh == NULL);
500 BUG_ON(info->set_divs == NULL);
501 BUG_ON(info->calc_divs == NULL);
502
503 /* info->set_fvco is optional, depending on whether there
504 * is a need to set the clock code. */
505
506 cpu_cur.info = info;
507
508 /* Note, driver registering should probably update locktime */
509
510 return 0;
511}
512
513int __init s3c_cpufreq_setboard(struct s3c_cpufreq_board *board)
514{
515 struct s3c_cpufreq_board *ours;
516
517 if (!board) {
518 printk(KERN_INFO "%s: no board data\n", __func__);
519 return -EINVAL;
520 }
521
522 /* Copy the board information so that each board can make this
523 * initdata. */
524
525 ours = kzalloc(sizeof(struct s3c_cpufreq_board), GFP_KERNEL);
526 if (ours == NULL) {
527 printk(KERN_ERR "%s: no memory\n", __func__);
528 return -ENOMEM;
529 }
530
531 *ours = *board;
532 cpu_cur.board = ours;
533
534 return 0;
535}
536
537int __init s3c_cpufreq_auto_io(void)
538{
539 int ret;
540
541 if (!cpu_cur.info->get_iotiming) {
542 printk(KERN_ERR "%s: get_iotiming undefined\n", __func__);
543 return -ENOENT;
544 }
545
546 printk(KERN_INFO "%s: working out IO settings\n", __func__);
547
548 ret = (cpu_cur.info->get_iotiming)(&cpu_cur, &s3c24xx_iotiming);
549 if (ret)
550 printk(KERN_ERR "%s: failed to get timings\n", __func__);
551
552 return ret;
553}
554
555/* if one or is zero, then return the other, otherwise return the min */
556#define do_min(_a, _b) ((_a) == 0 ? (_b) : (_b) == 0 ? (_a) : min(_a, _b))
557
558/**
559 * s3c_cpufreq_freq_min - find the minimum settings for the given freq.
560 * @dst: The destination structure
561 * @a: One argument.
562 * @b: The other argument.
563 *
564 * Create a minimum of each frequency entry in the 'struct s3c_freq',
565 * unless the entry is zero when it is ignored and the non-zero argument
566 * used.
567 */
568static void s3c_cpufreq_freq_min(struct s3c_freq *dst,
569 struct s3c_freq *a, struct s3c_freq *b)
570{
571 dst->fclk = do_min(a->fclk, b->fclk);
572 dst->hclk = do_min(a->hclk, b->hclk);
573 dst->pclk = do_min(a->pclk, b->pclk);
574 dst->armclk = do_min(a->armclk, b->armclk);
575}
576
577static inline u32 calc_locktime(u32 freq, u32 time_us)
578{
579 u32 result;
580
581 result = freq * time_us;
582 result = DIV_ROUND_UP(result, 1000 * 1000);
583
584 return result;
585}
586
587static void s3c_cpufreq_update_loctkime(void)
588{
589 unsigned int bits = cpu_cur.info->locktime_bits;
590 u32 rate = (u32)clk_get_rate(_clk_xtal);
591 u32 val;
592
593 if (bits == 0) {
594 WARN_ON(1);
595 return;
596 }
597
598 val = calc_locktime(rate, cpu_cur.info->locktime_u) << bits;
599 val |= calc_locktime(rate, cpu_cur.info->locktime_m);
600
601 printk(KERN_INFO "%s: new locktime is 0x%08x\n", __func__, val);
602 __raw_writel(val, S3C2410_LOCKTIME);
603}
604
605static int s3c_cpufreq_build_freq(void)
606{
607 int size, ret;
608
609 if (!cpu_cur.info->calc_freqtable)
610 return -EINVAL;
611
612 kfree(ftab);
613 ftab = NULL;
614
615 size = cpu_cur.info->calc_freqtable(&cpu_cur, NULL, 0);
616 size++;
617
618 ftab = kmalloc(sizeof(struct cpufreq_frequency_table) * size, GFP_KERNEL);
619 if (!ftab) {
620 printk(KERN_ERR "%s: no memory for tables\n", __func__);
621 return -ENOMEM;
622 }
623
624 ftab_size = size;
625
626 ret = cpu_cur.info->calc_freqtable(&cpu_cur, ftab, size);
627 s3c_cpufreq_addfreq(ftab, ret, size, CPUFREQ_TABLE_END);
628
629 return 0;
630}
631
632static int __init s3c_cpufreq_initcall(void)
633{
634 int ret = 0;
635
636 if (cpu_cur.info && cpu_cur.board) {
637 ret = s3c_cpufreq_initclks();
638 if (ret)
639 goto out;
640
641 /* get current settings */
642 s3c_cpufreq_getcur(&cpu_cur);
643 s3c_cpufreq_show("cur", &cpu_cur);
644
645 if (cpu_cur.board->auto_io) {
646 ret = s3c_cpufreq_auto_io();
647 if (ret) {
648 printk(KERN_ERR "%s: failed to get io timing\n",
649 __func__);
650 goto out;
651 }
652 }
653
654 if (cpu_cur.board->need_io && !cpu_cur.info->set_iotiming) {
655 printk(KERN_ERR "%s: no IO support registered\n",
656 __func__);
657 ret = -EINVAL;
658 goto out;
659 }
660
661 if (!cpu_cur.info->need_pll)
662 cpu_cur.lock_pll = 1;
663
664 s3c_cpufreq_update_loctkime();
665
666 s3c_cpufreq_freq_min(&cpu_cur.max, &cpu_cur.board->max,
667 &cpu_cur.info->max);
668
669 if (cpu_cur.info->calc_freqtable)
670 s3c_cpufreq_build_freq();
671
672 ret = cpufreq_register_driver(&s3c24xx_driver);
673 }
674
675 out:
676 return ret;
677}
678
679late_initcall(s3c_cpufreq_initcall);
680
681/**
682 * s3c_plltab_register - register CPU PLL table.
683 * @plls: The list of PLL entries.
684 * @plls_no: The size of the PLL entries @plls.
685 *
686 * Register the given set of PLLs with the system.
687 */
688int __init s3c_plltab_register(struct cpufreq_frequency_table *plls,
689 unsigned int plls_no)
690{
691 struct cpufreq_frequency_table *vals;
692 unsigned int size;
693
694 size = sizeof(struct cpufreq_frequency_table) * (plls_no + 1);
695
696 vals = kmalloc(size, GFP_KERNEL);
697 if (vals) {
698 memcpy(vals, plls, size);
699 pll_reg = vals;
700
701 /* write a terminating entry, we don't store it in the
702 * table that is stored in the kernel */
703 vals += plls_no;
704 vals->frequency = CPUFREQ_TABLE_END;
705
706 printk(KERN_INFO "cpufreq: %d PLL entries\n", plls_no);
707 } else
708 printk(KERN_ERR "cpufreq: no memory for PLL tables\n");
709
710 return vals ? 0 : -ENOMEM;
711}
diff --git a/arch/arm/mach-s3c24xx/dma-s3c2412.c b/arch/arm/mach-s3c24xx/dma-s3c2412.c
index ab1700ec8e64..b7e094671522 100644
--- a/arch/arm/mach-s3c24xx/dma-s3c2412.c
+++ b/arch/arm/mach-s3c24xx/dma-s3c2412.c
@@ -35,121 +35,95 @@ static struct s3c24xx_dma_map __initdata s3c2412_dma_mappings[] = {
35 [DMACH_XD0] = { 35 [DMACH_XD0] = {
36 .name = "xdreq0", 36 .name = "xdreq0",
37 .channels = MAP(S3C2412_DMAREQSEL_XDREQ0), 37 .channels = MAP(S3C2412_DMAREQSEL_XDREQ0),
38 .channels_rx = MAP(S3C2412_DMAREQSEL_XDREQ0),
39 }, 38 },
40 [DMACH_XD1] = { 39 [DMACH_XD1] = {
41 .name = "xdreq1", 40 .name = "xdreq1",
42 .channels = MAP(S3C2412_DMAREQSEL_XDREQ1), 41 .channels = MAP(S3C2412_DMAREQSEL_XDREQ1),
43 .channels_rx = MAP(S3C2412_DMAREQSEL_XDREQ1),
44 }, 42 },
45 [DMACH_SDI] = { 43 [DMACH_SDI] = {
46 .name = "sdi", 44 .name = "sdi",
47 .channels = MAP(S3C2412_DMAREQSEL_SDI), 45 .channels = MAP(S3C2412_DMAREQSEL_SDI),
48 .channels_rx = MAP(S3C2412_DMAREQSEL_SDI),
49 }, 46 },
50 [DMACH_SPI0] = { 47 [DMACH_SPI0_RX] = {
51 .name = "spi0", 48 .name = "spi0-rx",
49 .channels = MAP(S3C2412_DMAREQSEL_SPI0RX),
50 },
51 [DMACH_SPI0_TX] = {
52 .name = "spi0-tx",
52 .channels = MAP(S3C2412_DMAREQSEL_SPI0TX), 53 .channels = MAP(S3C2412_DMAREQSEL_SPI0TX),
53 .channels_rx = MAP(S3C2412_DMAREQSEL_SPI0RX),
54 }, 54 },
55 [DMACH_SPI1] = { 55 [DMACH_SPI1_RX] = {
56 .name = "spi1", 56 .name = "spi1-rx",
57 .channels = MAP(S3C2412_DMAREQSEL_SPI1RX),
58 },
59 [DMACH_SPI1_TX] = {
60 .name = "spi1-tx",
57 .channels = MAP(S3C2412_DMAREQSEL_SPI1TX), 61 .channels = MAP(S3C2412_DMAREQSEL_SPI1TX),
58 .channels_rx = MAP(S3C2412_DMAREQSEL_SPI1RX),
59 }, 62 },
60 [DMACH_UART0] = { 63 [DMACH_UART0] = {
61 .name = "uart0", 64 .name = "uart0",
62 .channels = MAP(S3C2412_DMAREQSEL_UART0_0), 65 .channels = MAP(S3C2412_DMAREQSEL_UART0_0),
63 .channels_rx = MAP(S3C2412_DMAREQSEL_UART0_0),
64 }, 66 },
65 [DMACH_UART1] = { 67 [DMACH_UART1] = {
66 .name = "uart1", 68 .name = "uart1",
67 .channels = MAP(S3C2412_DMAREQSEL_UART1_0), 69 .channels = MAP(S3C2412_DMAREQSEL_UART1_0),
68 .channels_rx = MAP(S3C2412_DMAREQSEL_UART1_0),
69 }, 70 },
70 [DMACH_UART2] = { 71 [DMACH_UART2] = {
71 .name = "uart2", 72 .name = "uart2",
72 .channels = MAP(S3C2412_DMAREQSEL_UART2_0), 73 .channels = MAP(S3C2412_DMAREQSEL_UART2_0),
73 .channels_rx = MAP(S3C2412_DMAREQSEL_UART2_0),
74 }, 74 },
75 [DMACH_UART0_SRC2] = { 75 [DMACH_UART0_SRC2] = {
76 .name = "uart0", 76 .name = "uart0",
77 .channels = MAP(S3C2412_DMAREQSEL_UART0_1), 77 .channels = MAP(S3C2412_DMAREQSEL_UART0_1),
78 .channels_rx = MAP(S3C2412_DMAREQSEL_UART0_1),
79 }, 78 },
80 [DMACH_UART1_SRC2] = { 79 [DMACH_UART1_SRC2] = {
81 .name = "uart1", 80 .name = "uart1",
82 .channels = MAP(S3C2412_DMAREQSEL_UART1_1), 81 .channels = MAP(S3C2412_DMAREQSEL_UART1_1),
83 .channels_rx = MAP(S3C2412_DMAREQSEL_UART1_1),
84 }, 82 },
85 [DMACH_UART2_SRC2] = { 83 [DMACH_UART2_SRC2] = {
86 .name = "uart2", 84 .name = "uart2",
87 .channels = MAP(S3C2412_DMAREQSEL_UART2_1), 85 .channels = MAP(S3C2412_DMAREQSEL_UART2_1),
88 .channels_rx = MAP(S3C2412_DMAREQSEL_UART2_1),
89 }, 86 },
90 [DMACH_TIMER] = { 87 [DMACH_TIMER] = {
91 .name = "timer", 88 .name = "timer",
92 .channels = MAP(S3C2412_DMAREQSEL_TIMER), 89 .channels = MAP(S3C2412_DMAREQSEL_TIMER),
93 .channels_rx = MAP(S3C2412_DMAREQSEL_TIMER),
94 }, 90 },
95 [DMACH_I2S_IN] = { 91 [DMACH_I2S_IN] = {
96 .name = "i2s-sdi", 92 .name = "i2s-sdi",
97 .channels = MAP(S3C2412_DMAREQSEL_I2SRX), 93 .channels = MAP(S3C2412_DMAREQSEL_I2SRX),
98 .channels_rx = MAP(S3C2412_DMAREQSEL_I2SRX),
99 }, 94 },
100 [DMACH_I2S_OUT] = { 95 [DMACH_I2S_OUT] = {
101 .name = "i2s-sdo", 96 .name = "i2s-sdo",
102 .channels = MAP(S3C2412_DMAREQSEL_I2STX), 97 .channels = MAP(S3C2412_DMAREQSEL_I2STX),
103 .channels_rx = MAP(S3C2412_DMAREQSEL_I2STX),
104 }, 98 },
105 [DMACH_USB_EP1] = { 99 [DMACH_USB_EP1] = {
106 .name = "usb-ep1", 100 .name = "usb-ep1",
107 .channels = MAP(S3C2412_DMAREQSEL_USBEP1), 101 .channels = MAP(S3C2412_DMAREQSEL_USBEP1),
108 .channels_rx = MAP(S3C2412_DMAREQSEL_USBEP1),
109 }, 102 },
110 [DMACH_USB_EP2] = { 103 [DMACH_USB_EP2] = {
111 .name = "usb-ep2", 104 .name = "usb-ep2",
112 .channels = MAP(S3C2412_DMAREQSEL_USBEP2), 105 .channels = MAP(S3C2412_DMAREQSEL_USBEP2),
113 .channels_rx = MAP(S3C2412_DMAREQSEL_USBEP2),
114 }, 106 },
115 [DMACH_USB_EP3] = { 107 [DMACH_USB_EP3] = {
116 .name = "usb-ep3", 108 .name = "usb-ep3",
117 .channels = MAP(S3C2412_DMAREQSEL_USBEP3), 109 .channels = MAP(S3C2412_DMAREQSEL_USBEP3),
118 .channels_rx = MAP(S3C2412_DMAREQSEL_USBEP3),
119 }, 110 },
120 [DMACH_USB_EP4] = { 111 [DMACH_USB_EP4] = {
121 .name = "usb-ep4", 112 .name = "usb-ep4",
122 .channels = MAP(S3C2412_DMAREQSEL_USBEP4), 113 .channels = MAP(S3C2412_DMAREQSEL_USBEP4),
123 .channels_rx = MAP(S3C2412_DMAREQSEL_USBEP4),
124 }, 114 },
125}; 115};
126 116
127static void s3c2412_dma_direction(struct s3c2410_dma_chan *chan,
128 struct s3c24xx_dma_map *map,
129 enum dma_data_direction dir)
130{
131 unsigned long chsel;
132
133 if (dir == DMA_FROM_DEVICE)
134 chsel = map->channels_rx[0];
135 else
136 chsel = map->channels[0];
137
138 chsel &= ~DMA_CH_VALID;
139 chsel |= S3C2412_DMAREQSEL_HW;
140
141 writel(chsel, chan->regs + S3C2412_DMA_DMAREQSEL);
142}
143
144static void s3c2412_dma_select(struct s3c2410_dma_chan *chan, 117static void s3c2412_dma_select(struct s3c2410_dma_chan *chan,
145 struct s3c24xx_dma_map *map) 118 struct s3c24xx_dma_map *map)
146{ 119{
147 s3c2412_dma_direction(chan, map, chan->source); 120 unsigned long chsel = map->channels[0] & (~DMA_CH_VALID);
121 writel(chsel | S3C2412_DMAREQSEL_HW,
122 chan->regs + S3C2412_DMA_DMAREQSEL);
148} 123}
149 124
150static struct s3c24xx_dma_selection __initdata s3c2412_dma_sel = { 125static struct s3c24xx_dma_selection __initdata s3c2412_dma_sel = {
151 .select = s3c2412_dma_select, 126 .select = s3c2412_dma_select,
152 .direction = s3c2412_dma_direction,
153 .dcon_mask = 0, 127 .dcon_mask = 0,
154 .map = s3c2412_dma_mappings, 128 .map = s3c2412_dma_mappings,
155 .map_size = ARRAY_SIZE(s3c2412_dma_mappings), 129 .map_size = ARRAY_SIZE(s3c2412_dma_mappings),
diff --git a/arch/arm/mach-s3c24xx/dma-s3c2443.c b/arch/arm/mach-s3c24xx/dma-s3c2443.c
index 5fe3539dc2b5..95b9f759fe97 100644
--- a/arch/arm/mach-s3c24xx/dma-s3c2443.c
+++ b/arch/arm/mach-s3c24xx/dma-s3c2443.c
@@ -128,7 +128,8 @@ static struct s3c24xx_dma_map __initdata s3c2443_dma_mappings[] = {
128static void s3c2443_dma_select(struct s3c2410_dma_chan *chan, 128static void s3c2443_dma_select(struct s3c2410_dma_chan *chan,
129 struct s3c24xx_dma_map *map) 129 struct s3c24xx_dma_map *map)
130{ 130{
131 writel(map->channels[0] | S3C2443_DMAREQSEL_HW, 131 unsigned long chsel = map->channels[0] & (~DMA_CH_VALID);
132 writel(chsel | S3C2443_DMAREQSEL_HW,
132 chan->regs + S3C2443_DMA_DMAREQSEL); 133 chan->regs + S3C2443_DMA_DMAREQSEL);
133} 134}
134 135
diff --git a/arch/arm/mach-s3c24xx/dma.c b/arch/arm/mach-s3c24xx/dma.c
index aab64909e9a3..4a65cba3295d 100644
--- a/arch/arm/mach-s3c24xx/dma.c
+++ b/arch/arm/mach-s3c24xx/dma.c
@@ -1159,9 +1159,6 @@ int s3c2410_dma_devconfig(enum dma_ch channel,
1159 return -EINVAL; 1159 return -EINVAL;
1160 } 1160 }
1161 1161
1162 if (dma_sel.direction != NULL)
1163 (dma_sel.direction)(chan, chan->map, source);
1164
1165 return 0; 1162 return 0;
1166} 1163}
1167 1164
diff --git a/arch/arm/mach-s3c24xx/s3c2412.h b/arch/arm/mach-s3c24xx/include/mach/s3c2412.h
index 548ced42cbb7..548ced42cbb7 100644
--- a/arch/arm/mach-s3c24xx/s3c2412.h
+++ b/arch/arm/mach-s3c24xx/include/mach/s3c2412.h
diff --git a/arch/arm/mach-s3c24xx/include/mach/uncompress.h b/arch/arm/mach-s3c24xx/include/mach/uncompress.h
index 8b283f847daa..7d2ce205dce8 100644
--- a/arch/arm/mach-s3c24xx/include/mach/uncompress.h
+++ b/arch/arm/mach-s3c24xx/include/mach/uncompress.h
@@ -49,6 +49,9 @@ static void arch_detect_cpu(void)
49 fifo_mask = S3C2410_UFSTAT_TXMASK; 49 fifo_mask = S3C2410_UFSTAT_TXMASK;
50 fifo_max = 15 << S3C2410_UFSTAT_TXSHIFT; 50 fifo_max = 15 << S3C2410_UFSTAT_TXSHIFT;
51 } 51 }
52
53 uart_base = (volatile u8 *) S3C_PA_UART +
54 (S3C_UART_OFFSET * CONFIG_S3C_LOWLEVEL_UART_PORT);
52} 55}
53 56
54#endif /* __ASM_ARCH_UNCOMPRESS_H */ 57#endif /* __ASM_ARCH_UNCOMPRESS_H */
diff --git a/arch/arm/mach-s3c24xx/iotiming-s3c2412.c b/arch/arm/mach-s3c24xx/iotiming-s3c2412.c
index 663436d9db01..bd064c05c473 100644
--- a/arch/arm/mach-s3c24xx/iotiming-s3c2412.c
+++ b/arch/arm/mach-s3c24xx/iotiming-s3c2412.c
@@ -31,7 +31,7 @@
31#include <plat/cpu-freq-core.h> 31#include <plat/cpu-freq-core.h>
32#include <plat/clock.h> 32#include <plat/clock.h>
33 33
34#include "s3c2412.h" 34#include <mach/s3c2412.h>
35 35
36#define print_ns(x) ((x) / 10), ((x) % 10) 36#define print_ns(x) ((x) / 10), ((x) % 10)
37 37
diff --git a/arch/arm/mach-s3c24xx/mach-s3c2416-dt.c b/arch/arm/mach-s3c24xx/mach-s3c2416-dt.c
new file mode 100644
index 000000000000..f50454a34f72
--- /dev/null
+++ b/arch/arm/mach-s3c24xx/mach-s3c2416-dt.c
@@ -0,0 +1,91 @@
1/*
2 * Samsung's S3C2416 flattened device tree enabled machine
3 *
4 * Copyright (c) 2012 Heiko Stuebner <heiko@sntech.de>
5 *
6 * based on mach-exynos/mach-exynos4-dt.c
7 *
8 * Copyright (c) 2010-2011 Samsung Electronics Co., Ltd.
9 * http://www.samsung.com
10 * Copyright (c) 2010-2011 Linaro Ltd.
11 * www.linaro.org
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#include <linux/clocksource.h>
19#include <linux/irqchip.h>
20#include <linux/of_platform.h>
21#include <linux/serial_core.h>
22
23#include <asm/mach/arch.h>
24#include <mach/map.h>
25
26#include <plat/cpu.h>
27#include <plat/pm.h>
28#include <plat/regs-serial.h>
29
30#include "common.h"
31
32/*
33 * The following lookup table is used to override device names when devices
34 * are registered from device tree. This is temporarily added to enable
35 * device tree support addition for the S3C2416 architecture.
36 *
37 * For drivers that require platform data to be provided from the machine
38 * file, a platform data pointer can also be supplied along with the
39 * devices names. Usually, the platform data elements that cannot be parsed
40 * from the device tree by the drivers (example: function pointers) are
41 * supplied. But it should be noted that this is a temporary mechanism and
42 * at some point, the drivers should be capable of parsing all the platform
43 * data from the device tree.
44 */
45static const struct of_dev_auxdata s3c2416_auxdata_lookup[] __initconst = {
46 OF_DEV_AUXDATA("samsung,s3c2440-uart", S3C24XX_PA_UART,
47 "s3c2440-uart.0", NULL),
48 OF_DEV_AUXDATA("samsung,s3c2440-uart", S3C24XX_PA_UART + 0x4000,
49 "s3c2440-uart.1", NULL),
50 OF_DEV_AUXDATA("samsung,s3c2440-uart", S3C24XX_PA_UART + 0x8000,
51 "s3c2440-uart.2", NULL),
52 OF_DEV_AUXDATA("samsung,s3c2440-uart", S3C24XX_PA_UART + 0xC000,
53 "s3c2440-uart.3", NULL),
54 OF_DEV_AUXDATA("samsung,s3c6410-sdhci", S3C_PA_HSMMC0,
55 "s3c-sdhci.0", NULL),
56 OF_DEV_AUXDATA("samsung,s3c6410-sdhci", S3C_PA_HSMMC1,
57 "s3c-sdhci.1", NULL),
58 OF_DEV_AUXDATA("samsung,s3c2440-i2c", S3C_PA_IIC,
59 "s3c2440-i2c.0", NULL),
60 {},
61};
62
63static void __init s3c2416_dt_map_io(void)
64{
65 s3c24xx_init_io(NULL, 0);
66 s3c24xx_init_clocks(12000000);
67}
68
69static void __init s3c2416_dt_machine_init(void)
70{
71 of_platform_populate(NULL, of_default_bus_match_table,
72 s3c2416_auxdata_lookup, NULL);
73
74 s3c_pm_init();
75}
76
77static char const *s3c2416_dt_compat[] __initdata = {
78 "samsung,s3c2416",
79 "samsung,s3c2450",
80 NULL
81};
82
83DT_MACHINE_START(S3C2416_DT, "Samsung S3C2416 (Flattened Device Tree)")
84 /* Maintainer: Heiko Stuebner <heiko@sntech.de> */
85 .dt_compat = s3c2416_dt_compat,
86 .map_io = s3c2416_dt_map_io,
87 .init_irq = irqchip_init,
88 .init_machine = s3c2416_dt_machine_init,
89 .init_time = clocksource_of_init,
90 .restart = s3c2416_restart,
91MACHINE_END
diff --git a/arch/arm/mach-s3c24xx/pll-s3c2410.c b/arch/arm/mach-s3c24xx/pll-s3c2410.c
index dcf3420a3271..5e37d368594b 100644
--- a/arch/arm/mach-s3c24xx/pll-s3c2410.c
+++ b/arch/arm/mach-s3c24xx/pll-s3c2410.c
@@ -33,36 +33,36 @@
33#include <plat/cpu-freq-core.h> 33#include <plat/cpu-freq-core.h>
34 34
35static struct cpufreq_frequency_table pll_vals_12MHz[] = { 35static struct cpufreq_frequency_table pll_vals_12MHz[] = {
36 { .frequency = 34000000, .index = PLLVAL(82, 2, 3), }, 36 { .frequency = 34000000, .driver_data = PLLVAL(82, 2, 3), },
37 { .frequency = 45000000, .index = PLLVAL(82, 1, 3), }, 37 { .frequency = 45000000, .driver_data = PLLVAL(82, 1, 3), },
38 { .frequency = 51000000, .index = PLLVAL(161, 3, 3), }, 38 { .frequency = 51000000, .driver_data = PLLVAL(161, 3, 3), },
39 { .frequency = 48000000, .index = PLLVAL(120, 2, 3), }, 39 { .frequency = 48000000, .driver_data = PLLVAL(120, 2, 3), },
40 { .frequency = 56000000, .index = PLLVAL(142, 2, 3), }, 40 { .frequency = 56000000, .driver_data = PLLVAL(142, 2, 3), },
41 { .frequency = 68000000, .index = PLLVAL(82, 2, 2), }, 41 { .frequency = 68000000, .driver_data = PLLVAL(82, 2, 2), },
42 { .frequency = 79000000, .index = PLLVAL(71, 1, 2), }, 42 { .frequency = 79000000, .driver_data = PLLVAL(71, 1, 2), },
43 { .frequency = 85000000, .index = PLLVAL(105, 2, 2), }, 43 { .frequency = 85000000, .driver_data = PLLVAL(105, 2, 2), },
44 { .frequency = 90000000, .index = PLLVAL(112, 2, 2), }, 44 { .frequency = 90000000, .driver_data = PLLVAL(112, 2, 2), },
45 { .frequency = 101000000, .index = PLLVAL(127, 2, 2), }, 45 { .frequency = 101000000, .driver_data = PLLVAL(127, 2, 2), },
46 { .frequency = 113000000, .index = PLLVAL(105, 1, 2), }, 46 { .frequency = 113000000, .driver_data = PLLVAL(105, 1, 2), },
47 { .frequency = 118000000, .index = PLLVAL(150, 2, 2), }, 47 { .frequency = 118000000, .driver_data = PLLVAL(150, 2, 2), },
48 { .frequency = 124000000, .index = PLLVAL(116, 1, 2), }, 48 { .frequency = 124000000, .driver_data = PLLVAL(116, 1, 2), },
49 { .frequency = 135000000, .index = PLLVAL(82, 2, 1), }, 49 { .frequency = 135000000, .driver_data = PLLVAL(82, 2, 1), },
50 { .frequency = 147000000, .index = PLLVAL(90, 2, 1), }, 50 { .frequency = 147000000, .driver_data = PLLVAL(90, 2, 1), },
51 { .frequency = 152000000, .index = PLLVAL(68, 1, 1), }, 51 { .frequency = 152000000, .driver_data = PLLVAL(68, 1, 1), },
52 { .frequency = 158000000, .index = PLLVAL(71, 1, 1), }, 52 { .frequency = 158000000, .driver_data = PLLVAL(71, 1, 1), },
53 { .frequency = 170000000, .index = PLLVAL(77, 1, 1), }, 53 { .frequency = 170000000, .driver_data = PLLVAL(77, 1, 1), },
54 { .frequency = 180000000, .index = PLLVAL(82, 1, 1), }, 54 { .frequency = 180000000, .driver_data = PLLVAL(82, 1, 1), },
55 { .frequency = 186000000, .index = PLLVAL(85, 1, 1), }, 55 { .frequency = 186000000, .driver_data = PLLVAL(85, 1, 1), },
56 { .frequency = 192000000, .index = PLLVAL(88, 1, 1), }, 56 { .frequency = 192000000, .driver_data = PLLVAL(88, 1, 1), },
57 { .frequency = 203000000, .index = PLLVAL(161, 3, 1), }, 57 { .frequency = 203000000, .driver_data = PLLVAL(161, 3, 1), },
58 58
59 /* 2410A extras */ 59 /* 2410A extras */
60 60
61 { .frequency = 210000000, .index = PLLVAL(132, 2, 1), }, 61 { .frequency = 210000000, .driver_data = PLLVAL(132, 2, 1), },
62 { .frequency = 226000000, .index = PLLVAL(105, 1, 1), }, 62 { .frequency = 226000000, .driver_data = PLLVAL(105, 1, 1), },
63 { .frequency = 266000000, .index = PLLVAL(125, 1, 1), }, 63 { .frequency = 266000000, .driver_data = PLLVAL(125, 1, 1), },
64 { .frequency = 268000000, .index = PLLVAL(126, 1, 1), }, 64 { .frequency = 268000000, .driver_data = PLLVAL(126, 1, 1), },
65 { .frequency = 270000000, .index = PLLVAL(127, 1, 1), }, 65 { .frequency = 270000000, .driver_data = PLLVAL(127, 1, 1), },
66}; 66};
67 67
68static int s3c2410_plls_add(struct device *dev, struct subsys_interface *sif) 68static int s3c2410_plls_add(struct device *dev, struct subsys_interface *sif)
diff --git a/arch/arm/mach-s3c24xx/pll-s3c2440-12000000.c b/arch/arm/mach-s3c24xx/pll-s3c2440-12000000.c
index 673781758319..a19460e6e7b0 100644
--- a/arch/arm/mach-s3c24xx/pll-s3c2440-12000000.c
+++ b/arch/arm/mach-s3c24xx/pll-s3c2440-12000000.c
@@ -21,33 +21,33 @@
21#include <plat/cpu-freq-core.h> 21#include <plat/cpu-freq-core.h>
22 22
23static struct cpufreq_frequency_table s3c2440_plls_12[] __initdata = { 23static struct cpufreq_frequency_table s3c2440_plls_12[] __initdata = {
24 { .frequency = 75000000, .index = PLLVAL(0x75, 3, 3), }, /* FVco 600.000000 */ 24 { .frequency = 75000000, .driver_data = PLLVAL(0x75, 3, 3), }, /* FVco 600.000000 */
25 { .frequency = 80000000, .index = PLLVAL(0x98, 4, 3), }, /* FVco 640.000000 */ 25 { .frequency = 80000000, .driver_data = PLLVAL(0x98, 4, 3), }, /* FVco 640.000000 */
26 { .frequency = 90000000, .index = PLLVAL(0x70, 2, 3), }, /* FVco 720.000000 */ 26 { .frequency = 90000000, .driver_data = PLLVAL(0x70, 2, 3), }, /* FVco 720.000000 */
27 { .frequency = 100000000, .index = PLLVAL(0x5c, 1, 3), }, /* FVco 800.000000 */ 27 { .frequency = 100000000, .driver_data = PLLVAL(0x5c, 1, 3), }, /* FVco 800.000000 */
28 { .frequency = 110000000, .index = PLLVAL(0x66, 1, 3), }, /* FVco 880.000000 */ 28 { .frequency = 110000000, .driver_data = PLLVAL(0x66, 1, 3), }, /* FVco 880.000000 */
29 { .frequency = 120000000, .index = PLLVAL(0x70, 1, 3), }, /* FVco 960.000000 */ 29 { .frequency = 120000000, .driver_data = PLLVAL(0x70, 1, 3), }, /* FVco 960.000000 */
30 { .frequency = 150000000, .index = PLLVAL(0x75, 3, 2), }, /* FVco 600.000000 */ 30 { .frequency = 150000000, .driver_data = PLLVAL(0x75, 3, 2), }, /* FVco 600.000000 */
31 { .frequency = 160000000, .index = PLLVAL(0x98, 4, 2), }, /* FVco 640.000000 */ 31 { .frequency = 160000000, .driver_data = PLLVAL(0x98, 4, 2), }, /* FVco 640.000000 */
32 { .frequency = 170000000, .index = PLLVAL(0x4d, 1, 2), }, /* FVco 680.000000 */ 32 { .frequency = 170000000, .driver_data = PLLVAL(0x4d, 1, 2), }, /* FVco 680.000000 */
33 { .frequency = 180000000, .index = PLLVAL(0x70, 2, 2), }, /* FVco 720.000000 */ 33 { .frequency = 180000000, .driver_data = PLLVAL(0x70, 2, 2), }, /* FVco 720.000000 */
34 { .frequency = 190000000, .index = PLLVAL(0x57, 1, 2), }, /* FVco 760.000000 */ 34 { .frequency = 190000000, .driver_data = PLLVAL(0x57, 1, 2), }, /* FVco 760.000000 */
35 { .frequency = 200000000, .index = PLLVAL(0x5c, 1, 2), }, /* FVco 800.000000 */ 35 { .frequency = 200000000, .driver_data = PLLVAL(0x5c, 1, 2), }, /* FVco 800.000000 */
36 { .frequency = 210000000, .index = PLLVAL(0x84, 2, 2), }, /* FVco 840.000000 */ 36 { .frequency = 210000000, .driver_data = PLLVAL(0x84, 2, 2), }, /* FVco 840.000000 */
37 { .frequency = 220000000, .index = PLLVAL(0x66, 1, 2), }, /* FVco 880.000000 */ 37 { .frequency = 220000000, .driver_data = PLLVAL(0x66, 1, 2), }, /* FVco 880.000000 */
38 { .frequency = 230000000, .index = PLLVAL(0x6b, 1, 2), }, /* FVco 920.000000 */ 38 { .frequency = 230000000, .driver_data = PLLVAL(0x6b, 1, 2), }, /* FVco 920.000000 */
39 { .frequency = 240000000, .index = PLLVAL(0x70, 1, 2), }, /* FVco 960.000000 */ 39 { .frequency = 240000000, .driver_data = PLLVAL(0x70, 1, 2), }, /* FVco 960.000000 */
40 { .frequency = 300000000, .index = PLLVAL(0x75, 3, 1), }, /* FVco 600.000000 */ 40 { .frequency = 300000000, .driver_data = PLLVAL(0x75, 3, 1), }, /* FVco 600.000000 */
41 { .frequency = 310000000, .index = PLLVAL(0x93, 4, 1), }, /* FVco 620.000000 */ 41 { .frequency = 310000000, .driver_data = PLLVAL(0x93, 4, 1), }, /* FVco 620.000000 */
42 { .frequency = 320000000, .index = PLLVAL(0x98, 4, 1), }, /* FVco 640.000000 */ 42 { .frequency = 320000000, .driver_data = PLLVAL(0x98, 4, 1), }, /* FVco 640.000000 */
43 { .frequency = 330000000, .index = PLLVAL(0x66, 2, 1), }, /* FVco 660.000000 */ 43 { .frequency = 330000000, .driver_data = PLLVAL(0x66, 2, 1), }, /* FVco 660.000000 */
44 { .frequency = 340000000, .index = PLLVAL(0x4d, 1, 1), }, /* FVco 680.000000 */ 44 { .frequency = 340000000, .driver_data = PLLVAL(0x4d, 1, 1), }, /* FVco 680.000000 */
45 { .frequency = 350000000, .index = PLLVAL(0xa7, 4, 1), }, /* FVco 700.000000 */ 45 { .frequency = 350000000, .driver_data = PLLVAL(0xa7, 4, 1), }, /* FVco 700.000000 */
46 { .frequency = 360000000, .index = PLLVAL(0x70, 2, 1), }, /* FVco 720.000000 */ 46 { .frequency = 360000000, .driver_data = PLLVAL(0x70, 2, 1), }, /* FVco 720.000000 */
47 { .frequency = 370000000, .index = PLLVAL(0xb1, 4, 1), }, /* FVco 740.000000 */ 47 { .frequency = 370000000, .driver_data = PLLVAL(0xb1, 4, 1), }, /* FVco 740.000000 */
48 { .frequency = 380000000, .index = PLLVAL(0x57, 1, 1), }, /* FVco 760.000000 */ 48 { .frequency = 380000000, .driver_data = PLLVAL(0x57, 1, 1), }, /* FVco 760.000000 */
49 { .frequency = 390000000, .index = PLLVAL(0x7a, 2, 1), }, /* FVco 780.000000 */ 49 { .frequency = 390000000, .driver_data = PLLVAL(0x7a, 2, 1), }, /* FVco 780.000000 */
50 { .frequency = 400000000, .index = PLLVAL(0x5c, 1, 1), }, /* FVco 800.000000 */ 50 { .frequency = 400000000, .driver_data = PLLVAL(0x5c, 1, 1), }, /* FVco 800.000000 */
51}; 51};
52 52
53static int s3c2440_plls12_add(struct device *dev, struct subsys_interface *sif) 53static int s3c2440_plls12_add(struct device *dev, struct subsys_interface *sif)
diff --git a/arch/arm/mach-s3c24xx/pll-s3c2440-16934400.c b/arch/arm/mach-s3c24xx/pll-s3c2440-16934400.c
index debfa106289b..1191b2905625 100644
--- a/arch/arm/mach-s3c24xx/pll-s3c2440-16934400.c
+++ b/arch/arm/mach-s3c24xx/pll-s3c2440-16934400.c
@@ -21,61 +21,61 @@
21#include <plat/cpu-freq-core.h> 21#include <plat/cpu-freq-core.h>
22 22
23static struct cpufreq_frequency_table s3c2440_plls_169344[] __initdata = { 23static struct cpufreq_frequency_table s3c2440_plls_169344[] __initdata = {
24 { .frequency = 78019200, .index = PLLVAL(121, 5, 3), }, /* FVco 624.153600 */ 24 { .frequency = 78019200, .driver_data = PLLVAL(121, 5, 3), }, /* FVco 624.153600 */
25 { .frequency = 84067200, .index = PLLVAL(131, 5, 3), }, /* FVco 672.537600 */ 25 { .frequency = 84067200, .driver_data = PLLVAL(131, 5, 3), }, /* FVco 672.537600 */
26 { .frequency = 90115200, .index = PLLVAL(141, 5, 3), }, /* FVco 720.921600 */ 26 { .frequency = 90115200, .driver_data = PLLVAL(141, 5, 3), }, /* FVco 720.921600 */
27 { .frequency = 96163200, .index = PLLVAL(151, 5, 3), }, /* FVco 769.305600 */ 27 { .frequency = 96163200, .driver_data = PLLVAL(151, 5, 3), }, /* FVco 769.305600 */
28 { .frequency = 102135600, .index = PLLVAL(185, 6, 3), }, /* FVco 817.084800 */ 28 { .frequency = 102135600, .driver_data = PLLVAL(185, 6, 3), }, /* FVco 817.084800 */
29 { .frequency = 108259200, .index = PLLVAL(171, 5, 3), }, /* FVco 866.073600 */ 29 { .frequency = 108259200, .driver_data = PLLVAL(171, 5, 3), }, /* FVco 866.073600 */
30 { .frequency = 114307200, .index = PLLVAL(127, 3, 3), }, /* FVco 914.457600 */ 30 { .frequency = 114307200, .driver_data = PLLVAL(127, 3, 3), }, /* FVco 914.457600 */
31 { .frequency = 120234240, .index = PLLVAL(134, 3, 3), }, /* FVco 961.873920 */ 31 { .frequency = 120234240, .driver_data = PLLVAL(134, 3, 3), }, /* FVco 961.873920 */
32 { .frequency = 126161280, .index = PLLVAL(141, 3, 3), }, /* FVco 1009.290240 */ 32 { .frequency = 126161280, .driver_data = PLLVAL(141, 3, 3), }, /* FVco 1009.290240 */
33 { .frequency = 132088320, .index = PLLVAL(148, 3, 3), }, /* FVco 1056.706560 */ 33 { .frequency = 132088320, .driver_data = PLLVAL(148, 3, 3), }, /* FVco 1056.706560 */
34 { .frequency = 138015360, .index = PLLVAL(155, 3, 3), }, /* FVco 1104.122880 */ 34 { .frequency = 138015360, .driver_data = PLLVAL(155, 3, 3), }, /* FVco 1104.122880 */
35 { .frequency = 144789120, .index = PLLVAL(163, 3, 3), }, /* FVco 1158.312960 */ 35 { .frequency = 144789120, .driver_data = PLLVAL(163, 3, 3), }, /* FVco 1158.312960 */
36 { .frequency = 150100363, .index = PLLVAL(187, 9, 2), }, /* FVco 600.401454 */ 36 { .frequency = 150100363, .driver_data = PLLVAL(187, 9, 2), }, /* FVco 600.401454 */
37 { .frequency = 156038400, .index = PLLVAL(121, 5, 2), }, /* FVco 624.153600 */ 37 { .frequency = 156038400, .driver_data = PLLVAL(121, 5, 2), }, /* FVco 624.153600 */
38 { .frequency = 162086400, .index = PLLVAL(126, 5, 2), }, /* FVco 648.345600 */ 38 { .frequency = 162086400, .driver_data = PLLVAL(126, 5, 2), }, /* FVco 648.345600 */
39 { .frequency = 168134400, .index = PLLVAL(131, 5, 2), }, /* FVco 672.537600 */ 39 { .frequency = 168134400, .driver_data = PLLVAL(131, 5, 2), }, /* FVco 672.537600 */
40 { .frequency = 174048000, .index = PLLVAL(177, 7, 2), }, /* FVco 696.192000 */ 40 { .frequency = 174048000, .driver_data = PLLVAL(177, 7, 2), }, /* FVco 696.192000 */
41 { .frequency = 180230400, .index = PLLVAL(141, 5, 2), }, /* FVco 720.921600 */ 41 { .frequency = 180230400, .driver_data = PLLVAL(141, 5, 2), }, /* FVco 720.921600 */
42 { .frequency = 186278400, .index = PLLVAL(124, 4, 2), }, /* FVco 745.113600 */ 42 { .frequency = 186278400, .driver_data = PLLVAL(124, 4, 2), }, /* FVco 745.113600 */
43 { .frequency = 192326400, .index = PLLVAL(151, 5, 2), }, /* FVco 769.305600 */ 43 { .frequency = 192326400, .driver_data = PLLVAL(151, 5, 2), }, /* FVco 769.305600 */
44 { .frequency = 198132480, .index = PLLVAL(109, 3, 2), }, /* FVco 792.529920 */ 44 { .frequency = 198132480, .driver_data = PLLVAL(109, 3, 2), }, /* FVco 792.529920 */
45 { .frequency = 204271200, .index = PLLVAL(185, 6, 2), }, /* FVco 817.084800 */ 45 { .frequency = 204271200, .driver_data = PLLVAL(185, 6, 2), }, /* FVco 817.084800 */
46 { .frequency = 210268800, .index = PLLVAL(141, 4, 2), }, /* FVco 841.075200 */ 46 { .frequency = 210268800, .driver_data = PLLVAL(141, 4, 2), }, /* FVco 841.075200 */
47 { .frequency = 216518400, .index = PLLVAL(171, 5, 2), }, /* FVco 866.073600 */ 47 { .frequency = 216518400, .driver_data = PLLVAL(171, 5, 2), }, /* FVco 866.073600 */
48 { .frequency = 222264000, .index = PLLVAL(97, 2, 2), }, /* FVco 889.056000 */ 48 { .frequency = 222264000, .driver_data = PLLVAL(97, 2, 2), }, /* FVco 889.056000 */
49 { .frequency = 228614400, .index = PLLVAL(127, 3, 2), }, /* FVco 914.457600 */ 49 { .frequency = 228614400, .driver_data = PLLVAL(127, 3, 2), }, /* FVco 914.457600 */
50 { .frequency = 234259200, .index = PLLVAL(158, 4, 2), }, /* FVco 937.036800 */ 50 { .frequency = 234259200, .driver_data = PLLVAL(158, 4, 2), }, /* FVco 937.036800 */
51 { .frequency = 240468480, .index = PLLVAL(134, 3, 2), }, /* FVco 961.873920 */ 51 { .frequency = 240468480, .driver_data = PLLVAL(134, 3, 2), }, /* FVco 961.873920 */
52 { .frequency = 246960000, .index = PLLVAL(167, 4, 2), }, /* FVco 987.840000 */ 52 { .frequency = 246960000, .driver_data = PLLVAL(167, 4, 2), }, /* FVco 987.840000 */
53 { .frequency = 252322560, .index = PLLVAL(141, 3, 2), }, /* FVco 1009.290240 */ 53 { .frequency = 252322560, .driver_data = PLLVAL(141, 3, 2), }, /* FVco 1009.290240 */
54 { .frequency = 258249600, .index = PLLVAL(114, 2, 2), }, /* FVco 1032.998400 */ 54 { .frequency = 258249600, .driver_data = PLLVAL(114, 2, 2), }, /* FVco 1032.998400 */
55 { .frequency = 264176640, .index = PLLVAL(148, 3, 2), }, /* FVco 1056.706560 */ 55 { .frequency = 264176640, .driver_data = PLLVAL(148, 3, 2), }, /* FVco 1056.706560 */
56 { .frequency = 270950400, .index = PLLVAL(120, 2, 2), }, /* FVco 1083.801600 */ 56 { .frequency = 270950400, .driver_data = PLLVAL(120, 2, 2), }, /* FVco 1083.801600 */
57 { .frequency = 276030720, .index = PLLVAL(155, 3, 2), }, /* FVco 1104.122880 */ 57 { .frequency = 276030720, .driver_data = PLLVAL(155, 3, 2), }, /* FVco 1104.122880 */
58 { .frequency = 282240000, .index = PLLVAL(92, 1, 2), }, /* FVco 1128.960000 */ 58 { .frequency = 282240000, .driver_data = PLLVAL(92, 1, 2), }, /* FVco 1128.960000 */
59 { .frequency = 289578240, .index = PLLVAL(163, 3, 2), }, /* FVco 1158.312960 */ 59 { .frequency = 289578240, .driver_data = PLLVAL(163, 3, 2), }, /* FVco 1158.312960 */
60 { .frequency = 294235200, .index = PLLVAL(131, 2, 2), }, /* FVco 1176.940800 */ 60 { .frequency = 294235200, .driver_data = PLLVAL(131, 2, 2), }, /* FVco 1176.940800 */
61 { .frequency = 300200727, .index = PLLVAL(187, 9, 1), }, /* FVco 600.401454 */ 61 { .frequency = 300200727, .driver_data = PLLVAL(187, 9, 1), }, /* FVco 600.401454 */
62 { .frequency = 306358690, .index = PLLVAL(191, 9, 1), }, /* FVco 612.717380 */ 62 { .frequency = 306358690, .driver_data = PLLVAL(191, 9, 1), }, /* FVco 612.717380 */
63 { .frequency = 312076800, .index = PLLVAL(121, 5, 1), }, /* FVco 624.153600 */ 63 { .frequency = 312076800, .driver_data = PLLVAL(121, 5, 1), }, /* FVco 624.153600 */
64 { .frequency = 318366720, .index = PLLVAL(86, 3, 1), }, /* FVco 636.733440 */ 64 { .frequency = 318366720, .driver_data = PLLVAL(86, 3, 1), }, /* FVco 636.733440 */
65 { .frequency = 324172800, .index = PLLVAL(126, 5, 1), }, /* FVco 648.345600 */ 65 { .frequency = 324172800, .driver_data = PLLVAL(126, 5, 1), }, /* FVco 648.345600 */
66 { .frequency = 330220800, .index = PLLVAL(109, 4, 1), }, /* FVco 660.441600 */ 66 { .frequency = 330220800, .driver_data = PLLVAL(109, 4, 1), }, /* FVco 660.441600 */
67 { .frequency = 336268800, .index = PLLVAL(131, 5, 1), }, /* FVco 672.537600 */ 67 { .frequency = 336268800, .driver_data = PLLVAL(131, 5, 1), }, /* FVco 672.537600 */
68 { .frequency = 342074880, .index = PLLVAL(93, 3, 1), }, /* FVco 684.149760 */ 68 { .frequency = 342074880, .driver_data = PLLVAL(93, 3, 1), }, /* FVco 684.149760 */
69 { .frequency = 348096000, .index = PLLVAL(177, 7, 1), }, /* FVco 696.192000 */ 69 { .frequency = 348096000, .driver_data = PLLVAL(177, 7, 1), }, /* FVco 696.192000 */
70 { .frequency = 355622400, .index = PLLVAL(118, 4, 1), }, /* FVco 711.244800 */ 70 { .frequency = 355622400, .driver_data = PLLVAL(118, 4, 1), }, /* FVco 711.244800 */
71 { .frequency = 360460800, .index = PLLVAL(141, 5, 1), }, /* FVco 720.921600 */ 71 { .frequency = 360460800, .driver_data = PLLVAL(141, 5, 1), }, /* FVco 720.921600 */
72 { .frequency = 366206400, .index = PLLVAL(165, 6, 1), }, /* FVco 732.412800 */ 72 { .frequency = 366206400, .driver_data = PLLVAL(165, 6, 1), }, /* FVco 732.412800 */
73 { .frequency = 372556800, .index = PLLVAL(124, 4, 1), }, /* FVco 745.113600 */ 73 { .frequency = 372556800, .driver_data = PLLVAL(124, 4, 1), }, /* FVco 745.113600 */
74 { .frequency = 378201600, .index = PLLVAL(126, 4, 1), }, /* FVco 756.403200 */ 74 { .frequency = 378201600, .driver_data = PLLVAL(126, 4, 1), }, /* FVco 756.403200 */
75 { .frequency = 384652800, .index = PLLVAL(151, 5, 1), }, /* FVco 769.305600 */ 75 { .frequency = 384652800, .driver_data = PLLVAL(151, 5, 1), }, /* FVco 769.305600 */
76 { .frequency = 391608000, .index = PLLVAL(177, 6, 1), }, /* FVco 783.216000 */ 76 { .frequency = 391608000, .driver_data = PLLVAL(177, 6, 1), }, /* FVco 783.216000 */
77 { .frequency = 396264960, .index = PLLVAL(109, 3, 1), }, /* FVco 792.529920 */ 77 { .frequency = 396264960, .driver_data = PLLVAL(109, 3, 1), }, /* FVco 792.529920 */
78 { .frequency = 402192000, .index = PLLVAL(87, 2, 1), }, /* FVco 804.384000 */ 78 { .frequency = 402192000, .driver_data = PLLVAL(87, 2, 1), }, /* FVco 804.384000 */
79}; 79};
80 80
81static int s3c2440_plls169344_add(struct device *dev, 81static int s3c2440_plls169344_add(struct device *dev,
diff --git a/arch/arm/mach-s3c24xx/s3c2410.c b/arch/arm/mach-s3c24xx/s3c2410.c
index d850ea5adac2..34676d1d5fec 100644
--- a/arch/arm/mach-s3c24xx/s3c2410.c
+++ b/arch/arm/mach-s3c24xx/s3c2410.c
@@ -22,6 +22,7 @@
22#include <linux/syscore_ops.h> 22#include <linux/syscore_ops.h>
23#include <linux/serial_core.h> 23#include <linux/serial_core.h>
24#include <linux/platform_device.h> 24#include <linux/platform_device.h>
25#include <linux/reboot.h>
25#include <linux/io.h> 26#include <linux/io.h>
26 27
27#include <asm/mach/arch.h> 28#include <asm/mach/arch.h>
@@ -138,6 +139,7 @@ void __init s3c2410_init_clocks(int xtal)
138 s3c2410_baseclk_add(); 139 s3c2410_baseclk_add();
139 s3c24xx_register_clock(&s3c2410_armclk); 140 s3c24xx_register_clock(&s3c2410_armclk);
140 clkdev_add_table(s3c2410_clk_lookup, ARRAY_SIZE(s3c2410_clk_lookup)); 141 clkdev_add_table(s3c2410_clk_lookup, ARRAY_SIZE(s3c2410_clk_lookup));
142 samsung_wdt_reset_init(S3C24XX_VA_WATCHDOG);
141} 143}
142 144
143struct bus_type s3c2410_subsys = { 145struct bus_type s3c2410_subsys = {
@@ -195,13 +197,13 @@ int __init s3c2410a_init(void)
195 return s3c2410_init(); 197 return s3c2410_init();
196} 198}
197 199
198void s3c2410_restart(char mode, const char *cmd) 200void s3c2410_restart(enum reboot_mode mode, const char *cmd)
199{ 201{
200 if (mode == 's') { 202 if (mode == REBOOT_SOFT) {
201 soft_restart(0); 203 soft_restart(0);
202 } 204 }
203 205
204 arch_wdt_reset(); 206 samsung_wdt_reset();
205 207
206 /* we'll take a jump through zero as a poor second */ 208 /* we'll take a jump through zero as a poor second */
207 soft_restart(0); 209 soft_restart(0);
diff --git a/arch/arm/mach-s3c24xx/s3c2412.c b/arch/arm/mach-s3c24xx/s3c2412.c
index 0f864d4c97de..0251650cbf80 100644
--- a/arch/arm/mach-s3c24xx/s3c2412.c
+++ b/arch/arm/mach-s3c24xx/s3c2412.c
@@ -22,6 +22,7 @@
22#include <linux/serial_core.h> 22#include <linux/serial_core.h>
23#include <linux/platform_device.h> 23#include <linux/platform_device.h>
24#include <linux/io.h> 24#include <linux/io.h>
25#include <linux/reboot.h>
25 26
26#include <asm/mach/arch.h> 27#include <asm/mach/arch.h>
27#include <asm/mach/map.h> 28#include <asm/mach/map.h>
@@ -129,9 +130,9 @@ static void s3c2412_idle(void)
129 cpu_do_idle(); 130 cpu_do_idle();
130} 131}
131 132
132void s3c2412_restart(char mode, const char *cmd) 133void s3c2412_restart(enum reboot_mode mode, const char *cmd)
133{ 134{
134 if (mode == 's') 135 if (mode == REBOOT_SOFT)
135 soft_restart(0); 136 soft_restart(0);
136 137
137 /* errata "Watch-dog/Software Reset Problem" specifies that 138 /* errata "Watch-dog/Software Reset Problem" specifies that
diff --git a/arch/arm/mach-s3c24xx/s3c2416.c b/arch/arm/mach-s3c24xx/s3c2416.c
index b9c5d382dafb..9ef3ccfbe196 100644
--- a/arch/arm/mach-s3c24xx/s3c2416.c
+++ b/arch/arm/mach-s3c24xx/s3c2416.c
@@ -35,6 +35,7 @@
35#include <linux/syscore_ops.h> 35#include <linux/syscore_ops.h>
36#include <linux/clk.h> 36#include <linux/clk.h>
37#include <linux/io.h> 37#include <linux/io.h>
38#include <linux/reboot.h>
38 39
39#include <asm/mach/arch.h> 40#include <asm/mach/arch.h>
40#include <asm/mach/map.h> 41#include <asm/mach/map.h>
@@ -79,9 +80,9 @@ static struct device s3c2416_dev = {
79 .bus = &s3c2416_subsys, 80 .bus = &s3c2416_subsys,
80}; 81};
81 82
82void s3c2416_restart(char mode, const char *cmd) 83void s3c2416_restart(enum reboot_mode mode, const char *cmd)
83{ 84{
84 if (mode == 's') 85 if (mode == REBOOT_SOFT)
85 soft_restart(0); 86 soft_restart(0);
86 87
87 __raw_writel(S3C2443_SWRST_RESET, S3C2443_SWRST); 88 __raw_writel(S3C2443_SWRST_RESET, S3C2443_SWRST);
diff --git a/arch/arm/mach-s3c24xx/s3c2443.c b/arch/arm/mach-s3c24xx/s3c2443.c
index 8328cd65bf3d..b6c71918b25c 100644
--- a/arch/arm/mach-s3c24xx/s3c2443.c
+++ b/arch/arm/mach-s3c24xx/s3c2443.c
@@ -22,6 +22,7 @@
22#include <linux/device.h> 22#include <linux/device.h>
23#include <linux/clk.h> 23#include <linux/clk.h>
24#include <linux/io.h> 24#include <linux/io.h>
25#include <linux/reboot.h>
25 26
26#include <asm/mach/arch.h> 27#include <asm/mach/arch.h>
27#include <asm/mach/map.h> 28#include <asm/mach/map.h>
@@ -59,9 +60,9 @@ static struct device s3c2443_dev = {
59 .bus = &s3c2443_subsys, 60 .bus = &s3c2443_subsys,
60}; 61};
61 62
62void s3c2443_restart(char mode, const char *cmd) 63void s3c2443_restart(enum reboot_mode mode, const char *cmd)
63{ 64{
64 if (mode == 's') 65 if (mode == REBOOT_SOFT)
65 soft_restart(0); 66 soft_restart(0);
66 67
67 __raw_writel(S3C2443_SWRST_RESET, S3C2443_SWRST); 68 __raw_writel(S3C2443_SWRST_RESET, S3C2443_SWRST);
diff --git a/arch/arm/mach-s3c24xx/s3c244x.c b/arch/arm/mach-s3c24xx/s3c244x.c
index 2a35edb67354..911b555029fc 100644
--- a/arch/arm/mach-s3c24xx/s3c244x.c
+++ b/arch/arm/mach-s3c24xx/s3c244x.c
@@ -18,6 +18,7 @@
18#include <linux/init.h> 18#include <linux/init.h>
19#include <linux/serial_core.h> 19#include <linux/serial_core.h>
20#include <linux/platform_device.h> 20#include <linux/platform_device.h>
21#include <linux/reboot.h>
21#include <linux/device.h> 22#include <linux/device.h>
22#include <linux/syscore_ops.h> 23#include <linux/syscore_ops.h>
23#include <linux/clk.h> 24#include <linux/clk.h>
@@ -133,6 +134,7 @@ void __init s3c244x_init_clocks(int xtal)
133 s3c24xx_register_baseclocks(xtal); 134 s3c24xx_register_baseclocks(xtal);
134 s3c244x_setup_clocks(); 135 s3c244x_setup_clocks();
135 s3c2410_baseclk_add(); 136 s3c2410_baseclk_add();
137 samsung_wdt_reset_init(S3C24XX_VA_WATCHDOG);
136} 138}
137 139
138/* Since the S3C2442 and S3C2440 share items, put both subsystems here */ 140/* Since the S3C2442 and S3C2440 share items, put both subsystems here */
@@ -197,12 +199,12 @@ struct syscore_ops s3c244x_pm_syscore_ops = {
197 .resume = s3c244x_resume, 199 .resume = s3c244x_resume,
198}; 200};
199 201
200void s3c244x_restart(char mode, const char *cmd) 202void s3c244x_restart(enum reboot_mode mode, const char *cmd)
201{ 203{
202 if (mode == 's') 204 if (mode == REBOOT_SOFT)
203 soft_restart(0); 205 soft_restart(0);
204 206
205 arch_wdt_reset(); 207 samsung_wdt_reset();
206 208
207 /* we'll take a jump through zero as a poor second */ 209 /* we'll take a jump through zero as a poor second */
208 soft_restart(0); 210 soft_restart(0);
diff --git a/arch/arm/mach-s3c64xx/common.c b/arch/arm/mach-s3c64xx/common.c
index 0b9c0ba44834..3f62e467b129 100644
--- a/arch/arm/mach-s3c64xx/common.c
+++ b/arch/arm/mach-s3c64xx/common.c
@@ -21,6 +21,7 @@
21#include <linux/ioport.h> 21#include <linux/ioport.h>
22#include <linux/serial_core.h> 22#include <linux/serial_core.h>
23#include <linux/platform_device.h> 23#include <linux/platform_device.h>
24#include <linux/reboot.h>
24#include <linux/io.h> 25#include <linux/io.h>
25#include <linux/dma-mapping.h> 26#include <linux/dma-mapping.h>
26#include <linux/irq.h> 27#include <linux/irq.h>
@@ -183,6 +184,12 @@ core_initcall(s3c64xx_dev_init);
183 184
184void __init s3c64xx_init_irq(u32 vic0_valid, u32 vic1_valid) 185void __init s3c64xx_init_irq(u32 vic0_valid, u32 vic1_valid)
185{ 186{
187 /*
188 * FIXME: there is no better place to put this at the moment
189 * (samsung_wdt_reset_init needs clocks)
190 */
191 samsung_wdt_reset_init(S3C_VA_WATCHDOG);
192
186 printk(KERN_DEBUG "%s: initialising interrupts\n", __func__); 193 printk(KERN_DEBUG "%s: initialising interrupts\n", __func__);
187 194
188 /* initialise the pair of VICs */ 195 /* initialise the pair of VICs */
@@ -375,10 +382,10 @@ static int __init s3c64xx_init_irq_eint(void)
375} 382}
376arch_initcall(s3c64xx_init_irq_eint); 383arch_initcall(s3c64xx_init_irq_eint);
377 384
378void s3c64xx_restart(char mode, const char *cmd) 385void s3c64xx_restart(enum reboot_mode mode, const char *cmd)
379{ 386{
380 if (mode != 's') 387 if (mode != REBOOT_SOFT)
381 arch_wdt_reset(); 388 samsung_wdt_reset();
382 389
383 /* if all else fails, or mode was for soft, jump to 0 */ 390 /* if all else fails, or mode was for soft, jump to 0 */
384 soft_restart(0); 391 soft_restart(0);
diff --git a/arch/arm/mach-s3c64xx/common.h b/arch/arm/mach-s3c64xx/common.h
index 6cfc99bdfb37..e8f990b37665 100644
--- a/arch/arm/mach-s3c64xx/common.h
+++ b/arch/arm/mach-s3c64xx/common.h
@@ -17,13 +17,15 @@
17#ifndef __ARCH_ARM_MACH_S3C64XX_COMMON_H 17#ifndef __ARCH_ARM_MACH_S3C64XX_COMMON_H
18#define __ARCH_ARM_MACH_S3C64XX_COMMON_H 18#define __ARCH_ARM_MACH_S3C64XX_COMMON_H
19 19
20#include <linux/reboot.h>
21
20void s3c64xx_init_irq(u32 vic0, u32 vic1); 22void s3c64xx_init_irq(u32 vic0, u32 vic1);
21void s3c64xx_init_io(struct map_desc *mach_desc, int size); 23void s3c64xx_init_io(struct map_desc *mach_desc, int size);
22 24
23void s3c64xx_register_clocks(unsigned long xtal, unsigned armclk_limit); 25void s3c64xx_register_clocks(unsigned long xtal, unsigned armclk_limit);
24void s3c64xx_setup_clocks(void); 26void s3c64xx_setup_clocks(void);
25 27
26void s3c64xx_restart(char mode, const char *cmd); 28void s3c64xx_restart(enum reboot_mode mode, const char *cmd);
27void s3c64xx_init_late(void); 29void s3c64xx_init_late(void);
28 30
29#ifdef CONFIG_CPU_S3C6400 31#ifdef CONFIG_CPU_S3C6400
diff --git a/arch/arm/mach-s3c64xx/include/mach/uncompress.h b/arch/arm/mach-s3c64xx/include/mach/uncompress.h
index c6a82a20bf2a..1c956738b42d 100644
--- a/arch/arm/mach-s3c64xx/include/mach/uncompress.h
+++ b/arch/arm/mach-s3c64xx/include/mach/uncompress.h
@@ -23,6 +23,9 @@ static void arch_detect_cpu(void)
23 /* we do not need to do any cpu detection here at the moment. */ 23 /* we do not need to do any cpu detection here at the moment. */
24 fifo_mask = S3C2440_UFSTAT_TXMASK; 24 fifo_mask = S3C2440_UFSTAT_TXMASK;
25 fifo_max = 63 << S3C2440_UFSTAT_TXSHIFT; 25 fifo_max = 63 << S3C2440_UFSTAT_TXSHIFT;
26
27 uart_base = (volatile u8 *)S3C_PA_UART +
28 (S3C_UART_OFFSET * CONFIG_S3C_LOWLEVEL_UART_PORT);
26} 29}
27 30
28#endif /* __ASM_ARCH_UNCOMPRESS_H */ 31#endif /* __ASM_ARCH_UNCOMPRESS_H */
diff --git a/arch/arm/mach-s5p64x0/common.c b/arch/arm/mach-s5p64x0/common.c
index 8ae5800e807f..dfdfdc320ce7 100644
--- a/arch/arm/mach-s5p64x0/common.c
+++ b/arch/arm/mach-s5p64x0/common.c
@@ -24,6 +24,7 @@
24#include <linux/dma-mapping.h> 24#include <linux/dma-mapping.h>
25#include <linux/gpio.h> 25#include <linux/gpio.h>
26#include <linux/irq.h> 26#include <linux/irq.h>
27#include <linux/reboot.h>
27 28
28#include <asm/irq.h> 29#include <asm/irq.h>
29#include <asm/proc-fns.h> 30#include <asm/proc-fns.h>
@@ -173,6 +174,8 @@ void __init s5p64x0_init_io(struct map_desc *mach_desc, int size)
173 s5p_init_cpu(S5P64X0_SYS_ID); 174 s5p_init_cpu(S5P64X0_SYS_ID);
174 175
175 s3c_init_cpu(samsung_cpu_id, cpu_ids, ARRAY_SIZE(cpu_ids)); 176 s3c_init_cpu(samsung_cpu_id, cpu_ids, ARRAY_SIZE(cpu_ids));
177 samsung_wdt_reset_init(S3C_VA_WATCHDOG);
178
176} 179}
177 180
178void __init s5p6440_map_io(void) 181void __init s5p6440_map_io(void)
@@ -437,10 +440,10 @@ static int __init s5p64x0_init_irq_eint(void)
437} 440}
438arch_initcall(s5p64x0_init_irq_eint); 441arch_initcall(s5p64x0_init_irq_eint);
439 442
440void s5p64x0_restart(char mode, const char *cmd) 443void s5p64x0_restart(enum reboot_mode mode, const char *cmd)
441{ 444{
442 if (mode != 's') 445 if (mode != REBOOT_SOFT)
443 arch_wdt_reset(); 446 samsung_wdt_reset();
444 447
445 soft_restart(0); 448 soft_restart(0);
446} 449}
diff --git a/arch/arm/mach-s5p64x0/common.h b/arch/arm/mach-s5p64x0/common.h
index f8a60fdc5884..f3a9b43cba4a 100644
--- a/arch/arm/mach-s5p64x0/common.h
+++ b/arch/arm/mach-s5p64x0/common.h
@@ -12,6 +12,8 @@
12#ifndef __ARCH_ARM_MACH_S5P64X0_COMMON_H 12#ifndef __ARCH_ARM_MACH_S5P64X0_COMMON_H
13#define __ARCH_ARM_MACH_S5P64X0_COMMON_H 13#define __ARCH_ARM_MACH_S5P64X0_COMMON_H
14 14
15#include <linux/reboot.h>
16
15void s5p6440_init_irq(void); 17void s5p6440_init_irq(void);
16void s5p6450_init_irq(void); 18void s5p6450_init_irq(void);
17void s5p64x0_init_io(struct map_desc *mach_desc, int size); 19void s5p64x0_init_io(struct map_desc *mach_desc, int size);
@@ -22,7 +24,7 @@ void s5p6440_setup_clocks(void);
22void s5p6450_register_clocks(void); 24void s5p6450_register_clocks(void);
23void s5p6450_setup_clocks(void); 25void s5p6450_setup_clocks(void);
24 26
25void s5p64x0_restart(char mode, const char *cmd); 27void s5p64x0_restart(enum reboot_mode mode, const char *cmd);
26 28
27#ifdef CONFIG_CPU_S5P6440 29#ifdef CONFIG_CPU_S5P6440
28 30
diff --git a/arch/arm/mach-s5p64x0/include/mach/uncompress.h b/arch/arm/mach-s5p64x0/include/mach/uncompress.h
index 19e0d64d78c5..bbcc3f669ee3 100644
--- a/arch/arm/mach-s5p64x0/include/mach/uncompress.h
+++ b/arch/arm/mach-s5p64x0/include/mach/uncompress.h
@@ -14,171 +14,21 @@
14#define __ASM_ARCH_UNCOMPRESS_H 14#define __ASM_ARCH_UNCOMPRESS_H
15 15
16#include <mach/map.h> 16#include <mach/map.h>
17#include <plat/uncompress.h>
17 18
18/* 19static void arch_detect_cpu(void)
19 * cannot use commonly <plat/uncompress.h>
20 * because uart base of S5P6440 and S5P6450 is different
21 */
22
23typedef unsigned int upf_t; /* cannot include linux/serial_core.h */
24
25/* uart setup */
26
27unsigned int fifo_mask;
28unsigned int fifo_max;
29
30/* forward declerations */
31
32static void arch_detect_cpu(void);
33
34/* defines for UART registers */
35
36#include <plat/regs-serial.h>
37#include <plat/regs-watchdog.h>
38
39/* working in physical space... */
40#undef S3C2410_WDOGREG
41#define S3C2410_WDOGREG(x) ((S3C24XX_PA_WATCHDOG + (x)))
42
43/* how many bytes we allow into the FIFO at a time in FIFO mode */
44#define FIFO_MAX (14)
45
46unsigned long uart_base;
47
48static __inline__ void get_uart_base(void)
49{ 20{
50 unsigned int chipid; 21 unsigned int chipid;
51 22
52 chipid = *(const volatile unsigned int __force *) 0xE0100118; 23 chipid = *(const volatile unsigned int __force *) 0xE0100118;
53 24
54 uart_base = S3C_UART_OFFSET * CONFIG_S3C_LOWLEVEL_UART_PORT;
55
56 if ((chipid & 0xff000) == 0x50000) 25 if ((chipid & 0xff000) == 0x50000)
57 uart_base += 0xEC800000; 26 uart_base = (volatile u8 *)S5P6450_PA_UART(CONFIG_S3C_LOWLEVEL_UART_PORT);
58 else 27 else
59 uart_base += 0xEC000000; 28 uart_base = (volatile u8 *)S5P6440_PA_UART(CONFIG_S3C_LOWLEVEL_UART_PORT);
60}
61
62static __inline__ void uart_wr(unsigned int reg, unsigned int val)
63{
64 volatile unsigned int *ptr;
65
66 get_uart_base();
67 ptr = (volatile unsigned int *)(reg + uart_base);
68 *ptr = val;
69}
70
71static __inline__ unsigned int uart_rd(unsigned int reg)
72{
73 volatile unsigned int *ptr;
74
75 get_uart_base();
76 ptr = (volatile unsigned int *)(reg + uart_base);
77 return *ptr;
78}
79
80/*
81 * we can deal with the case the UARTs are being run
82 * in FIFO mode, so that we don't hold up our execution
83 * waiting for tx to happen...
84 */
85
86static void putc(int ch)
87{
88 if (uart_rd(S3C2410_UFCON) & S3C2410_UFCON_FIFOMODE) {
89 int level;
90
91 while (1) {
92 level = uart_rd(S3C2410_UFSTAT);
93 level &= fifo_mask;
94
95 if (level < fifo_max)
96 break;
97 }
98
99 } else {
100 /* not using fifos */
101
102 while ((uart_rd(S3C2410_UTRSTAT) & S3C2410_UTRSTAT_TXE) != S3C2410_UTRSTAT_TXE)
103 barrier();
104 }
105 29
106 /* write byte to transmission register */ 30 fifo_mask = S3C2440_UFSTAT_TXMASK;
107 uart_wr(S3C2410_UTXH, ch); 31 fifo_max = 63 << S3C2440_UFSTAT_TXSHIFT;
108}
109
110static inline void flush(void)
111{
112}
113
114#define __raw_writel(d, ad) \
115 do { \
116 *((volatile unsigned int __force *)(ad)) = (d); \
117 } while (0)
118
119
120#ifdef CONFIG_S3C_BOOT_ERROR_RESET
121
122static void arch_decomp_error(const char *x)
123{
124 putstr("\n\n");
125 putstr(x);
126 putstr("\n\n -- System resetting\n");
127
128 __raw_writel(0x4000, S3C2410_WTDAT);
129 __raw_writel(0x4000, S3C2410_WTCNT);
130 __raw_writel(S3C2410_WTCON_ENABLE | S3C2410_WTCON_DIV128 | S3C2410_WTCON_RSTEN | S3C2410_WTCON_PRESCALE(0x40), S3C2410_WTCON);
131
132 while(1);
133}
134
135#define arch_error arch_decomp_error
136#endif
137
138#ifdef CONFIG_S3C_BOOT_UART_FORCE_FIFO
139static inline void arch_enable_uart_fifo(void)
140{
141 u32 fifocon = uart_rd(S3C2410_UFCON);
142
143 if (!(fifocon & S3C2410_UFCON_FIFOMODE)) {
144 fifocon |= S3C2410_UFCON_RESETBOTH;
145 uart_wr(S3C2410_UFCON, fifocon);
146
147 /* wait for fifo reset to complete */
148 while (1) {
149 fifocon = uart_rd(S3C2410_UFCON);
150 if (!(fifocon & S3C2410_UFCON_RESETBOTH))
151 break;
152 }
153 }
154}
155#else
156#define arch_enable_uart_fifo() do { } while(0)
157#endif
158
159static void arch_decomp_setup(void)
160{
161 /*
162 * we may need to setup the uart(s) here if we are not running
163 * on an BAST... the BAST will have left the uarts configured
164 * after calling linux.
165 */
166
167 arch_detect_cpu();
168
169 /*
170 * Enable the UART FIFOs if they where not enabled and our
171 * configuration says we should turn them on.
172 */
173
174 arch_enable_uart_fifo();
175}
176
177
178
179static void arch_detect_cpu(void)
180{
181 /* we do not need to do any cpu detection here at the moment. */
182} 32}
183 33
184#endif /* __ASM_ARCH_UNCOMPRESS_H */ 34#endif /* __ASM_ARCH_UNCOMPRESS_H */
diff --git a/arch/arm/mach-s5pc100/common.c b/arch/arm/mach-s5pc100/common.c
index cc6e561c9958..4bdfecf6d024 100644
--- a/arch/arm/mach-s5pc100/common.c
+++ b/arch/arm/mach-s5pc100/common.c
@@ -24,6 +24,7 @@
24#include <linux/serial_core.h> 24#include <linux/serial_core.h>
25#include <linux/platform_device.h> 25#include <linux/platform_device.h>
26#include <linux/sched.h> 26#include <linux/sched.h>
27#include <linux/reboot.h>
27 28
28#include <asm/irq.h> 29#include <asm/irq.h>
29#include <asm/proc-fns.h> 30#include <asm/proc-fns.h>
@@ -178,6 +179,7 @@ void __init s5pc100_init_clocks(int xtal)
178 s5p_register_clocks(xtal); 179 s5p_register_clocks(xtal);
179 s5pc100_register_clocks(); 180 s5pc100_register_clocks();
180 s5pc100_setup_clocks(); 181 s5pc100_setup_clocks();
182 samsung_wdt_reset_init(S3C_VA_WATCHDOG);
181} 183}
182 184
183void __init s5pc100_init_irq(void) 185void __init s5pc100_init_irq(void)
@@ -216,10 +218,10 @@ void __init s5pc100_init_uarts(struct s3c2410_uartcfg *cfg, int no)
216 s3c24xx_init_uartdevs("s3c6400-uart", s5p_uart_resources, cfg, no); 218 s3c24xx_init_uartdevs("s3c6400-uart", s5p_uart_resources, cfg, no);
217} 219}
218 220
219void s5pc100_restart(char mode, const char *cmd) 221void s5pc100_restart(enum reboot_mode mode, const char *cmd)
220{ 222{
221 if (mode != 's') 223 if (mode != REBOOT_SOFT)
222 arch_wdt_reset(); 224 samsung_wdt_reset();
223 225
224 soft_restart(0); 226 soft_restart(0);
225} 227}
diff --git a/arch/arm/mach-s5pc100/common.h b/arch/arm/mach-s5pc100/common.h
index c41f912e9e1f..08d782d65d7b 100644
--- a/arch/arm/mach-s5pc100/common.h
+++ b/arch/arm/mach-s5pc100/common.h
@@ -12,13 +12,15 @@
12#ifndef __ARCH_ARM_MACH_S5PC100_COMMON_H 12#ifndef __ARCH_ARM_MACH_S5PC100_COMMON_H
13#define __ARCH_ARM_MACH_S5PC100_COMMON_H 13#define __ARCH_ARM_MACH_S5PC100_COMMON_H
14 14
15#include <linux/reboot.h>
16
15void s5pc100_init_io(struct map_desc *mach_desc, int size); 17void s5pc100_init_io(struct map_desc *mach_desc, int size);
16void s5pc100_init_irq(void); 18void s5pc100_init_irq(void);
17 19
18void s5pc100_register_clocks(void); 20void s5pc100_register_clocks(void);
19void s5pc100_setup_clocks(void); 21void s5pc100_setup_clocks(void);
20 22
21void s5pc100_restart(char mode, const char *cmd); 23void s5pc100_restart(enum reboot_mode mode, const char *cmd);
22 24
23extern int s5pc100_init(void); 25extern int s5pc100_init(void);
24extern void s5pc100_map_io(void); 26extern void s5pc100_map_io(void);
diff --git a/arch/arm/mach-s5pc100/include/mach/uncompress.h b/arch/arm/mach-s5pc100/include/mach/uncompress.h
index 01ccf535e76c..720e1339425c 100644
--- a/arch/arm/mach-s5pc100/include/mach/uncompress.h
+++ b/arch/arm/mach-s5pc100/include/mach/uncompress.h
@@ -23,6 +23,8 @@ static void arch_detect_cpu(void)
23 /* we do not need to do any cpu detection here at the moment. */ 23 /* we do not need to do any cpu detection here at the moment. */
24 fifo_mask = S3C2440_UFSTAT_TXMASK; 24 fifo_mask = S3C2440_UFSTAT_TXMASK;
25 fifo_max = 63 << S3C2440_UFSTAT_TXSHIFT; 25 fifo_max = 63 << S3C2440_UFSTAT_TXSHIFT;
26
27 uart_base = (volatile u8 *)S5P_PA_UART(CONFIG_S3C_LOWLEVEL_UART_PORT);
26} 28}
27 29
28#endif /* __ASM_ARCH_UNCOMPRESS_H */ 30#endif /* __ASM_ARCH_UNCOMPRESS_H */
diff --git a/arch/arm/mach-s5pv210/common.c b/arch/arm/mach-s5pv210/common.c
index 9dfe93e2624d..023f1a796a9c 100644
--- a/arch/arm/mach-s5pv210/common.c
+++ b/arch/arm/mach-s5pv210/common.c
@@ -143,7 +143,7 @@ static struct map_desc s5pv210_iodesc[] __initdata = {
143 } 143 }
144}; 144};
145 145
146void s5pv210_restart(char mode, const char *cmd) 146void s5pv210_restart(enum reboot_mode mode, const char *cmd)
147{ 147{
148 __raw_writel(0x1, S5P_SWRESET); 148 __raw_writel(0x1, S5P_SWRESET);
149} 149}
diff --git a/arch/arm/mach-s5pv210/common.h b/arch/arm/mach-s5pv210/common.h
index 0a1cc0aef720..fe1beb54e548 100644
--- a/arch/arm/mach-s5pv210/common.h
+++ b/arch/arm/mach-s5pv210/common.h
@@ -12,13 +12,15 @@
12#ifndef __ARCH_ARM_MACH_S5PV210_COMMON_H 12#ifndef __ARCH_ARM_MACH_S5PV210_COMMON_H
13#define __ARCH_ARM_MACH_S5PV210_COMMON_H 13#define __ARCH_ARM_MACH_S5PV210_COMMON_H
14 14
15#include <linux/reboot.h>
16
15void s5pv210_init_io(struct map_desc *mach_desc, int size); 17void s5pv210_init_io(struct map_desc *mach_desc, int size);
16void s5pv210_init_irq(void); 18void s5pv210_init_irq(void);
17 19
18void s5pv210_register_clocks(void); 20void s5pv210_register_clocks(void);
19void s5pv210_setup_clocks(void); 21void s5pv210_setup_clocks(void);
20 22
21void s5pv210_restart(char mode, const char *cmd); 23void s5pv210_restart(enum reboot_mode mode, const char *cmd);
22 24
23extern int s5pv210_init(void); 25extern int s5pv210_init(void);
24extern void s5pv210_map_io(void); 26extern void s5pv210_map_io(void);
diff --git a/arch/arm/mach-s5pv210/include/mach/uncompress.h b/arch/arm/mach-s5pv210/include/mach/uncompress.h
index ef977ea8546d..231cb07de058 100644
--- a/arch/arm/mach-s5pv210/include/mach/uncompress.h
+++ b/arch/arm/mach-s5pv210/include/mach/uncompress.h
@@ -21,6 +21,8 @@ static void arch_detect_cpu(void)
21 /* we do not need to do any cpu detection here at the moment. */ 21 /* we do not need to do any cpu detection here at the moment. */
22 fifo_mask = S5PV210_UFSTAT_TXMASK; 22 fifo_mask = S5PV210_UFSTAT_TXMASK;
23 fifo_max = 63 << S5PV210_UFSTAT_TXSHIFT; 23 fifo_max = 63 << S5PV210_UFSTAT_TXSHIFT;
24
25 uart_base = (volatile u8 *)S5P_PA_UART(CONFIG_S3C_LOWLEVEL_UART_PORT);
24} 26}
25 27
26#endif /* __ASM_ARCH_UNCOMPRESS_H */ 28#endif /* __ASM_ARCH_UNCOMPRESS_H */
diff --git a/arch/arm/mach-s5pv210/mach-aquila.c b/arch/arm/mach-s5pv210/mach-aquila.c
index ed2b85485b9d..ad40ab0f5dbd 100644
--- a/arch/arm/mach-s5pv210/mach-aquila.c
+++ b/arch/arm/mach-s5pv210/mach-aquila.c
@@ -377,12 +377,8 @@ static struct max8998_platform_data aquila_max8998_pdata = {
377 .buck1_set1 = S5PV210_GPH0(3), 377 .buck1_set1 = S5PV210_GPH0(3),
378 .buck1_set2 = S5PV210_GPH0(4), 378 .buck1_set2 = S5PV210_GPH0(4),
379 .buck2_set3 = S5PV210_GPH0(5), 379 .buck2_set3 = S5PV210_GPH0(5),
380 .buck1_voltage1 = 1200000, 380 .buck1_voltage = { 1200000, 1200000, 1200000, 1200000 },
381 .buck1_voltage2 = 1200000, 381 .buck2_voltage = { 1200000, 1200000 },
382 .buck1_voltage3 = 1200000,
383 .buck1_voltage4 = 1200000,
384 .buck2_voltage1 = 1200000,
385 .buck2_voltage2 = 1200000,
386}; 382};
387#endif 383#endif
388 384
diff --git a/arch/arm/mach-s5pv210/mach-goni.c b/arch/arm/mach-s5pv210/mach-goni.c
index 30b24ad84f49..e5cd9fbf19e9 100644
--- a/arch/arm/mach-s5pv210/mach-goni.c
+++ b/arch/arm/mach-s5pv210/mach-goni.c
@@ -580,12 +580,8 @@ static struct max8998_platform_data goni_max8998_pdata = {
580 .buck1_set1 = S5PV210_GPH0(3), 580 .buck1_set1 = S5PV210_GPH0(3),
581 .buck1_set2 = S5PV210_GPH0(4), 581 .buck1_set2 = S5PV210_GPH0(4),
582 .buck2_set3 = S5PV210_GPH0(5), 582 .buck2_set3 = S5PV210_GPH0(5),
583 .buck1_voltage1 = 1200000, 583 .buck1_voltage = { 1200000, 1200000, 1200000, 1200000 },
584 .buck1_voltage2 = 1200000, 584 .buck2_voltage = { 1200000, 1200000 },
585 .buck1_voltage3 = 1200000,
586 .buck1_voltage4 = 1200000,
587 .buck2_voltage1 = 1200000,
588 .buck2_voltage2 = 1200000,
589}; 585};
590#endif 586#endif
591 587
diff --git a/arch/arm/mach-sa1100/generic.c b/arch/arm/mach-sa1100/generic.c
index 9db3e98e8b85..f25b6119e028 100644
--- a/arch/arm/mach-sa1100/generic.c
+++ b/arch/arm/mach-sa1100/generic.c
@@ -19,6 +19,7 @@
19#include <linux/cpufreq.h> 19#include <linux/cpufreq.h>
20#include <linux/ioport.h> 20#include <linux/ioport.h>
21#include <linux/platform_device.h> 21#include <linux/platform_device.h>
22#include <linux/reboot.h>
22 23
23#include <video/sa1100fb.h> 24#include <video/sa1100fb.h>
24 25
@@ -131,9 +132,9 @@ static void sa1100_power_off(void)
131 PMCR = PMCR_SF; 132 PMCR = PMCR_SF;
132} 133}
133 134
134void sa11x0_restart(char mode, const char *cmd) 135void sa11x0_restart(enum reboot_mode mode, const char *cmd)
135{ 136{
136 if (mode == 's') { 137 if (mode == REBOOT_SOFT) {
137 /* Jump into ROM at address 0 */ 138 /* Jump into ROM at address 0 */
138 soft_restart(0); 139 soft_restart(0);
139 } else { 140 } else {
diff --git a/arch/arm/mach-sa1100/generic.h b/arch/arm/mach-sa1100/generic.h
index 2abc6a1f6e86..9a33695c9492 100644
--- a/arch/arm/mach-sa1100/generic.h
+++ b/arch/arm/mach-sa1100/generic.h
@@ -3,12 +3,13 @@
3 * 3 *
4 * Author: Nicolas Pitre 4 * Author: Nicolas Pitre
5 */ 5 */
6#include <linux/reboot.h>
6 7
7extern void sa1100_timer_init(void); 8extern void sa1100_timer_init(void);
8extern void __init sa1100_map_io(void); 9extern void __init sa1100_map_io(void);
9extern void __init sa1100_init_irq(void); 10extern void __init sa1100_init_irq(void);
10extern void __init sa1100_init_gpio(void); 11extern void __init sa1100_init_gpio(void);
11extern void sa11x0_restart(char, const char *); 12extern void sa11x0_restart(enum reboot_mode, const char *);
12extern void sa11x0_init_late(void); 13extern void sa11x0_init_late(void);
13 14
14#define SET_BANK(__nr,__start,__size) \ 15#define SET_BANK(__nr,__start,__size) \
diff --git a/arch/arm/mach-sa1100/time.c b/arch/arm/mach-sa1100/time.c
index a59a13a665a6..713c86cd3d64 100644
--- a/arch/arm/mach-sa1100/time.c
+++ b/arch/arm/mach-sa1100/time.c
@@ -14,9 +14,9 @@
14#include <linux/irq.h> 14#include <linux/irq.h>
15#include <linux/timex.h> 15#include <linux/timex.h>
16#include <linux/clockchips.h> 16#include <linux/clockchips.h>
17#include <linux/sched_clock.h>
17 18
18#include <asm/mach/time.h> 19#include <asm/mach/time.h>
19#include <asm/sched_clock.h>
20#include <mach/hardware.h> 20#include <mach/hardware.h>
21#include <mach/irqs.h> 21#include <mach/irqs.h>
22 22
diff --git a/arch/arm/mach-shark/core.c b/arch/arm/mach-shark/core.c
index 153555724988..1d32c5e8eab6 100644
--- a/arch/arm/mach-shark/core.c
+++ b/arch/arm/mach-shark/core.c
@@ -11,6 +11,7 @@
11#include <linux/serial_8250.h> 11#include <linux/serial_8250.h>
12#include <linux/io.h> 12#include <linux/io.h>
13#include <linux/cpu.h> 13#include <linux/cpu.h>
14#include <linux/reboot.h>
14 15
15#include <asm/setup.h> 16#include <asm/setup.h>
16#include <asm/mach-types.h> 17#include <asm/mach-types.h>
@@ -24,7 +25,7 @@
24#define ROMCARD_SIZE 0x08000000 25#define ROMCARD_SIZE 0x08000000
25#define ROMCARD_START 0x10000000 26#define ROMCARD_START 0x10000000
26 27
27static void shark_restart(char mode, const char *cmd) 28static void shark_restart(enum reboot_mode mode, const char *cmd)
28{ 29{
29 short temp; 30 short temp;
30 /* Reset the Machine via pc[3] of the sequoia chipset */ 31 /* Reset the Machine via pc[3] of the sequoia chipset */
diff --git a/arch/arm/mach-shmobile/Kconfig b/arch/arm/mach-shmobile/Kconfig
index 1a517e2fe449..3912ce91fee4 100644
--- a/arch/arm/mach-shmobile/Kconfig
+++ b/arch/arm/mach-shmobile/Kconfig
@@ -23,7 +23,7 @@ config ARCH_R8A73A4
23 select ARCH_WANT_OPTIONAL_GPIOLIB 23 select ARCH_WANT_OPTIONAL_GPIOLIB
24 select ARM_GIC 24 select ARM_GIC
25 select CPU_V7 25 select CPU_V7
26 select ARM_ARCH_TIMER 26 select HAVE_ARM_ARCH_TIMER
27 select SH_CLK_CPG 27 select SH_CLK_CPG
28 select RENESAS_IRQC 28 select RENESAS_IRQC
29 29
@@ -36,10 +36,13 @@ config ARCH_R8A7740
36 select RENESAS_INTC_IRQPIN 36 select RENESAS_INTC_IRQPIN
37 37
38config ARCH_R8A7778 38config ARCH_R8A7778
39 bool "R-Car M1 (R8A77780)" 39 bool "R-Car M1A (R8A77781)"
40 select ARCH_WANT_OPTIONAL_GPIOLIB
40 select CPU_V7 41 select CPU_V7
41 select SH_CLK_CPG 42 select SH_CLK_CPG
42 select ARM_GIC 43 select ARM_GIC
44 select USB_ARCH_HAS_EHCI
45 select USB_ARCH_HAS_OHCI
43 46
44config ARCH_R8A7779 47config ARCH_R8A7779
45 bool "R-Car H1 (R8A77790)" 48 bool "R-Car H1 (R8A77790)"
@@ -56,7 +59,7 @@ config ARCH_R8A7790
56 select ARCH_WANT_OPTIONAL_GPIOLIB 59 select ARCH_WANT_OPTIONAL_GPIOLIB
57 select ARM_GIC 60 select ARM_GIC
58 select CPU_V7 61 select CPU_V7
59 select ARM_ARCH_TIMER 62 select HAVE_ARM_ARCH_TIMER
60 select SH_CLK_CPG 63 select SH_CLK_CPG
61 select RENESAS_IRQC 64 select RENESAS_IRQC
62 65
@@ -68,27 +71,6 @@ config ARCH_EMEV2
68 71
69comment "SH-Mobile Board Type" 72comment "SH-Mobile Board Type"
70 73
71config MACH_AP4EVB
72 bool "AP4EVB board"
73 depends on ARCH_SH7372
74 select ARCH_REQUIRE_GPIOLIB
75 select REGULATOR_FIXED_VOLTAGE if REGULATOR
76 select SH_LCD_MIPI_DSI
77 select SND_SOC_AK4642 if SND_SIMPLE_CARD
78
79choice
80 prompt "AP4EVB LCD panel selection"
81 default AP4EVB_QHD
82 depends on MACH_AP4EVB
83
84config AP4EVB_QHD
85 bool "MIPI-DSI QHD (960x540)"
86
87config AP4EVB_WVGA
88 bool "Parallel WVGA (800x480)"
89
90endchoice
91
92config MACH_AG5EVM 74config MACH_AG5EVM
93 bool "AG5EVM board" 75 bool "AG5EVM board"
94 depends on ARCH_SH73A0 76 depends on ARCH_SH73A0
@@ -115,19 +97,27 @@ config MACH_KOTA2
115 select ARCH_REQUIRE_GPIOLIB 97 select ARCH_REQUIRE_GPIOLIB
116 select REGULATOR_FIXED_VOLTAGE if REGULATOR 98 select REGULATOR_FIXED_VOLTAGE if REGULATOR
117 99
118config MACH_BONITO 100config MACH_ARMADILLO800EVA
119 bool "bonito board" 101 bool "Armadillo-800 EVA board"
120 depends on ARCH_R8A7740 102 depends on ARCH_R8A7740
121 select ARCH_REQUIRE_GPIOLIB 103 select ARCH_REQUIRE_GPIOLIB
122 select REGULATOR_FIXED_VOLTAGE if REGULATOR 104 select REGULATOR_FIXED_VOLTAGE if REGULATOR
105 select SND_SOC_WM8978 if SND_SIMPLE_CARD
106 select USE_OF
123 107
124config MACH_ARMADILLO800EVA 108config MACH_ARMADILLO800EVA_REFERENCE
125 bool "Armadillo-800 EVA board" 109 bool "Armadillo-800 EVA board - Reference Device Tree Implementation"
126 depends on ARCH_R8A7740 110 depends on ARCH_R8A7740
127 select ARCH_REQUIRE_GPIOLIB 111 select ARCH_REQUIRE_GPIOLIB
128 select REGULATOR_FIXED_VOLTAGE if REGULATOR 112 select REGULATOR_FIXED_VOLTAGE if REGULATOR
129 select SND_SOC_WM8978 if SND_SIMPLE_CARD 113 select SND_SOC_WM8978 if SND_SIMPLE_CARD
130 select USE_OF 114 select USE_OF
115 ---help---
116 Use reference implementation of Aramdillo800 EVA board support
117 which makes a greater use of device tree at the expense
118 of not supporting a number of devices.
119
120 This is intended to aid developers
131 121
132config MACH_BOCKW 122config MACH_BOCKW
133 bool "BOCK-W platform" 123 bool "BOCK-W platform"
@@ -169,6 +159,8 @@ config MACH_KZM9D
169config MACH_KZM9G 159config MACH_KZM9G
170 bool "KZM-A9-GT board" 160 bool "KZM-A9-GT board"
171 depends on ARCH_SH73A0 161 depends on ARCH_SH73A0
162 select ARCH_HAS_CPUFREQ
163 select ARCH_HAS_OPP
172 select ARCH_REQUIRE_GPIOLIB 164 select ARCH_REQUIRE_GPIOLIB
173 select REGULATOR_FIXED_VOLTAGE if REGULATOR 165 select REGULATOR_FIXED_VOLTAGE if REGULATOR
174 select SND_SOC_AK4642 if SND_SIMPLE_CARD 166 select SND_SOC_AK4642 if SND_SIMPLE_CARD
@@ -194,37 +186,6 @@ config CPU_HAS_INTEVT
194 bool 186 bool
195 default y 187 default y
196 188
197menu "Memory configuration"
198
199config MEMORY_START
200 hex "Physical memory start address"
201 default "0x40000000" if MACH_AP4EVB || MACH_AG5EVM || \
202 MACH_MACKEREL || MACH_BONITO || \
203 MACH_ARMADILLO800EVA || MACH_APE6EVM || \
204 MACH_LAGER
205 default "0x41000000" if MACH_KOTA2
206 default "0x00000000"
207 ---help---
208 Tweak this only when porting to a new machine which does not
209 already have a defconfig. Changing it from the known correct
210 value on any of the known systems will only lead to disaster.
211
212config MEMORY_SIZE
213 hex "Physical memory size"
214 default "0x80000000" if MACH_LAGER
215 default "0x40000000" if MACH_APE6EVM
216 default "0x20000000" if MACH_AG5EVM || MACH_BONITO || \
217 MACH_ARMADILLO800EVA
218 default "0x1e000000" if MACH_KOTA2
219 default "0x10000000" if MACH_AP4EVB || MACH_MACKEREL
220 default "0x04000000"
221 help
222 This sets the default memory size assumed by your kernel. It can
223 be overridden as normal by the 'mem=' argument on the kernel command
224 line.
225
226endmenu
227
228menu "Timer and clock configuration" 189menu "Timer and clock configuration"
229 190
230config SHMOBILE_TIMER_HZ 191config SHMOBILE_TIMER_HZ
diff --git a/arch/arm/mach-shmobile/Makefile b/arch/arm/mach-shmobile/Makefile
index 068f1dadc46b..6165a517f580 100644
--- a/arch/arm/mach-shmobile/Makefile
+++ b/arch/arm/mach-shmobile/Makefile
@@ -35,17 +35,16 @@ obj-$(CONFIG_ARCH_R8A7779) += pm-r8a7779.o
35obj-$(CONFIG_ARCH_SH73A0) += pm-sh73a0.o 35obj-$(CONFIG_ARCH_SH73A0) += pm-sh73a0.o
36 36
37# Board objects 37# Board objects
38obj-$(CONFIG_MACH_AP4EVB) += board-ap4evb.o
39obj-$(CONFIG_MACH_AG5EVM) += board-ag5evm.o 38obj-$(CONFIG_MACH_AG5EVM) += board-ag5evm.o
40obj-$(CONFIG_MACH_APE6EVM) += board-ape6evm.o 39obj-$(CONFIG_MACH_APE6EVM) += board-ape6evm.o
41obj-$(CONFIG_MACH_MACKEREL) += board-mackerel.o 40obj-$(CONFIG_MACH_MACKEREL) += board-mackerel.o
42obj-$(CONFIG_MACH_KOTA2) += board-kota2.o 41obj-$(CONFIG_MACH_KOTA2) += board-kota2.o
43obj-$(CONFIG_MACH_BONITO) += board-bonito.o
44obj-$(CONFIG_MACH_BOCKW) += board-bockw.o 42obj-$(CONFIG_MACH_BOCKW) += board-bockw.o
45obj-$(CONFIG_MACH_MARZEN) += board-marzen.o 43obj-$(CONFIG_MACH_MARZEN) += board-marzen.o
46obj-$(CONFIG_MACH_MARZEN_REFERENCE) += board-marzen-reference.o 44obj-$(CONFIG_MACH_MARZEN_REFERENCE) += board-marzen-reference.o
47obj-$(CONFIG_MACH_LAGER) += board-lager.o 45obj-$(CONFIG_MACH_LAGER) += board-lager.o
48obj-$(CONFIG_MACH_ARMADILLO800EVA) += board-armadillo800eva.o 46obj-$(CONFIG_MACH_ARMADILLO800EVA) += board-armadillo800eva.o
47obj-$(CONFIG_MACH_ARMADILLO800EVA_REFERENCE) += board-armadillo800eva-reference.o
49obj-$(CONFIG_MACH_KZM9D) += board-kzm9d.o 48obj-$(CONFIG_MACH_KZM9D) += board-kzm9d.o
50obj-$(CONFIG_MACH_KZM9G) += board-kzm9g.o 49obj-$(CONFIG_MACH_KZM9G) += board-kzm9g.o
51obj-$(CONFIG_MACH_KZM9G_REFERENCE) += board-kzm9g-reference.o 50obj-$(CONFIG_MACH_KZM9G_REFERENCE) += board-kzm9g-reference.o
diff --git a/arch/arm/mach-shmobile/Makefile.boot b/arch/arm/mach-shmobile/Makefile.boot
index 498efd99338d..84c6868580f0 100644
--- a/arch/arm/mach-shmobile/Makefile.boot
+++ b/arch/arm/mach-shmobile/Makefile.boot
@@ -1,6 +1,20 @@
1__ZRELADDR := $(shell /bin/bash -c 'printf "0x%08x" \ 1# per-board load address for uImage
2 $$[$(CONFIG_MEMORY_START) + 0x8000]') 2loadaddr-y :=
3loadaddr-$(CONFIG_MACH_AG5EVM) += 0x40008000
4loadaddr-$(CONFIG_MACH_APE6EVM) += 0x40008000
5loadaddr-$(CONFIG_MACH_ARMADILLO800EVA) += 0x40008000
6loadaddr-$(CONFIG_MACH_ARMADILLO800EVA_REFERENCE) += 0x40008000
7loadaddr-$(CONFIG_MACH_BOCKW) += 0x60008000
8loadaddr-$(CONFIG_MACH_KOTA2) += 0x41008000
9loadaddr-$(CONFIG_MACH_KZM9D) += 0x40008000
10loadaddr-$(CONFIG_MACH_KZM9G) += 0x41008000
11loadaddr-$(CONFIG_MACH_KZM9G_REFERENCE) += 0x41008000
12loadaddr-$(CONFIG_MACH_LAGER) += 0x40008000
13loadaddr-$(CONFIG_MACH_MACKEREL) += 0x40008000
14loadaddr-$(CONFIG_MACH_MARZEN) += 0x60008000
15loadaddr-$(CONFIG_MACH_MARZEN_REFERENCE) += 0x60008000
3 16
17__ZRELADDR := $(sort $(loadaddr-y))
4 zreladdr-y += $(__ZRELADDR) 18 zreladdr-y += $(__ZRELADDR)
5 19
6# Unsupported legacy stuff 20# Unsupported legacy stuff
diff --git a/arch/arm/mach-shmobile/board-ap4evb.c b/arch/arm/mach-shmobile/board-ap4evb.c
deleted file mode 100644
index 45f78cadec1d..000000000000
--- a/arch/arm/mach-shmobile/board-ap4evb.c
+++ /dev/null
@@ -1,1332 +0,0 @@
1/*
2 * AP4EVB board support
3 *
4 * Copyright (C) 2010 Magnus Damm
5 * Copyright (C) 2008 Yoshihiro Shimoda
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; version 2 of the License.
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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19 */
20#include <linux/clk.h>
21#include <linux/kernel.h>
22#include <linux/init.h>
23#include <linux/interrupt.h>
24#include <linux/irq.h>
25#include <linux/platform_device.h>
26#include <linux/delay.h>
27#include <linux/mfd/tmio.h>
28#include <linux/mmc/host.h>
29#include <linux/mmc/sh_mobile_sdhi.h>
30#include <linux/mtd/mtd.h>
31#include <linux/mtd/partitions.h>
32#include <linux/mtd/physmap.h>
33#include <linux/mmc/sh_mmcif.h>
34#include <linux/i2c.h>
35#include <linux/i2c/tsc2007.h>
36#include <linux/io.h>
37#include <linux/pinctrl/machine.h>
38#include <linux/regulator/fixed.h>
39#include <linux/regulator/machine.h>
40#include <linux/smsc911x.h>
41#include <linux/sh_intc.h>
42#include <linux/sh_clk.h>
43#include <linux/gpio.h>
44#include <linux/input.h>
45#include <linux/leds.h>
46#include <linux/input/sh_keysc.h>
47#include <linux/usb/r8a66597.h>
48#include <linux/pm_clock.h>
49#include <linux/dma-mapping.h>
50
51#include <media/sh_mobile_ceu.h>
52#include <media/sh_mobile_csi2.h>
53#include <media/soc_camera.h>
54
55#include <sound/sh_fsi.h>
56#include <sound/simple_card.h>
57
58#include <video/sh_mobile_hdmi.h>
59#include <video/sh_mobile_lcdc.h>
60#include <video/sh_mipi_dsi.h>
61
62#include <mach/common.h>
63#include <mach/irqs.h>
64#include <mach/sh7372.h>
65
66#include <asm/mach-types.h>
67#include <asm/mach/arch.h>
68#include <asm/setup.h>
69
70#include "sh-gpio.h"
71
72/*
73 * Address Interface BusWidth note
74 * ------------------------------------------------------------------
75 * 0x0000_0000 NOR Flash ROM (MCP) 16bit SW7 : bit1 = ON
76 * 0x0800_0000 user area -
77 * 0x1000_0000 NOR Flash ROM (MCP) 16bit SW7 : bit1 = OFF
78 * 0x1400_0000 Ether (LAN9220) 16bit
79 * 0x1600_0000 user area - cannot use with NAND
80 * 0x1800_0000 user area -
81 * 0x1A00_0000 -
82 * 0x4000_0000 LPDDR2-SDRAM (POP) 32bit
83 */
84
85/*
86 * NOR Flash ROM
87 *
88 * SW1 | SW2 | SW7 | NOR Flash ROM
89 * bit1 | bit1 bit2 | bit1 | Memory allocation
90 * ------+------------+------+------------------
91 * OFF | ON OFF | ON | Area 0
92 * OFF | ON OFF | OFF | Area 4
93 */
94
95/*
96 * NAND Flash ROM
97 *
98 * SW1 | SW2 | SW7 | NAND Flash ROM
99 * bit1 | bit1 bit2 | bit2 | Memory allocation
100 * ------+------------+------+------------------
101 * OFF | ON OFF | ON | FCE 0
102 * OFF | ON OFF | OFF | FCE 1
103 */
104
105/*
106 * SMSC 9220
107 *
108 * SW1 SMSC 9220
109 * -----------------------
110 * ON access disable
111 * OFF access enable
112 */
113
114/*
115 * LCD / IRQ / KEYSC / IrDA
116 *
117 * IRQ = IRQ26 (TS), IRQ27 (VIO), IRQ28 (QHD-TouchScreen)
118 * LCD = 2nd LCDC (WVGA)
119 *
120 * | SW43 |
121 * SW3 | ON | OFF |
122 * -------------+-----------------------+---------------+
123 * ON | KEY / IrDA | LCD |
124 * OFF | KEY / IrDA / IRQ | IRQ |
125 *
126 *
127 * QHD / WVGA display
128 *
129 * You can choice display type on menuconfig.
130 * Then, check above dip-switch.
131 */
132
133/*
134 * USB
135 *
136 * J7 : 1-2 MAX3355E VBUS
137 * 2-3 DC 5.0V
138 *
139 * S39: bit2: off
140 */
141
142/*
143 * FSI/FSMI
144 *
145 * SW41 : ON : SH-Mobile AP4 Audio Mode
146 * : OFF : Bluetooth Audio Mode
147 *
148 * it needs amixer settings for playing
149 *
150 * amixer set "Headphone Enable" on
151 */
152
153/*
154 * MMC0/SDHI1 (CN7)
155 *
156 * J22 : select card voltage
157 * 1-2 pin : 1.8v
158 * 2-3 pin : 3.3v
159 *
160 * SW1 | SW33
161 * | bit1 | bit2 | bit3 | bit4
162 * ------------+------+------+------+-------
163 * MMC0 OFF | OFF | ON | ON | X
164 * SDHI1 OFF | ON | X | OFF | ON
165 *
166 * voltage lebel
167 * CN7 : 1.8v
168 * CN12: 3.3v
169 */
170
171/* Dummy supplies, where voltage doesn't matter */
172static struct regulator_consumer_supply fixed1v8_power_consumers[] =
173{
174 /* J22 default position: 1.8V */
175 REGULATOR_SUPPLY("vmmc", "sh_mobile_sdhi.1"),
176 REGULATOR_SUPPLY("vqmmc", "sh_mobile_sdhi.1"),
177 REGULATOR_SUPPLY("vmmc", "sh_mmcif.0"),
178 REGULATOR_SUPPLY("vqmmc", "sh_mmcif.0"),
179};
180
181static struct regulator_consumer_supply fixed3v3_power_consumers[] =
182{
183 REGULATOR_SUPPLY("vmmc", "sh_mobile_sdhi.0"),
184 REGULATOR_SUPPLY("vqmmc", "sh_mobile_sdhi.0"),
185};
186
187static struct regulator_consumer_supply dummy_supplies[] = {
188 REGULATOR_SUPPLY("vddvario", "smsc911x"),
189 REGULATOR_SUPPLY("vdd33a", "smsc911x"),
190};
191
192/* MTD */
193static struct mtd_partition nor_flash_partitions[] = {
194 {
195 .name = "loader",
196 .offset = 0x00000000,
197 .size = 512 * 1024,
198 .mask_flags = MTD_WRITEABLE,
199 },
200 {
201 .name = "bootenv",
202 .offset = MTDPART_OFS_APPEND,
203 .size = 512 * 1024,
204 .mask_flags = MTD_WRITEABLE,
205 },
206 {
207 .name = "kernel_ro",
208 .offset = MTDPART_OFS_APPEND,
209 .size = 8 * 1024 * 1024,
210 .mask_flags = MTD_WRITEABLE,
211 },
212 {
213 .name = "kernel",
214 .offset = MTDPART_OFS_APPEND,
215 .size = 8 * 1024 * 1024,
216 },
217 {
218 .name = "data",
219 .offset = MTDPART_OFS_APPEND,
220 .size = MTDPART_SIZ_FULL,
221 },
222};
223
224static struct physmap_flash_data nor_flash_data = {
225 .width = 2,
226 .parts = nor_flash_partitions,
227 .nr_parts = ARRAY_SIZE(nor_flash_partitions),
228};
229
230static struct resource nor_flash_resources[] = {
231 [0] = {
232 .start = 0x20000000, /* CS0 shadow instead of regular CS0 */
233 .end = 0x28000000 - 1, /* needed by USB MASK ROM boot */
234 .flags = IORESOURCE_MEM,
235 }
236};
237
238static struct platform_device nor_flash_device = {
239 .name = "physmap-flash",
240 .dev = {
241 .platform_data = &nor_flash_data,
242 },
243 .num_resources = ARRAY_SIZE(nor_flash_resources),
244 .resource = nor_flash_resources,
245};
246
247/* SMSC 9220 */
248static struct resource smc911x_resources[] = {
249 {
250 .start = 0x14000000,
251 .end = 0x16000000 - 1,
252 .flags = IORESOURCE_MEM,
253 }, {
254 .start = evt2irq(0x02c0) /* IRQ6A */,
255 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL,
256 },
257};
258
259static struct smsc911x_platform_config smsc911x_info = {
260 .flags = SMSC911X_USE_16BIT | SMSC911X_SAVE_MAC_ADDRESS,
261 .irq_polarity = SMSC911X_IRQ_POLARITY_ACTIVE_LOW,
262 .irq_type = SMSC911X_IRQ_TYPE_PUSH_PULL,
263};
264
265static struct platform_device smc911x_device = {
266 .name = "smsc911x",
267 .id = -1,
268 .num_resources = ARRAY_SIZE(smc911x_resources),
269 .resource = smc911x_resources,
270 .dev = {
271 .platform_data = &smsc911x_info,
272 },
273};
274
275/*
276 * The card detect pin of the top SD/MMC slot (CN7) is active low and is
277 * connected to GPIO A22 of SH7372 (GPIO 41).
278 */
279static int slot_cn7_get_cd(struct platform_device *pdev)
280{
281 return !gpio_get_value(41);
282}
283/* MERAM */
284static struct sh_mobile_meram_info meram_info = {
285 .addr_mode = SH_MOBILE_MERAM_MODE1,
286};
287
288static struct resource meram_resources[] = {
289 [0] = {
290 .name = "regs",
291 .start = 0xe8000000,
292 .end = 0xe807ffff,
293 .flags = IORESOURCE_MEM,
294 },
295 [1] = {
296 .name = "meram",
297 .start = 0xe8080000,
298 .end = 0xe81fffff,
299 .flags = IORESOURCE_MEM,
300 },
301};
302
303static struct platform_device meram_device = {
304 .name = "sh_mobile_meram",
305 .id = 0,
306 .num_resources = ARRAY_SIZE(meram_resources),
307 .resource = meram_resources,
308 .dev = {
309 .platform_data = &meram_info,
310 },
311};
312
313/* SH_MMCIF */
314static struct resource sh_mmcif_resources[] = {
315 [0] = {
316 .name = "MMCIF",
317 .start = 0xE6BD0000,
318 .end = 0xE6BD00FF,
319 .flags = IORESOURCE_MEM,
320 },
321 [1] = {
322 /* MMC ERR */
323 .start = evt2irq(0x1ac0),
324 .flags = IORESOURCE_IRQ,
325 },
326 [2] = {
327 /* MMC NOR */
328 .start = evt2irq(0x1ae0),
329 .flags = IORESOURCE_IRQ,
330 },
331};
332
333static struct sh_mmcif_plat_data sh_mmcif_plat = {
334 .sup_pclk = 0,
335 .ocr = MMC_VDD_165_195 | MMC_VDD_32_33 | MMC_VDD_33_34,
336 .caps = MMC_CAP_4_BIT_DATA |
337 MMC_CAP_8_BIT_DATA |
338 MMC_CAP_NEEDS_POLL,
339 .get_cd = slot_cn7_get_cd,
340 .slave_id_tx = SHDMA_SLAVE_MMCIF_TX,
341 .slave_id_rx = SHDMA_SLAVE_MMCIF_RX,
342};
343
344static struct platform_device sh_mmcif_device = {
345 .name = "sh_mmcif",
346 .id = 0,
347 .dev = {
348 .dma_mask = NULL,
349 .coherent_dma_mask = 0xffffffff,
350 .platform_data = &sh_mmcif_plat,
351 },
352 .num_resources = ARRAY_SIZE(sh_mmcif_resources),
353 .resource = sh_mmcif_resources,
354};
355
356/* SDHI0 */
357static struct sh_mobile_sdhi_info sdhi0_info = {
358 .dma_slave_tx = SHDMA_SLAVE_SDHI0_TX,
359 .dma_slave_rx = SHDMA_SLAVE_SDHI0_RX,
360 .tmio_caps = MMC_CAP_SDIO_IRQ,
361};
362
363static struct resource sdhi0_resources[] = {
364 [0] = {
365 .name = "SDHI0",
366 .start = 0xe6850000,
367 .end = 0xe68500ff,
368 .flags = IORESOURCE_MEM,
369 },
370 [1] = {
371 .start = evt2irq(0x0e00) /* SDHI0_SDHI0I0 */,
372 .flags = IORESOURCE_IRQ,
373 },
374 [2] = {
375 .start = evt2irq(0x0e20) /* SDHI0_SDHI0I1 */,
376 .flags = IORESOURCE_IRQ,
377 },
378 [3] = {
379 .start = evt2irq(0x0e40) /* SDHI0_SDHI0I2 */,
380 .flags = IORESOURCE_IRQ,
381 },
382};
383
384static struct platform_device sdhi0_device = {
385 .name = "sh_mobile_sdhi",
386 .num_resources = ARRAY_SIZE(sdhi0_resources),
387 .resource = sdhi0_resources,
388 .id = 0,
389 .dev = {
390 .platform_data = &sdhi0_info,
391 },
392};
393
394/* SDHI1 */
395static struct sh_mobile_sdhi_info sdhi1_info = {
396 .dma_slave_tx = SHDMA_SLAVE_SDHI1_TX,
397 .dma_slave_rx = SHDMA_SLAVE_SDHI1_RX,
398 .tmio_ocr_mask = MMC_VDD_165_195,
399 .tmio_flags = TMIO_MMC_WRPROTECT_DISABLE,
400 .tmio_caps = MMC_CAP_NEEDS_POLL | MMC_CAP_SDIO_IRQ,
401 .get_cd = slot_cn7_get_cd,
402};
403
404static struct resource sdhi1_resources[] = {
405 [0] = {
406 .name = "SDHI1",
407 .start = 0xe6860000,
408 .end = 0xe68600ff,
409 .flags = IORESOURCE_MEM,
410 },
411 [1] = {
412 .start = evt2irq(0x0e80), /* SDHI1_SDHI1I0 */
413 .flags = IORESOURCE_IRQ,
414 },
415 [2] = {
416 .start = evt2irq(0x0ea0), /* SDHI1_SDHI1I1 */
417 .flags = IORESOURCE_IRQ,
418 },
419 [3] = {
420 .start = evt2irq(0x0ec0), /* SDHI1_SDHI1I2 */
421 .flags = IORESOURCE_IRQ,
422 },
423};
424
425static struct platform_device sdhi1_device = {
426 .name = "sh_mobile_sdhi",
427 .num_resources = ARRAY_SIZE(sdhi1_resources),
428 .resource = sdhi1_resources,
429 .id = 1,
430 .dev = {
431 .platform_data = &sdhi1_info,
432 },
433};
434
435/* USB1 */
436static void usb1_host_port_power(int port, int power)
437{
438 if (!power) /* only power-on supported for now */
439 return;
440
441 /* set VBOUT/PWEN and EXTLP1 in DVSTCTR */
442 __raw_writew(__raw_readw(IOMEM(0xE68B0008)) | 0x600, IOMEM(0xE68B0008));
443}
444
445static struct r8a66597_platdata usb1_host_data = {
446 .on_chip = 1,
447 .port_power = usb1_host_port_power,
448};
449
450static struct resource usb1_host_resources[] = {
451 [0] = {
452 .name = "USBHS",
453 .start = 0xE68B0000,
454 .end = 0xE68B00E6 - 1,
455 .flags = IORESOURCE_MEM,
456 },
457 [1] = {
458 .start = evt2irq(0x1ce0) /* USB1_USB1I0 */,
459 .flags = IORESOURCE_IRQ,
460 },
461};
462
463static struct platform_device usb1_host_device = {
464 .name = "r8a66597_hcd",
465 .id = 1,
466 .dev = {
467 .dma_mask = NULL, /* not use dma */
468 .coherent_dma_mask = 0xffffffff,
469 .platform_data = &usb1_host_data,
470 },
471 .num_resources = ARRAY_SIZE(usb1_host_resources),
472 .resource = usb1_host_resources,
473};
474
475/*
476 * QHD display
477 */
478#ifdef CONFIG_AP4EVB_QHD
479
480/* KEYSC (Needs SW43 set to ON) */
481static struct sh_keysc_info keysc_info = {
482 .mode = SH_KEYSC_MODE_1,
483 .scan_timing = 3,
484 .delay = 2500,
485 .keycodes = {
486 KEY_0, KEY_1, KEY_2, KEY_3, KEY_4,
487 KEY_5, KEY_6, KEY_7, KEY_8, KEY_9,
488 KEY_A, KEY_B, KEY_C, KEY_D, KEY_E,
489 KEY_F, KEY_G, KEY_H, KEY_I, KEY_J,
490 KEY_K, KEY_L, KEY_M, KEY_N, KEY_O,
491 },
492};
493
494static struct resource keysc_resources[] = {
495 [0] = {
496 .name = "KEYSC",
497 .start = 0xe61b0000,
498 .end = 0xe61b0063,
499 .flags = IORESOURCE_MEM,
500 },
501 [1] = {
502 .start = evt2irq(0x0be0), /* KEYSC_KEY */
503 .flags = IORESOURCE_IRQ,
504 },
505};
506
507static struct platform_device keysc_device = {
508 .name = "sh_keysc",
509 .id = 0, /* "keysc0" clock */
510 .num_resources = ARRAY_SIZE(keysc_resources),
511 .resource = keysc_resources,
512 .dev = {
513 .platform_data = &keysc_info,
514 },
515};
516
517/* MIPI-DSI */
518static int sh_mipi_set_dot_clock(struct platform_device *pdev,
519 void __iomem *base,
520 int enable)
521{
522 struct clk *pck = clk_get(&pdev->dev, "dsip_clk");
523
524 if (IS_ERR(pck))
525 return PTR_ERR(pck);
526
527 if (enable) {
528 /*
529 * DSIPCLK = 24MHz
530 * D-PHY = DSIPCLK * ((0x6*2)+1) = 312MHz (see .phyctrl)
531 * HsByteCLK = D-PHY/8 = 39MHz
532 *
533 * X * Y * FPS =
534 * (544+72+600+16) * (961+8+8+2) * 30 = 36.1MHz
535 */
536 clk_set_rate(pck, clk_round_rate(pck, 24000000));
537 clk_enable(pck);
538 } else {
539 clk_disable(pck);
540 }
541
542 clk_put(pck);
543
544 return 0;
545}
546
547static struct resource mipidsi0_resources[] = {
548 [0] = {
549 .start = 0xffc60000,
550 .end = 0xffc63073,
551 .flags = IORESOURCE_MEM,
552 },
553 [1] = {
554 .start = 0xffc68000,
555 .end = 0xffc680ef,
556 .flags = IORESOURCE_MEM,
557 },
558};
559
560static struct sh_mipi_dsi_info mipidsi0_info = {
561 .data_format = MIPI_RGB888,
562 .channel = LCDC_CHAN_MAINLCD,
563 .lane = 2,
564 .vsynw_offset = 17,
565 .phyctrl = 0x6 << 8,
566 .flags = SH_MIPI_DSI_SYNC_PULSES_MODE |
567 SH_MIPI_DSI_HSbyteCLK,
568 .set_dot_clock = sh_mipi_set_dot_clock,
569};
570
571static struct platform_device mipidsi0_device = {
572 .name = "sh-mipi-dsi",
573 .num_resources = ARRAY_SIZE(mipidsi0_resources),
574 .resource = mipidsi0_resources,
575 .id = 0,
576 .dev = {
577 .platform_data = &mipidsi0_info,
578 },
579};
580
581static struct platform_device *qhd_devices[] __initdata = {
582 &mipidsi0_device,
583 &keysc_device,
584};
585#endif /* CONFIG_AP4EVB_QHD */
586
587/* LCDC0 */
588static const struct fb_videomode ap4evb_lcdc_modes[] = {
589 {
590#ifdef CONFIG_AP4EVB_QHD
591 .name = "R63302(QHD)",
592 .xres = 544,
593 .yres = 961,
594 .left_margin = 72,
595 .right_margin = 600,
596 .hsync_len = 16,
597 .upper_margin = 8,
598 .lower_margin = 8,
599 .vsync_len = 2,
600 .sync = FB_SYNC_VERT_HIGH_ACT | FB_SYNC_HOR_HIGH_ACT,
601#else
602 .name = "WVGA Panel",
603 .xres = 800,
604 .yres = 480,
605 .left_margin = 220,
606 .right_margin = 110,
607 .hsync_len = 70,
608 .upper_margin = 20,
609 .lower_margin = 5,
610 .vsync_len = 5,
611 .sync = 0,
612#endif
613 },
614};
615
616static const struct sh_mobile_meram_cfg lcd_meram_cfg = {
617 .icb[0] = {
618 .meram_size = 0x40,
619 },
620 .icb[1] = {
621 .meram_size = 0x40,
622 },
623};
624
625static struct sh_mobile_lcdc_info lcdc_info = {
626 .meram_dev = &meram_info,
627 .ch[0] = {
628 .chan = LCDC_CHAN_MAINLCD,
629 .fourcc = V4L2_PIX_FMT_RGB565,
630 .lcd_modes = ap4evb_lcdc_modes,
631 .num_modes = ARRAY_SIZE(ap4evb_lcdc_modes),
632 .meram_cfg = &lcd_meram_cfg,
633#ifdef CONFIG_AP4EVB_QHD
634 .tx_dev = &mipidsi0_device,
635#endif
636 }
637};
638
639static struct resource lcdc_resources[] = {
640 [0] = {
641 .name = "LCDC",
642 .start = 0xfe940000, /* P4-only space */
643 .end = 0xfe943fff,
644 .flags = IORESOURCE_MEM,
645 },
646 [1] = {
647 .start = intcs_evt2irq(0x580),
648 .flags = IORESOURCE_IRQ,
649 },
650};
651
652static struct platform_device lcdc_device = {
653 .name = "sh_mobile_lcdc_fb",
654 .num_resources = ARRAY_SIZE(lcdc_resources),
655 .resource = lcdc_resources,
656 .dev = {
657 .platform_data = &lcdc_info,
658 .coherent_dma_mask = ~0,
659 },
660};
661
662/* FSI */
663#define IRQ_FSI evt2irq(0x1840)
664static struct sh_fsi_platform_info fsi_info = {
665 .port_b = {
666 .flags = SH_FSI_CLK_CPG |
667 SH_FSI_FMT_SPDIF,
668 },
669};
670
671static struct resource fsi_resources[] = {
672 [0] = {
673 .name = "FSI",
674 .start = 0xFE3C0000,
675 .end = 0xFE3C0400 - 1,
676 .flags = IORESOURCE_MEM,
677 },
678 [1] = {
679 .start = IRQ_FSI,
680 .flags = IORESOURCE_IRQ,
681 },
682};
683
684static struct platform_device fsi_device = {
685 .name = "sh_fsi2",
686 .id = -1,
687 .num_resources = ARRAY_SIZE(fsi_resources),
688 .resource = fsi_resources,
689 .dev = {
690 .platform_data = &fsi_info,
691 },
692};
693
694static struct asoc_simple_card_info fsi2_ak4643_info = {
695 .name = "AK4643",
696 .card = "FSI2A-AK4643",
697 .codec = "ak4642-codec.0-0013",
698 .platform = "sh_fsi2",
699 .daifmt = SND_SOC_DAIFMT_LEFT_J,
700 .cpu_dai = {
701 .name = "fsia-dai",
702 .fmt = SND_SOC_DAIFMT_CBS_CFS,
703 },
704 .codec_dai = {
705 .name = "ak4642-hifi",
706 .fmt = SND_SOC_DAIFMT_CBM_CFM,
707 .sysclk = 11289600,
708 },
709};
710
711static struct platform_device fsi_ak4643_device = {
712 .name = "asoc-simple-card",
713 .dev = {
714 .platform_data = &fsi2_ak4643_info,
715 },
716};
717
718/* LCDC1 */
719static long ap4evb_clk_optimize(unsigned long target, unsigned long *best_freq,
720 unsigned long *parent_freq);
721
722static struct sh_mobile_hdmi_info hdmi_info = {
723 .flags = HDMI_SND_SRC_SPDIF,
724 .clk_optimize_parent = ap4evb_clk_optimize,
725};
726
727static struct resource hdmi_resources[] = {
728 [0] = {
729 .name = "HDMI",
730 .start = 0xe6be0000,
731 .end = 0xe6be00ff,
732 .flags = IORESOURCE_MEM,
733 },
734 [1] = {
735 /* There's also an HDMI interrupt on INTCS @ 0x18e0 */
736 .start = evt2irq(0x17e0),
737 .flags = IORESOURCE_IRQ,
738 },
739};
740
741static struct platform_device hdmi_device = {
742 .name = "sh-mobile-hdmi",
743 .num_resources = ARRAY_SIZE(hdmi_resources),
744 .resource = hdmi_resources,
745 .id = -1,
746 .dev = {
747 .platform_data = &hdmi_info,
748 },
749};
750
751static long ap4evb_clk_optimize(unsigned long target, unsigned long *best_freq,
752 unsigned long *parent_freq)
753{
754 struct clk *hdmi_ick = clk_get(&hdmi_device.dev, "ick");
755 long error;
756
757 if (IS_ERR(hdmi_ick)) {
758 int ret = PTR_ERR(hdmi_ick);
759 pr_err("Cannot get HDMI ICK: %d\n", ret);
760 return ret;
761 }
762
763 error = clk_round_parent(hdmi_ick, target, best_freq, parent_freq, 1, 64);
764
765 clk_put(hdmi_ick);
766
767 return error;
768}
769
770static const struct sh_mobile_meram_cfg hdmi_meram_cfg = {
771 .icb[0] = {
772 .meram_size = 0x100,
773 },
774 .icb[1] = {
775 .meram_size = 0x100,
776 },
777};
778
779static struct sh_mobile_lcdc_info sh_mobile_lcdc1_info = {
780 .clock_source = LCDC_CLK_EXTERNAL,
781 .meram_dev = &meram_info,
782 .ch[0] = {
783 .chan = LCDC_CHAN_MAINLCD,
784 .fourcc = V4L2_PIX_FMT_RGB565,
785 .interface_type = RGB24,
786 .clock_divider = 1,
787 .flags = LCDC_FLAGS_DWPOL,
788 .meram_cfg = &hdmi_meram_cfg,
789 .tx_dev = &hdmi_device,
790 }
791};
792
793static struct resource lcdc1_resources[] = {
794 [0] = {
795 .name = "LCDC1",
796 .start = 0xfe944000,
797 .end = 0xfe947fff,
798 .flags = IORESOURCE_MEM,
799 },
800 [1] = {
801 .start = intcs_evt2irq(0x1780),
802 .flags = IORESOURCE_IRQ,
803 },
804};
805
806static struct platform_device lcdc1_device = {
807 .name = "sh_mobile_lcdc_fb",
808 .num_resources = ARRAY_SIZE(lcdc1_resources),
809 .resource = lcdc1_resources,
810 .id = 1,
811 .dev = {
812 .platform_data = &sh_mobile_lcdc1_info,
813 .coherent_dma_mask = ~0,
814 },
815};
816
817static struct asoc_simple_card_info fsi2_hdmi_info = {
818 .name = "HDMI",
819 .card = "FSI2B-HDMI",
820 .codec = "sh-mobile-hdmi",
821 .platform = "sh_fsi2",
822 .cpu_dai = {
823 .name = "fsib-dai",
824 .fmt = SND_SOC_DAIFMT_CBM_CFM | SND_SOC_DAIFMT_IB_NF,
825 },
826 .codec_dai = {
827 .name = "sh_mobile_hdmi-hifi",
828 },
829};
830
831static struct platform_device fsi_hdmi_device = {
832 .name = "asoc-simple-card",
833 .id = 1,
834 .dev = {
835 .platform_data = &fsi2_hdmi_info,
836 },
837};
838
839static struct gpio_led ap4evb_leds[] = {
840 {
841 .name = "led4",
842 .gpio = 185,
843 .default_state = LEDS_GPIO_DEFSTATE_ON,
844 },
845 {
846 .name = "led2",
847 .gpio = 186,
848 .default_state = LEDS_GPIO_DEFSTATE_ON,
849 },
850 {
851 .name = "led3",
852 .gpio = 187,
853 .default_state = LEDS_GPIO_DEFSTATE_ON,
854 },
855 {
856 .name = "led1",
857 .gpio = 188,
858 .default_state = LEDS_GPIO_DEFSTATE_ON,
859 }
860};
861
862static struct gpio_led_platform_data ap4evb_leds_pdata = {
863 .num_leds = ARRAY_SIZE(ap4evb_leds),
864 .leds = ap4evb_leds,
865};
866
867static struct platform_device leds_device = {
868 .name = "leds-gpio",
869 .id = 0,
870 .dev = {
871 .platform_data = &ap4evb_leds_pdata,
872 },
873};
874
875static struct i2c_board_info imx074_info = {
876 I2C_BOARD_INFO("imx074", 0x1a),
877};
878
879static struct soc_camera_link imx074_link = {
880 .bus_id = 0,
881 .board_info = &imx074_info,
882 .i2c_adapter_id = 0,
883 .module_name = "imx074",
884};
885
886static struct platform_device ap4evb_camera = {
887 .name = "soc-camera-pdrv",
888 .id = 0,
889 .dev = {
890 .platform_data = &imx074_link,
891 },
892};
893
894static struct sh_csi2_client_config csi2_clients[] = {
895 {
896 .phy = SH_CSI2_PHY_MAIN,
897 .lanes = 0, /* default: 2 lanes */
898 .channel = 0,
899 .pdev = &ap4evb_camera,
900 },
901};
902
903static struct sh_csi2_pdata csi2_info = {
904 .type = SH_CSI2C,
905 .clients = csi2_clients,
906 .num_clients = ARRAY_SIZE(csi2_clients),
907 .flags = SH_CSI2_ECC | SH_CSI2_CRC,
908};
909
910static struct resource csi2_resources[] = {
911 [0] = {
912 .name = "CSI2",
913 .start = 0xffc90000,
914 .end = 0xffc90fff,
915 .flags = IORESOURCE_MEM,
916 },
917 [1] = {
918 .start = intcs_evt2irq(0x17a0),
919 .flags = IORESOURCE_IRQ,
920 },
921};
922
923static struct sh_mobile_ceu_companion csi2 = {
924 .id = 0,
925 .num_resources = ARRAY_SIZE(csi2_resources),
926 .resource = csi2_resources,
927 .platform_data = &csi2_info,
928};
929
930static struct sh_mobile_ceu_info sh_mobile_ceu_info = {
931 .flags = SH_CEU_FLAG_USE_8BIT_BUS,
932 .max_width = 8188,
933 .max_height = 8188,
934 .csi2 = &csi2,
935};
936
937static struct resource ceu_resources[] = {
938 [0] = {
939 .name = "CEU",
940 .start = 0xfe910000,
941 .end = 0xfe91009f,
942 .flags = IORESOURCE_MEM,
943 },
944 [1] = {
945 .start = intcs_evt2irq(0x880),
946 .flags = IORESOURCE_IRQ,
947 },
948 [2] = {
949 /* place holder for contiguous memory */
950 },
951};
952
953static struct platform_device ceu_device = {
954 .name = "sh_mobile_ceu",
955 .id = 0, /* "ceu0" clock */
956 .num_resources = ARRAY_SIZE(ceu_resources),
957 .resource = ceu_resources,
958 .dev = {
959 .platform_data = &sh_mobile_ceu_info,
960 .coherent_dma_mask = 0xffffffff,
961 },
962};
963
964static struct platform_device *ap4evb_devices[] __initdata = {
965 &leds_device,
966 &nor_flash_device,
967 &smc911x_device,
968 &sdhi0_device,
969 &sdhi1_device,
970 &usb1_host_device,
971 &fsi_device,
972 &fsi_ak4643_device,
973 &fsi_hdmi_device,
974 &sh_mmcif_device,
975 &hdmi_device,
976 &lcdc_device,
977 &lcdc1_device,
978 &ceu_device,
979 &ap4evb_camera,
980 &meram_device,
981};
982
983static void __init hdmi_init_pm_clock(void)
984{
985 struct clk *hdmi_ick = clk_get(&hdmi_device.dev, "ick");
986 int ret;
987 long rate;
988
989 if (IS_ERR(hdmi_ick)) {
990 ret = PTR_ERR(hdmi_ick);
991 pr_err("Cannot get HDMI ICK: %d\n", ret);
992 goto out;
993 }
994
995 ret = clk_set_parent(&sh7372_pllc2_clk, &sh7372_dv_clki_div2_clk);
996 if (ret < 0) {
997 pr_err("Cannot set PLLC2 parent: %d, %d users\n", ret, sh7372_pllc2_clk.usecount);
998 goto out;
999 }
1000
1001 pr_debug("PLLC2 initial frequency %lu\n", clk_get_rate(&sh7372_pllc2_clk));
1002
1003 rate = clk_round_rate(&sh7372_pllc2_clk, 594000000);
1004 if (rate < 0) {
1005 pr_err("Cannot get suitable rate: %ld\n", rate);
1006 ret = rate;
1007 goto out;
1008 }
1009
1010 ret = clk_set_rate(&sh7372_pllc2_clk, rate);
1011 if (ret < 0) {
1012 pr_err("Cannot set rate %ld: %d\n", rate, ret);
1013 goto out;
1014 }
1015
1016 pr_debug("PLLC2 set frequency %lu\n", rate);
1017
1018 ret = clk_set_parent(hdmi_ick, &sh7372_pllc2_clk);
1019 if (ret < 0)
1020 pr_err("Cannot set HDMI parent: %d\n", ret);
1021
1022out:
1023 if (!IS_ERR(hdmi_ick))
1024 clk_put(hdmi_ick);
1025}
1026
1027/* TouchScreen */
1028#ifdef CONFIG_AP4EVB_QHD
1029# define GPIO_TSC_IRQ GPIO_FN_IRQ28_123
1030# define GPIO_TSC_PORT 123
1031#else /* WVGA */
1032# define GPIO_TSC_IRQ GPIO_FN_IRQ7_40
1033# define GPIO_TSC_PORT 40
1034#endif
1035
1036#define IRQ28 evt2irq(0x3380) /* IRQ28A */
1037#define IRQ7 evt2irq(0x02e0) /* IRQ7A */
1038static int ts_get_pendown_state(void)
1039{
1040 int val;
1041
1042 gpio_free(GPIO_TSC_IRQ);
1043
1044 gpio_request_one(GPIO_TSC_PORT, GPIOF_IN, NULL);
1045
1046 val = gpio_get_value(GPIO_TSC_PORT);
1047
1048 gpio_request(GPIO_TSC_IRQ, NULL);
1049
1050 return !val;
1051}
1052
1053static int ts_init(void)
1054{
1055 gpio_request(GPIO_TSC_IRQ, NULL);
1056
1057 return 0;
1058}
1059
1060static struct tsc2007_platform_data tsc2007_info = {
1061 .model = 2007,
1062 .x_plate_ohms = 180,
1063 .get_pendown_state = ts_get_pendown_state,
1064 .init_platform_hw = ts_init,
1065};
1066
1067static struct i2c_board_info tsc_device = {
1068 I2C_BOARD_INFO("tsc2007", 0x48),
1069 .type = "tsc2007",
1070 .platform_data = &tsc2007_info,
1071 /*.irq is selected on ap4evb_init */
1072};
1073
1074/* I2C */
1075static struct i2c_board_info i2c0_devices[] = {
1076 {
1077 I2C_BOARD_INFO("ak4643", 0x13),
1078 },
1079};
1080
1081static struct i2c_board_info i2c1_devices[] = {
1082 {
1083 I2C_BOARD_INFO("r2025sd", 0x32),
1084 },
1085};
1086
1087
1088static const struct pinctrl_map ap4evb_pinctrl_map[] = {
1089 /* MMCIF */
1090 PIN_MAP_MUX_GROUP_DEFAULT("sh_mmcif.0", "pfc-sh7372",
1091 "mmc0_data8_0", "mmc0"),
1092 PIN_MAP_MUX_GROUP_DEFAULT("sh_mmcif.0", "pfc-sh7372",
1093 "mmc0_ctrl_0", "mmc0"),
1094 /* SDHI0 */
1095 PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.0", "pfc-sh7372",
1096 "sdhi0_data4", "sdhi0"),
1097 PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.0", "pfc-sh7372",
1098 "sdhi0_ctrl", "sdhi0"),
1099 PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.0", "pfc-sh7372",
1100 "sdhi0_cd", "sdhi0"),
1101 PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.0", "pfc-sh7372",
1102 "sdhi0_wp", "sdhi0"),
1103 /* SDHI1 */
1104 PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.1", "pfc-sh7372",
1105 "sdhi1_data4", "sdhi1"),
1106 PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.1", "pfc-sh7372",
1107 "sdhi1_ctrl", "sdhi1"),
1108};
1109
1110#define GPIO_PORT9CR IOMEM(0xE6051009)
1111#define GPIO_PORT10CR IOMEM(0xE605100A)
1112#define USCCR1 IOMEM(0xE6058144)
1113static void __init ap4evb_init(void)
1114{
1115 struct pm_domain_device domain_devices[] = {
1116 { "A4LC", &lcdc1_device, },
1117 { "A4LC", &lcdc_device, },
1118 { "A4MP", &fsi_device, },
1119 { "A3SP", &sh_mmcif_device, },
1120 { "A3SP", &sdhi0_device, },
1121 { "A3SP", &sdhi1_device, },
1122 { "A4R", &ceu_device, },
1123 };
1124 u32 srcr4;
1125 struct clk *clk;
1126
1127 regulator_register_always_on(0, "fixed-1.8V", fixed1v8_power_consumers,
1128 ARRAY_SIZE(fixed1v8_power_consumers), 1800000);
1129 regulator_register_always_on(1, "fixed-3.3V", fixed3v3_power_consumers,
1130 ARRAY_SIZE(fixed3v3_power_consumers), 3300000);
1131 regulator_register_fixed(2, dummy_supplies, ARRAY_SIZE(dummy_supplies));
1132
1133 /* External clock source */
1134 clk_set_rate(&sh7372_dv_clki_clk, 27000000);
1135
1136 pinctrl_register_mappings(ap4evb_pinctrl_map,
1137 ARRAY_SIZE(ap4evb_pinctrl_map));
1138 sh7372_pinmux_init();
1139
1140 /* enable SCIFA0 */
1141 gpio_request(GPIO_FN_SCIFA0_TXD, NULL);
1142 gpio_request(GPIO_FN_SCIFA0_RXD, NULL);
1143
1144 /* enable SMSC911X */
1145 gpio_request(GPIO_FN_CS5A, NULL);
1146 gpio_request(GPIO_FN_IRQ6_39, NULL);
1147
1148 /* enable Debug switch (S6) */
1149 gpio_request_one(32, GPIOF_IN | GPIOF_EXPORT, NULL);
1150 gpio_request_one(33, GPIOF_IN | GPIOF_EXPORT, NULL);
1151 gpio_request_one(34, GPIOF_IN | GPIOF_EXPORT, NULL);
1152 gpio_request_one(35, GPIOF_IN | GPIOF_EXPORT, NULL);
1153
1154 /* USB enable */
1155 gpio_request(GPIO_FN_VBUS0_1, NULL);
1156 gpio_request(GPIO_FN_IDIN_1_18, NULL);
1157 gpio_request(GPIO_FN_PWEN_1_115, NULL);
1158 gpio_request(GPIO_FN_OVCN_1_114, NULL);
1159 gpio_request(GPIO_FN_EXTLP_1, NULL);
1160 gpio_request(GPIO_FN_OVCN2_1, NULL);
1161
1162 /* setup USB phy */
1163 __raw_writew(0x8a0a, IOMEM(0xE6058130)); /* USBCR4 */
1164
1165 /* enable FSI2 port A (ak4643) */
1166 gpio_request(GPIO_FN_FSIAIBT, NULL);
1167 gpio_request(GPIO_FN_FSIAILR, NULL);
1168 gpio_request(GPIO_FN_FSIAISLD, NULL);
1169 gpio_request(GPIO_FN_FSIAOSLD, NULL);
1170 gpio_request_one(161, GPIOF_OUT_INIT_LOW, NULL); /* slave */
1171
1172 gpio_request(9, NULL);
1173 gpio_request(10, NULL);
1174 gpio_direction_none(GPIO_PORT9CR); /* FSIAOBT needs no direction */
1175 gpio_direction_none(GPIO_PORT10CR); /* FSIAOLR needs no direction */
1176
1177 /* card detect pin for MMC slot (CN7) */
1178 gpio_request_one(41, GPIOF_IN, NULL);
1179
1180 /* setup FSI2 port B (HDMI) */
1181 gpio_request(GPIO_FN_FSIBCK, NULL);
1182 __raw_writew(__raw_readw(USCCR1) & ~(1 << 6), USCCR1); /* use SPDIF */
1183
1184 /* set SPU2 clock to 119.6 MHz */
1185 clk = clk_get(NULL, "spu_clk");
1186 if (!IS_ERR(clk)) {
1187 clk_set_rate(clk, clk_round_rate(clk, 119600000));
1188 clk_put(clk);
1189 }
1190
1191 /*
1192 * set irq priority, to avoid sound chopping
1193 * when NFS rootfs is used
1194 * FSI(3) > SMSC911X(2)
1195 */
1196 intc_set_priority(IRQ_FSI, 3);
1197
1198 i2c_register_board_info(0, i2c0_devices,
1199 ARRAY_SIZE(i2c0_devices));
1200
1201 i2c_register_board_info(1, i2c1_devices,
1202 ARRAY_SIZE(i2c1_devices));
1203
1204#ifdef CONFIG_AP4EVB_QHD
1205
1206 /*
1207 * For QHD Panel (MIPI-DSI, CONFIG_AP4EVB_QHD=y) and
1208 * IRQ28 for Touch Panel, set dip switches S3, S43 as OFF, ON.
1209 */
1210
1211 /* enable KEYSC */
1212 gpio_request(GPIO_FN_KEYOUT0, NULL);
1213 gpio_request(GPIO_FN_KEYOUT1, NULL);
1214 gpio_request(GPIO_FN_KEYOUT2, NULL);
1215 gpio_request(GPIO_FN_KEYOUT3, NULL);
1216 gpio_request(GPIO_FN_KEYOUT4, NULL);
1217 gpio_request(GPIO_FN_KEYIN0_136, NULL);
1218 gpio_request(GPIO_FN_KEYIN1_135, NULL);
1219 gpio_request(GPIO_FN_KEYIN2_134, NULL);
1220 gpio_request(GPIO_FN_KEYIN3_133, NULL);
1221 gpio_request(GPIO_FN_KEYIN4, NULL);
1222
1223 /* enable TouchScreen */
1224 irq_set_irq_type(IRQ28, IRQ_TYPE_LEVEL_LOW);
1225
1226 tsc_device.irq = IRQ28;
1227 i2c_register_board_info(1, &tsc_device, 1);
1228
1229 /* LCDC0 */
1230 lcdc_info.clock_source = LCDC_CLK_PERIPHERAL;
1231 lcdc_info.ch[0].interface_type = RGB24;
1232 lcdc_info.ch[0].clock_divider = 1;
1233 lcdc_info.ch[0].flags = LCDC_FLAGS_DWPOL;
1234 lcdc_info.ch[0].panel_cfg.width = 44;
1235 lcdc_info.ch[0].panel_cfg.height = 79;
1236
1237 platform_add_devices(qhd_devices, ARRAY_SIZE(qhd_devices));
1238
1239#else
1240 /*
1241 * For WVGA Panel (18-bit RGB, CONFIG_AP4EVB_WVGA=y) and
1242 * IRQ7 for Touch Panel, set dip switches S3, S43 to ON, OFF.
1243 */
1244
1245 gpio_request(GPIO_FN_LCDD17, NULL);
1246 gpio_request(GPIO_FN_LCDD16, NULL);
1247 gpio_request(GPIO_FN_LCDD15, NULL);
1248 gpio_request(GPIO_FN_LCDD14, NULL);
1249 gpio_request(GPIO_FN_LCDD13, NULL);
1250 gpio_request(GPIO_FN_LCDD12, NULL);
1251 gpio_request(GPIO_FN_LCDD11, NULL);
1252 gpio_request(GPIO_FN_LCDD10, NULL);
1253 gpio_request(GPIO_FN_LCDD9, NULL);
1254 gpio_request(GPIO_FN_LCDD8, NULL);
1255 gpio_request(GPIO_FN_LCDD7, NULL);
1256 gpio_request(GPIO_FN_LCDD6, NULL);
1257 gpio_request(GPIO_FN_LCDD5, NULL);
1258 gpio_request(GPIO_FN_LCDD4, NULL);
1259 gpio_request(GPIO_FN_LCDD3, NULL);
1260 gpio_request(GPIO_FN_LCDD2, NULL);
1261 gpio_request(GPIO_FN_LCDD1, NULL);
1262 gpio_request(GPIO_FN_LCDD0, NULL);
1263 gpio_request(GPIO_FN_LCDDISP, NULL);
1264 gpio_request(GPIO_FN_LCDDCK, NULL);
1265
1266 gpio_request_one(189, GPIOF_OUT_INIT_HIGH, NULL); /* backlight */
1267 gpio_request_one(151, GPIOF_OUT_INIT_HIGH, NULL); /* LCDDON */
1268
1269 lcdc_info.clock_source = LCDC_CLK_BUS;
1270 lcdc_info.ch[0].interface_type = RGB18;
1271 lcdc_info.ch[0].clock_divider = 3;
1272 lcdc_info.ch[0].flags = 0;
1273 lcdc_info.ch[0].panel_cfg.width = 152;
1274 lcdc_info.ch[0].panel_cfg.height = 91;
1275
1276 /* enable TouchScreen */
1277 irq_set_irq_type(IRQ7, IRQ_TYPE_LEVEL_LOW);
1278
1279 tsc_device.irq = IRQ7;
1280 i2c_register_board_info(0, &tsc_device, 1);
1281#endif /* CONFIG_AP4EVB_QHD */
1282
1283 /* CEU */
1284
1285 /*
1286 * TODO: reserve memory for V4L2 DMA buffers, when a suitable API
1287 * becomes available
1288 */
1289
1290 /* MIPI-CSI stuff */
1291 gpio_request(GPIO_FN_VIO_CKO, NULL);
1292
1293 clk = clk_get(NULL, "vck1_clk");
1294 if (!IS_ERR(clk)) {
1295 clk_set_rate(clk, clk_round_rate(clk, 13000000));
1296 clk_enable(clk);
1297 clk_put(clk);
1298 }
1299
1300 sh7372_add_standard_devices();
1301
1302 /* HDMI */
1303 gpio_request(GPIO_FN_HDMI_HPD, NULL);
1304 gpio_request(GPIO_FN_HDMI_CEC, NULL);
1305
1306 /* Reset HDMI, must be held at least one EXTALR (32768Hz) period */
1307#define SRCR4 IOMEM(0xe61580bc)
1308 srcr4 = __raw_readl(SRCR4);
1309 __raw_writel(srcr4 | (1 << 13), SRCR4);
1310 udelay(50);
1311 __raw_writel(srcr4 & ~(1 << 13), SRCR4);
1312
1313 platform_add_devices(ap4evb_devices, ARRAY_SIZE(ap4evb_devices));
1314
1315 rmobile_add_devices_to_domains(domain_devices,
1316 ARRAY_SIZE(domain_devices));
1317
1318 hdmi_init_pm_clock();
1319 sh7372_pm_init();
1320 pm_clk_add(&fsi_device.dev, "spu2");
1321 pm_clk_add(&lcdc1_device.dev, "hdmi");
1322}
1323
1324MACHINE_START(AP4EVB, "ap4evb")
1325 .map_io = sh7372_map_io,
1326 .init_early = sh7372_add_early_devices,
1327 .init_irq = sh7372_init_irq,
1328 .handle_irq = shmobile_handle_irq_intc,
1329 .init_machine = ap4evb_init,
1330 .init_late = sh7372_pm_init_late,
1331 .init_time = sh7372_earlytimer_init,
1332MACHINE_END
diff --git a/arch/arm/mach-shmobile/board-ape6evm.c b/arch/arm/mach-shmobile/board-ape6evm.c
index 55b8c9fef954..5eb0caa6a7d0 100644
--- a/arch/arm/mach-shmobile/board-ape6evm.c
+++ b/arch/arm/mach-shmobile/board-ape6evm.c
@@ -26,6 +26,7 @@
26#include <linux/platform_device.h> 26#include <linux/platform_device.h>
27#include <linux/regulator/fixed.h> 27#include <linux/regulator/fixed.h>
28#include <linux/regulator/machine.h> 28#include <linux/regulator/machine.h>
29#include <linux/sh_clk.h>
29#include <linux/smsc911x.h> 30#include <linux/smsc911x.h>
30#include <mach/common.h> 31#include <mach/common.h>
31#include <mach/irqs.h> 32#include <mach/irqs.h>
@@ -65,7 +66,21 @@ static const struct pinctrl_map ape6evm_pinctrl_map[] = {
65 66
66static void __init ape6evm_add_standard_devices(void) 67static void __init ape6evm_add_standard_devices(void)
67{ 68{
69
70 struct clk *parent;
71 struct clk *mp;
72
68 r8a73a4_clock_init(); 73 r8a73a4_clock_init();
74
75 /* MP clock parent = extal2 */
76 parent = clk_get(NULL, "extal2");
77 mp = clk_get(NULL, "mp");
78 BUG_ON(IS_ERR(parent) || IS_ERR(mp));
79
80 clk_set_parent(mp, parent);
81 clk_put(parent);
82 clk_put(mp);
83
69 pinctrl_register_mappings(ape6evm_pinctrl_map, 84 pinctrl_register_mappings(ape6evm_pinctrl_map,
70 ARRAY_SIZE(ape6evm_pinctrl_map)); 85 ARRAY_SIZE(ape6evm_pinctrl_map));
71 r8a73a4_pinmux_init(); 86 r8a73a4_pinmux_init();
diff --git a/arch/arm/mach-shmobile/board-armadillo800eva-reference.c b/arch/arm/mach-shmobile/board-armadillo800eva-reference.c
new file mode 100644
index 000000000000..03b85fec2ddb
--- /dev/null
+++ b/arch/arm/mach-shmobile/board-armadillo800eva-reference.c
@@ -0,0 +1,213 @@
1/*
2 * armadillo 800 eva board support
3 *
4 * Copyright (C) 2012 Renesas Solutions Corp.
5 * Copyright (C) 2012 Kuninori Morimoto <kuninori.morimoto.gx@renesas.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; version 2 of the License.
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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19 *
20 */
21
22#include <linux/clk.h>
23#include <linux/err.h>
24#include <linux/kernel.h>
25#include <linux/gpio.h>
26#include <linux/io.h>
27#include <linux/pinctrl/machine.h>
28#include <mach/common.h>
29#include <mach/r8a7740.h>
30#include <asm/mach/arch.h>
31#include <asm/hardware/cache-l2x0.h>
32
33/*
34 * CON1 Camera Module
35 * CON2 Extension Bus
36 * CON3 HDMI Output
37 * CON4 Composite Video Output
38 * CON5 H-UDI JTAG
39 * CON6 ARM JTAG
40 * CON7 SD1
41 * CON8 SD2
42 * CON9 RTC BackUp
43 * CON10 Monaural Mic Input
44 * CON11 Stereo Headphone Output
45 * CON12 Audio Line Output(L)
46 * CON13 Audio Line Output(R)
47 * CON14 AWL13 Module
48 * CON15 Extension
49 * CON16 LCD1
50 * CON17 LCD2
51 * CON19 Power Input
52 * CON20 USB1
53 * CON21 USB2
54 * CON22 Serial
55 * CON23 LAN
56 * CON24 USB3
57 * LED1 Camera LED(Yellow)
58 * LED2 Power LED (Green)
59 * ED3-LED6 User LED(Yellow)
60 * LED7 LAN link LED(Green)
61 * LED8 LAN activity LED(Yellow)
62 */
63
64/*
65 * DipSwitch
66 *
67 * SW1
68 *
69 * -12345678-+---------------+----------------------------
70 * 1 | boot | hermit
71 * 0 | boot | OS auto boot
72 * -12345678-+---------------+----------------------------
73 * 00 | boot device | eMMC
74 * 10 | boot device | SDHI0 (CON7)
75 * 01 | boot device | -
76 * 11 | boot device | Extension Buss (CS0)
77 * -12345678-+---------------+----------------------------
78 * 0 | Extension Bus | D8-D15 disable, eMMC enable
79 * 1 | Extension Bus | D8-D15 enable, eMMC disable
80 * -12345678-+---------------+----------------------------
81 * 0 | SDHI1 | COM8 disable, COM14 enable
82 * 1 | SDHI1 | COM8 enable, COM14 disable
83 * -12345678-+---------------+----------------------------
84 * 0 | USB0 | COM20 enable, COM24 disable
85 * 1 | USB0 | COM20 disable, COM24 enable
86 * -12345678-+---------------+----------------------------
87 * 00 | JTAG | SH-X2
88 * 10 | JTAG | ARM
89 * 01 | JTAG | -
90 * 11 | JTAG | Boundary Scan
91 *-----------+---------------+----------------------------
92 */
93
94/*
95 * FSI-WM8978
96 *
97 * this command is required when playback.
98 *
99 * # amixer set "Headphone" 50
100 *
101 * this command is required when capture.
102 *
103 * # amixer set "Input PGA" 15
104 * # amixer set "Left Input Mixer MicP" on
105 * # amixer set "Left Input Mixer MicN" on
106 * # amixer set "Right Input Mixer MicN" on
107 * # amixer set "Right Input Mixer MicP" on
108 */
109
110/*
111 * USB function
112 *
113 * When you use USB Function,
114 * set SW1.6 ON, and connect cable to CN24.
115 *
116 * USBF needs workaround on R8A7740 chip.
117 * These are a little bit complex.
118 * see
119 * usbhsf_power_ctrl()
120 */
121
122static const struct pinctrl_map eva_pinctrl_map[] = {
123 /* SCIFA1 */
124 PIN_MAP_MUX_GROUP_DEFAULT("sh-sci.1", "pfc-r8a7740",
125 "scifa1_data", "scifa1"),
126};
127
128static void __init eva_clock_init(void)
129{
130 struct clk *system = clk_get(NULL, "system_clk");
131 struct clk *xtal1 = clk_get(NULL, "extal1");
132 struct clk *usb24s = clk_get(NULL, "usb24s");
133 struct clk *fsibck = clk_get(NULL, "fsibck");
134
135 if (IS_ERR(system) ||
136 IS_ERR(xtal1) ||
137 IS_ERR(usb24s) ||
138 IS_ERR(fsibck)) {
139 pr_err("armadillo800eva board clock init failed\n");
140 goto clock_error;
141 }
142
143 /* armadillo 800 eva extal1 is 24MHz */
144 clk_set_rate(xtal1, 24000000);
145
146 /* usb24s use extal1 (= system) clock (= 24MHz) */
147 clk_set_parent(usb24s, system);
148
149 /* FSIBCK is 12.288MHz, and it is parent of FSI-B */
150 clk_set_rate(fsibck, 12288000);
151
152clock_error:
153 if (!IS_ERR(system))
154 clk_put(system);
155 if (!IS_ERR(xtal1))
156 clk_put(xtal1);
157 if (!IS_ERR(usb24s))
158 clk_put(usb24s);
159 if (!IS_ERR(fsibck))
160 clk_put(fsibck);
161}
162
163/*
164 * board init
165 */
166static void __init eva_init(void)
167{
168
169 r8a7740_clock_init(MD_CK0 | MD_CK2);
170 eva_clock_init();
171
172 pinctrl_register_mappings(eva_pinctrl_map, ARRAY_SIZE(eva_pinctrl_map));
173 r8a7740_pinmux_init();
174
175 r8a7740_meram_workaround();
176
177 /*
178 * Touchscreen
179 * TODO: Move reset GPIO over to .dts when we can reference it
180 */
181 gpio_request_one(166, GPIOF_OUT_INIT_HIGH, NULL); /* TP_RST_B */
182
183#ifdef CONFIG_CACHE_L2X0
184 /* Early BRESP enable, Shared attribute override enable, 32K*8way */
185 l2x0_init(IOMEM(0xf0002000), 0x40440000, 0x82000fff);
186#endif
187
188 r8a7740_add_standard_devices_dt();
189 r8a7740_pm_init();
190}
191
192#define RESCNT2 IOMEM(0xe6188020)
193static void eva_restart(char mode, const char *cmd)
194{
195 /* Do soft power on reset */
196 writel((1 << 31), RESCNT2);
197}
198
199static const char *eva_boards_compat_dt[] __initdata = {
200 "renesas,armadillo800eva-reference",
201 NULL,
202};
203
204DT_MACHINE_START(ARMADILLO800EVA_DT, "armadillo800eva-reference")
205 .map_io = r8a7740_map_io,
206 .init_early = r8a7740_init_delay,
207 .init_irq = r8a7740_init_irq_of,
208 .init_machine = eva_init,
209 .init_time = shmobile_timer_init,
210 .init_late = shmobile_init_late,
211 .dt_compat = eva_boards_compat_dt,
212 .restart = eva_restart,
213MACHINE_END
diff --git a/arch/arm/mach-shmobile/board-armadillo800eva.c b/arch/arm/mach-shmobile/board-armadillo800eva.c
index b85b2882dbd0..c5be60d85e4b 100644
--- a/arch/arm/mach-shmobile/board-armadillo800eva.c
+++ b/arch/arm/mach-shmobile/board-armadillo800eva.c
@@ -42,6 +42,7 @@
42#include <linux/mmc/sh_mmcif.h> 42#include <linux/mmc/sh_mmcif.h>
43#include <linux/mmc/sh_mobile_sdhi.h> 43#include <linux/mmc/sh_mobile_sdhi.h>
44#include <linux/i2c-gpio.h> 44#include <linux/i2c-gpio.h>
45#include <linux/reboot.h>
45#include <mach/common.h> 46#include <mach/common.h>
46#include <mach/irqs.h> 47#include <mach/irqs.h>
47#include <mach/r8a7740.h> 48#include <mach/r8a7740.h>
@@ -377,7 +378,7 @@ static struct resource sh_eth_resources[] = {
377}; 378};
378 379
379static struct platform_device sh_eth_device = { 380static struct platform_device sh_eth_device = {
380 .name = "sh-eth", 381 .name = "r8a7740-gether",
381 .id = -1, 382 .id = -1,
382 .dev = { 383 .dev = {
383 .platform_data = &sh_eth_platdata, 384 .platform_data = &sh_eth_platdata,
@@ -584,7 +585,7 @@ static struct regulator_init_data vcc_sdhi0_init_data = {
584static struct fixed_voltage_config vcc_sdhi0_info = { 585static struct fixed_voltage_config vcc_sdhi0_info = {
585 .supply_name = "SDHI0 Vcc", 586 .supply_name = "SDHI0 Vcc",
586 .microvolts = 3300000, 587 .microvolts = 3300000,
587 .gpio = GPIO_PORT75, 588 .gpio = 75,
588 .enable_high = 1, 589 .enable_high = 1,
589 .init_data = &vcc_sdhi0_init_data, 590 .init_data = &vcc_sdhi0_init_data,
590}; 591};
@@ -615,7 +616,7 @@ static struct regulator_init_data vccq_sdhi0_init_data = {
615}; 616};
616 617
617static struct gpio vccq_sdhi0_gpios[] = { 618static struct gpio vccq_sdhi0_gpios[] = {
618 {GPIO_PORT17, GPIOF_OUT_INIT_LOW, "vccq-sdhi0" }, 619 {17, GPIOF_OUT_INIT_LOW, "vccq-sdhi0" },
619}; 620};
620 621
621static struct gpio_regulator_state vccq_sdhi0_states[] = { 622static struct gpio_regulator_state vccq_sdhi0_states[] = {
@@ -626,7 +627,7 @@ static struct gpio_regulator_state vccq_sdhi0_states[] = {
626static struct gpio_regulator_config vccq_sdhi0_info = { 627static struct gpio_regulator_config vccq_sdhi0_info = {
627 .supply_name = "vqmmc", 628 .supply_name = "vqmmc",
628 629
629 .enable_gpio = GPIO_PORT74, 630 .enable_gpio = 74,
630 .enable_high = 1, 631 .enable_high = 1,
631 .enabled_at_boot = 0, 632 .enabled_at_boot = 0,
632 633
@@ -664,7 +665,7 @@ static struct regulator_init_data vcc_sdhi1_init_data = {
664static struct fixed_voltage_config vcc_sdhi1_info = { 665static struct fixed_voltage_config vcc_sdhi1_info = {
665 .supply_name = "SDHI1 Vcc", 666 .supply_name = "SDHI1 Vcc",
666 .microvolts = 3300000, 667 .microvolts = 3300000,
667 .gpio = GPIO_PORT16, 668 .gpio = 16,
668 .enable_high = 1, 669 .enable_high = 1,
669 .init_data = &vcc_sdhi1_init_data, 670 .init_data = &vcc_sdhi1_init_data,
670}; 671};
@@ -693,7 +694,7 @@ static struct sh_mobile_sdhi_info sdhi0_info = {
693 .tmio_caps = MMC_CAP_SD_HIGHSPEED | MMC_CAP_SDIO_IRQ | 694 .tmio_caps = MMC_CAP_SD_HIGHSPEED | MMC_CAP_SDIO_IRQ |
694 MMC_CAP_POWER_OFF_CARD, 695 MMC_CAP_POWER_OFF_CARD,
695 .tmio_flags = TMIO_MMC_HAS_IDLE_WAIT | TMIO_MMC_USE_GPIO_CD, 696 .tmio_flags = TMIO_MMC_HAS_IDLE_WAIT | TMIO_MMC_USE_GPIO_CD,
696 .cd_gpio = GPIO_PORT167, 697 .cd_gpio = 167,
697}; 698};
698 699
699static struct resource sdhi0_resources[] = { 700static struct resource sdhi0_resources[] = {
@@ -736,7 +737,7 @@ static struct sh_mobile_sdhi_info sdhi1_info = {
736 MMC_CAP_POWER_OFF_CARD, 737 MMC_CAP_POWER_OFF_CARD,
737 .tmio_flags = TMIO_MMC_HAS_IDLE_WAIT | TMIO_MMC_USE_GPIO_CD, 738 .tmio_flags = TMIO_MMC_HAS_IDLE_WAIT | TMIO_MMC_USE_GPIO_CD,
738 /* Port72 cannot generate IRQs, will be used in polling mode. */ 739 /* Port72 cannot generate IRQs, will be used in polling mode. */
739 .cd_gpio = GPIO_PORT72, 740 .cd_gpio = 72,
740}; 741};
741 742
742static struct resource sdhi1_resources[] = { 743static struct resource sdhi1_resources[] = {
@@ -1046,6 +1047,35 @@ static struct platform_device *eva_devices[] __initdata = {
1046}; 1047};
1047 1048
1048static const struct pinctrl_map eva_pinctrl_map[] = { 1049static const struct pinctrl_map eva_pinctrl_map[] = {
1050 /* CEU0 */
1051 PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_ceu.0", "pfc-r8a7740",
1052 "ceu0_data_0_7", "ceu0"),
1053 PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_ceu.0", "pfc-r8a7740",
1054 "ceu0_clk_0", "ceu0"),
1055 PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_ceu.0", "pfc-r8a7740",
1056 "ceu0_sync", "ceu0"),
1057 PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_ceu.0", "pfc-r8a7740",
1058 "ceu0_field", "ceu0"),
1059 /* FSIA */
1060 PIN_MAP_MUX_GROUP_DEFAULT("asoc-simple-card.0", "pfc-r8a7740",
1061 "fsia_sclk_in", "fsia"),
1062 PIN_MAP_MUX_GROUP_DEFAULT("asoc-simple-card.0", "pfc-r8a7740",
1063 "fsia_mclk_out", "fsia"),
1064 PIN_MAP_MUX_GROUP_DEFAULT("asoc-simple-card.0", "pfc-r8a7740",
1065 "fsia_data_in_1", "fsia"),
1066 PIN_MAP_MUX_GROUP_DEFAULT("asoc-simple-card.0", "pfc-r8a7740",
1067 "fsia_data_out_0", "fsia"),
1068 /* FSIB */
1069 PIN_MAP_MUX_GROUP_DEFAULT("asoc-simple-card.1", "pfc-r8a7740",
1070 "fsib_mclk_in", "fsib"),
1071 /* GETHER */
1072 PIN_MAP_MUX_GROUP_DEFAULT("sh-eth", "pfc-r8a7740",
1073 "gether_mii", "gether"),
1074 PIN_MAP_MUX_GROUP_DEFAULT("sh-eth", "pfc-r8a7740",
1075 "gether_int", "gether"),
1076 /* HDMI */
1077 PIN_MAP_MUX_GROUP_DEFAULT("sh-mobile-hdmi", "pfc-r8a7740",
1078 "hdmi", "hdmi"),
1049 /* LCD0 */ 1079 /* LCD0 */
1050 PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_lcdc_fb.0", "pfc-r8a7740", 1080 PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_lcdc_fb.0", "pfc-r8a7740",
1051 "lcd0_data24_0", "lcd0"), 1081 "lcd0_data24_0", "lcd0"),
@@ -1058,6 +1088,9 @@ static const struct pinctrl_map eva_pinctrl_map[] = {
1058 "mmc0_data8_1", "mmc0"), 1088 "mmc0_data8_1", "mmc0"),
1059 PIN_MAP_MUX_GROUP_DEFAULT("sh_mmcif.0", "pfc-r8a7740", 1089 PIN_MAP_MUX_GROUP_DEFAULT("sh_mmcif.0", "pfc-r8a7740",
1060 "mmc0_ctrl_1", "mmc0"), 1090 "mmc0_ctrl_1", "mmc0"),
1091 /* SCIFA1 */
1092 PIN_MAP_MUX_GROUP_DEFAULT("sh-sci.1", "pfc-r8a7740",
1093 "scifa1_data", "scifa1"),
1061 /* SDHI0 */ 1094 /* SDHI0 */
1062 PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.0", "pfc-r8a7740", 1095 PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.0", "pfc-r8a7740",
1063 "sdhi0_data4", "sdhi0"), 1096 "sdhi0_data4", "sdhi0"),
@@ -1065,6 +1098,12 @@ static const struct pinctrl_map eva_pinctrl_map[] = {
1065 "sdhi0_ctrl", "sdhi0"), 1098 "sdhi0_ctrl", "sdhi0"),
1066 PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.0", "pfc-r8a7740", 1099 PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.0", "pfc-r8a7740",
1067 "sdhi0_wp", "sdhi0"), 1100 "sdhi0_wp", "sdhi0"),
1101 /* ST1232 */
1102 PIN_MAP_MUX_GROUP_DEFAULT("0-0055", "pfc-r8a7740",
1103 "intc_irq10", "intc"),
1104 /* USBHS */
1105 PIN_MAP_MUX_GROUP_DEFAULT("renesas_usbhs", "pfc-r8a7740",
1106 "intc_irq7_1", "intc"),
1068}; 1107};
1069 1108
1070static void __init eva_clock_init(void) 1109static void __init eva_clock_init(void)
@@ -1119,40 +1158,11 @@ static void __init eva_init(void)
1119 r8a7740_pinmux_init(); 1158 r8a7740_pinmux_init();
1120 r8a7740_meram_workaround(); 1159 r8a7740_meram_workaround();
1121 1160
1122 /* SCIFA1 */
1123 gpio_request(GPIO_FN_SCIFA1_RXD, NULL);
1124 gpio_request(GPIO_FN_SCIFA1_TXD, NULL);
1125
1126 /* LCDC0 */ 1161 /* LCDC0 */
1127 gpio_request(GPIO_FN_LCDC0_SELECT, NULL);
1128
1129 gpio_request_one(61, GPIOF_OUT_INIT_HIGH, NULL); /* LCDDON */ 1162 gpio_request_one(61, GPIOF_OUT_INIT_HIGH, NULL); /* LCDDON */
1130 gpio_request_one(202, GPIOF_OUT_INIT_LOW, NULL); /* LCD0_LED_CONT */ 1163 gpio_request_one(202, GPIOF_OUT_INIT_LOW, NULL); /* LCD0_LED_CONT */
1131 1164
1132 /* Touchscreen */
1133 gpio_request(GPIO_FN_IRQ10, NULL); /* TP_INT */
1134
1135 /* GETHER */ 1165 /* GETHER */
1136 gpio_request(GPIO_FN_ET_CRS, NULL);
1137 gpio_request(GPIO_FN_ET_MDC, NULL);
1138 gpio_request(GPIO_FN_ET_MDIO, NULL);
1139 gpio_request(GPIO_FN_ET_TX_ER, NULL);
1140 gpio_request(GPIO_FN_ET_RX_ER, NULL);
1141 gpio_request(GPIO_FN_ET_ERXD0, NULL);
1142 gpio_request(GPIO_FN_ET_ERXD1, NULL);
1143 gpio_request(GPIO_FN_ET_ERXD2, NULL);
1144 gpio_request(GPIO_FN_ET_ERXD3, NULL);
1145 gpio_request(GPIO_FN_ET_TX_CLK, NULL);
1146 gpio_request(GPIO_FN_ET_TX_EN, NULL);
1147 gpio_request(GPIO_FN_ET_ETXD0, NULL);
1148 gpio_request(GPIO_FN_ET_ETXD1, NULL);
1149 gpio_request(GPIO_FN_ET_ETXD2, NULL);
1150 gpio_request(GPIO_FN_ET_ETXD3, NULL);
1151 gpio_request(GPIO_FN_ET_PHY_INT, NULL);
1152 gpio_request(GPIO_FN_ET_COL, NULL);
1153 gpio_request(GPIO_FN_ET_RX_DV, NULL);
1154 gpio_request(GPIO_FN_ET_RX_CLK, NULL);
1155
1156 gpio_request_one(18, GPIOF_OUT_INIT_HIGH, NULL); /* PHY_RST */ 1166 gpio_request_one(18, GPIOF_OUT_INIT_HIGH, NULL); /* PHY_RST */
1157 1167
1158 /* USB */ 1168 /* USB */
@@ -1163,34 +1173,17 @@ static void __init eva_init(void)
1163 } else { 1173 } else {
1164 /* USB Func */ 1174 /* USB Func */
1165 /* 1175 /*
1166 * A1 chip has 2 IRQ7 pin and it was controled by MSEL register. 1176 * The USBHS interrupt handlers needs to read the IRQ pin value
1167 * OTOH, usbhs interrupt needs its value (HI/LOW) to decide 1177 * (HI/LOW) to diffentiate USB connection and disconnection
1168 * USB connection/disconnection (usbhsf_get_vbus()). 1178 * events (usbhsf_get_vbus()). We thus need to select both the
1169 * This means we needs to select GPIO_FN_IRQ7_PORT209 first, 1179 * intc_irq7_1 pin group and GPIO 209 here.
1170 * and select GPIO 209 here
1171 */ 1180 */
1172 gpio_request(GPIO_FN_IRQ7_PORT209, NULL);
1173 gpio_request_one(209, GPIOF_IN, NULL); 1181 gpio_request_one(209, GPIOF_IN, NULL);
1174 1182
1175 platform_device_register(&usbhsf_device); 1183 platform_device_register(&usbhsf_device);
1176 usb = &usbhsf_device; 1184 usb = &usbhsf_device;
1177 } 1185 }
1178 1186
1179 /* CEU0 */
1180 gpio_request(GPIO_FN_VIO0_D7, NULL);
1181 gpio_request(GPIO_FN_VIO0_D6, NULL);
1182 gpio_request(GPIO_FN_VIO0_D5, NULL);
1183 gpio_request(GPIO_FN_VIO0_D4, NULL);
1184 gpio_request(GPIO_FN_VIO0_D3, NULL);
1185 gpio_request(GPIO_FN_VIO0_D2, NULL);
1186 gpio_request(GPIO_FN_VIO0_D1, NULL);
1187 gpio_request(GPIO_FN_VIO0_D0, NULL);
1188 gpio_request(GPIO_FN_VIO0_CLK, NULL);
1189 gpio_request(GPIO_FN_VIO0_HD, NULL);
1190 gpio_request(GPIO_FN_VIO0_VD, NULL);
1191 gpio_request(GPIO_FN_VIO0_FIELD, NULL);
1192 gpio_request(GPIO_FN_VIO_CKO, NULL);
1193
1194 /* CON1/CON15 Camera */ 1187 /* CON1/CON15 Camera */
1195 gpio_request_one(173, GPIOF_OUT_INIT_LOW, NULL); /* STANDBY */ 1188 gpio_request_one(173, GPIOF_OUT_INIT_LOW, NULL); /* STANDBY */
1196 gpio_request_one(172, GPIOF_OUT_INIT_HIGH, NULL); /* RST */ 1189 gpio_request_one(172, GPIOF_OUT_INIT_HIGH, NULL); /* RST */
@@ -1198,24 +1191,11 @@ static void __init eva_init(void)
1198 gpio_request_one(158, GPIOF_OUT_INIT_LOW, NULL); /* CAM_PON */ 1191 gpio_request_one(158, GPIOF_OUT_INIT_LOW, NULL); /* CAM_PON */
1199 1192
1200 /* FSI-WM8978 */ 1193 /* FSI-WM8978 */
1201 gpio_request(GPIO_FN_FSIAIBT, NULL);
1202 gpio_request(GPIO_FN_FSIAILR, NULL);
1203 gpio_request(GPIO_FN_FSIAOMC, NULL);
1204 gpio_request(GPIO_FN_FSIAOSLD, NULL);
1205 gpio_request(GPIO_FN_FSIAISLD_PORT5, NULL);
1206
1207 gpio_request(7, NULL); 1194 gpio_request(7, NULL);
1208 gpio_request(8, NULL); 1195 gpio_request(8, NULL);
1209 gpio_direction_none(GPIO_PORT7CR); /* FSIAOBT needs no direction */ 1196 gpio_direction_none(GPIO_PORT7CR); /* FSIAOBT needs no direction */
1210 gpio_direction_none(GPIO_PORT8CR); /* FSIAOLR needs no direction */ 1197 gpio_direction_none(GPIO_PORT8CR); /* FSIAOLR needs no direction */
1211 1198
1212 /* FSI-HDMI */
1213 gpio_request(GPIO_FN_FSIBCK, NULL);
1214
1215 /* HDMI */
1216 gpio_request(GPIO_FN_HDMI_HPD, NULL);
1217 gpio_request(GPIO_FN_HDMI_CEC, NULL);
1218
1219 /* 1199 /*
1220 * CAUTION 1200 * CAUTION
1221 * 1201 *
@@ -1277,7 +1257,7 @@ static void __init eva_add_early_devices(void)
1277} 1257}
1278 1258
1279#define RESCNT2 IOMEM(0xe6188020) 1259#define RESCNT2 IOMEM(0xe6188020)
1280static void eva_restart(char mode, const char *cmd) 1260static void eva_restart(enum reboot_mode mode, const char *cmd)
1281{ 1261{
1282 /* Do soft power on reset */ 1262 /* Do soft power on reset */
1283 writel((1 << 31), RESCNT2); 1263 writel((1 << 31), RESCNT2);
diff --git a/arch/arm/mach-shmobile/board-bockw.c b/arch/arm/mach-shmobile/board-bockw.c
index 38e5e50fb318..3354a85c90f7 100644
--- a/arch/arm/mach-shmobile/board-bockw.c
+++ b/arch/arm/mach-shmobile/board-bockw.c
@@ -18,13 +18,52 @@
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19 */ 19 */
20 20
21#include <linux/mfd/tmio.h>
22#include <linux/mmc/host.h>
23#include <linux/mtd/partitions.h>
24#include <linux/pinctrl/machine.h>
21#include <linux/platform_device.h> 25#include <linux/platform_device.h>
26#include <linux/regulator/fixed.h>
27#include <linux/regulator/machine.h>
22#include <linux/smsc911x.h> 28#include <linux/smsc911x.h>
29#include <linux/spi/spi.h>
30#include <linux/spi/flash.h>
23#include <mach/common.h> 31#include <mach/common.h>
24#include <mach/irqs.h> 32#include <mach/irqs.h>
25#include <mach/r8a7778.h> 33#include <mach/r8a7778.h>
26#include <asm/mach/arch.h> 34#include <asm/mach/arch.h>
27 35
36/*
37 * CN9(Upper side) SCIF/RCAN selection
38 *
39 * 1,4 3,6
40 * SW40 SCIF RCAN
41 * SW41 SCIF RCAN
42 */
43
44/*
45 * MMC (CN26) pin
46 *
47 * SW6 (D2) 3 pin
48 * SW7 (D5) ON
49 * SW8 (D3) 3 pin
50 * SW10 (D4) 1 pin
51 * SW12 (CLK) 1 pin
52 * SW13 (D6) 3 pin
53 * SW14 (CMD) ON
54 * SW15 (D6) 1 pin
55 * SW16 (D0) ON
56 * SW17 (D1) ON
57 * SW18 (D7) 3 pin
58 * SW19 (MMC) 1 pin
59 */
60
61/* Dummy supplies, where voltage doesn't matter */
62static struct regulator_consumer_supply dummy_supplies[] = {
63 REGULATOR_SUPPLY("vddvario", "smsc911x"),
64 REGULATOR_SUPPLY("vdd33a", "smsc911x"),
65};
66
28static struct smsc911x_platform_config smsc911x_data = { 67static struct smsc911x_platform_config smsc911x_data = {
29 .irq_polarity = SMSC911X_IRQ_POLARITY_ACTIVE_LOW, 68 .irq_polarity = SMSC911X_IRQ_POLARITY_ACTIVE_LOW,
30 .irq_type = SMSC911X_IRQ_TYPE_PUSH_PULL, 69 .irq_type = SMSC911X_IRQ_TYPE_PUSH_PULL,
@@ -37,17 +76,134 @@ static struct resource smsc911x_resources[] = {
37 DEFINE_RES_IRQ(irq_pin(0)), /* IRQ 0 */ 76 DEFINE_RES_IRQ(irq_pin(0)), /* IRQ 0 */
38}; 77};
39 78
79/* USB */
80static struct rcar_phy_platform_data usb_phy_platform_data __initdata;
81
82/* SDHI */
83static struct sh_mobile_sdhi_info sdhi0_info = {
84 .tmio_caps = MMC_CAP_SD_HIGHSPEED,
85 .tmio_ocr_mask = MMC_VDD_165_195 | MMC_VDD_32_33 | MMC_VDD_33_34,
86 .tmio_flags = TMIO_MMC_HAS_IDLE_WAIT,
87};
88
89static struct sh_eth_plat_data ether_platform_data __initdata = {
90 .phy = 0x01,
91 .edmac_endian = EDMAC_LITTLE_ENDIAN,
92 .register_type = SH_ETH_REG_FAST_RCAR,
93 .phy_interface = PHY_INTERFACE_MODE_RMII,
94 /*
95 * Although the LINK signal is available on the board, it's connected to
96 * the link/activity LED output of the PHY, thus the link disappears and
97 * reappears after each packet. We'd be better off ignoring such signal
98 * and getting the link state from the PHY indirectly.
99 */
100 .no_ether_link = 1,
101};
102
103/* I2C */
104static struct i2c_board_info i2c0_devices[] = {
105 {
106 I2C_BOARD_INFO("rx8581", 0x51),
107 },
108};
109
110/* HSPI*/
111static struct mtd_partition m25p80_spi_flash_partitions[] = {
112 {
113 .name = "data(spi)",
114 .size = 0x0100000,
115 .offset = 0,
116 },
117};
118
119static struct flash_platform_data spi_flash_data = {
120 .name = "m25p80",
121 .type = "s25fl008k",
122 .parts = m25p80_spi_flash_partitions,
123 .nr_parts = ARRAY_SIZE(m25p80_spi_flash_partitions),
124};
125
126static struct spi_board_info spi_board_info[] __initdata = {
127 {
128 .modalias = "m25p80",
129 .max_speed_hz = 104000000,
130 .chip_select = 0,
131 .bus_num = 0,
132 .mode = SPI_MODE_0,
133 .platform_data = &spi_flash_data,
134 },
135};
136
137/* MMC */
138static struct sh_mmcif_plat_data sh_mmcif_plat = {
139 .sup_pclk = 0,
140 .ocr = MMC_VDD_165_195 | MMC_VDD_32_33 | MMC_VDD_33_34,
141 .caps = MMC_CAP_4_BIT_DATA |
142 MMC_CAP_8_BIT_DATA |
143 MMC_CAP_NEEDS_POLL,
144};
145
146static const struct pinctrl_map bockw_pinctrl_map[] = {
147 /* Ether */
148 PIN_MAP_MUX_GROUP_DEFAULT("r8a777x-ether", "pfc-r8a7778",
149 "ether_rmii", "ether"),
150 /* HSPI0 */
151 PIN_MAP_MUX_GROUP_DEFAULT("sh-hspi.0", "pfc-r8a7778",
152 "hspi0_a", "hspi0"),
153 /* MMC */
154 PIN_MAP_MUX_GROUP_DEFAULT("sh_mmcif", "pfc-r8a7778",
155 "mmc_data8", "mmc"),
156 PIN_MAP_MUX_GROUP_DEFAULT("sh_mmcif", "pfc-r8a7778",
157 "mmc_ctrl", "mmc"),
158 /* SCIF0 */
159 PIN_MAP_MUX_GROUP_DEFAULT("sh-sci.0", "pfc-r8a7778",
160 "scif0_data_a", "scif0"),
161 PIN_MAP_MUX_GROUP_DEFAULT("sh-sci.0", "pfc-r8a7778",
162 "scif0_ctrl", "scif0"),
163 /* USB */
164 PIN_MAP_MUX_GROUP_DEFAULT("ehci-platform", "pfc-r8a7778",
165 "usb0", "usb0"),
166 PIN_MAP_MUX_GROUP_DEFAULT("ehci-platform", "pfc-r8a7778",
167 "usb1", "usb1"),
168 /* SDHI0 */
169 PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.0", "pfc-r8a7778",
170 "sdhi0_data4", "sdhi0"),
171 PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.0", "pfc-r8a7778",
172 "sdhi0_ctrl", "sdhi0"),
173 PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.0", "pfc-r8a7778",
174 "sdhi0_cd", "sdhi0"),
175 PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.0", "pfc-r8a7778",
176 "sdhi0_wp", "sdhi0"),
177};
178
179#define FPGA 0x18200000
40#define IRQ0MR 0x30 180#define IRQ0MR 0x30
181#define PFC 0xfffc0000
182#define PUPR4 0x110
41static void __init bockw_init(void) 183static void __init bockw_init(void)
42{ 184{
43 void __iomem *fpga; 185 void __iomem *base;
44 186
45 r8a7778_clock_init(); 187 r8a7778_clock_init();
46 r8a7778_init_irq_extpin(1); 188 r8a7778_init_irq_extpin(1);
47 r8a7778_add_standard_devices(); 189 r8a7778_add_standard_devices();
190 r8a7778_add_usb_phy_device(&usb_phy_platform_data);
191 r8a7778_add_ether_device(&ether_platform_data);
192 r8a7778_add_i2c_device(0);
193 r8a7778_add_hspi_device(0);
194 r8a7778_add_mmc_device(&sh_mmcif_plat);
48 195
49 fpga = ioremap_nocache(0x18200000, SZ_1M); 196 i2c_register_board_info(0, i2c0_devices,
50 if (fpga) { 197 ARRAY_SIZE(i2c0_devices));
198 spi_register_board_info(spi_board_info,
199 ARRAY_SIZE(spi_board_info));
200 pinctrl_register_mappings(bockw_pinctrl_map,
201 ARRAY_SIZE(bockw_pinctrl_map));
202 r8a7778_pinmux_init();
203
204 /* for SMSC */
205 base = ioremap_nocache(FPGA, SZ_1M);
206 if (base) {
51 /* 207 /*
52 * CAUTION 208 * CAUTION
53 * 209 *
@@ -55,16 +211,33 @@ static void __init bockw_init(void)
55 * it should be cared in the future 211 * it should be cared in the future
56 * Now, it is assuming IRQ0 was used only from SMSC. 212 * Now, it is assuming IRQ0 was used only from SMSC.
57 */ 213 */
58 u16 val = ioread16(fpga + IRQ0MR); 214 u16 val = ioread16(base + IRQ0MR);
59 val &= ~(1 << 4); /* enable SMSC911x */ 215 val &= ~(1 << 4); /* enable SMSC911x */
60 iowrite16(val, fpga + IRQ0MR); 216 iowrite16(val, base + IRQ0MR);
61 iounmap(fpga); 217 iounmap(base);
218
219 regulator_register_fixed(0, dummy_supplies,
220 ARRAY_SIZE(dummy_supplies));
62 221
63 platform_device_register_resndata( 222 platform_device_register_resndata(
64 &platform_bus, "smsc911x", -1, 223 &platform_bus, "smsc911x", -1,
65 smsc911x_resources, ARRAY_SIZE(smsc911x_resources), 224 smsc911x_resources, ARRAY_SIZE(smsc911x_resources),
66 &smsc911x_data, sizeof(smsc911x_data)); 225 &smsc911x_data, sizeof(smsc911x_data));
67 } 226 }
227
228 /* for SDHI */
229 base = ioremap_nocache(PFC, 0x200);
230 if (base) {
231 /*
232 * FIXME
233 *
234 * SDHI CD/WP pin needs pull-up
235 */
236 iowrite32(ioread32(base + PUPR4) | (3 << 26), base + PUPR4);
237 iounmap(base);
238
239 r8a7778_sdhi_init(0, &sdhi0_info);
240 }
68} 241}
69 242
70static const char *bockw_boards_compat_dt[] __initdata = { 243static const char *bockw_boards_compat_dt[] __initdata = {
@@ -78,4 +251,5 @@ DT_MACHINE_START(BOCKW_DT, "bockw")
78 .init_machine = bockw_init, 251 .init_machine = bockw_init,
79 .init_time = shmobile_timer_init, 252 .init_time = shmobile_timer_init,
80 .dt_compat = bockw_boards_compat_dt, 253 .dt_compat = bockw_boards_compat_dt,
254 .init_late = r8a7778_init_late,
81MACHINE_END 255MACHINE_END
diff --git a/arch/arm/mach-shmobile/board-bonito.c b/arch/arm/mach-shmobile/board-bonito.c
deleted file mode 100644
index 70d992c540ae..000000000000
--- a/arch/arm/mach-shmobile/board-bonito.c
+++ /dev/null
@@ -1,495 +0,0 @@
1/*
2 * bonito board support
3 *
4 * Copyright (C) 2011 Renesas Solutions Corp.
5 * Copyright (C) 2011 Kuninori Morimoto <kuninori.morimoto.gx@renesas.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; version 2 of the License.
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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19 *
20 */
21
22#include <linux/kernel.h>
23#include <linux/i2c.h>
24#include <linux/init.h>
25#include <linux/interrupt.h>
26#include <linux/irq.h>
27#include <linux/pinctrl/machine.h>
28#include <linux/platform_device.h>
29#include <linux/gpio.h>
30#include <linux/regulator/fixed.h>
31#include <linux/regulator/machine.h>
32#include <linux/smsc911x.h>
33#include <linux/videodev2.h>
34#include <mach/common.h>
35#include <asm/mach-types.h>
36#include <asm/mach/arch.h>
37#include <asm/mach/map.h>
38#include <asm/mach/time.h>
39#include <asm/hardware/cache-l2x0.h>
40#include <mach/r8a7740.h>
41#include <mach/irqs.h>
42#include <video/sh_mobile_lcdc.h>
43
44/*
45 * CS Address device note
46 *----------------------------------------------------------------
47 * 0 0x0000_0000 NOR Flash (64MB) SW12 : bit3 = OFF
48 * 2 0x0800_0000 ExtNOR (64MB) SW12 : bit3 = OFF
49 * 4 -
50 * 5A -
51 * 5B 0x1600_0000 SRAM (8MB)
52 * 6 0x1800_0000 FPGA (64K)
53 * 0x1801_0000 Ether (4KB)
54 * 0x1801_1000 USB (4KB)
55 */
56
57/*
58 * SW12
59 *
60 * bit1 bit2 bit3
61 *----------------------------------------------------------------------------
62 * ON NOR WriteProtect NAND WriteProtect CS0 ExtNOR / CS2 NOR
63 * OFF NOR Not WriteProtect NAND Not WriteProtect CS0 NOR / CS2 ExtNOR
64 */
65
66/*
67 * SCIFA5 (CN42)
68 *
69 * S38.3 = ON
70 * S39.6 = ON
71 * S43.1 = ON
72 */
73
74/*
75 * LCDC0 (CN3/CN4/CN7)
76 *
77 * S38.1 = OFF
78 * S38.2 = OFF
79 */
80
81/* Dummy supplies, where voltage doesn't matter */
82static struct regulator_consumer_supply dummy_supplies[] = {
83 REGULATOR_SUPPLY("vddvario", "smsc911x"),
84 REGULATOR_SUPPLY("vdd33a", "smsc911x"),
85};
86
87/*
88 * FPGA
89 */
90#define IRQSR0 0x0020
91#define IRQSR1 0x0022
92#define IRQMR0 0x0030
93#define IRQMR1 0x0032
94#define BUSSWMR1 0x0070
95#define BUSSWMR2 0x0072
96#define BUSSWMR3 0x0074
97#define BUSSWMR4 0x0076
98
99#define LCDCR 0x10B4
100#define DEVRSTCR1 0x10D0
101#define DEVRSTCR2 0x10D2
102#define A1MDSR 0x10E0
103#define BVERR 0x1100
104
105/* FPGA IRQ */
106#define FPGA_IRQ_BASE (512)
107#define FPGA_IRQ0 (FPGA_IRQ_BASE)
108#define FPGA_IRQ1 (FPGA_IRQ_BASE + 16)
109#define FPGA_ETH_IRQ (FPGA_IRQ0 + 15)
110static u16 bonito_fpga_read(u32 offset)
111{
112 return __raw_readw(IOMEM(0xf0003000) + offset);
113}
114
115static void bonito_fpga_write(u32 offset, u16 val)
116{
117 __raw_writew(val, IOMEM(0xf0003000) + offset);
118}
119
120static void bonito_fpga_irq_disable(struct irq_data *data)
121{
122 unsigned int irq = data->irq;
123 u32 addr = (irq < 1016) ? IRQMR0 : IRQMR1;
124 int shift = irq % 16;
125
126 bonito_fpga_write(addr, bonito_fpga_read(addr) | (1 << shift));
127}
128
129static void bonito_fpga_irq_enable(struct irq_data *data)
130{
131 unsigned int irq = data->irq;
132 u32 addr = (irq < 1016) ? IRQMR0 : IRQMR1;
133 int shift = irq % 16;
134
135 bonito_fpga_write(addr, bonito_fpga_read(addr) & ~(1 << shift));
136}
137
138static struct irq_chip bonito_fpga_irq_chip __read_mostly = {
139 .name = "bonito FPGA",
140 .irq_mask = bonito_fpga_irq_disable,
141 .irq_unmask = bonito_fpga_irq_enable,
142};
143
144static void bonito_fpga_irq_demux(unsigned int irq, struct irq_desc *desc)
145{
146 u32 val = bonito_fpga_read(IRQSR1) << 16 |
147 bonito_fpga_read(IRQSR0);
148 u32 mask = bonito_fpga_read(IRQMR1) << 16 |
149 bonito_fpga_read(IRQMR0);
150
151 int i;
152
153 val &= ~mask;
154
155 for (i = 0; i < 32; i++) {
156 if (!(val & (1 << i)))
157 continue;
158
159 generic_handle_irq(FPGA_IRQ_BASE + i);
160 }
161}
162
163static void bonito_fpga_init(void)
164{
165 int i;
166
167 bonito_fpga_write(IRQMR0, 0xffff); /* mask all */
168 bonito_fpga_write(IRQMR1, 0xffff); /* mask all */
169
170 /* Device reset */
171 bonito_fpga_write(DEVRSTCR1,
172 (1 << 2)); /* Eth */
173
174 /* FPGA irq require special handling */
175 for (i = FPGA_IRQ_BASE; i < FPGA_IRQ_BASE + 32; i++) {
176 irq_set_chip_and_handler_name(i, &bonito_fpga_irq_chip,
177 handle_level_irq, "level");
178 set_irq_flags(i, IRQF_VALID); /* yuck */
179 }
180
181 irq_set_chained_handler(evt2irq(0x0340), bonito_fpga_irq_demux);
182 irq_set_irq_type(evt2irq(0x0340), IRQ_TYPE_LEVEL_LOW);
183}
184
185/*
186* PMIC settings
187*
188* FIXME
189*
190* bonito board needs some settings by pmic which use i2c access.
191* pmic settings use device_initcall() here for use it.
192*/
193static __u8 *pmic_settings = NULL;
194static __u8 pmic_do_2A[] = {
195 0x1C, 0x09,
196 0x1A, 0x80,
197 0xff, 0xff,
198};
199
200static int __init pmic_init(void)
201{
202 struct i2c_adapter *a = i2c_get_adapter(0);
203 struct i2c_msg msg;
204 __u8 buf[2];
205 int i, ret;
206
207 if (!pmic_settings)
208 return 0;
209 if (!a)
210 return 0;
211
212 msg.addr = 0x46;
213 msg.buf = buf;
214 msg.len = 2;
215 msg.flags = 0;
216
217 for (i = 0; ; i += 2) {
218 buf[0] = pmic_settings[i + 0];
219 buf[1] = pmic_settings[i + 1];
220
221 if ((0xff == buf[0]) && (0xff == buf[1]))
222 break;
223
224 ret = i2c_transfer(a, &msg, 1);
225 if (ret < 0) {
226 pr_err("i2c transfer fail\n");
227 break;
228 }
229 }
230
231 return 0;
232}
233device_initcall(pmic_init);
234
235/*
236 * LCDC0
237 */
238static const struct fb_videomode lcdc0_mode = {
239 .name = "WVGA Panel",
240 .xres = 800,
241 .yres = 480,
242 .left_margin = 88,
243 .right_margin = 40,
244 .hsync_len = 128,
245 .upper_margin = 20,
246 .lower_margin = 5,
247 .vsync_len = 5,
248 .sync = 0,
249};
250
251static struct sh_mobile_lcdc_info lcdc0_info = {
252 .clock_source = LCDC_CLK_BUS,
253 .ch[0] = {
254 .chan = LCDC_CHAN_MAINLCD,
255 .fourcc = V4L2_PIX_FMT_RGB565,
256 .interface_type = RGB24,
257 .clock_divider = 5,
258 .flags = 0,
259 .lcd_modes = &lcdc0_mode,
260 .num_modes = 1,
261 .panel_cfg = {
262 .width = 152,
263 .height = 91,
264 },
265 },
266};
267
268static struct resource lcdc0_resources[] = {
269 [0] = {
270 .name = "LCDC0",
271 .start = 0xfe940000,
272 .end = 0xfe943fff,
273 .flags = IORESOURCE_MEM,
274 },
275 [1] = {
276 .start = intcs_evt2irq(0x0580),
277 .flags = IORESOURCE_IRQ,
278 },
279};
280
281static struct platform_device lcdc0_device = {
282 .name = "sh_mobile_lcdc_fb",
283 .id = 0,
284 .resource = lcdc0_resources,
285 .num_resources = ARRAY_SIZE(lcdc0_resources),
286 .dev = {
287 .platform_data = &lcdc0_info,
288 .coherent_dma_mask = ~0,
289 },
290};
291
292static const struct pinctrl_map lcdc0_pinctrl_map[] = {
293 /* LCD0 */
294 PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_lcdc_fb.0", "pfc-r8a7740",
295 "lcd0_data24_1", "lcd0"),
296 PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_lcdc_fb.0", "pfc-r8a7740",
297 "lcd0_lclk_1", "lcd0"),
298 PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_lcdc_fb.0", "pfc-r8a7740",
299 "lcd0_sync", "lcd0"),
300};
301
302/*
303 * SMSC 9221
304 */
305static struct resource smsc_resources[] = {
306 [0] = {
307 .start = 0x18010000,
308 .end = 0x18011000 - 1,
309 .flags = IORESOURCE_MEM,
310 },
311 [1] = {
312 .start = FPGA_ETH_IRQ,
313 .flags = IORESOURCE_IRQ,
314 },
315};
316
317static struct smsc911x_platform_config smsc_platdata = {
318 .flags = SMSC911X_USE_16BIT,
319 .phy_interface = PHY_INTERFACE_MODE_MII,
320 .irq_polarity = SMSC911X_IRQ_POLARITY_ACTIVE_LOW,
321 .irq_type = SMSC911X_IRQ_TYPE_PUSH_PULL,
322};
323
324static struct platform_device smsc_device = {
325 .name = "smsc911x",
326 .dev = {
327 .platform_data = &smsc_platdata,
328 },
329 .resource = smsc_resources,
330 .num_resources = ARRAY_SIZE(smsc_resources),
331};
332
333/*
334 * core board devices
335 */
336static struct platform_device *bonito_core_devices[] __initdata = {
337};
338
339/*
340 * base board devices
341 */
342static struct platform_device *bonito_base_devices[] __initdata = {
343 &lcdc0_device,
344 &smsc_device,
345};
346
347/*
348 * map I/O
349 */
350static struct map_desc bonito_io_desc[] __initdata = {
351 /*
352 * for FPGA (0x1800000-0x19ffffff)
353 * 0x18000000-0x18002000 -> 0xf0003000-0xf0005000
354 */
355 {
356 .virtual = 0xf0003000,
357 .pfn = __phys_to_pfn(0x18000000),
358 .length = PAGE_SIZE * 2,
359 .type = MT_DEVICE_NONSHARED
360 }
361};
362
363static void __init bonito_map_io(void)
364{
365 r8a7740_map_io();
366 iotable_init(bonito_io_desc, ARRAY_SIZE(bonito_io_desc));
367}
368
369/*
370 * board init
371 */
372#define BIT_ON(sw, bit) (sw & (1 << bit))
373#define BIT_OFF(sw, bit) (!(sw & (1 << bit)))
374
375#define VCCQ1CR IOMEM(0xE6058140)
376#define VCCQ1LCDCR IOMEM(0xE6058186)
377
378static void __init bonito_init(void)
379{
380 u16 val;
381
382 regulator_register_fixed(0, dummy_supplies, ARRAY_SIZE(dummy_supplies));
383
384 r8a7740_pinmux_init();
385 bonito_fpga_init();
386
387 pmic_settings = pmic_do_2A;
388
389 /*
390 * core board settings
391 */
392
393#ifdef CONFIG_CACHE_L2X0
394 /* Early BRESP enable, Shared attribute override enable, 32K*8way */
395 l2x0_init(IOMEM(0xf0002000), 0x40440000, 0x82000fff);
396#endif
397
398 r8a7740_add_standard_devices();
399
400 platform_add_devices(bonito_core_devices,
401 ARRAY_SIZE(bonito_core_devices));
402
403 /*
404 * base board settings
405 */
406 gpio_request_one(176, GPIOF_IN, NULL);
407 if (!gpio_get_value(176)) {
408 u16 bsw2;
409 u16 bsw3;
410 u16 bsw4;
411
412 /*
413 * FPGA
414 */
415 gpio_request(GPIO_FN_CS5B, NULL);
416 gpio_request(GPIO_FN_CS6A, NULL);
417 gpio_request(GPIO_FN_CS5A_PORT105, NULL);
418 gpio_request(GPIO_FN_IRQ10, NULL);
419
420 val = bonito_fpga_read(BVERR);
421 pr_info("bonito version: cpu %02x, base %02x\n",
422 ((val >> 8) & 0xFF),
423 ((val >> 0) & 0xFF));
424
425 bsw2 = bonito_fpga_read(BUSSWMR2);
426 bsw3 = bonito_fpga_read(BUSSWMR3);
427 bsw4 = bonito_fpga_read(BUSSWMR4);
428
429 /*
430 * SCIFA5 (CN42)
431 */
432 if (BIT_OFF(bsw2, 1) && /* S38.3 = ON */
433 BIT_OFF(bsw3, 9) && /* S39.6 = ON */
434 BIT_OFF(bsw4, 4)) { /* S43.1 = ON */
435 gpio_request(GPIO_FN_SCIFA5_TXD_PORT91, NULL);
436 gpio_request(GPIO_FN_SCIFA5_RXD_PORT92, NULL);
437 }
438
439 /*
440 * LCDC0 (CN3)
441 */
442 if (BIT_ON(bsw2, 3) && /* S38.1 = OFF */
443 BIT_ON(bsw2, 2)) { /* S38.2 = OFF */
444 pinctrl_register_mappings(lcdc0_pinctrl_map,
445 ARRAY_SIZE(lcdc0_pinctrl_map));
446 gpio_request(GPIO_FN_LCDC0_SELECT, NULL);
447
448 gpio_request_one(61, GPIOF_OUT_INIT_HIGH,
449 NULL); /* LCDDON */
450
451 /* backlight on */
452 bonito_fpga_write(LCDCR, 1);
453
454 /* drivability Max */
455 __raw_writew(0x00FF , VCCQ1LCDCR);
456 __raw_writew(0xFFFF , VCCQ1CR);
457 }
458
459 platform_add_devices(bonito_base_devices,
460 ARRAY_SIZE(bonito_base_devices));
461 }
462}
463
464static void __init bonito_earlytimer_init(void)
465{
466 u16 val;
467 u8 md_ck = 0;
468
469 /* read MD_CK value */
470 val = bonito_fpga_read(A1MDSR);
471 if (val & (1 << 10))
472 md_ck |= MD_CK2;
473 if (val & (1 << 9))
474 md_ck |= MD_CK1;
475 if (val & (1 << 8))
476 md_ck |= MD_CK0;
477
478 r8a7740_clock_init(md_ck);
479 shmobile_earlytimer_init();
480}
481
482static void __init bonito_add_early_devices(void)
483{
484 r8a7740_add_early_devices();
485}
486
487MACHINE_START(BONITO, "bonito")
488 .map_io = bonito_map_io,
489 .init_early = bonito_add_early_devices,
490 .init_irq = r8a7740_init_irq,
491 .handle_irq = shmobile_handle_irq_intc,
492 .init_machine = bonito_init,
493 .init_late = shmobile_init_late,
494 .init_time = bonito_earlytimer_init,
495MACHINE_END
diff --git a/arch/arm/mach-shmobile/board-kzm9d.c b/arch/arm/mach-shmobile/board-kzm9d.c
index c016ccd92433..4368000e1127 100644
--- a/arch/arm/mach-shmobile/board-kzm9d.c
+++ b/arch/arm/mach-shmobile/board-kzm9d.c
@@ -56,7 +56,7 @@ static struct smsc911x_platform_config smsc911x_platdata = {
56 56
57static struct platform_device smsc91x_device = { 57static struct platform_device smsc91x_device = {
58 .name = "smsc911x", 58 .name = "smsc911x",
59 .id = 0, 59 .id = -1,
60 .dev = { 60 .dev = {
61 .platform_data = &smsc911x_platdata, 61 .platform_data = &smsc911x_platdata,
62 }, 62 },
diff --git a/arch/arm/mach-shmobile/board-kzm9g-reference.c b/arch/arm/mach-shmobile/board-kzm9g-reference.c
index aefa50d385b7..44055fe8a45c 100644
--- a/arch/arm/mach-shmobile/board-kzm9g-reference.c
+++ b/arch/arm/mach-shmobile/board-kzm9g-reference.c
@@ -79,7 +79,6 @@ static void __init kzm_init(void)
79 sh73a0_pinmux_init(); 79 sh73a0_pinmux_init();
80 80
81 /* enable SD */ 81 /* enable SD */
82 gpio_request(GPIO_FN_SDHI0_VCCQ_MC0_ON, NULL);
83 gpio_request_one(15, GPIOF_OUT_INIT_HIGH, NULL); /* power */ 82 gpio_request_one(15, GPIOF_OUT_INIT_HIGH, NULL); /* power */
84 83
85 gpio_request_one(14, GPIOF_OUT_INIT_HIGH, NULL); /* power */ 84 gpio_request_one(14, GPIOF_OUT_INIT_HIGH, NULL); /* power */
diff --git a/arch/arm/mach-shmobile/board-kzm9g.c b/arch/arm/mach-shmobile/board-kzm9g.c
index e6b775a10aad..1068120d339f 100644
--- a/arch/arm/mach-shmobile/board-kzm9g.c
+++ b/arch/arm/mach-shmobile/board-kzm9g.c
@@ -29,10 +29,12 @@
29#include <linux/mmc/host.h> 29#include <linux/mmc/host.h>
30#include <linux/mmc/sh_mmcif.h> 30#include <linux/mmc/sh_mmcif.h>
31#include <linux/mmc/sh_mobile_sdhi.h> 31#include <linux/mmc/sh_mobile_sdhi.h>
32#include <linux/mfd/as3711.h>
32#include <linux/mfd/tmio.h> 33#include <linux/mfd/tmio.h>
33#include <linux/pinctrl/machine.h> 34#include <linux/pinctrl/machine.h>
34#include <linux/pinctrl/pinconf-generic.h> 35#include <linux/pinctrl/pinconf-generic.h>
35#include <linux/platform_device.h> 36#include <linux/platform_device.h>
37#include <linux/reboot.h>
36#include <linux/regulator/fixed.h> 38#include <linux/regulator/fixed.h>
37#include <linux/regulator/machine.h> 39#include <linux/regulator/machine.h>
38#include <linux/smsc911x.h> 40#include <linux/smsc911x.h>
@@ -606,6 +608,140 @@ static struct platform_device fsi_ak4648_device = {
606}; 608};
607 609
608/* I2C */ 610/* I2C */
611
612/* StepDown1 is used to supply 1.315V to the CPU */
613static struct regulator_init_data as3711_sd1 = {
614 .constraints = {
615 .name = "1.315V CPU",
616 .boot_on = 1,
617 .always_on = 1,
618 .min_uV = 1315000,
619 .max_uV = 1335000,
620 },
621};
622
623/* StepDown2 is used to supply 1.8V to the CPU and to the board */
624static struct regulator_init_data as3711_sd2 = {
625 .constraints = {
626 .name = "1.8V",
627 .boot_on = 1,
628 .always_on = 1,
629 .min_uV = 1800000,
630 .max_uV = 1800000,
631 },
632};
633
634/*
635 * StepDown3 is switched in parallel with StepDown2, seems to be off,
636 * according to read-back pre-set register values
637 */
638
639/* StepDown4 is used to supply 1.215V to the CPU and to the board */
640static struct regulator_init_data as3711_sd4 = {
641 .constraints = {
642 .name = "1.215V",
643 .boot_on = 1,
644 .always_on = 1,
645 .min_uV = 1215000,
646 .max_uV = 1235000,
647 },
648};
649
650/* LDO1 is unused and unconnected */
651
652/* LDO2 is used to supply 2.8V to the CPU */
653static struct regulator_init_data as3711_ldo2 = {
654 .constraints = {
655 .name = "2.8V CPU",
656 .boot_on = 1,
657 .always_on = 1,
658 .min_uV = 2800000,
659 .max_uV = 2800000,
660 },
661};
662
663/* LDO3 is used to supply 3.0V to the CPU */
664static struct regulator_init_data as3711_ldo3 = {
665 .constraints = {
666 .name = "3.0V CPU",
667 .boot_on = 1,
668 .always_on = 1,
669 .min_uV = 3000000,
670 .max_uV = 3000000,
671 },
672};
673
674/* LDO4 is used to supply 2.8V to the board */
675static struct regulator_init_data as3711_ldo4 = {
676 .constraints = {
677 .name = "2.8V",
678 .boot_on = 1,
679 .always_on = 1,
680 .min_uV = 2800000,
681 .max_uV = 2800000,
682 },
683};
684
685/* LDO5 is switched parallel to LDO4, also set to 2.8V */
686static struct regulator_init_data as3711_ldo5 = {
687 .constraints = {
688 .name = "2.8V #2",
689 .boot_on = 1,
690 .always_on = 1,
691 .min_uV = 2800000,
692 .max_uV = 2800000,
693 },
694};
695
696/* LDO6 is unused and unconnected */
697
698/* LDO7 is used to supply 1.15V to the CPU */
699static struct regulator_init_data as3711_ldo7 = {
700 .constraints = {
701 .name = "1.15V CPU",
702 .boot_on = 1,
703 .always_on = 1,
704 .min_uV = 1150000,
705 .max_uV = 1150000,
706 },
707};
708
709/* LDO8 is switched parallel to LDO7, also set to 1.15V */
710static struct regulator_init_data as3711_ldo8 = {
711 .constraints = {
712 .name = "1.15V CPU #2",
713 .boot_on = 1,
714 .always_on = 1,
715 .min_uV = 1150000,
716 .max_uV = 1150000,
717 },
718};
719
720static struct as3711_platform_data as3711_pdata = {
721 .regulator = {
722 .init_data = {
723 [AS3711_REGULATOR_SD_1] = &as3711_sd1,
724 [AS3711_REGULATOR_SD_2] = &as3711_sd2,
725 [AS3711_REGULATOR_SD_4] = &as3711_sd4,
726 [AS3711_REGULATOR_LDO_2] = &as3711_ldo2,
727 [AS3711_REGULATOR_LDO_3] = &as3711_ldo3,
728 [AS3711_REGULATOR_LDO_4] = &as3711_ldo4,
729 [AS3711_REGULATOR_LDO_5] = &as3711_ldo5,
730 [AS3711_REGULATOR_LDO_7] = &as3711_ldo7,
731 [AS3711_REGULATOR_LDO_8] = &as3711_ldo8,
732 },
733 },
734 .backlight = {
735 .su2_fb = "sh_mobile_lcdc_fb.0",
736 .su2_max_uA = 36000,
737 .su2_feedback = AS3711_SU2_CURR_AUTO,
738 .su2_fbprot = AS3711_SU2_GPIO4,
739 .su2_auto_curr1 = true,
740 .su2_auto_curr2 = true,
741 .su2_auto_curr3 = true,
742 },
743};
744
609static struct pcf857x_platform_data pcf8575_pdata = { 745static struct pcf857x_platform_data pcf8575_pdata = {
610 .gpio_base = GPIO_PCF8575_BASE, 746 .gpio_base = GPIO_PCF8575_BASE,
611}; 747};
@@ -625,6 +761,11 @@ static struct i2c_board_info i2c0_devices[] = {
625 I2C_BOARD_INFO("adxl34x", 0x1d), 761 I2C_BOARD_INFO("adxl34x", 0x1d),
626 .irq = irq_pin(26), /* IRQ26 */ 762 .irq = irq_pin(26), /* IRQ26 */
627 }, 763 },
764 {
765 I2C_BOARD_INFO("as3711", 0x40),
766 .irq = intcs_evt2irq(0x3300), /* IRQ24 */
767 .platform_data = &as3711_pdata,
768 },
628}; 769};
629 770
630static struct i2c_board_info i2c1_devices[] = { 771static struct i2c_board_info i2c1_devices[] = {
@@ -663,13 +804,13 @@ static unsigned long pin_pullup_conf[] = {
663 804
664static const struct pinctrl_map kzm_pinctrl_map[] = { 805static const struct pinctrl_map kzm_pinctrl_map[] = {
665 /* FSIA (AK4648) */ 806 /* FSIA (AK4648) */
666 PIN_MAP_MUX_GROUP_DEFAULT("sh_fsi2.0", "pfc-sh73a0", 807 PIN_MAP_MUX_GROUP_DEFAULT("sh_fsi2", "pfc-sh73a0",
667 "fsia_mclk_in", "fsia"), 808 "fsia_mclk_in", "fsia"),
668 PIN_MAP_MUX_GROUP_DEFAULT("sh_fsi2.0", "pfc-sh73a0", 809 PIN_MAP_MUX_GROUP_DEFAULT("sh_fsi2", "pfc-sh73a0",
669 "fsia_sclk_in", "fsia"), 810 "fsia_sclk_in", "fsia"),
670 PIN_MAP_MUX_GROUP_DEFAULT("sh_fsi2.0", "pfc-sh73a0", 811 PIN_MAP_MUX_GROUP_DEFAULT("sh_fsi2", "pfc-sh73a0",
671 "fsia_data_in", "fsia"), 812 "fsia_data_in", "fsia"),
672 PIN_MAP_MUX_GROUP_DEFAULT("sh_fsi2.0", "pfc-sh73a0", 813 PIN_MAP_MUX_GROUP_DEFAULT("sh_fsi2", "pfc-sh73a0",
673 "fsia_data_out", "fsia"), 814 "fsia_data_out", "fsia"),
674 /* I2C3 */ 815 /* I2C3 */
675 PIN_MAP_MUX_GROUP_DEFAULT("i2c-sh_mobile.3", "pfc-sh73a0", 816 PIN_MAP_MUX_GROUP_DEFAULT("i2c-sh_mobile.3", "pfc-sh73a0",
@@ -715,59 +856,6 @@ static const struct pinctrl_map kzm_pinctrl_map[] = {
715 "usb_vbus", "usb"), 856 "usb_vbus", "usb"),
716}; 857};
717 858
718/*
719 * FIXME
720 *
721 * This is quick hack for enabling LCDC backlight
722 */
723static int __init as3711_enable_lcdc_backlight(void)
724{
725 struct i2c_adapter *a = i2c_get_adapter(0);
726 struct i2c_msg msg;
727 int i, ret;
728 __u8 magic[] = {
729 0x40, 0x2a,
730 0x43, 0x3c,
731 0x44, 0x3c,
732 0x45, 0x3c,
733 0x54, 0x03,
734 0x51, 0x00,
735 0x51, 0x01,
736 0xff, 0x00, /* wait */
737 0x43, 0xf0,
738 0x44, 0xf0,
739 0x45, 0xf0,
740 };
741
742 if (!of_machine_is_compatible("renesas,kzm9g"))
743 return 0;
744
745 if (!a)
746 return 0;
747
748 msg.addr = 0x40;
749 msg.len = 2;
750 msg.flags = 0;
751
752 for (i = 0; i < ARRAY_SIZE(magic); i += 2) {
753 msg.buf = magic + i;
754
755 if (0xff == msg.buf[0]) {
756 udelay(500);
757 continue;
758 }
759
760 ret = i2c_transfer(a, &msg, 1);
761 if (ret < 0) {
762 pr_err("i2c transfer fail\n");
763 break;
764 }
765 }
766
767 return 0;
768}
769device_initcall(as3711_enable_lcdc_backlight);
770
771static void __init kzm_init(void) 859static void __init kzm_init(void)
772{ 860{
773 regulator_register_always_on(2, "fixed-1.8V", fixed1v8_power_consumers, 861 regulator_register_always_on(2, "fixed-1.8V", fixed1v8_power_consumers,
@@ -788,9 +876,6 @@ static void __init kzm_init(void)
788 /* Touchscreen */ 876 /* Touchscreen */
789 gpio_request_one(223, GPIOF_IN, NULL); /* IRQ8 */ 877 gpio_request_one(223, GPIOF_IN, NULL); /* IRQ8 */
790 878
791 /* enable SD */
792 gpio_request(GPIO_FN_SDHI0_VCCQ_MC0_ON, NULL);
793
794#ifdef CONFIG_CACHE_L2X0 879#ifdef CONFIG_CACHE_L2X0
795 /* Early BRESP enable, Shared attribute override enable, 64K*8way */ 880 /* Early BRESP enable, Shared attribute override enable, 64K*8way */
796 l2x0_init(IOMEM(0xf0100000), 0x40460000, 0x82000fff); 881 l2x0_init(IOMEM(0xf0100000), 0x40460000, 0x82000fff);
@@ -806,7 +891,7 @@ static void __init kzm_init(void)
806 sh73a0_pm_init(); 891 sh73a0_pm_init();
807} 892}
808 893
809static void kzm9g_restart(char mode, const char *cmd) 894static void kzm9g_restart(enum reboot_mode mode, const char *cmd)
810{ 895{
811#define RESCNT2 IOMEM(0xe6188020) 896#define RESCNT2 IOMEM(0xe6188020)
812 /* Do soft power on reset */ 897 /* Do soft power on reset */
diff --git a/arch/arm/mach-shmobile/board-lager.c b/arch/arm/mach-shmobile/board-lager.c
index f587187a8603..8d6bd5c5efb9 100644
--- a/arch/arm/mach-shmobile/board-lager.c
+++ b/arch/arm/mach-shmobile/board-lager.c
@@ -18,19 +18,83 @@
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19 */ 19 */
20 20
21#include <linux/gpio.h>
22#include <linux/gpio_keys.h>
23#include <linux/input.h>
21#include <linux/interrupt.h> 24#include <linux/interrupt.h>
22#include <linux/irqchip.h> 25#include <linux/irqchip.h>
23#include <linux/kernel.h> 26#include <linux/kernel.h>
27#include <linux/leds.h>
28#include <linux/pinctrl/machine.h>
29#include <linux/platform_data/gpio-rcar.h>
24#include <linux/platform_device.h> 30#include <linux/platform_device.h>
25#include <mach/common.h> 31#include <mach/common.h>
26#include <mach/r8a7790.h> 32#include <mach/r8a7790.h>
27#include <asm/mach-types.h> 33#include <asm/mach-types.h>
28#include <asm/mach/arch.h> 34#include <asm/mach/arch.h>
29 35
36/* LEDS */
37static struct gpio_led lager_leds[] = {
38 {
39 .name = "led8",
40 .gpio = RCAR_GP_PIN(5, 17),
41 .default_state = LEDS_GPIO_DEFSTATE_ON,
42 }, {
43 .name = "led7",
44 .gpio = RCAR_GP_PIN(4, 23),
45 .default_state = LEDS_GPIO_DEFSTATE_ON,
46 }, {
47 .name = "led6",
48 .gpio = RCAR_GP_PIN(4, 22),
49 .default_state = LEDS_GPIO_DEFSTATE_ON,
50 },
51};
52
53static __initdata struct gpio_led_platform_data lager_leds_pdata = {
54 .leds = lager_leds,
55 .num_leds = ARRAY_SIZE(lager_leds),
56};
57
58/* GPIO KEY */
59#define GPIO_KEY(c, g, d, ...) \
60 { .code = c, .gpio = g, .desc = d, .active_low = 1 }
61
62static struct gpio_keys_button gpio_buttons[] = {
63 GPIO_KEY(KEY_4, RCAR_GP_PIN(1, 28), "SW2-pin4"),
64 GPIO_KEY(KEY_3, RCAR_GP_PIN(1, 26), "SW2-pin3"),
65 GPIO_KEY(KEY_2, RCAR_GP_PIN(1, 24), "SW2-pin2"),
66 GPIO_KEY(KEY_1, RCAR_GP_PIN(1, 14), "SW2-pin1"),
67};
68
69static __initdata struct gpio_keys_platform_data lager_keys_pdata = {
70 .buttons = gpio_buttons,
71 .nbuttons = ARRAY_SIZE(gpio_buttons),
72};
73
74static const struct pinctrl_map lager_pinctrl_map[] = {
75 /* SCIF0 (CN19: DEBUG SERIAL0) */
76 PIN_MAP_MUX_GROUP_DEFAULT("sh-sci.6", "pfc-r8a7790",
77 "scif0_data", "scif0"),
78 /* SCIF1 (CN20: DEBUG SERIAL1) */
79 PIN_MAP_MUX_GROUP_DEFAULT("sh-sci.7", "pfc-r8a7790",
80 "scif1_data", "scif1"),
81};
82
30static void __init lager_add_standard_devices(void) 83static void __init lager_add_standard_devices(void)
31{ 84{
32 r8a7790_clock_init(); 85 r8a7790_clock_init();
86
87 pinctrl_register_mappings(lager_pinctrl_map,
88 ARRAY_SIZE(lager_pinctrl_map));
89 r8a7790_pinmux_init();
90
33 r8a7790_add_standard_devices(); 91 r8a7790_add_standard_devices();
92 platform_device_register_data(&platform_bus, "leds-gpio", -1,
93 &lager_leds_pdata,
94 sizeof(lager_leds_pdata));
95 platform_device_register_data(&platform_bus, "gpio-keys", -1,
96 &lager_keys_pdata,
97 sizeof(lager_keys_pdata));
34} 98}
35 99
36static const char *lager_boards_compat_dt[] __initdata = { 100static const char *lager_boards_compat_dt[] __initdata = {
diff --git a/arch/arm/mach-shmobile/board-mackerel.c b/arch/arm/mach-shmobile/board-mackerel.c
index fa3407da682a..85f51a849a50 100644
--- a/arch/arm/mach-shmobile/board-mackerel.c
+++ b/arch/arm/mach-shmobile/board-mackerel.c
@@ -1309,6 +1309,49 @@ static struct i2c_board_info i2c1_devices[] = {
1309}; 1309};
1310 1310
1311static const struct pinctrl_map mackerel_pinctrl_map[] = { 1311static const struct pinctrl_map mackerel_pinctrl_map[] = {
1312 /* ADXL34X */
1313 PIN_MAP_MUX_GROUP_DEFAULT("1-0053", "pfc-sh7372",
1314 "intc_irq21", "intc"),
1315 /* CEU */
1316 PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_ceu.0", "pfc-sh7372",
1317 "ceu_data_0_7", "ceu"),
1318 PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_ceu.0", "pfc-sh7372",
1319 "ceu_clk_0", "ceu"),
1320 PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_ceu.0", "pfc-sh7372",
1321 "ceu_sync", "ceu"),
1322 PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_ceu.0", "pfc-sh7372",
1323 "ceu_field", "ceu"),
1324 /* FLCTL */
1325 PIN_MAP_MUX_GROUP_DEFAULT("sh_flctl.0", "pfc-sh7372",
1326 "flctl_data", "flctl"),
1327 PIN_MAP_MUX_GROUP_DEFAULT("sh_flctl.0", "pfc-sh7372",
1328 "flctl_ce0", "flctl"),
1329 PIN_MAP_MUX_GROUP_DEFAULT("sh_flctl.0", "pfc-sh7372",
1330 "flctl_ctrl", "flctl"),
1331 /* FSIA (AK4643) */
1332 PIN_MAP_MUX_GROUP_DEFAULT("asoc-simple-card.0", "pfc-sh7372",
1333 "fsia_sclk_in", "fsia"),
1334 PIN_MAP_MUX_GROUP_DEFAULT("asoc-simple-card.0", "pfc-sh7372",
1335 "fsia_data_in", "fsia"),
1336 PIN_MAP_MUX_GROUP_DEFAULT("asoc-simple-card.0", "pfc-sh7372",
1337 "fsia_data_out", "fsia"),
1338 /* FSIB (HDMI) */
1339 PIN_MAP_MUX_GROUP_DEFAULT("asoc-simple-card.1", "pfc-sh7372",
1340 "fsib_mclk_in", "fsib"),
1341 /* HDMI */
1342 PIN_MAP_MUX_GROUP_DEFAULT("sh-mobile-hdmi", "pfc-sh7372",
1343 "hdmi", "hdmi"),
1344 /* LCDC */
1345 PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_lcdc_fb.0", "pfc-sh7372",
1346 "lcd_data24", "lcd"),
1347 PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_lcdc_fb.0", "pfc-sh7372",
1348 "lcd_sync", "lcd"),
1349 /* SCIFA0 */
1350 PIN_MAP_MUX_GROUP_DEFAULT("sh-sci.0", "pfc-sh7372",
1351 "scifa0_data", "scifa0"),
1352 /* SCIFA2 (GT-720F GPS module) */
1353 PIN_MAP_MUX_GROUP_DEFAULT("sh-sci.2", "pfc-sh7372",
1354 "scifa2_data", "scifa2"),
1312 /* SDHI0 */ 1355 /* SDHI0 */
1313 PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.0", "pfc-sh7372", 1356 PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.0", "pfc-sh7372",
1314 "sdhi0_data4", "sdhi0"), 1357 "sdhi0_data4", "sdhi0"),
@@ -1316,6 +1359,8 @@ static const struct pinctrl_map mackerel_pinctrl_map[] = {
1316 "sdhi0_ctrl", "sdhi0"), 1359 "sdhi0_ctrl", "sdhi0"),
1317 PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.0", "pfc-sh7372", 1360 PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.0", "pfc-sh7372",
1318 "sdhi0_wp", "sdhi0"), 1361 "sdhi0_wp", "sdhi0"),
1362 PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.0", "pfc-sh7372",
1363 "intc_irq26_1", "intc"),
1319 /* SDHI1 */ 1364 /* SDHI1 */
1320#if !IS_ENABLED(CONFIG_MMC_SH_MMCIF) 1365#if !IS_ENABLED(CONFIG_MMC_SH_MMCIF)
1321 PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.1", "pfc-sh7372", 1366 PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.1", "pfc-sh7372",
@@ -1334,6 +1379,25 @@ static const struct pinctrl_map mackerel_pinctrl_map[] = {
1334 "sdhi2_data4", "sdhi2"), 1379 "sdhi2_data4", "sdhi2"),
1335 PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.2", "pfc-sh7372", 1380 PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.2", "pfc-sh7372",
1336 "sdhi2_ctrl", "sdhi2"), 1381 "sdhi2_ctrl", "sdhi2"),
1382 /* SMSC911X */
1383 PIN_MAP_MUX_GROUP_DEFAULT("smsc911x", "pfc-sh7372",
1384 "bsc_cs5a", "bsc"),
1385 PIN_MAP_MUX_GROUP_DEFAULT("smsc911x", "pfc-sh7372",
1386 "intc_irq6_0", "intc"),
1387 /* ST1232 */
1388 PIN_MAP_MUX_GROUP_DEFAULT("0-0055", "pfc-sh7372",
1389 "intc_irq7_0", "intc"),
1390 /* TCA6416 */
1391 PIN_MAP_MUX_GROUP_DEFAULT("0-0020", "pfc-sh7372",
1392 "intc_irq9_0", "intc"),
1393 /* USBHS0 */
1394 PIN_MAP_MUX_GROUP_DEFAULT("renesas_usbhs.0", "pfc-sh7372",
1395 "usb0_vbus", "usb0"),
1396 /* USBHS1 */
1397 PIN_MAP_MUX_GROUP_DEFAULT("renesas_usbhs.1", "pfc-sh7372",
1398 "usb1_vbus", "usb1"),
1399 PIN_MAP_MUX_GROUP_DEFAULT("renesas_usbhs.1", "pfc-sh7372",
1400 "usb1_otg_id_0", "usb1"),
1337}; 1401};
1338 1402
1339#define GPIO_PORT9CR IOMEM(0xE6051009) 1403#define GPIO_PORT9CR IOMEM(0xE6051009)
@@ -1377,61 +1441,18 @@ static void __init mackerel_init(void)
1377 ARRAY_SIZE(mackerel_pinctrl_map)); 1441 ARRAY_SIZE(mackerel_pinctrl_map));
1378 sh7372_pinmux_init(); 1442 sh7372_pinmux_init();
1379 1443
1380 /* enable SCIFA0 */
1381 gpio_request(GPIO_FN_SCIFA0_TXD, NULL);
1382 gpio_request(GPIO_FN_SCIFA0_RXD, NULL);
1383
1384 /* enable SMSC911X */
1385 gpio_request(GPIO_FN_CS5A, NULL);
1386 gpio_request(GPIO_FN_IRQ6_39, NULL);
1387
1388 /* LCDC */
1389 gpio_request(GPIO_FN_LCDD23, NULL);
1390 gpio_request(GPIO_FN_LCDD22, NULL);
1391 gpio_request(GPIO_FN_LCDD21, NULL);
1392 gpio_request(GPIO_FN_LCDD20, NULL);
1393 gpio_request(GPIO_FN_LCDD19, NULL);
1394 gpio_request(GPIO_FN_LCDD18, NULL);
1395 gpio_request(GPIO_FN_LCDD17, NULL);
1396 gpio_request(GPIO_FN_LCDD16, NULL);
1397 gpio_request(GPIO_FN_LCDD15, NULL);
1398 gpio_request(GPIO_FN_LCDD14, NULL);
1399 gpio_request(GPIO_FN_LCDD13, NULL);
1400 gpio_request(GPIO_FN_LCDD12, NULL);
1401 gpio_request(GPIO_FN_LCDD11, NULL);
1402 gpio_request(GPIO_FN_LCDD10, NULL);
1403 gpio_request(GPIO_FN_LCDD9, NULL);
1404 gpio_request(GPIO_FN_LCDD8, NULL);
1405 gpio_request(GPIO_FN_LCDD7, NULL);
1406 gpio_request(GPIO_FN_LCDD6, NULL);
1407 gpio_request(GPIO_FN_LCDD5, NULL);
1408 gpio_request(GPIO_FN_LCDD4, NULL);
1409 gpio_request(GPIO_FN_LCDD3, NULL);
1410 gpio_request(GPIO_FN_LCDD2, NULL);
1411 gpio_request(GPIO_FN_LCDD1, NULL);
1412 gpio_request(GPIO_FN_LCDD0, NULL);
1413 gpio_request(GPIO_FN_LCDDISP, NULL);
1414 gpio_request(GPIO_FN_LCDDCK, NULL);
1415
1416 /* backlight, off by default */ 1444 /* backlight, off by default */
1417 gpio_request_one(31, GPIOF_OUT_INIT_LOW, NULL); 1445 gpio_request_one(31, GPIOF_OUT_INIT_LOW, NULL);
1418 1446
1419 gpio_request_one(151, GPIOF_OUT_INIT_HIGH, NULL); /* LCDDON */ 1447 gpio_request_one(151, GPIOF_OUT_INIT_HIGH, NULL); /* LCDDON */
1420 1448
1421 /* USBHS0 */ 1449 /* USBHS0 */
1422 gpio_request(GPIO_FN_VBUS0_0, NULL);
1423 gpio_request_pulldown(GPIO_PORT168CR); /* VBUS0_0 pull down */ 1450 gpio_request_pulldown(GPIO_PORT168CR); /* VBUS0_0 pull down */
1424 1451
1425 /* USBHS1 */ 1452 /* USBHS1 */
1426 gpio_request(GPIO_FN_VBUS0_1, NULL);
1427 gpio_request_pulldown(GPIO_PORT167CR); /* VBUS0_1 pull down */ 1453 gpio_request_pulldown(GPIO_PORT167CR); /* VBUS0_1 pull down */
1428 gpio_request(GPIO_FN_IDIN_1_113, NULL);
1429 1454
1430 /* enable FSI2 port A (ak4643) */ 1455 /* FSI2 port A (ak4643) */
1431 gpio_request(GPIO_FN_FSIAIBT, NULL);
1432 gpio_request(GPIO_FN_FSIAILR, NULL);
1433 gpio_request(GPIO_FN_FSIAISLD, NULL);
1434 gpio_request(GPIO_FN_FSIAOSLD, NULL);
1435 gpio_request_one(161, GPIOF_OUT_INIT_LOW, NULL); /* slave */ 1456 gpio_request_one(161, GPIOF_OUT_INIT_LOW, NULL); /* slave */
1436 1457
1437 gpio_request(9, NULL); 1458 gpio_request(9, NULL);
@@ -1441,8 +1462,7 @@ static void __init mackerel_init(void)
1441 1462
1442 intc_set_priority(IRQ_FSI, 3); /* irq priority FSI(3) > SMSC911X(2) */ 1463 intc_set_priority(IRQ_FSI, 3); /* irq priority FSI(3) > SMSC911X(2) */
1443 1464
1444 /* setup FSI2 port B (HDMI) */ 1465 /* FSI2 port B (HDMI) */
1445 gpio_request(GPIO_FN_FSIBCK, NULL);
1446 __raw_writew(__raw_readw(USCCR1) & ~(1 << 6), USCCR1); /* use SPDIF */ 1466 __raw_writew(__raw_readw(USCCR1) & ~(1 << 6), USCCR1); /* use SPDIF */
1447 1467
1448 /* set SPU2 clock to 119.6 MHz */ 1468 /* set SPU2 clock to 119.6 MHz */
@@ -1452,68 +1472,15 @@ static void __init mackerel_init(void)
1452 clk_put(clk); 1472 clk_put(clk);
1453 } 1473 }
1454 1474
1455 /* enable Keypad */ 1475 /* Keypad */
1456 gpio_request(GPIO_FN_IRQ9_42, NULL);
1457 irq_set_irq_type(IRQ9, IRQ_TYPE_LEVEL_HIGH); 1476 irq_set_irq_type(IRQ9, IRQ_TYPE_LEVEL_HIGH);
1458 1477
1459 /* enable Touchscreen */ 1478 /* Touchscreen */
1460 gpio_request(GPIO_FN_IRQ7_40, NULL);
1461 irq_set_irq_type(IRQ7, IRQ_TYPE_LEVEL_LOW); 1479 irq_set_irq_type(IRQ7, IRQ_TYPE_LEVEL_LOW);
1462 1480
1463 /* enable Accelerometer */ 1481 /* Accelerometer */
1464 gpio_request(GPIO_FN_IRQ21, NULL);
1465 irq_set_irq_type(IRQ21, IRQ_TYPE_LEVEL_HIGH); 1482 irq_set_irq_type(IRQ21, IRQ_TYPE_LEVEL_HIGH);
1466 1483
1467 /* SDHI0 PORT172 card-detect IRQ26 */
1468 gpio_request(GPIO_FN_IRQ26_172, NULL);
1469
1470 /* FLCTL */
1471 gpio_request(GPIO_FN_D0_NAF0, NULL);
1472 gpio_request(GPIO_FN_D1_NAF1, NULL);
1473 gpio_request(GPIO_FN_D2_NAF2, NULL);
1474 gpio_request(GPIO_FN_D3_NAF3, NULL);
1475 gpio_request(GPIO_FN_D4_NAF4, NULL);
1476 gpio_request(GPIO_FN_D5_NAF5, NULL);
1477 gpio_request(GPIO_FN_D6_NAF6, NULL);
1478 gpio_request(GPIO_FN_D7_NAF7, NULL);
1479 gpio_request(GPIO_FN_D8_NAF8, NULL);
1480 gpio_request(GPIO_FN_D9_NAF9, NULL);
1481 gpio_request(GPIO_FN_D10_NAF10, NULL);
1482 gpio_request(GPIO_FN_D11_NAF11, NULL);
1483 gpio_request(GPIO_FN_D12_NAF12, NULL);
1484 gpio_request(GPIO_FN_D13_NAF13, NULL);
1485 gpio_request(GPIO_FN_D14_NAF14, NULL);
1486 gpio_request(GPIO_FN_D15_NAF15, NULL);
1487 gpio_request(GPIO_FN_FCE0, NULL);
1488 gpio_request(GPIO_FN_WE0_FWE, NULL);
1489 gpio_request(GPIO_FN_FRB, NULL);
1490 gpio_request(GPIO_FN_A4_FOE, NULL);
1491 gpio_request(GPIO_FN_A5_FCDE, NULL);
1492 gpio_request(GPIO_FN_RD_FSC, NULL);
1493
1494 /* enable GPS module (GT-720F) */
1495 gpio_request(GPIO_FN_SCIFA2_TXD1, NULL);
1496 gpio_request(GPIO_FN_SCIFA2_RXD1, NULL);
1497
1498 /* CEU */
1499 gpio_request(GPIO_FN_VIO_CLK, NULL);
1500 gpio_request(GPIO_FN_VIO_VD, NULL);
1501 gpio_request(GPIO_FN_VIO_HD, NULL);
1502 gpio_request(GPIO_FN_VIO_FIELD, NULL);
1503 gpio_request(GPIO_FN_VIO_CKO, NULL);
1504 gpio_request(GPIO_FN_VIO_D7, NULL);
1505 gpio_request(GPIO_FN_VIO_D6, NULL);
1506 gpio_request(GPIO_FN_VIO_D5, NULL);
1507 gpio_request(GPIO_FN_VIO_D4, NULL);
1508 gpio_request(GPIO_FN_VIO_D3, NULL);
1509 gpio_request(GPIO_FN_VIO_D2, NULL);
1510 gpio_request(GPIO_FN_VIO_D1, NULL);
1511 gpio_request(GPIO_FN_VIO_D0, NULL);
1512
1513 /* HDMI */
1514 gpio_request(GPIO_FN_HDMI_HPD, NULL);
1515 gpio_request(GPIO_FN_HDMI_CEC, NULL);
1516
1517 /* Reset HDMI, must be held at least one EXTALR (32768Hz) period */ 1484 /* Reset HDMI, must be held at least one EXTALR (32768Hz) period */
1518 srcr4 = __raw_readl(SRCR4); 1485 srcr4 = __raw_readl(SRCR4);
1519 __raw_writel(srcr4 | (1 << 13), SRCR4); 1486 __raw_writel(srcr4 | (1 << 13), SRCR4);
diff --git a/arch/arm/mach-shmobile/board-marzen.c b/arch/arm/mach-shmobile/board-marzen.c
index b9594e911ce7..a7d1010505bf 100644
--- a/arch/arm/mach-shmobile/board-marzen.c
+++ b/arch/arm/mach-shmobile/board-marzen.c
@@ -28,6 +28,7 @@
28#include <linux/leds.h> 28#include <linux/leds.h>
29#include <linux/dma-mapping.h> 29#include <linux/dma-mapping.h>
30#include <linux/pinctrl/machine.h> 30#include <linux/pinctrl/machine.h>
31#include <linux/platform_data/gpio-rcar.h>
31#include <linux/regulator/fixed.h> 32#include <linux/regulator/fixed.h>
32#include <linux/regulator/machine.h> 33#include <linux/regulator/machine.h>
33#include <linux/smsc911x.h> 34#include <linux/smsc911x.h>
@@ -36,10 +37,6 @@
36#include <linux/mmc/host.h> 37#include <linux/mmc/host.h>
37#include <linux/mmc/sh_mobile_sdhi.h> 38#include <linux/mmc/sh_mobile_sdhi.h>
38#include <linux/mfd/tmio.h> 39#include <linux/mfd/tmio.h>
39#include <linux/usb/otg.h>
40#include <linux/usb/ehci_pdriver.h>
41#include <linux/usb/ohci_pdriver.h>
42#include <linux/pm_runtime.h>
43#include <mach/hardware.h> 40#include <mach/hardware.h>
44#include <mach/r8a7779.h> 41#include <mach/r8a7779.h>
45#include <mach/common.h> 42#include <mach/common.h>
@@ -60,6 +57,8 @@ static struct regulator_consumer_supply dummy_supplies[] = {
60 REGULATOR_SUPPLY("vdd33a", "smsc911x"), 57 REGULATOR_SUPPLY("vdd33a", "smsc911x"),
61}; 58};
62 59
60static struct rcar_phy_platform_data usb_phy_platform_data __initdata;
61
63/* SMSC LAN89218 */ 62/* SMSC LAN89218 */
64static struct resource smsc911x_resources[] = { 63static struct resource smsc911x_resources[] = {
65 [0] = { 64 [0] = {
@@ -68,7 +67,7 @@ static struct resource smsc911x_resources[] = {
68 .flags = IORESOURCE_MEM, 67 .flags = IORESOURCE_MEM,
69 }, 68 },
70 [1] = { 69 [1] = {
71 .start = gic_iid(0x3c), /* IRQ 1 */ 70 .start = irq_pin(1), /* IRQ 1 */
72 .flags = IORESOURCE_IRQ, 71 .flags = IORESOURCE_IRQ,
73 }, 72 },
74}; 73};
@@ -149,39 +148,19 @@ static struct platform_device hspi_device = {
149 .num_resources = ARRAY_SIZE(hspi_resources), 148 .num_resources = ARRAY_SIZE(hspi_resources),
150}; 149};
151 150
152/* USB PHY */
153static struct resource usb_phy_resources[] = {
154 [0] = {
155 .start = 0xffe70000,
156 .end = 0xffe70900 - 1,
157 .flags = IORESOURCE_MEM,
158 },
159 [1] = {
160 .start = 0xfff70000,
161 .end = 0xfff70900 - 1,
162 .flags = IORESOURCE_MEM,
163 },
164};
165
166static struct platform_device usb_phy_device = {
167 .name = "rcar_usb_phy",
168 .resource = usb_phy_resources,
169 .num_resources = ARRAY_SIZE(usb_phy_resources),
170};
171
172/* LEDS */ 151/* LEDS */
173static struct gpio_led marzen_leds[] = { 152static struct gpio_led marzen_leds[] = {
174 { 153 {
175 .name = "led2", 154 .name = "led2",
176 .gpio = 157, 155 .gpio = RCAR_GP_PIN(4, 29),
177 .default_state = LEDS_GPIO_DEFSTATE_ON, 156 .default_state = LEDS_GPIO_DEFSTATE_ON,
178 }, { 157 }, {
179 .name = "led3", 158 .name = "led3",
180 .gpio = 158, 159 .gpio = RCAR_GP_PIN(4, 30),
181 .default_state = LEDS_GPIO_DEFSTATE_ON, 160 .default_state = LEDS_GPIO_DEFSTATE_ON,
182 }, { 161 }, {
183 .name = "led4", 162 .name = "led4",
184 .gpio = 159, 163 .gpio = RCAR_GP_PIN(4, 31),
185 .default_state = LEDS_GPIO_DEFSTATE_ON, 164 .default_state = LEDS_GPIO_DEFSTATE_ON,
186 }, 165 },
187}; 166};
@@ -204,161 +183,9 @@ static struct platform_device *marzen_devices[] __initdata = {
204 &sdhi0_device, 183 &sdhi0_device,
205 &thermal_device, 184 &thermal_device,
206 &hspi_device, 185 &hspi_device,
207 &usb_phy_device,
208 &leds_device, 186 &leds_device,
209}; 187};
210 188
211/* USB */
212static struct usb_phy *phy;
213static int usb_power_on(struct platform_device *pdev)
214{
215 if (IS_ERR(phy))
216 return PTR_ERR(phy);
217
218 pm_runtime_enable(&pdev->dev);
219 pm_runtime_get_sync(&pdev->dev);
220
221 usb_phy_init(phy);
222
223 return 0;
224}
225
226static void usb_power_off(struct platform_device *pdev)
227{
228 if (IS_ERR(phy))
229 return;
230
231 usb_phy_shutdown(phy);
232
233 pm_runtime_put_sync(&pdev->dev);
234 pm_runtime_disable(&pdev->dev);
235}
236
237static struct usb_ehci_pdata ehcix_pdata = {
238 .power_on = usb_power_on,
239 .power_off = usb_power_off,
240 .power_suspend = usb_power_off,
241};
242
243static struct resource ehci0_resources[] = {
244 [0] = {
245 .start = 0xffe70000,
246 .end = 0xffe70400 - 1,
247 .flags = IORESOURCE_MEM,
248 },
249 [1] = {
250 .start = gic_iid(0x4c),
251 .flags = IORESOURCE_IRQ,
252 },
253};
254
255static struct platform_device ehci0_device = {
256 .name = "ehci-platform",
257 .id = 0,
258 .dev = {
259 .dma_mask = &ehci0_device.dev.coherent_dma_mask,
260 .coherent_dma_mask = 0xffffffff,
261 .platform_data = &ehcix_pdata,
262 },
263 .num_resources = ARRAY_SIZE(ehci0_resources),
264 .resource = ehci0_resources,
265};
266
267static struct resource ehci1_resources[] = {
268 [0] = {
269 .start = 0xfff70000,
270 .end = 0xfff70400 - 1,
271 .flags = IORESOURCE_MEM,
272 },
273 [1] = {
274 .start = gic_iid(0x4d),
275 .flags = IORESOURCE_IRQ,
276 },
277};
278
279static struct platform_device ehci1_device = {
280 .name = "ehci-platform",
281 .id = 1,
282 .dev = {
283 .dma_mask = &ehci1_device.dev.coherent_dma_mask,
284 .coherent_dma_mask = 0xffffffff,
285 .platform_data = &ehcix_pdata,
286 },
287 .num_resources = ARRAY_SIZE(ehci1_resources),
288 .resource = ehci1_resources,
289};
290
291static struct usb_ohci_pdata ohcix_pdata = {
292 .power_on = usb_power_on,
293 .power_off = usb_power_off,
294 .power_suspend = usb_power_off,
295};
296
297static struct resource ohci0_resources[] = {
298 [0] = {
299 .start = 0xffe70400,
300 .end = 0xffe70800 - 1,
301 .flags = IORESOURCE_MEM,
302 },
303 [1] = {
304 .start = gic_iid(0x4c),
305 .flags = IORESOURCE_IRQ,
306 },
307};
308
309static struct platform_device ohci0_device = {
310 .name = "ohci-platform",
311 .id = 0,
312 .dev = {
313 .dma_mask = &ohci0_device.dev.coherent_dma_mask,
314 .coherent_dma_mask = 0xffffffff,
315 .platform_data = &ohcix_pdata,
316 },
317 .num_resources = ARRAY_SIZE(ohci0_resources),
318 .resource = ohci0_resources,
319};
320
321static struct resource ohci1_resources[] = {
322 [0] = {
323 .start = 0xfff70400,
324 .end = 0xfff70800 - 1,
325 .flags = IORESOURCE_MEM,
326 },
327 [1] = {
328 .start = gic_iid(0x4d),
329 .flags = IORESOURCE_IRQ,
330 },
331};
332
333static struct platform_device ohci1_device = {
334 .name = "ohci-platform",
335 .id = 1,
336 .dev = {
337 .dma_mask = &ohci1_device.dev.coherent_dma_mask,
338 .coherent_dma_mask = 0xffffffff,
339 .platform_data = &ohcix_pdata,
340 },
341 .num_resources = ARRAY_SIZE(ohci1_resources),
342 .resource = ohci1_resources,
343};
344
345static struct platform_device *marzen_late_devices[] __initdata = {
346 &ehci0_device,
347 &ehci1_device,
348 &ohci0_device,
349 &ohci1_device,
350};
351
352void __init marzen_init_late(void)
353{
354 /* get usb phy */
355 phy = usb_get_phy(USB_PHY_TYPE_USB2);
356
357 shmobile_init_late();
358 platform_add_devices(marzen_late_devices,
359 ARRAY_SIZE(marzen_late_devices));
360}
361
362static const struct pinctrl_map marzen_pinctrl_map[] = { 189static const struct pinctrl_map marzen_pinctrl_map[] = {
363 /* HSPI0 */ 190 /* HSPI0 */
364 PIN_MAP_MUX_GROUP_DEFAULT("sh-hspi.0", "pfc-r8a7779", 191 PIN_MAP_MUX_GROUP_DEFAULT("sh-hspi.0", "pfc-r8a7779",
@@ -404,8 +231,10 @@ static void __init marzen_init(void)
404 pinctrl_register_mappings(marzen_pinctrl_map, 231 pinctrl_register_mappings(marzen_pinctrl_map,
405 ARRAY_SIZE(marzen_pinctrl_map)); 232 ARRAY_SIZE(marzen_pinctrl_map));
406 r8a7779_pinmux_init(); 233 r8a7779_pinmux_init();
234 r8a7779_init_irq_extpin(1); /* IRQ1 as individual interrupt */
407 235
408 r8a7779_add_standard_devices(); 236 r8a7779_add_standard_devices();
237 r8a7779_add_usb_phy_device(&usb_phy_platform_data);
409 platform_add_devices(marzen_devices, ARRAY_SIZE(marzen_devices)); 238 platform_add_devices(marzen_devices, ARRAY_SIZE(marzen_devices));
410} 239}
411 240
@@ -416,6 +245,6 @@ MACHINE_START(MARZEN, "marzen")
416 .nr_irqs = NR_IRQS_LEGACY, 245 .nr_irqs = NR_IRQS_LEGACY,
417 .init_irq = r8a7779_init_irq, 246 .init_irq = r8a7779_init_irq,
418 .init_machine = marzen_init, 247 .init_machine = marzen_init,
419 .init_late = marzen_init_late, 248 .init_late = r8a7779_init_late,
420 .init_time = r8a7779_earlytimer_init, 249 .init_time = r8a7779_earlytimer_init,
421MACHINE_END 250MACHINE_END
diff --git a/arch/arm/mach-shmobile/clock-r8a73a4.c b/arch/arm/mach-shmobile/clock-r8a73a4.c
index e710c00c3822..5f7fe628b8a1 100644
--- a/arch/arm/mach-shmobile/clock-r8a73a4.c
+++ b/arch/arm/mach-shmobile/clock-r8a73a4.c
@@ -22,15 +22,44 @@
22#include <linux/kernel.h> 22#include <linux/kernel.h>
23#include <linux/sh_clk.h> 23#include <linux/sh_clk.h>
24#include <linux/clkdev.h> 24#include <linux/clkdev.h>
25#include <mach/clock.h>
25#include <mach/common.h> 26#include <mach/common.h>
26 27
27#define CPG_BASE 0xe6150000 28#define CPG_BASE 0xe6150000
28#define CPG_LEN 0x270 29#define CPG_LEN 0x270
29 30
30#define MPCKCR 0xe6150080
31#define SMSTPCR2 0xe6150138 31#define SMSTPCR2 0xe6150138
32#define SMSTPCR3 0xe615013c
32#define SMSTPCR5 0xe6150144 33#define SMSTPCR5 0xe6150144
33 34
35#define FRQCRA 0xE6150000
36#define FRQCRB 0xE6150004
37#define VCLKCR1 0xE6150008
38#define VCLKCR2 0xE615000C
39#define VCLKCR3 0xE615001C
40#define VCLKCR4 0xE6150014
41#define VCLKCR5 0xE6150034
42#define ZBCKCR 0xE6150010
43#define SD0CKCR 0xE6150074
44#define SD1CKCR 0xE6150078
45#define SD2CKCR 0xE615007C
46#define MMC0CKCR 0xE6150240
47#define MMC1CKCR 0xE6150244
48#define FSIACKCR 0xE6150018
49#define FSIBCKCR 0xE6150090
50#define MPCKCR 0xe6150080
51#define SPUVCKCR 0xE6150094
52#define HSICKCR 0xE615026C
53#define M4CKCR 0xE6150098
54#define PLLECR 0xE61500D0
55#define PLL1CR 0xE6150028
56#define PLL2CR 0xE615002C
57#define PLL2SCR 0xE61501F4
58#define PLL2HCR 0xE61501E4
59#define CKSCR 0xE61500C0
60
61#define CPG_MAP(o) ((o - CPG_BASE) + cpg_mapping.base)
62
34static struct clk_mapping cpg_mapping = { 63static struct clk_mapping cpg_mapping = {
35 .phys = CPG_BASE, 64 .phys = CPG_BASE,
36 .len = CPG_LEN, 65 .len = CPG_LEN,
@@ -51,29 +80,327 @@ static struct clk extal2_clk = {
51 .mapping = &cpg_mapping, 80 .mapping = &cpg_mapping,
52}; 81};
53 82
83static struct sh_clk_ops followparent_clk_ops = {
84 .recalc = followparent_recalc,
85};
86
87static struct clk main_clk = {
88 /* .parent will be set r8a73a4_clock_init */
89 .ops = &followparent_clk_ops,
90};
91
92SH_CLK_RATIO(div2, 1, 2);
93SH_CLK_RATIO(div4, 1, 4);
94
95SH_FIXED_RATIO_CLK(main_div2_clk, main_clk, div2);
96SH_FIXED_RATIO_CLK(extal1_div2_clk, extal1_clk, div2);
97SH_FIXED_RATIO_CLK(extal2_div2_clk, extal2_clk, div2);
98SH_FIXED_RATIO_CLK(extal2_div4_clk, extal2_clk, div4);
99
100/* External FSIACK/FSIBCK clock */
101static struct clk fsiack_clk = {
102};
103
104static struct clk fsibck_clk = {
105};
106
107/*
108 * PLL clocks
109 */
110static struct clk *pll_parent_main[] = {
111 [0] = &main_clk,
112 [1] = &main_div2_clk
113};
114
115static struct clk *pll_parent_main_extal[8] = {
116 [0] = &main_div2_clk,
117 [1] = &extal2_div2_clk,
118 [3] = &extal2_div4_clk,
119 [4] = &main_clk,
120 [5] = &extal2_clk,
121};
122
123static unsigned long pll_recalc(struct clk *clk)
124{
125 unsigned long mult = 1;
126
127 if (ioread32(CPG_MAP(PLLECR)) & (1 << clk->enable_bit))
128 mult = (((ioread32(clk->mapped_reg) >> 24) & 0x7f) + 1);
129
130 return clk->parent->rate * mult;
131}
132
133static int pll_set_parent(struct clk *clk, struct clk *parent)
134{
135 u32 val;
136 int i, ret;
137
138 if (!clk->parent_table || !clk->parent_num)
139 return -EINVAL;
140
141 /* Search the parent */
142 for (i = 0; i < clk->parent_num; i++)
143 if (clk->parent_table[i] == parent)
144 break;
145
146 if (i == clk->parent_num)
147 return -ENODEV;
148
149 ret = clk_reparent(clk, parent);
150 if (ret < 0)
151 return ret;
152
153 val = ioread32(clk->mapped_reg) &
154 ~(((1 << clk->src_width) - 1) << clk->src_shift);
155
156 iowrite32(val | i << clk->src_shift, clk->mapped_reg);
157
158 return 0;
159}
160
161static struct sh_clk_ops pll_clk_ops = {
162 .recalc = pll_recalc,
163 .set_parent = pll_set_parent,
164};
165
166#define PLL_CLOCK(name, p, pt, w, s, reg, e) \
167 static struct clk name = { \
168 .ops = &pll_clk_ops, \
169 .flags = CLK_ENABLE_ON_INIT, \
170 .parent = p, \
171 .parent_table = pt, \
172 .parent_num = ARRAY_SIZE(pt), \
173 .src_width = w, \
174 .src_shift = s, \
175 .enable_reg = (void __iomem *)reg, \
176 .enable_bit = e, \
177 .mapping = &cpg_mapping, \
178 }
179
180PLL_CLOCK(pll1_clk, &main_clk, pll_parent_main, 1, 7, PLL1CR, 1);
181PLL_CLOCK(pll2_clk, &main_div2_clk, pll_parent_main_extal, 3, 5, PLL2CR, 2);
182PLL_CLOCK(pll2s_clk, &main_div2_clk, pll_parent_main_extal, 3, 5, PLL2SCR, 4);
183PLL_CLOCK(pll2h_clk, &main_div2_clk, pll_parent_main_extal, 3, 5, PLL2HCR, 5);
184
185SH_FIXED_RATIO_CLK(pll1_div2_clk, pll1_clk, div2);
186
54static struct clk *main_clks[] = { 187static struct clk *main_clks[] = {
55 &extalr_clk, 188 &extalr_clk,
56 &extal1_clk, 189 &extal1_clk,
190 &extal1_div2_clk,
57 &extal2_clk, 191 &extal2_clk,
192 &extal2_div2_clk,
193 &extal2_div4_clk,
194 &main_clk,
195 &main_div2_clk,
196 &fsiack_clk,
197 &fsibck_clk,
198 &pll1_clk,
199 &pll1_div2_clk,
200 &pll2_clk,
201 &pll2s_clk,
202 &pll2h_clk,
203};
204
205/* DIV4 */
206static void div4_kick(struct clk *clk)
207{
208 unsigned long value;
209
210 /* set KICK bit in FRQCRB to update hardware setting */
211 value = ioread32(CPG_MAP(FRQCRB));
212 value |= (1 << 31);
213 iowrite32(value, CPG_MAP(FRQCRB));
214}
215
216static int divisors[] = { 2, 3, 4, 6, 8, 12, 16, 18, 24, 0, 36, 48, 10};
217
218static struct clk_div_mult_table div4_div_mult_table = {
219 .divisors = divisors,
220 .nr_divisors = ARRAY_SIZE(divisors),
221};
222
223static struct clk_div4_table div4_table = {
224 .div_mult_table = &div4_div_mult_table,
225 .kick = div4_kick,
226};
227
228enum {
229 DIV4_I, DIV4_M3, DIV4_B, DIV4_M1, DIV4_M2,
230 DIV4_ZX, DIV4_ZS, DIV4_HP,
231 DIV4_NR };
232
233static struct clk div4_clks[DIV4_NR] = {
234 [DIV4_I] = SH_CLK_DIV4(&pll1_clk, FRQCRA, 20, 0x0dff, CLK_ENABLE_ON_INIT),
235 [DIV4_M3] = SH_CLK_DIV4(&pll1_clk, FRQCRA, 12, 0x1dff, CLK_ENABLE_ON_INIT),
236 [DIV4_B] = SH_CLK_DIV4(&pll1_clk, FRQCRA, 8, 0x0dff, CLK_ENABLE_ON_INIT),
237 [DIV4_M1] = SH_CLK_DIV4(&pll1_clk, FRQCRA, 4, 0x1dff, 0),
238 [DIV4_M2] = SH_CLK_DIV4(&pll1_clk, FRQCRA, 0, 0x1dff, 0),
239 [DIV4_ZX] = SH_CLK_DIV4(&pll1_clk, FRQCRB, 12, 0x0dff, 0),
240 [DIV4_ZS] = SH_CLK_DIV4(&pll1_clk, FRQCRB, 8, 0x0dff, 0),
241 [DIV4_HP] = SH_CLK_DIV4(&pll1_clk, FRQCRB, 4, 0x0dff, 0),
58}; 242};
59 243
60enum { 244enum {
245 DIV6_ZB,
246 DIV6_SDHI0, DIV6_SDHI1, DIV6_SDHI2,
247 DIV6_MMC0, DIV6_MMC1,
248 DIV6_VCK1, DIV6_VCK2, DIV6_VCK3, DIV6_VCK4, DIV6_VCK5,
249 DIV6_FSIA, DIV6_FSIB,
250 DIV6_MP, DIV6_M4, DIV6_HSI, DIV6_SPUV,
251 DIV6_NR };
252
253static struct clk *div6_parents[8] = {
254 [0] = &pll1_div2_clk,
255 [1] = &pll2s_clk,
256 [3] = &extal2_clk,
257 [4] = &main_div2_clk,
258 [6] = &extalr_clk,
259};
260
261static struct clk *fsia_parents[4] = {
262 [0] = &pll1_div2_clk,
263 [1] = &pll2s_clk,
264 [2] = &fsiack_clk,
265};
266
267static struct clk *fsib_parents[4] = {
268 [0] = &pll1_div2_clk,
269 [1] = &pll2s_clk,
270 [2] = &fsibck_clk,
271};
272
273static struct clk *mp_parents[4] = {
274 [0] = &pll1_div2_clk,
275 [1] = &pll2s_clk,
276 [2] = &extal2_clk,
277 [3] = &extal2_clk,
278};
279
280static struct clk *m4_parents[2] = {
281 [0] = &pll2s_clk,
282};
283
284static struct clk *hsi_parents[4] = {
285 [0] = &pll2h_clk,
286 [1] = &pll1_div2_clk,
287 [3] = &pll2s_clk,
288};
289
290/*** FIXME ***
291 * SH_CLK_DIV6_EXT() macro doesn't care .mapping
292 * but, it is necessary on R-Car (= ioremap() base CPG)
293 * The difference between
294 * SH_CLK_DIV6_EXT() <--> SH_CLK_MAP_DIV6_EXT()
295 * is only .mapping
296 */
297#define SH_CLK_MAP_DIV6_EXT(_reg, _flags, _parents, \
298 _num_parents, _src_shift, _src_width) \
299{ \
300 .enable_reg = (void __iomem *)_reg, \
301 .enable_bit = 0, /* unused */ \
302 .flags = _flags | CLK_MASK_DIV_ON_DISABLE, \
303 .div_mask = SH_CLK_DIV6_MSK, \
304 .parent_table = _parents, \
305 .parent_num = _num_parents, \
306 .src_shift = _src_shift, \
307 .src_width = _src_width, \
308 .mapping = &cpg_mapping, \
309}
310
311static struct clk div6_clks[DIV6_NR] = {
312 [DIV6_ZB] = SH_CLK_MAP_DIV6_EXT(ZBCKCR, CLK_ENABLE_ON_INIT,
313 div6_parents, 2, 7, 1),
314 [DIV6_SDHI0] = SH_CLK_MAP_DIV6_EXT(SD0CKCR, 0,
315 div6_parents, 2, 6, 2),
316 [DIV6_SDHI1] = SH_CLK_MAP_DIV6_EXT(SD1CKCR, 0,
317 div6_parents, 2, 6, 2),
318 [DIV6_SDHI2] = SH_CLK_MAP_DIV6_EXT(SD2CKCR, 0,
319 div6_parents, 2, 6, 2),
320 [DIV6_MMC0] = SH_CLK_MAP_DIV6_EXT(MMC0CKCR, 0,
321 div6_parents, 2, 6, 2),
322 [DIV6_MMC1] = SH_CLK_MAP_DIV6_EXT(MMC1CKCR, 0,
323 div6_parents, 2, 6, 2),
324 [DIV6_VCK1] = SH_CLK_MAP_DIV6_EXT(VCLKCR1, 0, /* didn't care bit[6-7] */
325 div6_parents, ARRAY_SIZE(div6_parents), 12, 3),
326 [DIV6_VCK2] = SH_CLK_MAP_DIV6_EXT(VCLKCR2, 0, /* didn't care bit[6-7] */
327 div6_parents, ARRAY_SIZE(div6_parents), 12, 3),
328 [DIV6_VCK3] = SH_CLK_MAP_DIV6_EXT(VCLKCR3, 0, /* didn't care bit[6-7] */
329 div6_parents, ARRAY_SIZE(div6_parents), 12, 3),
330 [DIV6_VCK4] = SH_CLK_MAP_DIV6_EXT(VCLKCR4, 0, /* didn't care bit[6-7] */
331 div6_parents, ARRAY_SIZE(div6_parents), 12, 3),
332 [DIV6_VCK5] = SH_CLK_MAP_DIV6_EXT(VCLKCR5, 0, /* didn't care bit[6-7] */
333 div6_parents, ARRAY_SIZE(div6_parents), 12, 3),
334 [DIV6_FSIA] = SH_CLK_MAP_DIV6_EXT(FSIACKCR, 0,
335 fsia_parents, ARRAY_SIZE(fsia_parents), 6, 2),
336 [DIV6_FSIB] = SH_CLK_MAP_DIV6_EXT(FSIBCKCR, 0,
337 fsib_parents, ARRAY_SIZE(fsib_parents), 6, 2),
338 [DIV6_MP] = SH_CLK_MAP_DIV6_EXT(MPCKCR, 0, /* it needs bit[9-11] control */
339 mp_parents, ARRAY_SIZE(mp_parents), 6, 2),
340 /* pll2s will be selected always for M4 */
341 [DIV6_M4] = SH_CLK_MAP_DIV6_EXT(M4CKCR, 0, /* it needs bit[9] control */
342 m4_parents, ARRAY_SIZE(m4_parents), 6, 1),
343 [DIV6_HSI] = SH_CLK_MAP_DIV6_EXT(HSICKCR, 0, /* it needs bit[9] control */
344 hsi_parents, ARRAY_SIZE(hsi_parents), 6, 2),
345 [DIV6_SPUV] = SH_CLK_MAP_DIV6_EXT(SPUVCKCR, 0,
346 mp_parents, ARRAY_SIZE(mp_parents), 6, 2),
347};
348
349/* MSTP */
350enum {
61 MSTP217, MSTP216, MSTP207, MSTP206, MSTP204, MSTP203, 351 MSTP217, MSTP216, MSTP207, MSTP206, MSTP204, MSTP203,
352 MSTP315, MSTP314, MSTP313, MSTP312, MSTP305,
62 MSTP522, 353 MSTP522,
63 MSTP_NR 354 MSTP_NR
64}; 355};
65 356
66static struct clk mstp_clks[MSTP_NR] = { 357static struct clk mstp_clks[MSTP_NR] = {
67 [MSTP204] = SH_CLK_MSTP32(&extal2_clk, SMSTPCR2, 4, 0), /* SCIFA0 */ 358 [MSTP204] = SH_CLK_MSTP32(&div6_clks[DIV6_MP], SMSTPCR2, 4, 0), /* SCIFA0 */
68 [MSTP203] = SH_CLK_MSTP32(&extal2_clk, SMSTPCR2, 3, 0), /* SCIFA1 */ 359 [MSTP203] = SH_CLK_MSTP32(&div6_clks[DIV6_MP], SMSTPCR2, 3, 0), /* SCIFA1 */
69 [MSTP206] = SH_CLK_MSTP32(&extal2_clk, SMSTPCR2, 6, 0), /* SCIFB0 */ 360 [MSTP206] = SH_CLK_MSTP32(&div6_clks[DIV6_MP], SMSTPCR2, 6, 0), /* SCIFB0 */
70 [MSTP207] = SH_CLK_MSTP32(&extal2_clk, SMSTPCR2, 7, 0), /* SCIFB1 */ 361 [MSTP207] = SH_CLK_MSTP32(&div6_clks[DIV6_MP], SMSTPCR2, 7, 0), /* SCIFB1 */
71 [MSTP216] = SH_CLK_MSTP32(&extal2_clk, SMSTPCR2, 16, 0), /* SCIFB2 */ 362 [MSTP216] = SH_CLK_MSTP32(&div6_clks[DIV6_MP], SMSTPCR2, 16, 0), /* SCIFB2 */
72 [MSTP217] = SH_CLK_MSTP32(&extal2_clk, SMSTPCR2, 17, 0), /* SCIFB3 */ 363 [MSTP217] = SH_CLK_MSTP32(&div6_clks[DIV6_MP], SMSTPCR2, 17, 0), /* SCIFB3 */
364 [MSTP305] = SH_CLK_MSTP32(&div6_clks[DIV6_MMC1],SMSTPCR3, 5, 0), /* MMCIF1 */
365 [MSTP312] = SH_CLK_MSTP32(&div6_clks[DIV6_SDHI2],SMSTPCR3, 12, 0), /* SDHI2 */
366 [MSTP313] = SH_CLK_MSTP32(&div6_clks[DIV6_SDHI1],SMSTPCR3, 13, 0), /* SDHI1 */
367 [MSTP314] = SH_CLK_MSTP32(&div6_clks[DIV6_SDHI0],SMSTPCR3, 14, 0), /* SDHI0 */
368 [MSTP315] = SH_CLK_MSTP32(&div6_clks[DIV6_MMC0],SMSTPCR3, 15, 0), /* MMCIF0 */
73 [MSTP522] = SH_CLK_MSTP32(&extal2_clk, SMSTPCR5, 22, 0), /* Thermal */ 369 [MSTP522] = SH_CLK_MSTP32(&extal2_clk, SMSTPCR5, 22, 0), /* Thermal */
74}; 370};
75 371
76static struct clk_lookup lookups[] = { 372static struct clk_lookup lookups[] = {
373 /* main clock */
374 CLKDEV_CON_ID("extal1", &extal1_clk),
375 CLKDEV_CON_ID("extal1_div2", &extal1_div2_clk),
376 CLKDEV_CON_ID("extal2", &extal2_clk),
377 CLKDEV_CON_ID("extal2_div2", &extal2_div2_clk),
378 CLKDEV_CON_ID("extal2_div4", &extal2_div4_clk),
379 CLKDEV_CON_ID("fsiack", &fsiack_clk),
380 CLKDEV_CON_ID("fsibck", &fsibck_clk),
381
382 /* pll clock */
383 CLKDEV_CON_ID("pll1", &pll1_clk),
384 CLKDEV_CON_ID("pll1_div2", &pll1_div2_clk),
385 CLKDEV_CON_ID("pll2", &pll2_clk),
386 CLKDEV_CON_ID("pll2s", &pll2s_clk),
387 CLKDEV_CON_ID("pll2h", &pll2h_clk),
388
389 /* DIV6 */
390 CLKDEV_CON_ID("zb", &div6_clks[DIV6_ZB]),
391 CLKDEV_CON_ID("vck1", &div6_clks[DIV6_VCK1]),
392 CLKDEV_CON_ID("vck2", &div6_clks[DIV6_VCK2]),
393 CLKDEV_CON_ID("vck3", &div6_clks[DIV6_VCK3]),
394 CLKDEV_CON_ID("vck4", &div6_clks[DIV6_VCK4]),
395 CLKDEV_CON_ID("vck5", &div6_clks[DIV6_VCK5]),
396 CLKDEV_CON_ID("fsia", &div6_clks[DIV6_FSIA]),
397 CLKDEV_CON_ID("fsib", &div6_clks[DIV6_FSIB]),
398 CLKDEV_CON_ID("mp", &div6_clks[DIV6_MP]),
399 CLKDEV_CON_ID("m4", &div6_clks[DIV6_M4]),
400 CLKDEV_CON_ID("hsi", &div6_clks[DIV6_HSI]),
401 CLKDEV_CON_ID("spuv", &div6_clks[DIV6_SPUV]),
402
403 /* MSTP */
77 CLKDEV_DEV_ID("sh-sci.0", &mstp_clks[MSTP204]), 404 CLKDEV_DEV_ID("sh-sci.0", &mstp_clks[MSTP204]),
78 CLKDEV_DEV_ID("sh-sci.1", &mstp_clks[MSTP203]), 405 CLKDEV_DEV_ID("sh-sci.1", &mstp_clks[MSTP203]),
79 CLKDEV_DEV_ID("sh-sci.2", &mstp_clks[MSTP206]), 406 CLKDEV_DEV_ID("sh-sci.2", &mstp_clks[MSTP206]),
@@ -81,6 +408,16 @@ static struct clk_lookup lookups[] = {
81 CLKDEV_DEV_ID("sh-sci.4", &mstp_clks[MSTP216]), 408 CLKDEV_DEV_ID("sh-sci.4", &mstp_clks[MSTP216]),
82 CLKDEV_DEV_ID("sh-sci.5", &mstp_clks[MSTP217]), 409 CLKDEV_DEV_ID("sh-sci.5", &mstp_clks[MSTP217]),
83 CLKDEV_DEV_ID("rcar_thermal", &mstp_clks[MSTP522]), 410 CLKDEV_DEV_ID("rcar_thermal", &mstp_clks[MSTP522]),
411 CLKDEV_DEV_ID("sh_mmcif.1", &mstp_clks[MSTP305]),
412 CLKDEV_DEV_ID("ee220000.mmcif", &mstp_clks[MSTP305]),
413 CLKDEV_DEV_ID("sh_mobile_sdhi.2", &mstp_clks[MSTP312]),
414 CLKDEV_DEV_ID("ee140000.sdhi", &mstp_clks[MSTP312]),
415 CLKDEV_DEV_ID("sh_mobile_sdhi.1", &mstp_clks[MSTP313]),
416 CLKDEV_DEV_ID("ee120000.sdhi", &mstp_clks[MSTP313]),
417 CLKDEV_DEV_ID("sh_mobile_sdhi.0", &mstp_clks[MSTP314]),
418 CLKDEV_DEV_ID("ee100000.sdhi", &mstp_clks[MSTP314]),
419 CLKDEV_DEV_ID("sh_mmcif.0", &mstp_clks[MSTP315]),
420 CLKDEV_DEV_ID("ee200000.mmcif", &mstp_clks[MSTP315]),
84 421
85 /* for DT */ 422 /* for DT */
86 CLKDEV_DEV_ID("e61f0000.thermal", &mstp_clks[MSTP522]), 423 CLKDEV_DEV_ID("e61f0000.thermal", &mstp_clks[MSTP522]),
@@ -88,22 +425,40 @@ static struct clk_lookup lookups[] = {
88 425
89void __init r8a73a4_clock_init(void) 426void __init r8a73a4_clock_init(void)
90{ 427{
91 void __iomem *cpg_base, *reg; 428 void __iomem *reg;
92 int k, ret = 0; 429 int k, ret = 0;
430 u32 ckscr;
431
432 reg = ioremap_nocache(CKSCR, PAGE_SIZE);
433 BUG_ON(!reg);
434 ckscr = ioread32(reg);
435 iounmap(reg);
93 436
94 /* fix MPCLK to EXTAL2 for now. 437 switch ((ckscr >> 28) & 0x3) {
95 * this is needed until more detailed clock topology is supported 438 case 0:
96 */ 439 main_clk.parent = &extal1_clk;
97 cpg_base = ioremap_nocache(CPG_BASE, CPG_LEN); 440 break;
98 BUG_ON(!cpg_base); 441 case 1:
99 reg = cpg_base + (MPCKCR - CPG_BASE); 442 main_clk.parent = &extal1_div2_clk;
100 iowrite32(ioread32(reg) | 1 << 7 | 0x0c, reg); /* set CKSEL */ 443 break;
101 iounmap(cpg_base); 444 case 2:
445 main_clk.parent = &extal2_clk;
446 break;
447 case 3:
448 main_clk.parent = &extal2_div2_clk;
449 break;
450 }
102 451
103 for (k = 0; !ret && (k < ARRAY_SIZE(main_clks)); k++) 452 for (k = 0; !ret && (k < ARRAY_SIZE(main_clks)); k++)
104 ret = clk_register(main_clks[k]); 453 ret = clk_register(main_clks[k]);
105 454
106 if (!ret) 455 if (!ret)
456 ret = sh_clk_div4_register(div4_clks, DIV4_NR, &div4_table);
457
458 if (!ret)
459 ret = sh_clk_div6_reparent_register(div6_clks, DIV6_NR);
460
461 if (!ret)
107 ret = sh_clk_mstp_register(mstp_clks, MSTP_NR); 462 ret = sh_clk_mstp_register(mstp_clks, MSTP_NR);
108 463
109 clkdev_add_table(lookups, ARRAY_SIZE(lookups)); 464 clkdev_add_table(lookups, ARRAY_SIZE(lookups));
diff --git a/arch/arm/mach-shmobile/clock-r8a7740.c b/arch/arm/mach-shmobile/clock-r8a7740.c
index c0d39aa6de50..de10fd78bf2b 100644
--- a/arch/arm/mach-shmobile/clock-r8a7740.c
+++ b/arch/arm/mach-shmobile/clock-r8a7740.c
@@ -266,7 +266,7 @@ static struct clk fsiack_clk = {
266static struct clk fsibck_clk = { 266static struct clk fsibck_clk = {
267}; 267};
268 268
269struct clk *main_clks[] = { 269static struct clk *main_clks[] = {
270 &extalr_clk, 270 &extalr_clk,
271 &extal1_clk, 271 &extal1_clk,
272 &extal2_clk, 272 &extal2_clk,
@@ -317,7 +317,7 @@ enum {
317 DIV4_NR 317 DIV4_NR
318}; 318};
319 319
320struct clk div4_clks[DIV4_NR] = { 320static struct clk div4_clks[DIV4_NR] = {
321 [DIV4_I] = SH_CLK_DIV4(&pllc1_clk, FRQCRA, 20, 0x6fff, CLK_ENABLE_ON_INIT), 321 [DIV4_I] = SH_CLK_DIV4(&pllc1_clk, FRQCRA, 20, 0x6fff, CLK_ENABLE_ON_INIT),
322 [DIV4_ZG] = SH_CLK_DIV4(&pllc1_clk, FRQCRA, 16, 0x6fff, CLK_ENABLE_ON_INIT), 322 [DIV4_ZG] = SH_CLK_DIV4(&pllc1_clk, FRQCRA, 16, 0x6fff, CLK_ENABLE_ON_INIT),
323 [DIV4_B] = SH_CLK_DIV4(&pllc1_clk, FRQCRA, 8, 0x6fff, CLK_ENABLE_ON_INIT), 323 [DIV4_B] = SH_CLK_DIV4(&pllc1_clk, FRQCRA, 8, 0x6fff, CLK_ENABLE_ON_INIT),
@@ -461,7 +461,7 @@ enum {
461 461
462 MSTP329, MSTP328, MSTP323, MSTP320, 462 MSTP329, MSTP328, MSTP323, MSTP320,
463 MSTP314, MSTP313, MSTP312, 463 MSTP314, MSTP313, MSTP312,
464 MSTP309, 464 MSTP309, MSTP304,
465 465
466 MSTP416, MSTP415, MSTP407, MSTP406, 466 MSTP416, MSTP415, MSTP407, MSTP406,
467 467
@@ -499,6 +499,7 @@ static struct clk mstp_clks[MSTP_NR] = {
499 [MSTP313] = SH_CLK_MSTP32(&div4_clks[DIV4_HP], SMSTPCR3, 13, 0), /* SDHI1 */ 499 [MSTP313] = SH_CLK_MSTP32(&div4_clks[DIV4_HP], SMSTPCR3, 13, 0), /* SDHI1 */
500 [MSTP312] = SH_CLK_MSTP32(&div4_clks[DIV4_HP], SMSTPCR3, 12, 0), /* MMC */ 500 [MSTP312] = SH_CLK_MSTP32(&div4_clks[DIV4_HP], SMSTPCR3, 12, 0), /* MMC */
501 [MSTP309] = SH_CLK_MSTP32(&div4_clks[DIV4_HP], SMSTPCR3, 9, 0), /* GEther */ 501 [MSTP309] = SH_CLK_MSTP32(&div4_clks[DIV4_HP], SMSTPCR3, 9, 0), /* GEther */
502 [MSTP304] = SH_CLK_MSTP32(&div4_clks[DIV4_CP], SMSTPCR3, 4, 0), /* TPU0 */
502 503
503 [MSTP416] = SH_CLK_MSTP32(&div4_clks[DIV4_HP], SMSTPCR4, 16, 0), /* USBHOST */ 504 [MSTP416] = SH_CLK_MSTP32(&div4_clks[DIV4_HP], SMSTPCR4, 16, 0), /* USBHOST */
504 [MSTP415] = SH_CLK_MSTP32(&div4_clks[DIV4_HP], SMSTPCR4, 15, 0), /* SDHI2 */ 505 [MSTP415] = SH_CLK_MSTP32(&div4_clks[DIV4_HP], SMSTPCR4, 15, 0), /* SDHI2 */
@@ -551,6 +552,7 @@ static struct clk_lookup lookups[] = {
551 CLKDEV_DEV_ID("sh_tmu.4", &mstp_clks[MSTP111]), 552 CLKDEV_DEV_ID("sh_tmu.4", &mstp_clks[MSTP111]),
552 CLKDEV_DEV_ID("sh_tmu.5", &mstp_clks[MSTP111]), 553 CLKDEV_DEV_ID("sh_tmu.5", &mstp_clks[MSTP111]),
553 CLKDEV_DEV_ID("i2c-sh_mobile.0", &mstp_clks[MSTP116]), 554 CLKDEV_DEV_ID("i2c-sh_mobile.0", &mstp_clks[MSTP116]),
555 CLKDEV_DEV_ID("fff20000.i2c", &mstp_clks[MSTP116]),
554 CLKDEV_DEV_ID("sh_mobile_lcdc_fb.1", &mstp_clks[MSTP117]), 556 CLKDEV_DEV_ID("sh_mobile_lcdc_fb.1", &mstp_clks[MSTP117]),
555 CLKDEV_DEV_ID("sh_tmu.0", &mstp_clks[MSTP125]), 557 CLKDEV_DEV_ID("sh_tmu.0", &mstp_clks[MSTP125]),
556 CLKDEV_DEV_ID("sh_tmu.1", &mstp_clks[MSTP125]), 558 CLKDEV_DEV_ID("sh_tmu.1", &mstp_clks[MSTP125]),
@@ -584,6 +586,7 @@ static struct clk_lookup lookups[] = {
584 CLKDEV_DEV_ID("sh_cmt.10", &mstp_clks[MSTP329]), 586 CLKDEV_DEV_ID("sh_cmt.10", &mstp_clks[MSTP329]),
585 CLKDEV_DEV_ID("sh_fsi2", &mstp_clks[MSTP328]), 587 CLKDEV_DEV_ID("sh_fsi2", &mstp_clks[MSTP328]),
586 CLKDEV_DEV_ID("i2c-sh_mobile.1", &mstp_clks[MSTP323]), 588 CLKDEV_DEV_ID("i2c-sh_mobile.1", &mstp_clks[MSTP323]),
589 CLKDEV_DEV_ID("e6c20000.i2c", &mstp_clks[MSTP323]),
587 CLKDEV_DEV_ID("renesas_usbhs", &mstp_clks[MSTP320]), 590 CLKDEV_DEV_ID("renesas_usbhs", &mstp_clks[MSTP320]),
588 CLKDEV_DEV_ID("sh_mobile_sdhi.0", &mstp_clks[MSTP314]), 591 CLKDEV_DEV_ID("sh_mobile_sdhi.0", &mstp_clks[MSTP314]),
589 CLKDEV_DEV_ID("e6850000.sdhi", &mstp_clks[MSTP314]), 592 CLKDEV_DEV_ID("e6850000.sdhi", &mstp_clks[MSTP314]),
@@ -591,7 +594,9 @@ static struct clk_lookup lookups[] = {
591 CLKDEV_DEV_ID("e6860000.sdhi", &mstp_clks[MSTP313]), 594 CLKDEV_DEV_ID("e6860000.sdhi", &mstp_clks[MSTP313]),
592 CLKDEV_DEV_ID("sh_mmcif", &mstp_clks[MSTP312]), 595 CLKDEV_DEV_ID("sh_mmcif", &mstp_clks[MSTP312]),
593 CLKDEV_DEV_ID("e6bd0000.mmcif", &mstp_clks[MSTP312]), 596 CLKDEV_DEV_ID("e6bd0000.mmcif", &mstp_clks[MSTP312]),
594 CLKDEV_DEV_ID("sh-eth", &mstp_clks[MSTP309]), 597 CLKDEV_DEV_ID("r8a7740-gether", &mstp_clks[MSTP309]),
598 CLKDEV_DEV_ID("e9a00000.sh-eth", &mstp_clks[MSTP309]),
599 CLKDEV_DEV_ID("renesas_tpu_pwm", &mstp_clks[MSTP304]),
595 600
596 CLKDEV_DEV_ID("sh_mobile_sdhi.2", &mstp_clks[MSTP415]), 601 CLKDEV_DEV_ID("sh_mobile_sdhi.2", &mstp_clks[MSTP415]),
597 CLKDEV_DEV_ID("e6870000.sdhi", &mstp_clks[MSTP415]), 602 CLKDEV_DEV_ID("e6870000.sdhi", &mstp_clks[MSTP415]),
diff --git a/arch/arm/mach-shmobile/clock-r8a7778.c b/arch/arm/mach-shmobile/clock-r8a7778.c
index cd6855290b1f..a0e9eb72e46d 100644
--- a/arch/arm/mach-shmobile/clock-r8a7778.c
+++ b/arch/arm/mach-shmobile/clock-r8a7778.c
@@ -23,9 +23,23 @@
23 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 23 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
24 */ 24 */
25 25
26/*
27 * MD MD MD MD PLLA PLLB EXTAL clki clkz
28 * 19 18 12 11 (HMz) (MHz) (MHz)
29 *----------------------------------------------------------------------------
30 * 1 0 0 0 x21 x21 38.00 800 800
31 * 1 0 0 1 x24 x24 33.33 800 800
32 * 1 0 1 0 x28 x28 28.50 800 800
33 * 1 0 1 1 x32 x32 25.00 800 800
34 * 1 1 0 1 x24 x21 33.33 800 700
35 * 1 1 1 0 x28 x21 28.50 800 600
36 * 1 1 1 1 x32 x24 25.00 800 600
37 */
38
26#include <linux/io.h> 39#include <linux/io.h>
27#include <linux/sh_clk.h> 40#include <linux/sh_clk.h>
28#include <linux/clkdev.h> 41#include <linux/clkdev.h>
42#include <mach/clock.h>
29#include <mach/common.h> 43#include <mach/common.h>
30 44
31#define MSTPCR0 IOMEM(0xffc80030) 45#define MSTPCR0 IOMEM(0xffc80030)
@@ -37,6 +51,9 @@
37#define MSTPCR4 IOMEM(0xffc80050) 51#define MSTPCR4 IOMEM(0xffc80050)
38#define MSTPCR5 IOMEM(0xffc80054) 52#define MSTPCR5 IOMEM(0xffc80054)
39#define MSTPCR6 IOMEM(0xffc80058) 53#define MSTPCR6 IOMEM(0xffc80058)
54#define MODEMR 0xFFCC0020
55
56#define MD(nr) BIT(nr)
40 57
41/* ioremap() through clock mapping mandatory to avoid 58/* ioremap() through clock mapping mandatory to avoid
42 * collision with ARM coherent DMA virtual memory range. 59 * collision with ARM coherent DMA virtual memory range.
@@ -47,37 +64,94 @@ static struct clk_mapping cpg_mapping = {
47 .len = 0x80, 64 .len = 0x80,
48}; 65};
49 66
50static struct clk clkp = { 67static struct clk extal_clk = {
51 .rate = 62500000, /* FIXME: shortcut */ 68 /* .rate will be updated on r8a7778_clock_init() */
52 .flags = CLK_ENABLE_ON_INIT,
53 .mapping = &cpg_mapping, 69 .mapping = &cpg_mapping,
54}; 70};
55 71
72/*
73 * clock ratio of these clock will be updated
74 * on r8a7778_clock_init()
75 */
76SH_FIXED_RATIO_CLK_SET(plla_clk, extal_clk, 1, 1);
77SH_FIXED_RATIO_CLK_SET(pllb_clk, extal_clk, 1, 1);
78SH_FIXED_RATIO_CLK_SET(i_clk, plla_clk, 1, 1);
79SH_FIXED_RATIO_CLK_SET(s_clk, plla_clk, 1, 1);
80SH_FIXED_RATIO_CLK_SET(s1_clk, plla_clk, 1, 1);
81SH_FIXED_RATIO_CLK_SET(s3_clk, plla_clk, 1, 1);
82SH_FIXED_RATIO_CLK_SET(s4_clk, plla_clk, 1, 1);
83SH_FIXED_RATIO_CLK_SET(b_clk, plla_clk, 1, 1);
84SH_FIXED_RATIO_CLK_SET(out_clk, plla_clk, 1, 1);
85SH_FIXED_RATIO_CLK_SET(p_clk, plla_clk, 1, 1);
86SH_FIXED_RATIO_CLK_SET(g_clk, plla_clk, 1, 1);
87SH_FIXED_RATIO_CLK_SET(z_clk, pllb_clk, 1, 1);
88
56static struct clk *main_clks[] = { 89static struct clk *main_clks[] = {
57 &clkp, 90 &extal_clk,
91 &plla_clk,
92 &pllb_clk,
93 &i_clk,
94 &s_clk,
95 &s1_clk,
96 &s3_clk,
97 &s4_clk,
98 &b_clk,
99 &out_clk,
100 &p_clk,
101 &g_clk,
102 &z_clk,
58}; 103};
59 104
60enum { 105enum {
106 MSTP331,
107 MSTP323, MSTP322, MSTP321,
61 MSTP114, 108 MSTP114,
62 MSTP026, MSTP025, MSTP024, MSTP023, MSTP022, MSTP021, 109 MSTP100,
110 MSTP030,
111 MSTP029, MSTP028, MSTP027, MSTP026, MSTP025, MSTP024, MSTP023, MSTP022, MSTP021,
63 MSTP016, MSTP015, 112 MSTP016, MSTP015,
113 MSTP007,
64 MSTP_NR }; 114 MSTP_NR };
65 115
66static struct clk mstp_clks[MSTP_NR] = { 116static struct clk mstp_clks[MSTP_NR] = {
67 [MSTP114] = SH_CLK_MSTP32(&clkp, MSTPCR1, 14, 0), /* Ether */ 117 [MSTP331] = SH_CLK_MSTP32(&s4_clk, MSTPCR3, 31, 0), /* MMC */
68 [MSTP026] = SH_CLK_MSTP32(&clkp, MSTPCR0, 26, 0), /* SCIF0 */ 118 [MSTP323] = SH_CLK_MSTP32(&p_clk, MSTPCR3, 23, 0), /* SDHI0 */
69 [MSTP025] = SH_CLK_MSTP32(&clkp, MSTPCR0, 25, 0), /* SCIF1 */ 119 [MSTP322] = SH_CLK_MSTP32(&p_clk, MSTPCR3, 22, 0), /* SDHI1 */
70 [MSTP024] = SH_CLK_MSTP32(&clkp, MSTPCR0, 24, 0), /* SCIF2 */ 120 [MSTP321] = SH_CLK_MSTP32(&p_clk, MSTPCR3, 21, 0), /* SDHI2 */
71 [MSTP023] = SH_CLK_MSTP32(&clkp, MSTPCR0, 23, 0), /* SCIF3 */ 121 [MSTP114] = SH_CLK_MSTP32(&p_clk, MSTPCR1, 14, 0), /* Ether */
72 [MSTP022] = SH_CLK_MSTP32(&clkp, MSTPCR0, 22, 0), /* SCIF4 */ 122 [MSTP100] = SH_CLK_MSTP32(&p_clk, MSTPCR1, 0, 0), /* USB0/1 */
73 [MSTP021] = SH_CLK_MSTP32(&clkp, MSTPCR0, 21, 0), /* SCIF5 */ 123 [MSTP030] = SH_CLK_MSTP32(&p_clk, MSTPCR0, 30, 0), /* I2C0 */
74 [MSTP016] = SH_CLK_MSTP32(&clkp, MSTPCR0, 16, 0), /* TMU0 */ 124 [MSTP029] = SH_CLK_MSTP32(&p_clk, MSTPCR0, 29, 0), /* I2C1 */
75 [MSTP015] = SH_CLK_MSTP32(&clkp, MSTPCR0, 15, 0), /* TMU1 */ 125 [MSTP028] = SH_CLK_MSTP32(&p_clk, MSTPCR0, 28, 0), /* I2C2 */
126 [MSTP027] = SH_CLK_MSTP32(&p_clk, MSTPCR0, 27, 0), /* I2C3 */
127 [MSTP026] = SH_CLK_MSTP32(&p_clk, MSTPCR0, 26, 0), /* SCIF0 */
128 [MSTP025] = SH_CLK_MSTP32(&p_clk, MSTPCR0, 25, 0), /* SCIF1 */
129 [MSTP024] = SH_CLK_MSTP32(&p_clk, MSTPCR0, 24, 0), /* SCIF2 */
130 [MSTP023] = SH_CLK_MSTP32(&p_clk, MSTPCR0, 23, 0), /* SCIF3 */
131 [MSTP022] = SH_CLK_MSTP32(&p_clk, MSTPCR0, 22, 0), /* SCIF4 */
132 [MSTP021] = SH_CLK_MSTP32(&p_clk, MSTPCR0, 21, 0), /* SCIF5 */
133 [MSTP016] = SH_CLK_MSTP32(&p_clk, MSTPCR0, 16, 0), /* TMU0 */
134 [MSTP015] = SH_CLK_MSTP32(&p_clk, MSTPCR0, 15, 0), /* TMU1 */
135 [MSTP007] = SH_CLK_MSTP32(&p_clk, MSTPCR0, 7, 0), /* HSPI */
76}; 136};
77 137
78static struct clk_lookup lookups[] = { 138static struct clk_lookup lookups[] = {
139 /* main */
140 CLKDEV_CON_ID("shyway_clk", &s_clk),
141 CLKDEV_CON_ID("peripheral_clk", &p_clk),
142
79 /* MSTP32 clocks */ 143 /* MSTP32 clocks */
80 CLKDEV_DEV_ID("sh-eth", &mstp_clks[MSTP114]), /* Ether */ 144 CLKDEV_DEV_ID("sh_mmcif", &mstp_clks[MSTP331]), /* MMC */
145 CLKDEV_DEV_ID("sh_mobile_sdhi.0", &mstp_clks[MSTP323]), /* SDHI0 */
146 CLKDEV_DEV_ID("sh_mobile_sdhi.1", &mstp_clks[MSTP322]), /* SDHI1 */
147 CLKDEV_DEV_ID("sh_mobile_sdhi.2", &mstp_clks[MSTP321]), /* SDHI2 */
148 CLKDEV_DEV_ID("r8a777x-ether", &mstp_clks[MSTP114]), /* Ether */
149 CLKDEV_DEV_ID("ehci-platform", &mstp_clks[MSTP100]), /* USB EHCI port0/1 */
150 CLKDEV_DEV_ID("ohci-platform", &mstp_clks[MSTP100]), /* USB OHCI port0/1 */
151 CLKDEV_DEV_ID("i2c-rcar.0", &mstp_clks[MSTP030]), /* I2C0 */
152 CLKDEV_DEV_ID("i2c-rcar.1", &mstp_clks[MSTP029]), /* I2C1 */
153 CLKDEV_DEV_ID("i2c-rcar.2", &mstp_clks[MSTP028]), /* I2C2 */
154 CLKDEV_DEV_ID("i2c-rcar.3", &mstp_clks[MSTP027]), /* I2C3 */
81 CLKDEV_DEV_ID("sh-sci.0", &mstp_clks[MSTP026]), /* SCIF0 */ 155 CLKDEV_DEV_ID("sh-sci.0", &mstp_clks[MSTP026]), /* SCIF0 */
82 CLKDEV_DEV_ID("sh-sci.1", &mstp_clks[MSTP025]), /* SCIF1 */ 156 CLKDEV_DEV_ID("sh-sci.1", &mstp_clks[MSTP025]), /* SCIF1 */
83 CLKDEV_DEV_ID("sh-sci.2", &mstp_clks[MSTP024]), /* SCIF2 */ 157 CLKDEV_DEV_ID("sh-sci.2", &mstp_clks[MSTP024]), /* SCIF2 */
@@ -86,12 +160,93 @@ static struct clk_lookup lookups[] = {
86 CLKDEV_DEV_ID("sh-sci.5", &mstp_clks[MSTP021]), /* SCIF6 */ 160 CLKDEV_DEV_ID("sh-sci.5", &mstp_clks[MSTP021]), /* SCIF6 */
87 CLKDEV_DEV_ID("sh_tmu.0", &mstp_clks[MSTP016]), /* TMU00 */ 161 CLKDEV_DEV_ID("sh_tmu.0", &mstp_clks[MSTP016]), /* TMU00 */
88 CLKDEV_DEV_ID("sh_tmu.1", &mstp_clks[MSTP015]), /* TMU01 */ 162 CLKDEV_DEV_ID("sh_tmu.1", &mstp_clks[MSTP015]), /* TMU01 */
163 CLKDEV_DEV_ID("sh-hspi.0", &mstp_clks[MSTP007]), /* HSPI0 */
164 CLKDEV_DEV_ID("sh-hspi.1", &mstp_clks[MSTP007]), /* HSPI1 */
165 CLKDEV_DEV_ID("sh-hspi.2", &mstp_clks[MSTP007]), /* HSPI2 */
89}; 166};
90 167
91void __init r8a7778_clock_init(void) 168void __init r8a7778_clock_init(void)
92{ 169{
170 void __iomem *modemr = ioremap_nocache(MODEMR, PAGE_SIZE);
171 u32 mode;
93 int k, ret = 0; 172 int k, ret = 0;
94 173
174 BUG_ON(!modemr);
175 mode = ioread32(modemr);
176 iounmap(modemr);
177
178 switch (mode & (MD(19) | MD(18) | MD(12) | MD(11))) {
179 case MD(19):
180 extal_clk.rate = 38000000;
181 SH_CLK_SET_RATIO(&plla_clk_ratio, 21, 1);
182 SH_CLK_SET_RATIO(&pllb_clk_ratio, 21, 1);
183 break;
184 case MD(19) | MD(11):
185 extal_clk.rate = 33333333;
186 SH_CLK_SET_RATIO(&plla_clk_ratio, 24, 1);
187 SH_CLK_SET_RATIO(&pllb_clk_ratio, 24, 1);
188 break;
189 case MD(19) | MD(12):
190 extal_clk.rate = 28500000;
191 SH_CLK_SET_RATIO(&plla_clk_ratio, 28, 1);
192 SH_CLK_SET_RATIO(&pllb_clk_ratio, 28, 1);
193 break;
194 case MD(19) | MD(12) | MD(11):
195 extal_clk.rate = 25000000;
196 SH_CLK_SET_RATIO(&plla_clk_ratio, 32, 1);
197 SH_CLK_SET_RATIO(&pllb_clk_ratio, 32, 1);
198 break;
199 case MD(19) | MD(18) | MD(11):
200 extal_clk.rate = 33333333;
201 SH_CLK_SET_RATIO(&plla_clk_ratio, 24, 1);
202 SH_CLK_SET_RATIO(&pllb_clk_ratio, 21, 1);
203 break;
204 case MD(19) | MD(18) | MD(12):
205 extal_clk.rate = 28500000;
206 SH_CLK_SET_RATIO(&plla_clk_ratio, 28, 1);
207 SH_CLK_SET_RATIO(&pllb_clk_ratio, 21, 1);
208 break;
209 case MD(19) | MD(18) | MD(12) | MD(11):
210 extal_clk.rate = 25000000;
211 SH_CLK_SET_RATIO(&plla_clk_ratio, 32, 1);
212 SH_CLK_SET_RATIO(&pllb_clk_ratio, 24, 1);
213 break;
214 default:
215 BUG();
216 }
217
218 if (mode & MD(1)) {
219 SH_CLK_SET_RATIO(&i_clk_ratio, 1, 1);
220 SH_CLK_SET_RATIO(&s_clk_ratio, 1, 3);
221 SH_CLK_SET_RATIO(&s1_clk_ratio, 1, 6);
222 SH_CLK_SET_RATIO(&s3_clk_ratio, 1, 4);
223 SH_CLK_SET_RATIO(&s4_clk_ratio, 1, 8);
224 SH_CLK_SET_RATIO(&p_clk_ratio, 1, 12);
225 SH_CLK_SET_RATIO(&g_clk_ratio, 1, 12);
226 if (mode & MD(2)) {
227 SH_CLK_SET_RATIO(&b_clk_ratio, 1, 18);
228 SH_CLK_SET_RATIO(&out_clk_ratio, 1, 18);
229 } else {
230 SH_CLK_SET_RATIO(&b_clk_ratio, 1, 12);
231 SH_CLK_SET_RATIO(&out_clk_ratio, 1, 12);
232 }
233 } else {
234 SH_CLK_SET_RATIO(&i_clk_ratio, 1, 1);
235 SH_CLK_SET_RATIO(&s_clk_ratio, 1, 4);
236 SH_CLK_SET_RATIO(&s1_clk_ratio, 1, 8);
237 SH_CLK_SET_RATIO(&s3_clk_ratio, 1, 4);
238 SH_CLK_SET_RATIO(&s4_clk_ratio, 1, 8);
239 SH_CLK_SET_RATIO(&p_clk_ratio, 1, 16);
240 SH_CLK_SET_RATIO(&g_clk_ratio, 1, 12);
241 if (mode & MD(2)) {
242 SH_CLK_SET_RATIO(&b_clk_ratio, 1, 16);
243 SH_CLK_SET_RATIO(&out_clk_ratio, 1, 16);
244 } else {
245 SH_CLK_SET_RATIO(&b_clk_ratio, 1, 12);
246 SH_CLK_SET_RATIO(&out_clk_ratio, 1, 12);
247 }
248 }
249
95 for (k = 0; !ret && (k < ARRAY_SIZE(main_clks)); k++) 250 for (k = 0; !ret && (k < ARRAY_SIZE(main_clks)); k++)
96 ret = clk_register(main_clks[k]); 251 ret = clk_register(main_clks[k]);
97 252
diff --git a/arch/arm/mach-shmobile/clock-r8a7779.c b/arch/arm/mach-shmobile/clock-r8a7779.c
index 31d5cd4d9787..10340f5becbb 100644
--- a/arch/arm/mach-shmobile/clock-r8a7779.c
+++ b/arch/arm/mach-shmobile/clock-r8a7779.c
@@ -112,7 +112,7 @@ static struct clk *main_clks[] = {
112}; 112};
113 113
114enum { MSTP323, MSTP322, MSTP321, MSTP320, 114enum { MSTP323, MSTP322, MSTP321, MSTP320,
115 MSTP115, MSTP114, 115 MSTP116, MSTP115, MSTP114,
116 MSTP103, MSTP101, MSTP100, 116 MSTP103, MSTP101, MSTP100,
117 MSTP030, 117 MSTP030,
118 MSTP029, MSTP028, MSTP027, MSTP026, MSTP025, MSTP024, MSTP023, MSTP022, MSTP021, 118 MSTP029, MSTP028, MSTP027, MSTP026, MSTP025, MSTP024, MSTP023, MSTP022, MSTP021,
@@ -125,6 +125,7 @@ static struct clk mstp_clks[MSTP_NR] = {
125 [MSTP322] = SH_CLK_MSTP32(&clkp_clk, MSTPCR3, 22, 0), /* SDHI1 */ 125 [MSTP322] = SH_CLK_MSTP32(&clkp_clk, MSTPCR3, 22, 0), /* SDHI1 */
126 [MSTP321] = SH_CLK_MSTP32(&clkp_clk, MSTPCR3, 21, 0), /* SDHI2 */ 126 [MSTP321] = SH_CLK_MSTP32(&clkp_clk, MSTPCR3, 21, 0), /* SDHI2 */
127 [MSTP320] = SH_CLK_MSTP32(&clkp_clk, MSTPCR3, 20, 0), /* SDHI3 */ 127 [MSTP320] = SH_CLK_MSTP32(&clkp_clk, MSTPCR3, 20, 0), /* SDHI3 */
128 [MSTP116] = SH_CLK_MSTP32(&clkp_clk, MSTPCR1, 16, 0), /* PCIe */
128 [MSTP115] = SH_CLK_MSTP32(&clkp_clk, MSTPCR1, 15, 0), /* SATA */ 129 [MSTP115] = SH_CLK_MSTP32(&clkp_clk, MSTPCR1, 15, 0), /* SATA */
129 [MSTP114] = SH_CLK_MSTP32(&clkp_clk, MSTPCR1, 14, 0), /* Ether */ 130 [MSTP114] = SH_CLK_MSTP32(&clkp_clk, MSTPCR1, 14, 0), /* Ether */
130 [MSTP103] = SH_CLK_MSTP32(&clks_clk, MSTPCR1, 3, 0), /* DU */ 131 [MSTP103] = SH_CLK_MSTP32(&clks_clk, MSTPCR1, 3, 0), /* DU */
@@ -161,9 +162,10 @@ static struct clk_lookup lookups[] = {
161 CLKDEV_CON_ID("peripheral_clk", &clkp_clk), 162 CLKDEV_CON_ID("peripheral_clk", &clkp_clk),
162 163
163 /* MSTP32 clocks */ 164 /* MSTP32 clocks */
165 CLKDEV_DEV_ID("rcar-pcie", &mstp_clks[MSTP116]), /* PCIe */
164 CLKDEV_DEV_ID("sata_rcar", &mstp_clks[MSTP115]), /* SATA */ 166 CLKDEV_DEV_ID("sata_rcar", &mstp_clks[MSTP115]), /* SATA */
165 CLKDEV_DEV_ID("fc600000.sata", &mstp_clks[MSTP115]), /* SATA w/DT */ 167 CLKDEV_DEV_ID("fc600000.sata", &mstp_clks[MSTP115]), /* SATA w/DT */
166 CLKDEV_DEV_ID("sh-eth", &mstp_clks[MSTP114]), /* Ether */ 168 CLKDEV_DEV_ID("r8a777x-ether", &mstp_clks[MSTP114]), /* Ether */
167 CLKDEV_DEV_ID("ehci-platform.1", &mstp_clks[MSTP101]), /* USB EHCI port2 */ 169 CLKDEV_DEV_ID("ehci-platform.1", &mstp_clks[MSTP101]), /* USB EHCI port2 */
168 CLKDEV_DEV_ID("ohci-platform.1", &mstp_clks[MSTP101]), /* USB OHCI port2 */ 170 CLKDEV_DEV_ID("ohci-platform.1", &mstp_clks[MSTP101]), /* USB OHCI port2 */
169 CLKDEV_DEV_ID("ehci-platform.0", &mstp_clks[MSTP100]), /* USB EHCI port0/1 */ 171 CLKDEV_DEV_ID("ehci-platform.0", &mstp_clks[MSTP100]), /* USB EHCI port0/1 */
diff --git a/arch/arm/mach-shmobile/clock-r8a7790.c b/arch/arm/mach-shmobile/clock-r8a7790.c
index bad9bf2e34d6..5d71313df52d 100644
--- a/arch/arm/mach-shmobile/clock-r8a7790.c
+++ b/arch/arm/mach-shmobile/clock-r8a7790.c
@@ -22,48 +22,228 @@
22#include <linux/kernel.h> 22#include <linux/kernel.h>
23#include <linux/sh_clk.h> 23#include <linux/sh_clk.h>
24#include <linux/clkdev.h> 24#include <linux/clkdev.h>
25#include <mach/clock.h>
25#include <mach/common.h> 26#include <mach/common.h>
26 27
28/*
29 * MD EXTAL PLL0 PLL1 PLL3
30 * 14 13 19 (MHz) *1 *1
31 *---------------------------------------------------
32 * 0 0 0 15 x 1 x172/2 x208/2 x106
33 * 0 0 1 15 x 1 x172/2 x208/2 x88
34 * 0 1 0 20 x 1 x130/2 x156/2 x80
35 * 0 1 1 20 x 1 x130/2 x156/2 x66
36 * 1 0 0 26 / 2 x200/2 x240/2 x122
37 * 1 0 1 26 / 2 x200/2 x240/2 x102
38 * 1 1 0 30 / 2 x172/2 x208/2 x106
39 * 1 1 1 30 / 2 x172/2 x208/2 x88
40 *
41 * *1 : Table 7.6 indicates VCO ouput (PLLx = VCO/2)
42 * see "p1 / 2" on R8A7790_CLOCK_ROOT() below
43 */
44
45#define MD(nr) (1 << nr)
46
27#define CPG_BASE 0xe6150000 47#define CPG_BASE 0xe6150000
28#define CPG_LEN 0x1000 48#define CPG_LEN 0x1000
29 49
30#define SMSTPCR2 0xe6150138 50#define SMSTPCR2 0xe6150138
51#define SMSTPCR3 0xe615013c
31#define SMSTPCR7 0xe615014c 52#define SMSTPCR7 0xe615014c
32 53
54#define MODEMR 0xE6160060
55#define SDCKCR 0xE6150074
56#define SD2CKCR 0xE6150078
57#define SD3CKCR 0xE615007C
58#define MMC0CKCR 0xE6150240
59#define MMC1CKCR 0xE6150244
60#define SSPCKCR 0xE6150248
61#define SSPRSCKCR 0xE615024C
62
33static struct clk_mapping cpg_mapping = { 63static struct clk_mapping cpg_mapping = {
34 .phys = CPG_BASE, 64 .phys = CPG_BASE,
35 .len = CPG_LEN, 65 .len = CPG_LEN,
36}; 66};
37 67
38static struct clk p_clk = { 68static struct clk extal_clk = {
39 .rate = 65000000, /* shortcut for now */ 69 /* .rate will be updated on r8a7790_clock_init() */
40 .mapping = &cpg_mapping, 70 .mapping = &cpg_mapping,
41}; 71};
42 72
43static struct clk mp_clk = { 73static struct sh_clk_ops followparent_clk_ops = {
44 .rate = 52000000, /* shortcut for now */ 74 .recalc = followparent_recalc,
45 .mapping = &cpg_mapping, 75};
76
77static struct clk main_clk = {
78 /* .parent will be set r8a73a4_clock_init */
79 .ops = &followparent_clk_ops,
46}; 80};
47 81
82/*
83 * clock ratio of these clock will be updated
84 * on r8a7790_clock_init()
85 */
86SH_FIXED_RATIO_CLK_SET(pll1_clk, main_clk, 1, 1);
87SH_FIXED_RATIO_CLK_SET(pll3_clk, main_clk, 1, 1);
88SH_FIXED_RATIO_CLK_SET(lb_clk, pll1_clk, 1, 1);
89SH_FIXED_RATIO_CLK_SET(qspi_clk, pll1_clk, 1, 1);
90
91/* fixed ratio clock */
92SH_FIXED_RATIO_CLK_SET(extal_div2_clk, extal_clk, 1, 2);
93SH_FIXED_RATIO_CLK_SET(cp_clk, extal_clk, 1, 2);
94
95SH_FIXED_RATIO_CLK_SET(pll1_div2_clk, pll1_clk, 1, 2);
96SH_FIXED_RATIO_CLK_SET(zg_clk, pll1_clk, 1, 3);
97SH_FIXED_RATIO_CLK_SET(zx_clk, pll1_clk, 1, 3);
98SH_FIXED_RATIO_CLK_SET(zs_clk, pll1_clk, 1, 6);
99SH_FIXED_RATIO_CLK_SET(hp_clk, pll1_clk, 1, 12);
100SH_FIXED_RATIO_CLK_SET(i_clk, pll1_clk, 1, 2);
101SH_FIXED_RATIO_CLK_SET(b_clk, pll1_clk, 1, 12);
102SH_FIXED_RATIO_CLK_SET(p_clk, pll1_clk, 1, 24);
103SH_FIXED_RATIO_CLK_SET(cl_clk, pll1_clk, 1, 48);
104SH_FIXED_RATIO_CLK_SET(m2_clk, pll1_clk, 1, 8);
105SH_FIXED_RATIO_CLK_SET(imp_clk, pll1_clk, 1, 4);
106SH_FIXED_RATIO_CLK_SET(rclk_clk, pll1_clk, 1, (48 * 1024));
107SH_FIXED_RATIO_CLK_SET(oscclk_clk, pll1_clk, 1, (12 * 1024));
108
109SH_FIXED_RATIO_CLK_SET(zb3_clk, pll3_clk, 1, 4);
110SH_FIXED_RATIO_CLK_SET(zb3d2_clk, pll3_clk, 1, 8);
111SH_FIXED_RATIO_CLK_SET(ddr_clk, pll3_clk, 1, 8);
112SH_FIXED_RATIO_CLK_SET(mp_clk, pll1_div2_clk, 1, 15);
113
48static struct clk *main_clks[] = { 114static struct clk *main_clks[] = {
115 &extal_clk,
116 &extal_div2_clk,
117 &main_clk,
118 &pll1_clk,
119 &pll1_div2_clk,
120 &pll3_clk,
121 &lb_clk,
122 &qspi_clk,
123 &zg_clk,
124 &zx_clk,
125 &zs_clk,
126 &hp_clk,
127 &i_clk,
128 &b_clk,
49 &p_clk, 129 &p_clk,
130 &cl_clk,
131 &m2_clk,
132 &imp_clk,
133 &rclk_clk,
134 &oscclk_clk,
135 &zb3_clk,
136 &zb3d2_clk,
137 &ddr_clk,
50 &mp_clk, 138 &mp_clk,
139 &cp_clk,
140};
141
142/* SDHI (DIV4) clock */
143static int divisors[] = { 2, 3, 4, 6, 8, 12, 16, 18, 24, 0, 36, 48, 10 };
144
145static struct clk_div_mult_table div4_div_mult_table = {
146 .divisors = divisors,
147 .nr_divisors = ARRAY_SIZE(divisors),
148};
149
150static struct clk_div4_table div4_table = {
151 .div_mult_table = &div4_div_mult_table,
152};
153
154enum {
155 DIV4_SDH, DIV4_SD0, DIV4_SD1, DIV4_NR
156};
157
158static struct clk div4_clks[DIV4_NR] = {
159 [DIV4_SDH] = SH_CLK_DIV4(&pll1_clk, SDCKCR, 8, 0x0dff, CLK_ENABLE_ON_INIT),
160 [DIV4_SD0] = SH_CLK_DIV4(&pll1_clk, SDCKCR, 4, 0x1de0, CLK_ENABLE_ON_INIT),
161 [DIV4_SD1] = SH_CLK_DIV4(&pll1_clk, SDCKCR, 0, 0x1de0, CLK_ENABLE_ON_INIT),
162};
163
164/* DIV6 clocks */
165enum {
166 DIV6_SD2, DIV6_SD3,
167 DIV6_MMC0, DIV6_MMC1,
168 DIV6_SSP, DIV6_SSPRS,
169 DIV6_NR
170};
171
172static struct clk div6_clks[DIV6_NR] = {
173 [DIV6_SD2] = SH_CLK_DIV6(&pll1_div2_clk, SD2CKCR, 0),
174 [DIV6_SD3] = SH_CLK_DIV6(&pll1_div2_clk, SD3CKCR, 0),
175 [DIV6_MMC0] = SH_CLK_DIV6(&pll1_div2_clk, MMC0CKCR, 0),
176 [DIV6_MMC1] = SH_CLK_DIV6(&pll1_div2_clk, MMC1CKCR, 0),
177 [DIV6_SSP] = SH_CLK_DIV6(&pll1_div2_clk, SSPCKCR, 0),
178 [DIV6_SSPRS] = SH_CLK_DIV6(&pll1_div2_clk, SSPRSCKCR, 0),
179};
180
181/* MSTP */
182enum {
183 MSTP721, MSTP720,
184 MSTP717, MSTP716,
185 MSTP315, MSTP314, MSTP313, MSTP312, MSTP311, MSTP305, MSTP304,
186 MSTP216, MSTP207, MSTP206, MSTP204, MSTP203, MSTP202,
187 MSTP_NR
51}; 188};
52 189
53enum { MSTP721, MSTP720,
54 MSTP216, MSTP207, MSTP206, MSTP204, MSTP203, MSTP202, MSTP_NR };
55static struct clk mstp_clks[MSTP_NR] = { 190static struct clk mstp_clks[MSTP_NR] = {
56 [MSTP721] = SH_CLK_MSTP32(&p_clk, SMSTPCR7, 21, 0), /* SCIF0 */ 191 [MSTP721] = SH_CLK_MSTP32(&p_clk, SMSTPCR7, 21, 0), /* SCIF0 */
57 [MSTP720] = SH_CLK_MSTP32(&p_clk, SMSTPCR7, 20, 0), /* SCIF1 */ 192 [MSTP720] = SH_CLK_MSTP32(&p_clk, SMSTPCR7, 20, 0), /* SCIF1 */
193 [MSTP315] = SH_CLK_MSTP32(&div6_clks[DIV6_MMC0], SMSTPCR3, 15, 0), /* MMC0 */
194 [MSTP314] = SH_CLK_MSTP32(&div4_clks[DIV4_SD0], SMSTPCR3, 14, 0), /* SDHI0 */
195 [MSTP313] = SH_CLK_MSTP32(&div4_clks[DIV4_SD1], SMSTPCR3, 13, 0), /* SDHI1 */
196 [MSTP312] = SH_CLK_MSTP32(&div6_clks[DIV6_SD2], SMSTPCR3, 12, 0), /* SDHI2 */
197 [MSTP311] = SH_CLK_MSTP32(&div6_clks[DIV6_SD3], SMSTPCR3, 11, 0), /* SDHI3 */
198 [MSTP305] = SH_CLK_MSTP32(&div6_clks[DIV6_MMC1], SMSTPCR3, 5, 0), /* MMC1 */
199 [MSTP304] = SH_CLK_MSTP32(&cp_clk, SMSTPCR3, 4, 0), /* TPU0 */
58 [MSTP216] = SH_CLK_MSTP32(&mp_clk, SMSTPCR2, 16, 0), /* SCIFB2 */ 200 [MSTP216] = SH_CLK_MSTP32(&mp_clk, SMSTPCR2, 16, 0), /* SCIFB2 */
59 [MSTP207] = SH_CLK_MSTP32(&mp_clk, SMSTPCR2, 7, 0), /* SCIFB1 */ 201 [MSTP207] = SH_CLK_MSTP32(&mp_clk, SMSTPCR2, 7, 0), /* SCIFB1 */
60 [MSTP206] = SH_CLK_MSTP32(&mp_clk, SMSTPCR2, 6, 0), /* SCIFB0 */ 202 [MSTP206] = SH_CLK_MSTP32(&mp_clk, SMSTPCR2, 6, 0), /* SCIFB0 */
61 [MSTP204] = SH_CLK_MSTP32(&mp_clk, SMSTPCR2, 4, 0), /* SCIFA0 */ 203 [MSTP204] = SH_CLK_MSTP32(&mp_clk, SMSTPCR2, 4, 0), /* SCIFA0 */
62 [MSTP203] = SH_CLK_MSTP32(&mp_clk, SMSTPCR2, 3, 0), /* SCIFA1 */ 204 [MSTP203] = SH_CLK_MSTP32(&mp_clk, SMSTPCR2, 3, 0), /* SCIFA1 */
63 [MSTP202] = SH_CLK_MSTP32(&mp_clk, SMSTPCR2, 2, 0), /* SCIFA2 */ 205 [MSTP202] = SH_CLK_MSTP32(&mp_clk, SMSTPCR2, 2, 0), /* SCIFA2 */
206 [MSTP717] = SH_CLK_MSTP32(&zs_clk, SMSTPCR7, 17, 0), /* HSCIF0 */
207 [MSTP716] = SH_CLK_MSTP32(&zs_clk, SMSTPCR7, 16, 0), /* HSCIF1 */
64}; 208};
65 209
66static struct clk_lookup lookups[] = { 210static struct clk_lookup lookups[] = {
211
212 /* main clocks */
213 CLKDEV_CON_ID("extal", &extal_clk),
214 CLKDEV_CON_ID("extal_div2", &extal_div2_clk),
215 CLKDEV_CON_ID("main", &main_clk),
216 CLKDEV_CON_ID("pll1", &pll1_clk),
217 CLKDEV_CON_ID("pll1_div2", &pll1_div2_clk),
218 CLKDEV_CON_ID("pll3", &pll3_clk),
219 CLKDEV_CON_ID("zg", &zg_clk),
220 CLKDEV_CON_ID("zx", &zx_clk),
221 CLKDEV_CON_ID("zs", &zs_clk),
222 CLKDEV_CON_ID("hp", &hp_clk),
223 CLKDEV_CON_ID("i", &i_clk),
224 CLKDEV_CON_ID("b", &b_clk),
225 CLKDEV_CON_ID("lb", &lb_clk),
226 CLKDEV_CON_ID("p", &p_clk),
227 CLKDEV_CON_ID("cl", &cl_clk),
228 CLKDEV_CON_ID("m2", &m2_clk),
229 CLKDEV_CON_ID("imp", &imp_clk),
230 CLKDEV_CON_ID("rclk", &rclk_clk),
231 CLKDEV_CON_ID("oscclk", &oscclk_clk),
232 CLKDEV_CON_ID("zb3", &zb3_clk),
233 CLKDEV_CON_ID("zb3d2", &zb3d2_clk),
234 CLKDEV_CON_ID("ddr", &ddr_clk),
235 CLKDEV_CON_ID("mp", &mp_clk),
236 CLKDEV_CON_ID("qspi", &qspi_clk),
237 CLKDEV_CON_ID("cp", &cp_clk),
238
239 /* DIV4 */
240 CLKDEV_CON_ID("sdh", &div4_clks[DIV4_SDH]),
241
242 /* DIV6 */
243 CLKDEV_CON_ID("ssp", &div6_clks[DIV6_SSP]),
244 CLKDEV_CON_ID("ssprs", &div6_clks[DIV6_SSPRS]),
245
246 /* MSTP */
67 CLKDEV_DEV_ID("sh-sci.0", &mstp_clks[MSTP204]), 247 CLKDEV_DEV_ID("sh-sci.0", &mstp_clks[MSTP204]),
68 CLKDEV_DEV_ID("sh-sci.1", &mstp_clks[MSTP203]), 248 CLKDEV_DEV_ID("sh-sci.1", &mstp_clks[MSTP203]),
69 CLKDEV_DEV_ID("sh-sci.2", &mstp_clks[MSTP206]), 249 CLKDEV_DEV_ID("sh-sci.2", &mstp_clks[MSTP206]),
@@ -72,16 +252,77 @@ static struct clk_lookup lookups[] = {
72 CLKDEV_DEV_ID("sh-sci.5", &mstp_clks[MSTP202]), 252 CLKDEV_DEV_ID("sh-sci.5", &mstp_clks[MSTP202]),
73 CLKDEV_DEV_ID("sh-sci.6", &mstp_clks[MSTP721]), 253 CLKDEV_DEV_ID("sh-sci.6", &mstp_clks[MSTP721]),
74 CLKDEV_DEV_ID("sh-sci.7", &mstp_clks[MSTP720]), 254 CLKDEV_DEV_ID("sh-sci.7", &mstp_clks[MSTP720]),
255 CLKDEV_DEV_ID("sh-sci.8", &mstp_clks[MSTP717]),
256 CLKDEV_DEV_ID("sh-sci.9", &mstp_clks[MSTP716]),
257 CLKDEV_DEV_ID("ee200000.mmcif", &mstp_clks[MSTP315]),
258 CLKDEV_DEV_ID("sh_mmcif.0", &mstp_clks[MSTP315]),
259 CLKDEV_DEV_ID("ee100000.sdhi", &mstp_clks[MSTP314]),
260 CLKDEV_DEV_ID("sh_mobile_sdhi.0", &mstp_clks[MSTP314]),
261 CLKDEV_DEV_ID("ee120000.sdhi", &mstp_clks[MSTP313]),
262 CLKDEV_DEV_ID("sh_mobile_sdhi.1", &mstp_clks[MSTP313]),
263 CLKDEV_DEV_ID("ee140000.sdhi", &mstp_clks[MSTP312]),
264 CLKDEV_DEV_ID("sh_mobile_sdhi.2", &mstp_clks[MSTP312]),
265 CLKDEV_DEV_ID("ee160000.sdhi", &mstp_clks[MSTP311]),
266 CLKDEV_DEV_ID("sh_mobile_sdhi.3", &mstp_clks[MSTP311]),
267 CLKDEV_DEV_ID("ee220000.mmcif", &mstp_clks[MSTP305]),
268 CLKDEV_DEV_ID("sh_mmcif.1", &mstp_clks[MSTP305]),
75}; 269};
76 270
271#define R8A7790_CLOCK_ROOT(e, m, p0, p1, p30, p31) \
272 extal_clk.rate = e * 1000 * 1000; \
273 main_clk.parent = m; \
274 SH_CLK_SET_RATIO(&pll1_clk_ratio, p1 / 2, 1); \
275 if (mode & MD(19)) \
276 SH_CLK_SET_RATIO(&pll3_clk_ratio, p31, 1); \
277 else \
278 SH_CLK_SET_RATIO(&pll3_clk_ratio, p30, 1)
279
280
77void __init r8a7790_clock_init(void) 281void __init r8a7790_clock_init(void)
78{ 282{
283 void __iomem *modemr = ioremap_nocache(MODEMR, PAGE_SIZE);
284 u32 mode;
79 int k, ret = 0; 285 int k, ret = 0;
80 286
287 BUG_ON(!modemr);
288 mode = ioread32(modemr);
289 iounmap(modemr);
290
291 switch (mode & (MD(14) | MD(13))) {
292 case 0:
293 R8A7790_CLOCK_ROOT(15, &extal_clk, 172, 208, 106, 88);
294 break;
295 case MD(13):
296 R8A7790_CLOCK_ROOT(20, &extal_clk, 130, 156, 80, 66);
297 break;
298 case MD(14):
299 R8A7790_CLOCK_ROOT(26, &extal_div2_clk, 200, 240, 122, 102);
300 break;
301 case MD(13) | MD(14):
302 R8A7790_CLOCK_ROOT(30, &extal_div2_clk, 172, 208, 106, 88);
303 break;
304 }
305
306 if (mode & (MD(18)))
307 SH_CLK_SET_RATIO(&lb_clk_ratio, 1, 36);
308 else
309 SH_CLK_SET_RATIO(&lb_clk_ratio, 1, 24);
310
311 if ((mode & (MD(3) | MD(2) | MD(1))) == MD(2))
312 SH_CLK_SET_RATIO(&qspi_clk_ratio, 1, 16);
313 else
314 SH_CLK_SET_RATIO(&qspi_clk_ratio, 1, 20);
315
81 for (k = 0; !ret && (k < ARRAY_SIZE(main_clks)); k++) 316 for (k = 0; !ret && (k < ARRAY_SIZE(main_clks)); k++)
82 ret = clk_register(main_clks[k]); 317 ret = clk_register(main_clks[k]);
83 318
84 if (!ret) 319 if (!ret)
320 ret = sh_clk_div4_register(div4_clks, DIV4_NR, &div4_table);
321
322 if (!ret)
323 ret = sh_clk_div6_register(div6_clks, DIV6_NR);
324
325 if (!ret)
85 ret = sh_clk_mstp_register(mstp_clks, MSTP_NR); 326 ret = sh_clk_mstp_register(mstp_clks, MSTP_NR);
86 327
87 clkdev_add_table(lookups, ARRAY_SIZE(lookups)); 328 clkdev_add_table(lookups, ARRAY_SIZE(lookups));
diff --git a/arch/arm/mach-shmobile/clock-sh7372.c b/arch/arm/mach-shmobile/clock-sh7372.c
index 7e105932c09d..5390c6bbbc02 100644
--- a/arch/arm/mach-shmobile/clock-sh7372.c
+++ b/arch/arm/mach-shmobile/clock-sh7372.c
@@ -142,15 +142,15 @@ static void pllc2_table_rebuild(struct clk *clk)
142 /* Initialise PLLC2 frequency table */ 142 /* Initialise PLLC2 frequency table */
143 for (i = 0; i < ARRAY_SIZE(pllc2_freq_table) - 2; i++) { 143 for (i = 0; i < ARRAY_SIZE(pllc2_freq_table) - 2; i++) {
144 pllc2_freq_table[i].frequency = clk->parent->rate * (i + 20) * 2; 144 pllc2_freq_table[i].frequency = clk->parent->rate * (i + 20) * 2;
145 pllc2_freq_table[i].index = i; 145 pllc2_freq_table[i].driver_data = i;
146 } 146 }
147 147
148 /* This is a special entry - switching PLL off makes it a repeater */ 148 /* This is a special entry - switching PLL off makes it a repeater */
149 pllc2_freq_table[i].frequency = clk->parent->rate; 149 pllc2_freq_table[i].frequency = clk->parent->rate;
150 pllc2_freq_table[i].index = i; 150 pllc2_freq_table[i].driver_data = i;
151 151
152 pllc2_freq_table[++i].frequency = CPUFREQ_TABLE_END; 152 pllc2_freq_table[++i].frequency = CPUFREQ_TABLE_END;
153 pllc2_freq_table[i].index = i; 153 pllc2_freq_table[i].driver_data = i;
154} 154}
155 155
156static unsigned long pllc2_recalc(struct clk *clk) 156static unsigned long pllc2_recalc(struct clk *clk)
diff --git a/arch/arm/mach-shmobile/clock-sh73a0.c b/arch/arm/mach-shmobile/clock-sh73a0.c
index 784fbaa4cc55..d9fd0336b910 100644
--- a/arch/arm/mach-shmobile/clock-sh73a0.c
+++ b/arch/arm/mach-shmobile/clock-sh73a0.c
@@ -228,6 +228,11 @@ enum { DIV4_I, DIV4_ZG, DIV4_M3, DIV4_B, DIV4_M1, DIV4_M2,
228 228
229static struct clk div4_clks[DIV4_NR] = { 229static struct clk div4_clks[DIV4_NR] = {
230 [DIV4_I] = DIV4(FRQCRA, 20, 0xdff, CLK_ENABLE_ON_INIT), 230 [DIV4_I] = DIV4(FRQCRA, 20, 0xdff, CLK_ENABLE_ON_INIT),
231 /*
232 * ZG clock is dividing PLL0 frequency to supply SGX. Make sure not to
233 * exceed maximum frequencies of 201.5MHz for VDD_DVFS=1.175 and
234 * 239.2MHz for VDD_DVFS=1.315V.
235 */
231 [DIV4_ZG] = SH_CLK_DIV4(&pll0_clk, FRQCRA, 16, 0xd7f, CLK_ENABLE_ON_INIT), 236 [DIV4_ZG] = SH_CLK_DIV4(&pll0_clk, FRQCRA, 16, 0xd7f, CLK_ENABLE_ON_INIT),
232 [DIV4_M3] = DIV4(FRQCRA, 12, 0x1dff, CLK_ENABLE_ON_INIT), 237 [DIV4_M3] = DIV4(FRQCRA, 12, 0x1dff, CLK_ENABLE_ON_INIT),
233 [DIV4_B] = DIV4(FRQCRA, 8, 0xdff, CLK_ENABLE_ON_INIT), 238 [DIV4_B] = DIV4(FRQCRA, 8, 0xdff, CLK_ENABLE_ON_INIT),
@@ -252,6 +257,101 @@ static struct clk twd_clk = {
252 .ops = &twd_clk_ops, 257 .ops = &twd_clk_ops,
253}; 258};
254 259
260static struct sh_clk_ops zclk_ops, kicker_ops;
261static const struct sh_clk_ops *div4_clk_ops;
262
263static int zclk_set_rate(struct clk *clk, unsigned long rate)
264{
265 int ret;
266
267 if (!clk->parent || !__clk_get(clk->parent))
268 return -ENODEV;
269
270 if (readl(FRQCRB) & (1 << 31))
271 return -EBUSY;
272
273 if (rate == clk_get_rate(clk->parent)) {
274 /* 1:1 - switch off divider */
275 __raw_writel(__raw_readl(FRQCRB) & ~(1 << 28), FRQCRB);
276 /* nullify the divider to prepare for the next time */
277 ret = div4_clk_ops->set_rate(clk, rate / 2);
278 if (!ret)
279 ret = frqcr_kick();
280 if (ret > 0)
281 ret = 0;
282 } else {
283 /* Enable the divider */
284 __raw_writel(__raw_readl(FRQCRB) | (1 << 28), FRQCRB);
285
286 ret = frqcr_kick();
287 if (ret >= 0)
288 /*
289 * set the divider - call the DIV4 method, it will kick
290 * FRQCRB too
291 */
292 ret = div4_clk_ops->set_rate(clk, rate);
293 if (ret < 0)
294 goto esetrate;
295 }
296
297esetrate:
298 __clk_put(clk->parent);
299 return ret;
300}
301
302static long zclk_round_rate(struct clk *clk, unsigned long rate)
303{
304 unsigned long div_freq = div4_clk_ops->round_rate(clk, rate),
305 parent_freq = clk_get_rate(clk->parent);
306
307 if (rate > div_freq && abs(parent_freq - rate) < rate - div_freq)
308 return parent_freq;
309
310 return div_freq;
311}
312
313static unsigned long zclk_recalc(struct clk *clk)
314{
315 /*
316 * Must recalculate frequencies in case PLL0 has been changed, even if
317 * the divisor is unused ATM!
318 */
319 unsigned long div_freq = div4_clk_ops->recalc(clk);
320
321 if (__raw_readl(FRQCRB) & (1 << 28))
322 return div_freq;
323
324 return clk_get_rate(clk->parent);
325}
326
327static int kicker_set_rate(struct clk *clk, unsigned long rate)
328{
329 if (__raw_readl(FRQCRB) & (1 << 31))
330 return -EBUSY;
331
332 return div4_clk_ops->set_rate(clk, rate);
333}
334
335static void div4_clk_extend(void)
336{
337 int i;
338
339 div4_clk_ops = div4_clks[0].ops;
340
341 /* Add a kicker-busy check before changing the rate */
342 kicker_ops = *div4_clk_ops;
343 /* We extend the DIV4 clock with a 1:1 pass-through case */
344 zclk_ops = *div4_clk_ops;
345
346 kicker_ops.set_rate = kicker_set_rate;
347 zclk_ops.set_rate = zclk_set_rate;
348 zclk_ops.round_rate = zclk_round_rate;
349 zclk_ops.recalc = zclk_recalc;
350
351 for (i = 0; i < DIV4_NR; i++)
352 div4_clks[i].ops = i == DIV4_Z ? &zclk_ops : &kicker_ops;
353}
354
255enum { DIV6_VCK1, DIV6_VCK2, DIV6_VCK3, DIV6_ZB1, 355enum { DIV6_VCK1, DIV6_VCK2, DIV6_VCK3, DIV6_ZB1,
256 DIV6_FLCTL, DIV6_SDHI0, DIV6_SDHI1, DIV6_SDHI2, 356 DIV6_FLCTL, DIV6_SDHI0, DIV6_SDHI1, DIV6_SDHI2,
257 DIV6_FSIA, DIV6_FSIB, DIV6_SUB, 357 DIV6_FSIA, DIV6_FSIB, DIV6_SUB,
@@ -450,7 +550,7 @@ static struct clk *late_main_clks[] = {
450}; 550};
451 551
452enum { MSTP001, 552enum { MSTP001,
453 MSTP129, MSTP128, MSTP127, MSTP126, MSTP125, MSTP118, MSTP116, MSTP100, 553 MSTP129, MSTP128, MSTP127, MSTP126, MSTP125, MSTP118, MSTP116, MSTP112, MSTP100,
454 MSTP219, MSTP218, MSTP217, 554 MSTP219, MSTP218, MSTP217,
455 MSTP207, MSTP206, MSTP204, MSTP203, MSTP202, MSTP201, MSTP200, 555 MSTP207, MSTP206, MSTP204, MSTP203, MSTP202, MSTP201, MSTP200,
456 MSTP331, MSTP329, MSTP328, MSTP325, MSTP323, MSTP322, 556 MSTP331, MSTP329, MSTP328, MSTP325, MSTP323, MSTP322,
@@ -471,6 +571,7 @@ static struct clk mstp_clks[MSTP_NR] = {
471 [MSTP125] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR1, 25, 0), /* TMU0 */ 571 [MSTP125] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR1, 25, 0), /* TMU0 */
472 [MSTP118] = MSTP(&div4_clks[DIV4_B], SMSTPCR1, 18, 0), /* DSITX0 */ 572 [MSTP118] = MSTP(&div4_clks[DIV4_B], SMSTPCR1, 18, 0), /* DSITX0 */
473 [MSTP116] = MSTP(&div4_clks[DIV4_HP], SMSTPCR1, 16, 0), /* IIC0 */ 573 [MSTP116] = MSTP(&div4_clks[DIV4_HP], SMSTPCR1, 16, 0), /* IIC0 */
574 [MSTP112] = MSTP(&div4_clks[DIV4_ZG], SMSTPCR1, 12, 0), /* SGX */
474 [MSTP100] = MSTP(&div4_clks[DIV4_B], SMSTPCR1, 0, 0), /* LCDC0 */ 575 [MSTP100] = MSTP(&div4_clks[DIV4_B], SMSTPCR1, 0, 0), /* LCDC0 */
475 [MSTP219] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR2, 19, 0), /* SCIFA7 */ 576 [MSTP219] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR2, 19, 0), /* SCIFA7 */
476 [MSTP218] = MSTP(&div4_clks[DIV4_HP], SMSTPCR2, 18, 0), /* SY-DMAC */ 577 [MSTP218] = MSTP(&div4_clks[DIV4_HP], SMSTPCR2, 18, 0), /* SY-DMAC */
@@ -513,6 +614,9 @@ static struct clk_lookup lookups[] = {
513 CLKDEV_CON_ID("r_clk", &r_clk), 614 CLKDEV_CON_ID("r_clk", &r_clk),
514 CLKDEV_DEV_ID("smp_twd", &twd_clk), /* smp_twd */ 615 CLKDEV_DEV_ID("smp_twd", &twd_clk), /* smp_twd */
515 616
617 /* DIV4 clocks */
618 CLKDEV_DEV_ID("cpufreq-cpu0", &div4_clks[DIV4_Z]),
619
516 /* DIV6 clocks */ 620 /* DIV6 clocks */
517 CLKDEV_CON_ID("vck1_clk", &div6_clks[DIV6_VCK1]), 621 CLKDEV_CON_ID("vck1_clk", &div6_clks[DIV6_VCK1]),
518 CLKDEV_CON_ID("vck2_clk", &div6_clks[DIV6_VCK2]), 622 CLKDEV_CON_ID("vck2_clk", &div6_clks[DIV6_VCK2]),
@@ -604,8 +708,11 @@ void __init sh73a0_clock_init(void)
604 for (k = 0; !ret && (k < ARRAY_SIZE(main_clks)); k++) 708 for (k = 0; !ret && (k < ARRAY_SIZE(main_clks)); k++)
605 ret = clk_register(main_clks[k]); 709 ret = clk_register(main_clks[k]);
606 710
607 if (!ret) 711 if (!ret) {
608 ret = sh_clk_div4_register(div4_clks, DIV4_NR, &div4_table); 712 ret = sh_clk_div4_register(div4_clks, DIV4_NR, &div4_table);
713 if (!ret)
714 div4_clk_extend();
715 }
609 716
610 if (!ret) 717 if (!ret)
611 ret = sh_clk_div6_reparent_register(div6_clks, DIV6_NR); 718 ret = sh_clk_div6_reparent_register(div6_clks, DIV6_NR);
diff --git a/arch/arm/mach-shmobile/headsmp-scu.S b/arch/arm/mach-shmobile/headsmp-scu.S
index 7d113f898e7f..bfd920083a3b 100644
--- a/arch/arm/mach-shmobile/headsmp-scu.S
+++ b/arch/arm/mach-shmobile/headsmp-scu.S
@@ -23,33 +23,25 @@
23#include <linux/init.h> 23#include <linux/init.h>
24#include <asm/memory.h> 24#include <asm/memory.h>
25 25
26 __CPUINIT
27/* 26/*
28 * Reset vector for secondary CPUs. 27 * Boot code for secondary CPUs.
29 * 28 *
30 * First we turn on L1 cache coherency for our CPU. Then we jump to 29 * First we turn on L1 cache coherency for our CPU. Then we jump to
31 * shmobile_invalidate_start that invalidates the cache and hands over control 30 * shmobile_invalidate_start that invalidates the cache and hands over control
32 * to the common ARM startup code. 31 * to the common ARM startup code.
33 * This function will be mapped to address 0 by the SBAR register.
34 * A normal branch is out of range here so we need a long jump. We jump to
35 * the physical address as the MMU is still turned off.
36 */ 32 */
37 .align 12 33ENTRY(shmobile_boot_scu)
38ENTRY(shmobile_secondary_vector_scu) 34 @ r0 = SCU base address
39 mrc p15, 0, r0, c0, c0, 5 @ read MIPDR 35 mrc p15, 0, r1, c0, c0, 5 @ read MIPDR
40 and r0, r0, #3 @ mask out cpu ID 36 and r1, r1, #3 @ mask out cpu ID
41 lsl r0, r0, #3 @ we will shift by cpu_id * 8 bits 37 lsl r1, r1, #3 @ we will shift by cpu_id * 8 bits
42 ldr r1, 2f 38 ldr r2, [r0, #8] @ SCU Power Status Register
43 ldr r1, [r1] @ SCU base address
44 ldr r2, [r1, #8] @ SCU Power Status Register
45 mov r3, #3 39 mov r3, #3
46 bic r2, r2, r3, lsl r0 @ Clear bits of our CPU (Run Mode) 40 bic r2, r2, r3, lsl r1 @ Clear bits of our CPU (Run Mode)
47 str r2, [r1, #8] @ write back 41 str r2, [r0, #8] @ write back
48 42
49 ldr pc, 1f 43 b shmobile_invalidate_start
501: .long shmobile_invalidate_start - PAGE_OFFSET + PLAT_PHYS_OFFSET 44ENDPROC(shmobile_boot_scu)
512: .long shmobile_scu_base - PAGE_OFFSET + PLAT_PHYS_OFFSET
52ENDPROC(shmobile_secondary_vector_scu)
53 45
54 .text 46 .text
55 .globl shmobile_scu_base 47 .globl shmobile_scu_base
diff --git a/arch/arm/mach-shmobile/headsmp.S b/arch/arm/mach-shmobile/headsmp.S
index 96001fd49b6c..a9d212498987 100644
--- a/arch/arm/mach-shmobile/headsmp.S
+++ b/arch/arm/mach-shmobile/headsmp.S
@@ -14,8 +14,6 @@
14#include <linux/init.h> 14#include <linux/init.h>
15#include <asm/memory.h> 15#include <asm/memory.h>
16 16
17 __CPUINIT
18
19ENTRY(shmobile_invalidate_start) 17ENTRY(shmobile_invalidate_start)
20 bl v7_invalidate_l1 18 bl v7_invalidate_l1
21 b secondary_startup 19 b secondary_startup
@@ -27,7 +25,14 @@ ENDPROC(shmobile_invalidate_start)
27 * We need _long_ jump to the physical address. 25 * We need _long_ jump to the physical address.
28 */ 26 */
29 .align 12 27 .align 12
30ENTRY(shmobile_secondary_vector) 28ENTRY(shmobile_boot_vector)
29 ldr r0, 2f
31 ldr pc, 1f 30 ldr pc, 1f
321: .long shmobile_invalidate_start - PAGE_OFFSET + PLAT_PHYS_OFFSET 31ENDPROC(shmobile_boot_vector)
33ENDPROC(shmobile_secondary_vector) 32
33 .globl shmobile_boot_fn
34shmobile_boot_fn:
351: .space 4
36 .globl shmobile_boot_arg
37shmobile_boot_arg:
382: .space 4
diff --git a/arch/arm/mach-shmobile/include/mach/clock.h b/arch/arm/mach-shmobile/include/mach/clock.h
index 76ac61292e48..03e56074928c 100644
--- a/arch/arm/mach-shmobile/include/mach/clock.h
+++ b/arch/arm/mach-shmobile/include/mach/clock.h
@@ -24,16 +24,16 @@ struct clk name = { \
24} 24}
25 25
26#define SH_FIXED_RATIO_CLK(name, p, r) \ 26#define SH_FIXED_RATIO_CLK(name, p, r) \
27static SH_FIXED_RATIO_CLKg(name, p, r); 27static SH_FIXED_RATIO_CLKg(name, p, r)
28 28
29#define SH_FIXED_RATIO_CLK_SET(name, p, m, d) \ 29#define SH_FIXED_RATIO_CLK_SET(name, p, m, d) \
30 SH_CLK_RATIO(name, m, d); \ 30 SH_CLK_RATIO(name, m, d); \
31 SH_FIXED_RATIO_CLK(name, p, name); 31 SH_FIXED_RATIO_CLK(name, p, name)
32 32
33#define SH_CLK_SET_RATIO(p, m, d) \ 33#define SH_CLK_SET_RATIO(p, m, d) \
34{ \ 34do { \
35 (p)->mul = m; \ 35 (p)->mul = m; \
36 (p)->div = d; \ 36 (p)->div = d; \
37} 37} while (0)
38 38
39#endif 39#endif
diff --git a/arch/arm/mach-shmobile/include/mach/common.h b/arch/arm/mach-shmobile/include/mach/common.h
index 4634a5d4b63f..e818f029d8e3 100644
--- a/arch/arm/mach-shmobile/include/mach/common.h
+++ b/arch/arm/mach-shmobile/include/mach/common.h
@@ -7,8 +7,10 @@ extern 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;
9extern void shmobile_setup_console(void); 9extern void shmobile_setup_console(void);
10extern void shmobile_secondary_vector(void); 10extern void shmobile_boot_vector(void);
11extern void shmobile_secondary_vector_scu(void); 11extern unsigned long shmobile_boot_fn;
12extern unsigned long shmobile_boot_arg;
13extern void shmobile_boot_scu(void);
12struct clk; 14struct clk;
13extern int shmobile_clk_init(void); 15extern int shmobile_clk_init(void);
14extern void shmobile_handle_irq_intc(struct pt_regs *); 16extern void shmobile_handle_irq_intc(struct pt_regs *);
diff --git a/arch/arm/mach-shmobile/include/mach/head-ap4evb.txt b/arch/arm/mach-shmobile/include/mach/head-ap4evb.txt
deleted file mode 100644
index 9f134dfeffdc..000000000000
--- a/arch/arm/mach-shmobile/include/mach/head-ap4evb.txt
+++ /dev/null
@@ -1,93 +0,0 @@
1LIST "partner-jet-setup.txt"
2LIST "(C) Copyright 2010 Renesas Solutions Corp"
3LIST "Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>"
4
5LIST "RWT Setting"
6EW 0xE6020004, 0xA500
7EW 0xE6030004, 0xA500
8
9LIST "GPIO Setting"
10EB 0xE6051013, 0xA2
11
12LIST "CPG"
13ED 0xE61500C0, 0x00000002
14
15WAIT 1, 0xFE40009C
16
17LIST "FRQCR"
18ED 0xE6150000, 0x2D1305C3
19ED 0xE61500E0, 0x9E40358E
20ED 0xE6150004, 0x80331050
21
22WAIT 1, 0xFE40009C
23
24ED 0xE61500E4, 0x00002000
25
26WAIT 1, 0xFE40009C
27
28LIST "PLL"
29ED 0xE6150028, 0x00004000
30
31WAIT 1, 0xFE40009C
32
33ED 0xE615002C, 0x93000040
34
35WAIT 1, 0xFE40009C
36
37LIST "SUB/USBClk"
38ED 0xE6150080, 0x00000180
39
40LIST "BSC"
41ED 0xFEC10000, 0x00E0001B
42
43LIST "SBSC1"
44ED 0xFE400354, 0x01AD8000
45ED 0xFE400354, 0x01AD8001
46
47WAIT 5, 0xFE40009C
48
49ED 0xFE400008, 0xBCC90151
50ED 0xFE400040, 0x41774113
51ED 0xFE400044, 0x2712E229
52ED 0xFE400048, 0x20C18505
53ED 0xFE40004C, 0x00110209
54ED 0xFE400010, 0x00000087
55
56WAIT 30, 0xFE40009C
57
58ED 0xFE400084, 0x0000003F
59EB 0xFE500000, 0x00
60
61WAIT 5, 0xFE40009C
62
63ED 0xFE400084, 0x0000FF0A
64EB 0xFE500000, 0x00
65
66WAIT 1, 0xFE40009C
67
68ED 0xFE400084, 0x00002201
69EB 0xFE500000, 0x00
70ED 0xFE400084, 0x00000302
71EB 0xFE500000, 0x00
72EB 0xFE5C0000, 0x00
73ED 0xFE400008, 0xBCC90159
74ED 0xFE40008C, 0x88800004
75ED 0xFE400094, 0x00000004
76ED 0xFE400028, 0xA55A0032
77ED 0xFE40002C, 0xA55A000C
78ED 0xFE400020, 0xA55A2048
79ED 0xFE400008, 0xBCC90959
80
81LIST "Change CPGA setting"
82ED 0xE61500E0, 0x9E40352E
83ED 0xE6150004, 0x80331050
84
85WAIT 1, 0xFE40009C
86
87ED 0xFE400354, 0x01AD8002
88
89LIST "SCIF0 - Serial port for earlyprintk"
90EB 0xE6053098, 0xe1
91EW 0xE6C40000, 0x0000
92EB 0xE6C40004, 0x19
93EW 0xE6C40008, 0x0030
diff --git a/arch/arm/mach-shmobile/include/mach/irqs.h b/arch/arm/mach-shmobile/include/mach/irqs.h
index b2074e2acb15..d241bfd6926d 100644
--- a/arch/arm/mach-shmobile/include/mach/irqs.h
+++ b/arch/arm/mach-shmobile/include/mach/irqs.h
@@ -16,4 +16,9 @@
16#define IRQPIN_BASE 2000 16#define IRQPIN_BASE 2000
17#define irq_pin(nr) ((nr) + IRQPIN_BASE) 17#define irq_pin(nr) ((nr) + IRQPIN_BASE)
18 18
19/* GPIO IRQ */
20#define _GPIO_IRQ_BASE 2500
21#define GPIO_IRQ_BASE(x) (_GPIO_IRQ_BASE + (32 * x))
22#define GPIO_IRQ(x, y) (_GPIO_IRQ_BASE + (32 * x) + y)
23
19#endif /* __ASM_MACH_IRQS_H */ 24#endif /* __ASM_MACH_IRQS_H */
diff --git a/arch/arm/mach-shmobile/include/mach/memory.h b/arch/arm/mach-shmobile/include/mach/memory.h
deleted file mode 100644
index 0ffbe8155c76..000000000000
--- a/arch/arm/mach-shmobile/include/mach/memory.h
+++ /dev/null
@@ -1,7 +0,0 @@
1#ifndef __ASM_MACH_MEMORY_H
2#define __ASM_MACH_MEMORY_H
3
4#define PLAT_PHYS_OFFSET UL(CONFIG_MEMORY_START)
5#define MEM_SIZE UL(CONFIG_MEMORY_SIZE)
6
7#endif /* __ASM_MACH_MEMORY_H */
diff --git a/arch/arm/mach-shmobile/include/mach/mmc-ap4eb.h b/arch/arm/mach-shmobile/include/mach/mmc-ap4eb.h
deleted file mode 100644
index db59fdbda860..000000000000
--- a/arch/arm/mach-shmobile/include/mach/mmc-ap4eb.h
+++ /dev/null
@@ -1,29 +0,0 @@
1#ifndef MMC_AP4EB_H
2#define MMC_AP4EB_H
3
4#define PORT185CR (void __iomem *)0xe60520b9
5#define PORT186CR (void __iomem *)0xe60520ba
6#define PORT187CR (void __iomem *)0xe60520bb
7#define PORT188CR (void __iomem *)0xe60520bc
8
9#define PORTR191_160DR (void __iomem *)0xe6056014
10
11static inline void mmc_init_progress(void)
12{
13 /* Initialise LEDS1-4
14 * registers: PORT185CR-PORT188CR (LED1-LED4 Control)
15 * value: 0x10 - enable output
16 */
17 __raw_writeb(0x10, PORT185CR);
18 __raw_writeb(0x10, PORT186CR);
19 __raw_writeb(0x10, PORT187CR);
20 __raw_writeb(0x10, PORT188CR);
21}
22
23static inline void mmc_update_progress(int n)
24{
25 __raw_writel((__raw_readl(PORTR191_160DR) & ~(0xf << 25)) |
26 (1 << (25 + n)), PORTR191_160DR);
27}
28
29#endif /* MMC_AP4EB_H */
diff --git a/arch/arm/mach-shmobile/include/mach/mmc.h b/arch/arm/mach-shmobile/include/mach/mmc.h
index 21a59db638bb..e979b8fc1da2 100644
--- a/arch/arm/mach-shmobile/include/mach/mmc.h
+++ b/arch/arm/mach-shmobile/include/mach/mmc.h
@@ -7,9 +7,7 @@
7 * 7 *
8 **************************************************/ 8 **************************************************/
9 9
10#ifdef CONFIG_MACH_AP4EVB 10#ifdef CONFIG_MACH_MACKEREL
11#include "mach/mmc-ap4eb.h"
12#elif defined(CONFIG_MACH_MACKEREL)
13#include "mach/mmc-mackerel.h" 11#include "mach/mmc-mackerel.h"
14#else 12#else
15#error "unsupported board." 13#error "unsupported board."
diff --git a/arch/arm/mach-shmobile/include/mach/r8a7740.h b/arch/arm/mach-shmobile/include/mach/r8a7740.h
index abdc4d4efa28..b34d19b5ca5c 100644
--- a/arch/arm/mach-shmobile/include/mach/r8a7740.h
+++ b/arch/arm/mach-shmobile/include/mach/r8a7740.h
@@ -28,494 +28,6 @@
28#define MD_CK1 (1 << 1) 28#define MD_CK1 (1 << 1)
29#define MD_CK0 (1 << 0) 29#define MD_CK0 (1 << 0)
30 30
31/*
32 * Pin Function Controller:
33 * GPIO_FN_xx - GPIO used to select pin function
34 * GPIO_PORTxx - GPIO mapped to real I/O pin on CPU
35 */
36enum {
37 /* PORT */
38 GPIO_PORT0, GPIO_PORT1, GPIO_PORT2, GPIO_PORT3, GPIO_PORT4,
39 GPIO_PORT5, GPIO_PORT6, GPIO_PORT7, GPIO_PORT8, GPIO_PORT9,
40
41 GPIO_PORT10, GPIO_PORT11, GPIO_PORT12, GPIO_PORT13, GPIO_PORT14,
42 GPIO_PORT15, GPIO_PORT16, GPIO_PORT17, GPIO_PORT18, GPIO_PORT19,
43
44 GPIO_PORT20, GPIO_PORT21, GPIO_PORT22, GPIO_PORT23, GPIO_PORT24,
45 GPIO_PORT25, GPIO_PORT26, GPIO_PORT27, GPIO_PORT28, GPIO_PORT29,
46
47 GPIO_PORT30, GPIO_PORT31, GPIO_PORT32, GPIO_PORT33, GPIO_PORT34,
48 GPIO_PORT35, GPIO_PORT36, GPIO_PORT37, GPIO_PORT38, GPIO_PORT39,
49
50 GPIO_PORT40, GPIO_PORT41, GPIO_PORT42, GPIO_PORT43, GPIO_PORT44,
51 GPIO_PORT45, GPIO_PORT46, GPIO_PORT47, GPIO_PORT48, GPIO_PORT49,
52
53 GPIO_PORT50, GPIO_PORT51, GPIO_PORT52, GPIO_PORT53, GPIO_PORT54,
54 GPIO_PORT55, GPIO_PORT56, GPIO_PORT57, GPIO_PORT58, GPIO_PORT59,
55
56 GPIO_PORT60, GPIO_PORT61, GPIO_PORT62, GPIO_PORT63, GPIO_PORT64,
57 GPIO_PORT65, GPIO_PORT66, GPIO_PORT67, GPIO_PORT68, GPIO_PORT69,
58
59 GPIO_PORT70, GPIO_PORT71, GPIO_PORT72, GPIO_PORT73, GPIO_PORT74,
60 GPIO_PORT75, GPIO_PORT76, GPIO_PORT77, GPIO_PORT78, GPIO_PORT79,
61
62 GPIO_PORT80, GPIO_PORT81, GPIO_PORT82, GPIO_PORT83, GPIO_PORT84,
63 GPIO_PORT85, GPIO_PORT86, GPIO_PORT87, GPIO_PORT88, GPIO_PORT89,
64
65 GPIO_PORT90, GPIO_PORT91, GPIO_PORT92, GPIO_PORT93, GPIO_PORT94,
66 GPIO_PORT95, GPIO_PORT96, GPIO_PORT97, GPIO_PORT98, GPIO_PORT99,
67
68 GPIO_PORT100, GPIO_PORT101, GPIO_PORT102, GPIO_PORT103, GPIO_PORT104,
69 GPIO_PORT105, GPIO_PORT106, GPIO_PORT107, GPIO_PORT108, GPIO_PORT109,
70
71 GPIO_PORT110, GPIO_PORT111, GPIO_PORT112, GPIO_PORT113, GPIO_PORT114,
72 GPIO_PORT115, GPIO_PORT116, GPIO_PORT117, GPIO_PORT118, GPIO_PORT119,
73
74 GPIO_PORT120, GPIO_PORT121, GPIO_PORT122, GPIO_PORT123, GPIO_PORT124,
75 GPIO_PORT125, GPIO_PORT126, GPIO_PORT127, GPIO_PORT128, GPIO_PORT129,
76
77 GPIO_PORT130, GPIO_PORT131, GPIO_PORT132, GPIO_PORT133, GPIO_PORT134,
78 GPIO_PORT135, GPIO_PORT136, GPIO_PORT137, GPIO_PORT138, GPIO_PORT139,
79
80 GPIO_PORT140, GPIO_PORT141, GPIO_PORT142, GPIO_PORT143, GPIO_PORT144,
81 GPIO_PORT145, GPIO_PORT146, GPIO_PORT147, GPIO_PORT148, GPIO_PORT149,
82
83 GPIO_PORT150, GPIO_PORT151, GPIO_PORT152, GPIO_PORT153, GPIO_PORT154,
84 GPIO_PORT155, GPIO_PORT156, GPIO_PORT157, GPIO_PORT158, GPIO_PORT159,
85
86 GPIO_PORT160, GPIO_PORT161, GPIO_PORT162, GPIO_PORT163, GPIO_PORT164,
87 GPIO_PORT165, GPIO_PORT166, GPIO_PORT167, GPIO_PORT168, GPIO_PORT169,
88
89 GPIO_PORT170, GPIO_PORT171, GPIO_PORT172, GPIO_PORT173, GPIO_PORT174,
90 GPIO_PORT175, GPIO_PORT176, GPIO_PORT177, GPIO_PORT178, GPIO_PORT179,
91
92 GPIO_PORT180, GPIO_PORT181, GPIO_PORT182, GPIO_PORT183, GPIO_PORT184,
93 GPIO_PORT185, GPIO_PORT186, GPIO_PORT187, GPIO_PORT188, GPIO_PORT189,
94
95 GPIO_PORT190, GPIO_PORT191, GPIO_PORT192, GPIO_PORT193, GPIO_PORT194,
96 GPIO_PORT195, GPIO_PORT196, GPIO_PORT197, GPIO_PORT198, GPIO_PORT199,
97
98 GPIO_PORT200, GPIO_PORT201, GPIO_PORT202, GPIO_PORT203, GPIO_PORT204,
99 GPIO_PORT205, GPIO_PORT206, GPIO_PORT207, GPIO_PORT208, GPIO_PORT209,
100
101 GPIO_PORT210, GPIO_PORT211,
102
103 /* IRQ */
104 GPIO_FN_IRQ0_PORT2, GPIO_FN_IRQ0_PORT13,
105 GPIO_FN_IRQ1,
106 GPIO_FN_IRQ2_PORT11, GPIO_FN_IRQ2_PORT12,
107 GPIO_FN_IRQ3_PORT10, GPIO_FN_IRQ3_PORT14,
108 GPIO_FN_IRQ4_PORT15, GPIO_FN_IRQ4_PORT172,
109 GPIO_FN_IRQ5_PORT0, GPIO_FN_IRQ5_PORT1,
110 GPIO_FN_IRQ6_PORT121, GPIO_FN_IRQ6_PORT173,
111 GPIO_FN_IRQ7_PORT120, GPIO_FN_IRQ7_PORT209,
112 GPIO_FN_IRQ8,
113 GPIO_FN_IRQ9_PORT118, GPIO_FN_IRQ9_PORT210,
114 GPIO_FN_IRQ10,
115 GPIO_FN_IRQ11,
116 GPIO_FN_IRQ12_PORT42, GPIO_FN_IRQ12_PORT97,
117 GPIO_FN_IRQ13_PORT64, GPIO_FN_IRQ13_PORT98,
118 GPIO_FN_IRQ14_PORT63, GPIO_FN_IRQ14_PORT99,
119 GPIO_FN_IRQ15_PORT62, GPIO_FN_IRQ15_PORT100,
120 GPIO_FN_IRQ16_PORT68, GPIO_FN_IRQ16_PORT211,
121 GPIO_FN_IRQ17,
122 GPIO_FN_IRQ18,
123 GPIO_FN_IRQ19,
124 GPIO_FN_IRQ20,
125 GPIO_FN_IRQ21,
126 GPIO_FN_IRQ22,
127 GPIO_FN_IRQ23,
128 GPIO_FN_IRQ24,
129 GPIO_FN_IRQ25,
130 GPIO_FN_IRQ26_PORT58, GPIO_FN_IRQ26_PORT81,
131 GPIO_FN_IRQ27_PORT57, GPIO_FN_IRQ27_PORT168,
132 GPIO_FN_IRQ28_PORT56, GPIO_FN_IRQ28_PORT169,
133 GPIO_FN_IRQ29_PORT50, GPIO_FN_IRQ29_PORT170,
134 GPIO_FN_IRQ30_PORT49, GPIO_FN_IRQ30_PORT171,
135 GPIO_FN_IRQ31_PORT41, GPIO_FN_IRQ31_PORT167,
136
137 /* Function */
138
139 /* DBGT */
140 GPIO_FN_DBGMDT2, GPIO_FN_DBGMDT1, GPIO_FN_DBGMDT0,
141 GPIO_FN_DBGMD10, GPIO_FN_DBGMD11, GPIO_FN_DBGMD20,
142 GPIO_FN_DBGMD21,
143
144 /* FSI-A */
145 GPIO_FN_FSIAISLD_PORT0, /* FSIAISLD Port 0/5 */
146 GPIO_FN_FSIAISLD_PORT5,
147 GPIO_FN_FSIASPDIF_PORT9, /* FSIASPDIF Port 9/18 */
148 GPIO_FN_FSIASPDIF_PORT18,
149 GPIO_FN_FSIAOSLD1, GPIO_FN_FSIAOSLD2,
150 GPIO_FN_FSIAOLR, GPIO_FN_FSIAOBT,
151 GPIO_FN_FSIAOSLD, GPIO_FN_FSIAOMC,
152 GPIO_FN_FSIACK, GPIO_FN_FSIAILR,
153 GPIO_FN_FSIAIBT,
154
155 /* FSI-B */
156 GPIO_FN_FSIBCK,
157
158 /* FMSI */
159 GPIO_FN_FMSISLD_PORT1, /* FMSISLD Port 1/6 */
160 GPIO_FN_FMSISLD_PORT6,
161 GPIO_FN_FMSIILR, GPIO_FN_FMSIIBT,
162 GPIO_FN_FMSIOLR, GPIO_FN_FMSIOBT,
163 GPIO_FN_FMSICK, GPIO_FN_FMSOILR,
164 GPIO_FN_FMSOIBT, GPIO_FN_FMSOOLR,
165 GPIO_FN_FMSOOBT, GPIO_FN_FMSOSLD,
166 GPIO_FN_FMSOCK,
167
168 /* SCIFA0 */
169 GPIO_FN_SCIFA0_SCK, GPIO_FN_SCIFA0_CTS,
170 GPIO_FN_SCIFA0_RTS, GPIO_FN_SCIFA0_RXD,
171 GPIO_FN_SCIFA0_TXD,
172
173 /* SCIFA1 */
174 GPIO_FN_SCIFA1_CTS, GPIO_FN_SCIFA1_SCK,
175 GPIO_FN_SCIFA1_RXD, GPIO_FN_SCIFA1_TXD,
176 GPIO_FN_SCIFA1_RTS,
177
178 /* SCIFA2 */
179 GPIO_FN_SCIFA2_SCK_PORT22, /* SCIFA2_SCK Port 22/199 */
180 GPIO_FN_SCIFA2_SCK_PORT199,
181 GPIO_FN_SCIFA2_RXD, GPIO_FN_SCIFA2_TXD,
182 GPIO_FN_SCIFA2_CTS, GPIO_FN_SCIFA2_RTS,
183
184 /* SCIFA3 */
185 GPIO_FN_SCIFA3_RTS_PORT105, /* MSEL5CR_8_0 */
186 GPIO_FN_SCIFA3_SCK_PORT116,
187 GPIO_FN_SCIFA3_CTS_PORT117,
188 GPIO_FN_SCIFA3_RXD_PORT174,
189 GPIO_FN_SCIFA3_TXD_PORT175,
190
191 GPIO_FN_SCIFA3_RTS_PORT161, /* MSEL5CR_8_1 */
192 GPIO_FN_SCIFA3_SCK_PORT158,
193 GPIO_FN_SCIFA3_CTS_PORT162,
194 GPIO_FN_SCIFA3_RXD_PORT159,
195 GPIO_FN_SCIFA3_TXD_PORT160,
196
197 /* SCIFA4 */
198 GPIO_FN_SCIFA4_RXD_PORT12, /* MSEL5CR[12:11] = 00 */
199 GPIO_FN_SCIFA4_TXD_PORT13,
200
201 GPIO_FN_SCIFA4_RXD_PORT204, /* MSEL5CR[12:11] = 01 */
202 GPIO_FN_SCIFA4_TXD_PORT203,
203
204 GPIO_FN_SCIFA4_RXD_PORT94, /* MSEL5CR[12:11] = 10 */
205 GPIO_FN_SCIFA4_TXD_PORT93,
206
207 GPIO_FN_SCIFA4_SCK_PORT21, /* SCIFA4_SCK Port 21/205 */
208 GPIO_FN_SCIFA4_SCK_PORT205,
209
210 /* SCIFA5 */
211 GPIO_FN_SCIFA5_TXD_PORT20, /* MSEL5CR[15:14] = 00 */
212 GPIO_FN_SCIFA5_RXD_PORT10,
213
214 GPIO_FN_SCIFA5_RXD_PORT207, /* MSEL5CR[15:14] = 01 */
215 GPIO_FN_SCIFA5_TXD_PORT208,
216
217 GPIO_FN_SCIFA5_TXD_PORT91, /* MSEL5CR[15:14] = 10 */
218 GPIO_FN_SCIFA5_RXD_PORT92,
219
220 GPIO_FN_SCIFA5_SCK_PORT23, /* SCIFA5_SCK Port 23/206 */
221 GPIO_FN_SCIFA5_SCK_PORT206,
222
223 /* SCIFA6 */
224 GPIO_FN_SCIFA6_SCK, GPIO_FN_SCIFA6_RXD, GPIO_FN_SCIFA6_TXD,
225
226 /* SCIFA7 */
227 GPIO_FN_SCIFA7_TXD, GPIO_FN_SCIFA7_RXD,
228
229 /* SCIFAB */
230 GPIO_FN_SCIFB_SCK_PORT190, /* MSEL5CR_17_0 */
231 GPIO_FN_SCIFB_RXD_PORT191,
232 GPIO_FN_SCIFB_TXD_PORT192,
233 GPIO_FN_SCIFB_RTS_PORT186,
234 GPIO_FN_SCIFB_CTS_PORT187,
235
236 GPIO_FN_SCIFB_SCK_PORT2, /* MSEL5CR_17_1 */
237 GPIO_FN_SCIFB_RXD_PORT3,
238 GPIO_FN_SCIFB_TXD_PORT4,
239 GPIO_FN_SCIFB_RTS_PORT172,
240 GPIO_FN_SCIFB_CTS_PORT173,
241
242 /* LCD0 */
243 GPIO_FN_LCDC0_SELECT,
244
245 /* LCD1 */
246 GPIO_FN_LCDC1_SELECT,
247
248 /* RSPI */
249 GPIO_FN_RSPI_SSL0_A, GPIO_FN_RSPI_SSL1_A,
250 GPIO_FN_RSPI_SSL2_A, GPIO_FN_RSPI_SSL3_A,
251 GPIO_FN_RSPI_MOSI_A, GPIO_FN_RSPI_MISO_A,
252 GPIO_FN_RSPI_CK_A,
253
254 /* VIO CKO */
255 GPIO_FN_VIO_CKO1,
256 GPIO_FN_VIO_CKO2,
257 GPIO_FN_VIO_CKO_1,
258 GPIO_FN_VIO_CKO,
259
260 /* VIO0 */
261 GPIO_FN_VIO0_D0, GPIO_FN_VIO0_D1, GPIO_FN_VIO0_D2,
262 GPIO_FN_VIO0_D3, GPIO_FN_VIO0_D4, GPIO_FN_VIO0_D5,
263 GPIO_FN_VIO0_D6, GPIO_FN_VIO0_D7, GPIO_FN_VIO0_D8,
264 GPIO_FN_VIO0_D9, GPIO_FN_VIO0_D10, GPIO_FN_VIO0_D11,
265 GPIO_FN_VIO0_D12, GPIO_FN_VIO0_VD, GPIO_FN_VIO0_HD,
266 GPIO_FN_VIO0_CLK, GPIO_FN_VIO0_FIELD,
267
268 GPIO_FN_VIO0_D13_PORT26, /* MSEL5CR_27_0 */
269 GPIO_FN_VIO0_D14_PORT25,
270 GPIO_FN_VIO0_D15_PORT24,
271
272 GPIO_FN_VIO0_D13_PORT22, /* MSEL5CR_27_1 */
273 GPIO_FN_VIO0_D14_PORT95,
274 GPIO_FN_VIO0_D15_PORT96,
275
276 /* VIO1 */
277 GPIO_FN_VIO1_D0, GPIO_FN_VIO1_D1, GPIO_FN_VIO1_D2,
278 GPIO_FN_VIO1_D3, GPIO_FN_VIO1_D4, GPIO_FN_VIO1_D5,
279 GPIO_FN_VIO1_D6, GPIO_FN_VIO1_D7, GPIO_FN_VIO1_VD,
280 GPIO_FN_VIO1_HD, GPIO_FN_VIO1_CLK, GPIO_FN_VIO1_FIELD,
281
282 /* TPU0 */
283 GPIO_FN_TPU0TO0, GPIO_FN_TPU0TO1,
284 GPIO_FN_TPU0TO3,
285 GPIO_FN_TPU0TO2_PORT66, /* TPU0TO2 Port 66/202 */
286 GPIO_FN_TPU0TO2_PORT202,
287
288 /* SSP1 0 */
289 GPIO_FN_STP0_IPD0, GPIO_FN_STP0_IPD1, GPIO_FN_STP0_IPD2,
290 GPIO_FN_STP0_IPD3, GPIO_FN_STP0_IPD4, GPIO_FN_STP0_IPD5,
291 GPIO_FN_STP0_IPD6, GPIO_FN_STP0_IPD7, GPIO_FN_STP0_IPEN,
292 GPIO_FN_STP0_IPCLK, GPIO_FN_STP0_IPSYNC,
293
294 /* SSP1 1 */
295 GPIO_FN_STP1_IPD1, GPIO_FN_STP1_IPD2, GPIO_FN_STP1_IPD3,
296 GPIO_FN_STP1_IPD4, GPIO_FN_STP1_IPD5, GPIO_FN_STP1_IPD6,
297 GPIO_FN_STP1_IPD7, GPIO_FN_STP1_IPCLK, GPIO_FN_STP1_IPSYNC,
298
299 GPIO_FN_STP1_IPD0_PORT186, /* MSEL5CR_23_0 */
300 GPIO_FN_STP1_IPEN_PORT187,
301
302 GPIO_FN_STP1_IPD0_PORT194, /* MSEL5CR_23_1 */
303 GPIO_FN_STP1_IPEN_PORT193,
304
305 /* SIM */
306 GPIO_FN_SIM_RST, GPIO_FN_SIM_CLK,
307 GPIO_FN_SIM_D_PORT22, /* SIM_D Port 22/199 */
308 GPIO_FN_SIM_D_PORT199,
309
310 /* MSIOF2 */
311 GPIO_FN_MSIOF2_TXD, GPIO_FN_MSIOF2_RXD, GPIO_FN_MSIOF2_TSCK,
312 GPIO_FN_MSIOF2_SS2, GPIO_FN_MSIOF2_TSYNC, GPIO_FN_MSIOF2_SS1,
313 GPIO_FN_MSIOF2_MCK1, GPIO_FN_MSIOF2_MCK0, GPIO_FN_MSIOF2_RSYNC,
314 GPIO_FN_MSIOF2_RSCK,
315
316 /* KEYSC */
317 GPIO_FN_KEYIN4, GPIO_FN_KEYIN5,
318 GPIO_FN_KEYIN6, GPIO_FN_KEYIN7,
319 GPIO_FN_KEYOUT0, GPIO_FN_KEYOUT1, GPIO_FN_KEYOUT2,
320 GPIO_FN_KEYOUT3, GPIO_FN_KEYOUT4, GPIO_FN_KEYOUT5,
321 GPIO_FN_KEYOUT6, GPIO_FN_KEYOUT7,
322
323 GPIO_FN_KEYIN0_PORT43, /* MSEL4CR_18_0 */
324 GPIO_FN_KEYIN1_PORT44,
325 GPIO_FN_KEYIN2_PORT45,
326 GPIO_FN_KEYIN3_PORT46,
327
328 GPIO_FN_KEYIN0_PORT58, /* MSEL4CR_18_1 */
329 GPIO_FN_KEYIN1_PORT57,
330 GPIO_FN_KEYIN2_PORT56,
331 GPIO_FN_KEYIN3_PORT55,
332
333 /* VOU */
334 GPIO_FN_DV_D0, GPIO_FN_DV_D1, GPIO_FN_DV_D2, GPIO_FN_DV_D3,
335 GPIO_FN_DV_D4, GPIO_FN_DV_D5, GPIO_FN_DV_D6, GPIO_FN_DV_D7,
336 GPIO_FN_DV_D8, GPIO_FN_DV_D9, GPIO_FN_DV_D10, GPIO_FN_DV_D11,
337 GPIO_FN_DV_D12, GPIO_FN_DV_D13, GPIO_FN_DV_D14, GPIO_FN_DV_D15,
338 GPIO_FN_DV_CLK,
339 GPIO_FN_DV_VSYNC,
340 GPIO_FN_DV_HSYNC,
341
342 /* MEMC */
343 GPIO_FN_MEMC_AD0, GPIO_FN_MEMC_AD1, GPIO_FN_MEMC_AD2,
344 GPIO_FN_MEMC_AD3, GPIO_FN_MEMC_AD4, GPIO_FN_MEMC_AD5,
345 GPIO_FN_MEMC_AD6, GPIO_FN_MEMC_AD7, GPIO_FN_MEMC_AD8,
346 GPIO_FN_MEMC_AD9, GPIO_FN_MEMC_AD10, GPIO_FN_MEMC_AD11,
347 GPIO_FN_MEMC_AD12, GPIO_FN_MEMC_AD13, GPIO_FN_MEMC_AD14,
348 GPIO_FN_MEMC_AD15, GPIO_FN_MEMC_CS0, GPIO_FN_MEMC_INT,
349 GPIO_FN_MEMC_NWE, GPIO_FN_MEMC_NOE,
350
351 GPIO_FN_MEMC_CS1, /* MSEL4CR_6_0 */
352 GPIO_FN_MEMC_ADV,
353 GPIO_FN_MEMC_WAIT,
354 GPIO_FN_MEMC_BUSCLK,
355
356 GPIO_FN_MEMC_A1, /* MSEL4CR_6_1 */
357 GPIO_FN_MEMC_DREQ0,
358 GPIO_FN_MEMC_DREQ1,
359 GPIO_FN_MEMC_A0,
360
361 /* MSIOF0 */
362 GPIO_FN_MSIOF0_SS1, GPIO_FN_MSIOF0_SS2,
363 GPIO_FN_MSIOF0_RXD, GPIO_FN_MSIOF0_TXD,
364 GPIO_FN_MSIOF0_MCK0, GPIO_FN_MSIOF0_MCK1,
365 GPIO_FN_MSIOF0_RSYNC, GPIO_FN_MSIOF0_RSCK,
366 GPIO_FN_MSIOF0_TSCK, GPIO_FN_MSIOF0_TSYNC,
367
368 /* MSIOF1 */
369 GPIO_FN_MSIOF1_RSCK, GPIO_FN_MSIOF1_RSYNC,
370 GPIO_FN_MSIOF1_MCK0, GPIO_FN_MSIOF1_MCK1,
371
372 GPIO_FN_MSIOF1_SS2_PORT116, GPIO_FN_MSIOF1_SS1_PORT117,
373 GPIO_FN_MSIOF1_RXD_PORT118, GPIO_FN_MSIOF1_TXD_PORT119,
374 GPIO_FN_MSIOF1_TSYNC_PORT120,
375 GPIO_FN_MSIOF1_TSCK_PORT121, /* MSEL4CR_10_0 */
376
377 GPIO_FN_MSIOF1_SS1_PORT67, GPIO_FN_MSIOF1_TSCK_PORT72,
378 GPIO_FN_MSIOF1_TSYNC_PORT73, GPIO_FN_MSIOF1_TXD_PORT74,
379 GPIO_FN_MSIOF1_RXD_PORT75,
380 GPIO_FN_MSIOF1_SS2_PORT202, /* MSEL4CR_10_1 */
381
382 /* GPIO */
383 GPIO_FN_GPO0, GPIO_FN_GPI0,
384 GPIO_FN_GPO1, GPIO_FN_GPI1,
385
386 /* USB0 */
387 GPIO_FN_USB0_OCI, GPIO_FN_USB0_PPON, GPIO_FN_VBUS,
388
389 /* USB1 */
390 GPIO_FN_USB1_OCI, GPIO_FN_USB1_PPON,
391
392 /* BBIF1 */
393 GPIO_FN_BBIF1_RXD, GPIO_FN_BBIF1_TXD, GPIO_FN_BBIF1_TSYNC,
394 GPIO_FN_BBIF1_TSCK, GPIO_FN_BBIF1_RSCK, GPIO_FN_BBIF1_RSYNC,
395 GPIO_FN_BBIF1_FLOW, GPIO_FN_BBIF1_RX_FLOW_N,
396
397 /* BBIF2 */
398 GPIO_FN_BBIF2_TXD2_PORT5, /* MSEL5CR_0_0 */
399 GPIO_FN_BBIF2_RXD2_PORT60,
400 GPIO_FN_BBIF2_TSYNC2_PORT6,
401 GPIO_FN_BBIF2_TSCK2_PORT59,
402
403 GPIO_FN_BBIF2_RXD2_PORT90, /* MSEL5CR_0_1 */
404 GPIO_FN_BBIF2_TXD2_PORT183,
405 GPIO_FN_BBIF2_TSCK2_PORT89,
406 GPIO_FN_BBIF2_TSYNC2_PORT184,
407
408 /* BSC / FLCTL / PCMCIA */
409 GPIO_FN_CS0, GPIO_FN_CS2, GPIO_FN_CS4,
410 GPIO_FN_CS5B, GPIO_FN_CS6A,
411 GPIO_FN_CS5A_PORT105, /* CS5A PORT 19/105 */
412 GPIO_FN_CS5A_PORT19,
413 GPIO_FN_IOIS16, /* ? */
414
415 GPIO_FN_A0, GPIO_FN_A1, GPIO_FN_A2, GPIO_FN_A3,
416 GPIO_FN_A4_FOE, /* share with FLCTL */
417 GPIO_FN_A5_FCDE, /* share with FLCTL */
418 GPIO_FN_A6, GPIO_FN_A7, GPIO_FN_A8, GPIO_FN_A9,
419 GPIO_FN_A10, GPIO_FN_A11, GPIO_FN_A12, GPIO_FN_A13,
420 GPIO_FN_A14, GPIO_FN_A15, GPIO_FN_A16, GPIO_FN_A17,
421 GPIO_FN_A18, GPIO_FN_A19, GPIO_FN_A20, GPIO_FN_A21,
422 GPIO_FN_A22, GPIO_FN_A23, GPIO_FN_A24, GPIO_FN_A25,
423 GPIO_FN_A26,
424
425 GPIO_FN_D0_NAF0, GPIO_FN_D1_NAF1, /* share with FLCTL */
426 GPIO_FN_D2_NAF2, GPIO_FN_D3_NAF3, /* share with FLCTL */
427 GPIO_FN_D4_NAF4, GPIO_FN_D5_NAF5, /* share with FLCTL */
428 GPIO_FN_D6_NAF6, GPIO_FN_D7_NAF7, /* share with FLCTL */
429 GPIO_FN_D8_NAF8, GPIO_FN_D9_NAF9, /* share with FLCTL */
430 GPIO_FN_D10_NAF10, GPIO_FN_D11_NAF11, /* share with FLCTL */
431 GPIO_FN_D12_NAF12, GPIO_FN_D13_NAF13, /* share with FLCTL */
432 GPIO_FN_D14_NAF14, GPIO_FN_D15_NAF15, /* share with FLCTL */
433
434 GPIO_FN_D16, GPIO_FN_D17, GPIO_FN_D18, GPIO_FN_D19,
435 GPIO_FN_D20, GPIO_FN_D21, GPIO_FN_D22, GPIO_FN_D23,
436 GPIO_FN_D24, GPIO_FN_D25, GPIO_FN_D26, GPIO_FN_D27,
437 GPIO_FN_D28, GPIO_FN_D29, GPIO_FN_D30, GPIO_FN_D31,
438
439 GPIO_FN_WE0_FWE, /* share with FLCTL */
440 GPIO_FN_WE1,
441 GPIO_FN_WE2_ICIORD, /* share with PCMCIA */
442 GPIO_FN_WE3_ICIOWR, /* share with PCMCIA */
443 GPIO_FN_CKO, GPIO_FN_BS, GPIO_FN_RDWR,
444 GPIO_FN_RD_FSC, /* share with FLCTL */
445 GPIO_FN_WAIT_PORT177, /* WAIT Port 90/177 */
446 GPIO_FN_WAIT_PORT90,
447
448 GPIO_FN_FCE0, GPIO_FN_FCE1, GPIO_FN_FRB, /* FLCTL */
449
450 /* IRDA */
451 GPIO_FN_IRDA_FIRSEL, GPIO_FN_IRDA_IN, GPIO_FN_IRDA_OUT,
452
453 /* ATAPI */
454 GPIO_FN_IDE_D0, GPIO_FN_IDE_D1, GPIO_FN_IDE_D2,
455 GPIO_FN_IDE_D3, GPIO_FN_IDE_D4, GPIO_FN_IDE_D5,
456 GPIO_FN_IDE_D6, GPIO_FN_IDE_D7, GPIO_FN_IDE_D8,
457 GPIO_FN_IDE_D9, GPIO_FN_IDE_D10, GPIO_FN_IDE_D11,
458 GPIO_FN_IDE_D12, GPIO_FN_IDE_D13, GPIO_FN_IDE_D14,
459 GPIO_FN_IDE_D15, GPIO_FN_IDE_A0, GPIO_FN_IDE_A1,
460 GPIO_FN_IDE_A2, GPIO_FN_IDE_CS0, GPIO_FN_IDE_CS1,
461 GPIO_FN_IDE_IOWR, GPIO_FN_IDE_IORD, GPIO_FN_IDE_IORDY,
462 GPIO_FN_IDE_INT, GPIO_FN_IDE_RST, GPIO_FN_IDE_DIRECTION,
463 GPIO_FN_IDE_EXBUF_ENB, GPIO_FN_IDE_IODACK, GPIO_FN_IDE_IODREQ,
464
465 /* RMII */
466 GPIO_FN_RMII_CRS_DV, GPIO_FN_RMII_RX_ER, GPIO_FN_RMII_RXD0,
467 GPIO_FN_RMII_RXD1, GPIO_FN_RMII_TX_EN, GPIO_FN_RMII_TXD0,
468 GPIO_FN_RMII_MDC, GPIO_FN_RMII_TXD1, GPIO_FN_RMII_MDIO,
469 GPIO_FN_RMII_REF50CK, /* for RMII */
470 GPIO_FN_RMII_REF125CK, /* for GMII */
471
472 /* GEther */
473 GPIO_FN_ET_TX_CLK, GPIO_FN_ET_TX_EN, GPIO_FN_ET_ETXD0,
474 GPIO_FN_ET_ETXD1, GPIO_FN_ET_ETXD2, GPIO_FN_ET_ETXD3,
475 GPIO_FN_ET_ETXD4, GPIO_FN_ET_ETXD5, /* for GEther */
476 GPIO_FN_ET_ETXD6, GPIO_FN_ET_ETXD7, /* for GEther */
477 GPIO_FN_ET_COL, GPIO_FN_ET_TX_ER,
478 GPIO_FN_ET_RX_CLK, GPIO_FN_ET_RX_DV,
479 GPIO_FN_ET_ERXD0, GPIO_FN_ET_ERXD1,
480 GPIO_FN_ET_ERXD2, GPIO_FN_ET_ERXD3,
481 GPIO_FN_ET_ERXD4, GPIO_FN_ET_ERXD5, /* for GEther */
482 GPIO_FN_ET_ERXD6, GPIO_FN_ET_ERXD7, /* for GEther */
483 GPIO_FN_ET_RX_ER, GPIO_FN_ET_CRS,
484 GPIO_FN_ET_MDC, GPIO_FN_ET_MDIO,
485 GPIO_FN_ET_LINK, GPIO_FN_ET_PHY_INT,
486 GPIO_FN_ET_WOL, GPIO_FN_ET_GTX_CLK,
487
488 /* DMA0 */
489 GPIO_FN_DREQ0, GPIO_FN_DACK0,
490
491 /* DMA1 */
492 GPIO_FN_DREQ1, GPIO_FN_DACK1,
493
494 /* SYSC */
495 GPIO_FN_RESETOUTS,
496 GPIO_FN_RESETP_PULLUP,
497 GPIO_FN_RESETP_PLAIN,
498
499 /* HDMI */
500 GPIO_FN_HDMI_HPD,
501 GPIO_FN_HDMI_CEC,
502
503 /* SDENC */
504 GPIO_FN_SDENC_CPG,
505 GPIO_FN_SDENC_DV_CLKI,
506
507 /* IRREM */
508 GPIO_FN_IROUT,
509
510 /* DEBUG */
511 GPIO_FN_EDEBGREQ_PULLDOWN,
512 GPIO_FN_EDEBGREQ_PULLUP,
513
514 GPIO_FN_TRACEAUD_FROM_VIO,
515 GPIO_FN_TRACEAUD_FROM_LCDC0,
516 GPIO_FN_TRACEAUD_FROM_MEMC,
517};
518
519/* DMA slave IDs */ 31/* DMA slave IDs */
520enum { 32enum {
521 SHDMA_SLAVE_INVALID, 33 SHDMA_SLAVE_INVALID,
@@ -533,10 +45,13 @@ enum {
533}; 45};
534 46
535extern void r8a7740_meram_workaround(void); 47extern void r8a7740_meram_workaround(void);
48extern void r8a7740_init_delay(void);
536extern void r8a7740_init_irq(void); 49extern void r8a7740_init_irq(void);
50extern void r8a7740_init_irq_of(void);
537extern void r8a7740_map_io(void); 51extern void r8a7740_map_io(void);
538extern void r8a7740_add_early_devices(void); 52extern void r8a7740_add_early_devices(void);
539extern void r8a7740_add_standard_devices(void); 53extern void r8a7740_add_standard_devices(void);
54extern void r8a7740_add_standard_devices_dt(void);
540extern void r8a7740_clock_init(u8 md_ck); 55extern void r8a7740_clock_init(u8 md_ck);
541extern void r8a7740_pinmux_init(void); 56extern void r8a7740_pinmux_init(void);
542extern void r8a7740_pm_init(void); 57extern void r8a7740_pm_init(void);
diff --git a/arch/arm/mach-shmobile/include/mach/r8a7778.h b/arch/arm/mach-shmobile/include/mach/r8a7778.h
index 951149e6bcca..851d027a2f06 100644
--- a/arch/arm/mach-shmobile/include/mach/r8a7778.h
+++ b/arch/arm/mach-shmobile/include/mach/r8a7778.h
@@ -18,15 +18,26 @@
18#ifndef __ASM_R8A7778_H__ 18#ifndef __ASM_R8A7778_H__
19#define __ASM_R8A7778_H__ 19#define __ASM_R8A7778_H__
20 20
21#include <linux/mmc/sh_mmcif.h>
22#include <linux/mmc/sh_mobile_sdhi.h>
21#include <linux/sh_eth.h> 23#include <linux/sh_eth.h>
24#include <linux/platform_data/usb-rcar-phy.h>
22 25
23extern void r8a7778_add_standard_devices(void); 26extern void r8a7778_add_standard_devices(void);
24extern void r8a7778_add_standard_devices_dt(void); 27extern void r8a7778_add_standard_devices_dt(void);
25extern void r8a7778_add_ether_device(struct sh_eth_plat_data *pdata); 28extern void r8a7778_add_ether_device(struct sh_eth_plat_data *pdata);
29extern void r8a7778_add_usb_phy_device(struct rcar_phy_platform_data *pdata);
30extern void r8a7778_add_i2c_device(int id);
31extern void r8a7778_add_hspi_device(int id);
32extern void r8a7778_add_mmc_device(struct sh_mmcif_plat_data *info);
33
34extern void r8a7778_init_late(void);
26extern void r8a7778_init_delay(void); 35extern void r8a7778_init_delay(void);
27extern void r8a7778_init_irq(void); 36extern void r8a7778_init_irq(void);
28extern void r8a7778_init_irq_dt(void); 37extern void r8a7778_init_irq_dt(void);
29extern void r8a7778_clock_init(void); 38extern void r8a7778_clock_init(void);
30extern void r8a7778_init_irq_extpin(int irlm); 39extern void r8a7778_init_irq_extpin(int irlm);
40extern void r8a7778_pinmux_init(void);
41extern void r8a7778_sdhi_init(int id, struct sh_mobile_sdhi_info *info);
31 42
32#endif /* __ASM_R8A7778_H__ */ 43#endif /* __ASM_R8A7778_H__ */
diff --git a/arch/arm/mach-shmobile/include/mach/r8a7779.h b/arch/arm/mach-shmobile/include/mach/r8a7779.h
index 188b295938a5..fc47073c7ba9 100644
--- a/arch/arm/mach-shmobile/include/mach/r8a7779.h
+++ b/arch/arm/mach-shmobile/include/mach/r8a7779.h
@@ -4,6 +4,7 @@
4#include <linux/sh_clk.h> 4#include <linux/sh_clk.h>
5#include <linux/pm_domain.h> 5#include <linux/pm_domain.h>
6#include <linux/sh_eth.h> 6#include <linux/sh_eth.h>
7#include <linux/platform_data/usb-rcar-phy.h>
7 8
8struct platform_device; 9struct platform_device;
9 10
@@ -33,6 +34,8 @@ extern void r8a7779_add_early_devices(void);
33extern void r8a7779_add_standard_devices(void); 34extern void r8a7779_add_standard_devices(void);
34extern void r8a7779_add_standard_devices_dt(void); 35extern void r8a7779_add_standard_devices_dt(void);
35extern void r8a7779_add_ether_device(struct sh_eth_plat_data *pdata); 36extern void r8a7779_add_ether_device(struct sh_eth_plat_data *pdata);
37extern void r8a7779_add_usb_phy_device(struct rcar_phy_platform_data *pdata);
38extern void r8a7779_init_late(void);
36extern void r8a7779_clock_init(void); 39extern void r8a7779_clock_init(void);
37extern void r8a7779_pinmux_init(void); 40extern void r8a7779_pinmux_init(void);
38extern void r8a7779_pm_init(void); 41extern void r8a7779_pm_init(void);
diff --git a/arch/arm/mach-shmobile/include/mach/sh7372.h b/arch/arm/mach-shmobile/include/mach/sh7372.h
index fd7cba024c39..854a9f0ca040 100644
--- a/arch/arm/mach-shmobile/include/mach/sh7372.h
+++ b/arch/arm/mach-shmobile/include/mach/sh7372.h
@@ -15,397 +15,6 @@
15#include <linux/pm_domain.h> 15#include <linux/pm_domain.h>
16#include <mach/pm-rmobile.h> 16#include <mach/pm-rmobile.h>
17 17
18/*
19 * Pin Function Controller:
20 * GPIO_FN_xx - GPIO used to select pin function
21 * GPIO_PORTxx - GPIO mapped to real I/O pin on CPU
22 */
23enum {
24 /* PORT */
25 GPIO_PORT0, GPIO_PORT1, GPIO_PORT2, GPIO_PORT3, GPIO_PORT4,
26 GPIO_PORT5, GPIO_PORT6, GPIO_PORT7, GPIO_PORT8, GPIO_PORT9,
27
28 GPIO_PORT10, GPIO_PORT11, GPIO_PORT12, GPIO_PORT13, GPIO_PORT14,
29 GPIO_PORT15, GPIO_PORT16, GPIO_PORT17, GPIO_PORT18, GPIO_PORT19,
30
31 GPIO_PORT20, GPIO_PORT21, GPIO_PORT22, GPIO_PORT23, GPIO_PORT24,
32 GPIO_PORT25, GPIO_PORT26, GPIO_PORT27, GPIO_PORT28, GPIO_PORT29,
33
34 GPIO_PORT30, GPIO_PORT31, GPIO_PORT32, GPIO_PORT33, GPIO_PORT34,
35 GPIO_PORT35, GPIO_PORT36, GPIO_PORT37, GPIO_PORT38, GPIO_PORT39,
36
37 GPIO_PORT40, GPIO_PORT41, GPIO_PORT42, GPIO_PORT43, GPIO_PORT44,
38 GPIO_PORT45, GPIO_PORT46, GPIO_PORT47, GPIO_PORT48, GPIO_PORT49,
39
40 GPIO_PORT50, GPIO_PORT51, GPIO_PORT52, GPIO_PORT53, GPIO_PORT54,
41 GPIO_PORT55, GPIO_PORT56, GPIO_PORT57, GPIO_PORT58, GPIO_PORT59,
42
43 GPIO_PORT60, GPIO_PORT61, GPIO_PORT62, GPIO_PORT63, GPIO_PORT64,
44 GPIO_PORT65, GPIO_PORT66, GPIO_PORT67, GPIO_PORT68, GPIO_PORT69,
45
46 GPIO_PORT70, GPIO_PORT71, GPIO_PORT72, GPIO_PORT73, GPIO_PORT74,
47 GPIO_PORT75, GPIO_PORT76, GPIO_PORT77, GPIO_PORT78, GPIO_PORT79,
48
49 GPIO_PORT80, GPIO_PORT81, GPIO_PORT82, GPIO_PORT83, GPIO_PORT84,
50 GPIO_PORT85, GPIO_PORT86, GPIO_PORT87, GPIO_PORT88, GPIO_PORT89,
51
52 GPIO_PORT90, GPIO_PORT91, GPIO_PORT92, GPIO_PORT93, GPIO_PORT94,
53 GPIO_PORT95, GPIO_PORT96, GPIO_PORT97, GPIO_PORT98, GPIO_PORT99,
54
55 GPIO_PORT100, GPIO_PORT101, GPIO_PORT102, GPIO_PORT103, GPIO_PORT104,
56 GPIO_PORT105, GPIO_PORT106, GPIO_PORT107, GPIO_PORT108, GPIO_PORT109,
57
58 GPIO_PORT110, GPIO_PORT111, GPIO_PORT112, GPIO_PORT113, GPIO_PORT114,
59 GPIO_PORT115, GPIO_PORT116, GPIO_PORT117, GPIO_PORT118, GPIO_PORT119,
60
61 GPIO_PORT120, GPIO_PORT121, GPIO_PORT122, GPIO_PORT123, GPIO_PORT124,
62 GPIO_PORT125, GPIO_PORT126, GPIO_PORT127, GPIO_PORT128, GPIO_PORT129,
63
64 GPIO_PORT130, GPIO_PORT131, GPIO_PORT132, GPIO_PORT133, GPIO_PORT134,
65 GPIO_PORT135, GPIO_PORT136, GPIO_PORT137, GPIO_PORT138, GPIO_PORT139,
66
67 GPIO_PORT140, GPIO_PORT141, GPIO_PORT142, GPIO_PORT143, GPIO_PORT144,
68 GPIO_PORT145, GPIO_PORT146, GPIO_PORT147, GPIO_PORT148, GPIO_PORT149,
69
70 GPIO_PORT150, GPIO_PORT151, GPIO_PORT152, GPIO_PORT153, GPIO_PORT154,
71 GPIO_PORT155, GPIO_PORT156, GPIO_PORT157, GPIO_PORT158, GPIO_PORT159,
72
73 GPIO_PORT160, GPIO_PORT161, GPIO_PORT162, GPIO_PORT163, GPIO_PORT164,
74 GPIO_PORT165, GPIO_PORT166, GPIO_PORT167, GPIO_PORT168, GPIO_PORT169,
75
76 GPIO_PORT170, GPIO_PORT171, GPIO_PORT172, GPIO_PORT173, GPIO_PORT174,
77 GPIO_PORT175, GPIO_PORT176, GPIO_PORT177, GPIO_PORT178, GPIO_PORT179,
78
79 GPIO_PORT180, GPIO_PORT181, GPIO_PORT182, GPIO_PORT183, GPIO_PORT184,
80 GPIO_PORT185, GPIO_PORT186, GPIO_PORT187, GPIO_PORT188, GPIO_PORT189,
81
82 GPIO_PORT190,
83
84 /* IRQ */
85 GPIO_FN_IRQ0_6, /* PORT 6 */
86 GPIO_FN_IRQ0_162, /* PORT 162 */
87 GPIO_FN_IRQ1, /* PORT 12 */
88 GPIO_FN_IRQ2_4, /* PORT 4 */
89 GPIO_FN_IRQ2_5, /* PORT 5 */
90 GPIO_FN_IRQ3_8, /* PORT 8 */
91 GPIO_FN_IRQ3_16, /* PORT 16 */
92 GPIO_FN_IRQ4_17, /* PORT 17 */
93 GPIO_FN_IRQ4_163, /* PORT 163 */
94 GPIO_FN_IRQ5, /* PORT 18 */
95 GPIO_FN_IRQ6_39, /* PORT 39 */
96 GPIO_FN_IRQ6_164, /* PORT 164 */
97 GPIO_FN_IRQ7_40, /* PORT 40 */
98 GPIO_FN_IRQ7_167, /* PORT 167 */
99 GPIO_FN_IRQ8_41, /* PORT 41 */
100 GPIO_FN_IRQ8_168, /* PORT 168 */
101 GPIO_FN_IRQ9_42, /* PORT 42 */
102 GPIO_FN_IRQ9_169, /* PORT 169 */
103 GPIO_FN_IRQ10, /* PORT 65 */
104 GPIO_FN_IRQ11, /* PORT 67 */
105 GPIO_FN_IRQ12_80, /* PORT 80 */
106 GPIO_FN_IRQ12_137, /* PORT 137 */
107 GPIO_FN_IRQ13_81, /* PORT 81 */
108 GPIO_FN_IRQ13_145, /* PORT 145 */
109 GPIO_FN_IRQ14_82, /* PORT 82 */
110 GPIO_FN_IRQ14_146, /* PORT 146 */
111 GPIO_FN_IRQ15_83, /* PORT 83 */
112 GPIO_FN_IRQ15_147, /* PORT 147 */
113 GPIO_FN_IRQ16_84, /* PORT 84 */
114 GPIO_FN_IRQ16_170, /* PORT 170 */
115 GPIO_FN_IRQ17, /* PORT 85 */
116 GPIO_FN_IRQ18, /* PORT 86 */
117 GPIO_FN_IRQ19, /* PORT 87 */
118 GPIO_FN_IRQ20, /* PORT 92 */
119 GPIO_FN_IRQ21, /* PORT 93 */
120 GPIO_FN_IRQ22, /* PORT 94 */
121 GPIO_FN_IRQ23, /* PORT 95 */
122 GPIO_FN_IRQ24, /* PORT 112 */
123 GPIO_FN_IRQ25, /* PORT 119 */
124 GPIO_FN_IRQ26_121, /* PORT 121 */
125 GPIO_FN_IRQ26_172, /* PORT 172 */
126 GPIO_FN_IRQ27_122, /* PORT 122 */
127 GPIO_FN_IRQ27_180, /* PORT 180 */
128 GPIO_FN_IRQ28_123, /* PORT 123 */
129 GPIO_FN_IRQ28_181, /* PORT 181 */
130 GPIO_FN_IRQ29_129, /* PORT 129 */
131 GPIO_FN_IRQ29_182, /* PORT 182 */
132 GPIO_FN_IRQ30_130, /* PORT 130 */
133 GPIO_FN_IRQ30_183, /* PORT 183 */
134 GPIO_FN_IRQ31_138, /* PORT 138 */
135 GPIO_FN_IRQ31_184, /* PORT 184 */
136
137 /*
138 * MSIOF0 (PORT 36, 37, 38, 39
139 * 40, 41, 42, 43, 44, 45)
140 */
141 GPIO_FN_MSIOF0_TSYNC, GPIO_FN_MSIOF0_TSCK,
142 GPIO_FN_MSIOF0_RXD, GPIO_FN_MSIOF0_RSCK,
143 GPIO_FN_MSIOF0_RSYNC, GPIO_FN_MSIOF0_MCK0,
144 GPIO_FN_MSIOF0_MCK1, GPIO_FN_MSIOF0_SS1,
145 GPIO_FN_MSIOF0_SS2, GPIO_FN_MSIOF0_TXD,
146
147 /*
148 * MSIOF1 (PORT 39, 40, 41, 42, 43, 44
149 * 84, 85, 86, 87, 88, 89, 90, 91, 92, 93)
150 */
151 GPIO_FN_MSIOF1_TSCK_39, GPIO_FN_MSIOF1_TSYNC_40,
152 GPIO_FN_MSIOF1_TSCK_88, GPIO_FN_MSIOF1_TSYNC_89,
153 GPIO_FN_MSIOF1_TXD_41, GPIO_FN_MSIOF1_RXD_42,
154 GPIO_FN_MSIOF1_TXD_90, GPIO_FN_MSIOF1_RXD_91,
155 GPIO_FN_MSIOF1_SS1_43, GPIO_FN_MSIOF1_SS2_44,
156 GPIO_FN_MSIOF1_SS1_92, GPIO_FN_MSIOF1_SS2_93,
157 GPIO_FN_MSIOF1_RSCK, GPIO_FN_MSIOF1_RSYNC,
158 GPIO_FN_MSIOF1_MCK0, GPIO_FN_MSIOF1_MCK1,
159
160 /*
161 * MSIOF2 (PORT 134, 135, 136, 137, 138, 139
162 * 148, 149, 150, 151)
163 */
164 GPIO_FN_MSIOF2_RSCK, GPIO_FN_MSIOF2_RSYNC,
165 GPIO_FN_MSIOF2_MCK0, GPIO_FN_MSIOF2_MCK1,
166 GPIO_FN_MSIOF2_SS1, GPIO_FN_MSIOF2_SS2,
167 GPIO_FN_MSIOF2_TSYNC, GPIO_FN_MSIOF2_TSCK,
168 GPIO_FN_MSIOF2_RXD, GPIO_FN_MSIOF2_TXD,
169
170 /* MSIOF3 (PORT 76, 77, 78, 79, 80, 81, 82, 83) */
171 GPIO_FN_BBIF1_RXD, GPIO_FN_BBIF1_TSYNC,
172 GPIO_FN_BBIF1_TSCK, GPIO_FN_BBIF1_TXD,
173 GPIO_FN_BBIF1_RSCK, GPIO_FN_BBIF1_RSYNC,
174 GPIO_FN_BBIF1_FLOW, GPIO_FN_BB_RX_FLOW_N,
175
176 /* MSIOF4 (PORT 0, 1, 2, 3) */
177 GPIO_FN_BBIF2_TSCK1, GPIO_FN_BBIF2_TSYNC1,
178 GPIO_FN_BBIF2_TXD1, GPIO_FN_BBIF2_RXD,
179
180 /* FSI (PORT 4, 5, 6, 7, 8, 9, 10, 11, 15) */
181 GPIO_FN_FSIACK, GPIO_FN_FSIBCK,
182 GPIO_FN_FSIAILR, GPIO_FN_FSIAIBT,
183 GPIO_FN_FSIAISLD, GPIO_FN_FSIAOMC,
184 GPIO_FN_FSIAOLR, GPIO_FN_FSIAOBT,
185 GPIO_FN_FSIAOSLD, GPIO_FN_FSIASPDIF_11,
186 GPIO_FN_FSIASPDIF_15,
187
188 /* FMSI (PORT 12, 13, 14, 15, 16, 17, 18, 65) */
189 GPIO_FN_FMSOCK, GPIO_FN_FMSOOLR,
190 GPIO_FN_FMSIOLR, GPIO_FN_FMSOOBT,
191 GPIO_FN_FMSIOBT, GPIO_FN_FMSOSLD,
192 GPIO_FN_FMSOILR, GPIO_FN_FMSIILR,
193 GPIO_FN_FMSOIBT, GPIO_FN_FMSIIBT,
194 GPIO_FN_FMSISLD, GPIO_FN_FMSICK,
195
196 /* SCIFA0 (PORT 152, 153, 156, 157, 158) */
197 GPIO_FN_SCIFA0_TXD, GPIO_FN_SCIFA0_RXD,
198 GPIO_FN_SCIFA0_SCK, GPIO_FN_SCIFA0_RTS,
199 GPIO_FN_SCIFA0_CTS,
200
201 /* SCIFA1 (PORT 154, 155, 159, 160, 161) */
202 GPIO_FN_SCIFA1_TXD, GPIO_FN_SCIFA1_RXD,
203 GPIO_FN_SCIFA1_SCK, GPIO_FN_SCIFA1_RTS,
204 GPIO_FN_SCIFA1_CTS,
205
206 /* SCIFA2 (PORT 94, 95, 96, 97, 98) */
207 GPIO_FN_SCIFA2_CTS1, GPIO_FN_SCIFA2_RTS1,
208 GPIO_FN_SCIFA2_TXD1, GPIO_FN_SCIFA2_RXD1,
209 GPIO_FN_SCIFA2_SCK1,
210
211 /* SCIFA3 (PORT 43, 44,
212 140, 141, 142, 143, 144) */
213 GPIO_FN_SCIFA3_CTS_43, GPIO_FN_SCIFA3_CTS_140,
214 GPIO_FN_SCIFA3_RTS_44, GPIO_FN_SCIFA3_RTS_141,
215 GPIO_FN_SCIFA3_SCK, GPIO_FN_SCIFA3_TXD,
216 GPIO_FN_SCIFA3_RXD,
217
218 /* SCIFA4 (PORT 5, 6) */
219 GPIO_FN_SCIFA4_RXD, GPIO_FN_SCIFA4_TXD,
220
221 /* SCIFA5 (PORT 8, 12) */
222 GPIO_FN_SCIFA5_RXD, GPIO_FN_SCIFA5_TXD,
223
224 /* SCIFB (PORT 162, 163, 164, 165, 166) */
225 GPIO_FN_SCIFB_SCK, GPIO_FN_SCIFB_RTS,
226 GPIO_FN_SCIFB_CTS, GPIO_FN_SCIFB_TXD,
227 GPIO_FN_SCIFB_RXD,
228
229 /*
230 * CEU (PORT 16, 17,
231 * 100, 101, 102, 103, 104, 105, 106, 107, 108, 109,
232 * 110, 111, 112, 113, 114, 115, 116, 117, 118, 119,
233 * 120)
234 */
235 GPIO_FN_VIO_HD, GPIO_FN_VIO_CKO1, GPIO_FN_VIO_CKO2,
236 GPIO_FN_VIO_VD, GPIO_FN_VIO_CLK, GPIO_FN_VIO_FIELD,
237 GPIO_FN_VIO_CKO,
238 GPIO_FN_VIO_D0, GPIO_FN_VIO_D1, GPIO_FN_VIO_D2,
239 GPIO_FN_VIO_D3, GPIO_FN_VIO_D4, GPIO_FN_VIO_D5,
240 GPIO_FN_VIO_D6, GPIO_FN_VIO_D7, GPIO_FN_VIO_D8,
241 GPIO_FN_VIO_D9, GPIO_FN_VIO_D10, GPIO_FN_VIO_D11,
242 GPIO_FN_VIO_D12, GPIO_FN_VIO_D13, GPIO_FN_VIO_D14,
243 GPIO_FN_VIO_D15,
244
245 /* USB0 (PORT 113, 114, 115, 116, 117, 167) */
246 GPIO_FN_IDIN_0, GPIO_FN_EXTLP_0,
247 GPIO_FN_OVCN2_0, GPIO_FN_PWEN_0,
248 GPIO_FN_OVCN_0, GPIO_FN_VBUS0_0,
249
250 /* USB1 (PORT 18, 113, 114, 115, 116, 117, 138, 162, 168) */
251 GPIO_FN_IDIN_1_18, GPIO_FN_IDIN_1_113,
252 GPIO_FN_PWEN_1_115, GPIO_FN_PWEN_1_138,
253 GPIO_FN_OVCN_1_114, GPIO_FN_OVCN_1_162,
254 GPIO_FN_EXTLP_1, GPIO_FN_OVCN2_1,
255 GPIO_FN_VBUS0_1,
256
257 /* GPIO (PORT 41, 42, 43, 44) */
258 GPIO_FN_GPI0, GPIO_FN_GPI1, GPIO_FN_GPO0, GPIO_FN_GPO1,
259
260 /*
261 * BSC (PORT 19,
262 * 20, 21, 22, 25, 26, 27, 28, 29,
263 * 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
264 * 40, 41, 42, 43, 44, 45,
265 * 62, 63, 64, 65, 66, 67,
266 * 71, 72, 74, 75)
267 */
268 GPIO_FN_BS, GPIO_FN_WE1,
269 GPIO_FN_CKO, GPIO_FN_WAIT, GPIO_FN_RDWR,
270
271 GPIO_FN_A0, GPIO_FN_A1, GPIO_FN_A2, GPIO_FN_A3,
272 GPIO_FN_A6, GPIO_FN_A7, GPIO_FN_A8, GPIO_FN_A9,
273 GPIO_FN_A10, GPIO_FN_A11, GPIO_FN_A12, GPIO_FN_A13,
274 GPIO_FN_A14, GPIO_FN_A15, GPIO_FN_A16, GPIO_FN_A17,
275 GPIO_FN_A18, GPIO_FN_A19, GPIO_FN_A20, GPIO_FN_A21,
276 GPIO_FN_A22, GPIO_FN_A23, GPIO_FN_A24, GPIO_FN_A25,
277 GPIO_FN_A26,
278
279 GPIO_FN_CS0, GPIO_FN_CS2, GPIO_FN_CS4,
280 GPIO_FN_CS5A, GPIO_FN_CS5B, GPIO_FN_CS6A,
281
282 /*
283 * BSC/FLCTL (PORT 23, 24,
284 * 46, 47, 48, 49,
285 * 50, 51, 52, 53, 54, 55, 56, 57, 58, 59,
286 * 60, 61, 69, 70)
287 */
288 GPIO_FN_RD_FSC, GPIO_FN_WE0_FWE,
289 GPIO_FN_A4_FOE, GPIO_FN_A5_FCDE,
290 GPIO_FN_D0_NAF0, GPIO_FN_D1_NAF1, GPIO_FN_D2_NAF2,
291 GPIO_FN_D3_NAF3, GPIO_FN_D4_NAF4, GPIO_FN_D5_NAF5,
292 GPIO_FN_D6_NAF6, GPIO_FN_D7_NAF7, GPIO_FN_D8_NAF8,
293 GPIO_FN_D9_NAF9, GPIO_FN_D10_NAF10, GPIO_FN_D11_NAF11,
294 GPIO_FN_D12_NAF12, GPIO_FN_D13_NAF13, GPIO_FN_D14_NAF14,
295 GPIO_FN_D15_NAF15,
296
297 /* SPU2 (PORT 65) */
298 GPIO_FN_VINT_I,
299
300 /* FLCTL (PORT 66, 68, 73) */
301 GPIO_FN_FCE1, GPIO_FN_FCE0, GPIO_FN_FRB,
302
303 /* HSI (PORT 76, 77, 78, 79, 80, 81, 82, 83) */
304 GPIO_FN_GP_RX_FLAG, GPIO_FN_GP_RX_DATA, GPIO_FN_GP_TX_READY,
305 GPIO_FN_GP_RX_WAKE, GPIO_FN_MP_TX_FLAG, GPIO_FN_MP_TX_DATA,
306 GPIO_FN_MP_RX_READY, GPIO_FN_MP_TX_WAKE,
307
308 /*
309 * MFI (PORT 76, 77, 78, 79,
310 * 80, 81, 82, 83, 84, 85, 86, 87, 88, 89,
311 * 90, 91, 92, 93, 94, 95, 96, 97, 98, 99)
312 */
313 GPIO_FN_MFIv6, /* see MSEL4CR 6 */
314 GPIO_FN_MFIv4, /* see MSEL4CR 6 */
315
316 GPIO_FN_MEMC_CS0, GPIO_FN_MEMC_BUSCLK_MEMC_A0,
317 GPIO_FN_MEMC_CS1_MEMC_A1, GPIO_FN_MEMC_ADV_MEMC_DREQ0,
318 GPIO_FN_MEMC_WAIT_MEMC_DREQ1, GPIO_FN_MEMC_NOE,
319 GPIO_FN_MEMC_NWE, GPIO_FN_MEMC_INT,
320
321 GPIO_FN_MEMC_AD0, GPIO_FN_MEMC_AD1, GPIO_FN_MEMC_AD2,
322 GPIO_FN_MEMC_AD3, GPIO_FN_MEMC_AD4, GPIO_FN_MEMC_AD5,
323 GPIO_FN_MEMC_AD6, GPIO_FN_MEMC_AD7, GPIO_FN_MEMC_AD8,
324 GPIO_FN_MEMC_AD9, GPIO_FN_MEMC_AD10, GPIO_FN_MEMC_AD11,
325 GPIO_FN_MEMC_AD12, GPIO_FN_MEMC_AD13, GPIO_FN_MEMC_AD14,
326 GPIO_FN_MEMC_AD15,
327
328 /* SIM (PORT 94, 95, 98) */
329 GPIO_FN_SIM_RST, GPIO_FN_SIM_CLK, GPIO_FN_SIM_D,
330
331 /* TPU (PORT 93, 99, 112, 160, 161) */
332 GPIO_FN_TPU0TO0, GPIO_FN_TPU0TO1,
333 GPIO_FN_TPU0TO2_93, GPIO_FN_TPU0TO2_99,
334 GPIO_FN_TPU0TO3,
335
336 /* I2C2 (PORT 110, 111) */
337 GPIO_FN_I2C_SCL2, GPIO_FN_I2C_SDA2,
338
339 /* I2C3(1) (PORT 114, 115) */
340 GPIO_FN_I2C_SCL3, GPIO_FN_I2C_SDA3,
341
342 /* I2C3(2) (PORT 137, 145) */
343 GPIO_FN_I2C_SCL3S, GPIO_FN_I2C_SDA3S,
344
345 /* I2C4(2) (PORT 116, 117) */
346 GPIO_FN_I2C_SCL4, GPIO_FN_I2C_SDA4,
347
348 /* I2C4(2) (PORT 146, 147) */
349 GPIO_FN_I2C_SCL4S, GPIO_FN_I2C_SDA4S,
350
351 /*
352 * KEYSC (PORT 121, 122, 123, 124, 125, 126, 127, 128, 129,
353 * 130, 131, 132, 133, 134, 135, 136)
354 */
355 GPIO_FN_KEYOUT0, GPIO_FN_KEYIN0_121, GPIO_FN_KEYIN0_136,
356 GPIO_FN_KEYOUT1, GPIO_FN_KEYIN1_122, GPIO_FN_KEYIN1_135,
357 GPIO_FN_KEYOUT2, GPIO_FN_KEYIN2_123, GPIO_FN_KEYIN2_134,
358 GPIO_FN_KEYOUT3, GPIO_FN_KEYIN3_124, GPIO_FN_KEYIN3_133,
359 GPIO_FN_KEYOUT4, GPIO_FN_KEYIN4,
360 GPIO_FN_KEYOUT5, GPIO_FN_KEYIN5,
361 GPIO_FN_KEYOUT6, GPIO_FN_KEYIN6,
362 GPIO_FN_KEYOUT7, GPIO_FN_KEYIN7,
363
364 /*
365 * LCDC (PORT 121, 122, 123, 124, 125, 126, 127, 128, 129,
366 * 130, 131, 132, 133, 134, 135, 136, 137, 138, 139,
367 * 140, 141, 142, 143, 144, 145, 146, 147, 148, 149,
368 * 150, 151)
369 */
370 GPIO_FN_LCDC0_SELECT, /* LCDC 0 */
371 GPIO_FN_LCDC1_SELECT, /* LCDC 1 */
372 GPIO_FN_LCDHSYN, GPIO_FN_LCDCS, GPIO_FN_LCDVSYN,
373 GPIO_FN_LCDDCK, GPIO_FN_LCDWR, GPIO_FN_LCDRD,
374 GPIO_FN_LCDDISP, GPIO_FN_LCDRS, GPIO_FN_LCDLCLK,
375 GPIO_FN_LCDDON,
376
377 GPIO_FN_LCDD0, GPIO_FN_LCDD1, GPIO_FN_LCDD2, GPIO_FN_LCDD3,
378 GPIO_FN_LCDD4, GPIO_FN_LCDD5, GPIO_FN_LCDD6, GPIO_FN_LCDD7,
379 GPIO_FN_LCDD8, GPIO_FN_LCDD9, GPIO_FN_LCDD10, GPIO_FN_LCDD11,
380 GPIO_FN_LCDD12, GPIO_FN_LCDD13, GPIO_FN_LCDD14, GPIO_FN_LCDD15,
381 GPIO_FN_LCDD16, GPIO_FN_LCDD17, GPIO_FN_LCDD18, GPIO_FN_LCDD19,
382 GPIO_FN_LCDD20, GPIO_FN_LCDD21, GPIO_FN_LCDD22, GPIO_FN_LCDD23,
383
384 /* IRDA (PORT 139, 140, 141, 142) */
385 GPIO_FN_IRDA_OUT, GPIO_FN_IRDA_IN, GPIO_FN_IRDA_FIRSEL,
386 GPIO_FN_IROUT_139, GPIO_FN_IROUT_140,
387
388 /* TSIF1 (PORT 156, 157, 158, 159) */
389 GPIO_FN_TS0_1SELECT, /* TSIF0 - 1 select */
390 GPIO_FN_TS0_2SELECT, /* TSIF0 - 2 select */
391 GPIO_FN_TS1_1SELECT, /* TSIF1 - 1 select */
392 GPIO_FN_TS1_2SELECT, /* TSIF1 - 2 select */
393
394 GPIO_FN_TS_SPSYNC1, GPIO_FN_TS_SDAT1,
395 GPIO_FN_TS_SDEN1, GPIO_FN_TS_SCK1,
396
397 /* TSIF2 (PORT 137, 145, 146, 147) */
398 GPIO_FN_TS_SPSYNC2, GPIO_FN_TS_SDAT2,
399 GPIO_FN_TS_SDEN2, GPIO_FN_TS_SCK2,
400
401 /* HDMI (PORT 169, 170) */
402 GPIO_FN_HDMI_HPD, GPIO_FN_HDMI_CEC,
403
404 /* SDENC see MSEL4CR 19 */
405 GPIO_FN_SDENC_CPG,
406 GPIO_FN_SDENC_DV_CLKI,
407};
408
409/* DMA slave IDs */ 18/* DMA slave IDs */
410enum { 19enum {
411 SHDMA_SLAVE_INVALID, 20 SHDMA_SLAVE_INVALID,
@@ -466,6 +75,8 @@ extern void sh7372_intcs_resume(void);
466extern void sh7372_intca_suspend(void); 75extern void sh7372_intca_suspend(void);
467extern void sh7372_intca_resume(void); 76extern void sh7372_intca_resume(void);
468 77
78extern unsigned long sh7372_cpu_resume;
79
469#ifdef CONFIG_PM 80#ifdef CONFIG_PM
470extern void __init sh7372_init_pm_domains(void); 81extern void __init sh7372_init_pm_domains(void);
471#else 82#else
diff --git a/arch/arm/mach-shmobile/include/mach/zboot.h b/arch/arm/mach-shmobile/include/mach/zboot.h
index 9320aff0a20f..f2d8744c1f14 100644
--- a/arch/arm/mach-shmobile/include/mach/zboot.h
+++ b/arch/arm/mach-shmobile/include/mach/zboot.h
@@ -10,11 +10,9 @@
10 * 10 *
11 **************************************************/ 11 **************************************************/
12 12
13#ifdef CONFIG_MACH_AP4EVB 13#ifdef CONFIG_MACH_MACKEREL
14#define MACH_TYPE MACH_TYPE_AP4EVB
15#include "mach/head-ap4evb.txt"
16#elif defined(CONFIG_MACH_MACKEREL)
17#define MACH_TYPE MACH_TYPE_MACKEREL 14#define MACH_TYPE MACH_TYPE_MACKEREL
15#define MEMORY_START 0x40000000
18#include "mach/head-mackerel.txt" 16#include "mach/head-mackerel.txt"
19#else 17#else
20#error "unsupported board." 18#error "unsupported board."
diff --git a/arch/arm/mach-shmobile/intc-r8a7740.c b/arch/arm/mach-shmobile/intc-r8a7740.c
index b741c8409a5a..8871f7717dc8 100644
--- a/arch/arm/mach-shmobile/intc-r8a7740.c
+++ b/arch/arm/mach-shmobile/intc-r8a7740.c
@@ -20,19 +20,15 @@
20 20
21#include <linux/init.h> 21#include <linux/init.h>
22#include <linux/io.h> 22#include <linux/io.h>
23#include <linux/irqchip.h>
23#include <linux/irqchip/arm-gic.h> 24#include <linux/irqchip/arm-gic.h>
24 25
25void __init r8a7740_init_irq(void) 26static void __init r8a7740_init_irq_common(void)
26{ 27{
27 void __iomem *gic_dist_base = ioremap_nocache(0xc2800000, 0x1000);
28 void __iomem *gic_cpu_base = ioremap_nocache(0xc2000000, 0x1000);
29 void __iomem *intc_prio_base = ioremap_nocache(0xe6900010, 0x10); 28 void __iomem *intc_prio_base = ioremap_nocache(0xe6900010, 0x10);
30 void __iomem *intc_msk_base = ioremap_nocache(0xe6900040, 0x10); 29 void __iomem *intc_msk_base = ioremap_nocache(0xe6900040, 0x10);
31 void __iomem *pfc_inta_ctrl = ioremap_nocache(0xe605807c, 0x4); 30 void __iomem *pfc_inta_ctrl = ioremap_nocache(0xe605807c, 0x4);
32 31
33 /* initialize the Generic Interrupt Controller PL390 r0p0 */
34 gic_init(0, 29, gic_dist_base, gic_cpu_base);
35
36 /* route signals to GIC */ 32 /* route signals to GIC */
37 iowrite32(0x0, pfc_inta_ctrl); 33 iowrite32(0x0, pfc_inta_ctrl);
38 34
@@ -54,3 +50,19 @@ void __init r8a7740_init_irq(void)
54 iounmap(intc_msk_base); 50 iounmap(intc_msk_base);
55 iounmap(pfc_inta_ctrl); 51 iounmap(pfc_inta_ctrl);
56} 52}
53
54void __init r8a7740_init_irq_of(void)
55{
56 irqchip_init();
57 r8a7740_init_irq_common();
58}
59
60void __init r8a7740_init_irq(void)
61{
62 void __iomem *gic_dist_base = ioremap_nocache(0xc2800000, 0x1000);
63 void __iomem *gic_cpu_base = ioremap_nocache(0xc2000000, 0x1000);
64
65 /* initialize the Generic Interrupt Controller PL390 r0p0 */
66 gic_init(0, 29, gic_dist_base, gic_cpu_base);
67 r8a7740_init_irq_common();
68}
diff --git a/arch/arm/mach-shmobile/pm-sh7372.c b/arch/arm/mach-shmobile/pm-sh7372.c
index dec9293bb90d..0de75fd394b9 100644
--- a/arch/arm/mach-shmobile/pm-sh7372.c
+++ b/arch/arm/mach-shmobile/pm-sh7372.c
@@ -351,6 +351,9 @@ static void sh7372_enter_a4s_common(int pllc0_on)
351 351
352static void sh7372_pm_setup_smfram(void) 352static void sh7372_pm_setup_smfram(void)
353{ 353{
354 /* pass physical address of cpu_resume() to assembly resume code */
355 sh7372_cpu_resume = virt_to_phys(cpu_resume);
356
354 memcpy((void *)SMFRAM, sh7372_resume_core_standby_sysc, 0x100); 357 memcpy((void *)SMFRAM, sh7372_resume_core_standby_sysc, 0x100);
355} 358}
356#else 359#else
diff --git a/arch/arm/mach-shmobile/setup-emev2.c b/arch/arm/mach-shmobile/setup-emev2.c
index 899a86c31ec9..1ccddd228112 100644
--- a/arch/arm/mach-shmobile/setup-emev2.c
+++ b/arch/arm/mach-shmobile/setup-emev2.c
@@ -287,14 +287,14 @@ static struct gpio_em_config gio3_config = {
287static struct resource gio3_resources[] = { 287static struct resource gio3_resources[] = {
288 [0] = { 288 [0] = {
289 .name = "GIO_096", 289 .name = "GIO_096",
290 .start = 0xe0050100, 290 .start = 0xe0050180,
291 .end = 0xe005012b, 291 .end = 0xe00501ab,
292 .flags = IORESOURCE_MEM, 292 .flags = IORESOURCE_MEM,
293 }, 293 },
294 [1] = { 294 [1] = {
295 .name = "GIO_096", 295 .name = "GIO_096",
296 .start = 0xe0050140, 296 .start = 0xe00501c0,
297 .end = 0xe005015f, 297 .end = 0xe00501df,
298 .flags = IORESOURCE_MEM, 298 .flags = IORESOURCE_MEM,
299 }, 299 },
300 [2] = { 300 [2] = {
diff --git a/arch/arm/mach-shmobile/setup-r8a73a4.c b/arch/arm/mach-shmobile/setup-r8a73a4.c
index c5a75a7a508f..7f45c2edbca9 100644
--- a/arch/arm/mach-shmobile/setup-r8a73a4.c
+++ b/arch/arm/mach-shmobile/setup-r8a73a4.c
@@ -62,7 +62,7 @@ enum { SCIFA0, SCIFA1, SCIFB0, SCIFB1, SCIFB2, SCIFB3 };
62static const struct plat_sci_port scif[] = { 62static const struct plat_sci_port scif[] = {
63 SCIFA_DATA(SCIFA0, 0xe6c40000, gic_spi(144)), /* SCIFA0 */ 63 SCIFA_DATA(SCIFA0, 0xe6c40000, gic_spi(144)), /* SCIFA0 */
64 SCIFA_DATA(SCIFA1, 0xe6c50000, gic_spi(145)), /* SCIFA1 */ 64 SCIFA_DATA(SCIFA1, 0xe6c50000, gic_spi(145)), /* SCIFA1 */
65 SCIFB_DATA(SCIFB0, 0xe6c50000, gic_spi(145)), /* SCIFB0 */ 65 SCIFB_DATA(SCIFB0, 0xe6c20000, gic_spi(148)), /* SCIFB0 */
66 SCIFB_DATA(SCIFB1, 0xe6c30000, gic_spi(149)), /* SCIFB1 */ 66 SCIFB_DATA(SCIFB1, 0xe6c30000, gic_spi(149)), /* SCIFB1 */
67 SCIFB_DATA(SCIFB2, 0xe6ce0000, gic_spi(150)), /* SCIFB2 */ 67 SCIFB_DATA(SCIFB2, 0xe6ce0000, gic_spi(150)), /* SCIFB2 */
68 SCIFB_DATA(SCIFB3, 0xe6cf0000, gic_spi(151)), /* SCIFB3 */ 68 SCIFB_DATA(SCIFB3, 0xe6cf0000, gic_spi(151)), /* SCIFB3 */
diff --git a/arch/arm/mach-shmobile/setup-r8a7740.c b/arch/arm/mach-shmobile/setup-r8a7740.c
index 326a4ab0bd5f..00c5a707238b 100644
--- a/arch/arm/mach-shmobile/setup-r8a7740.c
+++ b/arch/arm/mach-shmobile/setup-r8a7740.c
@@ -70,29 +70,15 @@ void __init r8a7740_map_io(void)
70} 70}
71 71
72/* PFC */ 72/* PFC */
73static struct resource r8a7740_pfc_resources[] = { 73static const struct resource pfc_resources[] = {
74 [0] = { 74 DEFINE_RES_MEM(0xe6050000, 0x8000),
75 .start = 0xe6050000, 75 DEFINE_RES_MEM(0xe605800c, 0x0020),
76 .end = 0xe6057fff,
77 .flags = IORESOURCE_MEM,
78 },
79 [1] = {
80 .start = 0xe605800c,
81 .end = 0xe605802b,
82 .flags = IORESOURCE_MEM,
83 }
84};
85
86static struct platform_device r8a7740_pfc_device = {
87 .name = "pfc-r8a7740",
88 .id = -1,
89 .resource = r8a7740_pfc_resources,
90 .num_resources = ARRAY_SIZE(r8a7740_pfc_resources),
91}; 76};
92 77
93void __init r8a7740_pinmux_init(void) 78void __init r8a7740_pinmux_init(void)
94{ 79{
95 platform_device_register(&r8a7740_pfc_device); 80 platform_device_register_simple("pfc-r8a7740", -1, pfc_resources,
81 ARRAY_SIZE(pfc_resources));
96} 82}
97 83
98static struct renesas_intc_irqpin_config irqpin0_platform_data = { 84static struct renesas_intc_irqpin_config irqpin0_platform_data = {
@@ -531,11 +517,7 @@ static struct platform_device ipmmu_device = {
531 .num_resources = ARRAY_SIZE(ipmmu_resources), 517 .num_resources = ARRAY_SIZE(ipmmu_resources),
532}; 518};
533 519
534static struct platform_device *r8a7740_early_devices[] __initdata = { 520static struct platform_device *r8a7740_devices_dt[] __initdata = {
535 &irqpin0_device,
536 &irqpin1_device,
537 &irqpin2_device,
538 &irqpin3_device,
539 &scif0_device, 521 &scif0_device,
540 &scif1_device, 522 &scif1_device,
541 &scif2_device, 523 &scif2_device,
@@ -546,6 +528,13 @@ static struct platform_device *r8a7740_early_devices[] __initdata = {
546 &scif7_device, 528 &scif7_device,
547 &scifb_device, 529 &scifb_device,
548 &cmt10_device, 530 &cmt10_device,
531};
532
533static struct platform_device *r8a7740_early_devices[] __initdata = {
534 &irqpin0_device,
535 &irqpin1_device,
536 &irqpin2_device,
537 &irqpin3_device,
549 &tmu00_device, 538 &tmu00_device,
550 &tmu01_device, 539 &tmu01_device,
551 &tmu02_device, 540 &tmu02_device,
@@ -965,6 +954,8 @@ void __init r8a7740_add_standard_devices(void)
965 /* add devices */ 954 /* add devices */
966 platform_add_devices(r8a7740_early_devices, 955 platform_add_devices(r8a7740_early_devices,
967 ARRAY_SIZE(r8a7740_early_devices)); 956 ARRAY_SIZE(r8a7740_early_devices));
957 platform_add_devices(r8a7740_devices_dt,
958 ARRAY_SIZE(r8a7740_devices_dt));
968 platform_add_devices(r8a7740_late_devices, 959 platform_add_devices(r8a7740_late_devices,
969 ARRAY_SIZE(r8a7740_late_devices)); 960 ARRAY_SIZE(r8a7740_late_devices));
970 961
@@ -986,6 +977,8 @@ void __init r8a7740_add_early_devices(void)
986{ 977{
987 early_platform_add_devices(r8a7740_early_devices, 978 early_platform_add_devices(r8a7740_early_devices,
988 ARRAY_SIZE(r8a7740_early_devices)); 979 ARRAY_SIZE(r8a7740_early_devices));
980 early_platform_add_devices(r8a7740_devices_dt,
981 ARRAY_SIZE(r8a7740_devices_dt));
989 982
990 /* setup early console here as well */ 983 /* setup early console here as well */
991 shmobile_setup_console(); 984 shmobile_setup_console();
@@ -993,33 +986,29 @@ void __init r8a7740_add_early_devices(void)
993 986
994#ifdef CONFIG_USE_OF 987#ifdef CONFIG_USE_OF
995 988
996void __init r8a7740_add_early_devices_dt(void)
997{
998 shmobile_setup_delay(800, 1, 3); /* Cortex-A9 @ 800MHz */
999
1000 early_platform_add_devices(r8a7740_early_devices,
1001 ARRAY_SIZE(r8a7740_early_devices));
1002
1003 /* setup early console here as well */
1004 shmobile_setup_console();
1005}
1006
1007static const struct of_dev_auxdata r8a7740_auxdata_lookup[] __initconst = { 989static const struct of_dev_auxdata r8a7740_auxdata_lookup[] __initconst = {
1008 { } 990 { }
1009}; 991};
1010 992
1011void __init r8a7740_add_standard_devices_dt(void) 993void __init r8a7740_add_standard_devices_dt(void)
1012{ 994{
1013 /* clocks are setup late during boot in the case of DT */ 995 platform_add_devices(r8a7740_devices_dt,
1014 r8a7740_clock_init(0); 996 ARRAY_SIZE(r8a7740_devices_dt));
1015
1016 platform_add_devices(r8a7740_early_devices,
1017 ARRAY_SIZE(r8a7740_early_devices));
1018
1019 of_platform_populate(NULL, of_default_bus_match_table, 997 of_platform_populate(NULL, of_default_bus_match_table,
1020 r8a7740_auxdata_lookup, NULL); 998 r8a7740_auxdata_lookup, NULL);
1021} 999}
1022 1000
1001void __init r8a7740_init_delay(void)
1002{
1003 shmobile_setup_delay(800, 1, 3); /* Cortex-A9 @ 800MHz */
1004};
1005
1006static void __init r8a7740_generic_init(void)
1007{
1008 r8a7740_clock_init(0);
1009 r8a7740_add_standard_devices_dt();
1010}
1011
1023static const char *r8a7740_boards_compat_dt[] __initdata = { 1012static const char *r8a7740_boards_compat_dt[] __initdata = {
1024 "renesas,r8a7740", 1013 "renesas,r8a7740",
1025 NULL, 1014 NULL,
@@ -1027,9 +1016,10 @@ static const char *r8a7740_boards_compat_dt[] __initdata = {
1027 1016
1028DT_MACHINE_START(R8A7740_DT, "Generic R8A7740 (Flattened Device Tree)") 1017DT_MACHINE_START(R8A7740_DT, "Generic R8A7740 (Flattened Device Tree)")
1029 .map_io = r8a7740_map_io, 1018 .map_io = r8a7740_map_io,
1030 .init_early = r8a7740_add_early_devices_dt, 1019 .init_early = r8a7740_init_delay,
1031 .init_irq = r8a7740_init_irq, 1020 .init_irq = r8a7740_init_irq_of,
1032 .init_machine = r8a7740_add_standard_devices_dt, 1021 .init_machine = r8a7740_generic_init,
1022 .init_time = shmobile_timer_init,
1033 .dt_compat = r8a7740_boards_compat_dt, 1023 .dt_compat = r8a7740_boards_compat_dt,
1034MACHINE_END 1024MACHINE_END
1035 1025
diff --git a/arch/arm/mach-shmobile/setup-r8a7778.c b/arch/arm/mach-shmobile/setup-r8a7778.c
index 30b4a336308f..80c20392ad7c 100644
--- a/arch/arm/mach-shmobile/setup-r8a7778.c
+++ b/arch/arm/mach-shmobile/setup-r8a7778.c
@@ -24,11 +24,18 @@
24#include <linux/irqchip/arm-gic.h> 24#include <linux/irqchip/arm-gic.h>
25#include <linux/of.h> 25#include <linux/of.h>
26#include <linux/of_platform.h> 26#include <linux/of_platform.h>
27#include <linux/platform_data/gpio-rcar.h>
27#include <linux/platform_data/irq-renesas-intc-irqpin.h> 28#include <linux/platform_data/irq-renesas-intc-irqpin.h>
28#include <linux/platform_device.h> 29#include <linux/platform_device.h>
29#include <linux/irqchip.h> 30#include <linux/irqchip.h>
30#include <linux/serial_sci.h> 31#include <linux/serial_sci.h>
31#include <linux/sh_timer.h> 32#include <linux/sh_timer.h>
33#include <linux/pm_runtime.h>
34#include <linux/usb/phy.h>
35#include <linux/usb/hcd.h>
36#include <linux/usb/ehci_pdriver.h>
37#include <linux/usb/ohci_pdriver.h>
38#include <linux/dma-mapping.h>
32#include <mach/irqs.h> 39#include <mach/irqs.h>
33#include <mach/r8a7778.h> 40#include <mach/r8a7778.h>
34#include <mach/common.h> 41#include <mach/common.h>
@@ -80,12 +87,6 @@ static struct sh_timer_config sh_tmu1_platform_data = {
80 .clocksource_rating = 200, 87 .clocksource_rating = 200,
81}; 88};
82 89
83/* Ether */
84static struct resource ether_resources[] = {
85 DEFINE_RES_MEM(0xfde00000, 0x400),
86 DEFINE_RES_IRQ(gic_iid(0x89)),
87};
88
89#define r8a7778_register_tmu(idx) \ 90#define r8a7778_register_tmu(idx) \
90 platform_device_register_resndata( \ 91 platform_device_register_resndata( \
91 &platform_bus, "sh_tmu", idx, \ 92 &platform_bus, "sh_tmu", idx, \
@@ -94,6 +95,244 @@ static struct resource ether_resources[] = {
94 &sh_tmu##idx##_platform_data, \ 95 &sh_tmu##idx##_platform_data, \
95 sizeof(sh_tmu##idx##_platform_data)) 96 sizeof(sh_tmu##idx##_platform_data))
96 97
98/* USB PHY */
99static struct resource usb_phy_resources[] __initdata = {
100 DEFINE_RES_MEM(0xffe70800, 0x100),
101 DEFINE_RES_MEM(0xffe76000, 0x100),
102};
103
104void __init r8a7778_add_usb_phy_device(struct rcar_phy_platform_data *pdata)
105{
106 platform_device_register_resndata(&platform_bus, "rcar_usb_phy", -1,
107 usb_phy_resources,
108 ARRAY_SIZE(usb_phy_resources),
109 pdata, sizeof(*pdata));
110}
111
112/* USB */
113static struct usb_phy *phy;
114
115static int usb_power_on(struct platform_device *pdev)
116{
117 if (IS_ERR(phy))
118 return PTR_ERR(phy);
119
120 pm_runtime_enable(&pdev->dev);
121 pm_runtime_get_sync(&pdev->dev);
122
123 usb_phy_init(phy);
124
125 return 0;
126}
127
128static void usb_power_off(struct platform_device *pdev)
129{
130 if (IS_ERR(phy))
131 return;
132
133 usb_phy_shutdown(phy);
134
135 pm_runtime_put_sync(&pdev->dev);
136 pm_runtime_disable(&pdev->dev);
137}
138
139static int ehci_init_internal_buffer(struct usb_hcd *hcd)
140{
141 /*
142 * Below are recommended values from the datasheet;
143 * see [USB :: Setting of EHCI Internal Buffer].
144 */
145 /* EHCI IP internal buffer setting */
146 iowrite32(0x00ff0040, hcd->regs + 0x0094);
147 /* EHCI IP internal buffer enable */
148 iowrite32(0x00000001, hcd->regs + 0x009C);
149
150 return 0;
151}
152
153static struct usb_ehci_pdata ehci_pdata __initdata = {
154 .power_on = usb_power_on,
155 .power_off = usb_power_off,
156 .power_suspend = usb_power_off,
157 .pre_setup = ehci_init_internal_buffer,
158};
159
160static struct resource ehci_resources[] __initdata = {
161 DEFINE_RES_MEM(0xffe70000, 0x400),
162 DEFINE_RES_IRQ(gic_iid(0x4c)),
163};
164
165static struct usb_ohci_pdata ohci_pdata __initdata = {
166 .power_on = usb_power_on,
167 .power_off = usb_power_off,
168 .power_suspend = usb_power_off,
169};
170
171static struct resource ohci_resources[] __initdata = {
172 DEFINE_RES_MEM(0xffe70400, 0x400),
173 DEFINE_RES_IRQ(gic_iid(0x4c)),
174};
175
176#define USB_PLATFORM_INFO(hci) \
177static struct platform_device_info hci##_info __initdata = { \
178 .parent = &platform_bus, \
179 .name = #hci "-platform", \
180 .id = -1, \
181 .res = hci##_resources, \
182 .num_res = ARRAY_SIZE(hci##_resources), \
183 .data = &hci##_pdata, \
184 .size_data = sizeof(hci##_pdata), \
185 .dma_mask = DMA_BIT_MASK(32), \
186}
187
188USB_PLATFORM_INFO(ehci);
189USB_PLATFORM_INFO(ohci);
190
191/* Ether */
192static struct resource ether_resources[] = {
193 DEFINE_RES_MEM(0xfde00000, 0x400),
194 DEFINE_RES_IRQ(gic_iid(0x89)),
195};
196
197void __init r8a7778_add_ether_device(struct sh_eth_plat_data *pdata)
198{
199 platform_device_register_resndata(&platform_bus, "r8a777x-ether", -1,
200 ether_resources,
201 ARRAY_SIZE(ether_resources),
202 pdata, sizeof(*pdata));
203}
204
205/* PFC/GPIO */
206static struct resource pfc_resources[] = {
207 DEFINE_RES_MEM(0xfffc0000, 0x118),
208};
209
210#define R8A7778_GPIO(idx) \
211static struct resource r8a7778_gpio##idx##_resources[] = { \
212 DEFINE_RES_MEM(0xffc40000 + 0x1000 * (idx), 0x30), \
213 DEFINE_RES_IRQ(gic_iid(0x87)), \
214}; \
215 \
216static struct gpio_rcar_config r8a7778_gpio##idx##_platform_data = { \
217 .gpio_base = 32 * (idx), \
218 .irq_base = GPIO_IRQ_BASE(idx), \
219 .number_of_pins = 32, \
220 .pctl_name = "pfc-r8a7778", \
221}
222
223R8A7778_GPIO(0);
224R8A7778_GPIO(1);
225R8A7778_GPIO(2);
226R8A7778_GPIO(3);
227R8A7778_GPIO(4);
228
229#define r8a7778_register_gpio(idx) \
230 platform_device_register_resndata( \
231 &platform_bus, "gpio_rcar", idx, \
232 r8a7778_gpio##idx##_resources, \
233 ARRAY_SIZE(r8a7778_gpio##idx##_resources), \
234 &r8a7778_gpio##idx##_platform_data, \
235 sizeof(r8a7778_gpio##idx##_platform_data))
236
237void __init r8a7778_pinmux_init(void)
238{
239 platform_device_register_simple(
240 "pfc-r8a7778", -1,
241 pfc_resources,
242 ARRAY_SIZE(pfc_resources));
243
244 r8a7778_register_gpio(0);
245 r8a7778_register_gpio(1);
246 r8a7778_register_gpio(2);
247 r8a7778_register_gpio(3);
248 r8a7778_register_gpio(4);
249};
250
251/* SDHI */
252static struct resource sdhi_resources[] = {
253 /* SDHI0 */
254 DEFINE_RES_MEM(0xFFE4C000, 0x100),
255 DEFINE_RES_IRQ(gic_iid(0x77)),
256 /* SDHI1 */
257 DEFINE_RES_MEM(0xFFE4D000, 0x100),
258 DEFINE_RES_IRQ(gic_iid(0x78)),
259 /* SDHI2 */
260 DEFINE_RES_MEM(0xFFE4F000, 0x100),
261 DEFINE_RES_IRQ(gic_iid(0x76)),
262};
263
264void __init r8a7778_sdhi_init(int id,
265 struct sh_mobile_sdhi_info *info)
266{
267 BUG_ON(id < 0 || id > 2);
268
269 platform_device_register_resndata(
270 &platform_bus, "sh_mobile_sdhi", id,
271 sdhi_resources + (2 * id), 2,
272 info, sizeof(*info));
273}
274
275/* I2C */
276static struct resource i2c_resources[] __initdata = {
277 /* I2C0 */
278 DEFINE_RES_MEM(0xffc70000, 0x1000),
279 DEFINE_RES_IRQ(gic_iid(0x63)),
280 /* I2C1 */
281 DEFINE_RES_MEM(0xffc71000, 0x1000),
282 DEFINE_RES_IRQ(gic_iid(0x6e)),
283 /* I2C2 */
284 DEFINE_RES_MEM(0xffc72000, 0x1000),
285 DEFINE_RES_IRQ(gic_iid(0x6c)),
286 /* I2C3 */
287 DEFINE_RES_MEM(0xffc73000, 0x1000),
288 DEFINE_RES_IRQ(gic_iid(0x6d)),
289};
290
291void __init r8a7778_add_i2c_device(int id)
292{
293 BUG_ON(id < 0 || id > 3);
294
295 platform_device_register_simple(
296 "i2c-rcar", id,
297 i2c_resources + (2 * id), 2);
298}
299
300/* HSPI */
301static struct resource hspi_resources[] __initdata = {
302 /* HSPI0 */
303 DEFINE_RES_MEM(0xfffc7000, 0x18),
304 DEFINE_RES_IRQ(gic_iid(0x5f)),
305 /* HSPI1 */
306 DEFINE_RES_MEM(0xfffc8000, 0x18),
307 DEFINE_RES_IRQ(gic_iid(0x74)),
308 /* HSPI2 */
309 DEFINE_RES_MEM(0xfffc6000, 0x18),
310 DEFINE_RES_IRQ(gic_iid(0x75)),
311};
312
313void __init r8a7778_add_hspi_device(int id)
314{
315 BUG_ON(id < 0 || id > 2);
316
317 platform_device_register_simple(
318 "sh-hspi", id,
319 hspi_resources + (2 * id), 2);
320}
321
322/* MMC */
323static struct resource mmc_resources[] __initdata = {
324 DEFINE_RES_MEM(0xffe4e000, 0x100),
325 DEFINE_RES_IRQ(gic_iid(0x5d)),
326};
327
328void __init r8a7778_add_mmc_device(struct sh_mmcif_plat_data *info)
329{
330 platform_device_register_resndata(
331 &platform_bus, "sh_mmcif", -1,
332 mmc_resources, ARRAY_SIZE(mmc_resources),
333 info, sizeof(*info));
334}
335
97void __init r8a7778_add_standard_devices(void) 336void __init r8a7778_add_standard_devices(void)
98{ 337{
99 int i; 338 int i;
@@ -118,12 +357,12 @@ void __init r8a7778_add_standard_devices(void)
118 r8a7778_register_tmu(1); 357 r8a7778_register_tmu(1);
119} 358}
120 359
121void __init r8a7778_add_ether_device(struct sh_eth_plat_data *pdata) 360void __init r8a7778_init_late(void)
122{ 361{
123 platform_device_register_resndata(&platform_bus, "sh_eth", -1, 362 phy = usb_get_phy(USB_PHY_TYPE_USB2);
124 ether_resources, 363
125 ARRAY_SIZE(ether_resources), 364 platform_device_register_full(&ehci_info);
126 pdata, sizeof(*pdata)); 365 platform_device_register_full(&ohci_info);
127} 366}
128 367
129static struct renesas_intc_irqpin_config irqpin_platform_data = { 368static struct renesas_intc_irqpin_config irqpin_platform_data = {
@@ -239,6 +478,7 @@ DT_MACHINE_START(R8A7778_DT, "Generic R8A7778 (Flattened Device Tree)")
239 .init_machine = r8a7778_add_standard_devices_dt, 478 .init_machine = r8a7778_add_standard_devices_dt,
240 .init_time = shmobile_timer_init, 479 .init_time = shmobile_timer_init,
241 .dt_compat = r8a7778_compat_dt, 480 .dt_compat = r8a7778_compat_dt,
481 .init_late = r8a7778_init_late,
242MACHINE_END 482MACHINE_END
243 483
244#endif /* CONFIG_USE_OF */ 484#endif /* CONFIG_USE_OF */
diff --git a/arch/arm/mach-shmobile/setup-r8a7779.c b/arch/arm/mach-shmobile/setup-r8a7779.c
index b0b394842ea5..398687761f50 100644
--- a/arch/arm/mach-shmobile/setup-r8a7779.c
+++ b/arch/arm/mach-shmobile/setup-r8a7779.c
@@ -32,6 +32,11 @@
32#include <linux/sh_intc.h> 32#include <linux/sh_intc.h>
33#include <linux/sh_timer.h> 33#include <linux/sh_timer.h>
34#include <linux/dma-mapping.h> 34#include <linux/dma-mapping.h>
35#include <linux/usb/otg.h>
36#include <linux/usb/hcd.h>
37#include <linux/usb/ehci_pdriver.h>
38#include <linux/usb/ohci_pdriver.h>
39#include <linux/pm_runtime.h>
35#include <mach/hardware.h> 40#include <mach/hardware.h>
36#include <mach/irqs.h> 41#include <mach/irqs.h>
37#include <mach/r8a7779.h> 42#include <mach/r8a7779.h>
@@ -65,11 +70,7 @@ void __init r8a7779_map_io(void)
65} 70}
66 71
67static struct resource r8a7779_pfc_resources[] = { 72static struct resource r8a7779_pfc_resources[] = {
68 [0] = { 73 DEFINE_RES_MEM(0xfffc0000, 0x023c),
69 .start = 0xfffc0000,
70 .end = 0xfffc023b,
71 .flags = IORESOURCE_MEM,
72 },
73}; 74};
74 75
75static struct platform_device r8a7779_pfc_device = { 76static struct platform_device r8a7779_pfc_device = {
@@ -81,15 +82,8 @@ static struct platform_device r8a7779_pfc_device = {
81 82
82#define R8A7779_GPIO(idx, npins) \ 83#define R8A7779_GPIO(idx, npins) \
83static struct resource r8a7779_gpio##idx##_resources[] = { \ 84static struct resource r8a7779_gpio##idx##_resources[] = { \
84 [0] = { \ 85 DEFINE_RES_MEM(0xffc40000 + (0x1000 * (idx)), 0x002c), \
85 .start = 0xffc40000 + 0x1000 * (idx), \ 86 DEFINE_RES_IRQ(gic_iid(0xad + (idx))), \
86 .end = 0xffc4002b + 0x1000 * (idx), \
87 .flags = IORESOURCE_MEM, \
88 }, \
89 [1] = { \
90 .start = gic_iid(0xad + (idx)), \
91 .flags = IORESOURCE_IRQ, \
92 } \
93}; \ 87}; \
94 \ 88 \
95static struct gpio_rcar_config r8a7779_gpio##idx##_platform_data = { \ 89static struct gpio_rcar_config r8a7779_gpio##idx##_platform_data = { \
@@ -394,6 +388,165 @@ static struct platform_device sata_device = {
394 }, 388 },
395}; 389};
396 390
391/* USB PHY */
392static struct resource usb_phy_resources[] __initdata = {
393 [0] = {
394 .start = 0xffe70800,
395 .end = 0xffe70900 - 1,
396 .flags = IORESOURCE_MEM,
397 },
398};
399
400/* USB */
401static struct usb_phy *phy;
402
403static int usb_power_on(struct platform_device *pdev)
404{
405 if (IS_ERR(phy))
406 return PTR_ERR(phy);
407
408 pm_runtime_enable(&pdev->dev);
409 pm_runtime_get_sync(&pdev->dev);
410
411 usb_phy_init(phy);
412
413 return 0;
414}
415
416static void usb_power_off(struct platform_device *pdev)
417{
418 if (IS_ERR(phy))
419 return;
420
421 usb_phy_shutdown(phy);
422
423 pm_runtime_put_sync(&pdev->dev);
424 pm_runtime_disable(&pdev->dev);
425}
426
427static int ehci_init_internal_buffer(struct usb_hcd *hcd)
428{
429 /*
430 * Below are recommended values from the datasheet;
431 * see [USB :: Setting of EHCI Internal Buffer].
432 */
433 /* EHCI IP internal buffer setting */
434 iowrite32(0x00ff0040, hcd->regs + 0x0094);
435 /* EHCI IP internal buffer enable */
436 iowrite32(0x00000001, hcd->regs + 0x009C);
437
438 return 0;
439}
440
441static struct usb_ehci_pdata ehcix_pdata = {
442 .power_on = usb_power_on,
443 .power_off = usb_power_off,
444 .power_suspend = usb_power_off,
445 .pre_setup = ehci_init_internal_buffer,
446};
447
448static struct resource ehci0_resources[] = {
449 [0] = {
450 .start = 0xffe70000,
451 .end = 0xffe70400 - 1,
452 .flags = IORESOURCE_MEM,
453 },
454 [1] = {
455 .start = gic_iid(0x4c),
456 .flags = IORESOURCE_IRQ,
457 },
458};
459
460static struct platform_device ehci0_device = {
461 .name = "ehci-platform",
462 .id = 0,
463 .dev = {
464 .dma_mask = &ehci0_device.dev.coherent_dma_mask,
465 .coherent_dma_mask = 0xffffffff,
466 .platform_data = &ehcix_pdata,
467 },
468 .num_resources = ARRAY_SIZE(ehci0_resources),
469 .resource = ehci0_resources,
470};
471
472static struct resource ehci1_resources[] = {
473 [0] = {
474 .start = 0xfff70000,
475 .end = 0xfff70400 - 1,
476 .flags = IORESOURCE_MEM,
477 },
478 [1] = {
479 .start = gic_iid(0x4d),
480 .flags = IORESOURCE_IRQ,
481 },
482};
483
484static struct platform_device ehci1_device = {
485 .name = "ehci-platform",
486 .id = 1,
487 .dev = {
488 .dma_mask = &ehci1_device.dev.coherent_dma_mask,
489 .coherent_dma_mask = 0xffffffff,
490 .platform_data = &ehcix_pdata,
491 },
492 .num_resources = ARRAY_SIZE(ehci1_resources),
493 .resource = ehci1_resources,
494};
495
496static struct usb_ohci_pdata ohcix_pdata = {
497 .power_on = usb_power_on,
498 .power_off = usb_power_off,
499 .power_suspend = usb_power_off,
500};
501
502static struct resource ohci0_resources[] = {
503 [0] = {
504 .start = 0xffe70400,
505 .end = 0xffe70800 - 1,
506 .flags = IORESOURCE_MEM,
507 },
508 [1] = {
509 .start = gic_iid(0x4c),
510 .flags = IORESOURCE_IRQ,
511 },
512};
513
514static struct platform_device ohci0_device = {
515 .name = "ohci-platform",
516 .id = 0,
517 .dev = {
518 .dma_mask = &ohci0_device.dev.coherent_dma_mask,
519 .coherent_dma_mask = 0xffffffff,
520 .platform_data = &ohcix_pdata,
521 },
522 .num_resources = ARRAY_SIZE(ohci0_resources),
523 .resource = ohci0_resources,
524};
525
526static struct resource ohci1_resources[] = {
527 [0] = {
528 .start = 0xfff70400,
529 .end = 0xfff70800 - 1,
530 .flags = IORESOURCE_MEM,
531 },
532 [1] = {
533 .start = gic_iid(0x4d),
534 .flags = IORESOURCE_IRQ,
535 },
536};
537
538static struct platform_device ohci1_device = {
539 .name = "ohci-platform",
540 .id = 1,
541 .dev = {
542 .dma_mask = &ohci1_device.dev.coherent_dma_mask,
543 .coherent_dma_mask = 0xffffffff,
544 .platform_data = &ohcix_pdata,
545 },
546 .num_resources = ARRAY_SIZE(ohci1_resources),
547 .resource = ohci1_resources,
548};
549
397/* Ether */ 550/* Ether */
398static struct resource ether_resources[] = { 551static struct resource ether_resources[] = {
399 { 552 {
@@ -417,7 +570,7 @@ static struct platform_device *r8a7779_devices_dt[] __initdata = {
417 &tmu01_device, 570 &tmu01_device,
418}; 571};
419 572
420static struct platform_device *r8a7779_late_devices[] __initdata = { 573static struct platform_device *r8a7779_standard_devices[] __initdata = {
421 &i2c0_device, 574 &i2c0_device,
422 &i2c1_device, 575 &i2c1_device,
423 &i2c2_device, 576 &i2c2_device,
@@ -437,18 +590,26 @@ void __init r8a7779_add_standard_devices(void)
437 590
438 platform_add_devices(r8a7779_devices_dt, 591 platform_add_devices(r8a7779_devices_dt,
439 ARRAY_SIZE(r8a7779_devices_dt)); 592 ARRAY_SIZE(r8a7779_devices_dt));
440 platform_add_devices(r8a7779_late_devices, 593 platform_add_devices(r8a7779_standard_devices,
441 ARRAY_SIZE(r8a7779_late_devices)); 594 ARRAY_SIZE(r8a7779_standard_devices));
442} 595}
443 596
444void __init r8a7779_add_ether_device(struct sh_eth_plat_data *pdata) 597void __init r8a7779_add_ether_device(struct sh_eth_plat_data *pdata)
445{ 598{
446 platform_device_register_resndata(&platform_bus, "sh_eth", -1, 599 platform_device_register_resndata(&platform_bus, "r8a777x-ether", -1,
447 ether_resources, 600 ether_resources,
448 ARRAY_SIZE(ether_resources), 601 ARRAY_SIZE(ether_resources),
449 pdata, sizeof(*pdata)); 602 pdata, sizeof(*pdata));
450} 603}
451 604
605void __init r8a7779_add_usb_phy_device(struct rcar_phy_platform_data *pdata)
606{
607 platform_device_register_resndata(&platform_bus, "rcar_usb_phy", -1,
608 usb_phy_resources,
609 ARRAY_SIZE(usb_phy_resources),
610 pdata, sizeof(*pdata));
611}
612
452/* do nothing for !CONFIG_SMP or !CONFIG_HAVE_TWD */ 613/* do nothing for !CONFIG_SMP or !CONFIG_HAVE_TWD */
453void __init __weak r8a7779_register_twd(void) { } 614void __init __weak r8a7779_register_twd(void) { }
454 615
@@ -481,6 +642,23 @@ void __init r8a7779_add_early_devices(void)
481 */ 642 */
482} 643}
483 644
645static struct platform_device *r8a7779_late_devices[] __initdata = {
646 &ehci0_device,
647 &ehci1_device,
648 &ohci0_device,
649 &ohci1_device,
650};
651
652void __init r8a7779_init_late(void)
653{
654 /* get USB PHY */
655 phy = usb_get_phy(USB_PHY_TYPE_USB2);
656
657 shmobile_init_late();
658 platform_add_devices(r8a7779_late_devices,
659 ARRAY_SIZE(r8a7779_late_devices));
660}
661
484#ifdef CONFIG_USE_OF 662#ifdef CONFIG_USE_OF
485void __init r8a7779_init_delay(void) 663void __init r8a7779_init_delay(void)
486{ 664{
@@ -514,6 +692,7 @@ DT_MACHINE_START(R8A7779_DT, "Generic R8A7779 (Flattened Device Tree)")
514 .init_irq = r8a7779_init_irq_dt, 692 .init_irq = r8a7779_init_irq_dt,
515 .init_machine = r8a7779_add_standard_devices_dt, 693 .init_machine = r8a7779_add_standard_devices_dt,
516 .init_time = shmobile_timer_init, 694 .init_time = shmobile_timer_init,
695 .init_late = r8a7779_init_late,
517 .dt_compat = r8a7779_compat_dt, 696 .dt_compat = r8a7779_compat_dt,
518MACHINE_END 697MACHINE_END
519#endif /* CONFIG_USE_OF */ 698#endif /* CONFIG_USE_OF */
diff --git a/arch/arm/mach-shmobile/setup-r8a7790.c b/arch/arm/mach-shmobile/setup-r8a7790.c
index 49de2d56f86d..28f94752b8ff 100644
--- a/arch/arm/mach-shmobile/setup-r8a7790.c
+++ b/arch/arm/mach-shmobile/setup-r8a7790.c
@@ -23,21 +23,55 @@
23#include <linux/kernel.h> 23#include <linux/kernel.h>
24#include <linux/of_platform.h> 24#include <linux/of_platform.h>
25#include <linux/serial_sci.h> 25#include <linux/serial_sci.h>
26#include <linux/platform_data/gpio-rcar.h>
26#include <linux/platform_data/irq-renesas-irqc.h> 27#include <linux/platform_data/irq-renesas-irqc.h>
27#include <mach/common.h> 28#include <mach/common.h>
28#include <mach/irqs.h> 29#include <mach/irqs.h>
29#include <mach/r8a7790.h> 30#include <mach/r8a7790.h>
30#include <asm/mach/arch.h> 31#include <asm/mach/arch.h>
31 32
32static const struct resource pfc_resources[] = { 33static struct resource pfc_resources[] __initdata = {
33 DEFINE_RES_MEM(0xe6060000, 0x250), 34 DEFINE_RES_MEM(0xe6060000, 0x250),
34 DEFINE_RES_MEM(0xe6050000, 0x5050),
35}; 35};
36 36
37#define R8A7790_GPIO(idx) \
38static struct resource r8a7790_gpio##idx##_resources[] __initdata = { \
39 DEFINE_RES_MEM(0xe6050000 + 0x1000 * (idx), 0x50), \
40 DEFINE_RES_IRQ(gic_spi(4 + (idx))), \
41}; \
42 \
43static struct gpio_rcar_config r8a7790_gpio##idx##_platform_data __initdata = { \
44 .gpio_base = 32 * (idx), \
45 .irq_base = 0, \
46 .number_of_pins = 32, \
47 .pctl_name = "pfc-r8a7790", \
48 .has_both_edge_trigger = 1, \
49}; \
50
51R8A7790_GPIO(0);
52R8A7790_GPIO(1);
53R8A7790_GPIO(2);
54R8A7790_GPIO(3);
55R8A7790_GPIO(4);
56R8A7790_GPIO(5);
57
58#define r8a7790_register_gpio(idx) \
59 platform_device_register_resndata(&platform_bus, "gpio_rcar", idx, \
60 r8a7790_gpio##idx##_resources, \
61 ARRAY_SIZE(r8a7790_gpio##idx##_resources), \
62 &r8a7790_gpio##idx##_platform_data, \
63 sizeof(r8a7790_gpio##idx##_platform_data))
64
37void __init r8a7790_pinmux_init(void) 65void __init r8a7790_pinmux_init(void)
38{ 66{
39 platform_device_register_simple("pfc-r8a7790", -1, pfc_resources, 67 platform_device_register_simple("pfc-r8a7790", -1, pfc_resources,
40 ARRAY_SIZE(pfc_resources)); 68 ARRAY_SIZE(pfc_resources));
69 r8a7790_register_gpio(0);
70 r8a7790_register_gpio(1);
71 r8a7790_register_gpio(2);
72 r8a7790_register_gpio(3);
73 r8a7790_register_gpio(4);
74 r8a7790_register_gpio(5);
41} 75}
42 76
43#define SCIF_COMMON(scif_type, baseaddr, irq) \ 77#define SCIF_COMMON(scif_type, baseaddr, irq) \
@@ -64,12 +98,20 @@ void __init r8a7790_pinmux_init(void)
64[index] = { \ 98[index] = { \
65 SCIF_COMMON(PORT_SCIF, baseaddr, irq), \ 99 SCIF_COMMON(PORT_SCIF, baseaddr, irq), \
66 .scbrr_algo_id = SCBRR_ALGO_2, \ 100 .scbrr_algo_id = SCBRR_ALGO_2, \
67 .scscr = SCSCR_RE | SCSCR_TE | SCSCR_CKE1, \ 101 .scscr = SCSCR_RE | SCSCR_TE, \
102}
103
104#define HSCIF_DATA(index, baseaddr, irq) \
105[index] = { \
106 SCIF_COMMON(PORT_HSCIF, baseaddr, irq), \
107 .scbrr_algo_id = SCBRR_ALGO_6, \
108 .scscr = SCSCR_RE | SCSCR_TE, \
68} 109}
69 110
70enum { SCIFA0, SCIFA1, SCIFB0, SCIFB1, SCIFB2, SCIFA2, SCIF0, SCIF1 }; 111enum { SCIFA0, SCIFA1, SCIFB0, SCIFB1, SCIFB2, SCIFA2, SCIF0, SCIF1,
112 HSCIF0, HSCIF1 };
71 113
72static const struct plat_sci_port scif[] = { 114static struct plat_sci_port scif[] __initdata = {
73 SCIFA_DATA(SCIFA0, 0xe6c40000, gic_spi(144)), /* SCIFA0 */ 115 SCIFA_DATA(SCIFA0, 0xe6c40000, gic_spi(144)), /* SCIFA0 */
74 SCIFA_DATA(SCIFA1, 0xe6c50000, gic_spi(145)), /* SCIFA1 */ 116 SCIFA_DATA(SCIFA1, 0xe6c50000, gic_spi(145)), /* SCIFA1 */
75 SCIFB_DATA(SCIFB0, 0xe6c20000, gic_spi(148)), /* SCIFB0 */ 117 SCIFB_DATA(SCIFB0, 0xe6c20000, gic_spi(148)), /* SCIFB0 */
@@ -78,6 +120,8 @@ static const struct plat_sci_port scif[] = {
78 SCIFA_DATA(SCIFA2, 0xe6c60000, gic_spi(151)), /* SCIFA2 */ 120 SCIFA_DATA(SCIFA2, 0xe6c60000, gic_spi(151)), /* SCIFA2 */
79 SCIF_DATA(SCIF0, 0xe6e60000, gic_spi(152)), /* SCIF0 */ 121 SCIF_DATA(SCIF0, 0xe6e60000, gic_spi(152)), /* SCIF0 */
80 SCIF_DATA(SCIF1, 0xe6e68000, gic_spi(153)), /* SCIF1 */ 122 SCIF_DATA(SCIF1, 0xe6e68000, gic_spi(153)), /* SCIF1 */
123 HSCIF_DATA(HSCIF0, 0xe62c0000, gic_spi(154)), /* HSCIF0 */
124 HSCIF_DATA(HSCIF1, 0xe62c8000, gic_spi(155)), /* HSCIF1 */
81}; 125};
82 126
83static inline void r8a7790_register_scif(int idx) 127static inline void r8a7790_register_scif(int idx)
@@ -86,11 +130,11 @@ static inline void r8a7790_register_scif(int idx)
86 sizeof(struct plat_sci_port)); 130 sizeof(struct plat_sci_port));
87} 131}
88 132
89static struct renesas_irqc_config irqc0_data = { 133static struct renesas_irqc_config irqc0_data __initdata = {
90 .irq_base = irq_pin(0), /* IRQ0 -> IRQ3 */ 134 .irq_base = irq_pin(0), /* IRQ0 -> IRQ3 */
91}; 135};
92 136
93static struct resource irqc0_resources[] = { 137static struct resource irqc0_resources[] __initdata = {
94 DEFINE_RES_MEM(0xe61c0000, 0x200), /* IRQC Event Detector Block_0 */ 138 DEFINE_RES_MEM(0xe61c0000, 0x200), /* IRQC Event Detector Block_0 */
95 DEFINE_RES_IRQ(gic_spi(0)), /* IRQ0 */ 139 DEFINE_RES_IRQ(gic_spi(0)), /* IRQ0 */
96 DEFINE_RES_IRQ(gic_spi(1)), /* IRQ1 */ 140 DEFINE_RES_IRQ(gic_spi(1)), /* IRQ1 */
@@ -115,6 +159,8 @@ void __init r8a7790_add_standard_devices(void)
115 r8a7790_register_scif(SCIFA2); 159 r8a7790_register_scif(SCIFA2);
116 r8a7790_register_scif(SCIF0); 160 r8a7790_register_scif(SCIF0);
117 r8a7790_register_scif(SCIF1); 161 r8a7790_register_scif(SCIF1);
162 r8a7790_register_scif(HSCIF0);
163 r8a7790_register_scif(HSCIF1);
118 r8a7790_register_irqc(0); 164 r8a7790_register_irqc(0);
119} 165}
120 166
diff --git a/arch/arm/mach-shmobile/setup-sh73a0.c b/arch/arm/mach-shmobile/setup-sh73a0.c
index 9696f3646864..96e7ca1e4e11 100644
--- a/arch/arm/mach-shmobile/setup-sh73a0.c
+++ b/arch/arm/mach-shmobile/setup-sh73a0.c
@@ -288,12 +288,7 @@ static struct sh_timer_config tmu00_platform_data = {
288}; 288};
289 289
290static struct resource tmu00_resources[] = { 290static struct resource tmu00_resources[] = {
291 [0] = { 291 [0] = DEFINE_RES_MEM_NAMED(0xfff60008, 0xc, "TMU00"),
292 .name = "TMU00",
293 .start = 0xfff60008,
294 .end = 0xfff60013,
295 .flags = IORESOURCE_MEM,
296 },
297 [1] = { 292 [1] = {
298 .start = intcs_evt2irq(0x0e80), /* TMU0_TUNI00 */ 293 .start = intcs_evt2irq(0x0e80), /* TMU0_TUNI00 */
299 .flags = IORESOURCE_IRQ, 294 .flags = IORESOURCE_IRQ,
@@ -318,12 +313,7 @@ static struct sh_timer_config tmu01_platform_data = {
318}; 313};
319 314
320static struct resource tmu01_resources[] = { 315static struct resource tmu01_resources[] = {
321 [0] = { 316 [0] = DEFINE_RES_MEM_NAMED(0xfff60014, 0xc, "TMU00"),
322 .name = "TMU01",
323 .start = 0xfff60014,
324 .end = 0xfff6001f,
325 .flags = IORESOURCE_MEM,
326 },
327 [1] = { 317 [1] = {
328 .start = intcs_evt2irq(0x0ea0), /* TMU0_TUNI01 */ 318 .start = intcs_evt2irq(0x0ea0), /* TMU0_TUNI01 */
329 .flags = IORESOURCE_IRQ, 319 .flags = IORESOURCE_IRQ,
@@ -341,12 +331,7 @@ static struct platform_device tmu01_device = {
341}; 331};
342 332
343static struct resource i2c0_resources[] = { 333static struct resource i2c0_resources[] = {
344 [0] = { 334 [0] = DEFINE_RES_MEM_NAMED(0xe6820000, 0x426, "IIC0"),
345 .name = "IIC0",
346 .start = 0xe6820000,
347 .end = 0xe6820425 - 1,
348 .flags = IORESOURCE_MEM,
349 },
350 [1] = { 335 [1] = {
351 .start = gic_spi(167), 336 .start = gic_spi(167),
352 .end = gic_spi(170), 337 .end = gic_spi(170),
@@ -355,12 +340,7 @@ static struct resource i2c0_resources[] = {
355}; 340};
356 341
357static struct resource i2c1_resources[] = { 342static struct resource i2c1_resources[] = {
358 [0] = { 343 [0] = DEFINE_RES_MEM_NAMED(0xe6822000, 0x426, "IIC1"),
359 .name = "IIC1",
360 .start = 0xe6822000,
361 .end = 0xe6822425 - 1,
362 .flags = IORESOURCE_MEM,
363 },
364 [1] = { 344 [1] = {
365 .start = gic_spi(51), 345 .start = gic_spi(51),
366 .end = gic_spi(54), 346 .end = gic_spi(54),
@@ -369,12 +349,7 @@ static struct resource i2c1_resources[] = {
369}; 349};
370 350
371static struct resource i2c2_resources[] = { 351static struct resource i2c2_resources[] = {
372 [0] = { 352 [0] = DEFINE_RES_MEM_NAMED(0xe6824000, 0x426, "IIC2"),
373 .name = "IIC2",
374 .start = 0xe6824000,
375 .end = 0xe6824425 - 1,
376 .flags = IORESOURCE_MEM,
377 },
378 [1] = { 353 [1] = {
379 .start = gic_spi(171), 354 .start = gic_spi(171),
380 .end = gic_spi(174), 355 .end = gic_spi(174),
@@ -383,12 +358,7 @@ static struct resource i2c2_resources[] = {
383}; 358};
384 359
385static struct resource i2c3_resources[] = { 360static struct resource i2c3_resources[] = {
386 [0] = { 361 [0] = DEFINE_RES_MEM_NAMED(0xe6826000, 0x426, "IIC3"),
387 .name = "IIC3",
388 .start = 0xe6826000,
389 .end = 0xe6826425 - 1,
390 .flags = IORESOURCE_MEM,
391 },
392 [1] = { 362 [1] = {
393 .start = gic_spi(183), 363 .start = gic_spi(183),
394 .end = gic_spi(186), 364 .end = gic_spi(186),
@@ -397,12 +367,7 @@ static struct resource i2c3_resources[] = {
397}; 367};
398 368
399static struct resource i2c4_resources[] = { 369static struct resource i2c4_resources[] = {
400 [0] = { 370 [0] = DEFINE_RES_MEM_NAMED(0xe6828000, 0x426, "IIC4"),
401 .name = "IIC4",
402 .start = 0xe6828000,
403 .end = 0xe6828425 - 1,
404 .flags = IORESOURCE_MEM,
405 },
406 [1] = { 371 [1] = {
407 .start = gic_spi(187), 372 .start = gic_spi(187),
408 .end = gic_spi(190), 373 .end = gic_spi(190),
@@ -623,12 +588,7 @@ static struct sh_dmae_pdata sh73a0_dmae_platform_data = {
623}; 588};
624 589
625static struct resource sh73a0_dmae_resources[] = { 590static struct resource sh73a0_dmae_resources[] = {
626 { 591 DEFINE_RES_MEM(0xfe000020, 0x89e0),
627 /* Registers including DMAOR and channels including DMARSx */
628 .start = 0xfe000020,
629 .end = 0xfe008a00 - 1,
630 .flags = IORESOURCE_MEM,
631 },
632 { 592 {
633 .name = "error_irq", 593 .name = "error_irq",
634 .start = gic_spi(129), 594 .start = gic_spi(129),
@@ -727,18 +687,10 @@ static struct sh_dmae_pdata sh73a0_mpdma_platform_data = {
727 687
728/* Resource order important! */ 688/* Resource order important! */
729static struct resource sh73a0_mpdma_resources[] = { 689static struct resource sh73a0_mpdma_resources[] = {
730 { 690 /* Channel registers and DMAOR */
731 /* Channel registers and DMAOR */ 691 DEFINE_RES_MEM(0xec618020, 0x270),
732 .start = 0xec618020, 692 /* DMARSx */
733 .end = 0xec61828f, 693 DEFINE_RES_MEM(0xec619000, 0xc),
734 .flags = IORESOURCE_MEM,
735 },
736 {
737 /* DMARSx */
738 .start = 0xec619000,
739 .end = 0xec61900b,
740 .flags = IORESOURCE_MEM,
741 },
742 { 694 {
743 .name = "error_irq", 695 .name = "error_irq",
744 .start = gic_spi(181), 696 .start = gic_spi(181),
@@ -785,12 +737,7 @@ static struct platform_device pmu_device = {
785 737
786/* an IPMMU module for ICB */ 738/* an IPMMU module for ICB */
787static struct resource ipmmu_resources[] = { 739static struct resource ipmmu_resources[] = {
788 [0] = { 740 DEFINE_RES_MEM_NAMED(0xfe951000, 0x100, "IPMMU"),
789 .name = "IPMMU",
790 .start = 0xfe951000,
791 .end = 0xfe9510ff,
792 .flags = IORESOURCE_MEM,
793 },
794}; 741};
795 742
796static const char * const ipmmu_dev_names[] = { 743static const char * const ipmmu_dev_names[] = {
@@ -982,11 +929,17 @@ void __init sh73a0_add_standard_devices(void)
982 ARRAY_SIZE(sh73a0_late_devices)); 929 ARRAY_SIZE(sh73a0_late_devices));
983} 930}
984 931
932void __init sh73a0_init_delay(void)
933{
934 shmobile_setup_delay(1196, 44, 46); /* Cortex-A9 @ 1196MHz */
935}
936
985/* do nothing for !CONFIG_SMP or !CONFIG_HAVE_TWD */ 937/* do nothing for !CONFIG_SMP or !CONFIG_HAVE_TWD */
986void __init __weak sh73a0_register_twd(void) { } 938void __init __weak sh73a0_register_twd(void) { }
987 939
988void __init sh73a0_earlytimer_init(void) 940void __init sh73a0_earlytimer_init(void)
989{ 941{
942 sh73a0_init_delay();
990 sh73a0_clock_init(); 943 sh73a0_clock_init();
991 shmobile_earlytimer_init(); 944 shmobile_earlytimer_init();
992 sh73a0_register_twd(); 945 sh73a0_register_twd();
@@ -1005,17 +958,14 @@ void __init sh73a0_add_early_devices(void)
1005 958
1006#ifdef CONFIG_USE_OF 959#ifdef CONFIG_USE_OF
1007 960
1008void __init sh73a0_init_delay(void)
1009{
1010 shmobile_setup_delay(1196, 44, 46); /* Cortex-A9 @ 1196MHz */
1011}
1012
1013static const struct of_dev_auxdata sh73a0_auxdata_lookup[] __initconst = { 961static const struct of_dev_auxdata sh73a0_auxdata_lookup[] __initconst = {
1014 {}, 962 {},
1015}; 963};
1016 964
1017void __init sh73a0_add_standard_devices_dt(void) 965void __init sh73a0_add_standard_devices_dt(void)
1018{ 966{
967 struct platform_device_info devinfo = { .name = "cpufreq-cpu0", .id = -1, };
968
1019 /* clocks are setup late during boot in the case of DT */ 969 /* clocks are setup late during boot in the case of DT */
1020 sh73a0_clock_init(); 970 sh73a0_clock_init();
1021 971
@@ -1023,6 +973,9 @@ void __init sh73a0_add_standard_devices_dt(void)
1023 ARRAY_SIZE(sh73a0_devices_dt)); 973 ARRAY_SIZE(sh73a0_devices_dt));
1024 of_platform_populate(NULL, of_default_bus_match_table, 974 of_platform_populate(NULL, of_default_bus_match_table,
1025 sh73a0_auxdata_lookup, NULL); 975 sh73a0_auxdata_lookup, NULL);
976
977 /* Instantiate cpufreq-cpu0 */
978 platform_device_register_full(&devinfo);
1026} 979}
1027 980
1028static const char *sh73a0_boards_compat_dt[] __initdata = { 981static const char *sh73a0_boards_compat_dt[] __initdata = {
diff --git a/arch/arm/mach-shmobile/sleep-sh7372.S b/arch/arm/mach-shmobile/sleep-sh7372.S
index a9df53b69ab8..53f4840e4949 100644
--- a/arch/arm/mach-shmobile/sleep-sh7372.S
+++ b/arch/arm/mach-shmobile/sleep-sh7372.S
@@ -40,7 +40,10 @@
40 .global sh7372_resume_core_standby_sysc 40 .global sh7372_resume_core_standby_sysc
41sh7372_resume_core_standby_sysc: 41sh7372_resume_core_standby_sysc:
42 ldr pc, 1f 42 ldr pc, 1f
431: .long cpu_resume - PAGE_OFFSET + PLAT_PHYS_OFFSET 43
44 .globl sh7372_cpu_resume
45sh7372_cpu_resume:
461: .space 4
44 47
45#define SPDCR 0xe6180008 48#define SPDCR 0xe6180008
46 49
diff --git a/arch/arm/mach-shmobile/smp-emev2.c b/arch/arm/mach-shmobile/smp-emev2.c
index e38691b4d0dd..22a05a869d25 100644
--- a/arch/arm/mach-shmobile/smp-emev2.c
+++ b/arch/arm/mach-shmobile/smp-emev2.c
@@ -30,7 +30,7 @@
30 30
31#define EMEV2_SCU_BASE 0x1e000000 31#define EMEV2_SCU_BASE 0x1e000000
32 32
33static int __cpuinit emev2_boot_secondary(unsigned int cpu, struct task_struct *idle) 33static int emev2_boot_secondary(unsigned int cpu, struct task_struct *idle)
34{ 34{
35 arch_send_wakeup_ipi_mask(cpumask_of(cpu_logical_map(cpu))); 35 arch_send_wakeup_ipi_mask(cpumask_of(cpu_logical_map(cpu)));
36 return 0; 36 return 0;
@@ -40,8 +40,10 @@ static void __init emev2_smp_prepare_cpus(unsigned int max_cpus)
40{ 40{
41 scu_enable(shmobile_scu_base); 41 scu_enable(shmobile_scu_base);
42 42
43 /* Tell ROM loader about our vector (in headsmp-scu.S) */ 43 /* Tell ROM loader about our vector (in headsmp-scu.S, headsmp.S) */
44 emev2_set_boot_vector(__pa(shmobile_secondary_vector_scu)); 44 emev2_set_boot_vector(__pa(shmobile_boot_vector));
45 shmobile_boot_fn = virt_to_phys(shmobile_boot_scu);
46 shmobile_boot_arg = (unsigned long)shmobile_scu_base;
45 47
46 /* enable cache coherency on booting CPU */ 48 /* enable cache coherency on booting CPU */
47 scu_power_mode(shmobile_scu_base, SCU_PM_NORMAL); 49 scu_power_mode(shmobile_scu_base, SCU_PM_NORMAL);
diff --git a/arch/arm/mach-shmobile/smp-r8a7779.c b/arch/arm/mach-shmobile/smp-r8a7779.c
index a853bf182ed5..9bdf810f2a87 100644
--- a/arch/arm/mach-shmobile/smp-r8a7779.c
+++ b/arch/arm/mach-shmobile/smp-r8a7779.c
@@ -81,7 +81,7 @@ static int r8a7779_platform_cpu_kill(unsigned int cpu)
81 return ret ? ret : 1; 81 return ret ? ret : 1;
82} 82}
83 83
84static int __cpuinit r8a7779_boot_secondary(unsigned int cpu, struct task_struct *idle) 84static int r8a7779_boot_secondary(unsigned int cpu, struct task_struct *idle)
85{ 85{
86 struct r8a7779_pm_ch *ch = NULL; 86 struct r8a7779_pm_ch *ch = NULL;
87 int ret = -EIO; 87 int ret = -EIO;
@@ -101,8 +101,10 @@ static void __init r8a7779_smp_prepare_cpus(unsigned int max_cpus)
101{ 101{
102 scu_enable(shmobile_scu_base); 102 scu_enable(shmobile_scu_base);
103 103
104 /* Map the reset vector (in headsmp-scu.S) */ 104 /* Map the reset vector (in headsmp-scu.S, headsmp.S) */
105 __raw_writel(__pa(shmobile_secondary_vector_scu), AVECR); 105 __raw_writel(__pa(shmobile_boot_vector), AVECR);
106 shmobile_boot_fn = virt_to_phys(shmobile_boot_scu);
107 shmobile_boot_arg = (unsigned long)shmobile_scu_base;
106 108
107 /* enable cache coherency on booting CPU */ 109 /* enable cache coherency on booting CPU */
108 scu_power_mode(shmobile_scu_base, SCU_PM_NORMAL); 110 scu_power_mode(shmobile_scu_base, SCU_PM_NORMAL);
diff --git a/arch/arm/mach-shmobile/smp-sh73a0.c b/arch/arm/mach-shmobile/smp-sh73a0.c
index 496592b6c763..d5fc3ed4e315 100644
--- a/arch/arm/mach-shmobile/smp-sh73a0.c
+++ b/arch/arm/mach-shmobile/smp-sh73a0.c
@@ -48,7 +48,7 @@ void __init sh73a0_register_twd(void)
48} 48}
49#endif 49#endif
50 50
51static int __cpuinit sh73a0_boot_secondary(unsigned int cpu, struct task_struct *idle) 51static int sh73a0_boot_secondary(unsigned int cpu, struct task_struct *idle)
52{ 52{
53 cpu = cpu_logical_map(cpu); 53 cpu = cpu_logical_map(cpu);
54 54
@@ -64,9 +64,11 @@ static void __init sh73a0_smp_prepare_cpus(unsigned int max_cpus)
64{ 64{
65 scu_enable(shmobile_scu_base); 65 scu_enable(shmobile_scu_base);
66 66
67 /* Map the reset vector (in headsmp-scu.S) */ 67 /* Map the reset vector (in headsmp-scu.S, headsmp.S) */
68 __raw_writel(0, APARMBAREA); /* 4k */ 68 __raw_writel(0, APARMBAREA); /* 4k */
69 __raw_writel(__pa(shmobile_secondary_vector_scu), SBAR); 69 __raw_writel(__pa(shmobile_boot_vector), SBAR);
70 shmobile_boot_fn = virt_to_phys(shmobile_boot_scu);
71 shmobile_boot_arg = (unsigned long)shmobile_scu_base;
70 72
71 /* enable cache coherency on booting CPU */ 73 /* enable cache coherency on booting CPU */
72 scu_power_mode(shmobile_scu_base, SCU_PM_NORMAL); 74 scu_power_mode(shmobile_scu_base, SCU_PM_NORMAL);
diff --git a/arch/arm/mach-socfpga/Kconfig b/arch/arm/mach-socfpga/Kconfig
index 566e804d4036..dd86db467521 100644
--- a/arch/arm/mach-socfpga/Kconfig
+++ b/arch/arm/mach-socfpga/Kconfig
@@ -7,11 +7,11 @@ config ARCH_SOCFPGA
7 select CLKDEV_LOOKUP 7 select CLKDEV_LOOKUP
8 select COMMON_CLK 8 select COMMON_CLK
9 select CPU_V7 9 select CPU_V7
10 select DW_APB_TIMER
11 select DW_APB_TIMER_OF 10 select DW_APB_TIMER_OF
12 select GENERIC_CLOCKEVENTS 11 select GENERIC_CLOCKEVENTS
13 select GPIO_PL061 if GPIOLIB 12 select GPIO_PL061 if GPIOLIB
14 select HAVE_ARM_SCU 13 select HAVE_ARM_SCU
15 select HAVE_SMP 14 select HAVE_SMP
15 select MFD_SYSCON
16 select SPARSE_IRQ 16 select SPARSE_IRQ
17 select USE_OF 17 select USE_OF
diff --git a/arch/arm/mach-socfpga/headsmp.S b/arch/arm/mach-socfpga/headsmp.S
index 9004bfb1756e..95c115d8b5ee 100644
--- a/arch/arm/mach-socfpga/headsmp.S
+++ b/arch/arm/mach-socfpga/headsmp.S
@@ -10,7 +10,6 @@
10#include <linux/linkage.h> 10#include <linux/linkage.h>
11#include <linux/init.h> 11#include <linux/init.h>
12 12
13 __CPUINIT
14 .arch armv7-a 13 .arch armv7-a
15 14
16ENTRY(secondary_trampoline) 15ENTRY(secondary_trampoline)
diff --git a/arch/arm/mach-socfpga/platsmp.c b/arch/arm/mach-socfpga/platsmp.c
index b51ce8c7929d..5356a72bc8ce 100644
--- a/arch/arm/mach-socfpga/platsmp.c
+++ b/arch/arm/mach-socfpga/platsmp.c
@@ -29,7 +29,7 @@
29 29
30#include "core.h" 30#include "core.h"
31 31
32static int __cpuinit socfpga_boot_secondary(unsigned int cpu, struct task_struct *idle) 32static int socfpga_boot_secondary(unsigned int cpu, struct task_struct *idle)
33{ 33{
34 int trampoline_size = &secondary_trampoline_end - &secondary_trampoline; 34 int trampoline_size = &secondary_trampoline_end - &secondary_trampoline;
35 35
diff --git a/arch/arm/mach-socfpga/socfpga.c b/arch/arm/mach-socfpga/socfpga.c
index 46a051359f02..bfce9641e32f 100644
--- a/arch/arm/mach-socfpga/socfpga.c
+++ b/arch/arm/mach-socfpga/socfpga.c
@@ -14,12 +14,12 @@
14 * You should have received a copy of the GNU General Public License 14 * You should have received a copy of the GNU General Public License
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>
18#include <linux/clk-provider.h> 17#include <linux/clk-provider.h>
19#include <linux/irqchip.h> 18#include <linux/irqchip.h>
20#include <linux/of_address.h> 19#include <linux/of_address.h>
21#include <linux/of_irq.h> 20#include <linux/of_irq.h>
22#include <linux/of_platform.h> 21#include <linux/of_platform.h>
22#include <linux/reboot.h>
23 23
24#include <asm/hardware/cache-l2x0.h> 24#include <asm/hardware/cache-l2x0.h>
25#include <asm/mach/arch.h> 25#include <asm/mach/arch.h>
@@ -90,13 +90,13 @@ static void __init socfpga_init_irq(void)
90 socfpga_sysmgr_init(); 90 socfpga_sysmgr_init();
91} 91}
92 92
93static void socfpga_cyclone5_restart(char mode, const char *cmd) 93static void socfpga_cyclone5_restart(enum reboot_mode mode, const char *cmd)
94{ 94{
95 u32 temp; 95 u32 temp;
96 96
97 temp = readl(rst_manager_base_addr + SOCFPGA_RSTMGR_CTRL); 97 temp = readl(rst_manager_base_addr + SOCFPGA_RSTMGR_CTRL);
98 98
99 if (mode == 'h') 99 if (mode == REBOOT_HARD)
100 temp |= RSTMGR_CTRL_SWCOLDRSTREQ; 100 temp |= RSTMGR_CTRL_SWCOLDRSTREQ;
101 else 101 else
102 temp |= RSTMGR_CTRL_SWWARMRSTREQ; 102 temp |= RSTMGR_CTRL_SWWARMRSTREQ;
@@ -120,7 +120,6 @@ DT_MACHINE_START(SOCFPGA, "Altera SOCFPGA")
120 .smp = smp_ops(socfpga_smp_ops), 120 .smp = smp_ops(socfpga_smp_ops),
121 .map_io = socfpga_map_io, 121 .map_io = socfpga_map_io,
122 .init_irq = socfpga_init_irq, 122 .init_irq = socfpga_init_irq,
123 .init_time = dw_apb_timer_init,
124 .init_machine = socfpga_cyclone5_init, 123 .init_machine = socfpga_cyclone5_init,
125 .restart = socfpga_cyclone5_restart, 124 .restart = socfpga_cyclone5_restart,
126 .dt_compat = altera_dt_match, 125 .dt_compat = altera_dt_match,
diff --git a/arch/arm/mach-spear/generic.h b/arch/arm/mach-spear/generic.h
index a9fd45362fee..a99d90a4d09c 100644
--- a/arch/arm/mach-spear/generic.h
+++ b/arch/arm/mach-spear/generic.h
@@ -16,6 +16,8 @@
16#include <linux/dmaengine.h> 16#include <linux/dmaengine.h>
17#include <linux/amba/pl08x.h> 17#include <linux/amba/pl08x.h>
18#include <linux/init.h> 18#include <linux/init.h>
19#include <linux/reboot.h>
20
19#include <asm/mach/time.h> 21#include <asm/mach/time.h>
20 22
21extern void spear13xx_timer_init(void); 23extern void spear13xx_timer_init(void);
@@ -32,10 +34,10 @@ void __init spear6xx_clk_init(void __iomem *misc_base);
32void __init spear13xx_map_io(void); 34void __init spear13xx_map_io(void);
33void __init spear13xx_l2x0_init(void); 35void __init spear13xx_l2x0_init(void);
34 36
35void spear_restart(char, const char *); 37void spear_restart(enum reboot_mode, const char *);
36 38
37void spear13xx_secondary_startup(void); 39void spear13xx_secondary_startup(void);
38void __cpuinit spear13xx_cpu_die(unsigned int cpu); 40void spear13xx_cpu_die(unsigned int cpu);
39 41
40extern struct smp_operations spear13xx_smp_ops; 42extern struct smp_operations spear13xx_smp_ops;
41 43
diff --git a/arch/arm/mach-spear/platsmp.c b/arch/arm/mach-spear/platsmp.c
index 9c4c722c954e..5c4a19887b2b 100644
--- a/arch/arm/mach-spear/platsmp.c
+++ b/arch/arm/mach-spear/platsmp.c
@@ -24,7 +24,7 @@ static DEFINE_SPINLOCK(boot_lock);
24 24
25static void __iomem *scu_base = IOMEM(VA_SCU_BASE); 25static void __iomem *scu_base = IOMEM(VA_SCU_BASE);
26 26
27static void __cpuinit spear13xx_secondary_init(unsigned int cpu) 27static void spear13xx_secondary_init(unsigned int cpu)
28{ 28{
29 /* 29 /*
30 * let the primary processor know we're out of the 30 * let the primary processor know we're out of the
@@ -40,7 +40,7 @@ static void __cpuinit spear13xx_secondary_init(unsigned int cpu)
40 spin_unlock(&boot_lock); 40 spin_unlock(&boot_lock);
41} 41}
42 42
43static int __cpuinit spear13xx_boot_secondary(unsigned int cpu, struct task_struct *idle) 43static int spear13xx_boot_secondary(unsigned int cpu, struct task_struct *idle)
44{ 44{
45 unsigned long timeout; 45 unsigned long timeout;
46 46
diff --git a/arch/arm/mach-spear/restart.c b/arch/arm/mach-spear/restart.c
index 2b44500bb718..ce5e098c4888 100644
--- a/arch/arm/mach-spear/restart.c
+++ b/arch/arm/mach-spear/restart.c
@@ -12,14 +12,15 @@
12 */ 12 */
13#include <linux/io.h> 13#include <linux/io.h>
14#include <linux/amba/sp810.h> 14#include <linux/amba/sp810.h>
15#include <linux/reboot.h>
15#include <asm/system_misc.h> 16#include <asm/system_misc.h>
16#include <mach/spear.h> 17#include <mach/spear.h>
17#include "generic.h" 18#include "generic.h"
18 19
19#define SPEAR13XX_SYS_SW_RES (VA_MISC_BASE + 0x204) 20#define SPEAR13XX_SYS_SW_RES (VA_MISC_BASE + 0x204)
20void spear_restart(char mode, const char *cmd) 21void spear_restart(enum reboot_mode mode, const char *cmd)
21{ 22{
22 if (mode == 's') { 23 if (mode == REBOOT_SOFT) {
23 /* software reset, Jump into ROM at address 0 */ 24 /* software reset, Jump into ROM at address 0 */
24 soft_restart(0); 25 soft_restart(0);
25 } else { 26 } else {
diff --git a/arch/arm/mach-spear/spear1310.c b/arch/arm/mach-spear/spear1310.c
index 9eaac2c881ea..7ad003001ab7 100644
--- a/arch/arm/mach-spear/spear1310.c
+++ b/arch/arm/mach-spear/spear1310.c
@@ -14,7 +14,6 @@
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>
18#include <linux/of_platform.h> 17#include <linux/of_platform.h>
19#include <linux/pata_arasan_cf_data.h> 18#include <linux/pata_arasan_cf_data.h>
20#include <asm/mach/arch.h> 19#include <asm/mach/arch.h>
@@ -60,7 +59,6 @@ static void __init spear1310_map_io(void)
60DT_MACHINE_START(SPEAR1310_DT, "ST SPEAr1310 SoC with Flattened Device Tree") 59DT_MACHINE_START(SPEAR1310_DT, "ST SPEAr1310 SoC with Flattened Device Tree")
61 .smp = smp_ops(spear13xx_smp_ops), 60 .smp = smp_ops(spear13xx_smp_ops),
62 .map_io = spear1310_map_io, 61 .map_io = spear1310_map_io,
63 .init_irq = irqchip_init,
64 .init_time = spear13xx_timer_init, 62 .init_time = spear13xx_timer_init,
65 .init_machine = spear1310_dt_init, 63 .init_machine = spear1310_dt_init,
66 .restart = spear_restart, 64 .restart = spear_restart,
diff --git a/arch/arm/mach-spear/spear1340.c b/arch/arm/mach-spear/spear1340.c
index a04a7fe76f71..3fb683424729 100644
--- a/arch/arm/mach-spear/spear1340.c
+++ b/arch/arm/mach-spear/spear1340.c
@@ -17,7 +17,6 @@
17#include <linux/amba/serial.h> 17#include <linux/amba/serial.h>
18#include <linux/delay.h> 18#include <linux/delay.h>
19#include <linux/of_platform.h> 19#include <linux/of_platform.h>
20#include <linux/irqchip.h>
21#include <asm/mach/arch.h> 20#include <asm/mach/arch.h>
22#include "generic.h" 21#include "generic.h"
23#include <mach/spear.h> 22#include <mach/spear.h>
@@ -155,7 +154,6 @@ static const char * const spear1340_dt_board_compat[] = {
155DT_MACHINE_START(SPEAR1340_DT, "ST SPEAr1340 SoC with Flattened Device Tree") 154DT_MACHINE_START(SPEAR1340_DT, "ST SPEAr1340 SoC with Flattened Device Tree")
156 .smp = smp_ops(spear13xx_smp_ops), 155 .smp = smp_ops(spear13xx_smp_ops),
157 .map_io = spear13xx_map_io, 156 .map_io = spear13xx_map_io,
158 .init_irq = irqchip_init,
159 .init_time = spear13xx_timer_init, 157 .init_time = spear13xx_timer_init,
160 .init_machine = spear1340_dt_init, 158 .init_machine = spear1340_dt_init,
161 .restart = spear_restart, 159 .restart = spear_restart,
diff --git a/arch/arm/mach-spear/spear300.c b/arch/arm/mach-spear/spear300.c
index bac56e845f7a..b52e48f342f4 100644
--- a/arch/arm/mach-spear/spear300.c
+++ b/arch/arm/mach-spear/spear300.c
@@ -14,7 +14,6 @@
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>
18#include <linux/of_platform.h> 17#include <linux/of_platform.h>
19#include <asm/mach/arch.h> 18#include <asm/mach/arch.h>
20#include "generic.h" 19#include "generic.h"
@@ -212,7 +211,6 @@ static void __init spear300_map_io(void)
212 211
213DT_MACHINE_START(SPEAR300_DT, "ST SPEAr300 SoC with Flattened Device Tree") 212DT_MACHINE_START(SPEAR300_DT, "ST SPEAr300 SoC with Flattened Device Tree")
214 .map_io = spear300_map_io, 213 .map_io = spear300_map_io,
215 .init_irq = irqchip_init,
216 .init_time = spear3xx_timer_init, 214 .init_time = spear3xx_timer_init,
217 .init_machine = spear300_dt_init, 215 .init_machine = spear300_dt_init,
218 .restart = spear_restart, 216 .restart = spear_restart,
diff --git a/arch/arm/mach-spear/spear310.c b/arch/arm/mach-spear/spear310.c
index 6ffbc63d516d..ed2029db391f 100644
--- a/arch/arm/mach-spear/spear310.c
+++ b/arch/arm/mach-spear/spear310.c
@@ -15,7 +15,6 @@
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>
19#include <linux/of_platform.h> 18#include <linux/of_platform.h>
20#include <asm/mach/arch.h> 19#include <asm/mach/arch.h>
21#include "generic.h" 20#include "generic.h"
@@ -254,7 +253,6 @@ static void __init spear310_map_io(void)
254 253
255DT_MACHINE_START(SPEAR310_DT, "ST SPEAr310 SoC with Flattened Device Tree") 254DT_MACHINE_START(SPEAR310_DT, "ST SPEAr310 SoC with Flattened Device Tree")
256 .map_io = spear310_map_io, 255 .map_io = spear310_map_io,
257 .init_irq = irqchip_init,
258 .init_time = spear3xx_timer_init, 256 .init_time = spear3xx_timer_init,
259 .init_machine = spear310_dt_init, 257 .init_machine = spear310_dt_init,
260 .restart = spear_restart, 258 .restart = spear_restart,
diff --git a/arch/arm/mach-spear/spear320.c b/arch/arm/mach-spear/spear320.c
index 6eb3eec65f96..bf634b32a930 100644
--- a/arch/arm/mach-spear/spear320.c
+++ b/arch/arm/mach-spear/spear320.c
@@ -16,7 +16,6 @@
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>
20#include <linux/of_platform.h> 19#include <linux/of_platform.h>
21#include <asm/mach/arch.h> 20#include <asm/mach/arch.h>
22#include <asm/mach/map.h> 21#include <asm/mach/map.h>
@@ -269,7 +268,6 @@ static void __init spear320_map_io(void)
269 268
270DT_MACHINE_START(SPEAR320_DT, "ST SPEAr320 SoC with Flattened Device Tree") 269DT_MACHINE_START(SPEAR320_DT, "ST SPEAr320 SoC with Flattened Device Tree")
271 .map_io = spear320_map_io, 270 .map_io = spear320_map_io,
272 .init_irq = irqchip_init,
273 .init_time = spear3xx_timer_init, 271 .init_time = spear3xx_timer_init,
274 .init_machine = spear320_dt_init, 272 .init_machine = spear320_dt_init,
275 .restart = spear_restart, 273 .restart = spear_restart,
diff --git a/arch/arm/mach-spear/spear3xx.c b/arch/arm/mach-spear/spear3xx.c
index 0227c97797cd..bf3b1fd8cb23 100644
--- a/arch/arm/mach-spear/spear3xx.c
+++ b/arch/arm/mach-spear/spear3xx.c
@@ -56,8 +56,8 @@ struct pl08x_platform_data pl080_plat_data = {
56 }, 56 },
57 .lli_buses = PL08X_AHB1, 57 .lli_buses = PL08X_AHB1,
58 .mem_buses = PL08X_AHB1, 58 .mem_buses = PL08X_AHB1,
59 .get_signal = pl080_get_signal, 59 .get_xfer_signal = pl080_get_signal,
60 .put_signal = pl080_put_signal, 60 .put_xfer_signal = pl080_put_signal,
61}; 61};
62 62
63/* 63/*
diff --git a/arch/arm/mach-spear/spear6xx.c b/arch/arm/mach-spear/spear6xx.c
index ec8eefbbdfad..da26fa5b68d7 100644
--- a/arch/arm/mach-spear/spear6xx.c
+++ b/arch/arm/mach-spear/spear6xx.c
@@ -16,7 +16,6 @@
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>
20#include <linux/of.h> 19#include <linux/of.h>
21#include <linux/of_address.h> 20#include <linux/of_address.h>
22#include <linux/of_platform.h> 21#include <linux/of_platform.h>
@@ -335,8 +334,8 @@ static struct pl08x_platform_data spear6xx_pl080_plat_data = {
335 }, 334 },
336 .lli_buses = PL08X_AHB1, 335 .lli_buses = PL08X_AHB1,
337 .mem_buses = PL08X_AHB1, 336 .mem_buses = PL08X_AHB1,
338 .get_signal = pl080_get_signal, 337 .get_xfer_signal = pl080_get_signal,
339 .put_signal = pl080_put_signal, 338 .put_xfer_signal = pl080_put_signal,
340 .slave_channels = spear600_dma_info, 339 .slave_channels = spear600_dma_info,
341 .num_slave_channels = ARRAY_SIZE(spear600_dma_info), 340 .num_slave_channels = ARRAY_SIZE(spear600_dma_info),
342}; 341};
@@ -423,7 +422,6 @@ static const char *spear600_dt_board_compat[] = {
423 422
424DT_MACHINE_START(SPEAR600_DT, "ST SPEAr600 (Flattened Device Tree)") 423DT_MACHINE_START(SPEAR600_DT, "ST SPEAr600 (Flattened Device Tree)")
425 .map_io = spear6xx_map_io, 424 .map_io = spear6xx_map_io,
426 .init_irq = irqchip_init,
427 .init_time = spear6xx_timer_init, 425 .init_time = spear6xx_timer_init,
428 .init_machine = spear600_dt_init, 426 .init_machine = spear600_dt_init,
429 .restart = spear_restart, 427 .restart = spear_restart,
diff --git a/arch/arm/mach-sti/Kconfig b/arch/arm/mach-sti/Kconfig
new file mode 100644
index 000000000000..835833e3c4f8
--- /dev/null
+++ b/arch/arm/mach-sti/Kconfig
@@ -0,0 +1,46 @@
1menuconfig ARCH_STI
2 bool "STMicroelectronics Consumer Electronics SOCs with Device Trees" if ARCH_MULTI_V7
3 select GENERIC_CLOCKEVENTS
4 select CLKDEV_LOOKUP
5 select ARM_GIC
6 select ARM_GLOBAL_TIMER
7 select PINCTRL
8 select PINCTRL_ST
9 select MFD_SYSCON
10 select MIGHT_HAVE_CACHE_L2X0
11 select HAVE_SMP
12 select HAVE_ARM_SCU if SMP
13 select ARCH_REQUIRE_GPIOLIB
14 select ARM_ERRATA_754322
15 select ARM_ERRATA_764369
16 select ARM_ERRATA_775420
17 select PL310_ERRATA_753970 if CACHE_PL310
18 select PL310_ERRATA_769419 if CACHE_PL310
19 help
20 Include support for STiH41x SOCs like STiH415/416 using the device tree
21 for discovery
22 More information at Documentation/arm/STiH41x and
23 at Documentation/devicetree
24
25
26if ARCH_STI
27
28config SOC_STIH415
29 bool "STiH415 STMicroelectronics Consumer Electronics family"
30 default y
31 help
32 This enables support for STMicroelectronics Digital Consumer
33 Electronics family StiH415 parts, primarily targetted at set-top-box
34 and other digital audio/video applications using Flattned Device
35 Trees.
36
37config SOC_STIH416
38 bool "STiH416 STMicroelectronics Consumer Electronics family"
39 default y
40 help
41 This enables support for STMicroelectronics Digital Consumer
42 Electronics family StiH416 parts, primarily targetted at set-top-box
43 and other digital audio/video applications using Flattened Device
44 Trees.
45
46endif
diff --git a/arch/arm/mach-sti/Makefile b/arch/arm/mach-sti/Makefile
new file mode 100644
index 000000000000..acb330916333
--- /dev/null
+++ b/arch/arm/mach-sti/Makefile
@@ -0,0 +1,2 @@
1obj-$(CONFIG_SMP) += platsmp.o headsmp.o
2obj-$(CONFIG_ARCH_STI) += board-dt.o
diff --git a/arch/arm/mach-sti/board-dt.c b/arch/arm/mach-sti/board-dt.c
new file mode 100644
index 000000000000..8fe6f0c46480
--- /dev/null
+++ b/arch/arm/mach-sti/board-dt.c
@@ -0,0 +1,48 @@
1/*
2 * Copyright (C) 2013 STMicroelectronics (R&D) Limited.
3 * Author(s): Srinivas Kandagatla <srinivas.kandagatla@st.com>
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 2 as
7 * published by the Free Software Foundation.
8 */
9
10#include <linux/clk-provider.h>
11#include <linux/clocksource.h>
12#include <linux/irq.h>
13#include <asm/hardware/cache-l2x0.h>
14#include <asm/mach/arch.h>
15
16#include "smp.h"
17
18void __init stih41x_l2x0_init(void)
19{
20 u32 way_size = 0x4;
21 u32 aux_ctrl;
22 /* may be this can be encoded in macros like BIT*() */
23 aux_ctrl = (0x1 << L2X0_AUX_CTRL_SHARE_OVERRIDE_SHIFT) |
24 (0x1 << L2X0_AUX_CTRL_DATA_PREFETCH_SHIFT) |
25 (0x1 << L2X0_AUX_CTRL_INSTR_PREFETCH_SHIFT) |
26 (way_size << L2X0_AUX_CTRL_WAY_SIZE_SHIFT);
27
28 l2x0_of_init(aux_ctrl, L2X0_AUX_CTRL_MASK);
29}
30
31static void __init stih41x_timer_init(void)
32{
33 of_clk_init(NULL);
34 clocksource_of_init();
35 stih41x_l2x0_init();
36}
37
38static const char *stih41x_dt_match[] __initdata = {
39 "st,stih415",
40 "st,stih416",
41 NULL
42};
43
44DT_MACHINE_START(STM, "STiH415/416 SoC with Flattened Device Tree")
45 .init_time = stih41x_timer_init,
46 .smp = smp_ops(sti_smp_ops),
47 .dt_compat = stih41x_dt_match,
48MACHINE_END
diff --git a/arch/arm/mach-sti/headsmp.S b/arch/arm/mach-sti/headsmp.S
new file mode 100644
index 000000000000..4c09bae86edf
--- /dev/null
+++ b/arch/arm/mach-sti/headsmp.S
@@ -0,0 +1,42 @@
1/*
2 * arch/arm/mach-sti/headsmp.S
3 *
4 * Copyright (C) 2013 STMicroelectronics (R&D) Limited.
5 * http://www.st.com
6 *
7 * Cloned from linux/arch/arm/mach-vexpress/headsmp.S
8 *
9 * Copyright (c) 2003 ARM Limited
10 * All Rights Reserved
11 *
12 * This program is free software; you can redistribute it and/or modify
13 * it under the terms of the GNU General Public License version 2 as
14 * published by the Free Software Foundation.
15 */
16#include <linux/linkage.h>
17#include <linux/init.h>
18
19/*
20 * ST specific entry point for secondary CPUs. This provides
21 * a "holding pen" into which all secondary cores are held until we're
22 * ready for them to initialise.
23 */
24ENTRY(sti_secondary_startup)
25 mrc p15, 0, r0, c0, c0, 5
26 and r0, r0, #15
27 adr r4, 1f
28 ldmia r4, {r5, r6}
29 sub r4, r4, r5
30 add r6, r6, r4
31pen: ldr r7, [r6]
32 cmp r7, r0
33 bne pen
34
35 /*
36 * we've been released from the holding pen: secondary_stack
37 * should now contain the SVC stack for this core
38 */
39 b secondary_startup
40
411: .long .
42 .long pen_release
diff --git a/arch/arm/mach-sti/platsmp.c b/arch/arm/mach-sti/platsmp.c
new file mode 100644
index 000000000000..dce50d983a8e
--- /dev/null
+++ b/arch/arm/mach-sti/platsmp.c
@@ -0,0 +1,117 @@
1/*
2 * arch/arm/mach-sti/platsmp.c
3 *
4 * Copyright (C) 2013 STMicroelectronics (R&D) Limited.
5 * http://www.st.com
6 *
7 * Cloned from linux/arch/arm/mach-vexpress/platsmp.c
8 *
9 * Copyright (C) 2002 ARM Ltd.
10 * All Rights Reserved
11 *
12 * This program is free software; you can redistribute it and/or modify
13 * it under the terms of the GNU General Public License version 2 as
14 * published by the Free Software Foundation.
15 */
16#include <linux/init.h>
17#include <linux/errno.h>
18#include <linux/delay.h>
19#include <linux/smp.h>
20#include <linux/io.h>
21#include <linux/of.h>
22#include <linux/of_address.h>
23
24#include <asm/cacheflush.h>
25#include <asm/smp_plat.h>
26#include <asm/smp_scu.h>
27
28#include "smp.h"
29
30static void write_pen_release(int val)
31{
32 pen_release = val;
33 smp_wmb();
34 __cpuc_flush_dcache_area((void *)&pen_release, sizeof(pen_release));
35 outer_clean_range(__pa(&pen_release), __pa(&pen_release + 1));
36}
37
38static DEFINE_SPINLOCK(boot_lock);
39
40void sti_secondary_init(unsigned int cpu)
41{
42 trace_hardirqs_off();
43
44 /*
45 * let the primary processor know we're out of the
46 * pen, then head off into the C entry point
47 */
48 write_pen_release(-1);
49
50 /*
51 * Synchronise with the boot thread.
52 */
53 spin_lock(&boot_lock);
54 spin_unlock(&boot_lock);
55}
56
57int sti_boot_secondary(unsigned int cpu, struct task_struct *idle)
58{
59 unsigned long timeout;
60
61 /*
62 * set synchronisation state between this boot processor
63 * and the secondary one
64 */
65 spin_lock(&boot_lock);
66
67 /*
68 * The secondary processor is waiting to be released from
69 * the holding pen - release it, then wait for it to flag
70 * that it has been released by resetting pen_release.
71 *
72 * Note that "pen_release" is the hardware CPU ID, whereas
73 * "cpu" is Linux's internal ID.
74 */
75 write_pen_release(cpu_logical_map(cpu));
76
77 /*
78 * Send the secondary CPU a soft interrupt, thereby causing
79 * it to jump to the secondary entrypoint.
80 */
81 arch_send_wakeup_ipi_mask(cpumask_of(cpu));
82
83 timeout = jiffies + (1 * HZ);
84 while (time_before(jiffies, timeout)) {
85 smp_rmb();
86 if (pen_release == -1)
87 break;
88
89 udelay(10);
90 }
91
92 /*
93 * now the secondary core is starting up let it run its
94 * calibrations, then wait for it to finish
95 */
96 spin_unlock(&boot_lock);
97
98 return pen_release != -1 ? -ENOSYS : 0;
99}
100
101void __init sti_smp_prepare_cpus(unsigned int max_cpus)
102{
103 void __iomem *scu_base = NULL;
104 struct device_node *np = of_find_compatible_node(
105 NULL, NULL, "arm,cortex-a9-scu");
106 if (np) {
107 scu_base = of_iomap(np, 0);
108 scu_enable(scu_base);
109 of_node_put(np);
110 }
111}
112
113struct smp_operations __initdata sti_smp_ops = {
114 .smp_prepare_cpus = sti_smp_prepare_cpus,
115 .smp_secondary_init = sti_secondary_init,
116 .smp_boot_secondary = sti_boot_secondary,
117};
diff --git a/arch/arm/mach-sti/smp.h b/arch/arm/mach-sti/smp.h
new file mode 100644
index 000000000000..1871b72b1a7e
--- /dev/null
+++ b/arch/arm/mach-sti/smp.h
@@ -0,0 +1,17 @@
1/*
2 * arch/arm/mach-sti/smp.h
3 *
4 * Copyright (C) 2013 STMicroelectronics (R&D) Limited.
5 * http://www.st.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 version 2 as
9 * published by the Free Software Foundation.
10 */
11
12#ifndef __MACH_STI_SMP_H
13#define __MACH_STI_SMP_H
14
15extern struct smp_operations sti_smp_ops;
16
17#endif
diff --git a/arch/arm/mach-sunxi/sunxi.c b/arch/arm/mach-sunxi/sunxi.c
index 706ce35396b8..38a3c55527c8 100644
--- a/arch/arm/mach-sunxi/sunxi.c
+++ b/arch/arm/mach-sunxi/sunxi.c
@@ -14,11 +14,11 @@
14#include <linux/delay.h> 14#include <linux/delay.h>
15#include <linux/kernel.h> 15#include <linux/kernel.h>
16#include <linux/init.h> 16#include <linux/init.h>
17#include <linux/irqchip.h>
18#include <linux/of_address.h> 17#include <linux/of_address.h>
19#include <linux/of_irq.h> 18#include <linux/of_irq.h>
20#include <linux/of_platform.h> 19#include <linux/of_platform.h>
21#include <linux/io.h> 20#include <linux/io.h>
21#include <linux/reboot.h>
22 22
23#include <linux/clk/sunxi.h> 23#include <linux/clk/sunxi.h>
24 24
@@ -26,8 +26,6 @@
26#include <asm/mach/map.h> 26#include <asm/mach/map.h>
27#include <asm/system_misc.h> 27#include <asm/system_misc.h>
28 28
29#include "sunxi.h"
30
31#define SUN4I_WATCHDOG_CTRL_REG 0x00 29#define SUN4I_WATCHDOG_CTRL_REG 0x00
32#define SUN4I_WATCHDOG_CTRL_RESTART (1 << 0) 30#define SUN4I_WATCHDOG_CTRL_RESTART (1 << 0)
33#define SUN4I_WATCHDOG_MODE_REG 0x04 31#define SUN4I_WATCHDOG_MODE_REG 0x04
@@ -36,7 +34,7 @@
36 34
37static void __iomem *wdt_base; 35static void __iomem *wdt_base;
38 36
39static void sun4i_restart(char mode, const char *cmd) 37static void sun4i_restart(enum reboot_mode mode, const char *cmd)
40{ 38{
41 if (!wdt_base) 39 if (!wdt_base)
42 return; 40 return;
@@ -81,20 +79,6 @@ static void sunxi_setup_restart(void)
81 arm_pm_restart = of_id->data; 79 arm_pm_restart = of_id->data;
82} 80}
83 81
84static struct map_desc sunxi_io_desc[] __initdata = {
85 {
86 .virtual = (unsigned long) SUNXI_REGS_VIRT_BASE,
87 .pfn = __phys_to_pfn(SUNXI_REGS_PHYS_BASE),
88 .length = SUNXI_REGS_SIZE,
89 .type = MT_DEVICE,
90 },
91};
92
93void __init sunxi_map_io(void)
94{
95 iotable_init(sunxi_io_desc, ARRAY_SIZE(sunxi_io_desc));
96}
97
98static void __init sunxi_timer_init(void) 82static void __init sunxi_timer_init(void)
99{ 83{
100 sunxi_init_clocks(); 84 sunxi_init_clocks();
@@ -110,14 +94,13 @@ static void __init sunxi_dt_init(void)
110 94
111static const char * const sunxi_board_dt_compat[] = { 95static const char * const sunxi_board_dt_compat[] = {
112 "allwinner,sun4i-a10", 96 "allwinner,sun4i-a10",
97 "allwinner,sun5i-a10s",
113 "allwinner,sun5i-a13", 98 "allwinner,sun5i-a13",
114 NULL, 99 NULL,
115}; 100};
116 101
117DT_MACHINE_START(SUNXI_DT, "Allwinner A1X (Device Tree)") 102DT_MACHINE_START(SUNXI_DT, "Allwinner A1X (Device Tree)")
118 .init_machine = sunxi_dt_init, 103 .init_machine = sunxi_dt_init,
119 .map_io = sunxi_map_io,
120 .init_irq = irqchip_init,
121 .init_time = sunxi_timer_init, 104 .init_time = sunxi_timer_init,
122 .dt_compat = sunxi_board_dt_compat, 105 .dt_compat = sunxi_board_dt_compat,
123MACHINE_END 106MACHINE_END
diff --git a/arch/arm/mach-sunxi/sunxi.h b/arch/arm/mach-sunxi/sunxi.h
deleted file mode 100644
index 33b58712adea..000000000000
--- a/arch/arm/mach-sunxi/sunxi.h
+++ /dev/null
@@ -1,20 +0,0 @@
1/*
2 * Generic definitions for Allwinner SunXi SoCs
3 *
4 * Copyright (C) 2012 Maxime Ripard
5 *
6 * Maxime Ripard <maxime.ripard@free-electrons.com>
7 *
8 * This file is licensed under the terms of the GNU General Public
9 * License version 2. This program is licensed "as is" without any
10 * warranty of any kind, whether express or implied.
11 */
12
13#ifndef __MACH_SUNXI_H
14#define __MACH_SUNXI_H
15
16#define SUNXI_REGS_PHYS_BASE 0x01c00000
17#define SUNXI_REGS_VIRT_BASE IOMEM(0xf1c00000)
18#define SUNXI_REGS_SIZE (SZ_2M + SZ_1M)
19
20#endif /* __MACH_SUNXI_H */
diff --git a/arch/arm/mach-tegra/Kconfig b/arch/arm/mach-tegra/Kconfig
index 84d72fc36dfe..ef3a8da49b2d 100644
--- a/arch/arm/mach-tegra/Kconfig
+++ b/arch/arm/mach-tegra/Kconfig
@@ -28,7 +28,6 @@ config ARCH_TEGRA_2x_SOC
28 select ARM_ERRATA_754327 if SMP 28 select ARM_ERRATA_754327 if SMP
29 select ARM_ERRATA_764369 if SMP 29 select ARM_ERRATA_764369 if SMP
30 select ARM_GIC 30 select ARM_GIC
31 select CPU_FREQ_TABLE if CPU_FREQ
32 select CPU_V7 31 select CPU_V7
33 select PINCTRL 32 select PINCTRL
34 select PINCTRL_TEGRA20 33 select PINCTRL_TEGRA20
@@ -46,7 +45,6 @@ config ARCH_TEGRA_3x_SOC
46 select ARM_ERRATA_754322 45 select ARM_ERRATA_754322
47 select ARM_ERRATA_764369 if SMP 46 select ARM_ERRATA_764369 if SMP
48 select ARM_GIC 47 select ARM_GIC
49 select CPU_FREQ_TABLE if CPU_FREQ
50 select CPU_V7 48 select CPU_V7
51 select PINCTRL 49 select PINCTRL
52 select PINCTRL_TEGRA30 50 select PINCTRL_TEGRA30
@@ -60,10 +58,9 @@ config ARCH_TEGRA_3x_SOC
60 58
61config ARCH_TEGRA_114_SOC 59config ARCH_TEGRA_114_SOC
62 bool "Enable support for Tegra114 family" 60 bool "Enable support for Tegra114 family"
63 select ARM_ARCH_TIMER 61 select HAVE_ARM_ARCH_TIMER
64 select ARM_GIC 62 select ARM_GIC
65 select ARM_L1_CACHE_SHIFT_6 63 select ARM_L1_CACHE_SHIFT_6
66 select CPU_FREQ_TABLE if CPU_FREQ
67 select CPU_V7 64 select CPU_V7
68 select PINCTRL 65 select PINCTRL
69 select PINCTRL_TEGRA114 66 select PINCTRL_TEGRA114
diff --git a/arch/arm/mach-tegra/Makefile b/arch/arm/mach-tegra/Makefile
index d011f0ad49c4..98b184efc110 100644
--- a/arch/arm/mach-tegra/Makefile
+++ b/arch/arm/mach-tegra/Makefile
@@ -30,6 +30,7 @@ obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o
30obj-$(CONFIG_TEGRA_PCI) += pcie.o 30obj-$(CONFIG_TEGRA_PCI) += pcie.o
31 31
32obj-$(CONFIG_ARCH_TEGRA_114_SOC) += tegra114_speedo.o 32obj-$(CONFIG_ARCH_TEGRA_114_SOC) += tegra114_speedo.o
33obj-$(CONFIG_ARCH_TEGRA_114_SOC) += sleep-tegra30.o
33ifeq ($(CONFIG_CPU_IDLE),y) 34ifeq ($(CONFIG_CPU_IDLE),y)
34obj-$(CONFIG_ARCH_TEGRA_114_SOC) += cpuidle-tegra114.o 35obj-$(CONFIG_ARCH_TEGRA_114_SOC) += cpuidle-tegra114.o
35endif 36endif
diff --git a/arch/arm/mach-tegra/board.h b/arch/arm/mach-tegra/board.h
index 1787327fae3a..9a6659fe2dc2 100644
--- a/arch/arm/mach-tegra/board.h
+++ b/arch/arm/mach-tegra/board.h
@@ -23,8 +23,9 @@
23#define __MACH_TEGRA_BOARD_H 23#define __MACH_TEGRA_BOARD_H
24 24
25#include <linux/types.h> 25#include <linux/types.h>
26#include <linux/reboot.h>
26 27
27void tegra_assert_system_reset(char mode, const char *cmd); 28void tegra_assert_system_reset(enum reboot_mode mode, const char *cmd);
28 29
29void __init tegra_init_early(void); 30void __init tegra_init_early(void);
30void __init tegra_map_common_io(void); 31void __init tegra_map_common_io(void);
diff --git a/arch/arm/mach-tegra/common.c b/arch/arm/mach-tegra/common.c
index 9f852c6fe5b9..94a119a35af8 100644
--- a/arch/arm/mach-tegra/common.c
+++ b/arch/arm/mach-tegra/common.c
@@ -22,13 +22,15 @@
22#include <linux/io.h> 22#include <linux/io.h>
23#include <linux/clk.h> 23#include <linux/clk.h>
24#include <linux/delay.h> 24#include <linux/delay.h>
25#include <linux/reboot.h>
25#include <linux/irqchip.h> 26#include <linux/irqchip.h>
26#include <linux/clk/tegra.h> 27#include <linux/clk-provider.h>
27 28
28#include <asm/hardware/cache-l2x0.h> 29#include <asm/hardware/cache-l2x0.h>
29 30
30#include "board.h" 31#include "board.h"
31#include "common.h" 32#include "common.h"
33#include "cpuidle.h"
32#include "fuse.h" 34#include "fuse.h"
33#include "iomap.h" 35#include "iomap.h"
34#include "irq.h" 36#include "irq.h"
@@ -59,7 +61,7 @@ u32 tegra_uart_config[4] = {
59#ifdef CONFIG_OF 61#ifdef CONFIG_OF
60void __init tegra_dt_init_irq(void) 62void __init tegra_dt_init_irq(void)
61{ 63{
62 tegra_clocks_init(); 64 of_clk_init(NULL);
63 tegra_pmc_init(); 65 tegra_pmc_init();
64 tegra_init_irq(); 66 tegra_init_irq();
65 irqchip_init(); 67 irqchip_init();
@@ -67,7 +69,7 @@ void __init tegra_dt_init_irq(void)
67} 69}
68#endif 70#endif
69 71
70void tegra_assert_system_reset(char mode, const char *cmd) 72void tegra_assert_system_reset(enum reboot_mode mode, const char *cmd)
71{ 73{
72 void __iomem *reset = IO_ADDRESS(TEGRA_PMC_BASE + 0); 74 void __iomem *reset = IO_ADDRESS(TEGRA_PMC_BASE + 0);
73 u32 reg; 75 u32 reg;
@@ -108,5 +110,6 @@ void __init tegra_init_early(void)
108void __init tegra_init_late(void) 110void __init tegra_init_late(void)
109{ 111{
110 tegra_init_suspend(); 112 tegra_init_suspend();
113 tegra_cpuidle_init();
111 tegra_powergate_debugfs_init(); 114 tegra_powergate_debugfs_init();
112} 115}
diff --git a/arch/arm/mach-tegra/common.h b/arch/arm/mach-tegra/common.h
index 5900cc44f780..32f8eb3fe344 100644
--- a/arch/arm/mach-tegra/common.h
+++ b/arch/arm/mach-tegra/common.h
@@ -2,3 +2,4 @@ extern struct smp_operations tegra_smp_ops;
2 2
3extern int tegra_cpu_kill(unsigned int cpu); 3extern int tegra_cpu_kill(unsigned int cpu);
4extern void tegra_cpu_die(unsigned int cpu); 4extern void tegra_cpu_die(unsigned int cpu);
5extern int tegra_cpu_disable(unsigned int cpu);
diff --git a/arch/arm/mach-tegra/cpuidle-tegra20.c b/arch/arm/mach-tegra/cpuidle-tegra20.c
index 0cdba8de8c77..706aa4215c36 100644
--- a/arch/arm/mach-tegra/cpuidle-tegra20.c
+++ b/arch/arm/mach-tegra/cpuidle-tegra20.c
@@ -177,7 +177,6 @@ static int tegra20_idle_lp2_coupled(struct cpuidle_device *dev,
177 struct cpuidle_driver *drv, 177 struct cpuidle_driver *drv,
178 int index) 178 int index)
179{ 179{
180 u32 cpu = is_smp() ? cpu_logical_map(dev->cpu) : dev->cpu;
181 bool entered_lp2 = false; 180 bool entered_lp2 = false;
182 181
183 if (tegra_pending_sgi()) 182 if (tegra_pending_sgi())
@@ -193,16 +192,16 @@ static int tegra20_idle_lp2_coupled(struct cpuidle_device *dev,
193 192
194 local_fiq_disable(); 193 local_fiq_disable();
195 194
196 tegra_set_cpu_in_lp2(cpu); 195 tegra_set_cpu_in_lp2();
197 cpu_pm_enter(); 196 cpu_pm_enter();
198 197
199 if (cpu == 0) 198 if (dev->cpu == 0)
200 entered_lp2 = tegra20_cpu_cluster_power_down(dev, drv, index); 199 entered_lp2 = tegra20_cpu_cluster_power_down(dev, drv, index);
201 else 200 else
202 entered_lp2 = tegra20_idle_enter_lp2_cpu_1(dev, drv, index); 201 entered_lp2 = tegra20_idle_enter_lp2_cpu_1(dev, drv, index);
203 202
204 cpu_pm_exit(); 203 cpu_pm_exit();
205 tegra_clear_cpu_in_lp2(cpu); 204 tegra_clear_cpu_in_lp2();
206 205
207 local_fiq_enable(); 206 local_fiq_enable();
208 207
@@ -214,8 +213,5 @@ static int tegra20_idle_lp2_coupled(struct cpuidle_device *dev,
214 213
215int __init tegra20_cpuidle_init(void) 214int __init tegra20_cpuidle_init(void)
216{ 215{
217#ifdef CONFIG_PM_SLEEP
218 tegra_tear_down_cpu = tegra20_tear_down_cpu;
219#endif
220 return cpuidle_register(&tegra_idle_driver, cpu_possible_mask); 216 return cpuidle_register(&tegra_idle_driver, cpu_possible_mask);
221} 217}
diff --git a/arch/arm/mach-tegra/cpuidle-tegra30.c b/arch/arm/mach-tegra/cpuidle-tegra30.c
index 3cf9aca5f3ea..ed2a2a7bae4d 100644
--- a/arch/arm/mach-tegra/cpuidle-tegra30.c
+++ b/arch/arm/mach-tegra/cpuidle-tegra30.c
@@ -114,16 +114,15 @@ static int tegra30_idle_lp2(struct cpuidle_device *dev,
114 struct cpuidle_driver *drv, 114 struct cpuidle_driver *drv,
115 int index) 115 int index)
116{ 116{
117 u32 cpu = is_smp() ? cpu_logical_map(dev->cpu) : dev->cpu;
118 bool entered_lp2 = false; 117 bool entered_lp2 = false;
119 bool last_cpu; 118 bool last_cpu;
120 119
121 local_fiq_disable(); 120 local_fiq_disable();
122 121
123 last_cpu = tegra_set_cpu_in_lp2(cpu); 122 last_cpu = tegra_set_cpu_in_lp2();
124 cpu_pm_enter(); 123 cpu_pm_enter();
125 124
126 if (cpu == 0) { 125 if (dev->cpu == 0) {
127 if (last_cpu) 126 if (last_cpu)
128 entered_lp2 = tegra30_cpu_cluster_power_down(dev, drv, 127 entered_lp2 = tegra30_cpu_cluster_power_down(dev, drv,
129 index); 128 index);
@@ -134,7 +133,7 @@ static int tegra30_idle_lp2(struct cpuidle_device *dev,
134 } 133 }
135 134
136 cpu_pm_exit(); 135 cpu_pm_exit();
137 tegra_clear_cpu_in_lp2(cpu); 136 tegra_clear_cpu_in_lp2();
138 137
139 local_fiq_enable(); 138 local_fiq_enable();
140 139
@@ -146,8 +145,5 @@ static int tegra30_idle_lp2(struct cpuidle_device *dev,
146 145
147int __init tegra30_cpuidle_init(void) 146int __init tegra30_cpuidle_init(void)
148{ 147{
149#ifdef CONFIG_PM_SLEEP
150 tegra_tear_down_cpu = tegra30_tear_down_cpu;
151#endif
152 return cpuidle_register(&tegra_idle_driver, NULL); 148 return cpuidle_register(&tegra_idle_driver, NULL);
153} 149}
diff --git a/arch/arm/mach-tegra/cpuidle.c b/arch/arm/mach-tegra/cpuidle.c
index 4b744c4661e2..e85973cef037 100644
--- a/arch/arm/mach-tegra/cpuidle.c
+++ b/arch/arm/mach-tegra/cpuidle.c
@@ -27,25 +27,20 @@
27#include "fuse.h" 27#include "fuse.h"
28#include "cpuidle.h" 28#include "cpuidle.h"
29 29
30static int __init tegra_cpuidle_init(void) 30void __init tegra_cpuidle_init(void)
31{ 31{
32 int ret;
33
34 switch (tegra_chip_id) { 32 switch (tegra_chip_id) {
35 case TEGRA20: 33 case TEGRA20:
36 ret = tegra20_cpuidle_init(); 34 if (IS_ENABLED(CONFIG_ARCH_TEGRA_2x_SOC))
35 tegra20_cpuidle_init();
37 break; 36 break;
38 case TEGRA30: 37 case TEGRA30:
39 ret = tegra30_cpuidle_init(); 38 if (IS_ENABLED(CONFIG_ARCH_TEGRA_3x_SOC))
39 tegra30_cpuidle_init();
40 break; 40 break;
41 case TEGRA114: 41 case TEGRA114:
42 ret = tegra114_cpuidle_init(); 42 if (IS_ENABLED(CONFIG_ARCH_TEGRA_114_SOC))
43 break; 43 tegra114_cpuidle_init();
44 default:
45 ret = -ENODEV;
46 break; 44 break;
47 } 45 }
48
49 return ret;
50} 46}
51device_initcall(tegra_cpuidle_init);
diff --git a/arch/arm/mach-tegra/cpuidle.h b/arch/arm/mach-tegra/cpuidle.h
index d733f75d0208..9ec2c1ab0fa4 100644
--- a/arch/arm/mach-tegra/cpuidle.h
+++ b/arch/arm/mach-tegra/cpuidle.h
@@ -17,22 +17,13 @@
17#ifndef __MACH_TEGRA_CPUIDLE_H 17#ifndef __MACH_TEGRA_CPUIDLE_H
18#define __MACH_TEGRA_CPUIDLE_H 18#define __MACH_TEGRA_CPUIDLE_H
19 19
20#ifdef CONFIG_ARCH_TEGRA_2x_SOC 20#ifdef CONFIG_CPU_IDLE
21int tegra20_cpuidle_init(void); 21int tegra20_cpuidle_init(void);
22#else
23static inline int tegra20_cpuidle_init(void) { return -ENODEV; }
24#endif
25
26#ifdef CONFIG_ARCH_TEGRA_3x_SOC
27int tegra30_cpuidle_init(void); 22int tegra30_cpuidle_init(void);
28#else
29static inline int tegra30_cpuidle_init(void) { return -ENODEV; }
30#endif
31
32#ifdef CONFIG_ARCH_TEGRA_114_SOC
33int tegra114_cpuidle_init(void); 23int tegra114_cpuidle_init(void);
24void tegra_cpuidle_init(void);
34#else 25#else
35static inline int tegra114_cpuidle_init(void) { return -ENODEV; } 26static inline void tegra_cpuidle_init(void) {}
36#endif 27#endif
37 28
38#endif 29#endif
diff --git a/arch/arm/mach-tegra/flowctrl.h b/arch/arm/mach-tegra/flowctrl.h
index 67eab56699bd..7a29bae799a7 100644
--- a/arch/arm/mach-tegra/flowctrl.h
+++ b/arch/arm/mach-tegra/flowctrl.h
@@ -25,6 +25,7 @@
25#define FLOW_CTRL_WAITEVENT (2 << 29) 25#define FLOW_CTRL_WAITEVENT (2 << 29)
26#define FLOW_CTRL_WAIT_FOR_INTERRUPT (4 << 29) 26#define FLOW_CTRL_WAIT_FOR_INTERRUPT (4 << 29)
27#define FLOW_CTRL_JTAG_RESUME (1 << 28) 27#define FLOW_CTRL_JTAG_RESUME (1 << 28)
28#define FLOW_CTRL_SCLK_RESUME (1 << 27)
28#define FLOW_CTRL_HALT_CPU_IRQ (1 << 10) 29#define FLOW_CTRL_HALT_CPU_IRQ (1 << 10)
29#define FLOW_CTRL_HALT_CPU_FIQ (1 << 8) 30#define FLOW_CTRL_HALT_CPU_FIQ (1 << 8)
30#define FLOW_CTRL_CPU0_CSR 0x8 31#define FLOW_CTRL_CPU0_CSR 0x8
diff --git a/arch/arm/mach-tegra/fuse.h b/arch/arm/mach-tegra/fuse.h
index aacc00d05980..def79683bef6 100644
--- a/arch/arm/mach-tegra/fuse.h
+++ b/arch/arm/mach-tegra/fuse.h
@@ -19,16 +19,6 @@
19#ifndef __MACH_TEGRA_FUSE_H 19#ifndef __MACH_TEGRA_FUSE_H
20#define __MACH_TEGRA_FUSE_H 20#define __MACH_TEGRA_FUSE_H
21 21
22enum tegra_revision {
23 TEGRA_REVISION_UNKNOWN = 0,
24 TEGRA_REVISION_A01,
25 TEGRA_REVISION_A02,
26 TEGRA_REVISION_A03,
27 TEGRA_REVISION_A03p,
28 TEGRA_REVISION_A04,
29 TEGRA_REVISION_MAX,
30};
31
32#define SKU_ID_T20 8 22#define SKU_ID_T20 8
33#define SKU_ID_T25SE 20 23#define SKU_ID_T25SE 20
34#define SKU_ID_AP25 23 24#define SKU_ID_AP25 23
@@ -40,6 +30,17 @@ enum tegra_revision {
40#define TEGRA30 0x30 30#define TEGRA30 0x30
41#define TEGRA114 0x35 31#define TEGRA114 0x35
42 32
33#ifndef __ASSEMBLY__
34enum tegra_revision {
35 TEGRA_REVISION_UNKNOWN = 0,
36 TEGRA_REVISION_A01,
37 TEGRA_REVISION_A02,
38 TEGRA_REVISION_A03,
39 TEGRA_REVISION_A03p,
40 TEGRA_REVISION_A04,
41 TEGRA_REVISION_MAX,
42};
43
43extern int tegra_sku_id; 44extern int tegra_sku_id;
44extern int tegra_cpu_process_id; 45extern int tegra_cpu_process_id;
45extern int tegra_core_process_id; 46extern int tegra_core_process_id;
@@ -72,5 +73,6 @@ void tegra114_init_speedo_data(void);
72#else 73#else
73static inline void tegra114_init_speedo_data(void) {} 74static inline void tegra114_init_speedo_data(void) {}
74#endif 75#endif
76#endif /* __ASSEMBLY__ */
75 77
76#endif 78#endif
diff --git a/arch/arm/mach-tegra/hotplug.c b/arch/arm/mach-tegra/hotplug.c
index 184914a68d73..a52c10e0a857 100644
--- a/arch/arm/mach-tegra/hotplug.c
+++ b/arch/arm/mach-tegra/hotplug.c
@@ -46,6 +46,17 @@ void __ref tegra_cpu_die(unsigned int cpu)
46 BUG(); 46 BUG();
47} 47}
48 48
49int tegra_cpu_disable(unsigned int cpu)
50{
51 switch (tegra_chip_id) {
52 case TEGRA20:
53 case TEGRA30:
54 return cpu == 0 ? -EPERM : 0;
55 default:
56 return 0;
57 }
58}
59
49void __init tegra_hotplug_init(void) 60void __init tegra_hotplug_init(void)
50{ 61{
51 if (!IS_ENABLED(CONFIG_HOTPLUG_CPU)) 62 if (!IS_ENABLED(CONFIG_HOTPLUG_CPU))
@@ -55,4 +66,6 @@ void __init tegra_hotplug_init(void)
55 tegra_hotplug_shutdown = tegra20_hotplug_shutdown; 66 tegra_hotplug_shutdown = tegra20_hotplug_shutdown;
56 if (IS_ENABLED(CONFIG_ARCH_TEGRA_3x_SOC) && tegra_chip_id == TEGRA30) 67 if (IS_ENABLED(CONFIG_ARCH_TEGRA_3x_SOC) && tegra_chip_id == TEGRA30)
57 tegra_hotplug_shutdown = tegra30_hotplug_shutdown; 68 tegra_hotplug_shutdown = tegra30_hotplug_shutdown;
69 if (IS_ENABLED(CONFIG_ARCH_TEGRA_114_SOC) && tegra_chip_id == TEGRA114)
70 tegra_hotplug_shutdown = tegra30_hotplug_shutdown;
58} 71}
diff --git a/arch/arm/mach-tegra/platsmp.c b/arch/arm/mach-tegra/platsmp.c
index fad4226ef710..97b33a2a2d75 100644
--- a/arch/arm/mach-tegra/platsmp.c
+++ b/arch/arm/mach-tegra/platsmp.c
@@ -35,7 +35,7 @@
35 35
36static cpumask_t tegra_cpu_init_mask; 36static cpumask_t tegra_cpu_init_mask;
37 37
38static void __cpuinit tegra_secondary_init(unsigned int cpu) 38static void tegra_secondary_init(unsigned int cpu)
39{ 39{
40 cpumask_set_cpu(cpu, &tegra_cpu_init_mask); 40 cpumask_set_cpu(cpu, &tegra_cpu_init_mask);
41} 41}
@@ -140,11 +140,34 @@ remove_clamps:
140 140
141static int tegra114_boot_secondary(unsigned int cpu, struct task_struct *idle) 141static int tegra114_boot_secondary(unsigned int cpu, struct task_struct *idle)
142{ 142{
143 int ret = 0;
144
143 cpu = cpu_logical_map(cpu); 145 cpu = cpu_logical_map(cpu);
144 return tegra_pmc_cpu_power_on(cpu); 146
147 if (cpumask_test_cpu(cpu, &tegra_cpu_init_mask)) {
148 /*
149 * Warm boot flow
150 * The flow controller in charge of the power state and
151 * control for each CPU.
152 */
153 /* set SCLK as event trigger for flow controller */
154 flowctrl_write_cpu_csr(cpu, 1);
155 flowctrl_write_cpu_halt(cpu,
156 FLOW_CTRL_WAITEVENT | FLOW_CTRL_SCLK_RESUME);
157 } else {
158 /*
159 * Cold boot flow
160 * The CPU is powered up by toggling PMC directly. It will
161 * also initial power state in flow controller. After that,
162 * the CPU's power state is maintained by flow controller.
163 */
164 ret = tegra_pmc_cpu_power_on(cpu);
165 }
166
167 return ret;
145} 168}
146 169
147static int __cpuinit tegra_boot_secondary(unsigned int cpu, 170static int tegra_boot_secondary(unsigned int cpu,
148 struct task_struct *idle) 171 struct task_struct *idle)
149{ 172{
150 if (IS_ENABLED(CONFIG_ARCH_TEGRA_2x_SOC) && tegra_chip_id == TEGRA20) 173 if (IS_ENABLED(CONFIG_ARCH_TEGRA_2x_SOC) && tegra_chip_id == TEGRA20)
@@ -173,5 +196,6 @@ struct smp_operations tegra_smp_ops __initdata = {
173#ifdef CONFIG_HOTPLUG_CPU 196#ifdef CONFIG_HOTPLUG_CPU
174 .cpu_kill = tegra_cpu_kill, 197 .cpu_kill = tegra_cpu_kill,
175 .cpu_die = tegra_cpu_die, 198 .cpu_die = tegra_cpu_die,
199 .cpu_disable = tegra_cpu_disable,
176#endif 200#endif
177}; 201};
diff --git a/arch/arm/mach-tegra/pm.c b/arch/arm/mach-tegra/pm.c
index 45cf52c7e528..261fec140c06 100644
--- a/arch/arm/mach-tegra/pm.c
+++ b/arch/arm/mach-tegra/pm.c
@@ -44,6 +44,20 @@
44static DEFINE_SPINLOCK(tegra_lp2_lock); 44static DEFINE_SPINLOCK(tegra_lp2_lock);
45void (*tegra_tear_down_cpu)(void); 45void (*tegra_tear_down_cpu)(void);
46 46
47static void tegra_tear_down_cpu_init(void)
48{
49 switch (tegra_chip_id) {
50 case TEGRA20:
51 if (IS_ENABLED(CONFIG_ARCH_TEGRA_2x_SOC))
52 tegra_tear_down_cpu = tegra20_tear_down_cpu;
53 break;
54 case TEGRA30:
55 if (IS_ENABLED(CONFIG_ARCH_TEGRA_3x_SOC))
56 tegra_tear_down_cpu = tegra30_tear_down_cpu;
57 break;
58 }
59}
60
47/* 61/*
48 * restore_cpu_complex 62 * restore_cpu_complex
49 * 63 *
@@ -91,8 +105,9 @@ static void suspend_cpu_complex(void)
91 flowctrl_cpu_suspend_enter(cpu); 105 flowctrl_cpu_suspend_enter(cpu);
92} 106}
93 107
94void tegra_clear_cpu_in_lp2(int phy_cpu_id) 108void tegra_clear_cpu_in_lp2(void)
95{ 109{
110 int phy_cpu_id = cpu_logical_map(smp_processor_id());
96 u32 *cpu_in_lp2 = tegra_cpu_lp2_mask; 111 u32 *cpu_in_lp2 = tegra_cpu_lp2_mask;
97 112
98 spin_lock(&tegra_lp2_lock); 113 spin_lock(&tegra_lp2_lock);
@@ -103,8 +118,9 @@ void tegra_clear_cpu_in_lp2(int phy_cpu_id)
103 spin_unlock(&tegra_lp2_lock); 118 spin_unlock(&tegra_lp2_lock);
104} 119}
105 120
106bool tegra_set_cpu_in_lp2(int phy_cpu_id) 121bool tegra_set_cpu_in_lp2(void)
107{ 122{
123 int phy_cpu_id = cpu_logical_map(smp_processor_id());
108 bool last_cpu = false; 124 bool last_cpu = false;
109 cpumask_t *cpu_lp2_mask = tegra_cpu_lp2_mask; 125 cpumask_t *cpu_lp2_mask = tegra_cpu_lp2_mask;
110 u32 *cpu_in_lp2 = tegra_cpu_lp2_mask; 126 u32 *cpu_in_lp2 = tegra_cpu_lp2_mask;
@@ -175,7 +191,7 @@ static const char *lp_state[TEGRA_MAX_SUSPEND_MODE] = {
175 [TEGRA_SUSPEND_LP0] = "LP0", 191 [TEGRA_SUSPEND_LP0] = "LP0",
176}; 192};
177 193
178static int __cpuinit tegra_suspend_enter(suspend_state_t state) 194static int tegra_suspend_enter(suspend_state_t state)
179{ 195{
180 enum tegra_suspend_mode mode = tegra_pmc_get_suspend_mode(); 196 enum tegra_suspend_mode mode = tegra_pmc_get_suspend_mode();
181 197
@@ -192,7 +208,7 @@ static int __cpuinit tegra_suspend_enter(suspend_state_t state)
192 suspend_cpu_complex(); 208 suspend_cpu_complex();
193 switch (mode) { 209 switch (mode) {
194 case TEGRA_SUSPEND_LP2: 210 case TEGRA_SUSPEND_LP2:
195 tegra_set_cpu_in_lp2(0); 211 tegra_set_cpu_in_lp2();
196 break; 212 break;
197 default: 213 default:
198 break; 214 break;
@@ -202,7 +218,7 @@ static int __cpuinit tegra_suspend_enter(suspend_state_t state)
202 218
203 switch (mode) { 219 switch (mode) {
204 case TEGRA_SUSPEND_LP2: 220 case TEGRA_SUSPEND_LP2:
205 tegra_clear_cpu_in_lp2(0); 221 tegra_clear_cpu_in_lp2();
206 break; 222 break;
207 default: 223 default:
208 break; 224 break;
@@ -224,6 +240,7 @@ void __init tegra_init_suspend(void)
224 if (tegra_pmc_get_suspend_mode() == TEGRA_SUSPEND_NONE) 240 if (tegra_pmc_get_suspend_mode() == TEGRA_SUSPEND_NONE)
225 return; 241 return;
226 242
243 tegra_tear_down_cpu_init();
227 tegra_pmc_suspend_init(); 244 tegra_pmc_suspend_init();
228 245
229 suspend_set_ops(&tegra_suspend_ops); 246 suspend_set_ops(&tegra_suspend_ops);
diff --git a/arch/arm/mach-tegra/pm.h b/arch/arm/mach-tegra/pm.h
index 778a4aa7c3fa..94c4b9d9077c 100644
--- a/arch/arm/mach-tegra/pm.h
+++ b/arch/arm/mach-tegra/pm.h
@@ -28,8 +28,8 @@ extern unsigned long l2x0_saved_regs_addr;
28void save_cpu_arch_register(void); 28void save_cpu_arch_register(void);
29void restore_cpu_arch_register(void); 29void restore_cpu_arch_register(void);
30 30
31void tegra_clear_cpu_in_lp2(int phy_cpu_id); 31void tegra_clear_cpu_in_lp2(void);
32bool tegra_set_cpu_in_lp2(int phy_cpu_id); 32bool tegra_set_cpu_in_lp2(void);
33 33
34void tegra_idle_lp2_last(void); 34void tegra_idle_lp2_last(void);
35extern void (*tegra_tear_down_cpu)(void); 35extern void (*tegra_tear_down_cpu)(void);
diff --git a/arch/arm/mach-tegra/pmc.c b/arch/arm/mach-tegra/pmc.c
index 32360e540ce6..eb3fa4aee0e4 100644
--- a/arch/arm/mach-tegra/pmc.c
+++ b/arch/arm/mach-tegra/pmc.c
@@ -234,7 +234,7 @@ static const struct of_device_id matches[] __initconst = {
234 { } 234 { }
235}; 235};
236 236
237static void tegra_pmc_parse_dt(void) 237static void __init tegra_pmc_parse_dt(void)
238{ 238{
239 struct device_node *np; 239 struct device_node *np;
240 u32 prop; 240 u32 prop;
diff --git a/arch/arm/mach-tegra/reset-handler.S b/arch/arm/mach-tegra/reset-handler.S
index e6de88a2ea06..39dc9e7834f3 100644
--- a/arch/arm/mach-tegra/reset-handler.S
+++ b/arch/arm/mach-tegra/reset-handler.S
@@ -22,11 +22,11 @@
22#include <asm/hardware/cache-l2x0.h> 22#include <asm/hardware/cache-l2x0.h>
23 23
24#include "flowctrl.h" 24#include "flowctrl.h"
25#include "fuse.h"
25#include "iomap.h" 26#include "iomap.h"
26#include "reset.h" 27#include "reset.h"
27#include "sleep.h" 28#include "sleep.h"
28 29
29#define APB_MISC_GP_HIDREV 0x804
30#define PMC_SCRATCH41 0x140 30#define PMC_SCRATCH41 0x140
31 31
32#define RESET_DATA(x) ((TEGRA_RESET_##x)*4) 32#define RESET_DATA(x) ((TEGRA_RESET_##x)*4)
@@ -38,34 +38,40 @@
38 * CPU boot vector when restarting the a CPU following 38 * CPU boot vector when restarting the a CPU following
39 * an LP2 transition. Also branched to by LP0 and LP1 resume after 39 * an LP2 transition. Also branched to by LP0 and LP1 resume after
40 * re-enabling sdram. 40 * re-enabling sdram.
41 *
42 * r6: SoC ID
41 */ 43 */
42ENTRY(tegra_resume) 44ENTRY(tegra_resume)
43 bl v7_invalidate_l1 45 bl v7_invalidate_l1
44 46
45 cpu_id r0 47 cpu_id r0
48 tegra_get_soc_id TEGRA_APB_MISC_BASE, r6
49 cmp r6, #TEGRA114
50 beq no_cpu0_chk
51
46 cmp r0, #0 @ CPU0? 52 cmp r0, #0 @ CPU0?
47 THUMB( it ne ) 53 THUMB( it ne )
48 bne cpu_resume @ no 54 bne cpu_resume @ no
55no_cpu0_chk:
49 56
50#ifdef CONFIG_ARCH_TEGRA_3x_SOC
51 /* Are we on Tegra20? */ 57 /* Are we on Tegra20? */
52 mov32 r6, TEGRA_APB_MISC_BASE 58 cmp r6, #TEGRA20
53 ldr r0, [r6, #APB_MISC_GP_HIDREV]
54 and r0, r0, #0xff00
55 cmp r0, #(0x20 << 8)
56 beq 1f @ Yes 59 beq 1f @ Yes
57 /* Clear the flow controller flags for this CPU. */ 60 /* Clear the flow controller flags for this CPU. */
58 mov32 r2, TEGRA_FLOW_CTRL_BASE + FLOW_CTRL_CPU0_CSR @ CPU0 CSR 61 cpu_to_csr_reg r1, r0
59 ldr r1, [r2] 62 mov32 r2, TEGRA_FLOW_CTRL_BASE
63 ldr r1, [r2, r1]
60 /* Clear event & intr flag */ 64 /* Clear event & intr flag */
61 orr r1, r1, \ 65 orr r1, r1, \
62 #FLOW_CTRL_CSR_INTR_FLAG | FLOW_CTRL_CSR_EVENT_FLAG 66 #FLOW_CTRL_CSR_INTR_FLAG | FLOW_CTRL_CSR_EVENT_FLAG
63 movw r0, #0x0FFD @ enable, cluster_switch, immed, & bitmaps 67 movw r0, #0x3FFD @ enable, cluster_switch, immed, bitmaps
68 @ & ext flags for CPU power mgnt
64 bic r1, r1, r0 69 bic r1, r1, r0
65 str r1, [r2] 70 str r1, [r2]
661: 711:
67#endif
68 72
73 check_cpu_part_num 0xc09, r8, r9
74 bne not_ca9
69#ifdef CONFIG_HAVE_ARM_SCU 75#ifdef CONFIG_HAVE_ARM_SCU
70 /* enable SCU */ 76 /* enable SCU */
71 mov32 r0, TEGRA_ARM_PERIF_BASE 77 mov32 r0, TEGRA_ARM_PERIF_BASE
@@ -76,6 +82,7 @@ ENTRY(tegra_resume)
76 82
77 /* L2 cache resume & re-enable */ 83 /* L2 cache resume & re-enable */
78 l2_cache_resume r0, r1, r2, l2x0_saved_regs_addr 84 l2_cache_resume r0, r1, r2, l2x0_saved_regs_addr
85not_ca9:
79 86
80 b cpu_resume 87 b cpu_resume
81ENDPROC(tegra_resume) 88ENDPROC(tegra_resume)
@@ -98,7 +105,7 @@ ENTRY(__tegra_cpu_reset_handler_start)
98 * Register usage within the reset handler: 105 * Register usage within the reset handler:
99 * 106 *
100 * Others: scratch 107 * Others: scratch
101 * R6 = SoC ID << 8 108 * R6 = SoC ID
102 * R7 = CPU present (to the OS) mask 109 * R7 = CPU present (to the OS) mask
103 * R8 = CPU in LP1 state mask 110 * R8 = CPU in LP1 state mask
104 * R9 = CPU in LP2 state mask 111 * R9 = CPU in LP2 state mask
@@ -115,12 +122,10 @@ ENTRY(__tegra_cpu_reset_handler)
115 122
116 cpsid aif, 0x13 @ SVC mode, interrupts disabled 123 cpsid aif, 0x13 @ SVC mode, interrupts disabled
117 124
118 mov32 r6, TEGRA_APB_MISC_BASE 125 tegra_get_soc_id TEGRA_APB_MISC_BASE, r6
119 ldr r6, [r6, #APB_MISC_GP_HIDREV]
120 and r6, r6, #0xff00
121#ifdef CONFIG_ARCH_TEGRA_2x_SOC 126#ifdef CONFIG_ARCH_TEGRA_2x_SOC
122t20_check: 127t20_check:
123 cmp r6, #(0x20 << 8) 128 cmp r6, #TEGRA20
124 bne after_t20_check 129 bne after_t20_check
125t20_errata: 130t20_errata:
126 # Tegra20 is a Cortex-A9 r1p1 131 # Tegra20 is a Cortex-A9 r1p1
@@ -136,7 +141,7 @@ after_t20_check:
136#endif 141#endif
137#ifdef CONFIG_ARCH_TEGRA_3x_SOC 142#ifdef CONFIG_ARCH_TEGRA_3x_SOC
138t30_check: 143t30_check:
139 cmp r6, #(0x30 << 8) 144 cmp r6, #TEGRA30
140 bne after_t30_check 145 bne after_t30_check
141t30_errata: 146t30_errata:
142 # Tegra30 is a Cortex-A9 r2p9 147 # Tegra30 is a Cortex-A9 r2p9
@@ -163,7 +168,7 @@ after_errata:
163 168
164#ifdef CONFIG_ARCH_TEGRA_2x_SOC 169#ifdef CONFIG_ARCH_TEGRA_2x_SOC
165 /* Are we on Tegra20? */ 170 /* Are we on Tegra20? */
166 cmp r6, #(0x20 << 8) 171 cmp r6, #TEGRA20
167 bne 1f 172 bne 1f
168 /* If not CPU0, don't let CPU0 reset CPU1 now that CPU1 is coming up. */ 173 /* If not CPU0, don't let CPU0 reset CPU1 now that CPU1 is coming up. */
169 mov32 r5, TEGRA_PMC_BASE 174 mov32 r5, TEGRA_PMC_BASE
@@ -186,11 +191,14 @@ __is_not_lp2:
186 191
187#ifdef CONFIG_SMP 192#ifdef CONFIG_SMP
188 /* 193 /*
189 * Can only be secondary boot (initial or hotplug) but CPU 0 194 * Can only be secondary boot (initial or hotplug)
190 * cannot be here. 195 * CPU0 can't be here for Tegra20/30
191 */ 196 */
197 cmp r6, #TEGRA114
198 beq __no_cpu0_chk
192 cmp r10, #0 199 cmp r10, #0
193 bleq __die @ CPU0 cannot be here 200 bleq __die @ CPU0 cannot be here
201__no_cpu0_chk:
194 ldr lr, [r12, #RESET_DATA(STARTUP_SECONDARY)] 202 ldr lr, [r12, #RESET_DATA(STARTUP_SECONDARY)]
195 cmp lr, #0 203 cmp lr, #0
196 bleq __die @ no secondary startup handler 204 bleq __die @ no secondary startup handler
@@ -210,10 +218,7 @@ __die:
210 mov32 r7, TEGRA_CLK_RESET_BASE 218 mov32 r7, TEGRA_CLK_RESET_BASE
211 219
212 /* Are we on Tegra20? */ 220 /* Are we on Tegra20? */
213 mov32 r6, TEGRA_APB_MISC_BASE 221 cmp r6, #TEGRA20
214 ldr r0, [r6, #APB_MISC_GP_HIDREV]
215 and r0, r0, #0xff00
216 cmp r0, #(0x20 << 8)
217 bne 1f 222 bne 1f
218 223
219#ifdef CONFIG_ARCH_TEGRA_2x_SOC 224#ifdef CONFIG_ARCH_TEGRA_2x_SOC
diff --git a/arch/arm/mach-tegra/sleep-tegra30.S b/arch/arm/mach-tegra/sleep-tegra30.S
index d29dfcce948d..ada8821b48be 100644
--- a/arch/arm/mach-tegra/sleep-tegra30.S
+++ b/arch/arm/mach-tegra/sleep-tegra30.S
@@ -19,6 +19,7 @@
19#include <asm/assembler.h> 19#include <asm/assembler.h>
20#include <asm/asm-offsets.h> 20#include <asm/asm-offsets.h>
21 21
22#include "fuse.h"
22#include "sleep.h" 23#include "sleep.h"
23#include "flowctrl.h" 24#include "flowctrl.h"
24 25
@@ -43,14 +44,19 @@ ENDPROC(tegra30_hotplug_shutdown)
43 * 44 *
44 * Puts the current CPU in wait-for-event mode on the flow controller 45 * Puts the current CPU in wait-for-event mode on the flow controller
45 * and powergates it -- flags (in R0) indicate the request type. 46 * and powergates it -- flags (in R0) indicate the request type.
46 * Must never be called for CPU 0.
47 * 47 *
48 * corrupts r0-r4, r12 48 * r10 = SoC ID
49 * corrupts r0-r4, r10-r12
49 */ 50 */
50ENTRY(tegra30_cpu_shutdown) 51ENTRY(tegra30_cpu_shutdown)
51 cpu_id r3 52 cpu_id r3
53 tegra_get_soc_id TEGRA_APB_MISC_VIRT, r10
54 cmp r10, #TEGRA30
55 bne _no_cpu0_chk @ It's not Tegra30
56
52 cmp r3, #0 57 cmp r3, #0
53 moveq pc, lr @ Must never be called for CPU 0 58 moveq pc, lr @ Must never be called for CPU 0
59_no_cpu0_chk:
54 60
55 ldr r12, =TEGRA_FLOW_CTRL_VIRT 61 ldr r12, =TEGRA_FLOW_CTRL_VIRT
56 cpu_to_csr_reg r1, r3 62 cpu_to_csr_reg r1, r3
@@ -65,7 +71,9 @@ ENTRY(tegra30_cpu_shutdown)
65 movw r12, \ 71 movw r12, \
66 FLOW_CTRL_CSR_INTR_FLAG | FLOW_CTRL_CSR_EVENT_FLAG | \ 72 FLOW_CTRL_CSR_INTR_FLAG | FLOW_CTRL_CSR_EVENT_FLAG | \
67 FLOW_CTRL_CSR_ENABLE 73 FLOW_CTRL_CSR_ENABLE
68 mov r4, #(1 << 4) 74 cmp r10, #TEGRA30
75 moveq r4, #(1 << 4) @ wfe bitmap
76 movne r4, #(1 << 8) @ wfi bitmap
69 ARM( orr r12, r12, r4, lsl r3 ) 77 ARM( orr r12, r12, r4, lsl r3 )
70 THUMB( lsl r4, r4, r3 ) 78 THUMB( lsl r4, r4, r3 )
71 THUMB( orr r12, r12, r4 ) 79 THUMB( orr r12, r12, r4 )
@@ -79,9 +87,20 @@ delay_1:
79 cpsid a @ disable imprecise aborts. 87 cpsid a @ disable imprecise aborts.
80 ldr r3, [r1] @ read CSR 88 ldr r3, [r1] @ read CSR
81 str r3, [r1] @ clear CSR 89 str r3, [r1] @ clear CSR
90
82 tst r0, #TEGRA30_POWER_HOTPLUG_SHUTDOWN 91 tst r0, #TEGRA30_POWER_HOTPLUG_SHUTDOWN
92 beq flow_ctrl_setting_for_lp2
93
94 /* flow controller set up for hotplug */
95 mov r3, #FLOW_CTRL_WAITEVENT @ For hotplug
96 b flow_ctrl_done
97flow_ctrl_setting_for_lp2:
98 /* flow controller set up for LP2 */
99 cmp r10, #TEGRA30
83 moveq r3, #FLOW_CTRL_WAIT_FOR_INTERRUPT @ For LP2 100 moveq r3, #FLOW_CTRL_WAIT_FOR_INTERRUPT @ For LP2
84 movne r3, #FLOW_CTRL_WAITEVENT @ For hotplug 101 movne r3, #FLOW_CTRL_WAITEVENT
102flow_ctrl_done:
103 cmp r10, #TEGRA30
85 str r3, [r2] 104 str r3, [r2]
86 ldr r0, [r2] 105 ldr r0, [r2]
87 b wfe_war 106 b wfe_war
@@ -89,7 +108,8 @@ delay_1:
89__cpu_reset_again: 108__cpu_reset_again:
90 dsb 109 dsb
91 .align 5 110 .align 5
92 wfe @ CPU should be power gated here 111 wfeeq @ CPU should be power gated here
112 wfine
93wfe_war: 113wfe_war:
94 b __cpu_reset_again 114 b __cpu_reset_again
95 115
diff --git a/arch/arm/mach-tegra/sleep.S b/arch/arm/mach-tegra/sleep.S
index 364d84523fba..9daaef26b0f6 100644
--- a/arch/arm/mach-tegra/sleep.S
+++ b/arch/arm/mach-tegra/sleep.S
@@ -106,9 +106,11 @@ ENTRY(tegra_shut_off_mmu)
106 isb 106 isb
107#ifdef CONFIG_CACHE_L2X0 107#ifdef CONFIG_CACHE_L2X0
108 /* Disable L2 cache */ 108 /* Disable L2 cache */
109 mov32 r4, TEGRA_ARM_PERIF_BASE + 0x3000 109 check_cpu_part_num 0xc09, r9, r10
110 mov r5, #0 110 movweq r4, #:lower16:(TEGRA_ARM_PERIF_BASE + 0x3000)
111 str r5, [r4, #L2X0_CTRL] 111 movteq r4, #:upper16:(TEGRA_ARM_PERIF_BASE + 0x3000)
112 moveq r5, #0
113 streq r5, [r4, #L2X0_CTRL]
112#endif 114#endif
113 mov pc, r0 115 mov pc, r0
114ENDPROC(tegra_shut_off_mmu) 116ENDPROC(tegra_shut_off_mmu)
diff --git a/arch/arm/mach-tegra/sleep.h b/arch/arm/mach-tegra/sleep.h
index 2080fb12ce26..98b7da698f2b 100644
--- a/arch/arm/mach-tegra/sleep.h
+++ b/arch/arm/mach-tegra/sleep.h
@@ -25,6 +25,8 @@
25 + IO_PPSB_VIRT) 25 + IO_PPSB_VIRT)
26#define TEGRA_CLK_RESET_VIRT (TEGRA_CLK_RESET_BASE - IO_PPSB_PHYS \ 26#define TEGRA_CLK_RESET_VIRT (TEGRA_CLK_RESET_BASE - IO_PPSB_PHYS \
27 + IO_PPSB_VIRT) 27 + IO_PPSB_VIRT)
28#define TEGRA_APB_MISC_VIRT (TEGRA_APB_MISC_BASE - IO_APB_PHYS \
29 + IO_APB_VIRT)
28#define TEGRA_PMC_VIRT (TEGRA_PMC_BASE - IO_APB_PHYS + IO_APB_VIRT) 30#define TEGRA_PMC_VIRT (TEGRA_PMC_BASE - IO_APB_PHYS + IO_APB_VIRT)
29 31
30/* PMC_SCRATCH37-39 and 41 are used for tegra_pen_lock and idle */ 32/* PMC_SCRATCH37-39 and 41 are used for tegra_pen_lock and idle */
@@ -70,19 +72,40 @@
70 movt \reg, #:upper16:\val 72 movt \reg, #:upper16:\val
71.endm 73.endm
72 74
75/* Marco to check CPU part num */
76.macro check_cpu_part_num part_num, tmp1, tmp2
77 mrc p15, 0, \tmp1, c0, c0, 0
78 ubfx \tmp1, \tmp1, #4, #12
79 mov32 \tmp2, \part_num
80 cmp \tmp1, \tmp2
81.endm
82
73/* Macro to exit SMP coherency. */ 83/* Macro to exit SMP coherency. */
74.macro exit_smp, tmp1, tmp2 84.macro exit_smp, tmp1, tmp2
75 mrc p15, 0, \tmp1, c1, c0, 1 @ ACTLR 85 mrc p15, 0, \tmp1, c1, c0, 1 @ ACTLR
76 bic \tmp1, \tmp1, #(1<<6) | (1<<0) @ clear ACTLR.SMP | ACTLR.FW 86 bic \tmp1, \tmp1, #(1<<6) | (1<<0) @ clear ACTLR.SMP | ACTLR.FW
77 mcr p15, 0, \tmp1, c1, c0, 1 @ ACTLR 87 mcr p15, 0, \tmp1, c1, c0, 1 @ ACTLR
78 isb 88 isb
79 cpu_id \tmp1 89#ifdef CONFIG_HAVE_ARM_SCU
80 mov \tmp1, \tmp1, lsl #2 90 check_cpu_part_num 0xc09, \tmp1, \tmp2
81 mov \tmp2, #0xf 91 mrceq p15, 0, \tmp1, c0, c0, 5
82 mov \tmp2, \tmp2, lsl \tmp1 92 andeq \tmp1, \tmp1, #0xF
83 mov32 \tmp1, TEGRA_ARM_PERIF_VIRT + 0xC 93 moveq \tmp1, \tmp1, lsl #2
84 str \tmp2, [\tmp1] @ invalidate SCU tags for CPU 94 moveq \tmp2, #0xf
95 moveq \tmp2, \tmp2, lsl \tmp1
96 ldreq \tmp1, =(TEGRA_ARM_PERIF_VIRT + 0xC)
97 streq \tmp2, [\tmp1] @ invalidate SCU tags for CPU
85 dsb 98 dsb
99#endif
100.endm
101
102/* Macro to check Tegra revision */
103#define APB_MISC_GP_HIDREV 0x804
104.macro tegra_get_soc_id base, tmp1
105 mov32 \tmp1, \base
106 ldr \tmp1, [\tmp1, #APB_MISC_GP_HIDREV]
107 and \tmp1, \tmp1, #0xff00
108 mov \tmp1, \tmp1, lsr #8
86.endm 109.endm
87 110
88/* Macro to resume & re-enable L2 cache */ 111/* Macro to resume & re-enable L2 cache */
diff --git a/arch/arm/mach-tegra/tegra2_emc.c b/arch/arm/mach-tegra/tegra2_emc.c
index 31e69a019bdd..3ae4a7f1a2fb 100644
--- a/arch/arm/mach-tegra/tegra2_emc.c
+++ b/arch/arm/mach-tegra/tegra2_emc.c
@@ -183,7 +183,7 @@ static struct device_node *tegra_emc_ramcode_devnode(struct device_node *np)
183 u32 reg; 183 u32 reg;
184 184
185 for_each_child_of_node(np, iter) { 185 for_each_child_of_node(np, iter) {
186 if (of_property_read_u32(np, "nvidia,ram-code", &reg)) 186 if (of_property_read_u32(iter, "nvidia,ram-code", &reg))
187 continue; 187 continue;
188 if (reg == tegra_bct_strapping) 188 if (reg == tegra_bct_strapping)
189 return of_node_get(iter); 189 return of_node_get(iter);
diff --git a/arch/arm/mach-u300/Kconfig b/arch/arm/mach-u300/Kconfig
index 1f597647d431..a85adcd00882 100644
--- a/arch/arm/mach-u300/Kconfig
+++ b/arch/arm/mach-u300/Kconfig
@@ -1,24 +1,46 @@
1if ARCH_U300
2
3menu "ST-Ericsson AB U300/U335 Platform" 1menu "ST-Ericsson AB U300/U335 Platform"
4 2
5comment "ST-Ericsson Mobile Platform Products" 3comment "ST-Ericsson Mobile Platform Products"
6 4
7config MACH_U300 5config ARCH_U300
8 bool "U300" 6 bool "ST-Ericsson U300 Series" if ARCH_MULTI_V5
7 depends on MMU
8 select ARCH_REQUIRE_GPIOLIB
9 select ARM_AMBA
10 select ARM_PATCH_PHYS_VIRT
11 select ARM_VIC
12 select CLKDEV_LOOKUP
13 select CLKSRC_MMIO
14 select CLKSRC_OF
15 select COMMON_CLK
16 select CPU_ARM926T
17 select GENERIC_CLOCKEVENTS
18 select HAVE_TCM
9 select PINCTRL 19 select PINCTRL
10 select PINCTRL_COH901 20 select PINCTRL_COH901
11 select PINCTRL_U300 21 select PINCTRL_U300
22 select SPARSE_IRQ
23 select MFD_SYSCON
24 select USE_OF
25 help
26 Support for ST-Ericsson U300 series mobile platforms.
12 27
13comment "ST-Ericsson U300/U335 Feature Selections" 28comment "ST-Ericsson U300/U335 Feature Selections"
14 29
30config MACH_U300
31 depends on ARCH_U300
32 bool "U300"
33 default y
34
15config U300_DEBUG 35config U300_DEBUG
36 depends on ARCH_U300
16 bool "Debug support for U300" 37 bool "Debug support for U300"
17 depends on PM 38 depends on PM
18 help 39 help
19 Debug support for U300 in sysfs, procfs etc. 40 Debug support for U300 in sysfs, procfs etc.
20 41
21config MACH_U300_SPIDUMMY 42config MACH_U300_SPIDUMMY
43 depends on ARCH_U300
22 bool "SSP/SPI dummy chip" 44 bool "SSP/SPI dummy chip"
23 select SPI 45 select SPI
24 select SPI_MASTER 46 select SPI_MASTER
@@ -31,5 +53,3 @@ config MACH_U300_SPIDUMMY
31 SPI framework and ARM PL022 support. 53 SPI framework and ARM PL022 support.
32 54
33endmenu 55endmenu
34
35endif
diff --git a/arch/arm/mach-u300/Makefile b/arch/arm/mach-u300/Makefile
index 5a86c58da396..0f362b64fb87 100644
--- a/arch/arm/mach-u300/Makefile
+++ b/arch/arm/mach-u300/Makefile
@@ -7,7 +7,5 @@ obj-m :=
7obj-n := 7obj-n :=
8obj- := 8obj- :=
9 9
10obj-$(CONFIG_SPI_PL022) += spi.o
11obj-$(CONFIG_MACH_U300_SPIDUMMY) += dummyspichip.o 10obj-$(CONFIG_MACH_U300_SPIDUMMY) += dummyspichip.o
12obj-$(CONFIG_I2C_STU300) += i2c.o
13obj-$(CONFIG_REGULATOR_AB3100) += regulator.o 11obj-$(CONFIG_REGULATOR_AB3100) += regulator.o
diff --git a/arch/arm/mach-u300/core.c b/arch/arm/mach-u300/core.c
index a683d17b2ce4..35670b15f281 100644
--- a/arch/arm/mach-u300/core.c
+++ b/arch/arm/mach-u300/core.c
@@ -9,46 +9,157 @@
9 * Author: Linus Walleij <linus.walleij@stericsson.com> 9 * Author: Linus Walleij <linus.walleij@stericsson.com>
10 */ 10 */
11#include <linux/kernel.h> 11#include <linux/kernel.h>
12#include <linux/init.h>
13#include <linux/spinlock.h>
14#include <linux/interrupt.h>
15#include <linux/bitops.h>
16#include <linux/device.h>
17#include <linux/mm.h>
18#include <linux/termios.h>
19#include <linux/dmaengine.h>
20#include <linux/amba/bus.h>
21#include <linux/amba/mmci.h>
22#include <linux/amba/serial.h>
23#include <linux/platform_device.h>
24#include <linux/gpio.h>
25#include <linux/clk.h>
26#include <linux/err.h>
27#include <linux/mtd/nand.h>
28#include <linux/mtd/fsmc.h>
29#include <linux/pinctrl/machine.h> 12#include <linux/pinctrl/machine.h>
30#include <linux/pinctrl/pinconf-generic.h> 13#include <linux/pinctrl/pinconf-generic.h>
31#include <linux/dma-mapping.h>
32#include <linux/platform_data/clk-u300.h> 14#include <linux/platform_data/clk-u300.h>
33#include <linux/platform_data/pinctrl-coh901.h> 15#include <linux/irqchip.h>
34#include <linux/platform_data/dma-coh901318.h> 16#include <linux/of_address.h>
35#include <linux/irqchip/arm-vic.h> 17#include <linux/of_platform.h>
18#include <linux/clocksource.h>
19#include <linux/clk.h>
36 20
37#include <asm/types.h>
38#include <asm/setup.h>
39#include <asm/memory.h>
40#include <asm/mach/map.h> 21#include <asm/mach/map.h>
41#include <asm/mach-types.h>
42#include <asm/mach/arch.h> 22#include <asm/mach/arch.h>
43 23
44#include <mach/hardware.h> 24/*
45#include <mach/syscon.h> 25 * These are the large blocks of memory allocated for I/O.
46#include <mach/irqs.h> 26 * the defines are used for setting up the I/O memory mapping.
27 */
28
29/* NAND Flash CS0 */
30#define U300_NAND_CS0_PHYS_BASE 0x80000000
31/* NFIF */
32#define U300_NAND_IF_PHYS_BASE 0x9f800000
33/* ALE, CLE offset for FSMC NAND */
34#define PLAT_NAND_CLE (1 << 16)
35#define PLAT_NAND_ALE (1 << 17)
36/* AHB Peripherals */
37#define U300_AHB_PER_PHYS_BASE 0xa0000000
38#define U300_AHB_PER_VIRT_BASE 0xff010000
39/* FAST Peripherals */
40#define U300_FAST_PER_PHYS_BASE 0xc0000000
41#define U300_FAST_PER_VIRT_BASE 0xff020000
42/* SLOW Peripherals */
43#define U300_SLOW_PER_PHYS_BASE 0xc0010000
44#define U300_SLOW_PER_VIRT_BASE 0xff000000
45/* Boot ROM */
46#define U300_BOOTROM_PHYS_BASE 0xffff0000
47#define U300_BOOTROM_VIRT_BASE 0xffff0000
48/* SEMI config base */
49#define U300_SEMI_CONFIG_BASE 0x2FFE0000
50
51/*
52 * AHB peripherals
53 */
54
55/* AHB Peripherals Bridge Controller */
56#define U300_AHB_BRIDGE_BASE (U300_AHB_PER_PHYS_BASE+0x0000)
57/* Vectored Interrupt Controller 0, servicing 32 interrupts */
58#define U300_INTCON0_BASE (U300_AHB_PER_PHYS_BASE+0x1000)
59#define U300_INTCON0_VBASE IOMEM(U300_AHB_PER_VIRT_BASE+0x1000)
60/* Vectored Interrupt Controller 1, servicing 32 interrupts */
61#define U300_INTCON1_BASE (U300_AHB_PER_PHYS_BASE+0x2000)
62#define U300_INTCON1_VBASE IOMEM(U300_AHB_PER_VIRT_BASE+0x2000)
63/* Memory Stick Pro (MSPRO) controller */
64#define U300_MSPRO_BASE (U300_AHB_PER_PHYS_BASE+0x3000)
65/* EMIF Configuration Area */
66#define U300_EMIF_CFG_BASE (U300_AHB_PER_PHYS_BASE+0x4000)
67
68/*
69 * FAST peripherals
70 */
71
72/* FAST bridge control */
73#define U300_FAST_BRIDGE_BASE (U300_FAST_PER_PHYS_BASE+0x0000)
74/* MMC/SD controller */
75#define U300_MMCSD_BASE (U300_FAST_PER_PHYS_BASE+0x1000)
76/* PCM I2S0 controller */
77#define U300_PCM_I2S0_BASE (U300_FAST_PER_PHYS_BASE+0x2000)
78/* PCM I2S1 controller */
79#define U300_PCM_I2S1_BASE (U300_FAST_PER_PHYS_BASE+0x3000)
80/* I2C0 controller */
81#define U300_I2C0_BASE (U300_FAST_PER_PHYS_BASE+0x4000)
82/* I2C1 controller */
83#define U300_I2C1_BASE (U300_FAST_PER_PHYS_BASE+0x5000)
84/* SPI controller */
85#define U300_SPI_BASE (U300_FAST_PER_PHYS_BASE+0x6000)
86/* Fast UART1 on U335 only */
87#define U300_UART1_BASE (U300_FAST_PER_PHYS_BASE+0x7000)
88
89/*
90 * SLOW peripherals
91 */
47 92
48#include "timer.h" 93/* SLOW bridge control */
49#include "spi.h" 94#define U300_SLOW_BRIDGE_BASE (U300_SLOW_PER_PHYS_BASE)
50#include "i2c.h" 95/* SYSCON */
51#include "u300-gpio.h" 96#define U300_SYSCON_BASE (U300_SLOW_PER_PHYS_BASE+0x1000)
97#define U300_SYSCON_VBASE IOMEM(U300_SLOW_PER_VIRT_BASE+0x1000)
98/* Watchdog */
99#define U300_WDOG_BASE (U300_SLOW_PER_PHYS_BASE+0x2000)
100/* UART0 */
101#define U300_UART0_BASE (U300_SLOW_PER_PHYS_BASE+0x3000)
102/* APP side special timer */
103#define U300_TIMER_APP_BASE (U300_SLOW_PER_PHYS_BASE+0x4000)
104#define U300_TIMER_APP_VBASE IOMEM(U300_SLOW_PER_VIRT_BASE+0x4000)
105/* Keypad */
106#define U300_KEYPAD_BASE (U300_SLOW_PER_PHYS_BASE+0x5000)
107/* GPIO */
108#define U300_GPIO_BASE (U300_SLOW_PER_PHYS_BASE+0x6000)
109/* RTC */
110#define U300_RTC_BASE (U300_SLOW_PER_PHYS_BASE+0x7000)
111/* Bus tracer */
112#define U300_BUSTR_BASE (U300_SLOW_PER_PHYS_BASE+0x8000)
113/* Event handler (hardware queue) */
114#define U300_EVHIST_BASE (U300_SLOW_PER_PHYS_BASE+0x9000)
115/* Genric Timer */
116#define U300_TIMER_BASE (U300_SLOW_PER_PHYS_BASE+0xa000)
117/* PPM */
118#define U300_PPM_BASE (U300_SLOW_PER_PHYS_BASE+0xb000)
119
120/*
121 * REST peripherals
122 */
123
124/* ISP (image signal processor) */
125#define U300_ISP_BASE (0xA0008000)
126/* DMA Controller base */
127#define U300_DMAC_BASE (0xC0020000)
128/* MSL Base */
129#define U300_MSL_BASE (0xc0022000)
130/* APEX Base */
131#define U300_APEX_BASE (0xc0030000)
132/* Video Encoder Base */
133#define U300_VIDEOENC_BASE (0xc0080000)
134/* XGAM Base */
135#define U300_XGAM_BASE (0xd0000000)
136
137/*
138 * SYSCON addresses applicable to the core machine.
139 */
140
141/* Chip ID register 16bit (R/-) */
142#define U300_SYSCON_CIDR (0x400)
143/* SMCR */
144#define U300_SYSCON_SMCR (0x4d0)
145#define U300_SYSCON_SMCR_FIELD_MASK (0x000e)
146#define U300_SYSCON_SMCR_SEMI_SREFACK_IND (0x0008)
147#define U300_SYSCON_SMCR_SEMI_SREFREQ_ENABLE (0x0004)
148#define U300_SYSCON_SMCR_SEMI_EXT_BOOT_MODE_ENABLE (0x0002)
149/* CPU_SW_DBGEN Software Debug Enable 16bit (R/W) */
150#define U300_SYSCON_CSDR (0x4f0)
151#define U300_SYSCON_CSDR_SW_DEBUG_ENABLE (0x0001)
152/* PRINT_CONTROL Print Control 16bit (R/-) */
153#define U300_SYSCON_PCR (0x4f8)
154#define U300_SYSCON_PCR_SERV_IND (0x0001)
155/* BOOT_CONTROL 16bit (R/-) */
156#define U300_SYSCON_BCR (0x4fc)
157#define U300_SYSCON_BCR_ACC_CPU_SUBSYS_VINITHI_IND (0x0400)
158#define U300_SYSCON_BCR_APP_CPU_SUBSYS_VINITHI_IND (0x0200)
159#define U300_SYSCON_BCR_EXTRA_BOOT_OPTION_MASK (0x01FC)
160#define U300_SYSCON_BCR_APP_BOOT_SERV_MASK (0x0003)
161
162static void __iomem *syscon_base;
52 163
53/* 164/*
54 * Static I/O mappings that are needed for booting the U300 platforms. The 165 * Static I/O mappings that are needed for booting the U300 platforms. The
@@ -82,365 +193,6 @@ static void __init u300_map_io(void)
82 iotable_init(u300_io_desc, ARRAY_SIZE(u300_io_desc)); 193 iotable_init(u300_io_desc, ARRAY_SIZE(u300_io_desc));
83} 194}
84 195
85/*
86 * Declaration of devices found on the U300 board and
87 * their respective memory locations.
88 */
89
90static struct amba_pl011_data uart0_plat_data = {
91#ifdef CONFIG_COH901318
92 .dma_filter = coh901318_filter_id,
93 .dma_rx_param = (void *) U300_DMA_UART0_RX,
94 .dma_tx_param = (void *) U300_DMA_UART0_TX,
95#endif
96};
97
98/* Slow device at 0x3000 offset */
99static AMBA_APB_DEVICE(uart0, "uart0", 0, U300_UART0_BASE,
100 { IRQ_U300_UART0 }, &uart0_plat_data);
101
102/* The U335 have an additional UART1 on the APP CPU */
103static struct amba_pl011_data uart1_plat_data = {
104#ifdef CONFIG_COH901318
105 .dma_filter = coh901318_filter_id,
106 .dma_rx_param = (void *) U300_DMA_UART1_RX,
107 .dma_tx_param = (void *) U300_DMA_UART1_TX,
108#endif
109};
110
111/* Fast device at 0x7000 offset */
112static AMBA_APB_DEVICE(uart1, "uart1", 0, U300_UART1_BASE,
113 { IRQ_U300_UART1 }, &uart1_plat_data);
114
115/* AHB device at 0x4000 offset */
116static AMBA_APB_DEVICE(pl172, "pl172", 0, U300_EMIF_CFG_BASE, { }, NULL);
117
118/* Fast device at 0x6000 offset */
119static AMBA_APB_DEVICE(pl022, "pl022", 0, U300_SPI_BASE,
120 { IRQ_U300_SPI }, NULL);
121
122/* Fast device at 0x1000 offset */
123#define U300_MMCSD_IRQS { IRQ_U300_MMCSD_MCIINTR0, IRQ_U300_MMCSD_MCIINTR1 }
124
125static struct mmci_platform_data mmcsd_platform_data = {
126 /*
127 * Do not set ocr_mask or voltage translation function,
128 * we have a regulator we can control instead.
129 */
130 .f_max = 24000000,
131 .gpio_wp = -1,
132 .gpio_cd = U300_GPIO_PIN_MMC_CD,
133 .cd_invert = true,
134 .capabilities = MMC_CAP_MMC_HIGHSPEED |
135 MMC_CAP_SD_HIGHSPEED | MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA,
136#ifdef CONFIG_COH901318
137 .dma_filter = coh901318_filter_id,
138 .dma_rx_param = (void *) U300_DMA_MMCSD_RX_TX,
139 /* Don't specify a TX channel, this RX channel is bidirectional */
140#endif
141};
142
143static AMBA_APB_DEVICE(mmcsd, "mmci", 0, U300_MMCSD_BASE,
144 U300_MMCSD_IRQS, &mmcsd_platform_data);
145
146/*
147 * The order of device declaration may be important, since some devices
148 * have dependencies on other devices being initialized first.
149 */
150static struct amba_device *amba_devs[] __initdata = {
151 &uart0_device,
152 &uart1_device,
153 &pl022_device,
154 &pl172_device,
155 &mmcsd_device,
156};
157
158/* Here follows a list of all hw resources that the platform devices
159 * allocate. Note, clock dependencies are not included
160 */
161
162static struct resource gpio_resources[] = {
163 {
164 .start = U300_GPIO_BASE,
165 .end = (U300_GPIO_BASE + SZ_4K - 1),
166 .flags = IORESOURCE_MEM,
167 },
168 {
169 .name = "gpio0",
170 .start = IRQ_U300_GPIO_PORT0,
171 .end = IRQ_U300_GPIO_PORT0,
172 .flags = IORESOURCE_IRQ,
173 },
174 {
175 .name = "gpio1",
176 .start = IRQ_U300_GPIO_PORT1,
177 .end = IRQ_U300_GPIO_PORT1,
178 .flags = IORESOURCE_IRQ,
179 },
180 {
181 .name = "gpio2",
182 .start = IRQ_U300_GPIO_PORT2,
183 .end = IRQ_U300_GPIO_PORT2,
184 .flags = IORESOURCE_IRQ,
185 },
186 {
187 .name = "gpio3",
188 .start = IRQ_U300_GPIO_PORT3,
189 .end = IRQ_U300_GPIO_PORT3,
190 .flags = IORESOURCE_IRQ,
191 },
192 {
193 .name = "gpio4",
194 .start = IRQ_U300_GPIO_PORT4,
195 .end = IRQ_U300_GPIO_PORT4,
196 .flags = IORESOURCE_IRQ,
197 },
198 {
199 .name = "gpio5",
200 .start = IRQ_U300_GPIO_PORT5,
201 .end = IRQ_U300_GPIO_PORT5,
202 .flags = IORESOURCE_IRQ,
203 },
204 {
205 .name = "gpio6",
206 .start = IRQ_U300_GPIO_PORT6,
207 .end = IRQ_U300_GPIO_PORT6,
208 .flags = IORESOURCE_IRQ,
209 },
210};
211
212static struct resource keypad_resources[] = {
213 {
214 .start = U300_KEYPAD_BASE,
215 .end = U300_KEYPAD_BASE + SZ_4K - 1,
216 .flags = IORESOURCE_MEM,
217 },
218 {
219 .name = "coh901461-press",
220 .start = IRQ_U300_KEYPAD_KEYBF,
221 .end = IRQ_U300_KEYPAD_KEYBF,
222 .flags = IORESOURCE_IRQ,
223 },
224 {
225 .name = "coh901461-release",
226 .start = IRQ_U300_KEYPAD_KEYBR,
227 .end = IRQ_U300_KEYPAD_KEYBR,
228 .flags = IORESOURCE_IRQ,
229 },
230};
231
232static struct resource rtc_resources[] = {
233 {
234 .start = U300_RTC_BASE,
235 .end = U300_RTC_BASE + SZ_4K - 1,
236 .flags = IORESOURCE_MEM,
237 },
238 {
239 .start = IRQ_U300_RTC,
240 .end = IRQ_U300_RTC,
241 .flags = IORESOURCE_IRQ,
242 },
243};
244
245/*
246 * Fsmc does have IRQs: #43 and #44 (NFIF and NFIF2)
247 * but these are not yet used by the driver.
248 */
249static struct resource fsmc_resources[] = {
250 {
251 .name = "nand_addr",
252 .start = U300_NAND_CS0_PHYS_BASE + PLAT_NAND_ALE,
253 .end = U300_NAND_CS0_PHYS_BASE + PLAT_NAND_ALE + SZ_16K - 1,
254 .flags = IORESOURCE_MEM,
255 },
256 {
257 .name = "nand_cmd",
258 .start = U300_NAND_CS0_PHYS_BASE + PLAT_NAND_CLE,
259 .end = U300_NAND_CS0_PHYS_BASE + PLAT_NAND_CLE + SZ_16K - 1,
260 .flags = IORESOURCE_MEM,
261 },
262 {
263 .name = "nand_data",
264 .start = U300_NAND_CS0_PHYS_BASE,
265 .end = U300_NAND_CS0_PHYS_BASE + SZ_16K - 1,
266 .flags = IORESOURCE_MEM,
267 },
268 {
269 .name = "fsmc_regs",
270 .start = U300_NAND_IF_PHYS_BASE,
271 .end = U300_NAND_IF_PHYS_BASE + SZ_4K - 1,
272 .flags = IORESOURCE_MEM,
273 },
274};
275
276static struct resource i2c0_resources[] = {
277 {
278 .start = U300_I2C0_BASE,
279 .end = U300_I2C0_BASE + SZ_4K - 1,
280 .flags = IORESOURCE_MEM,
281 },
282 {
283 .start = IRQ_U300_I2C0,
284 .end = IRQ_U300_I2C0,
285 .flags = IORESOURCE_IRQ,
286 },
287};
288
289static struct resource i2c1_resources[] = {
290 {
291 .start = U300_I2C1_BASE,
292 .end = U300_I2C1_BASE + SZ_4K - 1,
293 .flags = IORESOURCE_MEM,
294 },
295 {
296 .start = IRQ_U300_I2C1,
297 .end = IRQ_U300_I2C1,
298 .flags = IORESOURCE_IRQ,
299 },
300
301};
302
303static struct resource wdog_resources[] = {
304 {
305 .start = U300_WDOG_BASE,
306 .end = U300_WDOG_BASE + SZ_4K - 1,
307 .flags = IORESOURCE_MEM,
308 },
309 {
310 .start = IRQ_U300_WDOG,
311 .end = IRQ_U300_WDOG,
312 .flags = IORESOURCE_IRQ,
313 }
314};
315
316static struct resource dma_resource[] = {
317 {
318 .start = U300_DMAC_BASE,
319 .end = U300_DMAC_BASE + PAGE_SIZE - 1,
320 .flags = IORESOURCE_MEM,
321 },
322 {
323 .start = IRQ_U300_DMA,
324 .end = IRQ_U300_DMA,
325 .flags = IORESOURCE_IRQ,
326 }
327};
328
329
330static struct resource pinctrl_resources[] = {
331 {
332 .start = U300_SYSCON_BASE,
333 .end = U300_SYSCON_BASE + SZ_4K - 1,
334 .flags = IORESOURCE_MEM,
335 },
336};
337
338static struct platform_device wdog_device = {
339 .name = "coh901327_wdog",
340 .id = -1,
341 .num_resources = ARRAY_SIZE(wdog_resources),
342 .resource = wdog_resources,
343};
344
345static struct platform_device i2c0_device = {
346 .name = "stu300",
347 .id = 0,
348 .num_resources = ARRAY_SIZE(i2c0_resources),
349 .resource = i2c0_resources,
350};
351
352static struct platform_device i2c1_device = {
353 .name = "stu300",
354 .id = 1,
355 .num_resources = ARRAY_SIZE(i2c1_resources),
356 .resource = i2c1_resources,
357};
358
359static struct platform_device pinctrl_device = {
360 .name = "pinctrl-u300",
361 .id = -1,
362 .num_resources = ARRAY_SIZE(pinctrl_resources),
363 .resource = pinctrl_resources,
364};
365
366/*
367 * The different variants have a few different versions of the
368 * GPIO block, with different number of ports.
369 */
370static struct u300_gpio_platform u300_gpio_plat = {
371 .ports = 7,
372 .gpio_base = 0,
373};
374
375static struct platform_device gpio_device = {
376 .name = "u300-gpio",
377 .id = -1,
378 .num_resources = ARRAY_SIZE(gpio_resources),
379 .resource = gpio_resources,
380 .dev = {
381 .platform_data = &u300_gpio_plat,
382 },
383};
384
385static struct platform_device keypad_device = {
386 .name = "keypad",
387 .id = -1,
388 .num_resources = ARRAY_SIZE(keypad_resources),
389 .resource = keypad_resources,
390};
391
392static struct platform_device rtc_device = {
393 .name = "rtc-coh901331",
394 .id = -1,
395 .num_resources = ARRAY_SIZE(rtc_resources),
396 .resource = rtc_resources,
397};
398
399static struct mtd_partition u300_partitions[] = {
400 {
401 .name = "bootrecords",
402 .offset = 0,
403 .size = SZ_128K,
404 },
405 {
406 .name = "free",
407 .offset = SZ_128K,
408 .size = 8064 * SZ_1K,
409 },
410 {
411 .name = "platform",
412 .offset = 8192 * SZ_1K,
413 .size = 253952 * SZ_1K,
414 },
415};
416
417static struct fsmc_nand_platform_data nand_platform_data = {
418 .partitions = u300_partitions,
419 .nr_partitions = ARRAY_SIZE(u300_partitions),
420 .options = NAND_SKIP_BBTSCAN,
421 .width = FSMC_NAND_BW8,
422};
423
424static struct platform_device nand_device = {
425 .name = "fsmc-nand",
426 .id = -1,
427 .resource = fsmc_resources,
428 .num_resources = ARRAY_SIZE(fsmc_resources),
429 .dev = {
430 .platform_data = &nand_platform_data,
431 },
432};
433
434static struct platform_device dma_device = {
435 .name = "coh901318",
436 .id = -1,
437 .resource = dma_resource,
438 .num_resources = ARRAY_SIZE(dma_resource),
439 .dev = {
440 .coherent_dma_mask = ~0,
441 },
442};
443
444static unsigned long pin_pullup_conf[] = { 196static unsigned long pin_pullup_conf[] = {
445 PIN_CONF_PACKED(PIN_CONFIG_BIAS_PULL_UP, 1), 197 PIN_CONF_PACKED(PIN_CONFIG_BIAS_PULL_UP, 1),
446}; 198};
@@ -467,61 +219,6 @@ static struct pinctrl_map __initdata u300_pinmux_map[] = {
467 pin_highz_conf), 219 pin_highz_conf),
468}; 220};
469 221
470/*
471 * Notice that AMBA devices are initialized before platform devices.
472 *
473 */
474static struct platform_device *platform_devs[] __initdata = {
475 &dma_device,
476 &i2c0_device,
477 &i2c1_device,
478 &keypad_device,
479 &rtc_device,
480 &pinctrl_device,
481 &gpio_device,
482 &nand_device,
483 &wdog_device,
484};
485
486/*
487 * Interrupts: the U300 platforms have two pl190 ARM PrimeCells connected
488 * together so some interrupts are connected to the first one and some
489 * to the second one.
490 */
491static void __init u300_init_irq(void)
492{
493 u32 mask[2] = {0, 0};
494 struct clk *clk;
495 int i;
496
497 /* initialize clocking early, we want to clock the INTCON */
498 u300_clk_init(U300_SYSCON_VBASE);
499
500 /* Bootstrap EMIF and SEMI clocks */
501 clk = clk_get_sys("pl172", NULL);
502 BUG_ON(IS_ERR(clk));
503 clk_prepare_enable(clk);
504 clk = clk_get_sys("semi", NULL);
505 BUG_ON(IS_ERR(clk));
506 clk_prepare_enable(clk);
507
508 /* Clock the interrupt controller */
509 clk = clk_get_sys("intcon", NULL);
510 BUG_ON(IS_ERR(clk));
511 clk_prepare_enable(clk);
512
513 for (i = 0; i < U300_VIC_IRQS_END; i++)
514 set_bit(i, (unsigned long *) &mask[0]);
515 vic_init((void __iomem *) U300_INTCON0_VBASE, IRQ_U300_INTCON0_START,
516 mask[0], mask[0]);
517 vic_init((void __iomem *) U300_INTCON1_VBASE, IRQ_U300_INTCON1_START,
518 mask[1], mask[1]);
519}
520
521
522/*
523 * U300 platforms peripheral handling
524 */
525struct db_chip { 222struct db_chip {
526 u16 chipid; 223 u16 chipid;
527 const char *name; 224 const char *name;
@@ -578,7 +275,7 @@ static void __init u300_init_check_chip(void)
578 const char unknown[] = "UNKNOWN"; 275 const char unknown[] = "UNKNOWN";
579 276
580 /* Read out and print chip ID */ 277 /* Read out and print chip ID */
581 val = readw(U300_SYSCON_VBASE + U300_SYSCON_CIDR); 278 val = readw(syscon_base + U300_SYSCON_CIDR);
582 /* This is in funky bigendian order... */ 279 /* This is in funky bigendian order... */
583 val = (val & 0xFFU) << 8 | (val >> 8); 280 val = (val & 0xFFU) << 8 | (val >> 8);
584 chip = db_chips; 281 chip = db_chips;
@@ -600,101 +297,119 @@ static void __init u300_init_check_chip(void)
600 } 297 }
601} 298}
602 299
603/* 300/* Forward declare this function from the watchdog */
604 * Some devices and their resources require reserved physical memory from 301void coh901327_watchdog_reset(void);
605 * the end of the available RAM. This function traverses the list of devices 302
606 * and assigns actual addresses to these. 303static void u300_restart(enum reboot_mode mode, const char *cmd)
607 */
608static void __init u300_assign_physmem(void)
609{ 304{
610 unsigned long curr_start = __pa(high_memory); 305 switch (mode) {
611 int i, j; 306 case REBOOT_SOFT:
612 307 case REBOOT_HARD:
613 for (i = 0; i < ARRAY_SIZE(platform_devs); i++) { 308#ifdef CONFIG_COH901327_WATCHDOG
614 for (j = 0; j < platform_devs[i]->num_resources; j++) { 309 coh901327_watchdog_reset();
615 struct resource *const res = 310#endif
616 &platform_devs[i]->resource[j]; 311 break;
617 312 default:
618 if (IORESOURCE_MEM == res->flags && 313 /* Do nothing */
619 0 == res->start) { 314 break;
620 res->start = curr_start;
621 res->end += curr_start;
622 curr_start += resource_size(res);
623
624 printk(KERN_INFO "core.c: Mapping RAM " \
625 "%#x-%#x to device %s:%s\n",
626 res->start, res->end,
627 platform_devs[i]->name, res->name);
628 }
629 }
630 } 315 }
316 /* Wait for system do die/reset. */
317 while (1);
631} 318}
632 319
633static void __init u300_init_machine(void) 320/* These are mostly to get the right device names for the clock lookups */
321static struct of_dev_auxdata u300_auxdata_lookup[] __initdata = {
322 OF_DEV_AUXDATA("stericsson,pinctrl-u300", U300_SYSCON_BASE,
323 "pinctrl-u300", NULL),
324 OF_DEV_AUXDATA("stericsson,gpio-coh901", U300_GPIO_BASE,
325 "u300-gpio", NULL),
326 OF_DEV_AUXDATA("stericsson,coh901327", U300_WDOG_BASE,
327 "coh901327_wdog", NULL),
328 OF_DEV_AUXDATA("stericsson,coh901331", U300_RTC_BASE,
329 "rtc-coh901331", NULL),
330 OF_DEV_AUXDATA("stericsson,coh901318", U300_DMAC_BASE,
331 "coh901318", NULL),
332 OF_DEV_AUXDATA("stericsson,fsmc-nand", U300_NAND_IF_PHYS_BASE,
333 "fsmc-nand", NULL),
334 OF_DEV_AUXDATA("arm,primecell", U300_UART0_BASE,
335 "uart0", NULL),
336 OF_DEV_AUXDATA("arm,primecell", U300_UART1_BASE,
337 "uart1", NULL),
338 OF_DEV_AUXDATA("arm,primecell", U300_SPI_BASE,
339 "pl022", NULL),
340 OF_DEV_AUXDATA("st,ddci2c", U300_I2C0_BASE,
341 "stu300.0", NULL),
342 OF_DEV_AUXDATA("st,ddci2c", U300_I2C1_BASE,
343 "stu300.1", NULL),
344 OF_DEV_AUXDATA("arm,primecell", U300_MMCSD_BASE,
345 "mmci", NULL),
346 { /* sentinel */ },
347};
348
349static void __init u300_init_irq_dt(void)
634{ 350{
635 int i; 351 struct device_node *syscon;
636 u16 val; 352 struct clk *clk;
637 353
638 /* Check what platform we run and print some status information */ 354 syscon = of_find_node_by_path("/syscon@c0011000");
639 u300_init_check_chip(); 355 if (!syscon) {
356 pr_crit("could not find syscon node\n");
357 return;
358 }
359 syscon_base = of_iomap(syscon, 0);
360 if (!syscon_base) {
361 pr_crit("could not remap syscon\n");
362 return;
363 }
364 /* initialize clocking early, we want to clock the INTCON */
365 u300_clk_init(syscon_base);
640 366
641 /* Initialize SPI device with some board specifics */ 367 /* Bootstrap EMIF and SEMI clocks */
642 u300_spi_init(&pl022_device); 368 clk = clk_get_sys("pl172", NULL);
369 BUG_ON(IS_ERR(clk));
370 clk_prepare_enable(clk);
371 clk = clk_get_sys("semi", NULL);
372 BUG_ON(IS_ERR(clk));
373 clk_prepare_enable(clk);
643 374
644 /* Register the AMBA devices in the AMBA bus abstraction layer */ 375 /* Clock the interrupt controller */
645 for (i = 0; i < ARRAY_SIZE(amba_devs); i++) { 376 clk = clk_get_sys("intcon", NULL);
646 struct amba_device *d = amba_devs[i]; 377 BUG_ON(IS_ERR(clk));
647 amba_device_register(d, &iomem_resource); 378 clk_prepare_enable(clk);
648 }
649 379
650 u300_assign_physmem(); 380 irqchip_init();
381}
382
383static void __init u300_init_machine_dt(void)
384{
385 u16 val;
386
387 /* Check what platform we run and print some status information */
388 u300_init_check_chip();
651 389
652 /* Initialize pinmuxing */ 390 /* Initialize pinmuxing */
653 pinctrl_register_mappings(u300_pinmux_map, 391 pinctrl_register_mappings(u300_pinmux_map,
654 ARRAY_SIZE(u300_pinmux_map)); 392 ARRAY_SIZE(u300_pinmux_map));
655 393
656 /* Register subdevices on the I2C buses */ 394 of_platform_populate(NULL, of_default_bus_match_table,
657 u300_i2c_register_board_devices(); 395 u300_auxdata_lookup, NULL);
658
659 /* Register the platform devices */
660 platform_add_devices(platform_devs, ARRAY_SIZE(platform_devs));
661
662 /* Register subdevices on the SPI bus */
663 u300_spi_register_board_devices();
664 396
665 /* Enable SEMI self refresh */ 397 /* Enable SEMI self refresh */
666 val = readw(U300_SYSCON_VBASE + U300_SYSCON_SMCR) | 398 val = readw(syscon_base + U300_SYSCON_SMCR) |
667 U300_SYSCON_SMCR_SEMI_SREFREQ_ENABLE; 399 U300_SYSCON_SMCR_SEMI_SREFREQ_ENABLE;
668 writew(val, U300_SYSCON_VBASE + U300_SYSCON_SMCR); 400 writew(val, syscon_base + U300_SYSCON_SMCR);
669} 401}
670 402
671/* Forward declare this function from the watchdog */ 403static const char * u300_board_compat[] = {
672void coh901327_watchdog_reset(void); 404 "stericsson,u300",
673 405 NULL,
674static void u300_restart(char mode, const char *cmd) 406};
675{
676 switch (mode) {
677 case 's':
678 case 'h':
679#ifdef CONFIG_COH901327_WATCHDOG
680 coh901327_watchdog_reset();
681#endif
682 break;
683 default:
684 /* Do nothing */
685 break;
686 }
687 /* Wait for system do die/reset. */
688 while (1);
689}
690 407
691MACHINE_START(U300, "Ericsson AB U335 S335/B335 Prototype Board") 408DT_MACHINE_START(U300_DT, "U300 S335/B335 (Device Tree)")
692 /* Maintainer: Linus Walleij <linus.walleij@stericsson.com> */
693 .atag_offset = 0x100,
694 .map_io = u300_map_io, 409 .map_io = u300_map_io,
695 .nr_irqs = 0, 410 .init_irq = u300_init_irq_dt,
696 .init_irq = u300_init_irq, 411 .init_time = clocksource_of_init,
697 .init_time = u300_timer_init, 412 .init_machine = u300_init_machine_dt,
698 .init_machine = u300_init_machine,
699 .restart = u300_restart, 413 .restart = u300_restart,
414 .dt_compat = u300_board_compat,
700MACHINE_END 415MACHINE_END
diff --git a/arch/arm/mach-u300/dummyspichip.c b/arch/arm/mach-u300/dummyspichip.c
index 2785cb67b5e8..ec0283cf9a32 100644
--- a/arch/arm/mach-u300/dummyspichip.c
+++ b/arch/arm/mach-u300/dummyspichip.c
@@ -263,28 +263,22 @@ static int pl022_dummy_remove(struct spi_device *spi)
263 return 0; 263 return 0;
264} 264}
265 265
266static const struct of_device_id pl022_dummy_dt_match[] = {
267 { .compatible = "arm,pl022-dummy" },
268 {},
269};
270
266static struct spi_driver pl022_dummy_driver = { 271static struct spi_driver pl022_dummy_driver = {
267 .driver = { 272 .driver = {
268 .name = "spi-dummy", 273 .name = "spi-dummy",
269 .owner = THIS_MODULE, 274 .owner = THIS_MODULE,
275 .of_match_table = pl022_dummy_dt_match,
270 }, 276 },
271 .probe = pl022_dummy_probe, 277 .probe = pl022_dummy_probe,
272 .remove = pl022_dummy_remove, 278 .remove = pl022_dummy_remove,
273}; 279};
274 280
275static int __init pl022_init_dummy(void) 281module_spi_driver(pl022_dummy_driver);
276{
277 return spi_register_driver(&pl022_dummy_driver);
278}
279
280static void __exit pl022_exit_dummy(void)
281{
282 spi_unregister_driver(&pl022_dummy_driver);
283}
284
285module_init(pl022_init_dummy);
286module_exit(pl022_exit_dummy);
287
288MODULE_AUTHOR("Linus Walleij <linus.walleij@stericsson.com>"); 282MODULE_AUTHOR("Linus Walleij <linus.walleij@stericsson.com>");
289MODULE_DESCRIPTION("PL022 SSP/SPI DUMMY Linux driver"); 283MODULE_DESCRIPTION("PL022 SSP/SPI DUMMY Linux driver");
290MODULE_LICENSE("GPL"); 284MODULE_LICENSE("GPL");
diff --git a/arch/arm/mach-u300/i2c.c b/arch/arm/mach-u300/i2c.c
deleted file mode 100644
index 96800aa1316d..000000000000
--- a/arch/arm/mach-u300/i2c.c
+++ /dev/null
@@ -1,285 +0,0 @@
1/*
2 * arch/arm/mach-u300/i2c.c
3 *
4 * Copyright (C) 2009-2012 ST-Ericsson AB
5 * License terms: GNU General Public License (GPL) version 2
6 *
7 * Register board i2c devices
8 * Author: Linus Walleij <linus.walleij@stericsson.com>
9 */
10#include <linux/kernel.h>
11#include <linux/i2c.h>
12#include <linux/mfd/ab3100.h>
13#include <linux/regulator/machine.h>
14#include <linux/amba/bus.h>
15#include <mach/irqs.h>
16
17/*
18 * Initial settings of ab3100 registers.
19 * Common for below LDO regulator settings are that
20 * bit 7-5 controls voltage. Bit 4 turns regulator ON(1) or OFF(0).
21 * Bit 3-2 controls sleep enable and bit 1-0 controls sleep mode.
22 */
23
24/* LDO_A 0x16: 2.75V, ON, SLEEP_A, SLEEP OFF GND */
25#define LDO_A_SETTING 0x16
26/* LDO_C 0x10: 2.65V, ON, SLEEP_A or B, SLEEP full power */
27#define LDO_C_SETTING 0x10
28/* LDO_D 0x10: 2.65V, ON, sleep mode not used */
29#define LDO_D_SETTING 0x10
30/* LDO_E 0x10: 1.8V, ON, SLEEP_A or B, SLEEP full power */
31#define LDO_E_SETTING 0x10
32/* LDO_E SLEEP 0x00: 1.8V, not used, SLEEP_A or B, not used */
33#define LDO_E_SLEEP_SETTING 0x00
34/* LDO_F 0xD0: 2.5V, ON, SLEEP_A or B, SLEEP full power */
35#define LDO_F_SETTING 0xD0
36/* LDO_G 0x00: 2.85V, OFF, SLEEP_A or B, SLEEP full power */
37#define LDO_G_SETTING 0x00
38/* LDO_H 0x18: 2.75V, ON, SLEEP_B, SLEEP full power */
39#define LDO_H_SETTING 0x18
40/* LDO_K 0x00: 2.75V, OFF, SLEEP_A or B, SLEEP full power */
41#define LDO_K_SETTING 0x00
42/* LDO_EXT 0x00: Voltage not set, OFF, not used, not used */
43#define LDO_EXT_SETTING 0x00
44/* BUCK 0x7D: 1.2V, ON, SLEEP_A and B, SLEEP low power */
45#define BUCK_SETTING 0x7D
46/* BUCK SLEEP 0xAC: 1.05V, Not used, SLEEP_A and B, Not used */
47#define BUCK_SLEEP_SETTING 0xAC
48
49#ifdef CONFIG_AB3100_CORE
50static struct regulator_consumer_supply supply_ldo_c[] = {
51 {
52 .dev_name = "ab3100-codec",
53 .supply = "vaudio", /* Powers the codec */
54 },
55};
56
57/*
58 * This one needs to be a supply so we can turn it off
59 * in order to shut down the system.
60 */
61static struct regulator_consumer_supply supply_ldo_d[] = {
62 {
63 .supply = "vana15", /* Powers the SoC (CPU etc) */
64 },
65};
66
67static struct regulator_consumer_supply supply_ldo_g[] = {
68 {
69 .dev_name = "mmci",
70 .supply = "vmmc", /* Powers MMC/SD card */
71 },
72};
73
74static struct regulator_consumer_supply supply_ldo_h[] = {
75 {
76 .dev_name = "xgam_pdi",
77 .supply = "vdisp", /* Powers camera, display etc */
78 },
79};
80
81static struct regulator_consumer_supply supply_ldo_k[] = {
82 {
83 .dev_name = "irda",
84 .supply = "vir", /* Power IrDA */
85 },
86};
87
88/*
89 * This is a placeholder for whoever wish to use the
90 * external power.
91 */
92static struct regulator_consumer_supply supply_ldo_ext[] = {
93 {
94 .supply = "vext", /* External power */
95 },
96};
97
98/* Preset (hardware defined) voltages for these regulators */
99#define LDO_A_VOLTAGE 2750000
100#define LDO_C_VOLTAGE 2650000
101#define LDO_D_VOLTAGE 2650000
102
103static struct ab3100_platform_data ab3100_plf_data = {
104 .reg_constraints = {
105 /* LDO A routing and constraints */
106 {
107 .constraints = {
108 .name = "vrad",
109 .min_uV = LDO_A_VOLTAGE,
110 .max_uV = LDO_A_VOLTAGE,
111 .valid_modes_mask = REGULATOR_MODE_NORMAL,
112 .always_on = 1,
113 .boot_on = 1,
114 },
115 },
116 /* LDO C routing and constraints */
117 {
118 .constraints = {
119 .min_uV = LDO_C_VOLTAGE,
120 .max_uV = LDO_C_VOLTAGE,
121 .valid_modes_mask = REGULATOR_MODE_NORMAL,
122 },
123 .num_consumer_supplies = ARRAY_SIZE(supply_ldo_c),
124 .consumer_supplies = supply_ldo_c,
125 },
126 /* LDO D routing and constraints */
127 {
128 .constraints = {
129 .min_uV = LDO_D_VOLTAGE,
130 .max_uV = LDO_D_VOLTAGE,
131 .valid_modes_mask = REGULATOR_MODE_NORMAL,
132 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
133 /*
134 * Actually this is boot_on but we need
135 * to reference count it externally to
136 * be able to shut down the system.
137 */
138 },
139 .num_consumer_supplies = ARRAY_SIZE(supply_ldo_d),
140 .consumer_supplies = supply_ldo_d,
141 },
142 /* LDO E routing and constraints */
143 {
144 .constraints = {
145 .name = "vio",
146 .min_uV = 1800000,
147 .max_uV = 1800000,
148 .valid_modes_mask = REGULATOR_MODE_NORMAL,
149 .always_on = 1,
150 .boot_on = 1,
151 },
152 },
153 /* LDO F routing and constraints */
154 {
155 .constraints = {
156 .name = "vana25",
157 .min_uV = 2500000,
158 .max_uV = 2500000,
159 .valid_modes_mask = REGULATOR_MODE_NORMAL,
160 .always_on = 1,
161 .boot_on = 1,
162 },
163 },
164 /* LDO G routing and constraints */
165 {
166 .constraints = {
167 .min_uV = 1500000,
168 .max_uV = 2850000,
169 .valid_modes_mask = REGULATOR_MODE_NORMAL,
170 .valid_ops_mask =
171 REGULATOR_CHANGE_VOLTAGE |
172 REGULATOR_CHANGE_STATUS,
173 },
174 .num_consumer_supplies = ARRAY_SIZE(supply_ldo_g),
175 .consumer_supplies = supply_ldo_g,
176 },
177 /* LDO H routing and constraints */
178 {
179 .constraints = {
180 .min_uV = 1200000,
181 .max_uV = 2750000,
182 .valid_modes_mask = REGULATOR_MODE_NORMAL,
183 .valid_ops_mask =
184 REGULATOR_CHANGE_VOLTAGE |
185 REGULATOR_CHANGE_STATUS,
186 },
187 .num_consumer_supplies = ARRAY_SIZE(supply_ldo_h),
188 .consumer_supplies = supply_ldo_h,
189 },
190 /* LDO K routing and constraints */
191 {
192 .constraints = {
193 .min_uV = 1800000,
194 .max_uV = 2750000,
195 .valid_modes_mask = REGULATOR_MODE_NORMAL,
196 .valid_ops_mask =
197 REGULATOR_CHANGE_VOLTAGE |
198 REGULATOR_CHANGE_STATUS,
199 },
200 .num_consumer_supplies = ARRAY_SIZE(supply_ldo_k),
201 .consumer_supplies = supply_ldo_k,
202 },
203 /* External regulator interface. No fixed voltage specified.
204 * If we knew the voltage of the external regulator and it
205 * was connected on the board, we could add the (fixed)
206 * voltage for it here.
207 */
208 {
209 .constraints = {
210 .min_uV = 0,
211 .max_uV = 0,
212 .valid_modes_mask = REGULATOR_MODE_NORMAL,
213 .valid_ops_mask =
214 REGULATOR_CHANGE_STATUS,
215 },
216 .num_consumer_supplies = ARRAY_SIZE(supply_ldo_ext),
217 .consumer_supplies = supply_ldo_ext,
218 },
219 /* Buck converter routing and constraints */
220 {
221 .constraints = {
222 .name = "vcore",
223 .min_uV = 1200000,
224 .max_uV = 1800000,
225 .valid_modes_mask = REGULATOR_MODE_NORMAL,
226 .valid_ops_mask =
227 REGULATOR_CHANGE_VOLTAGE,
228 .always_on = 1,
229 .boot_on = 1,
230 },
231 },
232 },
233 .reg_initvals = {
234 LDO_A_SETTING,
235 LDO_C_SETTING,
236 LDO_E_SETTING,
237 LDO_E_SLEEP_SETTING,
238 LDO_F_SETTING,
239 LDO_G_SETTING,
240 LDO_H_SETTING,
241 LDO_K_SETTING,
242 LDO_EXT_SETTING,
243 BUCK_SETTING,
244 BUCK_SLEEP_SETTING,
245 LDO_D_SETTING,
246 },
247};
248#endif
249
250static struct i2c_board_info __initdata bus0_i2c_board_info[] = {
251#ifdef CONFIG_AB3100_CORE
252 {
253 .type = "ab3100",
254 .addr = 0x48,
255 .irq = IRQ_U300_IRQ0_EXT,
256 .platform_data = &ab3100_plf_data,
257 },
258#else
259 { },
260#endif
261};
262
263static struct i2c_board_info __initdata bus1_i2c_board_info[] = {
264 {
265 .type = "fwcam",
266 .addr = 0x10,
267 },
268 {
269 .type = "fwcam",
270 .addr = 0x5d,
271 },
272};
273
274void __init u300_i2c_register_board_devices(void)
275{
276 i2c_register_board_info(0, bus0_i2c_board_info,
277 ARRAY_SIZE(bus0_i2c_board_info));
278 /*
279 * This makes the core shut down all unused regulators
280 * after all the initcalls have completed.
281 */
282 regulator_has_full_constraints();
283 i2c_register_board_info(1, bus1_i2c_board_info,
284 ARRAY_SIZE(bus1_i2c_board_info));
285}
diff --git a/arch/arm/mach-u300/i2c.h b/arch/arm/mach-u300/i2c.h
deleted file mode 100644
index 485c02e5c06d..000000000000
--- a/arch/arm/mach-u300/i2c.h
+++ /dev/null
@@ -1,23 +0,0 @@
1/*
2 * arch/arm/mach-u300/i2c.h
3 *
4 * Copyright (C) 2009 ST-Ericsson AB
5 * License terms: GNU General Public License (GPL) version 2
6 *
7 * Register board i2c devices
8 * Author: Linus Walleij <linus.walleij@stericsson.com>
9 */
10
11#ifndef MACH_U300_I2C_H
12#define MACH_U300_I2C_H
13
14#ifdef CONFIG_I2C_STU300
15void __init u300_i2c_register_board_devices(void);
16#else
17/* Compile out this stuff if no I2C adapter is available */
18static inline void __init u300_i2c_register_board_devices(void)
19{
20}
21#endif
22
23#endif
diff --git a/arch/arm/mach-u300/include/mach/hardware.h b/arch/arm/mach-u300/include/mach/hardware.h
deleted file mode 100644
index b99d4ce0ac2b..000000000000
--- a/arch/arm/mach-u300/include/mach/hardware.h
+++ /dev/null
@@ -1,5 +0,0 @@
1/*
2 * arch/arm/mach-u300/include/mach/hardware.h
3 */
4#include <asm/sizes.h>
5#include <mach/u300-regs.h>
diff --git a/arch/arm/mach-u300/include/mach/irqs.h b/arch/arm/mach-u300/include/mach/irqs.h
deleted file mode 100644
index 21d5e76a6cd3..000000000000
--- a/arch/arm/mach-u300/include/mach/irqs.h
+++ /dev/null
@@ -1,80 +0,0 @@
1/*
2 *
3 * arch/arm/mach-u300/include/mach/irqs.h
4 *
5 *
6 * Copyright (C) 2006-2012 ST-Ericsson AB
7 * License terms: GNU General Public License (GPL) version 2
8 * IRQ channel definitions for the U300 platforms.
9 * Author: Linus Walleij <linus.walleij@stericsson.com>
10 */
11
12#ifndef __MACH_IRQS_H
13#define __MACH_IRQS_H
14
15#define IRQ_U300_INTCON0_START 32
16#define IRQ_U300_INTCON1_START 64
17/* These are on INTCON0 - 30 lines */
18#define IRQ_U300_IRQ0_EXT 32
19#define IRQ_U300_IRQ1_EXT 33
20#define IRQ_U300_DMA 34
21#define IRQ_U300_VIDEO_ENC_0 35
22#define IRQ_U300_VIDEO_ENC_1 36
23#define IRQ_U300_AAIF_RX 37
24#define IRQ_U300_AAIF_TX 38
25#define IRQ_U300_AAIF_VGPIO 39
26#define IRQ_U300_AAIF_WAKEUP 40
27#define IRQ_U300_PCM_I2S0_FRAME 41
28#define IRQ_U300_PCM_I2S0_FIFO 42
29#define IRQ_U300_PCM_I2S1_FRAME 43
30#define IRQ_U300_PCM_I2S1_FIFO 44
31#define IRQ_U300_XGAM_GAMCON 45
32#define IRQ_U300_XGAM_CDI 46
33#define IRQ_U300_XGAM_CDICON 47
34#define IRQ_U300_XGAM_PDI 49
35#define IRQ_U300_XGAM_PDICON 50
36#define IRQ_U300_XGAM_GAMEACC 51
37#define IRQ_U300_XGAM_MCIDCT 52
38#define IRQ_U300_APEX 53
39#define IRQ_U300_UART0 54
40#define IRQ_U300_SPI 55
41#define IRQ_U300_TIMER_APP_OS 56
42#define IRQ_U300_TIMER_APP_DD 57
43#define IRQ_U300_TIMER_APP_GP1 58
44#define IRQ_U300_TIMER_APP_GP2 59
45#define IRQ_U300_TIMER_OS 60
46#define IRQ_U300_TIMER_MS 61
47#define IRQ_U300_KEYPAD_KEYBF 62
48#define IRQ_U300_KEYPAD_KEYBR 63
49/* These are on INTCON1 - 32 lines */
50#define IRQ_U300_GPIO_PORT0 64
51#define IRQ_U300_GPIO_PORT1 65
52#define IRQ_U300_GPIO_PORT2 66
53
54/* These are for DB3150, DB3200 and DB3350 */
55#define IRQ_U300_WDOG 67
56#define IRQ_U300_EVHIST 68
57#define IRQ_U300_MSPRO 69
58#define IRQ_U300_MMCSD_MCIINTR0 70
59#define IRQ_U300_MMCSD_MCIINTR1 71
60#define IRQ_U300_I2C0 72
61#define IRQ_U300_I2C1 73
62#define IRQ_U300_RTC 74
63#define IRQ_U300_NFIF 75
64#define IRQ_U300_NFIF2 76
65
66/* The DB3350-specific interrupt lines */
67#define IRQ_U300_ISP_F0 77
68#define IRQ_U300_ISP_F1 78
69#define IRQ_U300_ISP_F2 79
70#define IRQ_U300_ISP_F3 80
71#define IRQ_U300_ISP_F4 81
72#define IRQ_U300_GPIO_PORT3 82
73#define IRQ_U300_SYSCON_PLL_LOCK 83
74#define IRQ_U300_UART1 84
75#define IRQ_U300_GPIO_PORT4 85
76#define IRQ_U300_GPIO_PORT5 86
77#define IRQ_U300_GPIO_PORT6 87
78#define U300_VIC_IRQS_END 88
79
80#endif
diff --git a/arch/arm/mach-u300/include/mach/syscon.h b/arch/arm/mach-u300/include/mach/syscon.h
deleted file mode 100644
index 10bdd0be9774..000000000000
--- a/arch/arm/mach-u300/include/mach/syscon.h
+++ /dev/null
@@ -1,592 +0,0 @@
1/*
2 *
3 * arch/arm/mach-u300/include/mach/syscon.h
4 *
5 *
6 * Copyright (C) 2008-2012 ST-Ericsson AB
7 *
8 * Author: Rickard Andersson <rickard.andersson@stericsson.com>
9 */
10
11#ifndef __MACH_SYSCON_H
12#define __MACH_SYSCON_H
13
14/*
15 * All register defines for SYSCON registers that concerns individual
16 * block clocks and reset lines are registered here. This is because
17 * we don't want any other file to try to fool around with this stuff.
18 */
19
20/* APP side SYSCON registers */
21/* TODO: this is incomplete. Add all from asic_syscon_map.h eventually. */
22/* CLK Control Register 16bit (R/W) */
23#define U300_SYSCON_CCR (0x0000)
24#define U300_SYSCON_CCR_I2S1_USE_VCXO (0x0040)
25#define U300_SYSCON_CCR_I2S0_USE_VCXO (0x0020)
26#define U300_SYSCON_CCR_TURN_VCXO_ON (0x0008)
27#define U300_SYSCON_CCR_CLKING_PERFORMANCE_MASK (0x0007)
28#define U300_SYSCON_CCR_CLKING_PERFORMANCE_LOW_POWER (0x04)
29#define U300_SYSCON_CCR_CLKING_PERFORMANCE_LOW (0x03)
30#define U300_SYSCON_CCR_CLKING_PERFORMANCE_INTERMEDIATE (0x02)
31#define U300_SYSCON_CCR_CLKING_PERFORMANCE_HIGH (0x01)
32#define U300_SYSCON_CCR_CLKING_PERFORMANCE_BEST (0x00)
33/* CLK Status Register 16bit (R/W) */
34#define U300_SYSCON_CSR (0x0004)
35#define U300_SYSCON_CSR_PLL208_LOCK_IND (0x0002)
36#define U300_SYSCON_CSR_PLL13_LOCK_IND (0x0001)
37/* Reset lines for SLOW devices 16bit (R/W) */
38#define U300_SYSCON_RSR (0x0014)
39#define U300_SYSCON_RSR_PPM_RESET_EN (0x0200)
40#define U300_SYSCON_RSR_ACC_TMR_RESET_EN (0x0100)
41#define U300_SYSCON_RSR_APP_TMR_RESET_EN (0x0080)
42#define U300_SYSCON_RSR_RTC_RESET_EN (0x0040)
43#define U300_SYSCON_RSR_KEYPAD_RESET_EN (0x0020)
44#define U300_SYSCON_RSR_GPIO_RESET_EN (0x0010)
45#define U300_SYSCON_RSR_EH_RESET_EN (0x0008)
46#define U300_SYSCON_RSR_BTR_RESET_EN (0x0004)
47#define U300_SYSCON_RSR_UART_RESET_EN (0x0002)
48#define U300_SYSCON_RSR_SLOW_BRIDGE_RESET_EN (0x0001)
49/* Reset lines for FAST devices 16bit (R/W) */
50#define U300_SYSCON_RFR (0x0018)
51#define U300_SYSCON_RFR_UART1_RESET_ENABLE (0x0080)
52#define U300_SYSCON_RFR_SPI_RESET_ENABLE (0x0040)
53#define U300_SYSCON_RFR_MMC_RESET_ENABLE (0x0020)
54#define U300_SYSCON_RFR_PCM_I2S1_RESET_ENABLE (0x0010)
55#define U300_SYSCON_RFR_PCM_I2S0_RESET_ENABLE (0x0008)
56#define U300_SYSCON_RFR_I2C1_RESET_ENABLE (0x0004)
57#define U300_SYSCON_RFR_I2C0_RESET_ENABLE (0x0002)
58#define U300_SYSCON_RFR_FAST_BRIDGE_RESET_ENABLE (0x0001)
59/* Reset lines for the rest of the peripherals 16bit (R/W) */
60#define U300_SYSCON_RRR (0x001c)
61#define U300_SYSCON_RRR_CDS_RESET_EN (0x4000)
62#define U300_SYSCON_RRR_ISP_RESET_EN (0x2000)
63#define U300_SYSCON_RRR_INTCON_RESET_EN (0x1000)
64#define U300_SYSCON_RRR_MSPRO_RESET_EN (0x0800)
65#define U300_SYSCON_RRR_XGAM_RESET_EN (0x0100)
66#define U300_SYSCON_RRR_XGAM_VC_SYNC_RESET_EN (0x0080)
67#define U300_SYSCON_RRR_NANDIF_RESET_EN (0x0040)
68#define U300_SYSCON_RRR_EMIF_RESET_EN (0x0020)
69#define U300_SYSCON_RRR_DMAC_RESET_EN (0x0010)
70#define U300_SYSCON_RRR_CPU_RESET_EN (0x0008)
71#define U300_SYSCON_RRR_APEX_RESET_EN (0x0004)
72#define U300_SYSCON_RRR_AHB_RESET_EN (0x0002)
73#define U300_SYSCON_RRR_AAIF_RESET_EN (0x0001)
74/* Clock enable for SLOW peripherals 16bit (R/W) */
75#define U300_SYSCON_CESR (0x0020)
76#define U300_SYSCON_CESR_PPM_CLK_EN (0x0200)
77#define U300_SYSCON_CESR_ACC_TMR_CLK_EN (0x0100)
78#define U300_SYSCON_CESR_APP_TMR_CLK_EN (0x0080)
79#define U300_SYSCON_CESR_KEYPAD_CLK_EN (0x0040)
80#define U300_SYSCON_CESR_GPIO_CLK_EN (0x0010)
81#define U300_SYSCON_CESR_EH_CLK_EN (0x0008)
82#define U300_SYSCON_CESR_BTR_CLK_EN (0x0004)
83#define U300_SYSCON_CESR_UART_CLK_EN (0x0002)
84#define U300_SYSCON_CESR_SLOW_BRIDGE_CLK_EN (0x0001)
85/* Clock enable for FAST peripherals 16bit (R/W) */
86#define U300_SYSCON_CEFR (0x0024)
87#define U300_SYSCON_CEFR_UART1_CLK_EN (0x0200)
88#define U300_SYSCON_CEFR_I2S1_CORE_CLK_EN (0x0100)
89#define U300_SYSCON_CEFR_I2S0_CORE_CLK_EN (0x0080)
90#define U300_SYSCON_CEFR_SPI_CLK_EN (0x0040)
91#define U300_SYSCON_CEFR_MMC_CLK_EN (0x0020)
92#define U300_SYSCON_CEFR_I2S1_CLK_EN (0x0010)
93#define U300_SYSCON_CEFR_I2S0_CLK_EN (0x0008)
94#define U300_SYSCON_CEFR_I2C1_CLK_EN (0x0004)
95#define U300_SYSCON_CEFR_I2C0_CLK_EN (0x0002)
96#define U300_SYSCON_CEFR_FAST_BRIDGE_CLK_EN (0x0001)
97/* Clock enable for the rest of the peripherals 16bit (R/W) */
98#define U300_SYSCON_CERR (0x0028)
99#define U300_SYSCON_CERR_CDS_CLK_EN (0x2000)
100#define U300_SYSCON_CERR_ISP_CLK_EN (0x1000)
101#define U300_SYSCON_CERR_MSPRO_CLK_EN (0x0800)
102#define U300_SYSCON_CERR_AHB_SUBSYS_BRIDGE_CLK_EN (0x0400)
103#define U300_SYSCON_CERR_SEMI_CLK_EN (0x0200)
104#define U300_SYSCON_CERR_XGAM_CLK_EN (0x0100)
105#define U300_SYSCON_CERR_VIDEO_ENC_CLK_EN (0x0080)
106#define U300_SYSCON_CERR_NANDIF_CLK_EN (0x0040)
107#define U300_SYSCON_CERR_EMIF_CLK_EN (0x0020)
108#define U300_SYSCON_CERR_DMAC_CLK_EN (0x0010)
109#define U300_SYSCON_CERR_CPU_CLK_EN (0x0008)
110#define U300_SYSCON_CERR_APEX_CLK_EN (0x0004)
111#define U300_SYSCON_CERR_AHB_CLK_EN (0x0002)
112#define U300_SYSCON_CERR_AAIF_CLK_EN (0x0001)
113/* Single block clock enable 16bit (-/W) */
114#define U300_SYSCON_SBCER (0x002c)
115#define U300_SYSCON_SBCER_PPM_CLK_EN (0x0009)
116#define U300_SYSCON_SBCER_ACC_TMR_CLK_EN (0x0008)
117#define U300_SYSCON_SBCER_APP_TMR_CLK_EN (0x0007)
118#define U300_SYSCON_SBCER_KEYPAD_CLK_EN (0x0006)
119#define U300_SYSCON_SBCER_GPIO_CLK_EN (0x0004)
120#define U300_SYSCON_SBCER_EH_CLK_EN (0x0003)
121#define U300_SYSCON_SBCER_BTR_CLK_EN (0x0002)
122#define U300_SYSCON_SBCER_UART_CLK_EN (0x0001)
123#define U300_SYSCON_SBCER_SLOW_BRIDGE_CLK_EN (0x0000)
124#define U300_SYSCON_SBCER_UART1_CLK_EN (0x0019)
125#define U300_SYSCON_SBCER_I2S1_CORE_CLK_EN (0x0018)
126#define U300_SYSCON_SBCER_I2S0_CORE_CLK_EN (0x0017)
127#define U300_SYSCON_SBCER_SPI_CLK_EN (0x0016)
128#define U300_SYSCON_SBCER_MMC_CLK_EN (0x0015)
129#define U300_SYSCON_SBCER_I2S1_CLK_EN (0x0014)
130#define U300_SYSCON_SBCER_I2S0_CLK_EN (0x0013)
131#define U300_SYSCON_SBCER_I2C1_CLK_EN (0x0012)
132#define U300_SYSCON_SBCER_I2C0_CLK_EN (0x0011)
133#define U300_SYSCON_SBCER_FAST_BRIDGE_CLK_EN (0x0010)
134#define U300_SYSCON_SBCER_CDS_CLK_EN (0x002D)
135#define U300_SYSCON_SBCER_ISP_CLK_EN (0x002C)
136#define U300_SYSCON_SBCER_MSPRO_CLK_EN (0x002B)
137#define U300_SYSCON_SBCER_AHB_SUBSYS_BRIDGE_CLK_EN (0x002A)
138#define U300_SYSCON_SBCER_SEMI_CLK_EN (0x0029)
139#define U300_SYSCON_SBCER_XGAM_CLK_EN (0x0028)
140#define U300_SYSCON_SBCER_VIDEO_ENC_CLK_EN (0x0027)
141#define U300_SYSCON_SBCER_NANDIF_CLK_EN (0x0026)
142#define U300_SYSCON_SBCER_EMIF_CLK_EN (0x0025)
143#define U300_SYSCON_SBCER_DMAC_CLK_EN (0x0024)
144#define U300_SYSCON_SBCER_CPU_CLK_EN (0x0023)
145#define U300_SYSCON_SBCER_APEX_CLK_EN (0x0022)
146#define U300_SYSCON_SBCER_AHB_CLK_EN (0x0021)
147#define U300_SYSCON_SBCER_AAIF_CLK_EN (0x0020)
148/* Single block clock disable 16bit (-/W) */
149#define U300_SYSCON_SBCDR (0x0030)
150/* Same values as above for SBCER */
151/* Clock force SLOW peripherals 16bit (R/W) */
152#define U300_SYSCON_CFSR (0x003c)
153#define U300_SYSCON_CFSR_PPM_CLK_FORCE_EN (0x0200)
154#define U300_SYSCON_CFSR_ACC_TMR_CLK_FORCE_EN (0x0100)
155#define U300_SYSCON_CFSR_APP_TMR_CLK_FORCE_EN (0x0080)
156#define U300_SYSCON_CFSR_KEYPAD_CLK_FORCE_EN (0x0020)
157#define U300_SYSCON_CFSR_GPIO_CLK_FORCE_EN (0x0010)
158#define U300_SYSCON_CFSR_EH_CLK_FORCE_EN (0x0008)
159#define U300_SYSCON_CFSR_BTR_CLK_FORCE_EN (0x0004)
160#define U300_SYSCON_CFSR_UART_CLK_FORCE_EN (0x0002)
161#define U300_SYSCON_CFSR_SLOW_BRIDGE_CLK_FORCE_EN (0x0001)
162/* Clock force FAST peripherals 16bit (R/W) */
163#define U300_SYSCON_CFFR (0x40)
164/* Values not defined. Define if you want to use them. */
165/* Clock force the rest of the peripherals 16bit (R/W) */
166#define U300_SYSCON_CFRR (0x44)
167#define U300_SYSCON_CFRR_CDS_CLK_FORCE_EN (0x2000)
168#define U300_SYSCON_CFRR_ISP_CLK_FORCE_EN (0x1000)
169#define U300_SYSCON_CFRR_MSPRO_CLK_FORCE_EN (0x0800)
170#define U300_SYSCON_CFRR_AHB_SUBSYS_BRIDGE_CLK_FORCE_EN (0x0400)
171#define U300_SYSCON_CFRR_SEMI_CLK_FORCE_EN (0x0200)
172#define U300_SYSCON_CFRR_XGAM_CLK_FORCE_EN (0x0100)
173#define U300_SYSCON_CFRR_VIDEO_ENC_CLK_FORCE_EN (0x0080)
174#define U300_SYSCON_CFRR_NANDIF_CLK_FORCE_EN (0x0040)
175#define U300_SYSCON_CFRR_EMIF_CLK_FORCE_EN (0x0020)
176#define U300_SYSCON_CFRR_DMAC_CLK_FORCE_EN (0x0010)
177#define U300_SYSCON_CFRR_CPU_CLK_FORCE_EN (0x0008)
178#define U300_SYSCON_CFRR_APEX_CLK_FORCE_EN (0x0004)
179#define U300_SYSCON_CFRR_AHB_CLK_FORCE_EN (0x0002)
180#define U300_SYSCON_CFRR_AAIF_CLK_FORCE_EN (0x0001)
181/* PLL208 Frequency Control 16bit (R/W) */
182#define U300_SYSCON_PFCR (0x48)
183#define U300_SYSCON_PFCR_DPLL_MULT_NUM (0x000F)
184/* Power Management Control 16bit (R/W) */
185#define U300_SYSCON_PMCR (0x50)
186#define U300_SYSCON_PMCR_DCON_ENABLE (0x0002)
187#define U300_SYSCON_PMCR_PWR_MGNT_ENABLE (0x0001)
188/*
189 * All other clocking registers moved to clock.c!
190 */
191/* Reset Out 16bit (R/W) */
192#define U300_SYSCON_RCR (0x6c)
193#define U300_SYSCON_RCR_RESOUT0_RST_N_DISABLE (0x0001)
194/* EMIF Slew Rate Control 16bit (R/W) */
195#define U300_SYSCON_SRCLR (0x70)
196#define U300_SYSCON_SRCLR_MASK (0x03FF)
197#define U300_SYSCON_SRCLR_VALUE (0x03FF)
198#define U300_SYSCON_SRCLR_EMIF_1_SLRC_5_B (0x0200)
199#define U300_SYSCON_SRCLR_EMIF_1_SLRC_5_A (0x0100)
200#define U300_SYSCON_SRCLR_EMIF_1_SLRC_4_B (0x0080)
201#define U300_SYSCON_SRCLR_EMIF_1_SLRC_4_A (0x0040)
202#define U300_SYSCON_SRCLR_EMIF_1_SLRC_3_B (0x0020)
203#define U300_SYSCON_SRCLR_EMIF_1_SLRC_3_A (0x0010)
204#define U300_SYSCON_SRCLR_EMIF_1_SLRC_2_B (0x0008)
205#define U300_SYSCON_SRCLR_EMIF_1_SLRC_2_A (0x0004)
206#define U300_SYSCON_SRCLR_EMIF_1_SLRC_1_B (0x0002)
207#define U300_SYSCON_SRCLR_EMIF_1_SLRC_1_A (0x0001)
208/* EMIF Clock Control Register 16bit (R/W) */
209#define U300_SYSCON_ECCR (0x0078)
210#define U300_SYSCON_ECCR_MASK (0x000F)
211#define U300_SYSCON_ECCR_EMIF_1_STATIC_CLK_EN_N_DISABLE (0x0008)
212#define U300_SYSCON_ECCR_EMIF_1_RET_OUT_CLK_EN_N_DISABLE (0x0004)
213#define U300_SYSCON_ECCR_EMIF_MEMCLK_RET_EN_N_DISABLE (0x0002)
214#define U300_SYSCON_ECCR_EMIF_SDRCLK_RET_EN_N_DISABLE (0x0001)
215/* Step one for killing the applications system 16bit (-/W) */
216#define U300_SYSCON_KA1R (0x0080)
217#define U300_SYSCON_KA1R_MASK (0xFFFF)
218#define U300_SYSCON_KA1R_VALUE (0xFFFF)
219/* Step two for killing the application system 16bit (-/W) */
220#define U300_SYSCON_KA2R (0x0084)
221#define U300_SYSCON_KA2R_MASK (0xFFFF)
222#define U300_SYSCON_KA2R_VALUE (0xFFFF)
223/* MMC/MSPRO frequency divider register 0 16bit (R/W) */
224#define U300_SYSCON_MMF0R (0x90)
225#define U300_SYSCON_MMF0R_MASK (0x00FF)
226#define U300_SYSCON_MMF0R_FREQ_0_HIGH_MASK (0x00F0)
227#define U300_SYSCON_MMF0R_FREQ_0_LOW_MASK (0x000F)
228/* MMC/MSPRO frequency divider register 1 16bit (R/W) */
229#define U300_SYSCON_MMF1R (0x94)
230#define U300_SYSCON_MMF1R_MASK (0x00FF)
231#define U300_SYSCON_MMF1R_FREQ_1_HIGH_MASK (0x00F0)
232#define U300_SYSCON_MMF1R_FREQ_1_LOW_MASK (0x000F)
233/* AAIF control register 16 bit (R/W) */
234#define U300_SYSCON_AAIFCR (0x98)
235#define U300_SYSCON_AAIFCR_MASK (0x0003)
236#define U300_SYSCON_AAIFCR_AASW_CTRL_MASK (0x0003)
237#define U300_SYSCON_AAIFCR_AASW_CTRL_FUNCTIONAL (0x0000)
238#define U300_SYSCON_AAIFCR_AASW_CTRL_MONITORING (0x0001)
239#define U300_SYSCON_AAIFCR_AASW_CTRL_ACC_TO_EXT (0x0002)
240#define U300_SYSCON_AAIFCR_AASW_CTRL_APP_TO_EXT (0x0003)
241/* Clock control for the MMC and MSPRO blocks 16bit (R/W) */
242#define U300_SYSCON_MMCR (0x9C)
243#define U300_SYSCON_MMCR_MASK (0x0003)
244#define U300_SYSCON_MMCR_MMC_FB_CLK_SEL_ENABLE (0x0002)
245#define U300_SYSCON_MMCR_MSPRO_FREQSEL_ENABLE (0x0001)
246/* Pull up/down control (R/W) */
247#define U300_SYSCON_PUCR (0x104)
248#define U300_SYSCON_PUCR_EMIF_1_WAIT_N_PU_ENABLE (0x0200)
249#define U300_SYSCON_PUCR_EMIF_1_NFIF_READY_PU_ENABLE (0x0100)
250#define U300_SYSCON_PUCR_EMIF_1_16BIT_PU_ENABLE (0x0080)
251#define U300_SYSCON_PUCR_EMIF_1_8BIT_PU_ENABLE (0x0040)
252#define U300_SYSCON_PUCR_KEY_IN_PU_EN_MASK (0x003F)
253/* SYS_0_CLK_CONTROL first clock control 16bit (R/W) */
254#define U300_SYSCON_S0CCR (0x120)
255#define U300_SYSCON_S0CCR_FIELD_MASK (0x43FF)
256#define U300_SYSCON_S0CCR_CLOCK_REQ (0x4000)
257#define U300_SYSCON_S0CCR_CLOCK_REQ_MONITOR (0x2000)
258#define U300_SYSCON_S0CCR_CLOCK_INV (0x0200)
259#define U300_SYSCON_S0CCR_CLOCK_FREQ_MASK (0x01E0)
260#define U300_SYSCON_S0CCR_CLOCK_SELECT_MASK (0x001E)
261#define U300_SYSCON_S0CCR_CLOCK_ENABLE (0x0001)
262#define U300_SYSCON_S0CCR_SEL_MCLK (0x8<<1)
263#define U300_SYSCON_S0CCR_SEL_ACC_FSM_CLK (0xA<<1)
264#define U300_SYSCON_S0CCR_SEL_PLL60_48_CLK (0xC<<1)
265#define U300_SYSCON_S0CCR_SEL_PLL60_60_CLK (0xD<<1)
266#define U300_SYSCON_S0CCR_SEL_ACC_PLL208_CLK (0xE<<1)
267#define U300_SYSCON_S0CCR_SEL_APP_PLL13_CLK (0x0<<1)
268#define U300_SYSCON_S0CCR_SEL_APP_FSM_CLK (0x2<<1)
269#define U300_SYSCON_S0CCR_SEL_RTC_CLK (0x4<<1)
270#define U300_SYSCON_S0CCR_SEL_APP_PLL208_CLK (0x6<<1)
271/* SYS_1_CLK_CONTROL second clock control 16 bit (R/W) */
272#define U300_SYSCON_S1CCR (0x124)
273#define U300_SYSCON_S1CCR_FIELD_MASK (0x43FF)
274#define U300_SYSCON_S1CCR_CLOCK_REQ (0x4000)
275#define U300_SYSCON_S1CCR_CLOCK_REQ_MONITOR (0x2000)
276#define U300_SYSCON_S1CCR_CLOCK_INV (0x0200)
277#define U300_SYSCON_S1CCR_CLOCK_FREQ_MASK (0x01E0)
278#define U300_SYSCON_S1CCR_CLOCK_SELECT_MASK (0x001E)
279#define U300_SYSCON_S1CCR_CLOCK_ENABLE (0x0001)
280#define U300_SYSCON_S1CCR_SEL_MCLK (0x8<<1)
281#define U300_SYSCON_S1CCR_SEL_ACC_FSM_CLK (0xA<<1)
282#define U300_SYSCON_S1CCR_SEL_PLL60_48_CLK (0xC<<1)
283#define U300_SYSCON_S1CCR_SEL_PLL60_60_CLK (0xD<<1)
284#define U300_SYSCON_S1CCR_SEL_ACC_PLL208_CLK (0xE<<1)
285#define U300_SYSCON_S1CCR_SEL_ACC_PLL13_CLK (0x0<<1)
286#define U300_SYSCON_S1CCR_SEL_APP_FSM_CLK (0x2<<1)
287#define U300_SYSCON_S1CCR_SEL_RTC_CLK (0x4<<1)
288#define U300_SYSCON_S1CCR_SEL_APP_PLL208_CLK (0x6<<1)
289/* SYS_2_CLK_CONTROL third clock contol 16 bit (R/W) */
290#define U300_SYSCON_S2CCR (0x128)
291#define U300_SYSCON_S2CCR_FIELD_MASK (0xC3FF)
292#define U300_SYSCON_S2CCR_CLK_STEAL (0x8000)
293#define U300_SYSCON_S2CCR_CLOCK_REQ (0x4000)
294#define U300_SYSCON_S2CCR_CLOCK_REQ_MONITOR (0x2000)
295#define U300_SYSCON_S2CCR_CLOCK_INV (0x0200)
296#define U300_SYSCON_S2CCR_CLOCK_FREQ_MASK (0x01E0)
297#define U300_SYSCON_S2CCR_CLOCK_SELECT_MASK (0x001E)
298#define U300_SYSCON_S2CCR_CLOCK_ENABLE (0x0001)
299#define U300_SYSCON_S2CCR_SEL_MCLK (0x8<<1)
300#define U300_SYSCON_S2CCR_SEL_ACC_FSM_CLK (0xA<<1)
301#define U300_SYSCON_S2CCR_SEL_PLL60_48_CLK (0xC<<1)
302#define U300_SYSCON_S2CCR_SEL_PLL60_60_CLK (0xD<<1)
303#define U300_SYSCON_S2CCR_SEL_ACC_PLL208_CLK (0xE<<1)
304#define U300_SYSCON_S2CCR_SEL_ACC_PLL13_CLK (0x0<<1)
305#define U300_SYSCON_S2CCR_SEL_APP_FSM_CLK (0x2<<1)
306#define U300_SYSCON_S2CCR_SEL_RTC_CLK (0x4<<1)
307#define U300_SYSCON_S2CCR_SEL_APP_PLL208_CLK (0x6<<1)
308/* SYS_MISC_CONTROL, miscellaneous 16bit (R/W) */
309#define U300_SYSCON_MCR (0x12c)
310#define U300_SYSCON_MCR_FIELD_MASK (0x00FF)
311#define U300_SYSCON_MCR_PMGEN_CR_4_MASK (0x00C0)
312#define U300_SYSCON_MCR_PMGEN_CR_4_GPIO (0x0000)
313#define U300_SYSCON_MCR_PMGEN_CR_4_SPI (0x0040)
314#define U300_SYSCON_MCR_PMGEN_CR_4_AAIF (0x00C0)
315#define U300_SYSCON_MCR_PMGEN_CR_2_MASK (0x0030)
316#define U300_SYSCON_MCR_PMGEN_CR_2_GPIO (0x0000)
317#define U300_SYSCON_MCR_PMGEN_CR_2_EMIF_1_STATIC (0x0010)
318#define U300_SYSCON_MCR_PMGEN_CR_2_DSP (0x0020)
319#define U300_SYSCON_MCR_PMGEN_CR_2_AAIF (0x0030)
320#define U300_SYSCON_MCR_PMGEN_CR_0_MASK (0x000C)
321#define U300_SYSCON_MCR_PMGEN_CR_0_EMIF_1_SDRAM_M1 (0x0000)
322#define U300_SYSCON_MCR_PMGEN_CR_0_EMIF_1_SDRAM_M2 (0x0004)
323#define U300_SYSCON_MCR_PMGEN_CR_0_EMIF_1_SDRAM_M3 (0x0008)
324#define U300_SYSCON_MCR_PMGEN_CR_0_EMIF_0_SDRAM (0x000C)
325#define U300_SYSCON_MCR_PM1G_MODE_ENABLE (0x0002)
326#define U300_SYSCON_MCR_PMTG5_MODE_ENABLE (0x0001)
327/* SC_PLL_IRQ_CONTROL 16bit (R/W) */
328#define U300_SYSCON_PICR (0x0130)
329#define U300_SYSCON_PICR_MASK (0x00FF)
330#define U300_SYSCON_PICR_FORCE_PLL208_LOCK_LOW_ENABLE (0x0080)
331#define U300_SYSCON_PICR_FORCE_PLL208_LOCK_HIGH_ENABLE (0x0040)
332#define U300_SYSCON_PICR_FORCE_PLL13_LOCK_LOW_ENABLE (0x0020)
333#define U300_SYSCON_PICR_FORCE_PLL13_LOCK_HIGH_ENABLE (0x0010)
334#define U300_SYSCON_PICR_IRQMASK_PLL13_UNLOCK_ENABLE (0x0008)
335#define U300_SYSCON_PICR_IRQMASK_PLL13_LOCK_ENABLE (0x0004)
336#define U300_SYSCON_PICR_IRQMASK_PLL208_UNLOCK_ENABLE (0x0002)
337#define U300_SYSCON_PICR_IRQMASK_PLL208_LOCK_ENABLE (0x0001)
338/* SC_PLL_IRQ_STATUS 16 bit (R/-) */
339#define U300_SYSCON_PISR (0x0134)
340#define U300_SYSCON_PISR_MASK (0x000F)
341#define U300_SYSCON_PISR_PLL13_UNLOCK_IND (0x0008)
342#define U300_SYSCON_PISR_PLL13_LOCK_IND (0x0004)
343#define U300_SYSCON_PISR_PLL208_UNLOCK_IND (0x0002)
344#define U300_SYSCON_PISR_PLL208_LOCK_IND (0x0001)
345/* SC_PLL_IRQ_CLEAR 16 bit (-/W) */
346#define U300_SYSCON_PICLR (0x0138)
347#define U300_SYSCON_PICLR_MASK (0x000F)
348#define U300_SYSCON_PICLR_RWMASK (0x0000)
349#define U300_SYSCON_PICLR_PLL13_UNLOCK_SC (0x0008)
350#define U300_SYSCON_PICLR_PLL13_LOCK_SC (0x0004)
351#define U300_SYSCON_PICLR_PLL208_UNLOCK_SC (0x0002)
352#define U300_SYSCON_PICLR_PLL208_LOCK_SC (0x0001)
353/* CAMIF_CONTROL 16 bit (-/W) */
354#define U300_SYSCON_CICR (0x013C)
355#define U300_SYSCON_CICR_MASK (0x0FFF)
356#define U300_SYSCON_CICR_APP_SUBLVDS_TESTMODE_MASK (0x0F00)
357#define U300_SYSCON_CICR_APP_SUBLVDS_TESTMODE_PORT1 (0x0C00)
358#define U300_SYSCON_CICR_APP_SUBLVDS_TESTMODE_PORT0 (0x0300)
359#define U300_SYSCON_CICR_APP_SUBLVDS_RESCON_MASK (0x00F0)
360#define U300_SYSCON_CICR_APP_SUBLVDS_RESCON_PORT1 (0x00C0)
361#define U300_SYSCON_CICR_APP_SUBLVDS_RESCON_PORT0 (0x0030)
362#define U300_SYSCON_CICR_APP_SUBLVDS_PWR_DWN_N_MASK (0x000F)
363#define U300_SYSCON_CICR_APP_SUBLVDS_PWR_DWN_N_PORT1 (0x000C)
364#define U300_SYSCON_CICR_APP_SUBLVDS_PWR_DWN_N_PORT0 (0x0003)
365/* Clock activity observability register 0 */
366#define U300_SYSCON_C0OAR (0x140)
367#define U300_SYSCON_C0OAR_MASK (0xFFFF)
368#define U300_SYSCON_C0OAR_VALUE (0xFFFF)
369#define U300_SYSCON_C0OAR_BT_H_CLK (0x8000)
370#define U300_SYSCON_C0OAR_ASPB_P_CLK (0x4000)
371#define U300_SYSCON_C0OAR_APP_SEMI_H_CLK (0x2000)
372#define U300_SYSCON_C0OAR_APP_SEMI_CLK (0x1000)
373#define U300_SYSCON_C0OAR_APP_MMC_MSPRO_CLK (0x0800)
374#define U300_SYSCON_C0OAR_APP_I2S1_CLK (0x0400)
375#define U300_SYSCON_C0OAR_APP_I2S0_CLK (0x0200)
376#define U300_SYSCON_C0OAR_APP_CPU_CLK (0x0100)
377#define U300_SYSCON_C0OAR_APP_52_CLK (0x0080)
378#define U300_SYSCON_C0OAR_APP_208_CLK (0x0040)
379#define U300_SYSCON_C0OAR_APP_104_CLK (0x0020)
380#define U300_SYSCON_C0OAR_APEX_CLK (0x0010)
381#define U300_SYSCON_C0OAR_AHPB_M_H_CLK (0x0008)
382#define U300_SYSCON_C0OAR_AHB_CLK (0x0004)
383#define U300_SYSCON_C0OAR_AFPB_P_CLK (0x0002)
384#define U300_SYSCON_C0OAR_AAIF_CLK (0x0001)
385/* Clock activity observability register 1 */
386#define U300_SYSCON_C1OAR (0x144)
387#define U300_SYSCON_C1OAR_MASK (0x3FFE)
388#define U300_SYSCON_C1OAR_VALUE (0x3FFE)
389#define U300_SYSCON_C1OAR_NFIF_F_CLK (0x2000)
390#define U300_SYSCON_C1OAR_MSPRO_CLK (0x1000)
391#define U300_SYSCON_C1OAR_MMC_P_CLK (0x0800)
392#define U300_SYSCON_C1OAR_MMC_CLK (0x0400)
393#define U300_SYSCON_C1OAR_KP_P_CLK (0x0200)
394#define U300_SYSCON_C1OAR_I2C1_P_CLK (0x0100)
395#define U300_SYSCON_C1OAR_I2C0_P_CLK (0x0080)
396#define U300_SYSCON_C1OAR_GPIO_CLK (0x0040)
397#define U300_SYSCON_C1OAR_EMIF_MPMC_CLK (0x0020)
398#define U300_SYSCON_C1OAR_EMIF_H_CLK (0x0010)
399#define U300_SYSCON_C1OAR_EVHIST_CLK (0x0008)
400#define U300_SYSCON_C1OAR_PPM_CLK (0x0004)
401#define U300_SYSCON_C1OAR_DMA_CLK (0x0002)
402/* Clock activity observability register 2 */
403#define U300_SYSCON_C2OAR (0x148)
404#define U300_SYSCON_C2OAR_MASK (0x0FFF)
405#define U300_SYSCON_C2OAR_VALUE (0x0FFF)
406#define U300_SYSCON_C2OAR_XGAM_CDI_CLK (0x0800)
407#define U300_SYSCON_C2OAR_XGAM_CLK (0x0400)
408#define U300_SYSCON_C2OAR_VC_H_CLK (0x0200)
409#define U300_SYSCON_C2OAR_VC_CLK (0x0100)
410#define U300_SYSCON_C2OAR_UA_P_CLK (0x0080)
411#define U300_SYSCON_C2OAR_TMR1_CLK (0x0040)
412#define U300_SYSCON_C2OAR_TMR0_CLK (0x0020)
413#define U300_SYSCON_C2OAR_SPI_P_CLK (0x0010)
414#define U300_SYSCON_C2OAR_PCM_I2S1_CORE_CLK (0x0008)
415#define U300_SYSCON_C2OAR_PCM_I2S1_CLK (0x0004)
416#define U300_SYSCON_C2OAR_PCM_I2S0_CORE_CLK (0x0002)
417#define U300_SYSCON_C2OAR_PCM_I2S0_CLK (0x0001)
418
419/* Chip ID register 16bit (R/-) */
420#define U300_SYSCON_CIDR (0x400)
421/* Video IRQ clear 16bit (R/W) */
422#define U300_SYSCON_VICR (0x404)
423#define U300_SYSCON_VICR_VIDEO1_IRQ_CLEAR_ENABLE (0x0002)
424#define U300_SYSCON_VICR_VIDEO0_IRQ_CLEAR_ENABLE (0x0001)
425/* SMCR */
426#define U300_SYSCON_SMCR (0x4d0)
427#define U300_SYSCON_SMCR_FIELD_MASK (0x000e)
428#define U300_SYSCON_SMCR_SEMI_SREFACK_IND (0x0008)
429#define U300_SYSCON_SMCR_SEMI_SREFREQ_ENABLE (0x0004)
430#define U300_SYSCON_SMCR_SEMI_EXT_BOOT_MODE_ENABLE (0x0002)
431/* CPU_SW_DBGEN Software Debug Enable 16bit (R/W) */
432#define U300_SYSCON_CSDR (0x4f0)
433#define U300_SYSCON_CSDR_SW_DEBUG_ENABLE (0x0001)
434/* PRINT_CONTROL Print Control 16bit (R/-) */
435#define U300_SYSCON_PCR (0x4f8)
436#define U300_SYSCON_PCR_SERV_IND (0x0001)
437/* BOOT_CONTROL 16bit (R/-) */
438#define U300_SYSCON_BCR (0x4fc)
439#define U300_SYSCON_BCR_ACC_CPU_SUBSYS_VINITHI_IND (0x0400)
440#define U300_SYSCON_BCR_APP_CPU_SUBSYS_VINITHI_IND (0x0200)
441#define U300_SYSCON_BCR_EXTRA_BOOT_OPTION_MASK (0x01FC)
442#define U300_SYSCON_BCR_APP_BOOT_SERV_MASK (0x0003)
443
444
445/* CPU clock defines */
446/**
447 * CPU high frequency in MHz
448 */
449#define SYSCON_CPU_CLOCK_HIGH 208
450/**
451 * CPU medium frequency in MHz
452 */
453#define SYSCON_CPU_CLOCK_MEDIUM 52
454/**
455 * CPU low frequency in MHz
456 */
457#define SYSCON_CPU_CLOCK_LOW 13
458
459/* EMIF clock defines */
460/**
461 * EMIF high frequency in MHz
462 */
463#define SYSCON_EMIF_CLOCK_HIGH 104
464/**
465 * EMIF medium frequency in MHz
466 */
467#define SYSCON_EMIF_CLOCK_MEDIUM 52
468/**
469 * EMIF low frequency in MHz
470 */
471#define SYSCON_EMIF_CLOCK_LOW 13
472
473/* AHB clock defines */
474/**
475 * AHB high frequency in MHz
476 */
477#define SYSCON_AHB_CLOCK_HIGH 52
478/**
479 * AHB medium frequency in MHz
480 */
481#define SYSCON_AHB_CLOCK_MEDIUM 26
482/**
483 * AHB low frequency in MHz
484 */
485#define SYSCON_AHB_CLOCK_LOW 7 /* i.e 13/2=6.5MHz */
486
487enum syscon_busmaster {
488 SYSCON_BM_DMAC,
489 SYSCON_BM_XGAM,
490 SYSCON_BM_VIDEO_ENC
491};
492
493/* Selectr a resistor or a set of resistors */
494enum syscon_pull_up_down {
495 SYSCON_PU_KEY_IN_EN,
496 SYSCON_PU_EMIF_1_8_BIT_EN,
497 SYSCON_PU_EMIF_1_16_BIT_EN,
498 SYSCON_PU_EMIF_1_NFIF_READY_EN,
499 SYSCON_PU_EMIF_1_NFIF_WAIT_N_EN,
500};
501
502/*
503 * Note that this array must match the order of the array "clk_reg"
504 * in syscon.c
505 */
506enum syscon_clk {
507 SYSCON_CLKCONTROL_SLOW_BRIDGE,
508 SYSCON_CLKCONTROL_UART,
509 SYSCON_CLKCONTROL_BTR,
510 SYSCON_CLKCONTROL_EH,
511 SYSCON_CLKCONTROL_GPIO,
512 SYSCON_CLKCONTROL_KEYPAD,
513 SYSCON_CLKCONTROL_APP_TIMER,
514 SYSCON_CLKCONTROL_ACC_TIMER,
515 SYSCON_CLKCONTROL_FAST_BRIDGE,
516 SYSCON_CLKCONTROL_I2C0,
517 SYSCON_CLKCONTROL_I2C1,
518 SYSCON_CLKCONTROL_I2S0,
519 SYSCON_CLKCONTROL_I2S1,
520 SYSCON_CLKCONTROL_MMC,
521 SYSCON_CLKCONTROL_SPI,
522 SYSCON_CLKCONTROL_I2S0_CORE,
523 SYSCON_CLKCONTROL_I2S1_CORE,
524 SYSCON_CLKCONTROL_UART1,
525 SYSCON_CLKCONTROL_AAIF,
526 SYSCON_CLKCONTROL_AHB,
527 SYSCON_CLKCONTROL_APEX,
528 SYSCON_CLKCONTROL_CPU,
529 SYSCON_CLKCONTROL_DMA,
530 SYSCON_CLKCONTROL_EMIF,
531 SYSCON_CLKCONTROL_NAND_IF,
532 SYSCON_CLKCONTROL_VIDEO_ENC,
533 SYSCON_CLKCONTROL_XGAM,
534 SYSCON_CLKCONTROL_SEMI,
535 SYSCON_CLKCONTROL_AHB_SUBSYS,
536 SYSCON_CLKCONTROL_MSPRO
537};
538
539enum syscon_sysclk_mode {
540 SYSCON_SYSCLK_DISABLED,
541 SYSCON_SYSCLK_M_CLK,
542 SYSCON_SYSCLK_ACC_FSM,
543 SYSCON_SYSCLK_PLL60_48,
544 SYSCON_SYSCLK_PLL60_60,
545 SYSCON_SYSCLK_ACC_PLL208,
546 SYSCON_SYSCLK_APP_PLL13,
547 SYSCON_SYSCLK_APP_FSM,
548 SYSCON_SYSCLK_RTC,
549 SYSCON_SYSCLK_APP_PLL208
550};
551
552enum syscon_sysclk_req {
553 SYSCON_SYSCLKREQ_DISABLED,
554 SYSCON_SYSCLKREQ_ACTIVE_LOW,
555 SYSCON_SYSCLKREQ_MONITOR
556};
557
558enum syscon_clk_mode {
559 SYSCON_CLKMODE_OFF,
560 SYSCON_CLKMODE_DEFAULT,
561 SYSCON_CLKMODE_LOW,
562 SYSCON_CLKMODE_MEDIUM,
563 SYSCON_CLKMODE_HIGH,
564 SYSCON_CLKMODE_PERMANENT,
565 SYSCON_CLKMODE_ON,
566};
567
568enum syscon_call_mode {
569 SYSCON_CLKCALL_NOWAIT,
570 SYSCON_CLKCALL_WAIT,
571};
572
573int syscon_dc_on(bool keep_power_on);
574int syscon_set_busmaster_active_state(enum syscon_busmaster busmaster,
575 bool active);
576bool syscon_get_busmaster_active_state(void);
577int syscon_set_sleep_mask(enum syscon_clk,
578 bool sleep_ctrl);
579int syscon_config_sysclk(u32 sysclk,
580 enum syscon_sysclk_mode sysclkmode,
581 bool inverse,
582 u32 divisor,
583 enum syscon_sysclk_req sysclkreq);
584bool syscon_can_turn_off_semi_clock(void);
585
586/* This function is restricted to core.c */
587int syscon_request_normal_power(bool req);
588
589/* This function is restricted to be used by platform_speed.c */
590int syscon_speed_request(enum syscon_call_mode wait_mode,
591 enum syscon_clk_mode req_clk_mode);
592#endif /* __MACH_SYSCON_H */
diff --git a/arch/arm/mach-u300/include/mach/timex.h b/arch/arm/mach-u300/include/mach/timex.h
deleted file mode 100644
index f233b72633f6..000000000000
--- a/arch/arm/mach-u300/include/mach/timex.h
+++ /dev/null
@@ -1,17 +0,0 @@
1/*
2 *
3 * arch/arm/mach-u300/include/mach/timex.h
4 *
5 *
6 * Copyright (C) 2006-2009 ST-Ericsson AB
7 * License terms: GNU General Public License (GPL) version 2
8 * Platform tick rate definition.
9 * Author: Linus Walleij <linus.walleij@stericsson.com>
10 */
11#ifndef __MACH_TIMEX_H
12#define __MACH_TIMEX_H
13
14/* This is for the APP OS GP1 (General Purpose 1) timer */
15#define CLOCK_TICK_RATE 1000000
16
17#endif
diff --git a/arch/arm/mach-u300/include/mach/u300-regs.h b/arch/arm/mach-u300/include/mach/u300-regs.h
deleted file mode 100644
index 0320495efc4d..000000000000
--- a/arch/arm/mach-u300/include/mach/u300-regs.h
+++ /dev/null
@@ -1,165 +0,0 @@
1/*
2 *
3 * arch/arm/mach-u300/include/mach/u300-regs.h
4 *
5 *
6 * Copyright (C) 2006-2009 ST-Ericsson AB
7 * License terms: GNU General Public License (GPL) version 2
8 * Basic register address definitions in physical memory and
9 * some block definitions for core devices like the timer.
10 * Author: Linus Walleij <linus.walleij@stericsson.com>
11 */
12
13#ifndef __MACH_U300_REGS_H
14#define __MACH_U300_REGS_H
15
16/*
17 * These are the large blocks of memory allocated for I/O.
18 * the defines are used for setting up the I/O memory mapping.
19 */
20
21/* NAND Flash CS0 */
22#define U300_NAND_CS0_PHYS_BASE 0x80000000
23
24/* NFIF */
25#define U300_NAND_IF_PHYS_BASE 0x9f800000
26
27/* ALE, CLE offset for FSMC NAND */
28#define PLAT_NAND_CLE (1 << 16)
29#define PLAT_NAND_ALE (1 << 17)
30
31/* AHB Peripherals */
32#define U300_AHB_PER_PHYS_BASE 0xa0000000
33#define U300_AHB_PER_VIRT_BASE 0xff010000
34
35/* FAST Peripherals */
36#define U300_FAST_PER_PHYS_BASE 0xc0000000
37#define U300_FAST_PER_VIRT_BASE 0xff020000
38
39/* SLOW Peripherals */
40#define U300_SLOW_PER_PHYS_BASE 0xc0010000
41#define U300_SLOW_PER_VIRT_BASE 0xff000000
42
43/* Boot ROM */
44#define U300_BOOTROM_PHYS_BASE 0xffff0000
45#define U300_BOOTROM_VIRT_BASE 0xffff0000
46
47/* SEMI config base */
48#define U300_SEMI_CONFIG_BASE 0x2FFE0000
49
50/*
51 * AHB peripherals
52 */
53
54/* AHB Peripherals Bridge Controller */
55#define U300_AHB_BRIDGE_BASE (U300_AHB_PER_PHYS_BASE+0x0000)
56
57/* Vectored Interrupt Controller 0, servicing 32 interrupts */
58#define U300_INTCON0_BASE (U300_AHB_PER_PHYS_BASE+0x1000)
59#define U300_INTCON0_VBASE IOMEM(U300_AHB_PER_VIRT_BASE+0x1000)
60
61/* Vectored Interrupt Controller 1, servicing 32 interrupts */
62#define U300_INTCON1_BASE (U300_AHB_PER_PHYS_BASE+0x2000)
63#define U300_INTCON1_VBASE IOMEM(U300_AHB_PER_VIRT_BASE+0x2000)
64
65/* Memory Stick Pro (MSPRO) controller */
66#define U300_MSPRO_BASE (U300_AHB_PER_PHYS_BASE+0x3000)
67
68/* EMIF Configuration Area */
69#define U300_EMIF_CFG_BASE (U300_AHB_PER_PHYS_BASE+0x4000)
70
71
72/*
73 * FAST peripherals
74 */
75
76/* FAST bridge control */
77#define U300_FAST_BRIDGE_BASE (U300_FAST_PER_PHYS_BASE+0x0000)
78
79/* MMC/SD controller */
80#define U300_MMCSD_BASE (U300_FAST_PER_PHYS_BASE+0x1000)
81
82/* PCM I2S0 controller */
83#define U300_PCM_I2S0_BASE (U300_FAST_PER_PHYS_BASE+0x2000)
84
85/* PCM I2S1 controller */
86#define U300_PCM_I2S1_BASE (U300_FAST_PER_PHYS_BASE+0x3000)
87
88/* I2C0 controller */
89#define U300_I2C0_BASE (U300_FAST_PER_PHYS_BASE+0x4000)
90
91/* I2C1 controller */
92#define U300_I2C1_BASE (U300_FAST_PER_PHYS_BASE+0x5000)
93
94/* SPI controller */
95#define U300_SPI_BASE (U300_FAST_PER_PHYS_BASE+0x6000)
96
97/* Fast UART1 on U335 only */
98#define U300_UART1_BASE (U300_FAST_PER_PHYS_BASE+0x7000)
99
100/*
101 * SLOW peripherals
102 */
103
104/* SLOW bridge control */
105#define U300_SLOW_BRIDGE_BASE (U300_SLOW_PER_PHYS_BASE)
106
107/* SYSCON */
108#define U300_SYSCON_BASE (U300_SLOW_PER_PHYS_BASE+0x1000)
109#define U300_SYSCON_VBASE IOMEM(U300_SLOW_PER_VIRT_BASE+0x1000)
110
111/* Watchdog */
112#define U300_WDOG_BASE (U300_SLOW_PER_PHYS_BASE+0x2000)
113
114/* UART0 */
115#define U300_UART0_BASE (U300_SLOW_PER_PHYS_BASE+0x3000)
116
117/* APP side special timer */
118#define U300_TIMER_APP_BASE (U300_SLOW_PER_PHYS_BASE+0x4000)
119#define U300_TIMER_APP_VBASE IOMEM(U300_SLOW_PER_VIRT_BASE+0x4000)
120
121/* Keypad */
122#define U300_KEYPAD_BASE (U300_SLOW_PER_PHYS_BASE+0x5000)
123
124/* GPIO */
125#define U300_GPIO_BASE (U300_SLOW_PER_PHYS_BASE+0x6000)
126
127/* RTC */
128#define U300_RTC_BASE (U300_SLOW_PER_PHYS_BASE+0x7000)
129
130/* Bus tracer */
131#define U300_BUSTR_BASE (U300_SLOW_PER_PHYS_BASE+0x8000)
132
133/* Event handler (hardware queue) */
134#define U300_EVHIST_BASE (U300_SLOW_PER_PHYS_BASE+0x9000)
135
136/* Genric Timer */
137#define U300_TIMER_BASE (U300_SLOW_PER_PHYS_BASE+0xa000)
138
139/* PPM */
140#define U300_PPM_BASE (U300_SLOW_PER_PHYS_BASE+0xb000)
141
142
143/*
144 * REST peripherals
145 */
146
147/* ISP (image signal processor) */
148#define U300_ISP_BASE (0xA0008000)
149
150/* DMA Controller base */
151#define U300_DMAC_BASE (0xC0020000)
152
153/* MSL Base */
154#define U300_MSL_BASE (0xc0022000)
155
156/* APEX Base */
157#define U300_APEX_BASE (0xc0030000)
158
159/* Video Encoder Base */
160#define U300_VIDEOENC_BASE (0xc0080000)
161
162/* XGAM Base */
163#define U300_XGAM_BASE (0xd0000000)
164
165#endif
diff --git a/arch/arm/mach-u300/include/mach/uncompress.h b/arch/arm/mach-u300/include/mach/uncompress.h
deleted file mode 100644
index 783e7e60101b..000000000000
--- a/arch/arm/mach-u300/include/mach/uncompress.h
+++ /dev/null
@@ -1,45 +0,0 @@
1/*
2 * arch/arm/mach-u300/include/mach/uncompress.h
3 *
4 * Copyright (C) 2003 ARM Limited
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#define AMBA_UART_DR (*(volatile unsigned char *)0xc0013000)
21#define AMBA_UART_LCRH (*(volatile unsigned char *)0xc001302C)
22#define AMBA_UART_CR (*(volatile unsigned char *)0xc0013030)
23#define AMBA_UART_FR (*(volatile unsigned char *)0xc0013018)
24
25/*
26 * This does not append a newline
27 */
28static inline void putc(int c)
29{
30 while (AMBA_UART_FR & (1 << 5))
31 barrier();
32
33 AMBA_UART_DR = c;
34}
35
36static inline void flush(void)
37{
38 while (AMBA_UART_FR & (1 << 3))
39 barrier();
40}
41
42/*
43 * nothing to do
44 */
45#define arch_decomp_setup()
diff --git a/arch/arm/mach-u300/regulator.c b/arch/arm/mach-u300/regulator.c
index 9c53f01c62eb..bf40cd478fe9 100644
--- a/arch/arm/mach-u300/regulator.c
+++ b/arch/arm/mach-u300/regulator.c
@@ -10,11 +10,18 @@
10#include <linux/device.h> 10#include <linux/device.h>
11#include <linux/signal.h> 11#include <linux/signal.h>
12#include <linux/err.h> 12#include <linux/err.h>
13#include <linux/of.h>
14#include <linux/module.h>
15#include <linux/platform_device.h>
16#include <linux/regulator/machine.h>
13#include <linux/regulator/consumer.h> 17#include <linux/regulator/consumer.h>
14/* Those are just for writing in syscon */ 18#include <linux/mfd/syscon.h>
15#include <linux/io.h> 19#include <linux/regmap.h>
16#include <mach/hardware.h> 20
17#include <mach/syscon.h> 21/* Power Management Control 16bit (R/W) */
22#define U300_SYSCON_PMCR (0x50)
23#define U300_SYSCON_PMCR_DCON_ENABLE (0x0002)
24#define U300_SYSCON_PMCR_PWR_MGNT_ENABLE (0x0001)
18 25
19/* 26/*
20 * Regulators that power the board and chip and which are 27 * Regulators that power the board and chip and which are
@@ -47,13 +54,28 @@ void u300_pm_poweroff(void)
47/* 54/*
48 * Hog the regulators needed to power up the board. 55 * Hog the regulators needed to power up the board.
49 */ 56 */
50static int __init u300_init_boardpower(void) 57static int __init __u300_init_boardpower(struct platform_device *pdev)
51{ 58{
59 struct device_node *np = pdev->dev.of_node;
60 struct device_node *syscon_np;
61 struct regmap *regmap;
52 int err; 62 int err;
53 u32 val;
54 63
55 pr_info("U300: setting up board power\n"); 64 pr_info("U300: setting up board power\n");
56 main_power_15 = regulator_get(NULL, "vana15"); 65
66 syscon_np = of_parse_phandle(np, "syscon", 0);
67 if (!syscon_np) {
68 pr_crit("U300: no syscon node\n");
69 return -ENODEV;
70 }
71 regmap = syscon_node_to_regmap(syscon_np);
72 if (!regmap) {
73 pr_crit("U300: could not locate syscon regmap\n");
74 return -ENODEV;
75 }
76
77 main_power_15 = regulator_get(&pdev->dev, "vana15");
78
57 if (IS_ERR(main_power_15)) { 79 if (IS_ERR(main_power_15)) {
58 pr_err("could not get vana15"); 80 pr_err("could not get vana15");
59 return PTR_ERR(main_power_15); 81 return PTR_ERR(main_power_15);
@@ -72,9 +94,8 @@ static int __init u300_init_boardpower(void)
72 * the rest of the U300 power management is implemented. 94 * the rest of the U300 power management is implemented.
73 */ 95 */
74 pr_info("U300: disable system controller pull-up\n"); 96 pr_info("U300: disable system controller pull-up\n");
75 val = readw(U300_SYSCON_VBASE + U300_SYSCON_PMCR); 97 regmap_update_bits(regmap, U300_SYSCON_PMCR,
76 val &= ~U300_SYSCON_PMCR_DCON_ENABLE; 98 U300_SYSCON_PMCR_DCON_ENABLE, 0);
77 writew(val, U300_SYSCON_VBASE + U300_SYSCON_PMCR);
78 99
79 /* Register globally exported PM poweroff hook */ 100 /* Register globally exported PM poweroff hook */
80 pm_power_off = u300_pm_poweroff; 101 pm_power_off = u300_pm_poweroff;
@@ -82,7 +103,31 @@ static int __init u300_init_boardpower(void)
82 return 0; 103 return 0;
83} 104}
84 105
106static int __init s365_board_probe(struct platform_device *pdev)
107{
108 return __u300_init_boardpower(pdev);
109}
110
111static const struct of_device_id s365_board_match[] = {
112 { .compatible = "stericsson,s365" },
113 {},
114};
115
116static struct platform_driver s365_board_driver = {
117 .driver = {
118 .name = "s365-board",
119 .owner = THIS_MODULE,
120 .of_match_table = s365_board_match,
121 },
122};
123
85/* 124/*
86 * So at module init time we hog the regulator! 125 * So at module init time we hog the regulator!
87 */ 126 */
88module_init(u300_init_boardpower); 127static int __init u300_init_boardpower(void)
128{
129 return platform_driver_probe(&s365_board_driver,
130 s365_board_probe);
131}
132
133device_initcall(u300_init_boardpower);
diff --git a/arch/arm/mach-u300/spi.c b/arch/arm/mach-u300/spi.c
deleted file mode 100644
index 910698293d64..000000000000
--- a/arch/arm/mach-u300/spi.c
+++ /dev/null
@@ -1,102 +0,0 @@
1/*
2 * arch/arm/mach-u300/spi.c
3 *
4 * Copyright (C) 2009 ST-Ericsson AB
5 * License terms: GNU General Public License (GPL) version 2
6 *
7 * Author: Linus Walleij <linus.walleij@stericsson.com>
8 */
9#include <linux/device.h>
10#include <linux/amba/bus.h>
11#include <linux/spi/spi.h>
12#include <linux/amba/pl022.h>
13#include <linux/platform_data/dma-coh901318.h>
14#include <linux/err.h>
15
16/*
17 * The following is for the actual devices on the SSP/SPI bus
18 */
19#ifdef CONFIG_MACH_U300_SPIDUMMY
20static void select_dummy_chip(u32 chipselect)
21{
22 pr_debug("CORE: %s called with CS=0x%x (%s)\n",
23 __func__,
24 chipselect,
25 chipselect ? "unselect chip" : "select chip");
26 /*
27 * Here you would write the chip select value to the GPIO pins if
28 * this was a real chip (but this is a loopback dummy).
29 */
30}
31
32struct pl022_config_chip dummy_chip_info = {
33 /* available POLLING_TRANSFER, INTERRUPT_TRANSFER, DMA_TRANSFER */
34 .com_mode = DMA_TRANSFER,
35 .iface = SSP_INTERFACE_MOTOROLA_SPI,
36 /* We can only act as master but SSP_SLAVE is possible in theory */
37 .hierarchy = SSP_MASTER,
38 /* 0 = drive TX even as slave, 1 = do not drive TX as slave */
39 .slave_tx_disable = 0,
40 .rx_lev_trig = SSP_RX_4_OR_MORE_ELEM,
41 .tx_lev_trig = SSP_TX_4_OR_MORE_EMPTY_LOC,
42 .ctrl_len = SSP_BITS_12,
43 .wait_state = SSP_MWIRE_WAIT_ZERO,
44 .duplex = SSP_MICROWIRE_CHANNEL_FULL_DUPLEX,
45 /*
46 * This is where you insert a call to a function to enable CS
47 * (usually GPIO) for a certain chip.
48 */
49 .cs_control = select_dummy_chip,
50};
51#endif
52
53static struct spi_board_info u300_spi_devices[] = {
54#ifdef CONFIG_MACH_U300_SPIDUMMY
55 {
56 /* A dummy chip used for loopback tests */
57 .modalias = "spi-dummy",
58 /* Really dummy, pass in additional chip config here */
59 .platform_data = NULL,
60 /* This defines how the controller shall handle the device */
61 .controller_data = &dummy_chip_info,
62 /* .irq - no external IRQ routed from this device */
63 .max_speed_hz = 1000000,
64 .bus_num = 0, /* Only one bus on this chip */
65 .chip_select = 0,
66 /* Means SPI_CS_HIGH, change if e.g low CS */
67 .mode = SPI_MODE_1 | SPI_LOOP,
68 },
69#endif
70};
71
72static struct pl022_ssp_controller ssp_platform_data = {
73 /* If you have several SPI buses this varies, we have only bus 0 */
74 .bus_id = 0,
75 /*
76 * On the APP CPU GPIO 4, 5 and 6 are connected as generic
77 * chip selects for SPI. (Same on U330, U335 and U365.)
78 * TODO: make sure the GPIO driver can select these properly
79 * and do padmuxing accordingly too.
80 */
81 .num_chipselect = 3,
82#ifdef CONFIG_COH901318
83 .enable_dma = 1,
84 .dma_filter = coh901318_filter_id,
85 .dma_rx_param = (void *) U300_DMA_SPI_RX,
86 .dma_tx_param = (void *) U300_DMA_SPI_TX,
87#else
88 .enable_dma = 0,
89#endif
90};
91
92
93void __init u300_spi_init(struct amba_device *adev)
94{
95 adev->dev.platform_data = &ssp_platform_data;
96}
97
98void __init u300_spi_register_board_devices(void)
99{
100 /* Register any SPI devices */
101 spi_register_board_info(u300_spi_devices, ARRAY_SIZE(u300_spi_devices));
102}
diff --git a/arch/arm/mach-u300/spi.h b/arch/arm/mach-u300/spi.h
deleted file mode 100644
index bd3d867e240f..000000000000
--- a/arch/arm/mach-u300/spi.h
+++ /dev/null
@@ -1,26 +0,0 @@
1/*
2 * arch/arm/mach-u300/spi.h
3 *
4 * Copyright (C) 2009 ST-Ericsson AB
5 * License terms: GNU General Public License (GPL) version 2
6 *
7 * Author: Linus Walleij <linus.walleij@stericsson.com>
8 */
9#ifndef SPI_H
10#define SPI_H
11#include <linux/amba/bus.h>
12
13#ifdef CONFIG_SPI_PL022
14void __init u300_spi_init(struct amba_device *adev);
15void __init u300_spi_register_board_devices(void);
16#else
17/* Compile out SPI support if PL022 is not selected */
18static inline void __init u300_spi_init(struct amba_device *adev)
19{
20}
21static inline void __init u300_spi_register_board_devices(void)
22{
23}
24#endif
25
26#endif
diff --git a/arch/arm/mach-u300/timer.c b/arch/arm/mach-u300/timer.c
index d9e73209c9b8..b5db207dfd1e 100644
--- a/arch/arm/mach-u300/timer.c
+++ b/arch/arm/mach-u300/timer.c
@@ -18,17 +18,15 @@
18#include <linux/clk.h> 18#include <linux/clk.h>
19#include <linux/err.h> 19#include <linux/err.h>
20#include <linux/irq.h> 20#include <linux/irq.h>
21 21#include <linux/delay.h>
22#include <mach/hardware.h> 22#include <linux/of_address.h>
23#include <mach/irqs.h> 23#include <linux/of_irq.h>
24#include <linux/sched_clock.h>
24 25
25/* Generic stuff */ 26/* Generic stuff */
26#include <asm/sched_clock.h>
27#include <asm/mach/map.h> 27#include <asm/mach/map.h>
28#include <asm/mach/time.h> 28#include <asm/mach/time.h>
29 29
30#include "timer.h"
31
32/* 30/*
33 * APP side special timer registers 31 * APP side special timer registers
34 * This timer contains four timers which can fire an interrupt each. 32 * This timer contains four timers which can fire an interrupt each.
@@ -189,6 +187,8 @@
189#define TICKS_PER_JIFFY ((CLOCK_TICK_RATE + (HZ/2)) / HZ) 187#define TICKS_PER_JIFFY ((CLOCK_TICK_RATE + (HZ/2)) / HZ)
190#define US_PER_TICK ((1000000 + (HZ/2)) / HZ) 188#define US_PER_TICK ((1000000 + (HZ/2)) / HZ)
191 189
190static void __iomem *u300_timer_base;
191
192/* 192/*
193 * The u300_set_mode() function is always called first, if we 193 * The u300_set_mode() function is always called first, if we
194 * have oneshot timer active, the oneshot scheduling function 194 * have oneshot timer active, the oneshot scheduling function
@@ -201,28 +201,28 @@ static void u300_set_mode(enum clock_event_mode mode,
201 case CLOCK_EVT_MODE_PERIODIC: 201 case CLOCK_EVT_MODE_PERIODIC:
202 /* Disable interrupts on GPT1 */ 202 /* Disable interrupts on GPT1 */
203 writel(U300_TIMER_APP_GPT1IE_IRQ_DISABLE, 203 writel(U300_TIMER_APP_GPT1IE_IRQ_DISABLE,
204 U300_TIMER_APP_VBASE + U300_TIMER_APP_GPT1IE); 204 u300_timer_base + U300_TIMER_APP_GPT1IE);
205 /* Disable GP1 while we're reprogramming it. */ 205 /* Disable GP1 while we're reprogramming it. */
206 writel(U300_TIMER_APP_DGPT1_TIMER_DISABLE, 206 writel(U300_TIMER_APP_DGPT1_TIMER_DISABLE,
207 U300_TIMER_APP_VBASE + U300_TIMER_APP_DGPT1); 207 u300_timer_base + U300_TIMER_APP_DGPT1);
208 /* 208 /*
209 * Set the periodic mode to a certain number of ticks per 209 * Set the periodic mode to a certain number of ticks per
210 * jiffy. 210 * jiffy.
211 */ 211 */
212 writel(TICKS_PER_JIFFY, 212 writel(TICKS_PER_JIFFY,
213 U300_TIMER_APP_VBASE + U300_TIMER_APP_GPT1TC); 213 u300_timer_base + U300_TIMER_APP_GPT1TC);
214 /* 214 /*
215 * Set continuous mode, so the timer keeps triggering 215 * Set continuous mode, so the timer keeps triggering
216 * interrupts. 216 * interrupts.
217 */ 217 */
218 writel(U300_TIMER_APP_SGPT1M_MODE_CONTINUOUS, 218 writel(U300_TIMER_APP_SGPT1M_MODE_CONTINUOUS,
219 U300_TIMER_APP_VBASE + U300_TIMER_APP_SGPT1M); 219 u300_timer_base + U300_TIMER_APP_SGPT1M);
220 /* Enable timer interrupts */ 220 /* Enable timer interrupts */
221 writel(U300_TIMER_APP_GPT1IE_IRQ_ENABLE, 221 writel(U300_TIMER_APP_GPT1IE_IRQ_ENABLE,
222 U300_TIMER_APP_VBASE + U300_TIMER_APP_GPT1IE); 222 u300_timer_base + U300_TIMER_APP_GPT1IE);
223 /* Then enable the OS timer again */ 223 /* Then enable the OS timer again */
224 writel(U300_TIMER_APP_EGPT1_TIMER_ENABLE, 224 writel(U300_TIMER_APP_EGPT1_TIMER_ENABLE,
225 U300_TIMER_APP_VBASE + U300_TIMER_APP_EGPT1); 225 u300_timer_base + U300_TIMER_APP_EGPT1);
226 break; 226 break;
227 case CLOCK_EVT_MODE_ONESHOT: 227 case CLOCK_EVT_MODE_ONESHOT:
228 /* Just break; here? */ 228 /* Just break; here? */
@@ -233,33 +233,33 @@ static void u300_set_mode(enum clock_event_mode mode,
233 */ 233 */
234 /* Disable interrupts on GPT1 */ 234 /* Disable interrupts on GPT1 */
235 writel(U300_TIMER_APP_GPT1IE_IRQ_DISABLE, 235 writel(U300_TIMER_APP_GPT1IE_IRQ_DISABLE,
236 U300_TIMER_APP_VBASE + U300_TIMER_APP_GPT1IE); 236 u300_timer_base + U300_TIMER_APP_GPT1IE);
237 /* Disable GP1 while we're reprogramming it. */ 237 /* Disable GP1 while we're reprogramming it. */
238 writel(U300_TIMER_APP_DGPT1_TIMER_DISABLE, 238 writel(U300_TIMER_APP_DGPT1_TIMER_DISABLE,
239 U300_TIMER_APP_VBASE + U300_TIMER_APP_DGPT1); 239 u300_timer_base + U300_TIMER_APP_DGPT1);
240 /* 240 /*
241 * Expire far in the future, u300_set_next_event() will be 241 * Expire far in the future, u300_set_next_event() will be
242 * called soon... 242 * called soon...
243 */ 243 */
244 writel(0xFFFFFFFF, U300_TIMER_APP_VBASE + U300_TIMER_APP_GPT1TC); 244 writel(0xFFFFFFFF, u300_timer_base + U300_TIMER_APP_GPT1TC);
245 /* We run one shot per tick here! */ 245 /* We run one shot per tick here! */
246 writel(U300_TIMER_APP_SGPT1M_MODE_ONE_SHOT, 246 writel(U300_TIMER_APP_SGPT1M_MODE_ONE_SHOT,
247 U300_TIMER_APP_VBASE + U300_TIMER_APP_SGPT1M); 247 u300_timer_base + U300_TIMER_APP_SGPT1M);
248 /* Enable interrupts for this timer */ 248 /* Enable interrupts for this timer */
249 writel(U300_TIMER_APP_GPT1IE_IRQ_ENABLE, 249 writel(U300_TIMER_APP_GPT1IE_IRQ_ENABLE,
250 U300_TIMER_APP_VBASE + U300_TIMER_APP_GPT1IE); 250 u300_timer_base + U300_TIMER_APP_GPT1IE);
251 /* Enable timer */ 251 /* Enable timer */
252 writel(U300_TIMER_APP_EGPT1_TIMER_ENABLE, 252 writel(U300_TIMER_APP_EGPT1_TIMER_ENABLE,
253 U300_TIMER_APP_VBASE + U300_TIMER_APP_EGPT1); 253 u300_timer_base + U300_TIMER_APP_EGPT1);
254 break; 254 break;
255 case CLOCK_EVT_MODE_UNUSED: 255 case CLOCK_EVT_MODE_UNUSED:
256 case CLOCK_EVT_MODE_SHUTDOWN: 256 case CLOCK_EVT_MODE_SHUTDOWN:
257 /* Disable interrupts on GP1 */ 257 /* Disable interrupts on GP1 */
258 writel(U300_TIMER_APP_GPT1IE_IRQ_DISABLE, 258 writel(U300_TIMER_APP_GPT1IE_IRQ_DISABLE,
259 U300_TIMER_APP_VBASE + U300_TIMER_APP_GPT1IE); 259 u300_timer_base + U300_TIMER_APP_GPT1IE);
260 /* Disable GP1 */ 260 /* Disable GP1 */
261 writel(U300_TIMER_APP_DGPT1_TIMER_DISABLE, 261 writel(U300_TIMER_APP_DGPT1_TIMER_DISABLE,
262 U300_TIMER_APP_VBASE + U300_TIMER_APP_DGPT1); 262 u300_timer_base + U300_TIMER_APP_DGPT1);
263 break; 263 break;
264 case CLOCK_EVT_MODE_RESUME: 264 case CLOCK_EVT_MODE_RESUME:
265 /* Ignore this call */ 265 /* Ignore this call */
@@ -281,27 +281,27 @@ static int u300_set_next_event(unsigned long cycles,
281{ 281{
282 /* Disable interrupts on GPT1 */ 282 /* Disable interrupts on GPT1 */
283 writel(U300_TIMER_APP_GPT1IE_IRQ_DISABLE, 283 writel(U300_TIMER_APP_GPT1IE_IRQ_DISABLE,
284 U300_TIMER_APP_VBASE + U300_TIMER_APP_GPT1IE); 284 u300_timer_base + U300_TIMER_APP_GPT1IE);
285 /* Disable GP1 while we're reprogramming it. */ 285 /* Disable GP1 while we're reprogramming it. */
286 writel(U300_TIMER_APP_DGPT1_TIMER_DISABLE, 286 writel(U300_TIMER_APP_DGPT1_TIMER_DISABLE,
287 U300_TIMER_APP_VBASE + U300_TIMER_APP_DGPT1); 287 u300_timer_base + U300_TIMER_APP_DGPT1);
288 /* Reset the General Purpose timer 1. */ 288 /* Reset the General Purpose timer 1. */
289 writel(U300_TIMER_APP_RGPT1_TIMER_RESET, 289 writel(U300_TIMER_APP_RGPT1_TIMER_RESET,
290 U300_TIMER_APP_VBASE + U300_TIMER_APP_RGPT1); 290 u300_timer_base + U300_TIMER_APP_RGPT1);
291 /* IRQ in n * cycles */ 291 /* IRQ in n * cycles */
292 writel(cycles, U300_TIMER_APP_VBASE + U300_TIMER_APP_GPT1TC); 292 writel(cycles, u300_timer_base + U300_TIMER_APP_GPT1TC);
293 /* 293 /*
294 * We run one shot per tick here! (This is necessary to reconfigure, 294 * We run one shot per tick here! (This is necessary to reconfigure,
295 * the timer will tilt if you don't!) 295 * the timer will tilt if you don't!)
296 */ 296 */
297 writel(U300_TIMER_APP_SGPT1M_MODE_ONE_SHOT, 297 writel(U300_TIMER_APP_SGPT1M_MODE_ONE_SHOT,
298 U300_TIMER_APP_VBASE + U300_TIMER_APP_SGPT1M); 298 u300_timer_base + U300_TIMER_APP_SGPT1M);
299 /* Enable timer interrupts */ 299 /* Enable timer interrupts */
300 writel(U300_TIMER_APP_GPT1IE_IRQ_ENABLE, 300 writel(U300_TIMER_APP_GPT1IE_IRQ_ENABLE,
301 U300_TIMER_APP_VBASE + U300_TIMER_APP_GPT1IE); 301 u300_timer_base + U300_TIMER_APP_GPT1IE);
302 /* Then enable the OS timer again */ 302 /* Then enable the OS timer again */
303 writel(U300_TIMER_APP_EGPT1_TIMER_ENABLE, 303 writel(U300_TIMER_APP_EGPT1_TIMER_ENABLE,
304 U300_TIMER_APP_VBASE + U300_TIMER_APP_EGPT1); 304 u300_timer_base + U300_TIMER_APP_EGPT1);
305 return 0; 305 return 0;
306} 306}
307 307
@@ -320,8 +320,9 @@ static irqreturn_t u300_timer_interrupt(int irq, void *dev_id)
320{ 320{
321 struct clock_event_device *evt = &clockevent_u300_1mhz; 321 struct clock_event_device *evt = &clockevent_u300_1mhz;
322 /* ACK/Clear timer IRQ for the APP GPT1 Timer */ 322 /* ACK/Clear timer IRQ for the APP GPT1 Timer */
323
323 writel(U300_TIMER_APP_GPT1IA_IRQ_ACK, 324 writel(U300_TIMER_APP_GPT1IA_IRQ_ACK,
324 U300_TIMER_APP_VBASE + U300_TIMER_APP_GPT1IA); 325 u300_timer_base + U300_TIMER_APP_GPT1IA);
325 evt->event_handler(evt); 326 evt->event_handler(evt);
326 return IRQ_HANDLED; 327 return IRQ_HANDLED;
327} 328}
@@ -342,65 +343,88 @@ static struct irqaction u300_timer_irq = {
342 343
343static u32 notrace u300_read_sched_clock(void) 344static u32 notrace u300_read_sched_clock(void)
344{ 345{
345 return readl(U300_TIMER_APP_VBASE + U300_TIMER_APP_GPT2CC); 346 return readl(u300_timer_base + U300_TIMER_APP_GPT2CC);
347}
348
349static unsigned long u300_read_current_timer(void)
350{
351 return readl(u300_timer_base + U300_TIMER_APP_GPT2CC);
346} 352}
347 353
354static struct delay_timer u300_delay_timer;
348 355
349/* 356/*
350 * This sets up the system timers, clock source and clock event. 357 * This sets up the system timers, clock source and clock event.
351 */ 358 */
352void __init u300_timer_init(void) 359static void __init u300_timer_init_of(struct device_node *np)
353{ 360{
361 struct resource irq_res;
362 int irq;
354 struct clk *clk; 363 struct clk *clk;
355 unsigned long rate; 364 unsigned long rate;
356 365
366 u300_timer_base = of_iomap(np, 0);
367 if (!u300_timer_base)
368 panic("could not ioremap system timer\n");
369
370 /* Get the IRQ for the GP1 timer */
371 irq = of_irq_to_resource(np, 2, &irq_res);
372 if (irq <= 0)
373 panic("no IRQ for system timer\n");
374
375 pr_info("U300 GP1 timer @ base: %p, IRQ: %d\n", u300_timer_base, irq);
376
357 /* Clock the interrupt controller */ 377 /* Clock the interrupt controller */
358 clk = clk_get_sys("apptimer", NULL); 378 clk = of_clk_get(np, 0);
359 BUG_ON(IS_ERR(clk)); 379 BUG_ON(IS_ERR(clk));
360 clk_prepare_enable(clk); 380 clk_prepare_enable(clk);
361 rate = clk_get_rate(clk); 381 rate = clk_get_rate(clk);
362 382
363 setup_sched_clock(u300_read_sched_clock, 32, rate); 383 setup_sched_clock(u300_read_sched_clock, 32, rate);
364 384
385 u300_delay_timer.read_current_timer = &u300_read_current_timer;
386 u300_delay_timer.freq = rate;
387 register_current_timer_delay(&u300_delay_timer);
388
365 /* 389 /*
366 * Disable the "OS" and "DD" timers - these are designed for Symbian! 390 * Disable the "OS" and "DD" timers - these are designed for Symbian!
367 * Example usage in cnh1601578 cpu subsystem pd_timer_app.c 391 * Example usage in cnh1601578 cpu subsystem pd_timer_app.c
368 */ 392 */
369 writel(U300_TIMER_APP_CRC_CLOCK_REQUEST_ENABLE, 393 writel(U300_TIMER_APP_CRC_CLOCK_REQUEST_ENABLE,
370 U300_TIMER_APP_VBASE + U300_TIMER_APP_CRC); 394 u300_timer_base + U300_TIMER_APP_CRC);
371 writel(U300_TIMER_APP_ROST_TIMER_RESET, 395 writel(U300_TIMER_APP_ROST_TIMER_RESET,
372 U300_TIMER_APP_VBASE + U300_TIMER_APP_ROST); 396 u300_timer_base + U300_TIMER_APP_ROST);
373 writel(U300_TIMER_APP_DOST_TIMER_DISABLE, 397 writel(U300_TIMER_APP_DOST_TIMER_DISABLE,
374 U300_TIMER_APP_VBASE + U300_TIMER_APP_DOST); 398 u300_timer_base + U300_TIMER_APP_DOST);
375 writel(U300_TIMER_APP_RDDT_TIMER_RESET, 399 writel(U300_TIMER_APP_RDDT_TIMER_RESET,
376 U300_TIMER_APP_VBASE + U300_TIMER_APP_RDDT); 400 u300_timer_base + U300_TIMER_APP_RDDT);
377 writel(U300_TIMER_APP_DDDT_TIMER_DISABLE, 401 writel(U300_TIMER_APP_DDDT_TIMER_DISABLE,
378 U300_TIMER_APP_VBASE + U300_TIMER_APP_DDDT); 402 u300_timer_base + U300_TIMER_APP_DDDT);
379 403
380 /* Reset the General Purpose timer 1. */ 404 /* Reset the General Purpose timer 1. */
381 writel(U300_TIMER_APP_RGPT1_TIMER_RESET, 405 writel(U300_TIMER_APP_RGPT1_TIMER_RESET,
382 U300_TIMER_APP_VBASE + U300_TIMER_APP_RGPT1); 406 u300_timer_base + U300_TIMER_APP_RGPT1);
383 407
384 /* Set up the IRQ handler */ 408 /* Set up the IRQ handler */
385 setup_irq(IRQ_U300_TIMER_APP_GP1, &u300_timer_irq); 409 setup_irq(irq, &u300_timer_irq);
386 410
387 /* Reset the General Purpose timer 2 */ 411 /* Reset the General Purpose timer 2 */
388 writel(U300_TIMER_APP_RGPT2_TIMER_RESET, 412 writel(U300_TIMER_APP_RGPT2_TIMER_RESET,
389 U300_TIMER_APP_VBASE + U300_TIMER_APP_RGPT2); 413 u300_timer_base + U300_TIMER_APP_RGPT2);
390 /* Set this timer to run around forever */ 414 /* Set this timer to run around forever */
391 writel(0xFFFFFFFFU, U300_TIMER_APP_VBASE + U300_TIMER_APP_GPT2TC); 415 writel(0xFFFFFFFFU, u300_timer_base + U300_TIMER_APP_GPT2TC);
392 /* Set continuous mode so it wraps around */ 416 /* Set continuous mode so it wraps around */
393 writel(U300_TIMER_APP_SGPT2M_MODE_CONTINUOUS, 417 writel(U300_TIMER_APP_SGPT2M_MODE_CONTINUOUS,
394 U300_TIMER_APP_VBASE + U300_TIMER_APP_SGPT2M); 418 u300_timer_base + U300_TIMER_APP_SGPT2M);
395 /* Disable timer interrupts */ 419 /* Disable timer interrupts */
396 writel(U300_TIMER_APP_GPT2IE_IRQ_DISABLE, 420 writel(U300_TIMER_APP_GPT2IE_IRQ_DISABLE,
397 U300_TIMER_APP_VBASE + U300_TIMER_APP_GPT2IE); 421 u300_timer_base + U300_TIMER_APP_GPT2IE);
398 /* Then enable the GP2 timer to use as a free running us counter */ 422 /* Then enable the GP2 timer to use as a free running us counter */
399 writel(U300_TIMER_APP_EGPT2_TIMER_ENABLE, 423 writel(U300_TIMER_APP_EGPT2_TIMER_ENABLE,
400 U300_TIMER_APP_VBASE + U300_TIMER_APP_EGPT2); 424 u300_timer_base + U300_TIMER_APP_EGPT2);
401 425
402 /* Use general purpose timer 2 as clock source */ 426 /* Use general purpose timer 2 as clock source */
403 if (clocksource_mmio_init(U300_TIMER_APP_VBASE + U300_TIMER_APP_GPT2CC, 427 if (clocksource_mmio_init(u300_timer_base + U300_TIMER_APP_GPT2CC,
404 "GPT2", rate, 300, 32, clocksource_mmio_readl_up)) 428 "GPT2", rate, 300, 32, clocksource_mmio_readl_up))
405 pr_err("timer: failed to initialize U300 clock source\n"); 429 pr_err("timer: failed to initialize U300 clock source\n");
406 430
@@ -413,3 +437,6 @@ void __init u300_timer_init(void)
413 * used by hrtimers! 437 * used by hrtimers!
414 */ 438 */
415} 439}
440
441CLOCKSOURCE_OF_DECLARE(u300_timer, "stericsson,u300-apptimer",
442 u300_timer_init_of);
diff --git a/arch/arm/mach-u300/timer.h b/arch/arm/mach-u300/timer.h
deleted file mode 100644
index d34287bc34f5..000000000000
--- a/arch/arm/mach-u300/timer.h
+++ /dev/null
@@ -1 +0,0 @@
1extern void u300_timer_init(void);
diff --git a/arch/arm/mach-u300/u300-gpio.h b/arch/arm/mach-u300/u300-gpio.h
deleted file mode 100644
index 83f50772e169..000000000000
--- a/arch/arm/mach-u300/u300-gpio.h
+++ /dev/null
@@ -1,70 +0,0 @@
1/*
2 * Individual pin assignments for the B335/S335.
3 * Notice that the actual usage of these pins depends on the
4 * PAD MUX settings, that is why the same number can potentially
5 * appear several times. In the reference design each pin is only
6 * used for one purpose. These were determined by inspecting the
7 * S365 schematic.
8 */
9#define U300_GPIO_PIN_UART_RX 0
10#define U300_GPIO_PIN_UART_TX 1
11#define U300_GPIO_PIN_UART_CTS 2
12#define U300_GPIO_PIN_UART_RTS 3
13#define U300_GPIO_PIN_CAM_MAIN_STANDBY 4 /* Camera MAIN standby */
14#define U300_GPIO_PIN_GPIO05 5 /* Unrouted */
15#define U300_GPIO_PIN_MS_CD 6 /* Memory Stick Card insertion */
16#define U300_GPIO_PIN_GPIO07 7 /* Test point TP2430 */
17
18#define U300_GPIO_PIN_GPIO08 8 /* Test point TP2437 */
19#define U300_GPIO_PIN_GPIO09 9 /* Test point TP2431 */
20#define U300_GPIO_PIN_GPIO10 10 /* Test point TP2432 */
21#define U300_GPIO_PIN_MMC_CLKRET 11 /* Clock return from MMC/SD card */
22#define U300_GPIO_PIN_MMC_CD 12 /* MMC Card insertion detection */
23#define U300_GPIO_PIN_CAM_SUB_STANDBY 13 /* Camera SUB standby */
24#define U300_GPIO_PIN_GPIO14 14 /* Test point TP2436 */
25#define U300_GPIO_PIN_GPIO15 15 /* Unrouted */
26
27#define U300_GPIO_PIN_GPIO16 16 /* Test point TP2438 */
28#define U300_GPIO_PIN_PHFSENSE 17 /* Headphone jack sensing */
29#define U300_GPIO_PIN_GPIO18 18 /* Test point TP2439 */
30#define U300_GPIO_PIN_GPIO19 19 /* Routed somewhere */
31#define U300_GPIO_PIN_GPIO20 20 /* Unrouted */
32#define U300_GPIO_PIN_GPIO21 21 /* Unrouted */
33#define U300_GPIO_PIN_GPIO22 22 /* Unrouted */
34#define U300_GPIO_PIN_GPIO23 23 /* Unrouted */
35
36#define U300_GPIO_PIN_GPIO24 24 /* Unrouted */
37#define U300_GPIO_PIN_GPIO25 25 /* Unrouted */
38#define U300_GPIO_PIN_GPIO26 26 /* Unrouted */
39#define U300_GPIO_PIN_GPIO27 27 /* Unrouted */
40#define U300_GPIO_PIN_GPIO28 28 /* Unrouted */
41#define U300_GPIO_PIN_GPIO29 29 /* Unrouted */
42#define U300_GPIO_PIN_GPIO30 30 /* Unrouted */
43#define U300_GPIO_PIN_GPIO31 31 /* Unrouted */
44
45#define U300_GPIO_PIN_GPIO32 32 /* Unrouted */
46#define U300_GPIO_PIN_GPIO33 33 /* Unrouted */
47#define U300_GPIO_PIN_GPIO34 34 /* Unrouted */
48#define U300_GPIO_PIN_GPIO35 35 /* Unrouted */
49#define U300_GPIO_PIN_GPIO36 36 /* Unrouted */
50#define U300_GPIO_PIN_GPIO37 37 /* Unrouted */
51#define U300_GPIO_PIN_GPIO38 38 /* Unrouted */
52#define U300_GPIO_PIN_GPIO39 39 /* Unrouted */
53
54#define U300_GPIO_PIN_GPIO40 40 /* Unrouted */
55#define U300_GPIO_PIN_GPIO41 41 /* Unrouted */
56#define U300_GPIO_PIN_GPIO42 42 /* Unrouted */
57#define U300_GPIO_PIN_GPIO43 43 /* Unrouted */
58#define U300_GPIO_PIN_GPIO44 44 /* Unrouted */
59#define U300_GPIO_PIN_GPIO45 45 /* Unrouted */
60#define U300_GPIO_PIN_GPIO46 46 /* Unrouted */
61#define U300_GPIO_PIN_GPIO47 47 /* Unrouted */
62
63#define U300_GPIO_PIN_GPIO48 48 /* Unrouted */
64#define U300_GPIO_PIN_GPIO49 49 /* Unrouted */
65#define U300_GPIO_PIN_GPIO50 50 /* Unrouted */
66#define U300_GPIO_PIN_GPIO51 51 /* Unrouted */
67#define U300_GPIO_PIN_GPIO52 52 /* Unrouted */
68#define U300_GPIO_PIN_GPIO53 53 /* Unrouted */
69#define U300_GPIO_PIN_GPIO54 54 /* Unrouted */
70#define U300_GPIO_PIN_GPIO55 55 /* Unrouted */
diff --git a/arch/arm/mach-ux500/board-mop500-audio.c b/arch/arm/mach-ux500/board-mop500-audio.c
index aba9e5692958..bfe443daf4b0 100644
--- a/arch/arm/mach-ux500/board-mop500-audio.c
+++ b/arch/arm/mach-ux500/board-mop500-audio.c
@@ -21,28 +21,14 @@
21 21
22static struct stedma40_chan_cfg msp0_dma_rx = { 22static struct stedma40_chan_cfg msp0_dma_rx = {
23 .high_priority = true, 23 .high_priority = true,
24 .dir = STEDMA40_PERIPH_TO_MEM, 24 .dir = DMA_DEV_TO_MEM,
25 25 .dev_type = DB8500_DMA_DEV31_MSP0_SLIM0_CH0,
26 .src_dev_type = DB8500_DMA_DEV31_MSP0_RX_SLIM0_CH0_RX,
27 .dst_dev_type = STEDMA40_DEV_DST_MEMORY,
28
29 .src_info.psize = STEDMA40_PSIZE_LOG_4,
30 .dst_info.psize = STEDMA40_PSIZE_LOG_4,
31
32 /* data_width is set during configuration */
33}; 26};
34 27
35static struct stedma40_chan_cfg msp0_dma_tx = { 28static struct stedma40_chan_cfg msp0_dma_tx = {
36 .high_priority = true, 29 .high_priority = true,
37 .dir = STEDMA40_MEM_TO_PERIPH, 30 .dir = DMA_MEM_TO_DEV,
38 31 .dev_type = DB8500_DMA_DEV31_MSP0_SLIM0_CH0,
39 .src_dev_type = STEDMA40_DEV_DST_MEMORY,
40 .dst_dev_type = DB8500_DMA_DEV31_MSP0_TX_SLIM0_CH0_TX,
41
42 .src_info.psize = STEDMA40_PSIZE_LOG_4,
43 .dst_info.psize = STEDMA40_PSIZE_LOG_4,
44
45 /* data_width is set during configuration */
46}; 32};
47 33
48struct msp_i2s_platform_data msp0_platform_data = { 34struct msp_i2s_platform_data msp0_platform_data = {
@@ -53,28 +39,14 @@ struct msp_i2s_platform_data msp0_platform_data = {
53 39
54static struct stedma40_chan_cfg msp1_dma_rx = { 40static struct stedma40_chan_cfg msp1_dma_rx = {
55 .high_priority = true, 41 .high_priority = true,
56 .dir = STEDMA40_PERIPH_TO_MEM, 42 .dir = DMA_DEV_TO_MEM,
57 43 .dev_type = DB8500_DMA_DEV30_MSP3,
58 .src_dev_type = DB8500_DMA_DEV30_MSP3_RX,
59 .dst_dev_type = STEDMA40_DEV_DST_MEMORY,
60
61 .src_info.psize = STEDMA40_PSIZE_LOG_4,
62 .dst_info.psize = STEDMA40_PSIZE_LOG_4,
63
64 /* data_width is set during configuration */
65}; 44};
66 45
67static struct stedma40_chan_cfg msp1_dma_tx = { 46static struct stedma40_chan_cfg msp1_dma_tx = {
68 .high_priority = true, 47 .high_priority = true,
69 .dir = STEDMA40_MEM_TO_PERIPH, 48 .dir = DMA_MEM_TO_DEV,
70 49 .dev_type = DB8500_DMA_DEV30_MSP1,
71 .src_dev_type = STEDMA40_DEV_DST_MEMORY,
72 .dst_dev_type = DB8500_DMA_DEV30_MSP1_TX,
73
74 .src_info.psize = STEDMA40_PSIZE_LOG_4,
75 .dst_info.psize = STEDMA40_PSIZE_LOG_4,
76
77 /* data_width is set during configuration */
78}; 50};
79 51
80struct msp_i2s_platform_data msp1_platform_data = { 52struct msp_i2s_platform_data msp1_platform_data = {
@@ -85,32 +57,16 @@ struct msp_i2s_platform_data msp1_platform_data = {
85 57
86static struct stedma40_chan_cfg msp2_dma_rx = { 58static struct stedma40_chan_cfg msp2_dma_rx = {
87 .high_priority = true, 59 .high_priority = true,
88 .dir = STEDMA40_PERIPH_TO_MEM, 60 .dir = DMA_DEV_TO_MEM,
89 61 .dev_type = DB8500_DMA_DEV14_MSP2,
90 .src_dev_type = DB8500_DMA_DEV14_MSP2_RX,
91 .dst_dev_type = STEDMA40_DEV_DST_MEMORY,
92
93 /* MSP2 DMA doesn't work with PSIZE == 4 on DB8500v2 */
94 .src_info.psize = STEDMA40_PSIZE_LOG_1,
95 .dst_info.psize = STEDMA40_PSIZE_LOG_1,
96
97 /* data_width is set during configuration */
98}; 62};
99 63
100static struct stedma40_chan_cfg msp2_dma_tx = { 64static struct stedma40_chan_cfg msp2_dma_tx = {
101 .high_priority = true, 65 .high_priority = true,
102 .dir = STEDMA40_MEM_TO_PERIPH, 66 .dir = DMA_MEM_TO_DEV,
103 67 .dev_type = DB8500_DMA_DEV14_MSP2,
104 .src_dev_type = STEDMA40_DEV_DST_MEMORY,
105 .dst_dev_type = DB8500_DMA_DEV14_MSP2_TX,
106
107 .src_info.psize = STEDMA40_PSIZE_LOG_4,
108 .dst_info.psize = STEDMA40_PSIZE_LOG_4,
109
110 .use_fixed_channel = true, 68 .use_fixed_channel = true,
111 .phy_channel = 1, 69 .phy_channel = 1,
112
113 /* data_width is set during configuration */
114}; 70};
115 71
116static struct platform_device *db8500_add_msp_i2s(struct device *parent, 72static struct platform_device *db8500_add_msp_i2s(struct device *parent,
diff --git a/arch/arm/mach-ux500/board-mop500-pins.c b/arch/arm/mach-ux500/board-mop500-pins.c
index 947bd9eca079..7936d40a5c37 100644
--- a/arch/arm/mach-ux500/board-mop500-pins.c
+++ b/arch/arm/mach-ux500/board-mop500-pins.c
@@ -9,6 +9,7 @@
9#include <linux/bug.h> 9#include <linux/bug.h>
10#include <linux/string.h> 10#include <linux/string.h>
11#include <linux/pinctrl/machine.h> 11#include <linux/pinctrl/machine.h>
12#include <linux/pinctrl/pinconf-generic.h>
12#include <linux/platform_data/pinctrl-nomadik.h> 13#include <linux/platform_data/pinctrl-nomadik.h>
13 14
14#include <asm/mach-types.h> 15#include <asm/mach-types.h>
@@ -34,6 +35,11 @@ BIAS(in_pd, PIN_INPUT_PULLDOWN);
34BIAS(out_hi, PIN_OUTPUT_HIGH); 35BIAS(out_hi, PIN_OUTPUT_HIGH);
35BIAS(out_lo, PIN_OUTPUT_LOW); 36BIAS(out_lo, PIN_OUTPUT_LOW);
36BIAS(out_lo_slpm_nowkup, PIN_OUTPUT_LOW|PIN_SLPM_WAKEUP_DISABLE); 37BIAS(out_lo_slpm_nowkup, PIN_OUTPUT_LOW|PIN_SLPM_WAKEUP_DISABLE);
38
39BIAS(abx500_out_lo, PIN_CONF_PACKED(PIN_CONFIG_OUTPUT, 0));
40BIAS(abx500_in_pd, PIN_CONF_PACKED(PIN_CONFIG_BIAS_PULL_DOWN, 1));
41BIAS(abx500_in_nopull, PIN_CONF_PACKED(PIN_CONFIG_BIAS_PULL_DOWN, 0));
42
37/* These also force them into GPIO mode */ 43/* These also force them into GPIO mode */
38BIAS(gpio_in_pu, PIN_INPUT_PULLUP|PIN_GPIOMODE_ENABLED); 44BIAS(gpio_in_pu, PIN_INPUT_PULLUP|PIN_GPIOMODE_ENABLED);
39BIAS(gpio_in_pd, PIN_INPUT_PULLDOWN|PIN_GPIOMODE_ENABLED); 45BIAS(gpio_in_pd, PIN_INPUT_PULLDOWN|PIN_GPIOMODE_ENABLED);
@@ -42,8 +48,6 @@ BIAS(gpio_in_pd_slpm_gpio_nopull, PIN_INPUT_PULLDOWN|PIN_GPIOMODE_ENABLED|PIN_SL
42BIAS(gpio_out_hi, PIN_OUTPUT_HIGH|PIN_GPIOMODE_ENABLED); 48BIAS(gpio_out_hi, PIN_OUTPUT_HIGH|PIN_GPIOMODE_ENABLED);
43BIAS(gpio_out_lo, PIN_OUTPUT_LOW|PIN_GPIOMODE_ENABLED); 49BIAS(gpio_out_lo, PIN_OUTPUT_LOW|PIN_GPIOMODE_ENABLED);
44/* Sleep modes */ 50/* Sleep modes */
45BIAS(slpm_in_nopull_wkup, PIN_SLEEPMODE_ENABLED|
46 PIN_SLPM_DIR_INPUT|PIN_SLPM_PULL_NONE|PIN_SLPM_WAKEUP_ENABLE);
47BIAS(slpm_in_wkup_pdis, PIN_SLEEPMODE_ENABLED| 51BIAS(slpm_in_wkup_pdis, PIN_SLEEPMODE_ENABLED|
48 PIN_SLPM_DIR_INPUT|PIN_SLPM_WAKEUP_ENABLE|PIN_SLPM_PDIS_DISABLED); 52 PIN_SLPM_DIR_INPUT|PIN_SLPM_WAKEUP_ENABLE|PIN_SLPM_PDIS_DISABLED);
49BIAS(slpm_in_wkup_pdis_en, PIN_SLEEPMODE_ENABLED| 53BIAS(slpm_in_wkup_pdis_en, PIN_SLEEPMODE_ENABLED|
@@ -54,8 +58,6 @@ BIAS(slpm_wkup_pdis_en, PIN_SLEEPMODE_ENABLED|
54 PIN_SLPM_WAKEUP_ENABLE|PIN_SLPM_PDIS_ENABLED); 58 PIN_SLPM_WAKEUP_ENABLE|PIN_SLPM_PDIS_ENABLED);
55BIAS(slpm_out_lo_pdis, PIN_SLEEPMODE_ENABLED| 59BIAS(slpm_out_lo_pdis, PIN_SLEEPMODE_ENABLED|
56 PIN_SLPM_OUTPUT_LOW|PIN_SLPM_WAKEUP_DISABLE|PIN_SLPM_PDIS_DISABLED); 60 PIN_SLPM_OUTPUT_LOW|PIN_SLPM_WAKEUP_DISABLE|PIN_SLPM_PDIS_DISABLED);
57BIAS(slpm_out_lo_wkup, PIN_SLEEPMODE_ENABLED|
58 PIN_SLPM_OUTPUT_LOW|PIN_SLPM_WAKEUP_ENABLE);
59BIAS(slpm_out_lo_wkup_pdis, PIN_SLEEPMODE_ENABLED| 61BIAS(slpm_out_lo_wkup_pdis, PIN_SLEEPMODE_ENABLED|
60 PIN_SLPM_OUTPUT_LOW|PIN_SLPM_WAKEUP_ENABLE|PIN_SLPM_PDIS_DISABLED); 62 PIN_SLPM_OUTPUT_LOW|PIN_SLPM_WAKEUP_ENABLE|PIN_SLPM_PDIS_DISABLED);
61BIAS(slpm_out_hi_wkup_pdis, PIN_SLEEPMODE_ENABLED|PIN_SLPM_OUTPUT_HIGH| 63BIAS(slpm_out_hi_wkup_pdis, PIN_SLEEPMODE_ENABLED|PIN_SLPM_OUTPUT_HIGH|
@@ -97,6 +99,252 @@ BIAS(out_wkup_pdis, PIN_SLPM_DIR_OUTPUT|PIN_SLPM_WAKEUP_ENABLE|
97#define DB8500_PIN_STATE(pin, conf, dev, state) \ 99#define DB8500_PIN_STATE(pin, conf, dev, state) \
98 PIN_MAP_CONFIGS_PIN(dev, state, "pinctrl-db8500", pin, conf) 100 PIN_MAP_CONFIGS_PIN(dev, state, "pinctrl-db8500", pin, conf)
99 101
102#define AB8500_MUX_HOG(group, func) \
103 PIN_MAP_MUX_GROUP_HOG_DEFAULT("pinctrl-ab8500.0", group, func)
104#define AB8500_PIN_HOG(pin, conf) \
105 PIN_MAP_CONFIGS_PIN_HOG_DEFAULT("pinctrl-ab8500.0", pin, abx500_##conf)
106
107#define AB8500_MUX_STATE(group, func, dev, state) \
108 PIN_MAP_MUX_GROUP(dev, state, "pinctrl-ab8500.0", group, func)
109#define AB8500_PIN_STATE(pin, conf, dev, state) \
110 PIN_MAP_CONFIGS_PIN(dev, state, "pinctrl-ab8500.0", pin, abx500_##conf)
111
112#define AB8505_MUX_HOG(group, func) \
113 PIN_MAP_MUX_GROUP_HOG_DEFAULT("pinctrl-ab8505.0", group, func)
114#define AB8505_PIN_HOG(pin, conf) \
115 PIN_MAP_CONFIGS_PIN_HOG_DEFAULT("pinctrl-ab8505.0", pin, abx500_##conf)
116
117#define AB8505_MUX_STATE(group, func, dev, state) \
118 PIN_MAP_MUX_GROUP(dev, state, "pinctrl-ab8505.0", group, func)
119#define AB8505_PIN_STATE(pin, conf, dev, state) \
120 PIN_MAP_CONFIGS_PIN(dev, state, "pinctrl-ab8505.0", pin, abx500_##conf)
121
122static struct pinctrl_map __initdata ab8500_pinmap[] = {
123 /* Sysclkreq2 */
124 AB8500_MUX_STATE("sysclkreq2_d_1", "sysclkreq", "regulator.35", PINCTRL_STATE_DEFAULT),
125 AB8500_PIN_STATE("GPIO1_T10", in_nopull, "regulator.35", PINCTRL_STATE_DEFAULT),
126 /* sysclkreq2 disable, mux in gpio configured in input pulldown */
127 AB8500_MUX_STATE("gpio1_a_1", "gpio", "regulator.35", PINCTRL_STATE_SLEEP),
128 AB8500_PIN_STATE("GPIO1_T10", in_pd, "regulator.35", PINCTRL_STATE_SLEEP),
129
130 /* pins 2 is muxed in GPIO, configured in INPUT PULL DOWN */
131 AB8500_MUX_HOG("gpio2_a_1", "gpio"),
132 AB8500_PIN_HOG("GPIO2_T9", in_pd),
133
134 /* Sysclkreq4 */
135 AB8500_MUX_STATE("sysclkreq4_d_1", "sysclkreq", "regulator.36", PINCTRL_STATE_DEFAULT),
136 AB8500_PIN_STATE("GPIO3_U9", in_nopull, "regulator.36", PINCTRL_STATE_DEFAULT),
137 /* sysclkreq4 disable, mux in gpio configured in input pulldown */
138 AB8500_MUX_STATE("gpio3_a_1", "gpio", "regulator.36", PINCTRL_STATE_SLEEP),
139 AB8500_PIN_STATE("GPIO3_U9", in_pd, "regulator.36", PINCTRL_STATE_SLEEP),
140
141 /* pins 4 is muxed in GPIO, configured in INPUT PULL DOWN */
142 AB8500_MUX_HOG("gpio4_a_1", "gpio"),
143 AB8500_PIN_HOG("GPIO4_W2", in_pd),
144
145 /*
146 * pins 6,7,8 and 9 are muxed in YCBCR0123
147 * configured in INPUT PULL UP
148 */
149 AB8500_MUX_HOG("ycbcr0123_d_1", "ycbcr"),
150 AB8500_PIN_HOG("GPIO6_Y18", in_nopull),
151 AB8500_PIN_HOG("GPIO7_AA20", in_nopull),
152 AB8500_PIN_HOG("GPIO8_W18", in_nopull),
153 AB8500_PIN_HOG("GPIO9_AA19", in_nopull),
154
155 /*
156 * pins 10,11,12 and 13 are muxed in GPIO
157 * configured in INPUT PULL DOWN
158 */
159 AB8500_MUX_HOG("gpio10_d_1", "gpio"),
160 AB8500_PIN_HOG("GPIO10_U17", in_pd),
161
162 AB8500_MUX_HOG("gpio11_d_1", "gpio"),
163 AB8500_PIN_HOG("GPIO11_AA18", in_pd),
164
165 AB8500_MUX_HOG("gpio12_d_1", "gpio"),
166 AB8500_PIN_HOG("GPIO12_U16", in_pd),
167
168 AB8500_MUX_HOG("gpio13_d_1", "gpio"),
169 AB8500_PIN_HOG("GPIO13_W17", in_pd),
170
171 /*
172 * pins 14,15 are muxed in PWM1 and PWM2
173 * configured in INPUT PULL DOWN
174 */
175 AB8500_MUX_HOG("pwmout1_d_1", "pwmout"),
176 AB8500_PIN_HOG("GPIO14_F14", in_pd),
177
178 AB8500_MUX_HOG("pwmout2_d_1", "pwmout"),
179 AB8500_PIN_HOG("GPIO15_B17", in_pd),
180
181 /*
182 * pins 16 is muxed in GPIO
183 * configured in INPUT PULL DOWN
184 */
185 AB8500_MUX_HOG("gpio16_a_1", "gpio"),
186 AB8500_PIN_HOG("GPIO14_F14", in_pd),
187
188 /*
189 * pins 17,18,19 and 20 are muxed in AUDIO interface 1
190 * configured in INPUT PULL DOWN
191 */
192 AB8500_MUX_HOG("adi1_d_1", "adi1"),
193 AB8500_PIN_HOG("GPIO17_P5", in_pd),
194 AB8500_PIN_HOG("GPIO18_R5", in_pd),
195 AB8500_PIN_HOG("GPIO19_U5", in_pd),
196 AB8500_PIN_HOG("GPIO20_T5", in_pd),
197
198 /*
199 * pins 21,22 and 23 are muxed in USB UICC
200 * configured in INPUT PULL DOWN
201 */
202 AB8500_MUX_HOG("usbuicc_d_1", "usbuicc"),
203 AB8500_PIN_HOG("GPIO21_H19", in_pd),
204 AB8500_PIN_HOG("GPIO22_G20", in_pd),
205 AB8500_PIN_HOG("GPIO23_G19", in_pd),
206
207 /*
208 * pins 24,25 are muxed in GPIO
209 * configured in INPUT PULL DOWN
210 */
211 AB8500_MUX_HOG("gpio24_a_1", "gpio"),
212 AB8500_PIN_HOG("GPIO24_T14", in_pd),
213
214 AB8500_MUX_HOG("gpio25_a_1", "gpio"),
215 AB8500_PIN_HOG("GPIO25_R16", in_pd),
216
217 /*
218 * pins 26 is muxed in GPIO
219 * configured in OUTPUT LOW
220 */
221 AB8500_MUX_HOG("gpio26_d_1", "gpio"),
222 AB8500_PIN_HOG("GPIO26_M16", out_lo),
223
224 /*
225 * pins 27,28 are muxed in DMIC12
226 * configured in INPUT PULL DOWN
227 */
228 AB8500_MUX_HOG("dmic12_d_1", "dmic"),
229 AB8500_PIN_HOG("GPIO27_J6", in_pd),
230 AB8500_PIN_HOG("GPIO28_K6", in_pd),
231
232 /*
233 * pins 29,30 are muxed in DMIC34
234 * configured in INPUT PULL DOWN
235 */
236 AB8500_MUX_HOG("dmic34_d_1", "dmic"),
237 AB8500_PIN_HOG("GPIO29_G6", in_pd),
238 AB8500_PIN_HOG("GPIO30_H6", in_pd),
239
240 /*
241 * pins 31,32 are muxed in DMIC56
242 * configured in INPUT PULL DOWN
243 */
244 AB8500_MUX_HOG("dmic56_d_1", "dmic"),
245 AB8500_PIN_HOG("GPIO31_F5", in_pd),
246 AB8500_PIN_HOG("GPIO32_G5", in_pd),
247
248 /*
249 * pins 34 is muxed in EXTCPENA
250 * configured INPUT PULL DOWN
251 */
252 AB8500_MUX_HOG("extcpena_d_1", "extcpena"),
253 AB8500_PIN_HOG("GPIO34_R17", in_pd),
254
255 /*
256 * pins 35 is muxed in GPIO
257 * configured in OUTPUT LOW
258 */
259 AB8500_MUX_HOG("gpio35_d_1", "gpio"),
260 AB8500_PIN_HOG("GPIO35_W15", in_pd),
261
262 /*
263 * pins 36,37,38 and 39 are muxed in GPIO
264 * configured in INPUT PULL DOWN
265 */
266 AB8500_MUX_HOG("gpio36_a_1", "gpio"),
267 AB8500_PIN_HOG("GPIO36_A17", in_pd),
268
269 AB8500_MUX_HOG("gpio37_a_1", "gpio"),
270 AB8500_PIN_HOG("GPIO37_E15", in_pd),
271
272 AB8500_MUX_HOG("gpio38_a_1", "gpio"),
273 AB8500_PIN_HOG("GPIO38_C17", in_pd),
274
275 AB8500_MUX_HOG("gpio39_a_1", "gpio"),
276 AB8500_PIN_HOG("GPIO39_E16", in_pd),
277
278 /*
279 * pins 40 and 41 are muxed in MODCSLSDA
280 * configured INPUT PULL DOWN
281 */
282 AB8500_MUX_HOG("modsclsda_d_1", "modsclsda"),
283 AB8500_PIN_HOG("GPIO40_T19", in_pd),
284 AB8500_PIN_HOG("GPIO41_U19", in_pd),
285
286 /*
287 * pins 42 is muxed in GPIO
288 * configured INPUT PULL DOWN
289 */
290 AB8500_MUX_HOG("gpio42_a_1", "gpio"),
291 AB8500_PIN_HOG("GPIO42_U2", in_pd),
292};
293
294static struct pinctrl_map __initdata ab8505_pinmap[] = {
295 /* Sysclkreq2 */
296 AB8505_MUX_STATE("sysclkreq2_d_1", "sysclkreq", "regulator.36", PINCTRL_STATE_DEFAULT),
297 AB8505_PIN_STATE("GPIO1_N4", in_nopull, "regulator.36", PINCTRL_STATE_DEFAULT),
298 /* sysclkreq2 disable, mux in gpio configured in input pulldown */
299 AB8505_MUX_STATE("gpio1_a_1", "gpio", "regulator.36", PINCTRL_STATE_SLEEP),
300 AB8505_PIN_STATE("GPIO1_N4", in_pd, "regulator.36", PINCTRL_STATE_SLEEP),
301
302 /* pins 2 is muxed in GPIO, configured in INPUT PULL DOWN */
303 AB8505_MUX_HOG("gpio2_a_1", "gpio"),
304 AB8505_PIN_HOG("GPIO2_R5", in_pd),
305
306 /* Sysclkreq4 */
307 AB8505_MUX_STATE("sysclkreq4_d_1", "sysclkreq", "regulator.37", PINCTRL_STATE_DEFAULT),
308 AB8505_PIN_STATE("GPIO3_P5", in_nopull, "regulator.37", PINCTRL_STATE_DEFAULT),
309 /* sysclkreq4 disable, mux in gpio configured in input pulldown */
310 AB8505_MUX_STATE("gpio3_a_1", "gpio", "regulator.37", PINCTRL_STATE_SLEEP),
311 AB8505_PIN_STATE("GPIO3_P5", in_pd, "regulator.37", PINCTRL_STATE_SLEEP),
312
313 AB8505_MUX_HOG("gpio10_d_1", "gpio"),
314 AB8505_PIN_HOG("GPIO10_B16", in_pd),
315
316 AB8505_MUX_HOG("gpio11_d_1", "gpio"),
317 AB8505_PIN_HOG("GPIO11_B17", in_pd),
318
319 AB8505_MUX_HOG("gpio13_d_1", "gpio"),
320 AB8505_PIN_HOG("GPIO13_D17", in_nopull),
321
322 AB8505_MUX_HOG("pwmout1_d_1", "pwmout"),
323 AB8505_PIN_HOG("GPIO14_C16", in_pd),
324
325 AB8505_MUX_HOG("adi2_d_1", "adi2"),
326 AB8505_PIN_HOG("GPIO17_P2", in_pd),
327 AB8505_PIN_HOG("GPIO18_N3", in_pd),
328 AB8505_PIN_HOG("GPIO19_T1", in_pd),
329 AB8505_PIN_HOG("GPIO20_P3", in_pd),
330
331 AB8505_MUX_HOG("gpio34_a_1", "gpio"),
332 AB8505_PIN_HOG("GPIO34_H14", in_pd),
333
334 AB8505_MUX_HOG("modsclsda_d_1", "modsclsda"),
335 AB8505_PIN_HOG("GPIO40_J15", in_pd),
336 AB8505_PIN_HOG("GPIO41_J14", in_pd),
337
338 AB8505_MUX_HOG("gpio50_d_1", "gpio"),
339 AB8505_PIN_HOG("GPIO50_L4", in_nopull),
340
341 AB8505_MUX_HOG("resethw_d_1", "resethw"),
342 AB8505_PIN_HOG("GPIO52_D16", in_pd),
343
344 AB8505_MUX_HOG("service_d_1", "service"),
345 AB8505_PIN_HOG("GPIO53_D15", in_pd),
346};
347
100/* Pin control settings */ 348/* Pin control settings */
101static struct pinctrl_map __initdata mop500_family_pinmap[] = { 349static struct pinctrl_map __initdata mop500_family_pinmap[] = {
102 /* 350 /*
@@ -174,17 +422,12 @@ static struct pinctrl_map __initdata mop500_family_pinmap[] = {
174 DB8500_PIN_SLEEP("GPIO4_AH6", slpm_in_wkup_pdis, "uart1"), 422 DB8500_PIN_SLEEP("GPIO4_AH6", slpm_in_wkup_pdis, "uart1"),
175 DB8500_PIN_SLEEP("GPIO5_AG6", slpm_out_wkup_pdis, "uart1"), 423 DB8500_PIN_SLEEP("GPIO5_AG6", slpm_out_wkup_pdis, "uart1"),
176 /* MSP1 for ALSA codec */ 424 /* MSP1 for ALSA codec */
177 DB8500_MUX("msp1txrx_a_1", "msp1", "ux500-msp-i2s.1"), 425 DB8500_MUX_HOG("msp1txrx_a_1", "msp1"),
178 DB8500_MUX("msp1_a_1", "msp1", "ux500-msp-i2s.1"), 426 DB8500_MUX_HOG("msp1_a_1", "msp1"),
179 DB8500_PIN("GPIO33_AF2", out_lo_slpm_nowkup, "ux500-msp-i2s.1"), 427 DB8500_PIN_HOG("GPIO33_AF2", out_lo_slpm_nowkup),
180 DB8500_PIN("GPIO34_AE1", in_nopull_slpm_nowkup, "ux500-msp-i2s.1"), 428 DB8500_PIN_HOG("GPIO34_AE1", in_nopull_slpm_nowkup),
181 DB8500_PIN("GPIO35_AE2", in_nopull_slpm_nowkup, "ux500-msp-i2s.1"), 429 DB8500_PIN_HOG("GPIO35_AE2", in_nopull_slpm_nowkup),
182 DB8500_PIN("GPIO36_AG2", in_nopull_slpm_nowkup, "ux500-msp-i2s.1"), 430 DB8500_PIN_HOG("GPIO36_AG2", in_nopull_slpm_nowkup),
183 /* MSP1 sleep state */
184 DB8500_PIN_SLEEP("GPIO33_AF2", slpm_out_lo_wkup, "ux500-msp-i2s.1"),
185 DB8500_PIN_SLEEP("GPIO34_AE1", slpm_in_nopull_wkup, "ux500-msp-i2s.1"),
186 DB8500_PIN_SLEEP("GPIO35_AE2", slpm_in_nopull_wkup, "ux500-msp-i2s.1"),
187 DB8500_PIN_SLEEP("GPIO36_AG2", slpm_in_nopull_wkup, "ux500-msp-i2s.1"),
188 /* Mux in LCD data lines 8 thru 11 and LCDA CLK for MCDE TVOUT */ 431 /* Mux in LCD data lines 8 thru 11 and LCDA CLK for MCDE TVOUT */
189 DB8500_MUX("lcd_d8_d11_a_1", "lcd", "mcde-tvout"), 432 DB8500_MUX("lcd_d8_d11_a_1", "lcd", "mcde-tvout"),
190 DB8500_MUX("lcdaclk_b_1", "lcda", "mcde-tvout"), 433 DB8500_MUX("lcdaclk_b_1", "lcda", "mcde-tvout"),
@@ -821,6 +1064,12 @@ void __init mop500_pinmaps_init(void)
821 pinctrl_register_mappings(mop500_pinmap, 1064 pinctrl_register_mappings(mop500_pinmap,
822 ARRAY_SIZE(mop500_pinmap)); 1065 ARRAY_SIZE(mop500_pinmap));
823 mop500_href_family_pinmaps_init(); 1066 mop500_href_family_pinmaps_init();
1067 if (machine_is_u8520())
1068 pinctrl_register_mappings(ab8505_pinmap,
1069 ARRAY_SIZE(ab8505_pinmap));
1070 else
1071 pinctrl_register_mappings(ab8500_pinmap,
1072 ARRAY_SIZE(ab8500_pinmap));
824} 1073}
825 1074
826void __init snowball_pinmaps_init(void) 1075void __init snowball_pinmaps_init(void)
@@ -831,6 +1080,8 @@ void __init snowball_pinmaps_init(void)
831 ARRAY_SIZE(snowball_pinmap)); 1080 ARRAY_SIZE(snowball_pinmap));
832 pinctrl_register_mappings(u8500_pinmap, 1081 pinctrl_register_mappings(u8500_pinmap,
833 ARRAY_SIZE(u8500_pinmap)); 1082 ARRAY_SIZE(u8500_pinmap));
1083 pinctrl_register_mappings(ab8500_pinmap,
1084 ARRAY_SIZE(ab8500_pinmap));
834} 1085}
835 1086
836void __init hrefv60_pinmaps_init(void) 1087void __init hrefv60_pinmaps_init(void)
@@ -840,4 +1091,6 @@ void __init hrefv60_pinmaps_init(void)
840 pinctrl_register_mappings(hrefv60_pinmap, 1091 pinctrl_register_mappings(hrefv60_pinmap,
841 ARRAY_SIZE(hrefv60_pinmap)); 1092 ARRAY_SIZE(hrefv60_pinmap));
842 mop500_href_family_pinmaps_init(); 1093 mop500_href_family_pinmaps_init();
1094 pinctrl_register_mappings(ab8500_pinmap,
1095 ARRAY_SIZE(ab8500_pinmap));
843} 1096}
diff --git a/arch/arm/mach-ux500/board-mop500-regulators.c b/arch/arm/mach-ux500/board-mop500-regulators.c
index d6b7c8556fa1..0dc44c683427 100644
--- a/arch/arm/mach-ux500/board-mop500-regulators.c
+++ b/arch/arm/mach-ux500/board-mop500-regulators.c
@@ -999,7 +999,6 @@ struct ab8500_regulator_platform_data ab8500_regulator_plat_data = {
999 .num_ext_regulator = ARRAY_SIZE(ab8500_ext_regulators), 999 .num_ext_regulator = ARRAY_SIZE(ab8500_ext_regulators),
1000}; 1000};
1001 1001
1002/* Use the AB8500 init settings for AB8505 as they are the same right now */
1003struct ab8500_regulator_platform_data ab8505_regulator_plat_data = { 1002struct ab8500_regulator_platform_data ab8505_regulator_plat_data = {
1004 .reg_init = ab8505_reg_init, 1003 .reg_init = ab8505_reg_init,
1005 .num_reg_init = ARRAY_SIZE(ab8505_reg_init), 1004 .num_reg_init = ARRAY_SIZE(ab8505_reg_init),
diff --git a/arch/arm/mach-ux500/board-mop500-sdi.c b/arch/arm/mach-ux500/board-mop500-sdi.c
index 0ef38775a0c1..b3e61a38e5c8 100644
--- a/arch/arm/mach-ux500/board-mop500-sdi.c
+++ b/arch/arm/mach-ux500/board-mop500-sdi.c
@@ -34,29 +34,25 @@
34#ifdef CONFIG_STE_DMA40 34#ifdef CONFIG_STE_DMA40
35struct stedma40_chan_cfg mop500_sdi0_dma_cfg_rx = { 35struct stedma40_chan_cfg mop500_sdi0_dma_cfg_rx = {
36 .mode = STEDMA40_MODE_LOGICAL, 36 .mode = STEDMA40_MODE_LOGICAL,
37 .dir = STEDMA40_PERIPH_TO_MEM, 37 .dir = DMA_DEV_TO_MEM,
38 .src_dev_type = DB8500_DMA_DEV29_SD_MM0_RX, 38 .dev_type = DB8500_DMA_DEV29_SD_MM0,
39 .dst_dev_type = STEDMA40_DEV_DST_MEMORY,
40 .src_info.data_width = STEDMA40_WORD_WIDTH,
41 .dst_info.data_width = STEDMA40_WORD_WIDTH,
42}; 39};
43 40
44static struct stedma40_chan_cfg mop500_sdi0_dma_cfg_tx = { 41static struct stedma40_chan_cfg mop500_sdi0_dma_cfg_tx = {
45 .mode = STEDMA40_MODE_LOGICAL, 42 .mode = STEDMA40_MODE_LOGICAL,
46 .dir = STEDMA40_MEM_TO_PERIPH, 43 .dir = DMA_MEM_TO_DEV,
47 .src_dev_type = STEDMA40_DEV_SRC_MEMORY, 44 .dev_type = DB8500_DMA_DEV29_SD_MM0,
48 .dst_dev_type = DB8500_DMA_DEV29_SD_MM0_TX,
49 .src_info.data_width = STEDMA40_WORD_WIDTH,
50 .dst_info.data_width = STEDMA40_WORD_WIDTH,
51}; 45};
52#endif 46#endif
53 47
54struct mmci_platform_data mop500_sdi0_data = { 48struct mmci_platform_data mop500_sdi0_data = {
55 .ocr_mask = MMC_VDD_29_30, 49 .f_max = 100000000,
56 .f_max = 50000000,
57 .capabilities = MMC_CAP_4_BIT_DATA | 50 .capabilities = MMC_CAP_4_BIT_DATA |
58 MMC_CAP_SD_HIGHSPEED | 51 MMC_CAP_SD_HIGHSPEED |
59 MMC_CAP_MMC_HIGHSPEED, 52 MMC_CAP_MMC_HIGHSPEED |
53 MMC_CAP_ERASE |
54 MMC_CAP_UHS_SDR12 |
55 MMC_CAP_UHS_SDR25,
60 .gpio_wp = -1, 56 .gpio_wp = -1,
61 .sigdir = MCI_ST_FBCLKEN | 57 .sigdir = MCI_ST_FBCLKEN |
62 MCI_ST_CMDDIREN | 58 MCI_ST_CMDDIREN |
@@ -87,27 +83,22 @@ void mop500_sdi_tc35892_init(struct device *parent)
87#ifdef CONFIG_STE_DMA40 83#ifdef CONFIG_STE_DMA40
88static struct stedma40_chan_cfg sdi1_dma_cfg_rx = { 84static struct stedma40_chan_cfg sdi1_dma_cfg_rx = {
89 .mode = STEDMA40_MODE_LOGICAL, 85 .mode = STEDMA40_MODE_LOGICAL,
90 .dir = STEDMA40_PERIPH_TO_MEM, 86 .dir = DMA_DEV_TO_MEM,
91 .src_dev_type = DB8500_DMA_DEV32_SD_MM1_RX, 87 .dev_type = DB8500_DMA_DEV32_SD_MM1,
92 .dst_dev_type = STEDMA40_DEV_DST_MEMORY,
93 .src_info.data_width = STEDMA40_WORD_WIDTH,
94 .dst_info.data_width = STEDMA40_WORD_WIDTH,
95}; 88};
96 89
97static struct stedma40_chan_cfg sdi1_dma_cfg_tx = { 90static struct stedma40_chan_cfg sdi1_dma_cfg_tx = {
98 .mode = STEDMA40_MODE_LOGICAL, 91 .mode = STEDMA40_MODE_LOGICAL,
99 .dir = STEDMA40_MEM_TO_PERIPH, 92 .dir = DMA_MEM_TO_DEV,
100 .src_dev_type = STEDMA40_DEV_SRC_MEMORY, 93 .dev_type = DB8500_DMA_DEV32_SD_MM1,
101 .dst_dev_type = DB8500_DMA_DEV32_SD_MM1_TX,
102 .src_info.data_width = STEDMA40_WORD_WIDTH,
103 .dst_info.data_width = STEDMA40_WORD_WIDTH,
104}; 94};
105#endif 95#endif
106 96
107struct mmci_platform_data mop500_sdi1_data = { 97struct mmci_platform_data mop500_sdi1_data = {
108 .ocr_mask = MMC_VDD_29_30, 98 .ocr_mask = MMC_VDD_29_30,
109 .f_max = 50000000, 99 .f_max = 100000000,
110 .capabilities = MMC_CAP_4_BIT_DATA, 100 .capabilities = MMC_CAP_4_BIT_DATA |
101 MMC_CAP_NONREMOVABLE,
111 .gpio_cd = -1, 102 .gpio_cd = -1,
112 .gpio_wp = -1, 103 .gpio_wp = -1,
113#ifdef CONFIG_STE_DMA40 104#ifdef CONFIG_STE_DMA40
@@ -124,28 +115,26 @@ struct mmci_platform_data mop500_sdi1_data = {
124#ifdef CONFIG_STE_DMA40 115#ifdef CONFIG_STE_DMA40
125struct stedma40_chan_cfg mop500_sdi2_dma_cfg_rx = { 116struct stedma40_chan_cfg mop500_sdi2_dma_cfg_rx = {
126 .mode = STEDMA40_MODE_LOGICAL, 117 .mode = STEDMA40_MODE_LOGICAL,
127 .dir = STEDMA40_PERIPH_TO_MEM, 118 .dir = DMA_DEV_TO_MEM,
128 .src_dev_type = DB8500_DMA_DEV28_SD_MM2_RX, 119 .dev_type = DB8500_DMA_DEV28_SD_MM2,
129 .dst_dev_type = STEDMA40_DEV_DST_MEMORY,
130 .src_info.data_width = STEDMA40_WORD_WIDTH,
131 .dst_info.data_width = STEDMA40_WORD_WIDTH,
132}; 120};
133 121
134static struct stedma40_chan_cfg mop500_sdi2_dma_cfg_tx = { 122static struct stedma40_chan_cfg mop500_sdi2_dma_cfg_tx = {
135 .mode = STEDMA40_MODE_LOGICAL, 123 .mode = STEDMA40_MODE_LOGICAL,
136 .dir = STEDMA40_MEM_TO_PERIPH, 124 .dir = DMA_MEM_TO_DEV,
137 .src_dev_type = STEDMA40_DEV_SRC_MEMORY, 125 .dev_type = DB8500_DMA_DEV28_SD_MM2,
138 .dst_dev_type = DB8500_DMA_DEV28_SD_MM2_TX,
139 .src_info.data_width = STEDMA40_WORD_WIDTH,
140 .dst_info.data_width = STEDMA40_WORD_WIDTH,
141}; 126};
142#endif 127#endif
143 128
144struct mmci_platform_data mop500_sdi2_data = { 129struct mmci_platform_data mop500_sdi2_data = {
145 .ocr_mask = MMC_VDD_165_195, 130 .ocr_mask = MMC_VDD_165_195,
146 .f_max = 50000000, 131 .f_max = 100000000,
147 .capabilities = MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA | 132 .capabilities = MMC_CAP_4_BIT_DATA |
148 MMC_CAP_MMC_HIGHSPEED, 133 MMC_CAP_8_BIT_DATA |
134 MMC_CAP_NONREMOVABLE |
135 MMC_CAP_MMC_HIGHSPEED |
136 MMC_CAP_ERASE |
137 MMC_CAP_CMD23,
149 .gpio_cd = -1, 138 .gpio_cd = -1,
150 .gpio_wp = -1, 139 .gpio_wp = -1,
151#ifdef CONFIG_STE_DMA40 140#ifdef CONFIG_STE_DMA40
@@ -162,28 +151,25 @@ struct mmci_platform_data mop500_sdi2_data = {
162#ifdef CONFIG_STE_DMA40 151#ifdef CONFIG_STE_DMA40
163struct stedma40_chan_cfg mop500_sdi4_dma_cfg_rx = { 152struct stedma40_chan_cfg mop500_sdi4_dma_cfg_rx = {
164 .mode = STEDMA40_MODE_LOGICAL, 153 .mode = STEDMA40_MODE_LOGICAL,
165 .dir = STEDMA40_PERIPH_TO_MEM, 154 .dir = DMA_DEV_TO_MEM,
166 .src_dev_type = DB8500_DMA_DEV42_SD_MM4_RX, 155 .dev_type = DB8500_DMA_DEV42_SD_MM4,
167 .dst_dev_type = STEDMA40_DEV_DST_MEMORY,
168 .src_info.data_width = STEDMA40_WORD_WIDTH,
169 .dst_info.data_width = STEDMA40_WORD_WIDTH,
170}; 156};
171 157
172static struct stedma40_chan_cfg mop500_sdi4_dma_cfg_tx = { 158static struct stedma40_chan_cfg mop500_sdi4_dma_cfg_tx = {
173 .mode = STEDMA40_MODE_LOGICAL, 159 .mode = STEDMA40_MODE_LOGICAL,
174 .dir = STEDMA40_MEM_TO_PERIPH, 160 .dir = DMA_MEM_TO_DEV,
175 .src_dev_type = STEDMA40_DEV_SRC_MEMORY, 161 .dev_type = DB8500_DMA_DEV42_SD_MM4,
176 .dst_dev_type = DB8500_DMA_DEV42_SD_MM4_TX,
177 .src_info.data_width = STEDMA40_WORD_WIDTH,
178 .dst_info.data_width = STEDMA40_WORD_WIDTH,
179}; 162};
180#endif 163#endif
181 164
182struct mmci_platform_data mop500_sdi4_data = { 165struct mmci_platform_data mop500_sdi4_data = {
183 .ocr_mask = MMC_VDD_29_30, 166 .f_max = 100000000,
184 .f_max = 50000000, 167 .capabilities = MMC_CAP_4_BIT_DATA |
185 .capabilities = MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA | 168 MMC_CAP_8_BIT_DATA |
186 MMC_CAP_MMC_HIGHSPEED, 169 MMC_CAP_NONREMOVABLE |
170 MMC_CAP_MMC_HIGHSPEED |
171 MMC_CAP_ERASE |
172 MMC_CAP_CMD23,
187 .gpio_cd = -1, 173 .gpio_cd = -1,
188 .gpio_wp = -1, 174 .gpio_wp = -1,
189#ifdef CONFIG_STE_DMA40 175#ifdef CONFIG_STE_DMA40
diff --git a/arch/arm/mach-ux500/board-mop500.c b/arch/arm/mach-ux500/board-mop500.c
index 78389de94dde..df5d27a532e9 100644
--- a/arch/arm/mach-ux500/board-mop500.c
+++ b/arch/arm/mach-ux500/board-mop500.c
@@ -413,47 +413,23 @@ static void mop500_prox_deactivate(struct device *dev)
413 regulator_put(prox_regulator); 413 regulator_put(prox_regulator);
414} 414}
415 415
416void mop500_snowball_ethernet_clock_enable(void)
417{
418 struct clk *clk;
419
420 clk = clk_get_sys("fsmc", NULL);
421 if (!IS_ERR(clk))
422 clk_prepare_enable(clk);
423}
424
425static struct cryp_platform_data u8500_cryp1_platform_data = { 416static struct cryp_platform_data u8500_cryp1_platform_data = {
426 .mem_to_engine = { 417 .mem_to_engine = {
427 .dir = STEDMA40_MEM_TO_PERIPH, 418 .dir = DMA_MEM_TO_DEV,
428 .src_dev_type = STEDMA40_DEV_SRC_MEMORY, 419 .dev_type = DB8500_DMA_DEV48_CAC1,
429 .dst_dev_type = DB8500_DMA_DEV48_CAC1_TX,
430 .src_info.data_width = STEDMA40_WORD_WIDTH,
431 .dst_info.data_width = STEDMA40_WORD_WIDTH,
432 .mode = STEDMA40_MODE_LOGICAL, 420 .mode = STEDMA40_MODE_LOGICAL,
433 .src_info.psize = STEDMA40_PSIZE_LOG_4,
434 .dst_info.psize = STEDMA40_PSIZE_LOG_4,
435 }, 421 },
436 .engine_to_mem = { 422 .engine_to_mem = {
437 .dir = STEDMA40_PERIPH_TO_MEM, 423 .dir = DMA_DEV_TO_MEM,
438 .src_dev_type = DB8500_DMA_DEV48_CAC1_RX, 424 .dev_type = DB8500_DMA_DEV48_CAC1,
439 .dst_dev_type = STEDMA40_DEV_DST_MEMORY,
440 .src_info.data_width = STEDMA40_WORD_WIDTH,
441 .dst_info.data_width = STEDMA40_WORD_WIDTH,
442 .mode = STEDMA40_MODE_LOGICAL, 425 .mode = STEDMA40_MODE_LOGICAL,
443 .src_info.psize = STEDMA40_PSIZE_LOG_4,
444 .dst_info.psize = STEDMA40_PSIZE_LOG_4,
445 } 426 }
446}; 427};
447 428
448static struct stedma40_chan_cfg u8500_hash_dma_cfg_tx = { 429static struct stedma40_chan_cfg u8500_hash_dma_cfg_tx = {
449 .dir = STEDMA40_MEM_TO_PERIPH, 430 .dir = DMA_MEM_TO_DEV,
450 .src_dev_type = STEDMA40_DEV_SRC_MEMORY, 431 .dev_type = DB8500_DMA_DEV50_HAC1_TX,
451 .dst_dev_type = DB8500_DMA_DEV50_HAC1_TX,
452 .src_info.data_width = STEDMA40_WORD_WIDTH,
453 .dst_info.data_width = STEDMA40_WORD_WIDTH,
454 .mode = STEDMA40_MODE_LOGICAL, 432 .mode = STEDMA40_MODE_LOGICAL,
455 .src_info.psize = STEDMA40_PSIZE_LOG_16,
456 .dst_info.psize = STEDMA40_PSIZE_LOG_16,
457}; 433};
458 434
459static struct hash_platform_data u8500_hash1_platform_data = { 435static struct hash_platform_data u8500_hash1_platform_data = {
@@ -470,20 +446,14 @@ static struct platform_device *mop500_platform_devs[] __initdata = {
470#ifdef CONFIG_STE_DMA40 446#ifdef CONFIG_STE_DMA40
471static struct stedma40_chan_cfg ssp0_dma_cfg_rx = { 447static struct stedma40_chan_cfg ssp0_dma_cfg_rx = {
472 .mode = STEDMA40_MODE_LOGICAL, 448 .mode = STEDMA40_MODE_LOGICAL,
473 .dir = STEDMA40_PERIPH_TO_MEM, 449 .dir = DMA_DEV_TO_MEM,
474 .src_dev_type = DB8500_DMA_DEV8_SSP0_RX, 450 .dev_type = DB8500_DMA_DEV8_SSP0,
475 .dst_dev_type = STEDMA40_DEV_DST_MEMORY,
476 .src_info.data_width = STEDMA40_BYTE_WIDTH,
477 .dst_info.data_width = STEDMA40_BYTE_WIDTH,
478}; 451};
479 452
480static struct stedma40_chan_cfg ssp0_dma_cfg_tx = { 453static struct stedma40_chan_cfg ssp0_dma_cfg_tx = {
481 .mode = STEDMA40_MODE_LOGICAL, 454 .mode = STEDMA40_MODE_LOGICAL,
482 .dir = STEDMA40_MEM_TO_PERIPH, 455 .dir = DMA_MEM_TO_DEV,
483 .src_dev_type = STEDMA40_DEV_SRC_MEMORY, 456 .dev_type = DB8500_DMA_DEV8_SSP0,
484 .dst_dev_type = DB8500_DMA_DEV8_SSP0_TX,
485 .src_info.data_width = STEDMA40_BYTE_WIDTH,
486 .dst_info.data_width = STEDMA40_BYTE_WIDTH,
487}; 457};
488#endif 458#endif
489 459
@@ -511,56 +481,38 @@ static void __init mop500_spi_init(struct device *parent)
511#ifdef CONFIG_STE_DMA40 481#ifdef CONFIG_STE_DMA40
512static struct stedma40_chan_cfg uart0_dma_cfg_rx = { 482static struct stedma40_chan_cfg uart0_dma_cfg_rx = {
513 .mode = STEDMA40_MODE_LOGICAL, 483 .mode = STEDMA40_MODE_LOGICAL,
514 .dir = STEDMA40_PERIPH_TO_MEM, 484 .dir = DMA_DEV_TO_MEM,
515 .src_dev_type = DB8500_DMA_DEV13_UART0_RX, 485 .dev_type = DB8500_DMA_DEV13_UART0,
516 .dst_dev_type = STEDMA40_DEV_DST_MEMORY,
517 .src_info.data_width = STEDMA40_BYTE_WIDTH,
518 .dst_info.data_width = STEDMA40_BYTE_WIDTH,
519}; 486};
520 487
521static struct stedma40_chan_cfg uart0_dma_cfg_tx = { 488static struct stedma40_chan_cfg uart0_dma_cfg_tx = {
522 .mode = STEDMA40_MODE_LOGICAL, 489 .mode = STEDMA40_MODE_LOGICAL,
523 .dir = STEDMA40_MEM_TO_PERIPH, 490 .dir = DMA_MEM_TO_DEV,
524 .src_dev_type = STEDMA40_DEV_SRC_MEMORY, 491 .dev_type = DB8500_DMA_DEV13_UART0,
525 .dst_dev_type = DB8500_DMA_DEV13_UART0_TX,
526 .src_info.data_width = STEDMA40_BYTE_WIDTH,
527 .dst_info.data_width = STEDMA40_BYTE_WIDTH,
528}; 492};
529 493
530static struct stedma40_chan_cfg uart1_dma_cfg_rx = { 494static struct stedma40_chan_cfg uart1_dma_cfg_rx = {
531 .mode = STEDMA40_MODE_LOGICAL, 495 .mode = STEDMA40_MODE_LOGICAL,
532 .dir = STEDMA40_PERIPH_TO_MEM, 496 .dir = DMA_DEV_TO_MEM,
533 .src_dev_type = DB8500_DMA_DEV12_UART1_RX, 497 .dev_type = DB8500_DMA_DEV12_UART1,
534 .dst_dev_type = STEDMA40_DEV_DST_MEMORY,
535 .src_info.data_width = STEDMA40_BYTE_WIDTH,
536 .dst_info.data_width = STEDMA40_BYTE_WIDTH,
537}; 498};
538 499
539static struct stedma40_chan_cfg uart1_dma_cfg_tx = { 500static struct stedma40_chan_cfg uart1_dma_cfg_tx = {
540 .mode = STEDMA40_MODE_LOGICAL, 501 .mode = STEDMA40_MODE_LOGICAL,
541 .dir = STEDMA40_MEM_TO_PERIPH, 502 .dir = DMA_MEM_TO_DEV,
542 .src_dev_type = STEDMA40_DEV_SRC_MEMORY, 503 .dev_type = DB8500_DMA_DEV12_UART1,
543 .dst_dev_type = DB8500_DMA_DEV12_UART1_TX,
544 .src_info.data_width = STEDMA40_BYTE_WIDTH,
545 .dst_info.data_width = STEDMA40_BYTE_WIDTH,
546}; 504};
547 505
548static struct stedma40_chan_cfg uart2_dma_cfg_rx = { 506static struct stedma40_chan_cfg uart2_dma_cfg_rx = {
549 .mode = STEDMA40_MODE_LOGICAL, 507 .mode = STEDMA40_MODE_LOGICAL,
550 .dir = STEDMA40_PERIPH_TO_MEM, 508 .dir = DMA_DEV_TO_MEM,
551 .src_dev_type = DB8500_DMA_DEV11_UART2_RX, 509 .dev_type = DB8500_DMA_DEV11_UART2,
552 .dst_dev_type = STEDMA40_DEV_DST_MEMORY,
553 .src_info.data_width = STEDMA40_BYTE_WIDTH,
554 .dst_info.data_width = STEDMA40_BYTE_WIDTH,
555}; 510};
556 511
557static struct stedma40_chan_cfg uart2_dma_cfg_tx = { 512static struct stedma40_chan_cfg uart2_dma_cfg_tx = {
558 .mode = STEDMA40_MODE_LOGICAL, 513 .mode = STEDMA40_MODE_LOGICAL,
559 .dir = STEDMA40_MEM_TO_PERIPH, 514 .dir = DMA_MEM_TO_DEV,
560 .src_dev_type = STEDMA40_DEV_SRC_MEMORY, 515 .dev_type = DB8500_DMA_DEV11_UART2,
561 .dst_dev_type = DB8500_DMA_DEV11_UART2_TX,
562 .src_info.data_width = STEDMA40_BYTE_WIDTH,
563 .dst_info.data_width = STEDMA40_BYTE_WIDTH,
564}; 516};
565#endif 517#endif
566 518
@@ -674,7 +626,7 @@ static void __init snowball_init_machine(void)
674 mop500_audio_init(parent); 626 mop500_audio_init(parent);
675 mop500_uart_init(parent); 627 mop500_uart_init(parent);
676 628
677 mop500_snowball_ethernet_clock_enable(); 629 u8500_cryp1_hash1_init(parent);
678 630
679 /* This board has full regulator constraints */ 631 /* This board has full regulator constraints */
680 regulator_has_full_constraints(); 632 regulator_has_full_constraints();
diff --git a/arch/arm/mach-ux500/board-mop500.h b/arch/arm/mach-ux500/board-mop500.h
index 49514b825034..d6fab166cbf1 100644
--- a/arch/arm/mach-ux500/board-mop500.h
+++ b/arch/arm/mach-ux500/board-mop500.h
@@ -93,6 +93,7 @@ extern struct amba_pl011_data uart0_plat;
93extern struct amba_pl011_data uart1_plat; 93extern struct amba_pl011_data uart1_plat;
94extern struct amba_pl011_data uart2_plat; 94extern struct amba_pl011_data uart2_plat;
95extern struct pl022_ssp_controller ssp0_plat; 95extern struct pl022_ssp_controller ssp0_plat;
96extern struct stedma40_platform_data dma40_plat_data;
96 97
97extern void mop500_sdi_init(struct device *parent); 98extern void mop500_sdi_init(struct device *parent);
98extern void snowball_sdi_init(struct device *parent); 99extern void snowball_sdi_init(struct device *parent);
@@ -104,7 +105,6 @@ void __init mop500_pinmaps_init(void);
104void __init snowball_pinmaps_init(void); 105void __init snowball_pinmaps_init(void);
105void __init hrefv60_pinmaps_init(void); 106void __init hrefv60_pinmaps_init(void);
106void mop500_audio_init(struct device *parent); 107void mop500_audio_init(struct device *parent);
107void mop500_snowball_ethernet_clock_enable(void);
108 108
109int __init mop500_uib_init(void); 109int __init mop500_uib_init(void);
110void mop500_uib_i2c_add(int busnum, struct i2c_board_info *info, 110void mop500_uib_i2c_add(int busnum, struct i2c_board_info *info,
diff --git a/arch/arm/mach-ux500/cache-l2x0.c b/arch/arm/mach-ux500/cache-l2x0.c
index f58615b5c601..82ccf1d98735 100644
--- a/arch/arm/mach-ux500/cache-l2x0.c
+++ b/arch/arm/mach-ux500/cache-l2x0.c
@@ -42,7 +42,8 @@ static int __init ux500_l2x0_init(void)
42 if (cpu_is_u8500_family() || cpu_is_ux540_family()) 42 if (cpu_is_u8500_family() || cpu_is_ux540_family())
43 l2x0_base = __io_address(U8500_L2CC_BASE); 43 l2x0_base = __io_address(U8500_L2CC_BASE);
44 else 44 else
45 ux500_unknown_soc(); 45 /* Non-Ux500 platform */
46 return -ENODEV;
46 47
47 /* Unlock before init */ 48 /* Unlock before init */
48 ux500_l2x0_unlock(); 49 ux500_l2x0_unlock();
diff --git a/arch/arm/mach-ux500/cpu-db8500.c b/arch/arm/mach-ux500/cpu-db8500.c
index 46cca52890bc..12eee8167525 100644
--- a/arch/arm/mach-ux500/cpu-db8500.c
+++ b/arch/arm/mach-ux500/cpu-db8500.c
@@ -162,26 +162,15 @@ static void __init db8500_add_gpios(struct device *parent)
162 dbx500_add_pinctrl(parent, "pinctrl-db8500", U8500_PRCMU_BASE); 162 dbx500_add_pinctrl(parent, "pinctrl-db8500", U8500_PRCMU_BASE);
163} 163}
164 164
165static int usb_db8500_rx_dma_cfg[] = { 165static int usb_db8500_dma_cfg[] = {
166 DB8500_DMA_DEV38_USB_OTG_IEP_1_9, 166 DB8500_DMA_DEV38_USB_OTG_IEP_AND_OEP_1_9,
167 DB8500_DMA_DEV37_USB_OTG_IEP_2_10, 167 DB8500_DMA_DEV37_USB_OTG_IEP_AND_OEP_2_10,
168 DB8500_DMA_DEV36_USB_OTG_IEP_3_11, 168 DB8500_DMA_DEV36_USB_OTG_IEP_AND_OEP_3_11,
169 DB8500_DMA_DEV19_USB_OTG_IEP_4_12, 169 DB8500_DMA_DEV19_USB_OTG_IEP_AND_OEP_4_12,
170 DB8500_DMA_DEV18_USB_OTG_IEP_5_13, 170 DB8500_DMA_DEV18_USB_OTG_IEP_AND_OEP_5_13,
171 DB8500_DMA_DEV17_USB_OTG_IEP_6_14, 171 DB8500_DMA_DEV17_USB_OTG_IEP_AND_OEP_6_14,
172 DB8500_DMA_DEV16_USB_OTG_IEP_7_15, 172 DB8500_DMA_DEV16_USB_OTG_IEP_AND_OEP_7_15,
173 DB8500_DMA_DEV39_USB_OTG_IEP_8 173 DB8500_DMA_DEV39_USB_OTG_IEP_AND_OEP_8
174};
175
176static int usb_db8500_tx_dma_cfg[] = {
177 DB8500_DMA_DEV38_USB_OTG_OEP_1_9,
178 DB8500_DMA_DEV37_USB_OTG_OEP_2_10,
179 DB8500_DMA_DEV36_USB_OTG_OEP_3_11,
180 DB8500_DMA_DEV19_USB_OTG_OEP_4_12,
181 DB8500_DMA_DEV18_USB_OTG_OEP_5_13,
182 DB8500_DMA_DEV17_USB_OTG_OEP_6_14,
183 DB8500_DMA_DEV16_USB_OTG_OEP_7_15,
184 DB8500_DMA_DEV39_USB_OTG_OEP_8
185}; 174};
186 175
187static const char *db8500_read_soc_id(void) 176static const char *db8500_read_soc_id(void)
@@ -215,7 +204,7 @@ struct device * __init u8500_init_devices(void)
215 204
216 db8500_add_rtc(parent); 205 db8500_add_rtc(parent);
217 db8500_add_gpios(parent); 206 db8500_add_gpios(parent);
218 db8500_add_usb(parent, usb_db8500_rx_dma_cfg, usb_db8500_tx_dma_cfg); 207 db8500_add_usb(parent, usb_db8500_dma_cfg, usb_db8500_dma_cfg);
219 208
220 for (i = 0; i < ARRAY_SIZE(platform_devs); i++) 209 for (i = 0; i < ARRAY_SIZE(platform_devs); i++)
221 platform_devs[i]->dev.parent = parent; 210 platform_devs[i]->dev.parent = parent;
@@ -226,34 +215,13 @@ struct device * __init u8500_init_devices(void)
226} 215}
227 216
228#ifdef CONFIG_MACH_UX500_DT 217#ifdef CONFIG_MACH_UX500_DT
229
230/* TODO: Once all pieces are DT:ed, remove completely. */
231static struct device * __init u8500_of_init_devices(void)
232{
233 struct device *parent = db8500_soc_device_init();
234
235 db8500_add_usb(parent, usb_db8500_rx_dma_cfg, usb_db8500_tx_dma_cfg);
236
237 u8500_dma40_device.dev.parent = parent;
238
239 /*
240 * Devices to be DT:ed:
241 * u8500_dma40_device = todo
242 * db8500_pmu_device = done
243 * db8500_prcmu_device = done
244 */
245 platform_device_register(&u8500_dma40_device);
246
247 return parent;
248}
249
250static struct of_dev_auxdata u8500_auxdata_lookup[] __initdata = { 218static struct of_dev_auxdata u8500_auxdata_lookup[] __initdata = {
251 /* Requires call-back bindings. */ 219 /* Requires call-back bindings. */
252 OF_DEV_AUXDATA("arm,cortex-a9-pmu", 0, "arm-pmu", &db8500_pmu_platdata), 220 OF_DEV_AUXDATA("arm,cortex-a9-pmu", 0, "arm-pmu", &db8500_pmu_platdata),
253 /* Requires DMA bindings. */ 221 /* Requires DMA bindings. */
254 OF_DEV_AUXDATA("arm,pl011", 0x80120000, "uart0", &uart0_plat), 222 OF_DEV_AUXDATA("arm,pl011", 0x80120000, "uart0", NULL),
255 OF_DEV_AUXDATA("arm,pl011", 0x80121000, "uart1", &uart1_plat), 223 OF_DEV_AUXDATA("arm,pl011", 0x80121000, "uart1", NULL),
256 OF_DEV_AUXDATA("arm,pl011", 0x80007000, "uart2", &uart2_plat), 224 OF_DEV_AUXDATA("arm,pl011", 0x80007000, "uart2", NULL),
257 OF_DEV_AUXDATA("arm,pl022", 0x80002000, "ssp0", &ssp0_plat), 225 OF_DEV_AUXDATA("arm,pl022", 0x80002000, "ssp0", &ssp0_plat),
258 OF_DEV_AUXDATA("arm,pl18x", 0x80126000, "sdi0", &mop500_sdi0_data), 226 OF_DEV_AUXDATA("arm,pl18x", 0x80126000, "sdi0", &mop500_sdi0_data),
259 OF_DEV_AUXDATA("arm,pl18x", 0x80118000, "sdi1", &mop500_sdi1_data), 227 OF_DEV_AUXDATA("arm,pl18x", 0x80118000, "sdi1", &mop500_sdi1_data),
@@ -274,11 +242,16 @@ static struct of_dev_auxdata u8500_auxdata_lookup[] __initdata = {
274 OF_DEV_AUXDATA("st,nomadik-i2c", 0x80128000, "nmk-i2c.2", NULL), 242 OF_DEV_AUXDATA("st,nomadik-i2c", 0x80128000, "nmk-i2c.2", NULL),
275 OF_DEV_AUXDATA("st,nomadik-i2c", 0x80110000, "nmk-i2c.3", NULL), 243 OF_DEV_AUXDATA("st,nomadik-i2c", 0x80110000, "nmk-i2c.3", NULL),
276 OF_DEV_AUXDATA("st,nomadik-i2c", 0x8012a000, "nmk-i2c.4", NULL), 244 OF_DEV_AUXDATA("st,nomadik-i2c", 0x8012a000, "nmk-i2c.4", NULL),
245 OF_DEV_AUXDATA("stericsson,db8500-musb", 0xa03e0000, "musb-ux500.0", NULL),
277 OF_DEV_AUXDATA("stericsson,db8500-prcmu", 0x80157000, "db8500-prcmu", 246 OF_DEV_AUXDATA("stericsson,db8500-prcmu", 0x80157000, "db8500-prcmu",
278 &db8500_prcmu_pdata), 247 &db8500_prcmu_pdata),
279 OF_DEV_AUXDATA("smsc,lan9115", 0x50000000, "smsc911x.0", NULL), 248 OF_DEV_AUXDATA("smsc,lan9115", 0x50000000, "smsc911x.0", NULL),
249 OF_DEV_AUXDATA("stericsson,ux500-cryp", 0xa03cb000, "cryp1", NULL),
250 OF_DEV_AUXDATA("stericsson,ux500-hash", 0xa03c2000, "hash1", NULL),
251 OF_DEV_AUXDATA("stericsson,snd-soc-mop500", 0, "snd-soc-mop500.0",
252 NULL),
280 /* Requires device name bindings. */ 253 /* Requires device name bindings. */
281 OF_DEV_AUXDATA("stericsson,nmk-pinctrl", U8500_PRCMU_BASE, 254 OF_DEV_AUXDATA("stericsson,db8500-pinctrl", U8500_PRCMU_BASE,
282 "pinctrl-db8500", NULL), 255 "pinctrl-db8500", NULL),
283 /* Requires clock name and DMA bindings. */ 256 /* Requires clock name and DMA bindings. */
284 OF_DEV_AUXDATA("stericsson,ux500-msp-i2s", 0x80123000, 257 OF_DEV_AUXDATA("stericsson,ux500-msp-i2s", 0x80123000,
@@ -289,6 +262,18 @@ static struct of_dev_auxdata u8500_auxdata_lookup[] __initdata = {
289 "ux500-msp-i2s.2", &msp2_platform_data), 262 "ux500-msp-i2s.2", &msp2_platform_data),
290 OF_DEV_AUXDATA("stericsson,ux500-msp-i2s", 0x80125000, 263 OF_DEV_AUXDATA("stericsson,ux500-msp-i2s", 0x80125000,
291 "ux500-msp-i2s.3", &msp3_platform_data), 264 "ux500-msp-i2s.3", &msp3_platform_data),
265 /* Requires clock name bindings and channel address lookup table. */
266 OF_DEV_AUXDATA("stericsson,db8500-dma40", 0x801C0000, "dma40.0", NULL),
267 {},
268};
269
270static struct of_dev_auxdata u8540_auxdata_lookup[] __initdata = {
271 /* Requires DMA bindings. */
272 OF_DEV_AUXDATA("arm,pl011", 0x80120000, "uart0", NULL),
273 OF_DEV_AUXDATA("arm,pl011", 0x80121000, "uart1", NULL),
274 OF_DEV_AUXDATA("arm,pl011", 0x80007000, "uart2", NULL),
275 OF_DEV_AUXDATA("stericsson,db8500-prcmu", 0x80157000, "db8500-prcmu",
276 &db8500_prcmu_pdata),
292 {}, 277 {},
293}; 278};
294 279
@@ -302,24 +287,25 @@ static const struct of_device_id u8500_local_bus_nodes[] = {
302 287
303static void __init u8500_init_machine(void) 288static void __init u8500_init_machine(void)
304{ 289{
305 struct device *parent = NULL; 290 struct device *parent = db8500_soc_device_init();
306 291
307 /* Pinmaps must be in place before devices register */ 292 /* Pinmaps must be in place before devices register */
308 if (of_machine_is_compatible("st-ericsson,mop500")) 293 if (of_machine_is_compatible("st-ericsson,mop500"))
309 mop500_pinmaps_init(); 294 mop500_pinmaps_init();
310 else if (of_machine_is_compatible("calaosystems,snowball-a9500")) { 295 else if (of_machine_is_compatible("calaosystems,snowball-a9500")) {
311 snowball_pinmaps_init(); 296 snowball_pinmaps_init();
312 mop500_snowball_ethernet_clock_enable();
313 } else if (of_machine_is_compatible("st-ericsson,hrefv60+")) 297 } else if (of_machine_is_compatible("st-ericsson,hrefv60+"))
314 hrefv60_pinmaps_init(); 298 hrefv60_pinmaps_init();
315 else if (of_machine_is_compatible("st-ericsson,ccu9540")) {} 299 else if (of_machine_is_compatible("st-ericsson,ccu9540")) {}
316 /* TODO: Add pinmaps for ccu9540 board. */ 300 /* TODO: Add pinmaps for ccu9540 board. */
317 301
318 /* TODO: Export SoC, USB, cpu-freq and DMA40 */ 302 /* automatically probe child nodes of dbx5x0 devices */
319 parent = u8500_of_init_devices(); 303 if (of_machine_is_compatible("st-ericsson,u8540"))
320 304 of_platform_populate(NULL, u8500_local_bus_nodes,
321 /* automatically probe child nodes of db8500 device */ 305 u8540_auxdata_lookup, parent);
322 of_platform_populate(NULL, u8500_local_bus_nodes, u8500_auxdata_lookup, parent); 306 else
307 of_platform_populate(NULL, u8500_local_bus_nodes,
308 u8500_auxdata_lookup, parent);
323} 309}
324 310
325static const char * stericsson_dt_platform_compat[] = { 311static const char * stericsson_dt_platform_compat[] = {
diff --git a/arch/arm/mach-ux500/cpu.c b/arch/arm/mach-ux500/cpu.c
index b6145ea51641..e6fb0239151b 100644
--- a/arch/arm/mach-ux500/cpu.c
+++ b/arch/arm/mach-ux500/cpu.c
@@ -76,13 +76,15 @@ void __init ux500_init_irq(void)
76 } else if (cpu_is_u9540()) { 76 } else if (cpu_is_u9540()) {
77 prcmu_early_init(U8500_PRCMU_BASE, SZ_8K - 1); 77 prcmu_early_init(U8500_PRCMU_BASE, SZ_8K - 1);
78 ux500_pm_init(U8500_PRCMU_BASE, SZ_8K - 1); 78 ux500_pm_init(U8500_PRCMU_BASE, SZ_8K - 1);
79 u8500_clk_init(U8500_CLKRST1_BASE, U8500_CLKRST2_BASE, 79 u9540_clk_init(U8500_CLKRST1_BASE, U8500_CLKRST2_BASE,
80 U8500_CLKRST3_BASE, U8500_CLKRST5_BASE, 80 U8500_CLKRST3_BASE, U8500_CLKRST5_BASE,
81 U8500_CLKRST6_BASE); 81 U8500_CLKRST6_BASE);
82 } else if (cpu_is_u8540()) { 82 } else if (cpu_is_u8540()) {
83 prcmu_early_init(U8500_PRCMU_BASE, SZ_8K + SZ_4K - 1); 83 prcmu_early_init(U8500_PRCMU_BASE, SZ_8K + SZ_4K - 1);
84 ux500_pm_init(U8500_PRCMU_BASE, SZ_8K + SZ_4K - 1); 84 ux500_pm_init(U8500_PRCMU_BASE, SZ_8K + SZ_4K - 1);
85 u8540_clk_init(); 85 u8540_clk_init(U8500_CLKRST1_BASE, U8500_CLKRST2_BASE,
86 U8500_CLKRST3_BASE, U8500_CLKRST5_BASE,
87 U8500_CLKRST6_BASE);
86 } 88 }
87} 89}
88 90
diff --git a/arch/arm/mach-ux500/db8500-regs.h b/arch/arm/mach-ux500/db8500-regs.h
index b2d7a0b98629..27399553c841 100644
--- a/arch/arm/mach-ux500/db8500-regs.h
+++ b/arch/arm/mach-ux500/db8500-regs.h
@@ -102,7 +102,6 @@
102#define U8500_PRCMU_BASE (U8500_PER4_BASE + 0x07000) 102#define U8500_PRCMU_BASE (U8500_PER4_BASE + 0x07000)
103#define U9540_DMC1_BASE (U8500_PER4_BASE + 0x0A000) 103#define U9540_DMC1_BASE (U8500_PER4_BASE + 0x0A000)
104#define U8500_PRCMU_TCDM_BASE (U8500_PER4_BASE + 0x68000) 104#define U8500_PRCMU_TCDM_BASE (U8500_PER4_BASE + 0x68000)
105#define U9540_PRCMU_TCDM_BASE (U8500_PER4_BASE + 0x6A000)
106#define U8500_PRCMU_TCPM_BASE (U8500_PER4_BASE + 0x60000) 105#define U8500_PRCMU_TCPM_BASE (U8500_PER4_BASE + 0x60000)
107#define U8500_PRCMU_TIMER_3_BASE (U8500_PER4_BASE + 0x07338) 106#define U8500_PRCMU_TIMER_3_BASE (U8500_PER4_BASE + 0x07338)
108#define U8500_PRCMU_TIMER_4_BASE (U8500_PER4_BASE + 0x07450) 107#define U8500_PRCMU_TIMER_4_BASE (U8500_PER4_BASE + 0x07450)
@@ -184,7 +183,7 @@
184#define U8500_IO_VIRTUAL 0xf0000000 183#define U8500_IO_VIRTUAL 0xf0000000
185#define U8500_IO_PHYSICAL 0xa0000000 184#define U8500_IO_PHYSICAL 0xa0000000
186/* This is where we map in the ROM to check ASIC IDs */ 185/* This is where we map in the ROM to check ASIC IDs */
187#define UX500_VIRT_ROM 0xf0000000 186#define UX500_VIRT_ROM IOMEM(0xf0000000)
188 187
189/* This macro is used in assembly, so no cast */ 188/* This macro is used in assembly, so no cast */
190#define IO_ADDRESS(x) \ 189#define IO_ADDRESS(x) \
diff --git a/arch/arm/mach-ux500/devices-db8500.c b/arch/arm/mach-ux500/devices-db8500.c
index 1cf94ce0feec..516a6f57d159 100644
--- a/arch/arm/mach-ux500/devices-db8500.c
+++ b/arch/arm/mach-ux500/devices-db8500.c
@@ -42,128 +42,7 @@ static struct resource dma40_resources[] = {
42 } 42 }
43}; 43};
44 44
45/* Default configuration for physcial memcpy */ 45struct stedma40_platform_data dma40_plat_data = {
46struct stedma40_chan_cfg dma40_memcpy_conf_phy = {
47 .mode = STEDMA40_MODE_PHYSICAL,
48 .dir = STEDMA40_MEM_TO_MEM,
49
50 .src_info.data_width = STEDMA40_BYTE_WIDTH,
51 .src_info.psize = STEDMA40_PSIZE_PHY_1,
52 .src_info.flow_ctrl = STEDMA40_NO_FLOW_CTRL,
53
54 .dst_info.data_width = STEDMA40_BYTE_WIDTH,
55 .dst_info.psize = STEDMA40_PSIZE_PHY_1,
56 .dst_info.flow_ctrl = STEDMA40_NO_FLOW_CTRL,
57};
58/* Default configuration for logical memcpy */
59struct stedma40_chan_cfg dma40_memcpy_conf_log = {
60 .dir = STEDMA40_MEM_TO_MEM,
61
62 .src_info.data_width = STEDMA40_BYTE_WIDTH,
63 .src_info.psize = STEDMA40_PSIZE_LOG_1,
64 .src_info.flow_ctrl = STEDMA40_NO_FLOW_CTRL,
65
66 .dst_info.data_width = STEDMA40_BYTE_WIDTH,
67 .dst_info.psize = STEDMA40_PSIZE_LOG_1,
68 .dst_info.flow_ctrl = STEDMA40_NO_FLOW_CTRL,
69};
70
71/*
72 * Mapping between destination event lines and physical device address.
73 * The event line is tied to a device and therefore the address is constant.
74 * When the address comes from a primecell it will be configured in runtime
75 * and we set the address to -1 as a placeholder.
76 */
77static const dma_addr_t dma40_tx_map[DB8500_DMA_NR_DEV] = {
78 /* MUSB - these will be runtime-reconfigured */
79 [DB8500_DMA_DEV39_USB_OTG_OEP_8] = -1,
80 [DB8500_DMA_DEV16_USB_OTG_OEP_7_15] = -1,
81 [DB8500_DMA_DEV17_USB_OTG_OEP_6_14] = -1,
82 [DB8500_DMA_DEV18_USB_OTG_OEP_5_13] = -1,
83 [DB8500_DMA_DEV19_USB_OTG_OEP_4_12] = -1,
84 [DB8500_DMA_DEV36_USB_OTG_OEP_3_11] = -1,
85 [DB8500_DMA_DEV37_USB_OTG_OEP_2_10] = -1,
86 [DB8500_DMA_DEV38_USB_OTG_OEP_1_9] = -1,
87 /* PrimeCells - run-time configured */
88 [DB8500_DMA_DEV0_SPI0_TX] = -1,
89 [DB8500_DMA_DEV1_SD_MMC0_TX] = -1,
90 [DB8500_DMA_DEV2_SD_MMC1_TX] = -1,
91 [DB8500_DMA_DEV3_SD_MMC2_TX] = -1,
92 [DB8500_DMA_DEV8_SSP0_TX] = -1,
93 [DB8500_DMA_DEV9_SSP1_TX] = -1,
94 [DB8500_DMA_DEV11_UART2_TX] = -1,
95 [DB8500_DMA_DEV12_UART1_TX] = -1,
96 [DB8500_DMA_DEV13_UART0_TX] = -1,
97 [DB8500_DMA_DEV28_SD_MM2_TX] = -1,
98 [DB8500_DMA_DEV29_SD_MM0_TX] = -1,
99 [DB8500_DMA_DEV32_SD_MM1_TX] = -1,
100 [DB8500_DMA_DEV33_SPI2_TX] = -1,
101 [DB8500_DMA_DEV35_SPI1_TX] = -1,
102 [DB8500_DMA_DEV40_SPI3_TX] = -1,
103 [DB8500_DMA_DEV41_SD_MM3_TX] = -1,
104 [DB8500_DMA_DEV42_SD_MM4_TX] = -1,
105 [DB8500_DMA_DEV43_SD_MM5_TX] = -1,
106 [DB8500_DMA_DEV14_MSP2_TX] = U8500_MSP2_BASE + MSP_TX_RX_REG_OFFSET,
107 [DB8500_DMA_DEV30_MSP1_TX] = U8500_MSP1_BASE + MSP_TX_RX_REG_OFFSET,
108 [DB8500_DMA_DEV31_MSP0_TX_SLIM0_CH0_TX] = U8500_MSP0_BASE + MSP_TX_RX_REG_OFFSET,
109 [DB8500_DMA_DEV48_CAC1_TX] = U8500_CRYP1_BASE + CRYP1_TX_REG_OFFSET,
110 [DB8500_DMA_DEV50_HAC1_TX] = U8500_HASH1_BASE + HASH1_TX_REG_OFFSET,
111};
112
113/* Mapping between source event lines and physical device address */
114static const dma_addr_t dma40_rx_map[DB8500_DMA_NR_DEV] = {
115 /* MUSB - these will be runtime-reconfigured */
116 [DB8500_DMA_DEV39_USB_OTG_IEP_8] = -1,
117 [DB8500_DMA_DEV16_USB_OTG_IEP_7_15] = -1,
118 [DB8500_DMA_DEV17_USB_OTG_IEP_6_14] = -1,
119 [DB8500_DMA_DEV18_USB_OTG_IEP_5_13] = -1,
120 [DB8500_DMA_DEV19_USB_OTG_IEP_4_12] = -1,
121 [DB8500_DMA_DEV36_USB_OTG_IEP_3_11] = -1,
122 [DB8500_DMA_DEV37_USB_OTG_IEP_2_10] = -1,
123 [DB8500_DMA_DEV38_USB_OTG_IEP_1_9] = -1,
124 /* PrimeCells */
125 [DB8500_DMA_DEV0_SPI0_RX] = -1,
126 [DB8500_DMA_DEV1_SD_MMC0_RX] = -1,
127 [DB8500_DMA_DEV2_SD_MMC1_RX] = -1,
128 [DB8500_DMA_DEV3_SD_MMC2_RX] = -1,
129 [DB8500_DMA_DEV8_SSP0_RX] = -1,
130 [DB8500_DMA_DEV9_SSP1_RX] = -1,
131 [DB8500_DMA_DEV11_UART2_RX] = -1,
132 [DB8500_DMA_DEV12_UART1_RX] = -1,
133 [DB8500_DMA_DEV13_UART0_RX] = -1,
134 [DB8500_DMA_DEV28_SD_MM2_RX] = -1,
135 [DB8500_DMA_DEV29_SD_MM0_RX] = -1,
136 [DB8500_DMA_DEV32_SD_MM1_RX] = -1,
137 [DB8500_DMA_DEV33_SPI2_RX] = -1,
138 [DB8500_DMA_DEV35_SPI1_RX] = -1,
139 [DB8500_DMA_DEV40_SPI3_RX] = -1,
140 [DB8500_DMA_DEV41_SD_MM3_RX] = -1,
141 [DB8500_DMA_DEV42_SD_MM4_RX] = -1,
142 [DB8500_DMA_DEV43_SD_MM5_RX] = -1,
143 [DB8500_DMA_DEV14_MSP2_RX] = U8500_MSP2_BASE + MSP_TX_RX_REG_OFFSET,
144 [DB8500_DMA_DEV30_MSP3_RX] = U8500_MSP3_BASE + MSP_TX_RX_REG_OFFSET,
145 [DB8500_DMA_DEV31_MSP0_RX_SLIM0_CH0_RX] = U8500_MSP0_BASE + MSP_TX_RX_REG_OFFSET,
146 [DB8500_DMA_DEV48_CAC1_RX] = U8500_CRYP1_BASE + CRYP1_RX_REG_OFFSET,
147};
148
149/* Reserved event lines for memcpy only */
150static int dma40_memcpy_event[] = {
151 DB8500_DMA_MEMCPY_TX_0,
152 DB8500_DMA_MEMCPY_TX_1,
153 DB8500_DMA_MEMCPY_TX_2,
154 DB8500_DMA_MEMCPY_TX_3,
155 DB8500_DMA_MEMCPY_TX_4,
156 DB8500_DMA_MEMCPY_TX_5,
157};
158
159static struct stedma40_platform_data dma40_plat_data = {
160 .dev_len = DB8500_DMA_NR_DEV,
161 .dev_rx = dma40_rx_map,
162 .dev_tx = dma40_tx_map,
163 .memcpy = dma40_memcpy_event,
164 .memcpy_len = ARRAY_SIZE(dma40_memcpy_event),
165 .memcpy_conf_phy = &dma40_memcpy_conf_phy,
166 .memcpy_conf_log = &dma40_memcpy_conf_log,
167 .disabled_channels = {-1}, 46 .disabled_channels = {-1},
168}; 47};
169 48
@@ -227,7 +106,7 @@ static struct resource db8500_prcmu_res[] = {
227 { 106 {
228 .name = "prcmu-tcpm", 107 .name = "prcmu-tcpm",
229 .start = U8500_PRCMU_TCPM_BASE, 108 .start = U8500_PRCMU_TCPM_BASE,
230 .end = U8500_PRCMU_TCPM_BASE + SZ_4K - 1, 109 .end = U8500_PRCMU_TCPM_BASE + SZ_32K - 1,
231 .flags = IORESOURCE_MEM, 110 .flags = IORESOURCE_MEM,
232 }, 111 },
233}; 112};
diff --git a/arch/arm/mach-ux500/id.c b/arch/arm/mach-ux500/id.c
index 0d33d1a06955..392f2fdb37d0 100644
--- a/arch/arm/mach-ux500/id.c
+++ b/arch/arm/mach-ux500/id.c
@@ -21,11 +21,11 @@
21 21
22struct dbx500_asic_id dbx500_id; 22struct dbx500_asic_id dbx500_id;
23 23
24static unsigned int ux500_read_asicid(phys_addr_t addr) 24static unsigned int __init ux500_read_asicid(phys_addr_t addr)
25{ 25{
26 phys_addr_t base = addr & ~0xfff; 26 phys_addr_t base = addr & ~0xfff;
27 struct map_desc desc = { 27 struct map_desc desc = {
28 .virtual = UX500_VIRT_ROM, 28 .virtual = (unsigned long)UX500_VIRT_ROM,
29 .pfn = __phys_to_pfn(base), 29 .pfn = __phys_to_pfn(base),
30 .length = SZ_16K, 30 .length = SZ_16K,
31 .type = MT_DEVICE, 31 .type = MT_DEVICE,
@@ -37,7 +37,7 @@ static unsigned int ux500_read_asicid(phys_addr_t addr)
37 local_flush_tlb_all(); 37 local_flush_tlb_all();
38 flush_cache_all(); 38 flush_cache_all();
39 39
40 return readl(IOMEM(UX500_VIRT_ROM + (addr & 0xfff))); 40 return readl(UX500_VIRT_ROM + (addr & 0xfff));
41} 41}
42 42
43static void ux500_print_soc_info(unsigned int asicid) 43static void ux500_print_soc_info(unsigned int asicid)
diff --git a/arch/arm/mach-ux500/platsmp.c b/arch/arm/mach-ux500/platsmp.c
index 14d90469392f..1f296e796a4f 100644
--- a/arch/arm/mach-ux500/platsmp.c
+++ b/arch/arm/mach-ux500/platsmp.c
@@ -54,7 +54,7 @@ static void __iomem *scu_base_addr(void)
54 54
55static DEFINE_SPINLOCK(boot_lock); 55static DEFINE_SPINLOCK(boot_lock);
56 56
57static void __cpuinit ux500_secondary_init(unsigned int cpu) 57static void ux500_secondary_init(unsigned int cpu)
58{ 58{
59 /* 59 /*
60 * let the primary processor know we're out of the 60 * let the primary processor know we're out of the
@@ -69,7 +69,7 @@ static void __cpuinit ux500_secondary_init(unsigned int cpu)
69 spin_unlock(&boot_lock); 69 spin_unlock(&boot_lock);
70} 70}
71 71
72static int __cpuinit ux500_boot_secondary(unsigned int cpu, struct task_struct *idle) 72static int ux500_boot_secondary(unsigned int cpu, struct task_struct *idle)
73{ 73{
74 unsigned long timeout; 74 unsigned long timeout;
75 75
diff --git a/arch/arm/mach-ux500/ste-dma40-db8500.h b/arch/arm/mach-ux500/ste-dma40-db8500.h
index a616419bea76..0296ae5b0fd9 100644
--- a/arch/arm/mach-ux500/ste-dma40-db8500.h
+++ b/arch/arm/mach-ux500/ste-dma40-db8500.h
@@ -12,133 +12,74 @@
12 12
13#define DB8500_DMA_NR_DEV 64 13#define DB8500_DMA_NR_DEV 64
14 14
15enum dma_src_dev_type { 15/*
16 DB8500_DMA_DEV0_SPI0_RX = 0, 16 * Unless otherwise specified, all channels numbers are used for
17 DB8500_DMA_DEV1_SD_MMC0_RX = 1, 17 * TX & RX, and can be used for either source or destination
18 DB8500_DMA_DEV2_SD_MMC1_RX = 2, 18 * channels.
19 DB8500_DMA_DEV3_SD_MMC2_RX = 3, 19 */
20 DB8500_DMA_DEV4_I2C1_RX = 4, 20enum dma_dev_type {
21 DB8500_DMA_DEV5_I2C3_RX = 5, 21 DB8500_DMA_DEV0_SPI0 = 0,
22 DB8500_DMA_DEV6_I2C2_RX = 6, 22 DB8500_DMA_DEV1_SD_MMC0 = 1,
23 DB8500_DMA_DEV7_I2C4_RX = 7, /* Only on V1 and later */ 23 DB8500_DMA_DEV2_SD_MMC1 = 2,
24 DB8500_DMA_DEV8_SSP0_RX = 8, 24 DB8500_DMA_DEV3_SD_MMC2 = 3,
25 DB8500_DMA_DEV9_SSP1_RX = 9, 25 DB8500_DMA_DEV4_I2C1 = 4,
26 DB8500_DMA_DEV10_MCDE_RX = 10, 26 DB8500_DMA_DEV5_I2C3 = 5,
27 DB8500_DMA_DEV11_UART2_RX = 11, 27 DB8500_DMA_DEV6_I2C2 = 6,
28 DB8500_DMA_DEV12_UART1_RX = 12, 28 DB8500_DMA_DEV7_I2C4 = 7, /* Only on V1 and later */
29 DB8500_DMA_DEV13_UART0_RX = 13, 29 DB8500_DMA_DEV8_SSP0 = 8,
30 DB8500_DMA_DEV14_MSP2_RX = 14, 30 DB8500_DMA_DEV9_SSP1 = 9,
31 DB8500_DMA_DEV15_I2C0_RX = 15, 31 DB8500_DMA_DEV10_MCDE_RX = 10, /* RX only */
32 DB8500_DMA_DEV16_USB_OTG_IEP_7_15 = 16, 32 DB8500_DMA_DEV11_UART2 = 11,
33 DB8500_DMA_DEV17_USB_OTG_IEP_6_14 = 17, 33 DB8500_DMA_DEV12_UART1 = 12,
34 DB8500_DMA_DEV18_USB_OTG_IEP_5_13 = 18, 34 DB8500_DMA_DEV13_UART0 = 13,
35 DB8500_DMA_DEV19_USB_OTG_IEP_4_12 = 19, 35 DB8500_DMA_DEV14_MSP2 = 14,
36 DB8500_DMA_DEV20_SLIM0_CH0_RX_HSI_RX_CH0 = 20, 36 DB8500_DMA_DEV15_I2C0 = 15,
37 DB8500_DMA_DEV21_SLIM0_CH1_RX_HSI_RX_CH1 = 21, 37 DB8500_DMA_DEV16_USB_OTG_IEP_AND_OEP_7_15 = 16,
38 DB8500_DMA_DEV22_SLIM0_CH2_RX_HSI_RX_CH2 = 22, 38 DB8500_DMA_DEV17_USB_OTG_IEP_AND_OEP_6_14 = 17,
39 DB8500_DMA_DEV23_SLIM0_CH3_RX_HSI_RX_CH3 = 23, 39 DB8500_DMA_DEV18_USB_OTG_IEP_AND_OEP_5_13 = 18,
40 DB8500_DMA_DEV24_SRC_SXA0_RX_TX = 24, 40 DB8500_DMA_DEV19_USB_OTG_IEP_AND_OEP_4_12 = 19,
41 DB8500_DMA_DEV25_SRC_SXA1_RX_TX = 25, 41 DB8500_DMA_DEV20_SLIM0_CH0_HSI_CH0 = 20,
42 DB8500_DMA_DEV26_SRC_SXA2_RX_TX = 26, 42 DB8500_DMA_DEV21_SLIM0_CH1_HSI_CH1 = 21,
43 DB8500_DMA_DEV27_SRC_SXA3_RX_TX = 27, 43 DB8500_DMA_DEV22_SLIM0_CH2_HSI_CH2 = 22,
44 DB8500_DMA_DEV28_SD_MM2_RX = 28, 44 DB8500_DMA_DEV23_SLIM0_CH3_HSI_CH3 = 23,
45 DB8500_DMA_DEV29_SD_MM0_RX = 29, 45 DB8500_DMA_DEV24_SXA0 = 24,
46 DB8500_DMA_DEV30_MSP1_RX = 30, 46 DB8500_DMA_DEV25_SXA1 = 25,
47 DB8500_DMA_DEV26_SXA2 = 26,
48 DB8500_DMA_DEV27_SXA3 = 27,
49 DB8500_DMA_DEV28_SD_MM2 = 28,
50 DB8500_DMA_DEV29_SD_MM0 = 29,
51 DB8500_DMA_DEV30_MSP1 = 30,
47 /* On DB8500v2, MSP3 RX replaces MSP1 RX */ 52 /* On DB8500v2, MSP3 RX replaces MSP1 RX */
48 DB8500_DMA_DEV30_MSP3_RX = 30, 53 DB8500_DMA_DEV30_MSP3 = 30,
49 DB8500_DMA_DEV31_MSP0_RX_SLIM0_CH0_RX = 31, 54 DB8500_DMA_DEV31_MSP0_SLIM0_CH0 = 31,
50 DB8500_DMA_DEV32_SD_MM1_RX = 32, 55 DB8500_DMA_DEV32_SD_MM1 = 32,
51 DB8500_DMA_DEV33_SPI2_RX = 33, 56 DB8500_DMA_DEV33_SPI2 = 33,
52 DB8500_DMA_DEV34_I2C3_RX2 = 34, 57 DB8500_DMA_DEV34_I2C3_RX2_TX2 = 34,
53 DB8500_DMA_DEV35_SPI1_RX = 35, 58 DB8500_DMA_DEV35_SPI1 = 35,
54 DB8500_DMA_DEV36_USB_OTG_IEP_3_11 = 36, 59 DB8500_DMA_DEV36_USB_OTG_IEP_AND_OEP_3_11 = 36,
55 DB8500_DMA_DEV37_USB_OTG_IEP_2_10 = 37, 60 DB8500_DMA_DEV37_USB_OTG_IEP_AND_OEP_2_10 = 37,
56 DB8500_DMA_DEV38_USB_OTG_IEP_1_9 = 38, 61 DB8500_DMA_DEV38_USB_OTG_IEP_AND_OEP_1_9 = 38,
57 DB8500_DMA_DEV39_USB_OTG_IEP_8 = 39, 62 DB8500_DMA_DEV39_USB_OTG_IEP_AND_OEP_8 = 39,
58 DB8500_DMA_DEV40_SPI3_RX = 40, 63 DB8500_DMA_DEV40_SPI3 = 40,
59 DB8500_DMA_DEV41_SD_MM3_RX = 41, 64 DB8500_DMA_DEV41_SD_MM3 = 41,
60 DB8500_DMA_DEV42_SD_MM4_RX = 42, 65 DB8500_DMA_DEV42_SD_MM4 = 42,
61 DB8500_DMA_DEV43_SD_MM5_RX = 43, 66 DB8500_DMA_DEV43_SD_MM5 = 43,
62 DB8500_DMA_DEV44_SRC_SXA4_RX_TX = 44, 67 DB8500_DMA_DEV44_SXA4 = 44,
63 DB8500_DMA_DEV45_SRC_SXA5_RX_TX = 45, 68 DB8500_DMA_DEV45_SXA5 = 45,
64 DB8500_DMA_DEV46_SLIM0_CH8_RX_SRC_SXA6_RX_TX = 46, 69 DB8500_DMA_DEV46_SLIM0_CH8_SRC_SXA6 = 46,
65 DB8500_DMA_DEV47_SLIM0_CH9_RX_SRC_SXA7_RX_TX = 47, 70 DB8500_DMA_DEV47_SLIM0_CH9_SRC_SXA7 = 47,
66 DB8500_DMA_DEV48_CAC1_RX = 48, 71 DB8500_DMA_DEV48_CAC1 = 48,
67 /* 49, 50 and 51 are not used */ 72 DB8500_DMA_DEV49_CAC1_TX_HAC1_TX = 49, /* TX only */
68 DB8500_DMA_DEV52_SLIM0_CH4_RX_HSI_RX_CH4 = 52, 73 DB8500_DMA_DEV50_HAC1_TX = 50, /* TX only */
69 DB8500_DMA_DEV53_SLIM0_CH5_RX_HSI_RX_CH5 = 53, 74 DB8500_DMA_MEMCPY_TX_0 = 51, /* TX only */
70 DB8500_DMA_DEV54_SLIM0_CH6_RX_HSI_RX_CH6 = 54, 75 DB8500_DMA_DEV52_SLIM0_CH4_HSI_CH4 = 52,
71 DB8500_DMA_DEV55_SLIM0_CH7_RX_HSI_RX_CH7 = 55, 76 DB8500_DMA_DEV53_SLIM0_CH5_HSI_CH5 = 53,
72 /* 56, 57, 58, 59 and 60 are not used */ 77 DB8500_DMA_DEV54_SLIM0_CH6_HSI_CH6 = 54,
73 DB8500_DMA_DEV61_CAC0_RX = 61, 78 DB8500_DMA_DEV55_SLIM0_CH7_HSI_CH7 = 55,
74 /* 62 and 63 are not used */ 79 /* 56 -> 60 are channels reserved for memcpy only */
75}; 80 DB8500_DMA_DEV61_CAC0 = 61,
76 81 DB8500_DMA_DEV62_CAC0_TX_HAC0_TX = 62, /* TX only */
77enum dma_dest_dev_type { 82 DB8500_DMA_DEV63_HAC0_TX = 63, /* TX only */
78 DB8500_DMA_DEV0_SPI0_TX = 0,
79 DB8500_DMA_DEV1_SD_MMC0_TX = 1,
80 DB8500_DMA_DEV2_SD_MMC1_TX = 2,
81 DB8500_DMA_DEV3_SD_MMC2_TX = 3,
82 DB8500_DMA_DEV4_I2C1_TX = 4,
83 DB8500_DMA_DEV5_I2C3_TX = 5,
84 DB8500_DMA_DEV6_I2C2_TX = 6,
85 DB8500_DMA_DEV7_I2C4_TX = 7, /* Only on V1 and later */
86 DB8500_DMA_DEV8_SSP0_TX = 8,
87 DB8500_DMA_DEV9_SSP1_TX = 9,
88 /* 10 is not used*/
89 DB8500_DMA_DEV11_UART2_TX = 11,
90 DB8500_DMA_DEV12_UART1_TX = 12,
91 DB8500_DMA_DEV13_UART0_TX = 13,
92 DB8500_DMA_DEV14_MSP2_TX = 14,
93 DB8500_DMA_DEV15_I2C0_TX = 15,
94 DB8500_DMA_DEV16_USB_OTG_OEP_7_15 = 16,
95 DB8500_DMA_DEV17_USB_OTG_OEP_6_14 = 17,
96 DB8500_DMA_DEV18_USB_OTG_OEP_5_13 = 18,
97 DB8500_DMA_DEV19_USB_OTG_OEP_4_12 = 19,
98 DB8500_DMA_DEV20_SLIM0_CH0_TX_HSI_TX_CH0 = 20,
99 DB8500_DMA_DEV21_SLIM0_CH1_TX_HSI_TX_CH1 = 21,
100 DB8500_DMA_DEV22_SLIM0_CH2_TX_HSI_TX_CH2 = 22,
101 DB8500_DMA_DEV23_SLIM0_CH3_TX_HSI_TX_CH3 = 23,
102 DB8500_DMA_DEV24_DST_SXA0_RX_TX = 24,
103 DB8500_DMA_DEV25_DST_SXA1_RX_TX = 25,
104 DB8500_DMA_DEV26_DST_SXA2_RX_TX = 26,
105 DB8500_DMA_DEV27_DST_SXA3_RX_TX = 27,
106 DB8500_DMA_DEV28_SD_MM2_TX = 28,
107 DB8500_DMA_DEV29_SD_MM0_TX = 29,
108 DB8500_DMA_DEV30_MSP1_TX = 30,
109 DB8500_DMA_DEV31_MSP0_TX_SLIM0_CH0_TX = 31,
110 DB8500_DMA_DEV32_SD_MM1_TX = 32,
111 DB8500_DMA_DEV33_SPI2_TX = 33,
112 DB8500_DMA_DEV34_I2C3_TX2 = 34,
113 DB8500_DMA_DEV35_SPI1_TX = 35,
114 DB8500_DMA_DEV36_USB_OTG_OEP_3_11 = 36,
115 DB8500_DMA_DEV37_USB_OTG_OEP_2_10 = 37,
116 DB8500_DMA_DEV38_USB_OTG_OEP_1_9 = 38,
117 DB8500_DMA_DEV39_USB_OTG_OEP_8 = 39,
118 DB8500_DMA_DEV40_SPI3_TX = 40,
119 DB8500_DMA_DEV41_SD_MM3_TX = 41,
120 DB8500_DMA_DEV42_SD_MM4_TX = 42,
121 DB8500_DMA_DEV43_SD_MM5_TX = 43,
122 DB8500_DMA_DEV44_DST_SXA4_RX_TX = 44,
123 DB8500_DMA_DEV45_DST_SXA5_RX_TX = 45,
124 DB8500_DMA_DEV46_SLIM0_CH8_TX_DST_SXA6_RX_TX = 46,
125 DB8500_DMA_DEV47_SLIM0_CH9_TX_DST_SXA7_RX_TX = 47,
126 DB8500_DMA_DEV48_CAC1_TX = 48,
127 DB8500_DMA_DEV49_CAC1_TX_HAC1_TX = 49,
128 DB8500_DMA_DEV50_HAC1_TX = 50,
129 DB8500_DMA_MEMCPY_TX_0 = 51,
130 DB8500_DMA_DEV52_SLIM1_CH4_TX_HSI_TX_CH4 = 52,
131 DB8500_DMA_DEV53_SLIM1_CH5_TX_HSI_TX_CH5 = 53,
132 DB8500_DMA_DEV54_SLIM1_CH6_TX_HSI_TX_CH6 = 54,
133 DB8500_DMA_DEV55_SLIM1_CH7_TX_HSI_TX_CH7 = 55,
134 DB8500_DMA_MEMCPY_TX_1 = 56,
135 DB8500_DMA_MEMCPY_TX_2 = 57,
136 DB8500_DMA_MEMCPY_TX_3 = 58,
137 DB8500_DMA_MEMCPY_TX_4 = 59,
138 DB8500_DMA_MEMCPY_TX_5 = 60,
139 DB8500_DMA_DEV61_CAC0_TX = 61,
140 DB8500_DMA_DEV62_CAC0_TX_HAC0_TX = 62,
141 DB8500_DMA_DEV63_HAC0_TX = 63,
142}; 83};
143 84
144#endif 85#endif
diff --git a/arch/arm/mach-ux500/usb.c b/arch/arm/mach-ux500/usb.c
index 2dfc72f7cd8a..b7bd8d3a5507 100644
--- a/arch/arm/mach-ux500/usb.c
+++ b/arch/arm/mach-ux500/usb.c
@@ -14,25 +14,15 @@
14 14
15#define MUSB_DMA40_RX_CH { \ 15#define MUSB_DMA40_RX_CH { \
16 .mode = STEDMA40_MODE_LOGICAL, \ 16 .mode = STEDMA40_MODE_LOGICAL, \
17 .dir = STEDMA40_PERIPH_TO_MEM, \ 17 .dir = DMA_DEV_TO_MEM, \
18 .dst_dev_type = STEDMA40_DEV_DST_MEMORY, \
19 .src_info.data_width = STEDMA40_WORD_WIDTH, \
20 .dst_info.data_width = STEDMA40_WORD_WIDTH, \
21 .src_info.psize = STEDMA40_PSIZE_LOG_16, \
22 .dst_info.psize = STEDMA40_PSIZE_LOG_16, \
23 } 18 }
24 19
25#define MUSB_DMA40_TX_CH { \ 20#define MUSB_DMA40_TX_CH { \
26 .mode = STEDMA40_MODE_LOGICAL, \ 21 .mode = STEDMA40_MODE_LOGICAL, \
27 .dir = STEDMA40_MEM_TO_PERIPH, \ 22 .dir = DMA_MEM_TO_DEV, \
28 .src_dev_type = STEDMA40_DEV_SRC_MEMORY, \
29 .src_info.data_width = STEDMA40_WORD_WIDTH, \
30 .dst_info.data_width = STEDMA40_WORD_WIDTH, \
31 .src_info.psize = STEDMA40_PSIZE_LOG_16, \
32 .dst_info.psize = STEDMA40_PSIZE_LOG_16, \
33 } 23 }
34 24
35static struct stedma40_chan_cfg musb_dma_rx_ch[UX500_MUSB_DMA_NUM_RX_CHANNELS] 25static struct stedma40_chan_cfg musb_dma_rx_ch[UX500_MUSB_DMA_NUM_RX_TX_CHANNELS]
36 = { 26 = {
37 MUSB_DMA40_RX_CH, 27 MUSB_DMA40_RX_CH,
38 MUSB_DMA40_RX_CH, 28 MUSB_DMA40_RX_CH,
@@ -44,7 +34,7 @@ static struct stedma40_chan_cfg musb_dma_rx_ch[UX500_MUSB_DMA_NUM_RX_CHANNELS]
44 MUSB_DMA40_RX_CH 34 MUSB_DMA40_RX_CH
45}; 35};
46 36
47static struct stedma40_chan_cfg musb_dma_tx_ch[UX500_MUSB_DMA_NUM_TX_CHANNELS] 37static struct stedma40_chan_cfg musb_dma_tx_ch[UX500_MUSB_DMA_NUM_RX_TX_CHANNELS]
48 = { 38 = {
49 MUSB_DMA40_TX_CH, 39 MUSB_DMA40_TX_CH,
50 MUSB_DMA40_TX_CH, 40 MUSB_DMA40_TX_CH,
@@ -56,7 +46,7 @@ static struct stedma40_chan_cfg musb_dma_tx_ch[UX500_MUSB_DMA_NUM_TX_CHANNELS]
56 MUSB_DMA40_TX_CH, 46 MUSB_DMA40_TX_CH,
57}; 47};
58 48
59static void *ux500_dma_rx_param_array[UX500_MUSB_DMA_NUM_RX_CHANNELS] = { 49static void *ux500_dma_rx_param_array[UX500_MUSB_DMA_NUM_RX_TX_CHANNELS] = {
60 &musb_dma_rx_ch[0], 50 &musb_dma_rx_ch[0],
61 &musb_dma_rx_ch[1], 51 &musb_dma_rx_ch[1],
62 &musb_dma_rx_ch[2], 52 &musb_dma_rx_ch[2],
@@ -67,7 +57,7 @@ static void *ux500_dma_rx_param_array[UX500_MUSB_DMA_NUM_RX_CHANNELS] = {
67 &musb_dma_rx_ch[7] 57 &musb_dma_rx_ch[7]
68}; 58};
69 59
70static void *ux500_dma_tx_param_array[UX500_MUSB_DMA_NUM_TX_CHANNELS] = { 60static void *ux500_dma_tx_param_array[UX500_MUSB_DMA_NUM_RX_TX_CHANNELS] = {
71 &musb_dma_tx_ch[0], 61 &musb_dma_tx_ch[0],
72 &musb_dma_tx_ch[1], 62 &musb_dma_tx_ch[1],
73 &musb_dma_tx_ch[2], 63 &musb_dma_tx_ch[2],
@@ -81,23 +71,11 @@ static void *ux500_dma_tx_param_array[UX500_MUSB_DMA_NUM_TX_CHANNELS] = {
81static struct ux500_musb_board_data musb_board_data = { 71static struct ux500_musb_board_data musb_board_data = {
82 .dma_rx_param_array = ux500_dma_rx_param_array, 72 .dma_rx_param_array = ux500_dma_rx_param_array,
83 .dma_tx_param_array = ux500_dma_tx_param_array, 73 .dma_tx_param_array = ux500_dma_tx_param_array,
84 .num_rx_channels = UX500_MUSB_DMA_NUM_RX_CHANNELS,
85 .num_tx_channels = UX500_MUSB_DMA_NUM_TX_CHANNELS,
86 .dma_filter = stedma40_filter, 74 .dma_filter = stedma40_filter,
87}; 75};
88 76
89static u64 ux500_musb_dmamask = DMA_BIT_MASK(32);
90
91static struct musb_hdrc_config musb_hdrc_config = {
92 .multipoint = true,
93 .dyn_fifo = true,
94 .num_eps = 16,
95 .ram_bits = 16,
96};
97
98static struct musb_hdrc_platform_data musb_platform_data = { 77static struct musb_hdrc_platform_data musb_platform_data = {
99 .mode = MUSB_OTG, 78 .mode = MUSB_OTG,
100 .config = &musb_hdrc_config,
101 .board_data = &musb_board_data, 79 .board_data = &musb_board_data,
102}; 80};
103 81
@@ -118,27 +96,26 @@ struct platform_device ux500_musb_device = {
118 .id = 0, 96 .id = 0,
119 .dev = { 97 .dev = {
120 .platform_data = &musb_platform_data, 98 .platform_data = &musb_platform_data,
121 .dma_mask = &ux500_musb_dmamask,
122 .coherent_dma_mask = DMA_BIT_MASK(32), 99 .coherent_dma_mask = DMA_BIT_MASK(32),
123 }, 100 },
124 .num_resources = ARRAY_SIZE(usb_resources), 101 .num_resources = ARRAY_SIZE(usb_resources),
125 .resource = usb_resources, 102 .resource = usb_resources,
126}; 103};
127 104
128static inline void ux500_usb_dma_update_rx_ch_config(int *src_dev_type) 105static inline void ux500_usb_dma_update_rx_ch_config(int *dev_type)
129{ 106{
130 u32 idx; 107 u32 idx;
131 108
132 for (idx = 0; idx < UX500_MUSB_DMA_NUM_RX_CHANNELS; idx++) 109 for (idx = 0; idx < UX500_MUSB_DMA_NUM_RX_TX_CHANNELS; idx++)
133 musb_dma_rx_ch[idx].src_dev_type = src_dev_type[idx]; 110 musb_dma_rx_ch[idx].dev_type = dev_type[idx];
134} 111}
135 112
136static inline void ux500_usb_dma_update_tx_ch_config(int *dst_dev_type) 113static inline void ux500_usb_dma_update_tx_ch_config(int *dev_type)
137{ 114{
138 u32 idx; 115 u32 idx;
139 116
140 for (idx = 0; idx < UX500_MUSB_DMA_NUM_TX_CHANNELS; idx++) 117 for (idx = 0; idx < UX500_MUSB_DMA_NUM_RX_TX_CHANNELS; idx++)
141 musb_dma_tx_ch[idx].dst_dev_type = dst_dev_type[idx]; 118 musb_dma_tx_ch[idx].dev_type = dev_type[idx];
142} 119}
143 120
144void ux500_add_usb(struct device *parent, resource_size_t base, int irq, 121void ux500_add_usb(struct device *parent, resource_size_t base, int irq,
diff --git a/arch/arm/mach-versatile/core.c b/arch/arm/mach-versatile/core.c
index 54bb80b012ac..3b0572f30d56 100644
--- a/arch/arm/mach-versatile/core.c
+++ b/arch/arm/mach-versatile/core.c
@@ -38,6 +38,7 @@
38#include <linux/clkdev.h> 38#include <linux/clkdev.h>
39#include <linux/mtd/physmap.h> 39#include <linux/mtd/physmap.h>
40#include <linux/bitops.h> 40#include <linux/bitops.h>
41#include <linux/reboot.h>
41 42
42#include <asm/irq.h> 43#include <asm/irq.h>
43#include <asm/hardware/arm_timer.h> 44#include <asm/hardware/arm_timer.h>
@@ -733,7 +734,7 @@ static void versatile_leds_event(led_event_t ledevt)
733} 734}
734#endif /* CONFIG_LEDS */ 735#endif /* CONFIG_LEDS */
735 736
736void versatile_restart(char mode, const char *cmd) 737void versatile_restart(enum reboot_mode mode, const char *cmd)
737{ 738{
738 void __iomem *sys = __io_address(VERSATILE_SYS_BASE); 739 void __iomem *sys = __io_address(VERSATILE_SYS_BASE);
739 u32 val; 740 u32 val;
diff --git a/arch/arm/mach-versatile/core.h b/arch/arm/mach-versatile/core.h
index 5c1b87d1da6b..f06d5768e428 100644
--- a/arch/arm/mach-versatile/core.h
+++ b/arch/arm/mach-versatile/core.h
@@ -24,13 +24,14 @@
24 24
25#include <linux/amba/bus.h> 25#include <linux/amba/bus.h>
26#include <linux/of_platform.h> 26#include <linux/of_platform.h>
27#include <linux/reboot.h>
27 28
28extern void __init versatile_init(void); 29extern void __init versatile_init(void);
29extern void __init versatile_init_early(void); 30extern void __init versatile_init_early(void);
30extern void __init versatile_init_irq(void); 31extern void __init versatile_init_irq(void);
31extern void __init versatile_map_io(void); 32extern void __init versatile_map_io(void);
32extern void versatile_timer_init(void); 33extern void versatile_timer_init(void);
33extern void versatile_restart(char, const char *); 34extern void versatile_restart(enum reboot_mode, const char *);
34extern unsigned int mmc_status(struct device *dev); 35extern unsigned int mmc_status(struct device *dev);
35#ifdef CONFIG_OF 36#ifdef CONFIG_OF
36extern struct of_dev_auxdata versatile_auxdata_lookup[]; 37extern struct of_dev_auxdata versatile_auxdata_lookup[];
diff --git a/arch/arm/mach-vexpress/Kconfig b/arch/arm/mach-vexpress/Kconfig
index 5907e10c37fd..b8bbabec6310 100644
--- a/arch/arm/mach-vexpress/Kconfig
+++ b/arch/arm/mach-vexpress/Kconfig
@@ -57,4 +57,13 @@ config ARCH_VEXPRESS_CORTEX_A5_A9_ERRATA
57config ARCH_VEXPRESS_CA9X4 57config ARCH_VEXPRESS_CA9X4
58 bool "Versatile Express Cortex-A9x4 tile" 58 bool "Versatile Express Cortex-A9x4 tile"
59 59
60config ARCH_VEXPRESS_DCSCB
61 bool "Dual Cluster System Control Block (DCSCB) support"
62 depends on MCPM
63 select ARM_CCI
64 help
65 Support for the Dual Cluster System Configuration Block (DCSCB).
66 This is needed to provide CPU and cluster power management
67 on RTSM implementing big.LITTLE.
68
60endmenu 69endmenu
diff --git a/arch/arm/mach-vexpress/Makefile b/arch/arm/mach-vexpress/Makefile
index 42703e8b4d3b..48ba89a8149f 100644
--- a/arch/arm/mach-vexpress/Makefile
+++ b/arch/arm/mach-vexpress/Makefile
@@ -6,5 +6,6 @@ ccflags-$(CONFIG_ARCH_MULTIPLATFORM) := -I$(srctree)/$(src)/include \
6 6
7obj-y := v2m.o 7obj-y := v2m.o
8obj-$(CONFIG_ARCH_VEXPRESS_CA9X4) += ct-ca9x4.o 8obj-$(CONFIG_ARCH_VEXPRESS_CA9X4) += ct-ca9x4.o
9obj-$(CONFIG_ARCH_VEXPRESS_DCSCB) += dcscb.o dcscb_setup.o
9obj-$(CONFIG_SMP) += platsmp.o 10obj-$(CONFIG_SMP) += platsmp.o
10obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o 11obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o
diff --git a/arch/arm/mach-vexpress/core.h b/arch/arm/mach-vexpress/core.h
index f134cd4a85f1..bde4374ab6d5 100644
--- a/arch/arm/mach-vexpress/core.h
+++ b/arch/arm/mach-vexpress/core.h
@@ -6,6 +6,8 @@
6 6
7void vexpress_dt_smp_map_io(void); 7void vexpress_dt_smp_map_io(void);
8 8
9bool vexpress_smp_init_ops(void);
10
9extern struct smp_operations vexpress_smp_ops; 11extern struct smp_operations vexpress_smp_ops;
10 12
11extern void vexpress_cpu_die(unsigned int cpu); 13extern void vexpress_cpu_die(unsigned int cpu);
diff --git a/arch/arm/mach-vexpress/dcscb.c b/arch/arm/mach-vexpress/dcscb.c
new file mode 100644
index 000000000000..16d57a8a9d5a
--- /dev/null
+++ b/arch/arm/mach-vexpress/dcscb.c
@@ -0,0 +1,253 @@
1/*
2 * arch/arm/mach-vexpress/dcscb.c - Dual Cluster System Configuration Block
3 *
4 * Created by: Nicolas Pitre, May 2012
5 * Copyright: (C) 2012-2013 Linaro Limited
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#include <linux/init.h>
13#include <linux/kernel.h>
14#include <linux/io.h>
15#include <linux/spinlock.h>
16#include <linux/errno.h>
17#include <linux/of_address.h>
18#include <linux/vexpress.h>
19#include <linux/arm-cci.h>
20
21#include <asm/mcpm.h>
22#include <asm/proc-fns.h>
23#include <asm/cacheflush.h>
24#include <asm/cputype.h>
25#include <asm/cp15.h>
26
27
28#define RST_HOLD0 0x0
29#define RST_HOLD1 0x4
30#define SYS_SWRESET 0x8
31#define RST_STAT0 0xc
32#define RST_STAT1 0x10
33#define EAG_CFG_R 0x20
34#define EAG_CFG_W 0x24
35#define KFC_CFG_R 0x28
36#define KFC_CFG_W 0x2c
37#define DCS_CFG_R 0x30
38
39/*
40 * We can't use regular spinlocks. In the switcher case, it is possible
41 * for an outbound CPU to call power_down() while its inbound counterpart
42 * is already live using the same logical CPU number which trips lockdep
43 * debugging.
44 */
45static arch_spinlock_t dcscb_lock = __ARCH_SPIN_LOCK_UNLOCKED;
46
47static void __iomem *dcscb_base;
48static int dcscb_use_count[4][2];
49static int dcscb_allcpus_mask[2];
50
51static int dcscb_power_up(unsigned int cpu, unsigned int cluster)
52{
53 unsigned int rst_hold, cpumask = (1 << cpu);
54 unsigned int all_mask = dcscb_allcpus_mask[cluster];
55
56 pr_debug("%s: cpu %u cluster %u\n", __func__, cpu, cluster);
57 if (cpu >= 4 || cluster >= 2)
58 return -EINVAL;
59
60 /*
61 * Since this is called with IRQs enabled, and no arch_spin_lock_irq
62 * variant exists, we need to disable IRQs manually here.
63 */
64 local_irq_disable();
65 arch_spin_lock(&dcscb_lock);
66
67 dcscb_use_count[cpu][cluster]++;
68 if (dcscb_use_count[cpu][cluster] == 1) {
69 rst_hold = readl_relaxed(dcscb_base + RST_HOLD0 + cluster * 4);
70 if (rst_hold & (1 << 8)) {
71 /* remove cluster reset and add individual CPU's reset */
72 rst_hold &= ~(1 << 8);
73 rst_hold |= all_mask;
74 }
75 rst_hold &= ~(cpumask | (cpumask << 4));
76 writel_relaxed(rst_hold, dcscb_base + RST_HOLD0 + cluster * 4);
77 } else if (dcscb_use_count[cpu][cluster] != 2) {
78 /*
79 * The only possible values are:
80 * 0 = CPU down
81 * 1 = CPU (still) up
82 * 2 = CPU requested to be up before it had a chance
83 * to actually make itself down.
84 * Any other value is a bug.
85 */
86 BUG();
87 }
88
89 arch_spin_unlock(&dcscb_lock);
90 local_irq_enable();
91
92 return 0;
93}
94
95static void dcscb_power_down(void)
96{
97 unsigned int mpidr, cpu, cluster, rst_hold, cpumask, all_mask;
98 bool last_man = false, skip_wfi = false;
99
100 mpidr = read_cpuid_mpidr();
101 cpu = MPIDR_AFFINITY_LEVEL(mpidr, 0);
102 cluster = MPIDR_AFFINITY_LEVEL(mpidr, 1);
103 cpumask = (1 << cpu);
104 all_mask = dcscb_allcpus_mask[cluster];
105
106 pr_debug("%s: cpu %u cluster %u\n", __func__, cpu, cluster);
107 BUG_ON(cpu >= 4 || cluster >= 2);
108
109 __mcpm_cpu_going_down(cpu, cluster);
110
111 arch_spin_lock(&dcscb_lock);
112 BUG_ON(__mcpm_cluster_state(cluster) != CLUSTER_UP);
113 dcscb_use_count[cpu][cluster]--;
114 if (dcscb_use_count[cpu][cluster] == 0) {
115 rst_hold = readl_relaxed(dcscb_base + RST_HOLD0 + cluster * 4);
116 rst_hold |= cpumask;
117 if (((rst_hold | (rst_hold >> 4)) & all_mask) == all_mask) {
118 rst_hold |= (1 << 8);
119 last_man = true;
120 }
121 writel_relaxed(rst_hold, dcscb_base + RST_HOLD0 + cluster * 4);
122 } else if (dcscb_use_count[cpu][cluster] == 1) {
123 /*
124 * A power_up request went ahead of us.
125 * Even if we do not want to shut this CPU down,
126 * the caller expects a certain state as if the WFI
127 * was aborted. So let's continue with cache cleaning.
128 */
129 skip_wfi = true;
130 } else
131 BUG();
132
133 if (last_man && __mcpm_outbound_enter_critical(cpu, cluster)) {
134 arch_spin_unlock(&dcscb_lock);
135
136 /*
137 * Flush all cache levels for this cluster.
138 *
139 * A15/A7 can hit in the cache with SCTLR.C=0, so we don't need
140 * a preliminary flush here for those CPUs. At least, that's
141 * the theory -- without the extra flush, Linux explodes on
142 * RTSM (to be investigated).
143 */
144 flush_cache_all();
145 set_cr(get_cr() & ~CR_C);
146 flush_cache_all();
147
148 /*
149 * This is a harmless no-op. On platforms with a real
150 * outer cache this might either be needed or not,
151 * depending on where the outer cache sits.
152 */
153 outer_flush_all();
154
155 /* Disable local coherency by clearing the ACTLR "SMP" bit: */
156 set_auxcr(get_auxcr() & ~(1 << 6));
157
158 /*
159 * Disable cluster-level coherency by masking
160 * incoming snoops and DVM messages:
161 */
162 cci_disable_port_by_cpu(mpidr);
163
164 __mcpm_outbound_leave_critical(cluster, CLUSTER_DOWN);
165 } else {
166 arch_spin_unlock(&dcscb_lock);
167
168 /*
169 * Flush the local CPU cache.
170 *
171 * A15/A7 can hit in the cache with SCTLR.C=0, so we don't need
172 * a preliminary flush here for those CPUs. At least, that's
173 * the theory -- without the extra flush, Linux explodes on
174 * RTSM (to be investigated).
175 */
176 flush_cache_louis();
177 set_cr(get_cr() & ~CR_C);
178 flush_cache_louis();
179
180 /* Disable local coherency by clearing the ACTLR "SMP" bit: */
181 set_auxcr(get_auxcr() & ~(1 << 6));
182 }
183
184 __mcpm_cpu_down(cpu, cluster);
185
186 /* Now we are prepared for power-down, do it: */
187 dsb();
188 if (!skip_wfi)
189 wfi();
190
191 /* Not dead at this point? Let our caller cope. */
192}
193
194static const struct mcpm_platform_ops dcscb_power_ops = {
195 .power_up = dcscb_power_up,
196 .power_down = dcscb_power_down,
197};
198
199static void __init dcscb_usage_count_init(void)
200{
201 unsigned int mpidr, cpu, cluster;
202
203 mpidr = read_cpuid_mpidr();
204 cpu = MPIDR_AFFINITY_LEVEL(mpidr, 0);
205 cluster = MPIDR_AFFINITY_LEVEL(mpidr, 1);
206
207 pr_debug("%s: cpu %u cluster %u\n", __func__, cpu, cluster);
208 BUG_ON(cpu >= 4 || cluster >= 2);
209 dcscb_use_count[cpu][cluster] = 1;
210}
211
212extern void dcscb_power_up_setup(unsigned int affinity_level);
213
214static int __init dcscb_init(void)
215{
216 struct device_node *node;
217 unsigned int cfg;
218 int ret;
219
220 if (!cci_probed())
221 return -ENODEV;
222
223 node = of_find_compatible_node(NULL, NULL, "arm,rtsm,dcscb");
224 if (!node)
225 return -ENODEV;
226 dcscb_base = of_iomap(node, 0);
227 if (!dcscb_base)
228 return -EADDRNOTAVAIL;
229 cfg = readl_relaxed(dcscb_base + DCS_CFG_R);
230 dcscb_allcpus_mask[0] = (1 << (((cfg >> 16) >> (0 << 2)) & 0xf)) - 1;
231 dcscb_allcpus_mask[1] = (1 << (((cfg >> 16) >> (1 << 2)) & 0xf)) - 1;
232 dcscb_usage_count_init();
233
234 ret = mcpm_platform_register(&dcscb_power_ops);
235 if (!ret)
236 ret = mcpm_sync_init(dcscb_power_up_setup);
237 if (ret) {
238 iounmap(dcscb_base);
239 return ret;
240 }
241
242 pr_info("VExpress DCSCB support installed\n");
243
244 /*
245 * Future entries into the kernel can now go
246 * through the cluster entry vectors.
247 */
248 vexpress_flags_set(virt_to_phys(mcpm_entry_point));
249
250 return 0;
251}
252
253early_initcall(dcscb_init);
diff --git a/arch/arm/mach-vexpress/dcscb_setup.S b/arch/arm/mach-vexpress/dcscb_setup.S
new file mode 100644
index 000000000000..4bb7fbe0f621
--- /dev/null
+++ b/arch/arm/mach-vexpress/dcscb_setup.S
@@ -0,0 +1,38 @@
1/*
2 * arch/arm/include/asm/dcscb_setup.S
3 *
4 * Created by: Dave Martin, 2012-06-22
5 * Copyright: (C) 2012-2013 Linaro Limited
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#include <linux/linkage.h>
13
14
15ENTRY(dcscb_power_up_setup)
16
17 cmp r0, #0 @ check affinity level
18 beq 2f
19
20/*
21 * Enable cluster-level coherency, in preparation for turning on the MMU.
22 * The ACTLR SMP bit does not need to be set here, because cpu_resume()
23 * already restores that.
24 *
25 * A15/A7 may not require explicit L2 invalidation on reset, dependent
26 * on hardware integration decisions.
27 * For now, this code assumes that L2 is either already invalidated,
28 * or invalidation is not required.
29 */
30
31 b cci_enable_port_for_self
32
332: @ Implementation-specific local CPU setup operations should go here,
34 @ if any. In this case, there is nothing to do.
35
36 bx lr
37
38ENDPROC(dcscb_power_up_setup)
diff --git a/arch/arm/mach-vexpress/platsmp.c b/arch/arm/mach-vexpress/platsmp.c
index dc1ace55d557..993c9ae5dc5e 100644
--- a/arch/arm/mach-vexpress/platsmp.c
+++ b/arch/arm/mach-vexpress/platsmp.c
@@ -12,9 +12,11 @@
12#include <linux/errno.h> 12#include <linux/errno.h>
13#include <linux/smp.h> 13#include <linux/smp.h>
14#include <linux/io.h> 14#include <linux/io.h>
15#include <linux/of.h>
15#include <linux/of_fdt.h> 16#include <linux/of_fdt.h>
16#include <linux/vexpress.h> 17#include <linux/vexpress.h>
17 18
19#include <asm/mcpm.h>
18#include <asm/smp_scu.h> 20#include <asm/smp_scu.h>
19#include <asm/mach/map.h> 21#include <asm/mach/map.h>
20 22
@@ -203,3 +205,21 @@ struct smp_operations __initdata vexpress_smp_ops = {
203 .cpu_die = vexpress_cpu_die, 205 .cpu_die = vexpress_cpu_die,
204#endif 206#endif
205}; 207};
208
209bool __init vexpress_smp_init_ops(void)
210{
211#ifdef CONFIG_MCPM
212 /*
213 * The best way to detect a multi-cluster configuration at the moment
214 * is to look for the presence of a CCI in the system.
215 * Override the default vexpress_smp_ops if so.
216 */
217 struct device_node *node;
218 node = of_find_compatible_node(NULL, NULL, "arm,cci-400");
219 if (node && of_device_is_available(node)) {
220 mcpm_smp_set_ops();
221 return true;
222 }
223#endif
224 return false;
225}
diff --git a/arch/arm/mach-vexpress/v2m.c b/arch/arm/mach-vexpress/v2m.c
index 8802030df98d..95a469e23e37 100644
--- a/arch/arm/mach-vexpress/v2m.c
+++ b/arch/arm/mach-vexpress/v2m.c
@@ -9,7 +9,6 @@
9#include <linux/clocksource.h> 9#include <linux/clocksource.h>
10#include <linux/smp.h> 10#include <linux/smp.h>
11#include <linux/init.h> 11#include <linux/init.h>
12#include <linux/irqchip.h>
13#include <linux/of_address.h> 12#include <linux/of_address.h>
14#include <linux/of_fdt.h> 13#include <linux/of_fdt.h>
15#include <linux/of_irq.h> 14#include <linux/of_irq.h>
@@ -456,9 +455,9 @@ static const char * const v2m_dt_match[] __initconst = {
456DT_MACHINE_START(VEXPRESS_DT, "ARM-Versatile Express") 455DT_MACHINE_START(VEXPRESS_DT, "ARM-Versatile Express")
457 .dt_compat = v2m_dt_match, 456 .dt_compat = v2m_dt_match,
458 .smp = smp_ops(vexpress_smp_ops), 457 .smp = smp_ops(vexpress_smp_ops),
458 .smp_init = smp_init_ops(vexpress_smp_init_ops),
459 .map_io = v2m_dt_map_io, 459 .map_io = v2m_dt_map_io,
460 .init_early = v2m_dt_init_early, 460 .init_early = v2m_dt_init_early,
461 .init_irq = irqchip_init,
462 .init_time = v2m_dt_timer_init, 461 .init_time = v2m_dt_timer_init,
463 .init_machine = v2m_dt_init, 462 .init_machine = v2m_dt_init,
464MACHINE_END 463MACHINE_END
diff --git a/arch/arm/mach-virt/Kconfig b/arch/arm/mach-virt/Kconfig
index 8958f0d896bc..081d46929436 100644
--- a/arch/arm/mach-virt/Kconfig
+++ b/arch/arm/mach-virt/Kconfig
@@ -2,7 +2,7 @@ config ARCH_VIRT
2 bool "Dummy Virtual Machine" if ARCH_MULTI_V7 2 bool "Dummy Virtual Machine" if ARCH_MULTI_V7
3 select ARCH_WANT_OPTIONAL_GPIOLIB 3 select ARCH_WANT_OPTIONAL_GPIOLIB
4 select ARM_GIC 4 select ARM_GIC
5 select ARM_ARCH_TIMER 5 select HAVE_ARM_ARCH_TIMER
6 select ARM_PSCI 6 select ARM_PSCI
7 select HAVE_SMP 7 select HAVE_SMP
8 select CPU_V7 8 select CPU_V7
diff --git a/arch/arm/mach-virt/Makefile b/arch/arm/mach-virt/Makefile
index 042afc1f8c44..7ddbfa60227f 100644
--- a/arch/arm/mach-virt/Makefile
+++ b/arch/arm/mach-virt/Makefile
@@ -3,4 +3,3 @@
3# 3#
4 4
5obj-y := virt.o 5obj-y := virt.o
6obj-$(CONFIG_SMP) += platsmp.o
diff --git a/arch/arm/mach-virt/platsmp.c b/arch/arm/mach-virt/platsmp.c
deleted file mode 100644
index f4143f5bfa5b..000000000000
--- a/arch/arm/mach-virt/platsmp.c
+++ /dev/null
@@ -1,50 +0,0 @@
1/*
2 * Dummy Virtual Machine - does what it says on the tin.
3 *
4 * Copyright (C) 2012 ARM Ltd
5 * Author: Will Deacon <will.deacon@arm.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 version 2 as
9 * published by the Free Software Foundation.
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, see <http://www.gnu.org/licenses/>.
18 */
19
20#include <linux/init.h>
21#include <linux/smp.h>
22#include <linux/of.h>
23
24#include <asm/psci.h>
25#include <asm/smp_plat.h>
26
27extern void secondary_startup(void);
28
29static void __init virt_smp_init_cpus(void)
30{
31}
32
33static void __init virt_smp_prepare_cpus(unsigned int max_cpus)
34{
35}
36
37static int __cpuinit virt_boot_secondary(unsigned int cpu,
38 struct task_struct *idle)
39{
40 if (psci_ops.cpu_on)
41 return psci_ops.cpu_on(cpu_logical_map(cpu),
42 __pa(secondary_startup));
43 return -ENODEV;
44}
45
46struct smp_operations __initdata virt_smp_ops = {
47 .smp_init_cpus = virt_smp_init_cpus,
48 .smp_prepare_cpus = virt_smp_prepare_cpus,
49 .smp_boot_secondary = virt_boot_secondary,
50};
diff --git a/arch/arm/mach-virt/virt.c b/arch/arm/mach-virt/virt.c
index 061f283f579e..b184e57d1854 100644
--- a/arch/arm/mach-virt/virt.c
+++ b/arch/arm/mach-virt/virt.c
@@ -18,7 +18,6 @@
18 * along with this program. If not, see <http://www.gnu.org/licenses/>. 18 * along with this program. If not, see <http://www.gnu.org/licenses/>.
19 */ 19 */
20 20
21#include <linux/irqchip.h>
22#include <linux/of_irq.h> 21#include <linux/of_irq.h>
23#include <linux/of_platform.h> 22#include <linux/of_platform.h>
24#include <linux/smp.h> 23#include <linux/smp.h>
@@ -36,11 +35,7 @@ static const char *virt_dt_match[] = {
36 NULL 35 NULL
37}; 36};
38 37
39extern struct smp_operations virt_smp_ops;
40
41DT_MACHINE_START(VIRT, "Dummy Virtual Machine") 38DT_MACHINE_START(VIRT, "Dummy Virtual Machine")
42 .init_irq = irqchip_init,
43 .init_machine = virt_init, 39 .init_machine = virt_init,
44 .smp = smp_ops(virt_smp_ops),
45 .dt_compat = virt_dt_match, 40 .dt_compat = virt_dt_match,
46MACHINE_END 41MACHINE_END
diff --git a/arch/arm/mach-vt8500/vt8500.c b/arch/arm/mach-vt8500/vt8500.c
index f5c33df7a597..eefaa60d6614 100644
--- a/arch/arm/mach-vt8500/vt8500.c
+++ b/arch/arm/mach-vt8500/vt8500.c
@@ -20,8 +20,8 @@
20 20
21#include <linux/clocksource.h> 21#include <linux/clocksource.h>
22#include <linux/io.h> 22#include <linux/io.h>
23#include <linux/irqchip.h>
24#include <linux/pm.h> 23#include <linux/pm.h>
24#include <linux/reboot.h>
25 25
26#include <asm/mach-types.h> 26#include <asm/mach-types.h>
27#include <asm/mach/arch.h> 27#include <asm/mach/arch.h>
@@ -47,7 +47,7 @@
47 47
48static void __iomem *pmc_base; 48static void __iomem *pmc_base;
49 49
50void vt8500_restart(char mode, const char *cmd) 50void vt8500_restart(enum reboot_mode mode, const char *cmd)
51{ 51{
52 if (pmc_base) 52 if (pmc_base)
53 writel(1, pmc_base + VT8500_PMSR_REG); 53 writel(1, pmc_base + VT8500_PMSR_REG);
@@ -179,7 +179,6 @@ static const char * const vt8500_dt_compat[] = {
179DT_MACHINE_START(WMT_DT, "VIA/Wondermedia SoC (Device Tree Support)") 179DT_MACHINE_START(WMT_DT, "VIA/Wondermedia SoC (Device Tree Support)")
180 .dt_compat = vt8500_dt_compat, 180 .dt_compat = vt8500_dt_compat,
181 .map_io = vt8500_map_io, 181 .map_io = vt8500_map_io,
182 .init_irq = irqchip_init,
183 .init_machine = vt8500_init, 182 .init_machine = vt8500_init,
184 .init_time = clocksource_of_init, 183 .init_time = clocksource_of_init,
185 .restart = vt8500_restart, 184 .restart = vt8500_restart,
diff --git a/arch/arm/mach-w90x900/cpu.c b/arch/arm/mach-w90x900/cpu.c
index 9e4dd8b63c4a..b1eabaad50a5 100644
--- a/arch/arm/mach-w90x900/cpu.c
+++ b/arch/arm/mach-w90x900/cpu.c
@@ -230,9 +230,9 @@ void __init nuc900_init_clocks(void)
230#define WTE (1 << 7) 230#define WTE (1 << 7)
231#define WTRE (1 << 1) 231#define WTRE (1 << 1)
232 232
233void nuc9xx_restart(char mode, const char *cmd) 233void nuc9xx_restart(enum reboot_mode mode, const char *cmd)
234{ 234{
235 if (mode == 's') { 235 if (mode == REBOOT_SOFT) {
236 /* Jump into ROM at address 0 */ 236 /* Jump into ROM at address 0 */
237 soft_restart(0); 237 soft_restart(0);
238 } else { 238 } else {
diff --git a/arch/arm/mach-w90x900/nuc9xx.h b/arch/arm/mach-w90x900/nuc9xx.h
index 88ef4b267089..e3ab1e1381f1 100644
--- a/arch/arm/mach-w90x900/nuc9xx.h
+++ b/arch/arm/mach-w90x900/nuc9xx.h
@@ -14,10 +14,13 @@
14 * published by the Free Software Foundation. 14 * published by the Free Software Foundation.
15 * 15 *
16 */ 16 */
17
18#include <linux/reboot.h>
19
17struct map_desc; 20struct map_desc;
18 21
19/* core initialisation functions */ 22/* core initialisation functions */
20 23
21extern void nuc900_init_irq(void); 24extern void nuc900_init_irq(void);
22extern void nuc900_timer_init(void); 25extern void nuc900_timer_init(void);
23extern void nuc9xx_restart(char, const char *); 26extern void nuc9xx_restart(enum reboot_mode, const char *);
diff --git a/arch/arm/mach-zynq/common.c b/arch/arm/mach-zynq/common.c
index 5bfe7035b73d..5f252569c689 100644
--- a/arch/arm/mach-zynq/common.c
+++ b/arch/arm/mach-zynq/common.c
@@ -25,7 +25,6 @@
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 <linux/of.h> 27#include <linux/of.h>
28#include <linux/irqchip.h>
29 28
30#include <asm/mach/arch.h> 29#include <asm/mach/arch.h>
31#include <asm/mach/map.h> 30#include <asm/mach/map.h>
@@ -92,21 +91,19 @@ static void __init zynq_map_io(void)
92 zynq_scu_map_io(); 91 zynq_scu_map_io();
93} 92}
94 93
95static void zynq_system_reset(char mode, const char *cmd) 94static void zynq_system_reset(enum reboot_mode mode, const char *cmd)
96{ 95{
97 zynq_slcr_system_reset(); 96 zynq_slcr_system_reset();
98} 97}
99 98
100static const char * const zynq_dt_match[] = { 99static const char * const zynq_dt_match[] = {
101 "xlnx,zynq-zc702",
102 "xlnx,zynq-7000", 100 "xlnx,zynq-7000",
103 NULL 101 NULL
104}; 102};
105 103
106MACHINE_START(XILINX_EP107, "Xilinx Zynq Platform") 104DT_MACHINE_START(XILINX_EP107, "Xilinx Zynq Platform")
107 .smp = smp_ops(zynq_smp_ops), 105 .smp = smp_ops(zynq_smp_ops),
108 .map_io = zynq_map_io, 106 .map_io = zynq_map_io,
109 .init_irq = irqchip_init,
110 .init_machine = zynq_init_machine, 107 .init_machine = zynq_init_machine,
111 .init_time = zynq_timer_init, 108 .init_time = zynq_timer_init,
112 .dt_compat = zynq_dt_match, 109 .dt_compat = zynq_dt_match,
diff --git a/arch/arm/mach-zynq/common.h b/arch/arm/mach-zynq/common.h
index fbbd0e21c404..3040d219570f 100644
--- a/arch/arm/mach-zynq/common.h
+++ b/arch/arm/mach-zynq/common.h
@@ -27,7 +27,7 @@ extern void secondary_startup(void);
27extern char zynq_secondary_trampoline; 27extern char zynq_secondary_trampoline;
28extern char zynq_secondary_trampoline_jump; 28extern char zynq_secondary_trampoline_jump;
29extern char zynq_secondary_trampoline_end; 29extern char zynq_secondary_trampoline_end;
30extern int __cpuinit zynq_cpun_start(u32 address, int cpu); 30extern int zynq_cpun_start(u32 address, int cpu);
31extern struct smp_operations zynq_smp_ops __initdata; 31extern struct smp_operations zynq_smp_ops __initdata;
32#endif 32#endif
33 33
diff --git a/arch/arm/mach-zynq/headsmp.S b/arch/arm/mach-zynq/headsmp.S
index d183cd234a9b..d4cd5f34fe5c 100644
--- a/arch/arm/mach-zynq/headsmp.S
+++ b/arch/arm/mach-zynq/headsmp.S
@@ -9,8 +9,6 @@
9#include <linux/linkage.h> 9#include <linux/linkage.h>
10#include <linux/init.h> 10#include <linux/init.h>
11 11
12 __CPUINIT
13
14ENTRY(zynq_secondary_trampoline) 12ENTRY(zynq_secondary_trampoline)
15 ldr r0, [pc] 13 ldr r0, [pc]
16 bx r0 14 bx r0
diff --git a/arch/arm/mach-zynq/platsmp.c b/arch/arm/mach-zynq/platsmp.c
index 5fc167e07619..689fbbc3d9c8 100644
--- a/arch/arm/mach-zynq/platsmp.c
+++ b/arch/arm/mach-zynq/platsmp.c
@@ -30,11 +30,11 @@
30/* 30/*
31 * Store number of cores in the system 31 * Store number of cores in the system
32 * Because of scu_get_core_count() must be in __init section and can't 32 * Because of scu_get_core_count() must be in __init section and can't
33 * be called from zynq_cpun_start() because it is in __cpuinit section. 33 * be called from zynq_cpun_start() because it is not in __init section.
34 */ 34 */
35static int ncores; 35static int ncores;
36 36
37int __cpuinit zynq_cpun_start(u32 address, int cpu) 37int zynq_cpun_start(u32 address, int cpu)
38{ 38{
39 u32 trampoline_code_size = &zynq_secondary_trampoline_end - 39 u32 trampoline_code_size = &zynq_secondary_trampoline_end -
40 &zynq_secondary_trampoline; 40 &zynq_secondary_trampoline;
@@ -53,34 +53,34 @@ int __cpuinit zynq_cpun_start(u32 address, int cpu)
53 &zynq_secondary_trampoline; 53 &zynq_secondary_trampoline;
54 54
55 zynq_slcr_cpu_stop(cpu); 55 zynq_slcr_cpu_stop(cpu);
56 56 if (address) {
57 if (__pa(PAGE_OFFSET)) { 57 if (__pa(PAGE_OFFSET)) {
58 zero = ioremap(0, trampoline_code_size); 58 zero = ioremap(0, trampoline_code_size);
59 if (!zero) { 59 if (!zero) {
60 pr_warn("BOOTUP jump vectors not accessible\n"); 60 pr_warn("BOOTUP jump vectors not accessible\n");
61 return -1; 61 return -1;
62 }
63 } else {
64 zero = (__force u8 __iomem *)PAGE_OFFSET;
62 } 65 }
63 } else {
64 zero = (__force u8 __iomem *)PAGE_OFFSET;
65 }
66
67 /*
68 * This is elegant way how to jump to any address
69 * 0x0: Load address at 0x8 to r0
70 * 0x4: Jump by mov instruction
71 * 0x8: Jumping address
72 */
73 memcpy((__force void *)zero, &zynq_secondary_trampoline,
74 trampoline_size);
75 writel(address, zero + trampoline_size);
76
77 flush_cache_all();
78 outer_flush_range(0, trampoline_code_size);
79 smp_wmb();
80
81 if (__pa(PAGE_OFFSET))
82 iounmap(zero);
83 66
67 /*
68 * This is elegant way how to jump to any address
69 * 0x0: Load address at 0x8 to r0
70 * 0x4: Jump by mov instruction
71 * 0x8: Jumping address
72 */
73 memcpy((__force void *)zero, &zynq_secondary_trampoline,
74 trampoline_size);
75 writel(address, zero + trampoline_size);
76
77 flush_cache_all();
78 outer_flush_range(0, trampoline_code_size);
79 smp_wmb();
80
81 if (__pa(PAGE_OFFSET))
82 iounmap(zero);
83 }
84 zynq_slcr_cpu_start(cpu); 84 zynq_slcr_cpu_start(cpu);
85 85
86 return 0; 86 return 0;
@@ -92,7 +92,7 @@ int __cpuinit zynq_cpun_start(u32 address, int cpu)
92} 92}
93EXPORT_SYMBOL(zynq_cpun_start); 93EXPORT_SYMBOL(zynq_cpun_start);
94 94
95static int __cpuinit zynq_boot_secondary(unsigned int cpu, 95static int zynq_boot_secondary(unsigned int cpu,
96 struct task_struct *idle) 96 struct task_struct *idle)
97{ 97{
98 return zynq_cpun_start(virt_to_phys(secondary_startup), cpu); 98 return zynq_cpun_start(virt_to_phys(secondary_startup), cpu);
diff --git a/arch/arm/mach-zynq/slcr.c b/arch/arm/mach-zynq/slcr.c
index c70969b9c258..50d008d8f87f 100644
--- a/arch/arm/mach-zynq/slcr.c
+++ b/arch/arm/mach-zynq/slcr.c
@@ -117,7 +117,7 @@ int __init zynq_slcr_init(void)
117 117
118 pr_info("%s mapped to %p\n", np->name, zynq_slcr_base); 118 pr_info("%s mapped to %p\n", np->name, zynq_slcr_base);
119 119
120 xilinx_zynq_clocks_init(zynq_slcr_base); 120 zynq_clock_init(zynq_slcr_base);
121 121
122 of_node_put(np); 122 of_node_put(np);
123 123
diff --git a/arch/arm/mm/Kconfig b/arch/arm/mm/Kconfig
index 35955b54944c..db5c2cab8fda 100644
--- a/arch/arm/mm/Kconfig
+++ b/arch/arm/mm/Kconfig
@@ -392,11 +392,21 @@ config CPU_V7
392 select CPU_CACHE_V7 392 select CPU_CACHE_V7
393 select CPU_CACHE_VIPT 393 select CPU_CACHE_VIPT
394 select CPU_COPY_V6 if MMU 394 select CPU_COPY_V6 if MMU
395 select CPU_CP15_MMU 395 select CPU_CP15_MMU if MMU
396 select CPU_CP15_MPU if !MMU
396 select CPU_HAS_ASID if MMU 397 select CPU_HAS_ASID if MMU
397 select CPU_PABRT_V7 398 select CPU_PABRT_V7
398 select CPU_TLB_V7 if MMU 399 select CPU_TLB_V7 if MMU
399 400
401# ARMv7M
402config CPU_V7M
403 bool
404 select CPU_32v7M
405 select CPU_ABRT_NOMMU
406 select CPU_CACHE_NOP
407 select CPU_PABRT_LEGACY
408 select CPU_THUMBONLY
409
400config CPU_THUMBONLY 410config CPU_THUMBONLY
401 bool 411 bool
402 # There are no CPUs available with MMU that don't implement an ARM ISA: 412 # There are no CPUs available with MMU that don't implement an ARM ISA:
@@ -411,24 +421,28 @@ config CPU_32v3
411 select CPU_USE_DOMAINS if MMU 421 select CPU_USE_DOMAINS if MMU
412 select NEEDS_SYSCALL_FOR_CMPXCHG if SMP 422 select NEEDS_SYSCALL_FOR_CMPXCHG if SMP
413 select TLS_REG_EMUL if SMP || !MMU 423 select TLS_REG_EMUL if SMP || !MMU
424 select NEED_KUSER_HELPERS
414 425
415config CPU_32v4 426config CPU_32v4
416 bool 427 bool
417 select CPU_USE_DOMAINS if MMU 428 select CPU_USE_DOMAINS if MMU
418 select NEEDS_SYSCALL_FOR_CMPXCHG if SMP 429 select NEEDS_SYSCALL_FOR_CMPXCHG if SMP
419 select TLS_REG_EMUL if SMP || !MMU 430 select TLS_REG_EMUL if SMP || !MMU
431 select NEED_KUSER_HELPERS
420 432
421config CPU_32v4T 433config CPU_32v4T
422 bool 434 bool
423 select CPU_USE_DOMAINS if MMU 435 select CPU_USE_DOMAINS if MMU
424 select NEEDS_SYSCALL_FOR_CMPXCHG if SMP 436 select NEEDS_SYSCALL_FOR_CMPXCHG if SMP
425 select TLS_REG_EMUL if SMP || !MMU 437 select TLS_REG_EMUL if SMP || !MMU
438 select NEED_KUSER_HELPERS
426 439
427config CPU_32v5 440config CPU_32v5
428 bool 441 bool
429 select CPU_USE_DOMAINS if MMU 442 select CPU_USE_DOMAINS if MMU
430 select NEEDS_SYSCALL_FOR_CMPXCHG if SMP 443 select NEEDS_SYSCALL_FOR_CMPXCHG if SMP
431 select TLS_REG_EMUL if SMP || !MMU 444 select TLS_REG_EMUL if SMP || !MMU
445 select NEED_KUSER_HELPERS
432 446
433config CPU_32v6 447config CPU_32v6
434 bool 448 bool
@@ -441,6 +455,9 @@ config CPU_32v6K
441config CPU_32v7 455config CPU_32v7
442 bool 456 bool
443 457
458config CPU_32v7M
459 bool
460
444# The abort model 461# The abort model
445config CPU_ABRT_NOMMU 462config CPU_ABRT_NOMMU
446 bool 463 bool
@@ -491,6 +508,9 @@ config CPU_CACHE_V6
491config CPU_CACHE_V7 508config CPU_CACHE_V7
492 bool 509 bool
493 510
511config CPU_CACHE_NOP
512 bool
513
494config CPU_CACHE_VIVT 514config CPU_CACHE_VIVT
495 bool 515 bool
496 516
@@ -613,7 +633,11 @@ config ARCH_DMA_ADDR_T_64BIT
613 633
614config ARM_THUMB 634config ARM_THUMB
615 bool "Support Thumb user binaries" if !CPU_THUMBONLY 635 bool "Support Thumb user binaries" if !CPU_THUMBONLY
616 depends on CPU_ARM720T || CPU_ARM740T || CPU_ARM920T || CPU_ARM922T || CPU_ARM925T || CPU_ARM926T || CPU_ARM940T || CPU_ARM946E || CPU_ARM1020 || CPU_ARM1020E || CPU_ARM1022 || CPU_ARM1026 || CPU_XSCALE || CPU_XSC3 || CPU_MOHAWK || CPU_V6 || CPU_V6K || CPU_V7 || CPU_FEROCEON 636 depends on CPU_ARM720T || CPU_ARM740T || CPU_ARM920T || CPU_ARM922T || \
637 CPU_ARM925T || CPU_ARM926T || CPU_ARM940T || CPU_ARM946E || \
638 CPU_ARM1020 || CPU_ARM1020E || CPU_ARM1022 || CPU_ARM1026 || \
639 CPU_XSCALE || CPU_XSC3 || CPU_MOHAWK || CPU_V6 || CPU_V6K || \
640 CPU_V7 || CPU_FEROCEON || CPU_V7M
617 default y 641 default y
618 help 642 help
619 Say Y if you want to include kernel support for running user space 643 Say Y if you want to include kernel support for running user space
@@ -756,6 +780,7 @@ config CPU_BPREDICT_DISABLE
756 780
757config TLS_REG_EMUL 781config TLS_REG_EMUL
758 bool 782 bool
783 select NEED_KUSER_HELPERS
759 help 784 help
760 An SMP system using a pre-ARMv6 processor (there are apparently 785 An SMP system using a pre-ARMv6 processor (there are apparently
761 a few prototypes like that in existence) and therefore access to 786 a few prototypes like that in existence) and therefore access to
@@ -763,11 +788,40 @@ config TLS_REG_EMUL
763 788
764config NEEDS_SYSCALL_FOR_CMPXCHG 789config NEEDS_SYSCALL_FOR_CMPXCHG
765 bool 790 bool
791 select NEED_KUSER_HELPERS
766 help 792 help
767 SMP on a pre-ARMv6 processor? Well OK then. 793 SMP on a pre-ARMv6 processor? Well OK then.
768 Forget about fast user space cmpxchg support. 794 Forget about fast user space cmpxchg support.
769 It is just not possible. 795 It is just not possible.
770 796
797config NEED_KUSER_HELPERS
798 bool
799
800config KUSER_HELPERS
801 bool "Enable kuser helpers in vector page" if !NEED_KUSER_HELPERS
802 default y
803 help
804 Warning: disabling this option may break user programs.
805
806 Provide kuser helpers in the vector page. The kernel provides
807 helper code to userspace in read only form at a fixed location
808 in the high vector page to allow userspace to be independent of
809 the CPU type fitted to the system. This permits binaries to be
810 run on ARMv4 through to ARMv7 without modification.
811
812 However, the fixed address nature of these helpers can be used
813 by ROP (return orientated programming) authors when creating
814 exploits.
815
816 If all of the binaries and libraries which run on your platform
817 are built specifically for your platform, and make no use of
818 these helpers, then you can turn this option off. However,
819 when such an binary or library is run, it will receive a SIGILL
820 signal, which will terminate the program.
821
822 Say N here only if you are absolutely certain that you do not
823 need these helpers; otherwise, the safe option is to say Y.
824
771config DMA_CACHE_RWFO 825config DMA_CACHE_RWFO
772 bool "Enable read/write for ownership DMA cache maintenance" 826 bool "Enable read/write for ownership DMA cache maintenance"
773 depends on CPU_V6K && SMP 827 depends on CPU_V6K && SMP
diff --git a/arch/arm/mm/Makefile b/arch/arm/mm/Makefile
index 9e51be96f635..ecfe6e53f6e0 100644
--- a/arch/arm/mm/Makefile
+++ b/arch/arm/mm/Makefile
@@ -16,6 +16,7 @@ obj-$(CONFIG_MODULES) += proc-syms.o
16 16
17obj-$(CONFIG_ALIGNMENT_TRAP) += alignment.o 17obj-$(CONFIG_ALIGNMENT_TRAP) += alignment.o
18obj-$(CONFIG_HIGHMEM) += highmem.o 18obj-$(CONFIG_HIGHMEM) += highmem.o
19obj-$(CONFIG_HUGETLB_PAGE) += hugetlbpage.o
19 20
20obj-$(CONFIG_CPU_ABRT_NOMMU) += abort-nommu.o 21obj-$(CONFIG_CPU_ABRT_NOMMU) += abort-nommu.o
21obj-$(CONFIG_CPU_ABRT_EV4) += abort-ev4.o 22obj-$(CONFIG_CPU_ABRT_EV4) += abort-ev4.o
@@ -39,6 +40,7 @@ obj-$(CONFIG_CPU_CACHE_V4WB) += cache-v4wb.o
39obj-$(CONFIG_CPU_CACHE_V6) += cache-v6.o 40obj-$(CONFIG_CPU_CACHE_V6) += cache-v6.o
40obj-$(CONFIG_CPU_CACHE_V7) += cache-v7.o 41obj-$(CONFIG_CPU_CACHE_V7) += cache-v7.o
41obj-$(CONFIG_CPU_CACHE_FA) += cache-fa.o 42obj-$(CONFIG_CPU_CACHE_FA) += cache-fa.o
43obj-$(CONFIG_CPU_CACHE_NOP) += cache-nop.o
42 44
43AFLAGS_cache-v6.o :=-Wa,-march=armv6 45AFLAGS_cache-v6.o :=-Wa,-march=armv6
44AFLAGS_cache-v7.o :=-Wa,-march=armv7-a 46AFLAGS_cache-v7.o :=-Wa,-march=armv7-a
@@ -87,6 +89,7 @@ obj-$(CONFIG_CPU_FEROCEON) += proc-feroceon.o
87obj-$(CONFIG_CPU_V6) += proc-v6.o 89obj-$(CONFIG_CPU_V6) += proc-v6.o
88obj-$(CONFIG_CPU_V6K) += proc-v6.o 90obj-$(CONFIG_CPU_V6K) += proc-v6.o
89obj-$(CONFIG_CPU_V7) += proc-v7.o 91obj-$(CONFIG_CPU_V7) += proc-v7.o
92obj-$(CONFIG_CPU_V7M) += proc-v7m.o
90 93
91AFLAGS_proc-v6.o :=-Wa,-march=armv6 94AFLAGS_proc-v6.o :=-Wa,-march=armv6
92AFLAGS_proc-v7.o :=-Wa,-march=armv7-a 95AFLAGS_proc-v7.o :=-Wa,-march=armv7-a
diff --git a/arch/arm/mm/cache-l2x0.c b/arch/arm/mm/cache-l2x0.c
index c465faca51b0..d70e0aba0c9d 100644
--- a/arch/arm/mm/cache-l2x0.c
+++ b/arch/arm/mm/cache-l2x0.c
@@ -523,6 +523,147 @@ static void aurora_flush_range(unsigned long start, unsigned long end)
523 } 523 }
524} 524}
525 525
526/*
527 * For certain Broadcom SoCs, depending on the address range, different offsets
528 * need to be added to the address before passing it to L2 for
529 * invalidation/clean/flush
530 *
531 * Section Address Range Offset EMI
532 * 1 0x00000000 - 0x3FFFFFFF 0x80000000 VC
533 * 2 0x40000000 - 0xBFFFFFFF 0x40000000 SYS
534 * 3 0xC0000000 - 0xFFFFFFFF 0x80000000 VC
535 *
536 * When the start and end addresses have crossed two different sections, we
537 * need to break the L2 operation into two, each within its own section.
538 * For example, if we need to invalidate addresses starts at 0xBFFF0000 and
539 * ends at 0xC0001000, we need do invalidate 1) 0xBFFF0000 - 0xBFFFFFFF and 2)
540 * 0xC0000000 - 0xC0001000
541 *
542 * Note 1:
543 * By breaking a single L2 operation into two, we may potentially suffer some
544 * performance hit, but keep in mind the cross section case is very rare
545 *
546 * Note 2:
547 * We do not need to handle the case when the start address is in
548 * Section 1 and the end address is in Section 3, since it is not a valid use
549 * case
550 *
551 * Note 3:
552 * Section 1 in practical terms can no longer be used on rev A2. Because of
553 * that the code does not need to handle section 1 at all.
554 *
555 */
556#define BCM_SYS_EMI_START_ADDR 0x40000000UL
557#define BCM_VC_EMI_SEC3_START_ADDR 0xC0000000UL
558
559#define BCM_SYS_EMI_OFFSET 0x40000000UL
560#define BCM_VC_EMI_OFFSET 0x80000000UL
561
562static inline int bcm_addr_is_sys_emi(unsigned long addr)
563{
564 return (addr >= BCM_SYS_EMI_START_ADDR) &&
565 (addr < BCM_VC_EMI_SEC3_START_ADDR);
566}
567
568static inline unsigned long bcm_l2_phys_addr(unsigned long addr)
569{
570 if (bcm_addr_is_sys_emi(addr))
571 return addr + BCM_SYS_EMI_OFFSET;
572 else
573 return addr + BCM_VC_EMI_OFFSET;
574}
575
576static void bcm_inv_range(unsigned long start, unsigned long end)
577{
578 unsigned long new_start, new_end;
579
580 BUG_ON(start < BCM_SYS_EMI_START_ADDR);
581
582 if (unlikely(end <= start))
583 return;
584
585 new_start = bcm_l2_phys_addr(start);
586 new_end = bcm_l2_phys_addr(end);
587
588 /* normal case, no cross section between start and end */
589 if (likely(bcm_addr_is_sys_emi(end) || !bcm_addr_is_sys_emi(start))) {
590 l2x0_inv_range(new_start, new_end);
591 return;
592 }
593
594 /* They cross sections, so it can only be a cross from section
595 * 2 to section 3
596 */
597 l2x0_inv_range(new_start,
598 bcm_l2_phys_addr(BCM_VC_EMI_SEC3_START_ADDR-1));
599 l2x0_inv_range(bcm_l2_phys_addr(BCM_VC_EMI_SEC3_START_ADDR),
600 new_end);
601}
602
603static void bcm_clean_range(unsigned long start, unsigned long end)
604{
605 unsigned long new_start, new_end;
606
607 BUG_ON(start < BCM_SYS_EMI_START_ADDR);
608
609 if (unlikely(end <= start))
610 return;
611
612 if ((end - start) >= l2x0_size) {
613 l2x0_clean_all();
614 return;
615 }
616
617 new_start = bcm_l2_phys_addr(start);
618 new_end = bcm_l2_phys_addr(end);
619
620 /* normal case, no cross section between start and end */
621 if (likely(bcm_addr_is_sys_emi(end) || !bcm_addr_is_sys_emi(start))) {
622 l2x0_clean_range(new_start, new_end);
623 return;
624 }
625
626 /* They cross sections, so it can only be a cross from section
627 * 2 to section 3
628 */
629 l2x0_clean_range(new_start,
630 bcm_l2_phys_addr(BCM_VC_EMI_SEC3_START_ADDR-1));
631 l2x0_clean_range(bcm_l2_phys_addr(BCM_VC_EMI_SEC3_START_ADDR),
632 new_end);
633}
634
635static void bcm_flush_range(unsigned long start, unsigned long end)
636{
637 unsigned long new_start, new_end;
638
639 BUG_ON(start < BCM_SYS_EMI_START_ADDR);
640
641 if (unlikely(end <= start))
642 return;
643
644 if ((end - start) >= l2x0_size) {
645 l2x0_flush_all();
646 return;
647 }
648
649 new_start = bcm_l2_phys_addr(start);
650 new_end = bcm_l2_phys_addr(end);
651
652 /* normal case, no cross section between start and end */
653 if (likely(bcm_addr_is_sys_emi(end) || !bcm_addr_is_sys_emi(start))) {
654 l2x0_flush_range(new_start, new_end);
655 return;
656 }
657
658 /* They cross sections, so it can only be a cross from section
659 * 2 to section 3
660 */
661 l2x0_flush_range(new_start,
662 bcm_l2_phys_addr(BCM_VC_EMI_SEC3_START_ADDR-1));
663 l2x0_flush_range(bcm_l2_phys_addr(BCM_VC_EMI_SEC3_START_ADDR),
664 new_end);
665}
666
526static void __init l2x0_of_setup(const struct device_node *np, 667static void __init l2x0_of_setup(const struct device_node *np,
527 u32 *aux_val, u32 *aux_mask) 668 u32 *aux_val, u32 *aux_mask)
528{ 669{
@@ -765,6 +906,21 @@ static const struct l2x0_of_data aurora_no_outer_data = {
765 }, 906 },
766}; 907};
767 908
909static const struct l2x0_of_data bcm_l2x0_data = {
910 .setup = pl310_of_setup,
911 .save = pl310_save,
912 .outer_cache = {
913 .resume = pl310_resume,
914 .inv_range = bcm_inv_range,
915 .clean_range = bcm_clean_range,
916 .flush_range = bcm_flush_range,
917 .sync = l2x0_cache_sync,
918 .flush_all = l2x0_flush_all,
919 .inv_all = l2x0_inv_all,
920 .disable = l2x0_disable,
921 },
922};
923
768static const struct of_device_id l2x0_ids[] __initconst = { 924static const struct of_device_id l2x0_ids[] __initconst = {
769 { .compatible = "arm,pl310-cache", .data = (void *)&pl310_data }, 925 { .compatible = "arm,pl310-cache", .data = (void *)&pl310_data },
770 { .compatible = "arm,l220-cache", .data = (void *)&l2x0_data }, 926 { .compatible = "arm,l220-cache", .data = (void *)&l2x0_data },
@@ -773,6 +929,8 @@ static const struct of_device_id l2x0_ids[] __initconst = {
773 .data = (void *)&aurora_no_outer_data}, 929 .data = (void *)&aurora_no_outer_data},
774 { .compatible = "marvell,aurora-outer-cache", 930 { .compatible = "marvell,aurora-outer-cache",
775 .data = (void *)&aurora_with_outer_data}, 931 .data = (void *)&aurora_with_outer_data},
932 { .compatible = "bcm,bcm11351-a2-pl310-cache",
933 .data = (void *)&bcm_l2x0_data},
776 {} 934 {}
777}; 935};
778 936
diff --git a/arch/arm/mm/cache-nop.S b/arch/arm/mm/cache-nop.S
new file mode 100644
index 000000000000..8e12ddca0031
--- /dev/null
+++ b/arch/arm/mm/cache-nop.S
@@ -0,0 +1,50 @@
1/*
2 * This program is free software; you can redistribute it and/or modify
3 * it under the terms of the GNU General Public License version 2 as
4 * published by the Free Software Foundation.
5 */
6#include <linux/linkage.h>
7#include <linux/init.h>
8
9#include "proc-macros.S"
10
11ENTRY(nop_flush_icache_all)
12 mov pc, lr
13ENDPROC(nop_flush_icache_all)
14
15 .globl nop_flush_kern_cache_all
16 .equ nop_flush_kern_cache_all, nop_flush_icache_all
17
18 .globl nop_flush_kern_cache_louis
19 .equ nop_flush_kern_cache_louis, nop_flush_icache_all
20
21 .globl nop_flush_user_cache_all
22 .equ nop_flush_user_cache_all, nop_flush_icache_all
23
24 .globl nop_flush_user_cache_range
25 .equ nop_flush_user_cache_range, nop_flush_icache_all
26
27 .globl nop_coherent_kern_range
28 .equ nop_coherent_kern_range, nop_flush_icache_all
29
30ENTRY(nop_coherent_user_range)
31 mov r0, 0
32 mov pc, lr
33ENDPROC(nop_coherent_user_range)
34
35 .globl nop_flush_kern_dcache_area
36 .equ nop_flush_kern_dcache_area, nop_flush_icache_all
37
38 .globl nop_dma_flush_range
39 .equ nop_dma_flush_range, nop_flush_icache_all
40
41 .globl nop_dma_map_area
42 .equ nop_dma_map_area, nop_flush_icache_all
43
44 .globl nop_dma_unmap_area
45 .equ nop_dma_unmap_area, nop_flush_icache_all
46
47 __INITDATA
48
49 @ define struct cpu_cache_fns (see <asm/cacheflush.h> and proc-macros.S)
50 define_cache_functions nop
diff --git a/arch/arm/mm/context.c b/arch/arm/mm/context.c
index 2ac37372ef52..4a0544492f10 100644
--- a/arch/arm/mm/context.c
+++ b/arch/arm/mm/context.c
@@ -20,6 +20,7 @@
20#include <asm/smp_plat.h> 20#include <asm/smp_plat.h>
21#include <asm/thread_notify.h> 21#include <asm/thread_notify.h>
22#include <asm/tlbflush.h> 22#include <asm/tlbflush.h>
23#include <asm/proc-fns.h>
23 24
24/* 25/*
25 * On ARMv6, we have the following structure in the Context ID: 26 * On ARMv6, we have the following structure in the Context ID:
@@ -39,33 +40,51 @@
39 * non 64-bit operations. 40 * non 64-bit operations.
40 */ 41 */
41#define ASID_FIRST_VERSION (1ULL << ASID_BITS) 42#define ASID_FIRST_VERSION (1ULL << ASID_BITS)
42#define NUM_USER_ASIDS (ASID_FIRST_VERSION - 1) 43#define NUM_USER_ASIDS ASID_FIRST_VERSION
43
44#define ASID_TO_IDX(asid) ((asid & ~ASID_MASK) - 1)
45#define IDX_TO_ASID(idx) ((idx + 1) & ~ASID_MASK)
46 44
47static DEFINE_RAW_SPINLOCK(cpu_asid_lock); 45static DEFINE_RAW_SPINLOCK(cpu_asid_lock);
48static atomic64_t asid_generation = ATOMIC64_INIT(ASID_FIRST_VERSION); 46static atomic64_t asid_generation = ATOMIC64_INIT(ASID_FIRST_VERSION);
49static DECLARE_BITMAP(asid_map, NUM_USER_ASIDS); 47static DECLARE_BITMAP(asid_map, NUM_USER_ASIDS);
50 48
51DEFINE_PER_CPU(atomic64_t, active_asids); 49static DEFINE_PER_CPU(atomic64_t, active_asids);
52static DEFINE_PER_CPU(u64, reserved_asids); 50static DEFINE_PER_CPU(u64, reserved_asids);
53static cpumask_t tlb_flush_pending; 51static cpumask_t tlb_flush_pending;
54 52
53#ifdef CONFIG_ARM_ERRATA_798181
54void a15_erratum_get_cpumask(int this_cpu, struct mm_struct *mm,
55 cpumask_t *mask)
56{
57 int cpu;
58 unsigned long flags;
59 u64 context_id, asid;
60
61 raw_spin_lock_irqsave(&cpu_asid_lock, flags);
62 context_id = mm->context.id.counter;
63 for_each_online_cpu(cpu) {
64 if (cpu == this_cpu)
65 continue;
66 /*
67 * We only need to send an IPI if the other CPUs are
68 * running the same ASID as the one being invalidated.
69 */
70 asid = per_cpu(active_asids, cpu).counter;
71 if (asid == 0)
72 asid = per_cpu(reserved_asids, cpu);
73 if (context_id == asid)
74 cpumask_set_cpu(cpu, mask);
75 }
76 raw_spin_unlock_irqrestore(&cpu_asid_lock, flags);
77}
78#endif
79
55#ifdef CONFIG_ARM_LPAE 80#ifdef CONFIG_ARM_LPAE
56static void cpu_set_reserved_ttbr0(void) 81static void cpu_set_reserved_ttbr0(void)
57{ 82{
58 unsigned long ttbl = __pa(swapper_pg_dir);
59 unsigned long ttbh = 0;
60
61 /* 83 /*
62 * Set TTBR0 to swapper_pg_dir which contains only global entries. The 84 * Set TTBR0 to swapper_pg_dir which contains only global entries. The
63 * ASID is set to 0. 85 * ASID is set to 0.
64 */ 86 */
65 asm volatile( 87 cpu_set_ttbr(0, __pa(swapper_pg_dir));
66 " mcrr p15, 0, %0, %1, c2 @ set TTBR0\n"
67 :
68 : "r" (ttbl), "r" (ttbh));
69 isb(); 88 isb();
70} 89}
71#else 90#else
@@ -128,7 +147,16 @@ static void flush_context(unsigned int cpu)
128 asid = 0; 147 asid = 0;
129 } else { 148 } else {
130 asid = atomic64_xchg(&per_cpu(active_asids, i), 0); 149 asid = atomic64_xchg(&per_cpu(active_asids, i), 0);
131 __set_bit(ASID_TO_IDX(asid), asid_map); 150 /*
151 * If this CPU has already been through a
152 * rollover, but hasn't run another task in
153 * the meantime, we must preserve its reserved
154 * ASID, as this is the only trace we have of
155 * the process it is still running.
156 */
157 if (asid == 0)
158 asid = per_cpu(reserved_asids, i);
159 __set_bit(asid & ~ASID_MASK, asid_map);
132 } 160 }
133 per_cpu(reserved_asids, i) = asid; 161 per_cpu(reserved_asids, i) = asid;
134 } 162 }
@@ -167,17 +195,19 @@ static u64 new_context(struct mm_struct *mm, unsigned int cpu)
167 /* 195 /*
168 * Allocate a free ASID. If we can't find one, take a 196 * Allocate a free ASID. If we can't find one, take a
169 * note of the currently active ASIDs and mark the TLBs 197 * note of the currently active ASIDs and mark the TLBs
170 * as requiring flushes. 198 * as requiring flushes. We always count from ASID #1,
199 * as we reserve ASID #0 to switch via TTBR0 and indicate
200 * rollover events.
171 */ 201 */
172 asid = find_first_zero_bit(asid_map, NUM_USER_ASIDS); 202 asid = find_next_zero_bit(asid_map, NUM_USER_ASIDS, 1);
173 if (asid == NUM_USER_ASIDS) { 203 if (asid == NUM_USER_ASIDS) {
174 generation = atomic64_add_return(ASID_FIRST_VERSION, 204 generation = atomic64_add_return(ASID_FIRST_VERSION,
175 &asid_generation); 205 &asid_generation);
176 flush_context(cpu); 206 flush_context(cpu);
177 asid = find_first_zero_bit(asid_map, NUM_USER_ASIDS); 207 asid = find_next_zero_bit(asid_map, NUM_USER_ASIDS, 1);
178 } 208 }
179 __set_bit(asid, asid_map); 209 __set_bit(asid, asid_map);
180 asid = generation | IDX_TO_ASID(asid); 210 asid |= generation;
181 cpumask_clear(mm_cpumask(mm)); 211 cpumask_clear(mm_cpumask(mm));
182 } 212 }
183 213
@@ -215,7 +245,8 @@ void check_and_switch_context(struct mm_struct *mm, struct task_struct *tsk)
215 if (cpumask_test_and_clear_cpu(cpu, &tlb_flush_pending)) { 245 if (cpumask_test_and_clear_cpu(cpu, &tlb_flush_pending)) {
216 local_flush_bp_all(); 246 local_flush_bp_all();
217 local_flush_tlb_all(); 247 local_flush_tlb_all();
218 dummy_flush_tlb_a15_erratum(); 248 if (erratum_a15_798181())
249 dummy_flush_tlb_a15_erratum();
219 } 250 }
220 251
221 atomic64_set(&per_cpu(active_asids, cpu), asid); 252 atomic64_set(&per_cpu(active_asids, cpu), asid);
diff --git a/arch/arm/mm/dma-mapping.c b/arch/arm/mm/dma-mapping.c
index ef3e0f3aac96..7f9b1798c6cf 100644
--- a/arch/arm/mm/dma-mapping.c
+++ b/arch/arm/mm/dma-mapping.c
@@ -250,7 +250,7 @@ static void __dma_free_buffer(struct page *page, size_t size)
250 250
251#ifdef CONFIG_MMU 251#ifdef CONFIG_MMU
252#ifdef CONFIG_HUGETLB_PAGE 252#ifdef CONFIG_HUGETLB_PAGE
253#error ARM Coherent DMA allocator does not (yet) support huge TLB 253#warning ARM Coherent DMA allocator does not (yet) support huge TLB
254#endif 254#endif
255 255
256static void *__alloc_from_contiguous(struct device *dev, size_t size, 256static void *__alloc_from_contiguous(struct device *dev, size_t size,
@@ -880,10 +880,24 @@ static void __dma_page_dev_to_cpu(struct page *page, unsigned long off,
880 dma_cache_maint_page(page, off, size, dir, dmac_unmap_area); 880 dma_cache_maint_page(page, off, size, dir, dmac_unmap_area);
881 881
882 /* 882 /*
883 * Mark the D-cache clean for this page to avoid extra flushing. 883 * Mark the D-cache clean for these pages to avoid extra flushing.
884 */ 884 */
885 if (dir != DMA_TO_DEVICE && off == 0 && size >= PAGE_SIZE) 885 if (dir != DMA_TO_DEVICE && size >= PAGE_SIZE) {
886 set_bit(PG_dcache_clean, &page->flags); 886 unsigned long pfn;
887 size_t left = size;
888
889 pfn = page_to_pfn(page) + off / PAGE_SIZE;
890 off %= PAGE_SIZE;
891 if (off) {
892 pfn++;
893 left -= PAGE_SIZE - off;
894 }
895 while (left >= PAGE_SIZE) {
896 page = pfn_to_page(pfn++);
897 set_bit(PG_dcache_clean, &page->flags);
898 left -= PAGE_SIZE;
899 }
900 }
887} 901}
888 902
889/** 903/**
@@ -1314,6 +1328,15 @@ static void *arm_iommu_alloc_attrs(struct device *dev, size_t size,
1314 if (gfp & GFP_ATOMIC) 1328 if (gfp & GFP_ATOMIC)
1315 return __iommu_alloc_atomic(dev, size, handle); 1329 return __iommu_alloc_atomic(dev, size, handle);
1316 1330
1331 /*
1332 * Following is a work-around (a.k.a. hack) to prevent pages
1333 * with __GFP_COMP being passed to split_page() which cannot
1334 * handle them. The real problem is that this flag probably
1335 * should be 0 on ARM as it is not supported on this
1336 * platform; see CONFIG_HUGETLBFS.
1337 */
1338 gfp &= ~(__GFP_COMP);
1339
1317 pages = __iommu_alloc_buffer(dev, size, gfp, attrs); 1340 pages = __iommu_alloc_buffer(dev, size, gfp, attrs);
1318 if (!pages) 1341 if (!pages)
1319 return NULL; 1342 return NULL;
@@ -1372,16 +1395,17 @@ static int arm_iommu_mmap_attrs(struct device *dev, struct vm_area_struct *vma,
1372void arm_iommu_free_attrs(struct device *dev, size_t size, void *cpu_addr, 1395void arm_iommu_free_attrs(struct device *dev, size_t size, void *cpu_addr,
1373 dma_addr_t handle, struct dma_attrs *attrs) 1396 dma_addr_t handle, struct dma_attrs *attrs)
1374{ 1397{
1375 struct page **pages = __iommu_get_pages(cpu_addr, attrs); 1398 struct page **pages;
1376 size = PAGE_ALIGN(size); 1399 size = PAGE_ALIGN(size);
1377 1400
1378 if (!pages) { 1401 if (__in_atomic_pool(cpu_addr, size)) {
1379 WARN(1, "trying to free invalid coherent area: %p\n", cpu_addr); 1402 __iommu_free_atomic(dev, cpu_addr, handle, size);
1380 return; 1403 return;
1381 } 1404 }
1382 1405
1383 if (__in_atomic_pool(cpu_addr, size)) { 1406 pages = __iommu_get_pages(cpu_addr, attrs);
1384 __iommu_free_atomic(dev, cpu_addr, handle, size); 1407 if (!pages) {
1408 WARN(1, "trying to free invalid coherent area: %p\n", cpu_addr);
1385 return; 1409 return;
1386 } 1410 }
1387 1411
@@ -1636,13 +1660,27 @@ static dma_addr_t arm_coherent_iommu_map_page(struct device *dev, struct page *p
1636{ 1660{
1637 struct dma_iommu_mapping *mapping = dev->archdata.mapping; 1661 struct dma_iommu_mapping *mapping = dev->archdata.mapping;
1638 dma_addr_t dma_addr; 1662 dma_addr_t dma_addr;
1639 int ret, len = PAGE_ALIGN(size + offset); 1663 int ret, prot, len = PAGE_ALIGN(size + offset);
1640 1664
1641 dma_addr = __alloc_iova(mapping, len); 1665 dma_addr = __alloc_iova(mapping, len);
1642 if (dma_addr == DMA_ERROR_CODE) 1666 if (dma_addr == DMA_ERROR_CODE)
1643 return dma_addr; 1667 return dma_addr;
1644 1668
1645 ret = iommu_map(mapping->domain, dma_addr, page_to_phys(page), len, 0); 1669 switch (dir) {
1670 case DMA_BIDIRECTIONAL:
1671 prot = IOMMU_READ | IOMMU_WRITE;
1672 break;
1673 case DMA_TO_DEVICE:
1674 prot = IOMMU_READ;
1675 break;
1676 case DMA_FROM_DEVICE:
1677 prot = IOMMU_WRITE;
1678 break;
1679 default:
1680 prot = 0;
1681 }
1682
1683 ret = iommu_map(mapping->domain, dma_addr, page_to_phys(page), len, prot);
1646 if (ret < 0) 1684 if (ret < 0)
1647 goto fail; 1685 goto fail;
1648 1686
@@ -1907,7 +1945,7 @@ void arm_iommu_detach_device(struct device *dev)
1907 1945
1908 iommu_detach_device(mapping->domain, dev); 1946 iommu_detach_device(mapping->domain, dev);
1909 kref_put(&mapping->kref, release_iommu_mapping); 1947 kref_put(&mapping->kref, release_iommu_mapping);
1910 mapping = NULL; 1948 dev->archdata.mapping = NULL;
1911 set_dma_ops(dev, NULL); 1949 set_dma_ops(dev, NULL);
1912 1950
1913 pr_debug("Detached IOMMU controller from %s device.\n", dev_name(dev)); 1951 pr_debug("Detached IOMMU controller from %s device.\n", dev_name(dev));
diff --git a/arch/arm/mm/fault.c b/arch/arm/mm/fault.c
index 5dbf13f954f6..c97f7940cb95 100644
--- a/arch/arm/mm/fault.c
+++ b/arch/arm/mm/fault.c
@@ -491,12 +491,14 @@ do_translation_fault(unsigned long addr, unsigned int fsr,
491 * Some section permission faults need to be handled gracefully. 491 * Some section permission faults need to be handled gracefully.
492 * They can happen due to a __{get,put}_user during an oops. 492 * They can happen due to a __{get,put}_user during an oops.
493 */ 493 */
494#ifndef CONFIG_ARM_LPAE
494static int 495static int
495do_sect_fault(unsigned long addr, unsigned int fsr, struct pt_regs *regs) 496do_sect_fault(unsigned long addr, unsigned int fsr, struct pt_regs *regs)
496{ 497{
497 do_bad_area(addr, fsr, regs); 498 do_bad_area(addr, fsr, regs);
498 return 0; 499 return 0;
499} 500}
501#endif /* CONFIG_ARM_LPAE */
500 502
501/* 503/*
502 * This abort handler always returns "fault". 504 * This abort handler always returns "fault".
diff --git a/arch/arm/mm/flush.c b/arch/arm/mm/flush.c
index 32aa5861119f..6d5ba9afb16a 100644
--- a/arch/arm/mm/flush.c
+++ b/arch/arm/mm/flush.c
@@ -17,6 +17,7 @@
17#include <asm/highmem.h> 17#include <asm/highmem.h>
18#include <asm/smp_plat.h> 18#include <asm/smp_plat.h>
19#include <asm/tlbflush.h> 19#include <asm/tlbflush.h>
20#include <linux/hugetlb.h>
20 21
21#include "mm.h" 22#include "mm.h"
22 23
@@ -168,19 +169,23 @@ void __flush_dcache_page(struct address_space *mapping, struct page *page)
168 * coherent with the kernels mapping. 169 * coherent with the kernels mapping.
169 */ 170 */
170 if (!PageHighMem(page)) { 171 if (!PageHighMem(page)) {
171 __cpuc_flush_dcache_area(page_address(page), PAGE_SIZE); 172 size_t page_size = PAGE_SIZE << compound_order(page);
173 __cpuc_flush_dcache_area(page_address(page), page_size);
172 } else { 174 } else {
173 void *addr; 175 unsigned long i;
174
175 if (cache_is_vipt_nonaliasing()) { 176 if (cache_is_vipt_nonaliasing()) {
176 addr = kmap_atomic(page); 177 for (i = 0; i < (1 << compound_order(page)); i++) {
177 __cpuc_flush_dcache_area(addr, PAGE_SIZE); 178 void *addr = kmap_atomic(page);
178 kunmap_atomic(addr);
179 } else {
180 addr = kmap_high_get(page);
181 if (addr) {
182 __cpuc_flush_dcache_area(addr, PAGE_SIZE); 179 __cpuc_flush_dcache_area(addr, PAGE_SIZE);
183 kunmap_high(page); 180 kunmap_atomic(addr);
181 }
182 } else {
183 for (i = 0; i < (1 << compound_order(page)); i++) {
184 void *addr = kmap_high_get(page);
185 if (addr) {
186 __cpuc_flush_dcache_area(addr, PAGE_SIZE);
187 kunmap_high(page);
188 }
184 } 189 }
185 } 190 }
186 } 191 }
@@ -287,7 +292,7 @@ void flush_dcache_page(struct page *page)
287 mapping = page_mapping(page); 292 mapping = page_mapping(page);
288 293
289 if (!cache_ops_need_broadcast() && 294 if (!cache_ops_need_broadcast() &&
290 mapping && !mapping_mapped(mapping)) 295 mapping && !page_mapped(page))
291 clear_bit(PG_dcache_clean, &page->flags); 296 clear_bit(PG_dcache_clean, &page->flags);
292 else { 297 else {
293 __flush_dcache_page(mapping, page); 298 __flush_dcache_page(mapping, page);
diff --git a/arch/arm/mm/fsr-3level.c b/arch/arm/mm/fsr-3level.c
index 05a4e9431836..ab4409a2307e 100644
--- a/arch/arm/mm/fsr-3level.c
+++ b/arch/arm/mm/fsr-3level.c
@@ -9,11 +9,11 @@ static struct fsr_info fsr_info[] = {
9 { do_page_fault, SIGSEGV, SEGV_MAPERR, "level 3 translation fault" }, 9 { do_page_fault, SIGSEGV, SEGV_MAPERR, "level 3 translation fault" },
10 { do_bad, SIGBUS, 0, "reserved access flag fault" }, 10 { do_bad, SIGBUS, 0, "reserved access flag fault" },
11 { do_bad, SIGSEGV, SEGV_ACCERR, "level 1 access flag fault" }, 11 { do_bad, SIGSEGV, SEGV_ACCERR, "level 1 access flag fault" },
12 { do_bad, SIGSEGV, SEGV_ACCERR, "level 2 access flag fault" }, 12 { do_page_fault, SIGSEGV, SEGV_ACCERR, "level 2 access flag fault" },
13 { do_page_fault, SIGSEGV, SEGV_ACCERR, "level 3 access flag fault" }, 13 { do_page_fault, SIGSEGV, SEGV_ACCERR, "level 3 access flag fault" },
14 { do_bad, SIGBUS, 0, "reserved permission fault" }, 14 { do_bad, SIGBUS, 0, "reserved permission fault" },
15 { do_bad, SIGSEGV, SEGV_ACCERR, "level 1 permission fault" }, 15 { do_bad, SIGSEGV, SEGV_ACCERR, "level 1 permission fault" },
16 { do_sect_fault, SIGSEGV, SEGV_ACCERR, "level 2 permission fault" }, 16 { do_page_fault, SIGSEGV, SEGV_ACCERR, "level 2 permission fault" },
17 { do_page_fault, SIGSEGV, SEGV_ACCERR, "level 3 permission fault" }, 17 { do_page_fault, SIGSEGV, SEGV_ACCERR, "level 3 permission fault" },
18 { do_bad, SIGBUS, 0, "synchronous external abort" }, 18 { do_bad, SIGBUS, 0, "synchronous external abort" },
19 { do_bad, SIGBUS, 0, "asynchronous external abort" }, 19 { do_bad, SIGBUS, 0, "asynchronous external abort" },
diff --git a/arch/arm/mm/hugetlbpage.c b/arch/arm/mm/hugetlbpage.c
new file mode 100644
index 000000000000..3d1e4a205b0b
--- /dev/null
+++ b/arch/arm/mm/hugetlbpage.c
@@ -0,0 +1,101 @@
1/*
2 * arch/arm/mm/hugetlbpage.c
3 *
4 * Copyright (C) 2012 ARM Ltd.
5 *
6 * Based on arch/x86/include/asm/hugetlb.h and Bill Carson's patches
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 * 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/init.h>
23#include <linux/fs.h>
24#include <linux/mm.h>
25#include <linux/hugetlb.h>
26#include <linux/pagemap.h>
27#include <linux/err.h>
28#include <linux/sysctl.h>
29#include <asm/mman.h>
30#include <asm/tlb.h>
31#include <asm/tlbflush.h>
32#include <asm/pgalloc.h>
33
34/*
35 * On ARM, huge pages are backed by pmd's rather than pte's, so we do a lot
36 * of type casting from pmd_t * to pte_t *.
37 */
38
39pte_t *huge_pte_offset(struct mm_struct *mm, unsigned long addr)
40{
41 pgd_t *pgd;
42 pud_t *pud;
43 pmd_t *pmd = NULL;
44
45 pgd = pgd_offset(mm, addr);
46 if (pgd_present(*pgd)) {
47 pud = pud_offset(pgd, addr);
48 if (pud_present(*pud))
49 pmd = pmd_offset(pud, addr);
50 }
51
52 return (pte_t *)pmd;
53}
54
55struct page *follow_huge_addr(struct mm_struct *mm, unsigned long address,
56 int write)
57{
58 return ERR_PTR(-EINVAL);
59}
60
61int pud_huge(pud_t pud)
62{
63 return 0;
64}
65
66int huge_pmd_unshare(struct mm_struct *mm, unsigned long *addr, pte_t *ptep)
67{
68 return 0;
69}
70
71pte_t *huge_pte_alloc(struct mm_struct *mm,
72 unsigned long addr, unsigned long sz)
73{
74 pgd_t *pgd;
75 pud_t *pud;
76 pte_t *pte = NULL;
77
78 pgd = pgd_offset(mm, addr);
79 pud = pud_alloc(mm, pgd, addr);
80 if (pud)
81 pte = (pte_t *)pmd_alloc(mm, pud, addr);
82
83 return pte;
84}
85
86struct page *
87follow_huge_pmd(struct mm_struct *mm, unsigned long address,
88 pmd_t *pmd, int write)
89{
90 struct page *page;
91
92 page = pte_page(*(pte_t *)pmd);
93 if (page)
94 page += ((address & ~PMD_MASK) >> PAGE_SHIFT);
95 return page;
96}
97
98int pmd_huge(pmd_t pmd)
99{
100 return pmd_val(pmd) && !(pmd_val(pmd) & PMD_TABLE_BIT);
101}
diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c
index 9a5cdc01fcdf..15225d829d71 100644
--- a/arch/arm/mm/init.c
+++ b/arch/arm/mm/init.c
@@ -36,12 +36,13 @@
36 36
37#include "mm.h" 37#include "mm.h"
38 38
39static unsigned long phys_initrd_start __initdata = 0; 39static phys_addr_t phys_initrd_start __initdata = 0;
40static unsigned long phys_initrd_size __initdata = 0; 40static unsigned long phys_initrd_size __initdata = 0;
41 41
42static int __init early_initrd(char *p) 42static int __init early_initrd(char *p)
43{ 43{
44 unsigned long start, size; 44 phys_addr_t start;
45 unsigned long size;
45 char *endp; 46 char *endp;
46 47
47 start = memparse(p, &endp); 48 start = memparse(p, &endp);
@@ -350,14 +351,14 @@ void __init arm_memblock_init(struct meminfo *mi, struct machine_desc *mdesc)
350#ifdef CONFIG_BLK_DEV_INITRD 351#ifdef CONFIG_BLK_DEV_INITRD
351 if (phys_initrd_size && 352 if (phys_initrd_size &&
352 !memblock_is_region_memory(phys_initrd_start, phys_initrd_size)) { 353 !memblock_is_region_memory(phys_initrd_start, phys_initrd_size)) {
353 pr_err("INITRD: 0x%08lx+0x%08lx is not a memory region - disabling initrd\n", 354 pr_err("INITRD: 0x%08llx+0x%08lx is not a memory region - disabling initrd\n",
354 phys_initrd_start, phys_initrd_size); 355 (u64)phys_initrd_start, phys_initrd_size);
355 phys_initrd_start = phys_initrd_size = 0; 356 phys_initrd_start = phys_initrd_size = 0;
356 } 357 }
357 if (phys_initrd_size && 358 if (phys_initrd_size &&
358 memblock_is_region_reserved(phys_initrd_start, phys_initrd_size)) { 359 memblock_is_region_reserved(phys_initrd_start, phys_initrd_size)) {
359 pr_err("INITRD: 0x%08lx+0x%08lx overlaps in-use memory region - disabling initrd\n", 360 pr_err("INITRD: 0x%08llx+0x%08lx overlaps in-use memory region - disabling initrd\n",
360 phys_initrd_start, phys_initrd_size); 361 (u64)phys_initrd_start, phys_initrd_size);
361 phys_initrd_start = phys_initrd_size = 0; 362 phys_initrd_start = phys_initrd_size = 0;
362 } 363 }
363 if (phys_initrd_size) { 364 if (phys_initrd_size) {
@@ -442,7 +443,7 @@ static inline void
442free_memmap(unsigned long start_pfn, unsigned long end_pfn) 443free_memmap(unsigned long start_pfn, unsigned long end_pfn)
443{ 444{
444 struct page *start_pg, *end_pg; 445 struct page *start_pg, *end_pg;
445 unsigned long pg, pgend; 446 phys_addr_t pg, pgend;
446 447
447 /* 448 /*
448 * Convert start_pfn/end_pfn to a struct page pointer. 449 * Convert start_pfn/end_pfn to a struct page pointer.
@@ -454,8 +455,8 @@ free_memmap(unsigned long start_pfn, unsigned long end_pfn)
454 * Convert to physical addresses, and 455 * Convert to physical addresses, and
455 * round start upwards and end downwards. 456 * round start upwards and end downwards.
456 */ 457 */
457 pg = (unsigned long)PAGE_ALIGN(__pa(start_pg)); 458 pg = PAGE_ALIGN(__pa(start_pg));
458 pgend = (unsigned long)__pa(end_pg) & PAGE_MASK; 459 pgend = __pa(end_pg) & PAGE_MASK;
459 460
460 /* 461 /*
461 * If there are free pages between these, 462 * If there are free pages between these,
@@ -582,9 +583,6 @@ static void __init free_highpages(void)
582 */ 583 */
583void __init mem_init(void) 584void __init mem_init(void)
584{ 585{
585 unsigned long reserved_pages, free_pages;
586 struct memblock_region *reg;
587 int i;
588#ifdef CONFIG_HAVE_TCM 586#ifdef CONFIG_HAVE_TCM
589 /* These pointers are filled in on TCM detection */ 587 /* These pointers are filled in on TCM detection */
590 extern u32 dtcm_end; 588 extern u32 dtcm_end;
@@ -595,57 +593,16 @@ void __init mem_init(void)
595 593
596 /* this will put all unused low memory onto the freelists */ 594 /* this will put all unused low memory onto the freelists */
597 free_unused_memmap(&meminfo); 595 free_unused_memmap(&meminfo);
598 596 free_all_bootmem();
599 totalram_pages += free_all_bootmem();
600 597
601#ifdef CONFIG_SA1111 598#ifdef CONFIG_SA1111
602 /* now that our DMA memory is actually so designated, we can free it */ 599 /* now that our DMA memory is actually so designated, we can free it */
603 free_reserved_area(__va(PHYS_PFN_OFFSET), swapper_pg_dir, 0, NULL); 600 free_reserved_area(__va(PHYS_OFFSET), swapper_pg_dir, -1, NULL);
604#endif 601#endif
605 602
606 free_highpages(); 603 free_highpages();
607 604
608 reserved_pages = free_pages = 0; 605 mem_init_print_info(NULL);
609
610 for_each_bank(i, &meminfo) {
611 struct membank *bank = &meminfo.bank[i];
612 unsigned int pfn1, pfn2;
613 struct page *page, *end;
614
615 pfn1 = bank_pfn_start(bank);
616 pfn2 = bank_pfn_end(bank);
617
618 page = pfn_to_page(pfn1);
619 end = pfn_to_page(pfn2 - 1) + 1;
620
621 do {
622 if (PageReserved(page))
623 reserved_pages++;
624 else if (!page_count(page))
625 free_pages++;
626 page++;
627 } while (page < end);
628 }
629
630 /*
631 * Since our memory may not be contiguous, calculate the
632 * real number of pages we have in this system
633 */
634 printk(KERN_INFO "Memory:");
635 num_physpages = 0;
636 for_each_memblock(memory, reg) {
637 unsigned long pages = memblock_region_memory_end_pfn(reg) -
638 memblock_region_memory_base_pfn(reg);
639 num_physpages += pages;
640 printk(" %ldMB", pages >> (20 - PAGE_SHIFT));
641 }
642 printk(" = %luMB total\n", num_physpages >> (20 - PAGE_SHIFT));
643
644 printk(KERN_NOTICE "Memory: %luk/%luk available, %luk reserved, %luK highmem\n",
645 nr_free_pages() << (PAGE_SHIFT-10),
646 free_pages << (PAGE_SHIFT-10),
647 reserved_pages << (PAGE_SHIFT-10),
648 totalhigh_pages << (PAGE_SHIFT-10));
649 606
650#define MLK(b, t) b, t, ((t) - (b)) >> 10 607#define MLK(b, t) b, t, ((t) - (b)) >> 10
651#define MLM(b, t) b, t, ((t) - (b)) >> 20 608#define MLM(b, t) b, t, ((t) - (b)) >> 20
@@ -711,7 +668,7 @@ void __init mem_init(void)
711 BUG_ON(PKMAP_BASE + LAST_PKMAP * PAGE_SIZE > PAGE_OFFSET); 668 BUG_ON(PKMAP_BASE + LAST_PKMAP * PAGE_SIZE > PAGE_OFFSET);
712#endif 669#endif
713 670
714 if (PAGE_SIZE >= 16384 && num_physpages <= 128) { 671 if (PAGE_SIZE >= 16384 && get_num_physpages() <= 128) {
715 extern int sysctl_overcommit_memory; 672 extern int sysctl_overcommit_memory;
716 /* 673 /*
717 * On a machine this small we won't get 674 * On a machine this small we won't get
@@ -728,12 +685,12 @@ void free_initmem(void)
728 extern char __tcm_start, __tcm_end; 685 extern char __tcm_start, __tcm_end;
729 686
730 poison_init_mem(&__tcm_start, &__tcm_end - &__tcm_start); 687 poison_init_mem(&__tcm_start, &__tcm_end - &__tcm_start);
731 free_reserved_area(&__tcm_start, &__tcm_end, 0, "TCM link"); 688 free_reserved_area(&__tcm_start, &__tcm_end, -1, "TCM link");
732#endif 689#endif
733 690
734 poison_init_mem(__init_begin, __init_end - __init_begin); 691 poison_init_mem(__init_begin, __init_end - __init_begin);
735 if (!machine_is_integrator() && !machine_is_cintegrator()) 692 if (!machine_is_integrator() && !machine_is_cintegrator())
736 free_initmem_default(0); 693 free_initmem_default(-1);
737} 694}
738 695
739#ifdef CONFIG_BLK_DEV_INITRD 696#ifdef CONFIG_BLK_DEV_INITRD
@@ -744,7 +701,7 @@ void free_initrd_mem(unsigned long start, unsigned long end)
744{ 701{
745 if (!keep_initrd) { 702 if (!keep_initrd) {
746 poison_init_mem((void *)start, PAGE_ALIGN(end) - start); 703 poison_init_mem((void *)start, PAGE_ALIGN(end) - start);
747 free_reserved_area(start, end, 0, "initrd"); 704 free_reserved_area((void *)start, (void *)end, -1, "initrd");
748 } 705 }
749} 706}
750 707
diff --git a/arch/arm/mm/ioremap.c b/arch/arm/mm/ioremap.c
index 04d9006eab1f..f123d6eb074b 100644
--- a/arch/arm/mm/ioremap.c
+++ b/arch/arm/mm/ioremap.c
@@ -331,10 +331,10 @@ void __iomem * __arm_ioremap_pfn_caller(unsigned long pfn,
331 return (void __iomem *) (offset + addr); 331 return (void __iomem *) (offset + addr);
332} 332}
333 333
334void __iomem *__arm_ioremap_caller(unsigned long phys_addr, size_t size, 334void __iomem *__arm_ioremap_caller(phys_addr_t phys_addr, size_t size,
335 unsigned int mtype, void *caller) 335 unsigned int mtype, void *caller)
336{ 336{
337 unsigned long last_addr; 337 phys_addr_t last_addr;
338 unsigned long offset = phys_addr & ~PAGE_MASK; 338 unsigned long offset = phys_addr & ~PAGE_MASK;
339 unsigned long pfn = __phys_to_pfn(phys_addr); 339 unsigned long pfn = __phys_to_pfn(phys_addr);
340 340
@@ -367,12 +367,12 @@ __arm_ioremap_pfn(unsigned long pfn, unsigned long offset, size_t size,
367} 367}
368EXPORT_SYMBOL(__arm_ioremap_pfn); 368EXPORT_SYMBOL(__arm_ioremap_pfn);
369 369
370void __iomem * (*arch_ioremap_caller)(unsigned long, size_t, 370void __iomem * (*arch_ioremap_caller)(phys_addr_t, size_t,
371 unsigned int, void *) = 371 unsigned int, void *) =
372 __arm_ioremap_caller; 372 __arm_ioremap_caller;
373 373
374void __iomem * 374void __iomem *
375__arm_ioremap(unsigned long phys_addr, size_t size, unsigned int mtype) 375__arm_ioremap(phys_addr_t phys_addr, size_t size, unsigned int mtype)
376{ 376{
377 return arch_ioremap_caller(phys_addr, size, mtype, 377 return arch_ioremap_caller(phys_addr, size, mtype,
378 __builtin_return_address(0)); 378 __builtin_return_address(0));
@@ -387,7 +387,7 @@ EXPORT_SYMBOL(__arm_ioremap);
387 * CONFIG_GENERIC_ALLOCATOR for allocating external memory. 387 * CONFIG_GENERIC_ALLOCATOR for allocating external memory.
388 */ 388 */
389void __iomem * 389void __iomem *
390__arm_ioremap_exec(unsigned long phys_addr, size_t size, bool cached) 390__arm_ioremap_exec(phys_addr_t phys_addr, size_t size, bool cached)
391{ 391{
392 unsigned int mtype; 392 unsigned int mtype;
393 393
diff --git a/arch/arm/mm/mmap.c b/arch/arm/mm/mmap.c
index 10062ceadd1c..0c6356255fe3 100644
--- a/arch/arm/mm/mmap.c
+++ b/arch/arm/mm/mmap.c
@@ -181,11 +181,9 @@ void arch_pick_mmap_layout(struct mm_struct *mm)
181 if (mmap_is_legacy()) { 181 if (mmap_is_legacy()) {
182 mm->mmap_base = TASK_UNMAPPED_BASE + random_factor; 182 mm->mmap_base = TASK_UNMAPPED_BASE + random_factor;
183 mm->get_unmapped_area = arch_get_unmapped_area; 183 mm->get_unmapped_area = arch_get_unmapped_area;
184 mm->unmap_area = arch_unmap_area;
185 } else { 184 } else {
186 mm->mmap_base = mmap_base(random_factor); 185 mm->mmap_base = mmap_base(random_factor);
187 mm->get_unmapped_area = arch_get_unmapped_area_topdown; 186 mm->get_unmapped_area = arch_get_unmapped_area_topdown;
188 mm->unmap_area = arch_unmap_area_topdown;
189 } 187 }
190} 188}
191 189
diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c
index 4d409e6a552d..53cdbd39ec8e 100644
--- a/arch/arm/mm/mmu.c
+++ b/arch/arm/mm/mmu.c
@@ -675,7 +675,8 @@ static void __init alloc_init_pmd(pud_t *pud, unsigned long addr,
675} 675}
676 676
677static void __init alloc_init_pud(pgd_t *pgd, unsigned long addr, 677static void __init alloc_init_pud(pgd_t *pgd, unsigned long addr,
678 unsigned long end, unsigned long phys, const struct mem_type *type) 678 unsigned long end, phys_addr_t phys,
679 const struct mem_type *type)
679{ 680{
680 pud_t *pud = pud_offset(pgd, addr); 681 pud_t *pud = pud_offset(pgd, addr);
681 unsigned long next; 682 unsigned long next;
@@ -949,7 +950,7 @@ void __init debug_ll_io_init(void)
949 map.virtual &= PAGE_MASK; 950 map.virtual &= PAGE_MASK;
950 map.length = PAGE_SIZE; 951 map.length = PAGE_SIZE;
951 map.type = MT_DEVICE; 952 map.type = MT_DEVICE;
952 create_mapping(&map); 953 iotable_init(&map, 1);
953} 954}
954#endif 955#endif
955 956
@@ -988,28 +989,30 @@ phys_addr_t arm_lowmem_limit __initdata = 0;
988 989
989void __init sanity_check_meminfo(void) 990void __init sanity_check_meminfo(void)
990{ 991{
992 phys_addr_t memblock_limit = 0;
991 int i, j, highmem = 0; 993 int i, j, highmem = 0;
994 phys_addr_t vmalloc_limit = __pa(vmalloc_min - 1) + 1;
992 995
993 for (i = 0, j = 0; i < meminfo.nr_banks; i++) { 996 for (i = 0, j = 0; i < meminfo.nr_banks; i++) {
994 struct membank *bank = &meminfo.bank[j]; 997 struct membank *bank = &meminfo.bank[j];
998 phys_addr_t size_limit;
999
995 *bank = meminfo.bank[i]; 1000 *bank = meminfo.bank[i];
1001 size_limit = bank->size;
996 1002
997 if (bank->start > ULONG_MAX) 1003 if (bank->start >= vmalloc_limit)
998 highmem = 1;
999
1000#ifdef CONFIG_HIGHMEM
1001 if (__va(bank->start) >= vmalloc_min ||
1002 __va(bank->start) < (void *)PAGE_OFFSET)
1003 highmem = 1; 1004 highmem = 1;
1005 else
1006 size_limit = vmalloc_limit - bank->start;
1004 1007
1005 bank->highmem = highmem; 1008 bank->highmem = highmem;
1006 1009
1010#ifdef CONFIG_HIGHMEM
1007 /* 1011 /*
1008 * Split those memory banks which are partially overlapping 1012 * Split those memory banks which are partially overlapping
1009 * the vmalloc area greatly simplifying things later. 1013 * the vmalloc area greatly simplifying things later.
1010 */ 1014 */
1011 if (!highmem && __va(bank->start) < vmalloc_min && 1015 if (!highmem && bank->size > size_limit) {
1012 bank->size > vmalloc_min - __va(bank->start)) {
1013 if (meminfo.nr_banks >= NR_BANKS) { 1016 if (meminfo.nr_banks >= NR_BANKS) {
1014 printk(KERN_CRIT "NR_BANKS too low, " 1017 printk(KERN_CRIT "NR_BANKS too low, "
1015 "ignoring high memory\n"); 1018 "ignoring high memory\n");
@@ -1018,16 +1021,14 @@ void __init sanity_check_meminfo(void)
1018 (meminfo.nr_banks - i) * sizeof(*bank)); 1021 (meminfo.nr_banks - i) * sizeof(*bank));
1019 meminfo.nr_banks++; 1022 meminfo.nr_banks++;
1020 i++; 1023 i++;
1021 bank[1].size -= vmalloc_min - __va(bank->start); 1024 bank[1].size -= size_limit;
1022 bank[1].start = __pa(vmalloc_min - 1) + 1; 1025 bank[1].start = vmalloc_limit;
1023 bank[1].highmem = highmem = 1; 1026 bank[1].highmem = highmem = 1;
1024 j++; 1027 j++;
1025 } 1028 }
1026 bank->size = vmalloc_min - __va(bank->start); 1029 bank->size = size_limit;
1027 } 1030 }
1028#else 1031#else
1029 bank->highmem = highmem;
1030
1031 /* 1032 /*
1032 * Highmem banks not allowed with !CONFIG_HIGHMEM. 1033 * Highmem banks not allowed with !CONFIG_HIGHMEM.
1033 */ 1034 */
@@ -1040,36 +1041,44 @@ void __init sanity_check_meminfo(void)
1040 } 1041 }
1041 1042
1042 /* 1043 /*
1043 * Check whether this memory bank would entirely overlap
1044 * the vmalloc area.
1045 */
1046 if (__va(bank->start) >= vmalloc_min ||
1047 __va(bank->start) < (void *)PAGE_OFFSET) {
1048 printk(KERN_NOTICE "Ignoring RAM at %.8llx-%.8llx "
1049 "(vmalloc region overlap).\n",
1050 (unsigned long long)bank->start,
1051 (unsigned long long)bank->start + bank->size - 1);
1052 continue;
1053 }
1054
1055 /*
1056 * Check whether this memory bank would partially overlap 1044 * Check whether this memory bank would partially overlap
1057 * the vmalloc area. 1045 * the vmalloc area.
1058 */ 1046 */
1059 if (__va(bank->start + bank->size - 1) >= vmalloc_min || 1047 if (bank->size > size_limit) {
1060 __va(bank->start + bank->size - 1) <= __va(bank->start)) {
1061 unsigned long newsize = vmalloc_min - __va(bank->start);
1062 printk(KERN_NOTICE "Truncating RAM at %.8llx-%.8llx " 1048 printk(KERN_NOTICE "Truncating RAM at %.8llx-%.8llx "
1063 "to -%.8llx (vmalloc region overlap).\n", 1049 "to -%.8llx (vmalloc region overlap).\n",
1064 (unsigned long long)bank->start, 1050 (unsigned long long)bank->start,
1065 (unsigned long long)bank->start + bank->size - 1, 1051 (unsigned long long)bank->start + bank->size - 1,
1066 (unsigned long long)bank->start + newsize - 1); 1052 (unsigned long long)bank->start + size_limit - 1);
1067 bank->size = newsize; 1053 bank->size = size_limit;
1068 } 1054 }
1069#endif 1055#endif
1070 if (!bank->highmem && bank->start + bank->size > arm_lowmem_limit) 1056 if (!bank->highmem) {
1071 arm_lowmem_limit = bank->start + bank->size; 1057 phys_addr_t bank_end = bank->start + bank->size;
1058
1059 if (bank_end > arm_lowmem_limit)
1060 arm_lowmem_limit = bank_end;
1072 1061
1062 /*
1063 * Find the first non-section-aligned page, and point
1064 * memblock_limit at it. This relies on rounding the
1065 * limit down to be section-aligned, which happens at
1066 * the end of this function.
1067 *
1068 * With this algorithm, the start or end of almost any
1069 * bank can be non-section-aligned. The only exception
1070 * is that the start of the bank 0 must be section-
1071 * aligned, since otherwise memory would need to be
1072 * allocated when mapping the start of bank 0, which
1073 * occurs before any free memory is mapped.
1074 */
1075 if (!memblock_limit) {
1076 if (!IS_ALIGNED(bank->start, SECTION_SIZE))
1077 memblock_limit = bank->start;
1078 else if (!IS_ALIGNED(bank_end, SECTION_SIZE))
1079 memblock_limit = bank_end;
1080 }
1081 }
1073 j++; 1082 j++;
1074 } 1083 }
1075#ifdef CONFIG_HIGHMEM 1084#ifdef CONFIG_HIGHMEM
@@ -1094,7 +1103,18 @@ void __init sanity_check_meminfo(void)
1094#endif 1103#endif
1095 meminfo.nr_banks = j; 1104 meminfo.nr_banks = j;
1096 high_memory = __va(arm_lowmem_limit - 1) + 1; 1105 high_memory = __va(arm_lowmem_limit - 1) + 1;
1097 memblock_set_current_limit(arm_lowmem_limit); 1106
1107 /*
1108 * Round the memblock limit down to a section size. This
1109 * helps to ensure that we will allocate memory from the
1110 * last full section, which should be mapped.
1111 */
1112 if (memblock_limit)
1113 memblock_limit = round_down(memblock_limit, SECTION_SIZE);
1114 if (!memblock_limit)
1115 memblock_limit = arm_lowmem_limit;
1116
1117 memblock_set_current_limit(memblock_limit);
1098} 1118}
1099 1119
1100static inline void prepare_page_table(void) 1120static inline void prepare_page_table(void)
@@ -1175,7 +1195,7 @@ static void __init devicemaps_init(struct machine_desc *mdesc)
1175 /* 1195 /*
1176 * Allocate the vector page early. 1196 * Allocate the vector page early.
1177 */ 1197 */
1178 vectors = early_alloc(PAGE_SIZE); 1198 vectors = early_alloc(PAGE_SIZE * 2);
1179 1199
1180 early_trap_init(vectors); 1200 early_trap_init(vectors);
1181 1201
@@ -1220,20 +1240,34 @@ static void __init devicemaps_init(struct machine_desc *mdesc)
1220 map.pfn = __phys_to_pfn(virt_to_phys(vectors)); 1240 map.pfn = __phys_to_pfn(virt_to_phys(vectors));
1221 map.virtual = 0xffff0000; 1241 map.virtual = 0xffff0000;
1222 map.length = PAGE_SIZE; 1242 map.length = PAGE_SIZE;
1243#ifdef CONFIG_KUSER_HELPERS
1223 map.type = MT_HIGH_VECTORS; 1244 map.type = MT_HIGH_VECTORS;
1245#else
1246 map.type = MT_LOW_VECTORS;
1247#endif
1224 create_mapping(&map); 1248 create_mapping(&map);
1225 1249
1226 if (!vectors_high()) { 1250 if (!vectors_high()) {
1227 map.virtual = 0; 1251 map.virtual = 0;
1252 map.length = PAGE_SIZE * 2;
1228 map.type = MT_LOW_VECTORS; 1253 map.type = MT_LOW_VECTORS;
1229 create_mapping(&map); 1254 create_mapping(&map);
1230 } 1255 }
1231 1256
1257 /* Now create a kernel read-only mapping */
1258 map.pfn += 1;
1259 map.virtual = 0xffff0000 + PAGE_SIZE;
1260 map.length = PAGE_SIZE;
1261 map.type = MT_LOW_VECTORS;
1262 create_mapping(&map);
1263
1232 /* 1264 /*
1233 * Ask the machine support to map in the statically mapped devices. 1265 * Ask the machine support to map in the statically mapped devices.
1234 */ 1266 */
1235 if (mdesc->map_io) 1267 if (mdesc->map_io)
1236 mdesc->map_io(); 1268 mdesc->map_io();
1269 else
1270 debug_ll_io_init();
1237 fill_pmd_gaps(); 1271 fill_pmd_gaps();
1238 1272
1239 /* Reserve fixed i/o space in VMALLOC region */ 1273 /* Reserve fixed i/o space in VMALLOC region */
@@ -1289,8 +1323,6 @@ void __init paging_init(struct machine_desc *mdesc)
1289{ 1323{
1290 void *zero_page; 1324 void *zero_page;
1291 1325
1292 memblock_set_current_limit(arm_lowmem_limit);
1293
1294 build_mem_type_table(); 1326 build_mem_type_table();
1295 prepare_page_table(); 1327 prepare_page_table();
1296 map_lowmem(); 1328 map_lowmem();
diff --git a/arch/arm/mm/nommu.c b/arch/arm/mm/nommu.c
index eb5293a69a84..1fa50100ab6a 100644
--- a/arch/arm/mm/nommu.c
+++ b/arch/arm/mm/nommu.c
@@ -8,6 +8,7 @@
8#include <linux/pagemap.h> 8#include <linux/pagemap.h>
9#include <linux/io.h> 9#include <linux/io.h>
10#include <linux/memblock.h> 10#include <linux/memblock.h>
11#include <linux/kernel.h>
11 12
12#include <asm/cacheflush.h> 13#include <asm/cacheflush.h>
13#include <asm/sections.h> 14#include <asm/sections.h>
@@ -15,22 +16,282 @@
15#include <asm/setup.h> 16#include <asm/setup.h>
16#include <asm/traps.h> 17#include <asm/traps.h>
17#include <asm/mach/arch.h> 18#include <asm/mach/arch.h>
19#include <asm/cputype.h>
20#include <asm/mpu.h>
18 21
19#include "mm.h" 22#include "mm.h"
20 23
24#ifdef CONFIG_ARM_MPU
25struct mpu_rgn_info mpu_rgn_info;
26
27/* Region number */
28static void rgnr_write(u32 v)
29{
30 asm("mcr p15, 0, %0, c6, c2, 0" : : "r" (v));
31}
32
33/* Data-side / unified region attributes */
34
35/* Region access control register */
36static void dracr_write(u32 v)
37{
38 asm("mcr p15, 0, %0, c6, c1, 4" : : "r" (v));
39}
40
41/* Region size register */
42static void drsr_write(u32 v)
43{
44 asm("mcr p15, 0, %0, c6, c1, 2" : : "r" (v));
45}
46
47/* Region base address register */
48static void drbar_write(u32 v)
49{
50 asm("mcr p15, 0, %0, c6, c1, 0" : : "r" (v));
51}
52
53static u32 drbar_read(void)
54{
55 u32 v;
56 asm("mrc p15, 0, %0, c6, c1, 0" : "=r" (v));
57 return v;
58}
59/* Optional instruction-side region attributes */
60
61/* I-side Region access control register */
62static void iracr_write(u32 v)
63{
64 asm("mcr p15, 0, %0, c6, c1, 5" : : "r" (v));
65}
66
67/* I-side Region size register */
68static void irsr_write(u32 v)
69{
70 asm("mcr p15, 0, %0, c6, c1, 3" : : "r" (v));
71}
72
73/* I-side Region base address register */
74static void irbar_write(u32 v)
75{
76 asm("mcr p15, 0, %0, c6, c1, 1" : : "r" (v));
77}
78
79static unsigned long irbar_read(void)
80{
81 unsigned long v;
82 asm("mrc p15, 0, %0, c6, c1, 1" : "=r" (v));
83 return v;
84}
85
86/* MPU initialisation functions */
87void __init sanity_check_meminfo_mpu(void)
88{
89 int i;
90 struct membank *bank = meminfo.bank;
91 phys_addr_t phys_offset = PHYS_OFFSET;
92 phys_addr_t aligned_region_size, specified_mem_size, rounded_mem_size;
93
94 /* Initially only use memory continuous from PHYS_OFFSET */
95 if (bank_phys_start(&bank[0]) != phys_offset)
96 panic("First memory bank must be contiguous from PHYS_OFFSET");
97
98 /* Banks have already been sorted by start address */
99 for (i = 1; i < meminfo.nr_banks; i++) {
100 if (bank[i].start <= bank_phys_end(&bank[0]) &&
101 bank_phys_end(&bank[i]) > bank_phys_end(&bank[0])) {
102 bank[0].size = bank_phys_end(&bank[i]) - bank[0].start;
103 } else {
104 pr_notice("Ignoring RAM after 0x%.8lx. "
105 "First non-contiguous (ignored) bank start: 0x%.8lx\n",
106 (unsigned long)bank_phys_end(&bank[0]),
107 (unsigned long)bank_phys_start(&bank[i]));
108 break;
109 }
110 }
111 /* All contiguous banks are now merged in to the first bank */
112 meminfo.nr_banks = 1;
113 specified_mem_size = bank[0].size;
114
115 /*
116 * MPU has curious alignment requirements: Size must be power of 2, and
117 * region start must be aligned to the region size
118 */
119 if (phys_offset != 0)
120 pr_info("PHYS_OFFSET != 0 => MPU Region size constrained by alignment requirements\n");
121
122 /*
123 * Maximum aligned region might overflow phys_addr_t if phys_offset is
124 * 0. Hence we keep everything below 4G until we take the smaller of
125 * the aligned_region_size and rounded_mem_size, one of which is
126 * guaranteed to be smaller than the maximum physical address.
127 */
128 aligned_region_size = (phys_offset - 1) ^ (phys_offset);
129 /* Find the max power-of-two sized region that fits inside our bank */
130 rounded_mem_size = (1 << __fls(bank[0].size)) - 1;
131
132 /* The actual region size is the smaller of the two */
133 aligned_region_size = aligned_region_size < rounded_mem_size
134 ? aligned_region_size + 1
135 : rounded_mem_size + 1;
136
137 if (aligned_region_size != specified_mem_size)
138 pr_warn("Truncating memory from 0x%.8lx to 0x%.8lx (MPU region constraints)",
139 (unsigned long)specified_mem_size,
140 (unsigned long)aligned_region_size);
141
142 meminfo.bank[0].size = aligned_region_size;
143 pr_debug("MPU Region from 0x%.8lx size 0x%.8lx (end 0x%.8lx))\n",
144 (unsigned long)phys_offset,
145 (unsigned long)aligned_region_size,
146 (unsigned long)bank_phys_end(&bank[0]));
147
148}
149
150static int mpu_present(void)
151{
152 return ((read_cpuid_ext(CPUID_EXT_MMFR0) & MMFR0_PMSA) == MMFR0_PMSAv7);
153}
154
155static int mpu_max_regions(void)
156{
157 /*
158 * We don't support a different number of I/D side regions so if we
159 * have separate instruction and data memory maps then return
160 * whichever side has a smaller number of supported regions.
161 */
162 u32 dregions, iregions, mpuir;
163 mpuir = read_cpuid(CPUID_MPUIR);
164
165 dregions = iregions = (mpuir & MPUIR_DREGION_SZMASK) >> MPUIR_DREGION;
166
167 /* Check for separate d-side and i-side memory maps */
168 if (mpuir & MPUIR_nU)
169 iregions = (mpuir & MPUIR_IREGION_SZMASK) >> MPUIR_IREGION;
170
171 /* Use the smallest of the two maxima */
172 return min(dregions, iregions);
173}
174
175static int mpu_iside_independent(void)
176{
177 /* MPUIR.nU specifies whether there is *not* a unified memory map */
178 return read_cpuid(CPUID_MPUIR) & MPUIR_nU;
179}
180
181static int mpu_min_region_order(void)
182{
183 u32 drbar_result, irbar_result;
184 /* We've kept a region free for this probing */
185 rgnr_write(MPU_PROBE_REGION);
186 isb();
187 /*
188 * As per ARM ARM, write 0xFFFFFFFC to DRBAR to find the minimum
189 * region order
190 */
191 drbar_write(0xFFFFFFFC);
192 drbar_result = irbar_result = drbar_read();
193 drbar_write(0x0);
194 /* If the MPU is non-unified, we use the larger of the two minima*/
195 if (mpu_iside_independent()) {
196 irbar_write(0xFFFFFFFC);
197 irbar_result = irbar_read();
198 irbar_write(0x0);
199 }
200 isb(); /* Ensure that MPU region operations have completed */
201 /* Return whichever result is larger */
202 return __ffs(max(drbar_result, irbar_result));
203}
204
205static int mpu_setup_region(unsigned int number, phys_addr_t start,
206 unsigned int size_order, unsigned int properties)
207{
208 u32 size_data;
209
210 /* We kept a region free for probing resolution of MPU regions*/
211 if (number > mpu_max_regions() || number == MPU_PROBE_REGION)
212 return -ENOENT;
213
214 if (size_order > 32)
215 return -ENOMEM;
216
217 if (size_order < mpu_min_region_order())
218 return -ENOMEM;
219
220 /* Writing N to bits 5:1 (RSR_SZ) specifies region size 2^N+1 */
221 size_data = ((size_order - 1) << MPU_RSR_SZ) | 1 << MPU_RSR_EN;
222
223 dsb(); /* Ensure all previous data accesses occur with old mappings */
224 rgnr_write(number);
225 isb();
226 drbar_write(start);
227 dracr_write(properties);
228 isb(); /* Propagate properties before enabling region */
229 drsr_write(size_data);
230
231 /* Check for independent I-side registers */
232 if (mpu_iside_independent()) {
233 irbar_write(start);
234 iracr_write(properties);
235 isb();
236 irsr_write(size_data);
237 }
238 isb();
239
240 /* Store region info (we treat i/d side the same, so only store d) */
241 mpu_rgn_info.rgns[number].dracr = properties;
242 mpu_rgn_info.rgns[number].drbar = start;
243 mpu_rgn_info.rgns[number].drsr = size_data;
244 return 0;
245}
246
247/*
248* Set up default MPU regions, doing nothing if there is no MPU
249*/
250void __init mpu_setup(void)
251{
252 int region_err;
253 if (!mpu_present())
254 return;
255
256 region_err = mpu_setup_region(MPU_RAM_REGION, PHYS_OFFSET,
257 ilog2(meminfo.bank[0].size),
258 MPU_AP_PL1RW_PL0RW | MPU_RGN_NORMAL);
259 if (region_err) {
260 panic("MPU region initialization failure! %d", region_err);
261 } else {
262 pr_info("Using ARMv7 PMSA Compliant MPU. "
263 "Region independence: %s, Max regions: %d\n",
264 mpu_iside_independent() ? "Yes" : "No",
265 mpu_max_regions());
266 }
267}
268#else
269static void sanity_check_meminfo_mpu(void) {}
270static void __init mpu_setup(void) {}
271#endif /* CONFIG_ARM_MPU */
272
21void __init arm_mm_memblock_reserve(void) 273void __init arm_mm_memblock_reserve(void)
22{ 274{
275#ifndef CONFIG_CPU_V7M
23 /* 276 /*
24 * Register the exception vector page. 277 * Register the exception vector page.
25 * some architectures which the DRAM is the exception vector to trap, 278 * some architectures which the DRAM is the exception vector to trap,
26 * alloc_page breaks with error, although it is not NULL, but "0." 279 * alloc_page breaks with error, although it is not NULL, but "0."
27 */ 280 */
28 memblock_reserve(CONFIG_VECTORS_BASE, PAGE_SIZE); 281 memblock_reserve(CONFIG_VECTORS_BASE, PAGE_SIZE);
282#else /* ifndef CONFIG_CPU_V7M */
283 /*
284 * There is no dedicated vector page on V7-M. So nothing needs to be
285 * reserved here.
286 */
287#endif
29} 288}
30 289
31void __init sanity_check_meminfo(void) 290void __init sanity_check_meminfo(void)
32{ 291{
33 phys_addr_t end = bank_phys_end(&meminfo.bank[meminfo.nr_banks - 1]); 292 phys_addr_t end;
293 sanity_check_meminfo_mpu();
294 end = bank_phys_end(&meminfo.bank[meminfo.nr_banks - 1]);
34 high_memory = __va(end - 1) + 1; 295 high_memory = __va(end - 1) + 1;
35} 296}
36 297
@@ -41,6 +302,7 @@ void __init sanity_check_meminfo(void)
41void __init paging_init(struct machine_desc *mdesc) 302void __init paging_init(struct machine_desc *mdesc)
42{ 303{
43 early_trap_init((void *)CONFIG_VECTORS_BASE); 304 early_trap_init((void *)CONFIG_VECTORS_BASE);
305 mpu_setup();
44 bootmem_init(); 306 bootmem_init();
45} 307}
46 308
@@ -87,16 +349,16 @@ void __iomem *__arm_ioremap_pfn_caller(unsigned long pfn, unsigned long offset,
87 return __arm_ioremap_pfn(pfn, offset, size, mtype); 349 return __arm_ioremap_pfn(pfn, offset, size, mtype);
88} 350}
89 351
90void __iomem *__arm_ioremap(unsigned long phys_addr, size_t size, 352void __iomem *__arm_ioremap(phys_addr_t phys_addr, size_t size,
91 unsigned int mtype) 353 unsigned int mtype)
92{ 354{
93 return (void __iomem *)phys_addr; 355 return (void __iomem *)phys_addr;
94} 356}
95EXPORT_SYMBOL(__arm_ioremap); 357EXPORT_SYMBOL(__arm_ioremap);
96 358
97void __iomem * (*arch_ioremap_caller)(unsigned long, size_t, unsigned int, void *); 359void __iomem * (*arch_ioremap_caller)(phys_addr_t, size_t, unsigned int, void *);
98 360
99void __iomem *__arm_ioremap_caller(unsigned long phys_addr, size_t size, 361void __iomem *__arm_ioremap_caller(phys_addr_t phys_addr, size_t size,
100 unsigned int mtype, void *caller) 362 unsigned int mtype, void *caller)
101{ 363{
102 return __arm_ioremap(phys_addr, size, mtype); 364 return __arm_ioremap(phys_addr, size, mtype);
diff --git a/arch/arm/mm/proc-arm1020.S b/arch/arm/mm/proc-arm1020.S
index 2bb61e703d6c..d1a2d05971e0 100644
--- a/arch/arm/mm/proc-arm1020.S
+++ b/arch/arm/mm/proc-arm1020.S
@@ -443,8 +443,6 @@ ENTRY(cpu_arm1020_set_pte_ext)
443#endif /* CONFIG_MMU */ 443#endif /* CONFIG_MMU */
444 mov pc, lr 444 mov pc, lr
445 445
446 __CPUINIT
447
448 .type __arm1020_setup, #function 446 .type __arm1020_setup, #function
449__arm1020_setup: 447__arm1020_setup:
450 mov r0, #0 448 mov r0, #0
diff --git a/arch/arm/mm/proc-arm1020e.S b/arch/arm/mm/proc-arm1020e.S
index 8f96aa40f510..9d89405c3d03 100644
--- a/arch/arm/mm/proc-arm1020e.S
+++ b/arch/arm/mm/proc-arm1020e.S
@@ -425,8 +425,6 @@ ENTRY(cpu_arm1020e_set_pte_ext)
425#endif /* CONFIG_MMU */ 425#endif /* CONFIG_MMU */
426 mov pc, lr 426 mov pc, lr
427 427
428 __CPUINIT
429
430 .type __arm1020e_setup, #function 428 .type __arm1020e_setup, #function
431__arm1020e_setup: 429__arm1020e_setup:
432 mov r0, #0 430 mov r0, #0
diff --git a/arch/arm/mm/proc-arm1022.S b/arch/arm/mm/proc-arm1022.S
index 8ebe4a469a22..6f01a0ae3b30 100644
--- a/arch/arm/mm/proc-arm1022.S
+++ b/arch/arm/mm/proc-arm1022.S
@@ -407,8 +407,6 @@ ENTRY(cpu_arm1022_set_pte_ext)
407#endif /* CONFIG_MMU */ 407#endif /* CONFIG_MMU */
408 mov pc, lr 408 mov pc, lr
409 409
410 __CPUINIT
411
412 .type __arm1022_setup, #function 410 .type __arm1022_setup, #function
413__arm1022_setup: 411__arm1022_setup:
414 mov r0, #0 412 mov r0, #0
diff --git a/arch/arm/mm/proc-arm1026.S b/arch/arm/mm/proc-arm1026.S
index 093fc7e520c3..4799a24b43e6 100644
--- a/arch/arm/mm/proc-arm1026.S
+++ b/arch/arm/mm/proc-arm1026.S
@@ -396,9 +396,6 @@ ENTRY(cpu_arm1026_set_pte_ext)
396#endif /* CONFIG_MMU */ 396#endif /* CONFIG_MMU */
397 mov pc, lr 397 mov pc, lr
398 398
399
400 __CPUINIT
401
402 .type __arm1026_setup, #function 399 .type __arm1026_setup, #function
403__arm1026_setup: 400__arm1026_setup:
404 mov r0, #0 401 mov r0, #0
diff --git a/arch/arm/mm/proc-arm720.S b/arch/arm/mm/proc-arm720.S
index 0ac908c7ade1..d42c37f9f5bc 100644
--- a/arch/arm/mm/proc-arm720.S
+++ b/arch/arm/mm/proc-arm720.S
@@ -116,8 +116,6 @@ ENTRY(cpu_arm720_reset)
116ENDPROC(cpu_arm720_reset) 116ENDPROC(cpu_arm720_reset)
117 .popsection 117 .popsection
118 118
119 __CPUINIT
120
121 .type __arm710_setup, #function 119 .type __arm710_setup, #function
122__arm710_setup: 120__arm710_setup:
123 mov r0, #0 121 mov r0, #0
diff --git a/arch/arm/mm/proc-arm740.S b/arch/arm/mm/proc-arm740.S
index fde2d2a794cf..9b0ae90cbf17 100644
--- a/arch/arm/mm/proc-arm740.S
+++ b/arch/arm/mm/proc-arm740.S
@@ -60,8 +60,6 @@ ENTRY(cpu_arm740_reset)
60ENDPROC(cpu_arm740_reset) 60ENDPROC(cpu_arm740_reset)
61 .popsection 61 .popsection
62 62
63 __CPUINIT
64
65 .type __arm740_setup, #function 63 .type __arm740_setup, #function
66__arm740_setup: 64__arm740_setup:
67 mov r0, #0 65 mov r0, #0
diff --git a/arch/arm/mm/proc-arm7tdmi.S b/arch/arm/mm/proc-arm7tdmi.S
index 6ddea3e464bd..f6cc3f63ce39 100644
--- a/arch/arm/mm/proc-arm7tdmi.S
+++ b/arch/arm/mm/proc-arm7tdmi.S
@@ -51,8 +51,6 @@ ENTRY(cpu_arm7tdmi_reset)
51ENDPROC(cpu_arm7tdmi_reset) 51ENDPROC(cpu_arm7tdmi_reset)
52 .popsection 52 .popsection
53 53
54 __CPUINIT
55
56 .type __arm7tdmi_setup, #function 54 .type __arm7tdmi_setup, #function
57__arm7tdmi_setup: 55__arm7tdmi_setup:
58 mov pc, lr 56 mov pc, lr
diff --git a/arch/arm/mm/proc-arm920.S b/arch/arm/mm/proc-arm920.S
index 2556cf1c2da1..549557df6d57 100644
--- a/arch/arm/mm/proc-arm920.S
+++ b/arch/arm/mm/proc-arm920.S
@@ -410,8 +410,6 @@ ENTRY(cpu_arm920_do_resume)
410ENDPROC(cpu_arm920_do_resume) 410ENDPROC(cpu_arm920_do_resume)
411#endif 411#endif
412 412
413 __CPUINIT
414
415 .type __arm920_setup, #function 413 .type __arm920_setup, #function
416__arm920_setup: 414__arm920_setup:
417 mov r0, #0 415 mov r0, #0
diff --git a/arch/arm/mm/proc-arm922.S b/arch/arm/mm/proc-arm922.S
index 4464c49d7449..2a758b06c6f6 100644
--- a/arch/arm/mm/proc-arm922.S
+++ b/arch/arm/mm/proc-arm922.S
@@ -388,8 +388,6 @@ ENTRY(cpu_arm922_set_pte_ext)
388#endif /* CONFIG_MMU */ 388#endif /* CONFIG_MMU */
389 mov pc, lr 389 mov pc, lr
390 390
391 __CPUINIT
392
393 .type __arm922_setup, #function 391 .type __arm922_setup, #function
394__arm922_setup: 392__arm922_setup:
395 mov r0, #0 393 mov r0, #0
diff --git a/arch/arm/mm/proc-arm925.S b/arch/arm/mm/proc-arm925.S
index 281eb9b9c1d6..97448c3acf38 100644
--- a/arch/arm/mm/proc-arm925.S
+++ b/arch/arm/mm/proc-arm925.S
@@ -438,8 +438,6 @@ ENTRY(cpu_arm925_set_pte_ext)
438#endif /* CONFIG_MMU */ 438#endif /* CONFIG_MMU */
439 mov pc, lr 439 mov pc, lr
440 440
441 __CPUINIT
442
443 .type __arm925_setup, #function 441 .type __arm925_setup, #function
444__arm925_setup: 442__arm925_setup:
445 mov r0, #0 443 mov r0, #0
diff --git a/arch/arm/mm/proc-arm926.S b/arch/arm/mm/proc-arm926.S
index 344c8a548cc0..0f098f407c9f 100644
--- a/arch/arm/mm/proc-arm926.S
+++ b/arch/arm/mm/proc-arm926.S
@@ -425,8 +425,6 @@ ENTRY(cpu_arm926_do_resume)
425ENDPROC(cpu_arm926_do_resume) 425ENDPROC(cpu_arm926_do_resume)
426#endif 426#endif
427 427
428 __CPUINIT
429
430 .type __arm926_setup, #function 428 .type __arm926_setup, #function
431__arm926_setup: 429__arm926_setup:
432 mov r0, #0 430 mov r0, #0
diff --git a/arch/arm/mm/proc-arm940.S b/arch/arm/mm/proc-arm940.S
index 8da189d4a402..1c39a704ff6e 100644
--- a/arch/arm/mm/proc-arm940.S
+++ b/arch/arm/mm/proc-arm940.S
@@ -273,8 +273,6 @@ ENDPROC(arm940_dma_unmap_area)
273 @ define struct cpu_cache_fns (see <asm/cacheflush.h> and proc-macros.S) 273 @ define struct cpu_cache_fns (see <asm/cacheflush.h> and proc-macros.S)
274 define_cache_functions arm940 274 define_cache_functions arm940
275 275
276 __CPUINIT
277
278 .type __arm940_setup, #function 276 .type __arm940_setup, #function
279__arm940_setup: 277__arm940_setup:
280 mov r0, #0 278 mov r0, #0
diff --git a/arch/arm/mm/proc-arm946.S b/arch/arm/mm/proc-arm946.S
index f666cf34075a..0289cd905e73 100644
--- a/arch/arm/mm/proc-arm946.S
+++ b/arch/arm/mm/proc-arm946.S
@@ -326,8 +326,6 @@ ENTRY(cpu_arm946_dcache_clean_area)
326 mcr p15, 0, r0, c7, c10, 4 @ drain WB 326 mcr p15, 0, r0, c7, c10, 4 @ drain WB
327 mov pc, lr 327 mov pc, lr
328 328
329 __CPUINIT
330
331 .type __arm946_setup, #function 329 .type __arm946_setup, #function
332__arm946_setup: 330__arm946_setup:
333 mov r0, #0 331 mov r0, #0
diff --git a/arch/arm/mm/proc-arm9tdmi.S b/arch/arm/mm/proc-arm9tdmi.S
index 8881391dfb9e..f51197ba754a 100644
--- a/arch/arm/mm/proc-arm9tdmi.S
+++ b/arch/arm/mm/proc-arm9tdmi.S
@@ -51,8 +51,6 @@ ENTRY(cpu_arm9tdmi_reset)
51ENDPROC(cpu_arm9tdmi_reset) 51ENDPROC(cpu_arm9tdmi_reset)
52 .popsection 52 .popsection
53 53
54 __CPUINIT
55
56 .type __arm9tdmi_setup, #function 54 .type __arm9tdmi_setup, #function
57__arm9tdmi_setup: 55__arm9tdmi_setup:
58 mov pc, lr 56 mov pc, lr
diff --git a/arch/arm/mm/proc-fa526.S b/arch/arm/mm/proc-fa526.S
index aaeb6c127c7a..2dfc0f1d3bfd 100644
--- a/arch/arm/mm/proc-fa526.S
+++ b/arch/arm/mm/proc-fa526.S
@@ -135,8 +135,6 @@ ENTRY(cpu_fa526_set_pte_ext)
135#endif 135#endif
136 mov pc, lr 136 mov pc, lr
137 137
138 __CPUINIT
139
140 .type __fa526_setup, #function 138 .type __fa526_setup, #function
141__fa526_setup: 139__fa526_setup:
142 /* On return of this routine, r0 must carry correct flags for CFG register */ 140 /* On return of this routine, r0 must carry correct flags for CFG register */
diff --git a/arch/arm/mm/proc-feroceon.S b/arch/arm/mm/proc-feroceon.S
index 4106b09e0c29..d5146b98c8d1 100644
--- a/arch/arm/mm/proc-feroceon.S
+++ b/arch/arm/mm/proc-feroceon.S
@@ -514,8 +514,6 @@ ENTRY(cpu_feroceon_set_pte_ext)
514#endif 514#endif
515 mov pc, lr 515 mov pc, lr
516 516
517 __CPUINIT
518
519 .type __feroceon_setup, #function 517 .type __feroceon_setup, #function
520__feroceon_setup: 518__feroceon_setup:
521 mov r0, #0 519 mov r0, #0
diff --git a/arch/arm/mm/proc-mohawk.S b/arch/arm/mm/proc-mohawk.S
index 0b60dd3d742a..40acba595731 100644
--- a/arch/arm/mm/proc-mohawk.S
+++ b/arch/arm/mm/proc-mohawk.S
@@ -383,8 +383,6 @@ ENTRY(cpu_mohawk_do_resume)
383ENDPROC(cpu_mohawk_do_resume) 383ENDPROC(cpu_mohawk_do_resume)
384#endif 384#endif
385 385
386 __CPUINIT
387
388 .type __mohawk_setup, #function 386 .type __mohawk_setup, #function
389__mohawk_setup: 387__mohawk_setup:
390 mov r0, #0 388 mov r0, #0
diff --git a/arch/arm/mm/proc-sa110.S b/arch/arm/mm/proc-sa110.S
index 775d70fba937..c45319c8f1d9 100644
--- a/arch/arm/mm/proc-sa110.S
+++ b/arch/arm/mm/proc-sa110.S
@@ -159,8 +159,6 @@ ENTRY(cpu_sa110_set_pte_ext)
159#endif 159#endif
160 mov pc, lr 160 mov pc, lr
161 161
162 __CPUINIT
163
164 .type __sa110_setup, #function 162 .type __sa110_setup, #function
165__sa110_setup: 163__sa110_setup:
166 mov r10, #0 164 mov r10, #0
diff --git a/arch/arm/mm/proc-sa1100.S b/arch/arm/mm/proc-sa1100.S
index d92dfd081429..09d241ae2dbe 100644
--- a/arch/arm/mm/proc-sa1100.S
+++ b/arch/arm/mm/proc-sa1100.S
@@ -198,8 +198,6 @@ ENTRY(cpu_sa1100_do_resume)
198ENDPROC(cpu_sa1100_do_resume) 198ENDPROC(cpu_sa1100_do_resume)
199#endif 199#endif
200 200
201 __CPUINIT
202
203 .type __sa1100_setup, #function 201 .type __sa1100_setup, #function
204__sa1100_setup: 202__sa1100_setup:
205 mov r0, #0 203 mov r0, #0
diff --git a/arch/arm/mm/proc-v6.S b/arch/arm/mm/proc-v6.S
index 919405e20b80..1128064fddcb 100644
--- a/arch/arm/mm/proc-v6.S
+++ b/arch/arm/mm/proc-v6.S
@@ -140,8 +140,10 @@ ENTRY(cpu_v6_set_pte_ext)
140ENTRY(cpu_v6_do_suspend) 140ENTRY(cpu_v6_do_suspend)
141 stmfd sp!, {r4 - r9, lr} 141 stmfd sp!, {r4 - r9, lr}
142 mrc p15, 0, r4, c13, c0, 0 @ FCSE/PID 142 mrc p15, 0, r4, c13, c0, 0 @ FCSE/PID
143#ifdef CONFIG_MMU
143 mrc p15, 0, r5, c3, c0, 0 @ Domain ID 144 mrc p15, 0, r5, c3, c0, 0 @ Domain ID
144 mrc p15, 0, r6, c2, c0, 1 @ Translation table base 1 145 mrc p15, 0, r6, c2, c0, 1 @ Translation table base 1
146#endif
145 mrc p15, 0, r7, c1, c0, 1 @ auxiliary control register 147 mrc p15, 0, r7, c1, c0, 1 @ auxiliary control register
146 mrc p15, 0, r8, c1, c0, 2 @ co-processor access control 148 mrc p15, 0, r8, c1, c0, 2 @ co-processor access control
147 mrc p15, 0, r9, c1, c0, 0 @ control register 149 mrc p15, 0, r9, c1, c0, 0 @ control register
@@ -158,14 +160,16 @@ ENTRY(cpu_v6_do_resume)
158 mcr p15, 0, ip, c13, c0, 1 @ set reserved context ID 160 mcr p15, 0, ip, c13, c0, 1 @ set reserved context ID
159 ldmia r0, {r4 - r9} 161 ldmia r0, {r4 - r9}
160 mcr p15, 0, r4, c13, c0, 0 @ FCSE/PID 162 mcr p15, 0, r4, c13, c0, 0 @ FCSE/PID
163#ifdef CONFIG_MMU
161 mcr p15, 0, r5, c3, c0, 0 @ Domain ID 164 mcr p15, 0, r5, c3, c0, 0 @ Domain ID
162 ALT_SMP(orr r1, r1, #TTB_FLAGS_SMP) 165 ALT_SMP(orr r1, r1, #TTB_FLAGS_SMP)
163 ALT_UP(orr r1, r1, #TTB_FLAGS_UP) 166 ALT_UP(orr r1, r1, #TTB_FLAGS_UP)
164 mcr p15, 0, r1, c2, c0, 0 @ Translation table base 0 167 mcr p15, 0, r1, c2, c0, 0 @ Translation table base 0
165 mcr p15, 0, r6, c2, c0, 1 @ Translation table base 1 168 mcr p15, 0, r6, c2, c0, 1 @ Translation table base 1
169 mcr p15, 0, ip, c2, c0, 2 @ TTB control register
170#endif
166 mcr p15, 0, r7, c1, c0, 1 @ auxiliary control register 171 mcr p15, 0, r7, c1, c0, 1 @ auxiliary control register
167 mcr p15, 0, r8, c1, c0, 2 @ co-processor access control 172 mcr p15, 0, r8, c1, c0, 2 @ co-processor access control
168 mcr p15, 0, ip, c2, c0, 2 @ TTB control register
169 mcr p15, 0, ip, c7, c5, 4 @ ISB 173 mcr p15, 0, ip, c7, c5, 4 @ ISB
170 mov r0, r9 @ control register 174 mov r0, r9 @ control register
171 b cpu_resume_mmu 175 b cpu_resume_mmu
@@ -176,8 +180,6 @@ ENDPROC(cpu_v6_do_resume)
176 180
177 .align 181 .align
178 182
179 __CPUINIT
180
181/* 183/*
182 * __v6_setup 184 * __v6_setup
183 * 185 *
diff --git a/arch/arm/mm/proc-v7-2level.S b/arch/arm/mm/proc-v7-2level.S
index 9704097c450e..bdd3be4be77a 100644
--- a/arch/arm/mm/proc-v7-2level.S
+++ b/arch/arm/mm/proc-v7-2level.S
@@ -110,7 +110,7 @@ ENTRY(cpu_v7_set_pte_ext)
110 ARM( str r3, [r0, #2048]! ) 110 ARM( str r3, [r0, #2048]! )
111 THUMB( add r0, r0, #2048 ) 111 THUMB( add r0, r0, #2048 )
112 THUMB( str r3, [r0] ) 112 THUMB( str r3, [r0] )
113 ALT_SMP(mov pc,lr) 113 ALT_SMP(W(nop))
114 ALT_UP (mcr p15, 0, r0, c7, c10, 1) @ flush_pte 114 ALT_UP (mcr p15, 0, r0, c7, c10, 1) @ flush_pte
115#endif 115#endif
116 mov pc, lr 116 mov pc, lr
@@ -160,8 +160,6 @@ ENDPROC(cpu_v7_set_pte_ext)
160 mcr p15, 0, \ttbr1, c2, c0, 1 @ load TTB1 160 mcr p15, 0, \ttbr1, c2, c0, 1 @ load TTB1
161 .endm 161 .endm
162 162
163 __CPUINIT
164
165 /* AT 163 /* AT
166 * TFR EV X F I D LR S 164 * TFR EV X F I D LR S
167 * .EEE ..EE PUI. .T.T 4RVI ZWRS BLDP WCAM 165 * .EEE ..EE PUI. .T.T 4RVI ZWRS BLDP WCAM
@@ -172,5 +170,3 @@ ENDPROC(cpu_v7_set_pte_ext)
172 .type v7_crval, #object 170 .type v7_crval, #object
173v7_crval: 171v7_crval:
174 crval clear=0x2120c302, mmuset=0x10c03c7d, ucset=0x00c01c7c 172 crval clear=0x2120c302, mmuset=0x10c03c7d, ucset=0x00c01c7c
175
176 .previous
diff --git a/arch/arm/mm/proc-v7-3level.S b/arch/arm/mm/proc-v7-3level.S
index 363027e811d6..01a719e18bb0 100644
--- a/arch/arm/mm/proc-v7-3level.S
+++ b/arch/arm/mm/proc-v7-3level.S
@@ -39,6 +39,14 @@
39#define TTB_FLAGS_SMP (TTB_IRGN_WBWA|TTB_S|TTB_RGN_OC_WBWA) 39#define TTB_FLAGS_SMP (TTB_IRGN_WBWA|TTB_S|TTB_RGN_OC_WBWA)
40#define PMD_FLAGS_SMP (PMD_SECT_WBWA|PMD_SECT_S) 40#define PMD_FLAGS_SMP (PMD_SECT_WBWA|PMD_SECT_S)
41 41
42#ifndef __ARMEB__
43# define rpgdl r0
44# define rpgdh r1
45#else
46# define rpgdl r1
47# define rpgdh r0
48#endif
49
42/* 50/*
43 * cpu_v7_switch_mm(pgd_phys, tsk) 51 * cpu_v7_switch_mm(pgd_phys, tsk)
44 * 52 *
@@ -47,10 +55,10 @@
47 */ 55 */
48ENTRY(cpu_v7_switch_mm) 56ENTRY(cpu_v7_switch_mm)
49#ifdef CONFIG_MMU 57#ifdef CONFIG_MMU
50 mmid r1, r1 @ get mm->context.id 58 mmid r2, r2
51 asid r3, r1 59 asid r2, r2
52 mov r3, r3, lsl #(48 - 32) @ ASID 60 orr rpgdh, rpgdh, r2, lsl #(48 - 32) @ upper 32-bits of pgd
53 mcrr p15, 0, r0, r3, c2 @ set TTB 0 61 mcrr p15, 0, rpgdl, rpgdh, c2 @ set TTB 0
54 isb 62 isb
55#endif 63#endif
56 mov pc, lr 64 mov pc, lr
@@ -73,7 +81,7 @@ ENTRY(cpu_v7_set_pte_ext)
73 tst r3, #1 << (55 - 32) @ L_PTE_DIRTY 81 tst r3, #1 << (55 - 32) @ L_PTE_DIRTY
74 orreq r2, #L_PTE_RDONLY 82 orreq r2, #L_PTE_RDONLY
751: strd r2, r3, [r0] 831: strd r2, r3, [r0]
76 ALT_SMP(mov pc, lr) 84 ALT_SMP(W(nop))
77 ALT_UP (mcr p15, 0, r0, c7, c10, 1) @ flush_pte 85 ALT_UP (mcr p15, 0, r0, c7, c10, 1) @ flush_pte
78#endif 86#endif
79 mov pc, lr 87 mov pc, lr
@@ -106,7 +114,8 @@ ENDPROC(cpu_v7_set_pte_ext)
106 */ 114 */
107 .macro v7_ttb_setup, zero, ttbr0, ttbr1, tmp 115 .macro v7_ttb_setup, zero, ttbr0, ttbr1, tmp
108 ldr \tmp, =swapper_pg_dir @ swapper_pg_dir virtual address 116 ldr \tmp, =swapper_pg_dir @ swapper_pg_dir virtual address
109 cmp \ttbr1, \tmp @ PHYS_OFFSET > PAGE_OFFSET? (branch below) 117 mov \tmp, \tmp, lsr #ARCH_PGD_SHIFT
118 cmp \ttbr1, \tmp @ PHYS_OFFSET > PAGE_OFFSET?
110 mrc p15, 0, \tmp, c2, c0, 2 @ TTB control register 119 mrc p15, 0, \tmp, c2, c0, 2 @ TTB control register
111 orr \tmp, \tmp, #TTB_EAE 120 orr \tmp, \tmp, #TTB_EAE
112 ALT_SMP(orr \tmp, \tmp, #TTB_FLAGS_SMP) 121 ALT_SMP(orr \tmp, \tmp, #TTB_FLAGS_SMP)
@@ -114,31 +123,23 @@ ENDPROC(cpu_v7_set_pte_ext)
114 ALT_SMP(orr \tmp, \tmp, #TTB_FLAGS_SMP << 16) 123 ALT_SMP(orr \tmp, \tmp, #TTB_FLAGS_SMP << 16)
115 ALT_UP(orr \tmp, \tmp, #TTB_FLAGS_UP << 16) 124 ALT_UP(orr \tmp, \tmp, #TTB_FLAGS_UP << 16)
116 /* 125 /*
117 * TTBR0/TTBR1 split (PAGE_OFFSET): 126 * Only use split TTBRs if PHYS_OFFSET <= PAGE_OFFSET (cmp above),
118 * 0x40000000: T0SZ = 2, T1SZ = 0 (not used) 127 * otherwise booting secondary CPUs would end up using TTBR1 for the
119 * 0x80000000: T0SZ = 0, T1SZ = 1 128 * identity mapping set up in TTBR0.
120 * 0xc0000000: T0SZ = 0, T1SZ = 2
121 *
122 * Only use this feature if PHYS_OFFSET <= PAGE_OFFSET, otherwise
123 * booting secondary CPUs would end up using TTBR1 for the identity
124 * mapping set up in TTBR0.
125 */ 129 */
126 bhi 9001f @ PHYS_OFFSET > PAGE_OFFSET? 130 orrls \tmp, \tmp, #TTBR1_SIZE @ TTBCR.T1SZ
127 orr \tmp, \tmp, #(((PAGE_OFFSET >> 30) - 1) << 16) @ TTBCR.T1SZ 131 mcr p15, 0, \tmp, c2, c0, 2 @ TTBCR
128#if defined CONFIG_VMSPLIT_2G 132 mov \tmp, \ttbr1, lsr #(32 - ARCH_PGD_SHIFT) @ upper bits
129 /* PAGE_OFFSET == 0x80000000, T1SZ == 1 */ 133 mov \ttbr1, \ttbr1, lsl #ARCH_PGD_SHIFT @ lower bits
130 add \ttbr1, \ttbr1, #1 << 4 @ skip two L1 entries 134 addls \ttbr1, \ttbr1, #TTBR1_OFFSET
131#elif defined CONFIG_VMSPLIT_3G 135 mcrr p15, 1, \ttbr1, \zero, c2 @ load TTBR1
132 /* PAGE_OFFSET == 0xc0000000, T1SZ == 2 */ 136 mov \tmp, \ttbr0, lsr #(32 - ARCH_PGD_SHIFT) @ upper bits
133 add \ttbr1, \ttbr1, #4096 * (1 + 3) @ only L2 used, skip pgd+3*pmd 137 mov \ttbr0, \ttbr0, lsl #ARCH_PGD_SHIFT @ lower bits
134#endif 138 mcrr p15, 0, \ttbr0, \zero, c2 @ load TTBR0
135 /* CONFIG_VMSPLIT_1G does not need TTBR1 adjustment */ 139 mcrr p15, 1, \ttbr1, \zero, c2 @ load TTBR1
1369001: mcr p15, 0, \tmp, c2, c0, 2 @ TTB control register 140 mcrr p15, 0, \ttbr0, \zero, c2 @ load TTBR0
137 mcrr p15, 1, \ttbr1, \zero, c2 @ load TTBR1
138 .endm 141 .endm
139 142
140 __CPUINIT
141
142 /* 143 /*
143 * AT 144 * AT
144 * TFR EV X F IHD LR S 145 * TFR EV X F IHD LR S
@@ -150,5 +151,3 @@ ENDPROC(cpu_v7_set_pte_ext)
150 .type v7_crval, #object 151 .type v7_crval, #object
151v7_crval: 152v7_crval:
152 crval clear=0x0120c302, mmuset=0x30c23c7d, ucset=0x00c01c7c 153 crval clear=0x0120c302, mmuset=0x30c23c7d, ucset=0x00c01c7c
153
154 .previous
diff --git a/arch/arm/mm/proc-v7.S b/arch/arm/mm/proc-v7.S
index e35fec34453e..73398bcf9bd8 100644
--- a/arch/arm/mm/proc-v7.S
+++ b/arch/arm/mm/proc-v7.S
@@ -75,13 +75,14 @@ ENTRY(cpu_v7_do_idle)
75ENDPROC(cpu_v7_do_idle) 75ENDPROC(cpu_v7_do_idle)
76 76
77ENTRY(cpu_v7_dcache_clean_area) 77ENTRY(cpu_v7_dcache_clean_area)
78 ALT_SMP(mov pc, lr) @ MP extensions imply L1 PTW 78 ALT_SMP(W(nop)) @ MP extensions imply L1 PTW
79 ALT_UP(W(nop)) 79 ALT_UP_B(1f)
80 dcache_line_size r2, r3 80 mov pc, lr
811: mcr p15, 0, r0, c7, c10, 1 @ clean D entry 811: dcache_line_size r2, r3
822: mcr p15, 0, r0, c7, c10, 1 @ clean D entry
82 add r0, r0, r2 83 add r0, r0, r2
83 subs r1, r1, r2 84 subs r1, r1, r2
84 bhi 1b 85 bhi 2b
85 dsb 86 dsb
86 mov pc, lr 87 mov pc, lr
87ENDPROC(cpu_v7_dcache_clean_area) 88ENDPROC(cpu_v7_dcache_clean_area)
@@ -98,9 +99,11 @@ ENTRY(cpu_v7_do_suspend)
98 mrc p15, 0, r4, c13, c0, 0 @ FCSE/PID 99 mrc p15, 0, r4, c13, c0, 0 @ FCSE/PID
99 mrc p15, 0, r5, c13, c0, 3 @ User r/o thread ID 100 mrc p15, 0, r5, c13, c0, 3 @ User r/o thread ID
100 stmia r0!, {r4 - r5} 101 stmia r0!, {r4 - r5}
102#ifdef CONFIG_MMU
101 mrc p15, 0, r6, c3, c0, 0 @ Domain ID 103 mrc p15, 0, r6, c3, c0, 0 @ Domain ID
102 mrc p15, 0, r7, c2, c0, 1 @ TTB 1 104 mrc p15, 0, r7, c2, c0, 1 @ TTB 1
103 mrc p15, 0, r11, c2, c0, 2 @ TTB control register 105 mrc p15, 0, r11, c2, c0, 2 @ TTB control register
106#endif
104 mrc p15, 0, r8, c1, c0, 0 @ Control register 107 mrc p15, 0, r8, c1, c0, 0 @ Control register
105 mrc p15, 0, r9, c1, c0, 1 @ Auxiliary control register 108 mrc p15, 0, r9, c1, c0, 1 @ Auxiliary control register
106 mrc p15, 0, r10, c1, c0, 2 @ Co-processor access control 109 mrc p15, 0, r10, c1, c0, 2 @ Co-processor access control
@@ -110,13 +113,14 @@ ENDPROC(cpu_v7_do_suspend)
110 113
111ENTRY(cpu_v7_do_resume) 114ENTRY(cpu_v7_do_resume)
112 mov ip, #0 115 mov ip, #0
113 mcr p15, 0, ip, c8, c7, 0 @ invalidate TLBs
114 mcr p15, 0, ip, c7, c5, 0 @ invalidate I cache 116 mcr p15, 0, ip, c7, c5, 0 @ invalidate I cache
115 mcr p15, 0, ip, c13, c0, 1 @ set reserved context ID 117 mcr p15, 0, ip, c13, c0, 1 @ set reserved context ID
116 ldmia r0!, {r4 - r5} 118 ldmia r0!, {r4 - r5}
117 mcr p15, 0, r4, c13, c0, 0 @ FCSE/PID 119 mcr p15, 0, r4, c13, c0, 0 @ FCSE/PID
118 mcr p15, 0, r5, c13, c0, 3 @ User r/o thread ID 120 mcr p15, 0, r5, c13, c0, 3 @ User r/o thread ID
119 ldmia r0, {r6 - r11} 121 ldmia r0, {r6 - r11}
122#ifdef CONFIG_MMU
123 mcr p15, 0, ip, c8, c7, 0 @ invalidate TLBs
120 mcr p15, 0, r6, c3, c0, 0 @ Domain ID 124 mcr p15, 0, r6, c3, c0, 0 @ Domain ID
121#ifndef CONFIG_ARM_LPAE 125#ifndef CONFIG_ARM_LPAE
122 ALT_SMP(orr r1, r1, #TTB_FLAGS_SMP) 126 ALT_SMP(orr r1, r1, #TTB_FLAGS_SMP)
@@ -125,14 +129,15 @@ ENTRY(cpu_v7_do_resume)
125 mcr p15, 0, r1, c2, c0, 0 @ TTB 0 129 mcr p15, 0, r1, c2, c0, 0 @ TTB 0
126 mcr p15, 0, r7, c2, c0, 1 @ TTB 1 130 mcr p15, 0, r7, c2, c0, 1 @ TTB 1
127 mcr p15, 0, r11, c2, c0, 2 @ TTB control register 131 mcr p15, 0, r11, c2, c0, 2 @ TTB control register
128 mrc p15, 0, r4, c1, c0, 1 @ Read Auxiliary control register
129 teq r4, r9 @ Is it already set?
130 mcrne p15, 0, r9, c1, c0, 1 @ No, so write it
131 mcr p15, 0, r10, c1, c0, 2 @ Co-processor access control
132 ldr r4, =PRRR @ PRRR 132 ldr r4, =PRRR @ PRRR
133 ldr r5, =NMRR @ NMRR 133 ldr r5, =NMRR @ NMRR
134 mcr p15, 0, r4, c10, c2, 0 @ write PRRR 134 mcr p15, 0, r4, c10, c2, 0 @ write PRRR
135 mcr p15, 0, r5, c10, c2, 1 @ write NMRR 135 mcr p15, 0, r5, c10, c2, 1 @ write NMRR
136#endif /* CONFIG_MMU */
137 mrc p15, 0, r4, c1, c0, 1 @ Read Auxiliary control register
138 teq r4, r9 @ Is it already set?
139 mcrne p15, 0, r9, c1, c0, 1 @ No, so write it
140 mcr p15, 0, r10, c1, c0, 2 @ Co-processor access control
136 isb 141 isb
137 dsb 142 dsb
138 mov r0, r8 @ control register 143 mov r0, r8 @ control register
@@ -163,8 +168,6 @@ ENDPROC(cpu_pj4b_do_idle)
163 168
164#endif 169#endif
165 170
166 __CPUINIT
167
168/* 171/*
169 * __v7_setup 172 * __v7_setup
170 * 173 *
@@ -178,7 +181,8 @@ ENDPROC(cpu_pj4b_do_idle)
178 */ 181 */
179__v7_ca5mp_setup: 182__v7_ca5mp_setup:
180__v7_ca9mp_setup: 183__v7_ca9mp_setup:
181 mov r10, #(1 << 0) @ TLB ops broadcasting 184__v7_cr7mp_setup:
185 mov r10, #(1 << 0) @ Cache/TLB ops broadcasting
182 b 1f 186 b 1f
183__v7_ca7mp_setup: 187__v7_ca7mp_setup:
184__v7_ca15mp_setup: 188__v7_ca15mp_setup:
@@ -443,6 +447,16 @@ __v7_pj4b_proc_info:
443#endif 447#endif
444 448
445 /* 449 /*
450 * ARM Ltd. Cortex R7 processor.
451 */
452 .type __v7_cr7mp_proc_info, #object
453__v7_cr7mp_proc_info:
454 .long 0x410fc170
455 .long 0xff0ffff0
456 __v7_proc __v7_cr7mp_setup
457 .size __v7_cr7mp_proc_info, . - __v7_cr7mp_proc_info
458
459 /*
446 * ARM Ltd. Cortex A7 processor. 460 * ARM Ltd. Cortex A7 processor.
447 */ 461 */
448 .type __v7_ca7mp_proc_info, #object 462 .type __v7_ca7mp_proc_info, #object
diff --git a/arch/arm/mm/proc-v7m.S b/arch/arm/mm/proc-v7m.S
new file mode 100644
index 000000000000..0c93588fcb91
--- /dev/null
+++ b/arch/arm/mm/proc-v7m.S
@@ -0,0 +1,157 @@
1/*
2 * linux/arch/arm/mm/proc-v7m.S
3 *
4 * Copyright (C) 2008 ARM Ltd.
5 * Copyright (C) 2001 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 version 2 as
9 * published by the Free Software Foundation.
10 *
11 * This is the "shell" of the ARMv7-M processor support.
12 */
13#include <linux/linkage.h>
14#include <asm/assembler.h>
15#include <asm/v7m.h>
16#include "proc-macros.S"
17
18ENTRY(cpu_v7m_proc_init)
19 mov pc, lr
20ENDPROC(cpu_v7m_proc_init)
21
22ENTRY(cpu_v7m_proc_fin)
23 mov pc, lr
24ENDPROC(cpu_v7m_proc_fin)
25
26/*
27 * cpu_v7m_reset(loc)
28 *
29 * Perform a soft reset of the system. Put the CPU into the
30 * same state as it would be if it had been reset, and branch
31 * to what would be the reset vector.
32 *
33 * - loc - location to jump to for soft reset
34 */
35 .align 5
36ENTRY(cpu_v7m_reset)
37 mov pc, r0
38ENDPROC(cpu_v7m_reset)
39
40/*
41 * cpu_v7m_do_idle()
42 *
43 * Idle the processor (eg, wait for interrupt).
44 *
45 * IRQs are already disabled.
46 */
47ENTRY(cpu_v7m_do_idle)
48 wfi
49 mov pc, lr
50ENDPROC(cpu_v7m_do_idle)
51
52ENTRY(cpu_v7m_dcache_clean_area)
53 mov pc, lr
54ENDPROC(cpu_v7m_dcache_clean_area)
55
56/*
57 * There is no MMU, so here is nothing to do.
58 */
59ENTRY(cpu_v7m_switch_mm)
60 mov pc, lr
61ENDPROC(cpu_v7m_switch_mm)
62
63.globl cpu_v7m_suspend_size
64.equ cpu_v7m_suspend_size, 0
65
66#ifdef CONFIG_ARM_CPU_SUSPEND
67ENTRY(cpu_v7m_do_suspend)
68 mov pc, lr
69ENDPROC(cpu_v7m_do_suspend)
70
71ENTRY(cpu_v7m_do_resume)
72 mov pc, lr
73ENDPROC(cpu_v7m_do_resume)
74#endif
75
76 .section ".text.init", #alloc, #execinstr
77
78/*
79 * __v7m_setup
80 *
81 * This should be able to cover all ARMv7-M cores.
82 */
83__v7m_setup:
84 @ Configure the vector table base address
85 ldr r0, =BASEADDR_V7M_SCB
86 ldr r12, =vector_table
87 str r12, [r0, V7M_SCB_VTOR]
88
89 @ enable UsageFault, BusFault and MemManage fault.
90 ldr r5, [r0, #V7M_SCB_SHCSR]
91 orr r5, #(V7M_SCB_SHCSR_USGFAULTENA | V7M_SCB_SHCSR_BUSFAULTENA | V7M_SCB_SHCSR_MEMFAULTENA)
92 str r5, [r0, #V7M_SCB_SHCSR]
93
94 @ Lower the priority of the SVC and PendSV exceptions
95 mov r5, #0x80000000
96 str r5, [r0, V7M_SCB_SHPR2] @ set SVC priority
97 mov r5, #0x00800000
98 str r5, [r0, V7M_SCB_SHPR3] @ set PendSV priority
99
100 @ SVC to run the kernel in this mode
101 adr r1, BSYM(1f)
102 ldr r5, [r12, #11 * 4] @ read the SVC vector entry
103 str r1, [r12, #11 * 4] @ write the temporary SVC vector entry
104 mov r6, lr @ save LR
105 mov r7, sp @ save SP
106 ldr sp, =__v7m_setup_stack_top
107 cpsie i
108 svc #0
1091: cpsid i
110 str r5, [r12, #11 * 4] @ restore the original SVC vector entry
111 mov lr, r6 @ restore LR
112 mov sp, r7 @ restore SP
113
114 @ Special-purpose control register
115 mov r1, #1
116 msr control, r1 @ Thread mode has unpriviledged access
117
118 @ Configure the System Control Register to ensure 8-byte stack alignment
119 @ Note the STKALIGN bit is either RW or RAO.
120 ldr r12, [r0, V7M_SCB_CCR] @ system control register
121 orr r12, #V7M_SCB_CCR_STKALIGN
122 str r12, [r0, V7M_SCB_CCR]
123 mov pc, lr
124ENDPROC(__v7m_setup)
125
126 define_processor_functions v7m, dabort=nommu_early_abort, pabort=legacy_pabort, nommu=1
127
128 .section ".rodata"
129 string cpu_arch_name, "armv7m"
130 string cpu_elf_name "v7m"
131 string cpu_v7m_name "ARMv7-M"
132
133 .section ".proc.info.init", #alloc, #execinstr
134
135 /*
136 * Match any ARMv7-M processor core.
137 */
138 .type __v7m_proc_info, #object
139__v7m_proc_info:
140 .long 0x000f0000 @ Required ID value
141 .long 0x000f0000 @ Mask for ID
142 .long 0 @ proc_info_list.__cpu_mm_mmu_flags
143 .long 0 @ proc_info_list.__cpu_io_mmu_flags
144 b __v7m_setup @ proc_info_list.__cpu_flush
145 .long cpu_arch_name
146 .long cpu_elf_name
147 .long HWCAP_HALF|HWCAP_THUMB|HWCAP_FAST_MULT
148 .long cpu_v7m_name
149 .long v7m_processor_functions @ proc_info_list.proc
150 .long 0 @ proc_info_list.tlb
151 .long 0 @ proc_info_list.user
152 .long nop_cache_fns @ proc_info_list.cache
153 .size __v7m_proc_info, . - __v7m_proc_info
154
155__v7m_setup_stack:
156 .space 4 * 8 @ 8 registers
157__v7m_setup_stack_top:
diff --git a/arch/arm/mm/proc-xsc3.S b/arch/arm/mm/proc-xsc3.S
index e8efd83b6f25..dc1645890042 100644
--- a/arch/arm/mm/proc-xsc3.S
+++ b/arch/arm/mm/proc-xsc3.S
@@ -446,8 +446,6 @@ ENTRY(cpu_xsc3_do_resume)
446ENDPROC(cpu_xsc3_do_resume) 446ENDPROC(cpu_xsc3_do_resume)
447#endif 447#endif
448 448
449 __CPUINIT
450
451 .type __xsc3_setup, #function 449 .type __xsc3_setup, #function
452__xsc3_setup: 450__xsc3_setup:
453 mov r0, #PSR_F_BIT|PSR_I_BIT|SVC_MODE 451 mov r0, #PSR_F_BIT|PSR_I_BIT|SVC_MODE
diff --git a/arch/arm/mm/proc-xscale.S b/arch/arm/mm/proc-xscale.S
index e766f889bfd6..d19b1cfcad91 100644
--- a/arch/arm/mm/proc-xscale.S
+++ b/arch/arm/mm/proc-xscale.S
@@ -558,8 +558,6 @@ ENTRY(cpu_xscale_do_resume)
558ENDPROC(cpu_xscale_do_resume) 558ENDPROC(cpu_xscale_do_resume)
559#endif 559#endif
560 560
561 __CPUINIT
562
563 .type __xscale_setup, #function 561 .type __xscale_setup, #function
564__xscale_setup: 562__xscale_setup:
565 mcr p15, 0, ip, c7, c7, 0 @ invalidate I, D caches & BTB 563 mcr p15, 0, ip, c7, c7, 0 @ invalidate I, D caches & BTB
diff --git a/arch/arm/net/bpf_jit_32.c b/arch/arm/net/bpf_jit_32.c
index 1a643ee8e082..f50d223a0bd3 100644
--- a/arch/arm/net/bpf_jit_32.c
+++ b/arch/arm/net/bpf_jit_32.c
@@ -900,8 +900,7 @@ void bpf_jit_compile(struct sk_filter *fp)
900#endif 900#endif
901 901
902 alloc_size = 4 * ctx.idx; 902 alloc_size = 4 * ctx.idx;
903 ctx.target = module_alloc(max(sizeof(struct work_struct), 903 ctx.target = module_alloc(alloc_size);
904 alloc_size));
905 if (unlikely(ctx.target == NULL)) 904 if (unlikely(ctx.target == NULL))
906 goto out; 905 goto out;
907 906
@@ -927,19 +926,8 @@ out:
927 return; 926 return;
928} 927}
929 928
930static void bpf_jit_free_worker(struct work_struct *work)
931{
932 module_free(NULL, work);
933}
934
935void bpf_jit_free(struct sk_filter *fp) 929void bpf_jit_free(struct sk_filter *fp)
936{ 930{
937 struct work_struct *work; 931 if (fp->bpf_func != sk_run_filter)
938 932 module_free(NULL, fp->bpf_func);
939 if (fp->bpf_func != sk_run_filter) {
940 work = (struct work_struct *)fp->bpf_func;
941
942 INIT_WORK(work, bpf_jit_free_worker);
943 schedule_work(work);
944 }
945} 933}
diff --git a/arch/arm/plat-iop/adma.c b/arch/arm/plat-iop/adma.c
index 1ff6a37e893c..a4d1f8de3b5b 100644
--- a/arch/arm/plat-iop/adma.c
+++ b/arch/arm/plat-iop/adma.c
@@ -192,12 +192,10 @@ static int __init iop3xx_adma_cap_init(void)
192 192
193 #ifdef CONFIG_ARCH_IOP32X /* the 32x AAU does not perform zero sum */ 193 #ifdef CONFIG_ARCH_IOP32X /* the 32x AAU does not perform zero sum */
194 dma_cap_set(DMA_XOR, iop3xx_aau_data.cap_mask); 194 dma_cap_set(DMA_XOR, iop3xx_aau_data.cap_mask);
195 dma_cap_set(DMA_MEMSET, iop3xx_aau_data.cap_mask);
196 dma_cap_set(DMA_INTERRUPT, iop3xx_aau_data.cap_mask); 195 dma_cap_set(DMA_INTERRUPT, iop3xx_aau_data.cap_mask);
197 #else 196 #else
198 dma_cap_set(DMA_XOR, iop3xx_aau_data.cap_mask); 197 dma_cap_set(DMA_XOR, iop3xx_aau_data.cap_mask);
199 dma_cap_set(DMA_XOR_VAL, iop3xx_aau_data.cap_mask); 198 dma_cap_set(DMA_XOR_VAL, iop3xx_aau_data.cap_mask);
200 dma_cap_set(DMA_MEMSET, iop3xx_aau_data.cap_mask);
201 dma_cap_set(DMA_INTERRUPT, iop3xx_aau_data.cap_mask); 199 dma_cap_set(DMA_INTERRUPT, iop3xx_aau_data.cap_mask);
202 #endif 200 #endif
203 201
diff --git a/arch/arm/plat-iop/gpio.c b/arch/arm/plat-iop/gpio.c
index e4de9be78feb..697de6dc4936 100644
--- a/arch/arm/plat-iop/gpio.c
+++ b/arch/arm/plat-iop/gpio.c
@@ -17,6 +17,7 @@
17#include <linux/gpio.h> 17#include <linux/gpio.h>
18#include <linux/export.h> 18#include <linux/export.h>
19#include <asm/hardware/iop3xx.h> 19#include <asm/hardware/iop3xx.h>
20#include <mach/gpio.h>
20 21
21void gpio_line_config(int line, int direction) 22void gpio_line_config(int line, int direction)
22{ 23{
diff --git a/arch/arm/plat-iop/restart.c b/arch/arm/plat-iop/restart.c
index 33fa699a4d28..3a4d5e5fde52 100644
--- a/arch/arm/plat-iop/restart.c
+++ b/arch/arm/plat-iop/restart.c
@@ -11,7 +11,7 @@
11#include <asm/system_misc.h> 11#include <asm/system_misc.h>
12#include <mach/hardware.h> 12#include <mach/hardware.h>
13 13
14void iop3xx_restart(char mode, const char *cmd) 14void iop3xx_restart(enum reboot_mode mode, const char *cmd)
15{ 15{
16 *IOP3XX_PCSR = 0x30; 16 *IOP3XX_PCSR = 0x30;
17 17
diff --git a/arch/arm/plat-iop/time.c b/arch/arm/plat-iop/time.c
index 837a2d52e9db..29606bd75f3f 100644
--- a/arch/arm/plat-iop/time.c
+++ b/arch/arm/plat-iop/time.c
@@ -22,9 +22,9 @@
22#include <linux/clocksource.h> 22#include <linux/clocksource.h>
23#include <linux/clockchips.h> 23#include <linux/clockchips.h>
24#include <linux/export.h> 24#include <linux/export.h>
25#include <linux/sched_clock.h>
25#include <mach/hardware.h> 26#include <mach/hardware.h>
26#include <asm/irq.h> 27#include <asm/irq.h>
27#include <asm/sched_clock.h>
28#include <asm/uaccess.h> 28#include <asm/uaccess.h>
29#include <asm/mach/irq.h> 29#include <asm/mach/irq.h>
30#include <asm/mach/time.h> 30#include <asm/mach/time.h>
diff --git a/arch/arm/plat-omap/Kconfig b/arch/arm/plat-omap/Kconfig
index ce66eb9be481..f82bae2171eb 100644
--- a/arch/arm/plat-omap/Kconfig
+++ b/arch/arm/plat-omap/Kconfig
@@ -86,22 +86,6 @@ config OMAP_MUX_WARNINGS
86 to change the pin multiplexing setup. When there are no warnings 86 to change the pin multiplexing setup. When there are no warnings
87 printed, it's safe to deselect OMAP_MUX for your product. 87 printed, it's safe to deselect OMAP_MUX for your product.
88 88
89config OMAP_MBOX_FWK
90 tristate "Mailbox framework support"
91 depends on ARCH_OMAP && !ARCH_MULTIPLATFORM
92 help
93 Say Y here if you want to use OMAP Mailbox framework support for
94 DSP, IVA1.0 and IVA2 in OMAP1/2/3.
95
96config OMAP_MBOX_KFIFO_SIZE
97 int "Mailbox kfifo default buffer size (bytes)"
98 depends on OMAP_MBOX_FWK
99 default 256
100 help
101 Specify the default size of mailbox's kfifo buffers (bytes).
102 This can also be changed at runtime (via the mbox_kfifo_size
103 module parameter).
104
105config OMAP_IOMMU_IVA2 89config OMAP_IOMMU_IVA2
106 bool 90 bool
107 91
diff --git a/arch/arm/plat-omap/Makefile b/arch/arm/plat-omap/Makefile
index 31199417b56a..0b01b68fd033 100644
--- a/arch/arm/plat-omap/Makefile
+++ b/arch/arm/plat-omap/Makefile
@@ -17,6 +17,3 @@ obj-$(CONFIG_OMAP_DEBUG_LEDS) += debug-leds.o
17i2c-omap-$(CONFIG_I2C_OMAP) := i2c.o 17i2c-omap-$(CONFIG_I2C_OMAP) := i2c.o
18obj-y += $(i2c-omap-m) $(i2c-omap-y) 18obj-y += $(i2c-omap-m) $(i2c-omap-y)
19 19
20# OMAP mailbox framework
21obj-$(CONFIG_OMAP_MBOX_FWK) += mailbox.o
22
diff --git a/arch/arm/plat-omap/counter_32k.c b/arch/arm/plat-omap/counter_32k.c
index 5b0b86bb34bb..d9bc98eb2a6b 100644
--- a/arch/arm/plat-omap/counter_32k.c
+++ b/arch/arm/plat-omap/counter_32k.c
@@ -18,9 +18,9 @@
18#include <linux/err.h> 18#include <linux/err.h>
19#include <linux/io.h> 19#include <linux/io.h>
20#include <linux/clocksource.h> 20#include <linux/clocksource.h>
21#include <linux/sched_clock.h>
21 22
22#include <asm/mach/time.h> 23#include <asm/mach/time.h>
23#include <asm/sched_clock.h>
24 24
25#include <plat/counter-32k.h> 25#include <plat/counter-32k.h>
26 26
diff --git a/arch/arm/plat-omap/dma.c b/arch/arm/plat-omap/dma.c
index e06c34bdc34a..4d463ca6821f 100644
--- a/arch/arm/plat-omap/dma.c
+++ b/arch/arm/plat-omap/dma.c
@@ -701,8 +701,8 @@ int omap_request_dma(int dev_id, const char *dev_name,
701 for (ch = 0; ch < dma_chan_count; ch++) { 701 for (ch = 0; ch < dma_chan_count; ch++) {
702 if (free_ch == -1 && dma_chan[ch].dev_id == -1) { 702 if (free_ch == -1 && dma_chan[ch].dev_id == -1) {
703 free_ch = ch; 703 free_ch = ch;
704 if (dev_id == 0) 704 /* Exit after first free channel found */
705 break; 705 break;
706 } 706 }
707 } 707 }
708 if (free_ch == -1) { 708 if (free_ch == -1) {
@@ -894,11 +894,12 @@ void omap_start_dma(int lch)
894 int next_lch, cur_lch; 894 int next_lch, cur_lch;
895 char dma_chan_link_map[MAX_LOGICAL_DMA_CH_COUNT]; 895 char dma_chan_link_map[MAX_LOGICAL_DMA_CH_COUNT];
896 896
897 dma_chan_link_map[lch] = 1;
898 /* Set the link register of the first channel */ 897 /* Set the link register of the first channel */
899 enable_lnk(lch); 898 enable_lnk(lch);
900 899
901 memset(dma_chan_link_map, 0, sizeof(dma_chan_link_map)); 900 memset(dma_chan_link_map, 0, sizeof(dma_chan_link_map));
901 dma_chan_link_map[lch] = 1;
902
902 cur_lch = dma_chan[lch].next_lch; 903 cur_lch = dma_chan[lch].next_lch;
903 do { 904 do {
904 next_lch = dma_chan[cur_lch].next_lch; 905 next_lch = dma_chan[cur_lch].next_lch;
@@ -2110,8 +2111,6 @@ exit_dma_irq_fail:
2110 } 2111 }
2111 2112
2112exit_dma_lch_fail: 2113exit_dma_lch_fail:
2113 kfree(p);
2114 kfree(d);
2115 kfree(dma_chan); 2114 kfree(dma_chan);
2116 return ret; 2115 return ret;
2117} 2116}
@@ -2132,8 +2131,6 @@ static int omap_system_dma_remove(struct platform_device *pdev)
2132 free_irq(dma_irq, (void *)(irq_rel + 1)); 2131 free_irq(dma_irq, (void *)(irq_rel + 1));
2133 } 2132 }
2134 } 2133 }
2135 kfree(p);
2136 kfree(d);
2137 kfree(dma_chan); 2134 kfree(dma_chan);
2138 return 0; 2135 return 0;
2139} 2136}
diff --git a/arch/arm/plat-omap/include/plat/mailbox.h b/arch/arm/plat-omap/include/plat/mailbox.h
deleted file mode 100644
index cc3921e9059c..000000000000
--- a/arch/arm/plat-omap/include/plat/mailbox.h
+++ /dev/null
@@ -1,105 +0,0 @@
1/* mailbox.h */
2
3#ifndef MAILBOX_H
4#define MAILBOX_H
5
6#include <linux/spinlock.h>
7#include <linux/workqueue.h>
8#include <linux/interrupt.h>
9#include <linux/device.h>
10#include <linux/kfifo.h>
11
12typedef u32 mbox_msg_t;
13struct omap_mbox;
14
15typedef int __bitwise omap_mbox_irq_t;
16#define IRQ_TX ((__force omap_mbox_irq_t) 1)
17#define IRQ_RX ((__force omap_mbox_irq_t) 2)
18
19typedef int __bitwise omap_mbox_type_t;
20#define OMAP_MBOX_TYPE1 ((__force omap_mbox_type_t) 1)
21#define OMAP_MBOX_TYPE2 ((__force omap_mbox_type_t) 2)
22
23struct omap_mbox_ops {
24 omap_mbox_type_t type;
25 int (*startup)(struct omap_mbox *mbox);
26 void (*shutdown)(struct omap_mbox *mbox);
27 /* fifo */
28 mbox_msg_t (*fifo_read)(struct omap_mbox *mbox);
29 void (*fifo_write)(struct omap_mbox *mbox, mbox_msg_t msg);
30 int (*fifo_empty)(struct omap_mbox *mbox);
31 int (*fifo_full)(struct omap_mbox *mbox);
32 /* irq */
33 void (*enable_irq)(struct omap_mbox *mbox,
34 omap_mbox_irq_t irq);
35 void (*disable_irq)(struct omap_mbox *mbox,
36 omap_mbox_irq_t irq);
37 void (*ack_irq)(struct omap_mbox *mbox, omap_mbox_irq_t irq);
38 int (*is_irq)(struct omap_mbox *mbox, omap_mbox_irq_t irq);
39 /* ctx */
40 void (*save_ctx)(struct omap_mbox *mbox);
41 void (*restore_ctx)(struct omap_mbox *mbox);
42};
43
44struct omap_mbox_queue {
45 spinlock_t lock;
46 struct kfifo fifo;
47 struct work_struct work;
48 struct tasklet_struct tasklet;
49 struct omap_mbox *mbox;
50 bool full;
51};
52
53struct omap_mbox {
54 char *name;
55 unsigned int irq;
56 struct omap_mbox_queue *txq, *rxq;
57 struct omap_mbox_ops *ops;
58 struct device *dev;
59 void *priv;
60 int use_count;
61 struct blocking_notifier_head notifier;
62};
63
64int omap_mbox_msg_send(struct omap_mbox *, mbox_msg_t msg);
65void omap_mbox_init_seq(struct omap_mbox *);
66
67struct omap_mbox *omap_mbox_get(const char *, struct notifier_block *nb);
68void omap_mbox_put(struct omap_mbox *mbox, struct notifier_block *nb);
69
70int omap_mbox_register(struct device *parent, struct omap_mbox **);
71int omap_mbox_unregister(void);
72
73static inline void omap_mbox_save_ctx(struct omap_mbox *mbox)
74{
75 if (!mbox->ops->save_ctx) {
76 dev_err(mbox->dev, "%s:\tno save\n", __func__);
77 return;
78 }
79
80 mbox->ops->save_ctx(mbox);
81}
82
83static inline void omap_mbox_restore_ctx(struct omap_mbox *mbox)
84{
85 if (!mbox->ops->restore_ctx) {
86 dev_err(mbox->dev, "%s:\tno restore\n", __func__);
87 return;
88 }
89
90 mbox->ops->restore_ctx(mbox);
91}
92
93static inline void omap_mbox_enable_irq(struct omap_mbox *mbox,
94 omap_mbox_irq_t irq)
95{
96 mbox->ops->enable_irq(mbox, irq);
97}
98
99static inline void omap_mbox_disable_irq(struct omap_mbox *mbox,
100 omap_mbox_irq_t irq)
101{
102 mbox->ops->disable_irq(mbox, irq);
103}
104
105#endif /* MAILBOX_H */
diff --git a/arch/arm/plat-omap/mailbox.c b/arch/arm/plat-omap/mailbox.c
deleted file mode 100644
index 42377ef9ea3d..000000000000
--- a/arch/arm/plat-omap/mailbox.c
+++ /dev/null
@@ -1,435 +0,0 @@
1/*
2 * OMAP mailbox driver
3 *
4 * Copyright (C) 2006-2009 Nokia Corporation. All rights reserved.
5 *
6 * Contact: Hiroshi DOYU <Hiroshi.DOYU@nokia.com>
7 *
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License
10 * version 2 as published by the Free Software Foundation.
11 *
12 * This program is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * 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., 51 Franklin St, Fifth Floor, Boston, MA
20 * 02110-1301 USA
21 *
22 */
23
24#include <linux/interrupt.h>
25#include <linux/spinlock.h>
26#include <linux/mutex.h>
27#include <linux/delay.h>
28#include <linux/slab.h>
29#include <linux/kfifo.h>
30#include <linux/err.h>
31#include <linux/notifier.h>
32#include <linux/module.h>
33
34#include <plat/mailbox.h>
35
36static struct omap_mbox **mboxes;
37
38static int mbox_configured;
39static DEFINE_MUTEX(mbox_configured_lock);
40
41static unsigned int mbox_kfifo_size = CONFIG_OMAP_MBOX_KFIFO_SIZE;
42module_param(mbox_kfifo_size, uint, S_IRUGO);
43MODULE_PARM_DESC(mbox_kfifo_size, "Size of omap's mailbox kfifo (bytes)");
44
45/* Mailbox FIFO handle functions */
46static inline mbox_msg_t mbox_fifo_read(struct omap_mbox *mbox)
47{
48 return mbox->ops->fifo_read(mbox);
49}
50static inline void mbox_fifo_write(struct omap_mbox *mbox, mbox_msg_t msg)
51{
52 mbox->ops->fifo_write(mbox, msg);
53}
54static inline int mbox_fifo_empty(struct omap_mbox *mbox)
55{
56 return mbox->ops->fifo_empty(mbox);
57}
58static inline int mbox_fifo_full(struct omap_mbox *mbox)
59{
60 return mbox->ops->fifo_full(mbox);
61}
62
63/* Mailbox IRQ handle functions */
64static inline void ack_mbox_irq(struct omap_mbox *mbox, omap_mbox_irq_t irq)
65{
66 if (mbox->ops->ack_irq)
67 mbox->ops->ack_irq(mbox, irq);
68}
69static inline int is_mbox_irq(struct omap_mbox *mbox, omap_mbox_irq_t irq)
70{
71 return mbox->ops->is_irq(mbox, irq);
72}
73
74/*
75 * message sender
76 */
77static int __mbox_poll_for_space(struct omap_mbox *mbox)
78{
79 int ret = 0, i = 1000;
80
81 while (mbox_fifo_full(mbox)) {
82 if (mbox->ops->type == OMAP_MBOX_TYPE2)
83 return -1;
84 if (--i == 0)
85 return -1;
86 udelay(1);
87 }
88 return ret;
89}
90
91int omap_mbox_msg_send(struct omap_mbox *mbox, mbox_msg_t msg)
92{
93 struct omap_mbox_queue *mq = mbox->txq;
94 int ret = 0, len;
95
96 spin_lock_bh(&mq->lock);
97
98 if (kfifo_avail(&mq->fifo) < sizeof(msg)) {
99 ret = -ENOMEM;
100 goto out;
101 }
102
103 if (kfifo_is_empty(&mq->fifo) && !__mbox_poll_for_space(mbox)) {
104 mbox_fifo_write(mbox, msg);
105 goto out;
106 }
107
108 len = kfifo_in(&mq->fifo, (unsigned char *)&msg, sizeof(msg));
109 WARN_ON(len != sizeof(msg));
110
111 tasklet_schedule(&mbox->txq->tasklet);
112
113out:
114 spin_unlock_bh(&mq->lock);
115 return ret;
116}
117EXPORT_SYMBOL(omap_mbox_msg_send);
118
119static void mbox_tx_tasklet(unsigned long tx_data)
120{
121 struct omap_mbox *mbox = (struct omap_mbox *)tx_data;
122 struct omap_mbox_queue *mq = mbox->txq;
123 mbox_msg_t msg;
124 int ret;
125
126 while (kfifo_len(&mq->fifo)) {
127 if (__mbox_poll_for_space(mbox)) {
128 omap_mbox_enable_irq(mbox, IRQ_TX);
129 break;
130 }
131
132 ret = kfifo_out(&mq->fifo, (unsigned char *)&msg,
133 sizeof(msg));
134 WARN_ON(ret != sizeof(msg));
135
136 mbox_fifo_write(mbox, msg);
137 }
138}
139
140/*
141 * Message receiver(workqueue)
142 */
143static void mbox_rx_work(struct work_struct *work)
144{
145 struct omap_mbox_queue *mq =
146 container_of(work, struct omap_mbox_queue, work);
147 mbox_msg_t msg;
148 int len;
149
150 while (kfifo_len(&mq->fifo) >= sizeof(msg)) {
151 len = kfifo_out(&mq->fifo, (unsigned char *)&msg, sizeof(msg));
152 WARN_ON(len != sizeof(msg));
153
154 blocking_notifier_call_chain(&mq->mbox->notifier, len,
155 (void *)msg);
156 spin_lock_irq(&mq->lock);
157 if (mq->full) {
158 mq->full = false;
159 omap_mbox_enable_irq(mq->mbox, IRQ_RX);
160 }
161 spin_unlock_irq(&mq->lock);
162 }
163}
164
165/*
166 * Mailbox interrupt handler
167 */
168static void __mbox_tx_interrupt(struct omap_mbox *mbox)
169{
170 omap_mbox_disable_irq(mbox, IRQ_TX);
171 ack_mbox_irq(mbox, IRQ_TX);
172 tasklet_schedule(&mbox->txq->tasklet);
173}
174
175static void __mbox_rx_interrupt(struct omap_mbox *mbox)
176{
177 struct omap_mbox_queue *mq = mbox->rxq;
178 mbox_msg_t msg;
179 int len;
180
181 while (!mbox_fifo_empty(mbox)) {
182 if (unlikely(kfifo_avail(&mq->fifo) < sizeof(msg))) {
183 omap_mbox_disable_irq(mbox, IRQ_RX);
184 mq->full = true;
185 goto nomem;
186 }
187
188 msg = mbox_fifo_read(mbox);
189
190 len = kfifo_in(&mq->fifo, (unsigned char *)&msg, sizeof(msg));
191 WARN_ON(len != sizeof(msg));
192
193 if (mbox->ops->type == OMAP_MBOX_TYPE1)
194 break;
195 }
196
197 /* no more messages in the fifo. clear IRQ source. */
198 ack_mbox_irq(mbox, IRQ_RX);
199nomem:
200 schedule_work(&mbox->rxq->work);
201}
202
203static irqreturn_t mbox_interrupt(int irq, void *p)
204{
205 struct omap_mbox *mbox = p;
206
207 if (is_mbox_irq(mbox, IRQ_TX))
208 __mbox_tx_interrupt(mbox);
209
210 if (is_mbox_irq(mbox, IRQ_RX))
211 __mbox_rx_interrupt(mbox);
212
213 return IRQ_HANDLED;
214}
215
216static struct omap_mbox_queue *mbox_queue_alloc(struct omap_mbox *mbox,
217 void (*work) (struct work_struct *),
218 void (*tasklet)(unsigned long))
219{
220 struct omap_mbox_queue *mq;
221
222 mq = kzalloc(sizeof(struct omap_mbox_queue), GFP_KERNEL);
223 if (!mq)
224 return NULL;
225
226 spin_lock_init(&mq->lock);
227
228 if (kfifo_alloc(&mq->fifo, mbox_kfifo_size, GFP_KERNEL))
229 goto error;
230
231 if (work)
232 INIT_WORK(&mq->work, work);
233
234 if (tasklet)
235 tasklet_init(&mq->tasklet, tasklet, (unsigned long)mbox);
236 return mq;
237error:
238 kfree(mq);
239 return NULL;
240}
241
242static void mbox_queue_free(struct omap_mbox_queue *q)
243{
244 kfifo_free(&q->fifo);
245 kfree(q);
246}
247
248static int omap_mbox_startup(struct omap_mbox *mbox)
249{
250 int ret = 0;
251 struct omap_mbox_queue *mq;
252
253 mutex_lock(&mbox_configured_lock);
254 if (!mbox_configured++) {
255 if (likely(mbox->ops->startup)) {
256 ret = mbox->ops->startup(mbox);
257 if (unlikely(ret))
258 goto fail_startup;
259 } else
260 goto fail_startup;
261 }
262
263 if (!mbox->use_count++) {
264 ret = request_irq(mbox->irq, mbox_interrupt, IRQF_SHARED,
265 mbox->name, mbox);
266 if (unlikely(ret)) {
267 pr_err("failed to register mailbox interrupt:%d\n",
268 ret);
269 goto fail_request_irq;
270 }
271 mq = mbox_queue_alloc(mbox, NULL, mbox_tx_tasklet);
272 if (!mq) {
273 ret = -ENOMEM;
274 goto fail_alloc_txq;
275 }
276 mbox->txq = mq;
277
278 mq = mbox_queue_alloc(mbox, mbox_rx_work, NULL);
279 if (!mq) {
280 ret = -ENOMEM;
281 goto fail_alloc_rxq;
282 }
283 mbox->rxq = mq;
284 mq->mbox = mbox;
285
286 omap_mbox_enable_irq(mbox, IRQ_RX);
287 }
288 mutex_unlock(&mbox_configured_lock);
289 return 0;
290
291fail_alloc_rxq:
292 mbox_queue_free(mbox->txq);
293fail_alloc_txq:
294 free_irq(mbox->irq, mbox);
295fail_request_irq:
296 if (mbox->ops->shutdown)
297 mbox->ops->shutdown(mbox);
298 mbox->use_count--;
299fail_startup:
300 mbox_configured--;
301 mutex_unlock(&mbox_configured_lock);
302 return ret;
303}
304
305static void omap_mbox_fini(struct omap_mbox *mbox)
306{
307 mutex_lock(&mbox_configured_lock);
308
309 if (!--mbox->use_count) {
310 omap_mbox_disable_irq(mbox, IRQ_RX);
311 free_irq(mbox->irq, mbox);
312 tasklet_kill(&mbox->txq->tasklet);
313 flush_work(&mbox->rxq->work);
314 mbox_queue_free(mbox->txq);
315 mbox_queue_free(mbox->rxq);
316 }
317
318 if (likely(mbox->ops->shutdown)) {
319 if (!--mbox_configured)
320 mbox->ops->shutdown(mbox);
321 }
322
323 mutex_unlock(&mbox_configured_lock);
324}
325
326struct omap_mbox *omap_mbox_get(const char *name, struct notifier_block *nb)
327{
328 struct omap_mbox *_mbox, *mbox = NULL;
329 int i, ret;
330
331 if (!mboxes)
332 return ERR_PTR(-EINVAL);
333
334 for (i = 0; (_mbox = mboxes[i]); i++) {
335 if (!strcmp(_mbox->name, name)) {
336 mbox = _mbox;
337 break;
338 }
339 }
340
341 if (!mbox)
342 return ERR_PTR(-ENOENT);
343
344 if (nb)
345 blocking_notifier_chain_register(&mbox->notifier, nb);
346
347 ret = omap_mbox_startup(mbox);
348 if (ret) {
349 blocking_notifier_chain_unregister(&mbox->notifier, nb);
350 return ERR_PTR(-ENODEV);
351 }
352
353 return mbox;
354}
355EXPORT_SYMBOL(omap_mbox_get);
356
357void omap_mbox_put(struct omap_mbox *mbox, struct notifier_block *nb)
358{
359 blocking_notifier_chain_unregister(&mbox->notifier, nb);
360 omap_mbox_fini(mbox);
361}
362EXPORT_SYMBOL(omap_mbox_put);
363
364static struct class omap_mbox_class = { .name = "mbox", };
365
366int omap_mbox_register(struct device *parent, struct omap_mbox **list)
367{
368 int ret;
369 int i;
370
371 mboxes = list;
372 if (!mboxes)
373 return -EINVAL;
374
375 for (i = 0; mboxes[i]; i++) {
376 struct omap_mbox *mbox = mboxes[i];
377 mbox->dev = device_create(&omap_mbox_class,
378 parent, 0, mbox, "%s", mbox->name);
379 if (IS_ERR(mbox->dev)) {
380 ret = PTR_ERR(mbox->dev);
381 goto err_out;
382 }
383
384 BLOCKING_INIT_NOTIFIER_HEAD(&mbox->notifier);
385 }
386 return 0;
387
388err_out:
389 while (i--)
390 device_unregister(mboxes[i]->dev);
391 return ret;
392}
393EXPORT_SYMBOL(omap_mbox_register);
394
395int omap_mbox_unregister(void)
396{
397 int i;
398
399 if (!mboxes)
400 return -EINVAL;
401
402 for (i = 0; mboxes[i]; i++)
403 device_unregister(mboxes[i]->dev);
404 mboxes = NULL;
405 return 0;
406}
407EXPORT_SYMBOL(omap_mbox_unregister);
408
409static int __init omap_mbox_init(void)
410{
411 int err;
412
413 err = class_register(&omap_mbox_class);
414 if (err)
415 return err;
416
417 /* kfifo size sanity check: alignment and minimal size */
418 mbox_kfifo_size = ALIGN(mbox_kfifo_size, sizeof(mbox_msg_t));
419 mbox_kfifo_size = max_t(unsigned int, mbox_kfifo_size,
420 sizeof(mbox_msg_t));
421
422 return 0;
423}
424subsys_initcall(omap_mbox_init);
425
426static void __exit omap_mbox_exit(void)
427{
428 class_unregister(&omap_mbox_class);
429}
430module_exit(omap_mbox_exit);
431
432MODULE_LICENSE("GPL v2");
433MODULE_DESCRIPTION("omap mailbox: interrupt driven messaging");
434MODULE_AUTHOR("Toshihiro Kobayashi");
435MODULE_AUTHOR("Hiroshi DOYU");
diff --git a/arch/arm/plat-orion/common.c b/arch/arm/plat-orion/common.c
index c019b7aaf776..c66d163d7a2a 100644
--- a/arch/arm/plat-orion/common.c
+++ b/arch/arm/plat-orion/common.c
@@ -666,14 +666,9 @@ void __init orion_xor0_init(unsigned long mapbase_low,
666 orion_xor0_shared_resources[3].start = irq_1; 666 orion_xor0_shared_resources[3].start = irq_1;
667 orion_xor0_shared_resources[3].end = irq_1; 667 orion_xor0_shared_resources[3].end = irq_1;
668 668
669 /*
670 * two engines can't do memset simultaneously, this limitation
671 * satisfied by removing memset support from one of the engines.
672 */
673 dma_cap_set(DMA_MEMCPY, orion_xor0_channels_data[0].cap_mask); 669 dma_cap_set(DMA_MEMCPY, orion_xor0_channels_data[0].cap_mask);
674 dma_cap_set(DMA_XOR, orion_xor0_channels_data[0].cap_mask); 670 dma_cap_set(DMA_XOR, orion_xor0_channels_data[0].cap_mask);
675 671
676 dma_cap_set(DMA_MEMSET, orion_xor0_channels_data[1].cap_mask);
677 dma_cap_set(DMA_MEMCPY, orion_xor0_channels_data[1].cap_mask); 672 dma_cap_set(DMA_MEMCPY, orion_xor0_channels_data[1].cap_mask);
678 dma_cap_set(DMA_XOR, orion_xor0_channels_data[1].cap_mask); 673 dma_cap_set(DMA_XOR, orion_xor0_channels_data[1].cap_mask);
679 674
@@ -732,14 +727,9 @@ void __init orion_xor1_init(unsigned long mapbase_low,
732 orion_xor1_shared_resources[3].start = irq_1; 727 orion_xor1_shared_resources[3].start = irq_1;
733 orion_xor1_shared_resources[3].end = irq_1; 728 orion_xor1_shared_resources[3].end = irq_1;
734 729
735 /*
736 * two engines can't do memset simultaneously, this limitation
737 * satisfied by removing memset support from one of the engines.
738 */
739 dma_cap_set(DMA_MEMCPY, orion_xor1_channels_data[0].cap_mask); 730 dma_cap_set(DMA_MEMCPY, orion_xor1_channels_data[0].cap_mask);
740 dma_cap_set(DMA_XOR, orion_xor1_channels_data[0].cap_mask); 731 dma_cap_set(DMA_XOR, orion_xor1_channels_data[0].cap_mask);
741 732
742 dma_cap_set(DMA_MEMSET, orion_xor1_channels_data[1].cap_mask);
743 dma_cap_set(DMA_MEMCPY, orion_xor1_channels_data[1].cap_mask); 733 dma_cap_set(DMA_MEMCPY, orion_xor1_channels_data[1].cap_mask);
744 dma_cap_set(DMA_XOR, orion_xor1_channels_data[1].cap_mask); 734 dma_cap_set(DMA_XOR, orion_xor1_channels_data[1].cap_mask);
745 735
diff --git a/arch/arm/plat-orion/gpio.c b/arch/arm/plat-orion/gpio.c
index 249fe6333e18..6816192a7561 100644
--- a/arch/arm/plat-orion/gpio.c
+++ b/arch/arm/plat-orion/gpio.c
@@ -426,7 +426,7 @@ static void gpio_irq_handler(unsigned irq, struct irq_desc *desc)
426 if (!(cause & (1 << i))) 426 if (!(cause & (1 << i)))
427 continue; 427 continue;
428 428
429 type = irqd_get_trigger_type(irq_get_irq_data(irq)); 429 type = irq_get_trigger_type(irq);
430 if ((type & IRQ_TYPE_SENSE_MASK) == IRQ_TYPE_EDGE_BOTH) { 430 if ((type & IRQ_TYPE_SENSE_MASK) == IRQ_TYPE_EDGE_BOTH) {
431 /* Swap polarity (race with GPIO line) */ 431 /* Swap polarity (race with GPIO line) */
432 u32 polarity; 432 u32 polarity;
diff --git a/arch/arm/plat-orion/time.c b/arch/arm/plat-orion/time.c
index 5d5ac0f05422..9d2b2ac74938 100644
--- a/arch/arm/plat-orion/time.c
+++ b/arch/arm/plat-orion/time.c
@@ -16,7 +16,7 @@
16#include <linux/clockchips.h> 16#include <linux/clockchips.h>
17#include <linux/interrupt.h> 17#include <linux/interrupt.h>
18#include <linux/irq.h> 18#include <linux/irq.h>
19#include <asm/sched_clock.h> 19#include <linux/sched_clock.h>
20 20
21/* 21/*
22 * MBus bridge block registers. 22 * MBus bridge block registers.
diff --git a/arch/arm/plat-samsung/Kconfig b/arch/arm/plat-samsung/Kconfig
index f8ed2de0a678..a5b5ff6e68d2 100644
--- a/arch/arm/plat-samsung/Kconfig
+++ b/arch/arm/plat-samsung/Kconfig
@@ -6,7 +6,7 @@
6 6
7config PLAT_SAMSUNG 7config PLAT_SAMSUNG
8 bool 8 bool
9 depends on PLAT_S3C24XX || ARCH_S3C64XX || PLAT_S5P 9 depends on PLAT_S3C24XX || ARCH_S3C64XX || PLAT_S5P || ARCH_EXYNOS
10 default y 10 default y
11 select GENERIC_IRQ_CHIP 11 select GENERIC_IRQ_CHIP
12 select NO_IOPORT 12 select NO_IOPORT
@@ -15,12 +15,10 @@ config PLAT_SAMSUNG
15 15
16config PLAT_S5P 16config PLAT_S5P
17 bool 17 bool
18 depends on (ARCH_S5P64X0 || ARCH_S5PC100 || ARCH_S5PV210 || ARCH_EXYNOS) 18 depends on (ARCH_S5P64X0 || ARCH_S5PC100 || ARCH_S5PV210)
19 default y 19 default y
20 select ARCH_REQUIRE_GPIOLIB 20 select ARCH_REQUIRE_GPIOLIB
21 select ARM_GIC if ARCH_EXYNOS 21 select ARM_VIC
22 select ARM_VIC if !ARCH_EXYNOS
23 select GIC_NON_BANKED if ARCH_EXYNOS4
24 select NO_IOPORT 22 select NO_IOPORT
25 select PLAT_SAMSUNG 23 select PLAT_SAMSUNG
26 select S3C_GPIO_TRACK 24 select S3C_GPIO_TRACK
@@ -31,6 +29,13 @@ config PLAT_S5P
31 help 29 help
32 Base platform code for Samsung's S5P series SoC. 30 Base platform code for Samsung's S5P series SoC.
33 31
32config SAMSUNG_PM
33 bool
34 depends on PM && (PLAT_S3C24XX || ARCH_S3C64XX || ARCH_S5P64X0 || S5P_PM)
35 default y
36 help
37 Base platform power management code for samsung code
38
34if PLAT_SAMSUNG 39if PLAT_SAMSUNG
35 40
36# boot configurations 41# boot configurations
@@ -60,6 +65,20 @@ config S3C_LOWLEVEL_UART_PORT
60 this configuration should be between zero and two. The port 65 this configuration should be between zero and two. The port
61 must have been initialised by the boot-loader before use. 66 must have been initialised by the boot-loader before use.
62 67
68config SAMSUNG_ATAGS
69 def_bool n
70 depends on !ARCH_MULTIPLATFORM
71 depends on ATAGS
72 help
73 This option enables ATAGS based boot support code for
74 Samsung platforms, including static platform devices, legacy
75 clock, timer and interrupt initialization, etc.
76
77 Platforms that support only DT based boot need not to select
78 this option.
79
80if SAMSUNG_ATAGS
81
63# timer options 82# timer options
64 83
65config SAMSUNG_HRT 84config SAMSUNG_HRT
@@ -367,11 +386,6 @@ config S5P_DEV_JPEG
367 help 386 help
368 Compile in platform device definitions for JPEG codec 387 Compile in platform device definitions for JPEG codec
369 388
370config S5P_DEV_MFC
371 bool
372 help
373 Compile in setup memory (init) code for MFC
374
375config S5P_DEV_ONENAND 389config S5P_DEV_ONENAND
376 bool 390 bool
377 help 391 help
@@ -412,6 +426,21 @@ config S3C_DMA
412 help 426 help
413 Internal configuration for S3C DMA core 427 Internal configuration for S3C DMA core
414 428
429config S5P_IRQ_PM
430 bool
431 default y if S5P_PM
432 help
433 Legacy IRQ power management for S5P platforms
434
435config SAMSUNG_PM_GPIO
436 bool
437 default y if GPIO_SAMSUNG && PM
438 help
439 Include legacy GPIO power management code for platforms not using
440 pinctrl-samsung driver.
441
442endif
443
415config SAMSUNG_DMADEV 444config SAMSUNG_DMADEV
416 bool 445 bool
417 select ARM_AMBA 446 select ARM_AMBA
@@ -421,6 +450,11 @@ config SAMSUNG_DMADEV
421 help 450 help
422 Use DMA device engine for PL330 DMAC. 451 Use DMA device engine for PL330 DMAC.
423 452
453config S5P_DEV_MFC
454 bool
455 help
456 Compile in setup memory (init) code for MFC
457
424comment "Power management" 458comment "Power management"
425 459
426config SAMSUNG_PM_DEBUG 460config SAMSUNG_PM_DEBUG
@@ -475,6 +509,12 @@ config SAMSUNG_WAKEMASK
475 and above. This code allows a set of interrupt to wakeup-mask 509 and above. This code allows a set of interrupt to wakeup-mask
476 mappings. See <plat/wakeup-mask.h> 510 mappings. See <plat/wakeup-mask.h>
477 511
512config SAMSUNG_WDT_RESET
513 bool
514 help
515 Compile support for system restart by triggering watchdog reset.
516 Used on SoCs that do not provide dedicated reset control.
517
478config S5P_PM 518config S5P_PM
479 bool 519 bool
480 help 520 help
diff --git a/arch/arm/plat-samsung/Makefile b/arch/arm/plat-samsung/Makefile
index a23c460299a1..199bbe304d02 100644
--- a/arch/arm/plat-samsung/Makefile
+++ b/arch/arm/plat-samsung/Makefile
@@ -31,10 +31,10 @@ obj-$(CONFIG_S3C_ADC) += adc.o
31 31
32# devices 32# devices
33 33
34obj-y += platformdata.o 34obj-$(CONFIG_SAMSUNG_ATAGS) += platformdata.o
35 35
36obj-y += devs.o 36obj-$(CONFIG_SAMSUNG_ATAGS) += devs.o
37obj-y += dev-uart.o 37obj-$(CONFIG_SAMSUNG_ATAGS) += dev-uart.o
38obj-$(CONFIG_S5P_DEV_MFC) += s5p-dev-mfc.o 38obj-$(CONFIG_S5P_DEV_MFC) += s5p-dev-mfc.o
39obj-$(CONFIG_S5P_DEV_UART) += s5p-dev-uart.o 39obj-$(CONFIG_S5P_DEV_UART) += s5p-dev-uart.o
40 40
@@ -51,11 +51,13 @@ obj-$(CONFIG_SAMSUNG_DMADEV) += dma-ops.o
51 51
52# PM support 52# PM support
53 53
54obj-$(CONFIG_PM) += pm.o 54obj-$(CONFIG_SAMSUNG_PM) += pm.o
55obj-$(CONFIG_PM) += pm-gpio.o 55obj-$(CONFIG_SAMSUNG_PM_GPIO) += pm-gpio.o
56obj-$(CONFIG_SAMSUNG_PM_CHECK) += pm-check.o 56obj-$(CONFIG_SAMSUNG_PM_CHECK) += pm-check.o
57 57
58obj-$(CONFIG_SAMSUNG_WAKEMASK) += wakeup-mask.o 58obj-$(CONFIG_SAMSUNG_WAKEMASK) += wakeup-mask.o
59obj-$(CONFIG_SAMSUNG_WDT_RESET) += watchdog-reset.o
59 60
60obj-$(CONFIG_S5P_PM) += s5p-pm.o s5p-irq-pm.o 61obj-$(CONFIG_S5P_PM) += s5p-pm.o
62obj-$(CONFIG_S5P_IRQ_PM) += s5p-irq-pm.o
61obj-$(CONFIG_S5P_SLEEP) += s5p-sleep.o 63obj-$(CONFIG_S5P_SLEEP) += s5p-sleep.o
diff --git a/arch/arm/plat-samsung/include/plat/clock.h b/arch/arm/plat-samsung/include/plat/clock.h
index a62753dc15ba..df45d6edc98d 100644
--- a/arch/arm/plat-samsung/include/plat/clock.h
+++ b/arch/arm/plat-samsung/include/plat/clock.h
@@ -83,6 +83,11 @@ extern struct clk clk_ext;
83extern struct clksrc_clk clk_epllref; 83extern struct clksrc_clk clk_epllref;
84extern struct clksrc_clk clk_esysclk; 84extern struct clksrc_clk clk_esysclk;
85 85
86/* S3C24XX UART clocks */
87extern struct clk s3c24xx_clk_uart0;
88extern struct clk s3c24xx_clk_uart1;
89extern struct clk s3c24xx_clk_uart2;
90
86/* S3C64XX specific clocks */ 91/* S3C64XX specific clocks */
87extern struct clk clk_h2; 92extern struct clk clk_h2;
88extern struct clk clk_27m; 93extern struct clk clk_27m;
diff --git a/arch/arm/plat-samsung/include/plat/cpu-freq-core.h b/arch/arm/plat-samsung/include/plat/cpu-freq-core.h
index 95509d8eb140..7231c8e4975e 100644
--- a/arch/arm/plat-samsung/include/plat/cpu-freq-core.h
+++ b/arch/arm/plat-samsung/include/plat/cpu-freq-core.h
@@ -202,7 +202,7 @@ extern int s3c_plltab_register(struct cpufreq_frequency_table *plls,
202extern struct s3c_cpufreq_config *s3c_cpufreq_getconfig(void); 202extern struct s3c_cpufreq_config *s3c_cpufreq_getconfig(void);
203extern struct s3c_iotimings *s3c_cpufreq_getiotimings(void); 203extern struct s3c_iotimings *s3c_cpufreq_getiotimings(void);
204 204
205#ifdef CONFIG_CPU_FREQ_S3C24XX_DEBUGFS 205#ifdef CONFIG_ARM_S3C24XX_CPUFREQ_DEBUGFS
206#define s3c_cpufreq_debugfs_call(x) x 206#define s3c_cpufreq_debugfs_call(x) x
207#else 207#else
208#define s3c_cpufreq_debugfs_call(x) NULL 208#define s3c_cpufreq_debugfs_call(x) NULL
@@ -259,17 +259,17 @@ extern void s3c2412_iotiming_set(struct s3c_cpufreq_config *cfg,
259#define s3c2412_iotiming_set NULL 259#define s3c2412_iotiming_set NULL
260#endif /* CONFIG_S3C2412_IOTIMING */ 260#endif /* CONFIG_S3C2412_IOTIMING */
261 261
262#ifdef CONFIG_CPU_FREQ_S3C24XX_DEBUG 262#ifdef CONFIG_ARM_S3C24XX_CPUFREQ_DEBUG
263#define s3c_freq_dbg(x...) printk(KERN_INFO x) 263#define s3c_freq_dbg(x...) printk(KERN_INFO x)
264#else 264#else
265#define s3c_freq_dbg(x...) do { if (0) printk(x); } while (0) 265#define s3c_freq_dbg(x...) do { if (0) printk(x); } while (0)
266#endif /* CONFIG_CPU_FREQ_S3C24XX_DEBUG */ 266#endif /* CONFIG_ARM_S3C24XX_CPUFREQ_DEBUG */
267 267
268#ifdef CONFIG_CPU_FREQ_S3C24XX_IODEBUG 268#ifdef CONFIG_ARM_S3C24XX_CPUFREQ_IODEBUG
269#define s3c_freq_iodbg(x...) printk(KERN_INFO x) 269#define s3c_freq_iodbg(x...) printk(KERN_INFO x)
270#else 270#else
271#define s3c_freq_iodbg(x...) do { if (0) printk(x); } while (0) 271#define s3c_freq_iodbg(x...) do { if (0) printk(x); } while (0)
272#endif /* CONFIG_CPU_FREQ_S3C24XX_IODEBUG */ 272#endif /* CONFIG_ARM_S3C24XX_CPUFREQ_IODEBUG */
273 273
274static inline int s3c_cpufreq_addfreq(struct cpufreq_frequency_table *table, 274static inline int s3c_cpufreq_addfreq(struct cpufreq_frequency_table *table,
275 int index, size_t table_size, 275 int index, size_t table_size,
@@ -285,7 +285,7 @@ static inline int s3c_cpufreq_addfreq(struct cpufreq_frequency_table *table,
285 s3c_freq_dbg("%s: { %d = %u kHz }\n", 285 s3c_freq_dbg("%s: { %d = %u kHz }\n",
286 __func__, index, freq); 286 __func__, index, freq);
287 287
288 table[index].index = index; 288 table[index].driver_data = index;
289 table[index].frequency = freq; 289 table[index].frequency = freq;
290 } 290 }
291 291
diff --git a/arch/arm/plat-samsung/include/plat/cpu-freq.h b/arch/arm/plat-samsung/include/plat/cpu-freq.h
index 80c4a809c721..85517ab962ae 100644
--- a/arch/arm/plat-samsung/include/plat/cpu-freq.h
+++ b/arch/arm/plat-samsung/include/plat/cpu-freq.h
@@ -126,7 +126,7 @@ struct s3c_cpufreq_board {
126}; 126};
127 127
128/* Things depending on frequency scaling. */ 128/* Things depending on frequency scaling. */
129#ifdef CONFIG_CPU_FREQ_S3C 129#ifdef CONFIG_ARM_S3C_CPUFREQ
130#define __init_or_cpufreq 130#define __init_or_cpufreq
131#else 131#else
132#define __init_or_cpufreq __init 132#define __init_or_cpufreq __init
@@ -134,7 +134,7 @@ struct s3c_cpufreq_board {
134 134
135/* Board functions */ 135/* Board functions */
136 136
137#ifdef CONFIG_CPU_FREQ_S3C 137#ifdef CONFIG_ARM_S3C_CPUFREQ
138extern int s3c_cpufreq_setboard(struct s3c_cpufreq_board *board); 138extern int s3c_cpufreq_setboard(struct s3c_cpufreq_board *board);
139#else 139#else
140 140
@@ -142,4 +142,4 @@ static inline int s3c_cpufreq_setboard(struct s3c_cpufreq_board *board)
142{ 142{
143 return 0; 143 return 0;
144} 144}
145#endif /* CONFIG_CPU_FREQ_S3C */ 145#endif /* CONFIG_ARM_S3C_CPUFREQ */
diff --git a/arch/arm/plat-samsung/include/plat/cpu.h b/arch/arm/plat-samsung/include/plat/cpu.h
index 989fefe18be6..4fb1f03a10d1 100644
--- a/arch/arm/plat-samsung/include/plat/cpu.h
+++ b/arch/arm/plat-samsung/include/plat/cpu.h
@@ -46,6 +46,7 @@ extern unsigned long samsung_cpu_id;
46#define EXYNOS4_CPU_MASK 0xFFFE0000 46#define EXYNOS4_CPU_MASK 0xFFFE0000
47 47
48#define EXYNOS5250_SOC_ID 0x43520000 48#define EXYNOS5250_SOC_ID 0x43520000
49#define EXYNOS5420_SOC_ID 0xE5420000
49#define EXYNOS5440_SOC_ID 0xE5440000 50#define EXYNOS5440_SOC_ID 0xE5440000
50#define EXYNOS5_SOC_MASK 0xFFFFF000 51#define EXYNOS5_SOC_MASK 0xFFFFF000
51 52
@@ -67,6 +68,7 @@ IS_SAMSUNG_CPU(exynos4210, EXYNOS4210_CPU_ID, EXYNOS4_CPU_MASK)
67IS_SAMSUNG_CPU(exynos4212, EXYNOS4212_CPU_ID, EXYNOS4_CPU_MASK) 68IS_SAMSUNG_CPU(exynos4212, EXYNOS4212_CPU_ID, EXYNOS4_CPU_MASK)
68IS_SAMSUNG_CPU(exynos4412, EXYNOS4412_CPU_ID, EXYNOS4_CPU_MASK) 69IS_SAMSUNG_CPU(exynos4412, EXYNOS4412_CPU_ID, EXYNOS4_CPU_MASK)
69IS_SAMSUNG_CPU(exynos5250, EXYNOS5250_SOC_ID, EXYNOS5_SOC_MASK) 70IS_SAMSUNG_CPU(exynos5250, EXYNOS5250_SOC_ID, EXYNOS5_SOC_MASK)
71IS_SAMSUNG_CPU(exynos5420, EXYNOS5420_SOC_ID, EXYNOS5_SOC_MASK)
70IS_SAMSUNG_CPU(exynos5440, EXYNOS5440_SOC_ID, EXYNOS5_SOC_MASK) 72IS_SAMSUNG_CPU(exynos5440, EXYNOS5440_SOC_ID, EXYNOS5_SOC_MASK)
71 73
72#if defined(CONFIG_CPU_S3C2410) || defined(CONFIG_CPU_S3C2412) || \ 74#if defined(CONFIG_CPU_S3C2410) || defined(CONFIG_CPU_S3C2412) || \
@@ -142,6 +144,12 @@ IS_SAMSUNG_CPU(exynos5440, EXYNOS5440_SOC_ID, EXYNOS5_SOC_MASK)
142# define soc_is_exynos5250() 0 144# define soc_is_exynos5250() 0
143#endif 145#endif
144 146
147#if defined(CONFIG_SOC_EXYNOS5420)
148# define soc_is_exynos5420() is_samsung_exynos5420()
149#else
150# define soc_is_exynos5420() 0
151#endif
152
145#if defined(CONFIG_SOC_EXYNOS5440) 153#if defined(CONFIG_SOC_EXYNOS5440)
146# define soc_is_exynos5440() is_samsung_exynos5440() 154# define soc_is_exynos5440() is_samsung_exynos5440()
147#else 155#else
diff --git a/arch/arm/plat-samsung/include/plat/dma-s3c24xx.h b/arch/arm/plat-samsung/include/plat/dma-s3c24xx.h
index d01576318b2c..bd3a6db14cbb 100644
--- a/arch/arm/plat-samsung/include/plat/dma-s3c24xx.h
+++ b/arch/arm/plat-samsung/include/plat/dma-s3c24xx.h
@@ -28,7 +28,6 @@ struct s3c24xx_dma_map {
28 const char *name; 28 const char *name;
29 29
30 unsigned long channels[S3C_DMA_CHANNELS]; 30 unsigned long channels[S3C_DMA_CHANNELS];
31 unsigned long channels_rx[S3C_DMA_CHANNELS];
32}; 31};
33 32
34struct s3c24xx_dma_selection { 33struct s3c24xx_dma_selection {
@@ -38,10 +37,6 @@ struct s3c24xx_dma_selection {
38 37
39 void (*select)(struct s3c2410_dma_chan *chan, 38 void (*select)(struct s3c2410_dma_chan *chan,
40 struct s3c24xx_dma_map *map); 39 struct s3c24xx_dma_map *map);
41
42 void (*direction)(struct s3c2410_dma_chan *chan,
43 struct s3c24xx_dma_map *map,
44 enum dma_data_direction dir);
45}; 40};
46 41
47extern int s3c24xx_dma_init_map(struct s3c24xx_dma_selection *sel); 42extern int s3c24xx_dma_init_map(struct s3c24xx_dma_selection *sel);
diff --git a/arch/arm/plat-samsung/include/plat/pm.h b/arch/arm/plat-samsung/include/plat/pm.h
index f6fcadeee969..6bc1a8f471e3 100644
--- a/arch/arm/plat-samsung/include/plat/pm.h
+++ b/arch/arm/plat-samsung/include/plat/pm.h
@@ -19,7 +19,7 @@
19 19
20struct device; 20struct device;
21 21
22#ifdef CONFIG_PM 22#ifdef CONFIG_SAMSUNG_PM
23 23
24extern __init int s3c_pm_init(void); 24extern __init int s3c_pm_init(void);
25extern __init int s3c64xx_pm_init(void); 25extern __init int s3c64xx_pm_init(void);
@@ -58,8 +58,6 @@ extern unsigned char pm_uart_udivslot; /* true to save UART UDIVSLOT */
58 58
59/* from sleep.S */ 59/* from sleep.S */
60 60
61extern void s3c_cpu_resume(void);
62
63extern int s3c2410_cpu_suspend(unsigned long); 61extern int s3c2410_cpu_suspend(unsigned long);
64 62
65/* sleep save info */ 63/* sleep save info */
@@ -106,12 +104,14 @@ extern void s3c_pm_do_save(struct sleep_save *ptr, int count);
106extern void s3c_pm_do_restore(struct sleep_save *ptr, int count); 104extern void s3c_pm_do_restore(struct sleep_save *ptr, int count);
107extern void s3c_pm_do_restore_core(struct sleep_save *ptr, int count); 105extern void s3c_pm_do_restore_core(struct sleep_save *ptr, int count);
108 106
109#ifdef CONFIG_PM 107#ifdef CONFIG_SAMSUNG_PM
110extern int s3c_irq_wake(struct irq_data *data, unsigned int state); 108extern int s3c_irq_wake(struct irq_data *data, unsigned int state);
111extern int s3c_irqext_wake(struct irq_data *data, unsigned int state); 109extern int s3c_irqext_wake(struct irq_data *data, unsigned int state);
110extern void s3c_cpu_resume(void);
112#else 111#else
113#define s3c_irq_wake NULL 112#define s3c_irq_wake NULL
114#define s3c_irqext_wake NULL 113#define s3c_irqext_wake NULL
114#define s3c_cpu_resume NULL
115#endif 115#endif
116 116
117/* PM debug functions */ 117/* PM debug functions */
@@ -166,6 +166,7 @@ extern void s3c_pm_check_store(void);
166 */ 166 */
167extern void s3c_pm_configure_extint(void); 167extern void s3c_pm_configure_extint(void);
168 168
169#ifdef CONFIG_GPIO_SAMSUNG
169/** 170/**
170 * samsung_pm_restore_gpios() - restore the state of the gpios after sleep. 171 * samsung_pm_restore_gpios() - restore the state of the gpios after sleep.
171 * 172 *
@@ -181,6 +182,10 @@ extern void samsung_pm_restore_gpios(void);
181 * Save the GPIO states for resotration on resume. See samsung_pm_restore_gpios(). 182 * Save the GPIO states for resotration on resume. See samsung_pm_restore_gpios().
182 */ 183 */
183extern void samsung_pm_save_gpios(void); 184extern void samsung_pm_save_gpios(void);
185#else
186static inline void samsung_pm_restore_gpios(void) {}
187static inline void samsung_pm_save_gpios(void) {}
188#endif
184 189
185extern void s3c_pm_save_core(void); 190extern void s3c_pm_save_core(void);
186extern void s3c_pm_restore_core(void); 191extern void s3c_pm_restore_core(void);
diff --git a/arch/arm/plat-samsung/include/plat/regs-watchdog.h b/arch/arm/plat-samsung/include/plat/regs-watchdog.h
deleted file mode 100644
index 4938492470f7..000000000000
--- a/arch/arm/plat-samsung/include/plat/regs-watchdog.h
+++ /dev/null
@@ -1,41 +0,0 @@
1/* arch/arm/mach-s3c2410/include/mach/regs-watchdog.h
2 *
3 * Copyright (c) 2003 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 Watchdog timer control
11*/
12
13
14#ifndef __ASM_ARCH_REGS_WATCHDOG_H
15#define __ASM_ARCH_REGS_WATCHDOG_H
16
17#define S3C_WDOGREG(x) ((x) + S3C_VA_WATCHDOG)
18
19#define S3C2410_WTCON S3C_WDOGREG(0x00)
20#define S3C2410_WTDAT S3C_WDOGREG(0x04)
21#define S3C2410_WTCNT S3C_WDOGREG(0x08)
22
23/* the watchdog can either generate a reset pulse, or an
24 * interrupt.
25 */
26
27#define S3C2410_WTCON_RSTEN (0x01)
28#define S3C2410_WTCON_INTEN (1<<2)
29#define S3C2410_WTCON_ENABLE (1<<5)
30
31#define S3C2410_WTCON_DIV16 (0<<3)
32#define S3C2410_WTCON_DIV32 (1<<3)
33#define S3C2410_WTCON_DIV64 (2<<3)
34#define S3C2410_WTCON_DIV128 (3<<3)
35
36#define S3C2410_WTCON_PRESCALE(x) ((x) << 8)
37#define S3C2410_WTCON_PRESCALE_MASK (0xff00)
38
39#endif /* __ASM_ARCH_REGS_WATCHDOG_H */
40
41
diff --git a/arch/arm/plat-samsung/include/plat/uncompress.h b/arch/arm/plat-samsung/include/plat/uncompress.h
index 02b66d723d1a..4afc32f90b6d 100644
--- a/arch/arm/plat-samsung/include/plat/uncompress.h
+++ b/arch/arm/plat-samsung/include/plat/uncompress.h
@@ -21,6 +21,8 @@ typedef unsigned int upf_t; /* cannot include linux/serial_core.h */
21unsigned int fifo_mask; 21unsigned int fifo_mask;
22unsigned int fifo_max; 22unsigned int fifo_max;
23 23
24volatile u8 *uart_base;
25
24/* forward declerations */ 26/* forward declerations */
25 27
26static void arch_detect_cpu(void); 28static void arch_detect_cpu(void);
@@ -28,19 +30,24 @@ static void arch_detect_cpu(void);
28/* defines for UART registers */ 30/* defines for UART registers */
29 31
30#include <plat/regs-serial.h> 32#include <plat/regs-serial.h>
31#include <plat/regs-watchdog.h>
32 33
33/* working in physical space... */ 34/* working in physical space... */
34#undef S3C2410_WDOGREG 35#define S3C_WDOGREG(x) ((S3C_PA_WDT + (x)))
35#define S3C2410_WDOGREG(x) ((S3C24XX_PA_WATCHDOG + (x))) 36
37#define S3C2410_WTCON S3C_WDOGREG(0x00)
38#define S3C2410_WTDAT S3C_WDOGREG(0x04)
39#define S3C2410_WTCNT S3C_WDOGREG(0x08)
40
41#define S3C2410_WTCON_RSTEN (1 << 0)
42#define S3C2410_WTCON_ENABLE (1 << 5)
43
44#define S3C2410_WTCON_DIV128 (3 << 3)
45
46#define S3C2410_WTCON_PRESCALE(x) ((x) << 8)
36 47
37/* how many bytes we allow into the FIFO at a time in FIFO mode */ 48/* how many bytes we allow into the FIFO at a time in FIFO mode */
38#define FIFO_MAX (14) 49#define FIFO_MAX (14)
39 50
40#ifdef S3C_PA_UART
41#define uart_base S3C_PA_UART + (S3C_UART_OFFSET * CONFIG_S3C_LOWLEVEL_UART_PORT)
42#endif
43
44static __inline__ void 51static __inline__ void
45uart_wr(unsigned int reg, unsigned int val) 52uart_wr(unsigned int reg, unsigned int val)
46{ 53{
diff --git a/arch/arm/plat-samsung/include/plat/watchdog-reset.h b/arch/arm/plat-samsung/include/plat/watchdog-reset.h
index bc4db9b04e36..0386b8f76623 100644
--- a/arch/arm/plat-samsung/include/plat/watchdog-reset.h
+++ b/arch/arm/plat-samsung/include/plat/watchdog-reset.h
@@ -10,37 +10,11 @@
10 * published by the Free Software Foundation. 10 * published by the Free Software Foundation.
11*/ 11*/
12 12
13#include <plat/clock.h> 13#ifndef __PLAT_SAMSUNG_WATCHDOG_RESET_H
14#include <plat/regs-watchdog.h> 14#define __PLAT_SAMSUNG_WATCHDOG_RESET_H
15#include <mach/map.h>
16 15
17#include <linux/clk.h> 16extern void samsung_wdt_reset(void);
18#include <linux/err.h> 17extern void samsung_wdt_reset_of_init(void);
19#include <linux/io.h> 18extern void samsung_wdt_reset_init(void __iomem *base);
20#include <linux/delay.h>
21 19
22static inline void arch_wdt_reset(void) 20#endif /* __PLAT_SAMSUNG_WATCHDOG_RESET_H */
23{
24 printk("arch_reset: attempting watchdog reset\n");
25
26 __raw_writel(0, S3C2410_WTCON); /* disable watchdog, to be safe */
27
28 if (!IS_ERR(s3c2410_wdtclk))
29 clk_enable(s3c2410_wdtclk);
30
31 /* put initial values into count and data */
32 __raw_writel(0x80, S3C2410_WTCNT);
33 __raw_writel(0x80, S3C2410_WTDAT);
34
35 /* set the watchdog to go and reset... */
36 __raw_writel(S3C2410_WTCON_ENABLE|S3C2410_WTCON_DIV16|S3C2410_WTCON_RSTEN |
37 S3C2410_WTCON_PRESCALE(0x20), S3C2410_WTCON);
38
39 /* wait for reset to assert... */
40 mdelay(500);
41
42 printk(KERN_ERR "Watchdog reset failed to assert reset\n");
43
44 /* delay to allow the serial port to show the message */
45 mdelay(50);
46}
diff --git a/arch/arm/plat-samsung/init.c b/arch/arm/plat-samsung/init.c
index 79d10fca9090..3e5c4619caa5 100644
--- a/arch/arm/plat-samsung/init.c
+++ b/arch/arm/plat-samsung/init.c
@@ -87,7 +87,7 @@ void __init s3c24xx_init_clocks(int xtal)
87} 87}
88 88
89/* uart management */ 89/* uart management */
90 90#if IS_ENABLED(CONFIG_SAMSUNG_ATAGS)
91static int nr_uarts __initdata = 0; 91static int nr_uarts __initdata = 0;
92 92
93static struct s3c2410_uartcfg uart_cfgs[CONFIG_SERIAL_SAMSUNG_UARTS]; 93static struct s3c2410_uartcfg uart_cfgs[CONFIG_SERIAL_SAMSUNG_UARTS];
@@ -134,11 +134,12 @@ void __init s3c24xx_init_uarts(struct s3c2410_uartcfg *cfg, int no)
134 if (cpu == NULL) 134 if (cpu == NULL)
135 return; 135 return;
136 136
137 if (cpu->init_uarts == NULL) { 137 if (cpu->init_uarts == NULL && IS_ENABLED(CONFIG_SAMSUNG_ATAGS)) {
138 printk(KERN_ERR "s3c24xx_init_uarts: cpu has no uart init\n"); 138 printk(KERN_ERR "s3c24xx_init_uarts: cpu has no uart init\n");
139 } else 139 } else
140 (cpu->init_uarts)(cfg, no); 140 (cpu->init_uarts)(cfg, no);
141} 141}
142#endif
142 143
143static int __init s3c_arch_init(void) 144static int __init s3c_arch_init(void)
144{ 145{
@@ -152,8 +153,9 @@ static int __init s3c_arch_init(void)
152 ret = (cpu->init)(); 153 ret = (cpu->init)();
153 if (ret != 0) 154 if (ret != 0)
154 return ret; 155 return ret;
155 156#if IS_ENABLED(CONFIG_SAMSUNG_ATAGS)
156 ret = platform_add_devices(s3c24xx_uart_devs, nr_uarts); 157 ret = platform_add_devices(s3c24xx_uart_devs, nr_uarts);
158#endif
157 return ret; 159 return ret;
158} 160}
159 161
diff --git a/arch/arm/plat-samsung/pm-gpio.c b/arch/arm/plat-samsung/pm-gpio.c
index c2ff92c30bdf..a8de3cfe2ee1 100644
--- a/arch/arm/plat-samsung/pm-gpio.c
+++ b/arch/arm/plat-samsung/pm-gpio.c
@@ -192,7 +192,8 @@ struct samsung_gpio_pm samsung_gpio_pm_2bit = {
192 .resume = samsung_gpio_pm_2bit_resume, 192 .resume = samsung_gpio_pm_2bit_resume,
193}; 193};
194 194
195#if defined(CONFIG_ARCH_S3C64XX) || defined(CONFIG_PLAT_S5P) 195#if defined(CONFIG_ARCH_S3C64XX) || defined(CONFIG_PLAT_S5P) \
196 || defined(CONFIG_ARCH_EXYNOS)
196static void samsung_gpio_pm_4bit_save(struct samsung_gpio_chip *chip) 197static void samsung_gpio_pm_4bit_save(struct samsung_gpio_chip *chip)
197{ 198{
198 chip->pm_save[1] = __raw_readl(chip->base + OFFS_CON); 199 chip->pm_save[1] = __raw_readl(chip->base + OFFS_CON);
@@ -302,7 +303,7 @@ struct samsung_gpio_pm samsung_gpio_pm_4bit = {
302 .save = samsung_gpio_pm_4bit_save, 303 .save = samsung_gpio_pm_4bit_save,
303 .resume = samsung_gpio_pm_4bit_resume, 304 .resume = samsung_gpio_pm_4bit_resume,
304}; 305};
305#endif /* CONFIG_ARCH_S3C64XX || CONFIG_PLAT_S5P */ 306#endif /* CONFIG_ARCH_S3C64XX || CONFIG_PLAT_S5P || CONFIG_ARCH_EXYNOS */
306 307
307/** 308/**
308 * samsung_pm_save_gpio() - save gpio chip data for suspend 309 * samsung_pm_save_gpio() - save gpio chip data for suspend
diff --git a/arch/arm/plat-samsung/pm.c b/arch/arm/plat-samsung/pm.c
index bd7124c87fea..d0c23010b693 100644
--- a/arch/arm/plat-samsung/pm.c
+++ b/arch/arm/plat-samsung/pm.c
@@ -22,13 +22,17 @@
22 22
23#include <asm/cacheflush.h> 23#include <asm/cacheflush.h>
24#include <asm/suspend.h> 24#include <asm/suspend.h>
25#include <mach/hardware.h>
26#include <mach/map.h>
27 25
28#include <plat/regs-serial.h> 26#include <plat/regs-serial.h>
27
28#ifdef CONFIG_SAMSUNG_ATAGS
29#include <mach/hardware.h>
30#include <mach/map.h>
29#include <mach/regs-clock.h> 31#include <mach/regs-clock.h>
30#include <mach/regs-irq.h> 32#include <mach/regs-irq.h>
31#include <mach/irqs.h> 33#include <mach/irqs.h>
34#endif
35
32#include <asm/irq.h> 36#include <asm/irq.h>
33 37
34#include <plat/pm.h> 38#include <plat/pm.h>
@@ -76,7 +80,7 @@ unsigned char pm_uart_udivslot;
76 80
77#ifdef CONFIG_SAMSUNG_PM_DEBUG 81#ifdef CONFIG_SAMSUNG_PM_DEBUG
78 82
79static struct pm_uart_save uart_save[CONFIG_SERIAL_SAMSUNG_UARTS]; 83static struct pm_uart_save uart_save;
80 84
81static void s3c_pm_save_uart(unsigned int uart, struct pm_uart_save *save) 85static void s3c_pm_save_uart(unsigned int uart, struct pm_uart_save *save)
82{ 86{
@@ -97,11 +101,7 @@ static void s3c_pm_save_uart(unsigned int uart, struct pm_uart_save *save)
97 101
98static void s3c_pm_save_uarts(void) 102static void s3c_pm_save_uarts(void)
99{ 103{
100 struct pm_uart_save *save = uart_save; 104 s3c_pm_save_uart(CONFIG_DEBUG_S3C_UART, &uart_save);
101 unsigned int uart;
102
103 for (uart = 0; uart < CONFIG_SERIAL_SAMSUNG_UARTS; uart++, save++)
104 s3c_pm_save_uart(uart, save);
105} 105}
106 106
107static void s3c_pm_restore_uart(unsigned int uart, struct pm_uart_save *save) 107static void s3c_pm_restore_uart(unsigned int uart, struct pm_uart_save *save)
@@ -122,11 +122,7 @@ static void s3c_pm_restore_uart(unsigned int uart, struct pm_uart_save *save)
122 122
123static void s3c_pm_restore_uarts(void) 123static void s3c_pm_restore_uarts(void)
124{ 124{
125 struct pm_uart_save *save = uart_save; 125 s3c_pm_restore_uart(CONFIG_DEBUG_S3C_UART, &uart_save);
126 unsigned int uart;
127
128 for (uart = 0; uart < CONFIG_SERIAL_SAMSUNG_UARTS; uart++, save++)
129 s3c_pm_restore_uart(uart, save);
130} 126}
131#else 127#else
132static void s3c_pm_save_uarts(void) { } 128static void s3c_pm_save_uarts(void) { }
diff --git a/arch/arm/plat-samsung/s5p-dev-mfc.c b/arch/arm/plat-samsung/s5p-dev-mfc.c
index a93fb6fb6606..ad51f85fbd01 100644
--- a/arch/arm/plat-samsung/s5p-dev-mfc.c
+++ b/arch/arm/plat-samsung/s5p-dev-mfc.c
@@ -17,10 +17,12 @@
17#include <linux/of_fdt.h> 17#include <linux/of_fdt.h>
18#include <linux/of.h> 18#include <linux/of.h>
19 19
20#include <plat/mfc.h>
21
22#ifdef CONFIG_SAMSUNG_ATAGS
20#include <mach/map.h> 23#include <mach/map.h>
21#include <mach/irqs.h> 24#include <mach/irqs.h>
22#include <plat/devs.h> 25#include <plat/devs.h>
23#include <plat/mfc.h>
24 26
25static struct resource s5p_mfc_resource[] = { 27static struct resource s5p_mfc_resource[] = {
26 [0] = DEFINE_RES_MEM(S5P_PA_MFC, SZ_64K), 28 [0] = DEFINE_RES_MEM(S5P_PA_MFC, SZ_64K),
@@ -61,6 +63,10 @@ struct platform_device s5p_device_mfc_r = {
61 .coherent_dma_mask = DMA_BIT_MASK(32), 63 .coherent_dma_mask = DMA_BIT_MASK(32),
62 }, 64 },
63}; 65};
66#else
67static struct platform_device s5p_device_mfc_l;
68static struct platform_device s5p_device_mfc_r;
69#endif
64 70
65struct s5p_mfc_reserved_mem { 71struct s5p_mfc_reserved_mem {
66 phys_addr_t base; 72 phys_addr_t base;
@@ -70,6 +76,7 @@ struct s5p_mfc_reserved_mem {
70 76
71static struct s5p_mfc_reserved_mem s5p_mfc_mem[2] __initdata; 77static struct s5p_mfc_reserved_mem s5p_mfc_mem[2] __initdata;
72 78
79
73void __init s5p_mfc_reserve_mem(phys_addr_t rbase, unsigned int rsize, 80void __init s5p_mfc_reserve_mem(phys_addr_t rbase, unsigned int rsize,
74 phys_addr_t lbase, unsigned int lsize) 81 phys_addr_t lbase, unsigned int lsize)
75{ 82{
@@ -93,6 +100,7 @@ void __init s5p_mfc_reserve_mem(phys_addr_t rbase, unsigned int rsize,
93 } 100 }
94} 101}
95 102
103#ifdef CONFIG_SAMSUNG_ATAGS
96static int __init s5p_mfc_memory_init(void) 104static int __init s5p_mfc_memory_init(void)
97{ 105{
98 int i; 106 int i;
@@ -111,6 +119,7 @@ static int __init s5p_mfc_memory_init(void)
111 return 0; 119 return 0;
112} 120}
113device_initcall(s5p_mfc_memory_init); 121device_initcall(s5p_mfc_memory_init);
122#endif
114 123
115#ifdef CONFIG_OF 124#ifdef CONFIG_OF
116int __init s5p_fdt_find_mfc_mem(unsigned long node, const char *uname, 125int __init s5p_fdt_find_mfc_mem(unsigned long node, const char *uname,
diff --git a/arch/arm/plat-samsung/samsung-time.c b/arch/arm/plat-samsung/samsung-time.c
index f899cbc9b288..2957075ca836 100644
--- a/arch/arm/plat-samsung/samsung-time.c
+++ b/arch/arm/plat-samsung/samsung-time.c
@@ -15,12 +15,12 @@
15#include <linux/clk.h> 15#include <linux/clk.h>
16#include <linux/clockchips.h> 16#include <linux/clockchips.h>
17#include <linux/platform_device.h> 17#include <linux/platform_device.h>
18#include <linux/sched_clock.h>
18 19
19#include <asm/smp_twd.h> 20#include <asm/smp_twd.h>
20#include <asm/mach/time.h> 21#include <asm/mach/time.h>
21#include <asm/mach/arch.h> 22#include <asm/mach/arch.h>
22#include <asm/mach/map.h> 23#include <asm/mach/map.h>
23#include <asm/sched_clock.h>
24 24
25#include <mach/map.h> 25#include <mach/map.h>
26#include <plat/devs.h> 26#include <plat/devs.h>
diff --git a/arch/arm/plat-samsung/watchdog-reset.c b/arch/arm/plat-samsung/watchdog-reset.c
new file mode 100644
index 000000000000..2ecb50bea044
--- /dev/null
+++ b/arch/arm/plat-samsung/watchdog-reset.c
@@ -0,0 +1,97 @@
1/* arch/arm/plat-samsung/watchdog-reset.c
2 *
3 * Copyright (c) 2008 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk>
5 *
6 * Coyright (c) 2013 Tomasz Figa <tomasz.figa@gmail.com>
7 *
8 * Watchdog reset support for Samsung SoCs.
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License version 2 as
12 * published by the Free Software Foundation.
13*/
14
15#include <linux/clk.h>
16#include <linux/err.h>
17#include <linux/io.h>
18#include <linux/delay.h>
19#include <linux/of.h>
20#include <linux/of_address.h>
21
22#define S3C2410_WTCON 0x00
23#define S3C2410_WTDAT 0x04
24#define S3C2410_WTCNT 0x08
25
26#define S3C2410_WTCON_ENABLE (1 << 5)
27#define S3C2410_WTCON_DIV16 (0 << 3)
28#define S3C2410_WTCON_RSTEN (1 << 0)
29#define S3C2410_WTCON_PRESCALE(x) ((x) << 8)
30
31static void __iomem *wdt_base;
32static struct clk *wdt_clock;
33
34void samsung_wdt_reset(void)
35{
36 if (!wdt_base) {
37 pr_err("%s: wdt reset not initialized\n", __func__);
38 /* delay to allow the serial port to show the message */
39 mdelay(50);
40 return;
41 }
42
43 if (!IS_ERR(wdt_clock))
44 clk_prepare_enable(wdt_clock);
45
46 /* disable watchdog, to be safe */
47 __raw_writel(0, wdt_base + S3C2410_WTCON);
48
49 /* put initial values into count and data */
50 __raw_writel(0x80, wdt_base + S3C2410_WTCNT);
51 __raw_writel(0x80, wdt_base + S3C2410_WTDAT);
52
53 /* set the watchdog to go and reset... */
54 __raw_writel(S3C2410_WTCON_ENABLE | S3C2410_WTCON_DIV16 |
55 S3C2410_WTCON_RSTEN | S3C2410_WTCON_PRESCALE(0x20),
56 wdt_base + S3C2410_WTCON);
57
58 /* wait for reset to assert... */
59 mdelay(500);
60
61 pr_err("Watchdog reset failed to assert reset\n");
62
63 /* delay to allow the serial port to show the message */
64 mdelay(50);
65}
66
67#ifdef CONFIG_OF
68static const struct of_device_id s3c2410_wdt_match[] = {
69 { .compatible = "samsung,s3c2410-wdt" },
70 {},
71};
72
73void __init samsung_wdt_reset_of_init(void)
74{
75 struct device_node *np;
76
77 np = of_find_matching_node(NULL, s3c2410_wdt_match);
78 if (!np) {
79 pr_err("%s: failed to find watchdog node\n", __func__);
80 return;
81 }
82
83 wdt_base = of_iomap(np, 0);
84 if (!wdt_base) {
85 pr_err("%s: failed to map watchdog registers\n", __func__);
86 return;
87 }
88
89 wdt_clock = of_clk_get(np, 0);
90}
91#endif
92
93void __init samsung_wdt_reset_init(void __iomem *base)
94{
95 wdt_base = base;
96 wdt_clock = clk_get(NULL, "watchdog");
97}
diff --git a/arch/arm/plat-versatile/headsmp.S b/arch/arm/plat-versatile/headsmp.S
index b178d44e9eaa..2677bc3762d7 100644
--- a/arch/arm/plat-versatile/headsmp.S
+++ b/arch/arm/plat-versatile/headsmp.S
@@ -11,8 +11,6 @@
11#include <linux/linkage.h> 11#include <linux/linkage.h>
12#include <linux/init.h> 12#include <linux/init.h>
13 13
14 __INIT
15
16/* 14/*
17 * Realview/Versatile Express specific entry point for secondary CPUs. 15 * Realview/Versatile Express specific entry point for secondary CPUs.
18 * This provides a "holding pen" into which all secondary cores are held 16 * This provides a "holding pen" into which all secondary cores are held
diff --git a/arch/arm/plat-versatile/platsmp.c b/arch/arm/plat-versatile/platsmp.c
index 1e1b2d769748..39895d892c3b 100644
--- a/arch/arm/plat-versatile/platsmp.c
+++ b/arch/arm/plat-versatile/platsmp.c
@@ -23,7 +23,7 @@
23 * observers, irrespective of whether they're taking part in coherency 23 * observers, irrespective of whether they're taking part in coherency
24 * or not. This is necessary for the hotplug code to work reliably. 24 * or not. This is necessary for the hotplug code to work reliably.
25 */ 25 */
26static void __cpuinit write_pen_release(int val) 26static void write_pen_release(int val)
27{ 27{
28 pen_release = val; 28 pen_release = val;
29 smp_wmb(); 29 smp_wmb();
@@ -33,7 +33,7 @@ static void __cpuinit write_pen_release(int val)
33 33
34static DEFINE_SPINLOCK(boot_lock); 34static DEFINE_SPINLOCK(boot_lock);
35 35
36void __cpuinit versatile_secondary_init(unsigned int cpu) 36void versatile_secondary_init(unsigned int cpu)
37{ 37{
38 /* 38 /*
39 * let the primary processor know we're out of the 39 * let the primary processor know we're out of the
@@ -48,7 +48,7 @@ void __cpuinit versatile_secondary_init(unsigned int cpu)
48 spin_unlock(&boot_lock); 48 spin_unlock(&boot_lock);
49} 49}
50 50
51int __cpuinit versatile_boot_secondary(unsigned int cpu, struct task_struct *idle) 51int versatile_boot_secondary(unsigned int cpu, struct task_struct *idle)
52{ 52{
53 unsigned long timeout; 53 unsigned long timeout;
54 54
diff --git a/arch/arm/plat-versatile/sched-clock.c b/arch/arm/plat-versatile/sched-clock.c
index b33b74c87232..51b109e3b6c3 100644
--- a/arch/arm/plat-versatile/sched-clock.c
+++ b/arch/arm/plat-versatile/sched-clock.c
@@ -20,8 +20,8 @@
20 */ 20 */
21#include <linux/kernel.h> 21#include <linux/kernel.h>
22#include <linux/io.h> 22#include <linux/io.h>
23#include <linux/sched_clock.h>
23 24
24#include <asm/sched_clock.h>
25#include <plat/sched_clock.h> 25#include <plat/sched_clock.h>
26 26
27static void __iomem *ctr; 27static void __iomem *ctr;
diff --git a/arch/arm/xen/enlighten.c b/arch/arm/xen/enlighten.c
index 13609e01f4b7..c9770ba5c7df 100644
--- a/arch/arm/xen/enlighten.c
+++ b/arch/arm/xen/enlighten.c
@@ -172,7 +172,7 @@ static void __init xen_percpu_init(void *unused)
172 enable_percpu_irq(xen_events_irq, 0); 172 enable_percpu_irq(xen_events_irq, 0);
173} 173}
174 174
175static void xen_restart(char str, const char *cmd) 175static void xen_restart(enum reboot_mode reboot_mode, const char *cmd)
176{ 176{
177 struct sched_shutdown r = { .reason = SHUTDOWN_reboot }; 177 struct sched_shutdown r = { .reason = SHUTDOWN_reboot };
178 int rc; 178 int rc;
@@ -314,4 +314,5 @@ EXPORT_SYMBOL_GPL(HYPERVISOR_hvm_op);
314EXPORT_SYMBOL_GPL(HYPERVISOR_memory_op); 314EXPORT_SYMBOL_GPL(HYPERVISOR_memory_op);
315EXPORT_SYMBOL_GPL(HYPERVISOR_physdev_op); 315EXPORT_SYMBOL_GPL(HYPERVISOR_physdev_op);
316EXPORT_SYMBOL_GPL(HYPERVISOR_vcpu_op); 316EXPORT_SYMBOL_GPL(HYPERVISOR_vcpu_op);
317EXPORT_SYMBOL_GPL(HYPERVISOR_tmem_op);
317EXPORT_SYMBOL_GPL(privcmd_call); 318EXPORT_SYMBOL_GPL(privcmd_call);
diff --git a/arch/arm/xen/hypercall.S b/arch/arm/xen/hypercall.S
index 199cb2da7663..d1cf7b7c2200 100644
--- a/arch/arm/xen/hypercall.S
+++ b/arch/arm/xen/hypercall.S
@@ -88,6 +88,7 @@ HYPERCALL2(hvm_op);
88HYPERCALL2(memory_op); 88HYPERCALL2(memory_op);
89HYPERCALL2(physdev_op); 89HYPERCALL2(physdev_op);
90HYPERCALL3(vcpu_op); 90HYPERCALL3(vcpu_op);
91HYPERCALL1(tmem_op);
91 92
92ENTRY(privcmd_call) 93ENTRY(privcmd_call)
93 stmdb sp!, {r4} 94 stmdb sp!, {r4}