]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
Merge remote-tracking branch 'arm-soc/for-next'
authorThierry Reding <treding@nvidia.com>
Thu, 24 Oct 2013 13:00:02 +0000 (15:00 +0200)
committerThierry Reding <treding@nvidia.com>
Thu, 24 Oct 2013 13:00:02 +0000 (15:00 +0200)
Conflicts:
MAINTAINERS
arch/arm/boot/dts/omap3-evm.dts
arch/arm/mach-tegra/Kconfig
arch/arm/mach-ux500/board-mop500.c

520 files changed:
Documentation/arm/Marvell/README
Documentation/devicetree/bindings/arm/arm-boards
Documentation/devicetree/bindings/arm/armada-370-xp-mpic.txt
Documentation/devicetree/bindings/arm/vic.txt
Documentation/devicetree/bindings/clock/mvebu-gated-clock.txt
Documentation/devicetree/bindings/crypto/omap-aes.txt [new file with mode: 0644]
Documentation/devicetree/bindings/crypto/omap-sham.txt [new file with mode: 0644]
Documentation/devicetree/bindings/mmc/ti-omap-hsmmc.txt
Documentation/devicetree/bindings/pci/mvebu-pci.txt
Documentation/devicetree/bindings/pinctrl/pinctrl-single.txt
Documentation/devicetree/bindings/usb/ux500-usb.txt
MAINTAINERS
arch/arm/Kconfig
arch/arm/Makefile
arch/arm/arm-soc-for-next-contents.txt [new file with mode: 0644]
arch/arm/boot/compressed/Makefile
arch/arm/boot/compressed/head-shark.S [deleted file]
arch/arm/boot/compressed/ofw-shark.c [deleted file]
arch/arm/boot/dts/Makefile
arch/arm/boot/dts/am335x-base0033.dts [new file with mode: 0644]
arch/arm/boot/dts/am335x-bone-common.dtsi
arch/arm/boot/dts/am335x-bone.dts
arch/arm/boot/dts/am335x-boneblack.dts
arch/arm/boot/dts/am335x-evm.dts
arch/arm/boot/dts/am335x-evmsk.dts
arch/arm/boot/dts/am335x-igep0033.dtsi [new file with mode: 0644]
arch/arm/boot/dts/am33xx.dtsi
arch/arm/boot/dts/am4372.dtsi
arch/arm/boot/dts/armada-370-xp.dtsi
arch/arm/boot/dts/armada-370.dtsi
arch/arm/boot/dts/armada-xp-matrix.dts [new file with mode: 0644]
arch/arm/boot/dts/armada-xp-mv78230.dtsi
arch/arm/boot/dts/armada-xp-mv78260.dtsi
arch/arm/boot/dts/armada-xp-mv78460.dtsi
arch/arm/boot/dts/armada-xp.dtsi
arch/arm/boot/dts/at91sam9g20ek_common.dtsi
arch/arm/boot/dts/at91sam9g25.dtsi
arch/arm/boot/dts/at91sam9g35.dtsi
arch/arm/boot/dts/at91sam9n12.dtsi
arch/arm/boot/dts/at91sam9n12ek.dts
arch/arm/boot/dts/at91sam9x25.dtsi
arch/arm/boot/dts/at91sam9x35.dtsi
arch/arm/boot/dts/at91sam9x5.dtsi
arch/arm/boot/dts/at91sam9x5_macb0.dtsi [new file with mode: 0644]
arch/arm/boot/dts/at91sam9x5_macb1.dtsi [new file with mode: 0644]
arch/arm/boot/dts/at91sam9x5_usart3.dtsi [new file with mode: 0644]
arch/arm/boot/dts/dove-cm-a510.dts
arch/arm/boot/dts/dove-cubox.dts
arch/arm/boot/dts/dove-d2plug.dts
arch/arm/boot/dts/dove-d3plug.dts [new file with mode: 0644]
arch/arm/boot/dts/dove-dove-db.dts
arch/arm/boot/dts/dove.dtsi
arch/arm/boot/dts/dra7-evm.dts [new file with mode: 0644]
arch/arm/boot/dts/dra7.dtsi [new file with mode: 0644]
arch/arm/boot/dts/ecx-common.dtsi
arch/arm/boot/dts/emev2-kzm9d-reference.dts [deleted file]
arch/arm/boot/dts/emev2-kzm9d.dts
arch/arm/boot/dts/exynos4210-origen.dts
arch/arm/boot/dts/exynos4210-trats.dts
arch/arm/boot/dts/exynos4210-universal_c210.dts
arch/arm/boot/dts/exynos5250-pinctrl.dtsi
arch/arm/boot/dts/exynos5440-sd5v1.dts
arch/arm/boot/dts/exynos5440-ssdk5440.dts
arch/arm/boot/dts/integrator.dtsi
arch/arm/boot/dts/integratorap.dts
arch/arm/boot/dts/integratorcp.dts
arch/arm/boot/dts/keystone-clocks.dtsi [new file with mode: 0644]
arch/arm/boot/dts/keystone.dts
arch/arm/boot/dts/kirkwood-db-88f6281.dts
arch/arm/boot/dts/kirkwood-db-88f6282.dts
arch/arm/boot/dts/kirkwood-db.dtsi
arch/arm/boot/dts/kirkwood-dnskw.dtsi
arch/arm/boot/dts/kirkwood-dockstar.dts
arch/arm/boot/dts/kirkwood-goflexnet.dts
arch/arm/boot/dts/kirkwood-guruplug-server-plus.dts
arch/arm/boot/dts/kirkwood-ib62x0.dts
arch/arm/boot/dts/kirkwood-iconnect.dts
arch/arm/boot/dts/kirkwood-iomega_ix2_200.dts
arch/arm/boot/dts/kirkwood-km_kirkwood.dts
arch/arm/boot/dts/kirkwood-mplcec4.dts
arch/arm/boot/dts/kirkwood-netgear_readynas_duo_v2.dts
arch/arm/boot/dts/kirkwood-nsa310-common.dtsi
arch/arm/boot/dts/kirkwood-nsa310.dts
arch/arm/boot/dts/kirkwood-openblocks_a6.dts
arch/arm/boot/dts/kirkwood-sheevaplug-common.dtsi
arch/arm/boot/dts/kirkwood-topkick.dts
arch/arm/boot/dts/kirkwood-ts219-6282.dts
arch/arm/boot/dts/kirkwood.dtsi
arch/arm/boot/dts/omap-gpmc-smsc911x.dtsi [new file with mode: 0644]
arch/arm/boot/dts/omap-zoom-common.dtsi [new file with mode: 0644]
arch/arm/boot/dts/omap2420-h4.dts
arch/arm/boot/dts/omap3-beagle-xm.dts
arch/arm/boot/dts/omap3-beagle.dts
arch/arm/boot/dts/omap3-devkit8000.dts
arch/arm/boot/dts/omap3-evm-37xx.dts [new file with mode: 0644]
arch/arm/boot/dts/omap3-evm-common.dtsi [new file with mode: 0644]
arch/arm/boot/dts/omap3-evm.dts
arch/arm/boot/dts/omap3-gta04.dts [new file with mode: 0644]
arch/arm/boot/dts/omap3-igep.dtsi
arch/arm/boot/dts/omap3-igep0020.dts
arch/arm/boot/dts/omap3-igep0030.dts
arch/arm/boot/dts/omap3-n9.dts [new file with mode: 0644]
arch/arm/boot/dts/omap3-n900.dts [new file with mode: 0644]
arch/arm/boot/dts/omap3-n950-n9.dtsi [new file with mode: 0644]
arch/arm/boot/dts/omap3-n950.dts [new file with mode: 0644]
arch/arm/boot/dts/omap3-zoom3.dts [new file with mode: 0644]
arch/arm/boot/dts/omap3.dtsi
arch/arm/boot/dts/omap3430-sdp.dts
arch/arm/boot/dts/omap4-panda-common.dtsi
arch/arm/boot/dts/omap4-sdp.dts
arch/arm/boot/dts/omap4.dtsi
arch/arm/boot/dts/omap5-uevm.dts
arch/arm/boot/dts/omap5.dtsi
arch/arm/boot/dts/qcom-msm8660-surf.dts [moved from arch/arm/boot/dts/msm8660-surf.dts with 100% similarity]
arch/arm/boot/dts/qcom-msm8960-cdp.dts [moved from arch/arm/boot/dts/msm8960-cdp.dts with 100% similarity]
arch/arm/boot/dts/r7s72100-genmai.dts [new file with mode: 0644]
arch/arm/boot/dts/r7s72100.dtsi [new file with mode: 0644]
arch/arm/boot/dts/r8a73a4-ape6evm-reference.dts
arch/arm/boot/dts/r8a73a4-ape6evm.dts
arch/arm/boot/dts/r8a73a4.dtsi
arch/arm/boot/dts/r8a7740-armadillo800eva-reference.dts
arch/arm/boot/dts/r8a7740.dtsi
arch/arm/boot/dts/r8a7778-bockw-reference.dts
arch/arm/boot/dts/r8a7778.dtsi
arch/arm/boot/dts/r8a7779-marzen-reference.dts
arch/arm/boot/dts/r8a7779.dtsi
arch/arm/boot/dts/r8a7790.dtsi
arch/arm/boot/dts/r8a7791-koelsch.dts [new file with mode: 0644]
arch/arm/boot/dts/r8a7791.dtsi [new file with mode: 0644]
arch/arm/boot/dts/rk3066a-bqcurie2.dts [new file with mode: 0644]
arch/arm/boot/dts/rk3066a.dtsi
arch/arm/boot/dts/rk3188-clocks.dtsi [new file with mode: 0644]
arch/arm/boot/dts/rk3188-radxarock.dts [new file with mode: 0644]
arch/arm/boot/dts/rk3188.dtsi [new file with mode: 0644]
arch/arm/boot/dts/rk3xxx.dtsi [new file with mode: 0644]
arch/arm/boot/dts/s3c6400.dtsi [new file with mode: 0644]
arch/arm/boot/dts/s3c6410-mini6410.dts [new file with mode: 0644]
arch/arm/boot/dts/s3c6410-smdk6410.dts [new file with mode: 0644]
arch/arm/boot/dts/s3c6410.dtsi [new file with mode: 0644]
arch/arm/boot/dts/s3c64xx-pinctrl.dtsi [new file with mode: 0644]
arch/arm/boot/dts/s3c64xx.dtsi [new file with mode: 0644]
arch/arm/boot/dts/sama5d3.dtsi
arch/arm/boot/dts/sama5d31.dtsi [new file with mode: 0644]
arch/arm/boot/dts/sama5d31ek.dts
arch/arm/boot/dts/sama5d33.dtsi [new file with mode: 0644]
arch/arm/boot/dts/sama5d33ek.dts
arch/arm/boot/dts/sama5d34.dtsi [new file with mode: 0644]
arch/arm/boot/dts/sama5d34ek.dts
arch/arm/boot/dts/sama5d35.dtsi [new file with mode: 0644]
arch/arm/boot/dts/sama5d35ek.dts
arch/arm/boot/dts/sama5d3_can.dtsi [new file with mode: 0644]
arch/arm/boot/dts/sama5d3_emac.dtsi [new file with mode: 0644]
arch/arm/boot/dts/sama5d3_gmac.dtsi [new file with mode: 0644]
arch/arm/boot/dts/sama5d3_lcd.dtsi [new file with mode: 0644]
arch/arm/boot/dts/sama5d3_mci2.dtsi [new file with mode: 0644]
arch/arm/boot/dts/sama5d3_tcb1.dtsi [new file with mode: 0644]
arch/arm/boot/dts/sama5d3_uart.dtsi [new file with mode: 0644]
arch/arm/boot/dts/sama5d3xcm.dtsi
arch/arm/boot/dts/sh73a0-kzm9g-reference.dts
arch/arm/boot/dts/sh73a0.dtsi
arch/arm/boot/dts/socfpga.dtsi
arch/arm/boot/dts/socfpga_arria5.dtsi [new file with mode: 0644]
arch/arm/boot/dts/socfpga_arria5_socdk.dts [new file with mode: 0644]
arch/arm/boot/dts/socfpga_cyclone5.dtsi [moved from arch/arm/boot/dts/socfpga_cyclone5.dts with 78% similarity]
arch/arm/boot/dts/socfpga_cyclone5_socdk.dts [new file with mode: 0644]
arch/arm/boot/dts/socfpga_cyclone5_sockit.dts [moved from include/linux/clk/sunxi.h with 50% similarity]
arch/arm/boot/dts/ste-dbx5x0.dtsi
arch/arm/boot/dts/ste-href-stuib.dtsi [moved from arch/arm/boot/dts/ste-stuib.dtsi with 95% similarity]
arch/arm/boot/dts/ste-href-tvk1281618.dtsi [new file with mode: 0644]
arch/arm/boot/dts/ste-href.dtsi
arch/arm/boot/dts/ste-hrefprev60-stuib.dts [new file with mode: 0644]
arch/arm/boot/dts/ste-hrefprev60-tvk.dts [new file with mode: 0644]
arch/arm/boot/dts/ste-hrefprev60.dtsi [moved from arch/arm/boot/dts/ste-hrefprev60.dts with 60% similarity]
arch/arm/boot/dts/ste-hrefv60plus-stuib.dts [new file with mode: 0644]
arch/arm/boot/dts/ste-hrefv60plus-tvk.dts [new file with mode: 0644]
arch/arm/boot/dts/ste-hrefv60plus.dts [deleted file]
arch/arm/boot/dts/ste-hrefv60plus.dtsi [new file with mode: 0644]
arch/arm/boot/dts/ste-nomadik-stn8815.dtsi
arch/arm/boot/dts/ste-snowball.dts
arch/arm/boot/dts/tegra114-dalmore.dts
arch/arm/boot/dts/tegra124-venice2.dts [new file with mode: 0644]
arch/arm/boot/dts/tegra124.dtsi [new file with mode: 0644]
arch/arm/boot/dts/tegra30-cardhu.dtsi
arch/arm/boot/dts/tegra30.dtsi
arch/arm/boot/dts/twl6030_omap4.dtsi [new file with mode: 0644]
arch/arm/common/Makefile
arch/arm/common/via82c505.c [deleted file]
arch/arm/configs/bockw_defconfig
arch/arm/configs/integrator_defconfig
arch/arm/configs/keystone_defconfig
arch/arm/configs/koelsch_defconfig [new file with mode: 0644]
arch/arm/configs/lager_defconfig
arch/arm/configs/marzen_defconfig
arch/arm/configs/omap2plus_defconfig
arch/arm/configs/shark_defconfig [deleted file]
arch/arm/configs/tegra_defconfig
arch/arm/configs/u8500_defconfig
arch/arm/include/asm/mach/pci.h
arch/arm/include/asm/sched_clock.h [deleted file]
arch/arm/kernel/psci_smp.c
arch/arm/kernel/time.c
arch/arm/lib/Makefile
arch/arm/lib/io-shark.c [deleted file]
arch/arm/mach-at91/at91sam9n12.c
arch/arm/mach-at91/board-cam60.c
arch/arm/mach-at91/board-dt-rm9200.c
arch/arm/mach-at91/board-dt-sam9.c
arch/arm/mach-bcm/board_bcm281xx.c
arch/arm/mach-bcm2835/bcm2835.c
arch/arm/mach-clps711x/common.c
arch/arm/mach-davinci/board-da830-evm.c
arch/arm/mach-davinci/board-da850-evm.c
arch/arm/mach-davinci/board-dm355-evm.c
arch/arm/mach-davinci/board-dm355-leopard.c
arch/arm/mach-davinci/board-dm365-evm.c
arch/arm/mach-davinci/board-dm644x-evm.c
arch/arm/mach-davinci/board-dm646x-evm.c
arch/arm/mach-davinci/board-neuros-osd2.c
arch/arm/mach-davinci/board-omapl138-hawk.c
arch/arm/mach-davinci/da830.c
arch/arm/mach-davinci/da850.c
arch/arm/mach-davinci/davinci.h
arch/arm/mach-davinci/devices-da8xx.c
arch/arm/mach-davinci/devices.c
arch/arm/mach-davinci/dm355.c
arch/arm/mach-davinci/dm365.c
arch/arm/mach-davinci/dm644x.c
arch/arm/mach-davinci/dm646x.c
arch/arm/mach-davinci/include/mach/da8xx.h
arch/arm/mach-davinci/include/mach/gpio-davinci.h [deleted file]
arch/arm/mach-davinci/include/mach/gpio.h [deleted file]
arch/arm/mach-davinci/time.c
arch/arm/mach-dove/board-dt.c
arch/arm/mach-exynos/common.c
arch/arm/mach-exynos/common.h
arch/arm/mach-exynos/mach-exynos4-dt.c
arch/arm/mach-exynos/mach-exynos5-dt.c
arch/arm/mach-highbank/Kconfig
arch/arm/mach-highbank/Makefile
arch/arm/mach-highbank/core.h
arch/arm/mach-highbank/highbank.c
arch/arm/mach-highbank/hotplug.c [deleted file]
arch/arm/mach-highbank/platsmp.c [deleted file]
arch/arm/mach-highbank/pm.c
arch/arm/mach-imx/Kconfig
arch/arm/mach-imx/clk-imx51-imx53.c
arch/arm/mach-imx/common.h
arch/arm/mach-imx/imx51-dt.c
arch/arm/mach-imx/mach-imx53.c
arch/arm/mach-imx/mach-imx6q.c
arch/arm/mach-imx/mach-imx6sl.c
arch/arm/mach-imx/mach-vf610.c
arch/arm/mach-integrator/cm.h [moved from arch/arm/mach-integrator/include/mach/cm.h with 88% similarity]
arch/arm/mach-integrator/core.c
arch/arm/mach-integrator/include/mach/irqs.h [deleted file]
arch/arm/mach-integrator/integrator_ap.c
arch/arm/mach-integrator/integrator_cp.c
arch/arm/mach-integrator/leds.c
arch/arm/mach-integrator/pci_v3.c
arch/arm/mach-keystone/Kconfig
arch/arm/mach-keystone/Makefile
arch/arm/mach-keystone/pm_domain.c [new file with mode: 0644]
arch/arm/mach-kirkwood/Makefile
arch/arm/mach-kirkwood/board-dt.c
arch/arm/mach-kirkwood/common.c
arch/arm/mach-kirkwood/common.h
arch/arm/mach-kirkwood/include/mach/bridge-regs.h
arch/arm/mach-kirkwood/pm.c [new file with mode: 0644]
arch/arm/mach-msm/Kconfig
arch/arm/mach-msm/Makefile
arch/arm/mach-msm/board-dt-8660.c [deleted file]
arch/arm/mach-msm/board-dt.c [moved from arch/arm/mach-msm/board-dt-8960.c with 64% similarity]
arch/arm/mach-msm/include/mach/irqs-8960.h [deleted file]
arch/arm/mach-msm/include/mach/irqs-8x60.h [deleted file]
arch/arm/mach-msm/include/mach/irqs.h
arch/arm/mach-mxs/mach-mxs.c
arch/arm/mach-nomadik/cpu-8815.c
arch/arm/mach-nspire/nspire.c
arch/arm/mach-omap1/common.h
arch/arm/mach-omap1/fpga.c
arch/arm/mach-omap1/gpio15xx.c
arch/arm/mach-omap1/gpio16xx.c
arch/arm/mach-omap1/gpio7xx.c
arch/arm/mach-omap1/pm.c
arch/arm/mach-omap1/time.c
arch/arm/mach-omap1/timer32k.c
arch/arm/mach-omap2/Kconfig
arch/arm/mach-omap2/Makefile
arch/arm/mach-omap2/board-3630sdp.c [deleted file]
arch/arm/mach-omap2/board-generic.c
arch/arm/mach-omap2/board-igep0020.c [deleted file]
arch/arm/mach-omap2/board-ldp.c
arch/arm/mach-omap2/board-omap3evm.c [deleted file]
arch/arm/mach-omap2/board-rm680.c [deleted file]
arch/arm/mach-omap2/board-rx51-peripherals.c
arch/arm/mach-omap2/board-rx51.c
arch/arm/mach-omap2/board-zoom-debugboard.c [deleted file]
arch/arm/mach-omap2/board-zoom-display.c [deleted file]
arch/arm/mach-omap2/board-zoom-peripherals.c [deleted file]
arch/arm/mach-omap2/board-zoom.c [deleted file]
arch/arm/mach-omap2/board-zoom.h [deleted file]
arch/arm/mach-omap2/cclock3xxx_data.c
arch/arm/mach-omap2/clockdomain.h
arch/arm/mach-omap2/clockdomains43xx_data.c [new file with mode: 0644]
arch/arm/mach-omap2/cm33xx.c
arch/arm/mach-omap2/cm33xx.h
arch/arm/mach-omap2/cminst44xx.c
arch/arm/mach-omap2/cminst44xx.h
arch/arm/mach-omap2/common.h
arch/arm/mach-omap2/devices.c
arch/arm/mach-omap2/display.c
arch/arm/mach-omap2/display.h
arch/arm/mach-omap2/drm.c
arch/arm/mach-omap2/dss-common.c
arch/arm/mach-omap2/dss-common.h
arch/arm/mach-omap2/fb.c
arch/arm/mach-omap2/gpmc.c
arch/arm/mach-omap2/id.c
arch/arm/mach-omap2/io.c
arch/arm/mach-omap2/mux.c
arch/arm/mach-omap2/omap-secure.c
arch/arm/mach-omap2/omap-secure.h
arch/arm/mach-omap2/omap-smc.S
arch/arm/mach-omap2/omap-smp.c
arch/arm/mach-omap2/omap_hwmod.c
arch/arm/mach-omap2/omap_hwmod.h
arch/arm/mach-omap2/omap_hwmod_33xx_43xx_common_data.h [new file with mode: 0644]
arch/arm/mach-omap2/omap_hwmod_33xx_43xx_interconnect_data.c [new file with mode: 0644]
arch/arm/mach-omap2/omap_hwmod_33xx_43xx_ipblock_data.c [new file with mode: 0644]
arch/arm/mach-omap2/omap_hwmod_33xx_data.c
arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
arch/arm/mach-omap2/omap_hwmod_43xx_data.c [new file with mode: 0644]
arch/arm/mach-omap2/omap_hwmod_44xx_data.c
arch/arm/mach-omap2/omap_hwmod_54xx_data.c
arch/arm/mach-omap2/pdata-quirks.c [new file with mode: 0644]
arch/arm/mach-omap2/powerdomain.h
arch/arm/mach-omap2/powerdomains43xx_data.c [new file with mode: 0644]
arch/arm/mach-omap2/prcm43xx.h [new file with mode: 0644]
arch/arm/mach-omap2/prm3xxx.h
arch/arm/mach-omap2/prm44xx_54xx.h
arch/arm/mach-omap2/prm_common.c
arch/arm/mach-omap2/soc.h
arch/arm/mach-omap2/timer.c
arch/arm/mach-prima2/common.c
arch/arm/mach-prima2/common.h
arch/arm/mach-rockchip/Kconfig
arch/arm/mach-rockchip/rockchip.c
arch/arm/mach-s3c64xx/Kconfig
arch/arm/mach-s3c64xx/Makefile
arch/arm/mach-s3c64xx/clock.c [deleted file]
arch/arm/mach-s3c64xx/common.c
arch/arm/mach-s3c64xx/common.h
arch/arm/mach-s3c64xx/dma.c
arch/arm/mach-s3c64xx/include/mach/regs-clock.h
arch/arm/mach-s3c64xx/irq-pm.c
arch/arm/mach-s3c64xx/mach-anw6410.c
arch/arm/mach-s3c64xx/mach-crag6410.c
arch/arm/mach-s3c64xx/mach-hmt.c
arch/arm/mach-s3c64xx/mach-mini6410.c
arch/arm/mach-s3c64xx/mach-ncp.c
arch/arm/mach-s3c64xx/mach-s3c64xx-dt.c [new file with mode: 0644]
arch/arm/mach-s3c64xx/mach-smartq.c
arch/arm/mach-s3c64xx/mach-smdk6400.c
arch/arm/mach-s3c64xx/mach-smdk6410.c
arch/arm/mach-s3c64xx/pm.c
arch/arm/mach-s3c64xx/s3c6400.c
arch/arm/mach-s3c64xx/s3c6410.c
arch/arm/mach-shark/Makefile [deleted file]
arch/arm/mach-shark/Makefile.boot [deleted file]
arch/arm/mach-shark/core.c [deleted file]
arch/arm/mach-shark/dma.c [deleted file]
arch/arm/mach-shark/include/mach/debug-macro.S [deleted file]
arch/arm/mach-shark/include/mach/entry-macro.S [deleted file]
arch/arm/mach-shark/include/mach/framebuffer.h [deleted file]
arch/arm/mach-shark/include/mach/hardware.h [deleted file]
arch/arm/mach-shark/include/mach/irqs.h [deleted file]
arch/arm/mach-shark/include/mach/isa-dma.h [deleted file]
arch/arm/mach-shark/include/mach/memory.h [deleted file]
arch/arm/mach-shark/include/mach/timex.h [deleted file]
arch/arm/mach-shark/include/mach/uncompress.h [deleted file]
arch/arm/mach-shark/irq.c [deleted file]
arch/arm/mach-shark/leds.c [deleted file]
arch/arm/mach-shark/pci.c [deleted file]
arch/arm/mach-shmobile/Kconfig
arch/arm/mach-shmobile/Makefile
arch/arm/mach-shmobile/Makefile.boot
arch/arm/mach-shmobile/board-ape6evm-reference.c
arch/arm/mach-shmobile/board-ape6evm.c
arch/arm/mach-shmobile/board-armadillo800eva.c
arch/arm/mach-shmobile/board-bockw-reference.c
arch/arm/mach-shmobile/board-bockw.c
arch/arm/mach-shmobile/board-genmai.c [new file with mode: 0644]
arch/arm/mach-shmobile/board-koelsch.c [new file with mode: 0644]
arch/arm/mach-shmobile/board-kzm9d-reference.c
arch/arm/mach-shmobile/board-kzm9g.c
arch/arm/mach-shmobile/board-lager-reference.c
arch/arm/mach-shmobile/board-lager.c
arch/arm/mach-shmobile/board-marzen-reference.c
arch/arm/mach-shmobile/board-marzen.c
arch/arm/mach-shmobile/clock-r7s72100.c [new file with mode: 0644]
arch/arm/mach-shmobile/clock-r8a73a4.c
arch/arm/mach-shmobile/clock-r8a7778.c
arch/arm/mach-shmobile/clock-r8a7779.c
arch/arm/mach-shmobile/clock-r8a7790.c
arch/arm/mach-shmobile/clock-r8a7791.c [new file with mode: 0644]
arch/arm/mach-shmobile/headsmp.S
arch/arm/mach-shmobile/include/mach/common.h
arch/arm/mach-shmobile/include/mach/r7s72100.h [new file with mode: 0644]
arch/arm/mach-shmobile/include/mach/r8a73a4.h
arch/arm/mach-shmobile/include/mach/r8a7778.h
arch/arm/mach-shmobile/include/mach/r8a7779.h
arch/arm/mach-shmobile/include/mach/r8a7790.h
arch/arm/mach-shmobile/include/mach/r8a7791.h [new file with mode: 0644]
arch/arm/mach-shmobile/include/mach/rcar-gen2.h [new file with mode: 0644]
arch/arm/mach-shmobile/platsmp-apmu.c [new file with mode: 0644]
arch/arm/mach-shmobile/platsmp-scu.c
arch/arm/mach-shmobile/platsmp.c
arch/arm/mach-shmobile/setup-r7s72100.c [new file with mode: 0644]
arch/arm/mach-shmobile/setup-r8a73a4.c
arch/arm/mach-shmobile/setup-r8a7778.c
arch/arm/mach-shmobile/setup-r8a7779.c
arch/arm/mach-shmobile/setup-r8a7790.c
arch/arm/mach-shmobile/setup-r8a7791.c [new file with mode: 0644]
arch/arm/mach-shmobile/setup-rcar-gen2.c [new file with mode: 0644]
arch/arm/mach-shmobile/smp-emev2.c
arch/arm/mach-shmobile/smp-r8a7779.c
arch/arm/mach-shmobile/smp-r8a7790.c [new file with mode: 0644]
arch/arm/mach-shmobile/smp-r8a7791.c [new file with mode: 0644]
arch/arm/mach-shmobile/smp-sh73a0.c
arch/arm/mach-socfpga/Kconfig
arch/arm/mach-socfpga/socfpga.c
arch/arm/mach-spear/Kconfig
arch/arm/mach-sti/board-dt.c
arch/arm/mach-sunxi/sunxi.c
arch/arm/mach-tegra/Kconfig
arch/arm/mach-tegra/Makefile
arch/arm/mach-tegra/board-paz00.c
arch/arm/mach-tegra/board-paz00.h [deleted file]
arch/arm/mach-tegra/board.h
arch/arm/mach-tegra/common.c [deleted file]
arch/arm/mach-tegra/fuse.c
arch/arm/mach-tegra/gpio-names.h [deleted file]
arch/arm/mach-tegra/iomap.h
arch/arm/mach-tegra/irammap.h
arch/arm/mach-tegra/pm.c
arch/arm/mach-tegra/pm.h
arch/arm/mach-tegra/pmc.c
arch/arm/mach-tegra/pmc.h
arch/arm/mach-tegra/reset.c
arch/arm/mach-tegra/sleep-tegra20.S
arch/arm/mach-tegra/sleep-tegra30.S
arch/arm/mach-tegra/tegra.c
arch/arm/mach-u300/Kconfig
arch/arm/mach-ux500/Kconfig
arch/arm/mach-ux500/Makefile
arch/arm/mach-ux500/board-mop500-audio.c
arch/arm/mach-ux500/board-mop500-sdi.c
arch/arm/mach-ux500/board-mop500-stuib.c [deleted file]
arch/arm/mach-ux500/board-mop500-u8500uib.c [deleted file]
arch/arm/mach-ux500/board-mop500-uib.c [deleted file]
arch/arm/mach-ux500/board-mop500.c
arch/arm/mach-ux500/board-mop500.h
arch/arm/mach-ux500/cpu-db8500.c
arch/arm/mach-ux500/cpu.c
arch/arm/mach-ux500/devices-common.c [deleted file]
arch/arm/mach-ux500/devices-common.h [deleted file]
arch/arm/mach-ux500/devices-db8500.c
arch/arm/mach-ux500/devices-db8500.h
arch/arm/mach-ux500/devices.h
arch/arm/mach-ux500/setup.h
arch/arm/mach-ux500/timer.c
arch/arm/mach-ux500/usb.c [deleted file]
arch/arm/mach-vexpress/Kconfig
arch/arm/mach-vexpress/v2m.c
arch/arm/mach-vt8500/Kconfig
arch/arm/mach-vt8500/common.h [deleted file]
arch/arm/mach-vt8500/vt8500.c
arch/arm/plat-omap/dma.c
arch/arm/plat-samsung/include/plat/cpu.h
arch/arm/plat-samsung/init.c
drivers/block/Kconfig
drivers/clk/clk-bcm2835.c
drivers/clk/clk-highbank.c
drivers/clk/clk-nomadik.c
drivers/clk/clk-prima2.c
drivers/clk/clk-vt8500.c
drivers/clk/mxs/clk-imx23.c
drivers/clk/mxs/clk-imx28.c
drivers/clk/samsung/Makefile
drivers/clk/sunxi/clk-sunxi.c
drivers/clk/ux500/Makefile
drivers/clk/ux500/u8500_of_clk.c [new file with mode: 0644]
drivers/clk/ux500/u8540_clk.c
drivers/cpufreq/integrator-cpufreq.c
drivers/cpuidle/Kconfig.arm
drivers/cpuidle/cpuidle-calxeda.c
drivers/dma/Kconfig
drivers/gpio/gpio-davinci.c
drivers/gpio/gpio-samsung.c
drivers/gpio/gpio-tnetv107x.c
drivers/ide/Kconfig
drivers/input/serio/Kconfig
drivers/irqchip/irq-armada-370-xp.c
drivers/irqchip/irq-vic.c
drivers/mfd/db8500-prcmu.c
drivers/mfd/dbx500-prcmu-regs.h
drivers/pci/host/Kconfig
drivers/pci/host/pci-mvebu.c
drivers/pinctrl/pinctrl-single.c
drivers/usb/host/ohci-s3c2410.c
drivers/usb/musb/ux500.c
drivers/video/cyber2000fb.c
include/dt-bindings/mfd/dbx500-prcmu.h [new file with mode: 0644]
include/dt-bindings/pinctrl/dra.h [new file with mode: 0644]
include/linux/clk/mxs.h
include/linux/mfd/dbx500-prcmu.h
include/linux/platform_data/clk-nomadik.h [deleted file]
include/linux/platform_data/clk-ux500.h
include/linux/platform_data/gpio-davinci.h [new file with mode: 0644]
include/linux/platform_data/pinctrl-single.h [new file with mode: 0644]

index 8f08a86e03b7a36d9ece83f1e2e2957ecfe49d8d..da0151db996419f0b685f35b0f461d38ffaec924 100644 (file)
@@ -88,6 +88,7 @@ EBU Armada family
         MV78230
         MV78260
         MV78460
+    NOTE: not to be confused with the non-SMP 78xx0 SoCs
 
   Product Brief: http://www.marvell.com/embedded-processors/armada-xp/assets/Marvell-ArmadaXP-SoC-product%20brief.pdf
   No public datasheet available.
index db5858e32d3f86f88c9776e80b98eddb27435131..5fac246a9530168fc42b378d7b37da9e694dbb91 100644 (file)
@@ -9,9 +9,53 @@ Required properties (in root node):
 
 FPGA type interrupt controllers, see the versatile-fpga-irq binding doc.
 
-In the root node the Integrator/CP must have a /cpcon node pointing
-to the CP control registers, and the Integrator/AP must have a
-/syscon node pointing to the Integrator/AP system controller.
+Required nodes:
+
+- core-module: the root node to the Integrator platforms must have
+  a core-module with regs and the compatible string
+  "arm,core-module-integrator"
+
+  Required properties for the core module:
+  - regs: the location and size of the core module registers, one
+    range of 0x200 bytes.
+
+- syscon: the root node of the Integrator platforms must have a
+  system controller node pointong to the control registers,
+  with the compatible string
+  "arm,integrator-ap-syscon"
+  "arm,integrator-cp-syscon"
+  respectively.
+
+  Required properties for the system controller:
+  - regs: the location and size of the system controller registers,
+    one range of 0x100 bytes.
+
+  Required properties for the AP system controller:
+  - interrupts: the AP syscon node must include the logical module
+    interrupts, stated in order of module instance <module 0>,
+    <module 1>, <module 2> ... for the CP system controller this
+    is not required not of any use.
+
+/dts-v1/;
+/include/ "integrator.dtsi"
+
+/ {
+       model = "ARM Integrator/AP";
+       compatible = "arm,integrator-ap";
+
+       core-module@10000000 {
+               compatible = "arm,core-module-integrator";
+               reg = <0x10000000 0x200>;
+       };
+
+       syscon {
+               compatible = "arm,integrator-ap-syscon";
+               reg = <0x11000000 0x100>;
+               interrupt-parent = <&pic>;
+               /* These are the logic module IRQs */
+               interrupts = <9>, <10>, <11>, <12>;
+       };
+};
 
 
 ARM Versatile Application and Platform Baseboards
index 61df564c0d238613e55b3057192528db54151e8b..d74091a8a3bfd243490d83faedd452ec9a2c426c 100644 (file)
@@ -4,6 +4,8 @@ Marvell Armada 370 and Armada XP Interrupt Controller
 Required properties:
 - compatible: Should be "marvell,mpic"
 - interrupt-controller: Identifies the node as an interrupt controller.
+- msi-controller: Identifies the node as an PCI Message Signaled
+  Interrupt controller.
 - #interrupt-cells: The number of cells to define the interrupts. Should be 1.
   The cell is the IRQ number
 
@@ -24,6 +26,7 @@ Example:
               #address-cells = <1>;
               #size-cells = <1>;
               interrupt-controller;
+              msi-controller;
               reg = <0xd0020a00 0x1d0>,
                     <0xd0021070 0x58>;
         };
index 266716b2343723525278d34db2f1c4c05ae2826b..dd527216c5fbddfce790fe9bf4a2342f56e025f1 100644 (file)
@@ -18,6 +18,15 @@ Required properties:
 Optional properties:
 
 - interrupts : Interrupt source for parent controllers if the VIC is nested.
+- valid-mask : A one cell big bit mask of valid interrupt sources. Each bit
+  represents single interrupt source, starting from source 0 at LSb and ending
+  at source 31 at MSb. A bit that is set means that the source is wired and
+  clear means otherwise. If unspecified, defaults to all valid.
+- valid-wakeup-mask : A one cell big bit mask of interrupt sources that can be
+  configured as wake up source for the system. Order of bits is the same as for
+  valid-mask property. A set bit means that this interrupt source can be
+  configured as a wake up source for the system. If unspecied, defaults to all
+  interrupt sources configurable as wake up sources.
 
 Example:
 
@@ -26,4 +35,7 @@ Example:
                interrupt-controller;
                #interrupt-cells = <1>;
                reg = <0x60000 0x1000>;
+
+               valid-mask = <0xffffff7f>;
+               valid-wakeup-mask = <0x0000ff7f>;
        };
index cffc93d97f54800cb91d47cf50d666abe16e8758..fc2910fa7e45fdbbe41a0ccdd947e736ca2e0e75 100644 (file)
@@ -1,10 +1,10 @@
-* Gated Clock bindings for Marvell Orion SoCs
+* Gated Clock bindings for Marvell EBU SoCs
 
-Marvell Dove and Kirkwood allow some peripheral clocks to be gated to save
-some power. The clock consumer should specify the desired clock by having
-the clock ID in its "clocks" phandle cell. The clock ID is directly mapped to
-the corresponding clock gating control bit in HW to ease manual clock lookup
-in datasheet.
+Marvell Armada 370/XP, Dove and Kirkwood allow some peripheral clocks to be
+gated to save some power. The clock consumer should specify the desired clock
+by having the clock ID in its "clocks" phandle cell. The clock ID is directly
+mapped to the corresponding clock gating control bit in HW to ease manual clock
+lookup in datasheet.
 
 The following is a list of provided IDs for Armada 370:
 ID     Clock   Peripheral
@@ -94,6 +94,8 @@ ID    Clock   Peripheral
 
 Required properties:
 - compatible : shall be one of the following:
+       "marvell,armada-370-gating-clock" - for Armada 370 SoC clock gating
+       "marvell,armada-xp-gating-clock" - for Armada XP SoC clock gating
        "marvell,dove-gating-clock" - for Dove SoC clock gating
        "marvell,kirkwood-gating-clock" - for Kirkwood SoC clock gating
 - reg : shall be the register address of the Clock Gating Control register
diff --git a/Documentation/devicetree/bindings/crypto/omap-aes.txt b/Documentation/devicetree/bindings/crypto/omap-aes.txt
new file mode 100644 (file)
index 0000000..fd97176
--- /dev/null
@@ -0,0 +1,31 @@
+OMAP SoC AES crypto Module
+
+Required properties:
+
+- compatible : Should contain entries for this and backward compatible
+  AES versions:
+  - "ti,omap2-aes" for OMAP2.
+  - "ti,omap3-aes" for OMAP3.
+  - "ti,omap4-aes" for OMAP4 and AM33XX.
+  Note that the OMAP2 and 3 versions are compatible (OMAP3 supports
+  more algorithms) but they are incompatible with OMAP4.
+- ti,hwmods: Name of the hwmod associated with the AES module
+- reg : Offset and length of the register set for the module
+- interrupts : the interrupt-specifier for the AES module.
+
+Optional properties:
+- dmas: DMA specifiers for tx and rx dma. See the DMA client binding,
+       Documentation/devicetree/bindings/dma/dma.txt
+- dma-names: DMA request names should include "tx" and "rx" if present.
+
+Example:
+       /* AM335x */
+       aes: aes@53500000 {
+               compatible = "ti,omap4-aes";
+               ti,hwmods = "aes";
+               reg = <0x53500000 0xa0>;
+               interrupts = <102>;
+               dmas = <&edma 6>,
+                      <&edma 5>;
+               dma-names = "tx", "rx";
+       };
diff --git a/Documentation/devicetree/bindings/crypto/omap-sham.txt b/Documentation/devicetree/bindings/crypto/omap-sham.txt
new file mode 100644 (file)
index 0000000..f839acd
--- /dev/null
@@ -0,0 +1,28 @@
+OMAP SoC SHA crypto Module
+
+Required properties:
+
+- compatible : Should contain entries for this and backward compatible
+  SHAM versions:
+  - "ti,omap2-sham" for OMAP2 & OMAP3.
+  - "ti,omap4-sham" for OMAP4 and AM33XX.
+  Note that these two versions are incompatible.
+- ti,hwmods: Name of the hwmod associated with the SHAM module
+- reg : Offset and length of the register set for the module
+- interrupts : the interrupt-specifier for the SHAM module.
+
+Optional properties:
+- dmas: DMA specifiers for the rx dma. See the DMA client binding,
+       Documentation/devicetree/bindings/dma/dma.txt
+- dma-names: DMA request name. Should be "rx" if a dma is present.
+
+Example:
+       /* AM335x */
+       sham: sham@53100000 {
+               compatible = "ti,omap4-sham";
+               ti,hwmods = "sham";
+               reg = <0x53100000 0x200>;
+               interrupts = <109>;
+               dmas = <&edma 36>;
+               dma-names = "rx";
+       };
index ed271fc255b23c5d3595f1a1725687cb74d077be..8c8908ab84bab3a570b422a93f15a7f8367adaa8 100644 (file)
@@ -20,8 +20,29 @@ ti,dual-volt: boolean, supports dual voltage cards
 ti,non-removable: non-removable slot (like eMMC)
 ti,needs-special-reset: Requires a special softreset sequence
 ti,needs-special-hs-handling: HSMMC IP needs special setting for handling High Speed
+dmas: List of DMA specifiers with the controller specific format
+as described in the generic DMA client binding. A tx and rx
+specifier is required.
+dma-names: List of DMA request names. These strings correspond
+1:1 with the DMA specifiers listed in dmas. The string naming is
+to be "rx" and "tx" for RX and TX DMA requests, respectively.
+
+Examples:
+
+[hwmod populated DMA resources]
+
+       mmc1: mmc@0x4809c000 {
+               compatible = "ti,omap4-hsmmc";
+               reg = <0x4809c000 0x400>;
+               ti,hwmods = "mmc1";
+               ti,dual-volt;
+               bus-width = <4>;
+               vmmc-supply = <&vmmc>; /* phandle to regulator node */
+               ti,non-removable;
+       };
+
+[generic DMA request binding]
 
-Example:
        mmc1: mmc@0x4809c000 {
                compatible = "ti,omap4-hsmmc";
                reg = <0x4809c000 0x400>;
@@ -30,4 +51,7 @@ Example:
                bus-width = <4>;
                vmmc-supply = <&vmmc>; /* phandle to regulator node */
                ti,non-removable;
+               dmas = <&edma 24
+                       &edma 25>;
+               dma-names = "tx", "rx";
        };
index 9556e2fedf6deb77a1b49579521b7744f7318d1e..08c716b2c6b6c411a13a04055ec267ce3ac5e4f2 100644 (file)
@@ -5,6 +5,7 @@ Mandatory properties:
 - compatible: one of the following values:
     marvell,armada-370-pcie
     marvell,armada-xp-pcie
+    marvell,dove-pcie
     marvell,kirkwood-pcie
 - #address-cells, set to <3>
 - #size-cells, set to <2>
@@ -14,6 +15,8 @@ Mandatory properties:
 - ranges: ranges describing the MMIO registers to control the PCIe
   interfaces, and ranges describing the MBus windows needed to access
   the memory and I/O regions of each PCIe interface.
+- msi-parent: Link to the hardware entity that serves as the Message
+  Signaled Interrupt controller for this PCI controller.
 
 The ranges describing the MMIO registers have the following layout:
 
@@ -74,6 +77,8 @@ and the following optional properties:
 - marvell,pcie-lane: the physical PCIe lane number, for ports having
   multiple lanes. If this property is not found, we assume that the
   value is 0.
+- reset-gpios: optional gpio to PERST#
+- reset-delay-us: delay in us to wait after reset de-assertion
 
 Example:
 
@@ -86,6 +91,7 @@ pcie-controller {
        #size-cells = <2>;
 
        bus-range = <0x00 0xff>;
+       msi-parent = <&mpic>;
 
        ranges =
               <0x82000000 0 0x40000 MBUS_ID(0xf0, 0x01) 0x40000 0 0x00002000   /* Port 0.0 registers */
@@ -135,6 +141,10 @@ pcie-controller {
                interrupt-map = <0 0 0 0 &mpic 58>;
                marvell,pcie-port = <0>;
                marvell,pcie-lane = <0>;
+               /* low-active PERST# reset on GPIO 25 */
+               reset-gpios = <&gpio0 25 1>;
+               /* wait 20ms for device settle after reset deassertion */
+               reset-delay-us = <20000>;
                clocks = <&gateclk 5>;
                status = "disabled";
        };
index 5a02e30dd262dfabfca818339c4da04dc2eae9d2..7069a0b84e3a43d46f0a3e698975ad208ab45e17 100644 (file)
@@ -72,6 +72,13 @@ Optional properties:
                /* pin base, nr pins & gpio function */
                pinctrl-single,gpio-range = <&range 0 3 0 &range 3 9 1>;
 
+- interrupt-controller : standard interrupt controller binding if using
+  interrupts for wake-up events for example. In this case pinctrl-single
+  is set up as a chained interrupt controller and the wake-up interrupts
+  can be requested by the drivers using request_irq().
+
+- #interrupt-cells : standard interrupt binding if using interrupts
+
 This driver assumes that there is only one register for each pin (unless the
 pinctrl-single,bit-per-mux is set), and uses the common pinctrl bindings as
 specified in the pinctrl-bindings.txt document in this directory.
@@ -121,6 +128,8 @@ pmx_core: pinmux@4a100040 {
        reg = <0x4a100040 0x0196>;
        #address-cells = <1>;
        #size-cells = <0>;
+       #interrupt-cells = <1>;
+       interrupt-controller;
        pinctrl-single,register-width = <16>;
        pinctrl-single,function-mask = <0xffff>;
 };
@@ -131,6 +140,8 @@ pmx_wkup: pinmux@4a31e040 {
        reg = <0x4a31e040 0x0038>;
        #address-cells = <1>;
        #size-cells = <0>;
+       #interrupt-cells = <1>;
+       interrupt-controller;
        pinctrl-single,register-width = <16>;
        pinctrl-single,function-mask = <0xffff>;
 };
index 330d6ec154016caf4bccd0a5bde0d36847412fcb..439a41c79afacd680a6c8309935ab37573cd6326 100644 (file)
@@ -15,7 +15,7 @@ Optional properties:
 Example:
 
 usb_per5@a03e0000 {
-       compatible = "stericsson,db8500-musb", "mentor,musb";
+       compatible = "stericsson,db8500-musb";
        reg = <0xa03e0000 0x10000>;
        interrupts = <0 23 0x4>;
        interrupt-names = "mc";
index 5a7ed4c3590e131ff07d35e6a2076b8905b2e574..2906f6af30b24a62683618b2e3efbf5f4da95708 100644 (file)
@@ -777,6 +777,10 @@ W: http://maxim.org.za/at91_26.html
 W:     http://www.linux4sam.org
 S:     Supported
 F:     arch/arm/mach-at91/
+F:     arch/arm/boot/dts/at91*.dts
+F:     arch/arm/boot/dts/at91*.dtsi
+F:     arch/arm/boot/dts/sama*.dts
+F:     arch/arm/boot/dts/sama*.dtsi
 
 ARM/CALXEDA HIGHBANK ARCHITECTURE
 M:     Rob Herring <rob.herring@calxeda.com>
@@ -943,7 +947,7 @@ M:  Javier Martinez Canillas <javier@dowhile0.org>
 L:     linux-omap@vger.kernel.org
 L:     linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
 S:     Maintained
-F:     arch/arm/mach-omap2/board-igep0020.c
+F:     arch/arm/boot/dts/omap3-igep*
 
 ARM/INCOME PXA270 SUPPORT
 M:     Marek Vasut <marek.vasut@gmail.com>
@@ -1023,6 +1027,7 @@ ARM/Marvell Armada 370 and Armada XP SOC support
 M:     Jason Cooper <jason@lakedaemon.net>
 M:     Andrew Lunn <andrew@lunn.ch>
 M:     Gregory Clement <gregory.clement@free-electrons.com>
+M:     Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
 L:     linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
 S:     Maintained
 F:     arch/arm/mach-mvebu/
@@ -1030,6 +1035,7 @@ F:        arch/arm/mach-mvebu/
 ARM/Marvell Dove/Kirkwood/MV78xx0/Orion SOC support
 M:     Jason Cooper <jason@lakedaemon.net>
 M:     Andrew Lunn <andrew@lunn.ch>
+M:     Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
 L:     linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
 S:     Maintained
 F:     arch/arm/mach-dove/
@@ -1162,10 +1168,12 @@ F:      drivers/net/ethernet/i825xx/ether1*
 F:     drivers/net/ethernet/seeq/ether3*
 F:     drivers/scsi/arm/
 
-ARM/SHARK MACHINE SUPPORT
-M:     Alexander Schulz <alex@shark-linux.de>
-W:     http://www.shark-linux.de/shark.html
+ARM/Rockchip SoC support
+M:     Heiko Stuebner <heiko@sntech.de>
+L:     linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
 S:     Maintained
+F:     arch/arm/mach-rockchip/
+F:     drivers/*/*rockchip*
 
 ARM/SAMSUNG ARM ARCHITECTURES
 M:     Ben Dooks <ben-linux@fluff.org>
@@ -2838,7 +2846,7 @@ M:        Terje Bergström <tbergstrom@nvidia.com>
 L:     dri-devel@lists.freedesktop.org
 L:     linux-tegra@vger.kernel.org
 T:     git git://anongit.freedesktop.org/tegra/linux.git
-S:     Maintained
+S:     Supported
 F:     drivers/gpu/drm/tegra/
 F:     drivers/gpu/host1x/
 F:     include/linux/host1x.h
@@ -8362,14 +8370,72 @@ L:      linux-media@vger.kernel.org
 S:     Maintained
 F:     drivers/media/rc/ttusbir.c
 
-TEGRA SUPPORT
+TEGRA ARCHITECTURE SUPPORT
 M:     Stephen Warren <swarren@wwwdotorg.org>
+M:     Thierry Reding <thierry.reding@gmail.com>
 L:     linux-tegra@vger.kernel.org
 Q:     http://patchwork.ozlabs.org/project/linux-tegra/list/
 T:     git git://git.kernel.org/pub/scm/linux/kernel/git/swarren/linux-tegra.git
 S:     Supported
 N:     [^a-z]tegra
 
+TEGRA ASOC DRIVER
+M:     Stephen Warren <swarren@wwwdotorg.org>
+S:     Supported
+F:     sound/soc/tegra/
+
+TEGRA CLOCK DRIVER
+M:     Peter De Schrijver <pdeschrijver@nvidia.com>
+M:     Prashant Gaikwad <pgaikwad@nvidia.com>
+S:     Supported
+F:     drivers/clk/tegra/
+
+TEGRA DMA DRIVER
+M:     Laxman Dewangan <ldewangan@nvidia.com>
+S:     Supported
+F:     drivers/dma/tegra20-apb-dma.c
+
+TEGRA GPIO DRIVER
+M:     Stephen Warren <swarren@wwwdotorg.org>
+S:     Supported
+F:     drivers/gpio/gpio-tegra.c
+
+TEGRA I2C DRIVER
+M:     Laxman Dewangan <ldewangan@nvidia.com>
+S:     Supported
+F:     drivers/i2c/busses/i2c-tegra.c
+
+TEGRA IOMMU DRIVERS
+M:     Hiroshi Doyu <hdoyu@nvidia.com>
+S:     Supported
+F:     drivers/iommu/tegra*
+
+TEGRA KBC DRIVER
+M:     Rakesh Iyer <riyer@nvidia.com>
+M:     Laxman Dewangan <ldewangan@nvidia.com>
+S:     Supported
+F:     drivers/input/keyboard/tegra-kbc.c
+
+TEGRA PINCTRL DRIVER
+M:     Stephen Warren <swarren@wwwdotorg.org>
+S:     Supported
+F:     drivers/pinctrl/pinctrl-tegra*
+
+TEGRA PWM DRIVER
+M:     Thierry Reding <thierry.reding@gmail.com>
+S:     Supported
+F:     drivers/pwm/pwm-tegra.c
+
+TEGRA SERIAL DRIVER
+M:     Laxman Dewangan <ldewangan@nvidia.com>
+S:     Supported
+F:     drivers/tty/serial/serial-tegra.c
+
+TEGRA SPI DRIVER
+M:     Laxman Dewangan <ldewangan@nvidia.com>
+S:     Supported
+F:     drivers/spi/spi-tegra*
+
 TEHUTI ETHERNET DRIVER
 M:     Andy Gospodarek <andy@greyhouse.net>
 L:     netdev@vger.kernel.org
index e64b97c8f0fe556681a476752baf8dcd8a7ea456..1a777ddb7348bc2c76f9c5a69d3a003ef46cbed6 100644 (file)
@@ -322,6 +322,7 @@ config ARCH_INTEGRATOR
        select NEED_MACH_MEMORY_H
        select PLAT_VERSATILE
        select SPARSE_IRQ
+       select USE_OF
        select VERSATILE_FPGA_IRQ
        help
          Support for ARM's Integrator platform.
@@ -363,7 +364,6 @@ config ARCH_AT91
        bool "Atmel AT91"
        select ARCH_REQUIRE_GPIOLIB
        select CLKDEV_LOOKUP
-       select HAVE_CLK
        select IRQ_DOMAIN
        select NEED_MACH_GPIO_H
        select NEED_MACH_IO_H if PCCARD
@@ -377,7 +377,6 @@ config ARCH_CLPS711X
        bool "Cirrus Logic CLPS711x/EP721x/EP731x-based"
        select ARCH_REQUIRE_GPIOLIB
        select AUTO_ZRELADDR
-       select CLKDEV_LOOKUP
        select CLKSRC_MMIO
        select COMMON_CLK
        select CPU_ARM720T
@@ -633,7 +632,6 @@ config ARCH_PXA
 config ARCH_MSM
        bool "Qualcomm MSM"
        select ARCH_REQUIRE_GPIOLIB
-       select CLKDEV_LOOKUP
        select CLKSRC_OF if OF
        select COMMON_CLK
        select GENERIC_CLOCKEVENTS
@@ -651,7 +649,6 @@ config ARCH_SHMOBILE
        select GENERIC_CLOCKEVENTS
        select HAVE_ARM_SCU if SMP
        select HAVE_ARM_TWD if SMP
-       select HAVE_CLK
        select HAVE_MACH_CLKDEV
        select HAVE_SMP
        select MIGHT_HAVE_CACHE_L2X0
@@ -707,7 +704,6 @@ config ARCH_S3C24XX
        select CLKSRC_SAMSUNG_PWM
        select GENERIC_CLOCKEVENTS
        select GPIO_SAMSUNG
-       select HAVE_CLK
        select HAVE_S3C2410_I2C if I2C
        select HAVE_S3C2410_WATCHDOG if WATCHDOG
        select HAVE_S3C_RTC if RTC_CLASS
@@ -728,10 +724,10 @@ config ARCH_S3C64XX
        select ARM_VIC
        select CLKDEV_LOOKUP
        select CLKSRC_SAMSUNG_PWM
+       select COMMON_CLK
        select CPU_V6
        select GENERIC_CLOCKEVENTS
        select GPIO_SAMSUNG
-       select HAVE_CLK
        select HAVE_S3C2410_I2C if I2C
        select HAVE_S3C2410_WATCHDOG if WATCHDOG
        select HAVE_TCM
@@ -741,7 +737,6 @@ config ARCH_S3C64XX
        select S3C_DEV_NAND
        select S3C_GPIO_TRACK
        select SAMSUNG_ATAGS
-       select SAMSUNG_CLKSRC
        select SAMSUNG_GPIOLIB_4BIT
        select SAMSUNG_WDT_RESET
        select USB_ARCH_HAS_OHCI
@@ -755,7 +750,6 @@ config ARCH_S5P64X0
        select CPU_V6
        select GENERIC_CLOCKEVENTS
        select GPIO_SAMSUNG
-       select HAVE_CLK
        select HAVE_S3C2410_I2C if I2C
        select HAVE_S3C2410_WATCHDOG if WATCHDOG
        select HAVE_S3C_RTC if RTC_CLASS
@@ -774,7 +768,6 @@ config ARCH_S5PC100
        select CPU_V7
        select GENERIC_CLOCKEVENTS
        select GPIO_SAMSUNG
-       select HAVE_CLK
        select HAVE_S3C2410_I2C if I2C
        select HAVE_S3C2410_WATCHDOG if WATCHDOG
        select HAVE_S3C_RTC if RTC_CLASS
@@ -794,7 +787,6 @@ config ARCH_S5PV210
        select CPU_V7
        select GENERIC_CLOCKEVENTS
        select GPIO_SAMSUNG
-       select HAVE_CLK
        select HAVE_S3C2410_I2C if I2C
        select HAVE_S3C2410_WATCHDOG if WATCHDOG
        select HAVE_S3C_RTC if RTC_CLASS
@@ -811,11 +803,9 @@ config ARCH_EXYNOS
        select ARCH_REQUIRE_GPIOLIB
        select ARCH_SPARSEMEM_ENABLE
        select ARM_GIC
-       select CLKDEV_LOOKUP
        select COMMON_CLK
        select CPU_V7
        select GENERIC_CLOCKEVENTS
-       select HAVE_CLK
        select HAVE_S3C2410_I2C if I2C
        select HAVE_S3C2410_WATCHDOG if WATCHDOG
        select HAVE_S3C_RTC if RTC_CLASS
@@ -825,20 +815,6 @@ config ARCH_EXYNOS
        help
          Support for SAMSUNG's EXYNOS SoCs (EXYNOS4/5)
 
-config ARCH_SHARK
-       bool "Shark"
-       select ARCH_USES_GETTIMEOFFSET
-       select CPU_SA110
-       select ISA
-       select ISA_DMA
-       select NEED_MACH_MEMORY_H
-       select PCI
-       select VIRT_TO_BUS
-       select ZONE_DMA
-       help
-         Support for the StrongARM based Digital DNARD machine, also known
-         as "Shark" (<http://www.shark-linux.de/shark.html>).
-
 config ARCH_DAVINCI
        bool "TI DaVinci"
        select ARCH_HAS_HOLES_MEMORYMODEL
@@ -848,7 +824,6 @@ config ARCH_DAVINCI
        select GENERIC_CLOCKEVENTS
        select GENERIC_IRQ_CHIP
        select HAVE_IDE
-       select NEED_MACH_GPIO_H
        select TI_PRIV_EDMA
        select USE_OF
        select ZONE_DMA
@@ -866,7 +841,6 @@ config ARCH_OMAP1
        select CLKSRC_MMIO
        select GENERIC_CLOCKEVENTS
        select GENERIC_IRQ_CHIP
-       select HAVE_CLK
        select HAVE_IDE
        select IRQ_DOMAIN
        select NEED_MACH_IO_H if PCCARD
@@ -1432,12 +1406,6 @@ config PCI_NANOENGINE
 config PCI_SYSCALL
        def_bool PCI
 
-# Select the host bridge type
-config PCI_HOST_VIA82C505
-       bool
-       depends on PCI && ARCH_SHARK
-       default y
-
 config PCI_HOST_ITE8152
        bool
        depends on PCI && MACH_ARMCORE
index db50b626be9871f7426ee394a9b189d8d504c8a3..8b667132d7b419bb572549d3f5149c7f9e503860 100644 (file)
@@ -188,7 +188,6 @@ machine-$(CONFIG_ARCH_S5P64X0)              += s5p64x0
 machine-$(CONFIG_ARCH_S5PC100)         += s5pc100
 machine-$(CONFIG_ARCH_S5PV210)         += s5pv210
 machine-$(CONFIG_ARCH_SA1100)          += sa1100
-machine-$(CONFIG_ARCH_SHARK)           += shark
 machine-$(CONFIG_ARCH_SHMOBILE)        += shmobile
 machine-$(CONFIG_ARCH_SHMOBILE_MULTI)  += shmobile
 machine-$(CONFIG_ARCH_SIRF)            += prima2
diff --git a/arch/arm/arm-soc-for-next-contents.txt b/arch/arm/arm-soc-for-next-contents.txt
new file mode 100644 (file)
index 0000000..25aecc6
--- /dev/null
@@ -0,0 +1,114 @@
+
+
+next/cleanup
+       shark/removal
+                 git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-stericsson.git tags/del-shark-for-v3.13
+       cleanup/dt-clock
+               https://github.com/shesselba/linux-dove.git clk-of-init-v2_for-3.13
+       patch
+               ARM: drop explicit selection of HAVE_CLK and CLKDEV_LOOKUP
+       reneasas/initdata-cleanup
+               git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas.git tags/renesas-fixes5-for-v3.12
+       renesas/cleanup
+               git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas.git tags/renesas-cleanup-for-v3.13
+       patch
+               clk: nomadik: fix missing __init on nomadik_src_init
+       renesas/cleanup2
+               git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas.git tags/renesas-cleanup2-for-v3.13
+       patch
+               ARM: clps711x: Use linux/sched_clock.h
+               ARM: Remove temporary sched_clock.h header
+       qcom/cleanup
+               git://git.kernel.org/pub/scm/linux/kernel/git/davidb/linux-msm.git tags/msm-cleanup-for-3.13
+       tegra/cleanup
+               git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux.git tegra-for-3.13-cleanup
+       at91/cleanup
+               git://github.com/at91linux/linux-at91.git tags/at91-cleanup
+
+next/soc
+       samsung/s3c64xx-clk
+               http://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung.git tags/samsung-clk-s3c64xx
+       patch
+               ARM: davinci: remove deprecated IRQF_DISABLED
+       renesas/soc
+               git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas.git tags/renesas-soc-for-v3.13
+       renesas/smp
+               git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas.git tags/renesas-smp-for-v3.13
+       renesas/soc2
+               git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas.git tags/renesas-soc2-for-v3.13
+       keystone/soc
+               git://git.kernel.org/pub/scm/linux/kernel/git/ssantosh/linux-keystone.git tags/keystone-soc-for-arm-soc
+       patch
+               ARM: keystone: fix PM domain initcall to be keystone only
+       omap/hwmod
+               git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap tags/omap-for-v3.13/hwmod-signed
+       omap/soc
+               git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap tags/omap-for-v3.13/soc-take2
+       davinci/soc
+               git://git.kernel.org/pub/scm/linux/kernel/git/nsekhar/linux-davinci.git tags/davinci-for-v3.13/soc-2 # rebased from -v3.12-rc5 to -rc3
+       integrator/soc
+               git fetch git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-integrator.git tags/integrator-for-v3.13-2
+       mvebu/soc
+               git fetch git://git.infradead.org/linux-mvebu.git tags/soc-3.13-2
+       highbank/soc
+               git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git tags/highbank-for-3.13
+       omap/hwmod2
+               git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap tags/omap-for-v3.13/am43xx-hwmod-signed
+
+next/drivers
+       davinci/gpio
+               git://git.kernel.org/pub/scm/linux/kernel/git/nsekhar/linux-davinci.git tags/davinci-for-v3.13/gpio
+       mvebu/drivers
+               git://git.infradead.org/linux-mvebu.git tags/drivers-3.13
+       arm/drivers
+               git://git.kernel.org/pub/scm/linux/kernel/git/will/linux.git tags/arm-perf-3.13
+       mvebu/drivers2
+               git://git.infradead.org/linux-mvebu.git tags/drivers-3.13-2
+
+next/boards
+       renesas/boards
+               git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas.git renesas-boards-for-v3.13
+       renesas/defconfig
+               git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas.git tags/renesas-defconfig-for-v3.13
+       renesas/boards2
+               git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas.git tags/renesas-boards2-for-v3.13
+       omap/boards
+               git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap tags/omap-for-v3.13/board-signed
+       tegra/defconfig
+               git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux.git tegra-for-3.13-defconfig
+       rockchip/boards
+               git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip.git tags/v3.13-rockchip-boards
+               # but moved MAINTAINERS patch to fixes
+
+next/dt
+       samsung/s3c64xx-dt
+                 http://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung.git tags/samsung-dt-s3c64xx
+       ux500/dt
+               git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-stericsson.git tags/ux500-dt-for-v3.13-2
+               patch "ARM: ux500: enable appended dtb in u8500_defconfig"
+       ux500/dt2
+               git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-stericsson.git tags/ux500-devicetree-2
+       renesas/dt
+               git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas.git tags/renesas-dt-for-v3.13
+       mvebu/dt
+               git://git.infradead.org/linux-mvebu.git tags/dt-3.13
+       mvebu/dt2
+               git://git.infradead.org/linux-mvebu.git tags/dt-3.13-2
+       renesas/dt2
+               git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas.git tags/renesas-dt2-for-v3.13
+       socfpga/dt
+               git://git.rocketboards.org/linux-socfpga-next.git tags/socfpga-dts-updates-for-v3.13
+       omap/pdata-quirks               
+               git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap tags/omap-for-v3.13/quirk-signed
+       omap/dt
+               git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap tags/omap-for-v3.13/dt-signed
+       mvebu/dt3
+               git fetch git://git.infradead.org/linux-mvebu.git tags/dt-3.13-3
+       tegra/dt
+               git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux.git tegra-for-3.13-dt
+       at91/dt
+               git://github.com/at91linux/linux-at91.git tags/at91-dt
+       omap/dt2
+               git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap tags/omap-for-v3.13/board-removal-signed-take2
+       omap/pinctrl-fix
+               git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap tags/omap-for-v3.13/pinctrl-fix
index 7ac1610252baad07ce50c2a9381da25965952fdc..e7190bb5998e149906a4763e815712953c7421f5 100644 (file)
@@ -44,10 +44,6 @@ ifeq ($(CONFIG_ARCH_ACORN),y)
 OBJS           += ll_char_wr.o font.o
 endif
 
-ifeq ($(CONFIG_ARCH_SHARK),y)
-OBJS           += head-shark.o ofw-shark.o
-endif
-
 ifeq ($(CONFIG_ARCH_SA1100),y)
 OBJS           += head-sa1100.o
 endif
diff --git a/arch/arm/boot/compressed/head-shark.S b/arch/arm/boot/compressed/head-shark.S
deleted file mode 100644 (file)
index 92b5689..0000000
+++ /dev/null
@@ -1,140 +0,0 @@
-/* The head-file for the Shark
- * by Alexander Schulz
- *
- * Does the following:
- * - get the memory layout from firmware. This can only be done as long as the mmu
- *   is still on.
- * - switch the mmu off, so we have physical addresses
- * - copy the kernel to 0x08508000. This is done to have a fixed address where the
- *   C-parts (misc.c) are executed. This address must be known at compile-time,
- *   but the load-address of the kernel depends on how much memory is installed.
- * - Jump to this location.
- * - Set r8 with 0, r7 with the architecture ID for head.S
- */
-
-#include <linux/linkage.h>
-
-#include <asm/assembler.h>
-       
-               .section        ".start", "ax"
-
-               .arch armv4
-               b       __beginning
-       
-__ofw_data:    .long   0                               @ the number of memory blocks
-               .space  128                             @ (startaddr,size) ...
-               .space  128                             @ bootargs
-               .align
-
-__beginning:   mov     r4, r0                          @ save the entry to the firmware
-
-               mov     r0, #0xC0                       @ disable irq and fiq
-               mov     r1, r0
-               mrs     r3, cpsr
-               bic     r2, r3, r0
-               eor     r2, r2, r1
-               msr     cpsr_c, r2
-
-               mov     r0, r4                          @ get the Memory layout from firmware
-               adr     r1, __ofw_data
-               add     r2, r1, #4
-               mov     lr, pc
-               b       ofw_init
-               mov     r1, #0
-
-               adr     r2, __mmu_off                   @ calculate physical address
-               sub     r2, r2, #0xf0000000             @ openprom maps us at f000 virt, 0e50 phys
-               adr     r0, __ofw_data
-               ldr     r0, [r0, #4]
-               add     r2, r2, r0
-               add     r2, r2, #0x00500000
-
-               mrc     p15, 0, r3, c1, c0
-               bic     r3, r3, #0xC                    @ Write Buffer and DCache
-               bic     r3, r3, #0x1000                 @ ICache
-               mcr     p15, 0, r3, c1, c0              @ disabled
-
-               mov     r0, #0
-               mcr     p15, 0, r0, c7, c7              @ flush I,D caches on v4
-               mcr     p15, 0, r0, c7, c10, 4          @ drain write buffer on v4
-               mcr     p15, 0, r0, c8, c7              @ flush I,D TLBs on v4
-
-               bic     r3, r3, #0x1                    @ MMU
-               mcr     p15, 0, r3, c1, c0              @ disabled
-
-               mov     pc, r2
-
-__copy_target: .long   0x08507FFC
-__copy_end:    .long   0x08607FFC
-               
-               .word   _start
-               .word   __bss_start
-
-               .align
-__temp_stack:  .space 128
-
-__mmu_off:
-               adr     r0, __ofw_data                  @ read the 1. entry of the memory map
-               ldr     r0, [r0, #4]
-               orr     r0, r0, #0x00600000
-               sub     r0, r0, #4
-       
-               ldr     r1, __copy_end
-               ldr     r3, __copy_target
-
-/* r0 = 0x0e600000 (current end of kernelcode)
- * r3 = 0x08508000 (where it should begin)
- * r1 = 0x08608000 (end of copying area, 1MB)
- * The kernel is compressed, so 1 MB should be enough.
- * copy the kernel to the beginning of physical memory
- * We start from the highest address, so we can copy
- * from 0x08500000 to 0x08508000 if we have only 8MB
- */
-
-/* As we get more 2.6-kernels it gets more and more
- * uncomfortable to be bound to kernel images of 1MB only.
- * So we add a loop here, to be able to copy some more.
- * Alexander Schulz 2005-07-17
- */
-
-               mov     r4, #3                          @ How many megabytes to copy
-
-
-__MoveCode:    sub     r4, r4, #1
-       
-__Copy:                ldr     r2, [r0], #-4
-               str     r2, [r1], #-4
-               teq     r1, r3
-               bne     __Copy
-
-               /* The firmware maps us in blocks of 1 MB, the next block is
-                  _below_ the last one. So our decrementing source pointer
-                  ist right here, but the destination pointer must be increased
-                  by 2 MB */
-               add     r1, r1, #0x00200000
-               add     r3, r3, #0x00100000
-
-               teq     r4, #0
-               bne     __MoveCode
-
-
-               /* and jump to it */
-               adr     r2, __go_on                     @ where we want to jump
-               adr     r0, __ofw_data                  @ read the 1. entry of the memory map
-               ldr     r0, [r0, #4]
-               sub     r2, r2, r0                      @ we are mapped add 0e50 now, sub that (-0e00)
-               sub     r2, r2, #0x00500000             @ -0050
-               ldr     r0, __copy_target               @ and add 0850 8000 instead
-               add     r0, r0, #4
-               add     r2, r2, r0
-               mov     pc, r2                          @ and jump there
-
-__go_on:
-               adr     sp, __temp_stack
-               add     sp, sp, #128
-               adr     r0, __ofw_data
-               mov     lr, pc
-               b       create_params
-       
-               mov     r8, #0
-               mov     r7, #15
diff --git a/arch/arm/boot/compressed/ofw-shark.c b/arch/arm/boot/compressed/ofw-shark.c
deleted file mode 100644 (file)
index 465c54b..0000000
+++ /dev/null
@@ -1,260 +0,0 @@
-/*
- * linux/arch/arm/boot/compressed/ofw-shark.c
- *
- * by Alexander Schulz
- *
- * This file is used to get some basic information
- * about the memory layout of the shark we are running
- * on. Memory is usually divided in blocks a 8 MB.
- * And bootargs are copied from OpenFirmware.
- */
-
-
-#include <linux/kernel.h>
-#include <linux/types.h>
-#include <asm/setup.h>
-#include <asm/page.h>
-
-
-asmlinkage void
-create_params (unsigned long *buffer)
-{
-       /* Is there a better address? Also change in mach-shark/core.c */
-       struct tag *tag = (struct tag *) 0x08003000;
-       int j,i,m,k,nr_banks,size;
-       unsigned char *c;
-
-       k = 0;
-
-       /* Head of the taglist */
-       tag->hdr.tag  = ATAG_CORE;
-       tag->hdr.size = tag_size(tag_core);
-       tag->u.core.flags = 1;
-       tag->u.core.pagesize = PAGE_SIZE;
-       tag->u.core.rootdev = 0;
-
-       /* Build up one tagged block for each memory region */
-       size=0;
-       nr_banks=(unsigned int) buffer[0];
-       for (j=0;j<nr_banks;j++){
-               /* search the lowest address and put it into the next entry   */
-               /* not a fast sort algorithm, but there are at most 8 entries */
-               /* and this is used only once anyway                          */
-               m=0xffffffff;
-               for (i=0;i<(unsigned int) buffer[0];i++){
-                       if (buffer[2*i+1]<m) {
-                               m=buffer[2*i+1];
-                               k=i;
-                       }
-               }
-         
-               tag = tag_next(tag);
-               tag->hdr.tag = ATAG_MEM;
-               tag->hdr.size = tag_size(tag_mem32);
-               tag->u.mem.size = buffer[2*k+2];
-               tag->u.mem.start = buffer[2*k+1];
-
-               size += buffer[2*k+2];
-
-               buffer[2*k+1]=0xffffffff;                    /* mark as copied */
-       }
-       
-       /* The command line */
-       tag = tag_next(tag);
-       tag->hdr.tag = ATAG_CMDLINE;
-       
-       c=(unsigned char *)(&buffer[34]);
-       j=0;
-       while (*c) tag->u.cmdline.cmdline[j++]=*c++;
-
-       tag->u.cmdline.cmdline[j]=0;
-       tag->hdr.size = (j + 7 + sizeof(struct tag_header)) >> 2;
-
-       /* Hardware revision */
-       tag = tag_next(tag);
-       tag->hdr.tag = ATAG_REVISION;
-       tag->hdr.size = tag_size(tag_revision);
-       tag->u.revision.rev = ((unsigned char) buffer[33])-'0';
-
-       /* End of the taglist */
-       tag = tag_next(tag);
-       tag->hdr.tag = 0;
-       tag->hdr.size = 0;
-}
-
-
-typedef int (*ofw_handle_t)(void *);
-
-/* Everything below is called with a wrong MMU setting.
- * This means: no string constants, no initialization of
- * arrays, no global variables! This is ugly but I didn't
- * want to write this in assembler :-)
- */
-
-int
-of_decode_int(const unsigned char *p)
-{
-       unsigned int i = *p++ << 8;
-       i = (i + *p++) << 8;
-       i = (i + *p++) << 8;
-       return (i + *p);
-}
-  
-int
-OF_finddevice(ofw_handle_t openfirmware, char *name)
-{
-       unsigned int args[8];
-       char service[12];
-
-       service[0]='f';
-       service[1]='i';
-       service[2]='n';
-       service[3]='d';
-       service[4]='d';
-       service[5]='e';
-       service[6]='v';
-       service[7]='i';
-       service[8]='c';
-       service[9]='e';
-       service[10]='\0';
-
-       args[0]=(unsigned int)service;
-       args[1]=1;
-       args[2]=1;
-       args[3]=(unsigned int)name;
-
-       if (openfirmware(args) == -1)
-               return -1;
-       return args[4];
-}
-
-int
-OF_getproplen(ofw_handle_t openfirmware, int handle, char *prop)
-{
-       unsigned int args[8];
-       char service[12];
-
-       service[0]='g';
-       service[1]='e';
-       service[2]='t';
-       service[3]='p';
-       service[4]='r';
-       service[5]='o';
-       service[6]='p';
-       service[7]='l';
-       service[8]='e';
-       service[9]='n';
-       service[10]='\0';
-
-       args[0] = (unsigned int)service;
-       args[1] = 2;
-       args[2] = 1;
-       args[3] = (unsigned int)handle;
-       args[4] = (unsigned int)prop;
-
-       if (openfirmware(args) == -1)
-               return -1;
-       return args[5];
-}
-  
-int
-OF_getprop(ofw_handle_t openfirmware, int handle, char *prop, void *buf, unsigned int buflen)
-{
-       unsigned int args[8];
-       char service[8];
-
-       service[0]='g';
-       service[1]='e';
-       service[2]='t';
-       service[3]='p';
-       service[4]='r';
-       service[5]='o';
-       service[6]='p';
-       service[7]='\0';
-
-       args[0] = (unsigned int)service;
-       args[1] = 4;
-       args[2] = 1;
-       args[3] = (unsigned int)handle;
-       args[4] = (unsigned int)prop;
-       args[5] = (unsigned int)buf;
-       args[6] = buflen;
-
-       if (openfirmware(args) == -1)
-               return -1;
-       return args[7];
-}
-  
-asmlinkage void ofw_init(ofw_handle_t o, int *nomr, int *pointer)
-{
-       int phandle,i,mem_len,buffer[32];
-       char temp[15];
-  
-       temp[0]='/';
-       temp[1]='m';
-       temp[2]='e';
-       temp[3]='m';
-       temp[4]='o';
-       temp[5]='r';
-       temp[6]='y';
-       temp[7]='\0';
-
-       phandle=OF_finddevice(o,temp);
-
-       temp[0]='r';
-       temp[1]='e';
-       temp[2]='g';
-       temp[3]='\0';
-
-       mem_len = OF_getproplen(o,phandle, temp);
-       OF_getprop(o,phandle, temp, buffer, mem_len);
-       *nomr=mem_len >> 3;
-
-       for (i=0; i<=mem_len/4; i++) pointer[i]=of_decode_int((const unsigned char *)&buffer[i]);
-
-       temp[0]='/';
-       temp[1]='c';
-       temp[2]='h';
-       temp[3]='o';
-       temp[4]='s';
-       temp[5]='e';
-       temp[6]='n';
-       temp[7]='\0';
-
-       phandle=OF_finddevice(o,temp);
-
-       temp[0]='b';
-       temp[1]='o';
-       temp[2]='o';
-       temp[3]='t';
-       temp[4]='a';
-       temp[5]='r';
-       temp[6]='g';
-       temp[7]='s';
-       temp[8]='\0';
-
-       mem_len = OF_getproplen(o,phandle, temp);
-       OF_getprop(o,phandle, temp, buffer, mem_len);
-       if (mem_len > 128) mem_len=128;
-       for (i=0; i<=mem_len/4; i++) pointer[i+33]=buffer[i];
-       pointer[i+33]=0;
-
-       temp[0]='/';
-       temp[1]='\0';
-       phandle=OF_finddevice(o,temp);
-       temp[0]='b';
-       temp[1]='a';
-       temp[2]='n';
-       temp[3]='n';
-       temp[4]='e';
-       temp[5]='r';
-       temp[6]='-';
-       temp[7]='n';
-       temp[8]='a';
-       temp[9]='m';
-       temp[10]='e';
-       temp[11]='\0';
-       mem_len = OF_getproplen(o,phandle, temp);
-       OF_getprop(o,phandle, temp, buffer, mem_len);
-       * ((unsigned char *) &pointer[32]) = ((unsigned char *) buffer)[mem_len-2];
-}
index 802720e3e8fd5c72004c14cce0bc572a0355356a..405c9eca170e0d82aa513f061f870131acf2157c 100644 (file)
@@ -51,6 +51,7 @@ dtb-$(CONFIG_ARCH_DAVINCI) += da850-enbw-cmc.dtb \
 dtb-$(CONFIG_ARCH_DOVE) += dove-cm-a510.dtb \
        dove-cubox.dtb \
        dove-d2plug.dtb \
+       dove-d3plug.dtb \
        dove-dove-db.dtb
 dtb-$(CONFIG_ARCH_EXYNOS) += exynos4210-origen.dtb \
        exynos4210-smdkv310.dtb \
@@ -103,8 +104,8 @@ dtb-$(CONFIG_ARCH_KIRKWOOD) += kirkwood-cloudbox.dtb \
        kirkwood-ts219-6282.dtb \
        kirkwood-openblocks_a6.dtb
 dtb-$(CONFIG_ARCH_MARCO) += marco-evb.dtb
-dtb-$(CONFIG_ARCH_MSM) += msm8660-surf.dtb \
-       msm8960-cdp.dtb
+dtb-$(CONFIG_ARCH_MSM) += qcom-msm8660-surf.dtb \
+       qcom-msm8960-cdp.dtb
 dtb-$(CONFIG_ARCH_MVEBU) += armada-370-db.dtb \
        armada-370-mirabox.dtb \
        armada-370-netgear-rn102.dtb \
@@ -112,6 +113,7 @@ dtb-$(CONFIG_ARCH_MVEBU) += armada-370-db.dtb \
        armada-xp-axpwifiap.dtb \
        armada-xp-db.dtb \
        armada-xp-gp.dtb \
+       armada-xp-matrix.dtb \
        armada-xp-openblocks-ax3-4.dtb
 dtb-$(CONFIG_ARCH_MXC) += \
        imx25-karo-tx25.dtb \
@@ -172,9 +174,15 @@ dtb-$(CONFIG_ARCH_OMAP2PLUS) += omap2420-h4.dtb \
        omap3-devkit8000.dtb \
        omap3-beagle-xm.dtb \
        omap3-evm.dtb \
+       omap3-evm-37xx.dtb \
+       omap3-n900.dtb \
+       omap3-n9.dtb \
+       omap3-n950.dtb \
        omap3-tobi.dtb \
+       omap3-gta04.dtb \
        omap3-igep0020.dtb \
        omap3-igep0030.dtb \
+       omap3-zoom3.dtb \
        omap4-panda.dtb \
        omap4-panda-a4.dtb \
        omap4-panda-es.dtb \
@@ -186,25 +194,32 @@ dtb-$(CONFIG_ARCH_OMAP2PLUS) += omap2420-h4.dtb \
        am335x-evmsk.dtb \
        am335x-bone.dtb \
        am335x-boneblack.dtb \
+       am335x-base0033.dtb \
        am3517-evm.dtb \
        am3517_mt_ventoux.dtb \
-       am43x-epos-evm.dtb
+       am43x-epos-evm.dtb \
+       dra7-evm.dtb
 dtb-$(CONFIG_ARCH_ORION5X) += orion5x-lacie-ethernet-disk-mini-v2.dtb
 dtb-$(CONFIG_ARCH_PRIMA2) += prima2-evb.dtb
 dtb-$(CONFIG_ARCH_U8500) += ste-snowball.dtb \
-       ste-hrefprev60.dtb \
-       ste-hrefv60plus.dtb \
+       ste-hrefprev60-stuib.dtb \
+       ste-hrefprev60-tvk.dtb \
+       ste-hrefv60plus-stuib.dtb \
+       ste-hrefv60plus-tvk.dtb \
        ste-ccu8540.dtb \
        ste-ccu9540.dtb
 dtb-$(CONFIG_ARCH_S3C24XX) += s3c2416-smdk2416.dtb
+dtb-$(CONFIG_ARCH_S3C64XX) += s3c6410-mini6410.dtb \
+       s3c6410-smdk6410.dtb
 dtb-$(CONFIG_ARCH_SHMOBILE) += emev2-kzm9d.dtb \
-       emev2-kzm9d-reference.dtb \
+       r7s72100-genmai.dtb \
        r8a7740-armadillo800eva.dtb \
        r8a7778-bockw.dtb \
        r8a7778-bockw-reference.dtb \
        r8a7740-armadillo800eva-reference.dtb \
        r8a7779-marzen.dtb \
        r8a7779-marzen-reference.dtb \
+       r8a7791-koelsch.dtb \
        r8a7790-lager.dtb \
        r8a7790-lager-reference.dtb \
        sh73a0-kzm9g.dtb \
@@ -212,8 +227,10 @@ dtb-$(CONFIG_ARCH_SHMOBILE) += emev2-kzm9d.dtb \
        r8a73a4-ape6evm.dtb \
        r8a73a4-ape6evm-reference.dtb \
        sh7372-mackerel.dtb
-dtb-$(CONFIG_ARCH_SHMOBILE_MULTI) += emev2-kzm9d-reference.dtb
-dtb-$(CONFIG_ARCH_SOCFPGA) += socfpga_cyclone5.dtb \
+dtb-$(CONFIG_ARCH_SHMOBILE_MULTI) += emev2-kzm9d.dtb
+dtb-$(CONFIG_ARCH_SOCFPGA) += socfpga_arria5_socdk.dtb \
+       socfpga_cyclone5_socdk.dtb \
+       socfpga_cyclone5_sockit.dtb \
        socfpga_vt.dtb
 dtb-$(CONFIG_ARCH_SPEAR13XX) += spear1310-evb.dtb \
        spear1340-evb.dtb
@@ -249,7 +266,8 @@ dtb-$(CONFIG_ARCH_TEGRA) += tegra20-harmony.dtb \
        tegra30-beaver.dtb \
        tegra30-cardhu-a02.dtb \
        tegra30-cardhu-a04.dtb \
-       tegra114-dalmore.dtb
+       tegra114-dalmore.dtb \
+       tegra124-venice2.dtb
 dtb-$(CONFIG_ARCH_VERSATILE) += versatile-ab.dtb \
        versatile-pb.dtb
 dtb-$(CONFIG_ARCH_U300) += ste-u300.dtb
diff --git a/arch/arm/boot/dts/am335x-base0033.dts b/arch/arm/boot/dts/am335x-base0033.dts
new file mode 100644 (file)
index 0000000..b4f95c2
--- /dev/null
@@ -0,0 +1,16 @@
+/*
+ * am335x-base0033.dts - Device Tree file for IGEP AQUILA EXPANSION
+ *
+ * Copyright (C) 2013 ISEE 2007 SL - http://www.isee.biz
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#include "am335x-igep0033.dtsi"
+
+/ {
+       model = "IGEP COM AM335x on AQUILA Expansion";
+       compatible = "isee,am335x-base0033", "isee,am335x-igep0033", "ti,am33xx";
+};
index 2f66deda9f5c171b4394046e14dba7b4814588df..e3f27ec317182b887961c0a58ca49f66407935d8 100644 (file)
                reg = <0x80000000 0x10000000>; /* 256 MB */
        };
 
-       am33xx_pinmux: pinmux@44e10800 {
+       leds {
                pinctrl-names = "default";
-               pinctrl-0 = <&clkout2_pin>;
-
-               user_leds_s0: user_leds_s0 {
-                       pinctrl-single,pins = <
-                               0x54 (PIN_OUTPUT_PULLDOWN | MUX_MODE7)  /* gpmc_a5.gpio1_21 */
-                               0x58 (PIN_OUTPUT_PULLUP | MUX_MODE7)    /* gpmc_a6.gpio1_22 */
-                               0x5c (PIN_OUTPUT_PULLDOWN | MUX_MODE7)  /* gpmc_a7.gpio1_23 */
-                               0x60 (PIN_OUTPUT_PULLUP | MUX_MODE7)    /* gpmc_a8.gpio1_24 */
-                       >;
-               };
+               pinctrl-0 = <&user_leds_s0>;
 
-               i2c0_pins: pinmux_i2c0_pins {
-                       pinctrl-single,pins = <
-                               0x188 (PIN_INPUT_PULLUP | MUX_MODE0)    /* i2c0_sda.i2c0_sda */
-                               0x18c (PIN_INPUT_PULLUP | MUX_MODE0)    /* i2c0_scl.i2c0_scl */
-                       >;
-               };
+               compatible = "gpio-leds";
 
-               uart0_pins: pinmux_uart0_pins {
-                       pinctrl-single,pins = <
-                               0x170 (PIN_INPUT_PULLUP | MUX_MODE0)    /* uart0_rxd.uart0_rxd */
-                               0x174 (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* uart0_txd.uart0_txd */
-                       >;
+               led@2 {
+                       label = "beaglebone:green:heartbeat";
+                       gpios = <&gpio1 21 GPIO_ACTIVE_HIGH>;
+                       linux,default-trigger = "heartbeat";
+                       default-state = "off";
                };
 
-               clkout2_pin: pinmux_clkout2_pin {
-                       pinctrl-single,pins = <
-                               0x1b4 (PIN_OUTPUT_PULLDOWN | MUX_MODE3) /* xdma_event_intr1.clkout2 */
-                       >;
+               led@3 {
+                       label = "beaglebone:green:mmc0";
+                       gpios = <&gpio1 22 GPIO_ACTIVE_HIGH>;
+                       linux,default-trigger = "mmc0";
+                       default-state = "off";
                };
 
-               cpsw_default: cpsw_default {
-                       pinctrl-single,pins = <
-                               /* Slave 1 */
-                               0x110 (PIN_INPUT_PULLUP | MUX_MODE0)    /* mii1_rxerr.mii1_rxerr */
-                               0x114 (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* mii1_txen.mii1_txen */
-                               0x118 (PIN_INPUT_PULLUP | MUX_MODE0)    /* mii1_rxdv.mii1_rxdv */
-                               0x11c (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* mii1_txd3.mii1_txd3 */
-                               0x120 (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* mii1_txd2.mii1_txd2 */
-                               0x124 (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* mii1_txd1.mii1_txd1 */
-                               0x128 (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* mii1_txd0.mii1_txd0 */
-                               0x12c (PIN_INPUT_PULLUP | MUX_MODE0)    /* mii1_txclk.mii1_txclk */
-                               0x130 (PIN_INPUT_PULLUP | MUX_MODE0)    /* mii1_rxclk.mii1_rxclk */
-                               0x134 (PIN_INPUT_PULLUP | MUX_MODE0)    /* mii1_rxd3.mii1_rxd3 */
-                               0x138 (PIN_INPUT_PULLUP | MUX_MODE0)    /* mii1_rxd2.mii1_rxd2 */
-                               0x13c (PIN_INPUT_PULLUP | MUX_MODE0)    /* mii1_rxd1.mii1_rxd1 */
-                               0x140 (PIN_INPUT_PULLUP | MUX_MODE0)    /* mii1_rxd0.mii1_rxd0 */
-                       >;
+               led@4 {
+                       label = "beaglebone:green:usr2";
+                       gpios = <&gpio1 23 GPIO_ACTIVE_HIGH>;
+                       linux,default-trigger = "cpu0";
+                       default-state = "off";
                };
 
-               cpsw_sleep: cpsw_sleep {
-                       pinctrl-single,pins = <
-                               /* Slave 1 reset value */
-                               0x110 (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                               0x114 (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                               0x118 (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                               0x11c (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                               0x120 (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                               0x124 (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                               0x128 (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                               0x12c (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                               0x130 (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                               0x134 (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                               0x138 (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                               0x13c (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                               0x140 (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                       >;
+               led@5 {
+                       label = "beaglebone:green:usr3";
+                       gpios = <&gpio1 24 GPIO_ACTIVE_HIGH>;
+                       linux,default-trigger = "mmc1";
+                       default-state = "off";
                };
+       };
 
-               davinci_mdio_default: davinci_mdio_default {
-                       pinctrl-single,pins = <
-                               /* MDIO */
-                               0x148 (PIN_INPUT_PULLUP | SLEWCTRL_FAST | MUX_MODE0)    /* mdio_data.mdio_data */
-                               0x14c (PIN_OUTPUT_PULLUP | MUX_MODE0)                   /* mdio_clk.mdio_clk */
-                       >;
-               };
+       vmmcsd_fixed: fixedregulator@0 {
+               compatible = "regulator-fixed";
+               regulator-name = "vmmcsd_fixed";
+               regulator-min-microvolt = <3300000>;
+               regulator-max-microvolt = <3300000>;
+       };
+};
 
-               davinci_mdio_sleep: davinci_mdio_sleep {
-                       pinctrl-single,pins = <
-                               /* MDIO reset value */
-                               0x148 (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                               0x14c (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                       >;
-               };
+&am33xx_pinmux {
+       pinctrl-names = "default";
+       pinctrl-0 = <&clkout2_pin>;
+
+       user_leds_s0: user_leds_s0 {
+               pinctrl-single,pins = <
+                       0x54 (PIN_OUTPUT_PULLDOWN | MUX_MODE7)  /* gpmc_a5.gpio1_21 */
+                       0x58 (PIN_OUTPUT_PULLUP | MUX_MODE7)    /* gpmc_a6.gpio1_22 */
+                       0x5c (PIN_OUTPUT_PULLDOWN | MUX_MODE7)  /* gpmc_a7.gpio1_23 */
+                       0x60 (PIN_OUTPUT_PULLUP | MUX_MODE7)    /* gpmc_a8.gpio1_24 */
+               >;
        };
 
-       ocp {
-               uart0: serial@44e09000 {
-                       pinctrl-names = "default";
-                       pinctrl-0 = <&uart0_pins>;
+       i2c0_pins: pinmux_i2c0_pins {
+               pinctrl-single,pins = <
+                       0x188 (PIN_INPUT_PULLUP | MUX_MODE0)    /* i2c0_sda.i2c0_sda */
+                       0x18c (PIN_INPUT_PULLUP | MUX_MODE0)    /* i2c0_scl.i2c0_scl */
+               >;
+       };
 
-                       status = "okay";
-               };
+       uart0_pins: pinmux_uart0_pins {
+               pinctrl-single,pins = <
+                       0x170 (PIN_INPUT_PULLUP | MUX_MODE0)    /* uart0_rxd.uart0_rxd */
+                       0x174 (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* uart0_txd.uart0_txd */
+               >;
+       };
 
-               musb: usb@47400000 {
-                       status = "okay";
+       clkout2_pin: pinmux_clkout2_pin {
+               pinctrl-single,pins = <
+                       0x1b4 (PIN_OUTPUT_PULLDOWN | MUX_MODE3) /* xdma_event_intr1.clkout2 */
+               >;
+       };
 
-                       control@44e10000 {
-                               status = "okay";
-                       };
+       cpsw_default: cpsw_default {
+               pinctrl-single,pins = <
+                       /* Slave 1 */
+                       0x110 (PIN_INPUT_PULLUP | MUX_MODE0)    /* mii1_rxerr.mii1_rxerr */
+                       0x114 (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* mii1_txen.mii1_txen */
+                       0x118 (PIN_INPUT_PULLUP | MUX_MODE0)    /* mii1_rxdv.mii1_rxdv */
+                       0x11c (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* mii1_txd3.mii1_txd3 */
+                       0x120 (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* mii1_txd2.mii1_txd2 */
+                       0x124 (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* mii1_txd1.mii1_txd1 */
+                       0x128 (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* mii1_txd0.mii1_txd0 */
+                       0x12c (PIN_INPUT_PULLUP | MUX_MODE0)    /* mii1_txclk.mii1_txclk */
+                       0x130 (PIN_INPUT_PULLUP | MUX_MODE0)    /* mii1_rxclk.mii1_rxclk */
+                       0x134 (PIN_INPUT_PULLUP | MUX_MODE0)    /* mii1_rxd3.mii1_rxd3 */
+                       0x138 (PIN_INPUT_PULLUP | MUX_MODE0)    /* mii1_rxd2.mii1_rxd2 */
+                       0x13c (PIN_INPUT_PULLUP | MUX_MODE0)    /* mii1_rxd1.mii1_rxd1 */
+                       0x140 (PIN_INPUT_PULLUP | MUX_MODE0)    /* mii1_rxd0.mii1_rxd0 */
+               >;
+       };
 
-                       usb-phy@47401300 {
-                               status = "okay";
-                       };
+       cpsw_sleep: cpsw_sleep {
+               pinctrl-single,pins = <
+                       /* Slave 1 reset value */
+                       0x110 (PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       0x114 (PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       0x118 (PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       0x11c (PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       0x120 (PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       0x124 (PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       0x128 (PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       0x12c (PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       0x130 (PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       0x134 (PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       0x138 (PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       0x13c (PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       0x140 (PIN_INPUT_PULLDOWN | MUX_MODE7)
+               >;
+       };
 
-                       usb-phy@47401b00 {
-                               status = "okay";
-                       };
+       davinci_mdio_default: davinci_mdio_default {
+               pinctrl-single,pins = <
+                       /* MDIO */
+                       0x148 (PIN_INPUT_PULLUP | SLEWCTRL_FAST | MUX_MODE0)    /* mdio_data.mdio_data */
+                       0x14c (PIN_OUTPUT_PULLUP | MUX_MODE0)                   /* mdio_clk.mdio_clk */
+               >;
+       };
 
-                       usb@47401000 {
-                               status = "okay";
-                       };
+       davinci_mdio_sleep: davinci_mdio_sleep {
+               pinctrl-single,pins = <
+                       /* MDIO reset value */
+                       0x148 (PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       0x14c (PIN_INPUT_PULLDOWN | MUX_MODE7)
+               >;
+       };
 
-                       usb@47401800 {
-                               status = "okay";
-                               dr_mode = "host";
-                       };
+       mmc1_pins: pinmux_mmc1_pins {
+               pinctrl-single,pins = <
+                       0x160 (PIN_INPUT | MUX_MODE7) /* GPIO0_6 */
+               >;
+       };
 
-                       dma-controller@07402000  {
-                               status = "okay";
-                       };
-               };
+       emmc_pins: pinmux_emmc_pins {
+               pinctrl-single,pins = <
+                       0x80 (PIN_INPUT_PULLUP | MUX_MODE2) /* gpmc_csn1.mmc1_clk */
+                       0x84 (PIN_INPUT_PULLUP | MUX_MODE2) /* gpmc_csn2.mmc1_cmd */
+                       0x00 (PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad0.mmc1_dat0 */
+                       0x04 (PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad1.mmc1_dat1 */
+                       0x08 (PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad2.mmc1_dat2 */
+                       0x0c (PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad3.mmc1_dat3 */
+                       0x10 (PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad4.mmc1_dat4 */
+                       0x14 (PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad5.mmc1_dat5 */
+                       0x18 (PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad6.mmc1_dat6 */
+                       0x1c (PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad7.mmc1_dat7 */
+               >;
+       };
+};
 
-               i2c0: i2c@44e0b000 {
-                       pinctrl-names = "default";
-                       pinctrl-0 = <&i2c0_pins>;
+&uart0 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&uart0_pins>;
 
-                       status = "okay";
-                       clock-frequency = <400000>;
+       status = "okay";
+};
 
-                       tps: tps@24 {
-                               reg = <0x24>;
-                       };
+&usb {
+       status = "okay";
 
-               };
+       control@44e10000 {
+               status = "okay";
        };
 
-       leds {
-               pinctrl-names = "default";
-               pinctrl-0 = <&user_leds_s0>;
+       usb-phy@47401300 {
+               status = "okay";
+       };
 
-               compatible = "gpio-leds";
+       usb-phy@47401b00 {
+               status = "okay";
+       };
 
-               led@2 {
-                       label = "beaglebone:green:heartbeat";
-                       gpios = <&gpio1 21 GPIO_ACTIVE_HIGH>;
-                       linux,default-trigger = "heartbeat";
-                       default-state = "off";
-               };
+       usb@47401000 {
+               status = "okay";
+       };
 
-               led@3 {
-                       label = "beaglebone:green:mmc0";
-                       gpios = <&gpio1 22 GPIO_ACTIVE_HIGH>;
-                       linux,default-trigger = "mmc0";
-                       default-state = "off";
-               };
+       usb@47401800 {
+               status = "okay";
+               dr_mode = "host";
+       };
 
-               led@4 {
-                       label = "beaglebone:green:usr2";
-                       gpios = <&gpio1 23 GPIO_ACTIVE_HIGH>;
-                       default-state = "off";
-               };
+       dma-controller@07402000  {
+               status = "okay";
+       };
+};
 
-               led@5 {
-                       label = "beaglebone:green:usr3";
-                       gpios = <&gpio1 24 GPIO_ACTIVE_HIGH>;
-                       default-state = "off";
-               };
+&i2c0 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&i2c0_pins>;
+
+       status = "okay";
+       clock-frequency = <400000>;
+
+       tps: tps@24 {
+               reg = <0x24>;
        };
+
 };
 
 /include/ "tps65217.dtsi"
        pinctrl-0 = <&davinci_mdio_default>;
        pinctrl-1 = <&davinci_mdio_sleep>;
 };
+
+&mmc1 {
+       status = "okay";
+       bus-width = <0x4>;
+       pinctrl-names = "default";
+       pinctrl-0 = <&mmc1_pins>;
+       cd-gpios = <&gpio0 6 GPIO_ACTIVE_HIGH>;
+       cd-inverted;
+};
index 7993c489982c86ab2cf03a85b152f9b7db99ad3f..94ee427a6db17663bfbd28912df2a62d17ce6085 100644 (file)
@@ -9,3 +9,21 @@
 
 #include "am33xx.dtsi"
 #include "am335x-bone-common.dtsi"
+
+&ldo3_reg {
+       regulator-min-microvolt = <1800000>;
+       regulator-max-microvolt = <3300000>;
+       regulator-always-on;
+};
+
+&mmc1 {
+       vmmc-supply = <&ldo3_reg>;
+};
+
+&sham {
+       status = "okay";
+};
+
+&aes {
+       status = "okay";
+};
index 197cadf72d2cd92ed03351e3c2ac590c2401bd50..6b71ad95a5cfd085a12dd390b794a7d37290a468 100644 (file)
        regulator-max-microvolt = <1800000>;
        regulator-always-on;
 };
+
+&mmc1 {
+       vmmc-supply = <&vmmcsd_fixed>;
+};
+
+&mmc2 {
+       vmmc-supply = <&vmmcsd_fixed>;
+       pinctrl-names = "default";
+       pinctrl-0 = <&emmc_pins>;
+       bus-width = <8>;
+       status = "okay";
+       ti,vcc-aux-disable-is-sleep;
+};
+
+&am33xx_pinmux {
+       nxp_hdmi_bonelt_pins: nxp_hdmi_bonelt_pins {
+               pinctrl-single,pins = <
+                       0x1b0 0x03      /* xdma_event_intr0, OMAP_MUX_MODE3 | AM33XX_PIN_OUTPUT */
+                       0xa0 0x08       /* lcd_data0.lcd_data0, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
+                       0xa4 0x08       /* lcd_data1.lcd_data1, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
+                       0xa8 0x08       /* lcd_data2.lcd_data2, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
+                       0xac 0x08       /* lcd_data3.lcd_data3, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
+                       0xb0 0x08       /* lcd_data4.lcd_data4, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
+                       0xb4 0x08       /* lcd_data5.lcd_data5, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
+                       0xb8 0x08       /* lcd_data6.lcd_data6, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
+                       0xbc 0x08       /* lcd_data7.lcd_data7, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
+                       0xc0 0x08       /* lcd_data8.lcd_data8, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
+                       0xc4 0x08       /* lcd_data9.lcd_data9, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
+                       0xc8 0x08       /* lcd_data10.lcd_data10, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
+                       0xcc 0x08       /* lcd_data11.lcd_data11, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
+                       0xd0 0x08       /* lcd_data12.lcd_data12, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
+                       0xd4 0x08       /* lcd_data13.lcd_data13, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
+                       0xd8 0x08       /* lcd_data14.lcd_data14, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
+                       0xdc 0x08       /* lcd_data15.lcd_data15, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
+                       0xe0 0x00       /* lcd_vsync.lcd_vsync, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT */
+                       0xe4 0x00       /* lcd_hsync.lcd_hsync, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT */
+                       0xe8 0x00       /* lcd_pclk.lcd_pclk, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT */
+                       0xec 0x00       /* lcd_ac_bias_en.lcd_ac_bias_en, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT */
+               >;
+       };
+       nxp_hdmi_bonelt_off_pins: nxp_hdmi_bonelt_off_pins {
+               pinctrl-single,pins = <
+                       0x1b0 0x03      /* xdma_event_intr0, OMAP_MUX_MODE3 | AM33XX_PIN_OUTPUT */
+               >;
+       };
+};
+
+&lcdc {
+       status = "okay";
+};
+
+/ {
+       hdmi {
+               compatible = "ti,tilcdc,slave";
+               i2c = <&i2c0>;
+               pinctrl-names = "default", "off";
+               pinctrl-0 = <&nxp_hdmi_bonelt_pins>;
+               pinctrl-1 = <&nxp_hdmi_bonelt_off_pins>;
+               status = "okay";
+       };
+};
index e8ec8756e4985f2b616a2aa8da28682dbd043246..eabacf9b8c3146036f2b930bd084fef832233b67 100644 (file)
                reg = <0x80000000 0x10000000>; /* 256 MB */
        };
 
-       am33xx_pinmux: pinmux@44e10800 {
-               pinctrl-names = "default";
-               pinctrl-0 = <&matrix_keypad_s0 &volume_keys_s0 &clkout2_pin>;
-
-               matrix_keypad_s0: matrix_keypad_s0 {
-                       pinctrl-single,pins = <
-                               0x54 (PIN_OUTPUT_PULLDOWN | MUX_MODE7)  /* gpmc_a5.gpio1_21 */
-                               0x58 (PIN_OUTPUT_PULLDOWN | MUX_MODE7)  /* gpmc_a6.gpio1_22 */
-                               0x64 (PIN_INPUT_PULLDOWN | MUX_MODE7)   /* gpmc_a9.gpio1_25 */
-                               0x68 (PIN_INPUT_PULLDOWN | MUX_MODE7)   /* gpmc_a10.gpio1_26 */
-                               0x6c (PIN_INPUT_PULLDOWN | MUX_MODE7)   /* gpmc_a11.gpio1_27 */
-                       >;
-               };
-
-               volume_keys_s0: volume_keys_s0 {
-                       pinctrl-single,pins = <
-                               0x150 (PIN_INPUT_PULLDOWN | MUX_MODE7)  /* spi0_sclk.gpio0_2 */
-                               0x154 (PIN_INPUT_PULLDOWN | MUX_MODE7)  /* spi0_d0.gpio0_3 */
-                       >;
-               };
-
-               i2c0_pins: pinmux_i2c0_pins {
-                       pinctrl-single,pins = <
-                               0x188 (PIN_INPUT_PULLUP | MUX_MODE0)    /* i2c0_sda.i2c0_sda */
-                               0x18c (PIN_INPUT_PULLUP | MUX_MODE0)    /* i2c0_scl.i2c0_scl */
-                       >;
-               };
-
-               i2c1_pins: pinmux_i2c1_pins {
-                       pinctrl-single,pins = <
-                               0x158 (PIN_INPUT_PULLUP | MUX_MODE2)    /* spi0_d1.i2c1_sda */
-                               0x15c (PIN_INPUT_PULLUP | MUX_MODE2)    /* spi0_cs0.i2c1_scl */
-                       >;
-               };
-
-               uart0_pins: pinmux_uart0_pins {
-                       pinctrl-single,pins = <
-                               0x170 (PIN_INPUT_PULLUP | MUX_MODE0)    /* uart0_rxd.uart0_rxd */
-                               0x174 (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* uart0_txd.uart0_txd */
-                       >;
-               };
-
-               clkout2_pin: pinmux_clkout2_pin {
-                       pinctrl-single,pins = <
-                               0x1b4 (PIN_OUTPUT_PULLDOWN | MUX_MODE3) /* xdma_event_intr1.clkout2 */
-                       >;
-               };
-
-               nandflash_pins_s0: nandflash_pins_s0 {
-                       pinctrl-single,pins = <
-                               0x0 (PIN_INPUT_PULLUP | MUX_MODE0)      /* gpmc_ad0.gpmc_ad0 */
-                               0x4 (PIN_INPUT_PULLUP | MUX_MODE0)      /* gpmc_ad1.gpmc_ad1 */
-                               0x8 (PIN_INPUT_PULLUP | MUX_MODE0)      /* gpmc_ad2.gpmc_ad2 */
-                               0xc (PIN_INPUT_PULLUP | MUX_MODE0)      /* gpmc_ad3.gpmc_ad3 */
-                               0x10 (PIN_INPUT_PULLUP | MUX_MODE0)     /* gpmc_ad4.gpmc_ad4 */
-                               0x14 (PIN_INPUT_PULLUP | MUX_MODE0)     /* gpmc_ad5.gpmc_ad5 */
-                               0x18 (PIN_INPUT_PULLUP | MUX_MODE0)     /* gpmc_ad6.gpmc_ad6 */
-                               0x1c (PIN_INPUT_PULLUP | MUX_MODE0)     /* gpmc_ad7.gpmc_ad7 */
-                               0x70 (PIN_INPUT_PULLUP | MUX_MODE0)     /* gpmc_wait0.gpmc_wait0 */
-                               0x74 (PIN_INPUT_PULLUP | MUX_MODE7)     /* gpmc_wpn.gpio0_30 */
-                               0x7c (PIN_OUTPUT | MUX_MODE0)           /* gpmc_csn0.gpmc_csn0  */
-                               0x90 (PIN_OUTPUT | MUX_MODE0)           /* gpmc_advn_ale.gpmc_advn_ale */
-                               0x94 (PIN_OUTPUT | MUX_MODE0)           /* gpmc_oen_ren.gpmc_oen_ren */
-                               0x98 (PIN_OUTPUT | MUX_MODE0)           /* gpmc_wen.gpmc_wen */
-                               0x9c (PIN_OUTPUT | MUX_MODE0)           /* gpmc_be0n_cle.gpmc_be0n_cle */
-                       >;
-               };
-
-               ecap0_pins: backlight_pins {
-                       pinctrl-single,pins = <
-                               0x164 0x0       /* eCAP0_in_PWM0_out.eCAP0_in_PWM0_out MODE0 */
-                       >;
-               };
-
-               cpsw_default: cpsw_default {
-                       pinctrl-single,pins = <
-                               /* Slave 1 */
-                               0x114 (PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* mii1_txen.rgmii1_tctl */
-                               0x118 (PIN_INPUT_PULLDOWN | MUX_MODE2)  /* mii1_rxdv.rgmii1_rctl */
-                               0x11c (PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* mii1_txd3.rgmii1_td3 */
-                               0x120 (PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* mii1_txd2.rgmii1_td2 */
-                               0x124 (PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* mii1_txd1.rgmii1_td1 */
-                               0x128 (PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* mii1_txd0.rgmii1_td0 */
-                               0x12c (PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* mii1_txclk.rgmii1_tclk */
-                               0x130 (PIN_INPUT_PULLDOWN | MUX_MODE2)  /* mii1_rxclk.rgmii1_rclk */
-                               0x134 (PIN_INPUT_PULLDOWN | MUX_MODE2)  /* mii1_rxd3.rgmii1_rd3 */
-                               0x138 (PIN_INPUT_PULLDOWN | MUX_MODE2)  /* mii1_rxd2.rgmii1_rd2 */
-                               0x13c (PIN_INPUT_PULLDOWN | MUX_MODE2)  /* mii1_rxd1.rgmii1_rd1 */
-                               0x140 (PIN_INPUT_PULLDOWN | MUX_MODE2)  /* mii1_rxd0.rgmii1_rd0 */
-                       >;
-               };
-
-               cpsw_sleep: cpsw_sleep {
-                       pinctrl-single,pins = <
-                               /* Slave 1 reset value */
-                               0x114 (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                               0x118 (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                               0x11c (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                               0x120 (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                               0x124 (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                               0x128 (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                               0x12c (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                               0x130 (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                               0x134 (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                               0x138 (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                               0x13c (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                               0x140 (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                       >;
-               };
-
-               davinci_mdio_default: davinci_mdio_default {
-                       pinctrl-single,pins = <
-                               /* MDIO */
-                               0x148 (PIN_INPUT_PULLUP | SLEWCTRL_FAST | MUX_MODE0)    /* mdio_data.mdio_data */
-                               0x14c (PIN_OUTPUT_PULLUP | MUX_MODE0)                   /* mdio_clk.mdio_clk */
-                       >;
-               };
-
-               davinci_mdio_sleep: davinci_mdio_sleep {
-                       pinctrl-single,pins = <
-                               /* MDIO reset value */
-                               0x148 (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                               0x14c (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                       >;
-               };
-       };
-
-       ocp {
-               uart0: serial@44e09000 {
-                       pinctrl-names = "default";
-                       pinctrl-0 = <&uart0_pins>;
-
-                       status = "okay";
-               };
-
-               i2c0: i2c@44e0b000 {
-                       pinctrl-names = "default";
-                       pinctrl-0 = <&i2c0_pins>;
-
-                       status = "okay";
-                       clock-frequency = <400000>;
-
-                       tps: tps@2d {
-                               reg = <0x2d>;
-                       };
-               };
-
-               musb: usb@47400000 {
-                       status = "okay";
-
-                       control@44e10000 {
-                               status = "okay";
-                       };
-
-                       usb-phy@47401300 {
-                               status = "okay";
-                       };
-
-                       usb-phy@47401b00 {
-                               status = "okay";
-                       };
-
-                       usb@47401000 {
-                               status = "okay";
-                       };
-
-                       usb@47401800 {
-                               status = "okay";
-                               dr_mode = "host";
-                       };
-
-                       dma-controller@07402000  {
-                               status = "okay";
-                       };
-               };
-
-               i2c1: i2c@4802a000 {
-                       pinctrl-names = "default";
-                       pinctrl-0 = <&i2c1_pins>;
-
-                       status = "okay";
-                       clock-frequency = <100000>;
-
-                       lis331dlh: lis331dlh@18 {
-                               compatible = "st,lis331dlh", "st,lis3lv02d";
-                               reg = <0x18>;
-                               Vdd-supply = <&lis3_reg>;
-                               Vdd_IO-supply = <&lis3_reg>;
-
-                               st,click-single-x;
-                               st,click-single-y;
-                               st,click-single-z;
-                               st,click-thresh-x = <10>;
-                               st,click-thresh-y = <10>;
-                               st,click-thresh-z = <10>;
-                               st,irq1-click;
-                               st,irq2-click;
-                               st,wakeup-x-lo;
-                               st,wakeup-x-hi;
-                               st,wakeup-y-lo;
-                               st,wakeup-y-hi;
-                               st,wakeup-z-lo;
-                               st,wakeup-z-hi;
-                               st,min-limit-x = <120>;
-                               st,min-limit-y = <120>;
-                               st,min-limit-z = <140>;
-                               st,max-limit-x = <550>;
-                               st,max-limit-y = <550>;
-                               st,max-limit-z = <750>;
-                       };
-
-                       tsl2550: tsl2550@39 {
-                               compatible = "taos,tsl2550";
-                               reg = <0x39>;
-                       };
-
-                       tmp275: tmp275@48 {
-                               compatible = "ti,tmp275";
-                               reg = <0x48>;
-                       };
-               };
-
-               elm: elm@48080000 {
-                       status = "okay";
-               };
-
-               epwmss0: epwmss@48300000 {
-                       status = "okay";
-
-                       ecap0: ecap@48300100 {
-                               status = "okay";
-                               pinctrl-names = "default";
-                               pinctrl-0 = <&ecap0_pins>;
-                       };
-               };
-
-               gpmc: gpmc@50000000 {
-                       status = "okay";
-                       pinctrl-names = "default";
-                       pinctrl-0 = <&nandflash_pins_s0>;
-                       ranges = <0 0 0x08000000 0x10000000>;   /* CS0: NAND */
-                       nand@0,0 {
-                               reg = <0 0 0>; /* CS0, offset 0 */
-                               nand-bus-width = <8>;
-                               ti,nand-ecc-opt = "bch8";
-                               gpmc,device-nand = "true";
-                               gpmc,device-width = <1>;
-                               gpmc,sync-clk-ps = <0>;
-                               gpmc,cs-on-ns = <0>;
-                               gpmc,cs-rd-off-ns = <44>;
-                               gpmc,cs-wr-off-ns = <44>;
-                               gpmc,adv-on-ns = <6>;
-                               gpmc,adv-rd-off-ns = <34>;
-                               gpmc,adv-wr-off-ns = <44>;
-                               gpmc,we-on-ns = <0>;
-                               gpmc,we-off-ns = <40>;
-                               gpmc,oe-on-ns = <0>;
-                               gpmc,oe-off-ns = <54>;
-                               gpmc,access-ns = <64>;
-                               gpmc,rd-cycle-ns = <82>;
-                               gpmc,wr-cycle-ns = <82>;
-                               gpmc,wait-on-read = "true";
-                               gpmc,wait-on-write = "true";
-                               gpmc,bus-turnaround-ns = <0>;
-                               gpmc,cycle2cycle-delay-ns = <0>;
-                               gpmc,clk-activation-ns = <0>;
-                               gpmc,wait-monitoring-ns = <0>;
-                               gpmc,wr-access-ns = <40>;
-                               gpmc,wr-data-mux-bus-ns = <0>;
-
-                               #address-cells = <1>;
-                               #size-cells = <1>;
-                               elm_id = <&elm>;
-
-                               /* MTD partition table */
-                               partition@0 {
-                                       label = "SPL1";
-                                       reg = <0x00000000 0x000020000>;
-                               };
-
-                               partition@1 {
-                                       label = "SPL2";
-                                       reg = <0x00020000 0x00020000>;
-                               };
-
-                               partition@2 {
-                                       label = "SPL3";
-                                       reg = <0x00040000 0x00020000>;
-                               };
-
-                               partition@3 {
-                                       label = "SPL4";
-                                       reg = <0x00060000 0x00020000>;
-                               };
-
-                               partition@4 {
-                                       label = "U-boot";
-                                       reg = <0x00080000 0x001e0000>;
-                               };
-
-                               partition@5 {
-                                       label = "environment";
-                                       reg = <0x00260000 0x00020000>;
-                               };
-
-                               partition@6 {
-                                       label = "Kernel";
-                                       reg = <0x00280000 0x00500000>;
-                               };
-
-                               partition@7 {
-                                       label = "File-System";
-                                       reg = <0x00780000 0x0F880000>;
-                               };
-                       };
-               };
-       };
-
        vbat: fixedregulator@0 {
                compatible = "regulator-fixed";
                regulator-name = "vbat";
                brightness-levels = <0 51 53 56 62 75 101 152 255>;
                default-brightness-level = <8>;
        };
+
+       panel {
+               compatible = "ti,tilcdc,panel";
+               status = "okay";
+               pinctrl-names = "default";
+               pinctrl-0 = <&lcd_pins_s0>;
+               panel-info {
+                       ac-bias           = <255>;
+                       ac-bias-intrpt    = <0>;
+                       dma-burst-sz      = <16>;
+                       bpp               = <32>;
+                       fdd               = <0x80>;
+                       sync-edge         = <0>;
+                       sync-ctrl         = <1>;
+                       raster-order      = <0>;
+                       fifo-th           = <0>;
+               };
+
+               display-timings {
+                       800x480p62 {
+                               clock-frequency = <30000000>;
+                               hactive = <800>;
+                               vactive = <480>;
+                               hfront-porch = <39>;
+                               hback-porch = <39>;
+                               hsync-len = <47>;
+                               vback-porch = <29>;
+                               vfront-porch = <13>;
+                               vsync-len = <2>;
+                               hsync-active = <1>;
+                               vsync-active = <1>;
+                       };
+               };
+       };
+};
+
+&am33xx_pinmux {
+       pinctrl-names = "default";
+       pinctrl-0 = <&matrix_keypad_s0 &volume_keys_s0 &clkout2_pin>;
+
+       matrix_keypad_s0: matrix_keypad_s0 {
+               pinctrl-single,pins = <
+                       0x54 (PIN_OUTPUT_PULLDOWN | MUX_MODE7)  /* gpmc_a5.gpio1_21 */
+                       0x58 (PIN_OUTPUT_PULLDOWN | MUX_MODE7)  /* gpmc_a6.gpio1_22 */
+                       0x64 (PIN_INPUT_PULLDOWN | MUX_MODE7)   /* gpmc_a9.gpio1_25 */
+                       0x68 (PIN_INPUT_PULLDOWN | MUX_MODE7)   /* gpmc_a10.gpio1_26 */
+                       0x6c (PIN_INPUT_PULLDOWN | MUX_MODE7)   /* gpmc_a11.gpio1_27 */
+               >;
+       };
+
+       volume_keys_s0: volume_keys_s0 {
+               pinctrl-single,pins = <
+                       0x150 (PIN_INPUT_PULLDOWN | MUX_MODE7)  /* spi0_sclk.gpio0_2 */
+                       0x154 (PIN_INPUT_PULLDOWN | MUX_MODE7)  /* spi0_d0.gpio0_3 */
+               >;
+       };
+
+       i2c0_pins: pinmux_i2c0_pins {
+               pinctrl-single,pins = <
+                       0x188 (PIN_INPUT_PULLUP | MUX_MODE0)    /* i2c0_sda.i2c0_sda */
+                       0x18c (PIN_INPUT_PULLUP | MUX_MODE0)    /* i2c0_scl.i2c0_scl */
+               >;
+       };
+
+       i2c1_pins: pinmux_i2c1_pins {
+               pinctrl-single,pins = <
+                       0x158 (PIN_INPUT_PULLUP | MUX_MODE2)    /* spi0_d1.i2c1_sda */
+                       0x15c (PIN_INPUT_PULLUP | MUX_MODE2)    /* spi0_cs0.i2c1_scl */
+               >;
+       };
+
+       uart0_pins: pinmux_uart0_pins {
+               pinctrl-single,pins = <
+                       0x170 (PIN_INPUT_PULLUP | MUX_MODE0)    /* uart0_rxd.uart0_rxd */
+                       0x174 (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* uart0_txd.uart0_txd */
+               >;
+       };
+
+       clkout2_pin: pinmux_clkout2_pin {
+               pinctrl-single,pins = <
+                       0x1b4 (PIN_OUTPUT_PULLDOWN | MUX_MODE3) /* xdma_event_intr1.clkout2 */
+               >;
+       };
+
+       nandflash_pins_s0: nandflash_pins_s0 {
+               pinctrl-single,pins = <
+                       0x0 (PIN_INPUT_PULLUP | MUX_MODE0)      /* gpmc_ad0.gpmc_ad0 */
+                       0x4 (PIN_INPUT_PULLUP | MUX_MODE0)      /* gpmc_ad1.gpmc_ad1 */
+                       0x8 (PIN_INPUT_PULLUP | MUX_MODE0)      /* gpmc_ad2.gpmc_ad2 */
+                       0xc (PIN_INPUT_PULLUP | MUX_MODE0)      /* gpmc_ad3.gpmc_ad3 */
+                       0x10 (PIN_INPUT_PULLUP | MUX_MODE0)     /* gpmc_ad4.gpmc_ad4 */
+                       0x14 (PIN_INPUT_PULLUP | MUX_MODE0)     /* gpmc_ad5.gpmc_ad5 */
+                       0x18 (PIN_INPUT_PULLUP | MUX_MODE0)     /* gpmc_ad6.gpmc_ad6 */
+                       0x1c (PIN_INPUT_PULLUP | MUX_MODE0)     /* gpmc_ad7.gpmc_ad7 */
+                       0x70 (PIN_INPUT_PULLUP | MUX_MODE0)     /* gpmc_wait0.gpmc_wait0 */
+                       0x74 (PIN_INPUT_PULLUP | MUX_MODE7)     /* gpmc_wpn.gpio0_30 */
+                       0x7c (PIN_OUTPUT | MUX_MODE0)           /* gpmc_csn0.gpmc_csn0  */
+                       0x90 (PIN_OUTPUT | MUX_MODE0)           /* gpmc_advn_ale.gpmc_advn_ale */
+                       0x94 (PIN_OUTPUT | MUX_MODE0)           /* gpmc_oen_ren.gpmc_oen_ren */
+                       0x98 (PIN_OUTPUT | MUX_MODE0)           /* gpmc_wen.gpmc_wen */
+                       0x9c (PIN_OUTPUT | MUX_MODE0)           /* gpmc_be0n_cle.gpmc_be0n_cle */
+               >;
+       };
+
+       ecap0_pins: backlight_pins {
+               pinctrl-single,pins = <
+                       0x164 0x0       /* eCAP0_in_PWM0_out.eCAP0_in_PWM0_out MODE0 */
+               >;
+       };
+
+       cpsw_default: cpsw_default {
+               pinctrl-single,pins = <
+                       /* Slave 1 */
+                       0x114 (PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* mii1_txen.rgmii1_tctl */
+                       0x118 (PIN_INPUT_PULLDOWN | MUX_MODE2)  /* mii1_rxdv.rgmii1_rctl */
+                       0x11c (PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* mii1_txd3.rgmii1_td3 */
+                       0x120 (PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* mii1_txd2.rgmii1_td2 */
+                       0x124 (PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* mii1_txd1.rgmii1_td1 */
+                       0x128 (PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* mii1_txd0.rgmii1_td0 */
+                       0x12c (PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* mii1_txclk.rgmii1_tclk */
+                       0x130 (PIN_INPUT_PULLDOWN | MUX_MODE2)  /* mii1_rxclk.rgmii1_rclk */
+                       0x134 (PIN_INPUT_PULLDOWN | MUX_MODE2)  /* mii1_rxd3.rgmii1_rd3 */
+                       0x138 (PIN_INPUT_PULLDOWN | MUX_MODE2)  /* mii1_rxd2.rgmii1_rd2 */
+                       0x13c (PIN_INPUT_PULLDOWN | MUX_MODE2)  /* mii1_rxd1.rgmii1_rd1 */
+                       0x140 (PIN_INPUT_PULLDOWN | MUX_MODE2)  /* mii1_rxd0.rgmii1_rd0 */
+               >;
+       };
+
+       cpsw_sleep: cpsw_sleep {
+               pinctrl-single,pins = <
+                       /* Slave 1 reset value */
+                       0x114 (PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       0x118 (PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       0x11c (PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       0x120 (PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       0x124 (PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       0x128 (PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       0x12c (PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       0x130 (PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       0x134 (PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       0x138 (PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       0x13c (PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       0x140 (PIN_INPUT_PULLDOWN | MUX_MODE7)
+               >;
+       };
+
+       davinci_mdio_default: davinci_mdio_default {
+               pinctrl-single,pins = <
+                       /* MDIO */
+                       0x148 (PIN_INPUT_PULLUP | SLEWCTRL_FAST | MUX_MODE0)    /* mdio_data.mdio_data */
+                       0x14c (PIN_OUTPUT_PULLUP | MUX_MODE0)                   /* mdio_clk.mdio_clk */
+               >;
+       };
+
+       davinci_mdio_sleep: davinci_mdio_sleep {
+               pinctrl-single,pins = <
+                       /* MDIO reset value */
+                       0x148 (PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       0x14c (PIN_INPUT_PULLDOWN | MUX_MODE7)
+               >;
+       };
+
+       lcd_pins_s0: lcd_pins_s0 {
+               pinctrl-single,pins = <
+                       0x20 0x01       /* gpmc_ad8.lcd_data16, OUTPUT | MODE1 */
+                       0x24 0x01       /* gpmc_ad9.lcd_data17, OUTPUT | MODE1 */
+                       0x28 0x01       /* gpmc_ad10.lcd_data18, OUTPUT | MODE1 */
+                       0x2c 0x01       /* gpmc_ad11.lcd_data19, OUTPUT | MODE1 */
+                       0x30 0x01       /* gpmc_ad12.lcd_data20, OUTPUT | MODE1 */
+                       0x34 0x01       /* gpmc_ad13.lcd_data21, OUTPUT | MODE1 */
+                       0x38 0x01       /* gpmc_ad14.lcd_data22, OUTPUT | MODE1 */
+                       0x3c 0x01       /* gpmc_ad15.lcd_data23, OUTPUT | MODE1 */
+                       0xa0 0x00       /* lcd_data0.lcd_data0, OUTPUT | MODE0 */
+                       0xa4 0x00       /* lcd_data1.lcd_data1, OUTPUT | MODE0 */
+                       0xa8 0x00       /* lcd_data2.lcd_data2, OUTPUT | MODE0 */
+                       0xac 0x00       /* lcd_data3.lcd_data3, OUTPUT | MODE0 */
+                       0xb0 0x00       /* lcd_data4.lcd_data4, OUTPUT | MODE0 */
+                       0xb4 0x00       /* lcd_data5.lcd_data5, OUTPUT | MODE0 */
+                       0xb8 0x00       /* lcd_data6.lcd_data6, OUTPUT | MODE0 */
+                       0xbc 0x00       /* lcd_data7.lcd_data7, OUTPUT | MODE0 */
+                       0xc0 0x00       /* lcd_data8.lcd_data8, OUTPUT | MODE0 */
+                       0xc4 0x00       /* lcd_data9.lcd_data9, OUTPUT | MODE0 */
+                       0xc8 0x00       /* lcd_data10.lcd_data10, OUTPUT | MODE0 */
+                       0xcc 0x00       /* lcd_data11.lcd_data11, OUTPUT | MODE0 */
+                       0xd0 0x00       /* lcd_data12.lcd_data12, OUTPUT | MODE0 */
+                       0xd4 0x00       /* lcd_data13.lcd_data13, OUTPUT | MODE0 */
+                       0xd8 0x00       /* lcd_data14.lcd_data14, OUTPUT | MODE0 */
+                       0xdc 0x00       /* lcd_data15.lcd_data15, OUTPUT | MODE0 */
+                       0xe0 0x00       /* lcd_vsync.lcd_vsync, OUTPUT | MODE0 */
+                       0xe4 0x00       /* lcd_hsync.lcd_hsync, OUTPUT | MODE0 */
+                       0xe8 0x00       /* lcd_pclk.lcd_pclk, OUTPUT | MODE0 */
+                       0xec 0x00       /* lcd_ac_bias_en.lcd_ac_bias_en, OUTPUT | MODE0 */
+               >;
+       };
+};
+
+&uart0 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&uart0_pins>;
+
+       status = "okay";
+};
+
+&i2c0 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&i2c0_pins>;
+
+       status = "okay";
+       clock-frequency = <400000>;
+
+       tps: tps@2d {
+               reg = <0x2d>;
+       };
+};
+
+&usb {
+       status = "okay";
+
+       control@44e10000 {
+               status = "okay";
+       };
+
+       usb-phy@47401300 {
+               status = "okay";
+       };
+
+       usb-phy@47401b00 {
+               status = "okay";
+       };
+
+       usb@47401000 {
+               status = "okay";
+       };
+
+       usb@47401800 {
+               status = "okay";
+               dr_mode = "host";
+       };
+
+       dma-controller@07402000  {
+               status = "okay";
+       };
+};
+
+&i2c1 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&i2c1_pins>;
+
+       status = "okay";
+       clock-frequency = <100000>;
+
+       lis331dlh: lis331dlh@18 {
+               compatible = "st,lis331dlh", "st,lis3lv02d";
+               reg = <0x18>;
+               Vdd-supply = <&lis3_reg>;
+               Vdd_IO-supply = <&lis3_reg>;
+
+               st,click-single-x;
+               st,click-single-y;
+               st,click-single-z;
+               st,click-thresh-x = <10>;
+               st,click-thresh-y = <10>;
+               st,click-thresh-z = <10>;
+               st,irq1-click;
+               st,irq2-click;
+               st,wakeup-x-lo;
+               st,wakeup-x-hi;
+               st,wakeup-y-lo;
+               st,wakeup-y-hi;
+               st,wakeup-z-lo;
+               st,wakeup-z-hi;
+               st,min-limit-x = <120>;
+               st,min-limit-y = <120>;
+               st,min-limit-z = <140>;
+               st,max-limit-x = <550>;
+               st,max-limit-y = <550>;
+               st,max-limit-z = <750>;
+       };
+
+       tsl2550: tsl2550@39 {
+               compatible = "taos,tsl2550";
+               reg = <0x39>;
+       };
+
+       tmp275: tmp275@48 {
+               compatible = "ti,tmp275";
+               reg = <0x48>;
+       };
+};
+
+&lcdc {
+       status = "okay";
+};
+
+&elm {
+       status = "okay";
+};
+
+&epwmss0 {
+       status = "okay";
+
+       ecap0: ecap@48300100 {
+               status = "okay";
+               pinctrl-names = "default";
+               pinctrl-0 = <&ecap0_pins>;
+       };
+};
+
+&gpmc {
+       status = "okay";
+       pinctrl-names = "default";
+       pinctrl-0 = <&nandflash_pins_s0>;
+       ranges = <0 0 0x08000000 0x10000000>;   /* CS0: NAND */
+       nand@0,0 {
+               reg = <0 0 0>; /* CS0, offset 0 */
+               nand-bus-width = <8>;
+               ti,nand-ecc-opt = "bch8";
+               gpmc,device-nand = "true";
+               gpmc,device-width = <1>;
+               gpmc,sync-clk-ps = <0>;
+               gpmc,cs-on-ns = <0>;
+               gpmc,cs-rd-off-ns = <44>;
+               gpmc,cs-wr-off-ns = <44>;
+               gpmc,adv-on-ns = <6>;
+               gpmc,adv-rd-off-ns = <34>;
+               gpmc,adv-wr-off-ns = <44>;
+               gpmc,we-on-ns = <0>;
+               gpmc,we-off-ns = <40>;
+               gpmc,oe-on-ns = <0>;
+               gpmc,oe-off-ns = <54>;
+               gpmc,access-ns = <64>;
+               gpmc,rd-cycle-ns = <82>;
+               gpmc,wr-cycle-ns = <82>;
+               gpmc,wait-on-read = "true";
+               gpmc,wait-on-write = "true";
+               gpmc,bus-turnaround-ns = <0>;
+               gpmc,cycle2cycle-delay-ns = <0>;
+               gpmc,clk-activation-ns = <0>;
+               gpmc,wait-monitoring-ns = <0>;
+               gpmc,wr-access-ns = <40>;
+               gpmc,wr-data-mux-bus-ns = <0>;
+
+               #address-cells = <1>;
+               #size-cells = <1>;
+               elm_id = <&elm>;
+
+               /* MTD partition table */
+               partition@0 {
+                       label = "SPL1";
+                       reg = <0x00000000 0x000020000>;
+               };
+
+               partition@1 {
+                       label = "SPL2";
+                       reg = <0x00020000 0x00020000>;
+               };
+
+               partition@2 {
+                       label = "SPL3";
+                       reg = <0x00040000 0x00020000>;
+               };
+
+               partition@3 {
+                       label = "SPL4";
+                       reg = <0x00060000 0x00020000>;
+               };
+
+               partition@4 {
+                       label = "U-boot";
+                       reg = <0x00080000 0x001e0000>;
+               };
+
+               partition@5 {
+                       label = "environment";
+                       reg = <0x00260000 0x00020000>;
+               };
+
+               partition@6 {
+                       label = "Kernel";
+                       reg = <0x00280000 0x00500000>;
+               };
+
+               partition@7 {
+                       label = "File-System";
+                       reg = <0x00780000 0x0F880000>;
+               };
+       };
 };
 
 #include "tps65910.dtsi"
                };
 
                vmmc_reg: regulator@12 {
+                       regulator-min-microvolt = <1800000>;
+                       regulator-max-microvolt = <3300000>;
                        regulator-always-on;
                };
        };
                ti,adc-channels = <4 5 6 7>;
        };
 };
+
+&mmc1 {
+       status = "okay";
+       vmmc-supply = <&vmmc_reg>;
+       bus-width = <4>;
+};
+
+&sham {
+       status = "okay";
+};
+
+&aes {
+       status = "okay";
+};
index 4f339fa91c5772b7eaaa4c9a306a1d6808387765..5f12b28dd5930e3f22ce015ed48160dcb4fc07dd 100644 (file)
                reg = <0x80000000 0x10000000>; /* 256 MB */
        };
 
-       am33xx_pinmux: pinmux@44e10800 {
-               pinctrl-names = "default";
-               pinctrl-0 = <&gpio_keys_s0 &clkout2_pin>;
-
-               user_leds_s0: user_leds_s0 {
-                       pinctrl-single,pins = <
-                               0x10 (PIN_OUTPUT_PULLDOWN | MUX_MODE7)  /* gpmc_ad4.gpio1_4 */
-                               0x14 (PIN_OUTPUT_PULLDOWN | MUX_MODE7)  /* gpmc_ad5.gpio1_5 */
-                               0x18 (PIN_OUTPUT_PULLDOWN | MUX_MODE7)  /* gpmc_ad6.gpio1_6 */
-                               0x1c (PIN_OUTPUT_PULLDOWN | MUX_MODE7)  /* gpmc_ad7.gpio1_7 */
-                       >;
-               };
-
-               gpio_keys_s0: gpio_keys_s0 {
-                       pinctrl-single,pins = <
-                               0x94 (PIN_INPUT_PULLDOWN | MUX_MODE7)   /* gpmc_oen_ren.gpio2_3 */
-                               0x90 (PIN_INPUT_PULLDOWN | MUX_MODE7)   /* gpmc_advn_ale.gpio2_2 */
-                               0x70 (PIN_INPUT_PULLDOWN | MUX_MODE7)   /* gpmc_wait0.gpio0_30 */
-                               0x9c (PIN_INPUT_PULLDOWN | MUX_MODE7)   /* gpmc_ben0_cle.gpio2_5 */
-                       >;
-               };
-
-               i2c0_pins: pinmux_i2c0_pins {
-                       pinctrl-single,pins = <
-                               0x188 (PIN_INPUT_PULLUP | MUX_MODE0)    /* i2c0_sda.i2c0_sda */
-                               0x18c (PIN_INPUT_PULLUP | MUX_MODE0)    /* i2c0_scl.i2c0_scl */
-                       >;
-               };
-
-               uart0_pins: pinmux_uart0_pins {
-                       pinctrl-single,pins = <
-                               0x170 (PIN_INPUT_PULLUP | MUX_MODE0)    /* uart0_rxd.uart0_rxd */
-                               0x174 (PIN_OUTPUT_PULLDOWN | MUX_MODE0)         /* uart0_txd.uart0_txd */
-                       >;
-               };
-
-               clkout2_pin: pinmux_clkout2_pin {
-                       pinctrl-single,pins = <
-                               0x1b4 (PIN_OUTPUT_PULLDOWN | MUX_MODE3)         /* xdma_event_intr1.clkout2 */
-                       >;
-               };
-
-               ecap2_pins: backlight_pins {
-                       pinctrl-single,pins = <
-                               0x19c 0x4       /* mcasp0_ahclkr.ecap2_in_pwm2_out MODE4 */
-                       >;
-               };
-
-               cpsw_default: cpsw_default {
-                       pinctrl-single,pins = <
-                               /* Slave 1 */
-                               0x114 (PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* mii1_txen.rgmii1_tctl */
-                               0x118 (PIN_INPUT_PULLDOWN | MUX_MODE2)  /* mii1_rxdv.rgmii1_rctl */
-                               0x11c (PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* mii1_txd3.rgmii1_td3 */
-                               0x120 (PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* mii1_txd2.rgmii1_td2 */
-                               0x124 (PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* mii1_txd1.rgmii1_td1 */
-                               0x128 (PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* mii1_txd0.rgmii1_td0 */
-                               0x12c (PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* mii1_txclk.rgmii1_tclk */
-                               0x130 (PIN_INPUT_PULLDOWN | MUX_MODE2)  /* mii1_rxclk.rgmii1_rclk */
-                               0x134 (PIN_INPUT_PULLDOWN | MUX_MODE2)  /* mii1_rxd3.rgmii1_rd3 */
-                               0x138 (PIN_INPUT_PULLDOWN | MUX_MODE2)  /* mii1_rxd2.rgmii1_rd2 */
-                               0x13c (PIN_INPUT_PULLDOWN | MUX_MODE2)  /* mii1_rxd1.rgmii1_rd1 */
-                               0x140 (PIN_INPUT_PULLDOWN | MUX_MODE2)  /* mii1_rxd0.rgmii1_rd0 */
-
-                               /* Slave 2 */
-                               0x40 (PIN_OUTPUT_PULLDOWN | MUX_MODE2)  /* gpmc_a0.rgmii2_tctl */
-                               0x44 (PIN_INPUT_PULLDOWN | MUX_MODE2)   /* gpmc_a1.rgmii2_rctl */
-                               0x48 (PIN_OUTPUT_PULLDOWN | MUX_MODE2)  /* gpmc_a2.rgmii2_td3 */
-                               0x4c (PIN_OUTPUT_PULLDOWN | MUX_MODE2)  /* gpmc_a3.rgmii2_td2 */
-                               0x50 (PIN_OUTPUT_PULLDOWN | MUX_MODE2)  /* gpmc_a4.rgmii2_td1 */
-                               0x54 (PIN_OUTPUT_PULLDOWN | MUX_MODE2)  /* gpmc_a5.rgmii2_td0 */
-                               0x58 (PIN_OUTPUT_PULLDOWN | MUX_MODE2)  /* gpmc_a6.rgmii2_tclk */
-                               0x5c (PIN_INPUT_PULLDOWN | MUX_MODE2)   /* gpmc_a7.rgmii2_rclk */
-                               0x60 (PIN_INPUT_PULLDOWN | MUX_MODE2)   /* gpmc_a8.rgmii2_rd3 */
-                               0x64 (PIN_INPUT_PULLDOWN | MUX_MODE2)   /* gpmc_a9.rgmii2_rd2 */
-                               0x68 (PIN_INPUT_PULLDOWN | MUX_MODE2)   /* gpmc_a10.rgmii2_rd1 */
-                               0x6c (PIN_INPUT_PULLDOWN | MUX_MODE2)   /* gpmc_a11.rgmii2_rd0 */
-                       >;
-               };
-
-               cpsw_sleep: cpsw_sleep {
-                       pinctrl-single,pins = <
-                               /* Slave 1 reset value */
-                               0x114 (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                               0x118 (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                               0x11c (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                               0x120 (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                               0x124 (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                               0x128 (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                               0x12c (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                               0x130 (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                               0x134 (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                               0x138 (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                               0x13c (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                               0x140 (PIN_INPUT_PULLDOWN | MUX_MODE7)
-
-                               /* Slave 2 reset value*/
-                               0x40 (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                               0x44 (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                               0x48 (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                               0x4c (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                               0x50 (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                               0x54 (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                               0x58 (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                               0x5c (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                               0x60 (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                               0x64 (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                               0x68 (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                               0x6c (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                       >;
-               };
-
-               davinci_mdio_default: davinci_mdio_default {
-                       pinctrl-single,pins = <
-                               /* MDIO */
-                               0x148 (PIN_INPUT_PULLUP | SLEWCTRL_FAST | MUX_MODE0)    /* mdio_data.mdio_data */
-                               0x14c (PIN_OUTPUT_PULLUP | MUX_MODE0)                   /* mdio_clk.mdio_clk */
-                       >;
-               };
-
-               davinci_mdio_sleep: davinci_mdio_sleep {
-                       pinctrl-single,pins = <
-                               /* MDIO reset value */
-                               0x148 (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                               0x14c (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                       >;
-               };
-       };
-
-       ocp {
-               uart0: serial@44e09000 {
-                       pinctrl-names = "default";
-                       pinctrl-0 = <&uart0_pins>;
-
-                       status = "okay";
-               };
-
-               i2c0: i2c@44e0b000 {
-                       pinctrl-names = "default";
-                       pinctrl-0 = <&i2c0_pins>;
-
-                       status = "okay";
-                       clock-frequency = <400000>;
-
-                       tps: tps@2d {
-                               reg = <0x2d>;
-                       };
-
-                       lis331dlh: lis331dlh@18 {
-                               compatible = "st,lis331dlh", "st,lis3lv02d";
-                               reg = <0x18>;
-                               Vdd-supply = <&lis3_reg>;
-                               Vdd_IO-supply = <&lis3_reg>;
-
-                               st,click-single-x;
-                               st,click-single-y;
-                               st,click-single-z;
-                               st,click-thresh-x = <10>;
-                               st,click-thresh-y = <10>;
-                               st,click-thresh-z = <10>;
-                               st,irq1-click;
-                               st,irq2-click;
-                               st,wakeup-x-lo;
-                               st,wakeup-x-hi;
-                               st,wakeup-y-lo;
-                               st,wakeup-y-hi;
-                               st,wakeup-z-lo;
-                               st,wakeup-z-hi;
-                               st,min-limit-x = <120>;
-                               st,min-limit-y = <120>;
-                               st,min-limit-z = <140>;
-                               st,max-limit-x = <550>;
-                               st,max-limit-y = <550>;
-                               st,max-limit-z = <750>;
-                       };
-               };
-
-               musb: usb@47400000 {
-                       status = "okay";
-
-                       control@44e10000 {
-                               status = "okay";
-                       };
-
-                       usb-phy@47401300 {
-                               status = "okay";
-                       };
-
-                       usb@47401000 {
-                               status = "okay";
-                       };
-               };
-
-               epwmss2: epwmss@48304000 {
-                       status = "okay";
-
-                       ecap2: ecap@48304100 {
-                               status = "okay";
-                               pinctrl-names = "default";
-                               pinctrl-0 = <&ecap2_pins>;
-                       };
-               };
-       };
-
        vbat: fixedregulator@0 {
                compatible = "regulator-fixed";
                regulator-name = "vbat";
        };
 };
 
+&am33xx_pinmux {
+       pinctrl-names = "default";
+       pinctrl-0 = <&gpio_keys_s0 &clkout2_pin>;
+
+       user_leds_s0: user_leds_s0 {
+               pinctrl-single,pins = <
+                       0x10 (PIN_OUTPUT_PULLDOWN | MUX_MODE7)  /* gpmc_ad4.gpio1_4 */
+                       0x14 (PIN_OUTPUT_PULLDOWN | MUX_MODE7)  /* gpmc_ad5.gpio1_5 */
+                       0x18 (PIN_OUTPUT_PULLDOWN | MUX_MODE7)  /* gpmc_ad6.gpio1_6 */
+                       0x1c (PIN_OUTPUT_PULLDOWN | MUX_MODE7)  /* gpmc_ad7.gpio1_7 */
+               >;
+       };
+
+       gpio_keys_s0: gpio_keys_s0 {
+               pinctrl-single,pins = <
+                       0x94 (PIN_INPUT_PULLDOWN | MUX_MODE7)   /* gpmc_oen_ren.gpio2_3 */
+                       0x90 (PIN_INPUT_PULLDOWN | MUX_MODE7)   /* gpmc_advn_ale.gpio2_2 */
+                       0x70 (PIN_INPUT_PULLDOWN | MUX_MODE7)   /* gpmc_wait0.gpio0_30 */
+                       0x9c (PIN_INPUT_PULLDOWN | MUX_MODE7)   /* gpmc_ben0_cle.gpio2_5 */
+               >;
+       };
+
+       i2c0_pins: pinmux_i2c0_pins {
+               pinctrl-single,pins = <
+                       0x188 (PIN_INPUT_PULLUP | MUX_MODE0)    /* i2c0_sda.i2c0_sda */
+                       0x18c (PIN_INPUT_PULLUP | MUX_MODE0)    /* i2c0_scl.i2c0_scl */
+               >;
+       };
+
+       uart0_pins: pinmux_uart0_pins {
+               pinctrl-single,pins = <
+                       0x170 (PIN_INPUT_PULLUP | MUX_MODE0)    /* uart0_rxd.uart0_rxd */
+                       0x174 (PIN_OUTPUT_PULLDOWN | MUX_MODE0)         /* uart0_txd.uart0_txd */
+               >;
+       };
+
+       clkout2_pin: pinmux_clkout2_pin {
+               pinctrl-single,pins = <
+                       0x1b4 (PIN_OUTPUT_PULLDOWN | MUX_MODE3)         /* xdma_event_intr1.clkout2 */
+               >;
+       };
+
+       ecap2_pins: backlight_pins {
+               pinctrl-single,pins = <
+                       0x19c 0x4       /* mcasp0_ahclkr.ecap2_in_pwm2_out MODE4 */
+               >;
+       };
+
+       cpsw_default: cpsw_default {
+               pinctrl-single,pins = <
+                       /* Slave 1 */
+                       0x114 (PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* mii1_txen.rgmii1_tctl */
+                       0x118 (PIN_INPUT_PULLDOWN | MUX_MODE2)  /* mii1_rxdv.rgmii1_rctl */
+                       0x11c (PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* mii1_txd3.rgmii1_td3 */
+                       0x120 (PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* mii1_txd2.rgmii1_td2 */
+                       0x124 (PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* mii1_txd1.rgmii1_td1 */
+                       0x128 (PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* mii1_txd0.rgmii1_td0 */
+                       0x12c (PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* mii1_txclk.rgmii1_tclk */
+                       0x130 (PIN_INPUT_PULLDOWN | MUX_MODE2)  /* mii1_rxclk.rgmii1_rclk */
+                       0x134 (PIN_INPUT_PULLDOWN | MUX_MODE2)  /* mii1_rxd3.rgmii1_rd3 */
+                       0x138 (PIN_INPUT_PULLDOWN | MUX_MODE2)  /* mii1_rxd2.rgmii1_rd2 */
+                       0x13c (PIN_INPUT_PULLDOWN | MUX_MODE2)  /* mii1_rxd1.rgmii1_rd1 */
+                       0x140 (PIN_INPUT_PULLDOWN | MUX_MODE2)  /* mii1_rxd0.rgmii1_rd0 */
+
+                       /* Slave 2 */
+                       0x40 (PIN_OUTPUT_PULLDOWN | MUX_MODE2)  /* gpmc_a0.rgmii2_tctl */
+                       0x44 (PIN_INPUT_PULLDOWN | MUX_MODE2)   /* gpmc_a1.rgmii2_rctl */
+                       0x48 (PIN_OUTPUT_PULLDOWN | MUX_MODE2)  /* gpmc_a2.rgmii2_td3 */
+                       0x4c (PIN_OUTPUT_PULLDOWN | MUX_MODE2)  /* gpmc_a3.rgmii2_td2 */
+                       0x50 (PIN_OUTPUT_PULLDOWN | MUX_MODE2)  /* gpmc_a4.rgmii2_td1 */
+                       0x54 (PIN_OUTPUT_PULLDOWN | MUX_MODE2)  /* gpmc_a5.rgmii2_td0 */
+                       0x58 (PIN_OUTPUT_PULLDOWN | MUX_MODE2)  /* gpmc_a6.rgmii2_tclk */
+                       0x5c (PIN_INPUT_PULLDOWN | MUX_MODE2)   /* gpmc_a7.rgmii2_rclk */
+                       0x60 (PIN_INPUT_PULLDOWN | MUX_MODE2)   /* gpmc_a8.rgmii2_rd3 */
+                       0x64 (PIN_INPUT_PULLDOWN | MUX_MODE2)   /* gpmc_a9.rgmii2_rd2 */
+                       0x68 (PIN_INPUT_PULLDOWN | MUX_MODE2)   /* gpmc_a10.rgmii2_rd1 */
+                       0x6c (PIN_INPUT_PULLDOWN | MUX_MODE2)   /* gpmc_a11.rgmii2_rd0 */
+               >;
+       };
+
+       cpsw_sleep: cpsw_sleep {
+               pinctrl-single,pins = <
+                       /* Slave 1 reset value */
+                       0x114 (PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       0x118 (PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       0x11c (PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       0x120 (PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       0x124 (PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       0x128 (PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       0x12c (PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       0x130 (PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       0x134 (PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       0x138 (PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       0x13c (PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       0x140 (PIN_INPUT_PULLDOWN | MUX_MODE7)
+
+                       /* Slave 2 reset value*/
+                       0x40 (PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       0x44 (PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       0x48 (PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       0x4c (PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       0x50 (PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       0x54 (PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       0x58 (PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       0x5c (PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       0x60 (PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       0x64 (PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       0x68 (PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       0x6c (PIN_INPUT_PULLDOWN | MUX_MODE7)
+               >;
+       };
+
+       davinci_mdio_default: davinci_mdio_default {
+               pinctrl-single,pins = <
+                       /* MDIO */
+                       0x148 (PIN_INPUT_PULLUP | SLEWCTRL_FAST | MUX_MODE0)    /* mdio_data.mdio_data */
+                       0x14c (PIN_OUTPUT_PULLUP | MUX_MODE0)                   /* mdio_clk.mdio_clk */
+               >;
+       };
+
+       davinci_mdio_sleep: davinci_mdio_sleep {
+               pinctrl-single,pins = <
+                       /* MDIO reset value */
+                       0x148 (PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       0x14c (PIN_INPUT_PULLDOWN | MUX_MODE7)
+               >;
+       };
+};
+
+&uart0 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&uart0_pins>;
+
+       status = "okay";
+};
+
+&i2c0 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&i2c0_pins>;
+
+       status = "okay";
+       clock-frequency = <400000>;
+
+       tps: tps@2d {
+               reg = <0x2d>;
+       };
+
+       lis331dlh: lis331dlh@18 {
+               compatible = "st,lis331dlh", "st,lis3lv02d";
+               reg = <0x18>;
+               Vdd-supply = <&lis3_reg>;
+               Vdd_IO-supply = <&lis3_reg>;
+
+               st,click-single-x;
+               st,click-single-y;
+               st,click-single-z;
+               st,click-thresh-x = <10>;
+               st,click-thresh-y = <10>;
+               st,click-thresh-z = <10>;
+               st,irq1-click;
+               st,irq2-click;
+               st,wakeup-x-lo;
+               st,wakeup-x-hi;
+               st,wakeup-y-lo;
+               st,wakeup-y-hi;
+               st,wakeup-z-lo;
+               st,wakeup-z-hi;
+               st,min-limit-x = <120>;
+               st,min-limit-y = <120>;
+               st,min-limit-z = <140>;
+               st,max-limit-x = <550>;
+               st,max-limit-y = <550>;
+               st,max-limit-z = <750>;
+       };
+};
+
+&usb {
+       status = "okay";
+
+       control@44e10000 {
+               status = "okay";
+       };
+
+       usb-phy@47401300 {
+               status = "okay";
+       };
+
+       usb@47401000 {
+               status = "okay";
+       };
+};
+
+&epwmss2 {
+       status = "okay";
+
+       ecap2: ecap@48304100 {
+               status = "okay";
+               pinctrl-names = "default";
+               pinctrl-0 = <&ecap2_pins>;
+       };
+};
+
 #include "tps65910.dtsi"
 
 &tps {
                };
 
                vmmc_reg: regulator@12 {
+                       regulator-min-microvolt = <1800000>;
+                       regulator-max-microvolt = <3300000>;
                        regulator-always-on;
                };
        };
        phy_id = <&davinci_mdio>, <1>;
        phy-mode = "rgmii-txid";
 };
+
+&mmc1 {
+       status = "okay";
+       vmmc-supply = <&vmmc_reg>;
+       bus-width = <4>;
+};
+
+&sham {
+       status = "okay";
+};
+
+&aes {
+       status = "okay";
+};
diff --git a/arch/arm/boot/dts/am335x-igep0033.dtsi b/arch/arm/boot/dts/am335x-igep0033.dtsi
new file mode 100644 (file)
index 0000000..06eba07
--- /dev/null
@@ -0,0 +1,265 @@
+/*
+ * am335x-igep0033.dtsi - Device Tree file for IGEP COM AQUILA AM335x
+ *
+ * Copyright (C) 2013 ISEE 2007 SL - http://www.isee.biz
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+/dts-v1/;
+
+#include "am33xx.dtsi"
+
+/ {
+       cpus {
+               cpu@0 {
+                       cpu0-supply = <&vdd1_reg>;
+               };
+       };
+
+       memory {
+               device_type = "memory";
+               reg = <0x80000000 0x10000000>; /* 256 MB */
+       };
+
+       leds {
+               pinctrl-names = "default";
+               pinctrl-0 = <&leds_pins>;
+
+               compatible = "gpio-leds";
+
+               led@0 {
+                       label = "com:green:user";
+                       gpios = <&gpio1 23 GPIO_ACTIVE_HIGH>;
+                       default-state = "on";
+               };
+       };
+
+       vbat: fixedregulator@0 {
+               compatible = "regulator-fixed";
+               regulator-name = "vbat";
+               regulator-min-microvolt = <5000000>;
+               regulator-max-microvolt = <5000000>;
+               regulator-boot-on;
+       };
+};
+
+&am33xx_pinmux {
+       i2c0_pins: pinmux_i2c0_pins {
+               pinctrl-single,pins = <
+                       0x188 (PIN_INPUT_PULLUP | MUX_MODE0)    /* i2c0_sda.i2c0_sda */
+                       0x18c (PIN_INPUT_PULLUP | MUX_MODE0)    /* i2c0_scl.i2c0_scl */
+               >;
+       };
+
+       nandflash_pins: pinmux_nandflash_pins {
+               pinctrl-single,pins = <
+                       0x0 (PIN_INPUT_PULLUP | MUX_MODE0)      /* gpmc_ad0.gpmc_ad0 */
+                       0x4 (PIN_INPUT_PULLUP | MUX_MODE0)      /* gpmc_ad1.gpmc_ad1 */
+                       0x8 (PIN_INPUT_PULLUP | MUX_MODE0)      /* gpmc_ad2.gpmc_ad2 */
+                       0xc (PIN_INPUT_PULLUP | MUX_MODE0)      /* gpmc_ad3.gpmc_ad3 */
+                       0x10 (PIN_INPUT_PULLUP | MUX_MODE0)     /* gpmc_ad4.gpmc_ad4 */
+                       0x14 (PIN_INPUT_PULLUP | MUX_MODE0)     /* gpmc_ad5.gpmc_ad5 */
+                       0x18 (PIN_INPUT_PULLUP | MUX_MODE0)     /* gpmc_ad6.gpmc_ad6 */
+                       0x1c (PIN_INPUT_PULLUP | MUX_MODE0)     /* gpmc_ad7.gpmc_ad7 */
+                       0x70 (PIN_INPUT_PULLUP | MUX_MODE0)     /* gpmc_wait0.gpmc_wait0 */
+                       0x74 (PIN_INPUT_PULLUP | MUX_MODE7)     /* gpmc_wpn.gpio0_30 */
+                       0x7c (PIN_OUTPUT | MUX_MODE0)           /* gpmc_csn0.gpmc_csn0 */
+                       0x90 (PIN_OUTPUT | MUX_MODE0)           /* gpmc_advn_ale.gpmc_advn_ale */
+                       0x94 (PIN_OUTPUT | MUX_MODE0)           /* gpmc_oen_ren.gpmc_oen_ren */
+                       0x98 (PIN_OUTPUT | MUX_MODE0)           /* gpmc_wen.gpmc_wen */
+                       0x9c (PIN_OUTPUT | MUX_MODE0)           /* gpmc_be0n_cle.gpmc_be0n_cle */
+               >;
+       };
+
+       uart0_pins: pinmux_uart0_pins {
+               pinctrl-single,pins = <
+                       0x170 (PIN_INPUT_PULLUP | MUX_MODE0)    /* uart0_rxd.uart0_rxd */
+                       0x174 (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* uart0_txd.uart0_txd */
+               >;
+       };
+
+       leds_pins: pinmux_leds_pins {
+               pinctrl-single,pins = <
+                       0x5c (PIN_OUTPUT_PULLDOWN | MUX_MODE7)  /* gpmc_a7.gpio1_23 */
+               >;
+       };
+};
+
+&cpsw_emac0 {
+       phy_id = <&davinci_mdio>, <0>;
+};
+
+&cpsw_emac1 {
+       phy_id = <&davinci_mdio>, <1>;
+};
+
+&elm {
+       status = "okay";
+};
+
+&gpmc {
+       status = "okay";
+       pinctrl-names = "default";
+       pinctrl-0 = <&nandflash_pins>;
+
+       ranges = <0 0 0x08000000 0x10000000>;   /* CS0: NAND */
+
+       nand@0,0 {
+               reg = <0 0 0>; /* CS0, offset 0 */
+               nand-bus-width = <8>;
+               ti,nand-ecc-opt = "bch8";
+               gpmc,device-nand = "true";
+               gpmc,device-width = <1>;
+               gpmc,sync-clk-ps = <0>;
+               gpmc,cs-on-ns = <0>;
+               gpmc,cs-rd-off-ns = <44>;
+               gpmc,cs-wr-off-ns = <44>;
+               gpmc,adv-on-ns = <6>;
+               gpmc,adv-rd-off-ns = <34>;
+               gpmc,adv-wr-off-ns = <44>;
+               gpmc,we-on-ns = <0>;
+               gpmc,we-off-ns = <40>;
+               gpmc,oe-on-ns = <0>;
+               gpmc,oe-off-ns = <54>;
+               gpmc,access-ns = <64>;
+               gpmc,rd-cycle-ns = <82>;
+               gpmc,wr-cycle-ns = <82>;
+               gpmc,wait-on-read = "true";
+               gpmc,wait-on-write = "true";
+               gpmc,bus-turnaround-ns = <0>;
+               gpmc,cycle2cycle-delay-ns = <0>;
+               gpmc,clk-activation-ns = <0>;
+               gpmc,wait-monitoring-ns = <0>;
+               gpmc,wr-access-ns = <40>;
+               gpmc,wr-data-mux-bus-ns = <0>;
+
+               #address-cells = <1>;
+               #size-cells = <1>;
+               elm_id = <&elm>;
+
+               /* MTD partition table */
+               partition@0 {
+                       label = "SPL";
+                       reg = <0x00000000 0x000080000>;
+               };
+
+               partition@1 {
+                       label = "U-boot";
+                       reg = <0x00080000 0x001e0000>;
+               };
+
+               partition@2 {
+                       label = "U-Boot Env";
+                       reg = <0x00260000 0x00020000>;
+               };
+
+               partition@3 {
+                       label = "Kernel";
+                       reg = <0x00280000 0x00500000>;
+               };
+
+               partition@4 {
+                       label = "File System";
+                       reg = <0x00780000 0x007880000>;
+               };
+       };
+};
+
+&i2c0 {
+       status = "okay";
+       pinctrl-names = "default";
+       pinctrl-0 = <&i2c0_pins>;
+
+       clock-frequency = <400000>;
+
+       tps: tps@2d {
+               reg = <0x2d>;
+       };
+};
+
+&uart0 {
+       status = "okay";
+       pinctrl-names = "default";
+       pinctrl-0 = <&uart0_pins>;
+};
+
+#include "tps65910.dtsi"
+
+&tps {
+       vcc1-supply = <&vbat>;
+       vcc2-supply = <&vbat>;
+       vcc3-supply = <&vbat>;
+       vcc4-supply = <&vbat>;
+       vcc5-supply = <&vbat>;
+       vcc6-supply = <&vbat>;
+       vcc7-supply = <&vbat>;
+       vccio-supply = <&vbat>;
+
+       regulators {
+               vrtc_reg: regulator@0 {
+                       regulator-always-on;
+               };
+
+               vio_reg: regulator@1 {
+                       regulator-always-on;
+               };
+
+               vdd1_reg: regulator@2 {
+                       /* VDD_MPU voltage limits 0.95V - 1.26V with +/-4% tolerance */
+                       regulator-name = "vdd_mpu";
+                       regulator-min-microvolt = <912500>;
+                       regulator-max-microvolt = <1312500>;
+                       regulator-boot-on;
+                       regulator-always-on;
+               };
+
+               vdd2_reg: regulator@3 {
+                       /* VDD_CORE voltage limits 0.95V - 1.1V with +/-4% tolerance */
+                       regulator-name = "vdd_core";
+                       regulator-min-microvolt = <912500>;
+                       regulator-max-microvolt = <1150000>;
+                       regulator-boot-on;
+                       regulator-always-on;
+               };
+
+               vdd3_reg: regulator@4 {
+                       regulator-always-on;
+               };
+
+               vdig1_reg: regulator@5 {
+                       regulator-always-on;
+               };
+
+               vdig2_reg: regulator@6 {
+                       regulator-always-on;
+               };
+
+               vpll_reg: regulator@7 {
+                       regulator-always-on;
+               };
+
+               vdac_reg: regulator@8 {
+                       regulator-always-on;
+               };
+
+               vaux1_reg: regulator@9 {
+                       regulator-always-on;
+               };
+
+               vaux2_reg: regulator@10 {
+                       regulator-always-on;
+               };
+
+               vaux33_reg: regulator@11 {
+                       regulator-always-on;
+               };
+
+               vmmc_reg: regulator@12 {
+                       regulator-always-on;
+               };
+       };
+};
+
index d76ae24c97453ff94ee9bc7232ed8283c8dbc01c..5b14a4307e1890e8000596d3920738ce16a2fd72 100644 (file)
@@ -30,6 +30,8 @@
                usb1 = &usb1;
                phy0 = &usb0_phy;
                phy1 = &usb1_phy;
+               ethernet0 = &cpsw_emac0;
+               ethernet1 = &cpsw_emac1;
        };
 
        cpus {
                };
        };
 
+       pmu {
+               compatible = "arm,cortex-a8-pmu";
+               interrupts = <3>;
+       };
+
        /*
         * The soc node represents the soc top level view. It is uses for IPs
         * that are not memory mapped in the MPU view or for the MPU itself.
                        reg = <0x48200000 0x1000>;
                };
 
+               edma: edma@49000000 {
+                       compatible = "ti,edma3";
+                       ti,hwmods = "tpcc", "tptc0", "tptc1", "tptc2";
+                       reg =   <0x49000000 0x10000>,
+                               <0x44e10f90 0x10>;
+                       interrupts = <12 13 14>;
+                       #dma-cells = <1>;
+                       dma-channels = <64>;
+                       ti,edma-regions = <4>;
+                       ti,edma-slots = <256>;
+               };
+
                gpio0: gpio@44e07000 {
                        compatible = "ti,omap4-gpio";
                        ti,hwmods = "gpio1";
                        gpio-controller;
                        #gpio-cells = <2>;
                        interrupt-controller;
-                       #interrupt-cells = <1>;
+                       #interrupt-cells = <2>;
                        reg = <0x44e07000 0x1000>;
                        interrupts = <96>;
                };
                        gpio-controller;
                        #gpio-cells = <2>;
                        interrupt-controller;
-                       #interrupt-cells = <1>;
+                       #interrupt-cells = <2>;
                        reg = <0x4804c000 0x1000>;
                        interrupts = <98>;
                };
                        gpio-controller;
                        #gpio-cells = <2>;
                        interrupt-controller;
-                       #interrupt-cells = <1>;
+                       #interrupt-cells = <2>;
                        reg = <0x481ac000 0x1000>;
                        interrupts = <32>;
                };
                        gpio-controller;
                        #gpio-cells = <2>;
                        interrupt-controller;
-                       #interrupt-cells = <1>;
+                       #interrupt-cells = <2>;
                        reg = <0x481ae000 0x1000>;
                        interrupts = <62>;
                };
                        status = "disabled";
                };
 
+               mmc1: mmc@48060000 {
+                       compatible = "ti,omap4-hsmmc";
+                       ti,hwmods = "mmc1";
+                       ti,dual-volt;
+                       ti,needs-special-reset;
+                       ti,needs-special-hs-handling;
+                       dmas = <&edma 24
+                               &edma 25>;
+                       dma-names = "tx", "rx";
+                       interrupts = <64>;
+                       interrupt-parent = <&intc>;
+                       reg = <0x48060000 0x1000>;
+                       status = "disabled";
+               };
+
+               mmc2: mmc@481d8000 {
+                       compatible = "ti,omap4-hsmmc";
+                       ti,hwmods = "mmc2";
+                       ti,needs-special-reset;
+                       dmas = <&edma 2
+                               &edma 3>;
+                       dma-names = "tx", "rx";
+                       interrupts = <28>;
+                       interrupt-parent = <&intc>;
+                       reg = <0x481d8000 0x1000>;
+                       status = "disabled";
+               };
+
+               mmc3: mmc@47810000 {
+                       compatible = "ti,omap4-hsmmc";
+                       ti,hwmods = "mmc3";
+                       ti,needs-special-reset;
+                       interrupts = <29>;
+                       interrupt-parent = <&intc>;
+                       reg = <0x47810000 0x1000>;
+                       status = "disabled";
+               };
+
                wdt2: wdt@44e35000 {
                        compatible = "ti,omap3-wdt";
                        ti,hwmods = "wd_timer2";
                        interrupts = <65>;
                        ti,spi-num-cs = <2>;
                        ti,hwmods = "spi0";
+                       dmas = <&edma 16
+                               &edma 17
+                               &edma 18
+                               &edma 19>;
+                       dma-names = "tx0", "rx0", "tx1", "rx1";
                        status = "disabled";
                };
 
                        interrupts = <125>;
                        ti,spi-num-cs = <2>;
                        ti,hwmods = "spi1";
+                       dmas = <&edma 42
+                               &edma 43
+                               &edma 44
+                               &edma 45>;
+                       dma-names = "tx0", "rx0", "tx1", "rx1";
                        status = "disabled";
                };
 
                        status = "disabled";
                };
 
+               lcdc: lcdc@4830e000 {
+                       compatible = "ti,am33xx-tilcdc";
+                       reg = <0x4830e000 0x1000>;
+                       interrupt-parent = <&intc>;
+                       interrupts = <36>;
+                       ti,hwmods = "lcdc";
+                       status = "disabled";
+               };
+
                tscadc: tscadc@44e0d000 {
                        compatible = "ti,am3359-tscadc";
                        reg = <0x44e0d000 0x1000>;
                        #size-cells = <1>;
                        status = "disabled";
                };
+
+               sham: sham@53100000 {
+                       compatible = "ti,omap4-sham";
+                       ti,hwmods = "sham";
+                       reg = <0x53100000 0x200>;
+                       interrupts = <109>;
+                       dmas = <&edma 36>;
+                       dma-names = "rx";
+               };
+
+               aes: aes@53500000 {
+                       compatible = "ti,omap4-aes";
+                       ti,hwmods = "aes";
+                       reg = <0x53500000 0xa0>;
+                       interrupts = <103>;
+                       dmas = <&edma 6>,
+                              <&edma 5>;
+                       dma-names = "tx", "rx";
+               };
        };
 };
index ddc1df77ac5261b5f5a6f4bcc84f69eb2c30dc0c..a403172430bc929bfc85977a2ca2364b90c4025f 100644 (file)
        };
 
        cpus {
+               #address-cells = <1>;
+               #size-cells = <0>;
                cpu@0 {
                        compatible = "arm,cortex-a9";
+                       device_type = "cpu";
+                       reg = <0>;
                };
        };
 
                        compatible = "ti,am4372-uart","ti,omap2-uart";
                        reg = <0x44e09000 0x2000>;
                        interrupts = <GIC_SPI 72 IRQ_TYPE_LEVEL_HIGH>;
+                       ti,hwmods = "uart1";
+               };
+
+               uart1: serial@48022000 {
+                       compatible = "ti,am4372-uart","ti,omap2-uart";
+                       reg = <0x48022000 0x2000>;
+                       interrupts = <GIC_SPI 73 IRQ_TYPE_LEVEL_HIGH>;
+                       ti,hwmods = "uart2";
+                       status = "disabled";
+               };
+
+               uart2: serial@48024000 {
+                       compatible = "ti,am4372-uart","ti,omap2-uart";
+                       reg = <0x48024000 0x2000>;
+                       interrupts = <GIC_SPI 74 IRQ_TYPE_LEVEL_HIGH>;
+                       ti,hwmods = "uart3";
+                       status = "disabled";
+               };
+
+               uart3: serial@481a6000 {
+                       compatible = "ti,am4372-uart","ti,omap2-uart";
+                       reg = <0x481a6000 0x2000>;
+                       interrupts = <GIC_SPI 44 IRQ_TYPE_LEVEL_HIGH>;
+                       ti,hwmods = "uart4";
+                       status = "disabled";
+               };
+
+               uart4: serial@481a8000 {
+                       compatible = "ti,am4372-uart","ti,omap2-uart";
+                       reg = <0x481a8000 0x2000>;
+                       interrupts = <GIC_SPI 45 IRQ_TYPE_LEVEL_HIGH>;
+                       ti,hwmods = "uart5";
+                       status = "disabled";
+               };
+
+               uart5: serial@481aa000 {
+                       compatible = "ti,am4372-uart","ti,omap2-uart";
+                       reg = <0x481aa000 0x2000>;
+                       interrupts = <GIC_SPI 46 IRQ_TYPE_LEVEL_HIGH>;
+                       ti,hwmods = "uart6";
+                       status = "disabled";
                };
 
                timer1: timer@44e31000 {
                        reg = <0x44e31000 0x400>;
                        interrupts = <GIC_SPI 67 IRQ_TYPE_LEVEL_HIGH>;
                        ti,timer-alwon;
+                       ti,hwmods = "timer1";
                };
 
                timer2: timer@48040000  {
                        compatible = "ti,am4372-timer","ti,am335x-timer";
                        reg = <0x48040000  0x400>;
                        interrupts = <GIC_SPI 68 IRQ_TYPE_LEVEL_HIGH>;
+                       ti,hwmods = "timer2";
+               };
+
+               timer3: timer@48042000 {
+                       compatible = "ti,am4372-timer","ti,am335x-timer";
+                       reg = <0x48042000 0x400>;
+                       interrupts = <GIC_SPI 69 IRQ_TYPE_LEVEL_HIGH>;
+                       ti,hwmods = "timer3";
+                       status = "disabled";
+               };
+
+               timer4: timer@48044000 {
+                       compatible = "ti,am4372-timer","ti,am335x-timer";
+                       reg = <0x48044000 0x400>;
+                       interrupts = <GIC_SPI 92 IRQ_TYPE_LEVEL_HIGH>;
+                       ti,timer-pwm;
+                       ti,hwmods = "timer4";
+                       status = "disabled";
+               };
+
+               timer5: timer@48046000 {
+                       compatible = "ti,am4372-timer","ti,am335x-timer";
+                       reg = <0x48046000 0x400>;
+                       interrupts = <GIC_SPI 93 IRQ_TYPE_LEVEL_HIGH>;
+                       ti,timer-pwm;
+                       ti,hwmods = "timer5";
+                       status = "disabled";
+               };
+
+               timer6: timer@48048000 {
+                       compatible = "ti,am4372-timer","ti,am335x-timer";
+                       reg = <0x48048000 0x400>;
+                       interrupts = <GIC_SPI 94 IRQ_TYPE_LEVEL_HIGH>;
+                       ti,timer-pwm;
+                       ti,hwmods = "timer6";
+                       status = "disabled";
+               };
+
+               timer7: timer@4804a000 {
+                       compatible = "ti,am4372-timer","ti,am335x-timer";
+                       reg = <0x4804a000 0x400>;
+                       interrupts = <GIC_SPI 95 IRQ_TYPE_LEVEL_HIGH>;
+                       ti,timer-pwm;
+                       ti,hwmods = "timer7";
+                       status = "disabled";
+               };
+
+               timer8: timer@481c1000 {
+                       compatible = "ti,am4372-timer","ti,am335x-timer";
+                       reg = <0x481c1000 0x400>;
+                       interrupts = <GIC_SPI 131 IRQ_TYPE_LEVEL_HIGH>;
+                       ti,hwmods = "timer8";
+                       status = "disabled";
+               };
+
+               timer9: timer@4833d000 {
+                       compatible = "ti,am4372-timer","ti,am335x-timer";
+                       reg = <0x4833d000 0x400>;
+                       interrupts = <GIC_SPI 132 IRQ_TYPE_LEVEL_HIGH>;
+                       ti,hwmods = "timer9";
+                       status = "disabled";
+               };
+
+               timer10: timer@4833f000 {
+                       compatible = "ti,am4372-timer","ti,am335x-timer";
+                       reg = <0x4833f000 0x400>;
+                       interrupts = <GIC_SPI 133 IRQ_TYPE_LEVEL_HIGH>;
+                       ti,hwmods = "timer10";
+                       status = "disabled";
+               };
+
+               timer11: timer@48341000 {
+                       compatible = "ti,am4372-timer","ti,am335x-timer";
+                       reg = <0x48341000 0x400>;
+                       interrupts = <GIC_SPI 134 IRQ_TYPE_LEVEL_HIGH>;
+                       ti,hwmods = "timer11";
+                       status = "disabled";
                };
 
                counter32k: counter@44e86000 {
                        compatible = "ti,am4372-counter32k","ti,omap-counter32k";
                        reg = <0x44e86000 0x40>;
+                       ti,hwmods = "counter_32k";
+               };
+
+               rtc@44e3e000 {
+                       compatible = "ti,am4372-rtc","ti,da830-rtc";
+                       reg = <0x44e3e000 0x1000>;
+                       interrupts = <GIC_SPI 75 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 76 IRQ_TYPE_LEVEL_HIGH>;
+                       ti,hwmods = "rtc";
+                       status = "disabled";
+               };
+
+               wdt@44e35000 {
+                       compatible = "ti,am4372-wdt","ti,omap3-wdt";
+                       reg = <0x44e35000 0x1000>;
+                       interrupts = <GIC_SPI 91 IRQ_TYPE_LEVEL_HIGH>;
+                       ti,hwmods = "wd_timer2";
+                       status = "disabled";
+               };
+
+               gpio0: gpio@44e07000 {
+                       compatible = "ti,am4372-gpio","ti,omap4-gpio";
+                       reg = <0x44e07000 0x1000>;
+                       interrupts = <GIC_SPI 96 IRQ_TYPE_LEVEL_HIGH>;
+                       gpio-controller;
+                       #gpio-cells = <2>;
+                       interrupt-controller;
+                       #interrupt-cells = <2>;
+                       ti,hwmods = "gpio1";
+                       status = "disabled";
+               };
+
+               gpio1: gpio@4804c000 {
+                       compatible = "ti,am4372-gpio","ti,omap4-gpio";
+                       reg = <0x4804c000 0x1000>;
+                       interrupts = <GIC_SPI 98 IRQ_TYPE_LEVEL_HIGH>;
+                       gpio-controller;
+                       #gpio-cells = <2>;
+                       interrupt-controller;
+                       #interrupt-cells = <2>;
+                       ti,hwmods = "gpio2";
+                       status = "disabled";
+               };
+
+               gpio2: gpio@481ac000 {
+                       compatible = "ti,am4372-gpio","ti,omap4-gpio";
+                       reg = <0x481ac000 0x1000>;
+                       interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>;
+                       gpio-controller;
+                       #gpio-cells = <2>;
+                       interrupt-controller;
+                       #interrupt-cells = <2>;
+                       ti,hwmods = "gpio3";
+                       status = "disabled";
+               };
+
+               gpio3: gpio@481ae000 {
+                       compatible = "ti,am4372-gpio","ti,omap4-gpio";
+                       reg = <0x481ae000 0x1000>;
+                       interrupts = <GIC_SPI 62 IRQ_TYPE_LEVEL_HIGH>;
+                       gpio-controller;
+                       #gpio-cells = <2>;
+                       interrupt-controller;
+                       #interrupt-cells = <2>;
+                       ti,hwmods = "gpio4";
+                       status = "disabled";
+               };
+
+               gpio4: gpio@48320000 {
+                       compatible = "ti,am4372-gpio","ti,omap4-gpio";
+                       reg = <0x48320000 0x1000>;
+                       interrupts = <GIC_SPI 106 IRQ_TYPE_LEVEL_HIGH>;
+                       gpio-controller;
+                       #gpio-cells = <2>;
+                       interrupt-controller;
+                       #interrupt-cells = <2>;
+                       ti,hwmods = "gpio5";
+                       status = "disabled";
+               };
+
+               gpio5: gpio@48322000 {
+                       compatible = "ti,am4372-gpio","ti,omap4-gpio";
+                       reg = <0x48322000 0x1000>;
+                       interrupts = <GIC_SPI 148 IRQ_TYPE_LEVEL_HIGH>;
+                       gpio-controller;
+                       #gpio-cells = <2>;
+                       interrupt-controller;
+                       #interrupt-cells = <2>;
+                       ti,hwmods = "gpio6";
+                       status = "disabled";
+               };
+
+               i2c0: i2c@44e0b000 {
+                       compatible = "ti,am4372-i2c","ti,omap4-i2c";
+                       reg = <0x44e0b000 0x1000>;
+                       interrupts = <GIC_SPI 70 IRQ_TYPE_LEVEL_HIGH>;
+                       ti,hwmods = "i2c1";
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       status = "disabled";
+               };
+
+               i2c1: i2c@4802a000 {
+                       compatible = "ti,am4372-i2c","ti,omap4-i2c";
+                       reg = <0x4802a000 0x1000>;
+                       interrupts = <GIC_SPI 71 IRQ_TYPE_LEVEL_HIGH>;
+                       ti,hwmods = "i2c2";
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       status = "disabled";
+               };
+
+               i2c2: i2c@4819c000 {
+                       compatible = "ti,am4372-i2c","ti,omap4-i2c";
+                       reg = <0x4819c000 0x1000>;
+                       interrupts = <GIC_SPI 30 IRQ_TYPE_LEVEL_HIGH>;
+                       ti,hwmods = "i2c3";
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       status = "disabled";
+               };
+
+               spi0: spi@48030000 {
+                       compatible = "ti,am4372-mcspi","ti,omap4-mcspi";
+                       reg = <0x48030000 0x400>;
+                       interrupts = <GIC_SPI 65 IRQ_TYPE_LEVEL_HIGH>;
+                       ti,hwmods = "spi0";
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       status = "disabled";
+               };
+
+               spi1: spi@481a0000 {
+                       compatible = "ti,am4372-mcspi","ti,omap4-mcspi";
+                       reg = <0x481a0000 0x400>;
+                       interrupts = <GIC_SPI 125 IRQ_TYPE_LEVEL_HIGH>;
+                       ti,hwmods = "spi1";
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       status = "disabled";
+               };
+
+               spi2: spi@481a2000 {
+                       compatible = "ti,am4372-mcspi","ti,omap4-mcspi";
+                       reg = <0x481a2000 0x400>;
+                       interrupts = <GIC_SPI 126 IRQ_TYPE_LEVEL_HIGH>;
+                       ti,hwmods = "spi2";
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       status = "disabled";
+               };
+
+               spi3: spi@481a4000 {
+                       compatible = "ti,am4372-mcspi","ti,omap4-mcspi";
+                       reg = <0x481a4000 0x400>;
+                       interrupts = <GIC_SPI 136 IRQ_TYPE_LEVEL_HIGH>;
+                       ti,hwmods = "spi3";
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       status = "disabled";
+               };
+
+               spi4: spi@48345000 {
+                       compatible = "ti,am4372-mcspi","ti,omap4-mcspi";
+                       reg = <0x48345000 0x400>;
+                       interrupts = <GIC_SPI 137 IRQ_TYPE_LEVEL_HIGH>;
+                       ti,hwmods = "spi4";
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       status = "disabled";
+               };
+
+               mac: ethernet@4a100000 {
+                       compatible = "ti,am4372-cpsw","ti,cpsw";
+                       reg = <0x4a100000 0x800
+                              0x4a101200 0x100>;
+                       interrupts = <GIC_SPI 40 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 41 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 42 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 43 IRQ_TYPE_LEVEL_HIGH>;
+                       ti,hwmods = "cpgmac0";
+                       status = "disabled";
+               };
+
+               epwmss0: epwmss@48300000 {
+                       compatible = "ti,am4372-pwmss","ti,am33xx-pwmss";
+                       reg = <0x48300000 0x10>;
+                       ti,hwmods = "epwmss0";
+                       status = "disabled";
+               };
+
+               epwmss1: epwmss@48302000 {
+                       compatible = "ti,am4372-pwmss","ti,am33xx-pwmss";
+                       reg = <0x48302000 0x10>;
+                       ti,hwmods = "epwmss1";
+                       status = "disabled";
+               };
+
+               epwmss2: epwmss@48304000 {
+                       compatible = "ti,am4372-pwmss","ti,am33xx-pwmss";
+                       reg = <0x48304000 0x10>;
+                       ti,hwmods = "epwmss2";
+                       status = "disabled";
+               };
+
+               epwmss3: epwmss@48306000 {
+                       compatible = "ti,am4372-pwmss","ti,am33xx-pwmss";
+                       reg = <0x48306000 0x10>;
+                       ti,hwmods = "epwmss3";
+                       status = "disabled";
+               };
+
+               epwmss4: epwmss@48308000 {
+                       compatible = "ti,am4372-pwmss","ti,am33xx-pwmss";
+                       reg = <0x48308000 0x10>;
+                       ti,hwmods = "epwmss4";
+                       status = "disabled";
+               };
+
+               epwmss5: epwmss@4830a000 {
+                       compatible = "ti,am4372-pwmss","ti,am33xx-pwmss";
+                       reg = <0x4830a000 0x10>;
+                       ti,hwmods = "epwmss5";
+                       status = "disabled";
+               };
+
+               aes: aes@53501000 {
+                       compatible = "ti,omap4-aes";
+                       ti,hwmods = "aes";
+                       reg = <0x53501000 0xa0>;
+                       interrupts = <GIC_SPI 103 IRQ_TYPE_LEVEL_HIGH>;
+               };
+
+               des: des@53701000 {
+                       compatible = "ti,omap4-des";
+                       ti,hwmods = "des";
+                       reg = <0x53701000 0xa0>;
+                       interrupts = <GIC_SPI 130 IRQ_TYPE_LEVEL_HIGH>;
                };
        };
 };
index 1de2dae0fdae6f6353169dc423d75e07d4f65f6f..534e1be80df201713718bf5f072061e3a5a1f8c1 100644 (file)
                                #interrupt-cells = <1>;
                                #size-cells = <1>;
                                interrupt-controller;
+                               msi-controller;
                        };
 
                        coherency-fabric@20200 {
 
                        i2c0: i2c@11000 {
                                compatible = "marvell,mv64xxx-i2c";
-                               reg = <0x11000 0x20>;
                                #address-cells = <1>;
                                #size-cells = <0>;
                                interrupts = <31>;
 
                        i2c1: i2c@11100 {
                                compatible = "marvell,mv64xxx-i2c";
-                               reg = <0x11100 0x20>;
                                #address-cells = <1>;
                                #size-cells = <0>;
                                interrupts = <32>;
index e134d7a90c9ab9a5d24bfb500ed9206875f8f033..7a4b82e71aaf399eec2dc461656826e2fdad738a 100644 (file)
@@ -44,6 +44,7 @@
                        #address-cells = <3>;
                        #size-cells = <2>;
 
+                       msi-parent = <&mpic>;
                        bus-range = <0x00 0xff>;
 
                        ranges =
                                };
                        };
 
+                       i2c0: i2c@11000 {
+                               reg = <0x11000 0x20>;
+                       };
+
+                       i2c1: i2c@11100 {
+                               reg = <0x11100 0x20>;
+                       };
+
                        usb@50000 {
                                clocks = <&coreclk 0>;
                        };
diff --git a/arch/arm/boot/dts/armada-xp-matrix.dts b/arch/arm/boot/dts/armada-xp-matrix.dts
new file mode 100644 (file)
index 0000000..e47c49e
--- /dev/null
@@ -0,0 +1,75 @@
+/*
+ * Device Tree file for Marvell Armada XP Matrix board
+ *
+ * Copyright (C) 2013 Marvell
+ *
+ * Lior Amsalem <alior@marvell.com>
+ *
+ * This file is licensed under the terms of the GNU General Public
+ * License version 2.  This program is licensed "as is" without any
+ * warranty of any kind, whether express or implied.
+ */
+
+/dts-v1/;
+#include "armada-xp-mv78460.dtsi"
+
+/ {
+       model = "Marvell Armada XP Matrix Board";
+       compatible = "marvell,axp-matrix", "marvell,armadaxp-mv78460", "marvell,armadaxp", "marvell,armada-370-xp";
+
+       chosen {
+               bootargs = "console=ttyS0,115200 earlyprintk";
+       };
+
+       memory {
+               device_type = "memory";
+               reg = <0 0x00000000 0 0x80000000>; /* 2 GB */
+       };
+
+       soc {
+               ranges = <MBUS_ID(0xf0, 0x01) 0 0 0xf1000000 0x100000
+                         MBUS_ID(0x01, 0x1d) 0 0 0xfff00000 0x100000>;
+
+               internal-regs {
+                       serial@12000 {
+                               clock-frequency = <250000000>;
+                               status = "okay";
+                       };
+                       serial@12100 {
+                               clock-frequency = <250000000>;
+                               status = "okay";
+                       };
+                       serial@12200 {
+                               clock-frequency = <250000000>;
+                               status = "okay";
+                       };
+                       serial@12300 {
+                               clock-frequency = <250000000>;
+                               status = "okay";
+                       };
+
+                       sata@a0000 {
+                               nr-ports = <2>;
+                               status = "okay";
+                       };
+
+                       ethernet@30000 {
+                               status = "okay";
+                               phy-mode = "sgmii";
+                       };
+
+                       pcie-controller {
+                               status = "okay";
+
+                               pcie@1,0 {
+                                       /* Port 0, Lane 0 */
+                                       status = "okay";
+                               };
+                       };
+
+                       usb@50000 {
+                               status = "okay";
+                       };
+               };
+       };
+};
index 0358a33cba489d40c97fda0a1bd7cb5769ade9b8..3f5e6121c730a21ae2079acff268da2be20518ef 100644 (file)
@@ -57,6 +57,7 @@
                        #address-cells = <3>;
                        #size-cells = <2>;
 
+                       msi-parent = <&mpic>;
                        bus-range = <0x00 0xff>;
 
                        ranges =
index 0e82c5062243f2d20f608bbc36d80faf37645abd..3e9fd1353f895d6778972e95518850268ef6eb4e 100644 (file)
@@ -58,6 +58,7 @@
                        #address-cells = <3>;
                        #size-cells = <2>;
 
+                       msi-parent = <&mpic>;
                        bus-range = <0x00 0xff>;
 
                        ranges =
index e82c1b80af171e3915b6e09f95bfb9078d0b0201..31ba6d8fbadf8803f28aca6312c8205c79c23aee 100644 (file)
@@ -74,6 +74,7 @@
                        #address-cells = <3>;
                        #size-cells = <2>;
 
+                       msi-parent = <&mpic>;
                        bus-range = <0x00 0xff>;
 
                        ranges =
index 3058522f5aad2929092f7f7bcc2dd78a9c62c22a..281c6447e87272c0df44f89da6489876b8c9ade8 100644 (file)
                                };
                        };
 
+                       i2c0: i2c@11000 {
+                               compatible = "marvell,mv78230-i2c", "marvell,mv64xxx-i2c";
+                               reg = <0x11000 0x100>;
+                       };
+
+                       i2c1: i2c@11100 {
+                               compatible = "marvell,mv78230-i2c", "marvell,mv64xxx-i2c";
+                               reg = <0x11100 0x100>;
+                       };
+
                        usb@50000 {
                                clocks = <&gateclk 18>;
                        };
index 137354689ad0a6dfdd08d07b348cd8cf08705e42..cb2c010e08e21fd5bd5b871aa3d3e496ffc0005e 100644 (file)
@@ -96,7 +96,6 @@
                        };
 
                        spi0: spi@fffc8000 {
-                               status = "okay";
                                cs-gpios = <0>, <&pioC 11 0>, <0>, <0>;
                                mtd_dataflash@0 {
                                        compatible = "atmel,at45", "atmel,dataflash";
index b4ec6fe53fc798e4469ca772a3ff6d02e86eba32..17b879990914c8643bfc63cb98b634c112f4f454 100644 (file)
@@ -7,6 +7,8 @@
  */
 
 #include "at91sam9x5.dtsi"
+#include "at91sam9x5_usart3.dtsi"
+#include "at91sam9x5_macb0.dtsi"
 
 / {
        model = "Atmel AT91SAM9G25 SoC";
index bebf9f55614b50c27edb1a1dd42fb7b3ae6c54de..e35c2fcf82985fabcbc1150510db2b3eedd58daa 100644 (file)
@@ -7,6 +7,7 @@
  */
 
 #include "at91sam9x5.dtsi"
+#include "at91sam9x5_macb0.dtsi"
 
 / {
        model = "Atmel AT91SAM9G35 SoC";
index 9fb7ffd32af26cd9ab7d959f7e1641b2937e050a..6224f9fe2f2b7205f32a3205ff78d0b31036ad09 100644 (file)
                                compatible = "atmel,at91sam9g45-ssc";
                                reg = <0xf0010000 0x4000>;
                                interrupts = <28 IRQ_TYPE_LEVEL_HIGH 5>;
+                               dmas = <&dma 0 AT91_DMA_CFG_PER_ID(21)>,
+                                      <&dma 0 AT91_DMA_CFG_PER_ID(22)>;
+                               dma-names = "tx", "rx";
                                pinctrl-names = "default";
                                pinctrl-0 = <&pinctrl_ssc0_tx &pinctrl_ssc0_rx>;
                                status = "disabled";
index 27a9352b9d7a02e047303a2fb72bb47a5ec9f0c8..e9487f6f01660409ee193649d3c1d56c98376cb5 100644 (file)
                                status = "okay";
                        };
 
+                       ssc0: ssc@f0010000 {
+                               status = "okay";
+                       };
+
                        i2c0: i2c@f8010000 {
                                status = "okay";
 
+                               wm8904: codec@1a {
+                                       compatible = "wm8904";
+                                       reg = <0x1a>;
+                               };
+
                                qt1070: keyboard@1b {
                                        compatible = "qt1070";
                                        reg = <0x1b>;
                                                        <AT91_PIOA 2 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP_DEGLITCH>;
                                        };
                                };
+
+                               sound {
+                                       pinctrl_pck0_as_audio_mck: pck0_as_audio_mck {
+                                               atmel,pins =
+                                                       <AT91_PIOB 10 AT91_PERIPH_B AT91_PINCTRL_NONE>;
+                                       };
+                               };
                        };
 
                        spi0: spi@f0000000 {
                        gpio-key,wakeup;
                };
        };
+
+       sound {
+               compatible = "atmel,asoc-wm8904";
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_pck0_as_audio_mck>;
+
+               atmel,model = "wm8904 @ AT91SAM9N12";
+               atmel,audio-routing =
+                       "Headphone Jack", "HPOUTL",
+                       "Headphone Jack", "HPOUTR",
+                       "IN2L", "Line In Jack",
+                       "IN2R", "Line In Jack",
+                       "Mic", "MICBIAS",
+                       "IN1L", "Mic";
+
+               atmel,ssc-controller = <&ssc0>;
+               atmel,audio-codec = <&wm8904>;
+       };
 };
index 49e94aba938ff65f5827e1f56bd17fcde898fd38..c2554219f7a4eb736c2f46f6ce36175311d5d530 100644 (file)
@@ -7,6 +7,9 @@
  */
 
 #include "at91sam9x5.dtsi"
+#include "at91sam9x5_usart3.dtsi"
+#include "at91sam9x5_macb0.dtsi"
+#include "at91sam9x5_macb1.dtsi"
 
 / {
        model = "Atmel AT91SAM9X25 SoC";
                                       0x80000000 0xfffd0000 0xb83fffff  /* pioC */
                                       0x003fffff 0x003f8000 0x00000000  /* pioD */
                                      >;
-
-                               macb1 {
-                                       pinctrl_macb1_rmii: macb1_rmii-0 {
-                                               atmel,pins =
-                                                       <AT91_PIOC 16 AT91_PERIPH_B AT91_PINCTRL_NONE   /* PC16 periph B */
-                                                        AT91_PIOC 18 AT91_PERIPH_B AT91_PINCTRL_NONE   /* PC18 periph B */
-                                                        AT91_PIOC 19 AT91_PERIPH_B AT91_PINCTRL_NONE   /* PC19 periph B */
-                                                        AT91_PIOC 20 AT91_PERIPH_B AT91_PINCTRL_NONE   /* PC20 periph B */
-                                                        AT91_PIOC 21 AT91_PERIPH_B AT91_PINCTRL_NONE   /* PC21 periph B */
-                                                        AT91_PIOC 27 AT91_PERIPH_B AT91_PINCTRL_NONE   /* PC27 periph B */
-                                                        AT91_PIOC 28 AT91_PERIPH_B AT91_PINCTRL_NONE   /* PC28 periph B */
-                                                        AT91_PIOC 29 AT91_PERIPH_B AT91_PINCTRL_NONE   /* PC29 periph B */
-                                                        AT91_PIOC 30 AT91_PERIPH_B AT91_PINCTRL_NONE   /* PC30 periph B */
-                                                        AT91_PIOC 31 AT91_PERIPH_B AT91_PINCTRL_NONE>; /* PC31 periph B */
-                                       };
-                               };
-                       };
-
-                       macb1: ethernet@f8030000 {
-                               pinctrl-names = "default";
-                               pinctrl-0 = <&pinctrl_macb1_rmii>;
                        };
                };
        };
index 1a3d525a1f5d43b5f49f9183b6ce6a41b359b6ee..8eac66ce0ab7766f76476d836488f7374f1b4a90 100644 (file)
@@ -7,6 +7,7 @@
  */
 
 #include "at91sam9x5.dtsi"
+#include "at91sam9x5_macb0.dtsi"
 
 / {
        model = "Atmel AT91SAM9X35 SoC";
index e74dc15efa9d2f77fa339a16b975f42566ca726e..40267a116c3c44438d7d915e10c9d119a4577540 100644 (file)
                                        };
                                };
 
-                               usart3 {
-                                       pinctrl_usart3: usart3-0 {
-                                               atmel,pins =
-                                                       <AT91_PIOC 22 AT91_PERIPH_B AT91_PINCTRL_PULL_UP        /* PC22 periph B with pullup */
-                                                        AT91_PIOC 23 AT91_PERIPH_B AT91_PINCTRL_NONE>; /* PC23 periph B */
-                                       };
-
-                                       pinctrl_usart3_rts: usart3_rts-0 {
-                                               atmel,pins =
-                                                       <AT91_PIOC 24 AT91_PERIPH_B AT91_PINCTRL_NONE>; /* PC24 periph B */
-                                       };
-
-                                       pinctrl_usart3_cts: usart3_cts-0 {
-                                               atmel,pins =
-                                                       <AT91_PIOC 25 AT91_PERIPH_B AT91_PINCTRL_NONE>; /* PC25 periph B */
-                                       };
-
-                                       pinctrl_usart3_sck: usart3_sck-0 {
-                                               atmel,pins =
-                                                       <AT91_PIOC 26 AT91_PERIPH_B AT91_PINCTRL_NONE>; /* PC26 periph B */
-                                       };
-                               };
-
                                uart0 {
                                        pinctrl_uart0: uart0-0 {
                                                atmel,pins =
                                        };
                                };
 
-                               macb0 {
-                                       pinctrl_macb0_rmii: macb0_rmii-0 {
-                                               atmel,pins =
-                                                       <AT91_PIOB 0 AT91_PERIPH_A AT91_PINCTRL_NONE    /* PB0 periph A */
-                                                        AT91_PIOB 1 AT91_PERIPH_A AT91_PINCTRL_NONE    /* PB1 periph A */
-                                                        AT91_PIOB 2 AT91_PERIPH_A AT91_PINCTRL_NONE    /* PB2 periph A */
-                                                        AT91_PIOB 3 AT91_PERIPH_A AT91_PINCTRL_NONE    /* PB3 periph A */
-                                                        AT91_PIOB 4 AT91_PERIPH_A AT91_PINCTRL_NONE    /* PB4 periph A */
-                                                        AT91_PIOB 5 AT91_PERIPH_A AT91_PINCTRL_NONE    /* PB5 periph A */
-                                                        AT91_PIOB 6 AT91_PERIPH_A AT91_PINCTRL_NONE    /* PB6 periph A */
-                                                        AT91_PIOB 7 AT91_PERIPH_A AT91_PINCTRL_NONE    /* PB7 periph A */
-                                                        AT91_PIOB 9 AT91_PERIPH_A AT91_PINCTRL_NONE    /* PB9 periph A */
-                                                        AT91_PIOB 10 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PB10 periph A */
-                                       };
-
-                                       pinctrl_macb0_rmii_mii: macb0_rmii_mii-0 {
-                                               atmel,pins =
-                                                       <AT91_PIOB 8 AT91_PERIPH_A AT91_PINCTRL_NONE    /* PB8 periph A */
-                                                        AT91_PIOB 11 AT91_PERIPH_A AT91_PINCTRL_NONE   /* PB11 periph A */
-                                                        AT91_PIOB 12 AT91_PERIPH_A AT91_PINCTRL_NONE   /* PB12 periph A */
-                                                        AT91_PIOB 13 AT91_PERIPH_A AT91_PINCTRL_NONE   /* PB13 periph A */
-                                                        AT91_PIOB 14 AT91_PERIPH_A AT91_PINCTRL_NONE   /* PB14 periph A */
-                                                        AT91_PIOB 15 AT91_PERIPH_A AT91_PINCTRL_NONE   /* PB15 periph A */
-                                                        AT91_PIOB 16 AT91_PERIPH_A AT91_PINCTRL_NONE   /* PB16 periph A */
-                                                        AT91_PIOB 17 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PB17 periph A */
-                                       };
-                               };
-
                                mmc0 {
                                        pinctrl_mmc0_slot0_clk_cmd_dat0: mmc0_slot0_clk_cmd_dat0-0 {
                                                atmel,pins =
                                status = "disabled";
                        };
 
-                       macb0: ethernet@f802c000 {
-                               compatible = "cdns,at32ap7000-macb", "cdns,macb";
-                               reg = <0xf802c000 0x100>;
-                               interrupts = <24 IRQ_TYPE_LEVEL_HIGH 3>;
-                               pinctrl-names = "default";
-                               pinctrl-0 = <&pinctrl_macb0_rmii>;
-                               status = "disabled";
-                       };
-
-                       macb1: ethernet@f8030000 {
-                               compatible = "cdns,at32ap7000-macb", "cdns,macb";
-                               reg = <0xf8030000 0x100>;
-                               interrupts = <27 IRQ_TYPE_LEVEL_HIGH 3>;
-                               status = "disabled";
-                       };
-
                        i2c0: i2c@f8010000 {
                                compatible = "atmel,at91sam9x5-i2c";
                                reg = <0xf8010000 0x100>;
diff --git a/arch/arm/boot/dts/at91sam9x5_macb0.dtsi b/arch/arm/boot/dts/at91sam9x5_macb0.dtsi
new file mode 100644 (file)
index 0000000..55731ff
--- /dev/null
@@ -0,0 +1,56 @@
+/*
+ * at91sam9x5_macb0.dtsi - Device Tree Include file for AT91SAM9x5 SoC with 1
+ * Ethernet interface.
+ *
+ * Copyright (C) 2013 Boris BREZILLON <b.brezillon@overkiz.com>
+ *
+ * Licensed under GPLv2.
+ */
+
+#include <dt-bindings/pinctrl/at91.h>
+#include <dt-bindings/interrupt-controller/irq.h>
+
+/ {
+       ahb {
+               apb {
+                       pinctrl@fffff400 {
+                               macb0 {
+                                       pinctrl_macb0_rmii: macb0_rmii-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOB 0 AT91_PERIPH_A AT91_PINCTRL_NONE    /* PB0 periph A */
+                                                        AT91_PIOB 1 AT91_PERIPH_A AT91_PINCTRL_NONE    /* PB1 periph A */
+                                                        AT91_PIOB 2 AT91_PERIPH_A AT91_PINCTRL_NONE    /* PB2 periph A */
+                                                        AT91_PIOB 3 AT91_PERIPH_A AT91_PINCTRL_NONE    /* PB3 periph A */
+                                                        AT91_PIOB 4 AT91_PERIPH_A AT91_PINCTRL_NONE    /* PB4 periph A */
+                                                        AT91_PIOB 5 AT91_PERIPH_A AT91_PINCTRL_NONE    /* PB5 periph A */
+                                                        AT91_PIOB 6 AT91_PERIPH_A AT91_PINCTRL_NONE    /* PB6 periph A */
+                                                        AT91_PIOB 7 AT91_PERIPH_A AT91_PINCTRL_NONE    /* PB7 periph A */
+                                                        AT91_PIOB 9 AT91_PERIPH_A AT91_PINCTRL_NONE    /* PB9 periph A */
+                                                        AT91_PIOB 10 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PB10 periph A */
+                                       };
+
+                                       pinctrl_macb0_rmii_mii: macb0_rmii_mii-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOB 8 AT91_PERIPH_A AT91_PINCTRL_NONE    /* PB8 periph A */
+                                                        AT91_PIOB 11 AT91_PERIPH_A AT91_PINCTRL_NONE   /* PB11 periph A */
+                                                        AT91_PIOB 12 AT91_PERIPH_A AT91_PINCTRL_NONE   /* PB12 periph A */
+                                                        AT91_PIOB 13 AT91_PERIPH_A AT91_PINCTRL_NONE   /* PB13 periph A */
+                                                        AT91_PIOB 14 AT91_PERIPH_A AT91_PINCTRL_NONE   /* PB14 periph A */
+                                                        AT91_PIOB 15 AT91_PERIPH_A AT91_PINCTRL_NONE   /* PB15 periph A */
+                                                        AT91_PIOB 16 AT91_PERIPH_A AT91_PINCTRL_NONE   /* PB16 periph A */
+                                                        AT91_PIOB 17 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PB17 periph A */
+                                       };
+                               };
+                       };
+
+                       macb0: ethernet@f802c000 {
+                               compatible = "cdns,at32ap7000-macb", "cdns,macb";
+                               reg = <0xf802c000 0x100>;
+                               interrupts = <24 IRQ_TYPE_LEVEL_HIGH 3>;
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&pinctrl_macb0_rmii>;
+                               status = "disabled";
+                       };
+               };
+       };
+};
diff --git a/arch/arm/boot/dts/at91sam9x5_macb1.dtsi b/arch/arm/boot/dts/at91sam9x5_macb1.dtsi
new file mode 100644 (file)
index 0000000..77425a6
--- /dev/null
@@ -0,0 +1,44 @@
+/*
+ * at91sam9x5_macb1.dtsi - Device Tree Include file for AT91SAM9x5 SoC with 2
+ * Ethernet interfaces.
+ *
+ * Copyright (C) 2013 Boris BREZILLON <b.brezillon@overkiz.com>
+ *
+ * Licensed under GPLv2.
+ */
+
+#include <dt-bindings/pinctrl/at91.h>
+#include <dt-bindings/interrupt-controller/irq.h>
+
+/ {
+       ahb {
+               apb {
+                       pinctrl@fffff400 {
+                               macb1 {
+                                       pinctrl_macb1_rmii: macb1_rmii-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOC 16 AT91_PERIPH_B AT91_PINCTRL_NONE   /* PC16 periph B */
+                                                        AT91_PIOC 18 AT91_PERIPH_B AT91_PINCTRL_NONE   /* PC18 periph B */
+                                                        AT91_PIOC 19 AT91_PERIPH_B AT91_PINCTRL_NONE   /* PC19 periph B */
+                                                        AT91_PIOC 20 AT91_PERIPH_B AT91_PINCTRL_NONE   /* PC20 periph B */
+                                                        AT91_PIOC 21 AT91_PERIPH_B AT91_PINCTRL_NONE   /* PC21 periph B */
+                                                        AT91_PIOC 27 AT91_PERIPH_B AT91_PINCTRL_NONE   /* PC27 periph B */
+                                                        AT91_PIOC 28 AT91_PERIPH_B AT91_PINCTRL_NONE   /* PC28 periph B */
+                                                        AT91_PIOC 29 AT91_PERIPH_B AT91_PINCTRL_NONE   /* PC29 periph B */
+                                                        AT91_PIOC 30 AT91_PERIPH_B AT91_PINCTRL_NONE   /* PC30 periph B */
+                                                        AT91_PIOC 31 AT91_PERIPH_B AT91_PINCTRL_NONE>; /* PC31 periph B */
+                                       };
+                               };
+                       };
+
+                       macb1: ethernet@f8030000 {
+                               compatible = "cdns,at32ap7000-macb", "cdns,macb";
+                               reg = <0xf8030000 0x100>;
+                               interrupts = <27 IRQ_TYPE_LEVEL_HIGH 3>;
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&pinctrl_macb1_rmii>;
+                               status = "disabled";
+                       };
+               };
+       };
+};
diff --git a/arch/arm/boot/dts/at91sam9x5_usart3.dtsi b/arch/arm/boot/dts/at91sam9x5_usart3.dtsi
new file mode 100644 (file)
index 0000000..2347e95
--- /dev/null
@@ -0,0 +1,51 @@
+/*
+ * at91sam9x5_usart3.dtsi - Device Tree Include file for AT91SAM9x5 SoC with
+ * 4 USART.
+ *
+ * Copyright (C) 2013 Boris BREZILLON <b.brezillon@overkiz.com>
+ *
+ * Licensed under GPLv2.
+ */
+
+#include <dt-bindings/pinctrl/at91.h>
+#include <dt-bindings/interrupt-controller/irq.h>
+
+/ {
+       ahb {
+               apb {
+                       pinctrl@fffff400 {
+                               usart3 {
+                                       pinctrl_usart3: usart3-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOC 22 AT91_PERIPH_B AT91_PINCTRL_PULL_UP        /* PC22 periph B with pullup */
+                                                        AT91_PIOC 23 AT91_PERIPH_B AT91_PINCTRL_NONE>;         /* PC23 periph B */
+                                       };
+
+                                       pinctrl_usart3_rts: usart3_rts-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOC 24 AT91_PERIPH_B AT91_PINCTRL_NONE>;         /* PC24 periph B */
+                                       };
+
+                                       pinctrl_usart3_cts: usart3_cts-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOC 25 AT91_PERIPH_B AT91_PINCTRL_NONE>;         /* PC25 periph B */
+                                       };
+
+                                       pinctrl_usart3_sck: usart3_sck-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOC 26 AT91_PERIPH_B AT91_PINCTRL_NONE>;         /* PC26 periph B */
+                                       };
+                               };
+                       };
+
+                       usart3: serial@f8028000 {
+                               compatible = "atmel,at91sam9260-usart";
+                               reg = <0xf8028000 0x200>;
+                               interrupts = <8 IRQ_TYPE_LEVEL_HIGH 5>;
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&pinctrl_usart3>;
+                               status = "disabled";
+                       };
+               };
+       };
+};
index 61a8062e56de00f741ce83582257dcb9e1f7b630..50c0d69044979fef24292cfe4c8ef7c57b8b2760 100644 (file)
@@ -1,6 +1,6 @@
 /dts-v1/;
 
-/include/ "dove.dtsi"
+#include "dove.dtsi"
 
 / {
        model = "Compulab CM-A510";
index 022646ef4b3842278f636ed23b6f8c030a1db623..8349a248eceaf242f8a079e6c565af109ee69708 100644 (file)
@@ -1,6 +1,6 @@
 /dts-v1/;
 
-/include/ "dove.dtsi"
+#include "dove.dtsi"
 
 / {
        model = "SolidRun CuBox";
                        silabs,pll-master;
                };
 
-               clkout1 {
-                       reg = <1>;
-                       silabs,drive-strength = <8>;
-                       silabs,multisynth-source = <1>;
-                       silabs,clock-source = <0>;
-                       silabs,pll-master;
-               };
-
                clkout2 {
                        reg = <2>;
+                       silabs,drive-strength = <8>;
                        silabs,multisynth-source = <1>;
                        silabs,clock-source = <0>;
+                       silabs,pll-master;
                };
        };
 };
                reg = <0>;
        };
 };
+
+&audio1 {
+       status = "okay";
+       clocks = <&gate_clk 13>, <&si5351 2>;
+       clock-names = "internal", "extclk";
+       pinctrl-0 = <&pmx_audio1_i2s1_spdifo &pmx_audio1_extclk>;
+       pinctrl-names = "default";
+};
index e2222ce94f2f2494380d137f70267f942f231646..c11d3636c8e5635004aa5ae73ceb3ab450882dd2 100644 (file)
@@ -1,6 +1,6 @@
 /dts-v1/;
 
-/include/ "dove.dtsi"
+#include "dove.dtsi"
 
 / {
        model = "Globalscale D2Plug";
diff --git a/arch/arm/boot/dts/dove-d3plug.dts b/arch/arm/boot/dts/dove-d3plug.dts
new file mode 100644 (file)
index 0000000..f5f59bb
--- /dev/null
@@ -0,0 +1,103 @@
+/dts-v1/;
+
+#include "dove.dtsi"
+
+/ {
+       model = "Globalscale D3Plug";
+       compatible = "globalscale,d3plug", "marvell,dove";
+
+       memory {
+               device_type = "memory";
+               reg = <0x00000000 0x40000000>;
+       };
+
+       chosen {
+               bootargs = "console=ttyS0,115200n8 earlyprintk root=/dev/mmcblk0p2 rw rootwait";
+       };
+
+       leds {
+               compatible = "gpio-leds";
+               pinctrl-0 = <&pmx_gpio_0 &pmx_gpio_1 &pmx_gpio_2>;
+               pinctrl-names = "default";
+
+               wlan-act {
+                       label = "wlan-act";
+                       gpios = <&gpio0 0 1>;
+               };
+
+               wlan-ap {
+                       label = "wlan-ap";
+                       gpios = <&gpio0 1 1>;
+               };
+
+               status {
+                       label = "status";
+                       gpios = <&gpio0 2 1>;
+               };
+       };
+
+       regulators {
+               compatible = "simple-bus";
+               #address-cells = <1>;
+               #size-cells = <0>;
+
+               usb_power: regulator@1 {
+                       compatible = "regulator-fixed";
+                       reg = <1>;
+                       regulator-name = "USB Power";
+                       regulator-min-microvolt = <5000000>;
+                       regulator-max-microvolt = <5000000>;
+                       enable-active-high;
+                       regulator-always-on;
+                       regulator-boot-on;
+                       gpio = <&gpio0 8 0>;
+                       pinctrl-0 = <&pmx_gpio_8>;
+                       pinctrl-names = "default";
+               };
+       };
+};
+
+&uart0 { status = "okay"; };
+&sata0 { status = "okay"; };
+&i2c0 { status = "okay"; };
+
+/* Samsung M8G2F eMMC */
+&sdio0 {
+       status = "okay";
+       non-removable;
+       bus-width = <4>;
+};
+
+/* Marvell SD8787 WLAN/BT */
+&sdio1 {
+       status = "okay";
+       non-removable;
+};
+
+&spi0 {
+       status = "okay";
+
+       /* spi0.0: 2M Flash Macronix MX25L1605D */
+       spi-flash@0 {
+               compatible = "st,m25l1605d";
+               spi-max-frequency = <86000000>;
+               reg = <0>;
+       };
+};
+
+&pcie {
+       status = "okay";
+       /* Fresco Logic USB3.0 xHCI controller */
+       pcie-port@0 {
+               status = "okay";
+               reset-gpios = <&gpio0 26 1>;
+               reset-delay-us = <20000>;
+               pinctrl-0 = <&pmx_camera_gpio>;
+               pinctrl-names = "default";
+       };
+       /* Mini-PCIe slot */
+       pcie-port@1 {
+               status = "okay";
+               reset-gpios = <&gpio0 25 1>;
+       };
+};
index e5a920beab450546a3231941d11c756495b1c516..bb725dca3a1000f7f8de5a9e9cd79bc2d9be38df 100644 (file)
@@ -1,6 +1,6 @@
 /dts-v1/;
 
-/include/ "dove.dtsi"
+#include "dove.dtsi"
 
 / {
        model = "Marvell DB-MV88AP510-BP Development Board";
index cc279166646fc4cb33751c8de2f1e19de2dd7440..113a8bc7bee73649a33cc3e212336536f47399b3 100644 (file)
@@ -1,8 +1,11 @@
 /include/ "skeleton.dtsi"
 
+#define MBUS_ID(target,attributes) (((target) << 24) | ((attributes) << 16))
+
 / {
        compatible = "marvell,dove";
        model = "Marvell Armada 88AP510 SoC";
+       interrupt-parent = <&intc>;
 
        aliases {
                gpio0 = &gpio0;
                marvell,tauros2-cache-features = <0>;
        };
 
-       soc@f1000000 {
-               compatible = "simple-bus";
-               #address-cells = <1>;
+       mbus {
+               compatible = "marvell,dove-mbus", "marvell,mbus", "simple-bus";
+               #address-cells = <2>;
                #size-cells = <1>;
-               interrupt-parent = <&intc>;
-
-               ranges = <0xc8000000 0xc8000000 0x0100000   /* CESA SRAM   1M */
-                         0xe0000000 0xe0000000 0x8000000   /* PCIe0 Mem 128M */
-                         0xe8000000 0xe8000000 0x8000000   /* PCIe1 Mem 128M */
-                         0xf0000000 0xf0000000 0x0100000   /* ScratchPad  1M */
-                         0x00000000 0xf1000000 0x1000000   /* SB/NB regs 16M */
-                         0xf2000000 0xf2000000 0x0100000   /* PCIe0 I/O   1M */
-                         0xf2100000 0xf2100000 0x0100000   /* PCIe0 I/O   1M */
-                         0xf8000000 0xf8000000 0x8000000>; /* BootROM   128M */
-
-               timer: timer@20300 {
-                       compatible = "marvell,orion-timer";
-                       reg = <0x20300 0x20>;
-                       interrupt-parent = <&bridge_intc>;
-                       interrupts = <1>, <2>;
-                       clocks = <&core_clk 0>;
-               };
-
-               intc: main-interrupt-ctrl@20200 {
-                       compatible = "marvell,orion-intc";
-                       interrupt-controller;
-                       #interrupt-cells = <1>;
-                       reg = <0x20200 0x10>, <0x20210 0x10>;
-               };
-
-               bridge_intc: bridge-interrupt-ctrl@20110 {
-                       compatible = "marvell,orion-bridge-intc";
-                       interrupt-controller;
-                       #interrupt-cells = <1>;
-                       reg = <0x20110 0x8>;
-                       interrupts = <0>;
-                       marvell,#interrupts = <5>;
-               };
-
-               core_clk: core-clocks@d0214 {
-                       compatible = "marvell,dove-core-clock";
-                       reg = <0xd0214 0x4>;
-                       #clock-cells = <1>;
-               };
-
-               gate_clk: clock-gating-ctrl@d0038 {
-                       compatible = "marvell,dove-gating-clock";
-                       reg = <0xd0038 0x4>;
-                       clocks = <&core_clk 0>;
-                       #clock-cells = <1>;
-               };
-
-               thermal: thermal-diode@d001c {
-                       compatible = "marvell,dove-thermal";
-                       reg = <0xd001c 0x0c>, <0xd005c 0x08>;
-               };
-
-               uart0: serial@12000 {
-                       compatible = "ns16550a";
-                       reg = <0x12000 0x100>;
-                       reg-shift = <2>;
-                       interrupts = <7>;
-                       clocks = <&core_clk 0>;
-                       status = "disabled";
-               };
-
-               uart1: serial@12100 {
-                       compatible = "ns16550a";
-                       reg = <0x12100 0x100>;
-                       reg-shift = <2>;
-                       interrupts = <8>;
-                       clocks = <&core_clk 0>;
-                       pinctrl-0 = <&pmx_uart1>;
-                       pinctrl-names = "default";
-                       status = "disabled";
-               };
-
-               uart2: serial@12200 {
-                       compatible = "ns16550a";
-                       reg = <0x12000 0x100>;
-                       reg-shift = <2>;
-                       interrupts = <9>;
-                       clocks = <&core_clk 0>;
+               controller = <&mbusc>;
+               pcie-mem-aperture = <0xe0000000 0x10000000>; /* 256M MEM space */
+               pcie-io-aperture  = <0xf2000000 0x00200000>; /*   2M I/O space */
+
+               ranges = <MBUS_ID(0xf0, 0x01) 0 0xf1000000 0x0100000   /* MBUS regs  1M */
+                         MBUS_ID(0xf0, 0x02) 0 0xf1800000 0x1000000   /* AXI  regs 16M */
+                         MBUS_ID(0x01, 0xfd) 0 0xf8000000 0x8000000   /* BootROM  128M */
+                         MBUS_ID(0x03, 0x01) 0 0xc8000000 0x0100000   /* CESA SRAM  1M */
+                         MBUS_ID(0x0d, 0x00) 0 0xf0000000 0x0100000>; /* PMU  SRAM  1M */
+
+               pcie: pcie-controller {
+                       compatible = "marvell,dove-pcie";
                        status = "disabled";
-               };
-
-               uart3: serial@12300 {
-                       compatible = "ns16550a";
-                       reg = <0x12100 0x100>;
-                       reg-shift = <2>;
-                       interrupts = <10>;
-                       clocks = <&core_clk 0>;
-                       status = "disabled";
-               };
-
-               gpio0: gpio-ctrl@d0400 {
-                       compatible = "marvell,orion-gpio";
-                       #gpio-cells = <2>;
-                       gpio-controller;
-                       reg = <0xd0400 0x20>;
-                       ngpios = <32>;
-                       interrupt-controller;
-                       #interrupt-cells = <2>;
-                       interrupts = <12>, <13>, <14>, <60>;
-               };
-
-               gpio1: gpio-ctrl@d0420 {
-                       compatible = "marvell,orion-gpio";
-                       #gpio-cells = <2>;
-                       gpio-controller;
-                       reg = <0xd0420 0x20>;
-                       ngpios = <32>;
-                       interrupt-controller;
-                       #interrupt-cells = <2>;
-                       interrupts = <61>;
-               };
-
-               gpio2: gpio-ctrl@e8400 {
-                       compatible = "marvell,orion-gpio";
-                       #gpio-cells = <2>;
-                       gpio-controller;
-                       reg = <0xe8400 0x0c>;
-                       ngpios = <8>;
-               };
-
-               pinctrl: pin-ctrl@d0200 {
-                       compatible = "marvell,dove-pinctrl";
-                       reg = <0xd0200 0x10>;
-                       clocks = <&gate_clk 22>;
-
-                       pmx_gpio_0: pmx-gpio-0 {
-                               marvell,pins = "mpp0";
-                               marvell,function = "gpio";
-                       };
-
-                       pmx_gpio_1: pmx-gpio-1 {
-                               marvell,pins = "mpp1";
-                               marvell,function = "gpio";
-                       };
-
-                       pmx_gpio_2: pmx-gpio-2 {
-                               marvell,pins = "mpp2";
-                               marvell,function = "gpio";
-                       };
-
-                       pmx_gpio_3: pmx-gpio-3 {
-                               marvell,pins = "mpp3";
-                               marvell,function = "gpio";
+                       device_type = "pci";
+                       #address-cells = <3>;
+                       #size-cells = <2>;
+
+                       msi-parent = <&intc>;
+                       bus-range = <0x00 0xff>;
+
+                       ranges = <0x82000000 0x0 0x40000 MBUS_ID(0xf0, 0x01) 0x40000 0 0x2000
+                                 0x82000000 0x0 0x80000 MBUS_ID(0xf0, 0x01) 0x80000 0 0x2000
+                                 0x82000000 0x1 0x0 MBUS_ID(0x04, 0xe8) 0 1 0   /* Port 0.0 Mem */
+                                 0x81000000 0x1 0x0 MBUS_ID(0x04, 0xe0) 0 1 0   /* Port 0.0 I/O */
+                                 0x82000000 0x2 0x0 MBUS_ID(0x08, 0xe8) 0 1 0   /* Port 1.0 Mem */
+                                 0x81000000 0x2 0x0 MBUS_ID(0x08, 0xe0) 0 1 0>; /* Port 1.0 I/O */
+
+                       pcie-port@0 {
+                               device_type = "pci";
+                               status = "disabled";
+                               assigned-addresses = <0x82000800 0 0x40000 0 0x2000>;
+                               reg = <0x0800 0 0 0 0>;
+                               clocks = <&gate_clk 4>;
+                               marvell,pcie-port = <0>;
+
+                               #address-cells = <3>;
+                               #size-cells = <2>;
+                               ranges = <0x82000000 0 0 0x82000000 0x1 0 1 0
+                                         0x81000000 0 0 0x81000000 0x1 0 1 0>;
+
+                               #interrupt-cells = <1>;
+                               interrupt-map-mask = <0 0 0 0>;
+                               interrupt-map = <0 0 0 0 &intc 16>;
+                       };
+
+                       pcie-port@1 {
+                               device_type = "pci";
+                               status = "disabled";
+                               assigned-addresses = <0x82002800 0 0x80000 0 0x2000>;
+                               reg = <0x1000 0 0 0 0>;
+                               clocks = <&gate_clk 5>;
+                               marvell,pcie-port = <1>;
+
+                               #address-cells = <3>;
+                               #size-cells = <2>;
+                               ranges = <0x82000000 0 0 0x82000000 0x2 0 1 0
+                                         0x81000000 0 0 0x81000000 0x2 0 1 0>;
+
+                               #interrupt-cells = <1>;
+                               interrupt-map-mask = <0 0 0 0>;
+                               interrupt-map = <0 0 0 0 &intc 18>;
                        };
-
-                       pmx_gpio_4: pmx-gpio-4 {
-                               marvell,pins = "mpp4";
-                               marvell,function = "gpio";
-                       };
-
-                       pmx_gpio_5: pmx-gpio-5 {
-                               marvell,pins = "mpp5";
-                               marvell,function = "gpio";
-                       };
-
-                       pmx_gpio_6: pmx-gpio-6 {
-                               marvell,pins = "mpp6";
-                               marvell,function = "gpio";
-                       };
-
-                       pmx_gpio_7: pmx-gpio-7 {
-                               marvell,pins = "mpp7";
-                               marvell,function = "gpio";
-                       };
-
-                       pmx_gpio_8: pmx-gpio-8 {
-                               marvell,pins = "mpp8";
-                               marvell,function = "gpio";
-                       };
-
-                       pmx_gpio_9: pmx-gpio-9 {
-                               marvell,pins = "mpp9";
-                               marvell,function = "gpio";
-                       };
-
-                       pmx_gpio_10: pmx-gpio-10 {
-                               marvell,pins = "mpp10";
-                               marvell,function = "gpio";
-                       };
-
-                       pmx_gpio_11: pmx-gpio-11 {
-                               marvell,pins = "mpp11";
-                               marvell,function = "gpio";
-                       };
-
-                       pmx_gpio_12: pmx-gpio-12 {
-                               marvell,pins = "mpp12";
-                               marvell,function = "gpio";
-                       };
-
-                       pmx_gpio_13: pmx-gpio-13 {
-                               marvell,pins = "mpp13";
-                               marvell,function = "gpio";
-                       };
-
-                       pmx_gpio_14: pmx-gpio-14 {
-                               marvell,pins = "mpp14";
-                               marvell,function = "gpio";
-                       };
-
-                       pmx_gpio_15: pmx-gpio-15 {
-                               marvell,pins = "mpp15";
-                               marvell,function = "gpio";
-                       };
-
-                       pmx_gpio_16: pmx-gpio-16 {
-                               marvell,pins = "mpp16";
-                               marvell,function = "gpio";
-                       };
-
-                       pmx_gpio_17: pmx-gpio-17 {
-                               marvell,pins = "mpp17";
-                               marvell,function = "gpio";
-                       };
-
-                       pmx_gpio_18: pmx-gpio-18 {
-                               marvell,pins = "mpp18";
-                               marvell,function = "gpio";
-                       };
-
-                       pmx_gpio_19: pmx-gpio-19 {
-                               marvell,pins = "mpp19";
-                               marvell,function = "gpio";
-                       };
-
-                       pmx_gpio_20: pmx-gpio-20 {
-                               marvell,pins = "mpp20";
-                               marvell,function = "gpio";
-                       };
-
-                       pmx_gpio_21: pmx-gpio-21 {
-                               marvell,pins = "mpp21";
-                               marvell,function = "gpio";
-                       };
-
-                       pmx_camera: pmx-camera {
-                               marvell,pins = "mpp_camera";
-                               marvell,function = "camera";
-                       };
-
-                       pmx_camera_gpio: pmx-camera-gpio {
-                               marvell,pins = "mpp_camera";
-                               marvell,function = "gpio";
-                       };
-
-                       pmx_sdio0: pmx-sdio0 {
-                               marvell,pins = "mpp_sdio0";
-                               marvell,function = "sdio0";
-                       };
-
-                       pmx_sdio0_gpio: pmx-sdio0-gpio {
-                               marvell,pins = "mpp_sdio0";
-                               marvell,function = "gpio";
-                       };
-
-                       pmx_sdio1: pmx-sdio1 {
-                               marvell,pins = "mpp_sdio1";
-                               marvell,function = "sdio1";
-                       };
-
-                       pmx_sdio1_gpio: pmx-sdio1-gpio {
-                               marvell,pins = "mpp_sdio1";
-                               marvell,function = "gpio";
-                       };
-
-                       pmx_audio1_gpio: pmx-audio1-gpio {
-                               marvell,pins = "mpp_audio1";
-                               marvell,function = "gpio";
-                       };
-
-                       pmx_spi0: pmx-spi0 {
-                               marvell,pins = "mpp_spi0";
-                               marvell,function = "spi0";
-                       };
-
-                       pmx_spi0_gpio: pmx-spi0-gpio {
-                               marvell,pins = "mpp_spi0";
-                               marvell,function = "gpio";
-                       };
-
-                       pmx_uart1: pmx-uart1 {
-                               marvell,pins = "mpp_uart1";
-                               marvell,function = "uart1";
-                       };
-
-                       pmx_uart1_gpio: pmx-uart1-gpio {
-                               marvell,pins = "mpp_uart1";
-                               marvell,function = "gpio";
-                       };
-
-                       pmx_nand: pmx-nand {
-                               marvell,pins = "mpp_nand";
-                               marvell,function = "nand";
-                       };
-
-                       pmx_nand_gpo: pmx-nand-gpo {
-                               marvell,pins = "mpp_nand";
-                               marvell,function = "gpo";
-                       };
-               };
-
-               spi0: spi-ctrl@10600 {
-                       compatible = "marvell,orion-spi";
-                       #address-cells = <1>;
-                       #size-cells = <0>;
-                       cell-index = <0>;
-                       interrupts = <6>;
-                       reg = <0x10600 0x28>;
-                       clocks = <&core_clk 0>;
-                       pinctrl-0 = <&pmx_spi0>;
-                       pinctrl-names = "default";
-                       status = "disabled";
-               };
-
-               spi1: spi-ctrl@14600 {
-                       compatible = "marvell,orion-spi";
-                       #address-cells = <1>;
-                       #size-cells = <0>;
-                       cell-index = <1>;
-                       interrupts = <5>;
-                       reg = <0x14600 0x28>;
-                       clocks = <&core_clk 0>;
-                       status = "disabled";
-               };
-
-               i2c0: i2c-ctrl@11000 {
-                       compatible = "marvell,mv64xxx-i2c";
-                       reg = <0x11000 0x20>;
-                       #address-cells = <1>;
-                       #size-cells = <0>;
-                       interrupts = <11>;
-                       clock-frequency = <400000>;
-                       timeout-ms = <1000>;
-                       clocks = <&core_clk 0>;
-                       status = "disabled";
                };
 
-               ehci0: usb-host@50000 {
-                       compatible = "marvell,orion-ehci";
-                       reg = <0x50000 0x1000>;
-                       interrupts = <24>;
-                       clocks = <&gate_clk 0>;
-                       status = "okay";
-               };
-
-               ehci1: usb-host@51000 {
-                       compatible = "marvell,orion-ehci";
-                       reg = <0x51000 0x1000>;
-                       interrupts = <25>;
-                       clocks = <&gate_clk 1>;
-                       status = "okay";
-               };
-
-               sdio0: sdio-host@92000 {
-                       compatible = "marvell,dove-sdhci";
-                       reg = <0x92000 0x100>;
-                       interrupts = <35>, <37>;
-                       clocks = <&gate_clk 8>;
-                       pinctrl-0 = <&pmx_sdio0>;
-                       pinctrl-names = "default";
-                       status = "disabled";
-               };
-
-               sdio1: sdio-host@90000 {
-                       compatible = "marvell,dove-sdhci";
-                       reg = <0x90000 0x100>;
-                       interrupts = <36>, <38>;
-                       clocks = <&gate_clk 9>;
-                       pinctrl-0 = <&pmx_sdio1>;
-                       pinctrl-names = "default";
-                       status = "disabled";
-               };
-
-               sata0: sata-host@a0000 {
-                       compatible = "marvell,orion-sata";
-                       reg = <0xa0000 0x2400>;
-                       interrupts = <62>;
-                       clocks = <&gate_clk 3>;
-                       nr-ports = <1>;
-                       status = "disabled";
-               };
-
-               rtc: real-time-clock@d8500 {
-                       compatible = "marvell,orion-rtc";
-                       reg = <0xd8500 0x20>;
-               };
-
-               crypto: crypto-engine@30000 {
-                       compatible = "marvell,orion-crypto";
-                       reg = <0x30000 0x10000>,
-                             <0xc8000000 0x800>;
-                       reg-names = "regs", "sram";
-                       interrupts = <31>;
-                       clocks = <&gate_clk 15>;
-                       status = "okay";
-               };
-
-               xor0: dma-engine@60800 {
-                       compatible = "marvell,orion-xor";
-                       reg = <0x60800 0x100
-                              0x60a00 0x100>;
-                       clocks = <&gate_clk 23>;
-                       status = "okay";
-
-                       channel0 {
-                               interrupts = <39>;
-                               dmacap,memcpy;
-                               dmacap,xor;
-                       };
-
-                       channel1 {
-                               interrupts = <40>;
-                               dmacap,memset;
-                               dmacap,memcpy;
-                               dmacap,xor;
-                       };
-               };
-
-               xor1: dma-engine@60900 {
-                       compatible = "marvell,orion-xor";
-                       reg = <0x60900 0x100
-                              0x60b00 0x100>;
-                       clocks = <&gate_clk 24>;
-                       status = "okay";
-
-                       channel0 {
-                               interrupts = <42>;
-                               dmacap,memcpy;
-                               dmacap,xor;
-                       };
-
-                       channel1 {
-                               interrupts = <43>;
-                               dmacap,memset;
-                               dmacap,memcpy;
-                               dmacap,xor;
-                       };
-               };
-
-               mdio: mdio-bus@72004 {
-                       compatible = "marvell,orion-mdio";
+               internal-regs {
+                       compatible = "simple-bus";
                        #address-cells = <1>;
-                       #size-cells = <0>;
-                       reg = <0x72004 0x84>;
-                       interrupts = <30>;
-                       clocks = <&gate_clk 2>;
-                       status = "disabled";
-
-                       ethphy: ethernet-phy {
-                               device-type = "ethernet-phy";
-                               /* set phy address in board file */
-                       };
-               };
-
-               eth: ethernet-controller@72000 {
-                       compatible = "marvell,orion-eth";
-                       #address-cells = <1>;
-                       #size-cells = <0>;
-                       reg = <0x72000 0x4000>;
-                       clocks = <&gate_clk 2>;
-                       marvell,tx-checksum-limit = <1600>;
-                       status = "disabled";
-
-                       ethernet-port@0 {
-                               device_type = "network";
-                               compatible = "marvell,orion-eth-port";
-                               reg = <0>;
-                               interrupts = <29>;
-                               /* overwrite MAC address in bootloader */
-                               local-mac-address = [00 00 00 00 00 00];
-                               phy-handle = <&ethphy>;
+                       #size-cells = <1>;
+                       ranges = <0x00000000 MBUS_ID(0xf0, 0x01) 0 0x0100000   /* MBUS regs  1M */
+                                 0x00800000 MBUS_ID(0xf0, 0x02) 0 0x1000000   /* AXI  regs 16M */
+                                 0xffffe000 MBUS_ID(0x03, 0x01) 0 0x0000800   /* CESA SRAM  2k */
+                                 0xfffff000 MBUS_ID(0x0d, 0x00) 0 0x0000800>; /* PMU  SRAM  2k */
+
+                       mbusc: mbus-ctrl@20000 {
+                               compatible = "marvell,mbus-controller";
+                               reg = <0x20000 0x80>, <0x800100 0x8>;
+                       };
+
+                       timer: timer@20300 {
+                               compatible = "marvell,orion-timer";
+                               reg = <0x20300 0x20>;
+                               interrupt-parent = <&bridge_intc>;
+                               interrupts = <1>, <2>;
+                               clocks = <&core_clk 0>;
+                       };
+
+                       intc: main-interrupt-ctrl@20200 {
+                               compatible = "marvell,orion-intc";
+                               interrupt-controller;
+                               #interrupt-cells = <1>;
+                               reg = <0x20200 0x10>, <0x20210 0x10>;
+                       };
+
+                       bridge_intc: bridge-interrupt-ctrl@20110 {
+                               compatible = "marvell,orion-bridge-intc";
+                               interrupt-controller;
+                               #interrupt-cells = <1>;
+                               reg = <0x20110 0x8>;
+                               interrupts = <0>;
+                               marvell,#interrupts = <5>;
+                       };
+
+                       core_clk: core-clocks@d0214 {
+                               compatible = "marvell,dove-core-clock";
+                               reg = <0xd0214 0x4>;
+                               #clock-cells = <1>;
+                       };
+
+                       gate_clk: clock-gating-ctrl@d0038 {
+                               compatible = "marvell,dove-gating-clock";
+                               reg = <0xd0038 0x4>;
+                               clocks = <&core_clk 0>;
+                               #clock-cells = <1>;
+                       };
+
+                       thermal: thermal-diode@d001c {
+                               compatible = "marvell,dove-thermal";
+                               reg = <0xd001c 0x0c>, <0xd005c 0x08>;
+                       };
+
+                       uart0: serial@12000 {
+                               compatible = "ns16550a";
+                               reg = <0x12000 0x100>;
+                               reg-shift = <2>;
+                               interrupts = <7>;
+                               clocks = <&core_clk 0>;
+                               status = "disabled";
+                       };
+
+                       uart1: serial@12100 {
+                               compatible = "ns16550a";
+                               reg = <0x12100 0x100>;
+                               reg-shift = <2>;
+                               interrupts = <8>;
+                               clocks = <&core_clk 0>;
+                               pinctrl-0 = <&pmx_uart1>;
+                               pinctrl-names = "default";
+                               status = "disabled";
+                       };
+
+                       uart2: serial@12200 {
+                               compatible = "ns16550a";
+                               reg = <0x12000 0x100>;
+                               reg-shift = <2>;
+                               interrupts = <9>;
+                               clocks = <&core_clk 0>;
+                               status = "disabled";
+                       };
+
+                       uart3: serial@12300 {
+                               compatible = "ns16550a";
+                               reg = <0x12100 0x100>;
+                               reg-shift = <2>;
+                               interrupts = <10>;
+                               clocks = <&core_clk 0>;
+                               status = "disabled";
+                       };
+
+                       gpio0: gpio-ctrl@d0400 {
+                               compatible = "marvell,orion-gpio";
+                               #gpio-cells = <2>;
+                               gpio-controller;
+                               reg = <0xd0400 0x20>;
+                               ngpios = <32>;
+                               interrupt-controller;
+                               #interrupt-cells = <2>;
+                               interrupts = <12>, <13>, <14>, <60>;
+                       };
+
+                       gpio1: gpio-ctrl@d0420 {
+                               compatible = "marvell,orion-gpio";
+                               #gpio-cells = <2>;
+                               gpio-controller;
+                               reg = <0xd0420 0x20>;
+                               ngpios = <32>;
+                               interrupt-controller;
+                               #interrupt-cells = <2>;
+                               interrupts = <61>;
+                       };
+
+                       gpio2: gpio-ctrl@e8400 {
+                               compatible = "marvell,orion-gpio";
+                               #gpio-cells = <2>;
+                               gpio-controller;
+                               reg = <0xe8400 0x0c>;
+                               ngpios = <8>;
+                       };
+
+                       pinctrl: pin-ctrl@d0200 {
+                               compatible = "marvell,dove-pinctrl";
+                               reg = <0xd0200 0x10>;
+                               clocks = <&gate_clk 22>;
+
+                               pmx_gpio_0: pmx-gpio-0 {
+                                       marvell,pins = "mpp0";
+                                       marvell,function = "gpio";
+                               };
+
+                               pmx_gpio_1: pmx-gpio-1 {
+                                       marvell,pins = "mpp1";
+                                       marvell,function = "gpio";
+                               };
+
+                               pmx_gpio_2: pmx-gpio-2 {
+                                       marvell,pins = "mpp2";
+                                       marvell,function = "gpio";
+                               };
+
+                               pmx_gpio_3: pmx-gpio-3 {
+                                       marvell,pins = "mpp3";
+                                       marvell,function = "gpio";
+                               };
+
+                               pmx_gpio_4: pmx-gpio-4 {
+                                       marvell,pins = "mpp4";
+                                       marvell,function = "gpio";
+                               };
+
+                               pmx_gpio_5: pmx-gpio-5 {
+                                       marvell,pins = "mpp5";
+                                       marvell,function = "gpio";
+                               };
+
+                               pmx_gpio_6: pmx-gpio-6 {
+                                       marvell,pins = "mpp6";
+                                       marvell,function = "gpio";
+                               };
+
+                               pmx_gpio_7: pmx-gpio-7 {
+                                       marvell,pins = "mpp7";
+                                       marvell,function = "gpio";
+                               };
+
+                               pmx_gpio_8: pmx-gpio-8 {
+                                       marvell,pins = "mpp8";
+                                       marvell,function = "gpio";
+                               };
+
+                               pmx_gpio_9: pmx-gpio-9 {
+                                       marvell,pins = "mpp9";
+                                       marvell,function = "gpio";
+                               };
+
+                               pmx_gpio_10: pmx-gpio-10 {
+                                       marvell,pins = "mpp10";
+                                       marvell,function = "gpio";
+                               };
+
+                               pmx_gpio_11: pmx-gpio-11 {
+                                       marvell,pins = "mpp11";
+                                       marvell,function = "gpio";
+                               };
+
+                               pmx_gpio_12: pmx-gpio-12 {
+                                       marvell,pins = "mpp12";
+                                       marvell,function = "gpio";
+                               };
+
+                               pmx_gpio_13: pmx-gpio-13 {
+                                       marvell,pins = "mpp13";
+                                       marvell,function = "gpio";
+                               };
+
+                               pmx_audio1_extclk: pmx-audio1-extclk {
+                                       marvell,pins = "mpp13";
+                                       marvell,function = "audio1";
+                               };
+
+                               pmx_gpio_14: pmx-gpio-14 {
+                                       marvell,pins = "mpp14";
+                                       marvell,function = "gpio";
+                               };
+
+                               pmx_gpio_15: pmx-gpio-15 {
+                                       marvell,pins = "mpp15";
+                                       marvell,function = "gpio";
+                               };
+
+                               pmx_gpio_16: pmx-gpio-16 {
+                                       marvell,pins = "mpp16";
+                                       marvell,function = "gpio";
+                               };
+
+                               pmx_gpio_17: pmx-gpio-17 {
+                                       marvell,pins = "mpp17";
+                                       marvell,function = "gpio";
+                               };
+
+                               pmx_gpio_18: pmx-gpio-18 {
+                                       marvell,pins = "mpp18";
+                                       marvell,function = "gpio";
+                               };
+
+                               pmx_gpio_19: pmx-gpio-19 {
+                                       marvell,pins = "mpp19";
+                                       marvell,function = "gpio";
+                               };
+
+                               pmx_gpio_20: pmx-gpio-20 {
+                                       marvell,pins = "mpp20";
+                                       marvell,function = "gpio";
+                               };
+
+                               pmx_gpio_21: pmx-gpio-21 {
+                                       marvell,pins = "mpp21";
+                                       marvell,function = "gpio";
+                               };
+
+                               pmx_camera: pmx-camera {
+                                       marvell,pins = "mpp_camera";
+                                       marvell,function = "camera";
+                               };
+
+                               pmx_camera_gpio: pmx-camera-gpio {
+                                       marvell,pins = "mpp_camera";
+                                       marvell,function = "gpio";
+                               };
+
+                               pmx_sdio0: pmx-sdio0 {
+                                       marvell,pins = "mpp_sdio0";
+                                       marvell,function = "sdio0";
+                               };
+
+                               pmx_sdio0_gpio: pmx-sdio0-gpio {
+                                       marvell,pins = "mpp_sdio0";
+                                       marvell,function = "gpio";
+                               };
+
+                               pmx_sdio1: pmx-sdio1 {
+                                       marvell,pins = "mpp_sdio1";
+                                       marvell,function = "sdio1";
+                               };
+
+                               pmx_sdio1_gpio: pmx-sdio1-gpio {
+                                       marvell,pins = "mpp_sdio1";
+                                       marvell,function = "gpio";
+                               };
+
+                               pmx_audio1_gpio: pmx-audio1-gpio {
+                                       marvell,pins = "mpp_audio1";
+                                       marvell,function = "gpio";
+                               };
+
+                               pmx_audio1_i2s1_spdifo: pmx-audio1-i2s1-spdifo {
+                                       marvell,pins = "mpp_audio1";
+                                       marvell,function = "i2s1/spdifo";
+                               };
+
+                               pmx_spi0: pmx-spi0 {
+                                       marvell,pins = "mpp_spi0";
+                                       marvell,function = "spi0";
+                               };
+
+                               pmx_spi0_gpio: pmx-spi0-gpio {
+                                       marvell,pins = "mpp_spi0";
+                                       marvell,function = "gpio";
+                               };
+
+                               pmx_uart1: pmx-uart1 {
+                                       marvell,pins = "mpp_uart1";
+                                       marvell,function = "uart1";
+                               };
+
+                               pmx_uart1_gpio: pmx-uart1-gpio {
+                                       marvell,pins = "mpp_uart1";
+                                       marvell,function = "gpio";
+                               };
+
+                               pmx_nand: pmx-nand {
+                                       marvell,pins = "mpp_nand";
+                                       marvell,function = "nand";
+                               };
+
+                               pmx_nand_gpo: pmx-nand-gpo {
+                                       marvell,pins = "mpp_nand";
+                                       marvell,function = "gpo";
+                               };
+                       };
+
+                       spi0: spi-ctrl@10600 {
+                               compatible = "marvell,orion-spi";
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+                               cell-index = <0>;
+                               interrupts = <6>;
+                               reg = <0x10600 0x28>;
+                               clocks = <&core_clk 0>;
+                               pinctrl-0 = <&pmx_spi0>;
+                               pinctrl-names = "default";
+                               status = "disabled";
+                       };
+
+                       spi1: spi-ctrl@14600 {
+                               compatible = "marvell,orion-spi";
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+                               cell-index = <1>;
+                               interrupts = <5>;
+                               reg = <0x14600 0x28>;
+                               clocks = <&core_clk 0>;
+                               status = "disabled";
+                       };
+
+                       i2c0: i2c-ctrl@11000 {
+                               compatible = "marvell,mv64xxx-i2c";
+                               reg = <0x11000 0x20>;
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+                               interrupts = <11>;
+                               clock-frequency = <400000>;
+                               timeout-ms = <1000>;
+                               clocks = <&core_clk 0>;
+                               status = "disabled";
+                       };
+
+                       ehci0: usb-host@50000 {
+                               compatible = "marvell,orion-ehci";
+                               reg = <0x50000 0x1000>;
+                               interrupts = <24>;
+                               clocks = <&gate_clk 0>;
+                               status = "okay";
+                       };
+
+                       ehci1: usb-host@51000 {
+                               compatible = "marvell,orion-ehci";
+                               reg = <0x51000 0x1000>;
+                               interrupts = <25>;
+                               clocks = <&gate_clk 1>;
+                               status = "okay";
+                       };
+
+                       sdio0: sdio-host@92000 {
+                               compatible = "marvell,dove-sdhci";
+                               reg = <0x92000 0x100>;
+                               interrupts = <35>, <37>;
+                               clocks = <&gate_clk 8>;
+                               pinctrl-0 = <&pmx_sdio0>;
+                               pinctrl-names = "default";
+                               status = "disabled";
+                       };
+
+                       sdio1: sdio-host@90000 {
+                               compatible = "marvell,dove-sdhci";
+                               reg = <0x90000 0x100>;
+                               interrupts = <36>, <38>;
+                               clocks = <&gate_clk 9>;
+                               pinctrl-0 = <&pmx_sdio1>;
+                               pinctrl-names = "default";
+                               status = "disabled";
+                       };
+
+                       sata0: sata-host@a0000 {
+                               compatible = "marvell,orion-sata";
+                               reg = <0xa0000 0x2400>;
+                               interrupts = <62>;
+                               clocks = <&gate_clk 3>;
+                               nr-ports = <1>;
+                               status = "disabled";
+                       };
+
+                       rtc: real-time-clock@d8500 {
+                               compatible = "marvell,orion-rtc";
+                               reg = <0xd8500 0x20>;
+                       };
+
+                       crypto: crypto-engine@30000 {
+                               compatible = "marvell,orion-crypto";
+                               reg = <0x30000 0x10000>,
+                                     <0xffffe000 0x800>;
+                               reg-names = "regs", "sram";
+                               interrupts = <31>;
+                               clocks = <&gate_clk 15>;
+                               status = "okay";
+                       };
+
+                       xor0: dma-engine@60800 {
+                               compatible = "marvell,orion-xor";
+                               reg = <0x60800 0x100
+                                      0x60a00 0x100>;
+                               clocks = <&gate_clk 23>;
+                               status = "okay";
+
+                               channel0 {
+                                       interrupts = <39>;
+                                       dmacap,memcpy;
+                                       dmacap,xor;
+                               };
+
+                               channel1 {
+                                       interrupts = <40>;
+                                       dmacap,memcpy;
+                                       dmacap,xor;
+                               };
+                       };
+
+                       xor1: dma-engine@60900 {
+                               compatible = "marvell,orion-xor";
+                               reg = <0x60900 0x100
+                                      0x60b00 0x100>;
+                               clocks = <&gate_clk 24>;
+                               status = "okay";
+
+                               channel0 {
+                                       interrupts = <42>;
+                                       dmacap,memcpy;
+                                       dmacap,xor;
+                               };
+
+                               channel1 {
+                                       interrupts = <43>;
+                                       dmacap,memcpy;
+                                       dmacap,xor;
+                               };
+                       };
+
+                       mdio: mdio-bus@72004 {
+                               compatible = "marvell,orion-mdio";
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+                               reg = <0x72004 0x84>;
+                               interrupts = <30>;
+                               clocks = <&gate_clk 2>;
+                               status = "disabled";
+
+                               ethphy: ethernet-phy {
+                                       device-type = "ethernet-phy";
+                                       /* set phy address in board file */
+                               };
+                       };
+
+                       eth: ethernet-ctrl@72000 {
+                               compatible = "marvell,orion-eth";
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+                               reg = <0x72000 0x4000>;
+                               clocks = <&gate_clk 2>;
+                               marvell,tx-checksum-limit = <1600>;
+                               status = "disabled";
+
+                               ethernet-port@0 {
+                                       device_type = "network";
+                                       compatible = "marvell,orion-eth-port";
+                                       reg = <0>;
+                                       interrupts = <29>;
+                                       /* overwrite MAC address in bootloader */
+                                       local-mac-address = [00 00 00 00 00 00];
+                                       phy-handle = <&ethphy>;
+                               };
+                       };
+
+                       audio0: audio-controller@b0000 {
+                               compatible = "marvell,dove-audio";
+                               reg = <0xb0000 0x2210>;
+                               interrupts = <19>, <20>;
+                               clocks = <&gate_clk 12>;
+                               clock-names = "internal";
+                               status = "disabled";
+                       };
+
+                       audio1: audio-controller@b4000 {
+                               compatible = "marvell,dove-audio";
+                               reg = <0xb4000 0x2210>;
+                               interrupts = <21>, <22>;
+                               clocks = <&gate_clk 13>;
+                               clock-names = "internal";
+                               status = "disabled";
                        };
                };
        };
diff --git a/arch/arm/boot/dts/dra7-evm.dts b/arch/arm/boot/dts/dra7-evm.dts
new file mode 100644 (file)
index 0000000..3abf5f4
--- /dev/null
@@ -0,0 +1,271 @@
+/*
+ * Copyright (C) 2013 Texas Instruments Incorporated - http://www.ti.com/
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+/dts-v1/;
+
+#include "dra7.dtsi"
+
+/ {
+       model = "TI DRA7";
+       compatible = "ti,dra7-evm", "ti,dra752", "ti,dra7";
+
+       memory {
+               device_type = "memory";
+               reg = <0x80000000 0x60000000>; /* 1536 MB */
+       };
+
+       mmc2_3v3: fixedregulator-mmc2 {
+               compatible = "regulator-fixed";
+               regulator-name = "mmc2_3v3";
+               regulator-min-microvolt = <3300000>;
+               regulator-max-microvolt = <3300000>;
+       };
+};
+
+&dra7_pmx_core {
+       i2c1_pins: pinmux_i2c1_pins {
+               pinctrl-single,pins = <
+                       0x400 (PIN_INPUT | MUX_MODE0) /* i2c1_sda */
+                       0x404 (PIN_INPUT | MUX_MODE0) /* i2c1_scl */
+               >;
+       };
+
+       i2c2_pins: pinmux_i2c2_pins {
+               pinctrl-single,pins = <
+                       0x408 (PIN_INPUT | MUX_MODE0) /* i2c2_sda */
+                       0x40c (PIN_INPUT | MUX_MODE0) /* i2c2_scl */
+               >;
+       };
+
+       i2c3_pins: pinmux_i2c3_pins {
+               pinctrl-single,pins = <
+                       0x410 (PIN_INPUT | MUX_MODE0) /* i2c3_sda */
+                       0x414 (PIN_INPUT | MUX_MODE0) /* i2c3_scl */
+               >;
+       };
+
+       mcspi1_pins: pinmux_mcspi1_pins {
+               pinctrl-single,pins = <
+                       0x3a4 (PIN_INPUT | MUX_MODE0) /* spi2_clk */
+                       0x3a8 (PIN_INPUT | MUX_MODE0) /* spi2_d1 */
+                       0x3ac (PIN_INPUT | MUX_MODE0) /* spi2_d0 */
+                       0x3b0 (PIN_INPUT_SLEW | MUX_MODE0) /* spi2_cs0 */
+                       0x3b4 (PIN_INPUT_SLEW | MUX_MODE0) /* spi2_cs1 */
+                       0x3b8 (PIN_INPUT_SLEW | MUX_MODE6) /* spi2_cs2 */
+                       0x3bc (PIN_INPUT_SLEW | MUX_MODE6) /* spi2_cs3 */
+               >;
+       };
+
+       mcspi2_pins: pinmux_mcspi2_pins {
+               pinctrl-single,pins = <
+                       0x3c0 (PIN_INPUT | MUX_MODE0) /* spi2_sclk */
+                       0x3c4 (PIN_INPUT_SLEW | MUX_MODE0) /* spi2_d1 */
+                       0x3c8 (PIN_INPUT_SLEW | MUX_MODE0) /* spi2_d1 */
+                       0x3cc (PIN_INPUT_SLEW | MUX_MODE0) /* spi2_cs0 */
+               >;
+       };
+
+       uart1_pins: pinmux_uart1_pins {
+               pinctrl-single,pins = <
+                       0x3e0 (PIN_INPUT_SLEW | MUX_MODE0) /* uart1_rxd */
+                       0x3e4 (PIN_INPUT_SLEW | MUX_MODE0) /* uart1_txd */
+                       0x3e8 (PIN_INPUT | MUX_MODE3) /* uart1_ctsn */
+                       0x3ec (PIN_INPUT | MUX_MODE3) /* uart1_rtsn */
+               >;
+       };
+
+       uart2_pins: pinmux_uart2_pins {
+               pinctrl-single,pins = <
+                       0x3f0 (PIN_INPUT | MUX_MODE0) /* uart2_rxd */
+                       0x3f4 (PIN_INPUT | MUX_MODE0) /* uart2_txd */
+                       0x3f8 (PIN_INPUT | MUX_MODE0) /* uart2_ctsn */
+                       0x3fc (PIN_INPUT | MUX_MODE0) /* uart2_rtsn */
+               >;
+       };
+
+       uart3_pins: pinmux_uart3_pins {
+               pinctrl-single,pins = <
+                       0x248 (PIN_INPUT_SLEW | MUX_MODE0) /* uart3_rxd */
+                       0x24c (PIN_INPUT_SLEW | MUX_MODE0) /* uart3_txd */
+               >;
+       };
+};
+
+&i2c1 {
+       status = "okay";
+       pinctrl-names = "default";
+       pinctrl-0 = <&i2c1_pins>;
+       clock-frequency = <400000>;
+
+       tps659038: tps659038@58 {
+               compatible = "ti,tps659038";
+               reg = <0x58>;
+
+               tps659038_pmic {
+                       compatible = "ti,tps659038-pmic";
+
+                       regulators {
+                               smps123_reg: smps123 {
+                                       /* VDD_MPU */
+                                       regulator-name = "smps123";
+                                       regulator-min-microvolt = < 850000>;
+                                       regulator-max-microvolt = <1250000>;
+                                       regulator-always-on;
+                                       regulator-boot-on;
+                               };
+
+                               smps45_reg: smps45 {
+                                       /* VDD_DSPEVE */
+                                       regulator-name = "smps45";
+                                       regulator-min-microvolt = < 850000>;
+                                       regulator-max-microvolt = <1150000>;
+                                       regulator-boot-on;
+                               };
+
+                               smps6_reg: smps6 {
+                                       /* VDD_GPU - over VDD_SMPS6 */
+                                       regulator-name = "smps6";
+                                       regulator-min-microvolt = <850000>;
+                                       regulator-max-microvolt = <12500000>;
+                                       regulator-boot-on;
+                               };
+
+                               smps7_reg: smps7 {
+                                       /* CORE_VDD */
+                                       regulator-name = "smps7";
+                                       regulator-min-microvolt = <850000>;
+                                       regulator-max-microvolt = <1030000>;
+                                       regulator-always-on;
+                                       regulator-boot-on;
+                               };
+
+                               smps8_reg: smps8 {
+                                       /* VDD_IVAHD */
+                                       regulator-name = "smps8";
+                                       regulator-min-microvolt = < 850000>;
+                                       regulator-max-microvolt = <1250000>;
+                                       regulator-boot-on;
+                               };
+
+                               smps9_reg: smps9 {
+                                       /* VDDS1V8 */
+                                       regulator-name = "smps9";
+                                       regulator-min-microvolt = <1800000>;
+                                       regulator-max-microvolt = <1800000>;
+                                       regulator-always-on;
+                                       regulator-boot-on;
+                               };
+
+                               ldo1_reg: ldo1 {
+                                       /* LDO1_OUT --> SDIO  */
+                                       regulator-name = "ldo1";
+                                       regulator-min-microvolt = <1800000>;
+                                       regulator-max-microvolt = <3300000>;
+                                       regulator-boot-on;
+                               };
+
+                               ldo2_reg: ldo2 {
+                                       /* VDD_RTCIO */
+                                       /* LDO2 -> VDDSHV5, LDO2 also goes to CAN_PHY_3V3 */
+                                       regulator-name = "ldo2";
+                                       regulator-min-microvolt = <3300000>;
+                                       regulator-max-microvolt = <3300000>;
+                                       regulator-boot-on;
+                               };
+
+                               ldo3_reg: ldo3 {
+                                       /* VDDA_1V8_PHY */
+                                       regulator-name = "ldo3";
+                                       regulator-min-microvolt = <1800000>;
+                                       regulator-max-microvolt = <1800000>;
+                                       regulator-boot-on;
+                               };
+
+                               ldo9_reg: ldo9 {
+                                       /* VDD_RTC */
+                                       regulator-name = "ldo9";
+                                       regulator-min-microvolt = <1050000>;
+                                       regulator-max-microvolt = <1050000>;
+                                       regulator-boot-on;
+                               };
+
+                               ldoln_reg: ldoln {
+                                       /* VDDA_1V8_PLL */
+                                       regulator-name = "ldoln";
+                                       regulator-min-microvolt = <1800000>;
+                                       regulator-max-microvolt = <1800000>;
+                                       regulator-always-on;
+                                       regulator-boot-on;
+                               };
+
+                               ldousb_reg: ldousb {
+                                       /* VDDA_3V_USB: VDDA_USBHS33 */
+                                       regulator-name = "ldousb";
+                                       regulator-min-microvolt = <3300000>;
+                                       regulator-max-microvolt = <3300000>;
+                                       regulator-boot-on;
+                               };
+                       };
+               };
+       };
+};
+
+&i2c2 {
+       status = "okay";
+       pinctrl-names = "default";
+       pinctrl-0 = <&i2c2_pins>;
+       clock-frequency = <400000>;
+};
+
+&i2c3 {
+       status = "okay";
+       pinctrl-names = "default";
+       pinctrl-0 = <&i2c3_pins>;
+       clock-frequency = <3400000>;
+};
+
+&mcspi1 {
+       status = "okay";
+       pinctrl-names = "default";
+       pinctrl-0 = <&mcspi1_pins>;
+};
+
+&mcspi2 {
+       status = "okay";
+       pinctrl-names = "default";
+       pinctrl-0 = <&mcspi2_pins>;
+};
+
+&uart1 {
+       status = "okay";
+       pinctrl-names = "default";
+       pinctrl-0 = <&uart1_pins>;
+};
+
+&uart2 {
+       status = "okay";
+       pinctrl-names = "default";
+       pinctrl-0 = <&uart2_pins>;
+};
+
+&uart3 {
+       status = "okay";
+       pinctrl-names = "default";
+       pinctrl-0 = <&uart3_pins>;
+};
+
+&mmc1 {
+       status = "okay";
+       vmmc-supply = <&ldo1_reg>;
+       bus-width = <4>;
+};
+
+&mmc2 {
+       status = "okay";
+       vmmc-supply = <&mmc2_3v3>;
+       bus-width = <8>;
+};
diff --git a/arch/arm/boot/dts/dra7.dtsi b/arch/arm/boot/dts/dra7.dtsi
new file mode 100644 (file)
index 0000000..c01ef76
--- /dev/null
@@ -0,0 +1,575 @@
+/*
+ * Copyright (C) 2013 Texas Instruments Incorporated - http://www.ti.com/
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ * Based on "omap4.dtsi"
+ */
+
+#include <dt-bindings/interrupt-controller/arm-gic.h>
+#include <dt-bindings/pinctrl/dra.h>
+
+#include "skeleton.dtsi"
+
+/ {
+       #address-cells = <1>;
+       #size-cells = <1>;
+
+       compatible = "ti,dra7xx";
+       interrupt-parent = <&gic>;
+
+       aliases {
+               serial0 = &uart1;
+               serial1 = &uart2;
+               serial2 = &uart3;
+               serial3 = &uart4;
+               serial4 = &uart5;
+               serial5 = &uart6;
+       };
+
+       cpus {
+               #address-cells = <1>;
+               #size-cells = <0>;
+
+               cpu@0 {
+                       device_type = "cpu";
+                       compatible = "arm,cortex-a15";
+                       reg = <0>;
+               };
+               cpu@1 {
+                       device_type = "cpu";
+                       compatible = "arm,cortex-a15";
+                       reg = <1>;
+               };
+       };
+
+       timer {
+               compatible = "arm,armv7-timer";
+               interrupts = <GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(2) | IRQ_TYPE_LEVEL_LOW)>,
+                            <GIC_PPI 14 (GIC_CPU_MASK_SIMPLE(2) | IRQ_TYPE_LEVEL_LOW)>,
+                            <GIC_PPI 11 (GIC_CPU_MASK_SIMPLE(2) | IRQ_TYPE_LEVEL_LOW)>,
+                            <GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(2) | IRQ_TYPE_LEVEL_LOW)>;
+       };
+
+       gic: interrupt-controller@48211000 {
+               compatible = "arm,cortex-a15-gic";
+               interrupt-controller;
+               #interrupt-cells = <3>;
+               reg = <0x48211000 0x1000>,
+                     <0x48212000 0x1000>,
+                     <0x48214000 0x2000>,
+                     <0x48216000 0x2000>;
+               interrupts = <GIC_PPI 9 (GIC_CPU_MASK_SIMPLE(2) | IRQ_TYPE_LEVEL_HIGH)>;
+       };
+
+       /*
+        * The soc node represents the soc top level view. It is uses for IPs
+        * that are not memory mapped in the MPU view or for the MPU itself.
+        */
+       soc {
+               compatible = "ti,omap-infra";
+               mpu {
+                       compatible = "ti,omap5-mpu";
+                       ti,hwmods = "mpu";
+               };
+       };
+
+       /*
+        * XXX: Use a flat representation of the SOC interconnect.
+        * The real OMAP interconnect network is quite complex.
+        * Since that will not bring real advantage to represent that in DT for
+        * the moment, just use a fake OCP bus entry to represent the whole bus
+        * hierarchy.
+        */
+       ocp {
+               compatible = "ti,omap4-l3-noc", "simple-bus";
+               #address-cells = <1>;
+               #size-cells = <1>;
+               ranges;
+               ti,hwmods = "l3_main_1", "l3_main_2";
+               reg = <0x44000000 0x2000>,
+                     <0x44800000 0x3000>;
+               interrupts = <GIC_SPI 9 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 10 IRQ_TYPE_LEVEL_HIGH>;
+
+               counter32k: counter@4ae04000 {
+                       compatible = "ti,omap-counter32k";
+                       reg = <0x4ae04000 0x40>;
+                       ti,hwmods = "counter_32k";
+               };
+
+               dra7_pmx_core: pinmux@4a003400 {
+                       compatible = "pinctrl-single";
+                       reg = <0x4a003400 0x0464>;
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       pinctrl-single,register-width = <32>;
+                       pinctrl-single,function-mask = <0x3fffffff>;
+               };
+
+               sdma: dma-controller@4a056000 {
+                       compatible = "ti,omap4430-sdma";
+                       reg = <0x4a056000 0x1000>;
+                       interrupts = <GIC_SPI 12 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 13 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 14 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 15 IRQ_TYPE_LEVEL_HIGH>;
+                       #dma-cells = <1>;
+                       #dma-channels = <32>;
+                       #dma-requests = <127>;
+               };
+
+               gpio1: gpio@4ae10000 {
+                       compatible = "ti,omap4-gpio";
+                       reg = <0x4ae10000 0x200>;
+                       interrupts = <GIC_SPI 29 IRQ_TYPE_LEVEL_HIGH>;
+                       ti,hwmods = "gpio1";
+                       gpio-controller;
+                       #gpio-cells = <2>;
+                       interrupt-controller;
+                       #interrupt-cells = <1>;
+               };
+
+               gpio2: gpio@48055000 {
+                       compatible = "ti,omap4-gpio";
+                       reg = <0x48055000 0x200>;
+                       interrupts = <GIC_SPI 30 IRQ_TYPE_LEVEL_HIGH>;
+                       ti,hwmods = "gpio2";
+                       gpio-controller;
+                       #gpio-cells = <2>;
+                       interrupt-controller;
+                       #interrupt-cells = <1>;
+               };
+
+               gpio3: gpio@48057000 {
+                       compatible = "ti,omap4-gpio";
+                       reg = <0x48057000 0x200>;
+                       interrupts = <GIC_SPI 31 IRQ_TYPE_LEVEL_HIGH>;
+                       ti,hwmods = "gpio3";
+                       gpio-controller;
+                       #gpio-cells = <2>;
+                       interrupt-controller;
+                       #interrupt-cells = <1>;
+               };
+
+               gpio4: gpio@48059000 {
+                       compatible = "ti,omap4-gpio";
+                       reg = <0x48059000 0x200>;
+                       interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>;
+                       ti,hwmods = "gpio4";
+                       gpio-controller;
+                       #gpio-cells = <2>;
+                       interrupt-controller;
+                       #interrupt-cells = <1>;
+               };
+
+               gpio5: gpio@4805b000 {
+                       compatible = "ti,omap4-gpio";
+                       reg = <0x4805b000 0x200>;
+                       interrupts = <GIC_SPI 33 IRQ_TYPE_LEVEL_HIGH>;
+                       ti,hwmods = "gpio5";
+                       gpio-controller;
+                       #gpio-cells = <2>;
+                       interrupt-controller;
+                       #interrupt-cells = <1>;
+               };
+
+               gpio6: gpio@4805d000 {
+                       compatible = "ti,omap4-gpio";
+                       reg = <0x4805d000 0x200>;
+                       interrupts = <GIC_SPI 34 IRQ_TYPE_LEVEL_HIGH>;
+                       ti,hwmods = "gpio6";
+                       gpio-controller;
+                       #gpio-cells = <2>;
+                       interrupt-controller;
+                       #interrupt-cells = <1>;
+               };
+
+               gpio7: gpio@48051000 {
+                       compatible = "ti,omap4-gpio";
+                       reg = <0x48051000 0x200>;
+                       interrupts = <GIC_SPI 35 IRQ_TYPE_LEVEL_HIGH>;
+                       ti,hwmods = "gpio7";
+                       gpio-controller;
+                       #gpio-cells = <2>;
+                       interrupt-controller;
+                       #interrupt-cells = <1>;
+               };
+
+               gpio8: gpio@48053000 {
+                       compatible = "ti,omap4-gpio";
+                       reg = <0x48053000 0x200>;
+                       interrupts = <GIC_SPI 121 IRQ_TYPE_LEVEL_HIGH>;
+                       ti,hwmods = "gpio8";
+                       gpio-controller;
+                       #gpio-cells = <2>;
+                       interrupt-controller;
+                       #interrupt-cells = <1>;
+               };
+
+               uart1: serial@4806a000 {
+                       compatible = "ti,omap4-uart";
+                       reg = <0x4806a000 0x100>;
+                       interrupts = <GIC_SPI 72 IRQ_TYPE_LEVEL_HIGH>;
+                       ti,hwmods = "uart1";
+                       clock-frequency = <48000000>;
+                       status = "disabled";
+               };
+
+               uart2: serial@4806c000 {
+                       compatible = "ti,omap4-uart";
+                       reg = <0x4806c000 0x100>;
+                       interrupts = <GIC_SPI 73 IRQ_TYPE_LEVEL_HIGH>;
+                       ti,hwmods = "uart2";
+                       clock-frequency = <48000000>;
+                       status = "disabled";
+               };
+
+               uart3: serial@48020000 {
+                       compatible = "ti,omap4-uart";
+                       reg = <0x48020000 0x100>;
+                       interrupts = <GIC_SPI 74 IRQ_TYPE_LEVEL_HIGH>;
+                       ti,hwmods = "uart3";
+                       clock-frequency = <48000000>;
+                       status = "disabled";
+               };
+
+               uart4: serial@4806e000 {
+                       compatible = "ti,omap4-uart";
+                       reg = <0x4806e000 0x100>;
+                       interrupts = <GIC_SPI 70 IRQ_TYPE_LEVEL_HIGH>;
+                       ti,hwmods = "uart4";
+                       clock-frequency = <48000000>;
+                        status = "disabled";
+               };
+
+               uart5: serial@48066000 {
+                       compatible = "ti,omap4-uart";
+                       reg = <0x48066000 0x100>;
+                       interrupts = <GIC_SPI 105 IRQ_TYPE_LEVEL_HIGH>;
+                       ti,hwmods = "uart5";
+                       clock-frequency = <48000000>;
+                       status = "disabled";
+               };
+
+               uart6: serial@48068000 {
+                       compatible = "ti,omap4-uart";
+                       reg = <0x48068000 0x100>;
+                       interrupts = <GIC_SPI 106 IRQ_TYPE_LEVEL_HIGH>;
+                       ti,hwmods = "uart6";
+                       clock-frequency = <48000000>;
+                       status = "disabled";
+               };
+
+               uart7: serial@48420000 {
+                       compatible = "ti,omap4-uart";
+                       reg = <0x48420000 0x100>;
+                       ti,hwmods = "uart7";
+                       clock-frequency = <48000000>;
+                       status = "disabled";
+               };
+
+               uart8: serial@48422000 {
+                       compatible = "ti,omap4-uart";
+                       reg = <0x48422000 0x100>;
+                       ti,hwmods = "uart8";
+                       clock-frequency = <48000000>;
+                       status = "disabled";
+               };
+
+               uart9: serial@48424000 {
+                       compatible = "ti,omap4-uart";
+                       reg = <0x48424000 0x100>;
+                       ti,hwmods = "uart9";
+                       clock-frequency = <48000000>;
+                       status = "disabled";
+               };
+
+               uart10: serial@4ae2b000 {
+                       compatible = "ti,omap4-uart";
+                       reg = <0x4ae2b000 0x100>;
+                       ti,hwmods = "uart10";
+                       clock-frequency = <48000000>;
+                       status = "disabled";
+               };
+
+               timer1: timer@4ae18000 {
+                       compatible = "ti,omap5430-timer";
+                       reg = <0x4ae18000 0x80>;
+                       interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>;
+                       ti,hwmods = "timer1";
+                       ti,timer-alwon;
+               };
+
+               timer2: timer@48032000 {
+                       compatible = "ti,omap5430-timer";
+                       reg = <0x48032000 0x80>;
+                       interrupts = <GIC_SPI 38 IRQ_TYPE_LEVEL_HIGH>;
+                       ti,hwmods = "timer2";
+               };
+
+               timer3: timer@48034000 {
+                       compatible = "ti,omap5430-timer";
+                       reg = <0x48034000 0x80>;
+                       interrupts = <GIC_SPI 39 IRQ_TYPE_LEVEL_HIGH>;
+                       ti,hwmods = "timer3";
+               };
+
+               timer4: timer@48036000 {
+                       compatible = "ti,omap5430-timer";
+                       reg = <0x48036000 0x80>;
+                       interrupts = <GIC_SPI 40 IRQ_TYPE_LEVEL_HIGH>;
+                       ti,hwmods = "timer4";
+               };
+
+               timer5: timer@48820000 {
+                       compatible = "ti,omap5430-timer";
+                       reg = <0x48820000 0x80>;
+                       interrupts = <GIC_SPI 41 IRQ_TYPE_LEVEL_HIGH>;
+                       ti,hwmods = "timer5";
+                       ti,timer-dsp;
+               };
+
+               timer6: timer@48822000 {
+                       compatible = "ti,omap5430-timer";
+                       reg = <0x48822000 0x80>;
+                       interrupts = <GIC_SPI 42 IRQ_TYPE_LEVEL_HIGH>;
+                       ti,hwmods = "timer6";
+                       ti,timer-dsp;
+                       ti,timer-pwm;
+               };
+
+               timer7: timer@48824000 {
+                       compatible = "ti,omap5430-timer";
+                       reg = <0x48824000 0x80>;
+                       interrupts = <GIC_SPI 43 IRQ_TYPE_LEVEL_HIGH>;
+                       ti,hwmods = "timer7";
+                       ti,timer-dsp;
+               };
+
+               timer8: timer@48826000 {
+                       compatible = "ti,omap5430-timer";
+                       reg = <0x48826000 0x80>;
+                       interrupts = <GIC_SPI 44 IRQ_TYPE_LEVEL_HIGH>;
+                       ti,hwmods = "timer8";
+                       ti,timer-dsp;
+                       ti,timer-pwm;
+               };
+
+               timer9: timer@4803e000 {
+                       compatible = "ti,omap5430-timer";
+                       reg = <0x4803e000 0x80>;
+                       interrupts = <GIC_SPI 45 IRQ_TYPE_LEVEL_HIGH>;
+                       ti,hwmods = "timer9";
+               };
+
+               timer10: timer@48086000 {
+                       compatible = "ti,omap5430-timer";
+                       reg = <0x48086000 0x80>;
+                       interrupts = <GIC_SPI 46 IRQ_TYPE_LEVEL_HIGH>;
+                       ti,hwmods = "timer10";
+               };
+
+               timer11: timer@48088000 {
+                       compatible = "ti,omap5430-timer";
+                       reg = <0x48088000 0x80>;
+                       interrupts = <GIC_SPI 47 IRQ_TYPE_LEVEL_HIGH>;
+                       ti,hwmods = "timer11";
+                       ti,timer-pwm;
+               };
+
+               timer13: timer@48828000 {
+                       compatible = "ti,omap5430-timer";
+                       reg = <0x48828000 0x80>;
+                       ti,hwmods = "timer13";
+                       status = "disabled";
+               };
+
+               timer14: timer@4882a000 {
+                       compatible = "ti,omap5430-timer";
+                       reg = <0x4882a000 0x80>;
+                       ti,hwmods = "timer14";
+                       status = "disabled";
+               };
+
+               timer15: timer@4882c000 {
+                       compatible = "ti,omap5430-timer";
+                       reg = <0x4882c000 0x80>;
+                       ti,hwmods = "timer15";
+                       status = "disabled";
+               };
+
+               timer16: timer@4882e000 {
+                       compatible = "ti,omap5430-timer";
+                       reg = <0x4882e000 0x80>;
+                       ti,hwmods = "timer16";
+                       status = "disabled";
+               };
+
+               wdt2: wdt@4ae14000 {
+                       compatible = "ti,omap4-wdt";
+                       reg = <0x4ae14000 0x80>;
+                       interrupts = <GIC_SPI 80 IRQ_TYPE_LEVEL_HIGH>;
+                       ti,hwmods = "wd_timer2";
+               };
+
+               i2c1: i2c@48070000 {
+                       compatible = "ti,omap4-i2c";
+                       reg = <0x48070000 0x100>;
+                       interrupts = <GIC_SPI 56 IRQ_TYPE_LEVEL_HIGH>;
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       ti,hwmods = "i2c1";
+                       status = "disabled";
+               };
+
+               i2c2: i2c@48072000 {
+                       compatible = "ti,omap4-i2c";
+                       reg = <0x48072000 0x100>;
+                       interrupts = <GIC_SPI 57 IRQ_TYPE_LEVEL_HIGH>;
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       ti,hwmods = "i2c2";
+                       status = "disabled";
+               };
+
+               i2c3: i2c@48060000 {
+                       compatible = "ti,omap4-i2c";
+                       reg = <0x48060000 0x100>;
+                       interrupts = <GIC_SPI 61 IRQ_TYPE_LEVEL_HIGH>;
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       ti,hwmods = "i2c3";
+                       status = "disabled";
+               };
+
+               i2c4: i2c@4807a000 {
+                       compatible = "ti,omap4-i2c";
+                       reg = <0x4807a000 0x100>;
+                       interrupts = <GIC_SPI 62 IRQ_TYPE_LEVEL_HIGH>;
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       ti,hwmods = "i2c4";
+                       status = "disabled";
+               };
+
+               i2c5: i2c@4807c000 {
+                       compatible = "ti,omap4-i2c";
+                       reg = <0x4807c000 0x100>;
+                       interrupts = <GIC_SPI 60 IRQ_TYPE_LEVEL_HIGH>;
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       ti,hwmods = "i2c5";
+                       status = "disabled";
+               };
+
+               mmc1: mmc@4809c000 {
+                       compatible = "ti,omap4-hsmmc";
+                       reg = <0x4809c000 0x400>;
+                       interrupts = <GIC_SPI 83 IRQ_TYPE_LEVEL_HIGH>;
+                       ti,hwmods = "mmc1";
+                       ti,dual-volt;
+                       ti,needs-special-reset;
+                       dmas = <&sdma 61>, <&sdma 62>;
+                       dma-names = "tx", "rx";
+                       status = "disabled";
+               };
+
+               mmc2: mmc@480b4000 {
+                       compatible = "ti,omap4-hsmmc";
+                       reg = <0x480b4000 0x400>;
+                       interrupts = <GIC_SPI 86 IRQ_TYPE_LEVEL_HIGH>;
+                       ti,hwmods = "mmc2";
+                       ti,needs-special-reset;
+                       dmas = <&sdma 47>, <&sdma 48>;
+                       dma-names = "tx", "rx";
+                       status = "disabled";
+               };
+
+               mmc3: mmc@480ad000 {
+                       compatible = "ti,omap4-hsmmc";
+                       reg = <0x480ad000 0x400>;
+                       interrupts = <GIC_SPI 94 IRQ_TYPE_LEVEL_HIGH>;
+                       ti,hwmods = "mmc3";
+                       ti,needs-special-reset;
+                       dmas = <&sdma 77>, <&sdma 78>;
+                       dma-names = "tx", "rx";
+                       status = "disabled";
+               };
+
+               mmc4: mmc@480d1000 {
+                       compatible = "ti,omap4-hsmmc";
+                       reg = <0x480d1000 0x400>;
+                       interrupts = <GIC_SPI 96 IRQ_TYPE_LEVEL_HIGH>;
+                       ti,hwmods = "mmc4";
+                       ti,needs-special-reset;
+                       dmas = <&sdma 57>, <&sdma 58>;
+                       dma-names = "tx", "rx";
+                       status = "disabled";
+               };
+
+               mcspi1: spi@48098000 {
+                       compatible = "ti,omap4-mcspi";
+                       reg = <0x48098000 0x200>;
+                       interrupts = <GIC_SPI 65 IRQ_TYPE_LEVEL_HIGH>;
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       ti,hwmods = "mcspi1";
+                       ti,spi-num-cs = <4>;
+                       dmas = <&sdma 35>,
+                              <&sdma 36>,
+                              <&sdma 37>,
+                              <&sdma 38>,
+                              <&sdma 39>,
+                              <&sdma 40>,
+                              <&sdma 41>,
+                              <&sdma 42>;
+                       dma-names = "tx0", "rx0", "tx1", "rx1",
+                                   "tx2", "rx2", "tx3", "rx3";
+                       status = "disabled";
+               };
+
+               mcspi2: spi@4809a000 {
+                       compatible = "ti,omap4-mcspi";
+                       reg = <0x4809a000 0x200>;
+                       interrupts = <GIC_SPI 66 IRQ_TYPE_LEVEL_HIGH>;
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       ti,hwmods = "mcspi2";
+                       ti,spi-num-cs = <2>;
+                       dmas = <&sdma 43>,
+                              <&sdma 44>,
+                              <&sdma 45>,
+                              <&sdma 46>;
+                       dma-names = "tx0", "rx0", "tx1", "rx1";
+                       status = "disabled";
+               };
+
+               mcspi3: spi@480b8000 {
+                       compatible = "ti,omap4-mcspi";
+                       reg = <0x480b8000 0x200>;
+                       interrupts = <GIC_SPI 91 IRQ_TYPE_LEVEL_HIGH>;
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       ti,hwmods = "mcspi3";
+                       ti,spi-num-cs = <2>;
+                       dmas = <&sdma 15>, <&sdma 16>;
+                       dma-names = "tx0", "rx0";
+                       status = "disabled";
+               };
+
+               mcspi4: spi@480ba000 {
+                       compatible = "ti,omap4-mcspi";
+                       reg = <0x480ba000 0x200>;
+                       interrupts = <GIC_SPI 48 IRQ_TYPE_LEVEL_HIGH>;
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       ti,hwmods = "mcspi4";
+                       ti,spi-num-cs = <1>;
+                       dmas = <&sdma 70>, <&sdma 71>;
+                       dma-names = "tx0", "rx0";
+                       status = "disabled";
+               };
+       };
+};
index e8559b753c9de009595bcc6f4f7dc981b131bbee..bc22557d7a6a977b3cce656c115eb31e1d060398 100644 (file)
                bootargs = "console=ttyAMA0";
        };
 
+       psci {
+               compatible      = "arm,psci";
+               method          = "smc";
+               cpu_suspend     = <0x84000002>;
+               cpu_off         = <0x84000004>;
+               cpu_on          = <0x84000006>;
+       };
+
        soc {
                #address-cells = <1>;
                #size-cells = <1>;
diff --git a/arch/arm/boot/dts/emev2-kzm9d-reference.dts b/arch/arm/boot/dts/emev2-kzm9d-reference.dts
deleted file mode 100644 (file)
index cceefda..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Device Tree Source for the KZM9D board
- *
- * Copyright (C) 2013 Renesas Solutions Corp.
- *
- * This file is licensed under the terms of the GNU General Public License
- * version 2.  This program is licensed "as is" without any warranty of any
- * kind, whether express or implied.
- */
-/dts-v1/;
-
-/include/ "emev2.dtsi"
-
-/ {
-       model = "EMEV2 KZM9D Board";
-       compatible = "renesas,kzm9d-reference", "renesas,emev2";
-
-       memory {
-               device_type = "memory";
-               reg = <0x40000000 0x8000000>;
-       };
-
-       chosen {
-               bootargs = "console=ttyS1,115200n81 ignore_loglevel root=/dev/nfs ip=dhcp";
-       };
-
-       reg_1p8v: regulator@0 {
-               compatible = "regulator-fixed";
-               regulator-name = "fixed-1.8V";
-               regulator-min-microvolt = <1800000>;
-               regulator-max-microvolt = <1800000>;
-               regulator-always-on;
-               regulator-boot-on;
-       };
-
-       reg_3p3v: regulator@1 {
-               compatible = "regulator-fixed";
-               regulator-name = "fixed-3.3V";
-               regulator-min-microvolt = <3300000>;
-               regulator-max-microvolt = <3300000>;
-               regulator-always-on;
-               regulator-boot-on;
-       };
-
-       lan9220@20000000 {
-               compatible = "smsc,lan9220", "smsc,lan9115";
-               reg = <0x20000000 0x10000>;
-               phy-mode = "mii";
-               interrupt-parent = <&gpio0>;
-               interrupts = <1 1>;     /* active high */
-               reg-io-width = <4>;
-               smsc,irq-active-high;
-               smsc,irq-push-pull;
-               vddvario-supply = <&reg_1p8v>;
-               vdd33a-supply = <&reg_3p3v>;
-       };
-};
index f92e812fdd9f3f5b00c7fc0f187e3b75eb90e8b4..861aa7d6fc7dbc480c0b9d6b185d6a291d38fcd2 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Device Tree Source for the KZM9D board
  *
- * Copyright (C) 2012 Renesas Solutions Corp.
+ * Copyright (C) 2013 Renesas Solutions Corp.
  *
  * This file is licensed under the terms of the GNU General Public License
  * version 2.  This program is licensed "as is" without any warranty of any
        chosen {
                bootargs = "console=ttyS1,115200n81 ignore_loglevel root=/dev/nfs ip=dhcp";
        };
+
+       reg_1p8v: regulator@0 {
+               compatible = "regulator-fixed";
+               regulator-name = "fixed-1.8V";
+               regulator-min-microvolt = <1800000>;
+               regulator-max-microvolt = <1800000>;
+               regulator-always-on;
+               regulator-boot-on;
+       };
+
+       reg_3p3v: regulator@1 {
+               compatible = "regulator-fixed";
+               regulator-name = "fixed-3.3V";
+               regulator-min-microvolt = <3300000>;
+               regulator-max-microvolt = <3300000>;
+               regulator-always-on;
+               regulator-boot-on;
+       };
+
+       lan9220@20000000 {
+               compatible = "smsc,lan9220", "smsc,lan9115";
+               reg = <0x20000000 0x10000>;
+               phy-mode = "mii";
+               interrupt-parent = <&gpio0>;
+               interrupts = <1 1>;     /* active high */
+               reg-io-width = <4>;
+               smsc,irq-active-high;
+               smsc,irq-push-pull;
+               vddvario-supply = <&reg_1p8v>;
+               vdd33a-supply = <&reg_3p3v>;
+       };
 };
index 382d8c7e290602058fd9f2609ba2d1646461da7c..46378fee2a13f358a7bf841163f1479852ea021a 100644 (file)
                                };
 
                                buck1_reg: BUCK1 {
-                                       regulator-name = "VDD_ARM_1.2V";
+                                       /*
+                                       * HACK: The real name is VDD_ARM_1.2V,
+                                       * but exynos-cpufreq does not support
+                                       * DT-based regulator lookup yet.
+                                       */
+                                       regulator-name = "vdd_arm";
                                        regulator-min-microvolt = <950000>;
                                        regulator-max-microvolt = <1350000>;
                                        regulator-always-on;
index 1c164f234bcca89892c7a05fa3d8012a86cffd22..63cc571ca30794b04f53239efc5f8393af8f3022 100644 (file)
                                };
 
                                varm_breg: BUCK1 {
-                                    regulator-name = "VARM_1.2V_C210";
+                                    /*
+                                     * HACK: The real name is VARM_1.2V_C210,
+                                     * but exynos-cpufreq does not support
+                                     * DT-based regulator lookup yet.
+                                     */
+                                    regulator-name = "vdd_arm";
                                     regulator-min-microvolt = <900000>;
                                     regulator-max-microvolt = <1350000>;
                                     regulator-always-on;
index 889cdada1ce9c92bce9550474ab04fb34f33fe5f..d2e3f5f5916dad4c325ab4dc3f71ff0ef34d9b39 100644 (file)
                status = "okay";
        };
 };
+
+&mdma1 {
+       reg = <0x12840000 0x1000>;
+};
index 724a22f9b1c8f732513321becc6c7f6e65f4cb7d..9a49e6804ae15587f13a3bb6c0052e3968e27a19 100644 (file)
                        samsung,pins = "gpa0-2", "gpa0-3";
                        samsung,pin-function = <2>;
                        samsung,pin-pud = <0>;
-                       samaung,pin-drv = <0>;
+                       samsung,pin-drv = <0>;
                };
 
                i2c2_bus: i2c2-bus {
                        samsung,pins = "gpa0-6", "gpa0-7";
                        samsung,pin-function = <3>;
                        samsung,pin-pud = <3>;
-                       samaung,pin-drv = <0>;
+                       samsung,pin-drv = <0>;
                };
 
                i2c2_hs_bus: i2c2-hs-bus {
                        samsung,pins = "gpa0-6", "gpa0-7";
                        samsung,pin-function = <4>;
                        samsung,pin-pud = <3>;
-                       samaung,pin-drv = <0>;
+                       samsung,pin-drv = <0>;
                };
 
                uart2_data: uart2-data {
                        samsung,pins = "gpa1-2", "gpa1-3";
                        samsung,pin-function = <2>;
                        samsung,pin-pud = <0>;
-                       samaung,pin-drv = <0>;
+                       samsung,pin-drv = <0>;
                };
 
                i2c3_bus: i2c3-bus {
                        samsung,pins = "gpa1-2", "gpa1-3";
                        samsung,pin-function = <3>;
                        samsung,pin-pud = <3>;
-                       samaung,pin-drv = <0>;
+                       samsung,pin-drv = <0>;
                };
 
                i2c3_hs_bus: i2c3-hs-bus {
                        samsung,pins = "gpa1-2", "gpa1-3";
                        samsung,pin-function = <4>;
                        samsung,pin-pud = <3>;
-                       samaung,pin-drv = <0>;
+                       samsung,pin-drv = <0>;
                };
 
                uart3_data: uart3-data {
                        samsung,pins = "gpa2-0", "gpa2-1";
                        samsung,pin-function = <3>;
                        samsung,pin-pud = <3>;
-                       samaung,pin-drv = <0>;
+                       samsung,pin-drv = <0>;
                };
 
                i2c5_bus: i2c5-bus {
                        samsung,pins = "gpa2-2", "gpa2-3";
                        samsung,pin-function = <3>;
                        samsung,pin-pud = <3>;
-                       samaung,pin-drv = <0>;
+                       samsung,pin-drv = <0>;
                };
 
                spi1_bus: spi1-bus {
                        samsung,pins = "gpb3-0", "gpb3-1";
                        samsung,pin-function = <4>;
                        samsung,pin-pud = <3>;
-                       samaung,pin-drv = <0>;
+                       samsung,pin-drv = <0>;
                };
 
                i2c1_hs_bus: i2c1-hs-bus {
                        samsung,pins = "gpb3-2", "gpb3-3";
                        samsung,pin-function = <4>;
                        samsung,pin-pud = <3>;
-                       samaung,pin-drv = <0>;
+                       samsung,pin-drv = <0>;
                };
 
                sd0_clk: sd0-clk {
                        samsung,pins = "gpd0-2", "gpd0-3";
                        samsung,pin-function = <2>;
                        samsung,pin-pud = <0>;
-                       samaung,pin-drv = <0>;
+                       samsung,pin-drv = <0>;
                };
 
                dp_hpd: dp_hpd {
                        samsung,pins = "gpx0-7";
                        samsung,pin-function = <3>;
                        samsung,pin-pud = <0>;
-                       samaung,pin-drv = <0>;
+                       samsung,pin-drv = <0>;
                };
        };
 
                                       "gpf1-0", "gpf1-1", "gpf1-2", "gpf1-3";
                        samsung,pin-function = <3>;
                        samsung,pin-pud = <0>;
-                       samaung,pin-drv = <0>;
+                       samsung,pin-drv = <0>;
                };
 
                cam_i2c2_bus: cam-i2c2-bus {
                        samsung,pins = "gpe0-6", "gpe1-0";
                        samsung,pin-function = <4>;
                        samsung,pin-pud = <3>;
-                       samaung,pin-drv = <0>;
+                       samsung,pin-drv = <0>;
                };
 
                cam_spi1_bus: cam-spi1-bus {
                        samsung,pins = "gpe0-4", "gpe0-5", "gpf0-2", "gpf0-3";
                        samsung,pin-function = <4>;
                        samsung,pin-pud = <0>;
-                       samaung,pin-drv = <0>;
+                       samsung,pin-drv = <0>;
                };
 
                cam_i2c1_bus: cam-i2c1-bus {
                        samsung,pins = "gpf0-2", "gpf0-3";
                        samsung,pin-function = <2>;
                        samsung,pin-pud = <3>;
-                       samaung,pin-drv = <0>;
+                       samsung,pin-drv = <0>;
                };
 
                cam_i2c0_bus: cam-i2c0-bus {
                        samsung,pins = "gpf0-0", "gpf0-1";
                        samsung,pin-function = <2>;
                        samsung,pin-pud = <3>;
-                       samaung,pin-drv = <0>;
+                       samsung,pin-drv = <0>;
                };
 
                cam_spi0_bus: cam-spi0-bus {
                        samsung,pins = "gpf1-0", "gpf1-1", "gpf1-2", "gpf1-3";
                        samsung,pin-function = <2>;
                        samsung,pin-pud = <0>;
-                       samaung,pin-drv = <0>;
+                       samsung,pin-drv = <0>;
                };
 
                cam_bayrgb_bus: cam-bayrgb-bus {
                                       "gpg2-0", "gpg2-1";
                        samsung,pin-function = <2>;
                        samsung,pin-pud = <0>;
-                       samaung,pin-drv = <0>;
+                       samsung,pin-drv = <0>;
                };
 
                cam_port_a: cam-port-a {
                                       "gph1-4", "gph1-5", "gph1-6", "gph1-7";
                        samsung,pin-function = <2>;
                        samsung,pin-pud = <0>;
-                       samaung,pin-drv = <0>;
+                       samsung,pin-drv = <0>;
                };
        };
 
                                       "gpv1-4", "gpv1-5", "gpv1-6", "gpv1-7";
                        samsung,pin-function = <2>;
                        samsung,pin-pud = <0>;
-                       samaung,pin-drv = <0>;
+                       samsung,pin-drv = <0>;
                };
 
                c2c_txd: c2c-txd {
                                       "gpv3-4", "gpv3-5", "gpv3-6", "gpv3-7";
                        samsung,pin-function = <2>;
                        samsung,pin-pud = <0>;
-                       samaung,pin-drv = <0>;
+                       samsung,pin-drv = <0>;
                };
        };
 
index 5b22508050dad3f63c8a1fd8e57d692510a55ea3..777fb1c2c70f322b00b3075472a8a412e5c42509 100644 (file)
@@ -17,7 +17,7 @@
        compatible = "samsung,sd5v1", "samsung,exynos5440";
 
        chosen {
-               bootargs = "root=/dev/sda2 rw rootwait ignore_loglevel early_printk no_console_suspend mem=2048M@0x80000000 mem=6144M@0x100000000 console=ttySAC0,115200";
+               bootargs = "root=/dev/sda2 rw rootwait ignore_loglevel earlyprintk no_console_suspend mem=2048M@0x80000000 mem=6144M@0x100000000 console=ttySAC0,115200";
        };
 
        fixed-rate-clocks {
index ede772741f81c13a2d6e62d3963b7219cb6196c8..a7cb84884cfbf48ef1b174e1f9ac1f9a323a3f69 100644 (file)
@@ -17,7 +17,7 @@
        compatible = "samsung,ssdk5440", "samsung,exynos5440";
 
        chosen {
-               bootargs = "root=/dev/sda2 rw rootwait ignore_loglevel early_printk no_console_suspend mem=2048M@0x80000000 mem=6144M@0x100000000 console=ttySAC0,115200";
+               bootargs = "root=/dev/sda2 rw rootwait ignore_loglevel earlyprintk no_console_suspend mem=2048M@0x80000000 mem=6144M@0x100000000 console=ttySAC0,115200";
        };
 
        spi_0: spi@D0000 {
index 813b91d7bea25f58288e1a5dc783734af0789f2c..0f06f8687b0bb46581be1b75dce84a4f93e303e5 100644 (file)
@@ -5,6 +5,11 @@
 /include/ "skeleton.dtsi"
 
 / {
+       core-module@10000000 {
+               compatible = "arm,core-module-integrator";
+               reg = <0x10000000 0x200>;
+       };
+
        timer@13000000 {
                reg = <0x13000000 0x100>;
                interrupt-parent = <&pic>;
index b6b82eca8d1e8f2ecd2869aa90b4fd58f8da9afa..e6be9315ff0a54033e07daba296399b8f45112ca 100644 (file)
        };
 
        syscon {
-               /* AP system controller registers */
+               compatible = "arm,integrator-ap-syscon";
                reg = <0x11000000 0x100>;
+               interrupt-parent = <&pic>;
+               /* These are the logical module IRQs */
+               interrupts = <9>, <10>, <11>, <12>;
        };
 
        timer0: timer@13000000 {
index ff1aea0ee04322bf26688e1bf8892b60b02a69ce..7deb3a3182b42513d95bfdf34894692425a62c43 100644 (file)
@@ -9,29 +9,28 @@
        model = "ARM Integrator/CP";
        compatible = "arm,integrator-cp";
 
-       aliases {
-               arm,timer-primary = &timer2;
-               arm,timer-secondary = &timer1;
-       };
-
        chosen {
                bootargs = "root=/dev/ram0 console=ttyAMA0,38400n8 earlyprintk";
        };
 
-       cpcon {
-               /* CP controller registers */
+       syscon {
+               compatible = "arm,integrator-cp-syscon";
                reg = <0xcb000000 0x100>;
        };
 
        timer0: timer@13000000 {
+               /* TIMER0 runs @ 25MHz */
                compatible = "arm,integrator-cp-timer";
+               status = "disabled";
        };
 
        timer1: timer@13000100 {
+               /* TIMER1 runs @ 1MHz */
                compatible = "arm,integrator-cp-timer";
        };
 
        timer2: timer@13000200 {
+               /* TIMER2 runs @ 1MHz */
                compatible = "arm,integrator-cp-timer";
        };
 
diff --git a/arch/arm/boot/dts/keystone-clocks.dtsi b/arch/arm/boot/dts/keystone-clocks.dtsi
new file mode 100644 (file)
index 0000000..d6713b1
--- /dev/null
@@ -0,0 +1,821 @@
+/*
+ * Device Tree Source for Keystone 2 clock tree
+ *
+ * Copyright (C) 2013 Texas Instruments, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+clocks {
+       #address-cells = <1>;
+       #size-cells = <1>;
+       ranges;
+
+       refclkmain: refclkmain {
+               #clock-cells = <0>;
+               compatible = "fixed-clock";
+               clock-frequency = <122880000>;
+               clock-output-names = "refclk-main";
+       };
+
+       mainpllclk: mainpllclk@2310110 {
+               #clock-cells = <0>;
+               compatible = "ti,keystone,main-pll-clock";
+               clocks = <&refclkmain>;
+               reg = <0x02620350 4>, <0x02310110 4>;
+               reg-names = "control", "multiplier";
+               fixed-postdiv = <2>;
+       };
+
+       papllclk: papllclk@2620358 {
+               #clock-cells = <0>;
+               compatible = "ti,keystone,pll-clock";
+               clocks = <&refclkmain>;
+               clock-output-names = "pa-pll-clk";
+               reg = <0x02620358 4>;
+               reg-names = "control";
+               fixed-postdiv = <6>;
+       };
+
+       ddr3allclk: ddr3apllclk@2620360 {
+               #clock-cells = <0>;
+               compatible = "ti,keystone,pll-clock";
+               clocks = <&refclkmain>;
+               clock-output-names = "ddr-3a-pll-clk";
+               reg = <0x02620360 4>;
+               reg-names = "control";
+               fixed-postdiv = <6>;
+       };
+
+       ddr3bllclk: ddr3bpllclk@2620368 {
+               #clock-cells = <0>;
+               compatible = "ti,keystone,pll-clock";
+               clocks = <&refclkmain>;
+               clock-output-names = "ddr-3b-pll-clk";
+               reg = <0x02620368 4>;
+               reg-names = "control";
+               fixed-postdiv = <6>;
+       };
+
+       armpllclk: armpllclk@2620370 {
+               #clock-cells = <0>;
+               compatible = "ti,keystone,pll-clock";
+               clocks = <&refclkmain>;
+               clock-output-names = "arm-pll-clk";
+               reg = <0x02620370 4>;
+               reg-names = "control";
+               fixed-postdiv = <6>;
+       };
+
+       mainmuxclk: mainmuxclk@2310108 {
+               #clock-cells = <0>;
+               compatible = "ti,keystone,pll-mux-clock";
+               clocks = <&mainpllclk>, <&refclkmain>;
+               reg = <0x02310108 4>;
+               bit-shift = <23>;
+               bit-mask = <1>;
+               clock-output-names = "mainmuxclk";
+       };
+
+       chipclk1: chipclk1 {
+               #clock-cells = <0>;
+               compatible = "fixed-factor-clock";
+               clocks = <&mainmuxclk>;
+               clock-div = <1>;
+               clock-mult = <1>;
+               clock-output-names = "chipclk1";
+       };
+
+       chipclk1rstiso: chipclk1rstiso {
+               #clock-cells = <0>;
+               compatible = "fixed-factor-clock";
+               clocks = <&mainmuxclk>;
+               clock-div = <1>;
+               clock-mult = <1>;
+               clock-output-names = "chipclk1rstiso";
+       };
+
+       gemtraceclk: gemtraceclk@2310120 {
+               #clock-cells = <0>;
+               compatible = "ti,keystone,pll-divider-clock";
+               clocks = <&mainmuxclk>;
+               reg = <0x02310120 4>;
+               bit-shift = <0>;
+               bit-mask = <8>;
+               clock-output-names = "gemtraceclk";
+       };
+
+       chipstmxptclk: chipstmxptclk {
+               #clock-cells = <0>;
+               compatible = "ti,keystone,pll-divider-clock";
+               clocks = <&mainmuxclk>;
+               reg = <0x02310164 4>;
+               bit-shift = <0>;
+               bit-mask = <8>;
+               clock-output-names = "chipstmxptclk";
+       };
+
+       chipclk12: chipclk12 {
+               #clock-cells = <0>;
+               compatible = "fixed-factor-clock";
+               clocks = <&chipclk1>;
+               clock-div = <2>;
+               clock-mult = <1>;
+               clock-output-names = "chipclk12";
+       };
+
+       chipclk13: chipclk13 {
+               #clock-cells = <0>;
+               compatible = "fixed-factor-clock";
+               clocks = <&chipclk1>;
+               clock-div = <3>;
+               clock-mult = <1>;
+               clock-output-names = "chipclk13";
+       };
+
+       chipclk14: chipclk14 {
+               #clock-cells = <0>;
+               compatible = "fixed-factor-clock";
+               clocks = <&chipclk1>;
+               clock-div = <4>;
+               clock-mult = <1>;
+               clock-output-names = "chipclk14";
+       };
+
+       chipclk16: chipclk16 {
+               #clock-cells = <0>;
+               compatible = "fixed-factor-clock";
+               clocks = <&chipclk1>;
+               clock-div = <6>;
+               clock-mult = <1>;
+               clock-output-names = "chipclk16";
+       };
+
+       chipclk112: chipclk112 {
+               #clock-cells = <0>;
+               compatible = "fixed-factor-clock";
+               clocks = <&chipclk1>;
+               clock-div = <12>;
+               clock-mult = <1>;
+               clock-output-names = "chipclk112";
+       };
+
+       chipclk124: chipclk124 {
+               #clock-cells = <0>;
+               compatible = "fixed-factor-clock";
+               clocks = <&chipclk1>;
+               clock-div = <24>;
+               clock-mult = <1>;
+               clock-output-names = "chipclk114";
+       };
+
+       chipclk1rstiso13: chipclk1rstiso13 {
+               #clock-cells = <0>;
+               compatible = "fixed-factor-clock";
+               clocks = <&chipclk1rstiso>;
+               clock-div = <3>;
+               clock-mult = <1>;
+               clock-output-names = "chipclk1rstiso13";
+       };
+
+       chipclk1rstiso14: chipclk1rstiso14 {
+               #clock-cells = <0>;
+               compatible = "fixed-factor-clock";
+               clocks = <&chipclk1rstiso>;
+               clock-div = <4>;
+               clock-mult = <1>;
+               clock-output-names = "chipclk1rstiso14";
+       };
+
+       chipclk1rstiso16: chipclk1rstiso16 {
+               #clock-cells = <0>;
+               compatible = "fixed-factor-clock";
+               clocks = <&chipclk1rstiso>;
+               clock-div = <6>;
+               clock-mult = <1>;
+               clock-output-names = "chipclk1rstiso16";
+       };
+
+       chipclk1rstiso112: chipclk1rstiso112 {
+               #clock-cells = <0>;
+               compatible = "fixed-factor-clock";
+               clocks = <&chipclk1rstiso>;
+               clock-div = <12>;
+               clock-mult = <1>;
+               clock-output-names = "chipclk1rstiso112";
+       };
+
+       clkmodrst0: clkmodrst0 {
+               #clock-cells = <0>;
+               compatible = "ti,keystone,psc-clock";
+               clocks = <&chipclk16>;
+               clock-output-names = "modrst0";
+               reg = <0x02350000 0xb00>, <0x02350000 0x400>;
+               reg-names = "control", "domain";
+               domain-id = <0>;
+       };
+
+
+       clkusb: clkusb {
+               #clock-cells = <0>;
+               compatible = "ti,keystone,psc-clock";
+               clocks = <&chipclk16>;
+               clock-output-names = "usb";
+               reg = <0x02350008 0xb00>, <0x02350000 0x400>;
+               reg-names = "control", "domain";
+               domain-id = <0>;
+       };
+
+       clkaemifspi: clkaemifspi {
+               #clock-cells = <0>;
+               compatible = "ti,keystone,psc-clock";
+               clocks = <&chipclk16>;
+               clock-output-names = "aemif-spi";
+               reg = <0x0235000c 0xb00>, <0x02350000 0x400>;
+               reg-names = "control", "domain";
+               domain-id = <0>;
+       };
+
+
+       clkdebugsstrc: clkdebugsstrc {
+               #clock-cells = <0>;
+               compatible = "ti,keystone,psc-clock";
+               clocks = <&chipclk13>;
+               clock-output-names = "debugss-trc";
+               reg = <0x02350014 0xb00>, <0x02350000 0x400>;
+               reg-names = "control", "domain";
+               domain-id = <0>;
+       };
+
+       clktetbtrc: clktetbtrc {
+               #clock-cells = <0>;
+               compatible = "ti,keystone,psc-clock";
+               clocks = <&chipclk13>;
+               clock-output-names = "tetb-trc";
+               reg = <0x02350018 0xb00>, <0x02350004 0x400>;
+               reg-names = "control", "domain";
+               domain-id = <1>;
+       };
+
+       clkpa: clkpa {
+               #clock-cells = <0>;
+               compatible = "ti,keystone,psc-clock";
+               clocks = <&chipclk16>;
+               clock-output-names = "pa";
+               reg = <0x0235001c 0xb00>, <0x02350008 0x400>;
+               reg-names = "control", "domain";
+               domain-id = <2>;
+       };
+
+       clkcpgmac: clkcpgmac {
+               #clock-cells = <0>;
+               compatible = "ti,keystone,psc-clock";
+               clocks = <&clkpa>;
+               clock-output-names = "cpgmac";
+               reg = <0x02350020 0xb00>, <0x02350008 0x400>;
+               reg-names = "control", "domain";
+               domain-id = <2>;
+       };
+
+       clksa: clksa {
+               #clock-cells = <0>;
+               compatible = "ti,keystone,psc-clock";
+               clocks = <&clkpa>;
+               clock-output-names = "sa";
+               reg = <0x02350024 0xb00>, <0x02350008 0x400>;
+               reg-names = "control", "domain";
+               domain-id = <2>;
+       };
+
+       clkpcie: clkpcie {
+               #clock-cells = <0>;
+               compatible = "ti,keystone,psc-clock";
+               clocks = <&chipclk12>;
+               clock-output-names = "pcie";
+               reg = <0x02350028 0xb00>, <0x0235000c 0x400>;
+               reg-names = "control", "domain";
+               domain-id = <3>;
+       };
+
+       clksrio: clksrio {
+               #clock-cells = <0>;
+               compatible = "ti,keystone,psc-clock";
+               clocks = <&chipclk1rstiso13>;
+               clock-output-names = "srio";
+               reg = <0x0235002c 0xb00>, <0x02350010 0x400>;
+               reg-names = "control", "domain";
+               domain-id = <4>;
+       };
+
+       clkhyperlink0: clkhyperlink0 {
+               #clock-cells = <0>;
+               compatible = "ti,keystone,psc-clock";
+               clocks = <&chipclk12>;
+               clock-output-names = "hyperlink-0";
+               reg = <0x02350030 0xb00>, <0x02350014 0x400>;
+               reg-names = "control", "domain";
+               domain-id = <5>;
+       };
+
+       clksr: clksr {
+               #clock-cells = <0>;
+               compatible = "ti,keystone,psc-clock";
+               clocks = <&chipclk1rstiso112>;
+               clock-output-names = "sr";
+               reg = <0x02350034 0xb00>, <0x02350018 0x400>;
+               reg-names = "control", "domain";
+               domain-id = <6>;
+       };
+
+       clkmsmcsram: clkmsmcsram {
+               #clock-cells = <0>;
+               compatible = "ti,keystone,psc-clock";
+               clocks = <&chipclk1>;
+               clock-output-names = "msmcsram";
+               reg = <0x02350038 0xb00>, <0x0235001c 0x400>;
+               reg-names = "control", "domain";
+               domain-id = <7>;
+       };
+
+       clkgem0: clkgem0 {
+               #clock-cells = <0>;
+               compatible = "ti,keystone,psc-clock";
+               clocks = <&chipclk1>;
+               clock-output-names = "gem0";
+               reg = <0x0235003c 0xb00>, <0x02350020 0x400>;
+               reg-names = "control", "domain";
+               domain-id = <8>;
+       };
+
+       clkgem1: clkgem1 {
+               #clock-cells = <0>;
+               compatible = "ti,keystone,psc-clock";
+               clocks = <&chipclk1>;
+               clock-output-names = "gem1";
+               reg = <0x02350040 0xb00>, <0x02350024 0x400>;
+               reg-names = "control", "domain";
+               domain-id = <9>;
+       };
+
+       clkgem2: clkgem2 {
+               #clock-cells = <0>;
+               compatible = "ti,keystone,psc-clock";
+               clocks = <&chipclk1>;
+               clock-output-names = "gem2";
+               reg = <0x02350044 0xb00>, <0x02350028 0x400>;
+               reg-names = "control", "domain";
+               domain-id = <10>;
+       };
+
+       clkgem3: clkgem3 {
+               #clock-cells = <0>;
+               compatible = "ti,keystone,psc-clock";
+               clocks = <&chipclk1>;
+               clock-output-names = "gem3";
+               reg = <0x02350048 0xb00>, <0x0235002c 0x400>;
+               reg-names = "control", "domain";
+               domain-id = <11>;
+       };
+
+       clkgem4: clkgem4 {
+               #clock-cells = <0>;
+               compatible = "ti,keystone,psc-clock";
+               clocks = <&chipclk1>;
+               clock-output-names = "gem4";
+               reg = <0x0235004c 0xb00>, <0x02350030 0x400>;
+               reg-names = "control", "domain";
+               domain-id = <12>;
+       };
+
+       clkgem5: clkgem5 {
+               #clock-cells = <0>;
+               compatible = "ti,keystone,psc-clock";
+               clocks = <&chipclk1>;
+               clock-output-names = "gem5";
+               reg = <0x02350050 0xb00>, <0x02350034 0x400>;
+               reg-names = "control", "domain";
+               domain-id = <13>;
+       };
+
+       clkgem6: clkgem6 {
+               #clock-cells = <0>;
+               compatible = "ti,keystone,psc-clock";
+               clocks = <&chipclk1>;
+               clock-output-names = "gem6";
+               reg = <0x02350054 0xb00>, <0x02350038 0x400>;
+               reg-names = "control", "domain";
+               domain-id = <14>;
+       };
+
+       clkgem7: clkgem7 {
+               #clock-cells = <0>;
+               compatible = "ti,keystone,psc-clock";
+               clocks = <&chipclk1>;
+               clock-output-names = "gem7";
+               reg = <0x02350058 0xb00>, <0x0235003c 0x400>;
+               reg-names = "control", "domain";
+               domain-id = <15>;
+       };
+
+       clkddr30: clkddr30 {
+               #clock-cells = <0>;
+               compatible = "ti,keystone,psc-clock";
+               clocks = <&chipclk12>;
+               clock-output-names = "ddr3-0";
+               reg = <0x0235005c 0xb00>, <0x02350040 0x400>;
+               reg-names = "control", "domain";
+               domain-id = <16>;
+       };
+
+       clkddr31: clkddr31 {
+               #clock-cells = <0>;
+               compatible = "ti,keystone,psc-clock";
+               clocks = <&chipclk13>;
+               clock-output-names = "ddr3-1";
+               reg = <0x02350060 0xb00>, <0x02350040 0x400>;
+               reg-names = "control", "domain";
+               domain-id = <16>;
+       };
+
+       clktac: clktac {
+               #clock-cells = <0>;
+               compatible = "ti,keystone,psc-clock";
+               clocks = <&chipclk13>;
+               clock-output-names = "tac";
+               reg = <0x02350064 0xb00>, <0x02350044 0x400>;
+               reg-names = "control", "domain";
+               domain-id = <17>;
+       };
+
+       clkrac01: clktac01 {
+               #clock-cells = <0>;
+               compatible = "ti,keystone,psc-clock";
+               clocks = <&chipclk13>;
+               clock-output-names = "rac-01";
+               reg = <0x02350068 0xb00>, <0x02350044 0x400>;
+               reg-names = "control", "domain";
+               domain-id = <17>;
+       };
+
+       clkrac23: clktac23 {
+               #clock-cells = <0>;
+               compatible = "ti,keystone,psc-clock";
+               clocks = <&chipclk13>;
+               clock-output-names = "rac-23";
+               reg = <0x0235006c 0xb00>, <0x02350048 0x400>;
+               reg-names = "control", "domain";
+               domain-id = <18>;
+       };
+
+       clkfftc0: clkfftc0 {
+               #clock-cells = <0>;
+               compatible = "ti,keystone,psc-clock";
+               clocks = <&chipclk13>;
+               clock-output-names = "fftc-0";
+               reg = <0x02350070 0xb00>, <0x0235004c 0x400>;
+               reg-names = "control", "domain";
+               domain-id = <19>;
+       };
+
+       clkfftc1: clkfftc1 {
+               #clock-cells = <0>;
+               compatible = "ti,keystone,psc-clock";
+               clocks = <&chipclk13>;
+               clock-output-names = "fftc-1";
+               reg = <0x02350074 0xb00>, <0x023504c0 0x400>;
+               reg-names = "control", "domain";
+               domain-id = <19>;
+       };
+
+       clkfftc2: clkfftc2 {
+               #clock-cells = <0>;
+               compatible = "ti,keystone,psc-clock";
+               clocks = <&chipclk13>;
+               clock-output-names = "fftc-2";
+               reg = <0x02350078 0xb00>, <0x02350050 0x400>;
+               reg-names = "control", "domain";
+               domain-id = <20>;
+       };
+
+       clkfftc3: clkfftc3 {
+               #clock-cells = <0>;
+               compatible = "ti,keystone,psc-clock";
+               clocks = <&chipclk13>;
+               clock-output-names = "fftc-3";
+               reg = <0x0235007c 0xb00>, <0x02350050 0x400>;
+               reg-names = "control", "domain";
+               domain-id = <20>;
+       };
+
+       clkfftc4: clkfftc4 {
+               #clock-cells = <0>;
+               compatible = "ti,keystone,psc-clock";
+               clocks = <&chipclk13>;
+               clock-output-names = "fftc-4";
+               reg = <0x02350080 0xb00>, <0x02350050 0x400>;
+               reg-names = "control", "domain";
+               domain-id = <20>;
+       };
+
+       clkfftc5: clkfftc5 {
+               #clock-cells = <0>;
+               compatible = "ti,keystone,psc-clock";
+               clocks = <&chipclk13>;
+               clock-output-names = "fftc-5";
+               reg = <0x02350084 0xb00>, <0x02350050 0x400>;
+               reg-names = "control", "domain";
+               domain-id = <20>;
+       };
+
+       clkaif: clkaif {
+               #clock-cells = <0>;
+               compatible = "ti,keystone,psc-clock";
+               clocks = <&chipclk13>;
+               clock-output-names = "aif";
+               reg = <0x02350088 0xb00>, <0x02350054 0x400>;
+               reg-names = "control", "domain";
+               domain-id = <21>;
+       };
+
+       clktcp3d0: clktcp3d0 {
+               #clock-cells = <0>;
+               compatible = "ti,keystone,psc-clock";
+               clocks = <&chipclk13>;
+               clock-output-names = "tcp3d-0";
+               reg = <0x0235008c 0xb00>, <0x02350058 0x400>;
+               reg-names = "control", "domain";
+               domain-id = <22>;
+       };
+
+       clktcp3d1: clktcp3d1 {
+               #clock-cells = <0>;
+               compatible = "ti,keystone,psc-clock";
+               clocks = <&chipclk13>;
+               clock-output-names = "tcp3d-1";
+               reg = <0x02350090 0xb00>, <0x02350058 0x400>;
+               reg-names = "control", "domain";
+               domain-id = <22>;
+       };
+
+       clktcp3d2: clktcp3d2 {
+               #clock-cells = <0>;
+               compatible = "ti,keystone,psc-clock";
+               clocks = <&chipclk13>;
+               clock-output-names = "tcp3d-2";
+               reg = <0x02350094 0xb00>, <0x0235005c 0x400>;
+               reg-names = "control", "domain";
+               domain-id = <23>;
+       };
+
+       clktcp3d3: clktcp3d3 {
+               #clock-cells = <0>;
+               compatible = "ti,keystone,psc-clock";
+               clocks = <&chipclk13>;
+               clock-output-names = "tcp3d-3";
+               reg = <0x02350098 0xb00>, <0x0235005c 0x400>;
+               reg-names = "control", "domain";
+               domain-id = <23>;
+       };
+
+       clkvcp0: clkvcp0 {
+               #clock-cells = <0>;
+               compatible = "ti,keystone,psc-clock";
+               clocks = <&chipclk13>;
+               clock-output-names = "vcp-0";
+               reg = <0x0235009c 0xb00>, <0x02350060 0x400>;
+               reg-names = "control", "domain";
+               domain-id = <24>;
+       };
+
+       clkvcp1: clkvcp1 {
+               #clock-cells = <0>;
+               compatible = "ti,keystone,psc-clock";
+               clocks = <&chipclk13>;
+               clock-output-names = "vcp-1";
+               reg = <0x023500a0 0xb00>, <0x02350060 0x400>;
+               reg-names = "control", "domain";
+               domain-id = <24>;
+       };
+
+       clkvcp2: clkvcp2 {
+               #clock-cells = <0>;
+               compatible = "ti,keystone,psc-clock";
+               clocks = <&chipclk13>;
+               clock-output-names = "vcp-2";
+               reg = <0x023500a4 0xb00>, <0x02350060 0x400>;
+               reg-names = "control", "domain";
+               domain-id = <24>;
+       };
+
+       clkvcp3: clkvcp3 {
+               #clock-cells = <0>;
+               compatible = "ti,keystone,psc-clock";
+               clocks = <&chipclk13>;
+               clock-output-names = "vcp-3";
+               reg = <0x0235000a8 0xb00>, <0x02350060 0x400>;
+               reg-names = "control", "domain";
+               domain-id = <24>;
+       };
+
+       clkvcp4: clkvcp4 {
+               #clock-cells = <0>;
+               compatible = "ti,keystone,psc-clock";
+               clocks = <&chipclk13>;
+               clock-output-names = "vcp-4";
+               reg = <0x023500ac 0xb00>, <0x02350064 0x400>;
+               reg-names = "control", "domain";
+               domain-id = <25>;
+       };
+
+       clkvcp5: clkvcp5 {
+               #clock-cells = <0>;
+               compatible = "ti,keystone,psc-clock";
+               clocks = <&chipclk13>;
+               clock-output-names = "vcp-5";
+               reg = <0x023500b0 0xb00>, <0x02350064 0x400>;
+               reg-names = "control", "domain";
+               domain-id = <25>;
+       };
+
+       clkvcp6: clkvcp6 {
+               #clock-cells = <0>;
+               compatible = "ti,keystone,psc-clock";
+               clocks = <&chipclk13>;
+               clock-output-names = "vcp-6";
+               reg = <0x023500b4 0xb00>, <0x02350064 0x400>;
+               reg-names = "control", "domain";
+               domain-id = <25>;
+       };
+
+       clkvcp7: clkvcp7 {
+               #clock-cells = <0>;
+               compatible = "ti,keystone,psc-clock";
+               clocks = <&chipclk13>;
+               clock-output-names = "vcp-7";
+               reg = <0x023500b8 0xb00>, <0x02350064 0x400>;
+               reg-names = "control", "domain";
+               domain-id = <25>;
+       };
+
+       clkbcp: clkbcp {
+               #clock-cells = <0>;
+               compatible = "ti,keystone,psc-clock";
+               clocks = <&chipclk13>;
+               clock-output-names = "bcp";
+               reg = <0x023500bc 0xb00>, <0x02350068 0x400>;
+               reg-names = "control", "domain";
+               domain-id = <26>;
+       };
+
+       clkdxb: clkdxb {
+               #clock-cells = <0>;
+               compatible = "ti,keystone,psc-clock";
+               clocks = <&chipclk13>;
+               clock-output-names = "dxb";
+               reg = <0x023500c0 0xb00>, <0x0235006c 0x400>;
+               reg-names = "control", "domain";
+               domain-id = <27>;
+       };
+
+       clkhyperlink1: clkhyperlink1 {
+               #clock-cells = <0>;
+               compatible = "ti,keystone,psc-clock";
+               clocks = <&chipclk12>;
+               clock-output-names = "hyperlink-1";
+               reg = <0x023500c4 0xb00>, <0x02350070 0x400>;
+               reg-names = "control", "domain";
+               domain-id = <28>;
+       };
+
+       clkxge: clkxge {
+               #clock-cells = <0>;
+               compatible = "ti,keystone,psc-clock";
+               clocks = <&chipclk13>;
+               clock-output-names = "xge";
+               reg = <0x023500c8 0xb00>, <0x02350074 0x400>;
+               reg-names = "control", "domain";
+               domain-id = <29>;
+       };
+
+       clkwdtimer0: clkwdtimer0 {
+               #clock-cells = <0>;
+               compatible = "ti,keystone,psc-clock";
+               clocks = <&clkmodrst0>;
+               clock-output-names = "timer0";
+               reg = <0x02350000 0xb00>, <0x02350000 0x400>;
+               reg-names = "control", "domain";
+               domain-id = <0>;
+       };
+
+       clkwdtimer1: clkwdtimer1 {
+               #clock-cells = <0>;
+               compatible = "ti,keystone,psc-clock";
+               clocks = <&clkmodrst0>;
+               clock-output-names = "timer1";
+               reg = <0x02350000 0xb00>, <0x02350000 0x400>;
+               reg-names = "control", "domain";
+               domain-id = <0>;
+       };
+
+       clkwdtimer2: clkwdtimer2 {
+               #clock-cells = <0>;
+               compatible = "ti,keystone,psc-clock";
+               clocks = <&clkmodrst0>;
+               clock-output-names = "timer2";
+               reg = <0x02350000 0xb00>, <0x02350000 0x400>;
+               reg-names = "control", "domain";
+               domain-id = <0>;
+       };
+
+       clkwdtimer3: clkwdtimer3 {
+               #clock-cells = <0>;
+               compatible = "ti,keystone,psc-clock";
+               clocks = <&clkmodrst0>;
+               clock-output-names = "timer3";
+               reg = <0x02350000 0xb00>, <0x02350000 0x400>;
+               reg-names = "control", "domain";
+               domain-id = <0>;
+       };
+
+       clkuart0: clkuart0 {
+               #clock-cells = <0>;
+               compatible = "ti,keystone,psc-clock";
+               clocks = <&clkmodrst0>;
+               clock-output-names = "uart0";
+               reg = <0x02350000 0xb00>, <0x02350000 0x400>;
+               reg-names = "control", "domain";
+               domain-id = <0>;
+       };
+
+       clkuart1: clkuart1 {
+               #clock-cells = <0>;
+               compatible = "ti,keystone,psc-clock";
+               clocks = <&clkmodrst0>;
+               clock-output-names = "uart1";
+               reg = <0x02350000 0xb00>, <0x02350000 0x400>;
+               reg-names = "control", "domain";
+               domain-id = <0>;
+       };
+
+       clkaemif: clkaemif {
+               #clock-cells = <0>;
+               compatible = "ti,keystone,psc-clock";
+               clocks = <&clkaemifspi>;
+               clock-output-names = "aemif";
+               reg = <0x02350000 0xb00>, <0x02350000 0x400>;
+               reg-names = "control", "domain";
+               domain-id = <0>;
+       };
+
+       clkusim: clkusim {
+               #clock-cells = <0>;
+               compatible = "ti,keystone,psc-clock";
+               clocks = <&clkmodrst0>;
+               clock-output-names = "usim";
+               reg = <0x02350000 0xb00>, <0x02350000 0x400>;
+               reg-names = "control", "domain";
+               domain-id = <0>;
+       };
+
+       clki2c: clki2c {
+               #clock-cells = <0>;
+               compatible = "ti,keystone,psc-clock";
+               clocks = <&clkmodrst0>;
+               clock-output-names = "i2c";
+               reg = <0x02350000 0xb00>, <0x02350000 0x400>;
+               reg-names = "control", "domain";
+               domain-id = <0>;
+       };
+
+       clkspi: clkspi {
+               #clock-cells = <0>;
+               compatible = "ti,keystone,psc-clock";
+               clocks = <&clkaemifspi>;
+               clock-output-names = "spi";
+               reg = <0x02350000 0xb00>, <0x02350000 0x400>;
+               reg-names = "control", "domain";
+               domain-id = <0>;
+       };
+
+       clkgpio: clkgpio {
+               #clock-cells = <0>;
+               compatible = "ti,keystone,psc-clock";
+               clocks = <&clkmodrst0>;
+               clock-output-names = "gpio";
+               reg = <0x02350000 0xb00>, <0x02350000 0x400>;
+               reg-names = "control", "domain";
+               domain-id = <0>;
+       };
+
+       clkkeymgr: clkkeymgr {
+               #clock-cells = <0>;
+               compatible = "ti,keystone,psc-clock";
+               clocks = <&clkmodrst0>;
+               clock-output-names = "keymgr";
+               reg = <0x02350000 0xb00>, <0x02350000 0x400>;
+               reg-names = "control", "domain";
+               domain-id = <0>;
+       };
+};
index a68e34bbecb2628d21fcfb018cb9567f722efc3b..100bdf52b8478d61b558750924b845842ad32a83 100644 (file)
                        reg = <0x023100e8 4>;   /* pll reset control reg */
                };
 
+               /include/ "keystone-clocks.dtsi"
+
                uart0: serial@02530c00 {
                        compatible = "ns16550a";
                        current-speed = <115200>;
                        reg-shift = <2>;
                        reg-io-width = <4>;
                        reg = <0x02530c00 0x100>;
-                       clock-frequency = <133120000>;
+                       clocks  = <&clkuart0>;
                        interrupts = <GIC_SPI 277 IRQ_TYPE_EDGE_RISING>;
                };
 
                        reg-shift = <2>;
                        reg-io-width = <4>;
                        reg = <0x02531000 0x100>;
-                       clock-frequency = <133120000>;
+                       clocks  = <&clkuart1>;
                        interrupts = <GIC_SPI 280 IRQ_TYPE_EDGE_RISING>;
                };
 
+               i2c0: i2c@2530000 {
+                       compatible = "ti,davinci-i2c";
+                       reg = <0x02530000 0x400>;
+                       clock-frequency = <100000>;
+                       clocks = <&clki2c>;
+                       interrupts = <GIC_SPI 283 IRQ_TYPE_EDGE_RISING>;
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+
+                       dtt@50 {
+                               compatible = "at,24c1024";
+                               reg = <0x50>;
+                       };
+               };
+
+               i2c1: i2c@2530400 {
+                       compatible = "ti,davinci-i2c";
+                       reg = <0x02530400 0x400>;
+                       clock-frequency = <100000>;
+                       clocks = <&clki2c>;
+                       interrupts = <GIC_SPI 286 IRQ_TYPE_EDGE_RISING>;
+               };
+
+               i2c2: i2c@2530800 {
+                       compatible = "ti,davinci-i2c";
+                       reg = <0x02530800 0x400>;
+                       clock-frequency = <100000>;
+                       clocks = <&clki2c>;
+                       interrupts = <GIC_SPI 289 IRQ_TYPE_EDGE_RISING>;
+               };
+
+               spi0: spi@21000400 {
+                       compatible = "ti,dm6441-spi";
+                       reg = <0x21000400 0x200>;
+                       num-cs = <4>;
+                       ti,davinci-spi-intr-line = <0>;
+                       interrupts = <GIC_SPI 292 IRQ_TYPE_EDGE_RISING>;
+                       clocks = <&clkspi>;
+               };
+
+               spi1: spi@21000600 {
+                       compatible = "ti,dm6441-spi";
+                       reg = <0x21000600 0x200>;
+                       num-cs = <4>;
+                       ti,davinci-spi-intr-line = <0>;
+                       interrupts = <GIC_SPI 296 IRQ_TYPE_EDGE_RISING>;
+                       clocks = <&clkspi>;
+               };
+
+               spi2: spi@21000800 {
+                       compatible = "ti,dm6441-spi";
+                       reg = <0x21000800 0x200>;
+                       num-cs = <4>;
+                       ti,davinci-spi-intr-line = <0>;
+                       interrupts = <GIC_SPI 300 IRQ_TYPE_EDGE_RISING>;
+                       clocks = <&clkspi>;
+               };
        };
 };
index 72c4b0a0366ffcd656f16456c430b067ff814b5a..c39dd766c75a03caf11e0a79e71d3a25778fd33b 100644 (file)
@@ -19,7 +19,6 @@
        compatible = "marvell,db-88f6281-bp", "marvell,kirkwood-88f6281", "marvell,kirkwood";
 
        mbus {
-               ranges = <MBUS_ID(0xf0, 0x01) 0 0xf1000000 0x100000>;
                pcie-controller {
                        status = "okay";
 
index 36c411d349268e41e05d220f3d56e2d82553506e..701c6b6cdaa2ffd82b49ac2a0fe145e1e9d626a5 100644 (file)
@@ -19,7 +19,6 @@
        compatible = "marvell,db-88f6282-bp", "marvell,kirkwood-88f6282", "marvell,kirkwood";
 
        mbus {
-               ranges = <MBUS_ID(0xf0, 0x01) 0 0xf1000000 0x100000>;
                pcie-controller {
                        status = "okay";
 
index c0e2a587917474a37a515ff7c70e133ee193f0ba..053aa20fb30f88a0e13be1878e9d9d6ba241c4c2 100644 (file)
                        status = "ok";
                };
 
-               nand@3000000 {
-                       pinctrl-0 = <&pmx_nand>;
-                       pinctrl-names = "default";
-                       chip-delay = <25>;
-                       status = "okay";
-
-                       partition@0 {
-                               label = "uboot";
-                               reg = <0x0 0x100000>;
-                       };
-
-                       partition@100000 {
-                               label = "uImage";
-                               reg = <0x100000 0x400000>;
-                       };
-
-                       partition@500000 {
-                               label = "root";
-                               reg = <0x500000 0x1fb00000>;
-                       };
-               };
-
                sata@80000 {
                        nr-ports = <2>;
                        status = "okay";
        };
 };
 
+&nand {
+       pinctrl-0 = <&pmx_nand>;
+       pinctrl-names = "default";
+       chip-delay = <25>;
+       status = "okay";
+
+       partition@0 {
+               label = "uboot";
+               reg = <0x0 0x100000>;
+       };
+
+       partition@100000 {
+               label = "uImage";
+               reg = <0x100000 0x400000>;
+       };
+
+       partition@500000 {
+               label = "root";
+               reg = <0x500000 0x1fb00000>;
+       };
+};
+
 &mdio {
        status = "okay";
 
index d544f77a4ca465ccc268b90d5edc9c1ca9aee490..aefa375a550d3ac0e7615cd76ba50e83c99ac094 100644 (file)
                        status = "okay";
                        nr-ports = <2>;
                };
-
-               nand@3000000 {
-                       pinctrl-0 = <&pmx_nand>;
-                       pinctrl-names = "default";
-                       status = "okay";
-                       chip-delay = <35>;
-
-                       partition@0 {
-                               label = "u-boot";
-                               reg = <0x0000000 0x100000>;
-                               read-only;
-                       };
-
-                       partition@100000 {
-                               label = "uImage";
-                               reg = <0x0100000 0x500000>;
-                       };
-
-                       partition@600000 {
-                               label = "ramdisk";
-                               reg = <0x0600000 0x500000>;
-                       };
-
-                       partition@b00000 {
-                               label = "image";
-                               reg = <0x0b00000 0x6600000>;
-                       };
-
-                       partition@7100000 {
-                               label = "mini firmware";
-                               reg = <0x7100000 0xa00000>;
-                       };
-
-                       partition@7b00000 {
-                               label = "config";
-                               reg = <0x7b00000 0x500000>;
-                       };
-               };
        };
 
        regulators {
        };
 };
 
+&nand {
+       pinctrl-0 = <&pmx_nand>;
+       pinctrl-names = "default";
+       status = "okay";
+       chip-delay = <35>;
+
+       partition@0 {
+               label = "u-boot";
+               reg = <0x0000000 0x100000>;
+               read-only;
+       };
+
+       partition@100000 {
+               label = "uImage";
+               reg = <0x0100000 0x500000>;
+       };
+
+       partition@600000 {
+               label = "ramdisk";
+               reg = <0x0600000 0x500000>;
+       };
+
+       partition@b00000 {
+               label = "image";
+               reg = <0x0b00000 0x6600000>;
+       };
+
+       partition@7100000 {
+               label = "mini firmware";
+               reg = <0x7100000 0xa00000>;
+       };
+
+       partition@7b00000 {
+               label = "config";
+               reg = <0x7b00000 0x500000>;
+       };
+};
+
 &mdio {
        status = "okay";
 
index 59a2117c35a7fe2dc68f2b5f7171810dd60532d1..33ff368fbfa5696353353fc5151b4fefd7cc6198 100644 (file)
                serial@12000 {
                        status = "ok";
                };
-
-               nand@3000000 {
-                       status = "okay";
-
-                       partition@0 {
-                               label = "u-boot";
-                               reg = <0x0000000 0x100000>;
-                               read-only;
-                       };
-
-                       partition@100000 {
-                               label = "uImage";
-                               reg = <0x0100000 0x400000>;
-                       };
-
-                       partition@500000 {
-                               label = "data";
-                               reg = <0x0500000 0xfb00000>;
-                       };
-               };
        };
        gpio-leds {
                compatible = "gpio-leds";
        };
 };
 
+&nand {
+       status = "okay";
+
+       partition@0 {
+               label = "u-boot";
+               reg = <0x0000000 0x100000>;
+               read-only;
+       };
+
+       partition@100000 {
+               label = "uImage";
+               reg = <0x0100000 0x400000>;
+       };
+
+       partition@500000 {
+               label = "data";
+               reg = <0x0500000 0xfb00000>;
+       };
+};
+
 &mdio {
        status = "okay";
 
index 6f7c7d7ecf2acf74bcd5a11f2122c30aea72fb3a..a43bebb251102fbbfcde84e58f1955ce52f5de5b 100644 (file)
                        status = "ok";
                };
 
-               nand@3000000 {
-                       chip-delay = <40>;
-                       status = "okay";
-
-                       partition@0 {
-                               label = "u-boot";
-                               reg = <0x0000000 0x100000>;
-                               read-only;
-                       };
-
-                       partition@100000 {
-                               label = "uImage";
-                               reg = <0x0100000 0x400000>;
-                       };
-
-                       partition@500000 {
-                               label = "pogoplug";
-                               reg = <0x0500000 0x2000000>;
-                       };
-
-                       partition@2500000 {
-                               label = "root";
-                               reg = <0x02500000 0xd800000>;
-                       };
-               };
                sata@80000 {
                        status = "okay";
                        nr-ports = <2>;
        };
 };
 
+&nand {
+       chip-delay = <40>;
+       status = "okay";
+
+       partition@0 {
+               label = "u-boot";
+               reg = <0x0000000 0x100000>;
+               read-only;
+       };
+
+       partition@100000 {
+               label = "uImage";
+               reg = <0x0100000 0x400000>;
+       };
+
+       partition@500000 {
+               label = "pogoplug";
+               reg = <0x0500000 0x2000000>;
+       };
+
+       partition@2500000 {
+               label = "root";
+               reg = <0x02500000 0xd800000>;
+       };
+};
+
 &mdio {
        status = "okay";
 
index 6548b9dc685560887f3771156f74987e5842d918..d30a91a5047d6939c2dfdd69989bde39c359f9b7 100644 (file)
                        status = "ok";
                };
 
-               nand@3000000 {
-                       status = "okay";
-
-                       partition@0 {
-                               label = "u-boot";
-                               reg = <0x00000000 0x00100000>;
-                               read-only;
-                       };
-
-                       partition@100000 {
-                               label = "uImage";
-                               reg = <0x00100000 0x00400000>;
-                       };
-
-                       partition@500000 {
-                               label = "data";
-                               reg = <0x00500000 0x1fb00000>;
-                       };
-               };
-
                sata@80000 {
                        status = "okay";
                        nr-ports = <1>;
        };
 };
 
+&nand {
+       status = "okay";
+
+       partition@0 {
+               label = "u-boot";
+               reg = <0x00000000 0x00100000>;
+               read-only;
+       };
+
+       partition@100000 {
+               label = "uImage";
+               reg = <0x00100000 0x00400000>;
+       };
+
+       partition@500000 {
+               label = "data";
+               reg = <0x00500000 0x1fb00000>;
+       };
+};
+
 &mdio {
        status = "okay";
 
index cb711a3bd9833f3061060783fe38357bbf65cce3..c5fb02f7ebc3e33107ac067d46a6394d6c21b27d 100644 (file)
@@ -5,7 +5,7 @@
 
 / {
        model = "RaidSonic ICY BOX IB-NAS62x0 (Rev B)";
-       compatible = "raidsonic,ib-nas6210-b", "raidsonic,ib-nas6220-b", "raidsonic,ib-nas6210", "raidsonic,ib-nas6220", "raidsonic,ib-nas62x0",  "marvell,kirkwood-88f6281", "marvell,kirkwood";
+       compatible = "raidsonic,ib-nas6210-b", "raidsonic,ib-nas6220-b", "raidsonic,ib-nas6210", "raidsonic,ib-nas6220", "raidsonic,ib-nas62x0", "marvell,kirkwood-88f6281", "marvell,kirkwood";
 
        memory {
                device_type = "memory";
@@ -43,6 +43,7 @@
                                marvell,function = "gpio";
                        };
                };
+
                serial@12000 {
                        status = "okay";
                };
                        status = "okay";
                        nr-ports = <2>;
                };
-
-               nand@3000000 {
-                       status = "okay";
-                       pinctrl-0 = <&pmx_nand>;
-                       pinctrl-names = "default";
-
-                       partition@0 {
-                               label = "u-boot";
-                               reg = <0x0000000 0x100000>;
-                       };
-
-                       partition@100000 {
-                               label = "uImage";
-                               reg = <0x0100000 0x600000>;
-                       };
-
-                       partition@700000 {
-                               label = "root";
-                               reg = <0x0700000 0xf900000>;
-                       };
-
-               };
        };
 
        gpio_keys {
@@ -93,6 +72,7 @@
                        gpios = <&gpio0 28 1>;
                };
        };
+
        gpio-leds {
                compatible = "gpio-leds";
                pinctrl-0 = <&pmx_led_os_red &pmx_led_os_green
                        gpios = <&gpio0 27 0>;
                };
        };
+
        gpio_poweroff {
                compatible = "gpio-poweroff";
                pinctrl-0 = <&pmx_power_off>;
                pinctrl-names = "default";
                gpios = <&gpio0 24 0>;
        };
+};
+
+&nand {
+       status = "okay";
+       pinctrl-0 = <&pmx_nand>;
+       pinctrl-names = "default";
+
+       partition@0 {
+               label = "u-boot";
+               reg = <0x0000000 0xe0000>;
+       };
 
+       partition@e0000 {
+               label = "u-boot environment";
+               reg = <0xe0000 0x100000>;
+       };
+
+       partition@100000 {
+               label = "uImage";
+               reg = <0x0100000 0x600000>;
+       };
+
+       partition@700000 {
+               label = "root";
+               reg = <0x0700000 0xf900000>;
+       };
 
 };
 
 
 &eth0 {
        status = "okay";
+
        ethernet0-port@0 {
                phy-handle = <&ethphy0>;
        };
index 0323f017eeedecbc9ea3acc64d632b16b15103cd..4a62b206f680b4c1261a404ce16ce26fb498f6c0 100644 (file)
@@ -19,7 +19,6 @@
        };
 
        mbus {
-               ranges = <MBUS_ID(0xf0, 0x01) 0 0xf1000000 0x100000>;
                pcie-controller {
                        status = "okay";
 
                serial@12000 {
                        status = "ok";
                };
-
-               nand@3000000 {
-                       status = "okay";
-
-                       partition@0 {
-                               label = "uboot";
-                               reg = <0x0000000 0xc0000>;
-                       };
-
-                       partition@a0000 {
-                               label = "env";
-                               reg = <0xa0000 0x20000>;
-                       };
-
-                       partition@100000 {
-                               label = "zImage";
-                               reg = <0x100000 0x300000>;
-                       };
-
-                       partition@540000 {
-                               label = "initrd";
-                               reg = <0x540000 0x300000>;
-                       };
-
-                       partition@980000 {
-                               label = "boot";
-                               reg = <0x980000 0x1f400000>;
-                       };
-               };
        };
 
        gpio-leds {
        };
 };
 
+&nand {
+       status = "okay";
+
+       partition@0 {
+               label = "uboot";
+               reg = <0x0000000 0xc0000>;
+       };
+
+       partition@a0000 {
+               label = "env";
+               reg = <0xa0000 0x20000>;
+       };
+
+       partition@100000 {
+               label = "zImage";
+               reg = <0x100000 0x300000>;
+       };
+
+       partition@540000 {
+               label = "initrd";
+               reg = <0x540000 0x300000>;
+       };
+
+       partition@980000 {
+               label = "boot";
+               reg = <0x980000 0x1f400000>;
+       };
+};
+
 &mdio {
        status = "okay";
 
index df8447442b37b406332766ece95f83677ea53819..d15395d671ededf4caf501518bb1e33ffba0cba8 100644 (file)
                        status = "ok";
                };
 
-               nand@3000000 {
-                       status = "okay";
-
-                       partition@0 {
-                               label = "u-boot";
-                               reg = <0x0000000 0x100000>;
-                               read-only;
-                       };
-
-                       partition@a0000 {
-                               label = "env";
-                               reg = <0xa0000 0x20000>;
-                               read-only;
-                       };
-
-                       partition@100000 {
-                               label = "uImage";
-                               reg = <0x100000 0x300000>;
-                       };
-
-                       partition@400000 {
-                               label = "uInitrd";
-                               reg = <0x540000 0x1000000>;
-                       };
-               };
                sata@80000 {
                        status = "okay";
                        nr-ports = <2>;
        };
 };
 
+&nand {
+       status = "okay";
+
+       partition@0 {
+               label = "u-boot";
+               reg = <0x0000000 0x100000>;
+               read-only;
+       };
+
+       partition@a0000 {
+               label = "env";
+               reg = <0xa0000 0x20000>;
+               read-only;
+       };
+
+       partition@100000 {
+               label = "uImage";
+               reg = <0x100000 0x300000>;
+       };
+
+       partition@400000 {
+               label = "uInitrd";
+               reg = <0x540000 0x1000000>;
+       };
+};
+
 &mdio {
        status = "okay";
 
index 6899408482d24c1cf2229add5ba8f63fd07f8645..cd44f37e54b5b7fb81f6c53f966abc9e3e511c8e 100644 (file)
                serial@12000 {
                        status = "ok";
                };
-
-               nand@3000000 {
-                       pinctrl-0 = <&pmx_nand>;
-                       pinctrl-names = "default";
-                       status = "ok";
-                       chip-delay = <25>;
-               };
        };
 
        i2c@0 {
        };
 };
 
+&nand {
+       pinctrl-0 = <&pmx_nand>;
+       pinctrl-names = "default";
+       status = "ok";
+       chip-delay = <25>;
+};
+
 &mdio {
        status = "okay";
 
index ce2b94b513dbe1dc20478e7b8287864a13c1cb89..6c1ec2786e6e2f77c334292bab84b4e24d4cfef6 100644 (file)
@@ -17,7 +17,6 @@
         };
 
        mbus {
-               ranges = <MBUS_ID(0xf0, 0x01) 0 0xf1000000 0x100000>;
                pcie-controller {
                        status = "okay";
 
                         pinctrl-names = "default";
                 };
 
-                nand@3000000 {
-                        pinctrl-0 = <&pmx_nand>;
-                        pinctrl-names = "default";
-                        status = "okay";
-
-                        partition@0 {
-                                label = "uboot";
-                                reg = <0x0000000 0x100000>;
-                        };
-
-                        partition@100000 {
-                                label = "env";
-                                reg = <0x100000 0x80000>;
-                        };
-
-                        partition@180000 {
-                                label = "fdt";
-                                reg = <0x180000 0x80000>;
-                        };
-
-                        partition@200000 {
-                                label = "kernel";
-                                reg = <0x200000 0x400000>;
-                        };
-
-                        partition@600000 {
-                                label = "rootfs";
-                                reg = <0x600000 0x1fa00000>;
-                        };
-                };
-
                rtc@10300 {
                        status = "disabled";
                };
        };
 };
 
+&nand {
+       pinctrl-0 = <&pmx_nand>;
+       pinctrl-names = "default";
+       status = "okay";
+
+       partition@0 {
+               label = "uboot";
+               reg = <0x0000000 0x100000>;
+       };
+
+       partition@100000 {
+               label = "env";
+               reg = <0x100000 0x80000>;
+       };
+
+       partition@180000 {
+               label = "fdt";
+               reg = <0x180000 0x80000>;
+       };
+
+       partition@200000 {
+               label = "kernel";
+               reg = <0x200000 0x400000>;
+       };
+
+       partition@600000 {
+               label = "rootfs";
+               reg = <0x600000 0x1fa00000>;
+       };
+};
+
 &mdio {
        status = "okay";
 
index 874857ea9cb8c8a80fc812609a2b3cd368cb40df..e6a102cf424cd646d9e121acd2b821ea46bb81be 100644 (file)
@@ -17,7 +17,6 @@
        };
 
        mbus {
-               ranges = <MBUS_ID(0xf0, 0x01) 0 0xf1000000 0x100000>;
                pcie-controller {
                        status = "okay";
 
                        status = "okay";
                };
 
-               nand@3000000 {
-                       status = "okay";
-
-                       partition@0 {
-                               label = "u-boot";
-                               reg = <0x0000000 0x180000>;
-                               read-only;
-                       };
-
-                       partition@180000 {
-                               label = "u-boot-env";
-                               reg = <0x180000 0x20000>;
-                       };
-
-                       partition@200000 {
-                               label = "uImage";
-                               reg = <0x0200000 0x600000>;
-                       };
-
-                       partition@800000 {
-                               label = "minirootfs";
-                               reg = <0x0800000 0x1000000>;
-                       };
-
-                       partition@1800000 {
-                               label = "jffs2";
-                               reg = <0x1800000 0x6800000>;
-                       };
-               };
-
                sata@80000 {
                        status = "okay";
                        nr-ports = <2>;
         };
 };
 
+&nand {
+       status = "okay";
+
+       partition@0 {
+               label = "u-boot";
+               reg = <0x0000000 0x180000>;
+               read-only;
+       };
+
+       partition@180000 {
+               label = "u-boot-env";
+               reg = <0x180000 0x20000>;
+       };
+
+       partition@200000 {
+               label = "uImage";
+               reg = <0x0200000 0x600000>;
+       };
+
+       partition@800000 {
+               label = "minirootfs";
+               reg = <0x0800000 0x1000000>;
+       };
+
+       partition@1800000 {
+               label = "jffs2";
+               reg = <0x1800000 0x6800000>;
+       };
+};
+
 &mdio {
        status = "okay";
 
index 06267a91de38d7aa4bd1dc69f1e61bf39047faec..e3f915defd3da6174ad0e1829cf1be0c15e38f80 100644 (file)
                        nr-ports = <2>;
                };
 
-               nand@3000000 {
-                       status = "okay";
-                       chip-delay = <35>;
-
-                       partition@0 {
-                               label = "uboot";
-                               reg = <0x0000000 0x0100000>;
-                               read-only;
-                       };
-                       partition@100000 {
-                               label = "uboot_env";
-                               reg = <0x0100000 0x0080000>;
-                       };
-                       partition@180000 {
-                               label = "key_store";
-                               reg = <0x0180000 0x0080000>;
-                       };
-                       partition@200000 {
-                               label = "info";
-                               reg = <0x0200000 0x0080000>;
-                       };
-                       partition@280000 {
-                               label = "etc";
-                               reg = <0x0280000 0x0a00000>;
-                       };
-                       partition@c80000 {
-                               label = "kernel_1";
-                               reg = <0x0c80000 0x0a00000>;
-                       };
-                       partition@1680000 {
-                               label = "rootfs1";
-                               reg = <0x1680000 0x2fc0000>;
-                       };
-                       partition@4640000 {
-                               label = "kernel_2";
-                               reg = <0x4640000 0x0a00000>;
-                       };
-                       partition@5040000 {
-                               label = "rootfs2";
-                               reg = <0x5040000 0x2fc0000>;
-                       };
-               };
-
                pcie-controller {
                        status = "okay";
 
                };
        };
 };
+
+&nand {
+       status = "okay";
+       chip-delay = <35>;
+
+       partition@0 {
+               label = "uboot";
+               reg = <0x0000000 0x0100000>;
+               read-only;
+       };
+       partition@100000 {
+               label = "uboot_env";
+               reg = <0x0100000 0x0080000>;
+       };
+       partition@180000 {
+               label = "key_store";
+               reg = <0x0180000 0x0080000>;
+       };
+       partition@200000 {
+               label = "info";
+               reg = <0x0200000 0x0080000>;
+       };
+       partition@280000 {
+               label = "etc";
+               reg = <0x0280000 0x0a00000>;
+       };
+       partition@c80000 {
+               label = "kernel_1";
+               reg = <0x0c80000 0x0a00000>;
+       };
+       partition@1680000 {
+               label = "rootfs1";
+               reg = <0x1680000 0x2fc0000>;
+       };
+       partition@4640000 {
+               label = "kernel_2";
+               reg = <0x4640000 0x0a00000>;
+       };
+       partition@5040000 {
+               label = "rootfs2";
+               reg = <0x5040000 0x2fc0000>;
+       };
+};
index 7aeae0c2c1f498bd31fd6572b278dbe944eab107..b5418bcaeccead3b1313074c5ebf885d5f8f0e49 100644 (file)
@@ -15,7 +15,6 @@
        };
 
        mbus {
-               ranges = <MBUS_ID(0xf0, 0x01) 0 0xf1000000 0x100000>;
                pcie-controller {
                        status = "okay";
 
index 85ccf8d8abb133bf62289ddd6adb0ef218764eae..f0e3d213604c975b760173bc854d624d68e38ccd 100644 (file)
                        pinctrl-names = "default";
                };
 
-               nand@3000000 {
-                       chip-delay = <25>;
-                       status = "okay";
-                       pinctrl-0 = <&pmx_nand>;
-                       pinctrl-names = "default";
-
-                       partition@0 {
-                               label = "uboot";
-                               reg = <0x0 0x90000>;
-                       };
-
-                       partition@90000 {
-                               label = "env";
-                               reg = <0x90000 0x44000>;
-                       };
-
-                       partition@d4000 {
-                               label = "test";
-                               reg = <0xd4000 0x24000>;
-                       };
-
-                       partition@f4000 {
-                               label = "conf";
-                               reg = <0xf4000 0x400000>;
-                       };
-
-                       partition@4f4000 {
-                               label = "linux";
-                               reg = <0x4f4000 0x1d20000>;
-                       };
-
-                       partition@2214000 {
-                               label = "user";
-                               reg = <0x2214000 0x1dec000>;
-                       };
-               };
-
                sata@80000 {
                        nr-ports = <1>;
                        status = "okay";
        };
 };
 
+&nand {
+       chip-delay = <25>;
+       status = "okay";
+       pinctrl-0 = <&pmx_nand>;
+       pinctrl-names = "default";
+
+       partition@0 {
+               label = "uboot";
+               reg = <0x0 0x90000>;
+       };
+
+       partition@90000 {
+               label = "env";
+               reg = <0x90000 0x44000>;
+       };
+
+       partition@d4000 {
+               label = "test";
+               reg = <0xd4000 0x24000>;
+       };
+
+       partition@f4000 {
+               label = "conf";
+               reg = <0xf4000 0x400000>;
+       };
+
+       partition@4f4000 {
+               label = "linux";
+               reg = <0x4f4000 0x1d20000>;
+       };
+
+       partition@2214000 {
+               label = "user";
+               reg = <0x2214000 0x1dec000>;
+       };
+};
+
 &mdio {
        status = "okay";
 
index 5696b630b70bb0c19fb0d4bc38b17342cd5a5228..1173d7fb31b23f9e11565a45592fcb99f17e41bf 100644 (file)
                        pinctrl-names = "default";
                        status = "okay";
                };
-
-               nand@3000000 {
-                       pinctrl-0 = <&pmx_nand>;
-                       pinctrl-names = "default";
-                       status = "okay";
-
-                       partition@0 {
-                               label = "u-boot";
-                               reg = <0x0000000 0x100000>;
-                       };
-
-                       partition@100000 {
-                               label = "uImage";
-                               reg = <0x0100000 0x400000>;
-                       };
-
-                       partition@500000 {
-                               label = "root";
-                               reg = <0x0500000 0x1fb00000>;
-                       };
-               };
        };
 
        regulators {
        };
 };
 
+&nand {
+       pinctrl-0 = <&pmx_nand>;
+       pinctrl-names = "default";
+       status = "okay";
+
+       partition@0 {
+               label = "u-boot";
+               reg = <0x0000000 0x100000>;
+       };
+
+       partition@100000 {
+               label = "uImage";
+               reg = <0x0100000 0x400000>;
+       };
+
+       partition@500000 {
+               label = "root";
+               reg = <0x0500000 0x1fb00000>;
+       };
+};
+
 &mdio {
        status = "okay";
 
index 30842b4ff29394185f61d3cc702ddcd192000043..320da677b9847e94f0aba2bcc634bd90890686a6 100644 (file)
                        pinctrl-names = "default";
                };
 
-               nand@3000000 {
-                       status = "okay";
-                       pinctrl-0 = <&pmx_nand>;
-                       pinctrl-names = "default";
-
-                       partition@0 {
-                               label = "u-boot";
-                               reg = <0x0000000 0x180000>;
-                       };
-
-                       partition@180000 {
-                               label = "u-boot env";
-                               reg = <0x0180000 0x20000>;
-                       };
-
-                       partition@200000 {
-                               label = "uImage";
-                               reg = <0x0200000 0x600000>;
-                       };
-
-                       partition@800000 {
-                               label = "uInitrd";
-                               reg = <0x0800000 0x1000000>;
-                       };
-
-                       partition@1800000 {
-                               label = "rootfs";
-                               reg = <0x1800000 0xe800000>;
-                       };
-               };
-
                sata@80000 {
                        status = "okay";
                        nr-ports = <1>;
        };
 };
 
+&nand {
+       status = "okay";
+       pinctrl-0 = <&pmx_nand>;
+       pinctrl-names = "default";
+
+       partition@0 {
+               label = "u-boot";
+               reg = <0x0000000 0x180000>;
+       };
+
+       partition@180000 {
+               label = "u-boot env";
+               reg = <0x0180000 0x20000>;
+       };
+
+       partition@200000 {
+               label = "uImage";
+               reg = <0x0200000 0x600000>;
+       };
+
+       partition@800000 {
+               label = "uInitrd";
+               reg = <0x0800000 0x1000000>;
+       };
+
+       partition@1800000 {
+               label = "rootfs";
+               reg = <0x1800000 0xe800000>;
+       };
+};
+
 &mdio {
        status = "okay";
 
index 9efcd2dc79d3f74eaffb2b95bc9ff4fb9c7662db..345562f7589182975d27ae5e95b1e4319bc7f843 100644 (file)
@@ -6,7 +6,6 @@
 
 / {
        mbus {
-               ranges = <MBUS_ID(0xf0, 0x01) 0 0xf1000000 0x100000>;
                pcie-controller {
                        status = "okay";
 
index 1335b2e1bed4c66efe95ee2f679129d3856ccb43..8b73c80f1dad40995be65547ee5caa4a4fbffdaa 100644 (file)
                compatible = "marvell,kirkwood-mbus", "simple-bus";
                #address-cells = <2>;
                #size-cells = <1>;
+               /* If a board file needs to change this ranges it must replace it completely */
+               ranges = <MBUS_ID(0xf0, 0x01) 0 0xf1000000 0x100000     /* internal-regs */
+                         MBUS_ID(0x01, 0x2f) 0 0xf4000000 0x10000      /* nand flash */
+                         MBUS_ID(0x03, 0x01) 0 0xf5000000 0x10000      /* crypto sram */
+                         >;
                controller = <&mbusc>;
                pcie-mem-aperture = <0xe0000000 0x10000000>; /* 256 MiB memory space */
                pcie-io-aperture  = <0xf2000000 0x100000>;   /*   1 MiB    I/O space */
+
+               crypto@0301 {
+                       compatible = "marvell,orion-crypto";
+                       reg = <MBUS_ID(0xf0, 0x01) 0x30000 0x10000>,
+                             <MBUS_ID(0x03, 0x01) 0 0x800>;
+                       reg-names = "regs", "sram";
+                       interrupts = <22>;
+                       clocks = <&gate_clk 17>;
+                       status = "okay";
+               };
+
+               nand: nand@012f {
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+                       cle = <0>;
+                       ale = <1>;
+                       bank-width = <1>;
+                       compatible = "marvell,orion-nand";
+                       reg = <MBUS_ID(0x01, 0x2f) 0 0x400>;
+                       chip-delay = <25>;
+                       /* set partition map and/or chip-delay in board dts */
+                       clocks = <&gate_clk 7>;
+                       status = "disabled";
+               };
        };
 
        ocp@f1000000 {
                compatible = "simple-bus";
-               ranges = <0x00000000 0xf1000000 0x0100000
-                         0xf4000000 0xf4000000 0x0000400
-                         0xf5000000 0xf5000000 0x0000400>;
+               ranges = <0x00000000 0xf1000000 0x0100000>;
                #address-cells = <1>;
                #size-cells = <1>;
 
                        status = "okay";
                };
 
-               nand@3000000 {
-                       #address-cells = <1>;
-                       #size-cells = <1>;
-                       cle = <0>;
-                       ale = <1>;
-                       bank-width = <1>;
-                       compatible = "marvell,orion-nand";
-                       reg = <0xf4000000 0x400>;
-                       chip-delay = <25>;
-                       /* set partition map and/or chip-delay in board dts */
-                       clocks = <&gate_clk 7>;
-                       status = "disabled";
-               };
-
                i2c@11000 {
                        compatible = "marvell,mv64xxx-i2c";
                        reg = <0x11000 0x20>;
                        status = "disabled";
                };
 
-               crypto@30000 {
-                       compatible = "marvell,orion-crypto";
-                       reg = <0x30000 0x10000>,
-                             <0xf5000000 0x800>;
-                       reg-names = "regs", "sram";
-                       interrupts = <22>;
-                       clocks = <&gate_clk 17>;
-                       status = "okay";
-               };
-
                mdio: mdio-bus@72004 {
                        compatible = "marvell,orion-mdio";
                        #address-cells = <1>;
diff --git a/arch/arm/boot/dts/omap-gpmc-smsc911x.dtsi b/arch/arm/boot/dts/omap-gpmc-smsc911x.dtsi
new file mode 100644 (file)
index 0000000..9c18adf
--- /dev/null
@@ -0,0 +1,52 @@
+/*
+ * Common file for GPMC connected smsc911x on omaps
+ *
+ * Note that the board specifc DTS file needs to specify
+ * ranges, pinctrl, reg, interrupt parent and interrupts.
+ */
+
+/ {
+       vddvario: regulator-vddvario {
+                 compatible = "regulator-fixed";
+                 regulator-name = "vddvario";
+                 regulator-always-on;
+       };
+
+       vdd33a: regulator-vdd33a {
+               compatible = "regulator-fixed";
+               regulator-name = "vdd33a";
+               regulator-always-on;
+       };
+};
+
+&gpmc {
+       ethernet@gpmc {
+               compatible = "smsc,lan9221", "smsc,lan9115";
+               bank-width = <2>;
+               gpmc,mux-add-data;
+               gpmc,cs-on-ns = <0>;
+               gpmc,cs-rd-off-ns = <186>;
+               gpmc,cs-wr-off-ns = <186>;
+               gpmc,adv-on-ns = <12>;
+               gpmc,adv-rd-off-ns = <48>;
+               gpmc,adv-wr-off-ns = <48>;
+               gpmc,oe-on-ns = <54>;
+               gpmc,oe-off-ns = <168>;
+               gpmc,we-on-ns = <54>;
+               gpmc,we-off-ns = <168>;
+               gpmc,rd-cycle-ns = <186>;
+               gpmc,wr-cycle-ns = <186>;
+               gpmc,access-ns = <114>;
+               gpmc,page-burst-access-ns = <6>;
+               gpmc,bus-turnaround-ns = <12>;
+               gpmc,cycle2cycle-delay-ns = <18>;
+               gpmc,wr-data-mux-bus-ns = <90>;
+               gpmc,wr-access-ns = <186>;
+               gpmc,cycle2cycle-samecsen;
+               gpmc,cycle2cycle-diffcsen;
+               vmmc-supply = <&vddvario>;
+               vmmc_aux-supply = <&vdd33a>;
+               reg-io-width = <4>;
+               smsc,save-mac-address;
+       };
+};
diff --git a/arch/arm/boot/dts/omap-zoom-common.dtsi b/arch/arm/boot/dts/omap-zoom-common.dtsi
new file mode 100644 (file)
index 0000000..b0ee342
--- /dev/null
@@ -0,0 +1,33 @@
+/*
+ * Common features on the Zoom debug board
+ */
+
+#include "omap-gpmc-smsc911x.dtsi"
+
+&gpmc {
+       ranges = <3 0 0x10000000 0x00000400>,
+                <7 0 0x2c000000 0x01000000>;
+
+       /*
+        * Four port TL16CP754C serial port on GPMC,
+        * they probably share the same GPIO IRQ
+        * REVISIT: Add timing support from slls644g.pdf
+        */
+       8250@3,0 {
+               compatible = "ns16550a";
+               reg = <3 0 0x100>;
+               bank-width = <2>;
+               reg-shift = <1>;
+               reg-io-width = <1>;
+               interrupt-parent = <&gpio4>;
+               interrupts = <6 IRQ_TYPE_EDGE_RISING>;  /* gpio102 */
+               clock-frequency = <1843200>;
+               current-speed = <115200>;
+       };
+
+       ethernet@gpmc {
+               reg = <7 0 0xff>;
+               interrupt-parent = <&gpio5>;
+               interrupts = <30 IRQ_TYPE_LEVEL_LOW>;   /* gpio158 */
+       };
+};
index 224c08f472f42788d9903f70b67640cad47ddb9b..34cdecb4fddabae4dfc8bb3d2be3671309ac1de0 100644 (file)
                        label = "bootloader";
                        reg = <0 0x20000>;
                };
-               partition@0x20000 {
+               partition@20000 {
                        label = "params";
                        reg = <0x20000 0x20000>;
                };
-               partition@0x40000 {
+               partition@40000 {
                        label = "kernel";
                        reg = <0x40000 0x200000>;
                };
-               partition@0x240000 {
+               partition@240000 {
                        label = "file-system";
                        reg = <0x240000 0x3dc0000>;
                };
index ba4dcfc6b7214d5e3d63488edc2e8157f130ac19..31a632f7effbf239f298ff3619cdacdc5587356e 100644 (file)
                };
 
        };
+
+       /* HS USB Port 2 Power */
+       hsusb2_power: hsusb2_power_reg {
+               compatible = "regulator-fixed";
+               regulator-name = "hsusb2_vbus";
+               regulator-min-microvolt = <3300000>;
+               regulator-max-microvolt = <3300000>;
+               gpio = <&twl_gpio 18 0>;        /* GPIO LEDA */
+               startup-delay-us = <70000>;
+       };
+
+       /* HS USB Host PHY on PORT 2 */
+       hsusb2_phy: hsusb2_phy {
+               compatible = "usb-nop-xceiv";
+               reset-gpios = <&gpio5 19 GPIO_ACTIVE_LOW>; /* gpio_147 */
+               vcc-supply = <&hsusb2_power>;
+       };
 };
 
 &omap3_pmx_wkup {
        };
 };
 
+&omap3_pmx_core {
+       pinctrl-names = "default";
+       pinctrl-0 = <
+                       &hsusbb2_pins
+       >;
+
+       uart3_pins: pinmux_uart3_pins {
+               pinctrl-single,pins = <
+                       0x16e (PIN_INPUT | PIN_OFF_WAKEUPENABLE | MUX_MODE0) /* uart3_rx_irrx.uart3_rx_irrx */
+                       0x170 (PIN_OUTPUT | MUX_MODE0) /* uart3_tx_irtx.uart3_tx_irtx OUTPUT | MODE0 */
+               >;
+       };
+
+       hsusbb2_pins: pinmux_hsusbb2_pins {
+               pinctrl-single,pins = <
+                       0x5c0 (PIN_OUTPUT | MUX_MODE3)          /* etk_d10.hsusb2_clk */
+                       0x5c2 (PIN_OUTPUT | MUX_MODE3)          /* etk_d11.hsusb2_stp */
+                       0x5c4 (PIN_INPUT_PULLDOWN | MUX_MODE3)  /* etk_d12.hsusb2_dir */
+                       0x5c6 (PIN_INPUT_PULLDOWN | MUX_MODE3)  /* etk_d13.hsusb2_nxt */
+                       0x5c8 (PIN_INPUT_PULLDOWN | MUX_MODE3)  /* etk_d14.hsusb2_data0 */
+                       0x5cA (PIN_INPUT_PULLDOWN | MUX_MODE3)  /* etk_d15.hsusb2_data1 */
+                       0x1a4 (PIN_INPUT_PULLDOWN | MUX_MODE3)  /* mcspi1_cs3.hsusb2_data2 */
+                       0x1a6 (PIN_INPUT_PULLDOWN | MUX_MODE3)  /* mcspi2_clk.hsusb2_data7 */
+                       0x1a8 (PIN_INPUT_PULLDOWN | MUX_MODE3)  /* mcspi2_simo.hsusb2_data4 */
+                       0x1aa (PIN_INPUT_PULLDOWN | MUX_MODE3)  /* mcspi2_somi.hsusb2_data5 */
+                       0x1ac (PIN_INPUT_PULLDOWN | MUX_MODE3)  /* mcspi2_cs0.hsusb2_data6 */
+                       0x1ae (PIN_INPUT_PULLDOWN | MUX_MODE3)  /* mcspi2_cs1.hsusb2_data3 */
+               >;
+       };
+};
+
 &i2c1 {
        clock-frequency = <2600000>;
 
        power = <50>;
 };
 
-&omap3_pmx_core {
-       uart3_pins: pinmux_uart3_pins {
-               pinctrl-single,pins = <
-                       0x16e (PIN_INPUT | PIN_OFF_WAKEUPENABLE | MUX_MODE0) /* uart3_rx_irrx.uart3_rx_irrx */
-                       0x170 (PIN_OUTPUT | MUX_MODE0) /* uart3_tx_irtx.uart3_tx_irtx OUTPUT | MODE0 */
-               >;
-       };
-};
-
 &uart3 {
        pinctrl-names = "default";
        pinctrl-0 = <&uart3_pins>;
        pinctrl-names = "default";
        pinctrl-0 = <&gpio1_pins>;
 };
+
+&usbhshost {
+       port2-mode = "ehci-phy";
+};
+
+&usbhsehci {
+       phys = <0 &hsusb2_phy>;
+};
index dfd83103657aa85669499f747428e9449c1854ff..7669c16259a5afa1da39a9c0dc4e9ddd7486a0f3 100644 (file)
                };
        };
 
-       /* HS USB Port 2 RESET */
-       hsusb2_reset: hsusb2_reset_reg {
-               compatible = "regulator-fixed";
-               regulator-name = "hsusb2_reset";
-               regulator-min-microvolt = <3300000>;
-               regulator-max-microvolt = <3300000>;
-               gpio = <&gpio5 19 0>;   /* gpio_147 */
-               startup-delay-us = <70000>;
-               enable-active-high;
-       };
-
        /* HS USB Port 2 Power */
        hsusb2_power: hsusb2_power_reg {
                compatible = "regulator-fixed";
@@ -68,7 +57,7 @@
        /* HS USB Host PHY on PORT 2 */
        hsusb2_phy: hsusb2_phy {
                compatible = "usb-nop-xceiv";
-               reset-supply = <&hsusb2_reset>;
+               reset-gpios = <&gpio5 19 GPIO_ACTIVE_LOW>;      /* gpio_147 */
                vcc-supply = <&hsusb2_power>;
        };
 
 
        hsusbb2_pins: pinmux_hsusbb2_pins {
                pinctrl-single,pins = <
-                       0x5c0 (PIN_OUTPUT | MUX_MODE3)          /* usbb2_ulpitll_clk.usbb1_ulpiphy_clk */
-                       0x5c2 (PIN_OUTPUT | MUX_MODE3)          /* usbb2_ulpitll_clk.usbb1_ulpiphy_stp */
-                       0x5c4 (PIN_INPUT_PULLDOWN | MUX_MODE3)  /* usbb2_ulpitll_clk.usbb1_ulpiphy_dir */
-                       0x5c6 (PIN_INPUT_PULLDOWN | MUX_MODE3)  /* usbb2_ulpitll_clk.usbb1_ulpiphy_nxt */
-                       0x5c8 (PIN_INPUT_PULLDOWN | MUX_MODE3)  /* usbb2_ulpitll_clk.usbb1_ulpiphy_dat0 */
-                       0x5cA (PIN_INPUT_PULLDOWN | MUX_MODE3)  /* usbb2_ulpitll_clk.usbb1_ulpiphy_dat1 */
-                       0x1a4 (PIN_INPUT_PULLDOWN | MUX_MODE3)  /* usbb2_ulpitll_clk.usbb1_ulpiphy_dat2 */
-                       0x1a6 (PIN_INPUT_PULLDOWN | MUX_MODE3)  /* usbb2_ulpitll_clk.usbb1_ulpiphy_dat3 */
-                       0x1a8 (PIN_INPUT_PULLDOWN | MUX_MODE3)  /* usbb2_ulpitll_clk.usbb1_ulpiphy_dat4 */
-                       0x1aa (PIN_INPUT_PULLDOWN | MUX_MODE3)  /* usbb2_ulpitll_clk.usbb1_ulpiphy_dat5 */
-                       0x1ac (PIN_INPUT_PULLDOWN | MUX_MODE3)  /* usbb2_ulpitll_clk.usbb1_ulpiphy_dat6 */
-                       0x1ae (PIN_INPUT_PULLDOWN | MUX_MODE3)  /* usbb2_ulpitll_clk.usbb1_ulpiphy_dat7 */
+                       0x5c0 (PIN_OUTPUT | MUX_MODE3)          /* etk_d10.hsusb2_clk */
+                       0x5c2 (PIN_OUTPUT | MUX_MODE3)          /* etk_d11.hsusb2_stp */
+                       0x5c4 (PIN_INPUT_PULLDOWN | MUX_MODE3)  /* etk_d12.hsusb2_dir */
+                       0x5c6 (PIN_INPUT_PULLDOWN | MUX_MODE3)  /* etk_d13.hsusb2_nxt */
+                       0x5c8 (PIN_INPUT_PULLDOWN | MUX_MODE3)  /* etk_d14.hsusb2_data0 */
+                       0x5cA (PIN_INPUT_PULLDOWN | MUX_MODE3)  /* etk_d15.hsusb2_data1 */
+                       0x1a4 (PIN_INPUT_PULLDOWN | MUX_MODE3)  /* mcspi1_cs3.hsusb2_data2 */
+                       0x1a6 (PIN_INPUT_PULLDOWN | MUX_MODE3)  /* mcspi2_clk.hsusb2_data7 */
+                       0x1a8 (PIN_INPUT_PULLDOWN | MUX_MODE3)  /* mcspi2_simo.hsusb2_data4 */
+                       0x1aa (PIN_INPUT_PULLDOWN | MUX_MODE3)  /* mcspi2_somi.hsusb2_data5 */
+                       0x1ac (PIN_INPUT_PULLDOWN | MUX_MODE3)  /* mcspi2_cs0.hsusb2_data6 */
+                       0x1ae (PIN_INPUT_PULLDOWN | MUX_MODE3)  /* mcspi2_cs1.hsusb2_data3 */
                >;
        };
 
        pinctrl-names = "default";
        pinctrl-0 = <&gpio1_pins>;
 };
+
+&usb_otg_hs {
+       interface-type = <0>;
+       usb-phy = <&usb2_phy>;
+       mode = <3>;
+       power = <50>;
+};
index 7ef282795dd4194fb05df05def1a8b918d94a434..4665421bb7bc348fc549c1883a1bf8dbd5602327 100644 (file)
                nand-bus-width = <16>;
 
                gpmc,device-nand;
-               gpmc,sync-clki-ps = <0>;
+               gpmc,sync-clk-ps = <0>;
                gpmc,cs-on-ns = <0>;
                gpmc,cs-rd-off-ns = <44>;
                gpmc,cs-wr-off-ns = <44>;
diff --git a/arch/arm/boot/dts/omap3-evm-37xx.dts b/arch/arm/boot/dts/omap3-evm-37xx.dts
new file mode 100644 (file)
index 0000000..4df68ad
--- /dev/null
@@ -0,0 +1,151 @@
+/*
+ * Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+/dts-v1/;
+
+#include "omap36xx.dtsi"
+#include "omap3-evm-common.dtsi"
+
+
+/ {
+       model = "TI OMAP37XX EVM (TMDSEVM3730)";
+       compatible = "ti,omap3-evm-37xx", "ti,omap36xx";
+
+       memory {
+               device_type = "memory";
+               reg = <0x80000000 0x10000000>; /* 256 MB */
+       };
+
+       wl12xx_vmmc: wl12xx_vmmc {
+               pinctrl-names = "default";
+               pinctrl-0 = <&wl12xx_gpio>;
+       };
+};
+
+&omap3_pmx_core {
+       mmc1_pins: pinmux_mmc1_pins {
+               pinctrl-single,pins = <
+                       0x114 (PIN_OUTPUT_PULLUP | MUX_MODE0)   /* sdmmc1_clk.sdmmc1_clk */
+                       0x116 (PIN_INPUT_PULLUP | MUX_MODE0)    /* sdmmc1_cmd.sdmmc1_cmd */
+                       0x118 (PIN_INPUT_PULLUP | MUX_MODE0)    /* sdmmc1_dat0.sdmmc1_dat0 */
+                       0x11a (PIN_INPUT_PULLUP | MUX_MODE0)    /* sdmmc1_dat1.sdmmc1_dat1 */
+                       0x11c (PIN_INPUT_PULLUP | MUX_MODE0)    /* sdmmc1_dat2.sdmmc1_dat2 */
+                       0x11e (PIN_INPUT_PULLUP | MUX_MODE0)    /* sdmmc1_dat3.sdmmc1_dat3 */
+                       0x120 (PIN_INPUT_PULLUP | MUX_MODE0)    /* sdmmc1_dat4.sdmmc1_dat4 */
+                       0x122 (PIN_INPUT_PULLUP | MUX_MODE0)    /* sdmmc1_dat5.sdmmc1_dat5 */
+                       0x124 (PIN_INPUT_PULLUP | MUX_MODE0)    /* sdmmc1_dat6.sdmmc1_dat6 */
+                       0x126 (PIN_INPUT_PULLUP | MUX_MODE0)    /* sdmmc1_dat7.sdmmc1_dat7 */
+               >;
+       };
+
+       /* NOTE: Clocked externally, needs INPUT also for sdmmc2_clk.sdmmc2_clk */
+       mmc2_pins: pinmux_mmc2_pins {
+               pinctrl-single,pins = <
+                       0x128 (PIN_INPUT_PULLUP | MUX_MODE0)    /* sdmmc2_clk.sdmmc2_clk */
+                       0x12a (PIN_INPUT_PULLUP | MUX_MODE0)    /* sdmmc2_cmd.sdmmc2_cmd */
+                       0x12c (PIN_INPUT_PULLUP | MUX_MODE0)    /* sdmmc2_dat0.sdmmc2_dat0 */
+                       0x12e (WAKEUP_EN | PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc2_dat1.sdmmc2_dat1 */
+                       0x130 (PIN_INPUT_PULLUP | MUX_MODE0)    /* sdmmc2_dat2.sdmmc2_dat2 */
+                       0x132 (PIN_INPUT_PULLUP | MUX_MODE0)    /* sdmmc2_dat3.sdmmc2_dat3 */
+               >;
+       };
+
+       uart3_pins: pinmux_uart3_pins {
+               pinctrl-single,pins = <
+                       0x16e (WAKEUP_EN | PIN_INPUT | MUX_MODE0) /* uart3_rx_irrx.uart3_rx_irrx */
+                       0x170 (PIN_OUTPUT | MUX_MODE0)          /* uart3_tx_irtx.uart3_tx_irtx */
+               >;
+       };
+
+       wl12xx_gpio: pinmux_wl12xx_gpio {
+               pinctrl-single,pins = <
+                       0x150 (PIN_OUTPUT | MUX_MODE4)          /* uart1_cts.gpio_150 */
+                       0x14e (PIN_INPUT | MUX_MODE4)           /* uart1_rts.gpio_149 */
+               >;
+       };
+
+       smsc911x_pins: pinmux_smsc911x_pins {
+               pinctrl-single,pins = <
+                       0x1a2 (PIN_INPUT | MUX_MODE4)           /* mcspi1_cs2.gpio_176 */
+               >;
+       };
+};
+
+&mmc1 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&mmc1_pins>;
+};
+
+&mmc2 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&mmc2_pins>;
+};
+
+&mmc3 {
+       status = "disabled";
+};
+
+&uart3 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&uart3_pins>;
+};
+
+&gpmc {
+       ranges = <0 0 0x00000000 0x20000000>,
+                <5 0 0x2c000000 0x01000000>;
+
+       nand@0,0 {
+               linux,mtd-name= "hynix,h8kds0un0mer-4em";
+               reg = <0 0 0>;
+               nand-bus-width = <16>;
+               ti,nand-ecc-opt = "bch8";
+
+               gpmc,sync-clk-ps = <0>;
+               gpmc,cs-on-ns = <0>;
+               gpmc,cs-rd-off-ns = <44>;
+               gpmc,cs-wr-off-ns = <44>;
+               gpmc,adv-on-ns = <6>;
+               gpmc,adv-rd-off-ns = <34>;
+               gpmc,adv-wr-off-ns = <44>;
+               gpmc,we-off-ns = <40>;
+               gpmc,oe-off-ns = <54>;
+               gpmc,access-ns = <64>;
+               gpmc,rd-cycle-ns = <82>;
+               gpmc,wr-cycle-ns = <82>;
+               gpmc,wr-access-ns = <40>;
+               gpmc,wr-data-mux-bus-ns = <0>;
+
+               #address-cells = <1>;
+               #size-cells = <1>;
+
+               partition@0 {
+                       label = "X-Loader";
+                       reg = <0 0x80000>;
+               };
+               partition@0x80000 {
+                       label = "U-Boot";
+                       reg = <0x80000 0x1c0000>;
+               };
+               partition@0x1c0000 {
+                       label = "Environment";
+                       reg = <0x240000 0x40000>;
+               };
+               partition@0x280000 {
+                       label = "Kernel";
+                       reg = <0x280000 0x500000>;
+               };
+               partition@0x780000 {
+                       label = "Filesystem";
+                       reg = <0x780000 0x1f880000>;
+               };
+       };
+
+       ethernet@gpmc {
+               pinctrl-names = "default";
+               pinctrl-0 = <&smsc911x_pins>;
+       };
+};
diff --git a/arch/arm/boot/dts/omap3-evm-common.dtsi b/arch/arm/boot/dts/omap3-evm-common.dtsi
new file mode 100644 (file)
index 0000000..b549329
--- /dev/null
@@ -0,0 +1,94 @@
+/*
+ * Common support for omap3 EVM boards
+ */
+
+#include "omap-gpmc-smsc911x.dtsi"
+
+/ {
+       cpus {
+               cpu@0 {
+                       cpu0-supply = <&vcc>;
+               };
+       };
+
+       leds {
+               compatible = "gpio-leds";
+               ledb {
+                       label = "omap3evm::ledb";
+                       gpios = <&twl_gpio 19 GPIO_ACTIVE_HIGH>; /* LEDB */
+                       linux,default-trigger = "default-on";
+               };
+       };
+
+       wl12xx_vmmc: wl12xx_vmmc {
+               compatible = "regulator-fixed";
+               regulator-name = "vwl1271";
+               regulator-min-microvolt = <1800000>;
+               regulator-max-microvolt = <1800000>;
+               gpio = <&gpio5 22 0>;   /* gpio150 */
+               startup-delay-us = <70000>;
+               enable-active-high;
+               vin-supply = <&vmmc2>;
+       };
+};
+
+&i2c1 {
+       clock-frequency = <2600000>;
+
+       twl: twl@48 {
+               reg = <0x48>;
+               interrupts = <7>; /* SYS_NIRQ cascaded to intc */
+               interrupt-parent = <&intc>;
+       };
+};
+
+#include "twl4030.dtsi"
+#include "twl4030_omap3.dtsi"
+
+&i2c2 {
+       clock-frequency = <400000>;
+};
+
+&i2c3 {
+       clock-frequency = <400000>;
+
+       /*
+        * TVP5146 Video decoder-in for analog input support.
+        */
+       tvp5146@5c {
+               compatible = "ti,tvp5146m2";
+               reg = <0x5c>;
+       };
+};
+
+&mmc1 {
+       vmmc-supply = <&vmmc1>;
+       vmmc_aux-supply = <&vsim>;
+       bus-width = <8>;
+};
+
+&mmc2 {
+       vmmc-supply = <&wl12xx_vmmc>;
+       non-removable;
+       bus-width = <4>;
+       cap-power-off-card;
+};
+
+&twl_gpio {
+       ti,use-leds;
+};
+
+&usb_otg_hs {
+       interface-type = <0>;
+       usb-phy = <&usb2_phy>;
+       mode = <3>;
+       power = <50>;
+};
+
+&gpmc {
+       ethernet@gpmc {
+               interrupt-parent = <&gpio6>;
+               interrupts = <16 8>;
+               reg = <5 0 0xff>;
+       };
+};
index 4134dd05c3a43835e56963aebb25a18347701588..e10dcd0fa539452f6fcaab8ae295fd60085f18b6 100644 (file)
@@ -8,70 +8,14 @@
 /dts-v1/;
 
 #include "omap34xx.dtsi"
+#include "omap3-evm-common.dtsi"
 
 / {
-       model = "TI OMAP3 EVM (OMAP3530, AM/DM37x)";
+       model = "TI OMAP35XX EVM (TMDSEVM3530)";
        compatible = "ti,omap3-evm", "ti,omap3";
 
-       cpus {
-               cpu@0 {
-                       cpu0-supply = <&vcc>;
-               };
-       };
-
        memory {
                device_type = "memory";
                reg = <0x80000000 0x10000000>; /* 256 MB */
        };
-
-       leds {
-               compatible = "gpio-leds";
-               ledb {
-                       label = "omap3evm::ledb";
-                       gpios = <&twl_gpio 19 GPIO_ACTIVE_HIGH>; /* LEDB */
-                       linux,default-trigger = "default-on";
-               };
-       };
-};
-
-&i2c1 {
-       clock-frequency = <2600000>;
-
-       twl: twl@48 {
-               reg = <0x48>;
-               interrupts = <7>; /* SYS_NIRQ cascaded to intc */
-               interrupt-parent = <&intc>;
-       };
-};
-
-#include "twl4030.dtsi"
-#include "twl4030_omap3.dtsi"
-
-&i2c2 {
-       clock-frequency = <400000>;
-};
-
-&i2c3 {
-       clock-frequency = <400000>;
-
-       /*
-        * TVP5146 Video decoder-in for analog input support.
-        */
-       tvp5146@5c {
-               compatible = "ti,tvp5146m2";
-               reg = <0x5c>;
-       };
-};
-
-&twl_gpio {
-       ti,use-leds;
-};
-
-&usb_otg_hs {
-       interface-type = <0>;
-       usb-phy = <&usb2_phy>;
-       phys = <&usb2_phy>;
-       phy-names = "usb2-phy";
-       mode = <3>;
-       power = <50>;
 };
diff --git a/arch/arm/boot/dts/omap3-gta04.dts b/arch/arm/boot/dts/omap3-gta04.dts
new file mode 100644 (file)
index 0000000..a84684a
--- /dev/null
@@ -0,0 +1,168 @@
+/*
+ * Copyright (C) 2013 Marek Belisko <marek@goldelico.com>
+ *
+ * Based on omap3-beagle-xm.dts
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+/dts-v1/;
+
+#include "omap36xx.dtsi"
+
+/ {
+       model = "OMAP3 GTA04";
+       compatible = "ti,omap3-gta04", "ti,omap3";
+
+       cpus {
+               cpu@0 {
+                       cpu0-supply = <&vcc>;
+               };
+       };
+
+       memory {
+               device_type = "memory";
+               reg = <0x80000000 0x20000000>; /* 512 MB */
+       };
+
+       gpio-keys {
+               compatible = "gpio-keys";
+
+               aux-button {
+                       label = "aux";
+                       linux,code = <169>;
+                       gpios = <&gpio1 7 GPIO_ACTIVE_LOW>;
+                       gpio-key,wakeup;
+               };
+       };
+};
+
+&omap3_pmx_core {
+       uart1_pins: pinmux_uart1_pins {
+               pinctrl-single,pins = <
+                       0x152 (PIN_INPUT | MUX_MODE0)           /* uart1_rx.uart1_rx */
+                       0x14c (PIN_OUTPUT |MUX_MODE0)           /* uart1_tx.uart1_tx */
+               >;
+       };
+
+       uart2_pins: pinmux_uart2_pins {
+               pinctrl-single,pins = <
+                       0x14a (PIN_INPUT | MUX_MODE0)           /* uart2_rx.uart2_rx */
+                       0x148 (PIN_OUTPUT | MUX_MODE0)          /* uart2_tx.uart2_tx */
+               >;
+       };
+
+       uart3_pins: pinmux_uart3_pins {
+               pinctrl-single,pins = <
+                       0x16e (PIN_INPUT | MUX_MODE0)           /* uart3_rx.uart3_rx */
+                       0x170 (PIN_OUTPUT | MUX_MODE0)          /* uart3_tx.uart3_tx */
+               >;
+       };
+
+       mmc1_pins: pinmux_mmc1_pins {
+               pinctrl-single,pins = <
+                       0x114 (PIN_INPUT_PULLUP | MUX_MODE0)    /* sdmmc1_clk.sdmmc1_clk */
+                       0x116 (PIN_INPUT_PULLUP | MUX_MODE0)    /* sdmmc1_cmd.sdmmc1_cmd */
+                       0x118 (PIN_INPUT_PULLUP | MUX_MODE0)    /* sdmmc1_dat0.sdmmc1_dat0 */
+                       0x11a (PIN_INPUT_PULLUP | MUX_MODE0)    /* sdmmc1_dat1.sdmmc1_dat1 */
+                       0x11c (PIN_INPUT_PULLUP | MUX_MODE0)    /* sdmmc1_dat2.sdmmc1_dat2 */
+                       0x11e (PIN_INPUT_PULLUP | MUX_MODE0)    /* sdmmc1_dat3.sdmmc1_dat3 */
+               >;
+       };
+};
+
+&i2c1 {
+       clock-frequency = <2600000>;
+
+       twl: twl@48 {
+               reg = <0x48>;
+               interrupts = <7>; /* SYS_NIRQ cascaded to intc */
+               interrupt-parent = <&intc>;
+       };
+};
+
+#include "twl4030.dtsi"
+#include "twl4030_omap3.dtsi"
+
+&i2c2 {
+       clock-frequency = <400000>;
+
+       /* pressure sensor */
+       bmp085@77 {
+               compatible = "bosch,bmp085";
+               reg = <0x77>;
+       };
+
+       /* leds */
+       tca6507@45 {
+               compatible = "ti,tca6507";
+               #address-cells = <1>;
+               #size-cells = <0>;
+               reg = <0x45>;
+
+               gta04_led0: red_aux@0 {
+                       label = "gta04:red:aux";
+                       reg = <0x0>;
+               };
+
+               gta04_led1: green_aux@1 {
+                       label = "gta04:green:aux";
+                       reg = <0x1>;
+               };
+
+               gta04_led3: red_power@3 {
+                       label = "gta04:red:power";
+                       reg = <0x3>;
+                       linux,default-trigger = "default-on";
+               };
+
+               gta04_led4: green_power@4 {
+                       label = "gta04:green:power";
+                       reg = <0x4>;
+               };
+       };
+};
+
+&i2c3 {
+       clock-frequency = <100000>;
+};
+
+&usb_otg_hs {
+       interface-type = <0>;
+       usb-phy = <&usb2_phy>;
+       mode = <3>;
+       power = <50>;
+};
+
+&mmc1 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&mmc1_pins>;
+       vmmc-supply = <&vmmc1>;
+       vmmc_aux-supply = <&vsim>;
+       bus-width = <4>;
+};
+
+&mmc2 {
+       status = "disabled";
+};
+
+&mmc3 {
+       status = "disabled";
+};
+
+&uart1 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&uart1_pins>;
+};
+
+&uart2 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&uart2_pins>;
+};
+
+&uart3 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&uart3_pins>;
+};
+
index 2326d11462a57dcb9e43991b359f63ce14da1520..ba1e58b7b7e35ddbdf4825853cf72cef6a951939 100644 (file)
@@ -77,6 +77,8 @@
                        0x1a2 (PIN_INPUT | MUX_MODE4)           /* mcspi1_cs2.gpio_176 */
                >;
        };
+
+       leds_pins: pinmux_leds_pins { };
 };
 
 &i2c1 {
 &twl_gpio {
        ti,use-leds;
 };
+
+&usb_otg_hs {
+       interface-type = <0>;
+       usb-phy = <&usb2_phy>;
+       phys = <&usb2_phy>;
+       phy-names = "usb2-phy";
+       mode = <3>;
+       power = <50>;
+};
index e8c48284587cb0b741347b501f036f746eb22423..d5cc792672501012f2a368b4d27b17bbb7669d95 100644 (file)
  */
 
 #include "omap3-igep.dtsi"
+#include "omap-gpmc-smsc911x.dtsi"
 
 / {
        model = "IGEPv2";
        compatible = "isee,omap3-igep0020", "ti,omap3";
 
        leds {
+               pinctrl-names = "default";
+               pinctrl-0 = <&leds_pins>;
                compatible = "gpio-leds";
+
                boot {
                         label = "omap3:green:boot";
                         gpios = <&gpio1 26 GPIO_ACTIVE_HIGH>;
                };
        };
 
-       vddvario: regulator-vddvario {
-                 compatible = "regulator-fixed";
-                 regulator-name = "vddvario";
-                 regulator-always-on;
+       /* HS USB Port 1 Power */
+       hsusb1_power: hsusb1_power_reg {
+               compatible = "regulator-fixed";
+               regulator-name = "hsusb1_vbus";
+               regulator-min-microvolt = <3300000>;
+               regulator-max-microvolt = <3300000>;
+               gpio = <&twl_gpio 18 GPIO_ACTIVE_LOW>;  /* GPIO LEDA */
+               startup-delay-us = <70000>;
+       };
+
+       /* HS USB Host PHY on PORT 1 */
+       hsusb1_phy: hsusb1_phy {
+               compatible = "usb-nop-xceiv";
+               reset-gpios = <&gpio1 24 GPIO_ACTIVE_LOW>; /* gpio_24 */
+               vcc-supply = <&hsusb1_power>;
        };
+};
 
-       vdd33a: regulator-vdd33a {
-               compatible = "regulator-fixed";
-               regulator-name = "vdd33a";
-               regulator-always-on;
+&omap3_pmx_core {
+       pinctrl-names = "default";
+       pinctrl-0 = <
+               &hsusbb1_pins
+       >;
+
+       hsusbb1_pins: pinmux_hsusbb1_pins {
+               pinctrl-single,pins = <
+                       0x5aa (PIN_OUTPUT | MUX_MODE3)          /* etk_ctl.hsusb1_clk */
+                       0x5a8 (PIN_OUTPUT | MUX_MODE3)          /* etk_clk.hsusb1_stp */
+                       0x5bc (PIN_INPUT_PULLDOWN | MUX_MODE3)  /* etk_d8.hsusb1_dir */
+                       0x5be (PIN_INPUT_PULLDOWN | MUX_MODE3)  /* etk_d9.hsusb1_nxt */
+                       0x5ac (PIN_INPUT_PULLDOWN | MUX_MODE3)  /* etk_d0.hsusb1_data0 */
+                       0x5ae (PIN_INPUT_PULLDOWN | MUX_MODE3)  /* etk_d1.hsusb1_data1 */
+                       0x5b0 (PIN_INPUT_PULLDOWN | MUX_MODE3)  /* etk_d2.hsusb1_data2 */
+                       0x5b2 (PIN_INPUT_PULLDOWN | MUX_MODE3)  /* etk_d3.hsusb1_data7 */
+                       0x5b4 (PIN_INPUT_PULLDOWN | MUX_MODE3)  /* etk_d4.hsusb1_data4 */
+                       0x5b6 (PIN_INPUT_PULLDOWN | MUX_MODE3)  /* etk_d5.hsusb1_data5 */
+                       0x5b8 (PIN_INPUT_PULLDOWN | MUX_MODE3)  /* etk_d6.hsusb1_data6 */
+                       0x5ba (PIN_INPUT_PULLDOWN | MUX_MODE3)  /* etk_d7.hsusb1_data3 */
+               >;
        };
 };
 
+&leds_pins {
+       pinctrl-single,pins = <
+               0x5c4 (PIN_OUTPUT | MUX_MODE4) /* etk_d12.gpio_26 */
+               0x5c6 (PIN_OUTPUT | MUX_MODE4) /* etk_d13.gpio_27 */
+               0x5c8 (PIN_OUTPUT | MUX_MODE4) /* etk_d14.gpio_28 */
+       >;
+};
+
 &i2c3 {
        clock-frequency = <100000>;
 
                        label = "SPL";
                        reg = <0 0x100000>;
                };
-               partition@0x80000 {
+               partition@80000 {
                        label = "U-Boot";
                        reg = <0x100000 0x180000>;
                };
-               partition@0x1c0000 {
+               partition@1c0000 {
                        label = "Environment";
                        reg = <0x280000 0x100000>;
                };
-               partition@0x280000 {
+               partition@280000 {
                        label = "Kernel";
                        reg = <0x380000 0x300000>;
                };
-               partition@0x780000 {
+               partition@780000 {
                        label = "Filesystem";
                        reg = <0x680000 0x1f980000>;
                };
        };
 
-       ethernet@5,0 {
+       ethernet@gpmc {
                pinctrl-names = "default";
                pinctrl-0 = <&smsc911x_pins>;
-               compatible = "smsc,lan9221", "smsc,lan9115";
                reg = <5 0 0xff>;
-               bank-width = <2>;
-
-               gpmc,mux-add-data;
-               gpmc,cs-on-ns = <0>;
-               gpmc,cs-rd-off-ns = <186>;
-               gpmc,cs-wr-off-ns = <186>;
-               gpmc,adv-on-ns = <12>;
-               gpmc,adv-rd-off-ns = <48>;
-               gpmc,adv-wr-off-ns = <48>;
-               gpmc,oe-on-ns = <54>;
-               gpmc,oe-off-ns = <168>;
-               gpmc,we-on-ns = <54>;
-               gpmc,we-off-ns = <168>;
-               gpmc,rd-cycle-ns = <186>;
-               gpmc,wr-cycle-ns = <186>;
-               gpmc,access-ns = <114>;
-               gpmc,page-burst-access-ns = <6>;
-               gpmc,bus-turnaround-ns = <12>;
-               gpmc,cycle2cycle-delay-ns = <18>;
-               gpmc,wr-data-mux-bus-ns = <90>;
-               gpmc,wr-access-ns = <186>;
-               gpmc,cycle2cycle-samecsen;
-               gpmc,cycle2cycle-diffcsen;
-
                interrupt-parent = <&gpio6>;
-               interrupts = <16 8>;
-               vmmc-supply = <&vddvario>;
-               vmmc_aux-supply = <&vdd33a>;
-               reg-io-width = <4>;
-
-               smsc,save-mac-address;
+               interrupts = <16 IRQ_TYPE_LEVEL_LOW>;
        };
 };
+
+&usbhshost {
+       port1-mode = "ehci-phy";
+};
+
+&usbhsehci {
+       phys = <&hsusb1_phy>;
+};
index 644d05383836f45dfe5612ad760d100fb12e9072..525e6d9b09784c721b4660554a17abdda14273e9 100644 (file)
        compatible = "isee,omap3-igep0030", "ti,omap3";
 
        leds {
+               pinctrl-names = "default";
+               pinctrl-0 = <&leds_pins>;
                compatible = "gpio-leds";
+
                boot {
                         label = "omap3:green:boot";
                         gpios = <&twl_gpio 13 GPIO_ACTIVE_LOW>;
        };
 };
 
+&leds_pins {
+       pinctrl-single,pins = <
+               0x5b0 (PIN_OUTPUT | MUX_MODE4) /* etk_d2.gpio_16 */
+       >;
+};
+
 &gpmc {
        ranges = <0 0 0x00000000 0x20000000>;
 
                        label = "SPL";
                        reg = <0 0x100000>;
                };
-               partition@0x80000 {
+               partition@80000 {
                        label = "U-Boot";
                        reg = <0x100000 0x180000>;
                };
-               partition@0x1c0000 {
+               partition@1c0000 {
                        label = "Environment";
                        reg = <0x280000 0x100000>;
                };
-               partition@0x280000 {
+               partition@280000 {
                        label = "Kernel";
                        reg = <0x380000 0x300000>;
                };
-               partition@0x780000 {
+               partition@780000 {
                        label = "Filesystem";
                        reg = <0x680000 0x1f980000>;
                };
diff --git a/arch/arm/boot/dts/omap3-n9.dts b/arch/arm/boot/dts/omap3-n9.dts
new file mode 100644 (file)
index 0000000..39828ce
--- /dev/null
@@ -0,0 +1,18 @@
+/*
+ * omap3-n9.dts - Device Tree file for Nokia N9
+ *
+ * Written by: Aaro Koskinen <aaro.koskinen@iki.fi>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+/dts-v1/;
+
+#include "omap3-n950-n9.dtsi"
+
+/ {
+       model = "Nokia N9";
+       compatible = "nokia,omap3-n9", "ti,omap3";
+};
diff --git a/arch/arm/boot/dts/omap3-n900.dts b/arch/arm/boot/dts/omap3-n900.dts
new file mode 100644 (file)
index 0000000..d64fa04
--- /dev/null
@@ -0,0 +1,92 @@
+/*
+ * Copyright (C) 2013 Pavel Machek <pavel@ucw.cz>
+ * Copyright 2013 Aaro Koskinen <aaro.koskinen@iki.fi>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 (or later) as
+ * published by the Free Software Foundation.
+ */
+
+/dts-v1/;
+
+#include "omap34xx.dtsi"
+
+/ {
+       model = "Nokia N900";
+       compatible = "nokia,omap3-n900", "ti,omap3";
+
+       cpus {
+               cpu@0 {
+                       cpu0-supply = <&vcc>;
+               };
+       };
+
+       memory {
+               device_type = "memory";
+               reg = <0x80000000 0x10000000>; /* 256 MB */
+       };
+
+};
+
+&i2c1 {
+       clock-frequency = <2200000>;
+
+       twl: twl@48 {
+               reg = <0x48>;
+               interrupts = <7>; /* SYS_NIRQ cascaded to intc */
+               interrupt-parent = <&intc>;
+       };
+};
+
+#include "twl4030.dtsi"
+
+&twl_gpio {
+       ti,pullups      = <0x0>;
+       ti,pulldowns    = <0x03ff3f>; /* BIT(0..5) | BIT(8..17) */
+};
+
+&i2c2 {
+       clock-frequency = <400000>;
+};
+
+&i2c3 {
+       clock-frequency = <100000>;
+};
+
+&mmc1 {
+       status = "disabled";
+};
+
+&mmc2 {
+       status = "disabled";
+};
+
+&mmc3 {
+       status = "disabled";
+};
+
+&mcspi1 {
+       /*
+        * For some reason, touchscreen is necessary for screen to work at
+        * all on real hw. It works well without it on emulator.
+        *
+        * Also... order in the device tree actually matters here.
+        */
+       tsc2005@0 {
+               compatible = "tsc2005";
+               spi-max-frequency = <6000000>;
+               reg = <0>;
+       };
+       mipid@2 {
+               compatible = "acx565akm";
+               spi-max-frequency = <6000000>;
+               reg = <2>;
+       };
+};
+
+&usb_otg_hs {
+       interface-type = <0>;
+       usb-phy = <&usb2_phy>;
+       mode = <2>;
+       power = <50>;
+};
diff --git a/arch/arm/boot/dts/omap3-n950-n9.dtsi b/arch/arm/boot/dts/omap3-n950-n9.dtsi
new file mode 100644 (file)
index 0000000..94eb77d
--- /dev/null
@@ -0,0 +1,174 @@
+/*
+ * omap3-n950-n9.dtsi - Device Tree file for Nokia N950 & N9 (common stuff)
+ *
+ * Written by: Aaro Koskinen <aaro.koskinen@iki.fi>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#include "omap36xx.dtsi"
+
+/ {
+       cpus {
+               cpu@0 {
+                       cpu0-supply = <&vcc>;
+               };
+       };
+
+       memory {
+               device_type = "memory";
+               reg = <0x80000000 0x40000000>; /* 1 GB */
+       };
+
+       vemmc: fixedregulator@0 {
+               compatible = "regulator-fixed";
+               regulator-name = "VEMMC";
+               regulator-min-microvolt = <2900000>;
+               regulator-max-microvolt = <2900000>;
+               gpio = <&gpio5 29 0>; /* gpio line 157 */
+               startup-delay-us = <150>;
+               enable-active-high;
+       };
+};
+
+&omap3_pmx_core {
+       mmc2_pins: pinmux_mmc2_pins {
+               pinctrl-single,pins = <
+                       0x128 (PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc2_clk */
+                       0x12a (PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc2_cmd */
+                       0x12c (PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc2_dat0 */
+                       0x12e (PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc2_dat1 */
+                       0x130 (PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc2_dat2 */
+                       0x132 (PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc2_dat3 */
+               >;
+       };
+};
+
+&i2c1 {
+       clock-frequency = <2900000>;
+
+       twl: twl@48 {
+               reg = <0x48>;
+               interrupts = <7>; /* SYS_NIRQ cascaded to intc */
+               interrupt-parent = <&intc>;
+       };
+};
+
+/include/ "twl4030.dtsi"
+
+&twl {
+       compatible = "ti,twl5031";
+};
+
+&twl_gpio {
+       ti,pullups      = <0x000001>; /* BIT(0) */
+       ti,pulldowns    = <0x008106>; /* BIT(1) | BIT(2) | BIT(8) | BIT(15) */
+};
+
+&i2c2 {
+       clock-frequency = <400000>;
+};
+
+&i2c3 {
+       clock-frequency = <400000>;
+};
+
+&mmc1 {
+       status = "disabled";
+};
+
+&mmc2 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&mmc2_pins>;
+       vmmc-supply = <&vemmc>;
+       bus-width = <4>;
+       ti,non-removable;
+};
+
+&mmc3 {
+       status = "disabled";
+};
+
+&usb_otg_hs {
+       interface-type = <0>;
+       usb-phy = <&usb2_phy>;
+       phys = <&usb2_phy>;
+       phy-names = "usb2-phy";
+       mode = <3>;
+       power = <50>;
+};
+
+&gpmc {
+       ranges = <0 0 0x04000000 0x20000000>;
+
+       onenand@0,0 {
+               #address-cells = <1>;
+               #size-cells = <1>;
+               reg = <0 0 0x20000000>;
+
+               gpmc,sync-read;
+               gpmc,sync-write;
+               gpmc,burst-length = <16>;
+               gpmc,burst-read;
+               gpmc,burst-wrap;
+               gpmc,burst-write;
+               gpmc,device-width = <2>;
+               gpmc,mux-add-data = <2>;
+               gpmc,cs-on-ns = <0>;
+               gpmc,cs-rd-off-ns = <87>;
+               gpmc,cs-wr-off-ns = <87>;
+               gpmc,adv-on-ns = <0>;
+               gpmc,adv-rd-off-ns = <10>;
+               gpmc,adv-wr-off-ns = <10>;
+               gpmc,oe-on-ns = <15>;
+               gpmc,oe-off-ns = <87>;
+               gpmc,we-on-ns = <0>;
+               gpmc,we-off-ns = <87>;
+               gpmc,rd-cycle-ns = <112>;
+               gpmc,wr-cycle-ns = <112>;
+               gpmc,access-ns = <81>;
+               gpmc,page-burst-access-ns = <15>;
+               gpmc,bus-turnaround-ns = <0>;
+               gpmc,cycle2cycle-delay-ns = <0>;
+               gpmc,wait-monitoring-ns = <0>;
+               gpmc,clk-activation-ns = <5>;
+               gpmc,wr-data-mux-bus-ns = <30>;
+               gpmc,wr-access-ns = <81>;
+               gpmc,sync-clk-ps = <15000>;
+
+               /*
+                * MTD partition table corresponding to Nokia's MeeGo 1.2
+                * Harmattan release.
+                */
+               partition@0 {
+                       label = "bootloader";
+                       reg = <0x00000000 0x00100000>;
+               };
+               partition@1 {
+                       label = "config";
+                       reg = <0x00100000 0x002c0000>;
+               };
+               partition@2 {
+                       label = "kernel";
+                       reg = <0x003c0000 0x01000000>;
+               };
+               partition@3 {
+                       label = "log";
+                       reg = <0x013c0000 0x00200000>;
+               };
+               partition@4 {
+                       label = "var";
+                       reg = <0x015c0000 0x1ca40000>;
+               };
+               partition@5 {
+                       label = "moslo";
+                       reg = <0x1e000000 0x02000000>;
+               };
+               partition@6 {
+                       label = "omap2-onenand";
+                       reg = <0x00000000 0x20000000>;
+               };
+       };
+};
diff --git a/arch/arm/boot/dts/omap3-n950.dts b/arch/arm/boot/dts/omap3-n950.dts
new file mode 100644 (file)
index 0000000..b076a52
--- /dev/null
@@ -0,0 +1,18 @@
+/*
+ * omap3-n950.dts - Device Tree file for Nokia N950
+ *
+ * Written by: Aaro Koskinen <aaro.koskinen@iki.fi>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+/dts-v1/;
+
+#include "omap3-n950-n9.dtsi"
+
+/ {
+       model = "Nokia N950";
+       compatible = "nokia,omap3-n950", "ti,omap3";
+};
diff --git a/arch/arm/boot/dts/omap3-zoom3.dts b/arch/arm/boot/dts/omap3-zoom3.dts
new file mode 100644 (file)
index 0000000..15eb9fe
--- /dev/null
@@ -0,0 +1,217 @@
+/*
+ * Copyright (C) 2013 Texas Instruments Incorporated - http://www.ti.com/
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+/dts-v1/;
+
+#include "omap36xx.dtsi"
+#include "omap-zoom-common.dtsi"
+
+/ {
+       model = "TI Zoom3";
+       compatible = "ti,omap3-zoom3", "ti,omap36xx", "ti,omap3";
+
+       cpus {
+               cpu@0 {
+                       cpu0-supply = <&vcc>;
+               };
+       };
+
+       memory {
+               device_type = "memory";
+               reg = <0x80000000 0x20000000>; /* 512 MB */
+       };
+
+       vddvario: regulator-vddvario {
+                 compatible = "regulator-fixed";
+                 regulator-name = "vddvario";
+                 regulator-always-on;
+       };
+
+       vdd33a: regulator-vdd33a {
+               compatible = "regulator-fixed";
+               regulator-name = "vdd33a";
+               regulator-always-on;
+       };
+
+       wl12xx_vmmc: wl12xx_vmmc {
+               pinctrl-names = "default";
+               pinctrl-0 = <&wl12xx_gpio>;
+               compatible = "regulator-fixed";
+               regulator-name = "vwl1271";
+               regulator-min-microvolt = <1800000>;
+               regulator-max-microvolt = <1800000>;
+               gpio = <&gpio4 5 0>;    /* gpio101 */
+               startup-delay-us = <70000>;
+               enable-active-high;
+       };
+};
+
+&omap3_pmx_core {
+       /* REVISIT: twl gpio0 is mmc0_cd */
+       mmc1_pins: pinmux_mmc1_pins {
+               pinctrl-single,pins = <
+                       0x114 (PIN_OUTPUT_PULLUP | MUX_MODE0)   /* sdmmc1_clk.sdmmc1_clk */
+                       0x116 (PIN_OUTPUT_PULLUP | MUX_MODE0)   /* sdmmc1_cmd.sdmmc1_cmd */
+                       0x118 (PIN_INPUT_PULLUP | MUX_MODE0)    /* sdmmc1_dat0.sdmmc1_dat0 */
+                       0x11a (PIN_INPUT_PULLUP | MUX_MODE0)    /* sdmmc1_dat1.sdmmc1_dat1 */
+                       0x11c (PIN_INPUT_PULLUP | MUX_MODE0)    /* sdmmc1_dat2.sdmmc1_dat2 */
+                       0x11e (PIN_INPUT_PULLUP | MUX_MODE0)    /* sdmmc1_dat3.sdmmc1_dat3 */
+               >;
+       };
+
+       mmc2_pins: pinmux_mmc2_pins {
+               pinctrl-single,pins = <
+                       0x128 (PIN_INPUT_PULLUP | MUX_MODE0)    /* sdmmc2_clk.sdmmc2_clk */
+                       0x12a (PIN_INPUT_PULLUP | MUX_MODE0)    /* sdmmc2_cmd.sdmmc2_cmd */
+                       0x12c (PIN_INPUT | MUX_MODE0)           /* sdmmc2_dat0.sdmmc2_dat0 */
+                       0x12e (PIN_INPUT | MUX_MODE0)           /* sdmmc2_dat1.sdmmc2_dat1 */
+                       0x130 (PIN_INPUT | MUX_MODE0)           /* sdmmc2_dat2.sdmmc2_dat2 */
+                       0x132 (PIN_INPUT | MUX_MODE0)           /* sdmmc2_dat3.sdmmc2_dat3 */
+                       0x134 (PIN_INPUT | MUX_MODE0)           /* sdmmc2_dat4.sdmmc2_dat4 */
+                       0x136 (PIN_INPUT | MUX_MODE0)           /* sdmmc2_dat5.sdmmc2_dat5 */
+                       0x138 (PIN_INPUT | MUX_MODE0)           /* sdmmc2_dat6.sdmmc2_dat6 */
+                       0x13a (PIN_INPUT | MUX_MODE0)           /* sdmmc2_dat7.sdmmc2_dat7 */
+               >;
+       };
+
+       mmc3_pins: pinmux_mmc3_pins {
+               pinctrl-single,pins = <
+                       0x168 (PIN_INPUT | MUX_MODE4)   /* mcbsp1_clkx.gpio_162 WLAN IRQ */
+                       0x1a0 (PIN_INPUT_PULLUP | MUX_MODE3)    /* mcspi1_cs1.sdmmc3_cmd */
+                       0x5a8 (PIN_INPUT_PULLUP | MUX_MODE2)    /* etk_clk.sdmmc3_clk */
+                       0x5b4 (PIN_INPUT_PULLUP | MUX_MODE2)    /* etk_d4.sdmmc3_dat0 */
+                       0x5b6 (WAKEUP_EN | PIN_INPUT_PULLUP | MUX_MODE2) /* etk_d5.sdmmc3_dat1 */
+                       0x5b8 (PIN_INPUT_PULLUP | MUX_MODE2)    /* etk_d6.sdmmc3_dat2 */
+                       0x5b2 (PIN_INPUT_PULLUP | MUX_MODE2)    /* etk_d3.sdmmc3_dat3 */
+               >;
+       };
+
+       uart1_pins: pinmux_uart1_pins {
+               pinctrl-single,pins = <
+                        0x150 (PIN_INPUT | MUX_MODE0)          /* uart1_cts.uart1_cts */
+                        0x14e (PIN_OUTPUT | MUX_MODE0)         /* uart1_rts.uart1_rts */
+                        0x152 (WAKEUP_EN | PIN_INPUT | MUX_MODE0) /* uart1_rx.uart1_rx */
+                        0x14c (PIN_OUTPUT | MUX_MODE0)         /* uart1_tx.uart1_tx */
+               >;
+       };
+
+       uart2_pins: pinmux_uart2_pins {
+               pinctrl-single,pins = <
+                        0x144 (PIN_INPUT_PULLUP | MUX_MODE0)   /* uart2_cts.uart2_cts */
+                        0x146 (PIN_OUTPUT | MUX_MODE0)         /* uart2_rts.uart2_rts */
+                        0x14a (WAKEUP_EN | PIN_INPUT | MUX_MODE0) /* uart2_rx.uart2_rx */
+                        0x148 (PIN_OUTPUT | MUX_MODE0)         /* uart2_tx.uart2_tx */
+               >;
+       };
+
+       uart3_pins: pinmux_uart3_pins {
+               pinctrl-single,pins = <
+                        0x16a (PIN_INPUT_PULLDOWN | MUX_MODE0) /* uart3_cts_rctx.uart3_cts_rctx */
+                        0x16c (PIN_OUTPUT | MUX_MODE0)         /* uart3_rts_sd.uart3_rts_sd */
+                        0x16e (WAKEUP_EN | PIN_INPUT | MUX_MODE0) /* uart3_rx_irrx.uart3_rx_irrx */
+                        0x170 (PIN_OUTPUT | MUX_MODE0)         /* uart3_tx_irtx.uart3_tx_irtx */
+               >;
+       };
+
+       /* wl12xx GPIO output for WLAN_EN */
+       wl12xx_gpio: pinmux_wl12xx_gpio {
+               pinctrl-single,pins = <
+                       0xea (PIN_OUTPUT| MUX_MODE4)            /* cam_d2.gpio_101 */
+               >;
+       };
+};
+
+&omap3_pmx_wkup {
+       wlan_host_wkup: pinmux_wlan_host_wkup_pins {
+               pinctrl-single,pins = <
+                       0x1a (PIN_INPUT_PULLUP | MUX_MODE4)     /* sys_clkout1.gpio_10 WLAN_HOST_WKUP */
+               >;
+       };
+};
+
+&i2c1 {
+       clock-frequency = <2600000>;
+
+       twl: twl@48 {
+               reg = <0x48>;
+               interrupts = <7>; /* SYS_NIRQ cascaded to intc */
+               interrupt-parent = <&intc>;
+       };
+};
+
+#include "twl4030.dtsi"
+
+&i2c2 {
+       clock-frequency = <400000>;
+};
+
+&i2c3 {
+       clock-frequency = <400000>;
+
+       /*
+        * TVP5146 Video decoder-in for analog input support.
+        */
+       tvp5146@5c {
+               compatible = "ti,tvp5146m2";
+               reg = <0x5c>;
+       };
+};
+
+&twl_gpio {
+       ti,use-leds;
+};
+
+&mmc1 {
+       vmmc-supply = <&vmmc1>;
+       vmmc_aux-supply = <&vsim>;
+       bus-width = <4>;
+       pinctrl-names = "default";
+       pinctrl-0 = <&mmc1_pins>;
+};
+/*
+&mmc2 {
+       vmmc-supply = <&vmmc2>;
+       ti,non-removable;
+       bus-width = <8>;
+       pinctrl-names = "default";
+       pinctrl-0 = <&mmc2_pins>;
+};
+*/
+&mmc3 {
+       vmmc-supply = <&wl12xx_vmmc>;
+       non-removable;
+       bus-width = <4>;
+       cap-power-off-card;
+       pinctrl-names = "default";
+       pinctrl-0 = <&mmc3_pins>;
+};
+
+&uart1 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&uart1_pins>;
+};
+
+&uart2 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&uart2_pins>;
+};
+
+&uart3 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&uart3_pins>;
+};
+
+&uart4 {
+       status = "disabled";
+};
+
+&usb_otg_hs {
+       interface-type = <0>;
+       usb-phy = <&usb2_phy>;
+       mode = <3>;
+       power = <50>;
+};
index b41bd57f43287a048b73bfefe35b262ee139600e..f275beea67b60642cf37833b7dbbe746fe30453c 100644 (file)
                        reg = <0x48002030 0x05cc>;
                        #address-cells = <1>;
                        #size-cells = <0>;
+                       #interrupt-cells = <1>;
+                       interrupt-controller;
                        pinctrl-single,register-width = <16>;
                        pinctrl-single,function-mask = <0xff1f>;
                };
 
-               omap3_pmx_wkup: pinmux@0x48002a00 {
+               omap3_pmx_wkup: pinmux@48002a00 {
                        compatible = "ti,omap3-padconf", "pinctrl-single";
                        reg = <0x48002a00 0x5c>;
                        #address-cells = <1>;
                        #size-cells = <0>;
+                       #interrupt-cells = <1>;
+                       interrupt-controller;
                        pinctrl-single,register-width = <16>;
                        pinctrl-single,function-mask = <0xff1f>;
                };
index e2249bcc3e63fa5a6404d2a2d761a011f15261bf..281914ed015136c57cb65d1039136899726bfd12 100644 (file)
                        label = "bootloader-nor";
                        reg = <0 0x40000>;
                };
-               partition@0x40000 {
+               partition@40000 {
                        label = "params-nor";
                        reg = <0x40000 0x40000>;
                };
-               partition@0x80000 {
+               partition@80000 {
                        label = "kernel-nor";
                        reg = <0x80000 0x200000>;
                };
-               partition@0x280000 {
+               partition@280000 {
                        label = "filesystem-nor";
                        reg = <0x240000 0x7d80000>;
                };
                        label = "xloader-nand";
                        reg = <0 0x80000>;
                };
-               partition@0x80000 {
+               partition@80000 {
                        label = "bootloader-nand";
                        reg = <0x80000 0x140000>;
                };
-               partition@0x1c0000 {
+               partition@1c0000 {
                        label = "params-nand";
                        reg = <0x1c0000 0xc0000>;
                };
-               partition@0x280000 {
+               partition@280000 {
                        label = "kernel-nand";
                        reg = <0x280000 0x500000>;
                };
-               partition@0x780000 {
+               partition@780000 {
                        label = "filesystem-nand";
                        reg = <0x780000 0x7880000>;
                };
                        label = "xloader-onenand";
                        reg = <0 0x80000>;
                };
-               partition@0x80000 {
+               partition@80000 {
                        label = "bootloader-onenand";
                        reg = <0x80000 0x40000>;
                };
-               partition@0xc0000 {
+               partition@c0000 {
                        label = "params-onenand";
                        reg = <0xc0000 0x20000>;
                };
-               partition@0xe0000 {
+               partition@e0000 {
                        label = "kernel-onenand";
                        reg = <0xe0000 0x200000>;
                };
-               partition@0x2e0000 {
+               partition@2e0000 {
                        label = "filesystem-onenand";
                        reg = <0x2e0000 0xfd20000>;
                };
index 814ab67c8c299b0b818f669c917d51ebcb8a94c0..3e6801cecd04378616018927275532b297500818 100644 (file)
                        "AFMR", "Line In";
        };
 
-       /*
-        * Temp hack: Need to be replaced with the proper gpio-controlled
-        * reset driver as soon it will be merged.
-        * http://thread.gmane.org/gmane.linux.drivers.devicetree/36830
-        */
-       /* HS USB Port 1 RESET */
-       hsusb1_reset: hsusb1_reset_reg {
-               compatible = "regulator-fixed";
-               regulator-name = "hsusb1_reset";
-               regulator-min-microvolt = <3300000>;
-               regulator-max-microvolt = <3300000>;
-               gpio = <&gpio2 30 0>;   /* gpio_62 */
-               startup-delay-us = <70000>;
-               enable-active-high;
-       };
-
        /* HS USB Port 1 Power */
        hsusb1_power: hsusb1_power_reg {
                compatible = "regulator-fixed";
@@ -97,7 +81,7 @@
        /* HS USB Host PHY on PORT 1 */
        hsusb1_phy: hsusb1_phy {
                compatible = "usb-nop-xceiv";
-               reset-supply = <&hsusb1_reset>;
+               reset-gpios = <&gpio2 30 GPIO_ACTIVE_LOW>;   /* gpio_62 */
                vcc-supply = <&hsusb1_power>;
        /**
         * FIXME:
        };
 };
 
-&omap4_pmx_wkup {
-       pinctrl-names = "default";
-       pinctrl-0 = <
-                       &twl6030_wkup_pins
-       >;
-
-       twl6030_wkup_pins: pinmux_twl6030_wkup_pins {
-               pinctrl-single,pins = <
-                       0x14 (PIN_OUTPUT | MUX_MODE2)           /* fref_clk0_out.sys_drm_msecure */
-               >;
-       };
-};
-
 &omap4_pmx_core {
        pinctrl-names = "default";
        pinctrl-0 = <
-                       &twl6030_pins
                        &twl6040_pins
                        &mcpdm_pins
                        &mcbsp1_pins
                        &hsusbb1_pins
        >;
 
-       twl6030_pins: pinmux_twl6030_pins {
-               pinctrl-single,pins = <
-                       0x15e (WAKEUP_EN | PIN_INPUT_PULLUP | MUX_MODE0)        /* sys_nirq1.sys_nirq1 */
-               >;
-       };
-
        twl6040_pins: pinmux_twl6040_pins {
                pinctrl-single,pins = <
                        0xe0 (PIN_OUTPUT | MUX_MODE3)   /* hdq_sio.gpio_127 */
 };
 
 #include "twl6030.dtsi"
+#include "twl6030_omap4.dtsi"
 
 &i2c2 {
        pinctrl-names = "default";
index 4f78380ecdb890c5b72cae0ac8937365540d80bd..5fc3f43c5a81d4c9256b063f31bb32fc544dde38 100644 (file)
        };
 };
 
-&omap4_pmx_wkup {
-       pinctrl-names = "default";
-       pinctrl-0 = <
-                       &twl6030_wkup_pins
-       >;
-
-       twl6030_wkup_pins: pinmux_twl6030_wkup_pins {
-               pinctrl-single,pins = <
-                       0x14 (PIN_OUTPUT | MUX_MODE2)           /* fref_clk0_out.sys_drm_msecure */
-               >;
-       };
-};
-
 &omap4_pmx_core {
        pinctrl-names = "default";
        pinctrl-0 = <
-                       &twl6030_pins
                        &twl6040_pins
                        &mcpdm_pins
                        &dmic_pins
                >;
        };
 
-       twl6030_pins: pinmux_twl6030_pins {
-               pinctrl-single,pins = <
-                       0x15e (WAKEUP_EN | PIN_INPUT_PULLUP | MUX_MODE0)        /* sys_nirq1.sys_nirq1 */
-               >;
-       };
-
        twl6040_pins: pinmux_twl6040_pins {
                pinctrl-single,pins = <
                        0xe0 (PIN_OUTPUT | MUX_MODE3)           /* hdq_sio.gpio_127 */
 };
 
 #include "twl6030.dtsi"
+#include "twl6030_omap4.dtsi"
 
 &i2c2 {
        pinctrl-names = "default";
index ea4054bfdfd4964c57573813de9306f5f538c034..513f0c9466dbd3e55e0ceed2d1393217b2e5a57e 100644 (file)
@@ -56,7 +56,7 @@
                cache-level = <2>;
        };
 
-       local-timer@0x48240600 {
+       local-timer@48240600 {
                compatible = "arm,cortex-a9-twd-timer";
                reg = <0x48240600 0x20>;
                interrupts = <GIC_PPI 13 (GIC_CPU_MASK_RAW(3) | IRQ_TYPE_LEVEL_HIGH)>;
                        reg = <0x4a100040 0x0196>;
                        #address-cells = <1>;
                        #size-cells = <0>;
+                       #interrupt-cells = <1>;
+                       interrupt-controller;
                        pinctrl-single,register-width = <16>;
                        pinctrl-single,function-mask = <0x7fff>;
                };
                        reg = <0x4a31e040 0x0038>;
                        #address-cells = <1>;
                        #size-cells = <0>;
+                       #interrupt-cells = <1>;
+                       interrupt-controller;
                        pinctrl-single,register-width = <16>;
                        pinctrl-single,function-mask = <0x7fff>;
                };
                        ram-bits = <12>;
                        ctrl-module = <&omap_control_usbotg>;
                };
+
+               aes: aes@4b501000 {
+                       compatible = "ti,omap4-aes";
+                       ti,hwmods = "aes";
+                       reg = <0x4b501000 0xa0>;
+                       interrupts = <GIC_SPI 85 IRQ_TYPE_LEVEL_HIGH>;
+                       dmas = <&sdma 111>, <&sdma 110>;
+                       dma-names = "tx", "rx";
+               };
+
+               des: des@480a5000 {
+                       compatible = "ti,omap4-des";
+                       ti,hwmods = "des";
+                       reg = <0x480a5000 0xa0>;
+                       interrupts = <GIC_SPI 82 IRQ_TYPE_LEVEL_HIGH>;
+                       dmas = <&sdma 117>, <&sdma 116>;
+                       dma-names = "tx", "rx";
+               };
        };
 };
index 65d7b601651c390f78272602c79d6fb3b172ce4f..d784b3a00410cb6b93e04ec787fae31ca872f5a4 100644 (file)
                regulator-max-microvolt = <3000000>;
        };
 
-       /* HS USB Port 2 RESET */
-       hsusb2_reset: hsusb2_reset_reg {
-               compatible = "regulator-fixed";
-               regulator-name = "hsusb2_reset";
-               regulator-min-microvolt = <3300000>;
-               regulator-max-microvolt = <3300000>;
-               gpio = <&gpio3 16 GPIO_ACTIVE_HIGH>; /* gpio3_80 HUB_NRESET */
-               startup-delay-us = <70000>;
-               enable-active-high;
-       };
-
        /* HS USB Host PHY on PORT 2 */
        hsusb2_phy: hsusb2_phy {
                compatible = "usb-nop-xceiv";
-               reset-supply = <&hsusb2_reset>;
+               reset-gpios = <&gpio3 16 GPIO_ACTIVE_LOW>; /* gpio3_80 HUB_NRESET */
        /**
          * FIXME
          * Put the right clock phandle here when available
                clock-frequency = <19200000>;
        };
 
-       /* HS USB Port 3 RESET */
-       hsusb3_reset: hsusb3_reset_reg {
-               compatible = "regulator-fixed";
-               regulator-name = "hsusb3_reset";
-               regulator-min-microvolt = <3300000>;
-               regulator-max-microvolt = <3300000>;
-               gpio = <&gpio3 15 GPIO_ACTIVE_HIGH>; /* gpio3_79 ETH_NRESET */
-               startup-delay-us = <70000>;
-               enable-active-high;
-       };
-
        /* HS USB Host PHY on PORT 3 */
        hsusb3_phy: hsusb3_phy {
                compatible = "usb-nop-xceiv";
-               reset-supply = <&hsusb3_reset>;
+               reset-gpios = <&gpio3 15 GPIO_ACTIVE_LOW>; /* gpio3_79 ETH_NRESET */
        };
 
        leds {
                reg = <0x48>;
                interrupt-controller;
                #interrupt-cells = <2>;
+               ti,system-power-controller;
+
+               extcon_usb3: palmas_usb {
+                       compatible = "ti,palmas-usb-vid";
+                       ti,enable-vbus-detection;
+                       ti,enable-id-detection;
+                       ti,wakeup;
+               };
 
                palmas_pmic {
                        compatible = "ti,palmas-pmic";
                                        ti,smps-range = <0x80>;
                                };
 
-                               smps10_reg: smps10 {
+                               smps10_out2_reg: smps10_out2 {
                                        /* VBUS_5V_OTG */
-                                       regulator-name = "smps10";
+                                       regulator-name = "smps10_out2";
+                                       regulator-min-microvolt = <5000000>;
+                                       regulator-max-microvolt = <5000000>;
+                                       regulator-always-on;
+                                       regulator-boot-on;
+                               };
+
+                               smps10_out1_reg: smps10_out1 {
+                                       /* VBUS_5V_OTG */
+                                       regulator-name = "smps10_out1";
                                        regulator-min-microvolt = <5000000>;
                                        regulator-max-microvolt = <5000000>;
                                        regulator-always-on;
        phys = <0 &hsusb2_phy &hsusb3_phy>;
 };
 
+&usb3 {
+       extcon = <&extcon_usb3>;
+       vbus-supply = <&smps10_out1_reg>;
+};
+
 &mcspi1 {
 
 };
index c0ec6dce30fe2dd3e18e799fb1ce0f82f8a17c81..6d0a1d5f3da73c3e13695de15c603ec8e4811d69 100644 (file)
                        ti,hwmods = "wd_timer2";
                };
 
-               emif1: emif@0x4c000000 {
+               emif1: emif@4c000000 {
                        compatible      = "ti,emif-4d5";
                        ti,hwmods       = "emif1";
                        phy-type        = <2>; /* DDR PHY type: Intelli PHY */
                        hw-caps-temp-alert;
                };
 
-               emif2: emif@0x4d000000 {
+               emif2: emif@4d000000 {
                        compatible      = "ti,emif-4d5";
                        ti,hwmods       = "emif2";
                        phy-type        = <2>; /* DDR PHY type: Intelli PHY */
                        reg-names = "power";
                };
 
-               omap_dwc3@4a020000 {
+               usb3: omap_dwc3@4a020000 {
                        compatible = "ti,dwc3";
                        ti,hwmods = "usb_otg_ss";
                        reg = <0x4a020000 0x10000>;
diff --git a/arch/arm/boot/dts/r7s72100-genmai.dts b/arch/arm/boot/dts/r7s72100-genmai.dts
new file mode 100644 (file)
index 0000000..1fb20f2
--- /dev/null
@@ -0,0 +1,31 @@
+/*
+ * Device Tree Source for the Genmai board
+ *
+ * Copyright (C) 2013 Renesas Solutions Corp.
+ *
+ * This file is licensed under the terms of the GNU General Public License
+ * version 2.  This program is licensed "as is" without any warranty of any
+ * kind, whether express or implied.
+ */
+
+/dts-v1/;
+/include/ "r7s72100.dtsi"
+
+/ {
+       model = "Genmai";
+       compatible = "renesas,genmai", "renesas,r7s72100";
+
+       chosen {
+               bootargs = "console=ttySC2,115200 ignore_loglevel rw root=/dev/nfs ip=dhcp";
+       };
+
+       memory {
+               device_type = "memory";
+               reg = <0x08000000 0x08000000>;
+       };
+
+       lbsc {
+               #address-cells = <1>;
+               #size-cells = <1>;
+       };
+};
diff --git a/arch/arm/boot/dts/r7s72100.dtsi b/arch/arm/boot/dts/r7s72100.dtsi
new file mode 100644 (file)
index 0000000..46b82aa
--- /dev/null
@@ -0,0 +1,36 @@
+/*
+ * Device Tree Source for the r7s72100 SoC
+ *
+ * Copyright (C) 2013 Renesas Solutions Corp.
+ *
+ * This file is licensed under the terms of the GNU General Public License
+ * version 2.  This program is licensed "as is" without any warranty of any
+ * kind, whether express or implied.
+ */
+
+/ {
+       compatible = "renesas,r7s72100";
+       interrupt-parent = <&gic>;
+       #address-cells = <1>;
+       #size-cells = <1>;
+
+       cpus {
+               #address-cells = <1>;
+               #size-cells = <0>;
+
+               cpu@0 {
+                       device_type = "cpu";
+                       compatible = "arm,cortex-a9";
+                       reg = <0>;
+               };
+       };
+
+       gic: interrupt-controller@e8201000 {
+               compatible = "arm,cortex-a9-gic";
+               #interrupt-cells = <3>;
+               #address-cells = <0>;
+               interrupt-controller;
+               reg = <0xe8201000 0x1000>,
+                       <0xe8202000 0x1000>;
+       };
+};
index f444624eb0974c881e5bac7de144183d366f42b6..9443e93d3cac7f07cfdca4fa24b825424ab310a2 100644 (file)
@@ -10,6 +10,7 @@
 
 /dts-v1/;
 /include/ "r8a73a4.dtsi"
+#include <dt-bindings/gpio/gpio.h>
 
 / {
        model = "APE6EVM";
                reg = <0 0x40000000 0 0x40000000>;
        };
 
+       vcc_mmc0: regulator@0 {
+               compatible = "regulator-fixed";
+               regulator-name = "MMC0 Vcc";
+               regulator-min-microvolt = <2800000>;
+               regulator-max-microvolt = <2800000>;
+               regulator-always-on;
+       };
+
+       vcc_sdhi0: regulator@1 {
+               compatible = "regulator-fixed";
+
+               regulator-name = "SDHI0 Vcc";
+               regulator-min-microvolt = <3300000>;
+               regulator-max-microvolt = <3300000>;
+
+               gpio = <&pfc 76 GPIO_ACTIVE_HIGH>;
+               enable-active-high;
+       };
+
+       /* Common 3.3V rail, used by several devices on APE6EVM */
+       ape6evm_fixed_3v3: regulator@2 {
+               compatible = "regulator-fixed";
+               regulator-name = "3V3";
+               regulator-min-microvolt = <3300000>;
+               regulator-max-microvolt = <3300000>;
+               regulator-always-on;
+       };
+
        lbsc {
                compatible = "simple-bus";
                #address-cells = <1>;
@@ -33,6 +62,7 @@
 };
 
 &i2c5 {
+       status = "okay";
        vdd_dvfs: max8973@1b {
                compatible = "maxim,max8973";
                reg = <0x1b>;
                renesas,groups = "scifa0_data";
                renesas,function = "scifa0";
        };
+
+       mmc0_pins: mmcif {
+               renesas,groups = "mmc0_data8", "mmc0_ctrl";
+               renesas,function = "mmc0";
+       };
+
+       sdhi0_pins: sdhi0 {
+               renesas,groups = "sdhi0_data4", "sdhi0_ctrl", "sdhi0_cd";
+               renesas,function = "sdhi0";
+       };
+
+       sdhi1_pins: sdhi1 {
+               renesas,groups = "sdhi1_data4", "sdhi1_ctrl";
+               renesas,function = "sdhi1";
+       };
+};
+
+&mmcif0 {
+       vmmc-supply = <&vcc_mmc0>;
+       bus-width = <8>;
+       non-removable;
+       pinctrl-names = "default";
+       pinctrl-0 = <&mmc0_pins>;
+       status = "okay";
+};
+
+&sdhi0 {
+       vmmc-supply = <&vcc_sdhi0>;
+       bus-width = <4>;
+       toshiba,mmc-wrprotect-disable;
+       pinctrl-names = "default";
+       pinctrl-0 = <&sdhi0_pins>;
+       status = "okay";
+};
+
+&sdhi1 {
+       vmmc-supply = <&ape6evm_fixed_3v3>;
+       bus-width = <4>;
+       broken-cd;
+       toshiba,mmc-wrprotect-disable;
+       pinctrl-names = "default";
+       pinctrl-0 = <&sdhi1_pins>;
+       status = "okay";
 };
index 72f867e657910e268858091d276353f2cc141d6d..91436b58016f1d48fa5cd12c3946377500b9d70a 100644 (file)
@@ -52,6 +52,7 @@
 };
 
 &i2c5 {
+       status = "okay";
        vdd_dvfs: max8973@1b {
                compatible = "maxim,max8973";
                reg = <0x1b>;
index 658fcc537576b309ae06ecb74eaf65b3e3f2856c..287e047592a03d28e009cc0500c27ab6a18e6de1 100644 (file)
                                <0 56 4>, <0 57 4>;
        };
 
+       dmac: dma-multiplexer@0 {
+               compatible = "renesas,shdma-mux";
+               #dma-cells = <1>;
+               dma-channels = <20>;
+               dma-requests = <256>;
+               #address-cells = <2>;
+               #size-cells = <2>;
+               ranges;
+
+               dma0: dma-controller@e6700020 {
+                       compatible = "renesas,shdma-r8a73a4";
+                       reg = <0 0xe6700020 0 0x89e0>;
+                       interrupt-parent = <&gic>;
+                       interrupts = <0 220 4
+                                       0 200 4
+                                       0 201 4
+                                       0 202 4
+                                       0 203 4
+                                       0 204 4
+                                       0 205 4
+                                       0 206 4
+                                       0 207 4
+                                       0 208 4
+                                       0 209 4
+                                       0 210 4
+                                       0 211 4
+                                       0 212 4
+                                       0 213 4
+                                       0 214 4
+                                       0 215 4
+                                       0 216 4
+                                       0 217 4
+                                       0 218 4
+                                       0 219 4>;
+                       interrupt-names = "error",
+                                       "ch0", "ch1", "ch2", "ch3",
+                                       "ch4", "ch5", "ch6", "ch7",
+                                       "ch8", "ch9", "ch10", "ch11",
+                                       "ch12", "ch13", "ch14", "ch15",
+                                       "ch16", "ch17", "ch18", "ch19";
+               };
+       };
+
        thermal@e61f0000 {
                compatible = "renesas,rcar-thermal";
                reg = <0 0xe61f0000 0 0x14>, <0 0xe61f0100 0 0x38>,
                reg = <0 0xe6500000 0 0x428>;
                interrupt-parent = <&gic>;
                interrupts = <0 174 0x4>;
+               status = "disabled";
        };
 
        i2c1: i2c@e6510000 {
                reg = <0 0xe6510000 0 0x428>;
                interrupt-parent = <&gic>;
                interrupts = <0 175 0x4>;
+               status = "disabled";
        };
 
        i2c2: i2c@e6520000 {
                reg = <0 0xe6520000 0 0x428>;
                interrupt-parent = <&gic>;
                interrupts = <0 176 0x4>;
+               status = "disabled";
        };
 
        i2c3: i2c@e6530000 {
                reg = <0 0xe6530000 0 0x428>;
                interrupt-parent = <&gic>;
                interrupts = <0 177 0x4>;
+               status = "disabled";
        };
 
        i2c4: i2c@e6540000 {
                reg = <0 0xe6540000 0 0x428>;
                interrupt-parent = <&gic>;
                interrupts = <0 178 0x4>;
+               status = "disabled";
        };
 
        i2c5: i2c@e60b0000 {
                reg = <0 0xe60b0000 0 0x428>;
                interrupt-parent = <&gic>;
                interrupts = <0 179 0x4>;
+               status = "disabled";
        };
 
        i2c6: i2c@e6550000 {
                reg = <0 0xe6550000 0 0x428>;
                interrupt-parent = <&gic>;
                interrupts = <0 184 0x4>;
+               status = "disabled";
        };
 
        i2c7: i2c@e6560000 {
                reg = <0 0xe6560000 0 0x428>;
                interrupt-parent = <&gic>;
                interrupts = <0 185 0x4>;
+               status = "disabled";
        };
 
        i2c8: i2c@e6570000 {
                reg = <0 0xe6570000 0 0x428>;
                interrupt-parent = <&gic>;
                interrupts = <0 173 0x4>;
+               status = "disabled";
        };
 
        mmcif0: mmcif@ee200000 {
index c638e4ab91b8ee95655ab0784803f8a2ffb5ce1c..1c56c5e56950846217471ae98ee00c5bed4922ac 100644 (file)
@@ -11,6 +11,7 @@
 /dts-v1/;
 /include/ "r8a7740.dtsi"
 #include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/pwm/pwm.h>
 
 / {
        model = "armadillo 800 eva reference";
                regulator-boot-on;
        };
 
+       vcc_sdhi0: regulator@1 {
+               compatible = "regulator-fixed";
+
+               regulator-name = "SDHI0 Vcc";
+               regulator-min-microvolt = <3300000>;
+               regulator-max-microvolt = <3300000>;
+
+               gpio = <&pfc 75 GPIO_ACTIVE_HIGH>;
+               enable-active-high;
+       };
+
+       vccq_sdhi0: regulator@2 {
+               compatible = "regulator-gpio";
+
+               regulator-name = "SDHI0 VccQ";
+               regulator-min-microvolt = <1800000>;
+               regulator-max-microvolt = <3300000>;
+               vin-supply = <&vcc_sdhi0>;
+
+               enable-gpio = <&pfc 74 GPIO_ACTIVE_HIGH>;
+               gpios = <&pfc 17 GPIO_ACTIVE_HIGH>;
+               states = <3300000 0
+                         1800000 1>;
+
+               enable-active-high;
+       };
+
        leds {
                compatible = "gpio-leds";
                led1 {
                        gpios = <&pfc 177 GPIO_ACTIVE_HIGH>;
                };
        };
+
+       backlight {
+               compatible = "pwm-backlight";
+               pwms = <&tpu 2 33333 PWM_POLARITY_INVERTED>;
+               brightness-levels = <0 1 2 4 8 16 32 64 128 255>;
+               default-brightness-level = <9>;
+               pinctrl-0 = <&backlight_pins>;
+               pinctrl-names = "default";
+       };
 };
 
 &i2c0 {
+       status = "okay";
        touchscreen: st1232@55 {
                compatible = "sitronix,st1232";
                reg = <0x55>;
                renesas,groups = "intc_irq10";
                renesas,function = "intc";
        };
+
+       backlight_pins: backlight {
+               renesas,groups = "tpu0_to2_1";
+               renesas,function = "tpu0";
+       };
+
+       mmc0_pins: mmc0 {
+               renesas,groups = "mmc0_data8_1", "mmc0_ctrl_1";
+               renesas,function = "mmc0";
+       };
+
+       sdhi0_pins: sdhi0 {
+               renesas,groups = "sdhi0_data4", "sdhi0_ctrl", "sdhi0_wp";
+               renesas,function = "sdhi0";
+       };
+};
+
+&tpu {
+       status = "okay";
+};
+
+&mmcif0 {
+       pinctrl-0 = <&mmc0_pins>;
+       pinctrl-names = "default";
+
+       vmmc-supply = <&reg_3p3v>;
+       bus-width = <8>;
+       non-removable;
+       status = "okay";
+};
+
+&sdhi0 {
+       pinctrl-0 = <&sdhi0_pins>;
+       pinctrl-names = "default";
+
+       vmmc-supply = <&vcc_sdhi0>;
+       vqmmc-supply = <&vccq_sdhi0>;
+       bus-width = <4>;
+       cd-gpios = <&pfc 167 GPIO_ACTIVE_LOW>;
+       status = "okay";
 };
index 44d3d520e01ffd0cce0c48527889d2ddf8e4c230..ae1e230f711ddf243168abc55cfc6cd3e3095cf8 100644 (file)
                              0 202 0x4
                              0 203 0x4
                              0 204 0x4>;
+               status = "disabled";
        };
 
        i2c1: i2c@e6c20000 {
                              0 71 0x4
                              0 72 0x4
                              0 73 0x4>;
+               status = "disabled";
        };
 
        pfc: pfc@e6050000 {
                status = "disabled";
                #pwm-cells = <3>;
        };
+
+       mmcif0: mmcif@e6bd0000 {
+               compatible = "renesas,sh-mmcif";
+               reg = <0xe6bd0000 0x100>;
+               interrupt-parent = <&gic>;
+               interrupts = <0 56 4
+                               0 57 4>;
+               status = "disabled";
+       };
+
+       sdhi0: sdhi@e6850000 {
+               compatible = "renesas,sdhi-r8a7740";
+               reg = <0xe6850000 0x100>;
+               interrupt-parent = <&gic>;
+               interrupts = <0 117 4
+                               0 118 4
+                               0 119 4>;
+               cap-sd-highspeed;
+               cap-sdio-irq;
+               status = "disabled";
+       };
+
+       sdhi1: sdhi@e6860000 {
+               compatible = "renesas,sdhi-r8a7740";
+               reg = <0xe6860000 0x100>;
+               interrupt-parent = <&gic>;
+               interrupts = <0 121 4
+                               0 122 4
+                               0 123 4>;
+               cap-sd-highspeed;
+               cap-sdio-irq;
+               status = "disabled";
+       };
 };
index 9bb903a3230d0d781fa866949fd4d33fc54a3c23..969e386e852c443f0b5bb95440a0e595d491c04e 100644 (file)
        compatible = "renesas,bockw-reference", "renesas,r8a7778";
 
        chosen {
-               bootargs = "console=ttySC0,115200 ignore_loglevel rw";
+               bootargs = "console=ttySC0,115200 ignore_loglevel root=/dev/nfs ip=dhcp rw";
        };
 
        memory {
                device_type = "memory";
                reg = <0x60000000 0x10000000>;
        };
+
+       fixedregulator3v3: fixedregulator@0 {
+               compatible = "regulator-fixed";
+               regulator-name = "fixed-3.3V";
+               regulator-min-microvolt = <3300000>;
+               regulator-max-microvolt = <3300000>;
+               regulator-boot-on;
+               regulator-always-on;
+       };
+
+       ethernet@18300000 {
+               compatible = "smsc,lan9220", "smsc,lan9115";
+               reg = <0x18300000 0x1000>;
+
+               phy-mode = "mii";
+               interrupt-parent = <&irqpin>;
+               interrupts = <0 0>; /* IRQ0: hwirq 0 on irqpin */
+               reg-io-width = <4>;
+               vddvario-supply = <&fixedregulator3v3>;
+               vdd33a-supply = <&fixedregulator3v3>;
+       };
+};
+
+&irqpin {
+       status = "okay";
 };
index 3577aba8258336bab80d44c3065c6e94f6ffe8a7..a6308a399e2d2dbbf4fed33ee943b37f98ed0991 100644 (file)
                      <0xfe430000 0x100>;
        };
 
+       /* irqpin: IRQ0 - IRQ3 */
+       irqpin: irqpin@fe78001c {
+               compatible = "renesas,intc-irqpin";
+               #interrupt-cells = <2>;
+               interrupt-controller;
+               status = "disabled"; /* default off */
+               reg =   <0xfe78001c 4>,
+                       <0xfe780010 4>,
+                       <0xfe780024 4>,
+                       <0xfe780044 4>,
+                       <0xfe780064 4>;
+               interrupt-parent = <&gic>;
+               interrupts =   <0 27 0x4
+                               0 28 0x4
+                               0 29 0x4
+                               0 30 0x4>;
+               sense-bitfield-width = <2>;
+       };
+
        gpio0: gpio@ffc40000 {
                compatible = "renesas,gpio-r8a7778", "renesas,gpio-rcar";
                reg = <0xffc40000 0x2c>;
index 6d55083922521619781af8c877ade660ae5ad057..ab4110aa3c3b5a4ad31f1600959195099f8ace9c 100644 (file)
@@ -42,8 +42,8 @@
                pinctrl-names = "default";
 
                phy-mode = "mii";
-               interrupt-parent = <&gic>;
-               interrupts = <0 28 0x4>;
+               interrupt-parent = <&irqpin0>;
+               interrupts = <1 0>; /* IRQ1: hwirq 1 on irqpin0 */
                reg-io-width = <4>;
                vddvario-supply = <&fixedregulator3v3>;
                vdd33a-supply = <&fixedregulator3v3>;
        };
 };
 
+&irqpin0 {
+       status = "okay";
+};
+
 &pfc {
        pinctrl-0 = <&scif2_pins &scif4_pins &sdhi0_pins>;
        pinctrl-names = "default";
index ebbe507fcbfa118280da96482dfaa109854f18c8..19faeac3fd2e1b74f5d289948dd486f473f931de 100644 (file)
        irqpin0: irqpin@fe780010 {
                compatible = "renesas,intc-irqpin";
                #interrupt-cells = <2>;
+               status = "disabled";
                interrupt-controller;
                reg = <0xfe78001c 4>,
                        <0xfe780010 4>,
                reg = <0xffc70000 0x1000>;
                interrupt-parent = <&gic>;
                interrupts = <0 79 0x4>;
+               status = "disabled";
        };
 
        i2c1: i2c@ffc71000 {
                reg = <0xffc71000 0x1000>;
                interrupt-parent = <&gic>;
                interrupts = <0 82 0x4>;
+               status = "disabled";
        };
 
        i2c2: i2c@ffc72000 {
                reg = <0xffc72000 0x1000>;
                interrupt-parent = <&gic>;
                interrupts = <0 80 0x4>;
+               status = "disabled";
        };
 
        i2c3: i2c@ffc73000 {
                reg = <0xffc73000 0x1000>;
                interrupt-parent = <&gic>;
                interrupts = <0 81 0x4>;
+               status = "disabled";
        };
 
        pfc: pfc@fffc0000 {
index 413b4c29e782d7ded622563b8a458e28d382db19..ee845fad939b895a1bfb907c6597f9f916d926f8 100644 (file)
                        reg = <0>;
                        clock-frequency = <1300000000>;
                };
+
+               cpu1: cpu@1 {
+                       device_type = "cpu";
+                       compatible = "arm,cortex-a15";
+                       reg = <1>;
+                       clock-frequency = <1300000000>;
+               };
+
+               cpu2: cpu@2 {
+                       device_type = "cpu";
+                       compatible = "arm,cortex-a15";
+                       reg = <2>;
+                       clock-frequency = <1300000000>;
+               };
+
+               cpu3: cpu@3 {
+                       device_type = "cpu";
+                       compatible = "arm,cortex-a15";
+                       reg = <3>;
+                       clock-frequency = <1300000000>;
+               };
+
+               cpu4: cpu@4 {
+                       device_type = "cpu";
+                       compatible = "arm,cortex-a7";
+                       reg = <0x100>;
+                       clock-frequency = <780000000>;
+               };
+
+               cpu5: cpu@5 {
+                       device_type = "cpu";
+                       compatible = "arm,cortex-a7";
+                       reg = <0x101>;
+                       clock-frequency = <780000000>;
+               };
+
+               cpu6: cpu@6 {
+                       device_type = "cpu";
+                       compatible = "arm,cortex-a7";
+                       reg = <0x102>;
+                       clock-frequency = <780000000>;
+               };
+
+               cpu7: cpu@7 {
+                       device_type = "cpu";
+                       compatible = "arm,cortex-a7";
+                       reg = <0x103>;
+                       clock-frequency = <780000000>;
+               };
        };
 
        gic: interrupt-controller@f1001000 {
                interrupts = <0 0 4>, <0 1 4>, <0 2 4>, <0 3 4>;
        };
 
+       i2c0: i2c@e6508000 {
+               #address-cells = <1>;
+               #size-cells = <0>;
+               compatible = "renesas,i2c-r8a7790";
+               reg = <0 0xe6508000 0 0x40>;
+               interrupt-parent = <&gic>;
+               interrupts = <0 287 0x4>;
+               status = "disabled";
+       };
+
+       i2c1: i2c@e6518000 {
+               #address-cells = <1>;
+               #size-cells = <0>;
+               compatible = "renesas,i2c-r8a7790";
+               reg = <0 0xe6518000 0 0x40>;
+               interrupt-parent = <&gic>;
+               interrupts = <0 288 0x4>;
+               status = "disabled";
+       };
+
+       i2c2: i2c@e6530000 {
+               #address-cells = <1>;
+               #size-cells = <0>;
+               compatible = "renesas,i2c-r8a7790";
+               reg = <0 0xe6530000 0 0x40>;
+               interrupt-parent = <&gic>;
+               interrupts = <0 286 0x4>;
+               status = "disabled";
+       };
+
+       i2c3: i2c@e6540000 {
+               #address-cells = <1>;
+               #size-cells = <0>;
+               compatible = "renesas,i2c-r8a7790";
+               reg = <0 0xe6540000 0 0x40>;
+               interrupt-parent = <&gic>;
+               interrupts = <0 290 0x4>;
+               status = "disabled";
+       };
+
        mmcif0: mmcif@ee200000 {
                compatible = "renesas,sh-mmcif";
                reg = <0 0xee200000 0 0x80>;
diff --git a/arch/arm/boot/dts/r8a7791-koelsch.dts b/arch/arm/boot/dts/r8a7791-koelsch.dts
new file mode 100644 (file)
index 0000000..1ce5250
--- /dev/null
@@ -0,0 +1,32 @@
+/*
+ * Device Tree Source for the Koelsch board
+ *
+ * Copyright (C) 2013 Renesas Electronics Corporation
+ * Copyright (C) 2013 Renesas Solutions Corp.
+ *
+ * This file is licensed under the terms of the GNU General Public License
+ * version 2.  This program is licensed "as is" without any warranty of any
+ * kind, whether express or implied.
+ */
+
+/dts-v1/;
+/include/ "r8a7791.dtsi"
+
+/ {
+       model = "Koelsch";
+       compatible = "renesas,koelsch", "renesas,r8a7791";
+
+       chosen {
+               bootargs = "console=ttySC6,115200 ignore_loglevel rw root=/dev/nfs ip=dhcp";
+       };
+
+       memory@40000000 {
+               device_type = "memory";
+               reg = <0 0x40000000 0 0x80000000>;
+       };
+
+       lbsc {
+               #address-cells = <1>;
+               #size-cells = <1>;
+       };
+};
diff --git a/arch/arm/boot/dts/r8a7791.dtsi b/arch/arm/boot/dts/r8a7791.dtsi
new file mode 100644 (file)
index 0000000..fea5cfe
--- /dev/null
@@ -0,0 +1,74 @@
+/*
+ * Device Tree Source for the r8a7791 SoC
+ *
+ * Copyright (C) 2013 Renesas Electronics Corporation
+ * Copyright (C) 2013 Renesas Solutions Corp.
+ *
+ * This file is licensed under the terms of the GNU General Public License
+ * version 2.  This program is licensed "as is" without any warranty of any
+ * kind, whether express or implied.
+ */
+
+/ {
+       compatible = "renesas,r8a7791";
+       interrupt-parent = <&gic>;
+       #address-cells = <2>;
+       #size-cells = <2>;
+
+       cpus {
+               #address-cells = <1>;
+               #size-cells = <0>;
+
+               cpu0: cpu@0 {
+                       device_type = "cpu";
+                       compatible = "arm,cortex-a15";
+                       reg = <0>;
+                       clock-frequency = <1300000000>;
+               };
+
+               cpu1: cpu@1 {
+                       device_type = "cpu";
+                       compatible = "arm,cortex-a15";
+                       reg = <1>;
+                       clock-frequency = <1300000000>;
+               };
+       };
+
+       gic: interrupt-controller@f1001000 {
+               compatible = "arm,cortex-a15-gic";
+               #interrupt-cells = <3>;
+               #address-cells = <0>;
+               interrupt-controller;
+               reg = <0 0xf1001000 0 0x1000>,
+                       <0 0xf1002000 0 0x1000>,
+                       <0 0xf1004000 0 0x2000>,
+                       <0 0xf1006000 0 0x2000>;
+               interrupts = <1 9 0xf04>;
+       };
+
+       timer {
+               compatible = "arm,armv7-timer";
+               interrupts = <1 13 0xf08>,
+                               <1 14 0xf08>,
+                               <1 11 0xf08>,
+                               <1 10 0xf08>;
+       };
+
+       irqc0: interrupt-controller@e61c0000 {
+               compatible = "renesas,irqc";
+               #interrupt-cells = <2>;
+               interrupt-controller;
+               reg = <0 0xe61c0000 0 0x200>;
+               interrupt-parent = <&gic>;
+               interrupts = <0 0 4>,
+                             <0 1 4>,
+                             <0 2 4>,
+                             <0 3 4>,
+                             <0 12 4>,
+                             <0 13 4>,
+                             <0 14 4>,
+                             <0 15 4>,
+                             <0 16 4>,
+                             <0 17 4>;
+       };
+};
diff --git a/arch/arm/boot/dts/rk3066a-bqcurie2.dts b/arch/arm/boot/dts/rk3066a-bqcurie2.dts
new file mode 100644 (file)
index 0000000..035df40
--- /dev/null
@@ -0,0 +1,109 @@
+/*
+ * Copyright (c) 2013 MundoReader S.L.
+ * Author: Heiko Stuebner <heiko@sntech.de>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */
+
+/dts-v1/;
+#include "rk3066a.dtsi"
+
+/ {
+       model = "bq Curie 2";
+
+       memory {
+               reg = <0x60000000 0x40000000>;
+       };
+
+       soc {
+               uart0: serial@10124000 {
+                       status = "okay";
+               };
+
+               uart1: serial@10126000 {
+                       status = "okay";
+               };
+
+               uart2: serial@20064000 {
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&uart2_xfer>;
+                       status = "okay";
+               };
+
+               uart3: serial@20068000 {
+                       status = "okay";
+               };
+
+               vcc_sd0: fixed-regulator {
+                       compatible = "regulator-fixed";
+                       regulator-name = "sdmmc-supply";
+                       regulator-min-microvolt = <3000000>;
+                       regulator-max-microvolt = <3000000>;
+                       gpio = <&gpio3 7 GPIO_ACTIVE_LOW>;
+                       startup-delay-us = <100000>;
+               };
+
+               dwmmc@10214000 { /* sdmmc */
+                       num-slots = <1>;
+                       status = "okay";
+
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&sd0_clk &sd0_cmd &sd0_cd &sd0_bus4>;
+                       vmmc-supply = <&vcc_sd0>;
+
+                       slot@0 {
+                               reg = <0>;
+                               bus-width = <4>;
+                               disable-wp;
+                       };
+               };
+
+               dwmmc@10218000 { /* wifi */
+                       num-slots = <1>;
+                       status = "okay";
+                       non-removable;
+
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&sd1_clk &sd1_cmd &sd1_bus4>;
+
+                       slot@0 {
+                               reg = <0>;
+                               bus-width = <4>;
+                               disable-wp;
+                       };
+               };
+
+               gpio-keys {
+                       compatible = "gpio-keys";
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       autorepeat;
+
+                       button@0 {
+                               gpios = <&gpio6 2 GPIO_ACTIVE_LOW>; /* GPIO6_A2 */
+                               linux,code = <116>;
+                               label = "GPIO Key Power";
+                               linux,input-type = <1>;
+                               gpio-key,wakeup = <1>;
+                               debounce-interval = <100>;
+                       };
+                       button@1 {
+                               gpios = <&gpio4 21 GPIO_ACTIVE_LOW>; /* GPIO4_C5 */
+                               linux,code = <104>;
+                               label = "GPIO Key Vol-";
+                               linux,input-type = <1>;
+                               gpio-key,wakeup = <0>;
+                               debounce-interval = <100>;
+                       };
+                       /* VOL+ comes somehow thru the ADC */
+               };
+       };
+};
index 56bfac93d3f614f04d1f122a445090922941270a..be5d2b09a363d15c66c648ab5079c9d1312226ce 100644 (file)
  */
 
 #include <dt-bindings/gpio/gpio.h>
-#include <dt-bindings/interrupt-controller/irq.h>
-#include <dt-bindings/interrupt-controller/arm-gic.h>
 #include <dt-bindings/pinctrl/rockchip.h>
-#include "skeleton.dtsi"
+#include "rk3xxx.dtsi"
 #include "rk3066a-clocks.dtsi"
 
 / {
        compatible = "rockchip,rk3066a";
-       interrupt-parent = <&gic>;
 
        cpus {
                #address-cells = <1>;
        };
 
        soc {
-               #address-cells = <1>;
-               #size-cells = <1>;
-               compatible = "simple-bus";
-               ranges;
-
-               gic: interrupt-controller@1013d000 {
-                       compatible = "arm,cortex-a9-gic";
-                       interrupt-controller;
-                       #interrupt-cells = <3>;
-                       reg = <0x1013d000 0x1000>,
-                             <0x1013c100 0x0100>;
-               };
-
-               L2: l2-cache-controller@10138000 {
-                       compatible = "arm,pl310-cache";
-                       reg = <0x10138000 0x1000>;
-                       cache-unified;
-                       cache-level = <2>;
-               };
-
-               local-timer@1013c600 {
-                       compatible = "arm,cortex-a9-twd-timer";
-                       reg = <0x1013c600 0x20>;
-                       interrupts = <GIC_PPI 13 0x304>;
-                       clocks = <&dummy150m>;
-               };
-
                timer@20038000 {
                        compatible = "snps,dw-apb-timer-osc";
                        reg = <0x20038000 0x100>;
                                uart0_xfer: uart0-xfer {
                                        rockchip,pins = <RK_GPIO1 0 RK_FUNC_1 &pcfg_pull_default>,
                                                        <RK_GPIO1 1 RK_FUNC_1 &pcfg_pull_default>;
-                                       rockchip,config = <&pcfg_pull_default>;
                                };
 
                                uart0_cts: uart0-cts {
                                        rockchip,pins = <RK_GPIO1 2 RK_FUNC_1 &pcfg_pull_default>;
-                                       rockchip,config = <&pcfg_pull_default>;
                                };
 
                                uart0_rts: uart0-rts {
                                        rockchip,pins = <RK_GPIO1 3 RK_FUNC_1 &pcfg_pull_default>;
-                                       rockchip,config = <&pcfg_pull_default>;
                                };
                        };
 
                                uart1_xfer: uart1-xfer {
                                        rockchip,pins = <RK_GPIO1 4 RK_FUNC_1 &pcfg_pull_default>,
                                                        <RK_GPIO1 5 RK_FUNC_1 &pcfg_pull_default>;
-                                       rockchip,config = <&pcfg_pull_default>;
                                };
 
                                uart1_cts: uart1-cts {
                                        rockchip,pins = <RK_GPIO1 6 RK_FUNC_1 &pcfg_pull_default>;
-                                       rockchip,config = <&pcfg_pull_default>;
                                };
 
                                uart1_rts: uart1-rts {
                                        rockchip,pins = <RK_GPIO1 7 RK_FUNC_1 &pcfg_pull_default>;
-                                       rockchip,config = <&pcfg_pull_default>;
                                };
                        };
 
                                uart2_xfer: uart2-xfer {
                                        rockchip,pins = <RK_GPIO1 8 RK_FUNC_1 &pcfg_pull_default>,
                                                        <RK_GPIO1 9 RK_FUNC_1 &pcfg_pull_default>;
-                                       rockchip,config = <&pcfg_pull_default>;
                                };
                                /* no rts / cts for uart2 */
                        };
                                uart3_xfer: uart3-xfer {
                                        rockchip,pins = <RK_GPIO3 27 RK_FUNC_1 &pcfg_pull_default>,
                                                        <RK_GPIO3 28 RK_FUNC_1 &pcfg_pull_default>;
-                                       rockchip,config = <&pcfg_pull_default>;
                                };
 
                                uart3_cts: uart3-cts {
                                        rockchip,pins = <RK_GPIO3 29 RK_FUNC_1 &pcfg_pull_default>;
-                                       rockchip,config = <&pcfg_pull_default>;
                                };
 
                                uart3_rts: uart3-rts {
                                        rockchip,pins = <RK_GPIO3 30 RK_FUNC_1 &pcfg_pull_default>;
-                                       rockchip,config = <&pcfg_pull_default>;
                                };
                        };
 
                        sd0 {
                                sd0_clk: sd0-clk {
                                        rockchip,pins = <RK_GPIO3 8 RK_FUNC_1 &pcfg_pull_default>;
-                                       rockchip,config = <&pcfg_pull_default>;
                                };
 
                                sd0_cmd: sd0-cmd {
                                        rockchip,pins = <RK_GPIO3 9 RK_FUNC_1 &pcfg_pull_default>;
-                                       rockchip,config = <&pcfg_pull_default>;
                                };
 
                                sd0_cd: sd0-cd {
                                        rockchip,pins = <RK_GPIO3 14 RK_FUNC_1 &pcfg_pull_default>;
-                                       rockchip,config = <&pcfg_pull_default>;
                                };
 
                                sd0_wp: sd0-wp {
                                        rockchip,pins = <RK_GPIO3 15 RK_FUNC_1 &pcfg_pull_default>;
-                                       rockchip,config = <&pcfg_pull_default>;
                                };
 
                                sd0_bus1: sd0-bus-width1 {
                                        rockchip,pins = <RK_GPIO3 10 RK_FUNC_1 &pcfg_pull_default>;
-                                       rockchip,config = <&pcfg_pull_default>;
                                };
 
                                sd0_bus4: sd0-bus-width4 {
                                                        <RK_GPIO3 11 RK_FUNC_1 &pcfg_pull_default>,
                                                        <RK_GPIO3 12 RK_FUNC_1 &pcfg_pull_default>,
                                                        <RK_GPIO3 13 RK_FUNC_1 &pcfg_pull_default>;
-                                       rockchip,config = <&pcfg_pull_default>;
                                };
                        };
 
                        sd1 {
                                sd1_clk: sd1-clk {
                                        rockchip,pins = <RK_GPIO3 21 RK_FUNC_1 &pcfg_pull_default>;
-                                       rockchip,config = <&pcfg_pull_default>;
                                };
 
                                sd1_cmd: sd1-cmd {
                                        rockchip,pins = <RK_GPIO3 16 RK_FUNC_1 &pcfg_pull_default>;
-                                       rockchip,config = <&pcfg_pull_default>;
                                };
 
                                sd1_cd: sd1-cd {
                                        rockchip,pins = <RK_GPIO3 22 RK_FUNC_1 &pcfg_pull_default>;
-                                       rockchip,config = <&pcfg_pull_default>;
                                };
 
                                sd1_wp: sd1-wp {
                                        rockchip,pins = <RK_GPIO3 23 RK_FUNC_1 &pcfg_pull_default>;
-                                       rockchip,config = <&pcfg_pull_default>;
                                };
 
                                sd1_bus1: sd1-bus-width1 {
                                        rockchip,pins = <RK_GPIO3 17 RK_FUNC_1 &pcfg_pull_default>;
-                                       rockchip,config = <&pcfg_pull_default>;
                                };
 
                                sd1_bus4: sd1-bus-width4 {
                                                        <RK_GPIO3 18 RK_FUNC_1 &pcfg_pull_default>,
                                                        <RK_GPIO3 19 RK_FUNC_1 &pcfg_pull_default>,
                                                        <RK_GPIO3 20 RK_FUNC_1 &pcfg_pull_default>;
-                                       rockchip,config = <&pcfg_pull_default>;
                                };
                        };
                };
-
-               uart0: serial@10124000 {
-                       compatible = "snps,dw-apb-uart";
-                       reg = <0x10124000 0x400>;
-                       interrupts = <GIC_SPI 34 IRQ_TYPE_LEVEL_HIGH>;
-                       reg-shift = <2>;
-                       reg-io-width = <1>;
-                       clocks = <&clk_gates1 8>;
-                       status = "disabled";
-               };
-
-               uart1: serial@10126000 {
-                       compatible = "snps,dw-apb-uart";
-                       reg = <0x10126000 0x400>;
-                       interrupts = <GIC_SPI 35 IRQ_TYPE_LEVEL_HIGH>;
-                       reg-shift = <2>;
-                       reg-io-width = <1>;
-                       clocks = <&clk_gates1 10>;
-                       status = "disabled";
-               };
-
-               uart2: serial@20064000 {
-                       compatible = "snps,dw-apb-uart";
-                       reg = <0x20064000 0x400>;
-                       interrupts = <GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH>;
-                       reg-shift = <2>;
-                       reg-io-width = <1>;
-                       clocks = <&clk_gates1 12>;
-                       status = "disabled";
-               };
-
-               uart3: serial@20068000 {
-                       compatible = "snps,dw-apb-uart";
-                       reg = <0x20068000 0x400>;
-                       interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>;
-                       reg-shift = <2>;
-                       reg-io-width = <1>;
-                       clocks = <&clk_gates1 14>;
-                       status = "disabled";
-               };
-
-               dwmmc@10214000 {
-                       compatible = "rockchip,rk2928-dw-mshc";
-                       reg = <0x10214000 0x1000>;
-                       interrupts = <GIC_SPI 23 IRQ_TYPE_LEVEL_HIGH>;
-                       #address-cells = <1>;
-                       #size-cells = <0>;
-
-                       clocks = <&clk_gates5 10>, <&clk_gates2 11>;
-                       clock-names = "biu", "ciu";
-
-                       status = "disabled";
-               };
-
-               dwmmc@10218000 {
-                       compatible = "rockchip,rk2928-dw-mshc";
-                       reg = <0x10218000 0x1000>;
-                       interrupts = <GIC_SPI 24 IRQ_TYPE_LEVEL_HIGH>;
-                       #address-cells = <1>;
-                       #size-cells = <0>;
-
-                       clocks = <&clk_gates5 11>, <&clk_gates2 13>;
-                       clock-names = "biu", "ciu";
-
-                       status = "disabled";
-               };
        };
 };
diff --git a/arch/arm/boot/dts/rk3188-clocks.dtsi b/arch/arm/boot/dts/rk3188-clocks.dtsi
new file mode 100644 (file)
index 0000000..b1b92dc
--- /dev/null
@@ -0,0 +1,289 @@
+/*
+ * Copyright (c) 2013 MundoReader S.L.
+ * Author: Heiko Stuebner <heiko@sntech.de>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */
+
+/ {
+       clocks {
+               #address-cells = <1>;
+               #size-cells = <1>;
+               ranges;
+
+               /*
+                * This is a dummy clock, to be used as placeholder on
+                * other mux clocks when a specific parent clock is not
+                * yet implemented. It should be dropped when the driver
+                * is complete.
+                */
+               dummy: dummy {
+                       compatible = "fixed-clock";
+                       clock-frequency = <0>;
+                       #clock-cells = <0>;
+               };
+
+               xin24m: xin24m {
+                       compatible = "fixed-clock";
+                       clock-frequency = <24000000>;
+                       #clock-cells = <0>;
+               };
+
+               dummy48m: dummy48m {
+                       compatible = "fixed-clock";
+                       clock-frequency = <48000000>;
+                       #clock-cells = <0>;
+               };
+
+               dummy150m: dummy150m {
+                       compatible = "fixed-clock";
+                       clock-frequency = <150000000>;
+                       #clock-cells = <0>;
+               };
+
+               clk_gates0: gate-clk@200000d0 {
+                       compatible = "rockchip,rk2928-gate-clk";
+                       reg = <0x200000d0 0x4>;
+                       clocks = <&dummy150m>, <&dummy>,
+                                <&dummy>, <&dummy>,
+                                <&dummy>, <&dummy>,
+                                <&dummy>, <&dummy>,
+                                <&dummy>, <&dummy>,
+                                <&dummy>, <&dummy>,
+                                <&dummy>, <&dummy>,
+                                <&dummy>, <&dummy>;
+
+                       clock-output-names =
+                               "gate_core_periph", "gate_cpu_gpll",
+                               "gate_ddrphy", "gate_aclk_cpu",
+                               "gate_hclk_cpu", "gate_pclk_cpu",
+                               "gate_atclk_cpu", "gate_aclk_core",
+                               "reserved", "gate_i2s0",
+                               "gate_i2s0_frac", "reserved",
+                               "reserved", "gate_spdif",
+                               "gate_spdif_frac", "gate_testclk";
+
+                       #clock-cells = <1>;
+               };
+
+               clk_gates1: gate-clk@200000d4 {
+                       compatible = "rockchip,rk2928-gate-clk";
+                       reg = <0x200000d4 0x4>;
+                       clocks = <&xin24m>, <&xin24m>,
+                                <&xin24m>, <&dummy>,
+                                <&dummy>, <&xin24m>,
+                                <&xin24m>, <&dummy>,
+                                <&xin24m>, <&dummy>,
+                                <&xin24m>, <&dummy>,
+                                <&xin24m>, <&dummy>,
+                                <&xin24m>, <&dummy>;
+
+                       clock-output-names =
+                               "gate_timer0", "gate_timer1",
+                               "gate_timer3", "gate_jtag",
+                               "gate_aclk_lcdc1_src", "gate_otgphy0",
+                               "gate_otgphy1", "gate_ddr_gpll",
+                               "gate_uart0", "gate_frac_uart0",
+                               "gate_uart1", "gate_frac_uart1",
+                               "gate_uart2", "gate_frac_uart2",
+                               "gate_uart3", "gate_frac_uart3";
+
+                       #clock-cells = <1>;
+               };
+
+               clk_gates2: gate-clk@200000d8 {
+                       compatible = "rockchip,rk2928-gate-clk";
+                       reg = <0x200000d8 0x4>;
+                       clocks = <&clk_gates2 1>, <&dummy>,
+                                <&dummy>, <&dummy>,
+                                <&dummy>, <&dummy>,
+                                <&clk_gates2 3>, <&dummy>,
+                                <&dummy>, <&dummy>,
+                                <&dummy>, <&dummy48m>,
+                                <&dummy>, <&dummy48m>,
+                                <&dummy>, <&dummy>;
+
+                       clock-output-names =
+                               "gate_periph_src", "gate_aclk_periph",
+                               "gate_hclk_periph", "gate_pclk_periph",
+                               "gate_smc", "gate_mac",
+                               "gate_hsadc", "gate_hsadc_frac",
+                               "gate_saradc", "gate_spi0",
+                               "gate_spi1", "gate_mmc0",
+                               "gate_mac_lbtest", "gate_mmc1",
+                               "gate_emmc", "reserved";
+
+                       #clock-cells = <1>;
+               };
+
+               clk_gates3: gate-clk@200000dc {
+                       compatible = "rockchip,rk2928-gate-clk";
+                       reg = <0x200000dc 0x4>;
+                       clocks = <&dummy>, <&dummy>,
+                                <&dummy>, <&dummy>,
+                                <&xin24m>, <&xin24m>,
+                                <&dummy>, <&dummy>,
+                                <&xin24m>, <&dummy>,
+                                <&dummy>, <&dummy>,
+                                <&dummy>, <&dummy>,
+                                <&xin24m>, <&dummy>;
+
+                       clock-output-names =
+                               "gate_aclk_lcdc0_src", "gate_dclk_lcdc0",
+                               "gate_dclk_lcdc1", "gate_pclkin_cif0",
+                               "gate_timer2", "gate_timer4",
+                               "gate_hsicphy", "gate_cif0_out",
+                               "gate_timer5", "gate_aclk_vepu",
+                               "gate_hclk_vepu", "gate_aclk_vdpu",
+                               "gate_hclk_vdpu", "reserved",
+                               "gate_timer6", "gate_aclk_gpu_src";
+
+                       #clock-cells = <1>;
+               };
+
+               clk_gates4: gate-clk@200000e0 {
+                       compatible = "rockchip,rk2928-gate-clk";
+                       reg = <0x200000e0 0x4>;
+                       clocks = <&clk_gates2 2>, <&clk_gates2 3>,
+                                <&clk_gates2 1>, <&clk_gates2 1>,
+                                <&clk_gates2 1>, <&clk_gates2 2>,
+                                <&clk_gates2 2>, <&clk_gates2 2>,
+                                <&clk_gates0 4>, <&clk_gates0 4>,
+                                <&clk_gates0 3>, <&dummy>,
+                                <&clk_gates0 3>, <&dummy>,
+                                <&dummy>, <&dummy>;
+
+                       clock-output-names =
+                               "gate_hclk_peri_axi_matrix", "gate_pclk_peri_axi_matrix",
+                               "gate_aclk_cpu_peri", "gate_aclk_peri_axi_matrix",
+                               "gate_aclk_pei_niu", "gate_hclk_usb_peri",
+                               "gate_hclk_peri_ahb_arbi", "gate_hclk_emem_peri",
+                               "gate_hclk_cpubus", "gate_hclk_ahb2apb",
+                               "gate_aclk_strc_sys", "reserved",
+                               "gate_aclk_intmem", "reserved",
+                               "gate_hclk_imem1", "gate_hclk_imem0";
+
+                       #clock-cells = <1>;
+               };
+
+               clk_gates5: gate-clk@200000e4 {
+                       compatible = "rockchip,rk2928-gate-clk";
+                       reg = <0x200000e4 0x4>;
+                       clocks = <&clk_gates0 3>, <&clk_gates2 1>,
+                                <&clk_gates0 5>, <&clk_gates0 5>,
+                                <&clk_gates0 5>, <&clk_gates0 5>,
+                                <&clk_gates0 4>, <&clk_gates0 5>,
+                                <&clk_gates2 1>, <&clk_gates2 2>,
+                                <&clk_gates2 2>, <&clk_gates2 2>,
+                                <&clk_gates2 2>, <&clk_gates4 5>;
+
+                       clock-output-names =
+                               "gate_aclk_dmac1", "gate_aclk_dmac2",
+                               "gate_pclk_efuse", "gate_pclk_tzpc",
+                               "gate_pclk_grf", "gate_pclk_pmu",
+                               "gate_hclk_rom", "gate_pclk_ddrupctl",
+                               "gate_aclk_smc", "gate_hclk_nandc",
+                               "gate_hclk_mmc0", "gate_hclk_mmc1",
+                               "gate_hclk_emmc", "gate_hclk_otg0";
+
+                       #clock-cells = <1>;
+               };
+
+               clk_gates6: gate-clk@200000e8 {
+                       compatible = "rockchip,rk2928-gate-clk";
+                       reg = <0x200000e8 0x4>;
+                       clocks = <&clk_gates3 0>, <&clk_gates0 4>,
+                                <&clk_gates0 4>, <&clk_gates1 4>,
+                                <&clk_gates0 4>, <&clk_gates3 0>,
+                                <&dummy>, <&dummy>,
+                                <&clk_gates3 0>, <&clk_gates0 4>,
+                                <&clk_gates0 4>, <&clk_gates1 4>,
+                                <&clk_gates0 4>, <&clk_gates3 0>;
+
+                       clock-output-names =
+                               "gate_aclk_lcdc0", "gate_hclk_lcdc0",
+                               "gate_hclk_lcdc1", "gate_aclk_lcdc1",
+                               "gate_hclk_cif0", "gate_aclk_cif0",
+                               "reserved", "reserved",
+                               "gate_aclk_ipp", "gate_hclk_ipp",
+                               "gate_hclk_rga", "gate_aclk_rga",
+                               "gate_hclk_vio_bus", "gate_aclk_vio0";
+
+                       #clock-cells = <1>;
+               };
+
+               clk_gates7: gate-clk@200000ec {
+                       compatible = "rockchip,rk2928-gate-clk";
+                       reg = <0x200000ec 0x4>;
+                       clocks = <&clk_gates2 2>, <&clk_gates0 4>,
+                                <&clk_gates0 4>, <&dummy>,
+                                <&dummy>, <&clk_gates2 2>,
+                                <&clk_gates2 2>, <&clk_gates0 5>,
+                                <&dummy>, <&clk_gates0 5>,
+                                <&clk_gates0 5>, <&clk_gates2 3>,
+                                <&clk_gates2 3>, <&clk_gates2 3>,
+                                <&clk_gates2 3>, <&clk_gates2 3>;
+
+                       clock-output-names =
+                               "gate_hclk_emac", "gate_hclk_spdif",
+                               "gate_hclk_i2s0_2ch", "gate_hclk_otg1",
+                               "gate_hclk_hsic", "gate_hclk_hsadc",
+                               "gate_hclk_pidf", "gate_pclk_timer0",
+                               "reserved", "gate_pclk_timer2",
+                               "gate_pclk_pwm01", "gate_pclk_pwm23",
+                               "gate_pclk_spi0", "gate_pclk_spi1",
+                               "gate_pclk_saradc", "gate_pclk_wdt";
+
+                       #clock-cells = <1>;
+               };
+
+               clk_gates8: gate-clk@200000f0 {
+                       compatible = "rockchip,rk2928-gate-clk";
+                       reg = <0x200000f0 0x4>;
+                       clocks = <&clk_gates0 5>, <&clk_gates0 5>,
+                                <&clk_gates2 3>, <&clk_gates2 3>,
+                                <&clk_gates0 5>, <&clk_gates0 5>,
+                                <&clk_gates2 3>, <&clk_gates2 3>,
+                                <&clk_gates2 3>, <&clk_gates0 5>,
+                                <&clk_gates0 5>, <&clk_gates0 5>,
+                                <&clk_gates2 3>, <&dummy>;
+
+                       clock-output-names =
+                               "gate_pclk_uart0", "gate_pclk_uart1",
+                               "gate_pclk_uart2", "gate_pclk_uart3",
+                               "gate_pclk_i2c0", "gate_pclk_i2c1",
+                               "gate_pclk_i2c2", "gate_pclk_i2c3",
+                               "gate_pclk_i2c4", "gate_pclk_gpio0",
+                               "gate_pclk_gpio1", "gate_pclk_gpio2",
+                               "gate_pclk_gpio3", "gate_aclk_gps";
+
+                       #clock-cells = <1>;
+               };
+
+               clk_gates9: gate-clk@200000f4 {
+                       compatible = "rockchip,rk2928-gate-clk";
+                       reg = <0x200000f4 0x4>;
+                       clocks = <&dummy>, <&dummy>,
+                                <&dummy>, <&dummy>,
+                                <&dummy>, <&dummy>,
+                                <&dummy>, <&dummy>;
+
+                       clock-output-names =
+                               "gate_clk_core_dbg", "gate_pclk_dbg",
+                               "gate_clk_trace", "gate_atclk",
+                               "gate_clk_l2c", "gate_aclk_vio1",
+                               "gate_pclk_publ", "gate_aclk_gpu";
+
+                       #clock-cells = <1>;
+               };
+       };
+
+};
diff --git a/arch/arm/boot/dts/rk3188-radxarock.dts b/arch/arm/boot/dts/rk3188-radxarock.dts
new file mode 100644 (file)
index 0000000..3ba1968
--- /dev/null
@@ -0,0 +1,80 @@
+/*
+ * Copyright (c) 2013 Heiko Stuebner <heiko@sntech.de>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */
+
+/dts-v1/;
+#include "rk3188.dtsi"
+
+/ {
+       model = "Radxa Rock";
+
+       memory {
+               reg = <0x60000000 0x80000000>;
+       };
+
+       soc {
+               uart0: serial@10124000 {
+                       status = "okay";
+               };
+
+               uart1: serial@10126000 {
+                       status = "okay";
+               };
+
+               uart2: serial@20064000 {
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&uart2_xfer>;
+                       status = "okay";
+               };
+
+               uart3: serial@20068000 {
+                       status = "okay";
+               };
+
+               gpio-keys {
+                       compatible = "gpio-keys";
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       autorepeat;
+
+                       button@0 {
+                               gpios = <&gpio0 4 GPIO_ACTIVE_LOW>;
+                               linux,code = <116>;
+                               label = "GPIO Key Power";
+                               linux,input-type = <1>;
+                               gpio-key,wakeup = <1>;
+                               debounce-interval = <100>;
+                       };
+               };
+
+               gpio-leds {
+                       compatible = "gpio-leds";
+
+                       green {
+                               gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
+                               default-state = "off";
+                       };
+
+                       yellow {
+                               gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
+                               default-state = "off";
+                       };
+
+                       sleep {
+                               gpios = <&gpio0 15 0>;
+                               default-state = "off";
+                       };
+               };
+
+       };
+};
diff --git a/arch/arm/boot/dts/rk3188.dtsi b/arch/arm/boot/dts/rk3188.dtsi
new file mode 100644 (file)
index 0000000..1a26b03
--- /dev/null
@@ -0,0 +1,253 @@
+/*
+ * Copyright (c) 2013 MundoReader S.L.
+ * Author: Heiko Stuebner <heiko@sntech.de>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/pinctrl/rockchip.h>
+#include "rk3xxx.dtsi"
+#include "rk3188-clocks.dtsi"
+
+/ {
+       compatible = "rockchip,rk3188";
+
+       cpus {
+               #address-cells = <1>;
+               #size-cells = <0>;
+
+               cpu@0 {
+                       device_type = "cpu";
+                       compatible = "arm,cortex-a9";
+                       next-level-cache = <&L2>;
+                       reg = <0x0>;
+               };
+               cpu@1 {
+                       device_type = "cpu";
+                       compatible = "arm,cortex-a9";
+                       next-level-cache = <&L2>;
+                       reg = <0x1>;
+               };
+               cpu@2 {
+                       device_type = "cpu";
+                       compatible = "arm,cortex-a9";
+                       next-level-cache = <&L2>;
+                       reg = <0x2>;
+               };
+               cpu@3 {
+                       device_type = "cpu";
+                       compatible = "arm,cortex-a9";
+                       next-level-cache = <&L2>;
+                       reg = <0x3>;
+               };
+       };
+
+       soc {
+               global-timer@1013c200 {
+                       interrupts = <GIC_PPI 11 0xf04>;
+               };
+
+               local-timer@1013c600 {
+                       interrupts = <GIC_PPI 13 0xf04>;
+               };
+
+               pinctrl@20008000 {
+                       compatible = "rockchip,rk3188-pinctrl";
+                       reg = <0x20008000 0xa0>,
+                             <0x20008164 0x1a0>;
+                       reg-names = "base", "pull";
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+                       ranges;
+
+                       gpio0: gpio0@0x2000a000 {
+                               compatible = "rockchip,rk3188-gpio-bank0";
+                               reg = <0x2000a000 0x100>,
+                                     <0x20004064 0x8>;
+                               interrupts = <GIC_SPI 54 IRQ_TYPE_LEVEL_HIGH>;
+                               clocks = <&clk_gates8 9>;
+
+                               gpio-controller;
+                               #gpio-cells = <2>;
+
+                               interrupt-controller;
+                               #interrupt-cells = <2>;
+                       };
+
+                       gpio1: gpio1@0x2003c000 {
+                               compatible = "rockchip,gpio-bank";
+                               reg = <0x2003c000 0x100>;
+                               interrupts = <GIC_SPI 55 IRQ_TYPE_LEVEL_HIGH>;
+                               clocks = <&clk_gates8 10>;
+
+                               gpio-controller;
+                               #gpio-cells = <2>;
+
+                               interrupt-controller;
+                               #interrupt-cells = <2>;
+                       };
+
+                       gpio2: gpio2@2003e000 {
+                               compatible = "rockchip,gpio-bank";
+                               reg = <0x2003e000 0x100>;
+                               interrupts = <GIC_SPI 56 IRQ_TYPE_LEVEL_HIGH>;
+                               clocks = <&clk_gates8 11>;
+
+                               gpio-controller;
+                               #gpio-cells = <2>;
+
+                               interrupt-controller;
+                               #interrupt-cells = <2>;
+                       };
+
+                       gpio3: gpio3@20080000 {
+                               compatible = "rockchip,gpio-bank";
+                               reg = <0x20080000 0x100>;
+                               interrupts = <GIC_SPI 57 IRQ_TYPE_LEVEL_HIGH>;
+                               clocks = <&clk_gates8 12>;
+
+                               gpio-controller;
+                               #gpio-cells = <2>;
+
+                               interrupt-controller;
+                               #interrupt-cells = <2>;
+                       };
+
+                       pcfg_pull_up: pcfg_pull_up {
+                               bias-pull-up;
+                       };
+
+                       pcfg_pull_down: pcfg_pull_down {
+                               bias-pull-down;
+                       };
+
+                       pcfg_pull_none: pcfg_pull_none {
+                               bias-disable;
+                       };
+
+                       uart0 {
+                               uart0_xfer: uart0-xfer {
+                                       rockchip,pins = <RK_GPIO1 0 RK_FUNC_1 &pcfg_pull_none>,
+                                                       <RK_GPIO1 1 RK_FUNC_1 &pcfg_pull_none>;
+                               };
+
+                               uart0_cts: uart0-cts {
+                                       rockchip,pins = <RK_GPIO1 2 RK_FUNC_1 &pcfg_pull_none>;
+                               };
+
+                               uart0_rts: uart0-rts {
+                                       rockchip,pins = <RK_GPIO1 3 RK_FUNC_1 &pcfg_pull_none>;
+                               };
+                       };
+
+                       uart1 {
+                               uart1_xfer: uart1-xfer {
+                                       rockchip,pins = <RK_GPIO1 4 RK_FUNC_1 &pcfg_pull_none>,
+                                                       <RK_GPIO1 5 RK_FUNC_1 &pcfg_pull_none>;
+                               };
+
+                               uart1_cts: uart1-cts {
+                                       rockchip,pins = <RK_GPIO1 6 RK_FUNC_1 &pcfg_pull_none>;
+                               };
+
+                               uart1_rts: uart1-rts {
+                                       rockchip,pins = <RK_GPIO1 7 RK_FUNC_1 &pcfg_pull_none>;
+                               };
+                       };
+
+                       uart2 {
+                               uart2_xfer: uart2-xfer {
+                                       rockchip,pins = <RK_GPIO1 8 RK_FUNC_1 &pcfg_pull_none>,
+                                                       <RK_GPIO1 9 RK_FUNC_1 &pcfg_pull_none>;
+                               };
+                               /* no rts / cts for uart2 */
+                       };
+
+                       uart3 {
+                               uart3_xfer: uart3-xfer {
+                                       rockchip,pins = <RK_GPIO1 10 RK_FUNC_1 &pcfg_pull_none>,
+                                                       <RK_GPIO1 11 RK_FUNC_1 &pcfg_pull_none>;
+                               };
+
+                               uart3_cts: uart3-cts {
+                                       rockchip,pins = <RK_GPIO1 12 RK_FUNC_1 &pcfg_pull_none>;
+                               };
+
+                               uart3_rts: uart3-rts {
+                                       rockchip,pins = <RK_GPIO1 13 RK_FUNC_1 &pcfg_pull_none>;
+                               };
+                       };
+
+                       sd0 {
+                               sd0_clk: sd0-clk {
+                                       rockchip,pins = <RK_GPIO3 2 RK_FUNC_1 &pcfg_pull_none>;
+                               };
+
+                               sd0_cmd: sd0-cmd {
+                                       rockchip,pins = <RK_GPIO3 3 RK_FUNC_1 &pcfg_pull_none>;
+                               };
+
+                               sd0_cd: sd0-cd {
+                                       rockchip,pins = <RK_GPIO3 8 RK_FUNC_1 &pcfg_pull_none>;
+                               };
+
+                               sd0_wp: sd0-wp {
+                                       rockchip,pins = <RK_GPIO3 9 RK_FUNC_1 &pcfg_pull_none>;
+                               };
+
+                               sd0_pwr: sd0-pwr {
+                                       rockchip,pins = <RK_GPIO3 1 RK_FUNC_1 &pcfg_pull_none>;
+                               };
+
+                               sd0_bus1: sd0-bus-width1 {
+                                       rockchip,pins = <RK_GPIO3 4 RK_FUNC_1 &pcfg_pull_none>;
+                               };
+
+                               sd0_bus4: sd0-bus-width4 {
+                                       rockchip,pins = <RK_GPIO3 4 RK_FUNC_1 &pcfg_pull_none>,
+                                                       <RK_GPIO3 5 RK_FUNC_1 &pcfg_pull_none>,
+                                                       <RK_GPIO3 6 RK_FUNC_1 &pcfg_pull_none>,
+                                                       <RK_GPIO3 7 RK_FUNC_1 &pcfg_pull_none>;
+                               };
+                       };
+
+                       sd1 {
+                               sd1_clk: sd1-clk {
+                                       rockchip,pins = <RK_GPIO3 21 RK_FUNC_1 &pcfg_pull_none>;
+                               };
+
+                               sd1_cmd: sd1-cmd {
+                                       rockchip,pins = <RK_GPIO3 16 RK_FUNC_1 &pcfg_pull_none>;
+                               };
+
+                               sd1_cd: sd1-cd {
+                                       rockchip,pins = <RK_GPIO3 22 RK_FUNC_1 &pcfg_pull_none>;
+                               };
+
+                               sd1_wp: sd1-wp {
+                                       rockchip,pins = <RK_GPIO3 23 RK_FUNC_1 &pcfg_pull_none>;
+                               };
+
+                               sd1_bus1: sd1-bus-width1 {
+                                       rockchip,pins = <RK_GPIO3 17 RK_FUNC_1 &pcfg_pull_none>;
+                               };
+
+                               sd1_bus4: sd1-bus-width4 {
+                                       rockchip,pins = <RK_GPIO3 17 RK_FUNC_1 &pcfg_pull_none>,
+                                                       <RK_GPIO3 18 RK_FUNC_1 &pcfg_pull_none>,
+                                                       <RK_GPIO3 19 RK_FUNC_1 &pcfg_pull_none>,
+                                                       <RK_GPIO3 20 RK_FUNC_1 &pcfg_pull_none>;
+                               };
+                       };
+               };
+       };
+};
diff --git a/arch/arm/boot/dts/rk3xxx.dtsi b/arch/arm/boot/dts/rk3xxx.dtsi
new file mode 100644 (file)
index 0000000..0fcbcfd
--- /dev/null
@@ -0,0 +1,124 @@
+/*
+ * Copyright (c) 2013 MundoReader S.L.
+ * Author: Heiko Stuebner <heiko@sntech.de>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */
+
+#include <dt-bindings/interrupt-controller/irq.h>
+#include <dt-bindings/interrupt-controller/arm-gic.h>
+#include "skeleton.dtsi"
+
+/ {
+       interrupt-parent = <&gic>;
+
+       soc {
+               #address-cells = <1>;
+               #size-cells = <1>;
+               compatible = "simple-bus";
+               ranges;
+
+               gic: interrupt-controller@1013d000 {
+                       compatible = "arm,cortex-a9-gic";
+                       interrupt-controller;
+                       #interrupt-cells = <3>;
+                       reg = <0x1013d000 0x1000>,
+                             <0x1013c100 0x0100>;
+               };
+
+               L2: l2-cache-controller@10138000 {
+                       compatible = "arm,pl310-cache";
+                       reg = <0x10138000 0x1000>;
+                       cache-unified;
+                       cache-level = <2>;
+               };
+
+               global-timer@1013c200 {
+                       compatible = "arm,cortex-a9-global-timer";
+                       reg = <0x1013c200 0x20>;
+                       interrupts = <GIC_PPI 11 0x304>;
+                       clocks = <&dummy150m>;
+               };
+
+               local-timer@1013c600 {
+                       compatible = "arm,cortex-a9-twd-timer";
+                       reg = <0x1013c600 0x20>;
+                       interrupts = <GIC_PPI 13 0x304>;
+                       clocks = <&dummy150m>;
+               };
+
+               uart0: serial@10124000 {
+                       compatible = "snps,dw-apb-uart";
+                       reg = <0x10124000 0x400>;
+                       interrupts = <GIC_SPI 34 IRQ_TYPE_LEVEL_HIGH>;
+                       reg-shift = <2>;
+                       reg-io-width = <1>;
+                       clocks = <&clk_gates1 8>;
+                       status = "disabled";
+               };
+
+               uart1: serial@10126000 {
+                       compatible = "snps,dw-apb-uart";
+                       reg = <0x10126000 0x400>;
+                       interrupts = <GIC_SPI 35 IRQ_TYPE_LEVEL_HIGH>;
+                       reg-shift = <2>;
+                       reg-io-width = <1>;
+                       clocks = <&clk_gates1 10>;
+                       status = "disabled";
+               };
+
+               uart2: serial@20064000 {
+                       compatible = "snps,dw-apb-uart";
+                       reg = <0x20064000 0x400>;
+                       interrupts = <GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH>;
+                       reg-shift = <2>;
+                       reg-io-width = <1>;
+                       clocks = <&clk_gates1 12>;
+                       status = "disabled";
+               };
+
+               uart3: serial@20068000 {
+                       compatible = "snps,dw-apb-uart";
+                       reg = <0x20068000 0x400>;
+                       interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>;
+                       reg-shift = <2>;
+                       reg-io-width = <1>;
+                       clocks = <&clk_gates1 14>;
+                       status = "disabled";
+               };
+
+               dwmmc@10214000 {
+                       compatible = "rockchip,rk2928-dw-mshc";
+                       reg = <0x10214000 0x1000>;
+                       interrupts = <GIC_SPI 23 IRQ_TYPE_LEVEL_HIGH>;
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+
+                       clocks = <&clk_gates5 10>, <&clk_gates2 11>;
+                       clock-names = "biu", "ciu";
+
+                       status = "disabled";
+               };
+
+               dwmmc@10218000 {
+                       compatible = "rockchip,rk2928-dw-mshc";
+                       reg = <0x10218000 0x1000>;
+                       interrupts = <GIC_SPI 24 IRQ_TYPE_LEVEL_HIGH>;
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+
+                       clocks = <&clk_gates5 11>, <&clk_gates2 13>;
+                       clock-names = "biu", "ciu";
+
+                       status = "disabled";
+               };
+       };
+};
diff --git a/arch/arm/boot/dts/s3c6400.dtsi b/arch/arm/boot/dts/s3c6400.dtsi
new file mode 100644 (file)
index 0000000..a7d1c8e
--- /dev/null
@@ -0,0 +1,41 @@
+/*
+ * Samsung's S3C6400 SoC device tree source
+ *
+ * Copyright (c) 2013 Tomasz Figa <tomasz.figa@gmail.com>
+ *
+ * Samsung's S3C6400 SoC device nodes are listed in this file. S3C6400
+ * based board files can include this file and provide values for board specfic
+ * bindings.
+ *
+ * Note: This file does not include device nodes for all the controllers in
+ * S3C6400 SoC. As device tree coverage for S3C6400 increases, additional
+ * nodes can be added to this file.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+*/
+
+#include "s3c64xx.dtsi"
+
+/ {
+       compatible = "samsung,s3c6400";
+};
+
+&vic0 {
+       valid-mask = <0xfffffe1f>;
+       valid-wakeup-mask = <0x00200004>;
+};
+
+&vic1 {
+       valid-mask = <0xffffffff>;
+       valid-wakeup-mask = <0x53020000>;
+};
+
+&soc {
+       clocks: clock-controller@7e00f000 {
+               compatible = "samsung,s3c6400-clock";
+               reg = <0x7e00f000 0x1000>;
+               #clock-cells = <1>;
+       };
+};
diff --git a/arch/arm/boot/dts/s3c6410-mini6410.dts b/arch/arm/boot/dts/s3c6410-mini6410.dts
new file mode 100644 (file)
index 0000000..57e00f9
--- /dev/null
@@ -0,0 +1,228 @@
+/*
+ * Samsung's S3C6410 based Mini6410 board device tree source
+ *
+ * Copyright (c) 2013 Tomasz Figa <tomasz.figa@gmail.com>
+ *
+ * Device tree source file for FriendlyARM Mini6410 board which is based on
+ * Samsung's S3C6410 SoC.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+*/
+
+/dts-v1/;
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/interrupt-controller/irq.h>
+
+#include "s3c6410.dtsi"
+
+/ {
+       model = "FriendlyARM Mini6410 board based on S3C6410";
+       compatible = "friendlyarm,mini6410", "samsung,s3c6410";
+
+       memory {
+               reg = <0x50000000 0x10000000>;
+       };
+
+       chosen {
+               bootargs = "console=ttySAC0,115200n8 earlyprintk rootwait root=/dev/mmcblk0p1";
+       };
+
+       clocks {
+               compatible = "simple-bus";
+               #address-cells = <1>;
+               #size-cells = <0>;
+
+               fin_pll: oscillator@0 {
+                       compatible = "fixed-clock";
+                       reg = <0>;
+                       clock-frequency = <12000000>;
+                       clock-output-names = "fin_pll";
+                       #clock-cells = <0>;
+               };
+
+               xusbxti: oscillator@1 {
+                       compatible = "fixed-clock";
+                       reg = <1>;
+                       clock-output-names = "xusbxti";
+                       clock-frequency = <48000000>;
+                       #clock-cells = <0>;
+               };
+       };
+
+       srom-cs1@18000000 {
+               compatible = "simple-bus";
+               #address-cells = <1>;
+               #size-cells = <1>;
+               reg = <0x18000000 0x8000000>;
+               ranges;
+
+               ethernet@18000000 {
+                       compatible = "davicom,dm9000";
+                       reg = <0x18000000 0x2 0x18000004 0x2>;
+                       interrupt-parent = <&gpn>;
+                       interrupts = <7 IRQ_TYPE_LEVEL_HIGH>;
+                       davicom,no-eeprom;
+               };
+       };
+
+       gpio-keys {
+               compatible = "gpio-keys";
+               pinctrl-names = "default";
+               pinctrl-0 = <&gpio_keys>;
+               autorepeat;
+
+               button-k1 {
+                       label = "K1";
+                       gpios = <&gpn 0 GPIO_ACTIVE_LOW>;
+                       linux,code = <2>;
+                       debounce-interval = <20>;
+               };
+
+               button-k2 {
+                       label = "K2";
+                       gpios = <&gpn 1 GPIO_ACTIVE_LOW>;
+                       linux,code = <3>;
+                       debounce-interval = <20>;
+               };
+
+               button-k3 {
+                       label = "K3";
+                       gpios = <&gpn 2 GPIO_ACTIVE_LOW>;
+                       linux,code = <4>;
+                       debounce-interval = <20>;
+               };
+
+               button-k4 {
+                       label = "K4";
+                       gpios = <&gpn 3 GPIO_ACTIVE_LOW>;
+                       linux,code = <5>;
+                       debounce-interval = <20>;
+               };
+
+               button-k5 {
+                       label = "K5";
+                       gpios = <&gpn 4 GPIO_ACTIVE_LOW>;
+                       linux,code = <6>;
+                       debounce-interval = <20>;
+               };
+
+               button-k6 {
+                       label = "K6";
+                       gpios = <&gpn 5 GPIO_ACTIVE_LOW>;
+                       linux,code = <7>;
+                       debounce-interval = <20>;
+               };
+
+               button-k7 {
+                       label = "K7";
+                       gpios = <&gpl 11 GPIO_ACTIVE_LOW>;
+                       linux,code = <8>;
+                       debounce-interval = <20>;
+               };
+
+               button-k8 {
+                       label = "K8";
+                       gpios = <&gpl 12 GPIO_ACTIVE_LOW>;
+                       linux,code = <9>;
+                       debounce-interval = <20>;
+               };
+       };
+
+       leds {
+               compatible = "gpio-leds";
+               pinctrl-names = "default";
+               pinctrl-0 = <&gpio_leds>;
+
+               led-1 {
+                       label = "LED1";
+                       gpios = <&gpk 4 GPIO_ACTIVE_LOW>;
+                       linux,default-trigger = "heartbeat";
+               };
+
+               led-2 {
+                       label = "LED2";
+                       gpios = <&gpk 5 GPIO_ACTIVE_LOW>;
+                       linux,default-trigger = "mmc0";
+               };
+
+               led-3 {
+                       label = "LED3";
+                       gpios = <&gpk 6 GPIO_ACTIVE_LOW>;
+               };
+
+               led-4 {
+                       label = "LED4";
+                       gpios = <&gpk 7 GPIO_ACTIVE_LOW>;
+               };
+       };
+
+       buzzer {
+               compatible = "pwm-beeper";
+               pwms = <&pwm 0 1000000 0>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&pwm0_out>;
+       };
+};
+
+&sdhci0 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&sd0_clk>, <&sd0_cmd>, <&sd0_cd>, <&sd0_bus4>;
+       bus-width = <4>;
+       status = "okay";
+};
+
+&uart0 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&uart0_data>;
+       status = "okay";
+};
+
+&uart1 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&uart1_data>, <&uart1_fctl>;
+       status = "okay";
+};
+
+&uart2 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&uart2_data>;
+       status = "okay";
+};
+
+&uart3 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&uart3_data>;
+       status = "okay";
+};
+
+&pwm {
+       status = "okay";
+};
+
+&pinctrl0 {
+       gpio_leds: gpio-leds {
+               samsung,pins = "gpk-4", "gpk-5", "gpk-6", "gpk-7";
+               samsung,pin-pud = <PIN_PULL_NONE>;
+       };
+
+       gpio_keys: gpio-keys {
+               samsung,pins = "gpn-0", "gpn-1", "gpn-2", "gpn-3",
+                               "gpn-4", "gpn-5", "gpl-11", "gpl-12";
+               samsung,pin-pud = <PIN_PULL_NONE>;
+       };
+};
+
+&i2c0 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&i2c0_bus>;
+       status = "okay";
+
+       eeprom@50 {
+               compatible = "atmel,24c08";
+               reg = <0x50>;
+               pagesize = <16>;
+       };
+};
diff --git a/arch/arm/boot/dts/s3c6410-smdk6410.dts b/arch/arm/boot/dts/s3c6410-smdk6410.dts
new file mode 100644 (file)
index 0000000..ecf35ec
--- /dev/null
@@ -0,0 +1,103 @@
+/*
+ * Samsung S3C6410 based SMDK6410 board device tree source.
+ *
+ * Copyright (c) 2013 Tomasz Figa <tomasz.figa@gmail.com>
+ *
+ * Device tree source file for SAMSUNG SMDK6410 board which is based on
+ * Samsung's S3C6410 SoC.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+*/
+
+/dts-v1/;
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/interrupt-controller/irq.h>
+
+#include "s3c6410.dtsi"
+
+/ {
+       model = "SAMSUNG SMDK6410 board based on S3C6410";
+       compatible = "samsung,mini6410", "samsung,s3c6410";
+
+       memory {
+               reg = <0x50000000 0x8000000>;
+       };
+
+       chosen {
+               bootargs = "console=ttySAC0,115200n8 earlyprintk rootwait root=/dev/mmcblk0p1";
+       };
+
+       clocks {
+               compatible = "simple-bus";
+               #address-cells = <1>;
+               #size-cells = <0>;
+
+               fin_pll: oscillator@0 {
+                       compatible = "fixed-clock";
+                       reg = <0>;
+                       clock-frequency = <12000000>;
+                       clock-output-names = "fin_pll";
+                       #clock-cells = <0>;
+               };
+
+               xusbxti: oscillator@1 {
+                       compatible = "fixed-clock";
+                       reg = <1>;
+                       clock-output-names = "xusbxti";
+                       clock-frequency = <48000000>;
+                       #clock-cells = <0>;
+               };
+       };
+
+       srom-cs1@18000000 {
+               compatible = "simple-bus";
+               #address-cells = <1>;
+               #size-cells = <1>;
+               reg = <0x18000000 0x8000000>;
+               ranges;
+
+               ethernet@18000000 {
+                       compatible = "smsc,lan9115";
+                       reg = <0x18000000 0x10000>;
+                       interrupt-parent = <&gpn>;
+                       interrupts = <10 IRQ_TYPE_LEVEL_LOW>;
+                       phy-mode = "mii";
+                       reg-io-width = <4>;
+                       smsc,force-internal-phy;
+               };
+       };
+};
+
+&sdhci0 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&sd0_clk>, <&sd0_cmd>, <&sd0_cd>, <&sd0_bus4>;
+       bus-width = <4>;
+       status = "okay";
+};
+
+&uart0 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&uart0_data>, <&uart0_fctl>;
+       status = "okay";
+};
+
+&uart1 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&uart1_data>;
+       status = "okay";
+};
+
+&uart2 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&uart2_data>;
+       status = "okay";
+};
+
+&uart3 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&uart3_data>;
+       status = "okay";
+};
diff --git a/arch/arm/boot/dts/s3c6410.dtsi b/arch/arm/boot/dts/s3c6410.dtsi
new file mode 100644 (file)
index 0000000..eb4226b
--- /dev/null
@@ -0,0 +1,57 @@
+/*
+ * Samsung's S3C6410 SoC device tree source
+ *
+ * Copyright (c) 2013 Tomasz Figa <tomasz.figa@gmail.com>
+ *
+ * Samsung's S3C6410 SoC device nodes are listed in this file. S3C6410
+ * based board files can include this file and provide values for board specfic
+ * bindings.
+ *
+ * Note: This file does not include device nodes for all the controllers in
+ * S3C6410 SoC. As device tree coverage for S3C6410 increases, additional
+ * nodes can be added to this file.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+*/
+
+#include "s3c64xx.dtsi"
+
+/ {
+       compatible = "samsung,s3c6410";
+
+       aliases {
+               i2c1 = &i2c1;
+       };
+};
+
+&vic0 {
+       valid-mask = <0xffffff7f>;
+       valid-wakeup-mask = <0x00200004>;
+};
+
+&vic1 {
+       valid-mask = <0xffffffff>;
+       valid-wakeup-mask = <0x53020000>;
+};
+
+&soc {
+       clocks: clock-controller@7e00f000 {
+               compatible = "samsung,s3c6410-clock";
+               reg = <0x7e00f000 0x1000>;
+               #clock-cells = <1>;
+       };
+
+       i2c1: i2c@7f00f000 {
+               compatible = "samsung,s3c2440-i2c";
+               reg = <0x7f00f000 0x1000>;
+               interrupt-parent = <&vic0>;
+               interrupts = <5>;
+               clock-names = "i2c";
+               clocks = <&clocks PCLK_IIC1>;
+               status = "disabled";
+               #address-cells = <1>;
+               #size-cells = <0>;
+       };
+};
diff --git a/arch/arm/boot/dts/s3c64xx-pinctrl.dtsi b/arch/arm/boot/dts/s3c64xx-pinctrl.dtsi
new file mode 100644 (file)
index 0000000..b1197d8
--- /dev/null
@@ -0,0 +1,687 @@
+/*
+ * Samsung's S3C64xx SoC series common device tree source
+ * - pin control-related definitions
+ *
+ * Copyright (c) 2013 Tomasz Figa <tomasz.figa@gmail.com>
+ *
+ * Samsung's S3C64xx SoCs pin banks, pin-mux and pin-config options are
+ * listed as device tree nodes in this file.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#define PIN_PULL_NONE  0
+#define PIN_PULL_DOWN  1
+#define PIN_PULL_UP    2
+
+&pinctrl0 {
+       /*
+        * Pin banks
+        */
+
+       gpa: gpa {
+               gpio-controller;
+               #gpio-cells = <2>;
+               interrupt-controller;
+               #interrupt-cells = <2>;
+       };
+
+       gpb: gpb {
+               gpio-controller;
+               #gpio-cells = <2>;
+               interrupt-controller;
+               #interrupt-cells = <2>;
+       };
+
+       gpc: gpc {
+               gpio-controller;
+               #gpio-cells = <2>;
+               interrupt-controller;
+               #interrupt-cells = <2>;
+       };
+
+       gpd: gpd {
+               gpio-controller;
+               #gpio-cells = <2>;
+               interrupt-controller;
+               #interrupt-cells = <2>;
+       };
+
+       gpe: gpe {
+               gpio-controller;
+               #gpio-cells = <2>;
+       };
+
+       gpf: gpf {
+               gpio-controller;
+               #gpio-cells = <2>;
+               interrupt-controller;
+               #interrupt-cells = <2>;
+       };
+
+       gpg: gpg {
+               gpio-controller;
+               #gpio-cells = <2>;
+               interrupt-controller;
+               #interrupt-cells = <2>;
+       };
+
+       gph: gph {
+               gpio-controller;
+               #gpio-cells = <2>;
+               interrupt-controller;
+               #interrupt-cells = <2>;
+       };
+
+       gpi: gpi {
+               gpio-controller;
+               #gpio-cells = <2>;
+       };
+
+       gpj: gpj {
+               gpio-controller;
+               #gpio-cells = <2>;
+       };
+
+       gpk: gpk {
+               gpio-controller;
+               #gpio-cells = <2>;
+       };
+
+       gpl: gpl {
+               gpio-controller;
+               #gpio-cells = <2>;
+               interrupt-controller;
+               #interrupt-cells = <2>;
+       };
+
+       gpm: gpm {
+               gpio-controller;
+               #gpio-cells = <2>;
+               interrupt-controller;
+               #interrupt-cells = <2>;
+       };
+
+       gpn: gpn {
+               gpio-controller;
+               #gpio-cells = <2>;
+               interrupt-controller;
+               #interrupt-cells = <2>;
+       };
+
+       gpo: gpo {
+               gpio-controller;
+               #gpio-cells = <2>;
+               interrupt-controller;
+               #interrupt-cells = <2>;
+       };
+
+       gpp: gpp {
+               gpio-controller;
+               #gpio-cells = <2>;
+               interrupt-controller;
+               #interrupt-cells = <2>;
+       };
+
+       gpq: gpq {
+               gpio-controller;
+               #gpio-cells = <2>;
+               interrupt-controller;
+               #interrupt-cells = <2>;
+       };
+
+       /*
+        * Pin groups
+        */
+
+       uart0_data: uart0-data {
+               samsung,pins = "gpa-0", "gpa-1";
+               samsung,pin-function = <2>;
+               samsung,pin-pud = <PIN_PULL_NONE>;
+       };
+
+       uart0_fctl: uart0-fctl {
+               samsung,pins = "gpa-2", "gpa-3";
+               samsung,pin-function = <2>;
+               samsung,pin-pud = <PIN_PULL_NONE>;
+       };
+
+       uart1_data: uart1-data {
+               samsung,pins = "gpa-4", "gpa-5";
+               samsung,pin-function = <2>;
+               samsung,pin-pud = <PIN_PULL_NONE>;
+       };
+
+       uart1_fctl: uart1-fctl {
+               samsung,pins = "gpa-6", "gpa-7";
+               samsung,pin-function = <2>;
+               samsung,pin-pud = <PIN_PULL_NONE>;
+       };
+
+       uart2_data: uart2-data {
+               samsung,pins = "gpb-0", "gpb-1";
+               samsung,pin-function = <2>;
+               samsung,pin-pud = <PIN_PULL_NONE>;
+       };
+
+       uart3_data: uart3-data {
+               samsung,pins = "gpb-2", "gpb-3";
+               samsung,pin-function = <2>;
+               samsung,pin-pud = <PIN_PULL_NONE>;
+       };
+
+       ext_dma_0: ext-dma-0 {
+               samsung,pins = "gpb-0", "gpb-1";
+               samsung,pin-function = <3>;
+               samsung,pin-pud = <PIN_PULL_NONE>;
+       };
+
+       ext_dma_1: ext-dma-1 {
+               samsung,pins = "gpb-2", "gpb-3";
+               samsung,pin-function = <4>;
+               samsung,pin-pud = <PIN_PULL_NONE>;
+       };
+
+       irda_data_0: irda-data-0 {
+               samsung,pins = "gpb-0", "gpb-1";
+               samsung,pin-function = <4>;
+               samsung,pin-pud = <PIN_PULL_NONE>;
+       };
+
+       irda_data_1: irda-data-1 {
+               samsung,pins = "gpb-2", "gpb-3";
+               samsung,pin-function = <3>;
+               samsung,pin-pud = <PIN_PULL_NONE>;
+       };
+
+       irda_sdbw: irda-sdbw {
+               samsung,pins = "gpb-4";
+               samsung,pin-function = <2>;
+               samsung,pin-pud = <PIN_PULL_NONE>;
+       };
+
+       i2c0_bus: i2c0-bus {
+               samsung,pins = "gpb-5", "gpb-6";
+               samsung,pin-function = <2>;
+               samsung,pin-pud = <PIN_PULL_UP>;
+       };
+
+       i2c1_bus: i2c1-bus {
+               /* S3C6410-only */
+               samsung,pins = "gpb-2", "gpb-3";
+               samsung,pin-function = <6>;
+               samsung,pin-pud = <PIN_PULL_UP>;
+       };
+
+       spi0_bus: spi0-bus {
+               samsung,pins = "gpc-0", "gpc-1", "gpc-2";
+               samsung,pin-function = <2>;
+               samsung,pin-pud = <PIN_PULL_UP>;
+       };
+
+       spi0_cs: spi0-cs {
+               samsung,pins = "gpc-3";
+               samsung,pin-function = <2>;
+               samsung,pin-pud = <PIN_PULL_NONE>;
+       };
+
+       spi1_bus: spi1-bus {
+               samsung,pins = "gpc-4", "gpc-5", "gpc-6";
+               samsung,pin-function = <2>;
+               samsung,pin-pud = <PIN_PULL_UP>;
+       };
+
+       spi1_cs: spi1-cs {
+               samsung,pins = "gpc-7";
+               samsung,pin-function = <2>;
+               samsung,pin-pud = <PIN_PULL_NONE>;
+       };
+
+       sd0_cmd: sd0-cmd {
+               samsung,pins = "gpg-1";
+               samsung,pin-function = <2>;
+               samsung,pin-pud = <PIN_PULL_NONE>;
+       };
+
+       sd0_clk: sd0-clk {
+               samsung,pins = "gpg-0";
+               samsung,pin-function = <2>;
+               samsung,pin-pud = <PIN_PULL_NONE>;
+       };
+
+       sd0_bus1: sd0-bus1 {
+               samsung,pins = "gpg-2";
+               samsung,pin-function = <2>;
+               samsung,pin-pud = <PIN_PULL_NONE>;
+       };
+
+       sd0_bus4: sd0-bus4 {
+               samsung,pins = "gpg-2", "gpg-3", "gpg-4", "gpg-5";
+               samsung,pin-function = <2>;
+               samsung,pin-pud = <PIN_PULL_NONE>;
+       };
+
+       sd0_cd: sd0-cd {
+               samsung,pins = "gpg-6";
+               samsung,pin-function = <2>;
+               samsung,pin-pud = <PIN_PULL_UP>;
+       };
+
+       sd1_cmd: sd1-cmd {
+               samsung,pins = "gph-1";
+               samsung,pin-function = <2>;
+               samsung,pin-pud = <PIN_PULL_NONE>;
+       };
+
+       sd1_clk: sd1-clk {
+               samsung,pins = "gph-0";
+               samsung,pin-function = <2>;
+               samsung,pin-pud = <PIN_PULL_NONE>;
+       };
+
+       sd1_bus1: sd1-bus1 {
+               samsung,pins = "gph-2";
+               samsung,pin-function = <2>;
+               samsung,pin-pud = <PIN_PULL_NONE>;
+       };
+
+       sd1_bus4: sd1-bus4 {
+               samsung,pins = "gph-2", "gph-3", "gph-4", "gph-5";
+               samsung,pin-function = <2>;
+               samsung,pin-pud = <PIN_PULL_NONE>;
+       };
+
+       sd1_bus8: sd1-bus8 {
+               samsung,pins = "gph-2", "gph-3", "gph-4", "gph-5",
+                               "gph-6", "gph-7", "gph-8", "gph-9";
+               samsung,pin-function = <2>;
+               samsung,pin-pud = <PIN_PULL_NONE>;
+       };
+
+       sd1_cd: sd1-cd {
+               samsung,pins = "gpg-6";
+               samsung,pin-function = <3>;
+               samsung,pin-pud = <PIN_PULL_UP>;
+       };
+
+       sd2_cmd: sd2-cmd {
+               samsung,pins = "gpc-4";
+               samsung,pin-function = <3>;
+               samsung,pin-pud = <PIN_PULL_NONE>;
+       };
+
+       sd2_clk: sd2-clk {
+               samsung,pins = "gpc-5";
+               samsung,pin-function = <3>;
+               samsung,pin-pud = <PIN_PULL_NONE>;
+       };
+
+       sd2_bus1: sd2-bus1 {
+               samsung,pins = "gph-6";
+               samsung,pin-function = <3>;
+               samsung,pin-pud = <PIN_PULL_NONE>;
+       };
+
+       sd2_bus4: sd2-bus4 {
+               samsung,pins = "gph-6", "gph-7", "gph-8", "gph-9";
+               samsung,pin-function = <3>;
+               samsung,pin-pud = <PIN_PULL_NONE>;
+       };
+
+       i2s0_bus: i2s0-bus {
+               samsung,pins = "gpd-0", "gpd-2", "gpd-3", "gpd-4";
+               samsung,pin-function = <3>;
+               samsung,pin-pud = <PIN_PULL_NONE>;
+       };
+
+       i2s0_cdclk: i2s0-cdclk {
+               samsung,pins = "gpd-1";
+               samsung,pin-function = <3>;
+               samsung,pin-pud = <PIN_PULL_NONE>;
+       };
+
+       i2s1_bus: i2s1-bus {
+               samsung,pins = "gpe-0", "gpe-2", "gpe-3", "gpe-4";
+               samsung,pin-function = <3>;
+               samsung,pin-pud = <PIN_PULL_NONE>;
+       };
+
+       i2s1_cdclk: i2s1-cdclk {
+               samsung,pins = "gpe-1";
+               samsung,pin-function = <3>;
+               samsung,pin-pud = <PIN_PULL_NONE>;
+       };
+
+       i2s2_bus: i2s2-bus {
+               /* S3C6410-only */
+               samsung,pins = "gpc-4", "gpc-5", "gpc-6", "gph-6",
+                               "gph-8", "gph-9";
+               samsung,pin-function = <5>;
+               samsung,pin-pud = <PIN_PULL_NONE>;
+       };
+
+       i2s2_cdclk: i2s2-cdclk {
+               /* S3C6410-only */
+               samsung,pins = "gph-7";
+               samsung,pin-function = <5>;
+               samsung,pin-pud = <PIN_PULL_NONE>;
+       };
+
+       pcm0_bus: pcm0-bus {
+               samsung,pins = "gpd-0", "gpd-2", "gpd-3", "gpd-4";
+               samsung,pin-function = <2>;
+               samsung,pin-pud = <PIN_PULL_NONE>;
+       };
+
+       pcm0_extclk: pcm0-extclk {
+               samsung,pins = "gpd-1";
+               samsung,pin-function = <2>;
+               samsung,pin-pud = <PIN_PULL_NONE>;
+       };
+
+       pcm1_bus: pcm1-bus {
+               samsung,pins = "gpe-0", "gpe-2", "gpe-3", "gpe-4";
+               samsung,pin-function = <2>;
+               samsung,pin-pud = <PIN_PULL_NONE>;
+       };
+
+       pcm1_extclk: pcm1-extclk {
+               samsung,pins = "gpe-1";
+               samsung,pin-function = <2>;
+               samsung,pin-pud = <PIN_PULL_NONE>;
+       };
+
+       ac97_bus_0: ac97-bus-0 {
+               samsung,pins = "gpd-0", "gpd-1", "gpd-2", "gpd-3", "gpd-4";
+               samsung,pin-function = <4>;
+               samsung,pin-pud = <PIN_PULL_NONE>;
+       };
+
+       ac97_bus_1: ac97-bus-1 {
+               samsung,pins = "gpe-0", "gpe-1", "gpe-2", "gpe-3", "gpe-4";
+               samsung,pin-function = <4>;
+               samsung,pin-pud = <PIN_PULL_NONE>;
+       };
+
+       cam_port: cam-port {
+               samsung,pins = "gpf-0", "gpf-1", "gpf-2", "gpf-4",
+                               "gpf-5", "gpf-6", "gpf-7", "gpf-8",
+                               "gpf-9", "gpf-10", "gpf-11", "gpf-12";
+               samsung,pin-function = <2>;
+               samsung,pin-pud = <PIN_PULL_NONE>;
+       };
+
+       cam_rst: cam-rst {
+               samsung,pins = "gpf-3";
+               samsung,pin-function = <2>;
+               samsung,pin-pud = <PIN_PULL_NONE>;
+       };
+
+       cam_field: cam-field {
+               /* S3C6410-only */
+               samsung,pins = "gpb-4";
+               samsung,pin-function = <3>;
+               samsung,pin-pud = <PIN_PULL_NONE>;
+       };
+
+       pwm_extclk: pwm-extclk {
+               samsung,pins = "gpf-13";
+               samsung,pin-function = <2>;
+               samsung,pin-pud = <PIN_PULL_NONE>;
+       };
+
+       pwm0_out: pwm0-out {
+               samsung,pins = "gpf-14";
+               samsung,pin-function = <2>;
+               samsung,pin-pud = <PIN_PULL_NONE>;
+       };
+
+       pwm1_out: pwm1-out {
+               samsung,pins = "gpf-15";
+               samsung,pin-function = <2>;
+               samsung,pin-pud = <PIN_PULL_NONE>;
+       };
+
+       clkout0: clkout-0 {
+               samsung,pins = "gpf-14";
+               samsung,pin-function = <3>;
+               samsung,pin-pud = <PIN_PULL_NONE>;
+       };
+
+       keypad_col0_0: keypad-col0-0 {
+               samsung,pins = "gph-0";
+               samsung,pin-function = <4>;
+               samsung,pin-pud = <PIN_PULL_NONE>;
+       };
+
+       keypad_col1_0: keypad-col1-0 {
+               samsung,pins = "gph-1";
+               samsung,pin-function = <4>;
+               samsung,pin-pud = <PIN_PULL_NONE>;
+       };
+
+       keypad_col2_0: keypad-col2-0 {
+               samsung,pins = "gph-2";
+               samsung,pin-function = <4>;
+               samsung,pin-pud = <PIN_PULL_NONE>;
+       };
+
+       keypad_col3_0: keypad-col3-0 {
+               samsung,pins = "gph-3";
+               samsung,pin-function = <4>;
+               samsung,pin-pud = <PIN_PULL_NONE>;
+       };
+
+       keypad_col4_0: keypad-col4-0 {
+               samsung,pins = "gph-4";
+               samsung,pin-function = <4>;
+               samsung,pin-pud = <PIN_PULL_NONE>;
+       };
+
+       keypad_col5_0: keypad-col5-0 {
+               samsung,pins = "gph-5";
+               samsung,pin-function = <4>;
+               samsung,pin-pud = <PIN_PULL_NONE>;
+       };
+
+       keypad_col6_0: keypad-col6-0 {
+               samsung,pins = "gph-6";
+               samsung,pin-function = <4>;
+               samsung,pin-pud = <PIN_PULL_NONE>;
+       };
+
+       keypad_col7_0: keypad-col7-0 {
+               samsung,pins = "gph-7";
+               samsung,pin-function = <4>;
+               samsung,pin-pud = <PIN_PULL_NONE>;
+       };
+
+       keypad_col0_1: keypad-col0-1 {
+               samsung,pins = "gpl-0";
+               samsung,pin-function = <3>;
+               samsung,pin-pud = <PIN_PULL_NONE>;
+       };
+
+       keypad_col1_1: keypad-col1-1 {
+               samsung,pins = "gpl-1";
+               samsung,pin-function = <3>;
+               samsung,pin-pud = <PIN_PULL_NONE>;
+       };
+
+       keypad_col2_1: keypad-col2-1 {
+               samsung,pins = "gpl-2";
+               samsung,pin-function = <3>;
+               samsung,pin-pud = <PIN_PULL_NONE>;
+       };
+
+       keypad_col3_1: keypad-col3-1 {
+               samsung,pins = "gpl-3";
+               samsung,pin-function = <3>;
+               samsung,pin-pud = <PIN_PULL_NONE>;
+       };
+
+       keypad_col4_1: keypad-col4-1 {
+               samsung,pins = "gpl-4";
+               samsung,pin-function = <3>;
+               samsung,pin-pud = <PIN_PULL_NONE>;
+       };
+
+       keypad_col5_1: keypad-col5-1 {
+               samsung,pins = "gpl-5";
+               samsung,pin-function = <3>;
+               samsung,pin-pud = <PIN_PULL_NONE>;
+       };
+
+       keypad_col6_1: keypad-col6-1 {
+               samsung,pins = "gpl-6";
+               samsung,pin-function = <3>;
+               samsung,pin-pud = <PIN_PULL_NONE>;
+       };
+
+       keypad_col7_1: keypad-col7-1 {
+               samsung,pins = "gpl-7";
+               samsung,pin-function = <3>;
+               samsung,pin-pud = <PIN_PULL_NONE>;
+       };
+
+       keypad_row0_0: keypad-row0-0 {
+               samsung,pins = "gpk-8";
+               samsung,pin-function = <3>;
+               samsung,pin-pud = <PIN_PULL_NONE>;
+       };
+
+       keypad_row1_0: keypad-row1-0 {
+               samsung,pins = "gpk-9";
+               samsung,pin-function = <3>;
+               samsung,pin-pud = <PIN_PULL_NONE>;
+       };
+
+       keypad_row2_0: keypad-row2-0 {
+               samsung,pins = "gpk-10";
+               samsung,pin-function = <3>;
+               samsung,pin-pud = <PIN_PULL_NONE>;
+       };
+
+       keypad_row3_0: keypad-row3-0 {
+               samsung,pins = "gpk-11";
+               samsung,pin-function = <3>;
+               samsung,pin-pud = <PIN_PULL_NONE>;
+       };
+
+       keypad_row4_0: keypad-row4-0 {
+               samsung,pins = "gpk-12";
+               samsung,pin-function = <3>;
+               samsung,pin-pud = <PIN_PULL_NONE>;
+       };
+
+       keypad_row5_0: keypad-row5-0 {
+               samsung,pins = "gpk-13";
+               samsung,pin-function = <3>;
+               samsung,pin-pud = <PIN_PULL_NONE>;
+       };
+
+       keypad_row6_0: keypad-row6-0 {
+               samsung,pins = "gpk-14";
+               samsung,pin-function = <3>;
+               samsung,pin-pud = <PIN_PULL_NONE>;
+       };
+
+       keypad_row7_0: keypad-row7-0 {
+               samsung,pins = "gpk-15";
+               samsung,pin-function = <3>;
+               samsung,pin-pud = <PIN_PULL_NONE>;
+       };
+
+       keypad_row0_1: keypad-row0-1 {
+               samsung,pins = "gpn-0";
+               samsung,pin-function = <3>;
+               samsung,pin-pud = <PIN_PULL_NONE>;
+       };
+
+       keypad_row1_1: keypad-row1-1 {
+               samsung,pins = "gpn-1";
+               samsung,pin-function = <3>;
+               samsung,pin-pud = <PIN_PULL_NONE>;
+       };
+
+       keypad_row2_1: keypad-row2-1 {
+               samsung,pins = "gpn-2";
+               samsung,pin-function = <3>;
+               samsung,pin-pud = <PIN_PULL_NONE>;
+       };
+
+       keypad_row3_1: keypad-row3-1 {
+               samsung,pins = "gpn-3";
+               samsung,pin-function = <3>;
+               samsung,pin-pud = <PIN_PULL_NONE>;
+       };
+
+       keypad_row4_1: keypad-row4-1 {
+               samsung,pins = "gpn-4";
+               samsung,pin-function = <3>;
+               samsung,pin-pud = <PIN_PULL_NONE>;
+       };
+
+       keypad_row5_1: keypad-row5-1 {
+               samsung,pins = "gpn-5";
+               samsung,pin-function = <3>;
+               samsung,pin-pud = <PIN_PULL_NONE>;
+       };
+
+       keypad_row6_1: keypad-row6-1 {
+               samsung,pins = "gpn-6";
+               samsung,pin-function = <3>;
+               samsung,pin-pud = <PIN_PULL_NONE>;
+       };
+
+       keypad_row7_1: keypad-row7-1 {
+               samsung,pins = "gpn-7";
+               samsung,pin-function = <3>;
+               samsung,pin-pud = <PIN_PULL_NONE>;
+       };
+
+       lcd_ctrl: lcd-ctrl {
+               samsung,pins = "gpj-8", "gpj-9", "gpj-10", "gpj-11";
+               samsung,pin-function = <2>;
+               samsung,pin-pud = <PIN_PULL_NONE>;
+       };
+
+       lcd_data16: lcd-data-width16 {
+               samsung,pins = "gpi-3", "gpi-4", "gpi-5", "gpi-6",
+                               "gpi-7", "gpi-10", "gpi-11", "gpi-12",
+                               "gpi-13", "gpi-14", "gpi-15", "gpj-3",
+                               "gpj-4", "gpj-5", "gpj-6", "gpj-7";
+               samsung,pin-function = <2>;
+               samsung,pin-pud = <PIN_PULL_NONE>;
+       };
+
+       lcd_data18: lcd-data-width18 {
+               samsung,pins = "gpi-2", "gpi-3", "gpi-4", "gpi-5",
+                               "gpi-6", "gpi-7", "gpi-10", "gpi-11",
+                               "gpi-12", "gpi-13", "gpi-14", "gpi-15",
+                               "gpj-2", "gpj-3", "gpj-4", "gpj-5",
+                               "gpj-6", "gpj-7";
+               samsung,pin-function = <2>;
+               samsung,pin-pud = <PIN_PULL_NONE>;
+       };
+
+       lcd_data24: lcd-data-width24 {
+               samsung,pins = "gpi-0", "gpi-1", "gpi-2", "gpi-3",
+                               "gpi-4", "gpi-5", "gpi-6", "gpi-7",
+                               "gpi-8", "gpi-9", "gpi-10", "gpi-11",
+                               "gpi-12", "gpi-13", "gpi-14", "gpi-15",
+                               "gpj-0", "gpj-1", "gpj-2", "gpj-3",
+                               "gpj-4", "gpj-5", "gpj-6", "gpj-7";
+               samsung,pin-function = <2>;
+               samsung,pin-pud = <PIN_PULL_NONE>;
+       };
+
+       hsi_bus: hsi-bus {
+               samsung,pins = "gpk-0", "gpk-1", "gpk-2", "gpk-3",
+                               "gpk-4", "gpk-5", "gpk-6", "gpk-7";
+               samsung,pin-function = <3>;
+               samsung,pin-pud = <PIN_PULL_NONE>;
+       };
+};
diff --git a/arch/arm/boot/dts/s3c64xx.dtsi b/arch/arm/boot/dts/s3c64xx.dtsi
new file mode 100644 (file)
index 0000000..4e3be4d
--- /dev/null
@@ -0,0 +1,199 @@
+/*
+ * Samsung's S3C64xx SoC series common device tree source
+ *
+ * Copyright (c) 2013 Tomasz Figa <tomasz.figa@gmail.com>
+ *
+ * Samsung's S3C64xx SoC series device nodes are listed in this file.
+ * Particular SoCs from S3C64xx series can include this file and provide
+ * values for SoCs specfic bindings.
+ *
+ * Note: This file does not include device nodes for all the controllers in
+ * S3C64xx SoCs. As device tree coverage for S3C64xx increases, additional
+ * nodes can be added to this file.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#include "skeleton.dtsi"
+#include <dt-bindings/clock/samsung,s3c64xx-clock.h>
+
+/ {
+       aliases {
+               i2c0 = &i2c0;
+               pinctrl0 = &pinctrl0;
+       };
+
+       cpus {
+               #address-cells = <1>;
+               #size-cells = <0>;
+
+               cpu@0 {
+                       device_type = "cpu";
+                       compatible = "arm,arm1176jzf-s", "arm,arm1176";
+                       reg = <0x0>;
+               };
+       };
+
+       soc: soc {
+               compatible = "simple-bus";
+               #address-cells = <1>;
+               #size-cells = <1>;
+               ranges;
+
+               vic0: interrupt-controller@71200000 {
+                       compatible = "arm,pl192-vic";
+                       interrupt-controller;
+                       reg = <0x71200000 0x1000>;
+                       #interrupt-cells = <1>;
+               };
+
+               vic1: interrupt-controller@71300000 {
+                       compatible = "arm,pl192-vic";
+                       interrupt-controller;
+                       reg = <0x71300000 0x1000>;
+                       #interrupt-cells = <1>;
+               };
+
+               sdhci0: sdhci@7c200000 {
+                       compatible = "samsung,s3c6410-sdhci";
+                       reg = <0x7c200000 0x100>;
+                       interrupt-parent = <&vic1>;
+                       interrupts = <24>;
+                       clock-names = "hsmmc", "mmc_busclk.0", "mmc_busclk.2";
+                       clocks = <&clocks HCLK_HSMMC0>, <&clocks HCLK_HSMMC0>,
+                                       <&clocks SCLK_MMC0>;
+                       status = "disabled";
+               };
+
+               sdhci1: sdhci@7c300000 {
+                       compatible = "samsung,s3c6410-sdhci";
+                       reg = <0x7c300000 0x100>;
+                       interrupt-parent = <&vic1>;
+                       interrupts = <25>;
+                       clock-names = "hsmmc", "mmc_busclk.0", "mmc_busclk.2";
+                       clocks = <&clocks HCLK_HSMMC1>, <&clocks HCLK_HSMMC1>,
+                                       <&clocks SCLK_MMC1>;
+                       status = "disabled";
+               };
+
+               sdhci2: sdhci@7c400000 {
+                       compatible = "samsung,s3c6410-sdhci";
+                       reg = <0x7c400000 0x100>;
+                       interrupt-parent = <&vic1>;
+                       interrupts = <17>;
+                       clock-names = "hsmmc", "mmc_busclk.0", "mmc_busclk.2";
+                       clocks = <&clocks HCLK_HSMMC2>, <&clocks HCLK_HSMMC2>,
+                                       <&clocks SCLK_MMC2>;
+                       status = "disabled";
+               };
+
+               watchdog: watchdog@7e004000 {
+                       compatible = "samsung,s3c2410-wdt";
+                       reg = <0x7e004000 0x1000>;
+                       interrupt-parent = <&vic0>;
+                       interrupts = <26>;
+                       clock-names = "watchdog";
+                       clocks = <&clocks PCLK_WDT>;
+                       status = "disabled";
+               };
+
+               i2c0: i2c@7f004000 {
+                       compatible = "samsung,s3c2440-i2c";
+                       reg = <0x7f004000 0x1000>;
+                       interrupt-parent = <&vic1>;
+                       interrupts = <18>;
+                       clock-names = "i2c";
+                       clocks = <&clocks PCLK_IIC0>;
+                       status = "disabled";
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+               };
+
+               uart0: serial@7f005000 {
+                       compatible = "samsung,s3c6400-uart";
+                       reg = <0x7f005000 0x100>;
+                       interrupt-parent = <&vic1>;
+                       interrupts = <5>;
+                       clock-names = "uart", "clk_uart_baud2",
+                                       "clk_uart_baud3";
+                       clocks = <&clocks PCLK_UART0>, <&clocks PCLK_UART0>,
+                                       <&clocks SCLK_UART>;
+                       status = "disabled";
+               };
+
+               uart1: serial@7f005400 {
+                       compatible = "samsung,s3c6400-uart";
+                       reg = <0x7f005400 0x100>;
+                       interrupt-parent = <&vic1>;
+                       interrupts = <6>;
+                       clock-names = "uart", "clk_uart_baud2",
+                                       "clk_uart_baud3";
+                       clocks = <&clocks PCLK_UART1>, <&clocks PCLK_UART1>,
+                                       <&clocks SCLK_UART>;
+                       status = "disabled";
+               };
+
+               uart2: serial@7f005800 {
+                       compatible = "samsung,s3c6400-uart";
+                       reg = <0x7f005800 0x100>;
+                       interrupt-parent = <&vic1>;
+                       interrupts = <7>;
+                       clock-names = "uart", "clk_uart_baud2",
+                                       "clk_uart_baud3";
+                       clocks = <&clocks PCLK_UART2>, <&clocks PCLK_UART2>,
+                                       <&clocks SCLK_UART>;
+                       status = "disabled";
+               };
+
+               uart3: serial@7f005c00 {
+                       compatible = "samsung,s3c6400-uart";
+                       reg = <0x7f005c00 0x100>;
+                       interrupt-parent = <&vic1>;
+                       interrupts = <8>;
+                       clock-names = "uart", "clk_uart_baud2",
+                                       "clk_uart_baud3";
+                       clocks = <&clocks PCLK_UART3>, <&clocks PCLK_UART3>,
+                                       <&clocks SCLK_UART>;
+                       status = "disabled";
+               };
+
+               pwm: pwm@7f006000 {
+                       compatible = "samsung,s3c6400-pwm";
+                       reg = <0x7f006000 0x1000>;
+                       interrupt-parent = <&vic0>;
+                       interrupts = <23>, <24>, <25>, <27>, <28>;
+                       clock-names = "timers";
+                       clocks = <&clocks PCLK_PWM>;
+                       samsung,pwm-outputs = <0>, <1>;
+                       #pwm-cells = <3>;
+                       status = "disabled";
+               };
+
+               pinctrl0: pinctrl@7f008000 {
+                       compatible = "samsung,s3c64xx-pinctrl";
+                       reg = <0x7f008000 0x1000>;
+                       interrupt-parent = <&vic1>;
+                       interrupts = <21>;
+
+                       pctrl_int_map: pinctrl-interrupt-map {
+                               interrupt-map = <0 &vic0 0>,
+                                               <1 &vic0 1>,
+                                               <2 &vic1 0>,
+                                               <3 &vic1 1>;
+                               #address-cells = <0>;
+                               #size-cells = <0>;
+                               #interrupt-cells = <1>;
+                       };
+
+                       wakeup-interrupt-controller {
+                               compatible = "samsung,s3c64xx-wakeup-eint";
+                               interrupts = <0>, <1>, <2>, <3>;
+                               interrupt-parent = <&pctrl_int_map>;
+                       };
+               };
+       };
+};
+
+#include "s3c64xx-pinctrl.dtsi"
index b7f49615120db6527bc9da1e2165b2133ba0e879..5cdaba4cea8653d8db51616f443a4d8ee2d79ef4 100644 (file)
@@ -31,7 +31,6 @@
                gpio3 = &pioD;
                gpio4 = &pioE;
                tcb0 = &tcb0;
-               tcb1 = &tcb1;
                i2c0 = &i2c0;
                i2c1 = &i2c1;
                i2c2 = &i2c2;
                                status = "disabled";
                        };
 
-                       can0: can@f000c000 {
-                               compatible = "atmel,at91sam9x5-can";
-                               reg = <0xf000c000 0x300>;
-                               interrupts = <40 IRQ_TYPE_LEVEL_HIGH 3>;
-                               pinctrl-names = "default";
-                               pinctrl-0 = <&pinctrl_can0_rx_tx>;
-                               status = "disabled";
-                       };
-
                        tcb0: timer@f0010000 {
                                compatible = "atmel,at91sam9x5-tcb";
                                reg = <0xf0010000 0x100>;
                                status = "disabled";
                        };
 
-                       macb0: ethernet@f0028000 {
-                               compatible = "cdns,pc302-gem", "cdns,gem";
-                               reg = <0xf0028000 0x100>;
-                               interrupts = <34 IRQ_TYPE_LEVEL_HIGH 3>;
-                               pinctrl-names = "default";
-                               pinctrl-0 = <&pinctrl_macb0_data_rgmii &pinctrl_macb0_signal_rgmii>;
-                               status = "disabled";
-                       };
-
                        isi: isi@f0034000 {
                                compatible = "atmel,at91sam9g45-isi";
                                reg = <0xf0034000 0x4000>;
                                #size-cells = <0>;
                        };
 
-                       mmc2: mmc@f8004000 {
-                               compatible = "atmel,hsmci";
-                               reg = <0xf8004000 0x600>;
-                               interrupts = <23 IRQ_TYPE_LEVEL_HIGH 0>;
-                               dmas = <&dma1 2 AT91_DMA_CFG_PER_ID(1)>;
-                               dma-names = "rxtx";
-                               pinctrl-names = "default";
-                               pinctrl-0 = <&pinctrl_mmc2_clk_cmd_dat0 &pinctrl_mmc2_dat1_3>;
-                               status = "disabled";
-                               #address-cells = <1>;
-                               #size-cells = <0>;
-                       };
-
                        spi1: spi@f8008000 {
                                #address-cells = <1>;
                                #size-cells = <0>;
                                status = "disabled";
                        };
 
-                       can1: can@f8010000 {
-                               compatible = "atmel,at91sam9x5-can";
-                               reg = <0xf8010000 0x300>;
-                               interrupts = <41 IRQ_TYPE_LEVEL_HIGH 3>;
-                               pinctrl-names = "default";
-                               pinctrl-0 = <&pinctrl_can1_rx_tx>;
-                       };
-
-                       tcb1: timer@f8014000 {
-                               compatible = "atmel,at91sam9x5-tcb";
-                               reg = <0xf8014000 0x100>;
-                               interrupts = <27 IRQ_TYPE_LEVEL_HIGH 0>;
-                       };
-
                        adc0: adc@f8018000 {
                                compatible = "atmel,at91sam9260-adc";
                                reg = <0xf8018000 0x100>;
                                status = "disabled";
                        };
 
-                       macb1: ethernet@f802c000 {
-                               compatible = "cdns,at32ap7000-macb", "cdns,macb";
-                               reg = <0xf802c000 0x100>;
-                               interrupts = <35 IRQ_TYPE_LEVEL_HIGH 3>;
-                               pinctrl-names = "default";
-                               pinctrl-0 = <&pinctrl_macb1_rmii>;
-                               status = "disabled";
-                       };
-
                        sha@f8034000 {
                                compatible = "atmel,sam9g46-sha";
                                reg = <0xf8034000 0x100>;
                                        };
                                };
 
-                               can0 {
-                                       pinctrl_can0_rx_tx: can0_rx_tx {
-                                               atmel,pins =
-                                                       <AT91_PIOD 14 AT91_PERIPH_C AT91_PINCTRL_NONE   /* PD14 periph C RX, conflicts with SCK0, SPI0_NPCS1 */
-                                                        AT91_PIOD 15 AT91_PERIPH_C AT91_PINCTRL_NONE>; /* PD15 periph C TX, conflicts with CTS0, SPI0_NPCS2 */
-                                       };
-                               };
-
-                               can1 {
-                                       pinctrl_can1_rx_tx: can1_rx_tx {
-                                               atmel,pins =
-                                                       <AT91_PIOB 14 AT91_PERIPH_B AT91_PINCTRL_NONE   /* PB14 periph B RX, conflicts with GCRS */
-                                                        AT91_PIOB 15 AT91_PERIPH_B AT91_PINCTRL_NONE>; /* PB15 periph B TX, conflicts with GCOL */
-                                       };
-                               };
-
                                dbgu {
                                        pinctrl_dbgu: dbgu-0 {
                                                atmel,pins =
                                        };
                                };
 
-                               lcd {
-                                       pinctrl_lcd: lcd-0 {
-                                               atmel,pins =
-                                                       <AT91_PIOA 24 AT91_PERIPH_A AT91_PINCTRL_NONE   /* PA24 periph A LCDPWM */
-                                                        AT91_PIOA 26 AT91_PERIPH_A AT91_PINCTRL_NONE   /* PA26 periph A LCDVSYNC */
-                                                        AT91_PIOA 27 AT91_PERIPH_A AT91_PINCTRL_NONE   /* PA27 periph A LCDHSYNC */
-                                                        AT91_PIOA 25 AT91_PERIPH_A AT91_PINCTRL_NONE   /* PA25 periph A LCDDISP */
-                                                        AT91_PIOA 29 AT91_PERIPH_A AT91_PINCTRL_NONE   /* PA29 periph A LCDDEN */
-                                                        AT91_PIOA 28 AT91_PERIPH_A AT91_PINCTRL_NONE   /* PA28 periph A LCDPCK */
-                                                        AT91_PIOA 0 AT91_PERIPH_A AT91_PINCTRL_NONE    /* PA0 periph A LCDD0 pin */
-                                                        AT91_PIOA 1 AT91_PERIPH_A AT91_PINCTRL_NONE    /* PA1 periph A LCDD1 pin */
-                                                        AT91_PIOA 2 AT91_PERIPH_A AT91_PINCTRL_NONE    /* PA2 periph A LCDD2 pin */
-                                                        AT91_PIOA 3 AT91_PERIPH_A AT91_PINCTRL_NONE    /* PA3 periph A LCDD3 pin */
-                                                        AT91_PIOA 4 AT91_PERIPH_A AT91_PINCTRL_NONE    /* PA4 periph A LCDD4 pin */
-                                                        AT91_PIOA 5 AT91_PERIPH_A AT91_PINCTRL_NONE    /* PA5 periph A LCDD5 pin */
-                                                        AT91_PIOA 6 AT91_PERIPH_A AT91_PINCTRL_NONE    /* PA6 periph A LCDD6 pin */
-                                                        AT91_PIOA 7 AT91_PERIPH_A AT91_PINCTRL_NONE    /* PA7 periph A LCDD7 pin */
-                                                        AT91_PIOA 8 AT91_PERIPH_A AT91_PINCTRL_NONE    /* PA8 periph A LCDD8 pin */
-                                                        AT91_PIOA 9 AT91_PERIPH_A AT91_PINCTRL_NONE    /* PA9 periph A LCDD9 pin */
-                                                        AT91_PIOA 10 AT91_PERIPH_A AT91_PINCTRL_NONE   /* PA10 periph A LCDD10 pin */
-                                                        AT91_PIOA 11 AT91_PERIPH_A AT91_PINCTRL_NONE   /* PA11 periph A LCDD11 pin */
-                                                        AT91_PIOA 12 AT91_PERIPH_A AT91_PINCTRL_NONE   /* PA12 periph A LCDD12 pin */
-                                                        AT91_PIOA 13 AT91_PERIPH_A AT91_PINCTRL_NONE   /* PA13 periph A LCDD13 pin */
-                                                        AT91_PIOA 14 AT91_PERIPH_A AT91_PINCTRL_NONE   /* PA14 periph A LCDD14 pin */
-                                                        AT91_PIOA 15 AT91_PERIPH_A AT91_PINCTRL_NONE   /* PA15 periph A LCDD15 pin */
-                                                        AT91_PIOC 14 AT91_PERIPH_C AT91_PINCTRL_NONE   /* PC14 periph C LCDD16 pin */
-                                                        AT91_PIOC 13 AT91_PERIPH_C AT91_PINCTRL_NONE   /* PC13 periph C LCDD17 pin */
-                                                        AT91_PIOC 12 AT91_PERIPH_C AT91_PINCTRL_NONE   /* PC12 periph C LCDD18 pin */
-                                                        AT91_PIOC 11 AT91_PERIPH_C AT91_PINCTRL_NONE   /* PC11 periph C LCDD19 pin */
-                                                        AT91_PIOC 10 AT91_PERIPH_C AT91_PINCTRL_NONE   /* PC10 periph C LCDD20 pin */
-                                                        AT91_PIOC 15 AT91_PERIPH_C AT91_PINCTRL_NONE   /* PC15 periph C LCDD21 pin */
-                                                        AT91_PIOE 27 AT91_PERIPH_C AT91_PINCTRL_NONE   /* PE27 periph C LCDD22 pin */
-                                                        AT91_PIOE 28 AT91_PERIPH_C AT91_PINCTRL_NONE>; /* PE28 periph C LCDD23 pin */
-                                       };
-                               };
-
-                               macb0 {
-                                       pinctrl_macb0_data_rgmii: macb0_data_rgmii {
-                                               atmel,pins =
-                                                       <AT91_PIOB 0 AT91_PERIPH_A AT91_PINCTRL_NONE    /* PB0 periph A GTX0, conflicts with PWMH0 */
-                                                        AT91_PIOB 1 AT91_PERIPH_A AT91_PINCTRL_NONE    /* PB1 periph A GTX1, conflicts with PWML0 */
-                                                        AT91_PIOB 2 AT91_PERIPH_A AT91_PINCTRL_NONE    /* PB2 periph A GTX2, conflicts with TK1 */
-                                                        AT91_PIOB 3 AT91_PERIPH_A AT91_PINCTRL_NONE    /* PB3 periph A GTX3, conflicts with TF1 */
-                                                        AT91_PIOB 4 AT91_PERIPH_A AT91_PINCTRL_NONE    /* PB4 periph A GRX0, conflicts with PWMH1 */
-                                                        AT91_PIOB 5 AT91_PERIPH_A AT91_PINCTRL_NONE    /* PB5 periph A GRX1, conflicts with PWML1 */
-                                                        AT91_PIOB 6 AT91_PERIPH_A AT91_PINCTRL_NONE    /* PB6 periph A GRX2, conflicts with TD1 */
-                                                        AT91_PIOB 7 AT91_PERIPH_A AT91_PINCTRL_NONE>;  /* PB7 periph A GRX3, conflicts with RK1 */
-                                       };
-                                       pinctrl_macb0_data_gmii: macb0_data_gmii {
-                                               atmel,pins =
-                                                       <AT91_PIOB 19 AT91_PERIPH_B AT91_PINCTRL_NONE   /* PB19 periph B GTX4, conflicts with MCI1_CDA */
-                                                        AT91_PIOB 20 AT91_PERIPH_B AT91_PINCTRL_NONE   /* PB20 periph B GTX5, conflicts with MCI1_DA0 */
-                                                        AT91_PIOB 21 AT91_PERIPH_B AT91_PINCTRL_NONE   /* PB21 periph B GTX6, conflicts with MCI1_DA1 */
-                                                        AT91_PIOB 22 AT91_PERIPH_B AT91_PINCTRL_NONE   /* PB22 periph B GTX7, conflicts with MCI1_DA2 */
-                                                        AT91_PIOB 23 AT91_PERIPH_B AT91_PINCTRL_NONE   /* PB23 periph B GRX4, conflicts with MCI1_DA3 */
-                                                        AT91_PIOB 24 AT91_PERIPH_B AT91_PINCTRL_NONE   /* PB24 periph B GRX5, conflicts with MCI1_CK */
-                                                        AT91_PIOB 25 AT91_PERIPH_B AT91_PINCTRL_NONE   /* PB25 periph B GRX6, conflicts with SCK1 */
-                                                        AT91_PIOB 26 AT91_PERIPH_B AT91_PINCTRL_NONE>; /* PB26 periph B GRX7, conflicts with CTS1 */
-                                       };
-                                       pinctrl_macb0_signal_rgmii: macb0_signal_rgmii {
-                                               atmel,pins =
-                                                       <AT91_PIOB 8 AT91_PERIPH_A AT91_PINCTRL_NONE    /* PB8 periph A GTXCK, conflicts with PWMH2 */
-                                                        AT91_PIOB 9 AT91_PERIPH_A AT91_PINCTRL_NONE    /* PB9 periph A GTXEN, conflicts with PWML2 */
-                                                        AT91_PIOB 11 AT91_PERIPH_A AT91_PINCTRL_NONE   /* PB11 periph A GRXCK, conflicts with RD1 */
-                                                        AT91_PIOB 13 AT91_PERIPH_A AT91_PINCTRL_NONE   /* PB13 periph A GRXER, conflicts with PWML3 */
-                                                        AT91_PIOB 16 AT91_PERIPH_A AT91_PINCTRL_NONE   /* PB16 periph A GMDC */
-                                                        AT91_PIOB 17 AT91_PERIPH_A AT91_PINCTRL_NONE   /* PB17 periph A GMDIO */
-                                                        AT91_PIOB 18 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PB18 periph A G125CK */
-                                       };
-                                       pinctrl_macb0_signal_gmii: macb0_signal_gmii {
-                                               atmel,pins =
-                                                       <AT91_PIOB 9 AT91_PERIPH_A AT91_PINCTRL_NONE    /* PB9 periph A GTXEN, conflicts with PWML2 */
-                                                        AT91_PIOB 10 AT91_PERIPH_A AT91_PINCTRL_NONE   /* PB10 periph A GTXER, conflicts with RF1 */
-                                                        AT91_PIOB 11 AT91_PERIPH_A AT91_PINCTRL_NONE   /* PB11 periph A GRXCK, conflicts with RD1 */
-                                                        AT91_PIOB 12 AT91_PERIPH_A AT91_PINCTRL_NONE   /* PB12 periph A GRXDV, conflicts with PWMH3 */
-                                                        AT91_PIOB 13 AT91_PERIPH_A AT91_PINCTRL_NONE   /* PB13 periph A GRXER, conflicts with PWML3 */
-                                                        AT91_PIOB 14 AT91_PERIPH_A AT91_PINCTRL_NONE   /* PB14 periph A GCRS, conflicts with CANRX1 */
-                                                        AT91_PIOB 15 AT91_PERIPH_A AT91_PINCTRL_NONE   /* PB15 periph A GCOL, conflicts with CANTX1 */
-                                                        AT91_PIOB 16 AT91_PERIPH_A AT91_PINCTRL_NONE   /* PB16 periph A GMDC */
-                                                        AT91_PIOB 17 AT91_PERIPH_A AT91_PINCTRL_NONE   /* PB17 periph A GMDIO */
-                                                        AT91_PIOB 27 AT91_PERIPH_B AT91_PINCTRL_NONE>; /* PB27 periph B G125CKO */
-                                       };
-
-                               };
-
-                               macb1 {
-                                       pinctrl_macb1_rmii: macb1_rmii-0 {
-                                               atmel,pins =
-                                                       <AT91_PIOC 0 AT91_PERIPH_A AT91_PINCTRL_NONE    /* PC0 periph A ETX0, conflicts with TIOA3 */
-                                                        AT91_PIOC 1 AT91_PERIPH_A AT91_PINCTRL_NONE    /* PC1 periph A ETX1, conflicts with TIOB3 */
-                                                        AT91_PIOC 2 AT91_PERIPH_A AT91_PINCTRL_NONE    /* PC2 periph A ERX0, conflicts with TCLK3 */
-                                                        AT91_PIOC 3 AT91_PERIPH_A AT91_PINCTRL_NONE    /* PC3 periph A ERX1, conflicts with TIOA4 */
-                                                        AT91_PIOC 4 AT91_PERIPH_A AT91_PINCTRL_NONE    /* PC4 periph A ETXEN, conflicts with TIOB4 */
-                                                        AT91_PIOC 5 AT91_PERIPH_A AT91_PINCTRL_NONE    /* PC5 periph A ECRSDV,conflicts with TCLK4 */
-                                                        AT91_PIOC 6 AT91_PERIPH_A AT91_PINCTRL_NONE    /* PC6 periph A ERXER, conflicts with TIOA5 */
-                                                        AT91_PIOC 7 AT91_PERIPH_A AT91_PINCTRL_NONE    /* PC7 periph A EREFCK, conflicts with TIOB5 */
-                                                        AT91_PIOC 8 AT91_PERIPH_A AT91_PINCTRL_NONE    /* PC8 periph A EMDC, conflicts with TCLK5 */
-                                                        AT91_PIOC 9 AT91_PERIPH_A AT91_PINCTRL_NONE>;  /* PC9 periph A EMDIO  */
-                                       };
-                               };
-
                                mmc0 {
                                        pinctrl_mmc0_clk_cmd_dat0: mmc0_clk_cmd_dat0 {
                                                atmel,pins =
                                        };
                                };
 
-                               mmc2 {
-                                       pinctrl_mmc2_clk_cmd_dat0: mmc2_clk_cmd_dat0 {
-                                               atmel,pins =
-                                                       <AT91_PIOC 15 AT91_PERIPH_A AT91_PINCTRL_NONE   /* PC15 periph A MCI2_CK, conflicts with PCK2 */
-                                                        AT91_PIOC 10 AT91_PERIPH_A AT91_PINCTRL_PULL_UP        /* PC10 periph A MCI2_CDA with pullup */
-                                                        AT91_PIOC 11 AT91_PERIPH_A AT91_PINCTRL_PULL_UP>;      /* PC11 periph A MCI2_DA0 with pullup */
-                                       };
-                                       pinctrl_mmc2_dat1_3: mmc2_dat1_3 {
-                                               atmel,pins =
-                                                       <AT91_PIOC 12 AT91_PERIPH_A AT91_PINCTRL_NONE   /* PC12 periph A MCI2_DA1 with pullup, conflicts with TIOA1 */
-                                                        AT91_PIOC 13 AT91_PERIPH_A AT91_PINCTRL_NONE   /* PC13 periph A MCI2_DA2 with pullup, conflicts with TIOB1 */
-                                                        AT91_PIOC 14 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PC14 periph A MCI2_DA3 with pullup, conflicts with TCLK1 */
-                                       };
-                               };
-
                                nand0 {
                                        pinctrl_nand0_ale_cle: nand0_ale_cle-0 {
                                                atmel,pins =
                                        };
                                };
 
-                               uart0 {
-                                       pinctrl_uart0: uart0-0 {
-                                               atmel,pins =
-                                                       <AT91_PIOC 29 AT91_PERIPH_A AT91_PINCTRL_NONE   /* PC29 periph A, conflicts with PWMFI2, ISI_D8 */
-                                                        AT91_PIOC 30 AT91_PERIPH_A AT91_PINCTRL_PULL_UP>;      /* PC30 periph A with pullup, conflicts with ISI_PCK */
-                                       };
-                               };
-
-                               uart1 {
-                                       pinctrl_uart1: uart1-0 {
-                                               atmel,pins =
-                                                       <AT91_PIOA 30 AT91_PERIPH_B AT91_PINCTRL_NONE   /* PA30 periph B, conflicts with TWD0, ISI_VSYNC */
-                                                        AT91_PIOA 31 AT91_PERIPH_B AT91_PINCTRL_PULL_UP>;      /* PA31 periph B with pullup, conflicts with TWCK0, ISI_HSYNC */
-                                       };
-                               };
-
                                usart0 {
                                        pinctrl_usart0: usart0-0 {
                                                atmel,pins =
diff --git a/arch/arm/boot/dts/sama5d31.dtsi b/arch/arm/boot/dts/sama5d31.dtsi
new file mode 100644 (file)
index 0000000..7997dc9
--- /dev/null
@@ -0,0 +1,16 @@
+/*
+ * sama5d31.dtsi - Device Tree Include file for SAMA5D31 SoC
+ *
+ *  Copyright (C) 2013 Boris BREZILLON <b.brezillon@overkiz.com>
+ *
+ * Licensed under GPLv2 or later.
+ */
+#include "sama5d3.dtsi"
+#include "sama5d3_lcd.dtsi"
+#include "sama5d3_emac.dtsi"
+#include "sama5d3_mci2.dtsi"
+#include "sama5d3_uart.dtsi"
+
+/ {
+       compatible = "atmel,samad31", "atmel,sama5d3", "atmel,sama5";
+};
index 027bac7510b6cc2cfb92ebb488c8d8e24de06749..04eec0dfcf7de7792c0a1b7f6de0a1ece304a871 100644 (file)
@@ -7,12 +7,13 @@
  * Licensed under GPLv2 or later.
  */
 /dts-v1/;
+#include "sama5d31.dtsi"
 #include "sama5d3xmb.dtsi"
 #include "sama5d3xdm.dtsi"
 
 / {
        model = "Atmel SAMA5D31-EK";
-       compatible = "atmel,sama5d31ek", "atmel,sama5d3xmb", "atmel,sama5d3xcm", "atmel,sama5d3", "atmel,sama5";
+       compatible = "atmel,sama5d31ek", "atmel,sama5d3xmb", "atmel,sama5d3xcm", "atmel,sama5d31", "atmel,sama5d3", "atmel,sama5";
 
        ahb {
                apb {
diff --git a/arch/arm/boot/dts/sama5d33.dtsi b/arch/arm/boot/dts/sama5d33.dtsi
new file mode 100644 (file)
index 0000000..39f8322
--- /dev/null
@@ -0,0 +1,14 @@
+/*
+ * sama5d33.dtsi - Device Tree Include file for SAMA5D33 SoC
+ *
+ *  Copyright (C) 2013 Boris BREZILLON <b.brezillon@overkiz.com>
+ *
+ * Licensed under GPLv2 or later.
+ */
+#include "sama5d3.dtsi"
+#include "sama5d3_lcd.dtsi"
+#include "sama5d3_gmac.dtsi"
+
+/ {
+       compatible = "atmel,samad33", "atmel,sama5d3", "atmel,sama5";
+};
index 99bd0c8e047116b4a04cce14c466068268d21cc2..cbd6a3ff154535541d38b412bd9c7834371fbe5d 100644 (file)
@@ -7,12 +7,13 @@
  * Licensed under GPLv2 or later.
  */
 /dts-v1/;
+#include "sama5d33.dtsi"
 #include "sama5d3xmb.dtsi"
 #include "sama5d3xdm.dtsi"
 
 / {
        model = "Atmel SAMA5D33-EK";
-       compatible = "atmel,sama5d33ek", "atmel,sama5d3xmb", "atmel,sama5d3xcm", "atmel,sama5d3", "atmel,sama5";
+       compatible = "atmel,sama5d33ek", "atmel,sama5d3xmb", "atmel,sama5d3xcm", "atmel,sama5d33", "atmel,sama5d3", "atmel,sama5";
 
        ahb {
                apb {
diff --git a/arch/arm/boot/dts/sama5d34.dtsi b/arch/arm/boot/dts/sama5d34.dtsi
new file mode 100644 (file)
index 0000000..89cda2c
--- /dev/null
@@ -0,0 +1,16 @@
+/*
+ * sama5d34.dtsi - Device Tree Include file for SAMA5D34 SoC
+ *
+ *  Copyright (C) 2013 Boris BREZILLON <b.brezillon@overkiz.com>
+ *
+ * Licensed under GPLv2 or later.
+ */
+#include "sama5d3.dtsi"
+#include "sama5d3_lcd.dtsi"
+#include "sama5d3_gmac.dtsi"
+#include "sama5d3_can.dtsi"
+#include "sama5d3_mci2.dtsi"
+
+/ {
+       compatible = "atmel,samad34", "atmel,sama5d3", "atmel,sama5";
+};
index fb8ee11cf282bdf051e1ecf0193e1622adb7d7d4..878aa164275a0fc7ec5d74e1c8dee143f48afd79 100644 (file)
@@ -7,12 +7,13 @@
  * Licensed under GPLv2 or later.
  */
 /dts-v1/;
+#include "sama5d34.dtsi"
 #include "sama5d3xmb.dtsi"
 #include "sama5d3xdm.dtsi"
 
 / {
        model = "Atmel SAMA5D34-EK";
-       compatible = "atmel,sama5d34ek", "atmel,sama5d3xmb", "atmel,sama5d3xcm", "atmel,sama5d3", "atmel,sama5";
+       compatible = "atmel,sama5d34ek", "atmel,sama5d3xmb", "atmel,sama5d3xcm", "atmel,sama5d34", "atmel,sama5d3", "atmel,sama5";
 
        ahb {
                apb {
diff --git a/arch/arm/boot/dts/sama5d35.dtsi b/arch/arm/boot/dts/sama5d35.dtsi
new file mode 100644 (file)
index 0000000..d20cd71
--- /dev/null
@@ -0,0 +1,18 @@
+/*
+ * sama5d35.dtsi - Device Tree Include file for SAMA5D35 SoC
+ *
+ *  Copyright (C) 2013 Boris BREZILLON <b.brezillon@overkiz.com>
+ *
+ * Licensed under GPLv2 or later.
+ */
+#include "sama5d3.dtsi"
+#include "sama5d3_gmac.dtsi"
+#include "sama5d3_emac.dtsi"
+#include "sama5d3_can.dtsi"
+#include "sama5d3_mci2.dtsi"
+#include "sama5d3_uart.dtsi"
+#include "sama5d3_tcb1.dtsi"
+
+/ {
+       compatible = "atmel,samad35", "atmel,sama5d3", "atmel,sama5";
+};
index 509a53d9cc7baee10258878cd257d8574d6b25e0..9089c7c6cea863e547a26d7c8d2233c138827334 100644 (file)
@@ -7,11 +7,12 @@
  * Licensed under GPLv2 or later.
  */
 /dts-v1/;
+#include "sama5d35.dtsi"
 #include "sama5d3xmb.dtsi"
 
 / {
        model = "Atmel SAMA5D35-EK";
-       compatible = "atmel,sama5d35ek", "atmel,sama5d3xmb", "atmel,sama5d3xcm", "atmel,sama5d3", "atmel,sama5";
+       compatible = "atmel,sama5d35ek", "atmel,sama5d3xmb", "atmel,sama5d3xcm", "atmel,sama5d35", "atmel,sama5d3", "atmel,sama5";
 
        ahb {
                apb {
diff --git a/arch/arm/boot/dts/sama5d3_can.dtsi b/arch/arm/boot/dts/sama5d3_can.dtsi
new file mode 100644 (file)
index 0000000..8ed3260
--- /dev/null
@@ -0,0 +1,54 @@
+/*
+ * at91sama5d3_can.dtsi - Device Tree Include file for AT91SAM9x5 SoC with
+ * CAN support
+ *
+ * Copyright (C) 2013 Boris BREZILLON <b.brezillon@overkiz.com>
+ *
+ * Licensed under GPLv2.
+ */
+
+#include <dt-bindings/pinctrl/at91.h>
+#include <dt-bindings/interrupt-controller/irq.h>
+
+/ {
+       ahb {
+               apb {
+                       pinctrl@fffff200 {
+                               can0 {
+                                       pinctrl_can0_rx_tx: can0_rx_tx {
+                                               atmel,pins =
+                                                       <AT91_PIOD 14 AT91_PERIPH_C AT91_PINCTRL_NONE   /* PD14 periph C RX, conflicts with SCK0, SPI0_NPCS1 */
+                                                        AT91_PIOD 15 AT91_PERIPH_C AT91_PINCTRL_NONE>; /* PD15 periph C TX, conflicts with CTS0, SPI0_NPCS2 */
+                                       };
+                               };
+
+                               can1 {
+                                       pinctrl_can1_rx_tx: can1_rx_tx {
+                                               atmel,pins =
+                                                       <AT91_PIOB 14 AT91_PERIPH_B AT91_PINCTRL_NONE   /* PB14 periph B RX, conflicts with GCRS */
+                                                        AT91_PIOB 15 AT91_PERIPH_B AT91_PINCTRL_NONE>; /* PB15 periph B TX, conflicts with GCOL */
+                                       };
+                               };
+
+                       };
+
+                       can0: can@f000c000 {
+                               compatible = "atmel,at91sam9x5-can";
+                               reg = <0xf000c000 0x300>;
+                               interrupts = <40 IRQ_TYPE_LEVEL_HIGH 3>;
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&pinctrl_can0_rx_tx>;
+                               status = "disabled";
+                       };
+
+                       can1: can@f8010000 {
+                               compatible = "atmel,at91sam9x5-can";
+                               reg = <0xf8010000 0x300>;
+                               interrupts = <41 IRQ_TYPE_LEVEL_HIGH 3>;
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&pinctrl_can1_rx_tx>;
+                               status = "disabled";
+                       };
+               };
+       };
+};
diff --git a/arch/arm/boot/dts/sama5d3_emac.dtsi b/arch/arm/boot/dts/sama5d3_emac.dtsi
new file mode 100644 (file)
index 0000000..4d4f351
--- /dev/null
@@ -0,0 +1,44 @@
+/*
+ * at91sama5d3_emac.dtsi - Device Tree Include file for AT91SAM9x5 SoC with
+ * Ethernet.
+ *
+ * Copyright (C) 2013 Boris BREZILLON <b.brezillon@overkiz.com>
+ *
+ * Licensed under GPLv2.
+ */
+
+#include <dt-bindings/pinctrl/at91.h>
+#include <dt-bindings/interrupt-controller/irq.h>
+
+/ {
+       ahb {
+               apb {
+                       pinctrl@fffff200 {
+                               macb1 {
+                                       pinctrl_macb1_rmii: macb1_rmii-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOC 0 AT91_PERIPH_A AT91_PINCTRL_NONE    /* PC0 periph A ETX0, conflicts with TIOA3 */
+                                                        AT91_PIOC 1 AT91_PERIPH_A AT91_PINCTRL_NONE    /* PC1 periph A ETX1, conflicts with TIOB3 */
+                                                        AT91_PIOC 2 AT91_PERIPH_A AT91_PINCTRL_NONE    /* PC2 periph A ERX0, conflicts with TCLK3 */
+                                                        AT91_PIOC 3 AT91_PERIPH_A AT91_PINCTRL_NONE    /* PC3 periph A ERX1, conflicts with TIOA4 */
+                                                        AT91_PIOC 4 AT91_PERIPH_A AT91_PINCTRL_NONE    /* PC4 periph A ETXEN, conflicts with TIOB4 */
+                                                        AT91_PIOC 5 AT91_PERIPH_A AT91_PINCTRL_NONE    /* PC5 periph A ECRSDV,conflicts with TCLK4 */
+                                                        AT91_PIOC 6 AT91_PERIPH_A AT91_PINCTRL_NONE    /* PC6 periph A ERXER, conflicts with TIOA5 */
+                                                        AT91_PIOC 7 AT91_PERIPH_A AT91_PINCTRL_NONE    /* PC7 periph A EREFCK, conflicts with TIOB5 */
+                                                        AT91_PIOC 8 AT91_PERIPH_A AT91_PINCTRL_NONE    /* PC8 periph A EMDC, conflicts with TCLK5 */
+                                                        AT91_PIOC 9 AT91_PERIPH_A AT91_PINCTRL_NONE>;  /* PC9 periph A EMDIO  */
+                                       };
+                               };
+                       };
+
+                       macb1: ethernet@f802c000 {
+                               compatible = "cdns,at32ap7000-macb", "cdns,macb";
+                               reg = <0xf802c000 0x100>;
+                               interrupts = <35 IRQ_TYPE_LEVEL_HIGH 3>;
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&pinctrl_macb1_rmii>;
+                               status = "disabled";
+                       };
+               };
+       };
+};
diff --git a/arch/arm/boot/dts/sama5d3_gmac.dtsi b/arch/arm/boot/dts/sama5d3_gmac.dtsi
new file mode 100644 (file)
index 0000000..0ba8be3
--- /dev/null
@@ -0,0 +1,77 @@
+/*
+ * at91sama5d3_gmac.dtsi - Device Tree Include file for AT91SAM9x5 SoC with
+ * Gigabit Ethernet.
+ *
+ * Copyright (C) 2013 Boris BREZILLON <b.brezillon@overkiz.com>
+ *
+ * Licensed under GPLv2.
+ */
+
+#include <dt-bindings/pinctrl/at91.h>
+#include <dt-bindings/interrupt-controller/irq.h>
+
+/ {
+       ahb {
+               apb {
+                       pinctrl@fffff200 {
+                               macb0 {
+                                       pinctrl_macb0_data_rgmii: macb0_data_rgmii {
+                                               atmel,pins =
+                                                       <AT91_PIOB 0 AT91_PERIPH_A AT91_PINCTRL_NONE    /* PB0 periph A GTX0, conflicts with PWMH0 */
+                                                        AT91_PIOB 1 AT91_PERIPH_A AT91_PINCTRL_NONE    /* PB1 periph A GTX1, conflicts with PWML0 */
+                                                        AT91_PIOB 2 AT91_PERIPH_A AT91_PINCTRL_NONE    /* PB2 periph A GTX2, conflicts with TK1 */
+                                                        AT91_PIOB 3 AT91_PERIPH_A AT91_PINCTRL_NONE    /* PB3 periph A GTX3, conflicts with TF1 */
+                                                        AT91_PIOB 4 AT91_PERIPH_A AT91_PINCTRL_NONE    /* PB4 periph A GRX0, conflicts with PWMH1 */
+                                                        AT91_PIOB 5 AT91_PERIPH_A AT91_PINCTRL_NONE    /* PB5 periph A GRX1, conflicts with PWML1 */
+                                                        AT91_PIOB 6 AT91_PERIPH_A AT91_PINCTRL_NONE    /* PB6 periph A GRX2, conflicts with TD1 */
+                                                        AT91_PIOB 7 AT91_PERIPH_A AT91_PINCTRL_NONE>;  /* PB7 periph A GRX3, conflicts with RK1 */
+                                       };
+                                       pinctrl_macb0_data_gmii: macb0_data_gmii {
+                                               atmel,pins =
+                                                       <AT91_PIOB 19 AT91_PERIPH_B AT91_PINCTRL_NONE   /* PB19 periph B GTX4, conflicts with MCI1_CDA */
+                                                        AT91_PIOB 20 AT91_PERIPH_B AT91_PINCTRL_NONE   /* PB20 periph B GTX5, conflicts with MCI1_DA0 */
+                                                        AT91_PIOB 21 AT91_PERIPH_B AT91_PINCTRL_NONE   /* PB21 periph B GTX6, conflicts with MCI1_DA1 */
+                                                        AT91_PIOB 22 AT91_PERIPH_B AT91_PINCTRL_NONE   /* PB22 periph B GTX7, conflicts with MCI1_DA2 */
+                                                        AT91_PIOB 23 AT91_PERIPH_B AT91_PINCTRL_NONE   /* PB23 periph B GRX4, conflicts with MCI1_DA3 */
+                                                        AT91_PIOB 24 AT91_PERIPH_B AT91_PINCTRL_NONE   /* PB24 periph B GRX5, conflicts with MCI1_CK */
+                                                        AT91_PIOB 25 AT91_PERIPH_B AT91_PINCTRL_NONE   /* PB25 periph B GRX6, conflicts with SCK1 */
+                                                        AT91_PIOB 26 AT91_PERIPH_B AT91_PINCTRL_NONE>; /* PB26 periph B GRX7, conflicts with CTS1 */
+                                       };
+                                       pinctrl_macb0_signal_rgmii: macb0_signal_rgmii {
+                                               atmel,pins =
+                                                       <AT91_PIOB 8 AT91_PERIPH_A AT91_PINCTRL_NONE    /* PB8 periph A GTXCK, conflicts with PWMH2 */
+                                                        AT91_PIOB 9 AT91_PERIPH_A AT91_PINCTRL_NONE    /* PB9 periph A GTXEN, conflicts with PWML2 */
+                                                        AT91_PIOB 11 AT91_PERIPH_A AT91_PINCTRL_NONE   /* PB11 periph A GRXCK, conflicts with RD1 */
+                                                        AT91_PIOB 13 AT91_PERIPH_A AT91_PINCTRL_NONE   /* PB13 periph A GRXER, conflicts with PWML3 */
+                                                        AT91_PIOB 16 AT91_PERIPH_A AT91_PINCTRL_NONE   /* PB16 periph A GMDC */
+                                                        AT91_PIOB 17 AT91_PERIPH_A AT91_PINCTRL_NONE   /* PB17 periph A GMDIO */
+                                                        AT91_PIOB 18 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PB18 periph A G125CK */
+                                       };
+                                       pinctrl_macb0_signal_gmii: macb0_signal_gmii {
+                                               atmel,pins =
+                                                       <AT91_PIOB 9 AT91_PERIPH_A AT91_PINCTRL_NONE    /* PB9 periph A GTXEN, conflicts with PWML2 */
+                                                        AT91_PIOB 10 AT91_PERIPH_A AT91_PINCTRL_NONE   /* PB10 periph A GTXER, conflicts with RF1 */
+                                                        AT91_PIOB 11 AT91_PERIPH_A AT91_PINCTRL_NONE   /* PB11 periph A GRXCK, conflicts with RD1 */
+                                                        AT91_PIOB 12 AT91_PERIPH_A AT91_PINCTRL_NONE   /* PB12 periph A GRXDV, conflicts with PWMH3 */
+                                                        AT91_PIOB 13 AT91_PERIPH_A AT91_PINCTRL_NONE   /* PB13 periph A GRXER, conflicts with PWML3 */
+                                                        AT91_PIOB 14 AT91_PERIPH_A AT91_PINCTRL_NONE   /* PB14 periph A GCRS, conflicts with CANRX1 */
+                                                        AT91_PIOB 15 AT91_PERIPH_A AT91_PINCTRL_NONE   /* PB15 periph A GCOL, conflicts with CANTX1 */
+                                                        AT91_PIOB 16 AT91_PERIPH_A AT91_PINCTRL_NONE   /* PB16 periph A GMDC */
+                                                        AT91_PIOB 17 AT91_PERIPH_A AT91_PINCTRL_NONE   /* PB17 periph A GMDIO */
+                                                        AT91_PIOB 27 AT91_PERIPH_B AT91_PINCTRL_NONE>; /* PB27 periph B G125CKO */
+                                       };
+
+                               };
+                       };
+
+                       macb0: ethernet@f0028000 {
+                               compatible = "cdns,pc302-gem", "cdns,gem";
+                               reg = <0xf0028000 0x100>;
+                               interrupts = <34 IRQ_TYPE_LEVEL_HIGH 3>;
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&pinctrl_macb0_data_rgmii &pinctrl_macb0_signal_rgmii>;
+                               status = "disabled";
+                       };
+               };
+       };
+};
diff --git a/arch/arm/boot/dts/sama5d3_lcd.dtsi b/arch/arm/boot/dts/sama5d3_lcd.dtsi
new file mode 100644 (file)
index 0000000..01f52a7
--- /dev/null
@@ -0,0 +1,55 @@
+/*
+ * at91sama5d3_lcd.dtsi - Device Tree Include file for AT91SAM9x5 SoC with
+ * LCD support
+ *
+ * Copyright (C) 2013 Boris BREZILLON <b.brezillon@overkiz.com>
+ *
+ * Licensed under GPLv2.
+ */
+
+#include <dt-bindings/pinctrl/at91.h>
+#include <dt-bindings/interrupt-controller/irq.h>
+
+/ {
+       ahb {
+               apb {
+                       pinctrl@fffff200 {
+                               lcd {
+                                       pinctrl_lcd: lcd-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOA 24 AT91_PERIPH_A AT91_PINCTRL_NONE   /* PA24 periph A LCDPWM */
+                                                        AT91_PIOA 26 AT91_PERIPH_A AT91_PINCTRL_NONE   /* PA26 periph A LCDVSYNC */
+                                                        AT91_PIOA 27 AT91_PERIPH_A AT91_PINCTRL_NONE   /* PA27 periph A LCDHSYNC */
+                                                        AT91_PIOA 25 AT91_PERIPH_A AT91_PINCTRL_NONE   /* PA25 periph A LCDDISP */
+                                                        AT91_PIOA 29 AT91_PERIPH_A AT91_PINCTRL_NONE   /* PA29 periph A LCDDEN */
+                                                        AT91_PIOA 28 AT91_PERIPH_A AT91_PINCTRL_NONE   /* PA28 periph A LCDPCK */
+                                                        AT91_PIOA 0 AT91_PERIPH_A AT91_PINCTRL_NONE    /* PA0 periph A LCDD0 pin */
+                                                        AT91_PIOA 1 AT91_PERIPH_A AT91_PINCTRL_NONE    /* PA1 periph A LCDD1 pin */
+                                                        AT91_PIOA 2 AT91_PERIPH_A AT91_PINCTRL_NONE    /* PA2 periph A LCDD2 pin */
+                                                        AT91_PIOA 3 AT91_PERIPH_A AT91_PINCTRL_NONE    /* PA3 periph A LCDD3 pin */
+                                                        AT91_PIOA 4 AT91_PERIPH_A AT91_PINCTRL_NONE    /* PA4 periph A LCDD4 pin */
+                                                        AT91_PIOA 5 AT91_PERIPH_A AT91_PINCTRL_NONE    /* PA5 periph A LCDD5 pin */
+                                                        AT91_PIOA 6 AT91_PERIPH_A AT91_PINCTRL_NONE    /* PA6 periph A LCDD6 pin */
+                                                        AT91_PIOA 7 AT91_PERIPH_A AT91_PINCTRL_NONE    /* PA7 periph A LCDD7 pin */
+                                                        AT91_PIOA 8 AT91_PERIPH_A AT91_PINCTRL_NONE    /* PA8 periph A LCDD8 pin */
+                                                        AT91_PIOA 9 AT91_PERIPH_A AT91_PINCTRL_NONE    /* PA9 periph A LCDD9 pin */
+                                                        AT91_PIOA 10 AT91_PERIPH_A AT91_PINCTRL_NONE   /* PA10 periph A LCDD10 pin */
+                                                        AT91_PIOA 11 AT91_PERIPH_A AT91_PINCTRL_NONE   /* PA11 periph A LCDD11 pin */
+                                                        AT91_PIOA 12 AT91_PERIPH_A AT91_PINCTRL_NONE   /* PA12 periph A LCDD12 pin */
+                                                        AT91_PIOA 13 AT91_PERIPH_A AT91_PINCTRL_NONE   /* PA13 periph A LCDD13 pin */
+                                                        AT91_PIOA 14 AT91_PERIPH_A AT91_PINCTRL_NONE   /* PA14 periph A LCDD14 pin */
+                                                        AT91_PIOA 15 AT91_PERIPH_A AT91_PINCTRL_NONE   /* PA15 periph A LCDD15 pin */
+                                                        AT91_PIOC 14 AT91_PERIPH_C AT91_PINCTRL_NONE   /* PC14 periph C LCDD16 pin */
+                                                        AT91_PIOC 13 AT91_PERIPH_C AT91_PINCTRL_NONE   /* PC13 periph C LCDD17 pin */
+                                                        AT91_PIOC 12 AT91_PERIPH_C AT91_PINCTRL_NONE   /* PC12 periph C LCDD18 pin */
+                                                        AT91_PIOC 11 AT91_PERIPH_C AT91_PINCTRL_NONE   /* PC11 periph C LCDD19 pin */
+                                                        AT91_PIOC 10 AT91_PERIPH_C AT91_PINCTRL_NONE   /* PC10 periph C LCDD20 pin */
+                                                        AT91_PIOC 15 AT91_PERIPH_C AT91_PINCTRL_NONE   /* PC15 periph C LCDD21 pin */
+                                                        AT91_PIOE 27 AT91_PERIPH_C AT91_PINCTRL_NONE   /* PE27 periph C LCDD22 pin */
+                                                        AT91_PIOE 28 AT91_PERIPH_C AT91_PINCTRL_NONE>; /* PE28 periph C LCDD23 pin */
+                                       };
+                               };
+                       };
+               };
+       };
+};
diff --git a/arch/arm/boot/dts/sama5d3_mci2.dtsi b/arch/arm/boot/dts/sama5d3_mci2.dtsi
new file mode 100644 (file)
index 0000000..38e88e3
--- /dev/null
@@ -0,0 +1,47 @@
+/*
+ * at91sama5d3_mci2.dtsi - Device Tree Include file for AT91SAM9x5 SoC with
+ * 3 MMC ports
+ *
+ * Copyright (C) 2013 Boris BREZILLON <b.brezillon@overkiz.com>
+ *
+ * Licensed under GPLv2.
+ */
+
+#include <dt-bindings/pinctrl/at91.h>
+#include <dt-bindings/interrupt-controller/irq.h>
+
+/ {
+       ahb {
+               apb {
+                       pinctrl@fffff200 {
+                               mmc2 {
+                                       pinctrl_mmc2_clk_cmd_dat0: mmc2_clk_cmd_dat0 {
+                                               atmel,pins =
+                                                       <AT91_PIOC 15 AT91_PERIPH_A AT91_PINCTRL_NONE   /* PC15 periph A MCI2_CK, conflicts with PCK2 */
+                                                        AT91_PIOC 10 AT91_PERIPH_A AT91_PINCTRL_PULL_UP        /* PC10 periph A MCI2_CDA with pullup */
+                                                        AT91_PIOC 11 AT91_PERIPH_A AT91_PINCTRL_PULL_UP>;      /* PC11 periph A MCI2_DA0 with pullup */
+                                       };
+                                       pinctrl_mmc2_dat1_3: mmc2_dat1_3 {
+                                               atmel,pins =
+                                                       <AT91_PIOC 12 AT91_PERIPH_A AT91_PINCTRL_NONE   /* PC12 periph A MCI2_DA1 with pullup, conflicts with TIOA1 */
+                                                        AT91_PIOC 13 AT91_PERIPH_A AT91_PINCTRL_NONE   /* PC13 periph A MCI2_DA2 with pullup, conflicts with TIOB1 */
+                                                        AT91_PIOC 14 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PC14 periph A MCI2_DA3 with pullup, conflicts with TCLK1 */
+                                       };
+                               };
+                       };
+
+                       mmc2: mmc@f8004000 {
+                               compatible = "atmel,hsmci";
+                               reg = <0xf8004000 0x600>;
+                               interrupts = <23 IRQ_TYPE_LEVEL_HIGH 0>;
+                               dmas = <&dma1 2 AT91_DMA_CFG_PER_ID(1)>;
+                               dma-names = "rxtx";
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&pinctrl_mmc2_clk_cmd_dat0 &pinctrl_mmc2_dat1_3>;
+                               status = "disabled";
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+                       };
+               };
+       };
+};
diff --git a/arch/arm/boot/dts/sama5d3_tcb1.dtsi b/arch/arm/boot/dts/sama5d3_tcb1.dtsi
new file mode 100644 (file)
index 0000000..5264bb4
--- /dev/null
@@ -0,0 +1,27 @@
+/*
+ * at91sama5d3_tcb1.dtsi - Device Tree Include file for AT91SAM9x5 SoC with
+ * 2 TC blocks.
+ *
+ * Copyright (C) 2013 Boris BREZILLON <b.brezillon@overkiz.com>
+ *
+ * Licensed under GPLv2.
+ */
+
+#include <dt-bindings/pinctrl/at91.h>
+#include <dt-bindings/interrupt-controller/irq.h>
+
+/ {
+       aliases {
+               tcb1 = &tcb1;
+       };
+
+       ahb {
+               apb {
+                       tcb1: timer@f8014000 {
+                               compatible = "atmel,at91sam9x5-tcb";
+                               reg = <0xf8014000 0x100>;
+                               interrupts = <27 IRQ_TYPE_LEVEL_HIGH 0>;
+                       };
+               };
+       };
+};
diff --git a/arch/arm/boot/dts/sama5d3_uart.dtsi b/arch/arm/boot/dts/sama5d3_uart.dtsi
new file mode 100644 (file)
index 0000000..98fcb2d
--- /dev/null
@@ -0,0 +1,53 @@
+/*
+ * at91sama5d3_uart.dtsi - Device Tree Include file for AT91SAM9x5 SoC with
+ * UART support
+ *
+ * Copyright (C) 2013 Boris BREZILLON <b.brezillon@overkiz.com>
+ *
+ * Licensed under GPLv2.
+ */
+
+#include <dt-bindings/pinctrl/at91.h>
+#include <dt-bindings/interrupt-controller/irq.h>
+
+/ {
+       ahb {
+               apb {
+                       pinctrl@fffff200 {
+                               uart0 {
+                                       pinctrl_uart0: uart0-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOC 29 AT91_PERIPH_A AT91_PINCTRL_NONE   /* PC29 periph A, conflicts with PWMFI2, ISI_D8 */
+                                                        AT91_PIOC 30 AT91_PERIPH_A AT91_PINCTRL_PULL_UP>;      /* PC30 periph A with pullup, conflicts with ISI_PCK */
+                                       };
+                               };
+
+                               uart1 {
+                                       pinctrl_uart1: uart1-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOA 30 AT91_PERIPH_B AT91_PINCTRL_NONE   /* PA30 periph B, conflicts with TWD0, ISI_VSYNC */
+                                                        AT91_PIOA 31 AT91_PERIPH_B AT91_PINCTRL_PULL_UP>;      /* PA31 periph B with pullup, conflicts with TWCK0, ISI_HSYNC */
+                                       };
+                               };
+                       };
+
+                       uart0: serial@f0024000 {
+                               compatible = "atmel,at91sam9260-usart";
+                               reg = <0xf0024000 0x200>;
+                               interrupts = <16 IRQ_TYPE_LEVEL_HIGH 5>;
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&pinctrl_uart0>;
+                               status = "disabled";
+                       };
+
+                       uart1: serial@f8028000 {
+                               compatible = "atmel,at91sam9260-usart";
+                               reg = <0xf8028000 0x200>;
+                               interrupts = <17 IRQ_TYPE_LEVEL_HIGH 5>;
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&pinctrl_uart1>;
+                               status = "disabled";
+                       };
+               };
+       };
+};
index 31ed9e3bb649ab9a6af644d58a36576bc0d3cabd..726a0f35100c5218fb0b467bef7fa611f953b6de 100644 (file)
@@ -6,7 +6,6 @@
  *
  * Licensed under GPLv2 or later.
  */
-#include "sama5d3.dtsi"
 
 / {
        compatible = "atmel,samad3xcm", "atmel,sama5d3", "atmel,sama5";
index 212230629f271459950547d1af23c143fb67e981..8ee06dd81799da98cbe14ed6c43973e4d4bd513f 100644 (file)
 };
 
 &i2c0 {
+       status = "okay";
        as3711@40 {
                compatible = "ams,as3711";
                reg = <0x40>;
 &i2c3 {
        pinctrl-0 = <&i2c3_pins>;
        pinctrl-names = "default";
+       status = "okay";
 };
 
 &mmcif {
index 3955c7606a6f45a33036bec612ad918806315dee..fcf26889a8a0aacb380d980fb6cccdd36ee36dff 100644 (file)
                              0 168 0x4
                              0 169 0x4
                              0 170 0x4>;
+               status = "disabled";
        };
 
        i2c1: i2c@e6822000 {
                              0 52 0x4
                              0 53 0x4
                              0 54 0x4>;
+               status = "disabled";
        };
 
        i2c2: i2c@e6824000 {
                              0 172 0x4
                              0 173 0x4
                              0 174 0x4>;
+               status = "disabled";
        };
 
        i2c3: i2c@e6826000 {
                              0 184 0x4
                              0 185 0x4
                              0 186 0x4>;
+               status = "disabled";
        };
 
        i2c4: i2c@e6828000 {
                              0 188 0x4
                              0 189 0x4
                              0 190 0x4>;
+               status = "disabled";
        };
 
        mmcif: mmcif@e6bd0000 {
index e273fa993b8c82aa696273be311a145d38d21e5d..6d09b8d42fdd123da5e3b5e4b315983c42f9c6eb 100644 (file)
                                                        reg = <0x58>;
                                                };
 
-                                               cfg_s2f_usr0_clk: cfg_s2f_usr0_clk {
+                                               cfg_h2f_usr0_clk: cfg_h2f_usr0_clk {
                                                        #clock-cells = <0>;
                                                        compatible = "altr,socfpga-perip-clk";
                                                        clocks = <&main_pll>;
                                                        reg = <0x98>;
                                                };
 
-                                               s2f_usr1_clk: s2f_usr1_clk {
+                                               h2f_usr1_clk: h2f_usr1_clk {
                                                        #clock-cells = <0>;
                                                        compatible = "altr,socfpga-perip-clk";
                                                        clocks = <&periph_pll>;
                                                        reg = <0xD0>;
                                                };
 
-                                               s2f_usr2_clk: s2f_usr2_clk {
+                                               h2f_usr2_clk: h2f_usr2_clk {
                                                        #clock-cells = <0>;
                                                        compatible = "altr,socfpga-perip-clk";
                                                        clocks = <&sdram_pll>;
                                                };
                                        };
 
-                               mpu_periph_clk: mpu_periph_clk {
-                                       #clock-cells = <0>;
-                                       compatible = "altr,socfpga-gate-clk";
-                                       clocks = <&mpuclk>;
-                                       fixed-divider = <4>;
+                                       mpu_periph_clk: mpu_periph_clk {
+                                               #clock-cells = <0>;
+                                               compatible = "altr,socfpga-gate-clk";
+                                               clocks = <&mpuclk>;
+                                               fixed-divider = <4>;
                                        };
 
-                               mpu_l2_ram_clk: mpu_l2_ram_clk {
-                                       #clock-cells = <0>;
-                                       compatible = "altr,socfpga-gate-clk";
-                                       clocks = <&mpuclk>;
-                                       fixed-divider = <2>;
+                                       mpu_l2_ram_clk: mpu_l2_ram_clk {
+                                               #clock-cells = <0>;
+                                               compatible = "altr,socfpga-gate-clk";
+                                               clocks = <&mpuclk>;
+                                               fixed-divider = <2>;
                                        };
 
-                               l4_main_clk: l4_main_clk {
-                                       #clock-cells = <0>;
-                                       compatible = "altr,socfpga-gate-clk";
-                                       clocks = <&mainclk>;
-                                       clk-gate = <0x60 0>;
+                                       l4_main_clk: l4_main_clk {
+                                               #clock-cells = <0>;
+                                               compatible = "altr,socfpga-gate-clk";
+                                               clocks = <&mainclk>;
+                                               clk-gate = <0x60 0>;
                                        };
 
-                               l3_main_clk: l3_main_clk {
-                                       #clock-cells = <0>;
-                                       compatible = "altr,socfpga-gate-clk";
-                                       clocks = <&mainclk>;
+                                       l3_main_clk: l3_main_clk {
+                                               #clock-cells = <0>;
+                                               compatible = "altr,socfpga-gate-clk";
+                                               clocks = <&mainclk>;
                                        };
 
-                               l3_mp_clk: l3_mp_clk {
-                                       #clock-cells = <0>;
-                                       compatible = "altr,socfpga-gate-clk";
-                                       clocks = <&mainclk>;
-                                       div-reg = <0x64 0 2>;
-                                       clk-gate = <0x60 1>;
+                                       l3_mp_clk: l3_mp_clk {
+                                               #clock-cells = <0>;
+                                               compatible = "altr,socfpga-gate-clk";
+                                               clocks = <&mainclk>;
+                                               div-reg = <0x64 0 2>;
+                                               clk-gate = <0x60 1>;
                                        };
 
-                               l3_sp_clk: l3_sp_clk {
-                                       #clock-cells = <0>;
-                                       compatible = "altr,socfpga-gate-clk";
-                                       clocks = <&mainclk>;
-                                       div-reg = <0x64 2 2>;
-                               };
+                                       l3_sp_clk: l3_sp_clk {
+                                               #clock-cells = <0>;
+                                               compatible = "altr,socfpga-gate-clk";
+                                               clocks = <&mainclk>;
+                                               div-reg = <0x64 2 2>;
+                                       };
 
-                               l4_mp_clk: l4_mp_clk {
-                                       #clock-cells = <0>;
-                                       compatible = "altr,socfpga-gate-clk";
-                                       clocks = <&mainclk>, <&per_base_clk>;
-                                       div-reg = <0x64 4 3>;
-                                       clk-gate = <0x60 2>;
+                                       l4_mp_clk: l4_mp_clk {
+                                               #clock-cells = <0>;
+                                               compatible = "altr,socfpga-gate-clk";
+                                               clocks = <&mainclk>, <&per_base_clk>;
+                                               div-reg = <0x64 4 3>;
+                                               clk-gate = <0x60 2>;
                                        };
 
-                               l4_sp_clk: l4_sp_clk {
-                                       #clock-cells = <0>;
-                                       compatible = "altr,socfpga-gate-clk";
-                                       clocks = <&mainclk>, <&per_base_clk>;
-                                       div-reg = <0x64 7 3>;
-                                       clk-gate = <0x60 3>;
+                                       l4_sp_clk: l4_sp_clk {
+                                               #clock-cells = <0>;
+                                               compatible = "altr,socfpga-gate-clk";
+                                               clocks = <&mainclk>, <&per_base_clk>;
+                                               div-reg = <0x64 7 3>;
+                                               clk-gate = <0x60 3>;
                                        };
 
-                               dbg_at_clk: dbg_at_clk {
-                                       #clock-cells = <0>;
-                                       compatible = "altr,socfpga-gate-clk";
-                                       clocks = <&dbg_base_clk>;
-                                       div-reg = <0x68 0 2>;
-                                       clk-gate = <0x60 4>;
+                                       dbg_at_clk: dbg_at_clk {
+                                               #clock-cells = <0>;
+                                               compatible = "altr,socfpga-gate-clk";
+                                               clocks = <&dbg_base_clk>;
+                                               div-reg = <0x68 0 2>;
+                                               clk-gate = <0x60 4>;
                                        };
 
-                               dbg_clk: dbg_clk {
-                                       #clock-cells = <0>;
-                                       compatible = "altr,socfpga-gate-clk";
-                                       clocks = <&dbg_base_clk>;
-                                       div-reg = <0x68 2 2>;
-                                       clk-gate = <0x60 5>;
+                                       dbg_clk: dbg_clk {
+                                               #clock-cells = <0>;
+                                               compatible = "altr,socfpga-gate-clk";
+                                               clocks = <&dbg_base_clk>;
+                                               div-reg = <0x68 2 2>;
+                                               clk-gate = <0x60 5>;
                                        };
 
-                               dbg_trace_clk: dbg_trace_clk {
-                                       #clock-cells = <0>;
-                                       compatible = "altr,socfpga-gate-clk";
-                                       clocks = <&dbg_base_clk>;
-                                       div-reg = <0x6C 0 3>;
-                                       clk-gate = <0x60 6>;
+                                       dbg_trace_clk: dbg_trace_clk {
+                                               #clock-cells = <0>;
+                                               compatible = "altr,socfpga-gate-clk";
+                                               clocks = <&dbg_base_clk>;
+                                               div-reg = <0x6C 0 3>;
+                                               clk-gate = <0x60 6>;
                                        };
 
-                               dbg_timer_clk: dbg_timer_clk {
-                                       #clock-cells = <0>;
-                                       compatible = "altr,socfpga-gate-clk";
-                                       clocks = <&dbg_base_clk>;
-                                       clk-gate = <0x60 7>;
+                                       dbg_timer_clk: dbg_timer_clk {
+                                               #clock-cells = <0>;
+                                               compatible = "altr,socfpga-gate-clk";
+                                               clocks = <&dbg_base_clk>;
+                                               clk-gate = <0x60 7>;
                                        };
 
-                               cfg_clk: cfg_clk {
-                                       #clock-cells = <0>;
-                                       compatible = "altr,socfpga-gate-clk";
-                                       clocks = <&cfg_s2f_usr0_clk>;
-                                       clk-gate = <0x60 8>;
+                                       cfg_clk: cfg_clk {
+                                               #clock-cells = <0>;
+                                               compatible = "altr,socfpga-gate-clk";
+                                               clocks = <&cfg_h2f_usr0_clk>;
+                                               clk-gate = <0x60 8>;
                                        };
 
-                               s2f_user0_clk: s2f_user0_clk {
-                                       #clock-cells = <0>;
-                                       compatible = "altr,socfpga-gate-clk";
-                                       clocks = <&cfg_s2f_usr0_clk>;
-                                       clk-gate = <0x60 9>;
+                                       h2f_user0_clk: h2f_user0_clk {
+                                               #clock-cells = <0>;
+                                               compatible = "altr,socfpga-gate-clk";
+                                               clocks = <&cfg_h2f_usr0_clk>;
+                                               clk-gate = <0x60 9>;
                                        };
 
-                               emac_0_clk: emac_0_clk {
-                                       #clock-cells = <0>;
-                                       compatible = "altr,socfpga-gate-clk";
-                                       clocks = <&emac0_clk>;
-                                       clk-gate = <0xa0 0>;
+                                       emac_0_clk: emac_0_clk {
+                                               #clock-cells = <0>;
+                                               compatible = "altr,socfpga-gate-clk";
+                                               clocks = <&emac0_clk>;
+                                               clk-gate = <0xa0 0>;
                                        };
 
-                               emac_1_clk: emac_1_clk {
-                                       #clock-cells = <0>;
-                                       compatible = "altr,socfpga-gate-clk";
-                                       clocks = <&emac1_clk>;
-                                       clk-gate = <0xa0 1>;
+                                       emac_1_clk: emac_1_clk {
+                                               #clock-cells = <0>;
+                                               compatible = "altr,socfpga-gate-clk";
+                                               clocks = <&emac1_clk>;
+                                               clk-gate = <0xa0 1>;
                                        };
 
-                               usb_mp_clk: usb_mp_clk {
-                                       #clock-cells = <0>;
-                                       compatible = "altr,socfpga-gate-clk";
-                                       clocks = <&per_base_clk>;
-                                       clk-gate = <0xa0 2>;
-                                       div-reg = <0xa4 0 3>;
+                                       usb_mp_clk: usb_mp_clk {
+                                               #clock-cells = <0>;
+                                               compatible = "altr,socfpga-gate-clk";
+                                               clocks = <&per_base_clk>;
+                                               clk-gate = <0xa0 2>;
+                                               div-reg = <0xa4 0 3>;
                                        };
 
-                               spi_m_clk: spi_m_clk {
-                                       #clock-cells = <0>;
-                                       compatible = "altr,socfpga-gate-clk";
-                                       clocks = <&per_base_clk>;
-                                       clk-gate = <0xa0 3>;
-                                       div-reg = <0xa4 3 3>;
+                                       spi_m_clk: spi_m_clk {
+                                               #clock-cells = <0>;
+                                               compatible = "altr,socfpga-gate-clk";
+                                               clocks = <&per_base_clk>;
+                                               clk-gate = <0xa0 3>;
+                                               div-reg = <0xa4 3 3>;
                                        };
 
-                               can0_clk: can0_clk {
-                                       #clock-cells = <0>;
-                                       compatible = "altr,socfpga-gate-clk";
-                                       clocks = <&per_base_clk>;
-                                       clk-gate = <0xa0 4>;
-                                       div-reg = <0xa4 6 3>;
+                                       can0_clk: can0_clk {
+                                               #clock-cells = <0>;
+                                               compatible = "altr,socfpga-gate-clk";
+                                               clocks = <&per_base_clk>;
+                                               clk-gate = <0xa0 4>;
+                                               div-reg = <0xa4 6 3>;
                                        };
 
-                               can1_clk: can1_clk {
-                                       #clock-cells = <0>;
-                                       compatible = "altr,socfpga-gate-clk";
-                                       clocks = <&per_base_clk>;
-                                       clk-gate = <0xa0 5>;
-                                       div-reg = <0xa4 9 3>;
+                                       can1_clk: can1_clk {
+                                               #clock-cells = <0>;
+                                               compatible = "altr,socfpga-gate-clk";
+                                               clocks = <&per_base_clk>;
+                                               clk-gate = <0xa0 5>;
+                                               div-reg = <0xa4 9 3>;
                                        };
 
-                               gpio_db_clk: gpio_db_clk {
-                                       #clock-cells = <0>;
-                                       compatible = "altr,socfpga-gate-clk";
-                                       clocks = <&per_base_clk>;
-                                       clk-gate = <0xa0 6>;
-                                       div-reg = <0xa8 0 24>;
+                                       gpio_db_clk: gpio_db_clk {
+                                               #clock-cells = <0>;
+                                               compatible = "altr,socfpga-gate-clk";
+                                               clocks = <&per_base_clk>;
+                                               clk-gate = <0xa0 6>;
+                                               div-reg = <0xa8 0 24>;
                                        };
 
-                               s2f_user1_clk: s2f_user1_clk {
-                                       #clock-cells = <0>;
-                                       compatible = "altr,socfpga-gate-clk";
-                                       clocks = <&s2f_usr1_clk>;
-                                       clk-gate = <0xa0 7>;
+                                       h2f_user1_clk: h2f_user1_clk {
+                                               #clock-cells = <0>;
+                                               compatible = "altr,socfpga-gate-clk";
+                                               clocks = <&h2f_usr1_clk>;
+                                               clk-gate = <0xa0 7>;
                                        };
 
-                               sdmmc_clk: sdmmc_clk {
-                                       #clock-cells = <0>;
-                                       compatible = "altr,socfpga-gate-clk";
-                                       clocks = <&f2s_periph_ref_clk>, <&main_nand_sdmmc_clk>, <&per_nand_mmc_clk>;
-                                       clk-gate = <0xa0 8>;
+                                       sdmmc_clk: sdmmc_clk {
+                                               #clock-cells = <0>;
+                                               compatible = "altr,socfpga-gate-clk";
+                                               clocks = <&f2s_periph_ref_clk>, <&main_nand_sdmmc_clk>, <&per_nand_mmc_clk>;
+                                               clk-gate = <0xa0 8>;
                                        };
 
-                               nand_x_clk: nand_x_clk {
-                                       #clock-cells = <0>;
-                                       compatible = "altr,socfpga-gate-clk";
-                                       clocks = <&f2s_periph_ref_clk>, <&main_nand_sdmmc_clk>, <&per_nand_mmc_clk>;
-                                       clk-gate = <0xa0 9>;
+                                       nand_x_clk: nand_x_clk {
+                                               #clock-cells = <0>;
+                                               compatible = "altr,socfpga-gate-clk";
+                                               clocks = <&f2s_periph_ref_clk>, <&main_nand_sdmmc_clk>, <&per_nand_mmc_clk>;
+                                               clk-gate = <0xa0 9>;
                                        };
 
-                               nand_clk: nand_clk {
-                                       #clock-cells = <0>;
-                                       compatible = "altr,socfpga-gate-clk";
-                                       clocks = <&f2s_periph_ref_clk>, <&main_nand_sdmmc_clk>, <&per_nand_mmc_clk>;
-                                       clk-gate = <0xa0 10>;
-                                       fixed-divider = <4>;
+                                       nand_clk: nand_clk {
+                                               #clock-cells = <0>;
+                                               compatible = "altr,socfpga-gate-clk";
+                                               clocks = <&f2s_periph_ref_clk>, <&main_nand_sdmmc_clk>, <&per_nand_mmc_clk>;
+                                               clk-gate = <0xa0 10>;
+                                               fixed-divider = <4>;
                                        };
 
-                               qspi_clk: qspi_clk {
-                                       #clock-cells = <0>;
-                                       compatible = "altr,socfpga-gate-clk";
-                                       clocks = <&f2s_periph_ref_clk>, <&main_qspi_clk>, <&per_qspi_clk>;
-                                       clk-gate = <0xa0 11>;
+                                       qspi_clk: qspi_clk {
+                                               #clock-cells = <0>;
+                                               compatible = "altr,socfpga-gate-clk";
+                                               clocks = <&f2s_periph_ref_clk>, <&main_qspi_clk>, <&per_qspi_clk>;
+                                               clk-gate = <0xa0 11>;
                                        };
                                };
                        };
                        compatible = "arm,cortex-a9-twd-timer";
                        reg = <0xfffec600 0x100>;
                        interrupts = <1 13 0xf04>;
+                       clocks = <&mpu_periph_clk>;
                };
 
                timer0: timer0@ffc08000 {
                };
 
                rstmgr@ffd05000 {
-                               compatible = "altr,rst-mgr";
-                               reg = <0xffd05000 0x1000>;
-                       };
+                       compatible = "altr,rst-mgr";
+                       reg = <0xffd05000 0x1000>;
+               };
 
                sysmgr@ffd08000 {
                                compatible = "altr,sys-mgr";
diff --git a/arch/arm/boot/dts/socfpga_arria5.dtsi b/arch/arm/boot/dts/socfpga_arria5.dtsi
new file mode 100644 (file)
index 0000000..a85b404
--- /dev/null
@@ -0,0 +1,58 @@
+/*
+ *  Copyright (C) 2013 Altera Corporation <www.altera.com>
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms and conditions of the GNU General Public License,
+ * version 2, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/dts-v1/;
+/include/ "socfpga.dtsi"
+
+/ {
+       soc {
+               clkmgr@ffd04000 {
+                       clocks {
+                               osc1 {
+                                       clock-frequency = <25000000>;
+                               };
+                       };
+               };
+
+               serial0@ffc02000 {
+                       clock-frequency = <100000000>;
+               };
+
+               serial1@ffc03000 {
+                       clock-frequency = <100000000>;
+               };
+
+               sysmgr@ffd08000 {
+                       cpu1-start-addr = <0xffd080c4>;
+               };
+
+               timer0@ffc08000 {
+                       clock-frequency = <100000000>;
+               };
+
+               timer1@ffc09000 {
+                       clock-frequency = <100000000>;
+               };
+
+               timer2@ffd00000 {
+                       clock-frequency = <25000000>;
+               };
+
+               timer3@ffd01000 {
+                       clock-frequency = <25000000>;
+               };
+       };
+};
diff --git a/arch/arm/boot/dts/socfpga_arria5_socdk.dts b/arch/arm/boot/dts/socfpga_arria5_socdk.dts
new file mode 100644 (file)
index 0000000..5beffb2
--- /dev/null
@@ -0,0 +1,40 @@
+/*
+ *  Copyright (C) 2013 Altera Corporation <www.altera.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/include/ "socfpga_arria5.dtsi"
+
+/ {
+       model = "Altera SOCFPGA Arria V SoC Development Kit";
+       compatible = "altr,socfpga-arria5", "altr,socfpga";
+
+       chosen {
+               bootargs = "console=ttyS0,115200";
+       };
+
+       memory {
+               name = "memory";
+               device_type = "memory";
+               reg = <0x0 0x40000000>; /* 1GB */
+       };
+
+       aliases {
+               /* this allow the ethaddr uboot environmnet variable contents
+               * to be added to the gmac1 device tree blob.
+               */
+               ethernet0 = &gmac1;
+       };
+};
similarity index 78%
rename from arch/arm/boot/dts/socfpga_cyclone5.dts
rename to arch/arm/boot/dts/socfpga_cyclone5.dtsi
index 973999d2c69759b7303073bb06db3cc3533417f0..a8716f6dbe2e0adaa365032510a128238be7a764 100644 (file)
 /include/ "socfpga.dtsi"
 
 / {
-       model = "Altera SOCFPGA Cyclone V";
-       compatible = "altr,socfpga-cyclone5", "altr,socfpga";
-
-       chosen {
-               bootargs = "console=ttyS0,57600";
-       };
-
-       memory {
-               name = "memory";
-               device_type = "memory";
-               reg = <0x0 0x40000000>; /* 1GB */
-       };
-
-       aliases {
-               /* this allow the ethaddr uboot environmnet variable contents
-                * to be added to the gmac1 device tree blob.
-                */
-               ethernet0 = &gmac1;
-       };
-
        soc {
                clkmgr@ffd04000 {
                        clocks {
diff --git a/arch/arm/boot/dts/socfpga_cyclone5_socdk.dts b/arch/arm/boot/dts/socfpga_cyclone5_socdk.dts
new file mode 100644 (file)
index 0000000..2ee52ab
--- /dev/null
@@ -0,0 +1,40 @@
+/*
+ *  Copyright (C) 2012 Altera Corporation <www.altera.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/include/ "socfpga_cyclone5.dtsi"
+
+/ {
+       model = "Altera SOCFPGA Cyclone V SoC Development Kit";
+       compatible = "altr,socfpga-cyclone5", "altr,socfpga";
+
+       chosen {
+               bootargs = "console=ttyS0,115200";
+       };
+
+       memory {
+               name = "memory";
+               device_type = "memory";
+               reg = <0x0 0x40000000>; /* 1GB */
+       };
+
+       aliases {
+               /* this allow the ethaddr uboot environmnet variable contents
+                * to be added to the gmac1 device tree blob.
+                */
+               ethernet0 = &gmac1;
+       };
+};
similarity index 50%
rename from include/linux/clk/sunxi.h
rename to arch/arm/boot/dts/socfpga_cyclone5_sockit.dts
index e074fdd5a2365acc9b3ece6d128ff35dcafaf799..50b99a2c12aeb9549d70e09f9ea18c6bca797f1a 100644 (file)
@@ -1,7 +1,5 @@
 /*
- * Copyright 2012 Maxime Ripard
- *
- * Maxime Ripard <maxime.ripard@free-electrons.com>
+ *  Copyright (C) 2013 Steffen Trumtrar <s.trumtrar@pengutronix.de>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#ifndef __LINUX_CLK_SUNXI_H_
-#define __LINUX_CLK_SUNXI_H_
+/include/ "socfpga_cyclone5.dtsi"
+
+/ {
+       model = "Terasic SoCkit";
+       compatible = "altr,socfpga-cyclone5", "altr,socfpga";
+
+       chosen {
+               bootargs = "console=ttyS0,115200";
+       };
 
-void __init sunxi_init_clocks(void);
+       memory {
+               name = "memory";
+               device_type = "memory";
+               reg = <0x0 0x40000000>; /* 1GB */
+       };
+};
 
-#endif
+&gmac1 {
+       status = "okay";
+};
index 1c1091eedadec293f619d5843f46506e31f14ffb..2ef30c1c19975c767d562f86cce7bf7daedfb4bd 100644 (file)
@@ -10,6 +10,7 @@
  */
 
 #include <dt-bindings/interrupt-controller/irq.h>
+#include <dt-bindings/mfd/dbx500-prcmu.h>
 #include "skeleton.dtsi"
 
 / {
                        interrupts = <0 7 IRQ_TYPE_LEVEL_HIGH>;
                };
 
+
+               clocks {
+                       compatible = "stericsson,u8500-clks";
+
+                       prcmu_clk: prcmu-clock {
+                               #clock-cells = <1>;
+                       };
+
+                       prcc_pclk: prcc-periph-clock {
+                               #clock-cells = <2>;
+                       };
+
+                       prcc_kclk: prcc-kernel-clock {
+                               #clock-cells = <2>;
+                       };
+
+                       rtc_clk: rtc32k-clock {
+                               #clock-cells = <0>;
+                       };
+
+                       smp_twd_clk: smp-twd-clock {
+                               #clock-cells = <0>;
+                       };
+               };
+
+               mtu@a03c6000 {
+                       /* Nomadik System Timer */
+                       compatible = "st,nomadik-mtu";
+                       reg = <0xa03c6000 0x1000>;
+                       interrupts = <0 4 IRQ_TYPE_LEVEL_HIGH>;
+
+                       clocks = <&prcmu_clk PRCMU_TIMCLK>, <&prcc_pclk 6 6>;
+                       clock-names = "timclk", "apb_pclk";
+               };
+
                timer@a0410600 {
                        compatible = "arm,cortex-a9-twd-timer";
                        reg = <0xa0410600 0x20>;
                        interrupts = <1 13 0x304>; /* IRQ level high per-CPU */
+
+                       clocks = <&smp_twd_clk>;
                };
 
                rtc@80154000 {
                        compatible = "arm,rtc-pl031", "arm,primecell";
                        reg = <0x80154000 0x1000>;
                        interrupts = <0 18 IRQ_TYPE_LEVEL_HIGH>;
+
+                       clocks = <&rtc_clk>;
+                       clock-names = "apb_pclk";
                };
 
                gpio0: gpio@8012e000 {
                        gpio-controller;
                        #gpio-cells = <2>;
                        gpio-bank = <0>;
+
+                       clocks = <&prcc_pclk 1 9>;
                };
 
                gpio1: gpio@8012e080 {
                        gpio-controller;
                        #gpio-cells = <2>;
                        gpio-bank = <1>;
+
+                       clocks = <&prcc_pclk 1 9>;
                };
 
                gpio2: gpio@8000e000 {
                        gpio-controller;
                        #gpio-cells = <2>;
                        gpio-bank = <2>;
+
+                       clocks = <&prcc_pclk 3 8>;
                };
 
                gpio3: gpio@8000e080 {
                        gpio-controller;
                        #gpio-cells = <2>;
                        gpio-bank = <3>;
+
+                       clocks = <&prcc_pclk 3 8>;
                };
 
                gpio4: gpio@8000e100 {
                        gpio-controller;
                        #gpio-cells = <2>;
                        gpio-bank = <4>;
+
+                       clocks = <&prcc_pclk 3 8>;
                };
 
                gpio5: gpio@8000e180 {
                        gpio-controller;
                        #gpio-cells = <2>;
                        gpio-bank = <5>;
+
+                       clocks = <&prcc_pclk 3 8>;
                };
 
                gpio6: gpio@8011e000 {
                        gpio-controller;
                        #gpio-cells = <2>;
                        gpio-bank = <6>;
+
+                       clocks = <&prcc_pclk 2 1>;
                };
 
                gpio7: gpio@8011e080 {
                        gpio-controller;
                        #gpio-cells = <2>;
                        gpio-bank = <7>;
+
+                       clocks = <&prcc_pclk 2 1>;
                };
 
                gpio8: gpio@a03fe000 {
                        gpio-controller;
                        #gpio-cells = <2>;
                        gpio-bank = <8>;
+
+                       clocks = <&prcc_pclk 6 1>;
                };
 
                pinctrl {
                };
 
                usb_per5@a03e0000 {
-                       compatible = "stericsson,db8500-musb",
-                               "mentor,musb";
+                       compatible = "stericsson,db8500-musb";
                        reg = <0xa03e0000 0x10000>;
                        interrupts = <0 23 IRQ_TYPE_LEVEL_HIGH>;
                        interrupt-names = "mc";
                                    "iep_6_14", "oep_6_14",
                                    "iep_7_15", "oep_7_15",
                                    "iep_8",    "oep_8";
+
+                       clocks = <&prcc_pclk 5 0>;
                };
 
                dma: dma-controller@801C0000 {
 
                        #dma-cells = <3>;
                        memcpy-channels = <56 57 58 59 60>;
+
+                       clocks = <&prcmu_clk PRCMU_DMACLK>;
                };
 
                prcmu: prcmu@80157000 {
                                reg = <0x80157450 0xC>;
                        };
 
+                       cpufreq {
+                               compatible = "stericsson,cpufreq-ux500";
+                               clocks = <&prcmu_clk PRCMU_ARMSS>;
+                               clock-names = "armss";
+                               status = "disabled";
+                       };
+
                        thermal@801573c0 {
                                compatible = "stericsson,db8500-thermal";
                                reg = <0x801573c0 0x40>;
                        compatible = "stericsson,db8500-i2c", "st,nomadik-i2c", "arm,primecell";
                        reg = <0x80004000 0x1000>;
                        interrupts = <0 21 IRQ_TYPE_LEVEL_HIGH>;
-                       arm,primecell-periphid = <0x180024>;
 
                        #address-cells = <1>;
                        #size-cells = <0>;
                        v-i2c-supply = <&db8500_vape_reg>;
 
                        clock-frequency = <400000>;
+                       clocks = <&prcc_kclk 3 3>, <&prcc_pclk 3 3>;
+                       clock-names = "i2cclk", "apb_pclk";
                };
 
                i2c@80122000 {
                        compatible = "stericsson,db8500-i2c", "st,nomadik-i2c", "arm,primecell";
                        reg = <0x80122000 0x1000>;
                        interrupts = <0 22 IRQ_TYPE_LEVEL_HIGH>;
-                       arm,primecell-periphid = <0x180024>;
 
                        #address-cells = <1>;
                        #size-cells = <0>;
                        v-i2c-supply = <&db8500_vape_reg>;
 
                        clock-frequency = <400000>;
+
+                       clocks = <&prcc_kclk 1 2>, <&prcc_pclk 1 2>;
+                       clock-names = "i2cclk", "apb_pclk";
                };
 
                i2c@80128000 {
                        compatible = "stericsson,db8500-i2c", "st,nomadik-i2c", "arm,primecell";
                        reg = <0x80128000 0x1000>;
                        interrupts = <0 55 IRQ_TYPE_LEVEL_HIGH>;
-                       arm,primecell-periphid = <0x180024>;
 
                        #address-cells = <1>;
                        #size-cells = <0>;
                        v-i2c-supply = <&db8500_vape_reg>;
 
                        clock-frequency = <400000>;
+
+                       clocks = <&prcc_kclk 1 6>, <&prcc_pclk 1 6>;
+                       clock-names = "i2cclk", "apb_pclk";
                };
 
                i2c@80110000 {
                        compatible = "stericsson,db8500-i2c", "st,nomadik-i2c", "arm,primecell";
                        reg = <0x80110000 0x1000>;
                        interrupts = <0 12 IRQ_TYPE_LEVEL_HIGH>;
-                       arm,primecell-periphid = <0x180024>;
 
                        #address-cells = <1>;
                        #size-cells = <0>;
                        v-i2c-supply = <&db8500_vape_reg>;
 
                        clock-frequency = <400000>;
+
+                       clocks = <&prcc_kclk 2 0>, <&prcc_pclk 2 0>;
+                       clock-names = "i2cclk", "apb_pclk";
                };
 
                i2c@8012a000 {
                        compatible = "stericsson,db8500-i2c", "st,nomadik-i2c", "arm,primecell";
                        reg = <0x8012a000 0x1000>;
                        interrupts = <0 51 IRQ_TYPE_LEVEL_HIGH>;
-                       arm,primecell-periphid = <0x180024>;
 
                        #address-cells = <1>;
                        #size-cells = <0>;
                        v-i2c-supply = <&db8500_vape_reg>;
 
                        clock-frequency = <400000>;
+
+                       clocks = <&prcc_kclk 1 9>, <&prcc_pclk 1 9>;
+                       clock-names = "i2cclk", "apb_pclk";
                };
 
                ssp@80002000 {
                               <&dma 13 0 0x0>; /* Logical - MemToDev */
                        dma-names = "rx", "tx";
 
+                       clocks = <&prcc_kclk 1 0>, <&prcc_pclk 1 0>;
+                       clock-names = "uart", "apb_pclk";
+
                        status = "disabled";
                };
 
                               <&dma 12 0 0x0>; /* Logical - MemToDev */
                        dma-names = "rx", "tx";
 
+                       clocks = <&prcc_kclk 1 1>, <&prcc_pclk 1 1>;
+                       clock-names = "uart", "apb_pclk";
+
                        status = "disabled";
                };
 
                               <&dma 11 0 0x0>; /* Logical - MemToDev */
                        dma-names = "rx", "tx";
 
+                       clocks = <&prcc_kclk 3 6>, <&prcc_pclk 3 6>;
+                       clock-names = "uart", "apb_pclk";
+
                        status = "disabled";
                };
 
                               <&dma 29 0 0x0>; /* Logical - MemToDev */
                        dma-names = "rx", "tx";
 
+                       clocks = <&prcc_kclk 1 5>, <&prcc_pclk 1 5>;
+                       clock-names = "sdi", "apb_pclk";
+
                        status = "disabled";
                };
 
                               <&dma 32 0 0x0>; /* Logical - MemToDev */
                        dma-names = "rx", "tx";
 
+                       clocks = <&prcc_kclk 2 4>, <&prcc_pclk 2 6>;
+                       clock-names = "sdi", "apb_pclk";
+
                        status = "disabled";
                };
 
                               <&dma 28 0 0x0>; /* Logical - MemToDev */
                        dma-names = "rx", "tx";
 
+                       clocks = <&prcc_kclk 3 4>, <&prcc_pclk 3 4>;
+                       clock-names = "sdi", "apb_pclk";
+
                        status = "disabled";
                };
 
                        compatible = "arm,pl18x", "arm,primecell";
                        reg = <0x80119000 0x1000>;
                        interrupts = <0 59 IRQ_TYPE_LEVEL_HIGH>;
+
+                       clocks = <&prcc_kclk 2 5>, <&prcc_pclk 2 7>;
+                       clock-names = "sdi", "apb_pclk";
+
                        status = "disabled";
                };
 
                               <&dma 42 0 0x0>; /* Logical - MemToDev */
                        dma-names = "rx", "tx";
 
+                       clocks = <&prcc_kclk 2 2>, <&prcc_pclk 2 4>;
+                       clock-names = "sdi", "apb_pclk";
+
                        status = "disabled";
                };
 
                        compatible = "arm,pl18x", "arm,primecell";
                        reg = <0x80008000 0x1000>;
                        interrupts = <0 100 IRQ_TYPE_LEVEL_HIGH>;
+
+                       clocks = <&prcc_kclk 3 7>, <&prcc_pclk 3 7>;
+                       clock-names = "sdi", "apb_pclk";
+
                        status = "disabled";
                };
 
                        reg = <0x80123000 0x1000>;
                        interrupts = <0 31 IRQ_TYPE_LEVEL_HIGH>;
                        v-ape-supply = <&db8500_vape_reg>;
+
+                       clocks = <&prcc_kclk 1 3>, <&prcc_pclk 1 3>;
+                       clock-names = "msp", "apb_pclk";
+
                        status = "disabled";
                };
 
                        reg = <0x80124000 0x1000>;
                        interrupts = <0 62 IRQ_TYPE_LEVEL_HIGH>;
                        v-ape-supply = <&db8500_vape_reg>;
+
+                       clocks = <&prcc_kclk 1 4>, <&prcc_pclk 1 4>;
+                       clock-names = "msp", "apb_pclk";
+
                        status = "disabled";
                };
 
                        reg = <0x80117000 0x1000>;
                        interrupts = <0 98 IRQ_TYPE_LEVEL_HIGH>;
                        v-ape-supply = <&db8500_vape_reg>;
+
+                       clocks = <&prcc_kclk 2 3>, <&prcc_pclk 2 5>;
+                       clock-names = "msp", "apb_pclk";
+
                        status = "disabled";
                };
 
                        reg = <0x80125000 0x1000>;
                        interrupts = <0 62 IRQ_TYPE_LEVEL_HIGH>;
                        v-ape-supply = <&db8500_vape_reg>;
+
+                       clocks = <&prcc_kclk 1 10>, <&prcc_pclk 1 11>;
+                       clock-names = "msp", "apb_pclk";
+
                        status = "disabled";
                };
 
                cpufreq-cooling {
                        compatible = "stericsson,db8500-cpufreq-cooling";
                        status = "disabled";
-                };
+               };
 
                vmmci: regulator-gpio {
                        compatible = "regulator-gpio";
                        interrupts = <0 15 IRQ_TYPE_LEVEL_HIGH>;
 
                        v-ape-supply = <&db8500_vape_reg>;
+                       clocks = <&prcc_pclk 6 1>;
                };
 
                hash@a03c2000 {
                        reg = <0xa03c2000 0x1000>;
 
                        v-ape-supply = <&db8500_vape_reg>;
+                       clocks = <&prcc_pclk 6 2>;
                };
        };
 };
similarity index 95%
rename from arch/arm/boot/dts/ste-stuib.dtsi
rename to arch/arm/boot/dts/ste-href-stuib.dtsi
index 524e33240ad418e739e7dfd7a6d41cce642b3261..76704ec0ffcc89bf3fd0d7e90726c6cc1502807b 100644 (file)
@@ -57,7 +57,6 @@
                        bu21013_tp@5c {
                                compatible = "rohm,bu21013_tp";
                                reg = <0x5c>;
-                               touch-gpio = <&gpio2 20 0x4>;
                                avdd-supply = <&ab8500_ldo_aux1_reg>;
 
                                rohm,touch-max-x = <384>;
@@ -68,7 +67,6 @@
                        bu21013_tp@5d {
                                compatible = "rohm,bu21013_tp";
                                reg = <0x5d>;
-                               touch-gpio = <&gpio2 20 0x4>;
                                avdd-supply = <&ab8500_ldo_aux1_reg>;
 
                                rohm,touch-max-x = <384>;
diff --git a/arch/arm/boot/dts/ste-href-tvk1281618.dtsi b/arch/arm/boot/dts/ste-href-tvk1281618.dtsi
new file mode 100644 (file)
index 0000000..76d3ef1
--- /dev/null
@@ -0,0 +1,41 @@
+/*
+ * Copyright 2012 ST-Ericsson AB
+ *
+ * The code contained herein is licensed under the GNU General Public
+ * License. You may obtain a copy of the GNU General Public License
+ * Version 2 or later at the following locations:
+ *
+ * http://www.opensource.org/licenses/gpl-license.html
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * Device Tree for the TVK1281618 UIB
+ */
+
+#include <dt-bindings/interrupt-controller/irq.h>
+
+/ {
+       soc {
+               /* Add Synaptics touch screen, TC35892 keypad etc here */
+               i2c@80004000 {
+                       tc3589x@44 {
+                               compatible = "tc3589x";
+                               reg = <0x44>;
+                               interrupt-parent = <&gpio6>;
+                               interrupts = <26 IRQ_TYPE_EDGE_RISING>;
+
+                               interrupt-controller;
+                               #interrupt-cells = <2>;
+
+                               tc3589x_gpio {
+                                       compatible = "tc3589x-gpio";
+                                       interrupts = <0 IRQ_TYPE_EDGE_RISING>;
+
+                                       interrupt-controller;
+                                       #interrupt-cells = <2>;
+                                       gpio-controller;
+                                       #gpio-cells = <2>;
+                               };
+                       };
+               };
+       };
+};
index 370e03f5e7b2c8bcd416dd871b89c44e5e9ddfb8..aa3f02060fdd43114570eceedbf1ef54dc49a01f 100644 (file)
                        status = "okay";
                };
 
-               i2c@80004000 {
-                       tc3589x@42 {
-                               compatible = "tc3589x";
-                               reg = <0x42>;
-                               interrupt-parent = <&gpio6>;
-                               interrupts = <25 IRQ_TYPE_EDGE_RISING>;
-
-                               interrupt-controller;
-                               #interrupt-cells = <2>;
-
-                               tc3589x_gpio: tc3589x_gpio {
-                                       compatible = "tc3589x-gpio";
-                                       interrupts = <0 IRQ_TYPE_EDGE_RISING>;
-
-                                       interrupt-controller;
-                                       #interrupt-cells = <2>;
-                                       gpio-controller;
-                                       #gpio-cells = <2>;
-                               };
-                       };
-               };
-
                i2c@80128000 {
                        lp5521@33 {
                                compatible = "national,lp5521";
@@ -72,6 +50,7 @@
                                chan0 {
                                        led-cur = /bits/ 8 <0x2f>;
                                        max-cur = /bits/ 8 <0x5f>;
+                                       linux,default-trigger = "heartbeat";
                                };
                                chan1 {
                                        led-cur = /bits/ 8 <0x2f>;
                        };
                        bh1780@29 {
                                compatible = "rohm,bh1780gli";
-                               reg = <0x33>;
+                               reg = <0x29>;
                        };
                };
 
                };
 
                prcmu@80157000 {
-                       db8500-prcmu-regulators {
-                               db8500_vape_reg: db8500_vape {
-                                       regulator-name = "db8500-vape";
-                               };
-
-                               db8500_varm_reg: db8500_varm {
-                                       regulator-name = "db8500-varm";
-                               };
-
-                               db8500_vmodem_reg: db8500_vmodem {
-                                       regulator-name = "db8500-vmodem";
-                               };
-
-                               db8500_vpll_reg: db8500_vpll {
-                                       regulator-name = "db8500-vpll";
-                               };
-
-                               db8500_vsmps1_reg: db8500_vsmps1 {
-                                       regulator-name = "db8500-vsmps1";
-                               };
-
-                               db8500_vsmps2_reg: db8500_vsmps2 {
-                                       regulator-name = "db8500-vsmps2";
-                               };
-
-                               db8500_vsmps3_reg: db8500_vsmps3 {
-                                       regulator-name = "db8500-vsmps3";
-                               };
-
-                               db8500_vrf1_reg: db8500_vrf1 {
-                                       regulator-name = "db8500-vrf1";
-                               };
-
-                               db8500_sva_mmdsp_reg: db8500_sva_mmdsp {
-                                       regulator-name = "db8500-sva-mmdsp";
-                               };
-
-                               db8500_sva_mmdsp_ret_reg: db8500_sva_mmdsp_ret {
-                                       regulator-name = "db8500-sva-mmdsp-ret";
-                               };
-
-                               db8500_sva_pipe_reg: db8500_sva_pipe {
-                                       regulator-name = "db8500_sva_pipe";
-                               };
-
-                               db8500_sia_mmdsp_reg: db8500_sia_mmdsp {
-                                       regulator-name = "db8500_sia_mmdsp";
-                               };
-
-                               db8500_sia_mmdsp_ret_reg: db8500_sia_mmdsp_ret {
-                                       regulator-name = "db8500-sia-mmdsp-ret";
-                               };
-
-                               db8500_sia_pipe_reg: db8500_sia_pipe {
-                                       regulator-name = "db8500-sia-pipe";
-                               };
-
-                               db8500_sga_reg: db8500_sga {
-                                       regulator-name = "db8500-sga";
-                               };
-
-                               db8500_b2r2_mcde_reg: db8500_b2r2_mcde {
-                                       regulator-name = "db8500-b2r2-mcde";
-                               };
-
-                               db8500_esram12_reg: db8500_esram12 {
-                                       regulator-name = "db8500-esram12";
-                               };
-
-                               db8500_esram12_ret_reg: db8500_esram12_ret {
-                                       regulator-name = "db8500-esram12-ret";
-                               };
-
-                               db8500_esram34_reg: db8500_esram34 {
-                                       regulator-name = "db8500-esram34";
+                       ab8500 {
+                               ab8500-gpio {
+                                       compatible = "stericsson,ab8500-gpio";
                                };
 
-                               db8500_esram34_ret_reg: db8500_esram34_ret {
-                                       regulator-name = "db8500-esram34-ret";
-                               };
-                       };
-
-                       ab8500 {
                                ab8500-regulators {
                                        ab8500_ldo_aux1_reg: ab8500_ldo_aux1 {
                                                regulator-name = "V-DISPLAY";
diff --git a/arch/arm/boot/dts/ste-hrefprev60-stuib.dts b/arch/arm/boot/dts/ste-hrefprev60-stuib.dts
new file mode 100644 (file)
index 0000000..2b1cb5b
--- /dev/null
@@ -0,0 +1,34 @@
+/*
+ * Copyright 2012 ST-Ericsson AB
+ *
+ * The code contained herein is licensed under the GNU General Public
+ * License. You may obtain a copy of the GNU General Public License
+ * Version 2 or later at the following locations:
+ *
+ * http://www.opensource.org/licenses/gpl-license.html
+ * http://www.gnu.org/copyleft/gpl.html
+ */
+
+/dts-v1/;
+#include "ste-hrefprev60.dtsi"
+#include "ste-href-stuib.dtsi"
+
+/ {
+       model = "ST-Ericsson HREF (pre-v60) and ST UIB";
+       compatible = "st-ericsson,mop500", "st-ericsson,u8500";
+
+       soc {
+               /* Reset line for the BU21013 touchscreen */
+               i2c@80110000 {
+                       /* Only one of these will be used */
+                       bu21013_tp@5c {
+                               touch-gpio = <&gpio2 12 0x4>;
+                               reset-gpio = <&tc3589x_gpio 13 0x4>;
+                       };
+                       bu21013_tp@5d {
+                               touch-gpio = <&gpio2 12 0x4>;
+                               reset-gpio = <&tc3589x_gpio 13 0x4>;
+                       };
+               };
+       };
+};
diff --git a/arch/arm/boot/dts/ste-hrefprev60-tvk.dts b/arch/arm/boot/dts/ste-hrefprev60-tvk.dts
new file mode 100644 (file)
index 0000000..59523f8
--- /dev/null
@@ -0,0 +1,19 @@
+/*
+ * Copyright 2012 ST-Ericsson AB
+ *
+ * The code contained herein is licensed under the GNU General Public
+ * License. You may obtain a copy of the GNU General Public License
+ * Version 2 or later at the following locations:
+ *
+ * http://www.opensource.org/licenses/gpl-license.html
+ * http://www.gnu.org/copyleft/gpl.html
+ */
+
+/dts-v1/;
+#include "ste-hrefprev60.dtsi"
+#include "ste-href-tvk1281618.dtsi"
+
+/ {
+       model = "ST-Ericsson HREF (pre-v60) and TVK1281618 UIB";
+       compatible = "st-ericsson,mop500", "st-ericsson,u8500";
+};
similarity index 60%
rename from arch/arm/boot/dts/ste-hrefprev60.dts
rename to arch/arm/boot/dts/ste-hrefprev60.dtsi
index d8d3b99ab00752be80d78ddf4709a9a888cee4e6..b2cd7bc2752f2a6ea67e0849593410cc61dd176a 100644 (file)
@@ -7,17 +7,14 @@
  *
  * http://www.opensource.org/licenses/gpl-license.html
  * http://www.gnu.org/copyleft/gpl.html
+ *
+ * Device Tree for the HREF+ prior to the v60 variant.
  */
 
-/dts-v1/;
 #include "ste-dbx5x0.dtsi"
 #include "ste-href.dtsi"
-#include "ste-stuib.dtsi"
 
 / {
-       model = "ST-Ericsson HREF (pre-v60) platform with Device Tree";
-       compatible = "st-ericsson,mop500", "st-ericsson,u8500";
-
        gpio_keys {
                button@1 {
                        gpios = <&tc3589x_gpio 7 0x4>;
        };
 
        soc {
-               prcmu@80157000 {
-                       ab8500@5 {
-                               ab8500-gpio {
-                                       compatible = "stericsson,ab8500-gpio";
-                               };
-                       };
-               };
-
                i2c@80004000 {
                        tps61052@33 {
                                compatible = "tps61052";
                                reg = <0x33>;
                        };
-               };
 
-               i2c@80110000 {
-                       bu21013_tp@5c {
-                               reset-gpio = <&tc3589x_gpio 13 0x4>;
+                       tc3589x@42 {
+                               compatible = "tc3589x";
+                               reg = <0x42>;
+                               interrupt-parent = <&gpio6>;
+                               interrupts = <25 IRQ_TYPE_EDGE_RISING>;
+
+                               interrupt-controller;
+                               #interrupt-cells = <2>;
+
+                               tc3589x_gpio: tc3589x_gpio {
+                                       compatible = "tc3589x-gpio";
+                                       interrupts = <0 IRQ_TYPE_EDGE_RISING>;
+
+                                       interrupt-controller;
+                                       #interrupt-cells = <2>;
+                                       gpio-controller;
+                                       #gpio-cells = <2>;
+                               };
                        };
                };
 
diff --git a/arch/arm/boot/dts/ste-hrefv60plus-stuib.dts b/arch/arm/boot/dts/ste-hrefv60plus-stuib.dts
new file mode 100644 (file)
index 0000000..8c6a2de
--- /dev/null
@@ -0,0 +1,36 @@
+/*
+ * Copyright 2012 ST-Ericsson AB
+ *
+ * The code contained herein is licensed under the GNU General Public
+ * License. You may obtain a copy of the GNU General Public License
+ * Version 2 or later at the following locations:
+ *
+ * http://www.opensource.org/licenses/gpl-license.html
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * Device Tree for the HREF version 60 or later with the ST UIB
+ */
+
+/dts-v1/;
+#include "ste-hrefv60plus.dtsi"
+#include "ste-href-stuib.dtsi"
+
+/ {
+       model = "ST-Ericsson HREF (v60+) and ST UIB";
+       compatible = "st-ericsson,hrefv60+", "st-ericsson,u8500";
+
+       soc {
+               /* Reset line for the BU21013 touchscreen */
+               i2c@80110000 {
+                       /* Only one of these will be used */
+                       bu21013_tp@5c {
+                               touch-gpio = <&gpio2 20 0x4>;
+                               reset-gpio = <&gpio4 17 0x4>;
+                       };
+                       bu21013_tp@5d {
+                               touch-gpio = <&gpio2 20 0x4>;
+                               reset-gpio = <&gpio4 17 0x4>;
+                       };
+               };
+       };
+};
diff --git a/arch/arm/boot/dts/ste-hrefv60plus-tvk.dts b/arch/arm/boot/dts/ste-hrefv60plus-tvk.dts
new file mode 100644 (file)
index 0000000..d53cccd
--- /dev/null
@@ -0,0 +1,21 @@
+/*
+ * Copyright 2012 ST-Ericsson AB
+ *
+ * The code contained herein is licensed under the GNU General Public
+ * License. You may obtain a copy of the GNU General Public License
+ * Version 2 or later at the following locations:
+ *
+ * http://www.opensource.org/licenses/gpl-license.html
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * Device Tree for the HREF version 60 or later with the TVK1281618 UIB
+ */
+
+/dts-v1/;
+#include "ste-hrefv60plus.dtsi"
+#include "ste-href-tvk1281618.dtsi"
+
+/ {
+       model = "ST-Ericsson HREF (v60+) and TVK1281618 UIB";
+       compatible = "st-ericsson,hrefv60+", "st-ericsson,u8500";
+};
diff --git a/arch/arm/boot/dts/ste-hrefv60plus.dts b/arch/arm/boot/dts/ste-hrefv60plus.dts
deleted file mode 100644 (file)
index 6e52ebb..0000000
+++ /dev/null
@@ -1,210 +0,0 @@
-/*
- * Copyright 2012 ST-Ericsson AB
- *
- * The code contained herein is licensed under the GNU General Public
- * License. You may obtain a copy of the GNU General Public License
- * Version 2 or later at the following locations:
- *
- * http://www.opensource.org/licenses/gpl-license.html
- * http://www.gnu.org/copyleft/gpl.html
- */
-
-/dts-v1/;
-#include "ste-dbx5x0.dtsi"
-#include "ste-href.dtsi"
-#include "ste-stuib.dtsi"
-
-/ {
-       model = "ST-Ericsson HREF (v60+) platform with Device Tree";
-       compatible = "st-ericsson,hrefv60+", "st-ericsson,u8500";
-
-       gpio_keys {
-               button@1 {
-                       gpios = <&gpio6 25 0x4>;
-               };
-       };
-
-       soc {
-               i2c@80110000 {
-                       bu21013_tp@0x5c {
-                               reset-gpio = <&gpio4 15 0x4>;
-                       };
-               };
-
-               // External Micro SD slot
-               sdi0_per1@80126000 {
-                       arm,primecell-periphid = <0x10480180>;
-                       max-frequency = <100000000>;
-                       bus-width = <4>;
-                       mmc-cap-sd-highspeed;
-                       mmc-cap-mmc-highspeed;
-                       vmmc-supply = <&ab8500_ldo_aux3_reg>;
-
-                       cd-gpios  = <&tc3589x_gpio 3 0x4>;
-
-                       status = "okay";
-               };
-
-               // WLAN SDIO channel
-               sdi1_per2@80118000 {
-                       arm,primecell-periphid = <0x10480180>;
-                       max-frequency = <100000000>;
-                       bus-width = <4>;
-
-                       status = "okay";
-               };
-
-               // PoP:ed eMMC
-               sdi2_per3@80005000 {
-                       arm,primecell-periphid = <0x10480180>;
-                       max-frequency = <100000000>;
-                       bus-width = <8>;
-                       mmc-cap-mmc-highspeed;
-
-                       status = "okay";
-               };
-
-               // On-board eMMC
-               sdi4_per2@80114000 {
-                       arm,primecell-periphid = <0x10480180>;
-                       max-frequency = <100000000>;
-                       bus-width = <8>;
-                       mmc-cap-mmc-highspeed;
-                       vmmc-supply = <&ab8500_ldo_aux2_reg>;
-
-                       status = "okay";
-               };
-
-               prcmu@80157000 {
-                       db8500-prcmu-regulators {
-                               db8500_vape_reg: db8500_vape {
-                                       regulator-name = "db8500-vape";
-                               };
-
-                               db8500_varm_reg: db8500_varm {
-                                       regulator-name = "db8500-varm";
-                               };
-
-                               db8500_vmodem_reg: db8500_vmodem {
-                                       regulator-name = "db8500-vmodem";
-                               };
-
-                               db8500_vpll_reg: db8500_vpll {
-                                       regulator-name = "db8500-vpll";
-                               };
-
-                               db8500_vsmps1_reg: db8500_vsmps1 {
-                                       regulator-name = "db8500-vsmps1";
-                               };
-
-                               db8500_vsmps2_reg: db8500_vsmps2 {
-                                       regulator-name = "db8500-vsmps2";
-                               };
-
-                               db8500_vsmps3_reg: db8500_vsmps3 {
-                                       regulator-name = "db8500-vsmps3";
-                               };
-
-                               db8500_vrf1_reg: db8500_vrf1 {
-                                       regulator-name = "db8500-vrf1";
-                               };
-
-                               db8500_sva_mmdsp_reg: db8500_sva_mmdsp {
-                                       regulator-name = "db8500-sva-mmdsp";
-                               };
-
-                               db8500_sva_mmdsp_ret_reg: db8500_sva_mmdsp_ret {
-                                       regulator-name = "db8500-sva-mmdsp-ret";
-                               };
-
-                               db8500_sva_pipe_reg: db8500_sva_pipe {
-                                       regulator-name = "db8500_sva_pipe";
-                               };
-
-                               db8500_sia_mmdsp_reg: db8500_sia_mmdsp {
-                                       regulator-name = "db8500_sia_mmdsp";
-                               };
-
-                               db8500_sia_mmdsp_ret_reg: db8500_sia_mmdsp_ret {
-                                       regulator-name = "db8500-sia-mmdsp-ret";
-                               };
-
-                               db8500_sia_pipe_reg: db8500_sia_pipe {
-                                       regulator-name = "db8500-sia-pipe";
-                               };
-
-                               db8500_sga_reg: db8500_sga {
-                                       regulator-name = "db8500-sga";
-                               };
-
-                               db8500_b2r2_mcde_reg: db8500_b2r2_mcde {
-                                       regulator-name = "db8500-b2r2-mcde";
-                               };
-
-                               db8500_esram12_reg: db8500_esram12 {
-                                       regulator-name = "db8500-esram12";
-                               };
-
-                               db8500_esram12_ret_reg: db8500_esram12_ret {
-                                       regulator-name = "db8500-esram12-ret";
-                               };
-
-                               db8500_esram34_reg: db8500_esram34 {
-                                       regulator-name = "db8500-esram34";
-                               };
-
-                               db8500_esram34_ret_reg: db8500_esram34_ret {
-                                       regulator-name = "db8500-esram34-ret";
-                               };
-                       };
-
-                       ab8500 {
-                               ab8500-regulators {
-                                       ab8500_ldo_aux1_reg: ab8500_ldo_aux1 {
-                                               regulator-name = "V-DISPLAY";
-                                       };
-
-                                       ab8500_ldo_aux2_reg: ab8500_ldo_aux2 {
-                                               regulator-name = "V-eMMC1";
-                                       };
-
-                                       ab8500_ldo_aux3_reg: ab8500_ldo_aux3 {
-                                               regulator-name = "V-MMC-SD";
-                                       };
-
-                                       ab8500_ldo_intcore_reg: ab8500_ldo_intcore {
-                                               regulator-name = "V-INTCORE";
-                                       };
-
-                                       ab8500_ldo_tvout_reg: ab8500_ldo_tvout {
-                                               regulator-name = "V-TVOUT";
-                                       };
-
-                                       ab8500_ldo_usb_reg: ab8500_ldo_usb {
-                                               regulator-name = "dummy";
-                                       };
-
-                                       ab8500_ldo_audio_reg: ab8500_ldo_audio {
-                                               regulator-name = "V-AUD";
-                                       };
-
-                                       ab8500_ldo_anamic1_reg: ab8500_ldo_anamic1 {
-                                               regulator-name = "V-AMIC1";
-                                       };
-
-                                       ab8500_ldo_anamic2_reg: ab8500_ldo_anamic2 {
-                                               regulator-name = "V-AMIC2";
-                                       };
-
-                                       ab8500_ldo_dmic_reg: ab8500_ldo_dmic {
-                                               regulator-name = "V-DMIC";
-                                       };
-
-                                       ab8500_ldo_ana_reg: ab8500_ldo_ana {
-                                               regulator-name = "V-CSI/DSI";
-                                       };
-                               };
-                       };
-               };
-       };
-};
diff --git a/arch/arm/boot/dts/ste-hrefv60plus.dtsi b/arch/arm/boot/dts/ste-hrefv60plus.dtsi
new file mode 100644 (file)
index 0000000..aed511b
--- /dev/null
@@ -0,0 +1,70 @@
+/*
+ * Copyright 2012 ST-Ericsson AB
+ *
+ * The code contained herein is licensed under the GNU General Public
+ * License. You may obtain a copy of the GNU General Public License
+ * Version 2 or later at the following locations:
+ *
+ * http://www.opensource.org/licenses/gpl-license.html
+ * http://www.gnu.org/copyleft/gpl.html
+ */
+
+#include "ste-dbx5x0.dtsi"
+#include "ste-href.dtsi"
+
+/ {
+       model = "ST-Ericsson HREF (v60+) platform with Device Tree";
+       compatible = "st-ericsson,hrefv60+", "st-ericsson,u8500";
+
+       gpio_keys {
+               button@1 {
+                       gpios = <&gpio5 25 0x4>;
+               };
+       };
+
+       soc {
+               // External Micro SD slot
+               sdi0_per1@80126000 {
+                       arm,primecell-periphid = <0x10480180>;
+                       max-frequency = <100000000>;
+                       bus-width = <4>;
+                       mmc-cap-sd-highspeed;
+                       mmc-cap-mmc-highspeed;
+                       vmmc-supply = <&ab8500_ldo_aux3_reg>;
+
+                       cd-gpios  = <&gpio2 31 0x4>; // 95
+
+                       status = "okay";
+               };
+
+               // WLAN SDIO channel
+               sdi1_per2@80118000 {
+                       arm,primecell-periphid = <0x10480180>;
+                       max-frequency = <100000000>;
+                       bus-width = <4>;
+
+                       status = "okay";
+               };
+
+               // PoP:ed eMMC
+               sdi2_per3@80005000 {
+                       arm,primecell-periphid = <0x10480180>;
+                       max-frequency = <100000000>;
+                       bus-width = <8>;
+                       mmc-cap-mmc-highspeed;
+
+                       status = "okay";
+               };
+
+               // On-board eMMC
+               sdi4_per2@80114000 {
+                       arm,primecell-periphid = <0x10480180>;
+                       max-frequency = <100000000>;
+                       bus-width = <8>;
+                       mmc-cap-mmc-highspeed;
+                       vmmc-supply = <&ab8500_ldo_aux2_reg>;
+
+                       status = "okay";
+               };
+       };
+};
index 9169d3025f39ed5fd2475f43f0d3cd261e71894d..79425e3836cec4e957ef6e9b21dd7f70e83fa394 100644 (file)
                reg-names = "fsmc_regs", "nand_data", "nand_addr", "nand_cmd";
                clocks = <&hclksmc>;
                status = "okay";
+               timings = /bits/ 8 <0 0 0 0x10 0x0a 0>;
 
                partition@0 {
                label = "X-Loader(NAND)";
                pinctrl-0 = <&i2c0_default_mux>, <&i2c0_default_mode>;
 
                stw4811@2d {
-                          compatible = "st,stw4811";
-                          reg = <0x2d>;
+                       compatible = "st,stw4811";
+                       reg = <0x2d>;
+                       vmmc_regulator: vmmc {
+                               compatible = "st,stw481x-vmmc";
+                               regulator-name = "VMMC";
+                               regulator-min-microvolt = <1800000>;
+                               regulator-max-microvolt = <3300000>;
+                       };
                };
        };
 
                        cd-inverted;
                        pinctrl-names = "default";
                        pinctrl-0 = <&mmcsd_default_mux>, <&mmcsd_default_mode>;
+                       vmmc-supply = <&vmmc_regulator>;
                };
        };
 };
index f1fc128e249dd7d0dfbd337aeb40fc0dbdcc2c69..f0b39f835914beda02952a3cd9eb8860e38599ba 100644 (file)
                                vdd33a-supply = <&en_3v3_reg>;
                                vddvario-supply = <&db8500_vape_reg>;
 
-
                                reg-shift = <1>;
                                reg-io-width = <2>;
                                smsc,force-internal-phy;
                                smsc,irq-active-high;
                                smsc,irq-push-pull;
+
+                               clocks = <&prcc_pclk 3 0>;
                        };
                };
 
                };
 
                prcmu@80157000 {
-                       db8500-prcmu-regulators {
-                               db8500_vape_reg: db8500_vape {
-                                       regulator-name = "db8500-vape";
-                               };
-
-                               db8500_varm_reg: db8500_varm {
-                                       regulator-name = "db8500-varm";
-                               };
-
-                               db8500_vmodem_reg: db8500_vmodem {
-                                       regulator-name = "db8500-vmodem";
-                               };
-
-                               db8500_vpll_reg: db8500_vpll {
-                                       regulator-name = "db8500-vpll";
-                               };
-
-                               db8500_vsmps1_reg: db8500_vsmps1 {
-                                       regulator-name = "db8500-vsmps1";
-                               };
-
-                               db8500_vsmps2_reg: db8500_vsmps2 {
-                                       regulator-name = "db8500-vsmps2";
-                               };
-
-                               db8500_vsmps3_reg: db8500_vsmps3 {
-                                       regulator-name = "db8500-vsmps3";
-                               };
-
-                               db8500_vrf1_reg: db8500_vrf1 {
-                                       regulator-name = "db8500-vrf1";
-                               };
-
-                               db8500_sva_mmdsp_reg: db8500_sva_mmdsp {
-                                       regulator-name = "db8500-sva-mmdsp";
-                               };
-
-                               db8500_sva_mmdsp_ret_reg: db8500_sva_mmdsp_ret {
-                                       regulator-name = "db8500-sva-mmdsp-ret";
-                               };
-
-                               db8500_sva_pipe_reg: db8500_sva_pipe {
-                                       regulator-name = "db8500_sva_pipe";
-                               };
-
-                               db8500_sia_mmdsp_reg: db8500_sia_mmdsp {
-                                       regulator-name = "db8500_sia_mmdsp";
-                               };
-
-                               db8500_sia_mmdsp_ret_reg: db8500_sia_mmdsp_ret {
-                                       regulator-name = "db8500-sia-mmdsp-ret";
-                               };
-
-                               db8500_sia_pipe_reg: db8500_sia_pipe {
-                                       regulator-name = "db8500-sia-pipe";
-                               };
-
-                               db8500_sga_reg: db8500_sga {
-                                       regulator-name = "db8500-sga";
-                               };
-
-                               db8500_b2r2_mcde_reg: db8500_b2r2_mcde {
-                                       regulator-name = "db8500-b2r2-mcde";
-                               };
-
-                               db8500_esram12_reg: db8500_esram12 {
-                                       regulator-name = "db8500-esram12";
-                               };
-
-                               db8500_esram12_ret_reg: db8500_esram12_ret {
-                                       regulator-name = "db8500-esram12-ret";
-                               };
-
-                               db8500_esram34_reg: db8500_esram34 {
-                                       regulator-name = "db8500-esram34";
-                               };
-
-                               db8500_esram34_ret_reg: db8500_esram34_ret {
-                                       regulator-name = "db8500-esram34-ret";
-                               };
+                       cpufreq {
+                               status = "okay";
                        };
 
                        thermal@801573c0 {
index 60230288884b663ae8a17a32d3e1bda66ba4125b..cb5ec23b03a71b59e8fac5f3df740f3eaa730f32 100644 (file)
@@ -1,5 +1,6 @@
 /dts-v1/;
 
+#include <dt-bindings/input/input.h>
 #include "tegra114.dtsi"
 
 / {
                        realtek,ldo1-en-gpios =
                                <&gpio TEGRA_GPIO(V, 3) GPIO_ACTIVE_HIGH>;
                };
+
+               temperature-sensor@4c {
+                       compatible = "onnn,nct1008";
+                       reg = <0x4c>;
+                       vcc-supply = <&palmas_ldo6_reg>;
+                       interrupt-parent = <&gpio>;
+                       interrupts = <TEGRA_GPIO(O, 4) IRQ_TYPE_LEVEL_LOW>;
+               };
        };
 
        i2c@7000d000 {
                                                regulator-max-microvolt = <1800000>;
                                        };
 
-                                       ldo6 {
+                                       palmas_ldo6_reg: ldo6 {
                                                regulator-name = "vdd-sensor-2v85";
                                                regulator-min-microvolt = <2850000>;
                                                regulator-max-microvolt = <2850000>;
                                interrupt-parent = <&palmas>;
                                interrupts = <8 0>;
                        };
+
+                       pinmux {
+                               compatible = "ti,tps65913-pinctrl";
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&palmas_default>;
+
+                               palmas_default: pinmux {
+                                       pin_gpio6 {
+                                               pins = "gpio6";
+                                               function = "gpio";
+                                       };
+                               };
+                       };
                };
        };
 
                home {
                        label = "Home";
                        gpios = <&gpio TEGRA_GPIO(I, 5) GPIO_ACTIVE_LOW>;
-                       linux,code = <102>; /* KEY_HOME */
+                       linux,code = <KEY_HOME>;
                };
 
                power {
                        label = "Power";
                        gpios = <&gpio TEGRA_GPIO(Q, 0) GPIO_ACTIVE_LOW>;
-                       linux,code = <116>; /* KEY_POWER */
+                       linux,code = <KEY_POWER>;
                        gpio-key,wakeup;
                };
 
                volume_down {
                        label = "Volume Down";
                        gpios = <&gpio TEGRA_GPIO(R, 1) GPIO_ACTIVE_LOW>;
-                       linux,code = <114>; /* KEY_VOLUMEDOWN */
+                       linux,code = <KEY_VOLUMEDOWN>;
                };
 
                volume_up {
                        label = "Volume Up";
                        gpios = <&gpio TEGRA_GPIO(R, 2) GPIO_ACTIVE_LOW>;
-                       linux,code = <115>; /* KEY_VOLUMEUP */
+                       linux,code = <KEY_VOLUMEUP>;
                };
        };
 
diff --git a/arch/arm/boot/dts/tegra124-venice2.dts b/arch/arm/boot/dts/tegra124-venice2.dts
new file mode 100644 (file)
index 0000000..431d67a
--- /dev/null
@@ -0,0 +1,27 @@
+/dts-v1/;
+
+#include "tegra124.dtsi"
+
+/ {
+       model = "NVIDIA Tegra124 Venice2";
+       compatible = "nvidia,venice2", "nvidia,tegra124";
+
+       memory {
+               reg = <0x80000000 0x80000000>;
+       };
+
+       serial@70006000 {
+               status = "okay";
+       };
+
+       pmc@7000e400 {
+               nvidia,invert-interrupt;
+               nvidia,suspend-mode = <1>;
+               nvidia,cpu-pwr-good-time = <500>;
+               nvidia,cpu-pwr-off-time = <300>;
+               nvidia,core-pwr-good-time = <641 3845>;
+               nvidia,core-pwr-off-time = <61036>;
+               nvidia,core-power-req-active-high;
+               nvidia,sys-clock-req-active-high;
+       };
+};
diff --git a/arch/arm/boot/dts/tegra124.dtsi b/arch/arm/boot/dts/tegra124.dtsi
new file mode 100644 (file)
index 0000000..b741300
--- /dev/null
@@ -0,0 +1,149 @@
+#include <dt-bindings/gpio/tegra-gpio.h>
+#include <dt-bindings/interrupt-controller/arm-gic.h>
+
+#include "skeleton.dtsi"
+
+/ {
+       compatible = "nvidia,tegra124";
+       interrupt-parent = <&gic>;
+
+       gic: interrupt-controller@50041000 {
+               compatible = "arm,cortex-a15-gic";
+               #interrupt-cells = <3>;
+               interrupt-controller;
+               reg = <0x50041000 0x1000>,
+                     <0x50042000 0x1000>,
+                     <0x50044000 0x2000>,
+                     <0x50046000 0x2000>;
+               interrupts = <GIC_PPI 9
+                       (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>;
+       };
+
+       timer@60005000 {
+               compatible = "nvidia,tegra124-timer", "nvidia,tegra20-timer";
+               reg = <0x60005000 0x400>;
+               interrupts = <GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 1 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 41 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 42 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 121 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 122 IRQ_TYPE_LEVEL_HIGH>;
+       };
+
+       gpio: gpio@6000d000 {
+               compatible = "nvidia,tegra124-gpio", "nvidia,tegra30-gpio";
+               reg = <0x6000d000 0x1000>;
+               interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 33 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 34 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 35 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 55 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 87 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 89 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 125 IRQ_TYPE_LEVEL_HIGH>;
+               #gpio-cells = <2>;
+               gpio-controller;
+               #interrupt-cells = <2>;
+               interrupt-controller;
+       };
+
+       /*
+        * There are two serial driver i.e. 8250 based simple serial
+        * driver and APB DMA based serial driver for higher baudrate
+        * and performace. To enable the 8250 based driver, the compatible
+        * is "nvidia,tegra124-uart", "nvidia,tegra20-uart" and to enable
+        * the APB DMA based serial driver, the comptible is
+        * "nvidia,tegra124-hsuart", "nvidia,tegra30-hsuart".
+        */
+       serial@70006000 {
+               compatible = "nvidia,tegra124-uart", "nvidia,tegra20-uart";
+               reg = <0x70006000 0x40>;
+               reg-shift = <2>;
+               interrupts = <GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH>;
+               status = "disabled";
+       };
+
+       serial@70006040 {
+               compatible = "nvidia,tegra124-uart", "nvidia,tegra20-uart";
+               reg = <0x70006040 0x40>;
+               reg-shift = <2>;
+               interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>;
+               status = "disabled";
+       };
+
+       serial@70006200 {
+               compatible = "nvidia,tegra124-uart", "nvidia,tegra20-uart";
+               reg = <0x70006200 0x40>;
+               reg-shift = <2>;
+               interrupts = <GIC_SPI 46 IRQ_TYPE_LEVEL_HIGH>;
+               status = "disabled";
+       };
+
+       serial@70006300 {
+               compatible = "nvidia,tegra124-uart", "nvidia,tegra20-uart";
+               reg = <0x70006300 0x40>;
+               reg-shift = <2>;
+               interrupts = <GIC_SPI 90 IRQ_TYPE_LEVEL_HIGH>;
+               status = "disabled";
+       };
+
+       serial@70006400 {
+               compatible = "nvidia,tegra124-uart", "nvidia,tegra20-uart";
+               reg = <0x70006400 0x40>;
+               reg-shift = <2>;
+               interrupts = <GIC_SPI 91 IRQ_TYPE_LEVEL_HIGH>;
+               status = "disabled";
+       };
+
+       rtc@7000e000 {
+               compatible = "nvidia,tegra124-rtc", "nvidia,tegra20-rtc";
+               reg = <0x7000e000 0x100>;
+               interrupts = <GIC_SPI 2 IRQ_TYPE_LEVEL_HIGH>;
+       };
+
+       pmc@7000e400 {
+               compatible = "nvidia,tegra124-pmc";
+               reg = <0x7000e400 0x400>;
+       };
+
+       cpus {
+               #address-cells = <1>;
+               #size-cells = <0>;
+
+               cpu@0 {
+                       device_type = "cpu";
+                       compatible = "arm,cortex-a15";
+                       reg = <0>;
+               };
+
+               cpu@1 {
+                       device_type = "cpu";
+                       compatible = "arm,cortex-a15";
+                       reg = <1>;
+               };
+
+               cpu@2 {
+                       device_type = "cpu";
+                       compatible = "arm,cortex-a15";
+                       reg = <2>;
+               };
+
+               cpu@3 {
+                       device_type = "cpu";
+                       compatible = "arm,cortex-a15";
+                       reg = <3>;
+               };
+       };
+
+       timer {
+               compatible = "arm,armv7-timer";
+               interrupts = <GIC_PPI 13
+                               (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,
+                            <GIC_PPI 14
+                               (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,
+                            <GIC_PPI 11
+                               (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,
+                            <GIC_PPI 10
+                               (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>;
+       };
+};
index e19dbf238e5c8498878dc56492018585190830ce..5ea7dfa4d9fa5de680ead80110b9c9ad31737490 100644 (file)
                        };
                };
 
-               nct1008 {
+               temperature-sensor@4c {
                        compatible = "onnn,nct1008";
                        reg = <0x4c>;
+                       vcc-supply = <&sys_3v3_reg>;
                        interrupt-parent = <&gpio>;
                        interrupts = <TEGRA_GPIO(CC, 2) IRQ_TYPE_LEVEL_LOW>;
                };
index 0022c127e1d956c42badc2970887fca3b9d7511b..2bd55cfd88adcb4d3e525ae45ea471a6376a8e34 100644 (file)
                gr3d {
                        compatible = "nvidia,tegra30-gr3d";
                        reg = <0x54180000 0x00040000>;
-                       clocks = <&tegra_car 24 &tegra_car 98>;
+                       clocks = <&tegra_car TEGRA30_CLK_GR3D
+                                 &tegra_car TEGRA30_CLK_GR3D2>;
                        clock-names = "3d", "3d2";
                };
 
                dc@54200000 {
-                       compatible = "nvidia,tegra30-dc";
+                       compatible = "nvidia,tegra30-dc", "nvidia,tegra20-dc";
                        reg = <0x54200000 0x00040000>;
                        interrupts = <GIC_SPI 73 IRQ_TYPE_LEVEL_HIGH>;
                        clocks = <&tegra_car TEGRA30_CLK_DISP1>,
diff --git a/arch/arm/boot/dts/twl6030_omap4.dtsi b/arch/arm/boot/dts/twl6030_omap4.dtsi
new file mode 100644 (file)
index 0000000..a4fa570
--- /dev/null
@@ -0,0 +1,38 @@
+/*
+ * Copyright (C) 2013 Texas Instruments Incorporated - http://www.ti.com/
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+&twl {
+       /*
+        * On most OMAP4 platforms, the twl6030 IRQ line is connected
+        * to the SYS_NIRQ1 line on OMAP and the twl6030 MSECURE line is
+        * connected to the fref_clk0_out.sys_drm_msecure line.
+        * Therefore, configure the defaults for the SYS_NIRQ1 and
+        * fref_clk0_out.sys_drm_msecure pins here.
+        */
+       pinctrl-names = "default";
+       pinctrl-0 = <
+               &twl6030_pins
+               &twl6030_wkup_pins
+       >;
+};
+
+&omap4_pmx_wkup {
+       twl6030_wkup_pins: pinmux_twl6030_wkup_pins {
+               pinctrl-single,pins = <
+                       0x14 (PIN_OUTPUT | MUX_MODE2)           /* fref_clk0_out.sys_drm_msecure */
+               >;
+       };
+};
+
+&omap4_pmx_core {
+       twl6030_pins: pinmux_twl6030_pins {
+               pinctrl-single,pins = <
+                       0x15e (WAKEUP_EN | PIN_INPUT_PULLUP | MUX_MODE0)        /* sys_nirq1.sys_nirq1 */
+               >;
+       };
+};
index 5c8584c4944d780f90bcedb40b8224fb60fa364f..4bdc41622c36686df868e2134d6453fe60684b5b 100644 (file)
@@ -6,7 +6,6 @@ obj-y                           += firmware.o
 
 obj-$(CONFIG_ICST)             += icst.o
 obj-$(CONFIG_SA1111)           += sa1111.o
-obj-$(CONFIG_PCI_HOST_VIA82C505) += via82c505.o
 obj-$(CONFIG_DMABOUNCE)                += dmabounce.o
 obj-$(CONFIG_SHARP_LOCOMO)     += locomo.o
 obj-$(CONFIG_SHARP_PARAM)      += sharpsl_param.o
diff --git a/arch/arm/common/via82c505.c b/arch/arm/common/via82c505.c
deleted file mode 100644 (file)
index 6cb362e..0000000
+++ /dev/null
@@ -1,83 +0,0 @@
-#include <linux/kernel.h>
-#include <linux/pci.h>
-#include <linux/interrupt.h>
-#include <linux/mm.h>
-#include <linux/init.h>
-#include <linux/ioport.h>
-#include <linux/io.h>
-
-
-#include <asm/mach/pci.h>
-
-#define MAX_SLOTS              7
-
-#define CONFIG_CMD(bus, devfn, where)   (0x80000000 | (bus->number << 16) | (devfn << 8) | (where & ~3))
-
-static int
-via82c505_read_config(struct pci_bus *bus, unsigned int devfn, int where,
-                     int size, u32 *value)
-{
-       outl(CONFIG_CMD(bus,devfn,where),0xCF8);
-       switch (size) {
-       case 1:
-               *value=inb(0xCFC + (where&3));
-               break;
-       case 2:
-               *value=inw(0xCFC + (where&2));
-               break;
-       case 4:
-               *value=inl(0xCFC);
-               break;
-       }
-       return PCIBIOS_SUCCESSFUL;
-}
-
-static int
-via82c505_write_config(struct pci_bus *bus, unsigned int devfn, int where,
-                      int size, u32 value)
-{
-       outl(CONFIG_CMD(bus,devfn,where),0xCF8);
-       switch (size) {
-       case 1:
-               outb(value, 0xCFC + (where&3));
-               break;
-       case 2:
-               outw(value, 0xCFC + (where&2));
-               break;
-       case 4:
-               outl(value, 0xCFC);
-               break;
-       }
-       return PCIBIOS_SUCCESSFUL;
-}
-
-struct pci_ops via82c505_ops = {
-       .read   = via82c505_read_config,
-       .write  = via82c505_write_config,
-};
-
-void __init via82c505_preinit(void)
-{
-       printk(KERN_DEBUG "PCI: VIA 82c505\n");
-       if (!request_region(0xA8,2,"via config")) {
-               printk(KERN_WARNING"VIA 82c505: Unable to request region 0xA8\n");
-               return;
-       }
-       if (!request_region(0xCF8,8,"pci config")) {
-               printk(KERN_WARNING"VIA 82c505: Unable to request region 0xCF8\n");
-               release_region(0xA8, 2);
-               return;
-       }
-
-       /* Enable compatible Mode */
-       outb(0x96,0xA8);
-       outb(0x18,0xA9);
-       outb(0x93,0xA8);
-       outb(0xd0,0xA9);
-
-}
-
-int __init via82c505_setup(int nr, struct pci_sys_data *sys)
-{
-       return (nr == 0);
-}
index e7e94948d19478729aeb60a8167c6a7cf2a8e7a7..b38cd107f82dfe5b1efffb4075e04fc39f9f41c5 100644 (file)
@@ -91,6 +91,10 @@ CONFIG_VIDEO_RCAR_VIN=y
 CONFIG_VIDEO_ML86V7667=y
 CONFIG_SPI=y
 CONFIG_SPI_SH_HSPI=y
+CONFIG_SOUND=y
+CONFIG_SND=y
+CONFIG_SND_SOC=y
+CONFIG_SND_SOC_RCAR=y
 CONFIG_USB=y
 CONFIG_USB_ANNOUNCE_NEW_DEVICES=y
 CONFIG_USB_EHCI_HCD=y
index a8314c3ee84d554b3cbecb3fbb9b1cc4dd450c9a..5bae1955759125f954284ccf67b62e7dace5ba49 100644 (file)
@@ -1,15 +1,17 @@
-CONFIG_EXPERIMENTAL=y
 CONFIG_SYSVIPC=y
-CONFIG_TINY_RCU=y
+CONFIG_NO_HZ=y
+CONFIG_HIGH_RES_TIMERS=y
 CONFIG_IKCONFIG=y
 CONFIG_IKCONFIG_PROC=y
 CONFIG_LOG_BUF_SHIFT=14
 CONFIG_BLK_DEV_INITRD=y
 CONFIG_MODULES=y
 CONFIG_MODULE_UNLOAD=y
+CONFIG_PARTITION_ADVANCED=y
 CONFIG_ARCH_INTEGRATOR=y
 CONFIG_ARCH_INTEGRATOR_AP=y
 CONFIG_ARCH_INTEGRATOR_CP=y
+CONFIG_INTEGRATOR_IMPD1=y
 CONFIG_CPU_ARM720T=y
 CONFIG_CPU_ARM920T=y
 CONFIG_CPU_ARM922T=y
@@ -18,12 +20,9 @@ CONFIG_CPU_ARM1020=y
 CONFIG_CPU_ARM1022=y
 CONFIG_CPU_ARM1026=y
 CONFIG_PCI=y
-CONFIG_NO_HZ=y
-CONFIG_HIGH_RES_TIMERS=y
 CONFIG_PREEMPT=y
 CONFIG_AEABI=y
-CONFIG_LEDS=y
-CONFIG_LEDS_CPU=y
+# CONFIG_ATAGS is not set
 CONFIG_ZBOOT_ROM_TEXT=0x0
 CONFIG_ZBOOT_ROM_BSS=0x0
 CONFIG_CMDLINE="console=ttyAM0,38400n8 root=/dev/nfs ip=bootp"
@@ -44,24 +43,20 @@ CONFIG_IP_PNP_BOOTP=y
 CONFIG_MTD=y
 CONFIG_MTD_CMDLINE_PARTS=y
 CONFIG_MTD_AFS_PARTS=y
-CONFIG_MTD_CHAR=y
 CONFIG_MTD_BLOCK=y
 CONFIG_MTD_CFI=y
 CONFIG_MTD_CFI_ADV_OPTIONS=y
 CONFIG_MTD_CFI_INTELEXT=y
 CONFIG_MTD_PHYSMAP=y
+CONFIG_PROC_DEVICETREE=y
 CONFIG_BLK_DEV_LOOP=y
 CONFIG_BLK_DEV_RAM=y
 CONFIG_BLK_DEV_RAM_SIZE=8192
 CONFIG_NETDEVICES=y
-CONFIG_NET_ETHERNET=y
-CONFIG_NET_PCI=y
 CONFIG_E100=y
 CONFIG_SMC91X=y
 # CONFIG_KEYBOARD_ATKBD is not set
 # CONFIG_SERIO_SERPORT is not set
-CONFIG_SERIAL_AMBA_PL010=y
-CONFIG_SERIAL_AMBA_PL010_CONSOLE=y
 CONFIG_FB=y
 CONFIG_FB_MODE_HELPERS=y
 CONFIG_FB_ARMCLCD=y
@@ -71,19 +66,23 @@ CONFIG_FB_MATROX_MYSTIQUE=y
 # CONFIG_VGA_CONSOLE is not set
 CONFIG_MMC=y
 CONFIG_MMC_ARMMMCI=y
+CONFIG_NEW_LEDS=y
+CONFIG_LEDS_CLASS=y
+CONFIG_LEDS_TRIGGERS=y
+CONFIG_LEDS_TRIGGER_HEARTBEAT=y
+CONFIG_LEDS_TRIGGER_CPU=y
 CONFIG_RTC_CLASS=y
 CONFIG_RTC_DRV_PL030=y
+CONFIG_COMMON_CLK_DEBUG=y
 CONFIG_EXT2_FS=y
 CONFIG_VFAT_FS=y
 CONFIG_TMPFS=y
 CONFIG_JFFS2_FS=y
 CONFIG_CRAMFS=y
 CONFIG_NFS_FS=y
-CONFIG_NFS_V3=y
 CONFIG_ROOT_NFS=y
 CONFIG_NFSD=y
 CONFIG_NFSD_V3=y
-CONFIG_PARTITION_ADVANCED=y
 CONFIG_NLS_CODEPAGE_437=y
 CONFIG_NLS_ISO8859_1=y
 CONFIG_MAGIC_SYSRQ=y
index 1f36b823905f1d6e1c16eeb9e0554efc1678bcf0..9943e5da74f18c8ffe89168829eb3326d0de1b47 100644 (file)
@@ -123,7 +123,9 @@ CONFIG_SERIAL_OF_PLATFORM=y
 CONFIG_I2C=y
 # CONFIG_I2C_COMPAT is not set
 CONFIG_I2C_CHARDEV=y
+CONFIG_I2C_DAVINCI=y
 CONFIG_SPI=y
+CONFIG_SPI_DAVINCI=y
 CONFIG_SPI_SPIDEV=y
 # CONFIG_HWMON is not set
 CONFIG_WATCHDOG=y
diff --git a/arch/arm/configs/koelsch_defconfig b/arch/arm/configs/koelsch_defconfig
new file mode 100644 (file)
index 0000000..825c16d
--- /dev/null
@@ -0,0 +1,54 @@
+CONFIG_SYSVIPC=y
+CONFIG_NO_HZ=y
+CONFIG_IKCONFIG=y
+CONFIG_IKCONFIG_PROC=y
+CONFIG_LOG_BUF_SHIFT=16
+CONFIG_CC_OPTIMIZE_FOR_SIZE=y
+CONFIG_SYSCTL_SYSCALL=y
+CONFIG_EMBEDDED=y
+CONFIG_PERF_EVENTS=y
+CONFIG_SLAB=y
+# CONFIG_BLOCK is not set
+CONFIG_ARCH_SHMOBILE=y
+CONFIG_ARCH_R8A7791=y
+CONFIG_MACH_KOELSCH=y
+# CONFIG_SWP_EMULATE is not set
+CONFIG_CPU_BPREDICT_DISABLE=y
+CONFIG_PL310_ERRATA_588369=y
+CONFIG_ARM_ERRATA_754322=y
+CONFIG_SMP=y
+CONFIG_SCHED_MC=y
+CONFIG_NR_CPUS=8
+CONFIG_AEABI=y
+CONFIG_ZBOOT_ROM_TEXT=0x0
+CONFIG_ZBOOT_ROM_BSS=0x0
+CONFIG_ARM_APPENDED_DTB=y
+CONFIG_KEXEC=y
+CONFIG_AUTO_ZRELADDR=y
+CONFIG_VFP=y
+CONFIG_NEON=y
+# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
+CONFIG_PM_RUNTIME=y
+CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
+# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
+# CONFIG_INPUT_MOUSE is not set
+# CONFIG_LEGACY_PTYS is not set
+CONFIG_SERIAL_SH_SCI=y
+CONFIG_SERIAL_SH_SCI_NR_UARTS=20
+CONFIG_SERIAL_SH_SCI_CONSOLE=y
+# CONFIG_HWMON is not set
+CONFIG_THERMAL=y
+CONFIG_RCAR_THERMAL=y
+# CONFIG_HID is not set
+# CONFIG_USB_SUPPORT is not set
+CONFIG_NEW_LEDS=y
+CONFIG_LEDS_CLASS=y
+# CONFIG_IOMMU_SUPPORT is not set
+# CONFIG_DNOTIFY is not set
+# CONFIG_INOTIFY_USER is not set
+CONFIG_TMPFS=y
+CONFIG_CONFIGFS_FS=y
+# CONFIG_MISC_FILESYSTEMS is not set
+# CONFIG_ENABLE_WARN_DEPRECATED is not set
+# CONFIG_ENABLE_MUST_CHECK is not set
+# CONFIG_ARM_UNWIND is not set
index e777ef22b8016559a71ef6ac4d59dec9eb29918b..35bff5e0d57a26b799e4554497859dcf1f029e9b 100644 (file)
@@ -89,6 +89,8 @@ CONFIG_THERMAL=y
 CONFIG_RCAR_THERMAL=y
 CONFIG_REGULATOR=y
 CONFIG_REGULATOR_FIXED_VOLTAGE=y
+CONFIG_DRM=y
+CONFIG_DRM_RCAR_DU=y
 # CONFIG_USB_SUPPORT is not set
 CONFIG_MMC=y
 CONFIG_MMC_SDHI=y
index 000e9205b2b93ca0aed76dbcbf60f6eb815524b6..5cc6360340b1c683dfe5b31c15a54c61e457963a 100644 (file)
@@ -92,6 +92,8 @@ CONFIG_SOC_CAMERA=y
 CONFIG_VIDEO_RCAR_VIN=y
 # CONFIG_MEDIA_SUBDRV_AUTOSELECT is not set
 CONFIG_VIDEO_ADV7180=y
+CONFIG_DRM=y
+CONFIG_DRM_RCAR_DU=y
 CONFIG_USB=y
 CONFIG_USB_RCAR_PHY=y
 CONFIG_MMC=y
index 254cf0539439b0ab87bb44dcd62e2d24c8120f0c..98a50c309b90ad72b710fdeddc4117208fa6c29c 100644 (file)
@@ -1,14 +1,13 @@
-CONFIG_EXPERIMENTAL=y
 CONFIG_SYSVIPC=y
 CONFIG_POSIX_MQUEUE=y
+CONFIG_NO_HZ=y
+CONFIG_HIGH_RES_TIMERS=y
 CONFIG_BSD_PROCESS_ACCT=y
 CONFIG_IKCONFIG=y
 CONFIG_IKCONFIG_PROC=y
 CONFIG_LOG_BUF_SHIFT=16
 CONFIG_BLK_DEV_INITRD=y
 CONFIG_EXPERT=y
-# CONFIG_SYSCTL_SYSCALL is not set
-CONFIG_KALLSYMS_EXTRA_PASS=y
 CONFIG_SLAB=y
 CONFIG_PROFILING=y
 CONFIG_OPROFILE=y
@@ -20,22 +19,21 @@ CONFIG_MODULE_FORCE_UNLOAD=y
 CONFIG_MODVERSIONS=y
 CONFIG_MODULE_SRCVERSION_ALL=y
 # CONFIG_BLK_DEV_BSG is not set
+CONFIG_PARTITION_ADVANCED=y
 CONFIG_ARCH_MULTI_V6=y
-CONFIG_ARCH_OMAP2PLUS=y
+CONFIG_OMAP_RESET_CLOCKS=y
+CONFIG_OMAP_MUX_DEBUG=y
 CONFIG_ARCH_OMAP2=y
 CONFIG_ARCH_OMAP3=y
 CONFIG_ARCH_OMAP4=y
+CONFIG_SOC_OMAP5=y
 CONFIG_SOC_AM33XX=y
-CONFIG_OMAP_RESET_CLOCKS=y
-CONFIG_OMAP_MUX_DEBUG=y
-CONFIG_ARCH_VEXPRESS_CA9X4=y
+CONFIG_SOC_DRA7XX=y
 CONFIG_ARM_THUMBEE=y
 CONFIG_ARM_ERRATA_411920=y
-CONFIG_NO_HZ=y
-CONFIG_HIGH_RES_TIMERS=y
 CONFIG_SMP=y
 CONFIG_NR_CPUS=2
-CONFIG_LEDS=y
+CONFIG_CMA=y
 CONFIG_ZBOOT_ROM_TEXT=0x0
 CONFIG_ZBOOT_ROM_BSS=0x0
 CONFIG_ARM_APPENDED_DTB=y
@@ -61,8 +59,6 @@ CONFIG_IP_PNP_RARP=y
 # CONFIG_IPV6 is not set
 CONFIG_NETFILTER=y
 CONFIG_CAN=m
-CONFIG_CAN_RAW=m
-CONFIG_CAN_BCM=m
 CONFIG_CAN_C_CAN=m
 CONFIG_CAN_C_CAN_PLATFORM=m
 CONFIG_BT=m
@@ -77,14 +73,13 @@ CONFIG_MAC80211=m
 CONFIG_MAC80211_RC_PID=y
 CONFIG_MAC80211_RC_DEFAULT_PID=y
 CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
-CONFIG_CMA=y
-CONFIG_DMA_CMA=y
-CONFIG_CONNECTOR=y
 CONFIG_DEVTMPFS=y
 CONFIG_DEVTMPFS_MOUNT=y
+CONFIG_DMA_CMA=y
+CONFIG_OMAP_OCP2SCP=y
+CONFIG_CONNECTOR=y
 CONFIG_MTD=y
 CONFIG_MTD_CMDLINE_PARTS=y
-CONFIG_MTD_CHAR=y
 CONFIG_MTD_BLOCK=y
 CONFIG_MTD_OOPS=y
 CONFIG_MTD_CFI=y
@@ -98,32 +93,40 @@ CONFIG_MTD_UBI=y
 CONFIG_BLK_DEV_LOOP=y
 CONFIG_BLK_DEV_RAM=y
 CONFIG_BLK_DEV_RAM_SIZE=16384
-CONFIG_SENSORS_LIS3LV02D=m
 CONFIG_SENSORS_TSL2550=m
-CONFIG_SENSORS_LIS3_I2C=m
 CONFIG_BMP085_I2C=m
+CONFIG_SENSORS_LIS3_I2C=m
 CONFIG_SCSI=y
 CONFIG_BLK_DEV_SD=y
 CONFIG_SCSI_MULTI_LUN=y
 CONFIG_SCSI_SCAN_ASYNC=y
 CONFIG_MD=y
 CONFIG_NETDEVICES=y
-CONFIG_SMSC_PHY=y
-CONFIG_NET_ETHERNET=y
-CONFIG_SMC91X=y
-CONFIG_SMSC911X=y
 CONFIG_KS8851=y
 CONFIG_KS8851_MLL=y
-CONFIG_LIBERTAS=m
-CONFIG_LIBERTAS_USB=m
-CONFIG_LIBERTAS_SDIO=m
-CONFIG_LIBERTAS_DEBUG=y
+CONFIG_SMC91X=y
+CONFIG_SMSC911X=y
+CONFIG_TI_CPSW=y
+CONFIG_AT803X_PHY=y
+CONFIG_SMSC_PHY=y
 CONFIG_USB_USBNET=y
 CONFIG_USB_NET_SMSC95XX=y
 CONFIG_USB_ALI_M5632=y
 CONFIG_USB_AN2720=y
 CONFIG_USB_EPSON2888=y
 CONFIG_USB_KC2190=y
+CONFIG_LIBERTAS=m
+CONFIG_LIBERTAS_USB=m
+CONFIG_LIBERTAS_SDIO=m
+CONFIG_LIBERTAS_DEBUG=y
+CONFIG_WL_TI=y
+CONFIG_WL12XX=m
+CONFIG_WL18XX=m
+CONFIG_WLCORE_SPI=m
+CONFIG_WLCORE_SDIO=m
+CONFIG_MWIFIEX=m
+CONFIG_MWIFIEX_SDIO=m
+CONFIG_MWIFIEX_USB=m
 CONFIG_INPUT_JOYDEV=y
 CONFIG_INPUT_EVDEV=y
 CONFIG_KEYBOARD_GPIO=y
@@ -133,7 +136,6 @@ CONFIG_INPUT_TOUCHSCREEN=y
 CONFIG_TOUCHSCREEN_ADS7846=y
 CONFIG_INPUT_MISC=y
 CONFIG_INPUT_TWL4030_PWRBUTTON=y
-CONFIG_VT_HW_CONSOLE_BINDING=y
 # CONFIG_LEGACY_PTYS is not set
 CONFIG_SERIAL_8250=y
 CONFIG_SERIAL_8250_CONSOLE=y
@@ -143,8 +145,7 @@ CONFIG_SERIAL_8250_MANY_PORTS=y
 CONFIG_SERIAL_8250_SHARE_IRQ=y
 CONFIG_SERIAL_8250_DETECT_IRQ=y
 CONFIG_SERIAL_8250_RSA=y
-CONFIG_SERIAL_AMBA_PL011=y
-CONFIG_SERIAL_AMBA_PL011_CONSOLE=y
+CONFIG_SERIAL_OF_PLATFORM=y
 CONFIG_SERIAL_OMAP=y
 CONFIG_SERIAL_OMAP_CONSOLE=y
 CONFIG_HW_RANDOM=y
@@ -158,31 +159,31 @@ CONFIG_GPIO_TWL4030=y
 CONFIG_W1=y
 CONFIG_POWER_SUPPLY=y
 CONFIG_SENSORS_LM75=m
-CONFIG_WATCHDOG=y
 CONFIG_THERMAL=y
-CONFIG_THERMAL_HWMON=y
-CONFIG_THERMAL_DEFAULT_GOV_STEP_WISE=y
 CONFIG_THERMAL_GOV_FAIR_SHARE=y
-CONFIG_THERMAL_GOV_STEP_WISE=y
 CONFIG_THERMAL_GOV_USER_SPACE=y
-CONFIG_CPU_THERMAL=y
+CONFIG_TI_SOC_THERMAL=y
+CONFIG_OMAP4_THERMAL=y
+CONFIG_OMAP5_THERMAL=y
+CONFIG_DRA752_THERMAL=y
+CONFIG_WATCHDOG=y
 CONFIG_OMAP_WATCHDOG=y
 CONFIG_TWL4030_WATCHDOG=y
+CONFIG_MFD_PALMAS=y
 CONFIG_MFD_TPS65217=y
 CONFIG_MFD_TPS65910=y
 CONFIG_TWL6040_CORE=y
-CONFIG_REGULATOR_TWL4030=y
+CONFIG_REGULATOR_PALMAS=y
 CONFIG_REGULATOR_TPS65023=y
 CONFIG_REGULATOR_TPS6507X=y
 CONFIG_REGULATOR_TPS65217=y
 CONFIG_REGULATOR_TPS65910=y
+CONFIG_REGULATOR_TWL4030=y
 CONFIG_FB=y
 CONFIG_FIRMWARE_EDID=y
 CONFIG_FB_MODE_HELPERS=y
 CONFIG_FB_TILEBLITTING=y
-CONFIG_FB_OMAP_LCD_VGA=y
 CONFIG_OMAP2_DSS=m
-CONFIG_OMAP2_DSS_RFBI=y
 CONFIG_OMAP2_DSS_SDI=y
 CONFIG_OMAP2_DSS_DSI=y
 CONFIG_FB_OMAP2=m
@@ -194,12 +195,8 @@ CONFIG_DISPLAY_PANEL_DPI=m
 CONFIG_BACKLIGHT_LCD_SUPPORT=y
 CONFIG_LCD_CLASS_DEVICE=y
 CONFIG_LCD_PLATFORM=y
-CONFIG_DISPLAY_SUPPORT=y
 CONFIG_FRAMEBUFFER_CONSOLE=y
 CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y
-CONFIG_FONTS=y
-CONFIG_FONT_8x8=y
-CONFIG_FONT_8x16=y
 CONFIG_LOGO=y
 CONFIG_SOUND=m
 CONFIG_SND=m
@@ -216,14 +213,14 @@ CONFIG_SND_OMAP_SOC_OMAP3_PANDORA=m
 CONFIG_USB=y
 CONFIG_USB_DEBUG=y
 CONFIG_USB_ANNOUNCE_NEW_DEVICES=y
-CONFIG_USB_DEVICEFS=y
 CONFIG_USB_MON=y
 CONFIG_USB_WDM=y
 CONFIG_USB_STORAGE=y
-CONFIG_USB_LIBUSUAL=y
+CONFIG_USB_DWC3=m
 CONFIG_USB_TEST=y
-CONFIG_USB_PHY=y
 CONFIG_NOP_USB_XCEIV=y
+CONFIG_OMAP_USB2=y
+CONFIG_OMAP_USB3=y
 CONFIG_USB_GADGET=y
 CONFIG_USB_GADGET_DEBUG=y
 CONFIG_USB_GADGET_DEBUG_FILES=y
@@ -232,7 +229,6 @@ CONFIG_USB_ZERO=m
 CONFIG_MMC=y
 CONFIG_MMC_UNSAFE_RESUME=y
 CONFIG_SDIO_UART=y
-CONFIG_MMC_ARMMMCI=y
 CONFIG_MMC_OMAP=y
 CONFIG_MMC_OMAP_HS=y
 CONFIG_NEW_LEDS=y
@@ -252,11 +248,8 @@ CONFIG_RTC_DRV_OMAP=y
 CONFIG_DMADEVICES=y
 CONFIG_TI_EDMA=y
 CONFIG_DMA_OMAP=y
-CONFIG_TI_SOC_THERMAL=y
-CONFIG_TI_THERMAL=y
-CONFIG_OMAP4_THERMAL=y
-CONFIG_OMAP5_THERMAL=y
-CONFIG_DRA752_THERMAL=y
+CONFIG_EXTCON=y
+CONFIG_EXTCON_PALMAS=y
 CONFIG_EXT2_FS=y
 CONFIG_EXT3_FS=y
 # CONFIG_EXT3_FS_XATTR is not set
@@ -275,23 +268,18 @@ CONFIG_JFFS2_RUBIN=y
 CONFIG_UBIFS_FS=y
 CONFIG_CRAMFS=y
 CONFIG_NFS_FS=y
-CONFIG_NFS_V3=y
 CONFIG_NFS_V3_ACL=y
 CONFIG_NFS_V4=y
 CONFIG_ROOT_NFS=y
-CONFIG_PARTITION_ADVANCED=y
 CONFIG_NLS_CODEPAGE_437=y
 CONFIG_NLS_ISO8859_1=y
 CONFIG_PRINTK_TIME=y
+CONFIG_DEBUG_INFO=y
 CONFIG_MAGIC_SYSRQ=y
-CONFIG_DEBUG_KERNEL=y
 CONFIG_SCHEDSTATS=y
 CONFIG_TIMER_STATS=y
 CONFIG_PROVE_LOCKING=y
-CONFIG_DEBUG_SPINLOCK_SLEEP=y
 # CONFIG_DEBUG_BUGVERBOSE is not set
-CONFIG_DEBUG_INFO=y
-# CONFIG_RCU_CPU_STALL_DETECTOR is not set
 CONFIG_SECURITY=y
 CONFIG_CRYPTO_MICHAEL_MIC=y
 # CONFIG_CRYPTO_ANSI_CPRNG is not set
@@ -300,9 +288,6 @@ CONFIG_CRC_T10DIF=y
 CONFIG_CRC_ITU_T=y
 CONFIG_CRC7=y
 CONFIG_LIBCRC32C=y
-CONFIG_SOC_OMAP5=y
-CONFIG_TI_DAVINCI_MDIO=y
-CONFIG_TI_DAVINCI_CPDMA=y
-CONFIG_TI_CPSW=y
-CONFIG_AT803X_PHY=y
-CONFIG_SOC_DRA7XX=y
+CONFIG_FONTS=y
+CONFIG_FONT_8x8=y
+CONFIG_FONT_8x16=y
diff --git a/arch/arm/configs/shark_defconfig b/arch/arm/configs/shark_defconfig
deleted file mode 100644 (file)
index e319b2c..0000000
+++ /dev/null
@@ -1,80 +0,0 @@
-CONFIG_EXPERIMENTAL=y
-# CONFIG_LOCALVERSION_AUTO is not set
-CONFIG_SYSVIPC=y
-CONFIG_LOG_BUF_SHIFT=14
-CONFIG_SYSFS_DEPRECATED_V2=y
-CONFIG_SLAB=y
-CONFIG_MODULES=y
-CONFIG_MODULE_UNLOAD=y
-CONFIG_MODULE_FORCE_UNLOAD=y
-# CONFIG_BLK_DEV_BSG is not set
-CONFIG_ARCH_SHARK=y
-CONFIG_LEDS=y
-CONFIG_LEDS_TIMER=y
-CONFIG_ZBOOT_ROM_TEXT=0x0
-CONFIG_ZBOOT_ROM_BSS=0x0
-CONFIG_FPE_NWFPE=y
-CONFIG_NET=y
-CONFIG_PACKET=y
-CONFIG_UNIX=y
-CONFIG_INET=y
-# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
-# CONFIG_INET_XFRM_MODE_TUNNEL is not set
-# CONFIG_INET_XFRM_MODE_BEET is not set
-# CONFIG_INET_LRO is not set
-# CONFIG_INET_DIAG is not set
-# CONFIG_IPV6 is not set
-CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
-# CONFIG_STANDALONE is not set
-# CONFIG_FIRMWARE_IN_KERNEL is not set
-CONFIG_PARPORT=m
-CONFIG_PARPORT_PC=m
-CONFIG_BLK_DEV_LOOP=y
-CONFIG_BLK_DEV_RAM=y
-CONFIG_IDE=y
-CONFIG_BLK_DEV_IDECD=m
-CONFIG_SCSI=m
-CONFIG_BLK_DEV_SD=m
-CONFIG_CHR_DEV_ST=m
-CONFIG_BLK_DEV_SR=m
-CONFIG_CHR_DEV_SG=m
-CONFIG_NETDEVICES=y
-CONFIG_NET_ETHERNET=y
-CONFIG_NET_PCI=y
-CONFIG_CS89x0=y
-# CONFIG_SERIO_SERPORT is not set
-CONFIG_SERIAL_8250=y
-CONFIG_SERIAL_8250_CONSOLE=y
-CONFIG_PRINTER=m
-# CONFIG_HWMON is not set
-CONFIG_FB=y
-CONFIG_FB_CYBER2000=y
-# CONFIG_VGA_CONSOLE is not set
-CONFIG_FRAMEBUFFER_CONSOLE=y
-CONFIG_LOGO=y
-# CONFIG_LOGO_LINUX_MONO is not set
-# CONFIG_LOGO_LINUX_VGA16 is not set
-CONFIG_SOUND=m
-CONFIG_SOUND_PRIME=m
-CONFIG_SOUND_OSS=m
-CONFIG_SOUND_SB=m
-CONFIG_RTC_CLASS=y
-CONFIG_RTC_DRV_CMOS=y
-CONFIG_EXT2_FS=y
-CONFIG_EXT3_FS=y
-CONFIG_ISO9660_FS=m
-CONFIG_JOLIET=y
-CONFIG_MSDOS_FS=m
-CONFIG_VFAT_FS=m
-CONFIG_NFS_FS=y
-CONFIG_NFS_V3=y
-CONFIG_NFSD=m
-CONFIG_PARTITION_ADVANCED=y
-CONFIG_NLS_CODEPAGE_437=m
-CONFIG_NLS_CODEPAGE_850=m
-CONFIG_NLS_ISO8859_1=m
-# CONFIG_ENABLE_MUST_CHECK is not set
-CONFIG_DEBUG_KERNEL=y
-# CONFIG_SCHED_DEBUG is not set
-# CONFIG_RCU_CPU_STALL_DETECTOR is not set
-CONFIG_DEBUG_USER=y
index ea042e80e54d7c694a4486f95cbca565713ad181..4934295bb4f0905df99d302e4bd11eef2f4a659c 100644 (file)
@@ -27,6 +27,7 @@ CONFIG_ARCH_TEGRA=y
 CONFIG_ARCH_TEGRA_2x_SOC=y
 CONFIG_ARCH_TEGRA_3x_SOC=y
 CONFIG_ARCH_TEGRA_114_SOC=y
+CONFIG_ARCH_TEGRA_124_SOC=y
 CONFIG_TEGRA_EMC_SCALING_ENABLE=y
 CONFIG_PCI=y
 CONFIG_PCI_MSI=y
@@ -41,9 +42,11 @@ CONFIG_ZBOOT_ROM_TEXT=0x0
 CONFIG_ZBOOT_ROM_BSS=0x0
 CONFIG_KEXEC=y
 CONFIG_CPU_FREQ=y
+CONFIG_CPU_FREQ_STAT_DETAILS=y
 CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y
 CONFIG_CPU_IDLE=y
 CONFIG_VFP=y
+CONFIG_NEON=y
 CONFIG_PM_RUNTIME=y
 CONFIG_NET=y
 CONFIG_PACKET=y
@@ -129,6 +132,7 @@ CONFIG_SPI=y
 CONFIG_SPI_TEGRA114=y
 CONFIG_SPI_TEGRA20_SFLASH=y
 CONFIG_SPI_TEGRA20_SLINK=y
+CONFIG_PINCTRL_PALMAS=y
 CONFIG_GPIO_PCA953X_IRQ=y
 CONFIG_GPIO_PALMAS=y
 CONFIG_GPIO_TPS6586X=y
@@ -223,6 +227,7 @@ CONFIG_KEYBOARD_NVEC=y
 CONFIG_SERIO_NVEC_PS2=y
 CONFIG_NVEC_POWER=y
 CONFIG_NVEC_PAZ00=y
+CONFIG_COMMON_CLK_DEBUG=y
 CONFIG_TEGRA_IOMMU_GART=y
 CONFIG_TEGRA_IOMMU_SMMU=y
 CONFIG_MEMORY=y
index a0025dc13021af11af524e08e8466c826f802a4a..ac632cc38f249767bcedfc1232a4e4b8e6bc70d9 100644 (file)
@@ -1,4 +1,3 @@
-CONFIG_HIGHMEM=y
 # CONFIG_SWAP is not set
 CONFIG_SYSVIPC=y
 CONFIG_NO_HZ=y
@@ -16,6 +15,9 @@ CONFIG_SMP=y
 CONFIG_NR_CPUS=2
 CONFIG_PREEMPT=y
 CONFIG_AEABI=y
+CONFIG_HIGHMEM=y
+CONFIG_ARM_APPENDED_DTB=y
+CONFIG_ARM_ATAG_DTB_COMPAT=y
 CONFIG_CMDLINE="root=/dev/ram0 console=ttyAMA2,115200n8"
 CONFIG_CPU_FREQ=y
 CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y
@@ -68,8 +70,8 @@ CONFIG_CPU_THERMAL=y
 CONFIG_WATCHDOG=y
 CONFIG_MFD_STMPE=y
 CONFIG_MFD_TC3589X=y
-CONFIG_REGULATOR_GPIO=y
 CONFIG_REGULATOR_AB8500=y
+CONFIG_REGULATOR_GPIO=y
 CONFIG_SOUND=y
 CONFIG_SND=y
 CONFIG_SND_SOC=y
@@ -78,10 +80,8 @@ CONFIG_SND_SOC_UX500_MACH_MOP500=y
 CONFIG_USB=y
 CONFIG_USB_MUSB_HDRC=y
 CONFIG_USB_MUSB_UX500=y
-CONFIG_USB_PHY=y
 CONFIG_AB8500_USB=y
 CONFIG_USB_GADGET=y
-CONFIG_USB_GADGET_MUSB_HDRC=y
 CONFIG_USB_ETH=m
 CONFIG_MMC=y
 CONFIG_MMC_UNSAFE_RESUME=y
@@ -116,12 +116,12 @@ CONFIG_NFS_FS=y
 CONFIG_ROOT_NFS=y
 CONFIG_NLS_CODEPAGE_437=y
 CONFIG_NLS_ISO8859_1=y
-CONFIG_MAGIC_SYSRQ=y
+CONFIG_DEBUG_INFO=y
 CONFIG_DEBUG_FS=y
+CONFIG_MAGIC_SYSRQ=y
 CONFIG_DEBUG_KERNEL=y
 # CONFIG_SCHED_DEBUG is not set
 # CONFIG_DEBUG_PREEMPT is not set
-CONFIG_DEBUG_INFO=y
 # CONFIG_FTRACE is not set
 CONFIG_DEBUG_USER=y
 CONFIG_CRYPTO_DEV_UX500=y
index 454d642a407017e879f1e23a54d82ed6bf0faf7b..7fc42784becbf2ee4e4779d06b9345be6c8ccf06 100644 (file)
@@ -106,8 +106,4 @@ extern int dc21285_setup(int nr, struct pci_sys_data *);
 extern void dc21285_preinit(void);
 extern void dc21285_postinit(void);
 
-extern struct pci_ops via82c505_ops;
-extern int via82c505_setup(int nr, struct pci_sys_data *);
-extern void via82c505_init(void *sysdata);
-
 #endif /* __ASM_MACH_PCI_H */
diff --git a/arch/arm/include/asm/sched_clock.h b/arch/arm/include/asm/sched_clock.h
deleted file mode 100644 (file)
index 2389b71..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-/* You shouldn't include this file. Use linux/sched_clock.h instead.
- * Temporary file until all asm/sched_clock.h users are gone
- */
-#include <linux/sched_clock.h>
index 70ded3fb42d9887c71293755aff8354784220d64..570a48cc3d64b1714bd711c4b4cc4a6d1ab1358c 100644 (file)
@@ -14,7 +14,6 @@
  */
 
 #include <linux/init.h>
-#include <linux/irqchip/arm-gic.h>
 #include <linux/smp.h>
 #include <linux/of.h>
 
index 98aee3258398663b1147e38372215c8fbfe8267e..829a96d4a179337019f1790ab2e50577f8cc3524 100644 (file)
  *  This file contains the ARM-specific time handling details:
  *  reading the RTC at bootup, etc...
  */
+#include <linux/clk-provider.h>
+#include <linux/clocksource.h>
+#include <linux/errno.h>
 #include <linux/export.h>
-#include <linux/kernel.h>
-#include <linux/interrupt.h>
-#include <linux/time.h>
 #include <linux/init.h>
+#include <linux/interrupt.h>
+#include <linux/irq.h>
+#include <linux/kernel.h>
+#include <linux/profile.h>
 #include <linux/sched.h>
+#include <linux/sched_clock.h>
 #include <linux/smp.h>
+#include <linux/time.h>
 #include <linux/timex.h>
-#include <linux/errno.h>
-#include <linux/profile.h>
 #include <linux/timer.h>
-#include <linux/clocksource.h>
-#include <linux/irq.h>
-#include <linux/sched_clock.h>
 
-#include <asm/thread_info.h>
-#include <asm/stacktrace.h>
 #include <asm/mach/arch.h>
 #include <asm/mach/time.h>
+#include <asm/stacktrace.h>
+#include <asm/thread_info.h>
 
 #if defined(CONFIG_RTC_DRV_CMOS) || defined(CONFIG_RTC_DRV_CMOS_MODULE) || \
     defined(CONFIG_NVRAM) || defined(CONFIG_NVRAM_MODULE)
@@ -116,8 +117,12 @@ int __init register_persistent_clock(clock_access_fn read_boot,
 
 void __init time_init(void)
 {
-       if (machine_desc->init_time)
+       if (machine_desc->init_time) {
                machine_desc->init_time();
-       else
+       } else {
+#ifdef CONFIG_COMMON_CLK
+               of_clk_init(NULL);
+#endif
                clocksource_of_init();
+       }
 }
index bd454b09133e38274d6af8fbe6ba2a36fab7dab7..47d7338561de3c93c19a1345226e7078f779b6c6 100644 (file)
@@ -41,7 +41,6 @@ else
 endif
 
 lib-$(CONFIG_ARCH_RPC)         += ecard.o io-acorn.o floppydma.o
-lib-$(CONFIG_ARCH_SHARK)       += io-shark.o
 
 $(obj)/csumpartialcopy.o:      $(obj)/csumpartialcopygeneric.S
 $(obj)/csumpartialcopyuser.o:  $(obj)/csumpartialcopygeneric.S
diff --git a/arch/arm/lib/io-shark.c b/arch/arm/lib/io-shark.c
deleted file mode 100644 (file)
index 8242539..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-/*
- *  linux/arch/arm/lib/io-shark.c
- *
- *  by Alexander Schulz
- *
- * derived from:
- * linux/arch/arm/lib/io-ebsa.S
- * Copyright (C) 1995, 1996 Russell King
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- */
index c7d670d118025eaf71a4dd145d0d3a33d300a415..2d895a297739d85d4302ec8e9ec2e01cfb4f1c69 100644 (file)
@@ -169,6 +169,7 @@ static struct clk_lookup periph_clocks_lookups[] = {
        CLKDEV_CON_DEV_ID("t0_clk", "f8008000.timer", &tcb_clk),
        CLKDEV_CON_DEV_ID("t0_clk", "f800c000.timer", &tcb_clk),
        CLKDEV_CON_DEV_ID("mci_clk", "f0008000.mmc", &mmc_clk),
+       CLKDEV_CON_DEV_ID(NULL, "f0010000.ssc", &ssc_clk),
        CLKDEV_CON_DEV_ID("dma_clk", "ffffec00.dma-controller", &dma_clk),
        CLKDEV_CON_DEV_ID(NULL, "f8010000.i2c", &twi0_clk),
        CLKDEV_CON_DEV_ID(NULL, "f8014000.i2c", &twi1_clk),
index ade948b8266272d9ee1cadf85e713a4e5d1632c1..112e867c4abea764f19cb0470ba253f6e00585d2 100644 (file)
@@ -112,7 +112,7 @@ static struct spi_board_info cam60_spi_devices[] __initdata = {
 /*
  * MACB Ethernet device
  */
-static struct __initdata macb_platform_data cam60_macb_data = {
+static struct macb_platform_data cam60_macb_data __initdata = {
        .phy_irq_pin    = AT91_PIN_PB5,
        .is_rmii        = 0,
 };
index 3fcb6623a33edcaa66d94de8c9832dab28392e9d..3a185faee795b589725bffd222e2299eac5cffc3 100644 (file)
@@ -14,7 +14,6 @@
 #include <linux/gpio.h>
 #include <linux/of.h>
 #include <linux/of_irq.h>
-#include <linux/of_platform.h>
 
 #include <asm/setup.h>
 #include <asm/irq.h>
@@ -36,11 +35,6 @@ static void __init at91rm9200_dt_init_irq(void)
        of_irq_init(irq_of_match);
 }
 
-static void __init at91rm9200_dt_device_init(void)
-{
-       of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
-}
-
 static const char *at91rm9200_dt_board_compat[] __initdata = {
        "atmel,at91rm9200",
        NULL
@@ -52,6 +46,5 @@ DT_MACHINE_START(at91rm9200_dt, "Atmel AT91RM9200 (Device Tree)")
        .handle_irq     = at91_aic_handle_irq,
        .init_early     = at91rm9200_dt_initialize,
        .init_irq       = at91rm9200_dt_init_irq,
-       .init_machine   = at91rm9200_dt_device_init,
        .dt_compat      = at91rm9200_dt_board_compat,
 MACHINE_END
index 8db30132abed165dc0c52737895789e532ee24a1..3dab868b02fad864fbc2ee537c7b846d563889b4 100644 (file)
@@ -13,7 +13,6 @@
 #include <linux/gpio.h>
 #include <linux/of.h>
 #include <linux/of_irq.h>
-#include <linux/of_platform.h>
 
 #include <asm/setup.h>
 #include <asm/irq.h>
@@ -37,11 +36,6 @@ static void __init at91_dt_init_irq(void)
        of_irq_init(irq_of_match);
 }
 
-static void __init at91_dt_device_init(void)
-{
-       of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
-}
-
 static const char *at91_dt_board_compat[] __initdata = {
        "atmel,at91sam9",
        NULL
@@ -54,6 +48,5 @@ DT_MACHINE_START(at91sam_dt, "Atmel AT91SAM (Device Tree)")
        .handle_irq     = at91_aic_handle_irq,
        .init_early     = at91_dt_initialize,
        .init_irq       = at91_dt_init_irq,
-       .init_machine   = at91_dt_device_init,
        .dt_compat      = at91_dt_board_compat,
 MACHINE_END
index 8d9f931164bb8544aa046f01d2938bb9703cb183..26b2390492b801927f6376a725db237a4cc82416 100644 (file)
@@ -68,7 +68,6 @@ static void __init board_init(void)
 static const char * const bcm11351_dt_compat[] = { "brcm,bcm11351", NULL, };
 
 DT_MACHINE_START(BCM11351_DT, "Broadcom Application Processor")
-       .init_time = clocksource_of_init,
        .init_machine = board_init,
        .restart = bcm_kona_restart,
        .dt_compat = bcm11351_dt_compat,
index 40686d7ef500223765a1a08f6beccfad9a2847f6..d50135be0c20988e176b3c2a647c7ef1fb9f6e6c 100644 (file)
@@ -18,7 +18,6 @@
 #include <linux/of_address.h>
 #include <linux/of_platform.h>
 #include <linux/clk/bcm2835.h>
-#include <linux/clocksource.h>
 
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
@@ -134,7 +133,6 @@ DT_MACHINE_START(BCM2835, "BCM2835")
        .init_irq = bcm2835_init_irq,
        .handle_irq = bcm2835_handle_irq,
        .init_machine = bcm2835_init,
-       .init_time = clocksource_of_init,
        .restart = bcm2835_restart,
        .dt_compat = bcm2835_compat
 MACHINE_END
index 4ca2f3ca2de42efe618530332885492e4e223385..134641d688bb12f201dd2d0cedcd166890a8ce71 100644 (file)
 #include <linux/clockchips.h>
 #include <linux/clocksource.h>
 #include <linux/clk-provider.h>
+#include <linux/sched_clock.h>
 
 #include <asm/exception.h>
 #include <asm/mach/irq.h>
 #include <asm/mach/map.h>
 #include <asm/mach/time.h>
-#include <asm/sched_clock.h>
 #include <asm/system_misc.h>
 
 #include <mach/hardware.h>
index 66b5b3cb53768630812e0ef61429644ecdb7373e..d1f45af7a530e9abc33d794fcc6cf52010cfc52b 100644 (file)
 #include <linux/mtd/partitions.h>
 #include <linux/spi/spi.h>
 #include <linux/spi/flash.h>
+#include <linux/platform_data/gpio-davinci.h>
+#include <linux/platform_data/mtd-davinci.h>
+#include <linux/platform_data/mtd-davinci-aemif.h>
+#include <linux/platform_data/spi-davinci.h>
+#include <linux/platform_data/usb-davinci.h>
 
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
 
+#include <mach/common.h>
 #include <mach/cp_intc.h>
 #include <mach/mux.h>
-#include <linux/platform_data/mtd-davinci.h>
 #include <mach/da8xx.h>
-#include <linux/platform_data/usb-davinci.h>
-#include <linux/platform_data/mtd-davinci-aemif.h>
-#include <linux/platform_data/spi-davinci.h>
 
 #define DA830_EVM_PHY_ID               ""
 /*
@@ -74,7 +76,7 @@ static int da830_evm_usb_ocic_notify(da8xx_ocic_handler_t handler)
        if (handler != NULL) {
                da830_evm_usb_ocic_handler = handler;
 
-               error = request_irq(irq, da830_evm_usb_ocic_irq, IRQF_DISABLED |
+               error = request_irq(irq, da830_evm_usb_ocic_irq,
                                    IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING,
                                    "OHCI over-current indicator", NULL);
                if (error)
@@ -591,6 +593,10 @@ static __init void da830_evm_init(void)
        struct davinci_soc_info *soc_info = &davinci_soc_info;
        int ret;
 
+       ret = da830_register_gpio();
+       if (ret)
+               pr_warn("da830_evm_init: GPIO init failed: %d\n", ret);
+
        ret = da830_register_edma(da830_edma_rsv);
        if (ret)
                pr_warning("da830_evm_init: edma registration failed: %d\n",
index f25a569b000989120d758245f01929c1cb7ff461..e0af0eccde8fbe0d9f54abaeb339ee974db4c2d2 100644 (file)
@@ -28,6 +28,7 @@
 #include <linux/mtd/partitions.h>
 #include <linux/mtd/physmap.h>
 #include <linux/platform_device.h>
+#include <linux/platform_data/gpio-davinci.h>
 #include <linux/platform_data/mtd-davinci.h>
 #include <linux/platform_data/mtd-davinci-aemif.h>
 #include <linux/platform_data/spi-davinci.h>
@@ -38,6 +39,7 @@
 #include <linux/spi/flash.h>
 #include <linux/wl12xx.h>
 
+#include <mach/common.h>
 #include <mach/cp_intc.h>
 #include <mach/da8xx.h>
 #include <mach/mux.h>
@@ -1437,6 +1439,10 @@ static __init void da850_evm_init(void)
 {
        int ret;
 
+       ret = da850_register_gpio();
+       if (ret)
+               pr_warn("%s: GPIO init failed: %d\n", __func__, ret);
+
        ret = pmic_tps65070_init();
        if (ret)
                pr_warn("%s: TPS65070 PMIC init failed: %d\n", __func__, ret);
index 42b23a3194a05d9052026e2f14c4a0fe5a9cc67e..ecdc7d44fa70aef07279f552e98a6354ed6c3900 100644 (file)
 #include <media/tvp514x.h>
 #include <linux/spi/spi.h>
 #include <linux/spi/eeprom.h>
+#include <linux/platform_data/gpio-davinci.h>
+#include <linux/platform_data/i2c-davinci.h>
+#include <linux/platform_data/mtd-davinci.h>
+#include <linux/platform_data/mmc-davinci.h>
+#include <linux/platform_data/usb-davinci.h>
 
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
 
-#include <linux/platform_data/i2c-davinci.h>
 #include <mach/serial.h>
-#include <linux/platform_data/mtd-davinci.h>
-#include <linux/platform_data/mmc-davinci.h>
-#include <linux/platform_data/usb-davinci.h>
+#include <mach/common.h>
 
 #include "davinci.h"
 
@@ -375,6 +377,11 @@ static struct spi_board_info dm355_evm_spi_info[] __initconst = {
 static __init void dm355_evm_init(void)
 {
        struct clk *aemif;
+       int ret;
+
+       ret = dm355_gpio_register();
+       if (ret)
+               pr_warn("%s: GPIO init failed: %d\n", __func__, ret);
 
        gpio_request(1, "dm9000");
        gpio_direction_input(1);
index 65a984c52df6fce12732ee0ff1b09902bb23d81a..43bacbf153140f7a9e6be87ed5e8b3cbe4012570 100644 (file)
 #include <linux/clk.h>
 #include <linux/spi/spi.h>
 #include <linux/spi/eeprom.h>
+#include <linux/platform_data/i2c-davinci.h>
+#include <linux/platform_data/mmc-davinci.h>
+#include <linux/platform_data/mtd-davinci.h>
+#include <linux/platform_data/usb-davinci.h>
 
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
 
-#include <linux/platform_data/i2c-davinci.h>
+#include <mach/common.h>
 #include <mach/serial.h>
-#include <linux/platform_data/mtd-davinci.h>
-#include <linux/platform_data/mmc-davinci.h>
-#include <linux/platform_data/usb-davinci.h>
 
 #include "davinci.h"
 
@@ -234,6 +235,11 @@ static struct spi_board_info dm355_leopard_spi_info[] __initconst = {
 static __init void dm355_leopard_init(void)
 {
        struct clk *aemif;
+       int ret;
+
+       ret = dm355_gpio_register();
+       if (ret)
+               pr_warn("%s: GPIO init failed: %d\n", __func__, ret);
 
        gpio_request(9, "dm9000");
        gpio_direction_input(9);
index 7f260b77157a3749851350cbca30272efecb0f5d..e08a8684ead2fed54938bcfeaaac7fe3b5b0efb2 100644 (file)
@@ -743,6 +743,12 @@ static struct spi_board_info dm365_evm_spi_info[] __initconst = {
 
 static __init void dm365_evm_init(void)
 {
+       int ret;
+
+       ret = dm365_gpio_register();
+       if (ret)
+               pr_warn("%s: GPIO init failed: %d\n", __func__, ret);
+
        evm_init_i2c();
        davinci_serial_init(dm365_serial_device);
 
index f21fde9dce007a6dcc249d0e3458572b8b16977c..987605b78556f9e8fa16b1e9b1b278ad0abe4d1c 100644 (file)
@@ -754,9 +754,14 @@ static int davinci_phy_fixup(struct phy_device *phydev)
 
 static __init void davinci_evm_init(void)
 {
+       int ret;
        struct clk *aemif_clk;
        struct davinci_soc_info *soc_info = &davinci_soc_info;
 
+       ret = dm644x_gpio_register();
+       if (ret)
+               pr_warn("%s: GPIO init failed: %d\n", __func__, ret);
+
        aemif_clk = clk_get(NULL, "aemif");
        clk_prepare_enable(aemif_clk);
 
index db2df32da6a887d4042d810c525b1cf9e59c8753..13d0801fd6b170e155dfe3d4cf8c069522c4baf7 100644 (file)
 #include <linux/mtd/partitions.h>
 #include <linux/clk.h>
 #include <linux/export.h>
+#include <linux/platform_data/gpio-davinci.h>
+#include <linux/platform_data/i2c-davinci.h>
+#include <linux/platform_data/mtd-davinci.h>
+#include <linux/platform_data/mtd-davinci-aemif.h>
 
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
 
 #include <mach/common.h>
+#include <mach/irqs.h>
 #include <mach/serial.h>
-#include <linux/platform_data/i2c-davinci.h>
-#include <linux/platform_data/mtd-davinci.h>
 #include <mach/clock.h>
 #include <mach/cdce949.h>
-#include <linux/platform_data/mtd-davinci-aemif.h>
 
 #include "davinci.h"
 #include "clock.h"
@@ -786,8 +788,13 @@ static struct edma_rsv_info dm646x_edma_rsv[] = {
 
 static __init void evm_init(void)
 {
+       int ret;
        struct davinci_soc_info *soc_info = &davinci_soc_info;
 
+       ret = dm646x_gpio_register();
+       if (ret)
+               pr_warn("%s: GPIO init failed: %d\n", __func__, ret);
+
        evm_init_i2c();
        davinci_serial_init(dm646x_serial_device);
        dm646x_init_mcasp0(&dm646x_evm_snd_data[0]);
index 46f336fca80384541257e667383d85080b718b1b..bb680af98374e2177702529fd179b0d78d377828 100644 (file)
 #include <linux/platform_device.h>
 #include <linux/gpio.h>
 #include <linux/mtd/partitions.h>
+#include <linux/platform_data/gpio-davinci.h>
+#include <linux/platform_data/i2c-davinci.h>
+#include <linux/platform_data/mmc-davinci.h>
+#include <linux/platform_data/mtd-davinci.h>
+#include <linux/platform_data/usb-davinci.h>
 
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
 
 #include <mach/common.h>
-#include <linux/platform_data/i2c-davinci.h>
 #include <mach/serial.h>
 #include <mach/mux.h>
-#include <linux/platform_data/mtd-davinci.h>
-#include <linux/platform_data/mmc-davinci.h>
-#include <linux/platform_data/usb-davinci.h>
 
 #include "davinci.h"
 
@@ -169,9 +170,14 @@ static struct davinci_mmc_config davinci_ntosd2_mmc_config = {
 
 static __init void davinci_ntosd2_init(void)
 {
+       int ret;
        struct clk *aemif_clk;
        struct davinci_soc_info *soc_info = &davinci_soc_info;
 
+       ret = dm644x_gpio_register();
+       if (ret)
+               pr_warn("%s: GPIO init failed: %d\n", __func__, ret);
+
        aemif_clk = clk_get(NULL, "aemif");
        clk_prepare_enable(aemif_clk);
 
index ab98c75cabb48b7ed2cee6518fddca615f58f6e3..2aac51d0e85325361d9406e2d5abd6b8f8b9383b 100644 (file)
 #include <linux/init.h>
 #include <linux/console.h>
 #include <linux/gpio.h>
+#include <linux/platform_data/gpio-davinci.h>
 
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
 
+#include <mach/common.h>
 #include <mach/cp_intc.h>
 #include <mach/da8xx.h>
 #include <mach/mux.h>
@@ -211,7 +213,7 @@ static int hawk_usb_ocic_notify(da8xx_ocic_handler_t handler)
                hawk_usb_ocic_handler = handler;
 
                error = request_irq(irq, omapl138_hawk_usb_ocic_irq,
-                                       IRQF_DISABLED | IRQF_TRIGGER_RISING |
+                                       IRQF_TRIGGER_RISING |
                                        IRQF_TRIGGER_FALLING,
                                        "OHCI over-current indicator", NULL);
                if (error)
@@ -290,6 +292,10 @@ static __init void omapl138_hawk_init(void)
 {
        int ret;
 
+       ret = da850_register_gpio();
+       if (ret)
+               pr_warn("%s: GPIO init failed: %d\n", __func__, ret);
+
        davinci_serial_init(da8xx_serial_device);
 
        omapl138_hawk_config_emac();
index d6c746e35ad9fe196e947994de330fefda3e1962..0813b5167e059e1c7c32d82374bbdb6470eb9370 100644 (file)
@@ -11,6 +11,7 @@
 #include <linux/gpio.h>
 #include <linux/init.h>
 #include <linux/clk.h>
+#include <linux/platform_data/gpio-davinci.h>
 
 #include <asm/mach/map.h>
 
@@ -20,7 +21,6 @@
 #include <mach/common.h>
 #include <mach/time.h>
 #include <mach/da8xx.h>
-#include <mach/gpio-davinci.h>
 
 #include "clock.h"
 #include "mux.h"
@@ -1151,6 +1151,16 @@ static struct davinci_id da830_ids[] = {
        },
 };
 
+static struct davinci_gpio_platform_data da830_gpio_platform_data = {
+       .ngpio = 128,
+       .intc_irq_num = DA830_N_CP_INTC_IRQ,
+};
+
+int __init da830_register_gpio(void)
+{
+       return da8xx_register_gpio(&da830_gpio_platform_data);
+}
+
 static struct davinci_timer_instance da830_timer_instance[2] = {
        {
                .base           = DA8XX_TIMER64P0_BASE,
@@ -1196,10 +1206,6 @@ static struct davinci_soc_info davinci_soc_info_da830 = {
        .intc_irq_prios         = da830_default_priorities,
        .intc_irq_num           = DA830_N_CP_INTC_IRQ,
        .timer_info             = &da830_timer_info,
-       .gpio_type              = GPIO_TYPE_DAVINCI,
-       .gpio_base              = DA8XX_GPIO_BASE,
-       .gpio_num               = 128,
-       .gpio_irq               = IRQ_DA8XX_GPIO0,
        .emac_pdata             = &da8xx_emac_pdata,
 };
 
index f56e5fbfa2fd20ebd0a8fd18adaee48463e632b2..352984e1528a4ab08cdd2e52b072e841e6a895e1 100644 (file)
@@ -17,6 +17,7 @@
 #include <linux/platform_device.h>
 #include <linux/cpufreq.h>
 #include <linux/regulator/consumer.h>
+#include <linux/platform_data/gpio-davinci.h>
 
 #include <asm/mach/map.h>
 
@@ -28,7 +29,6 @@
 #include <mach/da8xx.h>
 #include <mach/cpufreq.h>
 #include <mach/pm.h>
-#include <mach/gpio-davinci.h>
 
 #include "clock.h"
 #include "mux.h"
@@ -1281,6 +1281,16 @@ int __init da850_register_vpif_capture(struct vpif_capture_config
        return platform_device_register(&da850_vpif_capture_dev);
 }
 
+static struct davinci_gpio_platform_data da850_gpio_platform_data = {
+       .ngpio = 144,
+       .intc_irq_num = DA850_N_CP_INTC_IRQ,
+};
+
+int __init da850_register_gpio(void)
+{
+       return da8xx_register_gpio(&da850_gpio_platform_data);
+}
+
 static struct davinci_soc_info davinci_soc_info_da850 = {
        .io_desc                = da850_io_desc,
        .io_desc_num            = ARRAY_SIZE(da850_io_desc),
@@ -1298,10 +1308,6 @@ static struct davinci_soc_info davinci_soc_info_da850 = {
        .intc_irq_prios         = da850_default_priorities,
        .intc_irq_num           = DA850_N_CP_INTC_IRQ,
        .timer_info             = &da850_timer_info,
-       .gpio_type              = GPIO_TYPE_DAVINCI,
-       .gpio_base              = DA8XX_GPIO_BASE,
-       .gpio_num               = 144,
-       .gpio_irq               = IRQ_DA8XX_GPIO0,
        .emac_pdata             = &da8xx_emac_pdata,
        .sram_dma               = DA8XX_SHARED_RAM_BASE,
        .sram_len               = SZ_128K,
index 2ab5d577186f4177fd06c414b31d25c21d295f8f..2eebc433880223b0ed2c5fe18c56aa11807cd699 100644 (file)
@@ -53,6 +53,9 @@ extern void __iomem *davinci_sysmod_base;
 #define DAVINCI_SYSMOD_VIRT(x) (davinci_sysmod_base + (x))
 void davinci_map_sysmod(void);
 
+#define DAVINCI_GPIO_BASE 0x01C67000
+int davinci_gpio_register(struct resource *res, int size, void *pdata);
+
 /* DM355 base addresses */
 #define DM355_ASYNC_EMIF_CONTROL_BASE  0x01e10000
 #define DM355_ASYNC_EMIF_DATA_CE0_BASE 0x02000000
@@ -82,6 +85,7 @@ void dm355_init_spi0(unsigned chipselect_mask,
                const struct spi_board_info *info, unsigned len);
 void dm355_init_asp1(u32 evt_enable, struct snd_platform_data *pdata);
 int dm355_init_video(struct vpfe_config *, struct vpbe_config *);
+int dm355_gpio_register(void);
 
 /* DM365 function declarations */
 void dm365_init(void);
@@ -92,11 +96,13 @@ void dm365_init_rtc(void);
 void dm365_init_spi0(unsigned chipselect_mask,
                        const struct spi_board_info *info, unsigned len);
 int dm365_init_video(struct vpfe_config *, struct vpbe_config *);
+int dm365_gpio_register(void);
 
 /* DM644x function declarations */
 void dm644x_init(void);
 void dm644x_init_asp(struct snd_platform_data *pdata);
 int dm644x_init_video(struct vpfe_config *, struct vpbe_config *);
+int dm644x_gpio_register(void);
 
 /* DM646x function declarations */
 void dm646x_init(void);
@@ -106,6 +112,7 @@ int dm646x_init_edma(struct edma_rsv_info *rsv);
 void dm646x_video_init(void);
 void dm646x_setup_vpif(struct vpif_display_config *,
                       struct vpif_capture_config *);
+int dm646x_gpio_register(void);
 
 extern struct platform_device dm365_serial_device[];
 extern struct platform_device dm355_serial_device[];
index 2e473fefd71ebc2049d490f554da0f8a70d2578b..c46eccbbd51226f5ae6ab5a16e1c89668c35fa1d 100644 (file)
@@ -665,6 +665,32 @@ int __init da8xx_register_lcdc(struct da8xx_lcdc_platform_data *pdata)
        return platform_device_register(&da8xx_lcdc_device);
 }
 
+static struct resource da8xx_gpio_resources[] = {
+       { /* registers */
+               .start  = DA8XX_GPIO_BASE,
+               .end    = DA8XX_GPIO_BASE + SZ_4K - 1,
+               .flags  = IORESOURCE_MEM,
+       },
+       { /* interrupt */
+               .start  = IRQ_DA8XX_GPIO0,
+               .end    = IRQ_DA8XX_GPIO8,
+               .flags  = IORESOURCE_IRQ,
+       },
+};
+
+static struct platform_device da8xx_gpio_device = {
+       .name           = "davinci_gpio",
+       .id             = -1,
+       .num_resources  = ARRAY_SIZE(da8xx_gpio_resources),
+       .resource       = da8xx_gpio_resources,
+};
+
+int __init da8xx_register_gpio(void *pdata)
+{
+       da8xx_gpio_device.dev.platform_data = pdata;
+       return platform_device_register(&da8xx_gpio_device);
+}
+
 static struct resource da8xx_mmcsd0_resources[] = {
        {               /* registers */
                .start  = DA8XX_MMCSD0_BASE,
index 111573c0aad144dacea6674a842ec15b2bfd110a..3996e98f52fbe0c4e8601bb2dc1b8d0932a8ffd9 100644 (file)
@@ -318,6 +318,19 @@ static void davinci_init_wdt(void)
        platform_device_register(&davinci_wdt_device);
 }
 
+static struct platform_device davinci_gpio_device = {
+       .name   = "davinci_gpio",
+       .id     = -1,
+};
+
+int davinci_gpio_register(struct resource *res, int size, void *pdata)
+{
+       davinci_gpio_device.resource = res;
+       davinci_gpio_device.num_resources = size;
+       davinci_gpio_device.dev.platform_data = pdata;
+       return platform_device_register(&davinci_gpio_device);
+}
+
 /*-------------------------------------------------------------------------*/
 
 /*-------------------------------------------------------------------------*/
index 3eaa5f6b2160593517463c2b18c211bbad93605e..ef9ff1fb6f52a2533378ba37563c06e877b32ea3 100644 (file)
 #include <linux/serial_8250.h>
 #include <linux/platform_device.h>
 #include <linux/dma-mapping.h>
-
 #include <linux/spi/spi.h>
+#include <linux/platform_data/edma.h>
+#include <linux/platform_data/gpio-davinci.h>
+#include <linux/platform_data/spi-davinci.h>
 
 #include <asm/mach/map.h>
 
@@ -25,9 +27,6 @@
 #include <mach/time.h>
 #include <mach/serial.h>
 #include <mach/common.h>
-#include <linux/platform_data/spi-davinci.h>
-#include <mach/gpio-davinci.h>
-#include <linux/platform_data/edma.h>
 
 #include "davinci.h"
 #include "clock.h"
@@ -886,6 +885,30 @@ static struct platform_device dm355_vpbe_dev = {
        },
 };
 
+static struct resource dm355_gpio_resources[] = {
+       {       /* registers */
+               .start  = DAVINCI_GPIO_BASE,
+               .end    = DAVINCI_GPIO_BASE + SZ_4K - 1,
+               .flags  = IORESOURCE_MEM,
+       },
+       {       /* interrupt */
+               .start  = IRQ_DM355_GPIOBNK0,
+               .end    = IRQ_DM355_GPIOBNK6,
+               .flags  = IORESOURCE_IRQ,
+       },
+};
+
+static struct davinci_gpio_platform_data dm355_gpio_platform_data = {
+       .ngpio          = 104,
+       .intc_irq_num   = DAVINCI_N_AINTC_IRQ,
+};
+
+int __init dm355_gpio_register(void)
+{
+       return davinci_gpio_register(dm355_gpio_resources,
+                                    sizeof(dm355_gpio_resources),
+                                    &dm355_gpio_platform_data);
+}
 /*----------------------------------------------------------------------*/
 
 static struct map_desc dm355_io_desc[] = {
@@ -1005,10 +1028,6 @@ static struct davinci_soc_info davinci_soc_info_dm355 = {
        .intc_irq_prios         = dm355_default_priorities,
        .intc_irq_num           = DAVINCI_N_AINTC_IRQ,
        .timer_info             = &dm355_timer_info,
-       .gpio_type              = GPIO_TYPE_DAVINCI,
-       .gpio_base              = DAVINCI_GPIO_BASE,
-       .gpio_num               = 104,
-       .gpio_irq               = IRQ_DM355_GPIOBNK0,
        .sram_dma               = 0x00010000,
        .sram_len               = SZ_32K,
 };
index c29e324eb0bb75012d227da960e96fd60c2141f9..1511a0680f9a1d399cf3094b538c3c52caa06547 100644 (file)
@@ -19,6 +19,9 @@
 #include <linux/dma-mapping.h>
 #include <linux/spi/spi.h>
 #include <linux/platform_data/edma.h>
+#include <linux/platform_data/gpio-davinci.h>
+#include <linux/platform_data/keyscan-davinci.h>
+#include <linux/platform_data/spi-davinci.h>
 
 #include <asm/mach/map.h>
 
@@ -29,9 +32,6 @@
 #include <mach/time.h>
 #include <mach/serial.h>
 #include <mach/common.h>
-#include <linux/platform_data/keyscan-davinci.h>
-#include <linux/platform_data/spi-davinci.h>
-#include <mach/gpio-davinci.h>
 
 #include "davinci.h"
 #include "clock.h"
@@ -698,6 +698,32 @@ void __init dm365_init_spi0(unsigned chipselect_mask,
        platform_device_register(&dm365_spi0_device);
 }
 
+static struct resource dm365_gpio_resources[] = {
+       {       /* registers */
+               .start  = DAVINCI_GPIO_BASE,
+               .end    = DAVINCI_GPIO_BASE + SZ_4K - 1,
+               .flags  = IORESOURCE_MEM,
+       },
+       {       /* interrupt */
+               .start  = IRQ_DM365_GPIO0,
+               .end    = IRQ_DM365_GPIO7,
+               .flags  = IORESOURCE_IRQ,
+       },
+};
+
+static struct davinci_gpio_platform_data dm365_gpio_platform_data = {
+       .ngpio          = 104,
+       .intc_irq_num   = DAVINCI_N_AINTC_IRQ,
+       .gpio_unbanked  = 8,
+};
+
+int __init dm365_gpio_register(void)
+{
+       return davinci_gpio_register(dm365_gpio_resources,
+                                    sizeof(dm365_gpio_resources),
+                                    &dm365_gpio_platform_data);
+}
+
 static struct emac_platform_data dm365_emac_pdata = {
        .ctrl_reg_offset        = DM365_EMAC_CNTRL_OFFSET,
        .ctrl_mod_reg_offset    = DM365_EMAC_CNTRL_MOD_OFFSET,
@@ -1105,11 +1131,6 @@ static struct davinci_soc_info davinci_soc_info_dm365 = {
        .intc_irq_prios         = dm365_default_priorities,
        .intc_irq_num           = DAVINCI_N_AINTC_IRQ,
        .timer_info             = &dm365_timer_info,
-       .gpio_type              = GPIO_TYPE_DAVINCI,
-       .gpio_base              = DAVINCI_GPIO_BASE,
-       .gpio_num               = 104,
-       .gpio_irq               = IRQ_DM365_GPIO0,
-       .gpio_unbanked          = 8,    /* really 16 ... skip muxed GPIOs */
        .emac_pdata             = &dm365_emac_pdata,
        .sram_dma               = 0x00010000,
        .sram_len               = SZ_32K,
index 4f74682293d6f162125ac176c54721e2260bf9d8..143a3217e8efb8fde1aa417700c45840d242aac0 100644 (file)
@@ -13,6 +13,7 @@
 #include <linux/serial_8250.h>
 #include <linux/platform_device.h>
 #include <linux/platform_data/edma.h>
+#include <linux/platform_data/gpio-davinci.h>
 
 #include <asm/mach/map.h>
 
@@ -23,7 +24,6 @@
 #include <mach/time.h>
 #include <mach/serial.h>
 #include <mach/common.h>
-#include <mach/gpio-davinci.h>
 
 #include "davinci.h"
 #include "clock.h"
@@ -771,6 +771,30 @@ static struct platform_device dm644x_vpbe_dev = {
        },
 };
 
+static struct resource dm644_gpio_resources[] = {
+       {       /* registers */
+               .start  = DAVINCI_GPIO_BASE,
+               .end    = DAVINCI_GPIO_BASE + SZ_4K - 1,
+               .flags  = IORESOURCE_MEM,
+       },
+       {       /* interrupt */
+               .start  = IRQ_GPIOBNK0,
+               .end    = IRQ_GPIOBNK4,
+               .flags  = IORESOURCE_IRQ,
+       },
+};
+
+static struct davinci_gpio_platform_data dm644_gpio_platform_data = {
+       .ngpio          = 71,
+       .intc_irq_num   = DAVINCI_N_AINTC_IRQ,
+};
+
+int __init dm644x_gpio_register(void)
+{
+       return davinci_gpio_register(dm644_gpio_resources,
+                                    sizeof(dm644_gpio_resources),
+                                    &dm644_gpio_platform_data);
+}
 /*----------------------------------------------------------------------*/
 
 static struct map_desc dm644x_io_desc[] = {
@@ -897,10 +921,6 @@ static struct davinci_soc_info davinci_soc_info_dm644x = {
        .intc_irq_prios         = dm644x_default_priorities,
        .intc_irq_num           = DAVINCI_N_AINTC_IRQ,
        .timer_info             = &dm644x_timer_info,
-       .gpio_type              = GPIO_TYPE_DAVINCI,
-       .gpio_base              = DAVINCI_GPIO_BASE,
-       .gpio_num               = 71,
-       .gpio_irq               = IRQ_GPIOBNK0,
        .emac_pdata             = &dm644x_emac_pdata,
        .sram_dma               = 0x00008000,
        .sram_len               = SZ_16K,
index 68f8d1f1aca1620d864307a28f449de956e287e6..2a73f299c1d094615236359d6ac27959cdd16295 100644 (file)
@@ -14,6 +14,7 @@
 #include <linux/serial_8250.h>
 #include <linux/platform_device.h>
 #include <linux/platform_data/edma.h>
+#include <linux/platform_data/gpio-davinci.h>
 
 #include <asm/mach/map.h>
 
@@ -24,7 +25,6 @@
 #include <mach/time.h>
 #include <mach/serial.h>
 #include <mach/common.h>
-#include <mach/gpio-davinci.h>
 
 #include "davinci.h"
 #include "clock.h"
@@ -748,6 +748,30 @@ static struct platform_device vpif_capture_dev = {
        .num_resources  = ARRAY_SIZE(vpif_capture_resource),
 };
 
+static struct resource dm646x_gpio_resources[] = {
+       {       /* registers */
+               .start  = DAVINCI_GPIO_BASE,
+               .end    = DAVINCI_GPIO_BASE + SZ_4K - 1,
+               .flags  = IORESOURCE_MEM,
+       },
+       {       /* interrupt */
+               .start  = IRQ_DM646X_GPIOBNK0,
+               .end    = IRQ_DM646X_GPIOBNK2,
+               .flags  = IORESOURCE_IRQ,
+       },
+};
+
+static struct davinci_gpio_platform_data dm646x_gpio_platform_data = {
+       .ngpio          = 43,
+       .intc_irq_num   = DAVINCI_N_AINTC_IRQ,
+};
+
+int __init dm646x_gpio_register(void)
+{
+       return davinci_gpio_register(dm646x_gpio_resources,
+                                    sizeof(dm646x_gpio_resources),
+                                    &dm646x_gpio_platform_data);
+}
 /*----------------------------------------------------------------------*/
 
 static struct map_desc dm646x_io_desc[] = {
@@ -874,10 +898,6 @@ static struct davinci_soc_info davinci_soc_info_dm646x = {
        .intc_irq_prios         = dm646x_default_priorities,
        .intc_irq_num           = DAVINCI_N_AINTC_IRQ,
        .timer_info             = &dm646x_timer_info,
-       .gpio_type              = GPIO_TYPE_DAVINCI,
-       .gpio_base              = DAVINCI_GPIO_BASE,
-       .gpio_num               = 43, /* Only 33 usable */
-       .gpio_irq               = IRQ_DM646X_GPIOBNK0,
        .emac_pdata             = &dm646x_emac_pdata,
        .sram_dma               = 0x10010000,
        .sram_len               = SZ_32K,
index aae53072c0eb602d536c1a0891258625347fc0df..39e58b48e826dc4350f54a0aa170444855723815 100644 (file)
@@ -97,6 +97,7 @@ int da8xx_register_mmcsd0(struct davinci_mmc_config *config);
 int da850_register_mmcsd1(struct davinci_mmc_config *config);
 void da8xx_register_mcasp(int id, struct snd_platform_data *pdata);
 int da8xx_register_rtc(void);
+int da8xx_register_gpio(void *pdata);
 int da850_register_cpufreq(char *async_clk);
 int da8xx_register_cpuidle(void);
 void __iomem *da8xx_get_mem_ctlr(void);
@@ -110,6 +111,8 @@ int da850_register_vpif_capture
 void da8xx_restart(enum reboot_mode mode, const char *cmd);
 void da8xx_rproc_reserve_cma(void);
 int da8xx_register_rproc(void);
+int da850_register_gpio(void);
+int da830_register_gpio(void);
 
 extern struct platform_device da8xx_serial_device[];
 extern struct emac_platform_data da8xx_emac_pdata;
diff --git a/arch/arm/mach-davinci/include/mach/gpio-davinci.h b/arch/arm/mach-davinci/include/mach/gpio-davinci.h
deleted file mode 100644 (file)
index 1fdd1fd..0000000
+++ /dev/null
@@ -1,91 +0,0 @@
-/*
- * TI DaVinci GPIO Support
- *
- * Copyright (c) 2006 David Brownell
- * Copyright (c) 2007, MontaVista Software, Inc. <source@mvista.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- */
-
-#ifndef        __DAVINCI_DAVINCI_GPIO_H
-#define        __DAVINCI_DAVINCI_GPIO_H
-
-#include <linux/io.h>
-#include <linux/spinlock.h>
-
-#include <asm-generic/gpio.h>
-
-#include <mach/irqs.h>
-#include <mach/common.h>
-
-#define DAVINCI_GPIO_BASE 0x01C67000
-
-enum davinci_gpio_type {
-       GPIO_TYPE_DAVINCI = 0,
-       GPIO_TYPE_TNETV107X,
-};
-
-/*
- * basic gpio routines
- *
- * board-specific init should be done by arch/.../.../board-XXX.c (maybe
- * initializing banks together) rather than boot loaders; kexec() won't
- * go through boot loaders.
- *
- * the gpio clock will be turned on when gpios are used, and you may also
- * need to pay attention to PINMUX registers to be sure those pins are
- * used as gpios, not with other peripherals.
- *
- * On-chip GPIOs are numbered 0..(DAVINCI_N_GPIO-1).  For documentation,
- * and maybe for later updates, code may write GPIO(N).  These may be
- * all 1.8V signals, all 3.3V ones, or a mix of the two.  A given chip
- * may not support all the GPIOs in that range.
- *
- * GPIOs can also be on external chips, numbered after the ones built-in
- * to the DaVinci chip.  For now, they won't be usable as IRQ sources.
- */
-#define        GPIO(X)         (X)             /* 0 <= X <= (DAVINCI_N_GPIO - 1) */
-
-/* Convert GPIO signal to GPIO pin number */
-#define GPIO_TO_PIN(bank, gpio)        (16 * (bank) + (gpio))
-
-struct davinci_gpio_controller {
-       struct gpio_chip        chip;
-       int                     irq_base;
-       spinlock_t              lock;
-       void __iomem            *regs;
-       void __iomem            *set_data;
-       void __iomem            *clr_data;
-       void __iomem            *in_data;
-};
-
-/* The __gpio_to_controller() and __gpio_mask() functions inline to constants
- * with constant parameters; or in outlined code they execute at runtime.
- *
- * You'd access the controller directly when reading or writing more than
- * one gpio value at a time, and to support wired logic where the value
- * being driven by the cpu need not match the value read back.
- *
- * These are NOT part of the cross-platform GPIO interface
- */
-static inline struct davinci_gpio_controller *
-__gpio_to_controller(unsigned gpio)
-{
-       struct davinci_gpio_controller *ctlrs = davinci_soc_info.gpio_ctlrs;
-       int index = gpio / 32;
-
-       if (!ctlrs || index >= davinci_soc_info.gpio_ctlrs_num)
-               return NULL;
-
-       return ctlrs + index;
-}
-
-static inline u32 __gpio_mask(unsigned gpio)
-{
-       return 1 << (gpio % 32);
-}
-
-#endif /* __DAVINCI_DAVINCI_GPIO_H */
diff --git a/arch/arm/mach-davinci/include/mach/gpio.h b/arch/arm/mach-davinci/include/mach/gpio.h
deleted file mode 100644 (file)
index 960e9de..0000000
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- * TI DaVinci GPIO Support
- *
- * Copyright (c) 2006 David Brownell
- * Copyright (c) 2007, MontaVista Software, Inc. <source@mvista.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- */
-
-#ifndef        __DAVINCI_GPIO_H
-#define        __DAVINCI_GPIO_H
-
-#include <asm-generic/gpio.h>
-
-#define __ARM_GPIOLIB_COMPLEX
-
-/* The inline versions use the static inlines in the driver header */
-#include "gpio-davinci.h"
-
-/*
- * The get/set/clear functions will inline when called with constant
- * parameters referencing built-in GPIOs, for low-overhead bitbanging.
- *
- * gpio_set_value() will inline only on traditional Davinci style controllers
- * with distinct set/clear registers.
- *
- * Otherwise, calls with variable parameters or referencing external
- * GPIOs (e.g. on GPIO expander chips) use outlined functions.
- */
-static inline void gpio_set_value(unsigned gpio, int value)
-{
-       if (__builtin_constant_p(value) && gpio < davinci_soc_info.gpio_num) {
-               struct davinci_gpio_controller *ctlr;
-               u32                             mask;
-
-               ctlr = __gpio_to_controller(gpio);
-
-               if (ctlr->set_data != ctlr->clr_data) {
-                       mask = __gpio_mask(gpio);
-                       if (value)
-                               __raw_writel(mask, ctlr->set_data);
-                       else
-                               __raw_writel(mask, ctlr->clr_data);
-                       return;
-               }
-       }
-
-       __gpio_set_value(gpio, value);
-}
-
-/* Returns zero or nonzero; works for gpios configured as inputs OR
- * as outputs, at least for built-in GPIOs.
- *
- * NOTE: for built-in GPIOs, changes in reported values are synchronized
- * to the GPIO clock.  This is easily seen after calling gpio_set_value()
- * and then immediately gpio_get_value(), where the gpio_get_value() will
- * return the old value until the GPIO clock ticks and the new value gets
- * latched.
- */
-static inline int gpio_get_value(unsigned gpio)
-{
-       struct davinci_gpio_controller *ctlr;
-
-       if (!__builtin_constant_p(gpio) || gpio >= davinci_soc_info.gpio_num)
-               return __gpio_get_value(gpio);
-
-       ctlr = __gpio_to_controller(gpio);
-       return __gpio_mask(gpio) & __raw_readl(ctlr->in_data);
-}
-
-static inline int gpio_cansleep(unsigned gpio)
-{
-       if (__builtin_constant_p(gpio) && gpio < davinci_soc_info.gpio_num)
-               return 0;
-       else
-               return __gpio_cansleep(gpio);
-}
-
-static inline int irq_to_gpio(unsigned irq)
-{
-       /* don't support the reverse mapping */
-       return -ENOSYS;
-}
-
-#endif                         /* __DAVINCI_GPIO_H */
index 7a55b5c9597124a23345066771b9bb88a5893478..56c6eb5266adf8f5c18629db9cfb65018f5bad50 100644 (file)
@@ -181,7 +181,7 @@ static struct timer_s timers[] = {
                .name      = "clockevent",
                .opts      = TIMER_OPTS_DISABLED,
                .irqaction = {
-                       .flags   = IRQF_DISABLED | IRQF_TIMER,
+                       .flags   = IRQF_TIMER,
                        .handler = timer_interrupt,
                }
        },
@@ -190,7 +190,7 @@ static struct timer_s timers[] = {
                .period     = ~0,
                .opts       = TIMER_OPTS_PERIODIC,
                .irqaction = {
-                       .flags   = IRQF_DISABLED | IRQF_TIMER,
+                       .flags   = IRQF_TIMER,
                        .handler = freerun_interrupt,
                }
        },
@@ -331,7 +331,6 @@ static void davinci_set_mode(enum clock_event_mode mode,
 
 static struct clock_event_device clockevent_davinci = {
        .features       = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT,
-       .shift          = 32,
        .set_next_event = davinci_set_next_event,
        .set_mode       = davinci_set_mode,
 };
@@ -397,14 +396,10 @@ void __init davinci_timer_init(void)
 
        /* setup clockevent */
        clockevent_davinci.name = id_to_name[timers[TID_CLOCKEVENT].id];
-       clockevent_davinci.mult = div_sc(davinci_clock_tick_rate, NSEC_PER_SEC,
-                                        clockevent_davinci.shift);
-       clockevent_davinci.max_delta_ns =
-               clockevent_delta2ns(0xfffffffe, &clockevent_davinci);
-       clockevent_davinci.min_delta_ns = 50000; /* 50 usec */
 
        clockevent_davinci.cpumask = cpumask_of(0);
-       clockevents_register_device(&clockevent_davinci);
+       clockevents_config_and_register(&clockevent_davinci,
+                                       davinci_clock_tick_rate, 1, 0xfffffffe);
 
        for (i=0; i< ARRAY_SIZE(timers); i++)
                timer32_config(&timers[i]);
index 49f72a848423a62d3ff44943cfae84751aee09c0..49fa9abd09daec9097c81d58d2633feccd8ec6f4 100644 (file)
 
 #include <linux/init.h>
 #include <linux/clk-provider.h>
-#include <linux/clocksource.h>
-#include <linux/irqchip.h>
 #include <linux/of.h>
 #include <linux/of_platform.h>
-#include <linux/platform_data/usb-ehci-orion.h>
 #include <asm/hardware/cache-tauros2.h>
 #include <asm/mach/arch.h>
 #include <mach/dove.h>
 #include <mach/pm.h>
 #include <plat/common.h>
-#include <plat/irq.h>
 #include "common.h"
 
-/*
- * There are still devices that doesn't even know about DT,
- * get clock gates here and add a clock lookup.
- */
-static void __init dove_legacy_clk_init(void)
-{
-       struct device_node *np = of_find_compatible_node(NULL, NULL,
-                                        "marvell,dove-gating-clock");
-       struct of_phandle_args clkspec;
-
-       clkspec.np = np;
-       clkspec.args_count = 1;
-
-       clkspec.args[0] = CLOCK_GATING_BIT_PCIE0;
-       orion_clkdev_add("0", "pcie",
-                        of_clk_get_from_provider(&clkspec));
-
-       clkspec.args[0] = CLOCK_GATING_BIT_PCIE1;
-       orion_clkdev_add("1", "pcie",
-                        of_clk_get_from_provider(&clkspec));
-}
-
-static void __init dove_dt_time_init(void)
-{
-       of_clk_init(NULL);
-       clocksource_of_init();
-}
-
-static void __init dove_dt_init_early(void)
-{
-       mvebu_mbus_init("marvell,dove-mbus",
-                       BRIDGE_WINS_BASE, BRIDGE_WINS_SZ,
-                       DOVE_MC_WINS_BASE, DOVE_MC_WINS_SZ);
-}
-
 static void __init dove_dt_init(void)
 {
        pr_info("Dove 88AP510 SoC\n");
@@ -65,14 +26,7 @@ static void __init dove_dt_init(void)
 #ifdef CONFIG_CACHE_TAUROS2
        tauros2_init(0);
 #endif
-       dove_setup_cpu_wins();
-
-       /* Setup clocks for legacy devices */
-       dove_legacy_clk_init();
-
-       /* Internal devices not ported to DT yet */
-       dove_pcie_init(1, 1);
-
+       BUG_ON(mvebu_mbus_dt_init());
        of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
 }
 
@@ -83,8 +37,6 @@ static const char * const dove_dt_board_compat[] = {
 
 DT_MACHINE_START(DOVE_DT, "Marvell Dove (Flattened Device Tree)")
        .map_io         = dove_map_io,
-       .init_early     = dove_dt_init_early,
-       .init_time      = dove_dt_time_init,
        .init_machine   = dove_dt_init,
        .restart        = dove_restart,
        .dt_compat      = dove_dt_board_compat,
index c17407b16d7c687292fa6e064978d9ca1699ea0a..61d2906ccefb3660b3061bb1782576bd0a3ec78e 100644 (file)
@@ -26,8 +26,6 @@
 #include <linux/export.h>
 #include <linux/irqdomain.h>
 #include <linux/of_address.h>
-#include <linux/clocksource.h>
-#include <linux/clk-provider.h>
 #include <linux/irqchip/arm-gic.h>
 #include <linux/irqchip/chained_irq.h>
 #include <linux/platform_device.h>
@@ -378,12 +376,6 @@ static void __init exynos5_map_io(void)
                iotable_init(exynos5250_iodesc, ARRAY_SIZE(exynos5250_iodesc));
 }
 
-void __init exynos_init_time(void)
-{
-       of_clk_init(NULL);
-       clocksource_of_init();
-}
-
 struct bus_type exynos_subsys = {
        .name           = "exynos-core",
        .dev_name       = "exynos-core",
index b2ac1885d381d6581717a111a92f6cec25723abe..ff9b6a9419b01dfe1f6a0b9e0c42f6bcdaebee18 100644 (file)
@@ -16,7 +16,6 @@
 #include <linux/of.h>
 
 void mct_init(void __iomem *base, int irq_g0, int irq_l0, int irq_l1);
-void exynos_init_time(void);
 
 struct map_desc;
 void exynos_init_io(void);
index 53a3dc37a7303b0a5bbdbdc202fbe211e6b0dd9e..7b441c31f516b79cf595528132f1ebd17e7e4e57 100644 (file)
@@ -16,7 +16,6 @@
 #include <linux/of_fdt.h>
 #include <linux/serial_core.h>
 #include <linux/memblock.h>
-#include <linux/clocksource.h>
 
 #include <asm/mach/arch.h>
 #include <plat/mfc.h>
@@ -56,7 +55,6 @@ DT_MACHINE_START(EXYNOS4210_DT, "Samsung Exynos4 (Flattened Device Tree)")
        .init_early     = exynos_firmware_init,
        .init_machine   = exynos4_dt_machine_init,
        .init_late      = exynos_init_late,
-       .init_time      = exynos_init_time,
        .dt_compat      = exynos4_dt_compat,
        .restart        = exynos4_restart,
        .reserve        = exynos4_reserve,
index c9f7dd1cdc8f9fd0f7a9c75fd4bb625ad42366f7..962b049822500dfcceba6bc79a1f7820885a2364 100644 (file)
@@ -13,7 +13,6 @@
 #include <linux/of_fdt.h>
 #include <linux/memblock.h>
 #include <linux/io.h>
-#include <linux/clocksource.h>
 
 #include <asm/mach/arch.h>
 #include <mach/regs-pmu.h>
@@ -78,7 +77,6 @@ DT_MACHINE_START(EXYNOS5_DT, "SAMSUNG EXYNOS5 (Flattened Device Tree)")
        .map_io         = exynos_init_io,
        .init_machine   = exynos5_dt_machine_init,
        .init_late      = exynos_init_late,
-       .init_time      = exynos_init_time,
        .dt_compat      = exynos5_dt_compat,
        .restart        = exynos5_restart,
        .reserve        = exynos5_reserve,
index e2ca238cf0ea7fef2d22d027eb04550356cbba26..92d2ad25d463fcc8a43411420e4ebb06ba42852c 100644 (file)
@@ -10,9 +10,9 @@ config ARCH_HIGHBANK
        select ARM_ERRATA_775420
        select ARM_ERRATA_798181 if SMP
        select ARM_GIC
+       select ARM_PSCI
        select ARM_TIMER_SP804
        select CACHE_L2X0
-       select CLKDEV_LOOKUP
        select COMMON_CLK
        select CPU_V7
        select GENERIC_CLOCKEVENTS
index 8a1ef576d79fd3e88960e2ac1f1113e7ad698134..55840f414d3e04125f8c730ee916589e6eecb1fc 100644 (file)
@@ -3,6 +3,4 @@ obj-y                                   := highbank.o system.o smc.o
 plus_sec := $(call as-instr,.arch_extension sec,+sec)
 AFLAGS_smc.o                           :=-Wa,-march=armv7-a$(plus_sec)
 
-obj-$(CONFIG_SMP)                      += platsmp.o
-obj-$(CONFIG_HOTPLUG_CPU)              += hotplug.o
 obj-$(CONFIG_PM_SLEEP)                 += pm.o
index aea1ec5ab6f8ec51b318ef617e2b2cefebca3df4..7ec5edcd1336c06e7718517ce8fc9cc5b8ef213d 100644 (file)
@@ -3,7 +3,6 @@
 
 #include <linux/reboot.h>
 
-extern void highbank_set_cpu_jump(int cpu, void *jump_addr);
 extern void highbank_restart(enum reboot_mode, const char *);
 extern void __iomem *scu_base_addr;
 
@@ -14,8 +13,5 @@ static inline void highbank_pm_init(void) {}
 #endif
 
 extern void highbank_smc1(int fn, int arg);
-extern void highbank_cpu_die(unsigned int cpu);
-
-extern struct smp_operations highbank_smp_ops;
 
 #endif
index 8e63ccdb0de3c9c80923e46eadec91e6e9e1689e..b3d7e5634b83cb02ce568040099027007820a45b 100644 (file)
 #include <linux/of_platform.h>
 #include <linux/of_address.h>
 #include <linux/amba/bus.h>
-#include <linux/clk-provider.h>
+#include <linux/platform_device.h>
 
-#include <asm/cacheflush.h>
-#include <asm/cputype.h>
-#include <asm/smp_plat.h>
+#include <asm/psci.h>
 #include <asm/hardware/cache-l2x0.h>
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
@@ -49,17 +47,6 @@ static void __init highbank_scu_map_io(void)
        scu_base_addr = ioremap(base, SZ_4K);
 }
 
-#define HB_JUMP_TABLE_PHYS(cpu)                (0x40 + (0x10 * (cpu)))
-#define HB_JUMP_TABLE_VIRT(cpu)                phys_to_virt(HB_JUMP_TABLE_PHYS(cpu))
-
-void highbank_set_cpu_jump(int cpu, void *jump_addr)
-{
-       cpu = MPIDR_AFFINITY_LEVEL(cpu_logical_map(cpu), 0);
-       writel(virt_to_phys(jump_addr), HB_JUMP_TABLE_VIRT(cpu));
-       __cpuc_flush_dcache_area(HB_JUMP_TABLE_VIRT(cpu), 16);
-       outer_clean_range(HB_JUMP_TABLE_PHYS(cpu),
-                         HB_JUMP_TABLE_PHYS(cpu) + 15);
-}
 
 static void highbank_l2x0_disable(void)
 {
@@ -83,20 +70,6 @@ static void __init highbank_init_irq(void)
        }
 }
 
-static void __init highbank_timer_init(void)
-{
-       struct device_node *np;
-
-       /* Map system registers */
-       np = of_find_compatible_node(NULL, NULL, "calxeda,hb-sregs");
-       sregs_base = of_iomap(np, 0);
-       WARN_ON(!sregs_base);
-
-       of_clk_init(NULL);
-
-       clocksource_of_init();
-}
-
 static void highbank_power_off(void)
 {
        highbank_set_pwr_shutdown();
@@ -153,8 +126,19 @@ static struct notifier_block highbank_platform_nb = {
        .notifier_call = highbank_platform_notifier,
 };
 
+static struct platform_device highbank_cpuidle_device = {
+       .name = "cpuidle-calxeda",
+};
+
 static void __init highbank_init(void)
 {
+       struct device_node *np;
+
+       /* Map system registers */
+       np = of_find_compatible_node(NULL, NULL, "calxeda,hb-sregs");
+       sregs_base = of_iomap(np, 0);
+       WARN_ON(!sregs_base);
+
        pm_power_off = highbank_power_off;
        highbank_pm_init();
 
@@ -162,6 +146,9 @@ static void __init highbank_init(void)
        bus_register_notifier(&amba_bustype, &highbank_amba_nb);
 
        of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
+
+       if (psci_ops.cpu_suspend)
+               platform_device_register(&highbank_cpuidle_device);
 }
 
 static const char *highbank_match[] __initconst = {
@@ -174,9 +161,7 @@ DT_MACHINE_START(HIGHBANK, "Highbank")
 #if defined(CONFIG_ZONE_DMA) && defined(CONFIG_ARM_LPAE)
        .dma_zone_size  = (4ULL * SZ_1G),
 #endif
-       .smp            = smp_ops(highbank_smp_ops),
        .init_irq       = highbank_init_irq,
-       .init_time      = highbank_timer_init,
        .init_machine   = highbank_init,
        .dt_compat      = highbank_match,
        .restart        = highbank_restart,
diff --git a/arch/arm/mach-highbank/hotplug.c b/arch/arm/mach-highbank/hotplug.c
deleted file mode 100644 (file)
index a019e4e..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Copyright 2011 Calxeda, Inc.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms and conditions of the GNU General Public License,
- * version 2, as published by the Free Software Foundation.
- *
- * This program is distributed in the hope it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License along with
- * this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-#include <linux/kernel.h>
-#include <asm/cacheflush.h>
-
-#include "core.h"
-#include "sysregs.h"
-
-extern void secondary_startup(void);
-
-/*
- * platform-specific code to shutdown a CPU
- *
- */
-void __ref highbank_cpu_die(unsigned int cpu)
-{
-       highbank_set_cpu_jump(cpu, phys_to_virt(0));
-
-       flush_cache_louis();
-       highbank_set_core_pwr();
-
-       while (1)
-               cpu_do_idle();
-}
diff --git a/arch/arm/mach-highbank/platsmp.c b/arch/arm/mach-highbank/platsmp.c
deleted file mode 100644 (file)
index 32d75cf..0000000
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * Copyright 2010-2011 Calxeda, Inc.
- * Based on platsmp.c, Copyright (C) 2002 ARM Ltd.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms and conditions of the GNU General Public License,
- * version 2, as published by the Free Software Foundation.
- *
- * This program is distributed in the hope it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License along with
- * this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-#include <linux/init.h>
-#include <linux/smp.h>
-#include <linux/io.h>
-
-#include <asm/smp_scu.h>
-
-#include "core.h"
-
-extern void secondary_startup(void);
-
-static int highbank_boot_secondary(unsigned int cpu, struct task_struct *idle)
-{
-       highbank_set_cpu_jump(cpu, secondary_startup);
-       arch_send_wakeup_ipi_mask(cpumask_of(cpu));
-       return 0;
-}
-
-/*
- * Initialise the CPU possible map early - this describes the CPUs
- * which may be present or become present in the system.
- */
-static void __init highbank_smp_init_cpus(void)
-{
-       unsigned int i, ncores = 4;
-
-       /* sanity check */
-       if (ncores > NR_CPUS) {
-               printk(KERN_WARNING
-                      "highbank: no. of cores (%d) greater than configured "
-                      "maximum of %d - clipping\n",
-                      ncores, NR_CPUS);
-               ncores = NR_CPUS;
-       }
-
-       for (i = 0; i < ncores; i++)
-               set_cpu_possible(i, true);
-}
-
-static void __init highbank_smp_prepare_cpus(unsigned int max_cpus)
-{
-       if (scu_base_addr)
-               scu_enable(scu_base_addr);
-}
-
-struct smp_operations highbank_smp_ops __initdata = {
-       .smp_init_cpus          = highbank_smp_init_cpus,
-       .smp_prepare_cpus       = highbank_smp_prepare_cpus,
-       .smp_boot_secondary     = highbank_boot_secondary,
-#ifdef CONFIG_HOTPLUG_CPU
-       .cpu_die                = highbank_cpu_die,
-#endif
-};
index 04eddb4f438095da0fff7caee5f4561b7fe2c1f3..7f2bd85eb9350de89cb8311e5a9926830bbd9f54 100644 (file)
 
 #include <linux/cpu_pm.h>
 #include <linux/init.h>
-#include <linux/io.h>
 #include <linux/suspend.h>
 
-#include <asm/cacheflush.h>
-#include <asm/proc-fns.h>
 #include <asm/suspend.h>
-
-#include "core.h"
-#include "sysregs.h"
+#include <asm/psci.h>
 
 static int highbank_suspend_finish(unsigned long val)
 {
-       outer_flush_all();
-       outer_disable();
-
-       highbank_set_pwr_suspend();
-
-       cpu_do_idle();
+       const struct psci_power_state ps = {
+               .type = PSCI_POWER_STATE_TYPE_POWER_DOWN,
+               .affinity_level = 1,
+       };
 
-       highbank_clear_pwr_request();
-       return 0;
+       return psci_ops.cpu_suspend(ps, __pa(cpu_resume));
 }
 
 static int highbank_pm_enter(suspend_state_t state)
@@ -44,15 +36,11 @@ static int highbank_pm_enter(suspend_state_t state)
        cpu_pm_enter();
        cpu_cluster_pm_enter();
 
-       highbank_set_cpu_jump(0, cpu_resume);
        cpu_suspend(0, highbank_suspend_finish);
 
        cpu_cluster_pm_exit();
        cpu_pm_exit();
 
-       highbank_smc1(0x102, 0x1);
-       if (scu_base_addr)
-               scu_enable(scu_base_addr);
        return 0;
 }
 
@@ -63,5 +51,8 @@ static const struct platform_suspend_ops highbank_pm_ops = {
 
 void __init highbank_pm_init(void)
 {
+       if (!psci_ops.cpu_suspend)
+               return;
+
        suspend_set_ops(&highbank_pm_ops);
 }
index 29a8af6922a87eeb445eacc6971c3aaa15f6bcf9..a91909b956017326e02101e528a59e34cde72905 100644 (file)
@@ -4,8 +4,8 @@ config ARCH_MXC
        select ARM_CPU_SUSPEND if PM
        select ARM_PATCH_PHYS_VIRT
        select AUTO_ZRELADDR if !ZBOOT_ROM
-       select CLKDEV_LOOKUP
        select CLKSRC_MMIO
+       select COMMON_CLK
        select GENERIC_ALLOCATOR
        select GENERIC_CLOCKEVENTS
        select GENERIC_IRQ_CHIP
@@ -92,14 +92,12 @@ config MACH_MX27
 config SOC_IMX1
        bool
        select ARCH_MX1
-       select COMMON_CLK
        select CPU_ARM920T
        select IMX_HAVE_IOMUX_V1
        select MXC_AVIC
 
 config SOC_IMX21
        bool
-       select COMMON_CLK
        select CPU_ARM926T
        select IMX_HAVE_IOMUX_V1
        select MXC_AVIC
@@ -108,7 +106,6 @@ config SOC_IMX25
        bool
        select ARCH_MX25
        select ARCH_MXC_IOMUX_V3
-       select COMMON_CLK
        select CPU_ARM926T
        select MXC_AVIC
 
@@ -116,7 +113,6 @@ config SOC_IMX27
        bool
        select ARCH_HAS_CPUFREQ
        select ARCH_HAS_OPP
-       select COMMON_CLK
        select CPU_ARM926T
        select IMX_HAVE_IOMUX_V1
        select MACH_MX27
@@ -124,7 +120,6 @@ config SOC_IMX27
 
 config SOC_IMX31
        bool
-       select COMMON_CLK
        select CPU_V6
        select IMX_HAVE_PLATFORM_MXC_RNGA
        select MXC_AVIC
@@ -133,7 +128,6 @@ config SOC_IMX31
 config SOC_IMX35
        bool
        select ARCH_MXC_IOMUX_V3
-       select COMMON_CLK
        select CPU_V6K
        select HAVE_EPIT
        select MXC_AVIC
@@ -144,7 +138,6 @@ config SOC_IMX5
        select ARCH_HAS_CPUFREQ
        select ARCH_HAS_OPP
        select ARCH_MXC_IOMUX_V3
-       select COMMON_CLK
        select CPU_V7
        select MXC_TZIC
 
@@ -791,7 +784,6 @@ config SOC_IMX6Q
        select ARM_ERRATA_764369 if SMP
        select ARM_ERRATA_775420
        select ARM_GIC
-       select COMMON_CLK
        select CPU_V7
        select HAVE_ARM_SCU if SMP
        select HAVE_ARM_TWD if SMP
index 7c0dc4540aa4785270784e3f62ce2b643fd95664..ceaac9cd7b4230859143d951af389908744b7cc2 100644 (file)
@@ -11,6 +11,7 @@
 #include <linux/clk.h>
 #include <linux/io.h>
 #include <linux/clkdev.h>
+#include <linux/clk-provider.h>
 #include <linux/of.h>
 #include <linux/err.h>
 
@@ -131,8 +132,6 @@ static void __init mx5_clocks_common_init(unsigned long rate_ckil,
 {
        int i;
 
-       of_clk_init(NULL);
-
        clk[dummy] = imx_clk_fixed("dummy", 0);
        clk[ckil] = imx_obtain_fixed_clock("ckil", rate_ckil);
        clk[osc] = imx_obtain_fixed_clock("osc", rate_osc);
@@ -465,12 +464,16 @@ int __init mx51_clocks_init(unsigned long rate_ckil, unsigned long rate_osc,
        return 0;
 }
 
-int __init mx53_clocks_init(unsigned long rate_ckil, unsigned long rate_osc,
-                       unsigned long rate_ckih1, unsigned long rate_ckih2)
+static void __init mx51_clocks_init_dt(struct device_node *np)
+{
+       mx51_clocks_init(0, 0, 0, 0);
+}
+CLK_OF_DECLARE(imx51_ccm, "fsl,imx51-ccm", mx51_clocks_init_dt);
+
+static void __init mx53_clocks_init(struct device_node *np)
 {
        int i;
        unsigned long r;
-       struct device_node *np;
 
        clk[pll1_sw] = imx_clk_pllv2("pll1_sw", "osc", MX53_DPLL1_BASE);
        clk[pll2_sw] = imx_clk_pllv2("pll2_sw", "osc", MX53_DPLL2_BASE);
@@ -529,12 +532,11 @@ int __init mx53_clocks_init(unsigned long rate_ckil, unsigned long rate_osc,
                        pr_err("i.MX53 clk %d: register failed with %ld\n",
                                i, PTR_ERR(clk[i]));
 
-       np = of_find_compatible_node(NULL, NULL, "fsl,imx53-ccm");
        clk_data.clks = clk;
        clk_data.clk_num = ARRAY_SIZE(clk);
        of_clk_add_provider(np, of_clk_src_onecell_get, &clk_data);
 
-       mx5_clocks_common_init(rate_ckil, rate_osc, rate_ckih1, rate_ckih2);
+       mx5_clocks_common_init(0, 0, 0, 0);
 
        clk_register_clkdev(clk[vpu_gate], NULL, "imx53-vpu.0");
        clk_register_clkdev(clk[i2c3_gate], NULL, "imx21-i2c.2");
@@ -566,16 +568,5 @@ int __init mx53_clocks_init(unsigned long rate_ckil, unsigned long rate_osc,
 
        r = clk_round_rate(clk[usboh3_per_gate], 54000000);
        clk_set_rate(clk[usboh3_per_gate], r);
-
-       return 0;
-}
-
-int __init mx51_clocks_init_dt(void)
-{
-       return mx51_clocks_init(0, 0, 0, 0);
-}
-
-int __init mx53_clocks_init_dt(void)
-{
-       return mx53_clocks_init(0, 0, 0, 0);
 }
+CLK_OF_DECLARE(imx53_ccm, "fsl,imx53-ccm", mx53_clocks_init);
index 4517fd760bfc6d0c55a160f7fa22f8f3e1ae778c..28e8ca0871e8fd77295218a1386baee463d648e2 100644 (file)
@@ -63,13 +63,9 @@ extern int mx31_clocks_init(unsigned long fref);
 extern int mx35_clocks_init(void);
 extern int mx51_clocks_init(unsigned long ckil, unsigned long osc,
                        unsigned long ckih1, unsigned long ckih2);
-extern int mx53_clocks_init(unsigned long ckil, unsigned long osc,
-                       unsigned long ckih1, unsigned long ckih2);
 extern int mx25_clocks_init_dt(void);
 extern int mx27_clocks_init_dt(void);
 extern int mx31_clocks_init_dt(void);
-extern int mx51_clocks_init_dt(void);
-extern int mx53_clocks_init_dt(void);
 extern struct platform_device *mxc_register_gpio(char *name, int id,
        resource_size_t iobase, resource_size_t iosize, int irq, int irq_high);
 extern void mxc_set_cpu_type(unsigned int type);
index 53e43e579dd79afbb755360d7ff8f8936dcc4d86..bece8a65e6f01893e9e58df0799b580b8c356365 100644 (file)
@@ -34,17 +34,11 @@ static const char *imx51_dt_board_compat[] __initdata = {
        NULL
 };
 
-static void __init imx51_timer_init(void)
-{
-       mx51_clocks_init_dt();
-}
-
 DT_MACHINE_START(IMX51_DT, "Freescale i.MX51 (Device Tree Support)")
        .map_io         = mx51_map_io,
        .init_early     = imx51_init_early,
        .init_irq       = mx51_init_irq,
        .handle_irq     = imx51_handle_irq,
-       .init_time      = imx51_timer_init,
        .init_machine   = imx51_dt_init,
        .init_late      = imx51_init_late,
        .dt_compat      = imx51_dt_board_compat,
index 98c58944015a596db1431e770f5a5c9765300227..c9c4d8d96931daf05794c4bab73facedb9fb943c 100644 (file)
@@ -36,17 +36,11 @@ static const char *imx53_dt_board_compat[] __initdata = {
        NULL
 };
 
-static void __init imx53_timer_init(void)
-{
-       mx53_clocks_init_dt();
-}
-
 DT_MACHINE_START(IMX53_DT, "Freescale i.MX53 (Device Tree Support)")
        .map_io         = mx53_map_io,
        .init_early     = imx53_init_early,
        .init_irq       = mx53_init_irq,
        .handle_irq     = imx53_handle_irq,
-       .init_time      = imx53_timer_init,
        .init_machine   = imx53_dt_init,
        .init_late      = imx53_init_late,
        .dt_compat      = imx53_dt_board_compat,
index 699aabe296e1e62b91f7ca1b0a65c5e635ed8515..eae56423f0aeebf0c8ad82a698d6f4684b4238f7 100644 (file)
@@ -11,9 +11,7 @@
  */
 
 #include <linux/clk.h>
-#include <linux/clk-provider.h>
 #include <linux/clkdev.h>
-#include <linux/clocksource.h>
 #include <linux/cpu.h>
 #include <linux/delay.h>
 #include <linux/export.h>
@@ -192,6 +190,9 @@ static void __init imx6q_1588_init(void)
 
 static void __init imx6q_init_machine(void)
 {
+       imx_print_silicon_rev(cpu_is_imx6dl() ? "i.MX6DL" : "i.MX6Q",
+                             imx6q_revision());
+
        imx6q_enet_phy_init();
 
        of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
@@ -293,14 +294,6 @@ static void __init imx6q_init_irq(void)
        irqchip_init();
 }
 
-static void __init imx6q_timer_init(void)
-{
-       of_clk_init(NULL);
-       clocksource_of_init();
-       imx_print_silicon_rev(cpu_is_imx6dl() ? "i.MX6DL" : "i.MX6Q",
-                             imx6q_revision());
-}
-
 static const char *imx6q_dt_compat[] __initdata = {
        "fsl,imx6dl",
        "fsl,imx6q",
@@ -311,7 +304,6 @@ DT_MACHINE_START(IMX6Q, "Freescale i.MX6 Quad/DualLite (Device Tree)")
        .smp            = smp_ops(imx_smp_ops),
        .map_io         = imx6q_map_io,
        .init_irq       = imx6q_init_irq,
-       .init_time      = imx6q_timer_init,
        .init_machine   = imx6q_init_machine,
        .init_late      = imx6q_init_late,
        .dt_compat      = imx6q_dt_compat,
index 0d75dc54f71508fa48cf3a3096931aed8db31bce..c70bd7c649746fdab1022a2c67af0df84d230267 100644 (file)
@@ -7,7 +7,6 @@
  *
  */
 
-#include <linux/clk-provider.h>
 #include <linux/irqchip.h>
 #include <linux/of.h>
 #include <linux/of_platform.h>
@@ -31,11 +30,6 @@ static void __init imx6sl_init_irq(void)
        irqchip_init();
 }
 
-static void __init imx6sl_timer_init(void)
-{
-       of_clk_init(NULL);
-}
-
 static const char *imx6sl_dt_compat[] __initdata = {
        "fsl,imx6sl",
        NULL,
@@ -44,7 +38,6 @@ static const char *imx6sl_dt_compat[] __initdata = {
 DT_MACHINE_START(IMX6SL, "Freescale i.MX6 SoloLite (Device Tree)")
        .map_io         = debug_ll_io_init,
        .init_irq       = imx6sl_init_irq,
-       .init_time      = imx6sl_timer_init,
        .init_machine   = imx6sl_init_machine,
        .dt_compat      = imx6sl_dt_compat,
        .restart        = mxc_restart,
index 816991deb9b86ef9ba61139cf2ae17257f9b89a5..af0cb8a9dc4898827b1c569506b761fb4b476787 100644 (file)
@@ -8,9 +8,7 @@
  */
 
 #include <linux/of_platform.h>
-#include <linux/clocksource.h>
 #include <linux/irqchip.h>
-#include <linux/clk-provider.h>
 #include <asm/mach/arch.h>
 #include <asm/hardware/cache-l2x0.h>
 
@@ -28,12 +26,6 @@ static void __init vf610_init_irq(void)
        irqchip_init();
 }
 
-static void __init vf610_init_time(void)
-{
-       of_clk_init(NULL);
-       clocksource_of_init();
-}
-
 static const char *vf610_dt_compat[] __initdata = {
        "fsl,vf610",
        NULL,
@@ -41,7 +33,6 @@ static const char *vf610_dt_compat[] __initdata = {
 
 DT_MACHINE_START(VYBRID_VF610, "Freescale Vybrid VF610 (Device Tree)")
        .init_irq       = vf610_init_irq,
-       .init_time      = vf610_init_time,
        .init_machine   = vf610_init_machine,
        .dt_compat      = vf610_dt_compat,
        .restart        = mxc_restart,
similarity index 88%
rename from arch/arm/mach-integrator/include/mach/cm.h
rename to arch/arm/mach-integrator/cm.h
index 202e6a57f1006a3b1ae820d4f229007131bbee84..4ecff7bff482e4b6d2108d5f1ec1d417d884ee3c 100644 (file)
@@ -1,9 +1,12 @@
 /*
- * update the core module control register.
+ * access the core module control register.
  */
+u32 cm_get(void);
 void cm_control(u32, u32);
 
-#define CM_CTRL        __io_address(INTEGRATOR_HDR_CTRL)
+struct device_node;
+void cm_init(void);
+void cm_clear_irqs(void);
 
 #define CM_CTRL_LED                    (1 << 0)
 #define CM_CTRL_nMBDET                 (1 << 1)
index 4cdfd7365925f76ce9c1b8b021ce16b566855397..00ddf20ed91b384d892248238afe6f008758e303 100644 (file)
 #include <linux/amba/serial.h>
 #include <linux/io.h>
 #include <linux/stat.h>
+#include <linux/of.h>
+#include <linux/of_address.h>
 
 #include <mach/hardware.h>
 #include <mach/platform.h>
-#include <mach/cm.h>
-#include <mach/irqs.h>
 
 #include <asm/mach-types.h>
 #include <asm/mach/time.h>
 #include <asm/pgtable.h>
 
+#include "cm.h"
 #include "common.h"
 
-#ifdef CONFIG_ATAGS
-
-#define INTEGRATOR_RTC_IRQ     { IRQ_RTCINT }
-#define INTEGRATOR_UART0_IRQ   { IRQ_UARTINT0 }
-#define INTEGRATOR_UART1_IRQ   { IRQ_UARTINT1 }
-#define KMI0_IRQ               { IRQ_KMIINT0 }
-#define KMI1_IRQ               { IRQ_KMIINT1 }
-
-static AMBA_APB_DEVICE(rtc, "rtc", 0,
-       INTEGRATOR_RTC_BASE, INTEGRATOR_RTC_IRQ, NULL);
-
-static AMBA_APB_DEVICE(uart0, "uart0", 0,
-       INTEGRATOR_UART0_BASE, INTEGRATOR_UART0_IRQ, NULL);
-
-static AMBA_APB_DEVICE(uart1, "uart1", 0,
-       INTEGRATOR_UART1_BASE, INTEGRATOR_UART1_IRQ, NULL);
-
-static AMBA_APB_DEVICE(kmi0, "kmi0", 0, KMI0_BASE, KMI0_IRQ, NULL);
-static AMBA_APB_DEVICE(kmi1, "kmi1", 0, KMI1_BASE, KMI1_IRQ, NULL);
-
-static struct amba_device *amba_devs[] __initdata = {
-       &rtc_device,
-       &uart0_device,
-       &uart1_device,
-       &kmi0_device,
-       &kmi1_device,
-};
+static DEFINE_RAW_SPINLOCK(cm_lock);
+static void __iomem *cm_base;
 
-int __init integrator_init(bool is_cp)
+/**
+ * cm_get - get the value from the CM_CTRL register
+ */
+u32 cm_get(void)
 {
-       int i;
-
-       /*
-        * The Integrator/AP lacks necessary AMBA PrimeCell IDs, so we need to
-        * hard-code them. The Integator/CP and forward have proper cell IDs.
-        * Else we leave them undefined to the bus driver can autoprobe them.
-        */
-       if (!is_cp && IS_ENABLED(CONFIG_ARCH_INTEGRATOR_AP)) {
-               rtc_device.periphid     = 0x00041030;
-               uart0_device.periphid   = 0x00041010;
-               uart1_device.periphid   = 0x00041010;
-               kmi0_device.periphid    = 0x00041050;
-               kmi1_device.periphid    = 0x00041050;
-               uart0_device.dev.platform_data = &ap_uart_data;
-               uart1_device.dev.platform_data = &ap_uart_data;
-       }
-
-       for (i = 0; i < ARRAY_SIZE(amba_devs); i++) {
-               struct amba_device *d = amba_devs[i];
-               amba_device_register(d, &iomem_resource);
-       }
-
-       return 0;
+       return readl(cm_base + INTEGRATOR_HDR_CTRL_OFFSET);
 }
 
-#endif
-
-static DEFINE_RAW_SPINLOCK(cm_lock);
-
 /**
  * cm_control - update the CM_CTRL register.
  * @mask: bits to change
@@ -104,12 +57,80 @@ void cm_control(u32 mask, u32 set)
        u32 val;
 
        raw_spin_lock_irqsave(&cm_lock, flags);
-       val = readl(CM_CTRL) & ~mask;
-       writel(val | set, CM_CTRL);
+       val = readl(cm_base + INTEGRATOR_HDR_CTRL_OFFSET) & ~mask;
+       writel(val | set, cm_base + INTEGRATOR_HDR_CTRL_OFFSET);
        raw_spin_unlock_irqrestore(&cm_lock, flags);
 }
 
-EXPORT_SYMBOL(cm_control);
+static const char *integrator_arch_str(u32 id)
+{
+       switch ((id >> 16) & 0xff) {
+       case 0x00:
+               return "ASB little-endian";
+       case 0x01:
+               return "AHB little-endian";
+       case 0x03:
+               return "AHB-Lite system bus, bi-endian";
+       case 0x04:
+               return "AHB";
+       case 0x08:
+               return "AHB system bus, ASB processor bus";
+       default:
+               return "Unknown";
+       }
+}
+
+static const char *integrator_fpga_str(u32 id)
+{
+       switch ((id >> 12) & 0xf) {
+       case 0x01:
+               return "XC4062";
+       case 0x02:
+               return "XC4085";
+       case 0x03:
+               return "XVC600";
+       case 0x04:
+               return "EPM7256AE (Altera PLD)";
+       default:
+               return "Unknown";
+       }
+}
+
+void cm_clear_irqs(void)
+{
+       /* disable core module IRQs */
+       writel(0xffffffffU, cm_base + INTEGRATOR_HDR_IC_OFFSET +
+               IRQ_ENABLE_CLEAR);
+}
+
+static const struct of_device_id cm_match[] = {
+       { .compatible = "arm,core-module-integrator"},
+       { },
+};
+
+void cm_init(void)
+{
+       struct device_node *cm = of_find_matching_node(NULL, cm_match);
+       u32 val;
+
+       if (!cm) {
+               pr_crit("no core module node found in device tree\n");
+               return;
+       }
+       cm_base = of_iomap(cm, 0);
+       if (!cm_base) {
+               pr_crit("could not remap core module\n");
+               return;
+       }
+       cm_clear_irqs();
+       val = readl(cm_base + INTEGRATOR_HDR_ID_OFFSET);
+       pr_info("Detected ARM core module:\n");
+       pr_info("    Manufacturer: %02x\n", (val >> 24));
+       pr_info("    Architecture: %s\n", integrator_arch_str(val));
+       pr_info("    FPGA: %s\n", integrator_fpga_str(val));
+       pr_info("    Build: %02x\n", (val >> 4) & 0xFF);
+       pr_info("    Rev: %c\n", ('A' + (val & 0x03)));
+}
 
 /*
  * We need to stop things allocating the low memory; ideally we need a
@@ -145,27 +166,7 @@ static ssize_t intcp_get_arch(struct device *dev,
                              struct device_attribute *attr,
                              char *buf)
 {
-       const char *arch;
-
-       switch ((integrator_id >> 16) & 0xff) {
-       case 0x00:
-               arch = "ASB little-endian";
-               break;
-       case 0x01:
-               arch = "AHB little-endian";
-               break;
-       case 0x03:
-               arch = "AHB-Lite system bus, bi-endian";
-               break;
-       case 0x04:
-               arch = "AHB";
-               break;
-       default:
-               arch = "Unknown";
-               break;
-       }
-
-       return sprintf(buf, "%s\n", arch);
+       return sprintf(buf, "%s\n", integrator_arch_str(integrator_id));
 }
 
 static struct device_attribute intcp_arch_attr =
@@ -175,24 +176,7 @@ static ssize_t intcp_get_fpga(struct device *dev,
                              struct device_attribute *attr,
                              char *buf)
 {
-       const char *fpga;
-
-       switch ((integrator_id >> 12) & 0xf) {
-       case 0x01:
-               fpga = "XC4062";
-               break;
-       case 0x02:
-               fpga = "XC4085";
-               break;
-       case 0x04:
-               fpga = "EPM7256AE (Altera PLD)";
-               break;
-       default:
-               fpga = "Unknown";
-               break;
-       }
-
-       return sprintf(buf, "%s\n", fpga);
+       return sprintf(buf, "%s\n", integrator_fpga_str(integrator_id));
 }
 
 static struct device_attribute intcp_fpga_attr =
diff --git a/arch/arm/mach-integrator/include/mach/irqs.h b/arch/arm/mach-integrator/include/mach/irqs.h
deleted file mode 100644 (file)
index eff0ada..0000000
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- *  arch/arm/mach-integrator/include/mach/irqs.h
- *
- *  Copyright (C) 1999 ARM Limited
- *  Copyright (C) 2000 Deep Blue Solutions Ltd.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- */
-
-/*
- * Interrupt numbers, all of the above are just static reservations
- * used so they can be encoded into device resources. They will finally
- * be done away with when switching to device tree.
- */
-#define IRQ_PIC_START                  64
-#define IRQ_SOFTINT                    (IRQ_PIC_START+0)
-#define IRQ_UARTINT0                   (IRQ_PIC_START+1)
-#define IRQ_UARTINT1                   (IRQ_PIC_START+2)
-#define IRQ_KMIINT0                    (IRQ_PIC_START+3)
-#define IRQ_KMIINT1                    (IRQ_PIC_START+4)
-#define IRQ_TIMERINT0                  (IRQ_PIC_START+5)
-#define IRQ_TIMERINT1                  (IRQ_PIC_START+6)
-#define IRQ_TIMERINT2                  (IRQ_PIC_START+7)
-#define IRQ_RTCINT                     (IRQ_PIC_START+8)
-#define IRQ_AP_EXPINT0                 (IRQ_PIC_START+9)
-#define IRQ_AP_EXPINT1                 (IRQ_PIC_START+10)
-#define IRQ_AP_EXPINT2                 (IRQ_PIC_START+11)
-#define IRQ_AP_EXPINT3                 (IRQ_PIC_START+12)
-#define IRQ_AP_PCIINT0                 (IRQ_PIC_START+13)
-#define IRQ_AP_PCIINT1                 (IRQ_PIC_START+14)
-#define IRQ_AP_PCIINT2                 (IRQ_PIC_START+15)
-#define IRQ_AP_PCIINT3                 (IRQ_PIC_START+16)
-#define IRQ_AP_V3INT                   (IRQ_PIC_START+17)
-#define IRQ_AP_CPINT0                  (IRQ_PIC_START+18)
-#define IRQ_AP_CPINT1                  (IRQ_PIC_START+19)
-#define IRQ_AP_LBUSTIMEOUT             (IRQ_PIC_START+20)
-#define IRQ_AP_APCINT                  (IRQ_PIC_START+21)
-#define IRQ_CP_CLCDCINT                        (IRQ_PIC_START+22)
-#define IRQ_CP_MMCIINT0                        (IRQ_PIC_START+23)
-#define IRQ_CP_MMCIINT1                        (IRQ_PIC_START+24)
-#define IRQ_CP_AACIINT                 (IRQ_PIC_START+25)
-#define IRQ_CP_CPPLDINT                        (IRQ_PIC_START+26)
-#define IRQ_CP_ETHINT                  (IRQ_PIC_START+27)
-#define IRQ_CP_TSPENINT                        (IRQ_PIC_START+28)
-#define IRQ_PIC_END                    (IRQ_PIC_START+28)
-
-#define IRQ_CIC_START                  (IRQ_PIC_END+1)
-#define IRQ_CM_SOFTINT                 (IRQ_CIC_START+0)
-#define IRQ_CM_COMMRX                  (IRQ_CIC_START+1)
-#define IRQ_CM_COMMTX                  (IRQ_CIC_START+2)
-#define IRQ_CIC_END                    (IRQ_CIC_START+2)
-
-/*
- * IntegratorCP only
- */
-#define IRQ_SIC_START                  (IRQ_CIC_END+1)
-#define IRQ_SIC_CP_SOFTINT             (IRQ_SIC_START+0)
-#define IRQ_SIC_CP_RI0                 (IRQ_SIC_START+1)
-#define IRQ_SIC_CP_RI1                 (IRQ_SIC_START+2)
-#define IRQ_SIC_CP_CARDIN              (IRQ_SIC_START+3)
-#define IRQ_SIC_CP_LMINT0              (IRQ_SIC_START+4)
-#define IRQ_SIC_CP_LMINT1              (IRQ_SIC_START+5)
-#define IRQ_SIC_CP_LMINT2              (IRQ_SIC_START+6)
-#define IRQ_SIC_CP_LMINT3              (IRQ_SIC_START+7)
-#define IRQ_SIC_CP_LMINT4              (IRQ_SIC_START+8)
-#define IRQ_SIC_CP_LMINT5              (IRQ_SIC_START+9)
-#define IRQ_SIC_CP_LMINT6              (IRQ_SIC_START+10)
-#define IRQ_SIC_CP_LMINT7              (IRQ_SIC_START+11)
-#define IRQ_SIC_END                    (IRQ_SIC_START+11)
index d9e95e612fcbfaecf9855d4a39f5017d236edb6f..d50dc2dbfd89e53571a716b80e01bd567400ea36 100644 (file)
 #include <asm/mach-types.h>
 
 #include <mach/lm.h>
-#include <mach/irqs.h>
 
 #include <asm/mach/arch.h>
 #include <asm/mach/irq.h>
 #include <asm/mach/map.h>
 #include <asm/mach/time.h>
 
+#include "cm.h"
 #include "common.h"
 #include "pci_v3.h"
 
@@ -146,7 +146,7 @@ static int irq_suspend(void)
 static void irq_resume(void)
 {
        /* disable all irq sources */
-       writel(-1, VA_CMIC_BASE + IRQ_ENABLE_CLEAR);
+       cm_clear_irqs();
        writel(-1, VA_IC_BASE + IRQ_ENABLE_CLEAR);
        writel(-1, VA_IC_BASE + FIQ_ENABLE_CLEAR);
 
@@ -402,8 +402,6 @@ void __init ap_init_early(void)
 {
 }
 
-#ifdef CONFIG_OF
-
 static void __init ap_of_timer_init(void)
 {
        struct device_node *node;
@@ -450,8 +448,7 @@ static const struct of_device_id fpga_irq_of_match[] __initconst = {
 
 static void __init ap_init_irq_of(void)
 {
-       /* disable core module IRQs */
-       writel(0xffffffffU, VA_CMIC_BASE + IRQ_ENABLE_CLEAR);
+       cm_init();
        of_irq_init(fpga_irq_of_match);
        integrator_clk_init(false);
 }
@@ -473,6 +470,11 @@ static struct of_dev_auxdata ap_auxdata_lookup[] __initdata = {
        { /* sentinel */ },
 };
 
+static const struct of_device_id ap_syscon_match[] = {
+       { .compatible = "arm,integrator-ap-syscon"},
+       { },
+};
+
 static void __init ap_init_of(void)
 {
        unsigned long sc_dec;
@@ -489,7 +491,8 @@ static void __init ap_init_of(void)
        root = of_find_node_by_path("/");
        if (!root)
                return;
-       syscon = of_find_node_by_path("/syscon");
+
+       syscon = of_find_matching_node(root, ap_syscon_match);
        if (!syscon)
                return;
 
@@ -541,7 +544,7 @@ static void __init ap_init_of(void)
                lmdev->resource.start = 0xc0000000 + 0x10000000 * i;
                lmdev->resource.end = lmdev->resource.start + 0x0fffffff;
                lmdev->resource.flags = IORESOURCE_MEM;
-               lmdev->irq = IRQ_AP_EXPINT0 + i;
+               lmdev->irq = irq_of_parse_and_map(syscon, i);
                lmdev->id = i;
 
                lm_device_register(lmdev);
@@ -564,136 +567,3 @@ DT_MACHINE_START(INTEGRATOR_AP_DT, "ARM Integrator/AP (Device Tree)")
        .restart        = integrator_restart,
        .dt_compat      = ap_dt_board_compat,
 MACHINE_END
-
-#endif
-
-#ifdef CONFIG_ATAGS
-
-/*
- * For the ATAG boot some static mappings are needed. This will
- * go away with the ATAG support down the road.
- */
-
-static struct map_desc ap_io_desc_atag[] __initdata = {
-       {
-               .virtual        = IO_ADDRESS(INTEGRATOR_SC_BASE),
-               .pfn            = __phys_to_pfn(INTEGRATOR_SC_BASE),
-               .length         = SZ_4K,
-               .type           = MT_DEVICE
-       },
-};
-
-static void __init ap_map_io_atag(void)
-{
-       iotable_init(ap_io_desc_atag, ARRAY_SIZE(ap_io_desc_atag));
-       ap_map_io();
-}
-
-/*
- * This is where non-devicetree initialization code is collected and stashed
- * for eventual deletion.
- */
-
-static struct platform_device pci_v3_device = {
-       .name           = "pci-v3",
-       .id             = 0,
-};
-
-static struct resource cfi_flash_resource = {
-       .start          = INTEGRATOR_FLASH_BASE,
-       .end            = INTEGRATOR_FLASH_BASE + INTEGRATOR_FLASH_SIZE - 1,
-       .flags          = IORESOURCE_MEM,
-};
-
-static struct platform_device cfi_flash_device = {
-       .name           = "physmap-flash",
-       .id             = 0,
-       .dev            = {
-               .platform_data  = &ap_flash_data,
-       },
-       .num_resources  = 1,
-       .resource       = &cfi_flash_resource,
-};
-
-static void __init ap_timer_init(void)
-{
-       struct clk *clk;
-       unsigned long rate;
-
-       clk = clk_get_sys("ap_timer", NULL);
-       BUG_ON(IS_ERR(clk));
-       clk_prepare_enable(clk);
-       rate = clk_get_rate(clk);
-
-       writel(0, TIMER0_VA_BASE + TIMER_CTRL);
-       writel(0, TIMER1_VA_BASE + TIMER_CTRL);
-       writel(0, TIMER2_VA_BASE + TIMER_CTRL);
-
-       integrator_clocksource_init(rate, (void __iomem *)TIMER2_VA_BASE);
-       integrator_clockevent_init(rate, (void __iomem *)TIMER1_VA_BASE,
-                               IRQ_TIMERINT1);
-}
-
-#define INTEGRATOR_SC_VALID_INT        0x003fffff
-
-static void __init ap_init_irq(void)
-{
-       /* Disable all interrupts initially. */
-       /* Do the core module ones */
-       writel(-1, VA_CMIC_BASE + IRQ_ENABLE_CLEAR);
-
-       /* do the header card stuff next */
-       writel(-1, VA_IC_BASE + IRQ_ENABLE_CLEAR);
-       writel(-1, VA_IC_BASE + FIQ_ENABLE_CLEAR);
-
-       fpga_irq_init(VA_IC_BASE, "SC", IRQ_PIC_START,
-               -1, INTEGRATOR_SC_VALID_INT, NULL);
-       integrator_clk_init(false);
-}
-
-static void __init ap_init(void)
-{
-       unsigned long sc_dec;
-       int i;
-
-       platform_device_register(&pci_v3_device);
-       platform_device_register(&cfi_flash_device);
-
-       ap_syscon_base = __io_address(INTEGRATOR_SC_BASE);
-       sc_dec = readl(ap_syscon_base + INTEGRATOR_SC_DEC_OFFSET);
-       for (i = 0; i < 4; i++) {
-               struct lm_device *lmdev;
-
-               if ((sc_dec & (16 << i)) == 0)
-                       continue;
-
-               lmdev = kzalloc(sizeof(struct lm_device), GFP_KERNEL);
-               if (!lmdev)
-                       continue;
-
-               lmdev->resource.start = 0xc0000000 + 0x10000000 * i;
-               lmdev->resource.end = lmdev->resource.start + 0x0fffffff;
-               lmdev->resource.flags = IORESOURCE_MEM;
-               lmdev->irq = IRQ_AP_EXPINT0 + i;
-               lmdev->id = i;
-
-               lm_device_register(lmdev);
-       }
-
-       integrator_init(false);
-}
-
-MACHINE_START(INTEGRATOR, "ARM-Integrator")
-       /* Maintainer: ARM Ltd/Deep Blue Solutions Ltd */
-       .atag_offset    = 0x100,
-       .reserve        = integrator_reserve,
-       .map_io         = ap_map_io_atag,
-       .init_early     = ap_init_early,
-       .init_irq       = ap_init_irq,
-       .handle_irq     = fpga_handle_irq,
-       .init_time      = ap_timer_init,
-       .init_machine   = ap_init,
-       .restart        = integrator_restart,
-MACHINE_END
-
-#endif
index 8c60fcb08a98ff43db4f115c45306c83b5a3bb65..1df6e7602cadb75dac78a961352624b8f855d73f 100644 (file)
@@ -36,9 +36,7 @@
 #include <asm/hardware/arm_timer.h>
 #include <asm/hardware/icst.h>
 
-#include <mach/cm.h>
 #include <mach/lm.h>
-#include <mach/irqs.h>
 
 #include <asm/mach/arch.h>
 #include <asm/mach/irq.h>
@@ -50,6 +48,7 @@
 #include <plat/clcd.h>
 #include <plat/sched_clock.h>
 
+#include "cm.h"
 #include "common.h"
 
 /* Base address to the CP controller */
@@ -249,7 +248,6 @@ static void __init intcp_init_early(void)
 #endif
 }
 
-#ifdef CONFIG_OF
 static const struct of_device_id fpga_irq_of_match[] __initconst = {
        { .compatible = "arm,versatile-fpga-irq", .data = fpga_irq_of_init, },
        { /* Sentinel */ }
@@ -257,6 +255,7 @@ static const struct of_device_id fpga_irq_of_match[] __initconst = {
 
 static void __init intcp_init_irq_of(void)
 {
+       cm_init();
        of_irq_init(fpga_irq_of_match);
        integrator_clk_init(true);
 }
@@ -287,6 +286,11 @@ static struct of_dev_auxdata intcp_auxdata_lookup[] __initdata = {
        { /* sentinel */ },
 };
 
+static const struct of_device_id intcp_syscon_match[] = {
+       { .compatible = "arm,integrator-cp-syscon"},
+       { },
+};
+
 static void __init intcp_init_of(void)
 {
        struct device_node *root;
@@ -301,7 +305,8 @@ static void __init intcp_init_of(void)
        root = of_find_node_by_path("/");
        if (!root)
                return;
-       cpcon = of_find_node_by_path("/cpcon");
+
+       cpcon = of_find_matching_node(root, intcp_syscon_match);
        if (!cpcon)
                return;
 
@@ -354,175 +359,3 @@ DT_MACHINE_START(INTEGRATOR_CP_DT, "ARM Integrator/CP (Device Tree)")
        .restart        = integrator_restart,
        .dt_compat      = intcp_dt_board_compat,
 MACHINE_END
-
-#endif
-
-#ifdef CONFIG_ATAGS
-
-/*
- * For the ATAG boot some static mappings are needed. This will
- * go away with the ATAG support down the road.
- */
-
-static struct map_desc intcp_io_desc_atag[] __initdata = {
-       {
-               .virtual        = IO_ADDRESS(INTEGRATOR_CP_CTL_BASE),
-               .pfn            = __phys_to_pfn(INTEGRATOR_CP_CTL_BASE),
-               .length         = SZ_4K,
-               .type           = MT_DEVICE
-       },
-};
-
-static void __init intcp_map_io_atag(void)
-{
-       iotable_init(intcp_io_desc_atag, ARRAY_SIZE(intcp_io_desc_atag));
-       intcp_con_base = __io_address(INTEGRATOR_CP_CTL_BASE);
-       intcp_map_io();
-}
-
-
-/*
- * This is where non-devicetree initialization code is collected and stashed
- * for eventual deletion.
- */
-
-#define INTCP_FLASH_SIZE               SZ_32M
-
-static struct resource intcp_flash_resource = {
-       .start          = INTCP_PA_FLASH_BASE,
-       .end            = INTCP_PA_FLASH_BASE + INTCP_FLASH_SIZE - 1,
-       .flags          = IORESOURCE_MEM,
-};
-
-static struct platform_device intcp_flash_device = {
-       .name           = "physmap-flash",
-       .id             = 0,
-       .dev            = {
-               .platform_data  = &intcp_flash_data,
-       },
-       .num_resources  = 1,
-       .resource       = &intcp_flash_resource,
-};
-
-#define INTCP_ETH_SIZE                 0x10
-
-static struct resource smc91x_resources[] = {
-       [0] = {
-               .start  = INTEGRATOR_CP_ETH_BASE,
-               .end    = INTEGRATOR_CP_ETH_BASE + INTCP_ETH_SIZE - 1,
-               .flags  = IORESOURCE_MEM,
-       },
-       [1] = {
-               .start  = IRQ_CP_ETHINT,
-               .end    = IRQ_CP_ETHINT,
-               .flags  = IORESOURCE_IRQ,
-       },
-};
-
-static struct platform_device smc91x_device = {
-       .name           = "smc91x",
-       .id             = 0,
-       .num_resources  = ARRAY_SIZE(smc91x_resources),
-       .resource       = smc91x_resources,
-};
-
-static struct platform_device *intcp_devs[] __initdata = {
-       &intcp_flash_device,
-       &smc91x_device,
-};
-
-#define INTCP_VA_CIC_BASE              __io_address(INTEGRATOR_HDR_BASE + 0x40)
-#define INTCP_VA_PIC_BASE              __io_address(INTEGRATOR_IC_BASE)
-#define INTCP_VA_SIC_BASE              __io_address(INTEGRATOR_CP_SIC_BASE)
-
-static void __init intcp_init_irq(void)
-{
-       u32 pic_mask, cic_mask, sic_mask;
-
-       /* These masks are for the HW IRQ registers */
-       pic_mask = ~((~0u) << (11 - 0));
-       pic_mask |= (~((~0u) << (29 - 22))) << 22;
-       cic_mask = ~((~0u) << (1 + IRQ_CIC_END - IRQ_CIC_START));
-       sic_mask = ~((~0u) << (1 + IRQ_SIC_END - IRQ_SIC_START));
-
-       /*
-        * Disable all interrupt sources
-        */
-       writel(0xffffffff, INTCP_VA_PIC_BASE + IRQ_ENABLE_CLEAR);
-       writel(0xffffffff, INTCP_VA_PIC_BASE + FIQ_ENABLE_CLEAR);
-       writel(0xffffffff, INTCP_VA_CIC_BASE + IRQ_ENABLE_CLEAR);
-       writel(0xffffffff, INTCP_VA_CIC_BASE + FIQ_ENABLE_CLEAR);
-       writel(sic_mask, INTCP_VA_SIC_BASE + IRQ_ENABLE_CLEAR);
-       writel(sic_mask, INTCP_VA_SIC_BASE + FIQ_ENABLE_CLEAR);
-
-       fpga_irq_init(INTCP_VA_PIC_BASE, "PIC", IRQ_PIC_START,
-                     -1, pic_mask, NULL);
-
-       fpga_irq_init(INTCP_VA_CIC_BASE, "CIC", IRQ_CIC_START,
-                     -1, cic_mask, NULL);
-
-       fpga_irq_init(INTCP_VA_SIC_BASE, "SIC", IRQ_SIC_START,
-                     IRQ_CP_CPPLDINT, sic_mask, NULL);
-
-       integrator_clk_init(true);
-}
-
-#define TIMER0_VA_BASE __io_address(INTEGRATOR_TIMER0_BASE)
-#define TIMER1_VA_BASE __io_address(INTEGRATOR_TIMER1_BASE)
-#define TIMER2_VA_BASE __io_address(INTEGRATOR_TIMER2_BASE)
-
-static void __init cp_timer_init(void)
-{
-       writel(0, TIMER0_VA_BASE + TIMER_CTRL);
-       writel(0, TIMER1_VA_BASE + TIMER_CTRL);
-       writel(0, TIMER2_VA_BASE + TIMER_CTRL);
-
-       sp804_clocksource_init(TIMER2_VA_BASE, "timer2");
-       sp804_clockevents_init(TIMER1_VA_BASE, IRQ_TIMERINT1, "timer1");
-}
-
-#define INTEGRATOR_CP_MMC_IRQS { IRQ_CP_MMCIINT0, IRQ_CP_MMCIINT1 }
-#define INTEGRATOR_CP_AACI_IRQS        { IRQ_CP_AACIINT }
-
-static AMBA_APB_DEVICE(mmc, "mmci", 0, INTEGRATOR_CP_MMC_BASE,
-       INTEGRATOR_CP_MMC_IRQS, &mmc_data);
-
-static AMBA_APB_DEVICE(aaci, "aaci", 0, INTEGRATOR_CP_AACI_BASE,
-       INTEGRATOR_CP_AACI_IRQS, NULL);
-
-static AMBA_AHB_DEVICE(clcd, "clcd", 0, INTCP_PA_CLCD_BASE,
-       { IRQ_CP_CLCDCINT }, &clcd_data);
-
-static struct amba_device *amba_devs[] __initdata = {
-       &mmc_device,
-       &aaci_device,
-       &clcd_device,
-};
-
-static void __init intcp_init(void)
-{
-       int i;
-
-       platform_add_devices(intcp_devs, ARRAY_SIZE(intcp_devs));
-
-       for (i = 0; i < ARRAY_SIZE(amba_devs); i++) {
-               struct amba_device *d = amba_devs[i];
-               amba_device_register(d, &iomem_resource);
-       }
-       integrator_init(true);
-}
-
-MACHINE_START(CINTEGRATOR, "ARM-IntegratorCP")
-       /* Maintainer: ARM Ltd/Deep Blue Solutions Ltd */
-       .atag_offset    = 0x100,
-       .reserve        = integrator_reserve,
-       .map_io         = intcp_map_io_atag,
-       .init_early     = intcp_init_early,
-       .init_irq       = intcp_init_irq,
-       .handle_irq     = fpga_handle_irq,
-       .init_time      = cp_timer_init,
-       .init_machine   = intcp_init,
-       .restart        = integrator_restart,
-MACHINE_END
-
-#endif
index 7a7f6d3273bf165b515eb8c4454731848ef661f0..cb6ac58f5e078656e26936472a891c00ac3d4ecd 100644 (file)
 #include <linux/slab.h>
 #include <linux/leds.h>
 
-#include <mach/cm.h>
 #include <mach/hardware.h>
 #include <mach/platform.h>
 
+#include "cm.h"
+
 #if defined(CONFIG_NEW_LEDS) && defined(CONFIG_LEDS_CLASS)
 
 #define ALPHA_REG __io_address(INTEGRATOR_DBG_BASE)
@@ -78,7 +79,7 @@ static void cm_led_set(struct led_classdev *cdev,
 
 static enum led_brightness cm_led_get(struct led_classdev *cdev)
 {
-       u32 reg = readl(CM_CTRL);
+       u32 reg = cm_get();
 
        return (reg & CM_CTRL_LED) ? LED_FULL : LED_OFF;
 }
index bef100527c4214654627a825b150a4add94772c8..c9c5a33bc802bd2a4dc28f234006949a6a54d44b 100644 (file)
@@ -36,7 +36,6 @@
 
 #include <mach/hardware.h>
 #include <mach/platform.h>
-#include <mach/irqs.h>
 
 #include <asm/mach/map.h>
 #include <asm/signal.h>
@@ -605,7 +604,7 @@ v3_pci_fault(unsigned long addr, unsigned int fsr, struct pt_regs *regs)
        return 1;
 }
 
-static irqreturn_t v3_irq(int dummy, void *devid)
+static irqreturn_t v3_irq(int irq, void *devid)
 {
 #ifdef CONFIG_DEBUG_LL
        struct pt_regs *regs = get_irq_regs();
@@ -615,7 +614,7 @@ static irqreturn_t v3_irq(int dummy, void *devid)
        extern void printascii(const char *);
 
        sprintf(buf, "V3 int %d: pc=0x%08lx [%08lx] LBFADDR=%08x LBFCODE=%02x "
-               "ISTAT=%02x\n", IRQ_AP_V3INT, pc, instr,
+               "ISTAT=%02x\n", irq, pc, instr,
                __raw_readl(ap_syscon_base + INTEGRATOR_SC_LBFADDR_OFFSET),
                __raw_readl(ap_syscon_base + INTEGRATOR_SC_LBFCODE_OFFSET) & 255,
                v3_readb(V3_LB_ISTAT));
@@ -809,32 +808,6 @@ static u8 __init pci_v3_swizzle(struct pci_dev *dev, u8 *pinp)
        return pci_common_swizzle(dev, pinp);
 }
 
-static int irq_tab[4] __initdata = {
-       IRQ_AP_PCIINT0, IRQ_AP_PCIINT1, IRQ_AP_PCIINT2, IRQ_AP_PCIINT3
-};
-
-/*
- * map the specified device/slot/pin to an IRQ.  This works out such
- * that slot 9 pin 1 is INT0, pin 2 is INT1, and slot 10 pin 1 is INT1.
- */
-static int __init pci_v3_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
-{
-       int intnr = ((slot - 9) + (pin - 1)) & 3;
-
-       return irq_tab[intnr];
-}
-
-static struct hw_pci pci_v3 __initdata = {
-       .swizzle                = pci_v3_swizzle,
-       .setup                  = pci_v3_setup,
-       .nr_controllers         = 1,
-       .ops                    = &pci_v3_ops,
-       .preinit                = pci_v3_preinit,
-       .postinit               = pci_v3_postinit,
-};
-
-#ifdef CONFIG_OF
-
 static int __init pci_v3_map_irq_dt(const struct pci_dev *dev, u8 slot, u8 pin)
 {
        struct of_irq oirq;
@@ -851,14 +824,36 @@ static int __init pci_v3_map_irq_dt(const struct pci_dev *dev, u8 slot, u8 pin)
                                     oirq.size);
 }
 
-static int __init pci_v3_dtprobe(struct platform_device *pdev,
-                               struct device_node *np)
+static struct hw_pci pci_v3 __initdata = {
+       .swizzle                = pci_v3_swizzle,
+       .setup                  = pci_v3_setup,
+       .nr_controllers         = 1,
+       .ops                    = &pci_v3_ops,
+       .preinit                = pci_v3_preinit,
+       .postinit               = pci_v3_postinit,
+};
+
+static int __init pci_v3_probe(struct platform_device *pdev)
 {
+       struct device_node *np = pdev->dev.of_node;
        struct of_pci_range_parser parser;
        struct of_pci_range range;
        struct resource *res;
        int irq, ret;
 
+       /* Remap the Integrator system controller */
+       ap_syscon_base = devm_ioremap(&pdev->dev, INTEGRATOR_SC_BASE, 0x100);
+       if (!ap_syscon_base) {
+               dev_err(&pdev->dev, "unable to remap the AP syscon for PCIv3\n");
+               return -ENODEV;
+       }
+
+       /* Device tree probe path */
+       if (!np) {
+               dev_err(&pdev->dev, "no device tree node for PCIv3\n");
+               return -ENODEV;
+       }
+
        if (of_pci_range_parser_init(&parser, np))
                return -EINVAL;
 
@@ -925,76 +920,6 @@ static int __init pci_v3_dtprobe(struct platform_device *pdev,
        return 0;
 }
 
-#else
-
-static inline int pci_v3_dtprobe(struct platform_device *pdev,
-                                 struct device_node *np)
-{
-       return -EINVAL;
-}
-
-#endif
-
-static int __init pci_v3_probe(struct platform_device *pdev)
-{
-       struct device_node *np = pdev->dev.of_node;
-       int ret;
-
-       /* Remap the Integrator system controller */
-       ap_syscon_base = ioremap(INTEGRATOR_SC_BASE, 0x100);
-       if (!ap_syscon_base) {
-               dev_err(&pdev->dev, "unable to remap the AP syscon for PCIv3\n");
-               return -ENODEV;
-       }
-
-       /* Device tree probe path */
-       if (np)
-               return pci_v3_dtprobe(pdev, np);
-
-       pci_v3_base = devm_ioremap(&pdev->dev, PHYS_PCI_V3_BASE, SZ_64K);
-       if (!pci_v3_base) {
-               dev_err(&pdev->dev, "unable to remap PCIv3 base\n");
-               return -ENODEV;
-       }
-
-       ret = devm_request_irq(&pdev->dev, IRQ_AP_V3INT, v3_irq, 0, "V3", NULL);
-       if (ret) {
-               dev_err(&pdev->dev, "unable to grab PCI error interrupt: %d\n",
-                       ret);
-               return -ENODEV;
-       }
-
-       conf_mem.name = "PCIv3 config";
-       conf_mem.start = PHYS_PCI_CONFIG_BASE;
-       conf_mem.end = PHYS_PCI_CONFIG_BASE + SZ_16M - 1;
-       conf_mem.flags = IORESOURCE_MEM;
-
-       io_mem.name = "PCIv3 I/O";
-       io_mem.start = PHYS_PCI_IO_BASE;
-       io_mem.end = PHYS_PCI_IO_BASE + SZ_16M - 1;
-       io_mem.flags = IORESOURCE_MEM;
-
-       non_mem_pci = 0x00000000;
-       non_mem_pci_sz = SZ_256M;
-       non_mem.name = "PCIv3 non-prefetched mem";
-       non_mem.start = PHYS_PCI_MEM_BASE;
-       non_mem.end = PHYS_PCI_MEM_BASE + SZ_256M - 1;
-       non_mem.flags = IORESOURCE_MEM;
-
-       pre_mem_pci = 0x10000000;
-       pre_mem_pci_sz = SZ_256M;
-       pre_mem.name = "PCIv3 prefetched mem";
-       pre_mem.start = PHYS_PCI_PRE_BASE + SZ_256M;
-       pre_mem.end = PHYS_PCI_PRE_BASE + SZ_256M - 1;
-       pre_mem.flags = IORESOURCE_MEM | IORESOURCE_PREFETCH;
-
-       pci_v3.map_irq = pci_v3_map_irq;
-
-       pci_common_init_dev(&pdev->dev, &pci_v3);
-
-       return 0;
-}
-
 static const struct of_device_id pci_ids[] = {
        { .compatible = "v3,v360epc-pci", },
        {},
index 366d1a3b418d4c513910aa7ec23283ab05d35295..f20c53e75ed934d78acd1bdcb758bdf34690adfb 100644 (file)
@@ -9,6 +9,8 @@ config ARCH_KEYSTONE
        select GENERIC_CLOCKEVENTS
        select ARCH_WANT_OPTIONAL_GPIOLIB
        select ARM_ERRATA_798181 if SMP
+       select COMMON_CLK_KEYSTONE
+       select TI_EDMA
        help
          Support for boards based on the Texas Instruments Keystone family of
          SoCs.
index ddc52b05dc84b01a5008e611739a0eb2117c1ea0..25d92396fbfa1df7f4f7a0ac983d830ead5caa31 100644 (file)
@@ -4,3 +4,6 @@ plus_sec := $(call as-instr,.arch_extension sec,+sec)
 AFLAGS_smc.o                           :=-Wa,-march=armv7-a$(plus_sec)
 
 obj-$(CONFIG_SMP)                      += platsmp.o
+
+# PM domain driver for Keystone SOCs
+obj-$(CONFIG_ARCH_KEYSTONE)            += pm_domain.o
diff --git a/arch/arm/mach-keystone/pm_domain.c b/arch/arm/mach-keystone/pm_domain.c
new file mode 100644 (file)
index 0000000..2962523
--- /dev/null
@@ -0,0 +1,82 @@
+/*
+ * PM domain driver for Keystone2 devices
+ *
+ * Copyright 2013 Texas Instruments, Inc.
+ *     Santosh Shilimkar <santosh.shillimkar@ti.com>
+ *
+ * Based on Kevins work on DAVINCI SOCs
+ *     Kevin Hilman <khilman@linaro.org>
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms and conditions of the GNU General Public License,
+ * version 2, as published by the Free Software Foundation.
+ */
+
+#include <linux/init.h>
+#include <linux/pm_runtime.h>
+#include <linux/pm_clock.h>
+#include <linux/platform_device.h>
+#include <linux/clk-provider.h>
+#include <linux/of.h>
+
+#ifdef CONFIG_PM_RUNTIME
+static int keystone_pm_runtime_suspend(struct device *dev)
+{
+       int ret;
+
+       dev_dbg(dev, "%s\n", __func__);
+
+       ret = pm_generic_runtime_suspend(dev);
+       if (ret)
+               return ret;
+
+       ret = pm_clk_suspend(dev);
+       if (ret) {
+               pm_generic_runtime_resume(dev);
+               return ret;
+       }
+
+       return 0;
+}
+
+static int keystone_pm_runtime_resume(struct device *dev)
+{
+       dev_dbg(dev, "%s\n", __func__);
+
+       pm_clk_resume(dev);
+
+       return pm_generic_runtime_resume(dev);
+}
+#endif
+
+static struct dev_pm_domain keystone_pm_domain = {
+       .ops = {
+               SET_RUNTIME_PM_OPS(keystone_pm_runtime_suspend,
+                                  keystone_pm_runtime_resume, NULL)
+               USE_PLATFORM_PM_SLEEP_OPS
+       },
+};
+
+static struct pm_clk_notifier_block platform_domain_notifier = {
+       .pm_domain = &keystone_pm_domain,
+};
+
+static struct of_device_id of_keystone_table[] = {
+       {.compatible = "ti,keystone"},
+       { /* end of list */ },
+};
+
+int __init keystone_pm_runtime_init(void)
+{
+       struct device_node *np;
+
+       np = of_find_matching_node(NULL, of_keystone_table);
+       if (!np)
+               return 0;
+
+       of_clk_init(NULL);
+       pm_clk_add_notifier(&platform_bus_type, &platform_domain_notifier);
+
+       return 0;
+}
+subsys_initcall(keystone_pm_runtime_init);
index d1f8e3d0793bef6dea7f05cdf8368a981c999702..144b511029399dc58a0049405478570f293ae492 100644 (file)
@@ -1,5 +1,7 @@
 obj-y                          += common.o pcie.o
 obj-$(CONFIG_KIRKWOOD_LEGACY)  += irq.o mpp.o
+obj-$(CONFIG_PM)               += pm.o
+
 obj-$(CONFIG_MACH_D2NET_V2)            += d2net_v2-setup.o lacie_v2-common.o
 obj-$(CONFIG_MACH_NET2BIG_V2)          += netxbig_v2-setup.o lacie_v2-common.o
 obj-$(CONFIG_MACH_NET5BIG_V2)          += netxbig_v2-setup.o lacie_v2-common.o
index 82d3ad8e87cf91395c0c706b48ef7df684e1e644..9caa4fe95913c672a6b874c5b8b8d573294ae857 100644 (file)
 #include <linux/kernel.h>
 #include <linux/init.h>
 #include <linux/of.h>
+#include <linux/of_address.h>
+#include <linux/of_net.h>
 #include <linux/of_platform.h>
 #include <linux/clk-provider.h>
-#include <linux/clocksource.h>
 #include <linux/dma-mapping.h>
 #include <linux/irqchip.h>
 #include <linux/kexec.h>
@@ -44,14 +45,6 @@ static void __init kirkwood_legacy_clk_init(void)
        clkspec.np = np;
        clkspec.args_count = 1;
 
-       clkspec.args[0] = CGC_BIT_PEX0;
-       orion_clkdev_add("0", "pcie",
-                        of_clk_get_from_provider(&clkspec));
-
-       clkspec.args[0] = CGC_BIT_PEX1;
-       orion_clkdev_add("1", "pcie",
-                        of_clk_get_from_provider(&clkspec));
-
        /*
         * The ethernet interfaces forget the MAC address assigned by
         * u-boot if the clocks are turned off. Until proper DT support
@@ -66,17 +59,83 @@ static void __init kirkwood_legacy_clk_init(void)
        clk_prepare_enable(clk);
 }
 
-static void __init kirkwood_dt_time_init(void)
-{
-       of_clk_init(NULL);
-       clocksource_of_init();
-}
+#define MV643XX_ETH_MAC_ADDR_LOW       0x0414
+#define MV643XX_ETH_MAC_ADDR_HIGH      0x0418
 
-static void __init kirkwood_dt_init_early(void)
+static void __init kirkwood_dt_eth_fixup(void)
 {
-       mvebu_mbus_init("marvell,kirkwood-mbus",
-                       BRIDGE_WINS_BASE, BRIDGE_WINS_SZ,
-                       DDR_WINDOW_CPU_BASE, DDR_WINDOW_CPU_SZ);
+       struct device_node *np;
+
+       /*
+        * The ethernet interfaces forget the MAC address assigned by u-boot
+        * if the clocks are turned off. Usually, u-boot on kirkwood boards
+        * has no DT support to properly set local-mac-address property.
+        * As a workaround, we get the MAC address from mv643xx_eth registers
+        * and update the port device node if no valid MAC address is set.
+        */
+       for_each_compatible_node(np, NULL, "marvell,kirkwood-eth-port") {
+               struct device_node *pnp = of_get_parent(np);
+               struct clk *clk;
+               struct property *pmac;
+               void __iomem *io;
+               u8 *macaddr;
+               u32 reg;
+
+               if (!pnp)
+                       continue;
+
+               /* skip disabled nodes or nodes with valid MAC address*/
+               if (!of_device_is_available(pnp) || of_get_mac_address(np))
+                       goto eth_fixup_skip;
+
+               clk = of_clk_get(pnp, 0);
+               if (IS_ERR(clk))
+                       goto eth_fixup_skip;
+
+               io = of_iomap(pnp, 0);
+               if (!io)
+                       goto eth_fixup_no_map;
+
+               /* ensure port clock is not gated to not hang CPU */
+               clk_prepare_enable(clk);
+
+               /* store MAC address register contents in local-mac-address */
+               pr_err(FW_INFO "%s: local-mac-address is not set\n",
+                      np->full_name);
+
+               pmac = kzalloc(sizeof(*pmac) + 6, GFP_KERNEL);
+               if (!pmac)
+                       goto eth_fixup_no_mem;
+
+               pmac->value = pmac + 1;
+               pmac->length = 6;
+               pmac->name = kstrdup("local-mac-address", GFP_KERNEL);
+               if (!pmac->name) {
+                       kfree(pmac);
+                       goto eth_fixup_no_mem;
+               }
+
+               macaddr = pmac->value;
+               reg = readl(io + MV643XX_ETH_MAC_ADDR_HIGH);
+               macaddr[0] = (reg >> 24) & 0xff;
+               macaddr[1] = (reg >> 16) & 0xff;
+               macaddr[2] = (reg >> 8) & 0xff;
+               macaddr[3] = reg & 0xff;
+
+               reg = readl(io + MV643XX_ETH_MAC_ADDR_LOW);
+               macaddr[4] = (reg >> 8) & 0xff;
+               macaddr[5] = reg & 0xff;
+
+               of_update_property(np, pmac);
+
+eth_fixup_no_mem:
+               iounmap(io);
+               clk_disable_unprepare(clk);
+eth_fixup_no_map:
+               clk_put(clk);
+eth_fixup_skip:
+               of_node_put(pnp);
+       }
 }
 
 static void __init kirkwood_dt_init(void)
@@ -92,16 +151,16 @@ static void __init kirkwood_dt_init(void)
        writel(readl(CPU_CONFIG) & ~CPU_CONFIG_ERROR_PROP, CPU_CONFIG);
 
        BUG_ON(mvebu_mbus_dt_init());
-       kirkwood_setup_wins();
 
        kirkwood_l2_init();
 
        kirkwood_cpufreq_init();
-
+       kirkwood_cpuidle_init();
        /* Setup clocks for legacy devices */
        kirkwood_legacy_clk_init();
 
-       kirkwood_cpuidle_init();
+       kirkwood_pm_init();
+       kirkwood_dt_eth_fixup();
 
 #ifdef CONFIG_KEXEC
        kexec_reinit = kirkwood_enable_pcie;
@@ -121,8 +180,6 @@ static const char * const kirkwood_dt_board_compat[] = {
 DT_MACHINE_START(KIRKWOOD_DT, "Marvell Kirkwood (Flattened Device Tree)")
        /* Maintainer: Jason Cooper <jason@lakedaemon.net> */
        .map_io         = kirkwood_map_io,
-       .init_early     = kirkwood_dt_init_early,
-       .init_time      = kirkwood_dt_time_init,
        .init_machine   = kirkwood_dt_init,
        .restart        = kirkwood_restart,
        .dt_compat      = kirkwood_dt_board_compat,
index 176761134a66b161592fd371593277cbd2f2e725..f3407a5db216498e6d30994c5fad8a872d2ac6b6 100644 (file)
@@ -721,6 +721,7 @@ void __init kirkwood_init(void)
        kirkwood_xor1_init();
        kirkwood_crypto_init();
 
+       kirkwood_pm_init();
        kirkwood_cpuidle_init();
 #ifdef CONFIG_KEXEC
        kexec_reinit = kirkwood_enable_pcie;
index 1296de94febff5735d0998dd0f6d4587d8642346..05fd648df543a669d393462e6b3d739cd6992421 100644 (file)
@@ -58,6 +58,12 @@ void kirkwood_cpufreq_init(void);
 void kirkwood_restart(enum reboot_mode, const char *);
 void kirkwood_clk_init(void);
 
+#ifdef CONFIG_PM
+void kirkwood_pm_init(void);
+#else
+static inline void kirkwood_pm_init(void) {};
+#endif
+
 /* board init functions for boards not fully converted to fdt */
 #ifdef CONFIG_MACH_MV88F6281GTW_GE_DT
 void mv88f6281gtw_ge_init(void);
index 91242c944d7aeefc7f62cc51dd93b30486390f2e..8b9d1c9ff1996aa58da90edaa572700e794af73b 100644 (file)
@@ -78,4 +78,6 @@
 #define CGC_TDM                        (1 << 20)
 #define CGC_RESERVED           (0x6 << 21)
 
+#define MEMORY_PM_CTRL         (BRIDGE_VIRT_BASE + 0x118)
+
 #endif
diff --git a/arch/arm/mach-kirkwood/pm.c b/arch/arm/mach-kirkwood/pm.c
new file mode 100644 (file)
index 0000000..8783a71
--- /dev/null
@@ -0,0 +1,73 @@
+/*
+ * Power Management driver for Marvell Kirkwood SoCs
+ *
+ * Copyright (C) 2013 Ezequiel Garcia <ezequiel@free-electrons.com>
+ * Copyright (C) 2010 Simon Guinot <sguinot@lacie.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License,
+ * version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */
+
+#include <linux/kernel.h>
+#include <linux/suspend.h>
+#include <linux/io.h>
+#include <mach/bridge-regs.h>
+
+static void __iomem *ddr_operation_base;
+
+static void kirkwood_low_power(void)
+{
+       u32 mem_pm_ctrl;
+
+       mem_pm_ctrl = readl(MEMORY_PM_CTRL);
+
+       /* Set peripherals to low-power mode */
+       writel_relaxed(~0, MEMORY_PM_CTRL);
+
+       /* Set DDR in self-refresh */
+       writel_relaxed(0x7, ddr_operation_base);
+
+       /*
+        * Set CPU in wait-for-interrupt state.
+        * This disables the CPU core clocks,
+        * the array clocks, and also the L2 controller.
+        */
+       cpu_do_idle();
+
+       writel_relaxed(mem_pm_ctrl, MEMORY_PM_CTRL);
+}
+
+static int kirkwood_suspend_enter(suspend_state_t state)
+{
+       switch (state) {
+       case PM_SUSPEND_STANDBY:
+               kirkwood_low_power();
+               break;
+       default:
+               return -EINVAL;
+       }
+       return 0;
+}
+
+static int kirkwood_pm_valid_standby(suspend_state_t state)
+{
+       return state == PM_SUSPEND_STANDBY;
+}
+
+static const struct platform_suspend_ops kirkwood_suspend_ops = {
+       .enter = kirkwood_suspend_enter,
+       .valid = kirkwood_pm_valid_standby,
+};
+
+int __init kirkwood_pm_init(void)
+{
+       ddr_operation_base = ioremap(DDR_OPERATION_BASE, 4);
+       suspend_set_ops(&kirkwood_suspend_ops);
+       return 0;
+}
index 905efc8cac797d5d30ae0db0ff0e28eba7fa140d..2586c28658740f7ff1a19d1ce979f286a2e112b4 100644 (file)
@@ -1,12 +1,12 @@
 if ARCH_MSM
 
 comment "Qualcomm MSM SoC Type"
-       depends on (ARCH_MSM8X60 || ARCH_MSM8960)
+       depends on ARCH_MSM_DT
 
 choice
        prompt "Qualcomm MSM SoC Type"
        default ARCH_MSM7X00A
-       depends on !(ARCH_MSM8X60 || ARCH_MSM8960)
+       depends on !ARCH_MSM_DT
 
 config ARCH_MSM7X00A
        bool "MSM7x00A / MSM7x01A"
@@ -49,7 +49,6 @@ config ARCH_MSM8X60
        select GPIO_MSM_V2
        select HAVE_SMP
        select MSM_SCM if SMP
-       select USE_OF
 
 config ARCH_MSM8960
        bool "MSM8960"
@@ -58,6 +57,11 @@ config ARCH_MSM8960
        select HAVE_SMP
        select GPIO_MSM_V2
        select MSM_SCM if SMP
+
+config ARCH_MSM_DT
+       def_bool y
+       depends on (ARCH_MSM8X60 || ARCH_MSM8960)
+       select SPARSE_IRQ
        select USE_OF
 
 config MSM_HAS_DEBUG_UART_HS
@@ -68,6 +72,7 @@ config MSM_SOC_REV_A
 
 config  ARCH_MSM_ARM11
        bool
+
 config  ARCH_MSM_SCORPION
        bool
 
@@ -75,6 +80,7 @@ config  MSM_VIC
        bool
 
 menu "Qualcomm MSM Board Type"
+       depends on !ARCH_MSM_DT
 
 config MACH_HALIBUT
        depends on ARCH_MSM
@@ -122,6 +128,7 @@ config MSM_SMD
 
 config MSM_GPIOMUX
        bool
+       depends on !ARCH_MSM_DT
        help
          Support for MSM V1 TLMM GPIOMUX architecture.
 
index d872634c2f85f32b6f4944233232734ebe325ebf..7ed4c1b2bdd20fd24ffd090ee63f7b9607ba66cb 100644 (file)
@@ -26,7 +26,6 @@ obj-$(CONFIG_MACH_TROUT) += board-trout.o board-trout-gpio.o board-trout-mmc.o b
 obj-$(CONFIG_MACH_HALIBUT) += board-halibut.o devices-msm7x00.o
 obj-$(CONFIG_ARCH_MSM7X30) += board-msm7x30.o devices-msm7x30.o
 obj-$(CONFIG_ARCH_QSD8X50) += board-qsd8x50.o devices-qsd8x50.o
-obj-$(CONFIG_ARCH_MSM8X60) += board-dt-8660.o
-obj-$(CONFIG_ARCH_MSM8960) += board-dt-8960.o
+obj-$(CONFIG_ARCH_MSM_DT) += board-dt.o
 obj-$(CONFIG_MSM_GPIOMUX) += gpiomux.o
 obj-$(CONFIG_ARCH_QSD8X50) += gpiomux-8x50.o
diff --git a/arch/arm/mach-msm/board-dt-8660.c b/arch/arm/mach-msm/board-dt-8660.c
deleted file mode 100644 (file)
index c294689..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-/* Copyright (c) 2010-2012, The Linux Foundation. All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 and
- * only version 2 as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- */
-
-#include <linux/init.h>
-#include <linux/of.h>
-#include <linux/of_platform.h>
-
-#include <asm/mach/arch.h>
-#include <asm/mach/map.h>
-
-#include "common.h"
-
-static void __init msm8x60_init_late(void)
-{
-       smd_debugfs_init();
-}
-
-static struct of_dev_auxdata msm_auxdata_lookup[] __initdata = {
-       {}
-};
-
-static void __init msm8x60_dt_init(void)
-{
-       of_platform_populate(NULL, of_default_bus_match_table,
-                       msm_auxdata_lookup, NULL);
-}
-
-static const char *msm8x60_fluid_match[] __initdata = {
-       "qcom,msm8660-fluid",
-       "qcom,msm8660-surf",
-       NULL
-};
-
-DT_MACHINE_START(MSM_DT, "Qualcomm MSM (Flattened Device Tree)")
-       .smp = smp_ops(msm_smp_ops),
-       .init_machine = msm8x60_dt_init,
-       .init_late = msm8x60_init_late,
-       .dt_compat = msm8x60_fluid_match,
-MACHINE_END
similarity index 64%
rename from arch/arm/mach-msm/board-dt-8960.c
rename to arch/arm/mach-msm/board-dt.c
index d4ca52c45111bb719d2a8a01ddb732e7265b60d7..16e6183ac9f12b067dc13831b1e7f2664dfa7d3c 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2012, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2010-2012,2013 The Linux Foundation. All rights reserved.
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 and
@@ -11,6 +11,7 @@
  */
 
 #include <linux/init.h>
+#include <linux/of.h>
 #include <linux/of_platform.h>
 
 #include <asm/mach/arch.h>
 
 #include "common.h"
 
-static void __init msm_dt_init(void)
-{
-       of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
-}
-
-static const char * const msm8960_dt_match[] __initconst = {
+static const char * const msm_dt_match[] __initconst = {
+       "qcom,msm8660-fluid",
+       "qcom,msm8660-surf",
        "qcom,msm8960-cdp",
        NULL
 };
 
-DT_MACHINE_START(MSM8960_DT, "Qualcomm MSM (Flattened Device Tree)")
+DT_MACHINE_START(MSM_DT, "Qualcomm MSM (Flattened Device Tree)")
        .smp = smp_ops(msm_smp_ops),
-       .init_machine = msm_dt_init,
-       .dt_compat = msm8960_dt_match,
+       .dt_compat = msm_dt_match,
 MACHINE_END
diff --git a/arch/arm/mach-msm/include/mach/irqs-8960.h b/arch/arm/mach-msm/include/mach/irqs-8960.h
deleted file mode 100644 (file)
index 81ab2a6..0000000
+++ /dev/null
@@ -1,277 +0,0 @@
-/* Copyright (c) 2011 Code Aurora Forum. All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 and
- * only version 2 as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- */
-
-#ifndef __ASM_ARCH_MSM_IRQS_8960_H
-#define __ASM_ARCH_MSM_IRQS_8960_H
-
-/* MSM ACPU Interrupt Numbers */
-
-/* 0-15:  STI/SGI (software triggered/generated interrupts)
-   16-31: PPI (private peripheral interrupts)
-   32+:   SPI (shared peripheral interrupts) */
-
-#define GIC_PPI_START 16
-#define GIC_SPI_START 32
-
-#define INT_VGIC                               (GIC_PPI_START + 0)
-#define INT_DEBUG_TIMER_EXP                    (GIC_PPI_START + 1)
-#define INT_GP_TIMER_EXP                       (GIC_PPI_START + 2)
-#define INT_GP_TIMER2_EXP                      (GIC_PPI_START + 3)
-#define WDT0_ACCSCSSNBARK_INT                  (GIC_PPI_START + 4)
-#define WDT1_ACCSCSSNBARK_INT                  (GIC_PPI_START + 5)
-#define AVS_SVICINT                            (GIC_PPI_START + 6)
-#define AVS_SVICINTSWDONE                      (GIC_PPI_START + 7)
-#define CPU_DBGCPUXCOMMRXFULL                  (GIC_PPI_START + 8)
-#define CPU_DBGCPUXCOMMTXEMPTY                 (GIC_PPI_START + 9)
-#define CPU_SICCPUXPERFMONIRPTREQ              (GIC_PPI_START + 10)
-#define SC_AVSCPUXDOWN                         (GIC_PPI_START + 11)
-#define SC_AVSCPUXUP                           (GIC_PPI_START + 12)
-#define SC_SICCPUXACGIRPTREQ                   (GIC_PPI_START + 13)
-#define SC_SICCPUXEXTFAULTIRPTREQ              (GIC_PPI_START + 14)
-/* PPI 15 is unused */
-
-#define SC_SICMPUIRPTREQ                       (GIC_SPI_START + 0)
-#define SC_SICL2IRPTREQ                                (GIC_SPI_START + 1)
-#define SC_SICL2PERFMONIRPTREQ                 (GIC_SPI_START + 2)
-#define SC_SICAGCIRPTREQ                       (GIC_SPI_START + 3)
-#define TLMM_APCC_DIR_CONN_IRQ_0               (GIC_SPI_START + 4)
-#define TLMM_APCC_DIR_CONN_IRQ_1               (GIC_SPI_START + 5)
-#define TLMM_APCC_DIR_CONN_IRQ_2               (GIC_SPI_START + 6)
-#define TLMM_APCC_DIR_CONN_IRQ_3               (GIC_SPI_START + 7)
-#define TLMM_APCC_DIR_CONN_IRQ_4               (GIC_SPI_START + 8)
-#define TLMM_APCC_DIR_CONN_IRQ_5               (GIC_SPI_START + 9)
-#define TLMM_APCC_DIR_CONN_IRQ_6               (GIC_SPI_START + 10)
-#define TLMM_APCC_DIR_CONN_IRQ_7               (GIC_SPI_START + 11)
-#define TLMM_APCC_DIR_CONN_IRQ_8               (GIC_SPI_START + 12)
-#define TLMM_APCC_DIR_CONN_IRQ_9               (GIC_SPI_START + 13)
-#define PM8921_SEC_IRQ_103                     (GIC_SPI_START + 14)
-#define PM8018_SEC_IRQ_106                     (GIC_SPI_START + 15)
-#define TLMM_APCC_SUMMARY_IRQ                  (GIC_SPI_START + 16)
-#define SPDM_RT_1_IRQ                          (GIC_SPI_START + 17)
-#define SPDM_DIAG_IRQ                          (GIC_SPI_START + 18)
-#define RPM_APCC_CPU0_GP_HIGH_IRQ              (GIC_SPI_START + 19)
-#define RPM_APCC_CPU0_GP_MEDIUM_IRQ            (GIC_SPI_START + 20)
-#define RPM_APCC_CPU0_GP_LOW_IRQ               (GIC_SPI_START + 21)
-#define RPM_APCC_CPU0_WAKE_UP_IRQ              (GIC_SPI_START + 22)
-#define RPM_APCC_CPU1_GP_HIGH_IRQ              (GIC_SPI_START + 23)
-#define RPM_APCC_CPU1_GP_MEDIUM_IRQ            (GIC_SPI_START + 24)
-#define RPM_APCC_CPU1_GP_LOW_IRQ               (GIC_SPI_START + 25)
-#define RPM_APCC_CPU1_WAKE_UP_IRQ              (GIC_SPI_START + 26)
-#define SSBI2_2_SC_CPU0_SECURE_IRQ             (GIC_SPI_START + 27)
-#define SSBI2_2_SC_CPU0_NON_SECURE_IRQ         (GIC_SPI_START + 28)
-#define SSBI2_1_SC_CPU0_SECURE_IRQ             (GIC_SPI_START + 29)
-#define SSBI2_1_SC_CPU0_NON_SECURE_IRQ         (GIC_SPI_START + 30)
-#define MSMC_SC_SEC_CE_IRQ                     (GIC_SPI_START + 31)
-#define MSMC_SC_PRI_CE_IRQ                     (GIC_SPI_START + 32)
-#define SLIMBUS0_CORE_EE1_IRQ                  (GIC_SPI_START + 33)
-#define SLIMBUS0_BAM_EE1_IRQ                   (GIC_SPI_START + 34)
-#define Q6FW_WDOG_EXPIRED_IRQ                  (GIC_SPI_START + 35)
-#define Q6SW_WDOG_EXPIRED_IRQ                  (GIC_SPI_START + 36)
-#define MSS_TO_APPS_IRQ_0                      (GIC_SPI_START + 37)
-#define MSS_TO_APPS_IRQ_1                      (GIC_SPI_START + 38)
-#define MSS_TO_APPS_IRQ_2                      (GIC_SPI_START + 39)
-#define MSS_TO_APPS_IRQ_3                      (GIC_SPI_START + 40)
-#define MSS_TO_APPS_IRQ_4                      (GIC_SPI_START + 41)
-#define MSS_TO_APPS_IRQ_5                      (GIC_SPI_START + 42)
-#define MSS_TO_APPS_IRQ_6                      (GIC_SPI_START + 43)
-#define MSS_TO_APPS_IRQ_7                      (GIC_SPI_START + 44)
-#define MSS_TO_APPS_IRQ_8                      (GIC_SPI_START + 45)
-#define MSS_TO_APPS_IRQ_9                      (GIC_SPI_START + 46)
-#define VPE_IRQ                                        (GIC_SPI_START + 47)
-#define VFE_IRQ                                        (GIC_SPI_START + 48)
-#define VCODEC_IRQ                             (GIC_SPI_START + 49)
-#define TV_ENC_IRQ                             (GIC_SPI_START + 50)
-#define SMMU_VPE_CB_SC_SECURE_IRQ              (GIC_SPI_START + 51)
-#define SMMU_VPE_CB_SC_NON_SECURE_IRQ          (GIC_SPI_START + 52)
-#define SMMU_VFE_CB_SC_SECURE_IRQ              (GIC_SPI_START + 53)
-#define SMMU_VFE_CB_SC_NON_SECURE_IRQ          (GIC_SPI_START + 54)
-#define SMMU_VCODEC_B_CB_SC_SECURE_IRQ         (GIC_SPI_START + 55)
-#define SMMU_VCODEC_B_CB_SC_NON_SECURE_IRQ     (GIC_SPI_START + 56)
-#define SMMU_VCODEC_A_CB_SC_SECURE_IRQ         (GIC_SPI_START + 57)
-#define SMMU_VCODEC_A_CB_SC_NON_SECURE_IRQ     (GIC_SPI_START + 58)
-#define SMMU_ROT_CB_SC_SECURE_IRQ              (GIC_SPI_START + 59)
-#define SMMU_ROT_CB_SC_NON_SECURE_IRQ          (GIC_SPI_START + 60)
-#define SMMU_MDP1_CB_SC_SECURE_IRQ             (GIC_SPI_START + 61)
-#define SMMU_MDP1_CB_SC_NON_SECURE_IRQ         (GIC_SPI_START + 62)
-#define SMMU_MDP0_CB_SC_SECURE_IRQ             (GIC_SPI_START + 63)
-#define SMMU_MDP0_CB_SC_NON_SECURE_IRQ         (GIC_SPI_START + 64)
-#define SMMU_JPEGD_CB_SC_SECURE_IRQ            (GIC_SPI_START + 65)
-#define SMMU_JPEGD_CB_SC_NON_SECURE_IRQ                (GIC_SPI_START + 66)
-#define SMMU_IJPEG_CB_SC_SECURE_IRQ            (GIC_SPI_START + 67)
-#define SMMU_IJPEG_CB_SC_NON_SECURE_IRQ                (GIC_SPI_START + 68)
-#define SMMU_GFX3D_CB_SC_SECURE_IRQ            (GIC_SPI_START + 69)
-#define SMMU_GFX3D_CB_SC_NON_SECURE_IRQ                (GIC_SPI_START + 70)
-#define SMMU_GFX2D0_CB_SC_SECURE_IRQ           (GIC_SPI_START + 71)
-#define SMMU_GFX2D0_CB_SC_NON_SECURE_IRQ       (GIC_SPI_START + 72)
-#define ROT_IRQ                                        (GIC_SPI_START + 73)
-#define MMSS_FABRIC_IRQ                                (GIC_SPI_START + 74)
-#define MDP_IRQ                                        (GIC_SPI_START + 75)
-#define JPEGD_IRQ                              (GIC_SPI_START + 76)
-#define JPEG_IRQ                               (GIC_SPI_START + 77)
-#define MMSS_IMEM_IRQ                          (GIC_SPI_START + 78)
-#define HDMI_IRQ                               (GIC_SPI_START + 79)
-#define GFX3D_IRQ                              (GIC_SPI_START + 80)
-#define GFX2D0_IRQ                             (GIC_SPI_START + 81)
-#define DSI1_IRQ                               (GIC_SPI_START + 82)
-#define CSI_1_IRQ                              (GIC_SPI_START + 83)
-#define CSI_0_IRQ                              (GIC_SPI_START + 84)
-#define LPASS_SCSS_AUDIO_IF_OUT0_IRQ           (GIC_SPI_START + 85)
-#define LPASS_SCSS_MIDI_IRQ                    (GIC_SPI_START + 86)
-#define LPASS_Q6SS_WDOG_EXPIRED                        (GIC_SPI_START + 87)
-#define LPASS_SCSS_GP_LOW_IRQ                  (GIC_SPI_START + 88)
-#define LPASS_SCSS_GP_MEDIUM_IRQ               (GIC_SPI_START + 89)
-#define LPASS_SCSS_GP_HIGH_IRQ                 (GIC_SPI_START + 90)
-#define TOP_IMEM_IRQ                           (GIC_SPI_START + 91)
-#define FABRIC_SYS_IRQ                         (GIC_SPI_START + 92)
-#define FABRIC_APPS_IRQ                                (GIC_SPI_START + 93)
-#define USB1_HS_BAM_IRQ                                (GIC_SPI_START + 94)
-#define SDC4_BAM_IRQ                           (GIC_SPI_START + 95)
-#define SDC3_BAM_IRQ                           (GIC_SPI_START + 96)
-#define SDC2_BAM_IRQ                           (GIC_SPI_START + 97)
-#define SDC1_BAM_IRQ                           (GIC_SPI_START + 98)
-#define FABRIC_SPS_IRQ                         (GIC_SPI_START + 99)
-#define USB1_HS_IRQ                            (GIC_SPI_START + 100)
-#define SDC4_IRQ_0                             (GIC_SPI_START + 101)
-#define SDC3_IRQ_0                             (GIC_SPI_START + 102)
-#define SDC2_IRQ_0                             (GIC_SPI_START + 103)
-#define SDC1_IRQ_0                             (GIC_SPI_START + 104)
-#define SPS_BAM_DMA_IRQ                                (GIC_SPI_START + 105)
-#define SPS_SEC_VIOL_IRQ                       (GIC_SPI_START + 106)
-#define SPS_MTI_0                              (GIC_SPI_START + 107)
-#define SPS_MTI_1                              (GIC_SPI_START + 108)
-#define SPS_MTI_2                              (GIC_SPI_START + 109)
-#define SPS_MTI_3                              (GIC_SPI_START + 110)
-#define SPS_MTI_4                              (GIC_SPI_START + 111)
-#define SPS_MTI_5                              (GIC_SPI_START + 112)
-#define SPS_MTI_6                              (GIC_SPI_START + 113)
-#define SPS_MTI_7                              (GIC_SPI_START + 114)
-#define SPS_MTI_8                              (GIC_SPI_START + 115)
-#define SPS_MTI_9                              (GIC_SPI_START + 116)
-#define SPS_MTI_10                             (GIC_SPI_START + 117)
-#define SPS_MTI_11                             (GIC_SPI_START + 118)
-#define SPS_MTI_12                             (GIC_SPI_START + 119)
-#define SPS_MTI_13                             (GIC_SPI_START + 120)
-#define SPS_MTI_14                             (GIC_SPI_START + 121)
-#define SPS_MTI_15                             (GIC_SPI_START + 122)
-#define SPS_MTI_16                             (GIC_SPI_START + 123)
-#define SPS_MTI_17                             (GIC_SPI_START + 124)
-#define SPS_MTI_18                             (GIC_SPI_START + 125)
-#define SPS_MTI_19                             (GIC_SPI_START + 126)
-#define SPS_MTI_20                             (GIC_SPI_START + 127)
-#define SPS_MTI_21                             (GIC_SPI_START + 128)
-#define SPS_MTI_22                             (GIC_SPI_START + 129)
-#define SPS_MTI_23                             (GIC_SPI_START + 130)
-#define SPS_MTI_24                             (GIC_SPI_START + 131)
-#define SPS_MTI_25                             (GIC_SPI_START + 132)
-#define SPS_MTI_26                             (GIC_SPI_START + 133)
-#define SPS_MTI_27                             (GIC_SPI_START + 134)
-#define SPS_MTI_28                             (GIC_SPI_START + 135)
-#define SPS_MTI_29                             (GIC_SPI_START + 136)
-#define SPS_MTI_30                             (GIC_SPI_START + 137)
-#define SPS_MTI_31                             (GIC_SPI_START + 138)
-#define CSIPHY_4LN_IRQ                         (GIC_SPI_START + 139)
-#define CSIPHY_2LN_IRQ                         (GIC_SPI_START + 140)
-#define USB2_IRQ                               (GIC_SPI_START + 141)
-#define USB1_IRQ                               (GIC_SPI_START + 142)
-#define TSSC_SSBI_IRQ                          (GIC_SPI_START + 143)
-#define TSSC_SAMPLE_IRQ                                (GIC_SPI_START + 144)
-#define TSSC_PENUP_IRQ                         (GIC_SPI_START + 145)
-#define GSBI1_UARTDM_IRQ                       (GIC_SPI_START + 146)
-#define GSBI1_QUP_IRQ                          (GIC_SPI_START + 147)
-#define GSBI2_UARTDM_IRQ                       (GIC_SPI_START + 148)
-#define GSBI2_QUP_IRQ                          (GIC_SPI_START + 149)
-#define GSBI3_UARTDM_IRQ                       (GIC_SPI_START + 150)
-#define GSBI3_QUP_IRQ                          (GIC_SPI_START + 151)
-#define GSBI4_UARTDM_IRQ                       (GIC_SPI_START + 152)
-#define GSBI4_QUP_IRQ                          (GIC_SPI_START + 153)
-#define GSBI5_UARTDM_IRQ                       (GIC_SPI_START + 154)
-#define GSBI5_QUP_IRQ                          (GIC_SPI_START + 155)
-#define GSBI6_UARTDM_IRQ                       (GIC_SPI_START + 156)
-#define GSBI6_QUP_IRQ                          (GIC_SPI_START + 157)
-#define GSBI7_UARTDM_IRQ                       (GIC_SPI_START + 158)
-#define GSBI7_QUP_IRQ                          (GIC_SPI_START + 159)
-#define GSBI8_UARTDM_IRQ                       (GIC_SPI_START + 160)
-#define GSBI8_QUP_IRQ                          (GIC_SPI_START + 161)
-#define TSIF_TSPP_IRQ                          (GIC_SPI_START + 162)
-#define TSIF_BAM_IRQ                           (GIC_SPI_START + 163)
-#define TSIF2_IRQ                              (GIC_SPI_START + 164)
-#define TSIF1_IRQ                              (GIC_SPI_START + 165)
-#define DSI2_IRQ                               (GIC_SPI_START + 166)
-#define ISPIF_IRQ                              (GIC_SPI_START + 167)
-#define MSMC_SC_SEC_TMR_IRQ                    (GIC_SPI_START + 168)
-#define MSMC_SC_SEC_WDOG_BARK_IRQ              (GIC_SPI_START + 169)
-#define INT_ADM0_SCSS_0_IRQ                    (GIC_SPI_START + 170)
-#define INT_ADM0_SCSS_1_IRQ                    (GIC_SPI_START + 171)
-#define INT_ADM0_SCSS_2_IRQ                    (GIC_SPI_START + 172)
-#define INT_ADM0_SCSS_3_IRQ                    (GIC_SPI_START + 173)
-#define CC_SCSS_WDT1CPU1BITEEXPIRED            (GIC_SPI_START + 174)
-#define CC_SCSS_WDT1CPU0BITEEXPIRED            (GIC_SPI_START + 175)
-#define CC_SCSS_WDT0CPU1BITEEXPIRED            (GIC_SPI_START + 176)
-#define CC_SCSS_WDT0CPU0BITEEXPIRED            (GIC_SPI_START + 177)
-#define TSENS_UPPER_LOWER_INT                  (GIC_SPI_START + 178)
-#define SSBI2_2_SC_CPU1_SECURE_INT             (GIC_SPI_START + 179)
-#define SSBI2_2_SC_CPU1_NON_SECURE_INT         (GIC_SPI_START + 180)
-#define SSBI2_1_SC_CPU1_SECURE_INT             (GIC_SPI_START + 181)
-#define SSBI2_1_SC_CPU1_NON_SECURE_INT         (GIC_SPI_START + 182)
-#define XPU_SUMMARY_IRQ                                (GIC_SPI_START + 183)
-#define BUS_EXCEPTION_SUMMARY_IRQ              (GIC_SPI_START + 184)
-#define HSDDRX_EBI1CH0_IRQ                     (GIC_SPI_START + 185)
-#define HSDDRX_EBI1CH1_IRQ                     (GIC_SPI_START + 186)
-#define SDC5_BAM_IRQ                           (GIC_SPI_START + 187)
-#define SDC5_IRQ_0                             (GIC_SPI_START + 188)
-#define GSBI9_UARTDM_IRQ                       (GIC_SPI_START + 189)
-#define GSBI9_QUP_IRQ                          (GIC_SPI_START + 190)
-#define GSBI10_UARTDM_IRQ                      (GIC_SPI_START + 191)
-#define GSBI10_QUP_IRQ                         (GIC_SPI_START + 192)
-#define GSBI11_UARTDM_IRQ                      (GIC_SPI_START + 193)
-#define GSBI11_QUP_IRQ                         (GIC_SPI_START + 194)
-#define GSBI12_UARTDM_IRQ                      (GIC_SPI_START + 195)
-#define GSBI12_QUP_IRQ                         (GIC_SPI_START + 196)
-#define RIVA_APSS_LTECOEX_IRQ                  (GIC_SPI_START + 197)
-#define RIVA_APSS_SPARE_IRQ                    (GIC_SPI_START + 198)
-#define RIVA_APSS_WDOG_BITE_RESET_RDY_IRQ      (GIC_SPI_START + 199)
-#define RIVA_ASS_RESET_DONE_IRQ                        (GIC_SPI_START + 200)
-#define RIVA_APSS_ASIC_IRQ                     (GIC_SPI_START + 201)
-#define RIVA_APPS_WLAN_RX_DATA_AVAIL_IRQ       (GIC_SPI_START + 202)
-#define RIVA_APPS_WLAN_DATA_XFER_DONE_IRQ      (GIC_SPI_START + 203)
-#define RIVA_APPS_WLAM_SMSM_IRQ                        (GIC_SPI_START + 204)
-#define RIVA_APPS_LOG_CTRL_IRQ                 (GIC_SPI_START + 205)
-#define RIVA_APPS_FM_CTRL_IRQ                  (GIC_SPI_START + 206)
-#define RIVA_APPS_HCI_IRQ                      (GIC_SPI_START + 207)
-#define RIVA_APPS_WLAN_CTRL_IRQ                        (GIC_SPI_START + 208)
-#define A2_BAM_IRQ                             (GIC_SPI_START + 209)
-#define SMMU_GFX2D1_CB_SC_SECURE_IRQ           (GIC_SPI_START + 210)
-#define SMMU_GFX2D1_CB_SC_NON_SECURE_IRQ       (GIC_SPI_START + 211)
-#define GFX2D1_IRQ                             (GIC_SPI_START + 212)
-#define PPSS_WDOG_TIMER_IRQ                    (GIC_SPI_START + 213)
-#define SPS_SLIMBUS_CORE_EE0_IRQ               (GIC_SPI_START + 214)
-#define SPS_SLIMBUS_BAM_EE0_IRQ                        (GIC_SPI_START + 215)
-#define QDSS_ETB_IRQ                           (GIC_SPI_START + 216)
-#define QDSS_CTI2KPSS_CPU1_IRQ                 (GIC_SPI_START + 217)
-#define QDSS_CTI2KPSS_CPU0_IRQ                 (GIC_SPI_START + 218)
-#define TLMM_APCC_DIR_CONN_IRQ_16              (GIC_SPI_START + 219)
-#define TLMM_APCC_DIR_CONN_IRQ_17              (GIC_SPI_START + 220)
-#define TLMM_APCC_DIR_CONN_IRQ_18              (GIC_SPI_START + 221)
-#define TLMM_APCC_DIR_CONN_IRQ_19              (GIC_SPI_START + 222)
-#define TLMM_APCC_DIR_CONN_IRQ_20              (GIC_SPI_START + 223)
-#define TLMM_APCC_DIR_CONN_IRQ_21              (GIC_SPI_START + 224)
-#define PM8921_SEC_IRQ_104                     (GIC_SPI_START + 225)
-#define PM8018_SEC_IRQ_107                     (GIC_SPI_START + 226)
-
-/* For now, use the maximum number of interrupts until a pending GIC issue
- * is sorted out */
-#define NR_MSM_IRQS 1020
-#define NR_BOARD_IRQS 0
-#define NR_GPIO_IRQS 0
-
-#endif
-
diff --git a/arch/arm/mach-msm/include/mach/irqs-8x60.h b/arch/arm/mach-msm/include/mach/irqs-8x60.h
deleted file mode 100644 (file)
index f65841c..0000000
+++ /dev/null
@@ -1,258 +0,0 @@
-/* Copyright (c) 2010 Code Aurora Forum. All rights reserved.
- *
- * This software is licensed under the terms of the GNU General Public
- * License version 2, as published by the Free Software Foundation, and
- * may be copied, distributed, and modified under those terms.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- */
-
-#ifndef __ASM_ARCH_MSM_IRQS_8X60_H
-#define __ASM_ARCH_MSM_IRQS_8X60_H
-
-/* MSM ACPU Interrupt Numbers */
-
-/* 0-15:  STI/SGI (software triggered/generated interrupts)
- * 16-31: PPI (private peripheral interrupts)
- * 32+:   SPI (shared peripheral interrupts)
- */
-
-#define GIC_PPI_START 16
-#define GIC_SPI_START 32
-
-#define INT_DEBUG_TIMER_EXP                    (GIC_PPI_START + 0)
-#define INT_GP_TIMER_EXP                       (GIC_PPI_START + 1)
-#define INT_GP_TIMER2_EXP                      (GIC_PPI_START + 2)
-#define WDT0_ACCSCSSNBARK_INT                  (GIC_PPI_START + 3)
-#define WDT1_ACCSCSSNBARK_INT                  (GIC_PPI_START + 4)
-#define AVS_SVICINT                            (GIC_PPI_START + 5)
-#define AVS_SVICINTSWDONE                      (GIC_PPI_START + 6)
-#define CPU_DBGCPUXCOMMRXFULL                  (GIC_PPI_START + 7)
-#define CPU_DBGCPUXCOMMTXEMPTY                 (GIC_PPI_START + 8)
-#define CPU_SICCPUXPERFMONIRPTREQ              (GIC_PPI_START + 9)
-#define SC_AVSCPUXDOWN                         (GIC_PPI_START + 10)
-#define SC_AVSCPUXUP                           (GIC_PPI_START + 11)
-#define SC_SICCPUXACGIRPTREQ                   (GIC_PPI_START + 12)
-/* PPI 13 to 15 are unused */
-
-
-#define SC_SICMPUIRPTREQ                       (GIC_SPI_START + 0)
-#define SC_SICL2IRPTREQ                                (GIC_SPI_START + 1)
-#define SC_SICL2ACGIRPTREQ                     (GIC_SPI_START + 2)
-#define NC                                     (GIC_SPI_START + 3)
-#define TLMM_SCSS_DIR_CONN_IRQ_0               (GIC_SPI_START + 4)
-#define TLMM_SCSS_DIR_CONN_IRQ_1               (GIC_SPI_START + 5)
-#define TLMM_SCSS_DIR_CONN_IRQ_2               (GIC_SPI_START + 6)
-#define TLMM_SCSS_DIR_CONN_IRQ_3               (GIC_SPI_START + 7)
-#define TLMM_SCSS_DIR_CONN_IRQ_4               (GIC_SPI_START + 8)
-#define TLMM_SCSS_DIR_CONN_IRQ_5               (GIC_SPI_START + 9)
-#define TLMM_SCSS_DIR_CONN_IRQ_6               (GIC_SPI_START + 10)
-#define TLMM_SCSS_DIR_CONN_IRQ_7               (GIC_SPI_START + 11)
-#define TLMM_SCSS_DIR_CONN_IRQ_8               (GIC_SPI_START + 12)
-#define TLMM_SCSS_DIR_CONN_IRQ_9               (GIC_SPI_START + 13)
-#define PM8058_SEC_IRQ_N                       (GIC_SPI_START + 14)
-#define PM8901_SEC_IRQ_N                       (GIC_SPI_START + 15)
-#define TLMM_SCSS_SUMMARY_IRQ                  (GIC_SPI_START + 16)
-#define SPDM_RT_1_IRQ                          (GIC_SPI_START + 17)
-#define SPDM_DIAG_IRQ                          (GIC_SPI_START + 18)
-#define RPM_SCSS_CPU0_GP_HIGH_IRQ              (GIC_SPI_START + 19)
-#define RPM_SCSS_CPU0_GP_MEDIUM_IRQ            (GIC_SPI_START + 20)
-#define RPM_SCSS_CPU0_GP_LOW_IRQ               (GIC_SPI_START + 21)
-#define RPM_SCSS_CPU0_WAKE_UP_IRQ              (GIC_SPI_START + 22)
-#define RPM_SCSS_CPU1_GP_HIGH_IRQ              (GIC_SPI_START + 23)
-#define RPM_SCSS_CPU1_GP_MEDIUM_IRQ            (GIC_SPI_START + 24)
-#define RPM_SCSS_CPU1_GP_LOW_IRQ               (GIC_SPI_START + 25)
-#define RPM_SCSS_CPU1_WAKE_UP_IRQ              (GIC_SPI_START + 26)
-#define SSBI2_2_SC_CPU0_SECURE_INT             (GIC_SPI_START + 27)
-#define SSBI2_2_SC_CPU0_NON_SECURE_INT         (GIC_SPI_START + 28)
-#define SSBI2_1_SC_CPU0_SECURE_INT             (GIC_SPI_START + 29)
-#define SSBI2_1_SC_CPU0_NON_SECURE_INT         (GIC_SPI_START + 30)
-#define MSMC_SC_SEC_CE_IRQ                     (GIC_SPI_START + 31)
-#define MSMC_SC_PRI_CE_IRQ                     (GIC_SPI_START + 32)
-#define MARM_FIQ                               (GIC_SPI_START + 33)
-#define MARM_IRQ                               (GIC_SPI_START + 34)
-#define MARM_L2CC_IRQ                          (GIC_SPI_START + 35)
-#define MARM_WDOG_EXPIRED                      (GIC_SPI_START + 36)
-#define MARM_SCSS_GP_IRQ_0                     (GIC_SPI_START + 37)
-#define MARM_SCSS_GP_IRQ_1                     (GIC_SPI_START + 38)
-#define MARM_SCSS_GP_IRQ_2                     (GIC_SPI_START + 39)
-#define MARM_SCSS_GP_IRQ_3                     (GIC_SPI_START + 40)
-#define MARM_SCSS_GP_IRQ_4                     (GIC_SPI_START + 41)
-#define MARM_SCSS_GP_IRQ_5                     (GIC_SPI_START + 42)
-#define MARM_SCSS_GP_IRQ_6                     (GIC_SPI_START + 43)
-#define MARM_SCSS_GP_IRQ_7                     (GIC_SPI_START + 44)
-#define MARM_SCSS_GP_IRQ_8                     (GIC_SPI_START + 45)
-#define MARM_SCSS_GP_IRQ_9                     (GIC_SPI_START + 46)
-#define VPE_IRQ                                        (GIC_SPI_START + 47)
-#define VFE_IRQ                                        (GIC_SPI_START + 48)
-#define VCODEC_IRQ                             (GIC_SPI_START + 49)
-#define TV_ENC_IRQ                             (GIC_SPI_START + 50)
-#define SMMU_VPE_CB_SC_SECURE_IRQ              (GIC_SPI_START + 51)
-#define SMMU_VPE_CB_SC_NON_SECURE_IRQ          (GIC_SPI_START + 52)
-#define SMMU_VFE_CB_SC_SECURE_IRQ              (GIC_SPI_START + 53)
-#define SMMU_VFE_CB_SC_NON_SECURE_IRQ          (GIC_SPI_START + 54)
-#define SMMU_VCODEC_B_CB_SC_SECURE_IRQ         (GIC_SPI_START + 55)
-#define SMMU_VCODEC_B_CB_SC_NON_SECURE_IRQ     (GIC_SPI_START + 56)
-#define SMMU_VCODEC_A_CB_SC_SECURE_IRQ         (GIC_SPI_START + 57)
-#define SMMU_VCODEC_A_CB_SC_NON_SECURE_IRQ     (GIC_SPI_START + 58)
-#define SMMU_ROT_CB_SC_SECURE_IRQ              (GIC_SPI_START + 59)
-#define SMMU_ROT_CB_SC_NON_SECURE_IRQ          (GIC_SPI_START + 60)
-#define SMMU_MDP1_CB_SC_SECURE_IRQ             (GIC_SPI_START + 61)
-#define SMMU_MDP1_CB_SC_NON_SECURE_IRQ         (GIC_SPI_START + 62)
-#define SMMU_MDP0_CB_SC_SECURE_IRQ             (GIC_SPI_START + 63)
-#define SMMU_MDP0_CB_SC_NON_SECURE_IRQ         (GIC_SPI_START + 64)
-#define SMMU_JPEGD_CB_SC_SECURE_IRQ            (GIC_SPI_START + 65)
-#define SMMU_JPEGD_CB_SC_NON_SECURE_IRQ                (GIC_SPI_START + 66)
-#define SMMU_IJPEG_CB_SC_SECURE_IRQ            (GIC_SPI_START + 67)
-#define SMMU_IJPEG_CB_SC_NON_SECURE_IRQ                (GIC_SPI_START + 68)
-#define SMMU_GFX3D_CB_SC_SECURE_IRQ            (GIC_SPI_START + 69)
-#define SMMU_GFX3D_CB_SC_NON_SECURE_IRQ                (GIC_SPI_START + 70)
-#define SMMU_GFX2D0_CB_SC_SECURE_IRQ           (GIC_SPI_START + 71)
-#define SMMU_GFX2D0_CB_SC_NON_SECURE_IRQ       (GIC_SPI_START + 72)
-#define ROT_IRQ                                        (GIC_SPI_START + 73)
-#define MMSS_FABRIC_IRQ                                (GIC_SPI_START + 74)
-#define MDP_IRQ                                        (GIC_SPI_START + 75)
-#define JPEGD_IRQ                              (GIC_SPI_START + 76)
-#define JPEG_IRQ                               (GIC_SPI_START + 77)
-#define MMSS_IMEM_IRQ                          (GIC_SPI_START + 78)
-#define HDMI_IRQ                               (GIC_SPI_START + 79)
-#define GFX3D_IRQ                              (GIC_SPI_START + 80)
-#define GFX2D0_IRQ                             (GIC_SPI_START + 81)
-#define DSI_IRQ                                        (GIC_SPI_START + 82)
-#define CSI_1_IRQ                              (GIC_SPI_START + 83)
-#define CSI_0_IRQ                              (GIC_SPI_START + 84)
-#define LPASS_SCSS_AUDIO_IF_OUT0_IRQ           (GIC_SPI_START + 85)
-#define LPASS_SCSS_MIDI_IRQ                    (GIC_SPI_START + 86)
-#define LPASS_Q6SS_WDOG_EXPIRED                        (GIC_SPI_START + 87)
-#define LPASS_SCSS_GP_LOW_IRQ                  (GIC_SPI_START + 88)
-#define LPASS_SCSS_GP_MEDIUM_IRQ               (GIC_SPI_START + 89)
-#define LPASS_SCSS_GP_HIGH_IRQ                 (GIC_SPI_START + 90)
-#define TOP_IMEM_IRQ                           (GIC_SPI_START + 91)
-#define FABRIC_SYS_IRQ                         (GIC_SPI_START + 92)
-#define FABRIC_APPS_IRQ                                (GIC_SPI_START + 93)
-#define USB1_HS_BAM_IRQ                                (GIC_SPI_START + 94)
-#define SDC4_BAM_IRQ                           (GIC_SPI_START + 95)
-#define SDC3_BAM_IRQ                           (GIC_SPI_START + 96)
-#define SDC2_BAM_IRQ                           (GIC_SPI_START + 97)
-#define SDC1_BAM_IRQ                           (GIC_SPI_START + 98)
-#define FABRIC_SPS_IRQ                         (GIC_SPI_START + 99)
-#define USB1_HS_IRQ                            (GIC_SPI_START + 100)
-#define SDC4_IRQ_0                             (GIC_SPI_START + 101)
-#define SDC3_IRQ_0                             (GIC_SPI_START + 102)
-#define SDC2_IRQ_0                             (GIC_SPI_START + 103)
-#define SDC1_IRQ_0                             (GIC_SPI_START + 104)
-#define SPS_BAM_DMA_IRQ                                (GIC_SPI_START + 105)
-#define SPS_SEC_VIOL_IRQ                       (GIC_SPI_START + 106)
-#define SPS_MTI_0                              (GIC_SPI_START + 107)
-#define SPS_MTI_1                              (GIC_SPI_START + 108)
-#define SPS_MTI_2                              (GIC_SPI_START + 109)
-#define SPS_MTI_3                              (GIC_SPI_START + 110)
-#define SPS_MTI_4                              (GIC_SPI_START + 111)
-#define SPS_MTI_5                              (GIC_SPI_START + 112)
-#define SPS_MTI_6                              (GIC_SPI_START + 113)
-#define SPS_MTI_7                              (GIC_SPI_START + 114)
-#define SPS_MTI_8                              (GIC_SPI_START + 115)
-#define SPS_MTI_9                              (GIC_SPI_START + 116)
-#define SPS_MTI_10                             (GIC_SPI_START + 117)
-#define SPS_MTI_11                             (GIC_SPI_START + 118)
-#define SPS_MTI_12                             (GIC_SPI_START + 119)
-#define SPS_MTI_13                             (GIC_SPI_START + 120)
-#define SPS_MTI_14                             (GIC_SPI_START + 121)
-#define SPS_MTI_15                             (GIC_SPI_START + 122)
-#define SPS_MTI_16                             (GIC_SPI_START + 123)
-#define SPS_MTI_17                             (GIC_SPI_START + 124)
-#define SPS_MTI_18                             (GIC_SPI_START + 125)
-#define SPS_MTI_19                             (GIC_SPI_START + 126)
-#define SPS_MTI_20                             (GIC_SPI_START + 127)
-#define SPS_MTI_21                             (GIC_SPI_START + 128)
-#define SPS_MTI_22                             (GIC_SPI_START + 129)
-#define SPS_MTI_23                             (GIC_SPI_START + 130)
-#define SPS_MTI_24                             (GIC_SPI_START + 131)
-#define SPS_MTI_25                             (GIC_SPI_START + 132)
-#define SPS_MTI_26                             (GIC_SPI_START + 133)
-#define SPS_MTI_27                             (GIC_SPI_START + 134)
-#define SPS_MTI_28                             (GIC_SPI_START + 135)
-#define SPS_MTI_29                             (GIC_SPI_START + 136)
-#define SPS_MTI_30                             (GIC_SPI_START + 137)
-#define SPS_MTI_31                             (GIC_SPI_START + 138)
-#define UXMC_EBI2_WR_ER_DONE_IRQ               (GIC_SPI_START + 139)
-#define UXMC_EBI2_OP_DONE_IRQ                  (GIC_SPI_START + 140)
-#define USB2_IRQ                               (GIC_SPI_START + 141)
-#define USB1_IRQ                               (GIC_SPI_START + 142)
-#define TSSC_SSBI_IRQ                          (GIC_SPI_START + 143)
-#define TSSC_SAMPLE_IRQ                                (GIC_SPI_START + 144)
-#define TSSC_PENUP_IRQ                         (GIC_SPI_START + 145)
-#define INT_UART1DM_IRQ                                (GIC_SPI_START + 146)
-#define GSBI1_QUP_IRQ                          (GIC_SPI_START + 147)
-#define INT_UART2DM_IRQ                                (GIC_SPI_START + 148)
-#define GSBI2_QUP_IRQ                          (GIC_SPI_START + 149)
-#define INT_UART3DM_IRQ                                (GIC_SPI_START + 150)
-#define GSBI3_QUP_IRQ                          (GIC_SPI_START + 151)
-#define INT_UART4DM_IRQ                                (GIC_SPI_START + 152)
-#define GSBI4_QUP_IRQ                          (GIC_SPI_START + 153)
-#define INT_UART5DM_IRQ                                (GIC_SPI_START + 154)
-#define GSBI5_QUP_IRQ                          (GIC_SPI_START + 155)
-#define INT_UART6DM_IRQ                                (GIC_SPI_START + 156)
-#define GSBI6_QUP_IRQ                          (GIC_SPI_START + 157)
-#define INT_UART7DM_IRQ                                (GIC_SPI_START + 158)
-#define GSBI7_QUP_IRQ                          (GIC_SPI_START + 159)
-#define INT_UART8DM_IRQ                                (GIC_SPI_START + 160)
-#define GSBI8_QUP_IRQ                          (GIC_SPI_START + 161)
-#define TSIF_TSPP_IRQ                          (GIC_SPI_START + 162)
-#define TSIF_BAM_IRQ                           (GIC_SPI_START + 163)
-#define TSIF2_IRQ                              (GIC_SPI_START + 164)
-#define TSIF1_IRQ                              (GIC_SPI_START + 165)
-#define INT_ADM1_MASTER                                (GIC_SPI_START + 166)
-#define INT_ADM1_AARM                          (GIC_SPI_START + 167)
-#define INT_ADM1_SD2                           (GIC_SPI_START + 168)
-#define INT_ADM1_SD3                           (GIC_SPI_START + 169)
-#define INT_ADM0_MASTER                                (GIC_SPI_START + 170)
-#define INT_ADM0_AARM                          (GIC_SPI_START + 171)
-#define INT_ADM0_SD2                           (GIC_SPI_START + 172)
-#define INT_ADM0_SD3                           (GIC_SPI_START + 173)
-#define CC_SCSS_WDT1CPU1BITEEXPIRED            (GIC_SPI_START + 174)
-#define CC_SCSS_WDT1CPU0BITEEXPIRED            (GIC_SPI_START + 175)
-#define CC_SCSS_WDT0CPU1BITEEXPIRED            (GIC_SPI_START + 176)
-#define CC_SCSS_WDT0CPU0BITEEXPIRED            (GIC_SPI_START + 177)
-#define TSENS_UPPER_LOWER_INT                  (GIC_SPI_START + 178)
-#define SSBI2_2_SC_CPU1_SECURE_INT             (GIC_SPI_START + 179)
-#define SSBI2_2_SC_CPU1_NON_SECURE_INT         (GIC_SPI_START + 180)
-#define SSBI2_1_SC_CPU1_SECURE_INT             (GIC_SPI_START + 181)
-#define SSBI2_1_SC_CPU1_NON_SECURE_INT         (GIC_SPI_START + 182)
-#define XPU_SUMMARY_IRQ                                (GIC_SPI_START + 183)
-#define BUS_EXCEPTION_SUMMARY_IRQ              (GIC_SPI_START + 184)
-#define HSDDRX_SMICH0_IRQ                      (GIC_SPI_START + 185)
-#define HSDDRX_EBI1_IRQ                                (GIC_SPI_START + 186)
-#define SDC5_BAM_IRQ                           (GIC_SPI_START + 187)
-#define SDC5_IRQ_0                             (GIC_SPI_START + 188)
-#define INT_UART9DM_IRQ                                (GIC_SPI_START + 189)
-#define GSBI9_QUP_IRQ                          (GIC_SPI_START + 190)
-#define INT_UART10DM_IRQ                       (GIC_SPI_START + 191)
-#define GSBI10_QUP_IRQ                         (GIC_SPI_START + 192)
-#define INT_UART11DM_IRQ                       (GIC_SPI_START + 193)
-#define GSBI11_QUP_IRQ                         (GIC_SPI_START + 194)
-#define INT_UART12DM_IRQ                       (GIC_SPI_START + 195)
-#define GSBI12_QUP_IRQ                         (GIC_SPI_START + 196)
-
-/*SPI 197 to 209 arent used in 8x60*/
-#define SMMU_GFX2D1_CB_SC_SECURE_IRQ            (GIC_SPI_START + 210)
-#define SMMU_GFX2D1_CB_SC_NON_SECURE_IRQ        (GIC_SPI_START + 211)
-
-/*SPI 212 to 216 arent used in 8x60*/
-#define SMPSS_SPARE_1                          (GIC_SPI_START + 217)
-#define SMPSS_SPARE_2                          (GIC_SPI_START + 218)
-#define SMPSS_SPARE_3                          (GIC_SPI_START + 219)
-#define SMPSS_SPARE_4                          (GIC_SPI_START + 220)
-#define SMPSS_SPARE_5                          (GIC_SPI_START + 221)
-#define SMPSS_SPARE_6                          (GIC_SPI_START + 222)
-#define SMPSS_SPARE_7                          (GIC_SPI_START + 223)
-
-#define NR_GPIO_IRQS 173
-#define NR_MSM_IRQS 256
-#define NR_BOARD_IRQS 0
-
-#endif
index 3cd78b165abb22b4ca53896ac825f03262d4ef55..164d355c96ea99d5a9b884de18b201f4461054f4 100644 (file)
 #elif defined(CONFIG_ARCH_QSD8X50)
 #include "irqs-8x50.h"
 #include "sirc.h"
-#elif defined(CONFIG_ARCH_MSM8X60)
-#include "irqs-8x60.h"
-#elif defined(CONFIG_ARCH_MSM8960)
-/* TODO: Make these not generic. */
-#include "irqs-8960.h"
 #elif defined(CONFIG_ARCH_MSM_ARM11)
 #include "irqs-7x00.h"
 #else
index 98f6e2adb53eaf39722f4988f43ce9d96c86ba50..cc511a4890a3a94c98e529843400b043b93e4614 100644 (file)
@@ -13,8 +13,6 @@
 #include <linux/clk.h>
 #include <linux/clk/mxs.h>
 #include <linux/clkdev.h>
-#include <linux/clocksource.h>
-#include <linux/clk-provider.h>
 #include <linux/delay.h>
 #include <linux/err.h>
 #include <linux/gpio.h>
@@ -490,16 +488,6 @@ static void mxs_restart(enum reboot_mode mode, const char *cmd)
        soft_restart(0);
 }
 
-static void __init mxs_timer_init(void)
-{
-       if (of_machine_is_compatible("fsl,imx23"))
-               mx23_clocks_init();
-       else
-               mx28_clocks_init();
-       of_clk_init(NULL);
-       clocksource_of_init();
-}
-
 static const char *mxs_dt_compat[] __initdata = {
        "fsl,imx28",
        "fsl,imx23",
@@ -508,7 +496,6 @@ static const char *mxs_dt_compat[] __initdata = {
 
 DT_MACHINE_START(MXS, "Freescale MXS (Device Tree)")
        .handle_irq     = icoll_handle_irq,
-       .init_time      = mxs_timer_init,
        .init_machine   = mxs_machine_init,
        .init_late      = mxs_pm_init,
        .dt_compat      = mxs_dt_compat,
index 13e0df9c11cebb0794d108d06cf95b16d98e6628..cce2c9dfb5d13d73b92076bd675415de6ff85bc6 100644 (file)
 #include <linux/slab.h>
 #include <linux/irq.h>
 #include <linux/dma-mapping.h>
-#include <linux/platform_data/clk-nomadik.h>
-#include <linux/clocksource.h>
 #include <linux/of_irq.h>
 #include <linux/of_gpio.h>
 #include <linux/of_address.h>
 #include <linux/of_platform.h>
-#include <linux/mtd/fsmc.h>
 #include <linux/gpio.h>
-#include <linux/amba/mmci.h>
 
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
@@ -113,50 +109,6 @@ static void cpu8815_restart(enum reboot_mode mode, const char *cmd)
        writel(1, srcbase + 0x18);
 }
 
-/* Initial value for SRC control register: all timers use MXTAL/8 source */
-#define SRC_CR_INIT_MASK       0x00007fff
-#define SRC_CR_INIT_VAL                0x2aaa8000
-
-static void __init cpu8815_timer_init_of(void)
-{
-       struct device_node *mtu;
-       void __iomem *base;
-       int irq;
-       u32 src_cr;
-
-       /* We need this to be up now */
-       nomadik_clk_init();
-
-       mtu = of_find_node_by_path("/mtu@101e2000");
-       if (!mtu)
-               return;
-       base = of_iomap(mtu, 0);
-       if (WARN_ON(!base))
-               return;
-       irq = irq_of_parse_and_map(mtu, 0);
-
-       pr_info("Remapped MTU @ %p, irq: %d\n", base, irq);
-
-       /* Configure timer sources in "system reset controller" ctrl reg */
-       src_cr = readl(base);
-       src_cr &= SRC_CR_INIT_MASK;
-       src_cr |= SRC_CR_INIT_VAL;
-       writel(src_cr, base);
-
-       clocksource_of_init();
-}
-
-static struct fsmc_nand_timings cpu8815_nand_timings = {
-       .thiz   = 0,
-       .thold  = 0x10,
-       .twait  = 0x0A,
-       .tset   = 0,
-};
-
-static struct fsmc_nand_platform_data cpu8815_nand_data = {
-       .nand_timings = &cpu8815_nand_timings,
-};
-
 /*
  * The SMSC911x IRQ is connected to a GPIO pin, but the driver expects
  * to simply request an IRQ passed as a resource. So the GPIO pin needs
@@ -189,15 +141,6 @@ static int __init cpu8815_eth_init(void)
 }
 device_initcall(cpu8815_eth_init);
 
-/*
- * TODO:
- * cannot be set from device tree, convert to a proper DT
- * binding.
- */
-static struct mmci_platform_data mmcsd_plat_data = {
-       .ocr_mask = MMC_VDD_29_30,
-};
-
 /*
  * This GPIO pin turns on a line that is used to detect card insertion
  * on this board.
@@ -232,24 +175,13 @@ static int __init cpu8815_mmcsd_init(void)
 }
 device_initcall(cpu8815_mmcsd_init);
 
-
-/* These are mostly to get the right device names for the clock lookups */
-static struct of_dev_auxdata cpu8815_auxdata_lookup[] __initdata = {
-       OF_DEV_AUXDATA("stericsson,fsmc-nand", NOMADIK_FSMC_BASE,
-               NULL, &cpu8815_nand_data),
-       OF_DEV_AUXDATA("arm,primecell", NOMADIK_SDI_BASE,
-               NULL, &mmcsd_plat_data),
-       { /* sentinel */ },
-};
-
 static void __init cpu8815_init_of(void)
 {
 #ifdef CONFIG_CACHE_L2X0
        /* At full speed latency must be >=2, so 0x249 in low bits */
        l2x0_of_init(0x00730249, 0xfe000fff);
 #endif
-       of_platform_populate(NULL, of_default_bus_match_table,
-                       cpu8815_auxdata_lookup, NULL);
+       of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
 }
 
 static const char * cpu8815_board_compat[] = {
@@ -259,7 +191,6 @@ static const char * cpu8815_board_compat[] = {
 
 DT_MACHINE_START(NOMADIK_DT, "Nomadik STn8815")
        .map_io         = cpu8815_map_io,
-       .init_time      = cpu8815_timer_init_of,
        .init_machine   = cpu8815_init_of,
        .restart        = cpu8815_restart,
        .dt_compat      = cpu8815_board_compat,
index 99e26092a9f7d63b5b096e71895a7eebdf915290..4b2ed2e8352f4fd1433e8ac0e41da26d2b3bdbe5 100644 (file)
 #include <linux/of_platform.h>
 #include <linux/irqchip.h>
 #include <linux/irqchip/arm-vic.h>
-#include <linux/clk-provider.h>
 #include <linux/clkdev.h>
 #include <linux/amba/bus.h>
 #include <linux/amba/clcd.h>
-#include <linux/clocksource.h>
 
 #include <asm/mach/arch.h>
 #include <asm/mach-types.h>
@@ -65,12 +63,6 @@ static void __init nspire_init(void)
                        nspire_auxdata, NULL);
 }
 
-static void __init nspire_init_time(void)
-{
-       of_clk_init(NULL);
-       clocksource_of_init();
-}
-
 static void nspire_restart(char mode, const char *cmd)
 {
        void __iomem *base = ioremap(NSPIRE_MISC_PHYS_BASE, SZ_4K);
@@ -83,7 +75,6 @@ static void nspire_restart(char mode, const char *cmd)
 DT_MACHINE_START(NSPIRE, "TI-NSPIRE")
        .dt_compat      = nspire_dt_match,
        .map_io         = nspire_map_io,
-       .init_time      = nspire_init_time,
        .init_machine   = nspire_init,
        .restart        = nspire_restart,
 MACHINE_END
index abec019a528195516bdefe9bdf45d165ab50ac5d..732f8ee2fcd2ce544a28eabda14f5fdde8250e7a 100644 (file)
@@ -46,6 +46,9 @@ static inline void omap7xx_map_io(void)
 void omap1510_fpga_init_irq(void);
 void omap15xx_map_io(void);
 #else
+static inline void omap1510_fpga_init_irq(void)
+{
+}
 static inline void omap15xx_map_io(void)
 {
 }
index 8bd71b2d0967ced750781e1a9b9b25cbb520044f..3c0e42219200f51346584a5545b3e29a92170ec8 100644 (file)
@@ -135,8 +135,7 @@ static struct irq_chip omap_fpga_irq = {
  * mask_ack routine for all of the FPGA interrupts has been changed from
  * fpga_mask_ack_irq() to fpga_ack_irq() so that the specific FPGA interrupt
  * being serviced is left unmasked.  We can do this because the FPGA cascade
- * interrupt is installed with the IRQF_DISABLED flag, which leaves all
- * interrupts masked at the CPU while an FPGA interrupt handler executes.
+ * interrupt is run with all interrupts masked.
  *
  * Limited testing indicates that this workaround appears to be effective
  * for the smc9194 Ethernet driver used on the Innovator.  It should work
index 02b3eb2e201c2fe63670a5b6f64c3a8161eb06fd..312a0924d7867a5a5e0c41cdea2de66cf1fbcdbb 100644 (file)
@@ -25,7 +25,7 @@
 #define OMAP1510_GPIO_BASE             0xFFFCE000
 
 /* gpio1 */
-static struct __initdata resource omap15xx_mpu_gpio_resources[] = {
+static struct resource omap15xx_mpu_gpio_resources[] = {
        {
                .start  = OMAP1_MPUIO_VBASE,
                .end    = OMAP1_MPUIO_VBASE + SZ_2K - 1,
@@ -48,7 +48,7 @@ static struct omap_gpio_reg_offs omap15xx_mpuio_regs = {
        .irqctrl        = OMAP_MPUIO_GPIO_INT_EDGE,
 };
 
-static struct __initdata omap_gpio_platform_data omap15xx_mpu_gpio_config = {
+static struct omap_gpio_platform_data omap15xx_mpu_gpio_config = {
        .is_mpuio               = true,
        .bank_width             = 16,
        .bank_stride            = 1,
@@ -66,7 +66,7 @@ static struct platform_device omap15xx_mpu_gpio = {
 };
 
 /* gpio2 */
-static struct __initdata resource omap15xx_gpio_resources[] = {
+static struct resource omap15xx_gpio_resources[] = {
        {
                .start  = OMAP1510_GPIO_BASE,
                .end    = OMAP1510_GPIO_BASE + SZ_2K - 1,
@@ -90,7 +90,7 @@ static struct omap_gpio_reg_offs omap15xx_gpio_regs = {
        .pinctrl        = OMAP1510_GPIO_PIN_CONTROL,
 };
 
-static struct __initdata omap_gpio_platform_data omap15xx_gpio_config = {
+static struct omap_gpio_platform_data omap15xx_gpio_config = {
        .bank_width             = 16,
        .regs                   = &omap15xx_gpio_regs,
 };
index b9952a258d8201aac40880c8ac01bc1cabdba008..6e6ec93dcbb3fd4a4f0d889b2e871737a38f028e 100644 (file)
@@ -31,7 +31,7 @@
 #define SYSCONFIG_WORD                 0x14
 
 /* mpu gpio */
-static struct __initdata resource omap16xx_mpu_gpio_resources[] = {
+static struct resource omap16xx_mpu_gpio_resources[] = {
        {
                .start  = OMAP1_MPUIO_VBASE,
                .end    = OMAP1_MPUIO_VBASE + SZ_2K - 1,
@@ -54,7 +54,7 @@ static struct omap_gpio_reg_offs omap16xx_mpuio_regs = {
        .irqctrl        = OMAP_MPUIO_GPIO_INT_EDGE,
 };
 
-static struct __initdata omap_gpio_platform_data omap16xx_mpu_gpio_config = {
+static struct omap_gpio_platform_data omap16xx_mpu_gpio_config = {
        .is_mpuio               = true,
        .bank_width             = 16,
        .bank_stride            = 1,
@@ -72,7 +72,7 @@ static struct platform_device omap16xx_mpu_gpio = {
 };
 
 /* gpio1 */
-static struct __initdata resource omap16xx_gpio1_resources[] = {
+static struct resource omap16xx_gpio1_resources[] = {
        {
                .start  = OMAP1610_GPIO1_BASE,
                .end    = OMAP1610_GPIO1_BASE + SZ_2K - 1,
@@ -100,7 +100,7 @@ static struct omap_gpio_reg_offs omap16xx_gpio_regs = {
        .edgectrl2      = OMAP1610_GPIO_EDGE_CTRL2,
 };
 
-static struct __initdata omap_gpio_platform_data omap16xx_gpio1_config = {
+static struct omap_gpio_platform_data omap16xx_gpio1_config = {
        .bank_width             = 16,
        .regs                   = &omap16xx_gpio_regs,
 };
@@ -116,7 +116,7 @@ static struct platform_device omap16xx_gpio1 = {
 };
 
 /* gpio2 */
-static struct __initdata resource omap16xx_gpio2_resources[] = {
+static struct resource omap16xx_gpio2_resources[] = {
        {
                .start  = OMAP1610_GPIO2_BASE,
                .end    = OMAP1610_GPIO2_BASE + SZ_2K - 1,
@@ -128,7 +128,7 @@ static struct __initdata resource omap16xx_gpio2_resources[] = {
        },
 };
 
-static struct __initdata omap_gpio_platform_data omap16xx_gpio2_config = {
+static struct omap_gpio_platform_data omap16xx_gpio2_config = {
        .bank_width             = 16,
        .regs                   = &omap16xx_gpio_regs,
 };
@@ -144,7 +144,7 @@ static struct platform_device omap16xx_gpio2 = {
 };
 
 /* gpio3 */
-static struct __initdata resource omap16xx_gpio3_resources[] = {
+static struct resource omap16xx_gpio3_resources[] = {
        {
                .start  = OMAP1610_GPIO3_BASE,
                .end    = OMAP1610_GPIO3_BASE + SZ_2K - 1,
@@ -156,7 +156,7 @@ static struct __initdata resource omap16xx_gpio3_resources[] = {
        },
 };
 
-static struct __initdata omap_gpio_platform_data omap16xx_gpio3_config = {
+static struct omap_gpio_platform_data omap16xx_gpio3_config = {
        .bank_width             = 16,
        .regs                   = &omap16xx_gpio_regs,
 };
@@ -172,7 +172,7 @@ static struct platform_device omap16xx_gpio3 = {
 };
 
 /* gpio4 */
-static struct __initdata resource omap16xx_gpio4_resources[] = {
+static struct resource omap16xx_gpio4_resources[] = {
        {
                .start  = OMAP1610_GPIO4_BASE,
                .end    = OMAP1610_GPIO4_BASE + SZ_2K - 1,
@@ -184,7 +184,7 @@ static struct __initdata resource omap16xx_gpio4_resources[] = {
        },
 };
 
-static struct __initdata omap_gpio_platform_data omap16xx_gpio4_config = {
+static struct omap_gpio_platform_data omap16xx_gpio4_config = {
        .bank_width             = 16,
        .regs                   = &omap16xx_gpio_regs,
 };
@@ -199,7 +199,7 @@ static struct platform_device omap16xx_gpio4 = {
        .resource = omap16xx_gpio4_resources,
 };
 
-static struct __initdata platform_device * omap16xx_gpio_dev[] = {
+static struct platform_device *omap16xx_gpio_dev[] __initdata = {
        &omap16xx_mpu_gpio,
        &omap16xx_gpio1,
        &omap16xx_gpio2,
index f5819b2b7cbec631c7012a5f64bb88b12ed3ab2b..4612d2506a2db5a6e7e22d06a643e6beb6747409 100644 (file)
@@ -30,7 +30,7 @@
 #define OMAP1_MPUIO_VBASE              OMAP1_MPUIO_BASE
 
 /* mpu gpio */
-static struct __initdata resource omap7xx_mpu_gpio_resources[] = {
+static struct resource omap7xx_mpu_gpio_resources[] = {
        {
                .start  = OMAP1_MPUIO_VBASE,
                .end    = OMAP1_MPUIO_VBASE + SZ_2K - 1,
@@ -53,7 +53,7 @@ static struct omap_gpio_reg_offs omap7xx_mpuio_regs = {
        .irqctrl        = OMAP_MPUIO_GPIO_INT_EDGE >> 1,
 };
 
-static struct __initdata omap_gpio_platform_data omap7xx_mpu_gpio_config = {
+static struct omap_gpio_platform_data omap7xx_mpu_gpio_config = {
        .is_mpuio               = true,
        .bank_width             = 16,
        .bank_stride            = 2,
@@ -71,7 +71,7 @@ static struct platform_device omap7xx_mpu_gpio = {
 };
 
 /* gpio1 */
-static struct __initdata resource omap7xx_gpio1_resources[] = {
+static struct resource omap7xx_gpio1_resources[] = {
        {
                .start  = OMAP7XX_GPIO1_BASE,
                .end    = OMAP7XX_GPIO1_BASE + SZ_2K - 1,
@@ -94,7 +94,7 @@ static struct omap_gpio_reg_offs omap7xx_gpio_regs = {
        .irqctrl        = OMAP7XX_GPIO_INT_CONTROL,
 };
 
-static struct __initdata omap_gpio_platform_data omap7xx_gpio1_config = {
+static struct omap_gpio_platform_data omap7xx_gpio1_config = {
        .bank_width             = 32,
        .regs                   = &omap7xx_gpio_regs,
 };
@@ -110,7 +110,7 @@ static struct platform_device omap7xx_gpio1 = {
 };
 
 /* gpio2 */
-static struct __initdata resource omap7xx_gpio2_resources[] = {
+static struct resource omap7xx_gpio2_resources[] = {
        {
                .start  = OMAP7XX_GPIO2_BASE,
                .end    = OMAP7XX_GPIO2_BASE + SZ_2K - 1,
@@ -122,7 +122,7 @@ static struct __initdata resource omap7xx_gpio2_resources[] = {
        },
 };
 
-static struct __initdata omap_gpio_platform_data omap7xx_gpio2_config = {
+static struct omap_gpio_platform_data omap7xx_gpio2_config = {
        .bank_width             = 32,
        .regs                   = &omap7xx_gpio_regs,
 };
@@ -138,7 +138,7 @@ static struct platform_device omap7xx_gpio2 = {
 };
 
 /* gpio3 */
-static struct __initdata resource omap7xx_gpio3_resources[] = {
+static struct resource omap7xx_gpio3_resources[] = {
        {
                .start  = OMAP7XX_GPIO3_BASE,
                .end    = OMAP7XX_GPIO3_BASE + SZ_2K - 1,
@@ -150,7 +150,7 @@ static struct __initdata resource omap7xx_gpio3_resources[] = {
        },
 };
 
-static struct __initdata omap_gpio_platform_data omap7xx_gpio3_config = {
+static struct omap_gpio_platform_data omap7xx_gpio3_config = {
        .bank_width             = 32,
        .regs                   = &omap7xx_gpio_regs,
 };
@@ -166,7 +166,7 @@ static struct platform_device omap7xx_gpio3 = {
 };
 
 /* gpio4 */
-static struct __initdata resource omap7xx_gpio4_resources[] = {
+static struct resource omap7xx_gpio4_resources[] = {
        {
                .start  = OMAP7XX_GPIO4_BASE,
                .end    = OMAP7XX_GPIO4_BASE + SZ_2K - 1,
@@ -178,7 +178,7 @@ static struct __initdata resource omap7xx_gpio4_resources[] = {
        },
 };
 
-static struct __initdata omap_gpio_platform_data omap7xx_gpio4_config = {
+static struct omap_gpio_platform_data omap7xx_gpio4_config = {
        .bank_width             = 32,
        .regs                   = &omap7xx_gpio_regs,
 };
@@ -194,7 +194,7 @@ static struct platform_device omap7xx_gpio4 = {
 };
 
 /* gpio5 */
-static struct __initdata resource omap7xx_gpio5_resources[] = {
+static struct resource omap7xx_gpio5_resources[] = {
        {
                .start  = OMAP7XX_GPIO5_BASE,
                .end    = OMAP7XX_GPIO5_BASE + SZ_2K - 1,
@@ -206,7 +206,7 @@ static struct __initdata resource omap7xx_gpio5_resources[] = {
        },
 };
 
-static struct __initdata omap_gpio_platform_data omap7xx_gpio5_config = {
+static struct omap_gpio_platform_data omap7xx_gpio5_config = {
        .bank_width             = 32,
        .regs                   = &omap7xx_gpio_regs,
 };
@@ -222,7 +222,7 @@ static struct platform_device omap7xx_gpio5 = {
 };
 
 /* gpio6 */
-static struct __initdata resource omap7xx_gpio6_resources[] = {
+static struct resource omap7xx_gpio6_resources[] = {
        {
                .start  = OMAP7XX_GPIO6_BASE,
                .end    = OMAP7XX_GPIO6_BASE + SZ_2K - 1,
@@ -234,7 +234,7 @@ static struct __initdata resource omap7xx_gpio6_resources[] = {
        },
 };
 
-static struct __initdata omap_gpio_platform_data omap7xx_gpio6_config = {
+static struct omap_gpio_platform_data omap7xx_gpio6_config = {
        .bank_width             = 32,
        .regs                   = &omap7xx_gpio_regs,
 };
@@ -249,7 +249,7 @@ static struct platform_device omap7xx_gpio6 = {
        .resource = omap7xx_gpio6_resources,
 };
 
-static struct __initdata platform_device * omap7xx_gpio_dev[] = {
+static struct platform_device *omap7xx_gpio_dev[] __initdata = {
        &omap7xx_mpu_gpio,
        &omap7xx_gpio1,
        &omap7xx_gpio2,
index 358b82cb9f7876482c29d97653a7d2921c87852f..40a1ae31961027a5383123cca4da2f672003cd92 100644 (file)
@@ -628,7 +628,6 @@ static irqreturn_t omap_wakeup_interrupt(int irq, void *dev)
 
 static struct irqaction omap_wakeup_irq = {
        .name           = "peripheral wakeup",
-       .flags          = IRQF_DISABLED,
        .handler        = omap_wakeup_interrupt
 };
 
index 80603d2fef77035a8fe54f9fe99e5ef63fcfdcbf..6b5f298d66382abe2f380952c32fda20bcfdfa56 100644 (file)
@@ -160,7 +160,7 @@ static irqreturn_t omap_mpu_timer1_interrupt(int irq, void *dev_id)
 
 static struct irqaction omap_mpu_timer1_irq = {
        .name           = "mpu_timer1",
-       .flags          = IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL,
+       .flags          = IRQF_TIMER | IRQF_IRQPOLL,
        .handler        = omap_mpu_timer1_interrupt,
 };
 
index 0b74246ba62c6bb3379e142a89ebfb49c932fa8b..107e7ab3edbabc48b8ea4ae15cfc7f4c86dcfa30 100644 (file)
@@ -156,7 +156,7 @@ static irqreturn_t omap_32k_timer_interrupt(int irq, void *dev_id)
 
 static struct irqaction omap_32k_timer_irq = {
        .name           = "32KHz timer",
-       .flags          = IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL,
+       .flags          = IRQF_TIMER | IRQF_IRQPOLL,
        .handler        = omap_32k_timer_interrupt,
 };
 
index b5fb5f7992dfed4972be5a927934b9ccfa26ae9f..dc21df16616119f8341077fd5131537065590088 100644 (file)
@@ -8,7 +8,6 @@ config ARCH_OMAP2
        select CPU_V6
        select MULTI_IRQ_HANDLER
        select SOC_HAS_OMAP2_SDRC
-       select COMMON_CLK
 
 config ARCH_OMAP3
        bool "TI OMAP3"
@@ -22,7 +21,6 @@ config ARCH_OMAP3
        select PM_OPP if PM
        select PM_RUNTIME if CPU_IDLE
        select SOC_HAS_OMAP2_SDRC
-       select COMMON_CLK
        select USB_ARCH_HAS_EHCI if USB_SUPPORT
 
 config ARCH_OMAP4
@@ -45,7 +43,6 @@ config ARCH_OMAP4
        select PM_OPP if PM
        select PM_RUNTIME if CPU_IDLE
        select USB_ARCH_HAS_EHCI if USB_SUPPORT
-       select COMMON_CLK
        select ARM_ERRATA_754322
        select ARM_ERRATA_775420
 
@@ -59,7 +56,6 @@ config SOC_OMAP5
        select HAVE_ARM_SCU if SMP
        select HAVE_ARM_TWD if LOCAL_TIMERS
        select HAVE_SMP
-       select COMMON_CLK
        select HAVE_ARM_ARCH_TIMER
        select ARM_ERRATA_798181 if SMP
 
@@ -70,7 +66,6 @@ config SOC_AM33XX
        select ARM_CPU_SUSPEND if PM
        select CPU_V7
        select MULTI_IRQ_HANDLER
-       select COMMON_CLK
 
 config SOC_AM43XX
        bool "TI AM43x"
@@ -79,7 +74,6 @@ config SOC_AM43XX
        select ARCH_OMAP2PLUS
        select MULTI_IRQ_HANDLER
        select ARM_GIC
-       select COMMON_CLK
        select MACH_OMAP_GENERIC
 
 config ARCH_OMAP2PLUS
@@ -89,11 +83,11 @@ config ARCH_OMAP2PLUS
        select ARCH_HAS_HOLES_MEMORYMODEL
        select ARCH_OMAP
        select ARCH_REQUIRE_GPIOLIB
-       select CLKDEV_LOOKUP
        select CLKSRC_MMIO
+       select COMMON_CLK
        select GENERIC_CLOCKEVENTS
        select GENERIC_IRQ_CHIP
-       select HAVE_CLK
+       select MACH_OMAP_GENERIC
        select OMAP_DM_TIMER
        select PINCTRL
        select PROC_DEVICETREE if PROC_FS
@@ -187,16 +181,11 @@ config OMAP_PACKAGE_CUS
 config OMAP_PACKAGE_CBP
        bool
 
-comment "OMAP Board Type"
+comment "OMAP Legacy Platform Data Board Type"
        depends on ARCH_OMAP2PLUS
 
 config MACH_OMAP_GENERIC
-       bool "Generic OMAP2+ board"
-       depends on ARCH_OMAP2PLUS
-       default y
-       help
-         Support for generic TI OMAP2+ boards using Flattened Device Tree.
-         More information at Documentation/devicetree
+       bool
 
 config MACH_OMAP2_TUSB6010
        bool
@@ -260,12 +249,6 @@ config MACH_OVERO
        default y
        select OMAP_PACKAGE_CBB
 
-config MACH_OMAP3EVM
-       bool "OMAP 3530 EVM board"
-       depends on ARCH_OMAP3
-       default y
-       select OMAP_PACKAGE_CBB
-
 config MACH_OMAP3517EVM
        bool "OMAP3517/ AM3517 EVM board"
        depends on ARCH_OMAP3
@@ -314,33 +297,12 @@ config MACH_NOKIA_N8X0
        select MACH_NOKIA_N810_WIMAX
        select OMAP_PACKAGE_ZAC
 
-config MACH_NOKIA_RM680
-       bool "Nokia N950 (RM-680) / N9 (RM-696) phones"
-       depends on ARCH_OMAP3
-       default y
-       select MACH_NOKIA_RM696
-       select OMAP_PACKAGE_CBB
-
 config MACH_NOKIA_RX51
        bool "Nokia N900 (RX-51) phone"
        depends on ARCH_OMAP3
        default y
        select OMAP_PACKAGE_CBB
 
-config MACH_OMAP_ZOOM2
-       bool "OMAP3 Zoom2 board"
-       depends on ARCH_OMAP3
-       default y
-       select OMAP_PACKAGE_CBB
-       select REGULATOR_FIXED_VOLTAGE if REGULATOR
-
-config MACH_OMAP_ZOOM3
-       bool "OMAP3630 Zoom3 board"
-       depends on ARCH_OMAP3
-       default y
-       select OMAP_PACKAGE_CBP
-       select REGULATOR_FIXED_VOLTAGE if REGULATOR
-
 config MACH_CM_T35
        bool "CompuLab CM-T35/CM-T3730 modules"
        depends on ARCH_OMAP3
@@ -357,31 +319,12 @@ config MACH_CM_T3517
 config MACH_CM_T3730
        bool
 
-config MACH_IGEP0020
-       bool "IGEP v2 board"
-       depends on ARCH_OMAP3
-       default y
-       select OMAP_PACKAGE_CBB
-
-config MACH_IGEP0030
-       bool "IGEP OMAP3 module"
-       depends on ARCH_OMAP3
-       default y
-       select MACH_IGEP0020
-       select OMAP_PACKAGE_CBB
-
 config MACH_SBC3530
        bool "OMAP3 SBC STALKER board"
        depends on ARCH_OMAP3
        default y
        select OMAP_PACKAGE_CUS
 
-config MACH_OMAP_3630SDP
-       bool "OMAP3630 SDP board"
-       depends on ARCH_OMAP3
-       default y
-       select OMAP_PACKAGE_CBP
-
 config MACH_TI8168EVM
        bool "TI8168 Evaluation Module"
        depends on SOC_TI81XX
index afb457c3135b18707ea23cc7019c68da0ec4c099..e15ac005ef17d02a102ad87def740ef1211d53d0 100644 (file)
@@ -8,7 +8,7 @@ ccflags-$(CONFIG_ARCH_MULTIPLATFORM) := -I$(srctree)/$(src)/include \
 # Common support
 obj-y := id.o io.o control.o mux.o devices.o fb.o serial.o gpmc.o timer.o pm.o \
         common.o gpio.o dma.o wd_timer.o display.o i2c.o hdq1w.o omap_hwmod.o \
-        omap_device.o sram.o
+        omap_device.o sram.o drm.o
 
 omap-2-3-common                                = irq.o
 hwmod-common                           = omap_hwmod.o omap_hwmod_reset.o \
@@ -112,13 +112,13 @@ obj-$(CONFIG_ARCH_OMAP2)          += prm2xxx_3xxx.o prm2xxx.o cm2xxx.o
 obj-$(CONFIG_ARCH_OMAP3)               += prm2xxx_3xxx.o prm3xxx.o cm3xxx.o
 obj-$(CONFIG_ARCH_OMAP3)               += vc3xxx_data.o vp3xxx_data.o
 obj-$(CONFIG_SOC_AM33XX)               += prm33xx.o cm33xx.o
-obj-$(CONFIG_SOC_AM43XX)               += prm33xx.o cm33xx.o
 omap-prcm-4-5-common                   =  cminst44xx.o cm44xx.o prm44xx.o \
                                           prcm_mpu44xx.o prminst44xx.o \
                                           vc44xx_data.o vp44xx_data.o
 obj-$(CONFIG_ARCH_OMAP4)               += $(omap-prcm-4-5-common)
 obj-$(CONFIG_SOC_OMAP5)                        += $(omap-prcm-4-5-common)
 obj-$(CONFIG_SOC_DRA7XX)               += $(omap-prcm-4-5-common)
+obj-$(CONFIG_SOC_AM43XX)               += $(omap-prcm-4-5-common)
 
 # OMAP voltage domains
 voltagedomain-common                   := voltage.o vc.o vp.o
@@ -146,6 +146,7 @@ obj-$(CONFIG_ARCH_OMAP4)            += powerdomains44xx_data.o
 obj-$(CONFIG_SOC_AM33XX)               += $(powerdomain-common)
 obj-$(CONFIG_SOC_AM33XX)               += powerdomains33xx_data.o
 obj-$(CONFIG_SOC_AM43XX)               += $(powerdomain-common)
+obj-$(CONFIG_SOC_AM43XX)               += powerdomains43xx_data.o
 obj-$(CONFIG_SOC_OMAP5)                        += $(powerdomain-common)
 obj-$(CONFIG_SOC_OMAP5)                        += powerdomains54xx_data.o
 obj-$(CONFIG_SOC_DRA7XX)               += $(powerdomain-common)
@@ -165,6 +166,7 @@ obj-$(CONFIG_ARCH_OMAP4)            += clockdomains44xx_data.o
 obj-$(CONFIG_SOC_AM33XX)               += $(clockdomain-common)
 obj-$(CONFIG_SOC_AM33XX)               += clockdomains33xx_data.o
 obj-$(CONFIG_SOC_AM43XX)               += $(clockdomain-common)
+obj-$(CONFIG_SOC_AM43XX)               += clockdomains43xx_data.o
 obj-$(CONFIG_SOC_OMAP5)                        += $(clockdomain-common)
 obj-$(CONFIG_SOC_OMAP5)                        += clockdomains54xx_data.o
 obj-$(CONFIG_SOC_DRA7XX)               += $(clockdomain-common)
@@ -210,6 +212,11 @@ obj-$(CONFIG_ARCH_OMAP3)           += omap_hwmod_2xxx_3xxx_ipblock_data.o
 obj-$(CONFIG_ARCH_OMAP3)               += omap_hwmod_2xxx_3xxx_interconnect_data.o
 obj-$(CONFIG_ARCH_OMAP3)               += omap_hwmod_3xxx_data.o
 obj-$(CONFIG_SOC_AM33XX)               += omap_hwmod_33xx_data.o
+obj-$(CONFIG_SOC_AM33XX)               += omap_hwmod_33xx_43xx_interconnect_data.o
+obj-$(CONFIG_SOC_AM33XX)               += omap_hwmod_33xx_43xx_ipblock_data.o
+obj-$(CONFIG_SOC_AM43XX)               += omap_hwmod_43xx_data.o
+obj-$(CONFIG_SOC_AM43XX)               += omap_hwmod_33xx_43xx_interconnect_data.o
+obj-$(CONFIG_SOC_AM43XX)               += omap_hwmod_33xx_43xx_ipblock_data.o
 obj-$(CONFIG_ARCH_OMAP4)               += omap_hwmod_44xx_data.o
 obj-$(CONFIG_SOC_OMAP5)                        += omap_hwmod_54xx_data.o
 obj-$(CONFIG_SOC_DRA7XX)               += omap_hwmod_7xx_data.o
@@ -228,12 +235,8 @@ endif
 # OMAP2420 MSDI controller integration support ("MMC")
 obj-$(CONFIG_SOC_OMAP2420)             += msdi.o
 
-ifneq ($(CONFIG_DRM_OMAP),)
-obj-y                                  += drm.o
-endif
-
 # Specific board support
-obj-$(CONFIG_MACH_OMAP_GENERIC)                += board-generic.o
+obj-$(CONFIG_MACH_OMAP_GENERIC)                += board-generic.o pdata-quirks.o
 obj-$(CONFIG_MACH_OMAP_H4)             += board-h4.o
 obj-$(CONFIG_MACH_OMAP_2430SDP)                += board-2430sdp.o
 obj-$(CONFIG_MACH_OMAP3_BEAGLE)                += board-omap3beagle.o
@@ -242,26 +245,14 @@ obj-$(CONFIG_MACH_OMAP_LDP)               += board-ldp.o
 obj-$(CONFIG_MACH_OMAP3530_LV_SOM)      += board-omap3logic.o
 obj-$(CONFIG_MACH_OMAP3_TORPEDO)        += board-omap3logic.o
 obj-$(CONFIG_MACH_OVERO)               += board-overo.o
-obj-$(CONFIG_MACH_OMAP3EVM)            += board-omap3evm.o
 obj-$(CONFIG_MACH_OMAP3_PANDORA)       += board-omap3pandora.o
 obj-$(CONFIG_MACH_OMAP_3430SDP)                += board-3430sdp.o
 obj-$(CONFIG_MACH_NOKIA_N8X0)          += board-n8x0.o
-obj-$(CONFIG_MACH_NOKIA_RM680)         += board-rm680.o sdram-nokia.o
 obj-$(CONFIG_MACH_NOKIA_RX51)          += board-rx51.o sdram-nokia.o
 obj-$(CONFIG_MACH_NOKIA_RX51)          += board-rx51-peripherals.o
 obj-$(CONFIG_MACH_NOKIA_RX51)          += board-rx51-video.o
-obj-$(CONFIG_MACH_OMAP_ZOOM2)          += board-zoom.o board-zoom-peripherals.o
-obj-$(CONFIG_MACH_OMAP_ZOOM2)          += board-zoom-display.o
-obj-$(CONFIG_MACH_OMAP_ZOOM2)          += board-zoom-debugboard.o
-obj-$(CONFIG_MACH_OMAP_ZOOM3)          += board-zoom.o board-zoom-peripherals.o
-obj-$(CONFIG_MACH_OMAP_ZOOM3)          += board-zoom-display.o
-obj-$(CONFIG_MACH_OMAP_ZOOM3)          += board-zoom-debugboard.o
-obj-$(CONFIG_MACH_OMAP_3630SDP)                += board-3630sdp.o
-obj-$(CONFIG_MACH_OMAP_3630SDP)                += board-zoom-peripherals.o
-obj-$(CONFIG_MACH_OMAP_3630SDP)                += board-zoom-display.o
 obj-$(CONFIG_MACH_CM_T35)              += board-cm-t35.o
 obj-$(CONFIG_MACH_CM_T3517)            += board-cm-t3517.o
-obj-$(CONFIG_MACH_IGEP0020)            += board-igep0020.o
 obj-$(CONFIG_MACH_TOUCHBOOK)           += board-omap3touchbook.o
 
 obj-$(CONFIG_MACH_OMAP3517EVM)         += board-am3517evm.o
diff --git a/arch/arm/mach-omap2/board-3630sdp.c b/arch/arm/mach-omap2/board-3630sdp.c
deleted file mode 100644 (file)
index 20d6d81..0000000
+++ /dev/null
@@ -1,225 +0,0 @@
-/*
- * Copyright (C) 2009 Texas Instruments Inc.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- */
-
-#include <linux/kernel.h>
-#include <linux/init.h>
-#include <linux/platform_device.h>
-#include <linux/input.h>
-#include <linux/gpio.h>
-#include <linux/mtd/nand.h>
-
-#include <asm/mach-types.h>
-#include <asm/mach/arch.h>
-
-#include "common.h"
-#include "gpmc-smc91x.h"
-
-#include "board-zoom.h"
-
-#include "board-flash.h"
-#include "mux.h"
-#include "sdram-hynix-h8mbx00u0mer-0em.h"
-
-#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE)
-
-static struct omap_smc91x_platform_data board_smc91x_data = {
-       .cs             = 3,
-       .flags          = GPMC_MUX_ADD_DATA | IORESOURCE_IRQ_LOWLEVEL,
-};
-
-static void __init board_smc91x_init(void)
-{
-       board_smc91x_data.gpio_irq = 158;
-       gpmc_smc91x_init(&board_smc91x_data);
-}
-
-#else
-
-static inline void board_smc91x_init(void)
-{
-}
-
-#endif /* defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) */
-
-static void enable_board_wakeup_source(void)
-{
-       /* T2 interrupt line (keypad) */
-       omap_mux_init_signal("sys_nirq",
-               OMAP_WAKEUP_EN | OMAP_PIN_INPUT_PULLUP);
-}
-
-static struct usbhs_phy_data phy_data[] __initdata = {
-       {
-               .port = 1,
-               .reset_gpio = 126,
-               .vcc_gpio = -EINVAL,
-       },
-       {
-               .port = 2,
-               .reset_gpio = 61,
-               .vcc_gpio = -EINVAL,
-       },
-};
-
-static struct usbhs_omap_platform_data usbhs_bdata __initdata = {
-
-       .port_mode[0] = OMAP_EHCI_PORT_MODE_PHY,
-       .port_mode[1] = OMAP_EHCI_PORT_MODE_PHY,
-};
-
-#ifdef CONFIG_OMAP_MUX
-static struct omap_board_mux board_mux[] __initdata = {
-       { .reg_offset = OMAP_MUX_TERMINATOR },
-};
-#endif
-
-/*
- * SDP3630 CS organization
- * See also the Switch S8 settings in the comments.
- */
-static char chip_sel_sdp[][GPMC_CS_NUM] = {
-       {PDC_NOR, PDC_NAND, PDC_ONENAND, DBG_MPDB, 0, 0, 0, 0}, /* S8:1111 */
-       {PDC_ONENAND, PDC_NAND, PDC_NOR, DBG_MPDB, 0, 0, 0, 0}, /* S8:1110 */
-       {PDC_NAND, PDC_ONENAND, PDC_NOR, DBG_MPDB, 0, 0, 0, 0}, /* S8:1101 */
-};
-
-static struct mtd_partition sdp_nor_partitions[] = {
-       /* bootloader (U-Boot, etc) in first sector */
-       {
-               .name           = "Bootloader-NOR",
-               .offset         = 0,
-               .size           = SZ_256K,
-               .mask_flags     = MTD_WRITEABLE, /* force read-only */
-       },
-       /* bootloader params in the next sector */
-       {
-               .name           = "Params-NOR",
-               .offset         = MTDPART_OFS_APPEND,
-               .size           = SZ_256K,
-               .mask_flags     = 0,
-       },
-       /* kernel */
-       {
-               .name           = "Kernel-NOR",
-               .offset         = MTDPART_OFS_APPEND,
-               .size           = SZ_2M,
-               .mask_flags     = 0
-       },
-       /* file system */
-       {
-               .name           = "Filesystem-NOR",
-               .offset         = MTDPART_OFS_APPEND,
-               .size           = MTDPART_SIZ_FULL,
-               .mask_flags     = 0
-       }
-};
-
-static struct mtd_partition sdp_onenand_partitions[] = {
-       {
-               .name           = "X-Loader-OneNAND",
-               .offset         = 0,
-               .size           = 4 * (64 * 2048),
-               .mask_flags     = MTD_WRITEABLE  /* force read-only */
-       },
-       {
-               .name           = "U-Boot-OneNAND",
-               .offset         = MTDPART_OFS_APPEND,
-               .size           = 2 * (64 * 2048),
-               .mask_flags     = MTD_WRITEABLE  /* force read-only */
-       },
-       {
-               .name           = "U-Boot Environment-OneNAND",
-               .offset         = MTDPART_OFS_APPEND,
-               .size           = 1 * (64 * 2048),
-       },
-       {
-               .name           = "Kernel-OneNAND",
-               .offset         = MTDPART_OFS_APPEND,
-               .size           = 16 * (64 * 2048),
-       },
-       {
-               .name           = "File System-OneNAND",
-               .offset         = MTDPART_OFS_APPEND,
-               .size           = MTDPART_SIZ_FULL,
-       },
-};
-
-static struct mtd_partition sdp_nand_partitions[] = {
-       /* All the partition sizes are listed in terms of NAND block size */
-       {
-               .name           = "X-Loader-NAND",
-               .offset         = 0,
-               .size           = 4 * (64 * 2048),
-               .mask_flags     = MTD_WRITEABLE,        /* force read-only */
-       },
-       {
-               .name           = "U-Boot-NAND",
-               .offset         = MTDPART_OFS_APPEND,   /* Offset = 0x80000 */
-               .size           = 10 * (64 * 2048),
-               .mask_flags     = MTD_WRITEABLE,        /* force read-only */
-       },
-       {
-               .name           = "Boot Env-NAND",
-
-               .offset         = MTDPART_OFS_APPEND,   /* Offset = 0x1c0000 */
-               .size           = 6 * (64 * 2048),
-       },
-       {
-               .name           = "Kernel-NAND",
-               .offset         = MTDPART_OFS_APPEND,   /* Offset = 0x280000 */
-               .size           = 40 * (64 * 2048),
-       },
-       {
-               .name           = "File System - NAND",
-               .size           = MTDPART_SIZ_FULL,
-               .offset         = MTDPART_OFS_APPEND,   /* Offset = 0x780000 */
-       },
-};
-
-static struct flash_partitions sdp_flash_partitions[] = {
-       {
-               .parts = sdp_nor_partitions,
-               .nr_parts = ARRAY_SIZE(sdp_nor_partitions),
-       },
-       {
-               .parts = sdp_onenand_partitions,
-               .nr_parts = ARRAY_SIZE(sdp_onenand_partitions),
-       },
-       {
-               .parts = sdp_nand_partitions,
-               .nr_parts = ARRAY_SIZE(sdp_nand_partitions),
-       },
-};
-
-static void __init omap_sdp_init(void)
-{
-       omap3_mux_init(board_mux, OMAP_PACKAGE_CBP);
-       zoom_peripherals_init();
-       omap_sdrc_init(h8mbx00u0mer0em_sdrc_params,
-                                 h8mbx00u0mer0em_sdrc_params);
-       zoom_display_init();
-       board_smc91x_init();
-       board_flash_init(sdp_flash_partitions, chip_sel_sdp, NAND_BUSWIDTH_16);
-       enable_board_wakeup_source();
-
-       usbhs_init_phys(phy_data, ARRAY_SIZE(phy_data));
-       usbhs_init(&usbhs_bdata);
-}
-
-MACHINE_START(OMAP_3630SDP, "OMAP 3630SDP board")
-       .atag_offset    = 0x100,
-       .reserve        = omap_reserve,
-       .map_io         = omap3_map_io,
-       .init_early     = omap3630_init_early,
-       .init_irq       = omap3_init_irq,
-       .handle_irq     = omap3_intc_handle_irq,
-       .init_machine   = omap_sdp_init,
-       .init_late      = omap3630_init_late,
-       .init_time      = omap3_sync32k_timer_init,
-       .restart        = omap3xxx_restart,
-MACHINE_END
index 87162e1b94a59104a2bca07114da5d8a02816fba..3896b12b0006b7a4ff39cb72d93dff23db66eac1 100644 (file)
 #include <linux/of_irq.h>
 #include <linux/of_platform.h>
 #include <linux/irqdomain.h>
-#include <linux/clk.h>
 
 #include <asm/mach/arch.h>
 
 #include "common.h"
-#include "common-board-devices.h"
-#include "dss-common.h"
 
 #if !(defined(CONFIG_ARCH_OMAP2) || defined(CONFIG_ARCH_OMAP3))
 #define intc_of_init   NULL
@@ -36,40 +33,9 @@ static struct of_device_id omap_dt_match_table[] __initdata = {
        { }
 };
 
-/*
- * Create alias for USB host PHY clock.
- * Remove this when clock phandle can be provided via DT
- */
-static void __init legacy_init_ehci_clk(char *clkname)
-{
-       int ret;
-
-       ret = clk_add_alias("main_clk", NULL, clkname, NULL);
-       if (ret) {
-               pr_err("%s:Failed to add main_clk alias to %s :%d\n",
-                                               __func__, clkname, ret);
-       }
-}
-
 static void __init omap_generic_init(void)
 {
-       omap_sdrc_init(NULL, NULL);
-
-       of_platform_populate(NULL, omap_dt_match_table, NULL, NULL);
-
-       /*
-        * HACK: call display setup code for selected boards to enable omapdss.
-        * This will be removed when omapdss supports DT.
-        */
-       if (of_machine_is_compatible("ti,omap4-panda")) {
-               omap4_panda_display_init_of();
-               legacy_init_ehci_clk("auxclk3_ck");
-
-       }
-       else if (of_machine_is_compatible("ti,omap4-sdp"))
-               omap_4430sdp_display_init_of();
-       else if (of_machine_is_compatible("ti,omap5-uevm"))
-               legacy_init_ehci_clk("auxclk1_ck");
+       pdata_quirks_init(omap_dt_match_table);
 }
 
 #ifdef CONFIG_SOC_OMAP2420
diff --git a/arch/arm/mach-omap2/board-igep0020.c b/arch/arm/mach-omap2/board-igep0020.c
deleted file mode 100644 (file)
index 06dbb2d..0000000
+++ /dev/null
@@ -1,718 +0,0 @@
-/*
- * Copyright (C) 2009 Integration Software and Electronic Engineering.
- *
- * Modified from mach-omap2/board-generic.c
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- */
-
-#include <linux/kernel.h>
-#include <linux/init.h>
-#include <linux/platform_device.h>
-#include <linux/delay.h>
-#include <linux/err.h>
-#include <linux/clk.h>
-#include <linux/io.h>
-#include <linux/gpio.h>
-#include <linux/interrupt.h>
-#include <linux/input.h>
-#include <linux/usb/phy.h>
-
-#include <linux/regulator/machine.h>
-#include <linux/regulator/fixed.h>
-#include <linux/i2c/twl.h>
-#include <linux/mmc/host.h>
-
-#include <linux/mtd/nand.h>
-
-#include <asm/mach-types.h>
-#include <asm/mach/arch.h>
-
-#include <video/omapdss.h>
-#include <video/omap-panel-data.h>
-#include <linux/platform_data/mtd-onenand-omap2.h>
-
-#include "common.h"
-#include "gpmc.h"
-#include "mux.h"
-#include "hsmmc.h"
-#include "sdram-numonyx-m65kxxxxam.h"
-#include "common-board-devices.h"
-#include "board-flash.h"
-#include "control.h"
-#include "gpmc-onenand.h"
-
-#define IGEP2_SMSC911X_CS       5
-#define IGEP2_SMSC911X_GPIO     176
-#define IGEP2_GPIO_USBH_NRESET  24
-#define IGEP2_GPIO_LED0_GREEN   26
-#define IGEP2_GPIO_LED0_RED     27
-#define IGEP2_GPIO_LED1_RED     28
-#define IGEP2_GPIO_DVI_PUP      170
-
-#define IGEP2_RB_GPIO_WIFI_NPD     94
-#define IGEP2_RB_GPIO_WIFI_NRESET  95
-#define IGEP2_RB_GPIO_BT_NRESET    137
-#define IGEP2_RC_GPIO_WIFI_NPD     138
-#define IGEP2_RC_GPIO_WIFI_NRESET  139
-#define IGEP2_RC_GPIO_BT_NRESET    137
-
-#define IGEP3_GPIO_LED0_GREEN  54
-#define IGEP3_GPIO_LED0_RED    53
-#define IGEP3_GPIO_LED1_RED    16
-#define IGEP3_GPIO_USBH_NRESET  183
-
-#define IGEP_SYSBOOT_MASK           0x1f
-#define IGEP_SYSBOOT_NAND           0x0f
-#define IGEP_SYSBOOT_ONENAND        0x10
-
-/*
- * IGEP2 Hardware Revision Table
- *
- *  --------------------------------------------------------------------------
- * | Id. | Hw Rev.            | HW0 (28) | WIFI_NPD | WIFI_NRESET | BT_NRESET |
- *  --------------------------------------------------------------------------
- * |  0  | B                  |   high   |  gpio94  |   gpio95    |     -     |
- * |  0  | B/C (B-compatible) |   high   |  gpio94  |   gpio95    |  gpio137  |
- * |  1  | C                  |   low    |  gpio138 |   gpio139   |  gpio137  |
- *  --------------------------------------------------------------------------
- */
-
-#define IGEP2_BOARD_HWREV_B    0
-#define IGEP2_BOARD_HWREV_C    1
-#define IGEP3_BOARD_HWREV      2
-
-static u8 hwrev;
-
-static void __init igep2_get_revision(void)
-{
-       u8 ret;
-
-       if (machine_is_igep0030()) {
-               hwrev = IGEP3_BOARD_HWREV;
-               return;
-       }
-
-       omap_mux_init_gpio(IGEP2_GPIO_LED1_RED, OMAP_PIN_INPUT);
-
-       if (gpio_request_one(IGEP2_GPIO_LED1_RED, GPIOF_IN, "GPIO_HW0_REV")) {
-               pr_warning("IGEP2: Could not obtain gpio GPIO_HW0_REV\n");
-               pr_err("IGEP2: Unknown Hardware Revision\n");
-               return;
-       }
-
-       ret = gpio_get_value(IGEP2_GPIO_LED1_RED);
-       if (ret == 0) {
-               pr_info("IGEP2: Hardware Revision C (B-NON compatible)\n");
-               hwrev = IGEP2_BOARD_HWREV_C;
-       } else if (ret ==  1) {
-               pr_info("IGEP2: Hardware Revision B/C (B compatible)\n");
-               hwrev = IGEP2_BOARD_HWREV_B;
-       } else {
-               pr_err("IGEP2: Unknown Hardware Revision\n");
-               hwrev = -1;
-       }
-
-       gpio_free(IGEP2_GPIO_LED1_RED);
-}
-
-#if defined(CONFIG_MTD_ONENAND_OMAP2) ||               \
-       defined(CONFIG_MTD_ONENAND_OMAP2_MODULE) ||     \
-       defined(CONFIG_MTD_NAND_OMAP2) ||               \
-       defined(CONFIG_MTD_NAND_OMAP2_MODULE)
-
-#define ONENAND_MAP             0x20000000
-
-/* NAND04GR4E1A ( x2 Flash built-in COMBO POP MEMORY )
- * Since the device is equipped with two DataRAMs, and two-plane NAND
- * Flash memory array, these two component enables simultaneous program
- * of 4KiB. Plane1 has only even blocks such as block0, block2, block4
- * while Plane2 has only odd blocks such as block1, block3, block5.
- * So MTD regards it as 4KiB page size and 256KiB block size 64*(2*2048)
- */
-
-static struct mtd_partition igep_flash_partitions[] = {
-       {
-               .name           = "X-Loader",
-               .offset         = 0,
-               .size           = 2 * (64*(2*2048))
-       },
-       {
-               .name           = "U-Boot",
-               .offset         = MTDPART_OFS_APPEND,
-               .size           = 6 * (64*(2*2048)),
-       },
-       {
-               .name           = "Environment",
-               .offset         = MTDPART_OFS_APPEND,
-               .size           = 2 * (64*(2*2048)),
-       },
-       {
-               .name           = "Kernel",
-               .offset         = MTDPART_OFS_APPEND,
-               .size           = 12 * (64*(2*2048)),
-       },
-       {
-               .name           = "File System",
-               .offset         = MTDPART_OFS_APPEND,
-               .size           = MTDPART_SIZ_FULL,
-       },
-};
-
-static inline u32 igep_get_sysboot_value(void)
-{
-       return omap_ctrl_readl(OMAP343X_CONTROL_STATUS) & IGEP_SYSBOOT_MASK;
-}
-
-static void __init igep_flash_init(void)
-{
-       u32 mux;
-       mux = igep_get_sysboot_value();
-
-       if (mux == IGEP_SYSBOOT_NAND) {
-               pr_info("IGEP: initializing NAND memory device\n");
-               board_nand_init(igep_flash_partitions,
-                               ARRAY_SIZE(igep_flash_partitions),
-                               0, NAND_BUSWIDTH_16, nand_default_timings);
-       } else if (mux == IGEP_SYSBOOT_ONENAND) {
-               pr_info("IGEP: initializing OneNAND memory device\n");
-               board_onenand_init(igep_flash_partitions,
-                                  ARRAY_SIZE(igep_flash_partitions), 0);
-       } else {
-               pr_err("IGEP: Flash: unsupported sysboot sequence found\n");
-       }
-}
-
-#else
-static void __init igep_flash_init(void) {}
-#endif
-
-#if defined(CONFIG_SMSC911X) || defined(CONFIG_SMSC911X_MODULE)
-
-#include <linux/smsc911x.h>
-#include "gpmc-smsc911x.h"
-
-static struct omap_smsc911x_platform_data smsc911x_cfg = {
-       .cs             = IGEP2_SMSC911X_CS,
-       .gpio_irq       = IGEP2_SMSC911X_GPIO,
-       .gpio_reset     = -EINVAL,
-       .flags          = SMSC911X_USE_32BIT | SMSC911X_SAVE_MAC_ADDRESS,
-};
-
-static inline void __init igep2_init_smsc911x(void)
-{
-       gpmc_smsc911x_init(&smsc911x_cfg);
-}
-
-#else
-static inline void __init igep2_init_smsc911x(void) { }
-#endif
-
-static struct regulator_consumer_supply igep_vmmc1_supply[] = {
-       REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"),
-};
-
-/* VMMC1 for OMAP VDD_MMC1 (i/o) and MMC1 card */
-static struct regulator_init_data igep_vmmc1 = {
-       .constraints = {
-               .min_uV                 = 1850000,
-               .max_uV                 = 3150000,
-               .valid_modes_mask       = REGULATOR_MODE_NORMAL
-                                       | REGULATOR_MODE_STANDBY,
-               .valid_ops_mask         = REGULATOR_CHANGE_VOLTAGE
-                                       | REGULATOR_CHANGE_MODE
-                                       | REGULATOR_CHANGE_STATUS,
-       },
-       .num_consumer_supplies  = ARRAY_SIZE(igep_vmmc1_supply),
-       .consumer_supplies      = igep_vmmc1_supply,
-};
-
-static struct regulator_consumer_supply igep_vio_supply[] = {
-       REGULATOR_SUPPLY("vmmc_aux", "omap_hsmmc.1"),
-};
-
-static struct regulator_init_data igep_vio = {
-       .constraints = {
-               .min_uV                 = 1800000,
-               .max_uV                 = 1800000,
-               .apply_uV               = 1,
-               .valid_modes_mask       = REGULATOR_MODE_NORMAL
-                                       | REGULATOR_MODE_STANDBY,
-               .valid_ops_mask         = REGULATOR_CHANGE_VOLTAGE
-                                       | REGULATOR_CHANGE_MODE
-                                       | REGULATOR_CHANGE_STATUS,
-       },
-       .num_consumer_supplies  = ARRAY_SIZE(igep_vio_supply),
-       .consumer_supplies      = igep_vio_supply,
-};
-
-static struct regulator_consumer_supply igep_vmmc2_supply[] = {
-       REGULATOR_SUPPLY("vmmc", "omap_hsmmc.1"),
-};
-
-static struct regulator_init_data igep_vmmc2 = {
-       .constraints            = {
-               .valid_modes_mask       = REGULATOR_MODE_NORMAL,
-               .always_on              = 1,
-       },
-       .num_consumer_supplies  = ARRAY_SIZE(igep_vmmc2_supply),
-       .consumer_supplies      = igep_vmmc2_supply,
-};
-
-static struct fixed_voltage_config igep_vwlan = {
-       .supply_name            = "vwlan",
-       .microvolts             = 3300000,
-       .gpio                   = -EINVAL,
-       .enabled_at_boot        = 1,
-       .init_data              = &igep_vmmc2,
-};
-
-static struct platform_device igep_vwlan_device = {
-       .name           = "reg-fixed-voltage",
-       .id             = 0,
-       .dev = {
-               .platform_data  = &igep_vwlan,
-       },
-};
-
-static struct omap2_hsmmc_info mmc[] = {
-       {
-               .mmc            = 1,
-               .caps           = MMC_CAP_4_BIT_DATA,
-               .gpio_cd        = -EINVAL,
-               .gpio_wp        = -EINVAL,
-               .deferred       = true,
-       },
-#if defined(CONFIG_LIBERTAS_SDIO) || defined(CONFIG_LIBERTAS_SDIO_MODULE)
-       {
-               .mmc            = 2,
-               .caps           = MMC_CAP_4_BIT_DATA,
-               .gpio_cd        = -EINVAL,
-               .gpio_wp        = -EINVAL,
-       },
-#endif
-       {}      /* Terminator */
-};
-
-#if defined(CONFIG_LEDS_GPIO) || defined(CONFIG_LEDS_GPIO_MODULE)
-#include <linux/leds.h>
-
-static struct gpio_led igep_gpio_leds[] = {
-       [0] = {
-               .name                   = "omap3:red:user0",
-               .default_state          = 0,
-       },
-       [1] = {
-               .name                   = "omap3:green:boot",
-               .default_state          = 1,
-       },
-       [2] = {
-               .name                   = "omap3:red:user1",
-               .default_state          = 0,
-       },
-       [3] = {
-               .name                   = "omap3:green:user1",
-               .default_state          = 0,
-               .gpio                   = -EINVAL, /* gets replaced */
-               .active_low             = 1,
-       },
-};
-
-static struct gpio_led_platform_data igep_led_pdata = {
-       .leds           = igep_gpio_leds,
-       .num_leds       = ARRAY_SIZE(igep_gpio_leds),
-};
-
-static struct platform_device igep_led_device = {
-        .name   = "leds-gpio",
-        .id     = -1,
-        .dev    = {
-                .platform_data  =  &igep_led_pdata,
-       },
-};
-
-static void __init igep_leds_init(void)
-{
-       if (machine_is_igep0020()) {
-               igep_gpio_leds[0].gpio = IGEP2_GPIO_LED0_RED;
-               igep_gpio_leds[1].gpio = IGEP2_GPIO_LED0_GREEN;
-               igep_gpio_leds[2].gpio = IGEP2_GPIO_LED1_RED;
-       } else {
-               igep_gpio_leds[0].gpio = IGEP3_GPIO_LED0_RED;
-               igep_gpio_leds[1].gpio = IGEP3_GPIO_LED0_GREEN;
-               igep_gpio_leds[2].gpio = IGEP3_GPIO_LED1_RED;
-       }
-
-       platform_device_register(&igep_led_device);
-}
-
-#else
-static struct gpio igep_gpio_leds[] __initdata = {
-       { -EINVAL,      GPIOF_OUT_INIT_LOW, "gpio-led:red:d0"   },
-       { -EINVAL,      GPIOF_OUT_INIT_LOW, "gpio-led:green:d0" },
-       { -EINVAL,      GPIOF_OUT_INIT_LOW, "gpio-led:red:d1"   },
-};
-
-static inline void igep_leds_init(void)
-{
-       int i;
-
-       if (machine_is_igep0020()) {
-               igep_gpio_leds[0].gpio = IGEP2_GPIO_LED0_RED;
-               igep_gpio_leds[1].gpio = IGEP2_GPIO_LED0_GREEN;
-               igep_gpio_leds[2].gpio = IGEP2_GPIO_LED1_RED;
-       } else {
-               igep_gpio_leds[0].gpio = IGEP3_GPIO_LED0_RED;
-               igep_gpio_leds[1].gpio = IGEP3_GPIO_LED0_GREEN;
-               igep_gpio_leds[2].gpio = IGEP3_GPIO_LED1_RED;
-       }
-
-       if (gpio_request_array(igep_gpio_leds, ARRAY_SIZE(igep_gpio_leds))) {
-               pr_warning("IGEP v2: Could not obtain leds gpios\n");
-               return;
-       }
-
-       for (i = 0; i < ARRAY_SIZE(igep_gpio_leds); i++)
-               gpio_export(igep_gpio_leds[i].gpio, 0);
-}
-#endif
-
-static struct gpio igep2_twl_gpios[] = {
-       { -EINVAL, GPIOF_IN,            "GPIO_EHCI_NOC"  },
-       { -EINVAL, GPIOF_OUT_INIT_LOW,  "GPIO_USBH_CPEN" },
-};
-
-static int igep_twl_gpio_setup(struct device *dev,
-               unsigned gpio, unsigned ngpio)
-{
-       int ret;
-
-       /* gpio + 0 is "mmc0_cd" (input/IRQ) */
-       mmc[0].gpio_cd = gpio + 0;
-       omap_hsmmc_late_init(mmc);
-
-       /* TWL4030_GPIO_MAX + 1 == ledB (out, active low LED) */
-#if !defined(CONFIG_LEDS_GPIO) && !defined(CONFIG_LEDS_GPIO_MODULE)
-       ret = gpio_request_one(gpio + TWL4030_GPIO_MAX + 1, GPIOF_OUT_INIT_HIGH,
-                              "gpio-led:green:d1");
-       if (ret == 0)
-               gpio_export(gpio + TWL4030_GPIO_MAX + 1, 0);
-       else
-               pr_warning("IGEP: Could not obtain gpio GPIO_LED1_GREEN\n");
-#else
-       igep_gpio_leds[3].gpio = gpio + TWL4030_GPIO_MAX + 1;
-#endif
-
-       if (machine_is_igep0030())
-               return 0;
-
-       /*
-        * REVISIT: need ehci-omap hooks for external VBUS
-        * power switch and overcurrent detect
-        */
-       igep2_twl_gpios[0].gpio = gpio + 1;
-
-       /* TWL4030_GPIO_MAX + 0 == ledA, GPIO_USBH_CPEN (out, active low) */
-       igep2_twl_gpios[1].gpio = gpio + TWL4030_GPIO_MAX;
-
-       ret = gpio_request_array(igep2_twl_gpios, ARRAY_SIZE(igep2_twl_gpios));
-       if (ret < 0)
-               pr_err("IGEP2: Could not obtain gpio for USBH_CPEN");
-
-       return 0;
-};
-
-static struct twl4030_gpio_platform_data igep_twl4030_gpio_pdata = {
-       .use_leds       = true,
-       .setup          = igep_twl_gpio_setup,
-};
-
-static struct connector_dvi_platform_data omap3stalker_dvi_connector_pdata = {
-       .name                   = "dvi",
-       .source                 = "tfp410.0",
-       .i2c_bus_num            = 3,
-};
-
-static struct platform_device omap3stalker_dvi_connector_device = {
-       .name                   = "connector-dvi",
-       .id                     = 0,
-       .dev.platform_data      = &omap3stalker_dvi_connector_pdata,
-};
-
-static struct encoder_tfp410_platform_data omap3stalker_tfp410_pdata = {
-       .name                   = "tfp410.0",
-       .source                 = "dpi.0",
-       .data_lines             = 24,
-       .power_down_gpio        = IGEP2_GPIO_DVI_PUP,
-};
-
-static struct platform_device omap3stalker_tfp410_device = {
-       .name                   = "tfp410",
-       .id                     = 0,
-       .dev.platform_data      = &omap3stalker_tfp410_pdata,
-};
-
-static struct omap_dss_board_info igep2_dss_data = {
-       .default_display_name = "dvi",
-};
-
-static struct platform_device *igep_devices[] __initdata = {
-       &igep_vwlan_device,
-       &omap3stalker_tfp410_device,
-       &omap3stalker_dvi_connector_device,
-};
-
-static int igep2_keymap[] = {
-       KEY(0, 0, KEY_LEFT),
-       KEY(0, 1, KEY_RIGHT),
-       KEY(0, 2, KEY_A),
-       KEY(0, 3, KEY_B),
-       KEY(1, 0, KEY_DOWN),
-       KEY(1, 1, KEY_UP),
-       KEY(1, 2, KEY_E),
-       KEY(1, 3, KEY_F),
-       KEY(2, 0, KEY_ENTER),
-       KEY(2, 1, KEY_I),
-       KEY(2, 2, KEY_J),
-       KEY(2, 3, KEY_K),
-       KEY(3, 0, KEY_M),
-       KEY(3, 1, KEY_N),
-       KEY(3, 2, KEY_O),
-       KEY(3, 3, KEY_P)
-};
-
-static struct matrix_keymap_data igep2_keymap_data = {
-       .keymap                 = igep2_keymap,
-       .keymap_size            = ARRAY_SIZE(igep2_keymap),
-};
-
-static struct twl4030_keypad_data igep2_keypad_pdata = {
-       .keymap_data    = &igep2_keymap_data,
-       .rows           = 4,
-       .cols           = 4,
-       .rep            = 1,
-};
-
-static struct twl4030_platform_data igep_twldata = {
-       /* platform_data for children goes here */
-       .gpio           = &igep_twl4030_gpio_pdata,
-       .vmmc1          = &igep_vmmc1,
-       .vio            = &igep_vio,
-};
-
-static struct i2c_board_info __initdata igep2_i2c3_boardinfo[] = {
-       {
-               I2C_BOARD_INFO("eeprom", 0x50),
-       },
-};
-
-static void __init igep_i2c_init(void)
-{
-       int ret;
-
-       omap3_pmic_get_config(&igep_twldata, TWL_COMMON_PDATA_USB,
-                             TWL_COMMON_REGULATOR_VPLL2);
-       igep_twldata.vpll2->constraints.apply_uV = true;
-       igep_twldata.vpll2->constraints.name = "VDVI";
-
-       if (machine_is_igep0020()) {
-               /*
-                * Bus 3 is attached to the DVI port where devices like the
-                * pico DLP projector don't work reliably with 400kHz
-                */
-               ret = omap_register_i2c_bus(3, 100, igep2_i2c3_boardinfo,
-                                           ARRAY_SIZE(igep2_i2c3_boardinfo));
-               if (ret)
-                       pr_warning("IGEP2: Could not register I2C3 bus (%d)\n", ret);
-
-               igep_twldata.keypad     = &igep2_keypad_pdata;
-               /* Get common pmic data */
-               omap3_pmic_get_config(&igep_twldata, TWL_COMMON_PDATA_AUDIO, 0);
-       }
-
-       omap3_pmic_init("twl4030", &igep_twldata);
-}
-
-static struct usbhs_phy_data igep2_phy_data[] __initdata = {
-       {
-               .port = 1,
-               .reset_gpio = IGEP2_GPIO_USBH_NRESET,
-               .vcc_gpio = -EINVAL,
-       },
-};
-
-static struct usbhs_phy_data igep3_phy_data[] __initdata = {
-       {
-               .port = 2,
-               .reset_gpio = IGEP3_GPIO_USBH_NRESET,
-               .vcc_gpio = -EINVAL,
-       },
-};
-
-static struct usbhs_omap_platform_data igep2_usbhs_bdata __initdata = {
-       .port_mode[0] = OMAP_EHCI_PORT_MODE_PHY,
-};
-
-static struct usbhs_omap_platform_data igep3_usbhs_bdata __initdata = {
-       .port_mode[1] = OMAP_EHCI_PORT_MODE_PHY,
-};
-
-#ifdef CONFIG_OMAP_MUX
-static struct omap_board_mux board_mux[] __initdata = {
-       /* Display Sub System */
-       OMAP3_MUX(DSS_PCLK, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
-       OMAP3_MUX(DSS_HSYNC, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
-       OMAP3_MUX(DSS_VSYNC, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
-       OMAP3_MUX(DSS_ACBIAS, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
-       OMAP3_MUX(DSS_DATA0, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
-       OMAP3_MUX(DSS_DATA1, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
-       OMAP3_MUX(DSS_DATA2, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
-       OMAP3_MUX(DSS_DATA3, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
-       OMAP3_MUX(DSS_DATA4, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
-       OMAP3_MUX(DSS_DATA5, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
-       OMAP3_MUX(DSS_DATA6, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
-       OMAP3_MUX(DSS_DATA7, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
-       OMAP3_MUX(DSS_DATA8, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
-       OMAP3_MUX(DSS_DATA9, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
-       OMAP3_MUX(DSS_DATA10, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
-       OMAP3_MUX(DSS_DATA11, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
-       OMAP3_MUX(DSS_DATA12, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
-       OMAP3_MUX(DSS_DATA13, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
-       OMAP3_MUX(DSS_DATA14, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
-       OMAP3_MUX(DSS_DATA15, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
-       OMAP3_MUX(DSS_DATA16, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
-       OMAP3_MUX(DSS_DATA17, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
-       OMAP3_MUX(DSS_DATA18, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
-       OMAP3_MUX(DSS_DATA19, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
-       OMAP3_MUX(DSS_DATA20, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
-       OMAP3_MUX(DSS_DATA21, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
-       OMAP3_MUX(DSS_DATA22, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
-       OMAP3_MUX(DSS_DATA23, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
-       /* TFP410 PanelBus DVI Transmitte (GPIO_170) */
-       OMAP3_MUX(HDQ_SIO, OMAP_MUX_MODE4 | OMAP_PIN_OUTPUT),
-       /* SMSC9221 LAN Controller ETH IRQ (GPIO_176) */
-       OMAP3_MUX(MCSPI1_CS2, OMAP_MUX_MODE4 | OMAP_PIN_INPUT),
-       { .reg_offset = OMAP_MUX_TERMINATOR },
-};
-#endif
-
-#if defined(CONFIG_LIBERTAS_SDIO) || defined(CONFIG_LIBERTAS_SDIO_MODULE)
-static struct gpio igep_wlan_bt_gpios[] __initdata = {
-       { -EINVAL, GPIOF_OUT_INIT_HIGH, "GPIO_WIFI_NPD"    },
-       { -EINVAL, GPIOF_OUT_INIT_HIGH, "GPIO_WIFI_NRESET" },
-       { -EINVAL, GPIOF_OUT_INIT_HIGH, "GPIO_BT_NRESET"   },
-};
-
-static void __init igep_wlan_bt_init(void)
-{
-       int err;
-
-       /* GPIO's for WLAN-BT combo depends on hardware revision */
-       if (hwrev == IGEP2_BOARD_HWREV_B) {
-               igep_wlan_bt_gpios[0].gpio = IGEP2_RB_GPIO_WIFI_NPD;
-               igep_wlan_bt_gpios[1].gpio = IGEP2_RB_GPIO_WIFI_NRESET;
-               igep_wlan_bt_gpios[2].gpio = IGEP2_RB_GPIO_BT_NRESET;
-       } else if (hwrev == IGEP2_BOARD_HWREV_C || machine_is_igep0030()) {
-               igep_wlan_bt_gpios[0].gpio = IGEP2_RC_GPIO_WIFI_NPD;
-               igep_wlan_bt_gpios[1].gpio = IGEP2_RC_GPIO_WIFI_NRESET;
-               igep_wlan_bt_gpios[2].gpio = IGEP2_RC_GPIO_BT_NRESET;
-       } else
-               return;
-
-       /* Make sure that the GPIO pins are muxed correctly */
-       omap_mux_init_gpio(igep_wlan_bt_gpios[0].gpio, OMAP_PIN_OUTPUT);
-       omap_mux_init_gpio(igep_wlan_bt_gpios[1].gpio, OMAP_PIN_OUTPUT);
-       omap_mux_init_gpio(igep_wlan_bt_gpios[2].gpio, OMAP_PIN_OUTPUT);
-
-       err = gpio_request_array(igep_wlan_bt_gpios,
-                                ARRAY_SIZE(igep_wlan_bt_gpios));
-       if (err) {
-               pr_warning("IGEP2: Could not obtain WIFI/BT gpios\n");
-               return;
-       }
-
-       gpio_export(igep_wlan_bt_gpios[0].gpio, 0);
-       gpio_export(igep_wlan_bt_gpios[1].gpio, 0);
-       gpio_export(igep_wlan_bt_gpios[2].gpio, 0);
-
-       gpio_set_value(igep_wlan_bt_gpios[1].gpio, 0);
-       udelay(10);
-       gpio_set_value(igep_wlan_bt_gpios[1].gpio, 1);
-
-}
-#else
-static inline void __init igep_wlan_bt_init(void) { }
-#endif
-
-static struct regulator_consumer_supply dummy_supplies[] = {
-       REGULATOR_SUPPLY("vddvario", "smsc911x.0"),
-       REGULATOR_SUPPLY("vdd33a", "smsc911x.0"),
-};
-
-static void __init igep_init(void)
-{
-       regulator_register_fixed(1, dummy_supplies, ARRAY_SIZE(dummy_supplies));
-       omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
-
-       /* Get IGEP2 hardware revision */
-       igep2_get_revision();
-
-       omap_hsmmc_init(mmc);
-
-       /* Register I2C busses and drivers */
-       igep_i2c_init();
-       platform_add_devices(igep_devices, ARRAY_SIZE(igep_devices));
-       omap_serial_init();
-       omap_sdrc_init(m65kxxxxam_sdrc_params,
-                                 m65kxxxxam_sdrc_params);
-       usb_bind_phy("musb-hdrc.0.auto", 0, "twl4030_usb");
-       usb_musb_init(NULL);
-
-       igep_flash_init();
-       igep_leds_init();
-       omap_twl4030_audio_init("igep2", NULL);
-
-       /*
-        * WLAN-BT combo module from MuRata which has a Marvell WLAN
-        * (88W8686) + CSR Bluetooth chipset. Uses SDIO interface.
-        */
-       igep_wlan_bt_init();
-
-       if (machine_is_igep0020()) {
-               omap_display_init(&igep2_dss_data);
-               igep2_init_smsc911x();
-               usbhs_init_phys(igep2_phy_data, ARRAY_SIZE(igep2_phy_data));
-               usbhs_init(&igep2_usbhs_bdata);
-       } else {
-               usbhs_init_phys(igep3_phy_data, ARRAY_SIZE(igep3_phy_data));
-               usbhs_init(&igep3_usbhs_bdata);
-       }
-}
-
-MACHINE_START(IGEP0020, "IGEP v2 board")
-       .atag_offset    = 0x100,
-       .reserve        = omap_reserve,
-       .map_io         = omap3_map_io,
-       .init_early     = omap35xx_init_early,
-       .init_irq       = omap3_init_irq,
-       .handle_irq     = omap3_intc_handle_irq,
-       .init_machine   = igep_init,
-       .init_late      = omap35xx_init_late,
-       .init_time      = omap3_sync32k_timer_init,
-       .restart        = omap3xxx_restart,
-MACHINE_END
-
-MACHINE_START(IGEP0030, "IGEP OMAP3 module")
-       .atag_offset    = 0x100,
-       .reserve        = omap_reserve,
-       .map_io         = omap3_map_io,
-       .init_early     = omap35xx_init_early,
-       .init_irq       = omap3_init_irq,
-       .handle_irq     = omap3_intc_handle_irq,
-       .init_machine   = igep_init,
-       .init_late      = omap35xx_init_late,
-       .init_time      = omap3_sync32k_timer_init,
-       .restart        = omap3xxx_restart,
-MACHINE_END
index dd8da2c5399f34386baacd5d79eba2bdc41dc8c9..4ec8d82b0492f3e66e75bec0aa7cff8cd25a5faa 100644 (file)
@@ -36,7 +36,6 @@
 #include <asm/mach/map.h>
 
 #include "common.h"
-#include "board-zoom.h"
 #include "gpmc.h"
 #include "gpmc-smsc911x.h"
 
@@ -406,7 +405,7 @@ static void __init omap_ldp_init(void)
        usb_bind_phy("musb-hdrc.0.auto", 0, "twl4030_usb");
        usb_musb_init(NULL);
        board_nand_init(ldp_nand_partitions, ARRAY_SIZE(ldp_nand_partitions),
-                       ZOOM_NAND_CS, 0, nand_default_timings);
+                       0, 0, nand_default_timings);
 
        omap_hsmmc_init(mmc);
        ldp_display_init();
diff --git a/arch/arm/mach-omap2/board-omap3evm.c b/arch/arm/mach-omap2/board-omap3evm.c
deleted file mode 100644 (file)
index 1814387..0000000
+++ /dev/null
@@ -1,756 +0,0 @@
-/*
- * linux/arch/arm/mach-omap2/board-omap3evm.c
- *
- * Copyright (C) 2008 Texas Instruments
- *
- * Modified from mach-omap2/board-3430sdp.c
- *
- * Initial code: Syed Mohammed Khasim
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- */
-
-#include <linux/kernel.h>
-#include <linux/init.h>
-#include <linux/platform_device.h>
-#include <linux/delay.h>
-#include <linux/err.h>
-#include <linux/clk.h>
-#include <linux/gpio.h>
-#include <linux/input.h>
-#include <linux/input/matrix_keypad.h>
-#include <linux/leds.h>
-#include <linux/interrupt.h>
-
-#include <linux/mtd/mtd.h>
-#include <linux/mtd/partitions.h>
-#include <linux/mtd/nand.h>
-
-#include <linux/spi/spi.h>
-#include <linux/spi/ads7846.h>
-#include <linux/i2c/twl.h>
-#include <linux/usb/otg.h>
-#include <linux/usb/musb.h>
-#include <linux/usb/usb_phy_gen_xceiv.h>
-#include <linux/smsc911x.h>
-
-#include <linux/wl12xx.h>
-#include <linux/regulator/fixed.h>
-#include <linux/regulator/machine.h>
-#include <linux/mmc/host.h>
-#include <linux/export.h>
-#include <linux/usb/phy.h>
-
-#include <asm/mach-types.h>
-#include <asm/mach/arch.h>
-#include <asm/mach/map.h>
-
-#include <linux/platform_data/mtd-nand-omap2.h>
-#include "common.h"
-#include <linux/platform_data/spi-omap2-mcspi.h>
-#include <video/omapdss.h>
-#include <video/omap-panel-data.h>
-
-#include "soc.h"
-#include "mux.h"
-#include "sdram-micron-mt46h32m32lf-6.h"
-#include "hsmmc.h"
-#include "common-board-devices.h"
-#include "board-flash.h"
-
-#define        NAND_CS                 0
-
-#define OMAP3_EVM_TS_GPIO      175
-#define OMAP3_EVM_EHCI_VBUS    22
-#define OMAP3_EVM_EHCI_SELECT  61
-
-#define OMAP3EVM_ETHR_START    0x2c000000
-#define OMAP3EVM_ETHR_SIZE     1024
-#define OMAP3EVM_ETHR_ID_REV   0x50
-#define OMAP3EVM_ETHR_GPIO_IRQ 176
-#define OMAP3EVM_SMSC911X_CS   5
-/*
- * Eth Reset signal
- *     64 = Generation 1 (<=RevD)
- *     7 = Generation 2 (>=RevE)
- */
-#define OMAP3EVM_GEN1_ETHR_GPIO_RST    64
-#define OMAP3EVM_GEN2_ETHR_GPIO_RST    7
-
-/*
- * OMAP35x EVM revision
- * Run time detection of EVM revision is done by reading Ethernet
- * PHY ID -
- *     GEN_1   = 0x01150000
- *     GEN_2   = 0x92200000
- */
-enum {
-       OMAP3EVM_BOARD_GEN_1 = 0,       /* EVM Rev between  A - D */
-       OMAP3EVM_BOARD_GEN_2,           /* EVM Rev >= Rev E */
-};
-
-static u8 omap3_evm_version;
-
-static u8 get_omap3_evm_rev(void)
-{
-       return omap3_evm_version;
-}
-
-static void __init omap3_evm_get_revision(void)
-{
-       void __iomem *ioaddr;
-       unsigned int smsc_id;
-
-       /* Ethernet PHY ID is stored at ID_REV register */
-       ioaddr = ioremap_nocache(OMAP3EVM_ETHR_START, SZ_1K);
-       if (!ioaddr)
-               return;
-       smsc_id = readl(ioaddr + OMAP3EVM_ETHR_ID_REV) & 0xFFFF0000;
-       iounmap(ioaddr);
-
-       switch (smsc_id) {
-       /*SMSC9115 chipset*/
-       case 0x01150000:
-               omap3_evm_version = OMAP3EVM_BOARD_GEN_1;
-               break;
-       /*SMSC 9220 chipset*/
-       case 0x92200000:
-       default:
-               omap3_evm_version = OMAP3EVM_BOARD_GEN_2;
-       }
-}
-
-#if defined(CONFIG_SMSC911X) || defined(CONFIG_SMSC911X_MODULE)
-#include "gpmc-smsc911x.h"
-
-static struct omap_smsc911x_platform_data smsc911x_cfg = {
-       .cs             = OMAP3EVM_SMSC911X_CS,
-       .gpio_irq       = OMAP3EVM_ETHR_GPIO_IRQ,
-       .gpio_reset     = -EINVAL,
-       .flags          = SMSC911X_USE_32BIT | SMSC911X_SAVE_MAC_ADDRESS,
-};
-
-static inline void __init omap3evm_init_smsc911x(void)
-{
-       /* Configure ethernet controller reset gpio */
-       if (cpu_is_omap3430()) {
-               if (get_omap3_evm_rev() == OMAP3EVM_BOARD_GEN_1)
-                       smsc911x_cfg.gpio_reset = OMAP3EVM_GEN1_ETHR_GPIO_RST;
-               else
-                       smsc911x_cfg.gpio_reset = OMAP3EVM_GEN2_ETHR_GPIO_RST;
-       }
-
-       gpmc_smsc911x_init(&smsc911x_cfg);
-}
-
-#else
-static inline void __init omap3evm_init_smsc911x(void) { return; }
-#endif
-
-/*
- * OMAP3EVM LCD Panel control signals
- */
-#define OMAP3EVM_LCD_PANEL_LR          2
-#define OMAP3EVM_LCD_PANEL_UD          3
-#define OMAP3EVM_LCD_PANEL_INI         152
-#define OMAP3EVM_LCD_PANEL_QVGA                154
-#define OMAP3EVM_LCD_PANEL_RESB                155
-
-#define OMAP3EVM_LCD_PANEL_ENVDD       153
-#define OMAP3EVM_LCD_PANEL_BKLIGHT_GPIO        210
-
-/*
- * OMAP3EVM DVI control signals
- */
-#define OMAP3EVM_DVI_PANEL_EN_GPIO     199
-
-#ifdef CONFIG_BROKEN
-static void __init omap3_evm_display_init(void)
-{
-       int r;
-
-       r = gpio_request_one(OMAP3EVM_LCD_PANEL_ENVDD, GPIOF_OUT_INIT_LOW,
-                               "lcd_panel_envdd");
-       if (r)
-               pr_err("failed to get lcd_panel_envdd GPIO\n");
-
-       r = gpio_request_one(OMAP3EVM_LCD_PANEL_BKLIGHT_GPIO,
-                               GPIOF_OUT_INIT_LOW, "lcd_panel_bklight");
-       if (r)
-               pr_err("failed to get lcd_panel_bklight GPIO\n");
-
-       if (get_omap3_evm_rev() >= OMAP3EVM_BOARD_GEN_2)
-               gpio_set_value_cansleep(OMAP3EVM_LCD_PANEL_BKLIGHT_GPIO, 0);
-       else
-               gpio_set_value_cansleep(OMAP3EVM_LCD_PANEL_BKLIGHT_GPIO, 1);
-}
-#endif
-
-static struct panel_sharp_ls037v7dw01_platform_data omap3_evm_lcd_pdata = {
-       .name                   = "lcd",
-       .source                 = "dpi.0",
-
-       .data_lines             = 18,
-
-       .resb_gpio              = OMAP3EVM_LCD_PANEL_RESB,
-       .ini_gpio               = OMAP3EVM_LCD_PANEL_INI,
-       .mo_gpio                = OMAP3EVM_LCD_PANEL_QVGA,
-       .lr_gpio                = OMAP3EVM_LCD_PANEL_LR,
-       .ud_gpio                = OMAP3EVM_LCD_PANEL_UD,
-};
-
-static struct platform_device omap3_evm_lcd_device = {
-       .name                   = "panel-sharp-ls037v7dw01",
-       .id                     = 0,
-       .dev.platform_data      = &omap3_evm_lcd_pdata,
-};
-
-static struct connector_dvi_platform_data omap3_evm_dvi_connector_pdata = {
-       .name                   = "dvi",
-       .source                 = "tfp410.0",
-       .i2c_bus_num            = -1,
-};
-
-static struct platform_device omap3_evm_dvi_connector_device = {
-       .name                   = "connector-dvi",
-       .id                     = 0,
-       .dev.platform_data      = &omap3_evm_dvi_connector_pdata,
-};
-
-static struct encoder_tfp410_platform_data omap3_evm_tfp410_pdata = {
-       .name                   = "tfp410.0",
-       .source                 = "dpi.0",
-       .data_lines             = 24,
-       .power_down_gpio        = OMAP3EVM_DVI_PANEL_EN_GPIO,
-};
-
-static struct platform_device omap3_evm_tfp410_device = {
-       .name                   = "tfp410",
-       .id                     = 0,
-       .dev.platform_data      = &omap3_evm_tfp410_pdata,
-};
-
-static struct connector_atv_platform_data omap3_evm_tv_pdata = {
-       .name = "tv",
-       .source = "venc.0",
-       .connector_type = OMAP_DSS_VENC_TYPE_SVIDEO,
-       .invert_polarity = false,
-};
-
-static struct platform_device omap3_evm_tv_connector_device = {
-       .name                   = "connector-analog-tv",
-       .id                     = 0,
-       .dev.platform_data      = &omap3_evm_tv_pdata,
-};
-
-static struct omap_dss_board_info omap3_evm_dss_data = {
-       .default_display_name = "lcd",
-};
-
-static struct regulator_consumer_supply omap3evm_vmmc1_supply[] = {
-       REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"),
-};
-
-static struct regulator_consumer_supply omap3evm_vsim_supply[] = {
-       REGULATOR_SUPPLY("vmmc_aux", "omap_hsmmc.0"),
-};
-
-/* VMMC1 for MMC1 pins CMD, CLK, DAT0..DAT3 (20 mA, plus card == max 220 mA) */
-static struct regulator_init_data omap3evm_vmmc1 = {
-       .constraints = {
-               .min_uV                 = 1850000,
-               .max_uV                 = 3150000,
-               .valid_modes_mask       = REGULATOR_MODE_NORMAL
-                                       | REGULATOR_MODE_STANDBY,
-               .valid_ops_mask         = REGULATOR_CHANGE_VOLTAGE
-                                       | REGULATOR_CHANGE_MODE
-                                       | REGULATOR_CHANGE_STATUS,
-       },
-       .num_consumer_supplies  = ARRAY_SIZE(omap3evm_vmmc1_supply),
-       .consumer_supplies      = omap3evm_vmmc1_supply,
-};
-
-/* VSIM for MMC1 pins DAT4..DAT7 (2 mA, plus card == max 50 mA) */
-static struct regulator_init_data omap3evm_vsim = {
-       .constraints = {
-               .min_uV                 = 1800000,
-               .max_uV                 = 3000000,
-               .valid_modes_mask       = REGULATOR_MODE_NORMAL
-                                       | REGULATOR_MODE_STANDBY,
-               .valid_ops_mask         = REGULATOR_CHANGE_VOLTAGE
-                                       | REGULATOR_CHANGE_MODE
-                                       | REGULATOR_CHANGE_STATUS,
-       },
-       .num_consumer_supplies  = ARRAY_SIZE(omap3evm_vsim_supply),
-       .consumer_supplies      = omap3evm_vsim_supply,
-};
-
-static struct omap2_hsmmc_info mmc[] = {
-       {
-               .mmc            = 1,
-               .caps           = MMC_CAP_4_BIT_DATA,
-               .gpio_cd        = -EINVAL,
-               .gpio_wp        = 63,
-               .deferred       = true,
-       },
-#ifdef CONFIG_WILINK_PLATFORM_DATA
-       {
-               .name           = "wl1271",
-               .mmc            = 2,
-               .caps           = MMC_CAP_4_BIT_DATA | MMC_CAP_POWER_OFF_CARD,
-               .gpio_wp        = -EINVAL,
-               .gpio_cd        = -EINVAL,
-               .nonremovable   = true,
-       },
-#endif
-       {}      /* Terminator */
-};
-
-static struct gpio_led gpio_leds[] = {
-       {
-               .name                   = "omap3evm::ledb",
-               /* normally not visible (board underside) */
-               .default_trigger        = "default-on",
-               .gpio                   = -EINVAL,      /* gets replaced */
-               .active_low             = true,
-       },
-};
-
-static struct gpio_led_platform_data gpio_led_info = {
-       .leds           = gpio_leds,
-       .num_leds       = ARRAY_SIZE(gpio_leds),
-};
-
-static struct platform_device leds_gpio = {
-       .name   = "leds-gpio",
-       .id     = -1,
-       .dev    = {
-               .platform_data  = &gpio_led_info,
-       },
-};
-
-
-static int omap3evm_twl_gpio_setup(struct device *dev,
-               unsigned gpio, unsigned ngpio)
-{
-       int r, lcd_bl_en;
-
-       /* gpio + 0 is "mmc0_cd" (input/IRQ) */
-       mmc[0].gpio_cd = gpio + 0;
-       omap_hsmmc_late_init(mmc);
-
-       /*
-        * Most GPIOs are for USB OTG.  Some are mostly sent to
-        * the P2 connector; notably LEDA for the LCD backlight.
-        */
-
-       /* TWL4030_GPIO_MAX + 0 == ledA, LCD Backlight control */
-       lcd_bl_en = get_omap3_evm_rev() >= OMAP3EVM_BOARD_GEN_2 ?
-               GPIOF_OUT_INIT_HIGH : GPIOF_OUT_INIT_LOW;
-       r = gpio_request_one(gpio + TWL4030_GPIO_MAX, lcd_bl_en, "EN_LCD_BKL");
-       if (r)
-               printk(KERN_ERR "failed to get/set lcd_bkl gpio\n");
-
-       /* gpio + 7 == DVI Enable */
-       gpio_request_one(gpio + 7, GPIOF_OUT_INIT_LOW, "EN_DVI");
-
-       /* TWL4030_GPIO_MAX + 1 == ledB (out, active low LED) */
-       gpio_leds[0].gpio = gpio + TWL4030_GPIO_MAX + 1;
-
-       platform_device_register(&leds_gpio);
-
-       /* Enable VBUS switch by setting TWL4030.GPIO2DIR as output
-        * for starting USB tranceiver
-        */
-#ifdef CONFIG_TWL4030_CORE
-       if (get_omap3_evm_rev() >= OMAP3EVM_BOARD_GEN_2) {
-               u8 val;
-
-               twl_i2c_read_u8(TWL4030_MODULE_GPIO, &val, REG_GPIODATADIR1);
-               val |= 0x04; /* TWL4030.GPIO2DIR BIT at GPIODATADIR1(0x9B) */
-               twl_i2c_write_u8(TWL4030_MODULE_GPIO, val, REG_GPIODATADIR1);
-       }
-#endif
-
-       return 0;
-}
-
-static struct twl4030_gpio_platform_data omap3evm_gpio_data = {
-       .use_leds       = true,
-       .setup          = omap3evm_twl_gpio_setup,
-};
-
-static uint32_t board_keymap[] = {
-       KEY(0, 0, KEY_LEFT),
-       KEY(0, 1, KEY_DOWN),
-       KEY(0, 2, KEY_ENTER),
-       KEY(0, 3, KEY_M),
-
-       KEY(1, 0, KEY_RIGHT),
-       KEY(1, 1, KEY_UP),
-       KEY(1, 2, KEY_I),
-       KEY(1, 3, KEY_N),
-
-       KEY(2, 0, KEY_A),
-       KEY(2, 1, KEY_E),
-       KEY(2, 2, KEY_J),
-       KEY(2, 3, KEY_O),
-
-       KEY(3, 0, KEY_B),
-       KEY(3, 1, KEY_F),
-       KEY(3, 2, KEY_K),
-       KEY(3, 3, KEY_P)
-};
-
-static struct matrix_keymap_data board_map_data = {
-       .keymap                 = board_keymap,
-       .keymap_size            = ARRAY_SIZE(board_keymap),
-};
-
-static struct twl4030_keypad_data omap3evm_kp_data = {
-       .keymap_data    = &board_map_data,
-       .rows           = 4,
-       .cols           = 4,
-       .rep            = 1,
-};
-
-/* ads7846 on SPI */
-static struct regulator_consumer_supply omap3evm_vio_supply[] = {
-       REGULATOR_SUPPLY("vcc", "spi1.0"),
-};
-
-/* VIO for ads7846 */
-static struct regulator_init_data omap3evm_vio = {
-       .constraints = {
-               .min_uV                 = 1800000,
-               .max_uV                 = 1800000,
-               .apply_uV               = true,
-               .valid_modes_mask       = REGULATOR_MODE_NORMAL
-                                       | REGULATOR_MODE_STANDBY,
-               .valid_ops_mask         = REGULATOR_CHANGE_MODE
-                                       | REGULATOR_CHANGE_STATUS,
-       },
-       .num_consumer_supplies  = ARRAY_SIZE(omap3evm_vio_supply),
-       .consumer_supplies      = omap3evm_vio_supply,
-};
-
-#ifdef CONFIG_WILINK_PLATFORM_DATA
-
-#define OMAP3EVM_WLAN_PMENA_GPIO       (150)
-#define OMAP3EVM_WLAN_IRQ_GPIO         (149)
-
-static struct regulator_consumer_supply omap3evm_vmmc2_supply[] = {
-       REGULATOR_SUPPLY("vmmc", "omap_hsmmc.1"),
-};
-
-/* VMMC2 for driving the WL12xx module */
-static struct regulator_init_data omap3evm_vmmc2 = {
-       .constraints = {
-               .valid_ops_mask = REGULATOR_CHANGE_STATUS,
-       },
-       .num_consumer_supplies  = ARRAY_SIZE(omap3evm_vmmc2_supply),
-       .consumer_supplies      = omap3evm_vmmc2_supply,
-};
-
-static struct fixed_voltage_config omap3evm_vwlan = {
-       .supply_name            = "vwl1271",
-       .microvolts             = 1800000, /* 1.80V */
-       .gpio                   = OMAP3EVM_WLAN_PMENA_GPIO,
-       .startup_delay          = 70000, /* 70ms */
-       .enable_high            = 1,
-       .enabled_at_boot        = 0,
-       .init_data              = &omap3evm_vmmc2,
-};
-
-static struct platform_device omap3evm_wlan_regulator = {
-       .name           = "reg-fixed-voltage",
-       .id             = 1,
-       .dev = {
-               .platform_data  = &omap3evm_vwlan,
-       },
-};
-
-struct wl12xx_platform_data omap3evm_wlan_data __initdata = {
-       .board_ref_clock = WL12XX_REFCLOCK_38, /* 38.4 MHz */
-};
-#endif
-
-/* VAUX2 for USB */
-static struct regulator_consumer_supply omap3evm_vaux2_supplies[] = {
-       REGULATOR_SUPPLY("VDD_CSIPHY1", "omap3isp"),    /* OMAP ISP */
-       REGULATOR_SUPPLY("VDD_CSIPHY2", "omap3isp"),    /* OMAP ISP */
-       REGULATOR_SUPPLY("vcc", "usb_phy_gen_xceiv.2"), /* hsusb port 2 */
-       REGULATOR_SUPPLY("vaux2", NULL),
-};
-
-static struct regulator_init_data omap3evm_vaux2 = {
-       .constraints = {
-               .min_uV         = 2800000,
-               .max_uV         = 2800000,
-               .apply_uV       = true,
-               .valid_modes_mask       = REGULATOR_MODE_NORMAL
-                                       | REGULATOR_MODE_STANDBY,
-               .valid_ops_mask         = REGULATOR_CHANGE_MODE
-                                       | REGULATOR_CHANGE_STATUS,
-       },
-       .num_consumer_supplies          = ARRAY_SIZE(omap3evm_vaux2_supplies),
-       .consumer_supplies              = omap3evm_vaux2_supplies,
-};
-
-static struct twl4030_platform_data omap3evm_twldata = {
-       /* platform_data for children goes here */
-       .keypad         = &omap3evm_kp_data,
-       .gpio           = &omap3evm_gpio_data,
-       .vio            = &omap3evm_vio,
-       .vmmc1          = &omap3evm_vmmc1,
-       .vsim           = &omap3evm_vsim,
-};
-
-static int __init omap3_evm_i2c_init(void)
-{
-       omap3_pmic_get_config(&omap3evm_twldata,
-                       TWL_COMMON_PDATA_USB | TWL_COMMON_PDATA_MADC |
-                       TWL_COMMON_PDATA_AUDIO,
-                       TWL_COMMON_REGULATOR_VDAC | TWL_COMMON_REGULATOR_VPLL2);
-
-       omap3evm_twldata.vdac->constraints.apply_uV = true;
-       omap3evm_twldata.vpll2->constraints.apply_uV = true;
-
-       omap3_pmic_init("twl4030", &omap3evm_twldata);
-       omap_register_i2c_bus(2, 400, NULL, 0);
-       omap_register_i2c_bus(3, 400, NULL, 0);
-       return 0;
-}
-
-static struct usbhs_phy_data phy_data[] __initdata = {
-       {
-               .port = 2,
-               .reset_gpio = -1,       /* set at runtime */
-               .vcc_gpio = -EINVAL,
-       },
-};
-
-static struct usbhs_omap_platform_data usbhs_bdata __initdata = {
-       .port_mode[1] = OMAP_EHCI_PORT_MODE_PHY,
-};
-
-#ifdef CONFIG_OMAP_MUX
-static struct omap_board_mux omap35x_board_mux[] __initdata = {
-       OMAP3_MUX(SYS_NIRQ, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP |
-                               OMAP_PIN_OFF_INPUT_PULLUP | OMAP_PIN_OFF_OUTPUT_LOW |
-                               OMAP_PIN_OFF_WAKEUPENABLE),
-       OMAP3_MUX(MCSPI1_CS1, OMAP_MUX_MODE4 | OMAP_PIN_INPUT_PULLUP |
-                               OMAP_PIN_OFF_INPUT_PULLUP | OMAP_PIN_OFF_OUTPUT_LOW |
-                               OMAP_PIN_OFF_WAKEUPENABLE),
-       OMAP3_MUX(SYS_BOOT5, OMAP_MUX_MODE4 | OMAP_PIN_INPUT_PULLUP |
-                               OMAP_PIN_OFF_NONE),
-       OMAP3_MUX(GPMC_WAIT2, OMAP_MUX_MODE4 | OMAP_PIN_INPUT_PULLUP |
-                               OMAP_PIN_OFF_NONE),
-#ifdef CONFIG_WILINK_PLATFORM_DATA
-       /* WLAN IRQ - GPIO 149 */
-       OMAP3_MUX(UART1_RTS, OMAP_MUX_MODE4 | OMAP_PIN_INPUT),
-
-       /* WLAN POWER ENABLE - GPIO 150 */
-       OMAP3_MUX(UART1_CTS, OMAP_MUX_MODE4 | OMAP_PIN_OUTPUT),
-
-       /* MMC2 SDIO pin muxes for WL12xx */
-       OMAP3_MUX(SDMMC2_CLK, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP),
-       OMAP3_MUX(SDMMC2_CMD, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP),
-       OMAP3_MUX(SDMMC2_DAT0, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP),
-       OMAP3_MUX(SDMMC2_DAT1, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP),
-       OMAP3_MUX(SDMMC2_DAT2, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP),
-       OMAP3_MUX(SDMMC2_DAT3, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP),
-#endif
-       { .reg_offset = OMAP_MUX_TERMINATOR },
-};
-
-static struct omap_board_mux omap36x_board_mux[] __initdata = {
-       OMAP3_MUX(SYS_NIRQ, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP |
-                               OMAP_PIN_OFF_INPUT_PULLUP | OMAP_PIN_OFF_OUTPUT_LOW |
-                               OMAP_PIN_OFF_WAKEUPENABLE),
-       OMAP3_MUX(MCSPI1_CS1, OMAP_MUX_MODE4 | OMAP_PIN_INPUT_PULLUP |
-                               OMAP_PIN_OFF_INPUT_PULLUP | OMAP_PIN_OFF_OUTPUT_LOW |
-                               OMAP_PIN_OFF_WAKEUPENABLE),
-       /* AM/DM37x EVM: DSS data bus muxed with sys_boot */
-       OMAP3_MUX(DSS_DATA18, OMAP_MUX_MODE3 | OMAP_PIN_OFF_NONE),
-       OMAP3_MUX(DSS_DATA19, OMAP_MUX_MODE3 | OMAP_PIN_OFF_NONE),
-       OMAP3_MUX(DSS_DATA22, OMAP_MUX_MODE3 | OMAP_PIN_OFF_NONE),
-       OMAP3_MUX(DSS_DATA21, OMAP_MUX_MODE3 | OMAP_PIN_OFF_NONE),
-       OMAP3_MUX(DSS_DATA22, OMAP_MUX_MODE3 | OMAP_PIN_OFF_NONE),
-       OMAP3_MUX(DSS_DATA23, OMAP_MUX_MODE3 | OMAP_PIN_OFF_NONE),
-       OMAP3_MUX(SYS_BOOT0, OMAP_MUX_MODE3 | OMAP_PIN_OFF_NONE),
-       OMAP3_MUX(SYS_BOOT1, OMAP_MUX_MODE3 | OMAP_PIN_OFF_NONE),
-       OMAP3_MUX(SYS_BOOT3, OMAP_MUX_MODE3 | OMAP_PIN_OFF_NONE),
-       OMAP3_MUX(SYS_BOOT4, OMAP_MUX_MODE3 | OMAP_PIN_OFF_NONE),
-       OMAP3_MUX(SYS_BOOT5, OMAP_MUX_MODE3 | OMAP_PIN_OFF_NONE),
-       OMAP3_MUX(SYS_BOOT6, OMAP_MUX_MODE3 | OMAP_PIN_OFF_NONE),
-#ifdef CONFIG_WILINK_PLATFORM_DATA
-       /* WLAN IRQ - GPIO 149 */
-       OMAP3_MUX(UART1_RTS, OMAP_MUX_MODE4 | OMAP_PIN_INPUT),
-
-       /* WLAN POWER ENABLE - GPIO 150 */
-       OMAP3_MUX(UART1_CTS, OMAP_MUX_MODE4 | OMAP_PIN_OUTPUT),
-
-       /* MMC2 SDIO pin muxes for WL12xx */
-       OMAP3_MUX(SDMMC2_CLK, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP),
-       OMAP3_MUX(SDMMC2_CMD, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP),
-       OMAP3_MUX(SDMMC2_DAT0, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP),
-       OMAP3_MUX(SDMMC2_DAT1, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP),
-       OMAP3_MUX(SDMMC2_DAT2, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP),
-       OMAP3_MUX(SDMMC2_DAT3, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP),
-#endif
-
-       { .reg_offset = OMAP_MUX_TERMINATOR },
-};
-#else
-#define omap35x_board_mux      NULL
-#define omap36x_board_mux      NULL
-#endif
-
-static struct omap_musb_board_data musb_board_data = {
-       .interface_type         = MUSB_INTERFACE_ULPI,
-       .mode                   = MUSB_OTG,
-       .power                  = 100,
-};
-
-static struct gpio omap3_evm_ehci_gpios[] __initdata = {
-       { OMAP3_EVM_EHCI_VBUS,   GPIOF_OUT_INIT_HIGH,  "enable EHCI VBUS" },
-       { OMAP3_EVM_EHCI_SELECT, GPIOF_OUT_INIT_LOW,   "select EHCI port" },
-};
-
-static void __init omap3_evm_wl12xx_init(void)
-{
-#ifdef CONFIG_WILINK_PLATFORM_DATA
-       int ret;
-
-       /* WL12xx WLAN Init */
-       omap3evm_wlan_data.irq = gpio_to_irq(OMAP3EVM_WLAN_IRQ_GPIO);
-       ret = wl12xx_set_platform_data(&omap3evm_wlan_data);
-       if (ret)
-               pr_err("error setting wl12xx data: %d\n", ret);
-       ret = platform_device_register(&omap3evm_wlan_regulator);
-       if (ret)
-               pr_err("error registering wl12xx device: %d\n", ret);
-#endif
-}
-
-static struct regulator_consumer_supply dummy_supplies[] = {
-       REGULATOR_SUPPLY("vddvario", "smsc911x.0"),
-       REGULATOR_SUPPLY("vdd33a", "smsc911x.0"),
-};
-
-static struct mtd_partition omap3evm_nand_partitions[] = {
-       /* All the partition sizes are listed in terms of NAND block size */
-       {
-               .name           = "X-Loader",
-               .offset         = 0,
-               .size           = 4*(SZ_128K),
-               .mask_flags     = MTD_WRITEABLE
-       },
-       {
-               .name           = "U-Boot",
-               .offset         = MTDPART_OFS_APPEND,
-               .size           = 14*(SZ_128K),
-               .mask_flags     = MTD_WRITEABLE
-       },
-       {
-               .name           = "U-Boot Env",
-               .offset         = MTDPART_OFS_APPEND,
-               .size           = 2*(SZ_128K)
-       },
-       {
-               .name           = "Kernel",
-               .offset         = MTDPART_OFS_APPEND,
-               .size           = 40*(SZ_128K)
-       },
-       {
-               .name           = "File system",
-               .size           = MTDPART_SIZ_FULL,
-               .offset         = MTDPART_OFS_APPEND,
-       },
-};
-
-static void __init omap3_evm_init(void)
-{
-       struct omap_board_mux *obm;
-
-       omap3_evm_get_revision();
-       regulator_register_fixed(0, dummy_supplies, ARRAY_SIZE(dummy_supplies));
-
-       obm = (cpu_is_omap3630()) ? omap36x_board_mux : omap35x_board_mux;
-       omap3_mux_init(obm, OMAP_PACKAGE_CBB);
-
-       omap_mux_init_gpio(63, OMAP_PIN_INPUT);
-       omap_hsmmc_init(mmc);
-
-       if (get_omap3_evm_rev() >= OMAP3EVM_BOARD_GEN_2)
-               omap3evm_twldata.vaux2 = &omap3evm_vaux2;
-
-       omap3_evm_i2c_init();
-
-       omap_display_init(&omap3_evm_dss_data);
-       platform_device_register(&omap3_evm_lcd_device);
-       platform_device_register(&omap3_evm_tfp410_device);
-       platform_device_register(&omap3_evm_dvi_connector_device);
-       platform_device_register(&omap3_evm_tv_connector_device);
-
-       omap_serial_init();
-       omap_sdrc_init(mt46h32m32lf6_sdrc_params, NULL);
-
-       /* OMAP3EVM uses ISP1504 phy and so register nop transceiver */
-       usb_nop_xceiv_register();
-
-       if (get_omap3_evm_rev() >= OMAP3EVM_BOARD_GEN_2) {
-               /* enable EHCI VBUS using GPIO22 */
-               omap_mux_init_gpio(OMAP3_EVM_EHCI_VBUS, OMAP_PIN_INPUT_PULLUP);
-               /* Select EHCI port on main board */
-               omap_mux_init_gpio(OMAP3_EVM_EHCI_SELECT,
-                                  OMAP_PIN_INPUT_PULLUP);
-               gpio_request_array(omap3_evm_ehci_gpios,
-                                  ARRAY_SIZE(omap3_evm_ehci_gpios));
-
-               /* setup EHCI phy reset config */
-               omap_mux_init_gpio(21, OMAP_PIN_INPUT_PULLUP);
-               phy_data[0].reset_gpio = 21;
-
-               /* EVM REV >= E can supply 500mA with EXTVBUS programming */
-               musb_board_data.power = 500;
-               musb_board_data.extvbus = 1;
-       } else {
-               /* setup EHCI phy reset on MDC */
-               omap_mux_init_gpio(135, OMAP_PIN_OUTPUT);
-               phy_data[0].reset_gpio = 135;
-       }
-       usb_bind_phy("musb-hdrc.0.auto", 0, "twl4030_usb");
-       usb_musb_init(&musb_board_data);
-
-       usbhs_init_phys(phy_data, ARRAY_SIZE(phy_data));
-       usbhs_init(&usbhs_bdata);
-       board_nand_init(omap3evm_nand_partitions,
-                       ARRAY_SIZE(omap3evm_nand_partitions), NAND_CS,
-                       NAND_BUSWIDTH_16, NULL);
-
-       omap_ads7846_init(1, OMAP3_EVM_TS_GPIO, 310, NULL);
-       omap3evm_init_smsc911x();
-#ifdef CONFIG_BROKEN
-       omap3_evm_display_init();
-#endif
-       omap3_evm_wl12xx_init();
-       omap_twl4030_audio_init("omap3evm", NULL);
-}
-
-MACHINE_START(OMAP3EVM, "OMAP3 EVM")
-       /* Maintainer: Syed Mohammed Khasim - Texas Instruments */
-       .atag_offset    = 0x100,
-       .reserve        = omap_reserve,
-       .map_io         = omap3_map_io,
-       .init_early     = omap35xx_init_early,
-       .init_irq       = omap3_init_irq,
-       .handle_irq     = omap3_intc_handle_irq,
-       .init_machine   = omap3_evm_init,
-       .init_late      = omap35xx_init_late,
-       .init_time      = omap3_sync32k_timer_init,
-       .restart        = omap3xxx_restart,
-MACHINE_END
diff --git a/arch/arm/mach-omap2/board-rm680.c b/arch/arm/mach-omap2/board-rm680.c
deleted file mode 100644 (file)
index 345e8c4..0000000
+++ /dev/null
@@ -1,167 +0,0 @@
-/*
- * Board support file for Nokia N950 (RM-680) / N9 (RM-696).
- *
- * Copyright (C) 2010 Nokia
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- */
-
-#include <linux/io.h>
-#include <linux/i2c.h>
-#include <linux/gpio.h>
-#include <linux/init.h>
-#include <linux/i2c/twl.h>
-#include <linux/platform_device.h>
-#include <linux/regulator/fixed.h>
-#include <linux/regulator/machine.h>
-#include <linux/regulator/consumer.h>
-#include <linux/platform_data/mtd-onenand-omap2.h>
-#include <linux/usb/phy.h>
-
-#include <asm/mach/arch.h>
-#include <asm/mach-types.h>
-
-#include "common.h"
-#include "mux.h"
-#include "gpmc.h"
-#include "mmc.h"
-#include "hsmmc.h"
-#include "sdram-nokia.h"
-#include "common-board-devices.h"
-#include "gpmc-onenand.h"
-
-static struct regulator_consumer_supply rm680_vemmc_consumers[] = {
-       REGULATOR_SUPPLY("vmmc", "omap_hsmmc.1"),
-};
-
-/* Fixed regulator for internal eMMC */
-static struct regulator_init_data rm680_vemmc = {
-       .constraints =  {
-               .name                   = "rm680_vemmc",
-               .valid_modes_mask       = REGULATOR_MODE_NORMAL
-                                       | REGULATOR_MODE_STANDBY,
-               .valid_ops_mask         = REGULATOR_CHANGE_STATUS
-                                       | REGULATOR_CHANGE_MODE,
-       },
-       .num_consumer_supplies          = ARRAY_SIZE(rm680_vemmc_consumers),
-       .consumer_supplies              = rm680_vemmc_consumers,
-};
-
-static struct fixed_voltage_config rm680_vemmc_config = {
-       .supply_name            = "VEMMC",
-       .microvolts             = 2900000,
-       .gpio                   = 157,
-       .startup_delay          = 150,
-       .enable_high            = 1,
-       .init_data              = &rm680_vemmc,
-};
-
-static struct platform_device rm680_vemmc_device = {
-       .name                   = "reg-fixed-voltage",
-       .dev                    = {
-               .platform_data  = &rm680_vemmc_config,
-       },
-};
-
-static struct platform_device *rm680_peripherals_devices[] __initdata = {
-       &rm680_vemmc_device,
-};
-
-/* TWL */
-static struct twl4030_gpio_platform_data rm680_gpio_data = {
-       .pullups                = BIT(0),
-       .pulldowns              = BIT(1) | BIT(2) | BIT(8) | BIT(15),
-};
-
-static struct twl4030_platform_data rm680_twl_data = {
-       .gpio                   = &rm680_gpio_data,
-       /* add rest of the children here */
-};
-
-static void __init rm680_i2c_init(void)
-{
-       omap3_pmic_get_config(&rm680_twl_data, TWL_COMMON_PDATA_USB, 0);
-       omap_pmic_init(1, 2900, "twl5031", 7 + OMAP_INTC_START, &rm680_twl_data);
-       omap_register_i2c_bus(2, 400, NULL, 0);
-       omap_register_i2c_bus(3, 400, NULL, 0);
-}
-
-#if defined(CONFIG_MTD_ONENAND_OMAP2) || \
-       defined(CONFIG_MTD_ONENAND_OMAP2_MODULE)
-static struct omap_onenand_platform_data board_onenand_data[] = {
-       {
-               .gpio_irq       = 65,
-               .flags          = ONENAND_SYNC_READWRITE,
-       }
-};
-#endif
-
-/* eMMC */
-static struct omap2_hsmmc_info mmc[] __initdata = {
-       {
-               .name           = "internal",
-               .mmc            = 2,
-               .caps           = MMC_CAP_4_BIT_DATA | MMC_CAP_MMC_HIGHSPEED,
-               .gpio_cd        = -EINVAL,
-               .gpio_wp        = -EINVAL,
-       },
-       { /* Terminator */ }
-};
-
-static void __init rm680_peripherals_init(void)
-{
-       platform_add_devices(rm680_peripherals_devices,
-                               ARRAY_SIZE(rm680_peripherals_devices));
-       rm680_i2c_init();
-       gpmc_onenand_init(board_onenand_data);
-       omap_hsmmc_init(mmc);
-}
-
-#ifdef CONFIG_OMAP_MUX
-static struct omap_board_mux board_mux[] __initdata = {
-       { .reg_offset = OMAP_MUX_TERMINATOR },
-};
-#endif
-
-static void __init rm680_init(void)
-{
-       struct omap_sdrc_params *sdrc_params;
-
-       omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
-       omap_serial_init();
-
-       sdrc_params = nokia_get_sdram_timings();
-       omap_sdrc_init(sdrc_params, sdrc_params);
-
-       usb_bind_phy("musb-hdrc.0.auto", 0, "twl4030_usb");
-       usb_musb_init(NULL);
-       rm680_peripherals_init();
-}
-
-MACHINE_START(NOKIA_RM680, "Nokia RM-680 board")
-       .atag_offset    = 0x100,
-       .reserve        = omap_reserve,
-       .map_io         = omap3_map_io,
-       .init_early     = omap3630_init_early,
-       .init_irq       = omap3_init_irq,
-       .handle_irq     = omap3_intc_handle_irq,
-       .init_machine   = rm680_init,
-       .init_late      = omap3630_init_late,
-       .init_time      = omap3_sync32k_timer_init,
-       .restart        = omap3xxx_restart,
-MACHINE_END
-
-MACHINE_START(NOKIA_RM696, "Nokia RM-696 board")
-       .atag_offset    = 0x100,
-       .reserve        = omap_reserve,
-       .map_io         = omap3_map_io,
-       .init_early     = omap3630_init_early,
-       .init_irq       = omap3_init_irq,
-       .handle_irq     = omap3_intc_handle_irq,
-       .init_machine   = rm680_init,
-       .init_late      = omap3630_init_late,
-       .init_time      = omap3_sync32k_timer_init,
-       .restart        = omap3xxx_restart,
-MACHINE_END
index 68dc998fa34b9c91298d2617742a55b157f8afcb..f093af17f5e6a9de4943fc16d2d4d8116aab1045 100644 (file)
@@ -57,6 +57,8 @@
 #include "common-board-devices.h"
 #include "gpmc.h"
 #include "gpmc-onenand.h"
+#include "soc.h"
+#include "omap-secure.h"
 
 #define SYSTEM_REV_B_USES_VAUX3        0x1699
 #define SYSTEM_REV_S_USES_VAUX3 0x8
@@ -1280,6 +1282,22 @@ static void __init rx51_init_twl4030_hwmon(void)
        platform_device_register(&madc_hwmon);
 }
 
+static struct platform_device omap3_rom_rng_device = {
+       .name           = "omap3-rom-rng",
+       .id             = -1,
+       .dev    = {
+               .platform_data  = rx51_secure_rng_call,
+       },
+};
+
+static void __init rx51_init_omap3_rom_rng(void)
+{
+       if (omap_type() == OMAP2_DEVICE_TYPE_SEC) {
+               pr_info("RX-51: Registring OMAP3 HWRNG device\n");
+               platform_device_register(&omap3_rom_rng_device);
+       }
+}
+
 void __init rx51_peripherals_init(void)
 {
        rx51_i2c_init();
@@ -1300,5 +1318,6 @@ void __init rx51_peripherals_init(void)
 
        rx51_charger_init();
        rx51_init_twl4030_hwmon();
+       rx51_init_omap3_rom_rng();
 }
 
index 7735105561d87dd218c436b357ade5211e5a6d2e..db168c9627a15e2ba5d0ea11bf02001cc73b83ff 100644 (file)
@@ -2,6 +2,8 @@
  * Board support file for Nokia N900 (aka RX-51).
  *
  * Copyright (C) 2007, 2008 Nokia
+ * Copyright (C) 2012 Ivaylo Dimitrov <freemangordon@abv.bg>
+ * Copyright (C) 2013 Pali Rohár <pali.rohar@gmail.com>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
@@ -31,7 +33,9 @@
 #include "mux.h"
 #include "gpmc.h"
 #include "pm.h"
+#include "soc.h"
 #include "sdram-nokia.h"
+#include "omap-secure.h"
 
 #define RX51_GPIO_SLEEP_IND 162
 
@@ -103,6 +107,14 @@ static void __init rx51_init(void)
        usb_musb_init(&musb_board_data);
        rx51_peripherals_init();
 
+       if (omap_type() == OMAP2_DEVICE_TYPE_SEC) {
+#ifdef CONFIG_ARM_ERRATA_430973
+               pr_info("RX-51: Enabling ARM errata 430973 workaround\n");
+               /* set IBE to 1 */
+               rx51_secure_update_aux_cr(BIT(6), 0);
+#endif
+       }
+
        /* Ensure SDRC pins are mux'd for self-refresh */
        omap_mux_init_signal("sdrc_cke0", OMAP_PIN_OUTPUT);
        omap_mux_init_signal("sdrc_cke1", OMAP_PIN_OUTPUT);
diff --git a/arch/arm/mach-omap2/board-zoom-debugboard.c b/arch/arm/mach-omap2/board-zoom-debugboard.c
deleted file mode 100644 (file)
index 42e5f23..0000000
+++ /dev/null
@@ -1,139 +0,0 @@
-/*
- * Copyright (C) 2009 Texas Instruments Inc.
- * Mikkel Christensen <mlc@ti.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- */
-
-#include <linux/kernel.h>
-#include <linux/init.h>
-#include <linux/gpio.h>
-#include <linux/serial_8250.h>
-#include <linux/smsc911x.h>
-#include <linux/interrupt.h>
-
-#include <linux/regulator/fixed.h>
-#include <linux/regulator/machine.h>
-
-#include "gpmc.h"
-#include "gpmc-smsc911x.h"
-
-#include "board-zoom.h"
-
-#include "soc.h"
-#include "common.h"
-
-#define ZOOM_SMSC911X_CS       7
-#define ZOOM_SMSC911X_GPIO     158
-#define ZOOM_QUADUART_CS       3
-#define ZOOM_QUADUART_GPIO     102
-#define ZOOM_QUADUART_RST_GPIO 152
-#define QUART_CLK              1843200
-#define DEBUG_BASE             0x08000000
-#define ZOOM_ETHR_START        DEBUG_BASE
-
-static struct omap_smsc911x_platform_data zoom_smsc911x_cfg = {
-       .cs             = ZOOM_SMSC911X_CS,
-       .gpio_irq       = ZOOM_SMSC911X_GPIO,
-       .gpio_reset     = -EINVAL,
-       .flags          = SMSC911X_USE_32BIT,
-};
-
-static inline void __init zoom_init_smsc911x(void)
-{
-       gpmc_smsc911x_init(&zoom_smsc911x_cfg);
-}
-
-static struct plat_serial8250_port serial_platform_data[] = {
-       {
-               .mapbase        = ZOOM_UART_BASE,
-               .flags          = UPF_BOOT_AUTOCONF|UPF_IOREMAP|UPF_SHARE_IRQ,
-               .irqflags       = IRQF_SHARED | IRQF_TRIGGER_RISING,
-               .iotype         = UPIO_MEM,
-               .regshift       = 1,
-               .uartclk        = QUART_CLK,
-       }, {
-               .flags          = 0
-       }
-};
-
-static struct platform_device zoom_debugboard_serial_device = {
-       .name                   = "serial8250",
-       .id                     = PLAT8250_DEV_PLATFORM,
-       .dev                    = {
-               .platform_data  = serial_platform_data,
-       },
-};
-
-static inline void __init zoom_init_quaduart(void)
-{
-       int quart_cs;
-       unsigned long cs_mem_base;
-       int quart_gpio = 0;
-
-       if (gpio_request_one(ZOOM_QUADUART_RST_GPIO,
-                               GPIOF_OUT_INIT_LOW,
-                               "TL16CP754C GPIO") < 0) {
-               pr_err("Failed to request GPIO%d for TL16CP754C\n",
-                       ZOOM_QUADUART_RST_GPIO);
-               return;
-       }
-
-       quart_cs = ZOOM_QUADUART_CS;
-
-       if (gpmc_cs_request(quart_cs, SZ_1M, &cs_mem_base) < 0) {
-               pr_err("Failed to request GPMC mem for Quad UART(TL16CP754C)\n");
-               return;
-       }
-
-       quart_gpio = ZOOM_QUADUART_GPIO;
-
-       if (gpio_request_one(quart_gpio, GPIOF_IN, "TL16CP754C GPIO") < 0)
-               printk(KERN_ERR "Failed to request GPIO%d for TL16CP754C\n",
-                                                               quart_gpio);
-
-       serial_platform_data[0].irq = gpio_to_irq(102);
-}
-
-static inline int omap_zoom_debugboard_detect(void)
-{
-       int debug_board_detect = 0;
-       int ret = 1;
-
-       debug_board_detect = ZOOM_SMSC911X_GPIO;
-
-       if (gpio_request_one(debug_board_detect, GPIOF_IN,
-                            "Zoom debug board detect") < 0) {
-               pr_err("Failed to request GPIO%d for Zoom debug board detect\n",
-                      debug_board_detect);
-               return 0;
-       }
-
-       if (!gpio_get_value(debug_board_detect)) {
-               ret = 0;
-       }
-       gpio_free(debug_board_detect);
-       return ret;
-}
-
-static struct platform_device *zoom_devices[] __initdata = {
-       &zoom_debugboard_serial_device,
-};
-
-static struct regulator_consumer_supply dummy_supplies[] = {
-       REGULATOR_SUPPLY("vddvario", "smsc911x.0"),
-       REGULATOR_SUPPLY("vdd33a", "smsc911x.0"),
-};
-
-int __init zoom_debugboard_init(void)
-{
-       if (!omap_zoom_debugboard_detect())
-               return 0;
-
-       regulator_register_fixed(0, dummy_supplies, ARRAY_SIZE(dummy_supplies));
-       zoom_init_smsc911x();
-       zoom_init_quaduart();
-       return platform_add_devices(zoom_devices, ARRAY_SIZE(zoom_devices));
-}
diff --git a/arch/arm/mach-omap2/board-zoom-display.c b/arch/arm/mach-omap2/board-zoom-display.c
deleted file mode 100644 (file)
index 3d8ecc1..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * Copyright (C) 2010 Texas Instruments Inc.
- *
- * Modified from mach-omap2/board-zoom-peripherals.c
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- */
-
-#include <linux/kernel.h>
-#include <linux/init.h>
-#include <linux/platform_device.h>
-#include <linux/gpio.h>
-#include <linux/spi/spi.h>
-#include <linux/platform_data/spi-omap2-mcspi.h>
-#include <video/omapdss.h>
-#include <video/omap-panel-data.h>
-
-#include "board-zoom.h"
-#include "soc.h"
-#include "common.h"
-
-#define LCD_PANEL_RESET_GPIO_PROD      96
-#define LCD_PANEL_RESET_GPIO_PILOT     55
-#define LCD_PANEL_QVGA_GPIO            56
-
-static struct panel_nec_nl8048hl11_platform_data zoom_lcd_pdata = {
-       .name                   = "lcd",
-       .source                 = "dpi.0",
-
-       .data_lines             = 24,
-
-       .res_gpio               = -1,   /* filled in code */
-       .qvga_gpio              = LCD_PANEL_QVGA_GPIO,
-};
-
-static struct omap_dss_board_info zoom_dss_data = {
-       .default_display_name = "lcd",
-};
-
-static void __init zoom_lcd_panel_init(void)
-{
-       zoom_lcd_pdata.res_gpio = (omap_rev() > OMAP3430_REV_ES3_0) ?
-                       LCD_PANEL_RESET_GPIO_PROD :
-                       LCD_PANEL_RESET_GPIO_PILOT;
-}
-
-static struct omap2_mcspi_device_config dss_lcd_mcspi_config = {
-       .turbo_mode             = 1,
-};
-
-static struct spi_board_info nec_8048_spi_board_info[] __initdata = {
-       [0] = {
-               .modalias               = "panel-nec-nl8048hl11",
-               .bus_num                = 1,
-               .chip_select            = 2,
-               .max_speed_hz           = 375000,
-               .controller_data        = &dss_lcd_mcspi_config,
-               .platform_data          = &zoom_lcd_pdata,
-       },
-};
-
-void __init zoom_display_init(void)
-{
-       omap_display_init(&zoom_dss_data);
-       zoom_lcd_panel_init();
-       spi_register_board_info(nec_8048_spi_board_info,
-                               ARRAY_SIZE(nec_8048_spi_board_info));
-}
-
diff --git a/arch/arm/mach-omap2/board-zoom-peripherals.c b/arch/arm/mach-omap2/board-zoom-peripherals.c
deleted file mode 100644 (file)
index a90375d..0000000
+++ /dev/null
@@ -1,360 +0,0 @@
-/*
- * Copyright (C) 2009 Texas Instruments Inc.
- *
- * Modified from mach-omap2/board-zoom2.c
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- */
-
-#include <linux/kernel.h>
-#include <linux/init.h>
-#include <linux/platform_device.h>
-#include <linux/input.h>
-#include <linux/input/matrix_keypad.h>
-#include <linux/gpio.h>
-#include <linux/i2c/twl.h>
-#include <linux/regulator/machine.h>
-#include <linux/regulator/fixed.h>
-#include <linux/wl12xx.h>
-#include <linux/mmc/host.h>
-#include <linux/platform_data/gpio-omap.h>
-#include <linux/platform_data/omap-twl4030.h>
-#include <linux/usb/phy.h>
-#include <linux/pwm.h>
-#include <linux/leds_pwm.h>
-#include <linux/pwm_backlight.h>
-
-#include <asm/mach-types.h>
-#include <asm/mach/arch.h>
-#include <asm/mach/map.h>
-
-#include "common.h"
-
-#include "board-zoom.h"
-
-#include "mux.h"
-#include "hsmmc.h"
-#include "common-board-devices.h"
-
-#define OMAP_ZOOM_WLAN_PMENA_GPIO      (101)
-#define OMAP_ZOOM_TSC2004_IRQ_GPIO     (153)
-#define OMAP_ZOOM_WLAN_IRQ_GPIO                (162)
-
-/* Zoom2 has Qwerty keyboard*/
-static uint32_t board_keymap[] = {
-       KEY(0, 0, KEY_E),
-       KEY(0, 1, KEY_R),
-       KEY(0, 2, KEY_T),
-       KEY(0, 3, KEY_HOME),
-       KEY(0, 6, KEY_I),
-       KEY(0, 7, KEY_LEFTSHIFT),
-       KEY(1, 0, KEY_D),
-       KEY(1, 1, KEY_F),
-       KEY(1, 2, KEY_G),
-       KEY(1, 3, KEY_SEND),
-       KEY(1, 6, KEY_K),
-       KEY(1, 7, KEY_ENTER),
-       KEY(2, 0, KEY_X),
-       KEY(2, 1, KEY_C),
-       KEY(2, 2, KEY_V),
-       KEY(2, 3, KEY_END),
-       KEY(2, 6, KEY_DOT),
-       KEY(2, 7, KEY_CAPSLOCK),
-       KEY(3, 0, KEY_Z),
-       KEY(3, 1, KEY_KPPLUS),
-       KEY(3, 2, KEY_B),
-       KEY(3, 3, KEY_F1),
-       KEY(3, 6, KEY_O),
-       KEY(3, 7, KEY_SPACE),
-       KEY(4, 0, KEY_W),
-       KEY(4, 1, KEY_Y),
-       KEY(4, 2, KEY_U),
-       KEY(4, 3, KEY_F2),
-       KEY(4, 4, KEY_VOLUMEUP),
-       KEY(4, 6, KEY_L),
-       KEY(4, 7, KEY_LEFT),
-       KEY(5, 0, KEY_S),
-       KEY(5, 1, KEY_H),
-       KEY(5, 2, KEY_J),
-       KEY(5, 3, KEY_F3),
-       KEY(5, 4, KEY_UNKNOWN),
-       KEY(5, 5, KEY_VOLUMEDOWN),
-       KEY(5, 6, KEY_M),
-       KEY(5, 7, KEY_RIGHT),
-       KEY(6, 0, KEY_Q),
-       KEY(6, 1, KEY_A),
-       KEY(6, 2, KEY_N),
-       KEY(6, 3, KEY_BACKSPACE),
-       KEY(6, 6, KEY_P),
-       KEY(6, 7, KEY_UP),
-       KEY(7, 0, KEY_PROG1),   /*MACRO 1 <User defined> */
-       KEY(7, 1, KEY_PROG2),   /*MACRO 2 <User defined> */
-       KEY(7, 2, KEY_PROG3),   /*MACRO 3 <User defined> */
-       KEY(7, 3, KEY_PROG4),   /*MACRO 4 <User defined> */
-       KEY(7, 6, KEY_SELECT),
-       KEY(7, 7, KEY_DOWN)
-};
-
-static struct matrix_keymap_data board_map_data = {
-       .keymap                 = board_keymap,
-       .keymap_size            = ARRAY_SIZE(board_keymap),
-};
-
-static struct twl4030_keypad_data zoom_kp_twl4030_data = {
-       .keymap_data    = &board_map_data,
-       .rows           = 8,
-       .cols           = 8,
-       .rep            = 1,
-};
-
-static struct regulator_consumer_supply zoom_vmmc1_supply[] = {
-       REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"),
-};
-
-static struct regulator_consumer_supply zoom_vsim_supply[] = {
-       REGULATOR_SUPPLY("vmmc_aux", "omap_hsmmc.0"),
-};
-
-static struct regulator_consumer_supply zoom_vmmc2_supply[] = {
-       REGULATOR_SUPPLY("vmmc", "omap_hsmmc.1"),
-};
-
-static struct regulator_consumer_supply zoom_vmmc3_supply[] = {
-       REGULATOR_SUPPLY("vmmc", "omap_hsmmc.2"),
-};
-
-/* VMMC1 for OMAP VDD_MMC1 (i/o) and MMC1 card */
-static struct regulator_init_data zoom_vmmc1 = {
-       .constraints = {
-               .min_uV                 = 1850000,
-               .max_uV                 = 3150000,
-               .valid_modes_mask       = REGULATOR_MODE_NORMAL
-                                       | REGULATOR_MODE_STANDBY,
-               .valid_ops_mask         = REGULATOR_CHANGE_VOLTAGE
-                                       | REGULATOR_CHANGE_MODE
-                                       | REGULATOR_CHANGE_STATUS,
-       },
-       .num_consumer_supplies  = ARRAY_SIZE(zoom_vmmc1_supply),
-       .consumer_supplies      = zoom_vmmc1_supply,
-};
-
-/* VMMC2 for MMC2 card */
-static struct regulator_init_data zoom_vmmc2 = {
-       .constraints = {
-               .min_uV                 = 1850000,
-               .max_uV                 = 1850000,
-               .apply_uV               = true,
-               .valid_modes_mask       = REGULATOR_MODE_NORMAL
-                                       | REGULATOR_MODE_STANDBY,
-               .valid_ops_mask         = REGULATOR_CHANGE_MODE
-                                       | REGULATOR_CHANGE_STATUS,
-       },
-       .num_consumer_supplies  = ARRAY_SIZE(zoom_vmmc2_supply),
-       .consumer_supplies      = zoom_vmmc2_supply,
-};
-
-/* VSIM for OMAP VDD_MMC1A (i/o for DAT4..DAT7) */
-static struct regulator_init_data zoom_vsim = {
-       .constraints = {
-               .min_uV                 = 1800000,
-               .max_uV                 = 3000000,
-               .valid_modes_mask       = REGULATOR_MODE_NORMAL
-                                       | REGULATOR_MODE_STANDBY,
-               .valid_ops_mask         = REGULATOR_CHANGE_VOLTAGE
-                                       | REGULATOR_CHANGE_MODE
-                                       | REGULATOR_CHANGE_STATUS,
-       },
-       .num_consumer_supplies  = ARRAY_SIZE(zoom_vsim_supply),
-       .consumer_supplies      = zoom_vsim_supply,
-};
-
-static struct regulator_init_data zoom_vmmc3 = {
-       .constraints = {
-               .valid_ops_mask = REGULATOR_CHANGE_STATUS,
-       },
-       .num_consumer_supplies  = ARRAY_SIZE(zoom_vmmc3_supply),
-       .consumer_supplies      = zoom_vmmc3_supply,
-};
-
-static struct fixed_voltage_config zoom_vwlan = {
-       .supply_name            = "vwl1271",
-       .microvolts             = 1800000, /* 1.8V */
-       .gpio                   = OMAP_ZOOM_WLAN_PMENA_GPIO,
-       .startup_delay          = 70000, /* 70msec */
-       .enable_high            = 1,
-       .enabled_at_boot        = 0,
-       .init_data              = &zoom_vmmc3,
-};
-
-static struct platform_device omap_vwlan_device = {
-       .name           = "reg-fixed-voltage",
-       .id             = 1,
-       .dev = {
-               .platform_data  = &zoom_vwlan,
-       },
-};
-
-static struct pwm_lookup zoom_pwm_lookup[] = {
-       PWM_LOOKUP("twl-pwm", 0, "leds_pwm", "zoom::keypad"),
-       PWM_LOOKUP("twl-pwm", 1, "pwm-backlight", "backlight"),
-};
-
-static struct led_pwm zoom_pwm_leds[] = {
-       {
-               .name           = "zoom::keypad",
-               .max_brightness = 127,
-               .pwm_period_ns  = 7812500,
-       },
-};
-
-static struct led_pwm_platform_data zoom_pwm_data = {
-       .num_leds       = ARRAY_SIZE(zoom_pwm_leds),
-       .leds           = zoom_pwm_leds,
-};
-
-static struct platform_device zoom_leds_pwm = {
-       .name   = "leds_pwm",
-       .id     = -1,
-       .dev    = {
-               .platform_data = &zoom_pwm_data,
-       },
-};
-
-static struct platform_pwm_backlight_data zoom_backlight_data = {
-       .pwm_id = 1,
-       .max_brightness = 127,
-       .dft_brightness = 127,
-       .pwm_period_ns = 7812500,
-};
-
-static struct platform_device zoom_backlight_pwm = {
-       .name   = "pwm-backlight",
-       .id     = -1,
-       .dev    = {
-               .platform_data = &zoom_backlight_data,
-       },
-};
-
-static struct platform_device *zoom_devices[] __initdata = {
-       &omap_vwlan_device,
-       &zoom_leds_pwm,
-       &zoom_backlight_pwm,
-};
-
-static struct wl12xx_platform_data omap_zoom_wlan_data __initdata = {
-       .board_ref_clock = WL12XX_REFCLOCK_26, /* 26 MHz */
-};
-
-static struct omap2_hsmmc_info mmc[] = {
-       {
-               .name           = "external",
-               .mmc            = 1,
-               .caps           = MMC_CAP_4_BIT_DATA,
-               .gpio_wp        = -EINVAL,
-               .power_saving   = true,
-               .deferred       = true,
-       },
-       {
-               .name           = "internal",
-               .mmc            = 2,
-               .caps           = MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA,
-               .gpio_cd        = -EINVAL,
-               .gpio_wp        = -EINVAL,
-               .nonremovable   = true,
-               .power_saving   = true,
-       },
-       {
-               .name           = "wl1271",
-               .mmc            = 3,
-               .caps           = MMC_CAP_4_BIT_DATA | MMC_CAP_POWER_OFF_CARD,
-               .gpio_wp        = -EINVAL,
-               .gpio_cd        = -EINVAL,
-               .nonremovable   = true,
-       },
-       {}      /* Terminator */
-};
-
-static struct omap_tw4030_pdata omap_twl4030_audio_data = {
-       .voice_connected = true,
-       .custom_routing = true,
-
-       .has_hs         = OMAP_TWL4030_LEFT | OMAP_TWL4030_RIGHT,
-       .has_hf         = OMAP_TWL4030_LEFT | OMAP_TWL4030_RIGHT,
-
-       .has_mainmic    = true,
-       .has_submic     = true,
-       .has_hsmic      = true,
-       .has_linein     = OMAP_TWL4030_LEFT | OMAP_TWL4030_RIGHT,
-};
-
-static int zoom_twl_gpio_setup(struct device *dev,
-               unsigned gpio, unsigned ngpio)
-{
-       /* gpio + 0 is "mmc0_cd" (input/IRQ) */
-       mmc[0].gpio_cd = gpio + 0;
-       omap_hsmmc_late_init(mmc);
-
-       /* Audio setup */
-       omap_twl4030_audio_data.jack_detect = gpio + 2;
-       omap_twl4030_audio_init("Zoom2", &omap_twl4030_audio_data);
-
-       return 0;
-}
-
-static struct twl4030_gpio_platform_data zoom_gpio_data = {
-       .setup          = zoom_twl_gpio_setup,
-};
-
-static struct twl4030_platform_data zoom_twldata = {
-       /* platform_data for children goes here */
-       .gpio           = &zoom_gpio_data,
-       .keypad         = &zoom_kp_twl4030_data,
-       .vmmc1          = &zoom_vmmc1,
-       .vmmc2          = &zoom_vmmc2,
-       .vsim           = &zoom_vsim,
-};
-
-static int __init omap_i2c_init(void)
-{
-       omap3_pmic_get_config(&zoom_twldata,
-                       TWL_COMMON_PDATA_USB | TWL_COMMON_PDATA_BCI |
-                       TWL_COMMON_PDATA_MADC | TWL_COMMON_PDATA_AUDIO,
-                       TWL_COMMON_REGULATOR_VDAC | TWL_COMMON_REGULATOR_VPLL2);
-
-       if (machine_is_omap_zoom2())
-               zoom_twldata.audio->codec->ramp_delay_value = 3; /* 161 ms */
-
-       omap_pmic_init(1, 2400, "twl5030", 7 + OMAP_INTC_START, &zoom_twldata);
-       omap_register_i2c_bus(2, 400, NULL, 0);
-       omap_register_i2c_bus(3, 400, NULL, 0);
-       return 0;
-}
-
-static void enable_board_wakeup_source(void)
-{
-       /* T2 interrupt line (keypad) */
-       omap_mux_init_signal("sys_nirq",
-               OMAP_WAKEUP_EN | OMAP_PIN_INPUT_PULLUP);
-}
-
-void __init zoom_peripherals_init(void)
-{
-       int ret;
-
-       omap_zoom_wlan_data.irq = gpio_to_irq(OMAP_ZOOM_WLAN_IRQ_GPIO);
-       ret = wl12xx_set_platform_data(&omap_zoom_wlan_data);
-
-       if (ret)
-               pr_err("error setting wl12xx data: %d\n", ret);
-
-       omap_hsmmc_init(mmc);
-       omap_i2c_init();
-       pwm_add_table(zoom_pwm_lookup, ARRAY_SIZE(zoom_pwm_lookup));
-       platform_add_devices(zoom_devices, ARRAY_SIZE(zoom_devices));
-       usb_bind_phy("musb-hdrc.0.auto", 0, "twl4030_usb");
-       usb_musb_init(NULL);
-       enable_board_wakeup_source();
-       omap_serial_init();
-}
diff --git a/arch/arm/mach-omap2/board-zoom.c b/arch/arm/mach-omap2/board-zoom.c
deleted file mode 100644 (file)
index 1a3dd86..0000000
+++ /dev/null
@@ -1,159 +0,0 @@
-/*
- * Copyright (C) 2009-2010 Texas Instruments Inc.
- * Mikkel Christensen <mlc@ti.com>
- * Felipe Balbi <balbi@ti.com>
- *
- * Modified from mach-omap2/board-ldp.c
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- */
-
-#include <linux/kernel.h>
-#include <linux/init.h>
-#include <linux/platform_device.h>
-#include <linux/input.h>
-#include <linux/gpio.h>
-#include <linux/i2c/twl.h>
-#include <linux/mtd/nand.h>
-
-#include <asm/mach-types.h>
-#include <asm/mach/arch.h>
-
-#include "common.h"
-
-#include "board-zoom.h"
-
-#include "board-flash.h"
-#include "mux.h"
-#include "sdram-micron-mt46h32m32lf-6.h"
-#include "sdram-hynix-h8mbx00u0mer-0em.h"
-
-#define ZOOM3_EHCI_RESET_GPIO          64
-
-#ifdef CONFIG_OMAP_MUX
-static struct omap_board_mux board_mux[] __initdata = {
-       /* WLAN IRQ - GPIO 162 */
-       OMAP3_MUX(MCBSP1_CLKX, OMAP_MUX_MODE4 | OMAP_PIN_INPUT),
-       /* WLAN POWER ENABLE - GPIO 101 */
-       OMAP3_MUX(CAM_D2, OMAP_MUX_MODE4 | OMAP_PIN_OUTPUT),
-       /* WLAN SDIO: MMC3 CMD */
-       OMAP3_MUX(MCSPI1_CS1, OMAP_MUX_MODE3 | OMAP_PIN_INPUT_PULLUP),
-       /* WLAN SDIO: MMC3 CLK */
-       OMAP3_MUX(ETK_CLK, OMAP_MUX_MODE2 | OMAP_PIN_INPUT_PULLUP),
-       /* WLAN SDIO: MMC3 DAT[0-3] */
-       OMAP3_MUX(ETK_D3, OMAP_MUX_MODE2 | OMAP_PIN_INPUT_PULLUP),
-       OMAP3_MUX(ETK_D4, OMAP_MUX_MODE2 | OMAP_PIN_INPUT_PULLUP),
-       OMAP3_MUX(ETK_D5, OMAP_MUX_MODE2 | OMAP_PIN_INPUT_PULLUP),
-       OMAP3_MUX(ETK_D6, OMAP_MUX_MODE2 | OMAP_PIN_INPUT_PULLUP),
-       { .reg_offset = OMAP_MUX_TERMINATOR },
-};
-#endif
-
-static struct mtd_partition zoom_nand_partitions[] = {
-       /* All the partition sizes are listed in terms of NAND block size */
-       {
-               .name           = "X-Loader-NAND",
-               .offset         = 0,
-               .size           = 4 * (64 * 2048),      /* 512KB, 0x80000 */
-               .mask_flags     = MTD_WRITEABLE,        /* force read-only */
-       },
-       {
-               .name           = "U-Boot-NAND",
-               .offset         = MTDPART_OFS_APPEND,   /* Offset = 0x80000 */
-               .size           = 10 * (64 * 2048),     /* 1.25MB, 0x140000 */
-               .mask_flags     = MTD_WRITEABLE,        /* force read-only */
-       },
-       {
-               .name           = "Boot Env-NAND",
-               .offset         = MTDPART_OFS_APPEND,   /* Offset = 0x1c0000 */
-               .size           = 2 * (64 * 2048),      /* 256KB, 0x40000 */
-       },
-       {
-               .name           = "Kernel-NAND",
-               .offset         = MTDPART_OFS_APPEND,   /* Offset = 0x0200000*/
-               .size           = 240 * (64 * 2048),    /* 30M, 0x1E00000 */
-       },
-       {
-               .name           = "system",
-               .offset         = MTDPART_OFS_APPEND,   /* Offset = 0x2000000 */
-               .size           = 3328 * (64 * 2048),   /* 416M, 0x1A000000 */
-       },
-       {
-               .name           = "userdata",
-               .offset         = MTDPART_OFS_APPEND,   /* Offset = 0x1C000000*/
-               .size           = 256 * (64 * 2048),    /* 32M, 0x2000000 */
-       },
-       {
-               .name           = "cache",
-               .offset         = MTDPART_OFS_APPEND,   /* Offset = 0x1E000000*/
-               .size           = 256 * (64 * 2048),    /* 32M, 0x2000000 */
-       },
-};
-
-static struct usbhs_phy_data phy_data[] __initdata = {
-       {
-               .port = 2,
-               .reset_gpio = ZOOM3_EHCI_RESET_GPIO,
-               .vcc_gpio = -EINVAL,
-       },
-};
-
-static struct usbhs_omap_platform_data usbhs_bdata __initdata = {
-       .port_mode[1]           = OMAP_EHCI_PORT_MODE_PHY,
-};
-
-static void __init omap_zoom_init(void)
-{
-       if (machine_is_omap_zoom2()) {
-               omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
-       } else if (machine_is_omap_zoom3()) {
-               omap3_mux_init(board_mux, OMAP_PACKAGE_CBP);
-               omap_mux_init_gpio(ZOOM3_EHCI_RESET_GPIO, OMAP_PIN_OUTPUT);
-
-               usbhs_init_phys(phy_data, ARRAY_SIZE(phy_data));
-               usbhs_init(&usbhs_bdata);
-       }
-
-       board_nand_init(zoom_nand_partitions,
-                       ARRAY_SIZE(zoom_nand_partitions), ZOOM_NAND_CS,
-                       NAND_BUSWIDTH_16, nand_default_timings);
-       zoom_debugboard_init();
-       zoom_peripherals_init();
-
-       if (machine_is_omap_zoom2())
-               omap_sdrc_init(mt46h32m32lf6_sdrc_params,
-                                         mt46h32m32lf6_sdrc_params);
-       else if (machine_is_omap_zoom3())
-               omap_sdrc_init(h8mbx00u0mer0em_sdrc_params,
-                                         h8mbx00u0mer0em_sdrc_params);
-
-       zoom_display_init();
-}
-
-MACHINE_START(OMAP_ZOOM2, "OMAP Zoom2 board")
-       .atag_offset    = 0x100,
-       .reserve        = omap_reserve,
-       .map_io         = omap3_map_io,
-       .init_early     = omap3430_init_early,
-       .init_irq       = omap3_init_irq,
-       .handle_irq     = omap3_intc_handle_irq,
-       .init_machine   = omap_zoom_init,
-       .init_late      = omap3430_init_late,
-       .init_time      = omap3_sync32k_timer_init,
-       .restart        = omap3xxx_restart,
-MACHINE_END
-
-MACHINE_START(OMAP_ZOOM3, "OMAP Zoom3 board")
-       .atag_offset    = 0x100,
-       .reserve        = omap_reserve,
-       .map_io         = omap3_map_io,
-       .init_early     = omap3630_init_early,
-       .init_irq       = omap3_init_irq,
-       .handle_irq     = omap3_intc_handle_irq,
-       .init_machine   = omap_zoom_init,
-       .init_late      = omap3630_init_late,
-       .init_time      = omap3_sync32k_timer_init,
-       .restart        = omap3xxx_restart,
-MACHINE_END
diff --git a/arch/arm/mach-omap2/board-zoom.h b/arch/arm/mach-omap2/board-zoom.h
deleted file mode 100644 (file)
index 2e94869..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-/*
- * Defines for zoom boards
- */
-#include <video/omapdss.h>
-
-#define ZOOM_NAND_CS    0
-
-extern int __init zoom_debugboard_init(void);
-extern void __init zoom_peripherals_init(void);
-extern void __init zoom_display_init(void);
index 334b76745900fb397e8d3fd5419dc1dd91e0bc63..03a2829beb8e4c69144dfd5e5eb639189b836b02 100644 (file)
@@ -3275,6 +3275,7 @@ static struct omap_clk omap36xx_clks[] = {
 static struct omap_clk omap34xx_omap36xx_clks[] = {
        CLK(NULL,       "aes1_ick",     &aes1_ick),
        CLK("omap_rng", "ick",          &rng_ick),
+       CLK("omap3-rom-rng",    "ick",  &rng_ick),
        CLK(NULL,       "sha11_ick",    &sha11_ick),
        CLK(NULL,       "des1_ick",     &des1_ick),
        CLK(NULL,       "cam_mclk",     &cam_mclk),
index 4b03394fa0c5307bdd31182c6bfd025d3c0aa2df..f17f00697cc054df682006d167264a43c959242d 100644 (file)
@@ -132,7 +132,7 @@ struct clockdomain {
        u8 _flags;
        const u8 dep_bit;
        const u8 prcm_partition;
-       const s16 cm_inst;
+       const u16 cm_inst;
        const u16 clkdm_offs;
        struct clkdm_dep *wkdep_srcs;
        struct clkdm_dep *sleepdep_srcs;
@@ -218,6 +218,7 @@ extern void __init am33xx_clockdomains_init(void);
 extern void __init omap44xx_clockdomains_init(void);
 extern void __init omap54xx_clockdomains_init(void);
 extern void __init dra7xx_clockdomains_init(void);
+void am43xx_clockdomains_init(void);
 
 extern void clkdm_add_autodeps(struct clockdomain *clkdm);
 extern void clkdm_del_autodeps(struct clockdomain *clkdm);
@@ -226,6 +227,7 @@ extern struct clkdm_ops omap2_clkdm_operations;
 extern struct clkdm_ops omap3_clkdm_operations;
 extern struct clkdm_ops omap4_clkdm_operations;
 extern struct clkdm_ops am33xx_clkdm_operations;
+extern struct clkdm_ops am43xx_clkdm_operations;
 
 extern struct clkdm_dep gfx_24xx_wkdeps[];
 extern struct clkdm_dep dsp_24xx_wkdeps[];
diff --git a/arch/arm/mach-omap2/clockdomains43xx_data.c b/arch/arm/mach-omap2/clockdomains43xx_data.c
new file mode 100644 (file)
index 0000000..6d71c60
--- /dev/null
@@ -0,0 +1,196 @@
+/*
+ * AM43xx Clock domains framework
+ *
+ * Copyright (C) 2013 Texas Instruments, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#include <linux/kernel.h>
+#include <linux/io.h>
+
+#include "clockdomain.h"
+#include "prcm44xx.h"
+#include "prcm43xx.h"
+
+static struct clockdomain l4_cefuse_43xx_clkdm = {
+       .name             = "l4_cefuse_clkdm",
+       .pwrdm            = { .name = "cefuse_pwrdm" },
+       .prcm_partition   = AM43XX_CM_PARTITION,
+       .cm_inst          = AM43XX_CM_CEFUSE_INST,
+       .clkdm_offs       = AM43XX_CM_CEFUSE_CEFUSE_CDOFFS,
+       .flags            = CLKDM_CAN_SWSUP,
+};
+
+static struct clockdomain mpu_43xx_clkdm = {
+       .name             = "mpu_clkdm",
+       .pwrdm            = { .name = "mpu_pwrdm" },
+       .prcm_partition   = AM43XX_CM_PARTITION,
+       .cm_inst          = AM43XX_CM_MPU_INST,
+       .clkdm_offs       = AM43XX_CM_MPU_MPU_CDOFFS,
+       .flags            = CLKDM_CAN_HWSUP_SWSUP,
+};
+
+static struct clockdomain l4ls_43xx_clkdm = {
+       .name             = "l4ls_clkdm",
+       .pwrdm            = { .name = "per_pwrdm" },
+       .prcm_partition   = AM43XX_CM_PARTITION,
+       .cm_inst          = AM43XX_CM_PER_INST,
+       .clkdm_offs       = AM43XX_CM_PER_L4LS_CDOFFS,
+       .flags            = CLKDM_CAN_SWSUP,
+};
+
+static struct clockdomain tamper_43xx_clkdm = {
+       .name             = "tamper_clkdm",
+       .pwrdm            = { .name = "tamper_pwrdm" },
+       .prcm_partition   = AM43XX_CM_PARTITION,
+       .cm_inst          = AM43XX_CM_TAMPER_INST,
+       .clkdm_offs       = AM43XX_CM_TAMPER_TAMPER_CDOFFS,
+       .flags            = CLKDM_CAN_SWSUP,
+};
+
+static struct clockdomain l4_rtc_43xx_clkdm = {
+       .name             = "l4_rtc_clkdm",
+       .pwrdm            = { .name = "rtc_pwrdm" },
+       .prcm_partition   = AM43XX_CM_PARTITION,
+       .cm_inst          = AM43XX_CM_RTC_INST,
+       .clkdm_offs       = AM43XX_CM_RTC_RTC_CDOFFS,
+       .flags            = CLKDM_CAN_SWSUP,
+};
+
+static struct clockdomain pruss_ocp_43xx_clkdm = {
+       .name             = "pruss_ocp_clkdm",
+       .pwrdm            = { .name = "per_pwrdm" },
+       .prcm_partition   = AM43XX_CM_PARTITION,
+       .cm_inst          = AM43XX_CM_PER_INST,
+       .clkdm_offs       = AM43XX_CM_PER_ICSS_CDOFFS,
+       .flags            = CLKDM_CAN_SWSUP,
+};
+
+static struct clockdomain ocpwp_l3_43xx_clkdm = {
+       .name             = "ocpwp_l3_clkdm",
+       .pwrdm            = { .name = "per_pwrdm" },
+       .prcm_partition   = AM43XX_CM_PARTITION,
+       .cm_inst          = AM43XX_CM_PER_INST,
+       .clkdm_offs       = AM43XX_CM_PER_OCPWP_L3_CDOFFS,
+       .flags            = CLKDM_CAN_SWSUP,
+};
+
+static struct clockdomain l3s_tsc_43xx_clkdm = {
+       .name             = "l3s_tsc_clkdm",
+       .pwrdm            = { .name = "wkup_pwrdm" },
+       .prcm_partition   = AM43XX_CM_PARTITION,
+       .cm_inst          = AM43XX_CM_WKUP_INST,
+       .clkdm_offs       = AM43XX_CM_WKUP_L3S_TSC_CDOFFS,
+       .flags            = CLKDM_CAN_SWSUP,
+};
+
+static struct clockdomain dss_43xx_clkdm = {
+       .name             = "dss_clkdm",
+       .pwrdm            = { .name = "per_pwrdm" },
+       .prcm_partition   = AM43XX_CM_PARTITION,
+       .cm_inst          = AM43XX_CM_PER_INST,
+       .clkdm_offs       = AM43XX_CM_PER_DSS_CDOFFS,
+       .flags            = CLKDM_CAN_SWSUP,
+};
+
+static struct clockdomain l3_aon_43xx_clkdm = {
+       .name             = "l3_aon_clkdm",
+       .pwrdm            = { .name = "wkup_pwrdm" },
+       .prcm_partition   = AM43XX_CM_PARTITION,
+       .cm_inst          = AM43XX_CM_WKUP_INST,
+       .clkdm_offs       = AM43XX_CM_WKUP_L3_AON_CDOFFS,
+       .flags            = CLKDM_CAN_SWSUP,
+};
+
+static struct clockdomain emif_43xx_clkdm = {
+       .name             = "emif_clkdm",
+       .pwrdm            = { .name = "per_pwrdm" },
+       .prcm_partition   = AM43XX_CM_PARTITION,
+       .cm_inst          = AM43XX_CM_PER_INST,
+       .clkdm_offs       = AM43XX_CM_PER_EMIF_CDOFFS,
+       .flags            = CLKDM_CAN_SWSUP,
+};
+
+static struct clockdomain l4_wkup_aon_43xx_clkdm = {
+       .name             = "l4_wkup_aon_clkdm",
+       .pwrdm            = { .name = "wkup_pwrdm" },
+       .prcm_partition   = AM43XX_CM_PARTITION,
+       .cm_inst          = AM43XX_CM_WKUP_INST,
+       .clkdm_offs       = AM43XX_CM_WKUP_L4_WKUP_AON_CDOFFS,
+};
+
+static struct clockdomain l3_43xx_clkdm = {
+       .name             = "l3_clkdm",
+       .pwrdm            = { .name = "per_pwrdm" },
+       .prcm_partition   = AM43XX_CM_PARTITION,
+       .cm_inst          = AM43XX_CM_PER_INST,
+       .clkdm_offs       = AM43XX_CM_PER_L3_CDOFFS,
+       .flags            = CLKDM_CAN_SWSUP,
+};
+
+static struct clockdomain l4_wkup_43xx_clkdm = {
+       .name             = "l4_wkup_clkdm",
+       .pwrdm            = { .name = "wkup_pwrdm" },
+       .prcm_partition   = AM43XX_CM_PARTITION,
+       .cm_inst          = AM43XX_CM_WKUP_INST,
+       .clkdm_offs       = AM43XX_CM_WKUP_WKUP_CDOFFS,
+       .flags            = CLKDM_CAN_SWSUP,
+};
+
+static struct clockdomain cpsw_125mhz_43xx_clkdm = {
+       .name             = "cpsw_125mhz_clkdm",
+       .pwrdm            = { .name = "per_pwrdm" },
+       .prcm_partition   = AM43XX_CM_PARTITION,
+       .cm_inst          = AM43XX_CM_PER_INST,
+       .clkdm_offs       = AM43XX_CM_PER_CPSW_CDOFFS,
+       .flags            = CLKDM_CAN_SWSUP,
+};
+
+static struct clockdomain gfx_l3_43xx_clkdm = {
+       .name             = "gfx_l3_clkdm",
+       .pwrdm            = { .name = "gfx_pwrdm" },
+       .prcm_partition   = AM43XX_CM_PARTITION,
+       .cm_inst          = AM43XX_CM_GFX_INST,
+       .clkdm_offs       = AM43XX_CM_GFX_GFX_L3_CDOFFS,
+       .flags            = CLKDM_CAN_SWSUP,
+};
+
+static struct clockdomain l3s_43xx_clkdm = {
+       .name             = "l3s_clkdm",
+       .pwrdm            = { .name = "per_pwrdm" },
+       .prcm_partition   = AM43XX_CM_PARTITION,
+       .cm_inst          = AM43XX_CM_PER_INST,
+       .clkdm_offs       = AM43XX_CM_PER_L3S_CDOFFS,
+       .flags            = CLKDM_CAN_SWSUP,
+};
+
+static struct clockdomain *clockdomains_am43xx[] __initdata = {
+       &l4_cefuse_43xx_clkdm,
+       &mpu_43xx_clkdm,
+       &l4ls_43xx_clkdm,
+       &tamper_43xx_clkdm,
+       &l4_rtc_43xx_clkdm,
+       &pruss_ocp_43xx_clkdm,
+       &ocpwp_l3_43xx_clkdm,
+       &l3s_tsc_43xx_clkdm,
+       &dss_43xx_clkdm,
+       &l3_aon_43xx_clkdm,
+       &emif_43xx_clkdm,
+       &l4_wkup_aon_43xx_clkdm,
+       &l3_43xx_clkdm,
+       &l4_wkup_43xx_clkdm,
+       &cpsw_125mhz_43xx_clkdm,
+       &gfx_l3_43xx_clkdm,
+       &l3s_43xx_clkdm,
+       NULL
+};
+
+void __init am43xx_clockdomains_init(void)
+{
+       clkdm_register_platform_funcs(&am43xx_clkdm_operations);
+       clkdm_register_clkdms(clockdomains_am43xx);
+       clkdm_complete_init();
+}
index 325a515765766c1757c5fd858e9bd8b3c226f44e..40a22e5649aeadb2d49ce1528b0e239894f5b8a9 100644 (file)
 /* Private functions */
 
 /* Read a register in a CM instance */
-static inline u32 am33xx_cm_read_reg(s16 inst, u16 idx)
+static inline u32 am33xx_cm_read_reg(u16 inst, u16 idx)
 {
        return __raw_readl(cm_base + inst + idx);
 }
 
 /* Write into a register in a CM */
-static inline void am33xx_cm_write_reg(u32 val, s16 inst, u16 idx)
+static inline void am33xx_cm_write_reg(u32 val, u16 inst, u16 idx)
 {
        __raw_writel(val, cm_base + inst + idx);
 }
@@ -138,7 +138,7 @@ static bool _is_module_ready(u16 inst, s16 cdoffs, u16 clkctrl_offs)
  * @c must be the unshifted value for CLKTRCTRL - i.e., this function
  * will handle the shift itself.
  */
-static void _clktrctrl_write(u8 c, s16 inst, u16 cdoffs)
+static void _clktrctrl_write(u8 c, u16 inst, u16 cdoffs)
 {
        u32 v;
 
@@ -158,7 +158,7 @@ static void _clktrctrl_write(u8 c, s16 inst, u16 cdoffs)
  * Returns true if the clockdomain referred to by (@inst, @cdoffs)
  * is in hardware-supervised idle mode, or 0 otherwise.
  */
-bool am33xx_cm_is_clkdm_in_hwsup(s16 inst, u16 cdoffs)
+bool am33xx_cm_is_clkdm_in_hwsup(u16 inst, u16 cdoffs)
 {
        u32 v;
 
@@ -177,7 +177,7 @@ bool am33xx_cm_is_clkdm_in_hwsup(s16 inst, u16 cdoffs)
  * Put a clockdomain referred to by (@inst, @cdoffs) into
  * hardware-supervised idle mode.  No return value.
  */
-void am33xx_cm_clkdm_enable_hwsup(s16 inst, u16 cdoffs)
+void am33xx_cm_clkdm_enable_hwsup(u16 inst, u16 cdoffs)
 {
        _clktrctrl_write(OMAP34XX_CLKSTCTRL_ENABLE_AUTO, inst, cdoffs);
 }
@@ -191,7 +191,7 @@ void am33xx_cm_clkdm_enable_hwsup(s16 inst, u16 cdoffs)
  * software-supervised idle mode, i.e., controlled manually by the
  * Linux OMAP clockdomain code.  No return value.
  */
-void am33xx_cm_clkdm_disable_hwsup(s16 inst, u16 cdoffs)
+void am33xx_cm_clkdm_disable_hwsup(u16 inst, u16 cdoffs)
 {
        _clktrctrl_write(OMAP34XX_CLKSTCTRL_DISABLE_AUTO, inst, cdoffs);
 }
@@ -204,7 +204,7 @@ void am33xx_cm_clkdm_disable_hwsup(s16 inst, u16 cdoffs)
  * Put a clockdomain referred to by (@inst, @cdoffs) into idle
  * No return value.
  */
-void am33xx_cm_clkdm_force_sleep(s16 inst, u16 cdoffs)
+void am33xx_cm_clkdm_force_sleep(u16 inst, u16 cdoffs)
 {
        _clktrctrl_write(OMAP34XX_CLKSTCTRL_FORCE_SLEEP, inst, cdoffs);
 }
@@ -217,7 +217,7 @@ void am33xx_cm_clkdm_force_sleep(s16 inst, u16 cdoffs)
  * Take a clockdomain referred to by (@inst, @cdoffs) out of idle,
  * waking it up.  No return value.
  */
-void am33xx_cm_clkdm_force_wakeup(s16 inst, u16 cdoffs)
+void am33xx_cm_clkdm_force_wakeup(u16 inst, u16 cdoffs)
 {
        _clktrctrl_write(OMAP34XX_CLKSTCTRL_FORCE_WAKEUP, inst, cdoffs);
 }
index 9d1f4fcdebbb436010fdf834b1003dfb5e347f51..cfb8891b0c0ec9ed5cac6cf8e8dc5bdb58377cb3 100644 (file)
 
 
 #ifndef __ASSEMBLER__
-extern bool am33xx_cm_is_clkdm_in_hwsup(s16 inst, u16 cdoffs);
-extern void am33xx_cm_clkdm_enable_hwsup(s16 inst, u16 cdoffs);
-extern void am33xx_cm_clkdm_disable_hwsup(s16 inst, u16 cdoffs);
-extern void am33xx_cm_clkdm_force_sleep(s16 inst, u16 cdoffs);
-extern void am33xx_cm_clkdm_force_wakeup(s16 inst, u16 cdoffs);
+bool am33xx_cm_is_clkdm_in_hwsup(u16 inst, u16 cdoffs);
+void am33xx_cm_clkdm_enable_hwsup(u16 inst, u16 cdoffs);
+void am33xx_cm_clkdm_disable_hwsup(u16 inst, u16 cdoffs);
+void am33xx_cm_clkdm_force_sleep(u16 inst, u16 cdoffs);
+void am33xx_cm_clkdm_force_wakeup(u16 inst, u16 cdoffs);
 
-#if defined(CONFIG_SOC_AM33XX) || defined(CONFIG_SOC_AM43XX)
+#ifdef CONFIG_SOC_AM33XX
 extern int am33xx_cm_wait_module_idle(u16 inst, s16 cdoffs,
                                        u16 clkctrl_offs);
 extern void am33xx_cm_module_enable(u8 mode, u16 inst, s16 cdoffs,
index f0290f5566fe0115cfc2bdf8476c85f84d000b3f..731ca134348c34906c2e8dc58e5f982aca04f1b5 100644 (file)
@@ -111,7 +111,7 @@ static bool _is_module_ready(u8 part, u16 inst, s16 cdoffs, u16 clkctrl_offs)
 /* Public functions */
 
 /* Read a register in a CM instance */
-u32 omap4_cminst_read_inst_reg(u8 part, s16 inst, u16 idx)
+u32 omap4_cminst_read_inst_reg(u8 part, u16 inst, u16 idx)
 {
        BUG_ON(part >= OMAP4_MAX_PRCM_PARTITIONS ||
               part == OMAP4430_INVALID_PRCM_PARTITION ||
@@ -120,7 +120,7 @@ u32 omap4_cminst_read_inst_reg(u8 part, s16 inst, u16 idx)
 }
 
 /* Write into a register in a CM instance */
-void omap4_cminst_write_inst_reg(u32 val, u8 part, s16 inst, u16 idx)
+void omap4_cminst_write_inst_reg(u32 val, u8 part, u16 inst, u16 idx)
 {
        BUG_ON(part >= OMAP4_MAX_PRCM_PARTITIONS ||
               part == OMAP4430_INVALID_PRCM_PARTITION ||
@@ -129,7 +129,7 @@ void omap4_cminst_write_inst_reg(u32 val, u8 part, s16 inst, u16 idx)
 }
 
 /* Read-modify-write a register in CM1. Caller must lock */
-u32 omap4_cminst_rmw_inst_reg_bits(u32 mask, u32 bits, u8 part, s16 inst,
+u32 omap4_cminst_rmw_inst_reg_bits(u32 mask, u32 bits, u8 part, u16 inst,
                                   s16 idx)
 {
        u32 v;
@@ -142,12 +142,12 @@ u32 omap4_cminst_rmw_inst_reg_bits(u32 mask, u32 bits, u8 part, s16 inst,
        return v;
 }
 
-u32 omap4_cminst_set_inst_reg_bits(u32 bits, u8 part, s16 inst, s16 idx)
+u32 omap4_cminst_set_inst_reg_bits(u32 bits, u8 part, u16 inst, s16 idx)
 {
        return omap4_cminst_rmw_inst_reg_bits(bits, bits, part, inst, idx);
 }
 
-u32 omap4_cminst_clear_inst_reg_bits(u32 bits, u8 part, s16 inst, s16 idx)
+u32 omap4_cminst_clear_inst_reg_bits(u32 bits, u8 part, u16 inst, s16 idx)
 {
        return omap4_cminst_rmw_inst_reg_bits(bits, 0x0, part, inst, idx);
 }
@@ -177,7 +177,7 @@ u32 omap4_cminst_read_inst_reg_bits(u8 part, u16 inst, s16 idx, u32 mask)
  * @c must be the unshifted value for CLKTRCTRL - i.e., this function
  * will handle the shift itself.
  */
-static void _clktrctrl_write(u8 c, u8 part, s16 inst, u16 cdoffs)
+static void _clktrctrl_write(u8 c, u8 part, u16 inst, u16 cdoffs)
 {
        u32 v;
 
@@ -196,7 +196,7 @@ static void _clktrctrl_write(u8 c, u8 part, s16 inst, u16 cdoffs)
  * Returns true if the clockdomain referred to by (@part, @inst, @cdoffs)
  * is in hardware-supervised idle mode, or 0 otherwise.
  */
-bool omap4_cminst_is_clkdm_in_hwsup(u8 part, s16 inst, u16 cdoffs)
+bool omap4_cminst_is_clkdm_in_hwsup(u8 part, u16 inst, u16 cdoffs)
 {
        u32 v;
 
@@ -216,7 +216,7 @@ bool omap4_cminst_is_clkdm_in_hwsup(u8 part, s16 inst, u16 cdoffs)
  * Put a clockdomain referred to by (@part, @inst, @cdoffs) into
  * hardware-supervised idle mode.  No return value.
  */
-void omap4_cminst_clkdm_enable_hwsup(u8 part, s16 inst, u16 cdoffs)
+void omap4_cminst_clkdm_enable_hwsup(u8 part, u16 inst, u16 cdoffs)
 {
        _clktrctrl_write(OMAP34XX_CLKSTCTRL_ENABLE_AUTO, part, inst, cdoffs);
 }
@@ -231,7 +231,7 @@ void omap4_cminst_clkdm_enable_hwsup(u8 part, s16 inst, u16 cdoffs)
  * software-supervised idle mode, i.e., controlled manually by the
  * Linux OMAP clockdomain code.  No return value.
  */
-void omap4_cminst_clkdm_disable_hwsup(u8 part, s16 inst, u16 cdoffs)
+void omap4_cminst_clkdm_disable_hwsup(u8 part, u16 inst, u16 cdoffs)
 {
        _clktrctrl_write(OMAP34XX_CLKSTCTRL_DISABLE_AUTO, part, inst, cdoffs);
 }
@@ -245,7 +245,7 @@ void omap4_cminst_clkdm_disable_hwsup(u8 part, s16 inst, u16 cdoffs)
  * Take a clockdomain referred to by (@part, @inst, @cdoffs) out of idle,
  * waking it up.  No return value.
  */
-void omap4_cminst_clkdm_force_wakeup(u8 part, s16 inst, u16 cdoffs)
+void omap4_cminst_clkdm_force_wakeup(u8 part, u16 inst, u16 cdoffs)
 {
        _clktrctrl_write(OMAP34XX_CLKSTCTRL_FORCE_WAKEUP, part, inst, cdoffs);
 }
@@ -483,3 +483,12 @@ struct clkdm_ops omap4_clkdm_operations = {
        .clkdm_clk_enable       = omap4_clkdm_clk_enable,
        .clkdm_clk_disable      = omap4_clkdm_clk_disable,
 };
+
+struct clkdm_ops am43xx_clkdm_operations = {
+       .clkdm_sleep            = omap4_clkdm_sleep,
+       .clkdm_wakeup           = omap4_clkdm_wakeup,
+       .clkdm_allow_idle       = omap4_clkdm_allow_idle,
+       .clkdm_deny_idle        = omap4_clkdm_deny_idle,
+       .clkdm_clk_enable       = omap4_clkdm_clk_enable,
+       .clkdm_clk_disable      = omap4_clkdm_clk_disable,
+};
index bd7bab889745f82ded937256ec6aff76ee7e9e26..7f56ea444bc46c89bf23f3c6fa0251b1e82477a3 100644 (file)
 #ifndef __ARCH_ASM_MACH_OMAP2_CMINST44XX_H
 #define __ARCH_ASM_MACH_OMAP2_CMINST44XX_H
 
-extern bool omap4_cminst_is_clkdm_in_hwsup(u8 part, s16 inst, u16 cdoffs);
-extern void omap4_cminst_clkdm_enable_hwsup(u8 part, s16 inst, u16 cdoffs);
-extern void omap4_cminst_clkdm_disable_hwsup(u8 part, s16 inst, u16 cdoffs);
-extern void omap4_cminst_clkdm_force_sleep(u8 part, s16 inst, u16 cdoffs);
-extern void omap4_cminst_clkdm_force_wakeup(u8 part, s16 inst, u16 cdoffs);
+bool omap4_cminst_is_clkdm_in_hwsup(u8 part, u16 inst, u16 cdoffs);
+void omap4_cminst_clkdm_enable_hwsup(u8 part, u16 inst, u16 cdoffs);
+void omap4_cminst_clkdm_disable_hwsup(u8 part, u16 inst, u16 cdoffs);
+void omap4_cminst_clkdm_force_sleep(u8 part, u16 inst, u16 cdoffs);
+void omap4_cminst_clkdm_force_wakeup(u8 part, u16 inst, u16 cdoffs);
 extern int omap4_cminst_wait_module_ready(u8 part, u16 inst, s16 cdoffs, u16 clkctrl_offs);
 extern int omap4_cminst_wait_module_idle(u8 part, u16 inst, s16 cdoffs,
                                         u16 clkctrl_offs);
@@ -27,14 +27,14 @@ extern void omap4_cminst_module_disable(u8 part, u16 inst, s16 cdoffs,
  * In an ideal world, we would not export these low-level functions,
  * but this will probably take some time to fix properly
  */
-extern u32 omap4_cminst_read_inst_reg(u8 part, s16 inst, u16 idx);
-extern void omap4_cminst_write_inst_reg(u32 val, u8 part, s16 inst, u16 idx);
-extern u32 omap4_cminst_rmw_inst_reg_bits(u32 mask, u32 bits, u8 part,
-                                          s16 inst, s16 idx);
-extern u32 omap4_cminst_set_inst_reg_bits(u32 bits, u8 part, s16 inst,
-                                          s16 idx);
-extern u32 omap4_cminst_clear_inst_reg_bits(u32 bits, u8 part, s16 inst,
-                                          s16 idx);
+u32 omap4_cminst_read_inst_reg(u8 part, u16 inst, u16 idx);
+void omap4_cminst_write_inst_reg(u32 val, u8 part, u16 inst, u16 idx);
+u32 omap4_cminst_rmw_inst_reg_bits(u32 mask, u32 bits, u8 part,
+                                  u16 inst, s16 idx);
+u32 omap4_cminst_set_inst_reg_bits(u32 bits, u8 part, u16 inst,
+                                  s16 idx);
+u32 omap4_cminst_clear_inst_reg_bits(u32 bits, u8 part, u16 inst,
+                                    s16 idx);
 extern u32 omap4_cminst_read_inst_reg_bits(u8 part, u16 inst, s16 idx,
                                           u32 mask);
 
index 4a5684b96492099c18a010aef105ea5507860258..c6aebf0b42d8d02468171fce20301eac3a9df3c6 100644 (file)
@@ -288,6 +288,9 @@ static inline void omap4_cpu_resume(void)
 
 #endif
 
+void pdata_quirks_init(struct of_device_id *);
+void omap_pcs_legacy_init(int irq, void (*rearm)(void));
+
 struct omap_sdrc_params;
 extern void omap_sdrc_init(struct omap_sdrc_params *sdrc_cs0,
                                      struct omap_sdrc_params *sdrc_cs1);
index 5c5315ba129b705b4af0c6b9f8af38e217e922cd..0dd6398bade4787510c4d5c62210b7a61cfb7595 100644 (file)
@@ -19,7 +19,6 @@
 #include <linux/of.h>
 #include <linux/pinctrl/machine.h>
 #include <linux/platform_data/omap4-keypad.h>
-#include <linux/wl12xx.h>
 #include <linux/platform_data/mailbox-omap.h>
 
 #include <asm/mach-types.h>
@@ -37,6 +36,7 @@
 #include "mux.h"
 #include "control.h"
 #include "devices.h"
+#include "display.h"
 
 #define L3_MODULES_MAX_LEN 12
 #define L3_MODULES 3
@@ -466,47 +466,13 @@ static struct platform_device omap_vout_device = {
        .resource       = &omap_vout_resource[0],
        .id             = -1,
 };
-static void omap_init_vout(void)
-{
-       if (platform_device_register(&omap_vout_device) < 0)
-               printk(KERN_ERR "Unable to register OMAP-VOUT device\n");
-}
-#else
-static inline void omap_init_vout(void) {}
-#endif
-
-#if IS_ENABLED(CONFIG_WL12XX)
 
-static struct wl12xx_platform_data wl12xx __initdata;
-
-void __init omap_init_wl12xx_of(void)
+int __init omap_init_vout(void)
 {
-       int ret;
-
-       if (!of_have_populated_dt())
-               return;
-
-       if (of_machine_is_compatible("ti,omap4-sdp")) {
-               wl12xx.board_ref_clock = WL12XX_REFCLOCK_26;
-               wl12xx.board_tcxo_clock = WL12XX_TCXOCLOCK_26;
-               wl12xx.irq = gpio_to_irq(53);
-       } else if (of_machine_is_compatible("ti,omap4-panda")) {
-               wl12xx.board_ref_clock = WL12XX_REFCLOCK_38;
-               wl12xx.irq = gpio_to_irq(53);
-       } else {
-               return;
-       }
-
-       ret = wl12xx_set_platform_data(&wl12xx);
-       if (ret) {
-               pr_err("error setting wl12xx data: %d\n", ret);
-               return;
-       }
+       return platform_device_register(&omap_vout_device);
 }
 #else
-static inline void omap_init_wl12xx_of(void)
-{
-}
+int __init omap_init_vout(void) { return 0; }
 #endif
 
 /*-------------------------------------------------------------------------*/
@@ -531,12 +497,8 @@ static int __init omap2_init_devices(void)
                omap_init_sham();
                omap_init_aes();
                omap_init_rng();
-       } else {
-               /* These can be removed when bindings are done */
-               omap_init_wl12xx_of();
        }
        omap_init_sti();
-       omap_init_vout();
 
        return 0;
 }
index 03a0516c7f678294d1f7a261901a61550c0f012a..a4e536b11ec9a997d8e640ff44745e6759c031fa 100644 (file)
@@ -416,6 +416,34 @@ int __init omap_display_init(struct omap_dss_board_info *board_data)
                }
        }
 
+       /* create DRM device */
+       r = omap_init_drm();
+       if (r < 0) {
+               pr_err("Unable to register omapdrm device\n");
+               return r;
+       }
+
+       /* create vrfb device */
+       r = omap_init_vrfb();
+       if (r < 0) {
+               pr_err("Unable to register omapvrfb device\n");
+               return r;
+       }
+
+       /* create FB device */
+       r = omap_init_fb();
+       if (r < 0) {
+               pr_err("Unable to register omapfb device\n");
+               return r;
+       }
+
+       /* create V4L2 display device */
+       r = omap_init_vout();
+       if (r < 0) {
+               pr_err("Unable to register omap_vout device\n");
+               return r;
+       }
+
        return 0;
 }
 
index b871b017b3522bc0bf61d9837efbf93bbdfd1111..f3d2ce4bc262350420d8ff57eb4805d2894ff87a 100644 (file)
@@ -26,4 +26,8 @@ struct omap_dss_dispc_dev_attr {
        bool    has_framedonetv_irq;
 };
 
+int omap_init_drm(void);
+int omap_init_vrfb(void);
+int omap_init_fb(void);
+int omap_init_vout(void);
 #endif
index 59a4af779f421986fc6ea097cf1f33040bdaadf7..facd7406a03d76b2643802e8fb8759c54ec729c7 100644 (file)
 #include <linux/platform_data/omap_drm.h>
 
 #include "soc.h"
-#include "omap_device.h"
-#include "omap_hwmod.h"
+#include "display.h"
 
-#if defined(CONFIG_DRM_OMAP) || (CONFIG_DRM_OMAP_MODULE)
+#if defined(CONFIG_DRM_OMAP) || defined(CONFIG_DRM_OMAP_MODULE)
 
 static struct omap_drm_platform_data platform_data;
 
@@ -42,26 +41,13 @@ static struct platform_device omap_drm_device = {
        .id = 0,
 };
 
-static int __init omap_init_drm(void)
+int __init omap_init_drm(void)
 {
-       struct omap_hwmod *oh = NULL;
-       struct platform_device *pdev;
-
-       /* lookup and populate the DMM information, if present - OMAP4+ */
-       oh = omap_hwmod_lookup("dmm");
-
-       if (oh) {
-               pdev = omap_device_build(oh->name, -1, oh, NULL, 0);
-               WARN(IS_ERR(pdev), "Could not build omap_device for %s\n",
-                       oh->name);
-       }
-
        platform_data.omaprev = GET_OMAP_TYPE;
 
        return platform_device_register(&omap_drm_device);
 
 }
-
-omap_arch_initcall(omap_init_drm);
-
+#else
+int __init omap_init_drm(void) { return 0; }
 #endif
index bf89effa4c9988a45c770175307e632918790a4a..365bfd3d9c68b8486f23049a71889484c60eb793 100644 (file)
@@ -213,3 +213,47 @@ void __init omap_4430sdp_display_init_of(void)
        platform_device_register(&sdp4430_tpd_device);
        platform_device_register(&sdp4430_hdmi_connector_device);
 }
+
+
+/* OMAP3 IGEPv2 data */
+
+#define IGEP2_DVI_TFP410_POWER_DOWN_GPIO       170
+
+/* DVI Connector */
+static struct connector_dvi_platform_data omap3_igep2_dvi_connector_pdata = {
+       .name                   = "dvi",
+       .source                 = "tfp410.0",
+       .i2c_bus_num            = 3,
+};
+
+static struct platform_device omap3_igep2_dvi_connector_device = {
+       .name                   = "connector-dvi",
+       .id                     = 0,
+       .dev.platform_data      = &omap3_igep2_dvi_connector_pdata,
+};
+
+/* TFP410 DPI-to-DVI chip */
+static struct encoder_tfp410_platform_data omap3_igep2_tfp410_pdata = {
+       .name                   = "tfp410.0",
+       .source                 = "dpi.0",
+       .data_lines             = 24,
+       .power_down_gpio        = IGEP2_DVI_TFP410_POWER_DOWN_GPIO,
+};
+
+static struct platform_device omap3_igep2_tfp410_device = {
+       .name                   = "tfp410",
+       .id                     = 0,
+       .dev.platform_data      = &omap3_igep2_tfp410_pdata,
+};
+
+static struct omap_dss_board_info igep2_dss_data = {
+       .default_display_name = "dvi",
+};
+
+void __init omap3_igep2_display_init_of(void)
+{
+       omap_display_init(&igep2_dss_data);
+
+       platform_device_register(&omap3_igep2_tfp410_device);
+       platform_device_register(&omap3_igep2_dvi_connector_device);
+}
index c28fe3c035880c58ad6e749f123a01d4437024c8..a9becf0d5be84695f732f1e01a2e2215f9e5ed16 100644 (file)
@@ -8,5 +8,6 @@
 
 void __init omap4_panda_display_init_of(void);
 void __init omap_4430sdp_display_init_of(void);
+void __init omap3_igep2_display_init_of(void);
 
 #endif
index 2ca33cc0c484055a7c4f6543b9c2a1e35adeef87..26e28e94f62582d09b77134aca1ec2533b148856 100644 (file)
@@ -32,6 +32,7 @@
 #include <asm/mach/map.h>
 
 #include "soc.h"
+#include "display.h"
 
 #ifdef CONFIG_OMAP2_VRFB
 
@@ -64,7 +65,7 @@ static const struct resource omap3_vrfb_resources[] = {
        DEFINE_RES_MEM_NAMED(0xfc000000u, 0x4000000, "vrfb-area-11"),
 };
 
-static int __init omap_init_vrfb(void)
+int __init omap_init_vrfb(void)
 {
        struct platform_device *pdev;
        const struct resource *res;
@@ -85,8 +86,8 @@ static int __init omap_init_vrfb(void)
 
        return PTR_RET(pdev);
 }
-
-omap_arch_initcall(omap_init_vrfb);
+#else
+int __init omap_init_vrfb(void) { return 0; }
 #endif
 
 #if defined(CONFIG_FB_OMAP2) || defined(CONFIG_FB_OMAP2_MODULE)
@@ -105,11 +106,10 @@ static struct platform_device omap_fb_device = {
        .num_resources = 0,
 };
 
-static int __init omap_init_fb(void)
+int __init omap_init_fb(void)
 {
        return platform_device_register(&omap_fb_device);
 }
-
-omap_arch_initcall(omap_init_fb);
-
+#else
+int __init omap_init_fb(void) { return 0; }
 #endif
index 579697adaae7dfd373285979eebeb815658f4a1d..51525faa0aecde65beb9ff745cfc066a81bc62ad 100644 (file)
@@ -1521,6 +1521,42 @@ err:
        return ret;
 }
 
+/*
+ * REVISIT: Add timing support from slls644g.pdf
+ */
+static int gpmc_probe_8250(struct platform_device *pdev,
+                               struct device_node *child)
+{
+       struct resource res;
+       unsigned long base;
+       int ret, cs;
+
+       if (of_property_read_u32(child, "reg", &cs) < 0) {
+               dev_err(&pdev->dev, "%s has no 'reg' property\n",
+                       child->full_name);
+               return -ENODEV;
+       }
+
+       if (of_address_to_resource(child, 0, &res) < 0) {
+               dev_err(&pdev->dev, "%s has malformed 'reg' property\n",
+                       child->full_name);
+               return -ENODEV;
+       }
+
+       ret = gpmc_cs_request(cs, resource_size(&res), &base);
+       if (ret < 0) {
+               dev_err(&pdev->dev, "cannot request GPMC CS %d\n", cs);
+               return ret;
+       }
+
+       if (of_platform_device_create(child, NULL, &pdev->dev))
+               return 0;
+
+       dev_err(&pdev->dev, "failed to create gpmc child %s\n", child->name);
+
+       return -ENODEV;
+}
+
 static int gpmc_probe_dt(struct platform_device *pdev)
 {
        int ret;
@@ -1564,6 +1600,8 @@ static int gpmc_probe_dt(struct platform_device *pdev)
                else if (of_node_cmp(child->name, "ethernet") == 0 ||
                         of_node_cmp(child->name, "nor") == 0)
                        ret = gpmc_probe_generic_child(pdev, child);
+               else if (of_node_cmp(child->name, "8250") == 0)
+                       ret = gpmc_probe_8250(pdev, child);
 
                if (WARN(ret < 0, "%s: probing gpmc child %s failed\n",
                         __func__, child->full_name))
index 0289adcb6efb8dbc1f718a4e38a867afba414cfc..9428c5f9d4f2faa47e91a2caa193ecf39bba39fb 100644 (file)
@@ -18,6 +18,7 @@
 #include <linux/kernel.h>
 #include <linux/init.h>
 #include <linux/io.h>
+#include <linux/random.h>
 #include <linux/slab.h>
 
 #ifdef CONFIG_SOC_BUS
@@ -130,6 +131,17 @@ void omap_get_die_id(struct omap_die_id *odi)
        odi->id_3 = read_tap_reg(OMAP_TAP_DIE_ID_3);
 }
 
+static int __init omap_feed_randpool(void)
+{
+       struct omap_die_id odi;
+
+       /* Throw the die ID into the entropy pool at boot */
+       omap_get_die_id(&odi);
+       add_device_randomness(&odi, sizeof(odi));
+       return 0;
+}
+omap_device_initcall(omap_feed_randpool);
+
 void __init omap2xxx_check_revision(void)
 {
        int i, j;
@@ -576,8 +588,8 @@ void __init omap5xxx_check_revision(void)
        case 0xb942:
                switch (rev) {
                case 0:
-                       omap_revision = OMAP5430_REV_ES1_0;
-                       break;
+                       /* No support for ES1.0 Test chip */
+                       BUG();
                case 1:
                default:
                        omap_revision = OMAP5430_REV_ES2_0;
@@ -587,8 +599,8 @@ void __init omap5xxx_check_revision(void)
        case 0xb998:
                switch (rev) {
                case 0:
-                       omap_revision = OMAP5432_REV_ES1_0;
-                       break;
+                       /* No support for ES1.0 Test chip */
+                       BUG();
                case 1:
                default:
                        omap_revision = OMAP5432_REV_ES2_0;
index ff2113ce40141ab87001c912b3924fe1803cdec3..c90f64765a3d01b2429c2c739dccfa05b7300261 100644 (file)
@@ -594,7 +594,13 @@ void __init am43xx_init_early(void)
                                  NULL);
        omap2_set_globals_prm(AM33XX_L4_WK_IO_ADDRESS(AM43XX_PRCM_BASE));
        omap2_set_globals_cm(AM33XX_L4_WK_IO_ADDRESS(AM43XX_PRCM_BASE), NULL);
+       omap_prm_base_init();
+       omap_cm_base_init();
        omap3xxx_check_revision();
+       am43xx_powerdomains_init();
+       am43xx_clockdomains_init();
+       am43xx_hwmod_init();
+       omap_hwmod_init_postsetup();
 }
 #endif
 
index f82cf878d6af41da87b8bb444acd609105af72a9..48094b58c88f775f592d77f8403b2a1d65cf1840 100644 (file)
@@ -811,6 +811,12 @@ int __init omap_mux_late_init(void)
                }
        }
 
+       omap_mux_dbg_init();
+
+       /* see pinctrl-single-omap for the wake-up interrupt handling */
+       if (of_have_populated_dt())
+               return 0;
+
        ret = request_irq(omap_prcm_event_to_irq("io"),
                omap_hwmod_mux_handle_irq, IRQF_SHARED | IRQF_NO_SUSPEND,
                        "hwmod_io", omap_mux_late_init);
@@ -818,8 +824,6 @@ int __init omap_mux_late_init(void)
        if (ret)
                pr_warning("mux: Failed to setup hwmod io irq %d\n", ret);
 
-       omap_mux_dbg_init();
-
        return 0;
 }
 
index b970440cffca0b5484c90dd7b6e08c7caf5b6bc2..5ac122e88f678b75d6c1060783738321d8b9c579 100644 (file)
@@ -3,6 +3,8 @@
  *
  * Copyright (C) 2011 Texas Instruments, Inc.
  *     Santosh Shilimkar <santosh.shilimkar@ti.com>
+ * Copyright (C) 2012 Ivaylo Dimitrov <freemangordon@abv.bg>
+ * Copyright (C) 2013 Pali Rohár <pali.rohar@gmail.com>
  *
  *
  * This program is free software,you can redistribute it and/or modify
@@ -70,3 +72,77 @@ phys_addr_t omap_secure_ram_mempool_base(void)
 {
        return omap_secure_memblock_base;
 }
+
+/**
+ * rx51_secure_dispatcher: Routine to dispatch secure PPA API calls
+ * @idx: The PPA API index
+ * @process: Process ID
+ * @flag: The flag indicating criticality of operation
+ * @nargs: Number of valid arguments out of four.
+ * @arg1, arg2, arg3 args4: Parameters passed to secure API
+ *
+ * Return the non-zero error value on failure.
+ *
+ * NOTE: rx51_secure_dispatcher differs from omap_secure_dispatcher because
+ *       it calling omap_smc3() instead omap_smc2() and param[0] is nargs+1
+ */
+u32 rx51_secure_dispatcher(u32 idx, u32 process, u32 flag, u32 nargs,
+                          u32 arg1, u32 arg2, u32 arg3, u32 arg4)
+{
+       u32 ret;
+       u32 param[5];
+
+       param[0] = nargs+1; /* RX-51 needs number of arguments + 1 */
+       param[1] = arg1;
+       param[2] = arg2;
+       param[3] = arg3;
+       param[4] = arg4;
+
+       /*
+        * Secure API needs physical address
+        * pointer for the parameters
+        */
+       local_irq_disable();
+       local_fiq_disable();
+       flush_cache_all();
+       outer_clean_range(__pa(param), __pa(param + 5));
+       ret = omap_smc3(idx, process, flag, __pa(param));
+       flush_cache_all();
+       local_fiq_enable();
+       local_irq_enable();
+
+       return ret;
+}
+
+/**
+ * rx51_secure_update_aux_cr: Routine to modify the contents of Auxiliary Control Register
+ *  @set_bits: bits to set in ACR
+ *  @clr_bits: bits to clear in ACR
+ *
+ * Return the non-zero error value on failure.
+*/
+u32 rx51_secure_update_aux_cr(u32 set_bits, u32 clear_bits)
+{
+       u32 acr;
+
+       /* Read ACR */
+       asm volatile ("mrc p15, 0, %0, c1, c0, 1" : "=r" (acr));
+       acr &= ~clear_bits;
+       acr |= set_bits;
+
+       return rx51_secure_dispatcher(RX51_PPA_WRITE_ACR,
+                                     0,
+                                     FLAG_START_CRITICAL,
+                                     1, acr, 0, 0, 0);
+}
+
+/**
+ * rx51_secure_rng_call: Routine for HW random generator
+ */
+u32 rx51_secure_rng_call(u32 ptr, u32 count, u32 flag)
+{
+       return rx51_secure_dispatcher(RX51_PPA_HWRNG,
+                                     0,
+                                     NO_FLAG,
+                                     3, ptr, count, flag, 0);
+}
index 0e729170c46b81f2ee7a263c797853abc7d01ab3..8cc7d331437d844a3b0ba5b3d2afb844b2de5d06 100644 (file)
@@ -3,6 +3,8 @@
  *
  * Copyright (C) 2011 Texas Instruments, Inc.
  *     Santosh Shilimkar <santosh.shilimkar@ti.com>
+ * Copyright (C) 2012 Ivaylo Dimitrov <freemangordon@abv.bg>
+ * Copyright (C) 2013 Pali Rohár <pali.rohar@gmail.com>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
 #define OMAP4_MON_L2X0_AUXCTRL_INDEX   0x109
 #define OMAP4_MON_L2X0_PREFETCH_INDEX  0x113
 
+#define OMAP5_DRA7_MON_SET_CNTFRQ_INDEX        0x109
+
 /* Secure PPA(Primary Protected Application) APIs */
 #define OMAP4_PPA_L2_POR_INDEX         0x23
 #define OMAP4_PPA_CPU_ACTRL_SMP_INDEX  0x25
 
+/* Secure RX-51 PPA (Primary Protected Application) APIs */
+#define RX51_PPA_HWRNG                 29
+#define RX51_PPA_L2_INVAL              40
+#define RX51_PPA_WRITE_ACR             42
+
 #ifndef __ASSEMBLER__
 
 extern u32 omap_secure_dispatcher(u32 idx, u32 flag, u32 nargs,
                                u32 arg1, u32 arg2, u32 arg3, u32 arg4);
 extern u32 omap_smc2(u32 id, u32 falg, u32 pargs);
+extern u32 omap_smc3(u32 id, u32 process, u32 flag, u32 pargs);
 extern phys_addr_t omap_secure_ram_mempool_base(void);
 extern int omap_secure_ram_reserve_memblock(void);
 
+extern u32 rx51_secure_dispatcher(u32 idx, u32 process, u32 flag, u32 nargs,
+                                 u32 arg1, u32 arg2, u32 arg3, u32 arg4);
+extern u32 rx51_secure_update_aux_cr(u32 set_bits, u32 clear_bits);
+extern u32 rx51_secure_rng_call(u32 ptr, u32 count, u32 flag);
+
 #ifdef CONFIG_OMAP4_ERRATA_I688
 extern int omap_barrier_reserve_memblock(void);
 #else
 static inline void omap_barrier_reserve_memblock(void)
 { }
 #endif
+
+void set_cntfreq(void);
 #endif /* __ASSEMBLER__ */
 #endif /* OMAP_ARCH_OMAP_SECURE_H */
index f6441c13cd8ce35ba78fb526f2a33d1123064f91..fd90125bffc70ad6719bfc2b9f3e22d21b595367 100644 (file)
@@ -1,9 +1,11 @@
 /*
- * OMAP44xx secure APIs file.
+ * OMAP34xx and OMAP44xx secure APIs file.
  *
  * Copyright (C) 2010 Texas Instruments, Inc.
  * Written by Santosh Shilimkar <santosh.shilimkar@ti.com>
  *
+ * Copyright (C) 2012 Ivaylo Dimitrov <freemangordon@abv.bg>
+ * Copyright (C) 2013 Pali Rohár <pali.rohar@gmail.com>
  *
  * This program is free software,you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
@@ -54,6 +56,23 @@ ENTRY(omap_smc2)
        ldmfd   sp!, {r4-r12, pc}
 ENDPROC(omap_smc2)
 
+/**
+ * u32 omap_smc3(u32 service_id, u32 process_id, u32 flag, u32 pargs)
+ * Low level common routine for secure HAL and PPA APIs via smc #1
+ * r0 - @service_id: Secure Service ID
+ * r1 - @process_id: Process ID
+ * r2 - @flag: Flag to indicate the criticality of operation
+ * r3 - @pargs: Physical address of parameter list
+ */
+ENTRY(omap_smc3)
+       stmfd   sp!, {r4-r11, lr}
+       mov     r12, r0         @ Copy the secure service ID
+       mov     r6, #0xff       @ Indicate new Task call
+       dsb                     @ Memory Barrier (not sure if needed, copied from omap_smc2)
+       smc     #1              @ Call PPA service
+       ldmfd   sp!, {r4-r11, pc}
+ENDPROC(omap_smc3)
+
 ENTRY(omap_modify_auxcoreboot0)
        stmfd   sp!, {r1-r12, lr}
        ldr     r12, =0x104
index 89121109329533b917561f4da6ce4b335872f4c4..75e95d4fb448cdc3747323576e1c3ea800a3886e 100644 (file)
@@ -65,6 +65,13 @@ static void omap4_secondary_init(unsigned int cpu)
                omap_secure_dispatcher(OMAP4_PPA_CPU_ACTRL_SMP_INDEX,
                                                        4, 0, 0, 0, 0, 0);
 
+       /*
+        * Configure the CNTFRQ register for the secondary cpu's which
+        * indicates the frequency of the cpu local timers.
+        */
+       if (soc_is_omap54xx() || soc_is_dra7xx())
+               set_cntfreq();
+
        /*
         * Synchronise with the boot thread.
         */
index d9ee0ff094d4bcfdd395131601664be618367073..e3f0ecaf87dd76c3b075c389173ac89faff04a6a 100644 (file)
@@ -2357,25 +2357,29 @@ static struct device_node *of_dev_hwmod_lookup(struct device_node *np,
 /**
  * _init_mpu_rt_base - populate the virtual address for a hwmod
  * @oh: struct omap_hwmod * to locate the virtual address
+ * @data: (unused, caller should pass NULL)
+ * @np: struct device_node * of the IP block's device node in the DT data
  *
  * Cache the virtual address used by the MPU to access this IP block's
  * registers.  This address is needed early so the OCP registers that
  * are part of the device's address space can be ioremapped properly.
- * No return value.
+ *
+ * Returns 0 on success, -EINVAL if an invalid hwmod is passed, and
+ * -ENXIO on absent or invalid register target address space.
  */
-static void __init _init_mpu_rt_base(struct omap_hwmod *oh, void *data)
+static int __init _init_mpu_rt_base(struct omap_hwmod *oh, void *data,
+                                   struct device_node *np)
 {
        struct omap_hwmod_addr_space *mem;
        void __iomem *va_start = NULL;
-       struct device_node *np;
 
        if (!oh)
-               return;
+               return -EINVAL;
 
        _save_mpu_port_index(oh);
 
        if (oh->_int_flags & _HWMOD_NO_MPU_PORT)
-               return;
+               return -ENXIO;
 
        mem = _find_mpu_rt_addr_space(oh);
        if (!mem) {
@@ -2383,25 +2387,24 @@ static void __init _init_mpu_rt_base(struct omap_hwmod *oh, void *data)
                         oh->name);
 
                /* Extract the IO space from device tree blob */
-               if (!of_have_populated_dt())
-                       return;
+               if (!np)
+                       return -ENXIO;
 
-               np = of_dev_hwmod_lookup(of_find_node_by_name(NULL, "ocp"), oh);
-               if (np)
-                       va_start = of_iomap(np, oh->mpu_rt_idx);
+               va_start = of_iomap(np, oh->mpu_rt_idx);
        } else {
                va_start = ioremap(mem->pa_start, mem->pa_end - mem->pa_start);
        }
 
        if (!va_start) {
                pr_err("omap_hwmod: %s: Could not ioremap\n", oh->name);
-               return;
+               return -ENXIO;
        }
 
        pr_debug("omap_hwmod: %s: MPU register target at va %p\n",
                 oh->name, va_start);
 
        oh->_mpu_rt_va = va_start;
+       return 0;
 }
 
 /**
@@ -2414,18 +2417,28 @@ static void __init _init_mpu_rt_base(struct omap_hwmod *oh, void *data)
  * registered at this point.  This is the first of two phases for
  * hwmod initialization.  Code called here does not touch any hardware
  * registers, it simply prepares internal data structures.  Returns 0
- * upon success or if the hwmod isn't registered, or -EINVAL upon
- * failure.
+ * upon success or if the hwmod isn't registered or if the hwmod's
+ * address space is not defined, or -EINVAL upon failure.
  */
 static int __init _init(struct omap_hwmod *oh, void *data)
 {
        int r;
+       struct device_node *np = NULL;
 
        if (oh->_state != _HWMOD_STATE_REGISTERED)
                return 0;
 
-       if (oh->class->sysc)
-               _init_mpu_rt_base(oh, NULL);
+       if (of_have_populated_dt())
+               np = of_dev_hwmod_lookup(of_find_node_by_name(NULL, "ocp"), oh);
+
+       if (oh->class->sysc) {
+               r = _init_mpu_rt_base(oh, NULL, np);
+               if (r < 0) {
+                       WARN(1, "omap_hwmod: %s: doesn't have mpu register target base\n",
+                            oh->name);
+                       return 0;
+               }
+       }
 
        r = _init_clocks(oh, NULL);
        if (r < 0) {
@@ -2433,6 +2446,12 @@ static int __init _init(struct omap_hwmod *oh, void *data)
                return -EINVAL;
        }
 
+       if (np)
+               if (of_find_property(np, "ti,no-reset-on-init", NULL))
+                       oh->flags |= HWMOD_INIT_NO_RESET;
+               if (of_find_property(np, "ti,no-idle-on-init", NULL))
+                       oh->flags |= HWMOD_INIT_NO_IDLE;
+
        oh->_state = _HWMOD_STATE_INITIALIZED;
 
        return 0;
@@ -4125,6 +4144,14 @@ void __init omap_hwmod_init(void)
                soc_ops.init_clkdm = _init_clkdm;
                soc_ops.update_context_lost = _omap4_update_context_lost;
                soc_ops.get_context_lost = _omap4_get_context_lost;
+       } else if (soc_is_am43xx()) {
+               soc_ops.enable_module = _omap4_enable_module;
+               soc_ops.disable_module = _omap4_disable_module;
+               soc_ops.wait_target_ready = _omap4_wait_target_ready;
+               soc_ops.assert_hardreset = _omap4_assert_hardreset;
+               soc_ops.deassert_hardreset = _omap4_deassert_hardreset;
+               soc_ops.is_hardreset_asserted = _omap4_is_hardreset_asserted;
+               soc_ops.init_clkdm = _init_clkdm;
        } else if (soc_is_am33xx()) {
                soc_ops.enable_module = _am33xx_enable_module;
                soc_ops.disable_module = _am33xx_disable_module;
index d02acf9308d3acc7deb06a42a830323774097572..0f97d635ff90db413b27168fefeecf039a934159 100644 (file)
@@ -752,6 +752,7 @@ extern int omap44xx_hwmod_init(void);
 extern int omap54xx_hwmod_init(void);
 extern int am33xx_hwmod_init(void);
 extern int dra7xx_hwmod_init(void);
+int am43xx_hwmod_init(void);
 
 extern int __init omap_hwmod_register_links(struct omap_hwmod_ocp_if **ois);
 
diff --git a/arch/arm/mach-omap2/omap_hwmod_33xx_43xx_common_data.h b/arch/arm/mach-omap2/omap_hwmod_33xx_43xx_common_data.h
new file mode 100644 (file)
index 0000000..130332c
--- /dev/null
@@ -0,0 +1,163 @@
+/*
+ *
+ * Copyright (C) 2013 Texas Instruments Incorporated
+ *
+ * Data common for AM335x and AM43x
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation version 2.
+ *
+ * This program is distributed "as is" WITHOUT ANY WARRANTY of any
+ * kind, whether express or implied; without even the implied warranty
+ * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+
+#ifndef __ARCH_ARM_MACH_OMAP2_OMAP_HWMOD_33XX_43XX_COMMON_DATA_H
+#define __ARCH_ARM_MACH_OMAP2_OMAP_HWMOD_33XX_43XX_COMMON_DATA_H
+
+extern struct omap_hwmod_ocp_if am33xx_mpu__l3_main;
+extern struct omap_hwmod_ocp_if am33xx_l3_main__l3_s;
+extern struct omap_hwmod_ocp_if am33xx_l3_s__l4_ls;
+extern struct omap_hwmod_ocp_if am33xx_l3_s__l4_wkup;
+extern struct omap_hwmod_ocp_if am33xx_l3_main__l3_instr;
+extern struct omap_hwmod_ocp_if am33xx_mpu__prcm;
+extern struct omap_hwmod_ocp_if am33xx_l3_s__l3_main;
+extern struct omap_hwmod_ocp_if am33xx_pruss__l3_main;
+extern struct omap_hwmod_ocp_if am33xx_gfx__l3_main;
+extern struct omap_hwmod_ocp_if am33xx_l3_main__gfx;
+extern struct omap_hwmod_ocp_if am33xx_l4_wkup__rtc;
+extern struct omap_hwmod_ocp_if am33xx_l4_per__dcan0;
+extern struct omap_hwmod_ocp_if am33xx_l4_per__dcan1;
+extern struct omap_hwmod_ocp_if am33xx_l4_per__gpio1;
+extern struct omap_hwmod_ocp_if am33xx_l4_per__gpio2;
+extern struct omap_hwmod_ocp_if am33xx_l4_per__gpio3;
+extern struct omap_hwmod_ocp_if am33xx_cpgmac0__mdio;
+extern struct omap_hwmod_ocp_if am33xx_l4_ls__elm;
+extern struct omap_hwmod_ocp_if am33xx_l4_ls__epwmss0;
+extern struct omap_hwmod_ocp_if am33xx_epwmss0__ecap0;
+extern struct omap_hwmod_ocp_if am33xx_epwmss0__eqep0;
+extern struct omap_hwmod_ocp_if am33xx_epwmss0__ehrpwm0;
+extern struct omap_hwmod_ocp_if am33xx_l4_ls__epwmss1;
+extern struct omap_hwmod_ocp_if am33xx_epwmss1__ecap1;
+extern struct omap_hwmod_ocp_if am33xx_epwmss1__eqep1;
+extern struct omap_hwmod_ocp_if am33xx_epwmss1__ehrpwm1;
+extern struct omap_hwmod_ocp_if am33xx_l4_ls__epwmss2;
+extern struct omap_hwmod_ocp_if am33xx_epwmss2__ecap2;
+extern struct omap_hwmod_ocp_if am33xx_epwmss2__eqep2;
+extern struct omap_hwmod_ocp_if am33xx_epwmss2__ehrpwm2;
+extern struct omap_hwmod_ocp_if am33xx_l3_s__gpmc;
+extern struct omap_hwmod_ocp_if am33xx_l4_per__i2c2;
+extern struct omap_hwmod_ocp_if am33xx_l4_per__i2c3;
+extern struct omap_hwmod_ocp_if am33xx_l4_per__mailbox;
+extern struct omap_hwmod_ocp_if am33xx_l4_ls__spinlock;
+extern struct omap_hwmod_ocp_if am33xx_l4_ls__mcasp0;
+extern struct omap_hwmod_ocp_if am33xx_l4_ls__mcasp1;
+extern struct omap_hwmod_ocp_if am33xx_l4_ls__mmc0;
+extern struct omap_hwmod_ocp_if am33xx_l4_ls__mmc1;
+extern struct omap_hwmod_ocp_if am33xx_l3_s__mmc2;
+extern struct omap_hwmod_ocp_if am33xx_l4_ls__mcspi0;
+extern struct omap_hwmod_ocp_if am33xx_l4_ls__mcspi1;
+extern struct omap_hwmod_ocp_if am33xx_l4_ls__timer2;
+extern struct omap_hwmod_ocp_if am33xx_l4_ls__timer3;
+extern struct omap_hwmod_ocp_if am33xx_l4_ls__timer4;
+extern struct omap_hwmod_ocp_if am33xx_l4_ls__timer5;
+extern struct omap_hwmod_ocp_if am33xx_l4_ls__timer6;
+extern struct omap_hwmod_ocp_if am33xx_l4_ls__timer7;
+extern struct omap_hwmod_ocp_if am33xx_l3_main__tpcc;
+extern struct omap_hwmod_ocp_if am33xx_l3_main__tptc0;
+extern struct omap_hwmod_ocp_if am33xx_l3_main__tptc1;
+extern struct omap_hwmod_ocp_if am33xx_l3_main__tptc2;
+extern struct omap_hwmod_ocp_if am33xx_l4_ls__uart2;
+extern struct omap_hwmod_ocp_if am33xx_l4_ls__uart3;
+extern struct omap_hwmod_ocp_if am33xx_l4_ls__uart4;
+extern struct omap_hwmod_ocp_if am33xx_l4_ls__uart5;
+extern struct omap_hwmod_ocp_if am33xx_l4_ls__uart6;
+extern struct omap_hwmod_ocp_if am33xx_l3_main__ocmc;
+extern struct omap_hwmod_ocp_if am33xx_l3_main__sha0;
+extern struct omap_hwmod_ocp_if am33xx_l3_main__aes0;
+
+extern struct omap_hwmod am33xx_l3_main_hwmod;
+extern struct omap_hwmod am33xx_l3_s_hwmod;
+extern struct omap_hwmod am33xx_l3_instr_hwmod;
+extern struct omap_hwmod am33xx_l4_ls_hwmod;
+extern struct omap_hwmod am33xx_l4_wkup_hwmod;
+extern struct omap_hwmod am33xx_mpu_hwmod;
+extern struct omap_hwmod am33xx_pruss_hwmod;
+extern struct omap_hwmod am33xx_gfx_hwmod;
+extern struct omap_hwmod am33xx_prcm_hwmod;
+extern struct omap_hwmod am33xx_aes0_hwmod;
+extern struct omap_hwmod am33xx_sha0_hwmod;
+extern struct omap_hwmod am33xx_ocmcram_hwmod;
+extern struct omap_hwmod am33xx_smartreflex0_hwmod;
+extern struct omap_hwmod am33xx_smartreflex1_hwmod;
+extern struct omap_hwmod am33xx_cpgmac0_hwmod;
+extern struct omap_hwmod am33xx_mdio_hwmod;
+extern struct omap_hwmod am33xx_dcan0_hwmod;
+extern struct omap_hwmod am33xx_dcan1_hwmod;
+extern struct omap_hwmod am33xx_elm_hwmod;
+extern struct omap_hwmod am33xx_epwmss0_hwmod;
+extern struct omap_hwmod am33xx_ecap0_hwmod;
+extern struct omap_hwmod am33xx_eqep0_hwmod;
+extern struct omap_hwmod am33xx_ehrpwm0_hwmod;
+extern struct omap_hwmod am33xx_epwmss1_hwmod;
+extern struct omap_hwmod am33xx_ecap1_hwmod;
+extern struct omap_hwmod am33xx_eqep1_hwmod;
+extern struct omap_hwmod am33xx_ehrpwm1_hwmod;
+extern struct omap_hwmod am33xx_epwmss2_hwmod;
+extern struct omap_hwmod am33xx_ecap2_hwmod;
+extern struct omap_hwmod am33xx_eqep2_hwmod;
+extern struct omap_hwmod am33xx_ehrpwm2_hwmod;
+extern struct omap_hwmod am33xx_gpio1_hwmod;
+extern struct omap_hwmod am33xx_gpio2_hwmod;
+extern struct omap_hwmod am33xx_gpio3_hwmod;
+extern struct omap_hwmod am33xx_gpmc_hwmod;
+extern struct omap_hwmod am33xx_i2c1_hwmod;
+extern struct omap_hwmod am33xx_i2c2_hwmod;
+extern struct omap_hwmod am33xx_i2c3_hwmod;
+extern struct omap_hwmod am33xx_mailbox_hwmod;
+extern struct omap_hwmod am33xx_mcasp0_hwmod;
+extern struct omap_hwmod am33xx_mcasp1_hwmod;
+extern struct omap_hwmod am33xx_mmc0_hwmod;
+extern struct omap_hwmod am33xx_mmc1_hwmod;
+extern struct omap_hwmod am33xx_mmc2_hwmod;
+extern struct omap_hwmod am33xx_rtc_hwmod;
+extern struct omap_hwmod am33xx_spi0_hwmod;
+extern struct omap_hwmod am33xx_spi1_hwmod;
+extern struct omap_hwmod am33xx_spinlock_hwmod;
+extern struct omap_hwmod am33xx_timer1_hwmod;
+extern struct omap_hwmod am33xx_timer2_hwmod;
+extern struct omap_hwmod am33xx_timer3_hwmod;
+extern struct omap_hwmod am33xx_timer4_hwmod;
+extern struct omap_hwmod am33xx_timer5_hwmod;
+extern struct omap_hwmod am33xx_timer6_hwmod;
+extern struct omap_hwmod am33xx_timer7_hwmod;
+extern struct omap_hwmod am33xx_tpcc_hwmod;
+extern struct omap_hwmod am33xx_tptc0_hwmod;
+extern struct omap_hwmod am33xx_tptc1_hwmod;
+extern struct omap_hwmod am33xx_tptc2_hwmod;
+extern struct omap_hwmod am33xx_uart1_hwmod;
+extern struct omap_hwmod am33xx_uart2_hwmod;
+extern struct omap_hwmod am33xx_uart3_hwmod;
+extern struct omap_hwmod am33xx_uart4_hwmod;
+extern struct omap_hwmod am33xx_uart5_hwmod;
+extern struct omap_hwmod am33xx_uart6_hwmod;
+extern struct omap_hwmod am33xx_wd_timer1_hwmod;
+
+extern struct omap_hwmod_class am33xx_l4_hwmod_class;
+extern struct omap_hwmod_class am33xx_wkup_m3_hwmod_class;
+extern struct omap_hwmod_class am33xx_control_hwmod_class;
+extern struct omap_hwmod_class am33xx_gpio_hwmod_class;
+extern struct omap_hwmod_class am33xx_timer_hwmod_class;
+extern struct omap_hwmod_class am33xx_epwmss_hwmod_class;
+extern struct omap_hwmod_class am33xx_ehrpwm_hwmod_class;
+extern struct omap_hwmod_class am33xx_spi_hwmod_class;
+
+extern struct omap_gpio_dev_attr gpio_dev_attr;
+extern struct omap2_mcspi_dev_attr mcspi_attrib;
+
+void omap_hwmod_am33xx_reg(void);
+void omap_hwmod_am43xx_reg(void);
+
+#endif
diff --git a/arch/arm/mach-omap2/omap_hwmod_33xx_43xx_interconnect_data.c b/arch/arm/mach-omap2/omap_hwmod_33xx_43xx_interconnect_data.c
new file mode 100644 (file)
index 0000000..e2db378
--- /dev/null
@@ -0,0 +1,643 @@
+/*
+ *
+ * Copyright (C) 2013 Texas Instruments Incorporated
+ *
+ * Interconnects common for AM335x and AM43x
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation version 2.
+ *
+ * This program is distributed "as is" WITHOUT ANY WARRANTY of any
+ * kind, whether express or implied; without even the implied warranty
+ * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+
+#include <linux/sizes.h>
+#include "omap_hwmod.h"
+#include "omap_hwmod_33xx_43xx_common_data.h"
+
+/* mpu -> l3 main */
+struct omap_hwmod_ocp_if am33xx_mpu__l3_main = {
+       .master         = &am33xx_mpu_hwmod,
+       .slave          = &am33xx_l3_main_hwmod,
+       .clk            = "dpll_mpu_m2_ck",
+       .user           = OCP_USER_MPU,
+};
+
+/* l3 main -> l3 s */
+struct omap_hwmod_ocp_if am33xx_l3_main__l3_s = {
+       .master         = &am33xx_l3_main_hwmod,
+       .slave          = &am33xx_l3_s_hwmod,
+       .clk            = "l3s_gclk",
+       .user           = OCP_USER_MPU | OCP_USER_SDMA,
+};
+
+/* l3 s -> l4 per/ls */
+struct omap_hwmod_ocp_if am33xx_l3_s__l4_ls = {
+       .master         = &am33xx_l3_s_hwmod,
+       .slave          = &am33xx_l4_ls_hwmod,
+       .clk            = "l3s_gclk",
+       .user           = OCP_USER_MPU | OCP_USER_SDMA,
+};
+
+/* l3 s -> l4 wkup */
+struct omap_hwmod_ocp_if am33xx_l3_s__l4_wkup = {
+       .master         = &am33xx_l3_s_hwmod,
+       .slave          = &am33xx_l4_wkup_hwmod,
+       .clk            = "l3s_gclk",
+       .user           = OCP_USER_MPU | OCP_USER_SDMA,
+};
+
+/* l3 main -> l3 instr */
+struct omap_hwmod_ocp_if am33xx_l3_main__l3_instr = {
+       .master         = &am33xx_l3_main_hwmod,
+       .slave          = &am33xx_l3_instr_hwmod,
+       .clk            = "l3s_gclk",
+       .user           = OCP_USER_MPU | OCP_USER_SDMA,
+};
+
+/* mpu -> prcm */
+struct omap_hwmod_ocp_if am33xx_mpu__prcm = {
+       .master         = &am33xx_mpu_hwmod,
+       .slave          = &am33xx_prcm_hwmod,
+       .clk            = "dpll_mpu_m2_ck",
+       .user           = OCP_USER_MPU | OCP_USER_SDMA,
+};
+
+/* l3 s -> l3 main*/
+struct omap_hwmod_ocp_if am33xx_l3_s__l3_main = {
+       .master         = &am33xx_l3_s_hwmod,
+       .slave          = &am33xx_l3_main_hwmod,
+       .clk            = "l3s_gclk",
+       .user           = OCP_USER_MPU | OCP_USER_SDMA,
+};
+
+/* pru-icss -> l3 main */
+struct omap_hwmod_ocp_if am33xx_pruss__l3_main = {
+       .master         = &am33xx_pruss_hwmod,
+       .slave          = &am33xx_l3_main_hwmod,
+       .clk            = "l3_gclk",
+       .user           = OCP_USER_MPU | OCP_USER_SDMA,
+};
+
+/* gfx -> l3 main */
+struct omap_hwmod_ocp_if am33xx_gfx__l3_main = {
+       .master         = &am33xx_gfx_hwmod,
+       .slave          = &am33xx_l3_main_hwmod,
+       .clk            = "dpll_core_m4_ck",
+       .user           = OCP_USER_MPU | OCP_USER_SDMA,
+};
+
+/* l3 main -> gfx */
+struct omap_hwmod_ocp_if am33xx_l3_main__gfx = {
+       .master         = &am33xx_l3_main_hwmod,
+       .slave          = &am33xx_gfx_hwmod,
+       .clk            = "dpll_core_m4_ck",
+       .user           = OCP_USER_MPU | OCP_USER_SDMA,
+};
+
+/* l4 wkup -> rtc */
+struct omap_hwmod_ocp_if am33xx_l4_wkup__rtc = {
+       .master         = &am33xx_l4_wkup_hwmod,
+       .slave          = &am33xx_rtc_hwmod,
+       .clk            = "clkdiv32k_ick",
+       .user           = OCP_USER_MPU,
+};
+
+/* l4 per/ls -> DCAN0 */
+struct omap_hwmod_ocp_if am33xx_l4_per__dcan0 = {
+       .master         = &am33xx_l4_ls_hwmod,
+       .slave          = &am33xx_dcan0_hwmod,
+       .clk            = "l4ls_gclk",
+       .user           = OCP_USER_MPU | OCP_USER_SDMA,
+};
+
+/* l4 per/ls -> DCAN1 */
+struct omap_hwmod_ocp_if am33xx_l4_per__dcan1 = {
+       .master         = &am33xx_l4_ls_hwmod,
+       .slave          = &am33xx_dcan1_hwmod,
+       .clk            = "l4ls_gclk",
+       .user           = OCP_USER_MPU | OCP_USER_SDMA,
+};
+
+/* l4 per/ls -> GPIO2 */
+struct omap_hwmod_ocp_if am33xx_l4_per__gpio1 = {
+       .master         = &am33xx_l4_ls_hwmod,
+       .slave          = &am33xx_gpio1_hwmod,
+       .clk            = "l4ls_gclk",
+       .user           = OCP_USER_MPU | OCP_USER_SDMA,
+};
+
+/* l4 per/ls -> gpio3 */
+struct omap_hwmod_ocp_if am33xx_l4_per__gpio2 = {
+       .master         = &am33xx_l4_ls_hwmod,
+       .slave          = &am33xx_gpio2_hwmod,
+       .clk            = "l4ls_gclk",
+       .user           = OCP_USER_MPU | OCP_USER_SDMA,
+};
+
+/* l4 per/ls -> gpio4 */
+struct omap_hwmod_ocp_if am33xx_l4_per__gpio3 = {
+       .master         = &am33xx_l4_ls_hwmod,
+       .slave          = &am33xx_gpio3_hwmod,
+       .clk            = "l4ls_gclk",
+       .user           = OCP_USER_MPU | OCP_USER_SDMA,
+};
+
+struct omap_hwmod_ocp_if am33xx_cpgmac0__mdio = {
+       .master         = &am33xx_cpgmac0_hwmod,
+       .slave          = &am33xx_mdio_hwmod,
+       .user           = OCP_USER_MPU,
+};
+
+static struct omap_hwmod_addr_space am33xx_elm_addr_space[] = {
+       {
+               .pa_start       = 0x48080000,
+               .pa_end         = 0x48080000 + SZ_8K - 1,
+               .flags          = ADDR_TYPE_RT
+       },
+       { }
+};
+
+struct omap_hwmod_ocp_if am33xx_l4_ls__elm = {
+       .master         = &am33xx_l4_ls_hwmod,
+       .slave          = &am33xx_elm_hwmod,
+       .clk            = "l4ls_gclk",
+       .addr           = am33xx_elm_addr_space,
+       .user           = OCP_USER_MPU,
+};
+
+static struct omap_hwmod_addr_space am33xx_epwmss0_addr_space[] = {
+       {
+               .pa_start       = 0x48300000,
+               .pa_end         = 0x48300000 + SZ_16 - 1,
+               .flags          = ADDR_TYPE_RT
+       },
+       { }
+};
+
+struct omap_hwmod_ocp_if am33xx_l4_ls__epwmss0 = {
+       .master         = &am33xx_l4_ls_hwmod,
+       .slave          = &am33xx_epwmss0_hwmod,
+       .clk            = "l4ls_gclk",
+       .addr           = am33xx_epwmss0_addr_space,
+       .user           = OCP_USER_MPU,
+};
+
+struct omap_hwmod_ocp_if am33xx_epwmss0__ecap0 = {
+       .master         = &am33xx_epwmss0_hwmod,
+       .slave          = &am33xx_ecap0_hwmod,
+       .clk            = "l4ls_gclk",
+       .user           = OCP_USER_MPU,
+};
+
+struct omap_hwmod_ocp_if am33xx_epwmss0__eqep0 = {
+       .master         = &am33xx_epwmss0_hwmod,
+       .slave          = &am33xx_eqep0_hwmod,
+       .clk            = "l4ls_gclk",
+       .user           = OCP_USER_MPU,
+};
+
+struct omap_hwmod_ocp_if am33xx_epwmss0__ehrpwm0 = {
+       .master         = &am33xx_epwmss0_hwmod,
+       .slave          = &am33xx_ehrpwm0_hwmod,
+       .clk            = "l4ls_gclk",
+       .user           = OCP_USER_MPU,
+};
+
+
+static struct omap_hwmod_addr_space am33xx_epwmss1_addr_space[] = {
+       {
+               .pa_start       = 0x48302000,
+               .pa_end         = 0x48302000 + SZ_16 - 1,
+               .flags          = ADDR_TYPE_RT
+       },
+       { }
+};
+
+struct omap_hwmod_ocp_if am33xx_l4_ls__epwmss1 = {
+       .master         = &am33xx_l4_ls_hwmod,
+       .slave          = &am33xx_epwmss1_hwmod,
+       .clk            = "l4ls_gclk",
+       .addr           = am33xx_epwmss1_addr_space,
+       .user           = OCP_USER_MPU,
+};
+
+struct omap_hwmod_ocp_if am33xx_epwmss1__ecap1 = {
+       .master         = &am33xx_epwmss1_hwmod,
+       .slave          = &am33xx_ecap1_hwmod,
+       .clk            = "l4ls_gclk",
+       .user           = OCP_USER_MPU,
+};
+
+struct omap_hwmod_ocp_if am33xx_epwmss1__eqep1 = {
+       .master         = &am33xx_epwmss1_hwmod,
+       .slave          = &am33xx_eqep1_hwmod,
+       .clk            = "l4ls_gclk",
+       .user           = OCP_USER_MPU,
+};
+
+struct omap_hwmod_ocp_if am33xx_epwmss1__ehrpwm1 = {
+       .master         = &am33xx_epwmss1_hwmod,
+       .slave          = &am33xx_ehrpwm1_hwmod,
+       .clk            = "l4ls_gclk",
+       .user           = OCP_USER_MPU,
+};
+
+static struct omap_hwmod_addr_space am33xx_epwmss2_addr_space[] = {
+       {
+               .pa_start       = 0x48304000,
+               .pa_end         = 0x48304000 + SZ_16 - 1,
+               .flags          = ADDR_TYPE_RT
+       },
+       { }
+};
+
+struct omap_hwmod_ocp_if am33xx_l4_ls__epwmss2 = {
+       .master         = &am33xx_l4_ls_hwmod,
+       .slave          = &am33xx_epwmss2_hwmod,
+       .clk            = "l4ls_gclk",
+       .addr           = am33xx_epwmss2_addr_space,
+       .user           = OCP_USER_MPU,
+};
+
+struct omap_hwmod_ocp_if am33xx_epwmss2__ecap2 = {
+       .master         = &am33xx_epwmss2_hwmod,
+       .slave          = &am33xx_ecap2_hwmod,
+       .clk            = "l4ls_gclk",
+       .user           = OCP_USER_MPU,
+};
+
+struct omap_hwmod_ocp_if am33xx_epwmss2__eqep2 = {
+       .master         = &am33xx_epwmss2_hwmod,
+       .slave          = &am33xx_eqep2_hwmod,
+       .clk            = "l4ls_gclk",
+       .user           = OCP_USER_MPU,
+};
+
+struct omap_hwmod_ocp_if am33xx_epwmss2__ehrpwm2 = {
+       .master         = &am33xx_epwmss2_hwmod,
+       .slave          = &am33xx_ehrpwm2_hwmod,
+       .clk            = "l4ls_gclk",
+       .user           = OCP_USER_MPU,
+};
+
+/* l3s cfg -> gpmc */
+static struct omap_hwmod_addr_space am33xx_gpmc_addr_space[] = {
+       {
+               .pa_start       = 0x50000000,
+               .pa_end         = 0x50000000 + SZ_8K - 1,
+               .flags          = ADDR_TYPE_RT,
+       },
+       { }
+};
+
+struct omap_hwmod_ocp_if am33xx_l3_s__gpmc = {
+       .master         = &am33xx_l3_s_hwmod,
+       .slave          = &am33xx_gpmc_hwmod,
+       .clk            = "l3s_gclk",
+       .addr           = am33xx_gpmc_addr_space,
+       .user           = OCP_USER_MPU,
+};
+
+/* i2c2 */
+struct omap_hwmod_ocp_if am33xx_l4_per__i2c2 = {
+       .master         = &am33xx_l4_ls_hwmod,
+       .slave          = &am33xx_i2c2_hwmod,
+       .clk            = "l4ls_gclk",
+       .user           = OCP_USER_MPU,
+};
+
+struct omap_hwmod_ocp_if am33xx_l4_per__i2c3 = {
+       .master         = &am33xx_l4_ls_hwmod,
+       .slave          = &am33xx_i2c3_hwmod,
+       .clk            = "l4ls_gclk",
+       .user           = OCP_USER_MPU,
+};
+
+static struct omap_hwmod_addr_space am33xx_mailbox_addrs[] = {
+       {
+               .pa_start       = 0x480C8000,
+               .pa_end         = 0x480C8000 + (SZ_4K - 1),
+               .flags          = ADDR_TYPE_RT
+       },
+       { }
+};
+
+/* l4 ls -> mailbox */
+struct omap_hwmod_ocp_if am33xx_l4_per__mailbox = {
+       .master         = &am33xx_l4_ls_hwmod,
+       .slave          = &am33xx_mailbox_hwmod,
+       .clk            = "l4ls_gclk",
+       .addr           = am33xx_mailbox_addrs,
+       .user           = OCP_USER_MPU,
+};
+
+/* l4 ls -> spinlock */
+struct omap_hwmod_ocp_if am33xx_l4_ls__spinlock = {
+       .master         = &am33xx_l4_ls_hwmod,
+       .slave          = &am33xx_spinlock_hwmod,
+       .clk            = "l4ls_gclk",
+       .user           = OCP_USER_MPU,
+};
+
+/* l4 ls -> mcasp0 */
+static struct omap_hwmod_addr_space am33xx_mcasp0_addr_space[] = {
+       {
+               .pa_start       = 0x48038000,
+               .pa_end         = 0x48038000 + SZ_8K - 1,
+               .flags          = ADDR_TYPE_RT
+       },
+       { }
+};
+
+struct omap_hwmod_ocp_if am33xx_l4_ls__mcasp0 = {
+       .master         = &am33xx_l4_ls_hwmod,
+       .slave          = &am33xx_mcasp0_hwmod,
+       .clk            = "l4ls_gclk",
+       .addr           = am33xx_mcasp0_addr_space,
+       .user           = OCP_USER_MPU,
+};
+
+/* l4 ls -> mcasp1 */
+static struct omap_hwmod_addr_space am33xx_mcasp1_addr_space[] = {
+       {
+               .pa_start       = 0x4803C000,
+               .pa_end         = 0x4803C000 + SZ_8K - 1,
+               .flags          = ADDR_TYPE_RT
+       },
+       { }
+};
+
+struct omap_hwmod_ocp_if am33xx_l4_ls__mcasp1 = {
+       .master         = &am33xx_l4_ls_hwmod,
+       .slave          = &am33xx_mcasp1_hwmod,
+       .clk            = "l4ls_gclk",
+       .addr           = am33xx_mcasp1_addr_space,
+       .user           = OCP_USER_MPU,
+};
+
+/* l4 ls -> mmc0 */
+static struct omap_hwmod_addr_space am33xx_mmc0_addr_space[] = {
+       {
+               .pa_start       = 0x48060100,
+               .pa_end         = 0x48060100 + SZ_4K - 1,
+               .flags          = ADDR_TYPE_RT,
+       },
+       { }
+};
+
+struct omap_hwmod_ocp_if am33xx_l4_ls__mmc0 = {
+       .master         = &am33xx_l4_ls_hwmod,
+       .slave          = &am33xx_mmc0_hwmod,
+       .clk            = "l4ls_gclk",
+       .addr           = am33xx_mmc0_addr_space,
+       .user           = OCP_USER_MPU,
+};
+
+/* l4 ls -> mmc1 */
+static struct omap_hwmod_addr_space am33xx_mmc1_addr_space[] = {
+       {
+               .pa_start       = 0x481d8100,
+               .pa_end         = 0x481d8100 + SZ_4K - 1,
+               .flags          = ADDR_TYPE_RT,
+       },
+       { }
+};
+
+struct omap_hwmod_ocp_if am33xx_l4_ls__mmc1 = {
+       .master         = &am33xx_l4_ls_hwmod,
+       .slave          = &am33xx_mmc1_hwmod,
+       .clk            = "l4ls_gclk",
+       .addr           = am33xx_mmc1_addr_space,
+       .user           = OCP_USER_MPU,
+};
+
+/* l3 s -> mmc2 */
+static struct omap_hwmod_addr_space am33xx_mmc2_addr_space[] = {
+       {
+               .pa_start       = 0x47810100,
+               .pa_end         = 0x47810100 + SZ_64K - 1,
+               .flags          = ADDR_TYPE_RT,
+       },
+       { }
+};
+
+struct omap_hwmod_ocp_if am33xx_l3_s__mmc2 = {
+       .master         = &am33xx_l3_s_hwmod,
+       .slave          = &am33xx_mmc2_hwmod,
+       .clk            = "l3s_gclk",
+       .addr           = am33xx_mmc2_addr_space,
+       .user           = OCP_USER_MPU,
+};
+
+/* l4 ls -> mcspi0 */
+struct omap_hwmod_ocp_if am33xx_l4_ls__mcspi0 = {
+       .master         = &am33xx_l4_ls_hwmod,
+       .slave          = &am33xx_spi0_hwmod,
+       .clk            = "l4ls_gclk",
+       .user           = OCP_USER_MPU,
+};
+
+/* l4 ls -> mcspi1 */
+struct omap_hwmod_ocp_if am33xx_l4_ls__mcspi1 = {
+       .master         = &am33xx_l4_ls_hwmod,
+       .slave          = &am33xx_spi1_hwmod,
+       .clk            = "l4ls_gclk",
+       .user           = OCP_USER_MPU,
+};
+
+/* l4 per -> timer2 */
+struct omap_hwmod_ocp_if am33xx_l4_ls__timer2 = {
+       .master         = &am33xx_l4_ls_hwmod,
+       .slave          = &am33xx_timer2_hwmod,
+       .clk            = "l4ls_gclk",
+       .user           = OCP_USER_MPU,
+};
+
+/* l4 per -> timer3 */
+struct omap_hwmod_ocp_if am33xx_l4_ls__timer3 = {
+       .master         = &am33xx_l4_ls_hwmod,
+       .slave          = &am33xx_timer3_hwmod,
+       .clk            = "l4ls_gclk",
+       .user           = OCP_USER_MPU,
+};
+
+/* l4 per -> timer4 */
+struct omap_hwmod_ocp_if am33xx_l4_ls__timer4 = {
+       .master         = &am33xx_l4_ls_hwmod,
+       .slave          = &am33xx_timer4_hwmod,
+       .clk            = "l4ls_gclk",
+       .user           = OCP_USER_MPU,
+};
+
+/* l4 per -> timer5 */
+struct omap_hwmod_ocp_if am33xx_l4_ls__timer5 = {
+       .master         = &am33xx_l4_ls_hwmod,
+       .slave          = &am33xx_timer5_hwmod,
+       .clk            = "l4ls_gclk",
+       .user           = OCP_USER_MPU,
+};
+
+/* l4 per -> timer6 */
+struct omap_hwmod_ocp_if am33xx_l4_ls__timer6 = {
+       .master         = &am33xx_l4_ls_hwmod,
+       .slave          = &am33xx_timer6_hwmod,
+       .clk            = "l4ls_gclk",
+       .user           = OCP_USER_MPU,
+};
+
+/* l4 per -> timer7 */
+struct omap_hwmod_ocp_if am33xx_l4_ls__timer7 = {
+       .master         = &am33xx_l4_ls_hwmod,
+       .slave          = &am33xx_timer7_hwmod,
+       .clk            = "l4ls_gclk",
+       .user           = OCP_USER_MPU,
+};
+
+/* l3 main -> tpcc */
+struct omap_hwmod_ocp_if am33xx_l3_main__tpcc = {
+       .master         = &am33xx_l3_main_hwmod,
+       .slave          = &am33xx_tpcc_hwmod,
+       .clk            = "l3_gclk",
+       .user           = OCP_USER_MPU,
+};
+
+/* l3 main -> tpcc0 */
+static struct omap_hwmod_addr_space am33xx_tptc0_addr_space[] = {
+       {
+               .pa_start       = 0x49800000,
+               .pa_end         = 0x49800000 + SZ_8K - 1,
+               .flags          = ADDR_TYPE_RT,
+       },
+       { }
+};
+
+struct omap_hwmod_ocp_if am33xx_l3_main__tptc0 = {
+       .master         = &am33xx_l3_main_hwmod,
+       .slave          = &am33xx_tptc0_hwmod,
+       .clk            = "l3_gclk",
+       .addr           = am33xx_tptc0_addr_space,
+       .user           = OCP_USER_MPU,
+};
+
+/* l3 main -> tpcc1 */
+static struct omap_hwmod_addr_space am33xx_tptc1_addr_space[] = {
+       {
+               .pa_start       = 0x49900000,
+               .pa_end         = 0x49900000 + SZ_8K - 1,
+               .flags          = ADDR_TYPE_RT,
+       },
+       { }
+};
+
+struct omap_hwmod_ocp_if am33xx_l3_main__tptc1 = {
+       .master         = &am33xx_l3_main_hwmod,
+       .slave          = &am33xx_tptc1_hwmod,
+       .clk            = "l3_gclk",
+       .addr           = am33xx_tptc1_addr_space,
+       .user           = OCP_USER_MPU,
+};
+
+/* l3 main -> tpcc2 */
+static struct omap_hwmod_addr_space am33xx_tptc2_addr_space[] = {
+       {
+               .pa_start       = 0x49a00000,
+               .pa_end         = 0x49a00000 + SZ_8K - 1,
+               .flags          = ADDR_TYPE_RT,
+       },
+       { }
+};
+
+struct omap_hwmod_ocp_if am33xx_l3_main__tptc2 = {
+       .master         = &am33xx_l3_main_hwmod,
+       .slave          = &am33xx_tptc2_hwmod,
+       .clk            = "l3_gclk",
+       .addr           = am33xx_tptc2_addr_space,
+       .user           = OCP_USER_MPU,
+};
+
+/* l4 ls -> uart2 */
+struct omap_hwmod_ocp_if am33xx_l4_ls__uart2 = {
+       .master         = &am33xx_l4_ls_hwmod,
+       .slave          = &am33xx_uart2_hwmod,
+       .clk            = "l4ls_gclk",
+       .user           = OCP_USER_MPU,
+};
+
+/* l4 ls -> uart3 */
+struct omap_hwmod_ocp_if am33xx_l4_ls__uart3 = {
+       .master         = &am33xx_l4_ls_hwmod,
+       .slave          = &am33xx_uart3_hwmod,
+       .clk            = "l4ls_gclk",
+       .user           = OCP_USER_MPU,
+};
+
+/* l4 ls -> uart4 */
+struct omap_hwmod_ocp_if am33xx_l4_ls__uart4 = {
+       .master         = &am33xx_l4_ls_hwmod,
+       .slave          = &am33xx_uart4_hwmod,
+       .clk            = "l4ls_gclk",
+       .user           = OCP_USER_MPU,
+};
+
+/* l4 ls -> uart5 */
+struct omap_hwmod_ocp_if am33xx_l4_ls__uart5 = {
+       .master         = &am33xx_l4_ls_hwmod,
+       .slave          = &am33xx_uart5_hwmod,
+       .clk            = "l4ls_gclk",
+       .user           = OCP_USER_MPU,
+};
+
+/* l4 ls -> uart6 */
+struct omap_hwmod_ocp_if am33xx_l4_ls__uart6 = {
+       .master         = &am33xx_l4_ls_hwmod,
+       .slave          = &am33xx_uart6_hwmod,
+       .clk            = "l4ls_gclk",
+       .user           = OCP_USER_MPU,
+};
+
+/* l3 main -> ocmc */
+struct omap_hwmod_ocp_if am33xx_l3_main__ocmc = {
+       .master         = &am33xx_l3_main_hwmod,
+       .slave          = &am33xx_ocmcram_hwmod,
+       .user           = OCP_USER_MPU | OCP_USER_SDMA,
+};
+
+/* l3 main -> sha0 HIB2 */
+static struct omap_hwmod_addr_space am33xx_sha0_addrs[] = {
+       {
+               .pa_start       = 0x53100000,
+               .pa_end         = 0x53100000 + SZ_512 - 1,
+               .flags          = ADDR_TYPE_RT
+       },
+       { }
+};
+
+struct omap_hwmod_ocp_if am33xx_l3_main__sha0 = {
+       .master         = &am33xx_l3_main_hwmod,
+       .slave          = &am33xx_sha0_hwmod,
+       .clk            = "sha0_fck",
+       .addr           = am33xx_sha0_addrs,
+       .user           = OCP_USER_MPU | OCP_USER_SDMA,
+};
+
+/* l3 main -> AES0 HIB2 */
+static struct omap_hwmod_addr_space am33xx_aes0_addrs[] = {
+       {
+               .pa_start       = 0x53500000,
+               .pa_end         = 0x53500000 + SZ_1M - 1,
+               .flags          = ADDR_TYPE_RT
+       },
+       { }
+};
+
+struct omap_hwmod_ocp_if am33xx_l3_main__aes0 = {
+       .master         = &am33xx_l3_main_hwmod,
+       .slave          = &am33xx_aes0_hwmod,
+       .clk            = "aes0_fck",
+       .addr           = am33xx_aes0_addrs,
+       .user           = OCP_USER_MPU | OCP_USER_SDMA,
+};
diff --git a/arch/arm/mach-omap2/omap_hwmod_33xx_43xx_ipblock_data.c b/arch/arm/mach-omap2/omap_hwmod_33xx_43xx_ipblock_data.c
new file mode 100644 (file)
index 0000000..0f17862
--- /dev/null
@@ -0,0 +1,1469 @@
+/*
+ *
+ * Copyright (C) 2013 Texas Instruments Incorporated
+ *
+ * Hwmod common for AM335x and AM43x
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation version 2.
+ *
+ * This program is distributed "as is" WITHOUT ANY WARRANTY of any
+ * kind, whether express or implied; without even the implied warranty
+ * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+
+#include <linux/platform_data/gpio-omap.h>
+#include <linux/platform_data/spi-omap2-mcspi.h>
+#include "omap_hwmod.h"
+#include "i2c.h"
+#include "mmc.h"
+#include "wd_timer.h"
+#include "cm33xx.h"
+#include "prm33xx.h"
+#include "omap_hwmod_33xx_43xx_common_data.h"
+#include "prcm43xx.h"
+
+#define CLKCTRL(oh, clkctrl) ((oh).prcm.omap4.clkctrl_offs = (clkctrl))
+#define RSTCTRL(oh, rstctrl) ((oh).prcm.omap4.rstctrl_offs = (rstctrl))
+#define RSTST(oh, rstst) ((oh).prcm.omap4.rstst_offs = (rstst))
+
+/*
+ * 'l3' class
+ * instance(s): l3_main, l3_s, l3_instr
+ */
+static struct omap_hwmod_class am33xx_l3_hwmod_class = {
+       .name           = "l3",
+};
+
+struct omap_hwmod am33xx_l3_main_hwmod = {
+       .name           = "l3_main",
+       .class          = &am33xx_l3_hwmod_class,
+       .clkdm_name     = "l3_clkdm",
+       .flags          = HWMOD_INIT_NO_IDLE,
+       .main_clk       = "l3_gclk",
+       .prcm           = {
+               .omap4  = {
+                       .modulemode     = MODULEMODE_SWCTRL,
+               },
+       },
+};
+
+/* l3_s */
+struct omap_hwmod am33xx_l3_s_hwmod = {
+       .name           = "l3_s",
+       .class          = &am33xx_l3_hwmod_class,
+       .clkdm_name     = "l3s_clkdm",
+};
+
+/* l3_instr */
+struct omap_hwmod am33xx_l3_instr_hwmod = {
+       .name           = "l3_instr",
+       .class          = &am33xx_l3_hwmod_class,
+       .clkdm_name     = "l3_clkdm",
+       .flags          = HWMOD_INIT_NO_IDLE,
+       .main_clk       = "l3_gclk",
+       .prcm           = {
+               .omap4  = {
+                       .modulemode     = MODULEMODE_SWCTRL,
+               },
+       },
+};
+
+/*
+ * 'l4' class
+ * instance(s): l4_ls, l4_hs, l4_wkup, l4_fw
+ */
+struct omap_hwmod_class am33xx_l4_hwmod_class = {
+       .name           = "l4",
+};
+
+/* l4_ls */
+struct omap_hwmod am33xx_l4_ls_hwmod = {
+       .name           = "l4_ls",
+       .class          = &am33xx_l4_hwmod_class,
+       .clkdm_name     = "l4ls_clkdm",
+       .flags          = HWMOD_INIT_NO_IDLE,
+       .main_clk       = "l4ls_gclk",
+       .prcm           = {
+               .omap4  = {
+                       .modulemode     = MODULEMODE_SWCTRL,
+               },
+       },
+};
+
+/* l4_wkup */
+struct omap_hwmod am33xx_l4_wkup_hwmod = {
+       .name           = "l4_wkup",
+       .class          = &am33xx_l4_hwmod_class,
+       .clkdm_name     = "l4_wkup_clkdm",
+       .flags          = HWMOD_INIT_NO_IDLE,
+       .prcm           = {
+               .omap4  = {
+                       .modulemode     = MODULEMODE_SWCTRL,
+               },
+       },
+};
+
+/*
+ * 'mpu' class
+ */
+static struct omap_hwmod_class am33xx_mpu_hwmod_class = {
+       .name   = "mpu",
+};
+
+struct omap_hwmod am33xx_mpu_hwmod = {
+       .name           = "mpu",
+       .class          = &am33xx_mpu_hwmod_class,
+       .clkdm_name     = "mpu_clkdm",
+       .flags          = HWMOD_INIT_NO_IDLE,
+       .main_clk       = "dpll_mpu_m2_ck",
+       .prcm           = {
+               .omap4  = {
+                       .modulemode     = MODULEMODE_SWCTRL,
+               },
+       },
+};
+
+/*
+ * 'wakeup m3' class
+ * Wakeup controller sub-system under wakeup domain
+ */
+struct omap_hwmod_class am33xx_wkup_m3_hwmod_class = {
+       .name           = "wkup_m3",
+};
+
+/*
+ * 'pru-icss' class
+ * Programmable Real-Time Unit and Industrial Communication Subsystem
+ */
+static struct omap_hwmod_class am33xx_pruss_hwmod_class = {
+       .name   = "pruss",
+};
+
+static struct omap_hwmod_rst_info am33xx_pruss_resets[] = {
+       { .name = "pruss", .rst_shift = 1 },
+};
+
+/* pru-icss */
+/* Pseudo hwmod for reset control purpose only */
+struct omap_hwmod am33xx_pruss_hwmod = {
+       .name           = "pruss",
+       .class          = &am33xx_pruss_hwmod_class,
+       .clkdm_name     = "pruss_ocp_clkdm",
+       .main_clk       = "pruss_ocp_gclk",
+       .prcm           = {
+               .omap4  = {
+                       .modulemode     = MODULEMODE_SWCTRL,
+               },
+       },
+       .rst_lines      = am33xx_pruss_resets,
+       .rst_lines_cnt  = ARRAY_SIZE(am33xx_pruss_resets),
+};
+
+/* gfx */
+/* Pseudo hwmod for reset control purpose only */
+static struct omap_hwmod_class am33xx_gfx_hwmod_class = {
+       .name   = "gfx",
+};
+
+static struct omap_hwmod_rst_info am33xx_gfx_resets[] = {
+       { .name = "gfx", .rst_shift = 0, .st_shift = 0},
+};
+
+struct omap_hwmod am33xx_gfx_hwmod = {
+       .name           = "gfx",
+       .class          = &am33xx_gfx_hwmod_class,
+       .clkdm_name     = "gfx_l3_clkdm",
+       .main_clk       = "gfx_fck_div_ck",
+       .prcm           = {
+               .omap4  = {
+                       .modulemode     = MODULEMODE_SWCTRL,
+               },
+       },
+       .rst_lines      = am33xx_gfx_resets,
+       .rst_lines_cnt  = ARRAY_SIZE(am33xx_gfx_resets),
+};
+
+/*
+ * 'prcm' class
+ * power and reset manager (whole prcm infrastructure)
+ */
+static struct omap_hwmod_class am33xx_prcm_hwmod_class = {
+       .name   = "prcm",
+};
+
+/* prcm */
+struct omap_hwmod am33xx_prcm_hwmod = {
+       .name           = "prcm",
+       .class          = &am33xx_prcm_hwmod_class,
+       .clkdm_name     = "l4_wkup_clkdm",
+};
+
+/*
+ * 'aes0' class
+ */
+static struct omap_hwmod_class_sysconfig am33xx_aes0_sysc = {
+       .rev_offs       = 0x80,
+       .sysc_offs      = 0x84,
+       .syss_offs      = 0x88,
+       .sysc_flags     = SYSS_HAS_RESET_STATUS,
+};
+
+static struct omap_hwmod_class am33xx_aes0_hwmod_class = {
+       .name           = "aes0",
+       .sysc           = &am33xx_aes0_sysc,
+};
+
+struct omap_hwmod am33xx_aes0_hwmod = {
+       .name           = "aes",
+       .class          = &am33xx_aes0_hwmod_class,
+       .clkdm_name     = "l3_clkdm",
+       .main_clk       = "aes0_fck",
+       .prcm           = {
+               .omap4  = {
+                       .modulemode     = MODULEMODE_SWCTRL,
+               },
+       },
+};
+
+/* sha0 HIB2 (the 'P' (public) device) */
+static struct omap_hwmod_class_sysconfig am33xx_sha0_sysc = {
+       .rev_offs       = 0x100,
+       .sysc_offs      = 0x110,
+       .syss_offs      = 0x114,
+       .sysc_flags     = SYSS_HAS_RESET_STATUS,
+};
+
+static struct omap_hwmod_class am33xx_sha0_hwmod_class = {
+       .name           = "sha0",
+       .sysc           = &am33xx_sha0_sysc,
+};
+
+struct omap_hwmod am33xx_sha0_hwmod = {
+       .name           = "sham",
+       .class          = &am33xx_sha0_hwmod_class,
+       .clkdm_name     = "l3_clkdm",
+       .main_clk       = "l3_gclk",
+       .prcm           = {
+               .omap4  = {
+                       .modulemode     = MODULEMODE_SWCTRL,
+               },
+       },
+};
+
+/* ocmcram */
+static struct omap_hwmod_class am33xx_ocmcram_hwmod_class = {
+       .name = "ocmcram",
+};
+
+struct omap_hwmod am33xx_ocmcram_hwmod = {
+       .name           = "ocmcram",
+       .class          = &am33xx_ocmcram_hwmod_class,
+       .clkdm_name     = "l3_clkdm",
+       .flags          = HWMOD_INIT_NO_IDLE,
+       .main_clk       = "l3_gclk",
+       .prcm           = {
+               .omap4  = {
+                       .modulemode     = MODULEMODE_SWCTRL,
+               },
+       },
+};
+
+/* 'smartreflex' class */
+static struct omap_hwmod_class am33xx_smartreflex_hwmod_class = {
+       .name           = "smartreflex",
+};
+
+/* smartreflex0 */
+struct omap_hwmod am33xx_smartreflex0_hwmod = {
+       .name           = "smartreflex0",
+       .class          = &am33xx_smartreflex_hwmod_class,
+       .clkdm_name     = "l4_wkup_clkdm",
+       .main_clk       = "smartreflex0_fck",
+       .prcm           = {
+               .omap4  = {
+                       .modulemode     = MODULEMODE_SWCTRL,
+               },
+       },
+};
+
+/* smartreflex1 */
+struct omap_hwmod am33xx_smartreflex1_hwmod = {
+       .name           = "smartreflex1",
+       .class          = &am33xx_smartreflex_hwmod_class,
+       .clkdm_name     = "l4_wkup_clkdm",
+       .main_clk       = "smartreflex1_fck",
+       .prcm           = {
+               .omap4  = {
+                       .modulemode     = MODULEMODE_SWCTRL,
+               },
+       },
+};
+
+/*
+ * 'control' module class
+ */
+struct omap_hwmod_class am33xx_control_hwmod_class = {
+       .name           = "control",
+};
+
+/*
+ * 'cpgmac' class
+ * cpsw/cpgmac sub system
+ */
+static struct omap_hwmod_class_sysconfig am33xx_cpgmac_sysc = {
+       .rev_offs       = 0x0,
+       .sysc_offs      = 0x8,
+       .syss_offs      = 0x4,
+       .sysc_flags     = (SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE |
+                          SYSS_HAS_RESET_STATUS),
+       .idlemodes      = (SIDLE_FORCE | SIDLE_NO | MSTANDBY_FORCE |
+                          MSTANDBY_NO),
+       .sysc_fields    = &omap_hwmod_sysc_type3,
+};
+
+static struct omap_hwmod_class am33xx_cpgmac0_hwmod_class = {
+       .name           = "cpgmac0",
+       .sysc           = &am33xx_cpgmac_sysc,
+};
+
+struct omap_hwmod am33xx_cpgmac0_hwmod = {
+       .name           = "cpgmac0",
+       .class          = &am33xx_cpgmac0_hwmod_class,
+       .clkdm_name     = "cpsw_125mhz_clkdm",
+       .flags          = (HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY),
+       .main_clk       = "cpsw_125mhz_gclk",
+       .mpu_rt_idx     = 1,
+       .prcm           = {
+               .omap4  = {
+                       .modulemode     = MODULEMODE_SWCTRL,
+               },
+       },
+};
+
+/*
+ * mdio class
+ */
+static struct omap_hwmod_class am33xx_mdio_hwmod_class = {
+       .name           = "davinci_mdio",
+};
+
+struct omap_hwmod am33xx_mdio_hwmod = {
+       .name           = "davinci_mdio",
+       .class          = &am33xx_mdio_hwmod_class,
+       .clkdm_name     = "cpsw_125mhz_clkdm",
+       .main_clk       = "cpsw_125mhz_gclk",
+};
+
+/*
+ * dcan class
+ */
+static struct omap_hwmod_class am33xx_dcan_hwmod_class = {
+       .name = "d_can",
+};
+
+/* dcan0 */
+struct omap_hwmod am33xx_dcan0_hwmod = {
+       .name           = "d_can0",
+       .class          = &am33xx_dcan_hwmod_class,
+       .clkdm_name     = "l4ls_clkdm",
+       .main_clk       = "dcan0_fck",
+       .prcm           = {
+               .omap4  = {
+                       .modulemode     = MODULEMODE_SWCTRL,
+               },
+       },
+};
+
+/* dcan1 */
+struct omap_hwmod am33xx_dcan1_hwmod = {
+       .name           = "d_can1",
+       .class          = &am33xx_dcan_hwmod_class,
+       .clkdm_name     = "l4ls_clkdm",
+       .main_clk       = "dcan1_fck",
+       .prcm           = {
+               .omap4  = {
+                       .modulemode     = MODULEMODE_SWCTRL,
+               },
+       },
+};
+
+/* elm */
+static struct omap_hwmod_class_sysconfig am33xx_elm_sysc = {
+       .rev_offs       = 0x0000,
+       .sysc_offs      = 0x0010,
+       .syss_offs      = 0x0014,
+       .sysc_flags     = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
+                       SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE |
+                       SYSS_HAS_RESET_STATUS),
+       .idlemodes      = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
+       .sysc_fields    = &omap_hwmod_sysc_type1,
+};
+
+static struct omap_hwmod_class am33xx_elm_hwmod_class = {
+       .name           = "elm",
+       .sysc           = &am33xx_elm_sysc,
+};
+
+struct omap_hwmod am33xx_elm_hwmod = {
+       .name           = "elm",
+       .class          = &am33xx_elm_hwmod_class,
+       .clkdm_name     = "l4ls_clkdm",
+       .main_clk       = "l4ls_gclk",
+       .prcm           = {
+               .omap4  = {
+                       .modulemode     = MODULEMODE_SWCTRL,
+               },
+       },
+};
+
+/* pwmss  */
+static struct omap_hwmod_class_sysconfig am33xx_epwmss_sysc = {
+       .rev_offs       = 0x0,
+       .sysc_offs      = 0x4,
+       .sysc_flags     = (SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE),
+       .idlemodes      = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
+                       SIDLE_SMART_WKUP | MSTANDBY_FORCE | MSTANDBY_NO |
+                       MSTANDBY_SMART | MSTANDBY_SMART_WKUP),
+       .sysc_fields    = &omap_hwmod_sysc_type2,
+};
+
+struct omap_hwmod_class am33xx_epwmss_hwmod_class = {
+       .name           = "epwmss",
+       .sysc           = &am33xx_epwmss_sysc,
+};
+
+static struct omap_hwmod_class am33xx_ecap_hwmod_class = {
+       .name           = "ecap",
+};
+
+static struct omap_hwmod_class am33xx_eqep_hwmod_class = {
+       .name           = "eqep",
+};
+
+struct omap_hwmod_class am33xx_ehrpwm_hwmod_class = {
+       .name           = "ehrpwm",
+};
+
+/* epwmss0 */
+struct omap_hwmod am33xx_epwmss0_hwmod = {
+       .name           = "epwmss0",
+       .class          = &am33xx_epwmss_hwmod_class,
+       .clkdm_name     = "l4ls_clkdm",
+       .main_clk       = "l4ls_gclk",
+       .prcm           = {
+               .omap4  = {
+                       .modulemode     = MODULEMODE_SWCTRL,
+               },
+       },
+};
+
+/* ecap0 */
+struct omap_hwmod am33xx_ecap0_hwmod = {
+       .name           = "ecap0",
+       .class          = &am33xx_ecap_hwmod_class,
+       .clkdm_name     = "l4ls_clkdm",
+       .main_clk       = "l4ls_gclk",
+};
+
+/* eqep0 */
+struct omap_hwmod am33xx_eqep0_hwmod = {
+       .name           = "eqep0",
+       .class          = &am33xx_eqep_hwmod_class,
+       .clkdm_name     = "l4ls_clkdm",
+       .main_clk       = "l4ls_gclk",
+};
+
+/* ehrpwm0 */
+struct omap_hwmod am33xx_ehrpwm0_hwmod = {
+       .name           = "ehrpwm0",
+       .class          = &am33xx_ehrpwm_hwmod_class,
+       .clkdm_name     = "l4ls_clkdm",
+       .main_clk       = "l4ls_gclk",
+};
+
+/* epwmss1 */
+struct omap_hwmod am33xx_epwmss1_hwmod = {
+       .name           = "epwmss1",
+       .class          = &am33xx_epwmss_hwmod_class,
+       .clkdm_name     = "l4ls_clkdm",
+       .main_clk       = "l4ls_gclk",
+       .prcm           = {
+               .omap4  = {
+                       .modulemode     = MODULEMODE_SWCTRL,
+               },
+       },
+};
+
+/* ecap1 */
+struct omap_hwmod am33xx_ecap1_hwmod = {
+       .name           = "ecap1",
+       .class          = &am33xx_ecap_hwmod_class,
+       .clkdm_name     = "l4ls_clkdm",
+       .main_clk       = "l4ls_gclk",
+};
+
+/* eqep1 */
+struct omap_hwmod am33xx_eqep1_hwmod = {
+       .name           = "eqep1",
+       .class          = &am33xx_eqep_hwmod_class,
+       .clkdm_name     = "l4ls_clkdm",
+       .main_clk       = "l4ls_gclk",
+};
+
+/* ehrpwm1 */
+struct omap_hwmod am33xx_ehrpwm1_hwmod = {
+       .name           = "ehrpwm1",
+       .class          = &am33xx_ehrpwm_hwmod_class,
+       .clkdm_name     = "l4ls_clkdm",
+       .main_clk       = "l4ls_gclk",
+};
+
+/* epwmss2 */
+struct omap_hwmod am33xx_epwmss2_hwmod = {
+       .name           = "epwmss2",
+       .class          = &am33xx_epwmss_hwmod_class,
+       .clkdm_name     = "l4ls_clkdm",
+       .main_clk       = "l4ls_gclk",
+       .prcm           = {
+               .omap4  = {
+                       .modulemode     = MODULEMODE_SWCTRL,
+               },
+       },
+};
+
+/* ecap2 */
+struct omap_hwmod am33xx_ecap2_hwmod = {
+       .name           = "ecap2",
+       .class          = &am33xx_ecap_hwmod_class,
+       .clkdm_name     = "l4ls_clkdm",
+       .main_clk       = "l4ls_gclk",
+};
+
+/* eqep2 */
+struct omap_hwmod am33xx_eqep2_hwmod = {
+       .name           = "eqep2",
+       .class          = &am33xx_eqep_hwmod_class,
+       .clkdm_name     = "l4ls_clkdm",
+       .main_clk       = "l4ls_gclk",
+};
+
+/* ehrpwm2 */
+struct omap_hwmod am33xx_ehrpwm2_hwmod = {
+       .name           = "ehrpwm2",
+       .class          = &am33xx_ehrpwm_hwmod_class,
+       .clkdm_name     = "l4ls_clkdm",
+       .main_clk       = "l4ls_gclk",
+};
+
+/*
+ * 'gpio' class: for gpio 0,1,2,3
+ */
+static struct omap_hwmod_class_sysconfig am33xx_gpio_sysc = {
+       .rev_offs       = 0x0000,
+       .sysc_offs      = 0x0010,
+       .syss_offs      = 0x0114,
+       .sysc_flags     = (SYSC_HAS_AUTOIDLE | SYSC_HAS_ENAWAKEUP |
+                         SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
+                         SYSS_HAS_RESET_STATUS),
+       .idlemodes      = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
+                         SIDLE_SMART_WKUP),
+       .sysc_fields    = &omap_hwmod_sysc_type1,
+};
+
+struct omap_hwmod_class am33xx_gpio_hwmod_class = {
+       .name           = "gpio",
+       .sysc           = &am33xx_gpio_sysc,
+       .rev            = 2,
+};
+
+struct omap_gpio_dev_attr gpio_dev_attr = {
+       .bank_width     = 32,
+       .dbck_flag      = true,
+};
+
+/* gpio1 */
+static struct omap_hwmod_opt_clk gpio1_opt_clks[] = {
+       { .role = "dbclk", .clk = "gpio1_dbclk" },
+};
+
+struct omap_hwmod am33xx_gpio1_hwmod = {
+       .name           = "gpio2",
+       .class          = &am33xx_gpio_hwmod_class,
+       .clkdm_name     = "l4ls_clkdm",
+       .flags          = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
+       .main_clk       = "l4ls_gclk",
+       .prcm           = {
+               .omap4  = {
+                       .modulemode     = MODULEMODE_SWCTRL,
+               },
+       },
+       .opt_clks       = gpio1_opt_clks,
+       .opt_clks_cnt   = ARRAY_SIZE(gpio1_opt_clks),
+       .dev_attr       = &gpio_dev_attr,
+};
+
+/* gpio2 */
+static struct omap_hwmod_opt_clk gpio2_opt_clks[] = {
+       { .role = "dbclk", .clk = "gpio2_dbclk" },
+};
+
+struct omap_hwmod am33xx_gpio2_hwmod = {
+       .name           = "gpio3",
+       .class          = &am33xx_gpio_hwmod_class,
+       .clkdm_name     = "l4ls_clkdm",
+       .flags          = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
+       .main_clk       = "l4ls_gclk",
+       .prcm           = {
+               .omap4  = {
+                       .modulemode     = MODULEMODE_SWCTRL,
+               },
+       },
+       .opt_clks       = gpio2_opt_clks,
+       .opt_clks_cnt   = ARRAY_SIZE(gpio2_opt_clks),
+       .dev_attr       = &gpio_dev_attr,
+};
+
+/* gpio3 */
+static struct omap_hwmod_opt_clk gpio3_opt_clks[] = {
+       { .role = "dbclk", .clk = "gpio3_dbclk" },
+};
+
+struct omap_hwmod am33xx_gpio3_hwmod = {
+       .name           = "gpio4",
+       .class          = &am33xx_gpio_hwmod_class,
+       .clkdm_name     = "l4ls_clkdm",
+       .flags          = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
+       .main_clk       = "l4ls_gclk",
+       .prcm           = {
+               .omap4  = {
+                       .modulemode     = MODULEMODE_SWCTRL,
+               },
+       },
+       .opt_clks       = gpio3_opt_clks,
+       .opt_clks_cnt   = ARRAY_SIZE(gpio3_opt_clks),
+       .dev_attr       = &gpio_dev_attr,
+};
+
+/* gpmc */
+static struct omap_hwmod_class_sysconfig gpmc_sysc = {
+       .rev_offs       = 0x0,
+       .sysc_offs      = 0x10,
+       .syss_offs      = 0x14,
+       .sysc_flags     = (SYSC_HAS_AUTOIDLE | SYSC_HAS_SIDLEMODE |
+                       SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
+       .idlemodes      = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
+       .sysc_fields    = &omap_hwmod_sysc_type1,
+};
+
+static struct omap_hwmod_class am33xx_gpmc_hwmod_class = {
+       .name           = "gpmc",
+       .sysc           = &gpmc_sysc,
+};
+
+struct omap_hwmod am33xx_gpmc_hwmod = {
+       .name           = "gpmc",
+       .class          = &am33xx_gpmc_hwmod_class,
+       .clkdm_name     = "l3s_clkdm",
+       .flags          = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET),
+       .main_clk       = "l3s_gclk",
+       .prcm           = {
+               .omap4  = {
+                       .modulemode     = MODULEMODE_SWCTRL,
+               },
+       },
+};
+
+/* 'i2c' class */
+static struct omap_hwmod_class_sysconfig am33xx_i2c_sysc = {
+       .sysc_offs      = 0x0010,
+       .syss_offs      = 0x0090,
+       .sysc_flags     = (SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY |
+                         SYSC_HAS_ENAWAKEUP | SYSC_HAS_SIDLEMODE |
+                         SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
+       .idlemodes      = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
+                         SIDLE_SMART_WKUP),
+       .sysc_fields    = &omap_hwmod_sysc_type1,
+};
+
+static struct omap_hwmod_class i2c_class = {
+       .name           = "i2c",
+       .sysc           = &am33xx_i2c_sysc,
+       .rev            = OMAP_I2C_IP_VERSION_2,
+       .reset          = &omap_i2c_reset,
+};
+
+static struct omap_i2c_dev_attr i2c_dev_attr = {
+       .flags = OMAP_I2C_FLAG_BUS_SHIFT_NONE,
+};
+
+/* i2c1 */
+struct omap_hwmod am33xx_i2c1_hwmod = {
+       .name           = "i2c1",
+       .class          = &i2c_class,
+       .clkdm_name     = "l4_wkup_clkdm",
+       .flags          = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT,
+       .main_clk       = "dpll_per_m2_div4_wkupdm_ck",
+       .prcm           = {
+               .omap4  = {
+                       .modulemode     = MODULEMODE_SWCTRL,
+               },
+       },
+       .dev_attr       = &i2c_dev_attr,
+};
+
+/* i2c1 */
+struct omap_hwmod am33xx_i2c2_hwmod = {
+       .name           = "i2c2",
+       .class          = &i2c_class,
+       .clkdm_name     = "l4ls_clkdm",
+       .flags          = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT,
+       .main_clk       = "dpll_per_m2_div4_ck",
+       .prcm           = {
+               .omap4 = {
+                       .modulemode     = MODULEMODE_SWCTRL,
+               },
+       },
+       .dev_attr       = &i2c_dev_attr,
+};
+
+/* i2c3 */
+struct omap_hwmod am33xx_i2c3_hwmod = {
+       .name           = "i2c3",
+       .class          = &i2c_class,
+       .clkdm_name     = "l4ls_clkdm",
+       .flags          = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT,
+       .main_clk       = "dpll_per_m2_div4_ck",
+       .prcm           = {
+               .omap4  = {
+                       .modulemode     = MODULEMODE_SWCTRL,
+               },
+       },
+       .dev_attr       = &i2c_dev_attr,
+};
+
+/*
+ * 'mailbox' class
+ * mailbox module allowing communication between the on-chip processors using a
+ * queued mailbox-interrupt mechanism.
+ */
+static struct omap_hwmod_class_sysconfig am33xx_mailbox_sysc = {
+       .rev_offs       = 0x0000,
+       .sysc_offs      = 0x0010,
+       .sysc_flags     = (SYSC_HAS_RESET_STATUS | SYSC_HAS_SIDLEMODE |
+                         SYSC_HAS_SOFTRESET),
+       .idlemodes      = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
+       .sysc_fields    = &omap_hwmod_sysc_type2,
+};
+
+static struct omap_hwmod_class am33xx_mailbox_hwmod_class = {
+       .name   = "mailbox",
+       .sysc   = &am33xx_mailbox_sysc,
+};
+
+struct omap_hwmod am33xx_mailbox_hwmod = {
+       .name           = "mailbox",
+       .class          = &am33xx_mailbox_hwmod_class,
+       .clkdm_name     = "l4ls_clkdm",
+       .main_clk       = "l4ls_gclk",
+       .prcm = {
+               .omap4 = {
+                       .modulemode     = MODULEMODE_SWCTRL,
+               },
+       },
+};
+
+/*
+ * 'mcasp' class
+ */
+static struct omap_hwmod_class_sysconfig am33xx_mcasp_sysc = {
+       .rev_offs       = 0x0,
+       .sysc_offs      = 0x4,
+       .sysc_flags     = SYSC_HAS_SIDLEMODE,
+       .idlemodes      = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
+       .sysc_fields    = &omap_hwmod_sysc_type3,
+};
+
+static struct omap_hwmod_class am33xx_mcasp_hwmod_class = {
+       .name           = "mcasp",
+       .sysc           = &am33xx_mcasp_sysc,
+};
+
+/* mcasp0 */
+struct omap_hwmod am33xx_mcasp0_hwmod = {
+       .name           = "mcasp0",
+       .class          = &am33xx_mcasp_hwmod_class,
+       .clkdm_name     = "l3s_clkdm",
+       .main_clk       = "mcasp0_fck",
+       .prcm           = {
+               .omap4  = {
+                       .modulemode     = MODULEMODE_SWCTRL,
+               },
+       },
+};
+
+/* mcasp1 */
+struct omap_hwmod am33xx_mcasp1_hwmod = {
+       .name           = "mcasp1",
+       .class          = &am33xx_mcasp_hwmod_class,
+       .clkdm_name     = "l3s_clkdm",
+       .main_clk       = "mcasp1_fck",
+       .prcm           = {
+               .omap4  = {
+                       .modulemode     = MODULEMODE_SWCTRL,
+               },
+       },
+};
+
+/* 'mmc' class */
+static struct omap_hwmod_class_sysconfig am33xx_mmc_sysc = {
+       .rev_offs       = 0x1fc,
+       .sysc_offs      = 0x10,
+       .syss_offs      = 0x14,
+       .sysc_flags     = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
+                         SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
+                         SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
+       .idlemodes      = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
+       .sysc_fields    = &omap_hwmod_sysc_type1,
+};
+
+static struct omap_hwmod_class am33xx_mmc_hwmod_class = {
+       .name           = "mmc",
+       .sysc           = &am33xx_mmc_sysc,
+};
+
+/* mmc0 */
+static struct omap_mmc_dev_attr am33xx_mmc0_dev_attr = {
+       .flags          = OMAP_HSMMC_SUPPORTS_DUAL_VOLT,
+};
+
+struct omap_hwmod am33xx_mmc0_hwmod = {
+       .name           = "mmc1",
+       .class          = &am33xx_mmc_hwmod_class,
+       .clkdm_name     = "l4ls_clkdm",
+       .main_clk       = "mmc_clk",
+       .prcm           = {
+               .omap4  = {
+                       .modulemode     = MODULEMODE_SWCTRL,
+               },
+       },
+       .dev_attr       = &am33xx_mmc0_dev_attr,
+};
+
+/* mmc1 */
+static struct omap_mmc_dev_attr am33xx_mmc1_dev_attr = {
+       .flags          = OMAP_HSMMC_SUPPORTS_DUAL_VOLT,
+};
+
+struct omap_hwmod am33xx_mmc1_hwmod = {
+       .name           = "mmc2",
+       .class          = &am33xx_mmc_hwmod_class,
+       .clkdm_name     = "l4ls_clkdm",
+       .main_clk       = "mmc_clk",
+       .prcm           = {
+               .omap4  = {
+                       .modulemode     = MODULEMODE_SWCTRL,
+               },
+       },
+       .dev_attr       = &am33xx_mmc1_dev_attr,
+};
+
+/* mmc2 */
+static struct omap_mmc_dev_attr am33xx_mmc2_dev_attr = {
+       .flags          = OMAP_HSMMC_SUPPORTS_DUAL_VOLT,
+};
+struct omap_hwmod am33xx_mmc2_hwmod = {
+       .name           = "mmc3",
+       .class          = &am33xx_mmc_hwmod_class,
+       .clkdm_name     = "l3s_clkdm",
+       .main_clk       = "mmc_clk",
+       .prcm           = {
+               .omap4  = {
+                       .modulemode     = MODULEMODE_SWCTRL,
+               },
+       },
+       .dev_attr       = &am33xx_mmc2_dev_attr,
+};
+
+/*
+ * 'rtc' class
+ * rtc subsystem
+ */
+static struct omap_hwmod_class_sysconfig am33xx_rtc_sysc = {
+       .rev_offs       = 0x0074,
+       .sysc_offs      = 0x0078,
+       .sysc_flags     = SYSC_HAS_SIDLEMODE,
+       .idlemodes      = (SIDLE_FORCE | SIDLE_NO |
+                         SIDLE_SMART | SIDLE_SMART_WKUP),
+       .sysc_fields    = &omap_hwmod_sysc_type3,
+};
+
+static struct omap_hwmod_class am33xx_rtc_hwmod_class = {
+       .name           = "rtc",
+       .sysc           = &am33xx_rtc_sysc,
+};
+
+struct omap_hwmod am33xx_rtc_hwmod = {
+       .name           = "rtc",
+       .class          = &am33xx_rtc_hwmod_class,
+       .clkdm_name     = "l4_rtc_clkdm",
+       .main_clk       = "clk_32768_ck",
+       .prcm           = {
+               .omap4  = {
+                       .modulemode     = MODULEMODE_SWCTRL,
+               },
+       },
+};
+
+/* 'spi' class */
+static struct omap_hwmod_class_sysconfig am33xx_mcspi_sysc = {
+       .rev_offs       = 0x0000,
+       .sysc_offs      = 0x0110,
+       .syss_offs      = 0x0114,
+       .sysc_flags     = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
+                         SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE |
+                         SYSS_HAS_RESET_STATUS),
+       .idlemodes      = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
+       .sysc_fields    = &omap_hwmod_sysc_type1,
+};
+
+struct omap_hwmod_class am33xx_spi_hwmod_class = {
+       .name           = "mcspi",
+       .sysc           = &am33xx_mcspi_sysc,
+       .rev            = OMAP4_MCSPI_REV,
+};
+
+/* spi0 */
+struct omap2_mcspi_dev_attr mcspi_attrib = {
+       .num_chipselect = 2,
+};
+struct omap_hwmod am33xx_spi0_hwmod = {
+       .name           = "spi0",
+       .class          = &am33xx_spi_hwmod_class,
+       .clkdm_name     = "l4ls_clkdm",
+       .main_clk       = "dpll_per_m2_div4_ck",
+       .prcm           = {
+               .omap4  = {
+                       .modulemode     = MODULEMODE_SWCTRL,
+               },
+       },
+       .dev_attr       = &mcspi_attrib,
+};
+
+/* spi1 */
+struct omap_hwmod am33xx_spi1_hwmod = {
+       .name           = "spi1",
+       .class          = &am33xx_spi_hwmod_class,
+       .clkdm_name     = "l4ls_clkdm",
+       .main_clk       = "dpll_per_m2_div4_ck",
+       .prcm           = {
+               .omap4  = {
+                       .modulemode     = MODULEMODE_SWCTRL,
+               },
+       },
+       .dev_attr       = &mcspi_attrib,
+};
+
+/*
+ * 'spinlock' class
+ * spinlock provides hardware assistance for synchronizing the
+ * processes running on multiple processors
+ */
+
+static struct omap_hwmod_class_sysconfig am33xx_spinlock_sysc = {
+       .rev_offs       = 0x0000,
+       .sysc_offs      = 0x0010,
+       .syss_offs      = 0x0014,
+       .sysc_flags     = (SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY |
+                          SYSC_HAS_ENAWAKEUP | SYSC_HAS_SIDLEMODE |
+                          SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
+       .idlemodes      = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
+       .sysc_fields    = &omap_hwmod_sysc_type1,
+};
+
+static struct omap_hwmod_class am33xx_spinlock_hwmod_class = {
+       .name           = "spinlock",
+       .sysc           = &am33xx_spinlock_sysc,
+};
+
+struct omap_hwmod am33xx_spinlock_hwmod = {
+       .name           = "spinlock",
+       .class          = &am33xx_spinlock_hwmod_class,
+       .clkdm_name     = "l4ls_clkdm",
+       .main_clk       = "l4ls_gclk",
+       .prcm           = {
+               .omap4  = {
+                       .modulemode     = MODULEMODE_SWCTRL,
+               },
+       },
+};
+
+/* 'timer 2-7' class */
+static struct omap_hwmod_class_sysconfig am33xx_timer_sysc = {
+       .rev_offs       = 0x0000,
+       .sysc_offs      = 0x0010,
+       .syss_offs      = 0x0014,
+       .sysc_flags     = (SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET),
+       .idlemodes      = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
+                         SIDLE_SMART_WKUP),
+       .sysc_fields    = &omap_hwmod_sysc_type2,
+};
+
+struct omap_hwmod_class am33xx_timer_hwmod_class = {
+       .name           = "timer",
+       .sysc           = &am33xx_timer_sysc,
+};
+
+/* timer1 1ms */
+static struct omap_hwmod_class_sysconfig am33xx_timer1ms_sysc = {
+       .rev_offs       = 0x0000,
+       .sysc_offs      = 0x0010,
+       .syss_offs      = 0x0014,
+       .sysc_flags     = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
+                       SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE |
+                       SYSS_HAS_RESET_STATUS),
+       .idlemodes      = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
+       .sysc_fields    = &omap_hwmod_sysc_type1,
+};
+
+static struct omap_hwmod_class am33xx_timer1ms_hwmod_class = {
+       .name           = "timer",
+       .sysc           = &am33xx_timer1ms_sysc,
+};
+
+struct omap_hwmod am33xx_timer1_hwmod = {
+       .name           = "timer1",
+       .class          = &am33xx_timer1ms_hwmod_class,
+       .clkdm_name     = "l4_wkup_clkdm",
+       .main_clk       = "timer1_fck",
+       .prcm           = {
+               .omap4  = {
+                       .modulemode     = MODULEMODE_SWCTRL,
+               },
+       },
+};
+
+struct omap_hwmod am33xx_timer2_hwmod = {
+       .name           = "timer2",
+       .class          = &am33xx_timer_hwmod_class,
+       .clkdm_name     = "l4ls_clkdm",
+       .main_clk       = "timer2_fck",
+       .prcm           = {
+               .omap4  = {
+                       .modulemode     = MODULEMODE_SWCTRL,
+               },
+       },
+};
+
+struct omap_hwmod am33xx_timer3_hwmod = {
+       .name           = "timer3",
+       .class          = &am33xx_timer_hwmod_class,
+       .clkdm_name     = "l4ls_clkdm",
+       .main_clk       = "timer3_fck",
+       .prcm           = {
+               .omap4  = {
+                       .modulemode     = MODULEMODE_SWCTRL,
+               },
+       },
+};
+
+struct omap_hwmod am33xx_timer4_hwmod = {
+       .name           = "timer4",
+       .class          = &am33xx_timer_hwmod_class,
+       .clkdm_name     = "l4ls_clkdm",
+       .main_clk       = "timer4_fck",
+       .prcm           = {
+               .omap4  = {
+                       .modulemode     = MODULEMODE_SWCTRL,
+               },
+       },
+};
+
+struct omap_hwmod am33xx_timer5_hwmod = {
+       .name           = "timer5",
+       .class          = &am33xx_timer_hwmod_class,
+       .clkdm_name     = "l4ls_clkdm",
+       .main_clk       = "timer5_fck",
+       .prcm           = {
+               .omap4  = {
+                       .modulemode     = MODULEMODE_SWCTRL,
+               },
+       },
+};
+
+struct omap_hwmod am33xx_timer6_hwmod = {
+       .name           = "timer6",
+       .class          = &am33xx_timer_hwmod_class,
+       .clkdm_name     = "l4ls_clkdm",
+       .main_clk       = "timer6_fck",
+       .prcm           = {
+               .omap4  = {
+                       .modulemode     = MODULEMODE_SWCTRL,
+               },
+       },
+};
+
+struct omap_hwmod am33xx_timer7_hwmod = {
+       .name           = "timer7",
+       .class          = &am33xx_timer_hwmod_class,
+       .clkdm_name     = "l4ls_clkdm",
+       .main_clk       = "timer7_fck",
+       .prcm           = {
+               .omap4  = {
+                       .modulemode     = MODULEMODE_SWCTRL,
+               },
+       },
+};
+
+/* tpcc */
+static struct omap_hwmod_class am33xx_tpcc_hwmod_class = {
+       .name           = "tpcc",
+};
+
+struct omap_hwmod am33xx_tpcc_hwmod = {
+       .name           = "tpcc",
+       .class          = &am33xx_tpcc_hwmod_class,
+       .clkdm_name     = "l3_clkdm",
+       .main_clk       = "l3_gclk",
+       .prcm           = {
+               .omap4  = {
+                       .modulemode     = MODULEMODE_SWCTRL,
+               },
+       },
+};
+
+static struct omap_hwmod_class_sysconfig am33xx_tptc_sysc = {
+       .rev_offs       = 0x0,
+       .sysc_offs      = 0x10,
+       .sysc_flags     = (SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
+                         SYSC_HAS_MIDLEMODE),
+       .idlemodes      = (SIDLE_FORCE | SIDLE_SMART | MSTANDBY_FORCE),
+       .sysc_fields    = &omap_hwmod_sysc_type2,
+};
+
+/* 'tptc' class */
+static struct omap_hwmod_class am33xx_tptc_hwmod_class = {
+       .name           = "tptc",
+       .sysc           = &am33xx_tptc_sysc,
+};
+
+/* tptc0 */
+struct omap_hwmod am33xx_tptc0_hwmod = {
+       .name           = "tptc0",
+       .class          = &am33xx_tptc_hwmod_class,
+       .clkdm_name     = "l3_clkdm",
+       .flags          = HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY,
+       .main_clk       = "l3_gclk",
+       .prcm           = {
+               .omap4  = {
+                       .modulemode     = MODULEMODE_SWCTRL,
+               },
+       },
+};
+
+/* tptc1 */
+struct omap_hwmod am33xx_tptc1_hwmod = {
+       .name           = "tptc1",
+       .class          = &am33xx_tptc_hwmod_class,
+       .clkdm_name     = "l3_clkdm",
+       .flags          = (HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY),
+       .main_clk       = "l3_gclk",
+       .prcm           = {
+               .omap4  = {
+                       .modulemode     = MODULEMODE_SWCTRL,
+               },
+       },
+};
+
+/* tptc2 */
+struct omap_hwmod am33xx_tptc2_hwmod = {
+       .name           = "tptc2",
+       .class          = &am33xx_tptc_hwmod_class,
+       .clkdm_name     = "l3_clkdm",
+       .flags          = (HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY),
+       .main_clk       = "l3_gclk",
+       .prcm           = {
+               .omap4  = {
+                       .modulemode     = MODULEMODE_SWCTRL,
+               },
+       },
+};
+
+/* 'uart' class */
+static struct omap_hwmod_class_sysconfig uart_sysc = {
+       .rev_offs       = 0x50,
+       .sysc_offs      = 0x54,
+       .syss_offs      = 0x58,
+       .sysc_flags     = (SYSC_HAS_SIDLEMODE | SYSC_HAS_ENAWAKEUP |
+                         SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
+       .idlemodes      = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
+                         SIDLE_SMART_WKUP),
+       .sysc_fields    = &omap_hwmod_sysc_type1,
+};
+
+static struct omap_hwmod_class uart_class = {
+       .name           = "uart",
+       .sysc           = &uart_sysc,
+};
+
+struct omap_hwmod am33xx_uart1_hwmod = {
+       .name           = "uart1",
+       .class          = &uart_class,
+       .clkdm_name     = "l4_wkup_clkdm",
+       .flags          = DEBUG_AM33XXUART1_FLAGS | HWMOD_SWSUP_SIDLE_ACT,
+       .main_clk       = "dpll_per_m2_div4_wkupdm_ck",
+       .prcm           = {
+               .omap4  = {
+                       .modulemode     = MODULEMODE_SWCTRL,
+               },
+       },
+};
+
+struct omap_hwmod am33xx_uart2_hwmod = {
+       .name           = "uart2",
+       .class          = &uart_class,
+       .clkdm_name     = "l4ls_clkdm",
+       .flags          = HWMOD_SWSUP_SIDLE_ACT,
+       .main_clk       = "dpll_per_m2_div4_ck",
+       .prcm           = {
+               .omap4  = {
+                       .modulemode     = MODULEMODE_SWCTRL,
+               },
+       },
+};
+
+/* uart3 */
+struct omap_hwmod am33xx_uart3_hwmod = {
+       .name           = "uart3",
+       .class          = &uart_class,
+       .clkdm_name     = "l4ls_clkdm",
+       .flags          = HWMOD_SWSUP_SIDLE_ACT,
+       .main_clk       = "dpll_per_m2_div4_ck",
+       .prcm           = {
+               .omap4  = {
+                       .modulemode     = MODULEMODE_SWCTRL,
+               },
+       },
+};
+
+struct omap_hwmod am33xx_uart4_hwmod = {
+       .name           = "uart4",
+       .class          = &uart_class,
+       .clkdm_name     = "l4ls_clkdm",
+       .flags          = HWMOD_SWSUP_SIDLE_ACT,
+       .main_clk       = "dpll_per_m2_div4_ck",
+       .prcm           = {
+               .omap4  = {
+                       .modulemode     = MODULEMODE_SWCTRL,
+               },
+       },
+};
+
+struct omap_hwmod am33xx_uart5_hwmod = {
+       .name           = "uart5",
+       .class          = &uart_class,
+       .clkdm_name     = "l4ls_clkdm",
+       .flags          = HWMOD_SWSUP_SIDLE_ACT,
+       .main_clk       = "dpll_per_m2_div4_ck",
+       .prcm           = {
+               .omap4  = {
+                       .modulemode     = MODULEMODE_SWCTRL,
+               },
+       },
+};
+
+struct omap_hwmod am33xx_uart6_hwmod = {
+       .name           = "uart6",
+       .class          = &uart_class,
+       .clkdm_name     = "l4ls_clkdm",
+       .flags          = HWMOD_SWSUP_SIDLE_ACT,
+       .main_clk       = "dpll_per_m2_div4_ck",
+       .prcm           = {
+               .omap4  = {
+                       .modulemode     = MODULEMODE_SWCTRL,
+               },
+       },
+};
+
+/* 'wd_timer' class */
+static struct omap_hwmod_class_sysconfig wdt_sysc = {
+       .rev_offs       = 0x0,
+       .sysc_offs      = 0x10,
+       .syss_offs      = 0x14,
+       .sysc_flags     = (SYSC_HAS_EMUFREE | SYSC_HAS_SIDLEMODE |
+                       SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
+       .idlemodes      = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
+                       SIDLE_SMART_WKUP),
+       .sysc_fields    = &omap_hwmod_sysc_type1,
+};
+
+static struct omap_hwmod_class am33xx_wd_timer_hwmod_class = {
+       .name           = "wd_timer",
+       .sysc           = &wdt_sysc,
+       .pre_shutdown   = &omap2_wd_timer_disable,
+};
+
+/*
+ * XXX: device.c file uses hardcoded name for watchdog timer
+ * driver "wd_timer2, so we are also using same name as of now...
+ */
+struct omap_hwmod am33xx_wd_timer1_hwmod = {
+       .name           = "wd_timer2",
+       .class          = &am33xx_wd_timer_hwmod_class,
+       .clkdm_name     = "l4_wkup_clkdm",
+       .flags          = HWMOD_SWSUP_SIDLE,
+       .main_clk       = "wdt1_fck",
+       .prcm           = {
+               .omap4  = {
+                       .modulemode     = MODULEMODE_SWCTRL,
+               },
+       },
+};
+
+static void omap_hwmod_am33xx_clkctrl(void)
+{
+       CLKCTRL(am33xx_uart2_hwmod, AM33XX_CM_PER_UART1_CLKCTRL_OFFSET);
+       CLKCTRL(am33xx_uart3_hwmod, AM33XX_CM_PER_UART2_CLKCTRL_OFFSET);
+       CLKCTRL(am33xx_uart4_hwmod, AM33XX_CM_PER_UART3_CLKCTRL_OFFSET);
+       CLKCTRL(am33xx_uart5_hwmod, AM33XX_CM_PER_UART4_CLKCTRL_OFFSET);
+       CLKCTRL(am33xx_uart6_hwmod, AM33XX_CM_PER_UART5_CLKCTRL_OFFSET);
+       CLKCTRL(am33xx_dcan0_hwmod, AM33XX_CM_PER_DCAN0_CLKCTRL_OFFSET);
+       CLKCTRL(am33xx_dcan1_hwmod, AM33XX_CM_PER_DCAN1_CLKCTRL_OFFSET);
+       CLKCTRL(am33xx_elm_hwmod, AM33XX_CM_PER_ELM_CLKCTRL_OFFSET);
+       CLKCTRL(am33xx_epwmss0_hwmod, AM33XX_CM_PER_EPWMSS0_CLKCTRL_OFFSET);
+       CLKCTRL(am33xx_epwmss1_hwmod, AM33XX_CM_PER_EPWMSS1_CLKCTRL_OFFSET);
+       CLKCTRL(am33xx_epwmss2_hwmod, AM33XX_CM_PER_EPWMSS2_CLKCTRL_OFFSET);
+       CLKCTRL(am33xx_gpio1_hwmod, AM33XX_CM_PER_GPIO1_CLKCTRL_OFFSET);
+       CLKCTRL(am33xx_gpio2_hwmod, AM33XX_CM_PER_GPIO2_CLKCTRL_OFFSET);
+       CLKCTRL(am33xx_gpio3_hwmod, AM33XX_CM_PER_GPIO3_CLKCTRL_OFFSET);
+       CLKCTRL(am33xx_i2c2_hwmod, AM33XX_CM_PER_I2C1_CLKCTRL_OFFSET);
+       CLKCTRL(am33xx_i2c3_hwmod, AM33XX_CM_PER_I2C2_CLKCTRL_OFFSET);
+       CLKCTRL(am33xx_mailbox_hwmod, AM33XX_CM_PER_MAILBOX0_CLKCTRL_OFFSET);
+       CLKCTRL(am33xx_mcasp0_hwmod, AM33XX_CM_PER_MCASP0_CLKCTRL_OFFSET);
+       CLKCTRL(am33xx_mcasp1_hwmod, AM33XX_CM_PER_MCASP1_CLKCTRL_OFFSET);
+       CLKCTRL(am33xx_mmc0_hwmod, AM33XX_CM_PER_MMC0_CLKCTRL_OFFSET);
+       CLKCTRL(am33xx_mmc1_hwmod, AM33XX_CM_PER_MMC1_CLKCTRL_OFFSET);
+       CLKCTRL(am33xx_spi0_hwmod, AM33XX_CM_PER_SPI0_CLKCTRL_OFFSET);
+       CLKCTRL(am33xx_spi1_hwmod, AM33XX_CM_PER_SPI1_CLKCTRL_OFFSET);
+       CLKCTRL(am33xx_spinlock_hwmod, AM33XX_CM_PER_SPINLOCK_CLKCTRL_OFFSET);
+       CLKCTRL(am33xx_timer2_hwmod, AM33XX_CM_PER_TIMER2_CLKCTRL_OFFSET);
+       CLKCTRL(am33xx_timer3_hwmod, AM33XX_CM_PER_TIMER3_CLKCTRL_OFFSET);
+       CLKCTRL(am33xx_timer4_hwmod, AM33XX_CM_PER_TIMER4_CLKCTRL_OFFSET);
+       CLKCTRL(am33xx_timer5_hwmod, AM33XX_CM_PER_TIMER5_CLKCTRL_OFFSET);
+       CLKCTRL(am33xx_timer6_hwmod, AM33XX_CM_PER_TIMER6_CLKCTRL_OFFSET);
+       CLKCTRL(am33xx_timer7_hwmod, AM33XX_CM_PER_TIMER7_CLKCTRL_OFFSET);
+       CLKCTRL(am33xx_smartreflex0_hwmod,
+               AM33XX_CM_WKUP_SMARTREFLEX0_CLKCTRL_OFFSET);
+       CLKCTRL(am33xx_smartreflex1_hwmod,
+               AM33XX_CM_WKUP_SMARTREFLEX1_CLKCTRL_OFFSET);
+       CLKCTRL(am33xx_uart1_hwmod, AM33XX_CM_WKUP_UART0_CLKCTRL_OFFSET);
+       CLKCTRL(am33xx_timer1_hwmod, AM33XX_CM_WKUP_TIMER1_CLKCTRL_OFFSET);
+       CLKCTRL(am33xx_i2c1_hwmod, AM33XX_CM_WKUP_I2C0_CLKCTRL_OFFSET);
+       CLKCTRL(am33xx_wd_timer1_hwmod, AM33XX_CM_WKUP_WDT1_CLKCTRL_OFFSET);
+       CLKCTRL(am33xx_rtc_hwmod, AM33XX_CM_RTC_RTC_CLKCTRL_OFFSET);
+       CLKCTRL(am33xx_mmc2_hwmod, AM33XX_CM_PER_MMC2_CLKCTRL_OFFSET);
+       CLKCTRL(am33xx_gpmc_hwmod, AM33XX_CM_PER_GPMC_CLKCTRL_OFFSET);
+       CLKCTRL(am33xx_l4_ls_hwmod, AM33XX_CM_PER_L4LS_CLKCTRL_OFFSET);
+       CLKCTRL(am33xx_l4_wkup_hwmod, AM33XX_CM_WKUP_L4WKUP_CLKCTRL_OFFSET);
+       CLKCTRL(am33xx_l3_main_hwmod, AM33XX_CM_PER_L3_CLKCTRL_OFFSET);
+       CLKCTRL(am33xx_tpcc_hwmod, AM33XX_CM_PER_TPCC_CLKCTRL_OFFSET);
+       CLKCTRL(am33xx_tptc0_hwmod, AM33XX_CM_PER_TPTC0_CLKCTRL_OFFSET);
+       CLKCTRL(am33xx_tptc1_hwmod, AM33XX_CM_PER_TPTC1_CLKCTRL_OFFSET);
+       CLKCTRL(am33xx_tptc2_hwmod, AM33XX_CM_PER_TPTC2_CLKCTRL_OFFSET);
+       CLKCTRL(am33xx_gfx_hwmod, AM33XX_CM_GFX_GFX_CLKCTRL_OFFSET);
+       CLKCTRL(am33xx_cpgmac0_hwmod, AM33XX_CM_PER_CPGMAC0_CLKCTRL_OFFSET);
+       CLKCTRL(am33xx_pruss_hwmod, AM33XX_CM_PER_PRUSS_CLKCTRL_OFFSET);
+       CLKCTRL(am33xx_mpu_hwmod , AM33XX_CM_MPU_MPU_CLKCTRL_OFFSET);
+       CLKCTRL(am33xx_l3_instr_hwmod , AM33XX_CM_PER_L3_INSTR_CLKCTRL_OFFSET);
+       CLKCTRL(am33xx_ocmcram_hwmod , AM33XX_CM_PER_OCMCRAM_CLKCTRL_OFFSET);
+       CLKCTRL(am33xx_sha0_hwmod , AM33XX_CM_PER_SHA0_CLKCTRL_OFFSET);
+       CLKCTRL(am33xx_aes0_hwmod , AM33XX_CM_PER_AES0_CLKCTRL_OFFSET);
+}
+
+static void omap_hwmod_am33xx_rst(void)
+{
+       RSTCTRL(am33xx_pruss_hwmod, AM33XX_RM_PER_RSTCTRL_OFFSET);
+       RSTCTRL(am33xx_gfx_hwmod, AM33XX_RM_GFX_RSTCTRL_OFFSET);
+       RSTST(am33xx_gfx_hwmod, AM33XX_RM_GFX_RSTST_OFFSET);
+}
+
+void omap_hwmod_am33xx_reg(void)
+{
+       omap_hwmod_am33xx_clkctrl();
+       omap_hwmod_am33xx_rst();
+}
+
+static void omap_hwmod_am43xx_clkctrl(void)
+{
+       CLKCTRL(am33xx_uart2_hwmod, AM43XX_CM_PER_UART1_CLKCTRL_OFFSET);
+       CLKCTRL(am33xx_uart3_hwmod, AM43XX_CM_PER_UART2_CLKCTRL_OFFSET);
+       CLKCTRL(am33xx_uart4_hwmod, AM43XX_CM_PER_UART3_CLKCTRL_OFFSET);
+       CLKCTRL(am33xx_uart5_hwmod, AM43XX_CM_PER_UART4_CLKCTRL_OFFSET);
+       CLKCTRL(am33xx_uart6_hwmod, AM43XX_CM_PER_UART5_CLKCTRL_OFFSET);
+       CLKCTRL(am33xx_dcan0_hwmod, AM43XX_CM_PER_DCAN0_CLKCTRL_OFFSET);
+       CLKCTRL(am33xx_dcan1_hwmod, AM43XX_CM_PER_DCAN1_CLKCTRL_OFFSET);
+       CLKCTRL(am33xx_elm_hwmod, AM43XX_CM_PER_ELM_CLKCTRL_OFFSET);
+       CLKCTRL(am33xx_epwmss0_hwmod, AM43XX_CM_PER_EPWMSS0_CLKCTRL_OFFSET);
+       CLKCTRL(am33xx_epwmss1_hwmod, AM43XX_CM_PER_EPWMSS1_CLKCTRL_OFFSET);
+       CLKCTRL(am33xx_epwmss2_hwmod, AM43XX_CM_PER_EPWMSS2_CLKCTRL_OFFSET);
+       CLKCTRL(am33xx_gpio1_hwmod, AM43XX_CM_PER_GPIO1_CLKCTRL_OFFSET);
+       CLKCTRL(am33xx_gpio2_hwmod, AM43XX_CM_PER_GPIO2_CLKCTRL_OFFSET);
+       CLKCTRL(am33xx_gpio3_hwmod, AM43XX_CM_PER_GPIO3_CLKCTRL_OFFSET);
+       CLKCTRL(am33xx_i2c2_hwmod, AM43XX_CM_PER_I2C1_CLKCTRL_OFFSET);
+       CLKCTRL(am33xx_i2c3_hwmod, AM43XX_CM_PER_I2C2_CLKCTRL_OFFSET);
+       CLKCTRL(am33xx_mailbox_hwmod, AM43XX_CM_PER_MAILBOX0_CLKCTRL_OFFSET);
+       CLKCTRL(am33xx_mcasp0_hwmod, AM43XX_CM_PER_MCASP0_CLKCTRL_OFFSET);
+       CLKCTRL(am33xx_mcasp1_hwmod, AM43XX_CM_PER_MCASP1_CLKCTRL_OFFSET);
+       CLKCTRL(am33xx_mmc0_hwmod, AM43XX_CM_PER_MMC0_CLKCTRL_OFFSET);
+       CLKCTRL(am33xx_mmc1_hwmod, AM43XX_CM_PER_MMC1_CLKCTRL_OFFSET);
+       CLKCTRL(am33xx_spi0_hwmod, AM43XX_CM_PER_SPI0_CLKCTRL_OFFSET);
+       CLKCTRL(am33xx_spi1_hwmod, AM43XX_CM_PER_SPI1_CLKCTRL_OFFSET);
+       CLKCTRL(am33xx_spinlock_hwmod, AM43XX_CM_PER_SPINLOCK_CLKCTRL_OFFSET);
+       CLKCTRL(am33xx_timer2_hwmod, AM43XX_CM_PER_TIMER2_CLKCTRL_OFFSET);
+       CLKCTRL(am33xx_timer3_hwmod, AM43XX_CM_PER_TIMER3_CLKCTRL_OFFSET);
+       CLKCTRL(am33xx_timer4_hwmod, AM43XX_CM_PER_TIMER4_CLKCTRL_OFFSET);
+       CLKCTRL(am33xx_timer5_hwmod, AM43XX_CM_PER_TIMER5_CLKCTRL_OFFSET);
+       CLKCTRL(am33xx_timer6_hwmod, AM43XX_CM_PER_TIMER6_CLKCTRL_OFFSET);
+       CLKCTRL(am33xx_timer7_hwmod, AM43XX_CM_PER_TIMER7_CLKCTRL_OFFSET);
+       CLKCTRL(am33xx_smartreflex0_hwmod,
+               AM43XX_CM_WKUP_SMARTREFLEX0_CLKCTRL_OFFSET);
+       CLKCTRL(am33xx_smartreflex1_hwmod,
+               AM43XX_CM_WKUP_SMARTREFLEX1_CLKCTRL_OFFSET);
+       CLKCTRL(am33xx_uart1_hwmod, AM43XX_CM_WKUP_UART0_CLKCTRL_OFFSET);
+       CLKCTRL(am33xx_timer1_hwmod, AM43XX_CM_WKUP_TIMER1_CLKCTRL_OFFSET);
+       CLKCTRL(am33xx_i2c1_hwmod, AM43XX_CM_WKUP_I2C0_CLKCTRL_OFFSET);
+       CLKCTRL(am33xx_wd_timer1_hwmod, AM43XX_CM_WKUP_WDT1_CLKCTRL_OFFSET);
+       CLKCTRL(am33xx_rtc_hwmod, AM43XX_CM_RTC_RTC_CLKCTRL_OFFSET);
+       CLKCTRL(am33xx_mmc2_hwmod, AM43XX_CM_PER_MMC2_CLKCTRL_OFFSET);
+       CLKCTRL(am33xx_gpmc_hwmod, AM43XX_CM_PER_GPMC_CLKCTRL_OFFSET);
+       CLKCTRL(am33xx_l4_ls_hwmod, AM43XX_CM_PER_L4LS_CLKCTRL_OFFSET);
+       CLKCTRL(am33xx_l4_wkup_hwmod, AM43XX_CM_WKUP_L4WKUP_CLKCTRL_OFFSET);
+       CLKCTRL(am33xx_l3_main_hwmod, AM43XX_CM_PER_L3_CLKCTRL_OFFSET);
+       CLKCTRL(am33xx_tpcc_hwmod, AM43XX_CM_PER_TPCC_CLKCTRL_OFFSET);
+       CLKCTRL(am33xx_tptc0_hwmod, AM43XX_CM_PER_TPTC0_CLKCTRL_OFFSET);
+       CLKCTRL(am33xx_tptc1_hwmod, AM43XX_CM_PER_TPTC1_CLKCTRL_OFFSET);
+       CLKCTRL(am33xx_tptc2_hwmod, AM43XX_CM_PER_TPTC2_CLKCTRL_OFFSET);
+       CLKCTRL(am33xx_gfx_hwmod, AM43XX_CM_GFX_GFX_CLKCTRL_OFFSET);
+       CLKCTRL(am33xx_cpgmac0_hwmod, AM43XX_CM_PER_CPGMAC0_CLKCTRL_OFFSET);
+       CLKCTRL(am33xx_pruss_hwmod, AM43XX_CM_PER_PRUSS_CLKCTRL_OFFSET);
+       CLKCTRL(am33xx_mpu_hwmod , AM43XX_CM_MPU_MPU_CLKCTRL_OFFSET);
+       CLKCTRL(am33xx_l3_instr_hwmod , AM43XX_CM_PER_L3_INSTR_CLKCTRL_OFFSET);
+       CLKCTRL(am33xx_ocmcram_hwmod , AM43XX_CM_PER_OCMCRAM_CLKCTRL_OFFSET);
+       CLKCTRL(am33xx_sha0_hwmod , AM43XX_CM_PER_SHA0_CLKCTRL_OFFSET);
+       CLKCTRL(am33xx_aes0_hwmod , AM43XX_CM_PER_AES0_CLKCTRL_OFFSET);
+}
+
+static void omap_hwmod_am43xx_rst(void)
+{
+       RSTCTRL(am33xx_pruss_hwmod, AM43XX_RM_PER_RSTCTRL_OFFSET);
+       RSTCTRL(am33xx_gfx_hwmod, AM43XX_RM_GFX_RSTCTRL_OFFSET);
+       RSTST(am33xx_gfx_hwmod, AM43XX_RM_GFX_RSTST_OFFSET);
+}
+
+void omap_hwmod_am43xx_reg(void)
+{
+       omap_hwmod_am43xx_clkctrl();
+       omap_hwmod_am43xx_rst();
+}
index 215894f8910d407d30eac10f23b22ee0ee003fb1..6b406ca4bd3b49769884ce1534c1d132e224957a 100644 (file)
@@ -29,6 +29,7 @@
 #include "i2c.h"
 #include "mmc.h"
 #include "wd_timer.h"
+#include "omap_hwmod_33xx_43xx_common_data.h"
 
 /*
  * IP blocks
@@ -52,7 +53,7 @@ static struct omap_hwmod am33xx_emif_hwmod = {
        .name           = "emif",
        .class          = &am33xx_emif_hwmod_class,
        .clkdm_name     = "l3_clkdm",
-       .flags          = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET),
+       .flags          = HWMOD_INIT_NO_IDLE,
        .main_clk       = "dpll_ddr_m2_div2_ck",
        .prcm           = {
                .omap4  = {
@@ -62,79 +63,12 @@ static struct omap_hwmod am33xx_emif_hwmod = {
        },
 };
 
-/*
- * 'l3' class
- * instance(s): l3_main, l3_s, l3_instr
- */
-static struct omap_hwmod_class am33xx_l3_hwmod_class = {
-       .name           = "l3",
-};
-
-static struct omap_hwmod am33xx_l3_main_hwmod = {
-       .name           = "l3_main",
-       .class          = &am33xx_l3_hwmod_class,
-       .clkdm_name     = "l3_clkdm",
-       .flags          = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET),
-       .main_clk       = "l3_gclk",
-       .prcm           = {
-               .omap4  = {
-                       .clkctrl_offs   = AM33XX_CM_PER_L3_CLKCTRL_OFFSET,
-                       .modulemode     = MODULEMODE_SWCTRL,
-               },
-       },
-};
-
-/* l3_s */
-static struct omap_hwmod am33xx_l3_s_hwmod = {
-       .name           = "l3_s",
-       .class          = &am33xx_l3_hwmod_class,
-       .clkdm_name     = "l3s_clkdm",
-};
-
-/* l3_instr */
-static struct omap_hwmod am33xx_l3_instr_hwmod = {
-       .name           = "l3_instr",
-       .class          = &am33xx_l3_hwmod_class,
-       .clkdm_name     = "l3_clkdm",
-       .flags          = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET),
-       .main_clk       = "l3_gclk",
-       .prcm           = {
-               .omap4  = {
-                       .clkctrl_offs   = AM33XX_CM_PER_L3_INSTR_CLKCTRL_OFFSET,
-                       .modulemode     = MODULEMODE_SWCTRL,
-               },
-       },
-};
-
-/*
- * 'l4' class
- * instance(s): l4_ls, l4_hs, l4_wkup, l4_fw
- */
-static struct omap_hwmod_class am33xx_l4_hwmod_class = {
-       .name           = "l4",
-};
-
-/* l4_ls */
-static struct omap_hwmod am33xx_l4_ls_hwmod = {
-       .name           = "l4_ls",
-       .class          = &am33xx_l4_hwmod_class,
-       .clkdm_name     = "l4ls_clkdm",
-       .flags          = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET),
-       .main_clk       = "l4ls_gclk",
-       .prcm           = {
-               .omap4  = {
-                       .clkctrl_offs   = AM33XX_CM_PER_L4LS_CLKCTRL_OFFSET,
-                       .modulemode     = MODULEMODE_SWCTRL,
-               },
-       },
-};
-
 /* l4_hs */
 static struct omap_hwmod am33xx_l4_hs_hwmod = {
        .name           = "l4_hs",
        .class          = &am33xx_l4_hwmod_class,
        .clkdm_name     = "l4hs_clkdm",
-       .flags          = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET),
+       .flags          = HWMOD_INIT_NO_IDLE,
        .main_clk       = "l4hs_gclk",
        .prcm           = {
                .omap4  = {
@@ -144,50 +78,6 @@ static struct omap_hwmod am33xx_l4_hs_hwmod = {
        },
 };
 
-
-/* l4_wkup */
-static struct omap_hwmod am33xx_l4_wkup_hwmod = {
-       .name           = "l4_wkup",
-       .class          = &am33xx_l4_hwmod_class,
-       .clkdm_name     = "l4_wkup_clkdm",
-       .flags          = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET),
-       .prcm           = {
-               .omap4  = {
-                       .clkctrl_offs   = AM33XX_CM_WKUP_L4WKUP_CLKCTRL_OFFSET,
-                       .modulemode     = MODULEMODE_SWCTRL,
-               },
-       },
-};
-
-/*
- * 'mpu' class
- */
-static struct omap_hwmod_class am33xx_mpu_hwmod_class = {
-       .name   = "mpu",
-};
-
-static struct omap_hwmod am33xx_mpu_hwmod = {
-       .name           = "mpu",
-       .class          = &am33xx_mpu_hwmod_class,
-       .clkdm_name     = "mpu_clkdm",
-       .flags          = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET),
-       .main_clk       = "dpll_mpu_m2_ck",
-       .prcm           = {
-               .omap4  = {
-                       .clkctrl_offs   = AM33XX_CM_MPU_MPU_CLKCTRL_OFFSET,
-                       .modulemode     = MODULEMODE_SWCTRL,
-               },
-       },
-};
-
-/*
- * 'wakeup m3' class
- * Wakeup controller sub-system under wakeup domain
- */
-static struct omap_hwmod_class am33xx_wkup_m3_hwmod_class = {
-       .name           = "wkup_m3",
-};
-
 static struct omap_hwmod_rst_info am33xx_wkup_m3_resets[] = {
        { .name = "wkup_m3", .rst_shift = 3, .st_shift = 5 },
 };
@@ -212,78 +102,6 @@ static struct omap_hwmod am33xx_wkup_m3_hwmod = {
        .rst_lines_cnt  = ARRAY_SIZE(am33xx_wkup_m3_resets),
 };
 
-/*
- * 'pru-icss' class
- * Programmable Real-Time Unit and Industrial Communication Subsystem
- */
-static struct omap_hwmod_class am33xx_pruss_hwmod_class = {
-       .name   = "pruss",
-};
-
-static struct omap_hwmod_rst_info am33xx_pruss_resets[] = {
-       { .name = "pruss", .rst_shift = 1 },
-};
-
-/* pru-icss */
-/* Pseudo hwmod for reset control purpose only */
-static struct omap_hwmod am33xx_pruss_hwmod = {
-       .name           = "pruss",
-       .class          = &am33xx_pruss_hwmod_class,
-       .clkdm_name     = "pruss_ocp_clkdm",
-       .main_clk       = "pruss_ocp_gclk",
-       .prcm           = {
-               .omap4  = {
-                       .clkctrl_offs   = AM33XX_CM_PER_PRUSS_CLKCTRL_OFFSET,
-                       .rstctrl_offs   = AM33XX_RM_PER_RSTCTRL_OFFSET,
-                       .modulemode     = MODULEMODE_SWCTRL,
-               },
-       },
-       .rst_lines      = am33xx_pruss_resets,
-       .rst_lines_cnt  = ARRAY_SIZE(am33xx_pruss_resets),
-};
-
-/* gfx */
-/* Pseudo hwmod for reset control purpose only */
-static struct omap_hwmod_class am33xx_gfx_hwmod_class = {
-       .name   = "gfx",
-};
-
-static struct omap_hwmod_rst_info am33xx_gfx_resets[] = {
-       { .name = "gfx", .rst_shift = 0, .st_shift = 0},
-};
-
-static struct omap_hwmod am33xx_gfx_hwmod = {
-       .name           = "gfx",
-       .class          = &am33xx_gfx_hwmod_class,
-       .clkdm_name     = "gfx_l3_clkdm",
-       .main_clk       = "gfx_fck_div_ck",
-       .prcm           = {
-               .omap4  = {
-                       .clkctrl_offs   = AM33XX_CM_GFX_GFX_CLKCTRL_OFFSET,
-                       .rstctrl_offs   = AM33XX_RM_GFX_RSTCTRL_OFFSET,
-                       .rstst_offs     = AM33XX_RM_GFX_RSTST_OFFSET,
-                       .modulemode     = MODULEMODE_SWCTRL,
-               },
-       },
-       .rst_lines      = am33xx_gfx_resets,
-       .rst_lines_cnt  = ARRAY_SIZE(am33xx_gfx_resets),
-};
-
-/*
- * 'prcm' class
- * power and reset manager (whole prcm infrastructure)
- */
-static struct omap_hwmod_class am33xx_prcm_hwmod_class = {
-       .name   = "prcm",
-};
-
-/* prcm */
-static struct omap_hwmod am33xx_prcm_hwmod = {
-       .name           = "prcm",
-       .class          = &am33xx_prcm_hwmod_class,
-       .clkdm_name     = "l4_wkup_clkdm",
-};
-
 /*
  * 'adc/tsc' class
  * TouchScreen Controller (Anolog-To-Digital Converter)
@@ -387,79 +205,6 @@ static struct omap_hwmod am33xx_ocpwp_hwmod = {
 };
 #endif
 
-/*
- * 'aes0' class
- */
-static struct omap_hwmod_class_sysconfig am33xx_aes0_sysc = {
-       .rev_offs       = 0x80,
-       .sysc_offs      = 0x84,
-       .syss_offs      = 0x88,
-       .sysc_flags     = SYSS_HAS_RESET_STATUS,
-};
-
-static struct omap_hwmod_class am33xx_aes0_hwmod_class = {
-       .name           = "aes0",
-       .sysc           = &am33xx_aes0_sysc,
-};
-
-static struct omap_hwmod am33xx_aes0_hwmod = {
-       .name           = "aes",
-       .class          = &am33xx_aes0_hwmod_class,
-       .clkdm_name     = "l3_clkdm",
-       .main_clk       = "aes0_fck",
-       .prcm           = {
-               .omap4  = {
-                       .clkctrl_offs   = AM33XX_CM_PER_AES0_CLKCTRL_OFFSET,
-                       .modulemode     = MODULEMODE_SWCTRL,
-               },
-       },
-};
-
-/* sha0 HIB2 (the 'P' (public) device) */
-static struct omap_hwmod_class_sysconfig am33xx_sha0_sysc = {
-       .rev_offs       = 0x100,
-       .sysc_offs      = 0x110,
-       .syss_offs      = 0x114,
-       .sysc_flags     = SYSS_HAS_RESET_STATUS,
-};
-
-static struct omap_hwmod_class am33xx_sha0_hwmod_class = {
-       .name           = "sha0",
-       .sysc           = &am33xx_sha0_sysc,
-};
-
-static struct omap_hwmod am33xx_sha0_hwmod = {
-       .name           = "sham",
-       .class          = &am33xx_sha0_hwmod_class,
-       .clkdm_name     = "l3_clkdm",
-       .main_clk       = "l3_gclk",
-       .prcm           = {
-               .omap4  = {
-                       .clkctrl_offs   = AM33XX_CM_PER_SHA0_CLKCTRL_OFFSET,
-                       .modulemode     = MODULEMODE_SWCTRL,
-               },
-       },
-};
-
-/* ocmcram */
-static struct omap_hwmod_class am33xx_ocmcram_hwmod_class = {
-       .name = "ocmcram",
-};
-
-static struct omap_hwmod am33xx_ocmcram_hwmod = {
-       .name           = "ocmcram",
-       .class          = &am33xx_ocmcram_hwmod_class,
-       .clkdm_name     = "l3_clkdm",
-       .flags          = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET),
-       .main_clk       = "l3_gclk",
-       .prcm           = {
-               .omap4  = {
-                       .clkctrl_offs   = AM33XX_CM_PER_OCMCRAM_CLKCTRL_OFFSET,
-                       .modulemode     = MODULEMODE_SWCTRL,
-               },
-       },
-};
-
 /*
  * 'debugss' class
  * debug sub system
@@ -488,1619 +233,236 @@ static struct omap_hwmod am33xx_debugss_hwmod = {
        .opt_clks_cnt   = ARRAY_SIZE(debugss_opt_clks),
 };
 
-/* 'smartreflex' class */
-static struct omap_hwmod_class am33xx_smartreflex_hwmod_class = {
-       .name           = "smartreflex",
-};
-
-/* smartreflex0 */
-static struct omap_hwmod am33xx_smartreflex0_hwmod = {
-       .name           = "smartreflex0",
-       .class          = &am33xx_smartreflex_hwmod_class,
+static struct omap_hwmod am33xx_control_hwmod = {
+       .name           = "control",
+       .class          = &am33xx_control_hwmod_class,
        .clkdm_name     = "l4_wkup_clkdm",
-       .main_clk       = "smartreflex0_fck",
+       .flags          = HWMOD_INIT_NO_IDLE,
+       .main_clk       = "dpll_core_m4_div2_ck",
        .prcm           = {
                .omap4  = {
-                       .clkctrl_offs   = AM33XX_CM_WKUP_SMARTREFLEX0_CLKCTRL_OFFSET,
+                       .clkctrl_offs   = AM33XX_CM_WKUP_CONTROL_CLKCTRL_OFFSET,
                        .modulemode     = MODULEMODE_SWCTRL,
                },
        },
 };
 
-/* smartreflex1 */
-static struct omap_hwmod am33xx_smartreflex1_hwmod = {
-       .name           = "smartreflex1",
-       .class          = &am33xx_smartreflex_hwmod_class,
+/* gpio0 */
+static struct omap_hwmod_opt_clk gpio0_opt_clks[] = {
+       { .role = "dbclk", .clk = "gpio0_dbclk" },
+};
+
+static struct omap_hwmod am33xx_gpio0_hwmod = {
+       .name           = "gpio1",
+       .class          = &am33xx_gpio_hwmod_class,
        .clkdm_name     = "l4_wkup_clkdm",
-       .main_clk       = "smartreflex1_fck",
+       .flags          = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
+       .main_clk       = "dpll_core_m4_div2_ck",
        .prcm           = {
                .omap4  = {
-                       .clkctrl_offs   = AM33XX_CM_WKUP_SMARTREFLEX1_CLKCTRL_OFFSET,
+                       .clkctrl_offs   = AM33XX_CM_WKUP_GPIO0_CLKCTRL_OFFSET,
                        .modulemode     = MODULEMODE_SWCTRL,
                },
        },
+       .opt_clks       = gpio0_opt_clks,
+       .opt_clks_cnt   = ARRAY_SIZE(gpio0_opt_clks),
+       .dev_attr       = &gpio_dev_attr,
 };
 
-/*
- * 'control' module class
- */
-static struct omap_hwmod_class am33xx_control_hwmod_class = {
-       .name           = "control",
+/* lcdc */
+static struct omap_hwmod_class_sysconfig lcdc_sysc = {
+       .rev_offs       = 0x0,
+       .sysc_offs      = 0x54,
+       .sysc_flags     = (SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE),
+       .idlemodes      = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
+       .sysc_fields    = &omap_hwmod_sysc_type2,
 };
 
-static struct omap_hwmod am33xx_control_hwmod = {
-       .name           = "control",
-       .class          = &am33xx_control_hwmod_class,
-       .clkdm_name     = "l4_wkup_clkdm",
-       .flags          = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET),
-       .main_clk       = "dpll_core_m4_div2_ck",
+static struct omap_hwmod_class am33xx_lcdc_hwmod_class = {
+       .name           = "lcdc",
+       .sysc           = &lcdc_sysc,
+};
+
+static struct omap_hwmod am33xx_lcdc_hwmod = {
+       .name           = "lcdc",
+       .class          = &am33xx_lcdc_hwmod_class,
+       .clkdm_name     = "lcdc_clkdm",
+       .flags          = HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY,
+       .main_clk       = "lcd_gclk",
        .prcm           = {
                .omap4  = {
-                       .clkctrl_offs   = AM33XX_CM_WKUP_CONTROL_CLKCTRL_OFFSET,
+                       .clkctrl_offs   = AM33XX_CM_PER_LCDC_CLKCTRL_OFFSET,
                        .modulemode     = MODULEMODE_SWCTRL,
                },
        },
 };
 
 /*
- * 'cpgmac' class
- * cpsw/cpgmac sub system
+ * 'usb_otg' class
+ * high-speed on-the-go universal serial bus (usb_otg) controller
  */
-static struct omap_hwmod_class_sysconfig am33xx_cpgmac_sysc = {
+static struct omap_hwmod_class_sysconfig am33xx_usbhsotg_sysc = {
        .rev_offs       = 0x0,
-       .sysc_offs      = 0x8,
-       .syss_offs      = 0x4,
-       .sysc_flags     = (SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE |
-                          SYSS_HAS_RESET_STATUS),
-       .idlemodes      = (SIDLE_FORCE | SIDLE_NO | MSTANDBY_FORCE |
-                          MSTANDBY_NO),
-       .sysc_fields    = &omap_hwmod_sysc_type3,
+       .sysc_offs      = 0x10,
+       .sysc_flags     = (SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE),
+       .idlemodes      = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
+                         MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
+       .sysc_fields    = &omap_hwmod_sysc_type2,
 };
 
-static struct omap_hwmod_class am33xx_cpgmac0_hwmod_class = {
-       .name           = "cpgmac0",
-       .sysc           = &am33xx_cpgmac_sysc,
+static struct omap_hwmod_class am33xx_usbotg_class = {
+       .name           = "usbotg",
+       .sysc           = &am33xx_usbhsotg_sysc,
 };
 
-static struct omap_hwmod am33xx_cpgmac0_hwmod = {
-       .name           = "cpgmac0",
-       .class          = &am33xx_cpgmac0_hwmod_class,
-       .clkdm_name     = "cpsw_125mhz_clkdm",
-       .flags          = (HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY),
-       .main_clk       = "cpsw_125mhz_gclk",
-       .mpu_rt_idx     = 1,
+static struct omap_hwmod am33xx_usbss_hwmod = {
+       .name           = "usb_otg_hs",
+       .class          = &am33xx_usbotg_class,
+       .clkdm_name     = "l3s_clkdm",
+       .flags          = HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY,
+       .main_clk       = "usbotg_fck",
        .prcm           = {
                .omap4  = {
-                       .clkctrl_offs   = AM33XX_CM_PER_CPGMAC0_CLKCTRL_OFFSET,
+                       .clkctrl_offs   = AM33XX_CM_PER_USB0_CLKCTRL_OFFSET,
                        .modulemode     = MODULEMODE_SWCTRL,
                },
        },
 };
 
+
 /*
- * mdio class
+ * Interfaces
  */
-static struct omap_hwmod_class am33xx_mdio_hwmod_class = {
-       .name           = "davinci_mdio",
-};
 
-static struct omap_hwmod am33xx_mdio_hwmod = {
-       .name           = "davinci_mdio",
-       .class          = &am33xx_mdio_hwmod_class,
-       .clkdm_name     = "cpsw_125mhz_clkdm",
-       .main_clk       = "cpsw_125mhz_gclk",
+static struct omap_hwmod_addr_space am33xx_emif_addrs[] = {
+       {
+               .pa_start       = 0x4c000000,
+               .pa_end         = 0x4c000fff,
+               .flags          = ADDR_TYPE_RT
+       },
+       { }
 };
-
-/*
- * dcan class
- */
-static struct omap_hwmod_class am33xx_dcan_hwmod_class = {
-       .name = "d_can",
+/* l3 main -> emif */
+static struct omap_hwmod_ocp_if am33xx_l3_main__emif = {
+       .master         = &am33xx_l3_main_hwmod,
+       .slave          = &am33xx_emif_hwmod,
+       .clk            = "dpll_core_m4_ck",
+       .addr           = am33xx_emif_addrs,
+       .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
-/* dcan0 */
-static struct omap_hwmod am33xx_dcan0_hwmod = {
-       .name           = "d_can0",
-       .class          = &am33xx_dcan_hwmod_class,
-       .clkdm_name     = "l4ls_clkdm",
-       .main_clk       = "dcan0_fck",
-       .prcm           = {
-               .omap4  = {
-                       .clkctrl_offs   = AM33XX_CM_PER_DCAN0_CLKCTRL_OFFSET,
-                       .modulemode     = MODULEMODE_SWCTRL,
-               },
-       },
+/* l3 main -> l4 hs */
+static struct omap_hwmod_ocp_if am33xx_l3_main__l4_hs = {
+       .master         = &am33xx_l3_main_hwmod,
+       .slave          = &am33xx_l4_hs_hwmod,
+       .clk            = "l3s_gclk",
+       .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
-/* dcan1 */
-static struct omap_hwmod am33xx_dcan1_hwmod = {
-       .name           = "d_can1",
-       .class          = &am33xx_dcan_hwmod_class,
-       .clkdm_name     = "l4ls_clkdm",
-       .main_clk       = "dcan1_fck",
-       .prcm           = {
-               .omap4  = {
-                       .clkctrl_offs   = AM33XX_CM_PER_DCAN1_CLKCTRL_OFFSET,
-                       .modulemode     = MODULEMODE_SWCTRL,
-               },
-       },
+/* wkup m3 -> l4 wkup */
+static struct omap_hwmod_ocp_if am33xx_wkup_m3__l4_wkup = {
+       .master         = &am33xx_wkup_m3_hwmod,
+       .slave          = &am33xx_l4_wkup_hwmod,
+       .clk            = "dpll_core_m4_div2_ck",
+       .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
-/* elm */
-static struct omap_hwmod_class_sysconfig am33xx_elm_sysc = {
-       .rev_offs       = 0x0000,
-       .sysc_offs      = 0x0010,
-       .syss_offs      = 0x0014,
-       .sysc_flags     = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
-                       SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE |
-                       SYSS_HAS_RESET_STATUS),
-       .idlemodes      = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
-       .sysc_fields    = &omap_hwmod_sysc_type1,
+/* l4 wkup -> wkup m3 */
+static struct omap_hwmod_ocp_if am33xx_l4_wkup__wkup_m3 = {
+       .master         = &am33xx_l4_wkup_hwmod,
+       .slave          = &am33xx_wkup_m3_hwmod,
+       .clk            = "dpll_core_m4_div2_ck",
+       .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
-static struct omap_hwmod_class am33xx_elm_hwmod_class = {
-       .name           = "elm",
-       .sysc           = &am33xx_elm_sysc,
+/* l4 hs -> pru-icss */
+static struct omap_hwmod_ocp_if am33xx_l4_hs__pruss = {
+       .master         = &am33xx_l4_hs_hwmod,
+       .slave          = &am33xx_pruss_hwmod,
+       .clk            = "dpll_core_m4_ck",
+       .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
-static struct omap_hwmod am33xx_elm_hwmod = {
-       .name           = "elm",
-       .class          = &am33xx_elm_hwmod_class,
-       .clkdm_name     = "l4ls_clkdm",
-       .main_clk       = "l4ls_gclk",
-       .prcm           = {
-               .omap4  = {
-                       .clkctrl_offs   = AM33XX_CM_PER_ELM_CLKCTRL_OFFSET,
-                       .modulemode     = MODULEMODE_SWCTRL,
-               },
-       },
-};
-
-/* pwmss  */
-static struct omap_hwmod_class_sysconfig am33xx_epwmss_sysc = {
-       .rev_offs       = 0x0,
-       .sysc_offs      = 0x4,
-       .sysc_flags     = (SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE),
-       .idlemodes      = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
-                       SIDLE_SMART_WKUP | MSTANDBY_FORCE | MSTANDBY_NO |
-                       MSTANDBY_SMART | MSTANDBY_SMART_WKUP),
-       .sysc_fields    = &omap_hwmod_sysc_type2,
-};
-
-static struct omap_hwmod_class am33xx_epwmss_hwmod_class = {
-       .name           = "epwmss",
-       .sysc           = &am33xx_epwmss_sysc,
-};
-
-static struct omap_hwmod_class am33xx_ecap_hwmod_class = {
-       .name           = "ecap",
-};
-
-static struct omap_hwmod_class am33xx_eqep_hwmod_class = {
-       .name           = "eqep",
-};
-
-static struct omap_hwmod_class am33xx_ehrpwm_hwmod_class = {
-       .name           = "ehrpwm",
-};
-
-/* epwmss0 */
-static struct omap_hwmod am33xx_epwmss0_hwmod = {
-       .name           = "epwmss0",
-       .class          = &am33xx_epwmss_hwmod_class,
-       .clkdm_name     = "l4ls_clkdm",
-       .main_clk       = "l4ls_gclk",
-       .prcm           = {
-               .omap4  = {
-                       .clkctrl_offs   = AM33XX_CM_PER_EPWMSS0_CLKCTRL_OFFSET,
-                       .modulemode     = MODULEMODE_SWCTRL,
-               },
-       },
-};
-
-/* ecap0 */
-static struct omap_hwmod am33xx_ecap0_hwmod = {
-       .name           = "ecap0",
-       .class          = &am33xx_ecap_hwmod_class,
-       .clkdm_name     = "l4ls_clkdm",
-       .main_clk       = "l4ls_gclk",
-};
-
-/* eqep0 */
-static struct omap_hwmod am33xx_eqep0_hwmod = {
-       .name           = "eqep0",
-       .class          = &am33xx_eqep_hwmod_class,
-       .clkdm_name     = "l4ls_clkdm",
-       .main_clk       = "l4ls_gclk",
-};
-
-/* ehrpwm0 */
-static struct omap_hwmod am33xx_ehrpwm0_hwmod = {
-       .name           = "ehrpwm0",
-       .class          = &am33xx_ehrpwm_hwmod_class,
-       .clkdm_name     = "l4ls_clkdm",
-       .main_clk       = "l4ls_gclk",
-};
-
-/* epwmss1 */
-static struct omap_hwmod am33xx_epwmss1_hwmod = {
-       .name           = "epwmss1",
-       .class          = &am33xx_epwmss_hwmod_class,
-       .clkdm_name     = "l4ls_clkdm",
-       .main_clk       = "l4ls_gclk",
-       .prcm           = {
-               .omap4  = {
-                       .clkctrl_offs   = AM33XX_CM_PER_EPWMSS1_CLKCTRL_OFFSET,
-                       .modulemode     = MODULEMODE_SWCTRL,
-               },
-       },
-};
-
-/* ecap1 */
-static struct omap_hwmod am33xx_ecap1_hwmod = {
-       .name           = "ecap1",
-       .class          = &am33xx_ecap_hwmod_class,
-       .clkdm_name     = "l4ls_clkdm",
-       .main_clk       = "l4ls_gclk",
-};
-
-/* eqep1 */
-static struct omap_hwmod am33xx_eqep1_hwmod = {
-       .name           = "eqep1",
-       .class          = &am33xx_eqep_hwmod_class,
-       .clkdm_name     = "l4ls_clkdm",
-       .main_clk       = "l4ls_gclk",
-};
-
-/* ehrpwm1 */
-static struct omap_hwmod am33xx_ehrpwm1_hwmod = {
-       .name           = "ehrpwm1",
-       .class          = &am33xx_ehrpwm_hwmod_class,
-       .clkdm_name     = "l4ls_clkdm",
-       .main_clk       = "l4ls_gclk",
-};
-
-/* epwmss2 */
-static struct omap_hwmod am33xx_epwmss2_hwmod = {
-       .name           = "epwmss2",
-       .class          = &am33xx_epwmss_hwmod_class,
-       .clkdm_name     = "l4ls_clkdm",
-       .main_clk       = "l4ls_gclk",
-       .prcm           = {
-               .omap4  = {
-                       .clkctrl_offs   = AM33XX_CM_PER_EPWMSS2_CLKCTRL_OFFSET,
-                       .modulemode     = MODULEMODE_SWCTRL,
-               },
-       },
-};
-
-/* ecap2 */
-static struct omap_hwmod am33xx_ecap2_hwmod = {
-       .name           = "ecap2",
-       .class          = &am33xx_ecap_hwmod_class,
-       .clkdm_name     = "l4ls_clkdm",
-       .main_clk       = "l4ls_gclk",
-};
-
-/* eqep2 */
-static struct omap_hwmod am33xx_eqep2_hwmod = {
-       .name           = "eqep2",
-       .class          = &am33xx_eqep_hwmod_class,
-       .clkdm_name     = "l4ls_clkdm",
-       .main_clk       = "l4ls_gclk",
-};
-
-/* ehrpwm2 */
-static struct omap_hwmod am33xx_ehrpwm2_hwmod = {
-       .name           = "ehrpwm2",
-       .class          = &am33xx_ehrpwm_hwmod_class,
-       .clkdm_name     = "l4ls_clkdm",
-       .main_clk       = "l4ls_gclk",
-};
-
-/*
- * 'gpio' class: for gpio 0,1,2,3
- */
-static struct omap_hwmod_class_sysconfig am33xx_gpio_sysc = {
-       .rev_offs       = 0x0000,
-       .sysc_offs      = 0x0010,
-       .syss_offs      = 0x0114,
-       .sysc_flags     = (SYSC_HAS_AUTOIDLE | SYSC_HAS_ENAWAKEUP |
-                         SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
-                         SYSS_HAS_RESET_STATUS),
-       .idlemodes      = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
-                         SIDLE_SMART_WKUP),
-       .sysc_fields    = &omap_hwmod_sysc_type1,
-};
-
-static struct omap_hwmod_class am33xx_gpio_hwmod_class = {
-       .name           = "gpio",
-       .sysc           = &am33xx_gpio_sysc,
-       .rev            = 2,
-};
-
-static struct omap_gpio_dev_attr gpio_dev_attr = {
-       .bank_width     = 32,
-       .dbck_flag      = true,
-};
-
-/* gpio0 */
-static struct omap_hwmod_opt_clk gpio0_opt_clks[] = {
-       { .role = "dbclk", .clk = "gpio0_dbclk" },
-};
-
-static struct omap_hwmod am33xx_gpio0_hwmod = {
-       .name           = "gpio1",
-       .class          = &am33xx_gpio_hwmod_class,
-       .clkdm_name     = "l4_wkup_clkdm",
-       .flags          = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
-       .main_clk       = "dpll_core_m4_div2_ck",
-       .prcm           = {
-               .omap4  = {
-                       .clkctrl_offs   = AM33XX_CM_WKUP_GPIO0_CLKCTRL_OFFSET,
-                       .modulemode     = MODULEMODE_SWCTRL,
-               },
-       },
-       .opt_clks       = gpio0_opt_clks,
-       .opt_clks_cnt   = ARRAY_SIZE(gpio0_opt_clks),
-       .dev_attr       = &gpio_dev_attr,
-};
-
-/* gpio1 */
-static struct omap_hwmod_opt_clk gpio1_opt_clks[] = {
-       { .role = "dbclk", .clk = "gpio1_dbclk" },
-};
-
-static struct omap_hwmod am33xx_gpio1_hwmod = {
-       .name           = "gpio2",
-       .class          = &am33xx_gpio_hwmod_class,
-       .clkdm_name     = "l4ls_clkdm",
-       .flags          = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
-       .main_clk       = "l4ls_gclk",
-       .prcm           = {
-               .omap4  = {
-                       .clkctrl_offs   = AM33XX_CM_PER_GPIO1_CLKCTRL_OFFSET,
-                       .modulemode     = MODULEMODE_SWCTRL,
-               },
-       },
-       .opt_clks       = gpio1_opt_clks,
-       .opt_clks_cnt   = ARRAY_SIZE(gpio1_opt_clks),
-       .dev_attr       = &gpio_dev_attr,
-};
-
-/* gpio2 */
-static struct omap_hwmod_opt_clk gpio2_opt_clks[] = {
-       { .role = "dbclk", .clk = "gpio2_dbclk" },
-};
-
-static struct omap_hwmod am33xx_gpio2_hwmod = {
-       .name           = "gpio3",
-       .class          = &am33xx_gpio_hwmod_class,
-       .clkdm_name     = "l4ls_clkdm",
-       .flags          = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
-       .main_clk       = "l4ls_gclk",
-       .prcm           = {
-               .omap4  = {
-                       .clkctrl_offs   = AM33XX_CM_PER_GPIO2_CLKCTRL_OFFSET,
-                       .modulemode     = MODULEMODE_SWCTRL,
-               },
-       },
-       .opt_clks       = gpio2_opt_clks,
-       .opt_clks_cnt   = ARRAY_SIZE(gpio2_opt_clks),
-       .dev_attr       = &gpio_dev_attr,
-};
-
-/* gpio3 */
-static struct omap_hwmod_opt_clk gpio3_opt_clks[] = {
-       { .role = "dbclk", .clk = "gpio3_dbclk" },
-};
-
-static struct omap_hwmod am33xx_gpio3_hwmod = {
-       .name           = "gpio4",
-       .class          = &am33xx_gpio_hwmod_class,
-       .clkdm_name     = "l4ls_clkdm",
-       .flags          = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
-       .main_clk       = "l4ls_gclk",
-       .prcm           = {
-               .omap4  = {
-                       .clkctrl_offs   = AM33XX_CM_PER_GPIO3_CLKCTRL_OFFSET,
-                       .modulemode     = MODULEMODE_SWCTRL,
-               },
-       },
-       .opt_clks       = gpio3_opt_clks,
-       .opt_clks_cnt   = ARRAY_SIZE(gpio3_opt_clks),
-       .dev_attr       = &gpio_dev_attr,
-};
-
-/* gpmc */
-static struct omap_hwmod_class_sysconfig gpmc_sysc = {
-       .rev_offs       = 0x0,
-       .sysc_offs      = 0x10,
-       .syss_offs      = 0x14,
-       .sysc_flags     = (SYSC_HAS_AUTOIDLE | SYSC_HAS_SIDLEMODE |
-                       SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
-       .idlemodes      = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
-       .sysc_fields    = &omap_hwmod_sysc_type1,
-};
-
-static struct omap_hwmod_class am33xx_gpmc_hwmod_class = {
-       .name           = "gpmc",
-       .sysc           = &gpmc_sysc,
-};
-
-static struct omap_hwmod am33xx_gpmc_hwmod = {
-       .name           = "gpmc",
-       .class          = &am33xx_gpmc_hwmod_class,
-       .clkdm_name     = "l3s_clkdm",
-       .flags          = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET),
-       .main_clk       = "l3s_gclk",
-       .prcm           = {
-               .omap4  = {
-                       .clkctrl_offs   = AM33XX_CM_PER_GPMC_CLKCTRL_OFFSET,
-                       .modulemode     = MODULEMODE_SWCTRL,
-               },
-       },
-};
-
-/* 'i2c' class */
-static struct omap_hwmod_class_sysconfig am33xx_i2c_sysc = {
-       .sysc_offs      = 0x0010,
-       .syss_offs      = 0x0090,
-       .sysc_flags     = (SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY |
-                         SYSC_HAS_ENAWAKEUP | SYSC_HAS_SIDLEMODE |
-                         SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
-       .idlemodes      = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
-                         SIDLE_SMART_WKUP),
-       .sysc_fields    = &omap_hwmod_sysc_type1,
-};
-
-static struct omap_hwmod_class i2c_class = {
-       .name           = "i2c",
-       .sysc           = &am33xx_i2c_sysc,
-       .rev            = OMAP_I2C_IP_VERSION_2,
-       .reset          = &omap_i2c_reset,
-};
-
-static struct omap_i2c_dev_attr i2c_dev_attr = {
-       .flags = OMAP_I2C_FLAG_BUS_SHIFT_NONE,
-};
-
-/* i2c1 */
-static struct omap_hwmod am33xx_i2c1_hwmod = {
-       .name           = "i2c1",
-       .class          = &i2c_class,
-       .clkdm_name     = "l4_wkup_clkdm",
-       .flags          = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT,
-       .main_clk       = "dpll_per_m2_div4_wkupdm_ck",
-       .prcm           = {
-               .omap4  = {
-                       .clkctrl_offs   = AM33XX_CM_WKUP_I2C0_CLKCTRL_OFFSET,
-                       .modulemode     = MODULEMODE_SWCTRL,
-               },
-       },
-       .dev_attr       = &i2c_dev_attr,
-};
-
-/* i2c1 */
-static struct omap_hwmod am33xx_i2c2_hwmod = {
-       .name           = "i2c2",
-       .class          = &i2c_class,
-       .clkdm_name     = "l4ls_clkdm",
-       .flags          = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT,
-       .main_clk       = "dpll_per_m2_div4_ck",
-       .prcm           = {
-               .omap4 = {
-                       .clkctrl_offs   = AM33XX_CM_PER_I2C1_CLKCTRL_OFFSET,
-                       .modulemode     = MODULEMODE_SWCTRL,
-               },
-       },
-       .dev_attr       = &i2c_dev_attr,
-};
-
-/* i2c3 */
-static struct omap_hwmod am33xx_i2c3_hwmod = {
-       .name           = "i2c3",
-       .class          = &i2c_class,
-       .clkdm_name     = "l4ls_clkdm",
-       .flags          = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT,
-       .main_clk       = "dpll_per_m2_div4_ck",
-       .prcm           = {
-               .omap4  = {
-                       .clkctrl_offs   = AM33XX_CM_PER_I2C2_CLKCTRL_OFFSET,
-                       .modulemode     = MODULEMODE_SWCTRL,
-               },
-       },
-       .dev_attr       = &i2c_dev_attr,
-};
-
-
-/* lcdc */
-static struct omap_hwmod_class_sysconfig lcdc_sysc = {
-       .rev_offs       = 0x0,
-       .sysc_offs      = 0x54,
-       .sysc_flags     = (SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE),
-       .idlemodes      = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
-       .sysc_fields    = &omap_hwmod_sysc_type2,
-};
-
-static struct omap_hwmod_class am33xx_lcdc_hwmod_class = {
-       .name           = "lcdc",
-       .sysc           = &lcdc_sysc,
-};
-
-static struct omap_hwmod am33xx_lcdc_hwmod = {
-       .name           = "lcdc",
-       .class          = &am33xx_lcdc_hwmod_class,
-       .clkdm_name     = "lcdc_clkdm",
-       .flags          = HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY,
-       .main_clk       = "lcd_gclk",
-       .prcm           = {
-               .omap4  = {
-                       .clkctrl_offs   = AM33XX_CM_PER_LCDC_CLKCTRL_OFFSET,
-                       .modulemode     = MODULEMODE_SWCTRL,
-               },
-       },
-};
-
-/*
- * 'mailbox' class
- * mailbox module allowing communication between the on-chip processors using a
- * queued mailbox-interrupt mechanism.
- */
-static struct omap_hwmod_class_sysconfig am33xx_mailbox_sysc = {
-       .rev_offs       = 0x0000,
-       .sysc_offs      = 0x0010,
-       .sysc_flags     = (SYSC_HAS_RESET_STATUS | SYSC_HAS_SIDLEMODE |
-                         SYSC_HAS_SOFTRESET),
-       .idlemodes      = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
-       .sysc_fields    = &omap_hwmod_sysc_type2,
-};
-
-static struct omap_hwmod_class am33xx_mailbox_hwmod_class = {
-       .name   = "mailbox",
-       .sysc   = &am33xx_mailbox_sysc,
-};
-
-static struct omap_hwmod am33xx_mailbox_hwmod = {
-       .name           = "mailbox",
-       .class          = &am33xx_mailbox_hwmod_class,
-       .clkdm_name     = "l4ls_clkdm",
-       .main_clk       = "l4ls_gclk",
-       .prcm = {
-               .omap4 = {
-                       .clkctrl_offs   = AM33XX_CM_PER_MAILBOX0_CLKCTRL_OFFSET,
-                       .modulemode     = MODULEMODE_SWCTRL,
-               },
-       },
-};
-
-/*
- * 'mcasp' class
- */
-static struct omap_hwmod_class_sysconfig am33xx_mcasp_sysc = {
-       .rev_offs       = 0x0,
-       .sysc_offs      = 0x4,
-       .sysc_flags     = SYSC_HAS_SIDLEMODE,
-       .idlemodes      = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
-       .sysc_fields    = &omap_hwmod_sysc_type3,
-};
-
-static struct omap_hwmod_class am33xx_mcasp_hwmod_class = {
-       .name           = "mcasp",
-       .sysc           = &am33xx_mcasp_sysc,
-};
-
-/* mcasp0 */
-static struct omap_hwmod am33xx_mcasp0_hwmod = {
-       .name           = "mcasp0",
-       .class          = &am33xx_mcasp_hwmod_class,
-       .clkdm_name     = "l3s_clkdm",
-       .main_clk       = "mcasp0_fck",
-       .prcm           = {
-               .omap4  = {
-                       .clkctrl_offs   = AM33XX_CM_PER_MCASP0_CLKCTRL_OFFSET,
-                       .modulemode     = MODULEMODE_SWCTRL,
-               },
-       },
-};
-
-/* mcasp1 */
-static struct omap_hwmod am33xx_mcasp1_hwmod = {
-       .name           = "mcasp1",
-       .class          = &am33xx_mcasp_hwmod_class,
-       .clkdm_name     = "l3s_clkdm",
-       .main_clk       = "mcasp1_fck",
-       .prcm           = {
-               .omap4  = {
-                       .clkctrl_offs   = AM33XX_CM_PER_MCASP1_CLKCTRL_OFFSET,
-                       .modulemode     = MODULEMODE_SWCTRL,
-               },
-       },
-};
-
-/* 'mmc' class */
-static struct omap_hwmod_class_sysconfig am33xx_mmc_sysc = {
-       .rev_offs       = 0x1fc,
-       .sysc_offs      = 0x10,
-       .syss_offs      = 0x14,
-       .sysc_flags     = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
-                         SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
-                         SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
-       .idlemodes      = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
-       .sysc_fields    = &omap_hwmod_sysc_type1,
-};
-
-static struct omap_hwmod_class am33xx_mmc_hwmod_class = {
-       .name           = "mmc",
-       .sysc           = &am33xx_mmc_sysc,
-};
-
-/* mmc0 */
-static struct omap_mmc_dev_attr am33xx_mmc0_dev_attr = {
-       .flags          = OMAP_HSMMC_SUPPORTS_DUAL_VOLT,
-};
-
-static struct omap_hwmod am33xx_mmc0_hwmod = {
-       .name           = "mmc1",
-       .class          = &am33xx_mmc_hwmod_class,
-       .clkdm_name     = "l4ls_clkdm",
-       .main_clk       = "mmc_clk",
-       .prcm           = {
-               .omap4  = {
-                       .clkctrl_offs   = AM33XX_CM_PER_MMC0_CLKCTRL_OFFSET,
-                       .modulemode     = MODULEMODE_SWCTRL,
-               },
-       },
-       .dev_attr       = &am33xx_mmc0_dev_attr,
-};
-
-/* mmc1 */
-static struct omap_mmc_dev_attr am33xx_mmc1_dev_attr = {
-       .flags          = OMAP_HSMMC_SUPPORTS_DUAL_VOLT,
-};
-
-static struct omap_hwmod am33xx_mmc1_hwmod = {
-       .name           = "mmc2",
-       .class          = &am33xx_mmc_hwmod_class,
-       .clkdm_name     = "l4ls_clkdm",
-       .main_clk       = "mmc_clk",
-       .prcm           = {
-               .omap4  = {
-                       .clkctrl_offs   = AM33XX_CM_PER_MMC1_CLKCTRL_OFFSET,
-                       .modulemode     = MODULEMODE_SWCTRL,
-               },
-       },
-       .dev_attr       = &am33xx_mmc1_dev_attr,
-};
-
-/* mmc2 */
-static struct omap_mmc_dev_attr am33xx_mmc2_dev_attr = {
-       .flags          = OMAP_HSMMC_SUPPORTS_DUAL_VOLT,
-};
-static struct omap_hwmod am33xx_mmc2_hwmod = {
-       .name           = "mmc3",
-       .class          = &am33xx_mmc_hwmod_class,
-       .clkdm_name     = "l3s_clkdm",
-       .main_clk       = "mmc_clk",
-       .prcm           = {
-               .omap4  = {
-                       .clkctrl_offs   = AM33XX_CM_PER_MMC2_CLKCTRL_OFFSET,
-                       .modulemode     = MODULEMODE_SWCTRL,
-               },
-       },
-       .dev_attr       = &am33xx_mmc2_dev_attr,
-};
-
-/*
- * 'rtc' class
- * rtc subsystem
- */
-static struct omap_hwmod_class_sysconfig am33xx_rtc_sysc = {
-       .rev_offs       = 0x0074,
-       .sysc_offs      = 0x0078,
-       .sysc_flags     = SYSC_HAS_SIDLEMODE,
-       .idlemodes      = (SIDLE_FORCE | SIDLE_NO |
-                         SIDLE_SMART | SIDLE_SMART_WKUP),
-       .sysc_fields    = &omap_hwmod_sysc_type3,
-};
-
-static struct omap_hwmod_class am33xx_rtc_hwmod_class = {
-       .name           = "rtc",
-       .sysc           = &am33xx_rtc_sysc,
-};
-
-static struct omap_hwmod am33xx_rtc_hwmod = {
-       .name           = "rtc",
-       .class          = &am33xx_rtc_hwmod_class,
-       .clkdm_name     = "l4_rtc_clkdm",
-       .main_clk       = "clk_32768_ck",
-       .prcm           = {
-               .omap4  = {
-                       .clkctrl_offs   = AM33XX_CM_RTC_RTC_CLKCTRL_OFFSET,
-                       .modulemode     = MODULEMODE_SWCTRL,
-               },
-       },
-};
-
-/* 'spi' class */
-static struct omap_hwmod_class_sysconfig am33xx_mcspi_sysc = {
-       .rev_offs       = 0x0000,
-       .sysc_offs      = 0x0110,
-       .syss_offs      = 0x0114,
-       .sysc_flags     = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
-                         SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE |
-                         SYSS_HAS_RESET_STATUS),
-       .idlemodes      = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
-       .sysc_fields    = &omap_hwmod_sysc_type1,
-};
-
-static struct omap_hwmod_class am33xx_spi_hwmod_class = {
-       .name           = "mcspi",
-       .sysc           = &am33xx_mcspi_sysc,
-       .rev            = OMAP4_MCSPI_REV,
-};
-
-/* spi0 */
-static struct omap2_mcspi_dev_attr mcspi_attrib = {
-       .num_chipselect = 2,
-};
-static struct omap_hwmod am33xx_spi0_hwmod = {
-       .name           = "spi0",
-       .class          = &am33xx_spi_hwmod_class,
-       .clkdm_name     = "l4ls_clkdm",
-       .main_clk       = "dpll_per_m2_div4_ck",
-       .prcm           = {
-               .omap4  = {
-                       .clkctrl_offs   = AM33XX_CM_PER_SPI0_CLKCTRL_OFFSET,
-                       .modulemode     = MODULEMODE_SWCTRL,
-               },
-       },
-       .dev_attr       = &mcspi_attrib,
-};
-
-/* spi1 */
-static struct omap_hwmod am33xx_spi1_hwmod = {
-       .name           = "spi1",
-       .class          = &am33xx_spi_hwmod_class,
-       .clkdm_name     = "l4ls_clkdm",
-       .main_clk       = "dpll_per_m2_div4_ck",
-       .prcm           = {
-               .omap4  = {
-                       .clkctrl_offs   = AM33XX_CM_PER_SPI1_CLKCTRL_OFFSET,
-                       .modulemode     = MODULEMODE_SWCTRL,
-               },
-       },
-       .dev_attr       = &mcspi_attrib,
-};
-
-/*
- * 'spinlock' class
- * spinlock provides hardware assistance for synchronizing the
- * processes running on multiple processors
- */
-static struct omap_hwmod_class am33xx_spinlock_hwmod_class = {
-       .name           = "spinlock",
-};
-
-static struct omap_hwmod am33xx_spinlock_hwmod = {
-       .name           = "spinlock",
-       .class          = &am33xx_spinlock_hwmod_class,
-       .clkdm_name     = "l4ls_clkdm",
-       .main_clk       = "l4ls_gclk",
-       .prcm           = {
-               .omap4  = {
-                       .clkctrl_offs   = AM33XX_CM_PER_SPINLOCK_CLKCTRL_OFFSET,
-                       .modulemode     = MODULEMODE_SWCTRL,
-               },
-       },
-};
-
-/* 'timer 2-7' class */
-static struct omap_hwmod_class_sysconfig am33xx_timer_sysc = {
-       .rev_offs       = 0x0000,
-       .sysc_offs      = 0x0010,
-       .syss_offs      = 0x0014,
-       .sysc_flags     = (SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET),
-       .idlemodes      = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
-                         SIDLE_SMART_WKUP),
-       .sysc_fields    = &omap_hwmod_sysc_type2,
-};
-
-static struct omap_hwmod_class am33xx_timer_hwmod_class = {
-       .name           = "timer",
-       .sysc           = &am33xx_timer_sysc,
-};
-
-/* timer1 1ms */
-static struct omap_hwmod_class_sysconfig am33xx_timer1ms_sysc = {
-       .rev_offs       = 0x0000,
-       .sysc_offs      = 0x0010,
-       .syss_offs      = 0x0014,
-       .sysc_flags     = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
-                       SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE |
-                       SYSS_HAS_RESET_STATUS),
-       .idlemodes      = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
-       .sysc_fields    = &omap_hwmod_sysc_type1,
-};
-
-static struct omap_hwmod_class am33xx_timer1ms_hwmod_class = {
-       .name           = "timer",
-       .sysc           = &am33xx_timer1ms_sysc,
-};
-
-static struct omap_hwmod am33xx_timer1_hwmod = {
-       .name           = "timer1",
-       .class          = &am33xx_timer1ms_hwmod_class,
-       .clkdm_name     = "l4_wkup_clkdm",
-       .main_clk       = "timer1_fck",
-       .prcm           = {
-               .omap4  = {
-                       .clkctrl_offs   = AM33XX_CM_WKUP_TIMER1_CLKCTRL_OFFSET,
-                       .modulemode     = MODULEMODE_SWCTRL,
-               },
-       },
-};
-
-static struct omap_hwmod am33xx_timer2_hwmod = {
-       .name           = "timer2",
-       .class          = &am33xx_timer_hwmod_class,
-       .clkdm_name     = "l4ls_clkdm",
-       .main_clk       = "timer2_fck",
-       .prcm           = {
-               .omap4  = {
-                       .clkctrl_offs   = AM33XX_CM_PER_TIMER2_CLKCTRL_OFFSET,
-                       .modulemode     = MODULEMODE_SWCTRL,
-               },
-       },
-};
-
-static struct omap_hwmod am33xx_timer3_hwmod = {
-       .name           = "timer3",
-       .class          = &am33xx_timer_hwmod_class,
-       .clkdm_name     = "l4ls_clkdm",
-       .main_clk       = "timer3_fck",
-       .prcm           = {
-               .omap4  = {
-                       .clkctrl_offs   = AM33XX_CM_PER_TIMER3_CLKCTRL_OFFSET,
-                       .modulemode     = MODULEMODE_SWCTRL,
-               },
-       },
-};
-
-static struct omap_hwmod am33xx_timer4_hwmod = {
-       .name           = "timer4",
-       .class          = &am33xx_timer_hwmod_class,
-       .clkdm_name     = "l4ls_clkdm",
-       .main_clk       = "timer4_fck",
-       .prcm           = {
-               .omap4  = {
-                       .clkctrl_offs   = AM33XX_CM_PER_TIMER4_CLKCTRL_OFFSET,
-                       .modulemode     = MODULEMODE_SWCTRL,
-               },
-       },
-};
-
-static struct omap_hwmod am33xx_timer5_hwmod = {
-       .name           = "timer5",
-       .class          = &am33xx_timer_hwmod_class,
-       .clkdm_name     = "l4ls_clkdm",
-       .main_clk       = "timer5_fck",
-       .prcm           = {
-               .omap4  = {
-                       .clkctrl_offs   = AM33XX_CM_PER_TIMER5_CLKCTRL_OFFSET,
-                       .modulemode     = MODULEMODE_SWCTRL,
-               },
-       },
-};
-
-static struct omap_hwmod am33xx_timer6_hwmod = {
-       .name           = "timer6",
-       .class          = &am33xx_timer_hwmod_class,
-       .clkdm_name     = "l4ls_clkdm",
-       .main_clk       = "timer6_fck",
-       .prcm           = {
-               .omap4  = {
-                       .clkctrl_offs   = AM33XX_CM_PER_TIMER6_CLKCTRL_OFFSET,
-                       .modulemode     = MODULEMODE_SWCTRL,
-               },
-       },
-};
-
-static struct omap_hwmod am33xx_timer7_hwmod = {
-       .name           = "timer7",
-       .class          = &am33xx_timer_hwmod_class,
-       .clkdm_name     = "l4ls_clkdm",
-       .main_clk       = "timer7_fck",
-       .prcm           = {
-               .omap4  = {
-                       .clkctrl_offs   = AM33XX_CM_PER_TIMER7_CLKCTRL_OFFSET,
-                       .modulemode     = MODULEMODE_SWCTRL,
-               },
-       },
-};
-
-/* tpcc */
-static struct omap_hwmod_class am33xx_tpcc_hwmod_class = {
-       .name           = "tpcc",
-};
-
-static struct omap_hwmod am33xx_tpcc_hwmod = {
-       .name           = "tpcc",
-       .class          = &am33xx_tpcc_hwmod_class,
-       .clkdm_name     = "l3_clkdm",
-       .main_clk       = "l3_gclk",
-       .prcm           = {
-               .omap4  = {
-                       .clkctrl_offs   = AM33XX_CM_PER_TPCC_CLKCTRL_OFFSET,
-                       .modulemode     = MODULEMODE_SWCTRL,
-               },
-       },
-};
-
-static struct omap_hwmod_class_sysconfig am33xx_tptc_sysc = {
-       .rev_offs       = 0x0,
-       .sysc_offs      = 0x10,
-       .sysc_flags     = (SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
-                         SYSC_HAS_MIDLEMODE),
-       .idlemodes      = (SIDLE_FORCE | SIDLE_SMART | MSTANDBY_FORCE),
-       .sysc_fields    = &omap_hwmod_sysc_type2,
-};
-
-/* 'tptc' class */
-static struct omap_hwmod_class am33xx_tptc_hwmod_class = {
-       .name           = "tptc",
-       .sysc           = &am33xx_tptc_sysc,
-};
-
-/* tptc0 */
-static struct omap_hwmod am33xx_tptc0_hwmod = {
-       .name           = "tptc0",
-       .class          = &am33xx_tptc_hwmod_class,
-       .clkdm_name     = "l3_clkdm",
-       .flags          = HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY,
-       .main_clk       = "l3_gclk",
-       .prcm           = {
-               .omap4  = {
-                       .clkctrl_offs   = AM33XX_CM_PER_TPTC0_CLKCTRL_OFFSET,
-                       .modulemode     = MODULEMODE_SWCTRL,
-               },
-       },
-};
-
-/* tptc1 */
-static struct omap_hwmod am33xx_tptc1_hwmod = {
-       .name           = "tptc1",
-       .class          = &am33xx_tptc_hwmod_class,
-       .clkdm_name     = "l3_clkdm",
-       .flags          = (HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY),
-       .main_clk       = "l3_gclk",
-       .prcm           = {
-               .omap4  = {
-                       .clkctrl_offs   = AM33XX_CM_PER_TPTC1_CLKCTRL_OFFSET,
-                       .modulemode     = MODULEMODE_SWCTRL,
-               },
-       },
-};
-
-/* tptc2 */
-static struct omap_hwmod am33xx_tptc2_hwmod = {
-       .name           = "tptc2",
-       .class          = &am33xx_tptc_hwmod_class,
-       .clkdm_name     = "l3_clkdm",
-       .flags          = (HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY),
-       .main_clk       = "l3_gclk",
-       .prcm           = {
-               .omap4  = {
-                       .clkctrl_offs   = AM33XX_CM_PER_TPTC2_CLKCTRL_OFFSET,
-                       .modulemode     = MODULEMODE_SWCTRL,
-               },
-       },
-};
-
-/* 'uart' class */
-static struct omap_hwmod_class_sysconfig uart_sysc = {
-       .rev_offs       = 0x50,
-       .sysc_offs      = 0x54,
-       .syss_offs      = 0x58,
-       .sysc_flags     = (SYSC_HAS_SIDLEMODE | SYSC_HAS_ENAWAKEUP |
-                         SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
-       .idlemodes      = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
-                         SIDLE_SMART_WKUP),
-       .sysc_fields    = &omap_hwmod_sysc_type1,
-};
-
-static struct omap_hwmod_class uart_class = {
-       .name           = "uart",
-       .sysc           = &uart_sysc,
-};
-
-/* uart1 */
-static struct omap_hwmod am33xx_uart1_hwmod = {
-       .name           = "uart1",
-       .class          = &uart_class,
-       .clkdm_name     = "l4_wkup_clkdm",
-       .flags          = DEBUG_AM33XXUART1_FLAGS | HWMOD_SWSUP_SIDLE_ACT,
-       .main_clk       = "dpll_per_m2_div4_wkupdm_ck",
-       .prcm           = {
-               .omap4  = {
-                       .clkctrl_offs   = AM33XX_CM_WKUP_UART0_CLKCTRL_OFFSET,
-                       .modulemode     = MODULEMODE_SWCTRL,
-               },
-       },
-};
-
-static struct omap_hwmod am33xx_uart2_hwmod = {
-       .name           = "uart2",
-       .class          = &uart_class,
-       .clkdm_name     = "l4ls_clkdm",
-       .flags          = HWMOD_SWSUP_SIDLE_ACT,
-       .main_clk       = "dpll_per_m2_div4_ck",
-       .prcm           = {
-               .omap4  = {
-                       .clkctrl_offs   = AM33XX_CM_PER_UART1_CLKCTRL_OFFSET,
-                       .modulemode     = MODULEMODE_SWCTRL,
-               },
-       },
-};
-
-/* uart3 */
-static struct omap_hwmod am33xx_uart3_hwmod = {
-       .name           = "uart3",
-       .class          = &uart_class,
-       .clkdm_name     = "l4ls_clkdm",
-       .flags          = HWMOD_SWSUP_SIDLE_ACT,
-       .main_clk       = "dpll_per_m2_div4_ck",
-       .prcm           = {
-               .omap4  = {
-                       .clkctrl_offs   = AM33XX_CM_PER_UART2_CLKCTRL_OFFSET,
-                       .modulemode     = MODULEMODE_SWCTRL,
-               },
-       },
-};
-
-static struct omap_hwmod am33xx_uart4_hwmod = {
-       .name           = "uart4",
-       .class          = &uart_class,
-       .clkdm_name     = "l4ls_clkdm",
-       .flags          = HWMOD_SWSUP_SIDLE_ACT,
-       .main_clk       = "dpll_per_m2_div4_ck",
-       .prcm           = {
-               .omap4  = {
-                       .clkctrl_offs   = AM33XX_CM_PER_UART3_CLKCTRL_OFFSET,
-                       .modulemode     = MODULEMODE_SWCTRL,
-               },
-       },
-};
-
-static struct omap_hwmod am33xx_uart5_hwmod = {
-       .name           = "uart5",
-       .class          = &uart_class,
-       .clkdm_name     = "l4ls_clkdm",
-       .flags          = HWMOD_SWSUP_SIDLE_ACT,
-       .main_clk       = "dpll_per_m2_div4_ck",
-       .prcm           = {
-               .omap4  = {
-                       .clkctrl_offs   = AM33XX_CM_PER_UART4_CLKCTRL_OFFSET,
-                       .modulemode     = MODULEMODE_SWCTRL,
-               },
-       },
-};
-
-static struct omap_hwmod am33xx_uart6_hwmod = {
-       .name           = "uart6",
-       .class          = &uart_class,
-       .clkdm_name     = "l4ls_clkdm",
-       .flags          = HWMOD_SWSUP_SIDLE_ACT,
-       .main_clk       = "dpll_per_m2_div4_ck",
-       .prcm           = {
-               .omap4  = {
-                       .clkctrl_offs   = AM33XX_CM_PER_UART5_CLKCTRL_OFFSET,
-                       .modulemode     = MODULEMODE_SWCTRL,
-               },
-       },
-};
-
-/* 'wd_timer' class */
-static struct omap_hwmod_class_sysconfig wdt_sysc = {
-       .rev_offs       = 0x0,
-       .sysc_offs      = 0x10,
-       .syss_offs      = 0x14,
-       .sysc_flags     = (SYSC_HAS_EMUFREE | SYSC_HAS_SIDLEMODE |
-                       SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
-       .idlemodes      = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
-                       SIDLE_SMART_WKUP),
-       .sysc_fields    = &omap_hwmod_sysc_type1,
-};
-
-static struct omap_hwmod_class am33xx_wd_timer_hwmod_class = {
-       .name           = "wd_timer",
-       .sysc           = &wdt_sysc,
-       .pre_shutdown   = &omap2_wd_timer_disable,
-};
-
-/*
- * XXX: device.c file uses hardcoded name for watchdog timer
- * driver "wd_timer2, so we are also using same name as of now...
- */
-static struct omap_hwmod am33xx_wd_timer1_hwmod = {
-       .name           = "wd_timer2",
-       .class          = &am33xx_wd_timer_hwmod_class,
-       .clkdm_name     = "l4_wkup_clkdm",
-       .flags          = HWMOD_SWSUP_SIDLE,
-       .main_clk       = "wdt1_fck",
-       .prcm           = {
-               .omap4  = {
-                       .clkctrl_offs   = AM33XX_CM_WKUP_WDT1_CLKCTRL_OFFSET,
-                       .modulemode     = MODULEMODE_SWCTRL,
-               },
-       },
-};
-
-/*
- * 'usb_otg' class
- * high-speed on-the-go universal serial bus (usb_otg) controller
- */
-static struct omap_hwmod_class_sysconfig am33xx_usbhsotg_sysc = {
-       .rev_offs       = 0x0,
-       .sysc_offs      = 0x10,
-       .sysc_flags     = (SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE),
-       .idlemodes      = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
-                         MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
-       .sysc_fields    = &omap_hwmod_sysc_type2,
-};
-
-static struct omap_hwmod_class am33xx_usbotg_class = {
-       .name           = "usbotg",
-       .sysc           = &am33xx_usbhsotg_sysc,
-};
-
-static struct omap_hwmod am33xx_usbss_hwmod = {
-       .name           = "usb_otg_hs",
-       .class          = &am33xx_usbotg_class,
-       .clkdm_name     = "l3s_clkdm",
-       .flags          = HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY,
-       .main_clk       = "usbotg_fck",
-       .prcm           = {
-               .omap4  = {
-                       .clkctrl_offs   = AM33XX_CM_PER_USB0_CLKCTRL_OFFSET,
-                       .modulemode     = MODULEMODE_SWCTRL,
-               },
-       },
-};
-
-
-/*
- * Interfaces
- */
-
-static struct omap_hwmod_addr_space am33xx_emif_addrs[] = {
-       {
-               .pa_start       = 0x4c000000,
-               .pa_end         = 0x4c000fff,
-               .flags          = ADDR_TYPE_RT
-       },
-       { }
-};
-/* l3 main -> emif */
-static struct omap_hwmod_ocp_if am33xx_l3_main__emif = {
-       .master         = &am33xx_l3_main_hwmod,
-       .slave          = &am33xx_emif_hwmod,
-       .clk            = "dpll_core_m4_ck",
-       .addr           = am33xx_emif_addrs,
-       .user           = OCP_USER_MPU | OCP_USER_SDMA,
-};
-
-/* mpu -> l3 main */
-static struct omap_hwmod_ocp_if am33xx_mpu__l3_main = {
-       .master         = &am33xx_mpu_hwmod,
-       .slave          = &am33xx_l3_main_hwmod,
-       .clk            = "dpll_mpu_m2_ck",
-       .user           = OCP_USER_MPU,
-};
-
-/* l3 main -> l4 hs */
-static struct omap_hwmod_ocp_if am33xx_l3_main__l4_hs = {
-       .master         = &am33xx_l3_main_hwmod,
-       .slave          = &am33xx_l4_hs_hwmod,
-       .clk            = "l3s_gclk",
-       .user           = OCP_USER_MPU | OCP_USER_SDMA,
-};
-
-/* l3 main -> l3 s */
-static struct omap_hwmod_ocp_if am33xx_l3_main__l3_s = {
-       .master         = &am33xx_l3_main_hwmod,
-       .slave          = &am33xx_l3_s_hwmod,
-       .clk            = "l3s_gclk",
-       .user           = OCP_USER_MPU | OCP_USER_SDMA,
-};
-
-/* l3 s -> l4 per/ls */
-static struct omap_hwmod_ocp_if am33xx_l3_s__l4_ls = {
-       .master         = &am33xx_l3_s_hwmod,
-       .slave          = &am33xx_l4_ls_hwmod,
-       .clk            = "l3s_gclk",
-       .user           = OCP_USER_MPU | OCP_USER_SDMA,
-};
-
-/* l3 s -> l4 wkup */
-static struct omap_hwmod_ocp_if am33xx_l3_s__l4_wkup = {
-       .master         = &am33xx_l3_s_hwmod,
-       .slave          = &am33xx_l4_wkup_hwmod,
-       .clk            = "l3s_gclk",
-       .user           = OCP_USER_MPU | OCP_USER_SDMA,
-};
-
-/* l3 main -> l3 instr */
-static struct omap_hwmod_ocp_if am33xx_l3_main__l3_instr = {
-       .master         = &am33xx_l3_main_hwmod,
-       .slave          = &am33xx_l3_instr_hwmod,
-       .clk            = "l3s_gclk",
-       .user           = OCP_USER_MPU | OCP_USER_SDMA,
-};
-
-/* mpu -> prcm */
-static struct omap_hwmod_ocp_if am33xx_mpu__prcm = {
-       .master         = &am33xx_mpu_hwmod,
-       .slave          = &am33xx_prcm_hwmod,
-       .clk            = "dpll_mpu_m2_ck",
-       .user           = OCP_USER_MPU | OCP_USER_SDMA,
-};
-
-/* l3 s -> l3 main*/
-static struct omap_hwmod_ocp_if am33xx_l3_s__l3_main = {
-       .master         = &am33xx_l3_s_hwmod,
-       .slave          = &am33xx_l3_main_hwmod,
-       .clk            = "l3s_gclk",
-       .user           = OCP_USER_MPU | OCP_USER_SDMA,
-};
-
-/* pru-icss -> l3 main */
-static struct omap_hwmod_ocp_if am33xx_pruss__l3_main = {
-       .master         = &am33xx_pruss_hwmod,
-       .slave          = &am33xx_l3_main_hwmod,
-       .clk            = "l3_gclk",
-       .user           = OCP_USER_MPU | OCP_USER_SDMA,
-};
-
-/* wkup m3 -> l4 wkup */
-static struct omap_hwmod_ocp_if am33xx_wkup_m3__l4_wkup = {
-       .master         = &am33xx_wkup_m3_hwmod,
-       .slave          = &am33xx_l4_wkup_hwmod,
-       .clk            = "dpll_core_m4_div2_ck",
-       .user           = OCP_USER_MPU | OCP_USER_SDMA,
-};
-
-/* gfx -> l3 main */
-static struct omap_hwmod_ocp_if am33xx_gfx__l3_main = {
-       .master         = &am33xx_gfx_hwmod,
-       .slave          = &am33xx_l3_main_hwmod,
-       .clk            = "dpll_core_m4_ck",
-       .user           = OCP_USER_MPU | OCP_USER_SDMA,
-};
-
-/* l4 wkup -> wkup m3 */
-static struct omap_hwmod_ocp_if am33xx_l4_wkup__wkup_m3 = {
-       .master         = &am33xx_l4_wkup_hwmod,
-       .slave          = &am33xx_wkup_m3_hwmod,
-       .clk            = "dpll_core_m4_div2_ck",
-       .user           = OCP_USER_MPU | OCP_USER_SDMA,
-};
-
-/* l4 hs -> pru-icss */
-static struct omap_hwmod_ocp_if am33xx_l4_hs__pruss = {
-       .master         = &am33xx_l4_hs_hwmod,
-       .slave          = &am33xx_pruss_hwmod,
-       .clk            = "dpll_core_m4_ck",
-       .user           = OCP_USER_MPU | OCP_USER_SDMA,
-};
-
-/* l3 main -> gfx */
-static struct omap_hwmod_ocp_if am33xx_l3_main__gfx = {
-       .master         = &am33xx_l3_main_hwmod,
-       .slave          = &am33xx_gfx_hwmod,
-       .clk            = "dpll_core_m4_ck",
-       .user           = OCP_USER_MPU | OCP_USER_SDMA,
-};
-
-/* l3_main -> debugss */
-static struct omap_hwmod_addr_space am33xx_debugss_addrs[] = {
-       {
-               .pa_start       = 0x4b000000,
-               .pa_end         = 0x4b000000 + SZ_16M - 1,
-               .flags          = ADDR_TYPE_RT
-       },
-       { }
-};
-
-static struct omap_hwmod_ocp_if am33xx_l3_main__debugss = {
-       .master         = &am33xx_l3_main_hwmod,
-       .slave          = &am33xx_debugss_hwmod,
-       .clk            = "dpll_core_m4_ck",
-       .addr           = am33xx_debugss_addrs,
-       .user           = OCP_USER_MPU,
-};
-
-/* l4 wkup -> smartreflex0 */
-static struct omap_hwmod_ocp_if am33xx_l4_wkup__smartreflex0 = {
-       .master         = &am33xx_l4_wkup_hwmod,
-       .slave          = &am33xx_smartreflex0_hwmod,
-       .clk            = "dpll_core_m4_div2_ck",
-       .user           = OCP_USER_MPU,
-};
-
-/* l4 wkup -> smartreflex1 */
-static struct omap_hwmod_ocp_if am33xx_l4_wkup__smartreflex1 = {
-       .master         = &am33xx_l4_wkup_hwmod,
-       .slave          = &am33xx_smartreflex1_hwmod,
-       .clk            = "dpll_core_m4_div2_ck",
-       .user           = OCP_USER_MPU,
-};
-
-/* l4 wkup -> control */
-static struct omap_hwmod_ocp_if am33xx_l4_wkup__control = {
-       .master         = &am33xx_l4_wkup_hwmod,
-       .slave          = &am33xx_control_hwmod,
-       .clk            = "dpll_core_m4_div2_ck",
-       .user           = OCP_USER_MPU,
-};
-
-/* l4 wkup -> rtc */
-static struct omap_hwmod_ocp_if am33xx_l4_wkup__rtc = {
-       .master         = &am33xx_l4_wkup_hwmod,
-       .slave          = &am33xx_rtc_hwmod,
-       .clk            = "clkdiv32k_ick",
-       .user           = OCP_USER_MPU,
-};
-
-/* l4 per/ls -> DCAN0 */
-static struct omap_hwmod_ocp_if am33xx_l4_per__dcan0 = {
-       .master         = &am33xx_l4_ls_hwmod,
-       .slave          = &am33xx_dcan0_hwmod,
-       .clk            = "l4ls_gclk",
-       .user           = OCP_USER_MPU | OCP_USER_SDMA,
-};
-
-/* l4 per/ls -> DCAN1 */
-static struct omap_hwmod_ocp_if am33xx_l4_per__dcan1 = {
-       .master         = &am33xx_l4_ls_hwmod,
-       .slave          = &am33xx_dcan1_hwmod,
-       .clk            = "l4ls_gclk",
-       .user           = OCP_USER_MPU | OCP_USER_SDMA,
-};
-
-/* l4 per/ls -> GPIO2 */
-static struct omap_hwmod_ocp_if am33xx_l4_per__gpio1 = {
-       .master         = &am33xx_l4_ls_hwmod,
-       .slave          = &am33xx_gpio1_hwmod,
-       .clk            = "l4ls_gclk",
-       .user           = OCP_USER_MPU | OCP_USER_SDMA,
-};
-
-/* l4 per/ls -> gpio3 */
-static struct omap_hwmod_ocp_if am33xx_l4_per__gpio2 = {
-       .master         = &am33xx_l4_ls_hwmod,
-       .slave          = &am33xx_gpio2_hwmod,
-       .clk            = "l4ls_gclk",
-       .user           = OCP_USER_MPU | OCP_USER_SDMA,
-};
-
-/* l4 per/ls -> gpio4 */
-static struct omap_hwmod_ocp_if am33xx_l4_per__gpio3 = {
-       .master         = &am33xx_l4_ls_hwmod,
-       .slave          = &am33xx_gpio3_hwmod,
-       .clk            = "l4ls_gclk",
-       .user           = OCP_USER_MPU | OCP_USER_SDMA,
-};
-
-/* L4 WKUP -> I2C1 */
-static struct omap_hwmod_ocp_if am33xx_l4_wkup__i2c1 = {
-       .master         = &am33xx_l4_wkup_hwmod,
-       .slave          = &am33xx_i2c1_hwmod,
-       .clk            = "dpll_core_m4_div2_ck",
-       .user           = OCP_USER_MPU,
-};
-
-/* L4 WKUP -> GPIO1 */
-static struct omap_hwmod_ocp_if am33xx_l4_wkup__gpio0 = {
-       .master         = &am33xx_l4_wkup_hwmod,
-       .slave          = &am33xx_gpio0_hwmod,
-       .clk            = "dpll_core_m4_div2_ck",
-       .user           = OCP_USER_MPU | OCP_USER_SDMA,
-};
-
-/* L4 WKUP -> ADC_TSC */
-static struct omap_hwmod_addr_space am33xx_adc_tsc_addrs[] = {
-       {
-               .pa_start       = 0x44E0D000,
-               .pa_end         = 0x44E0D000 + SZ_8K - 1,
-               .flags          = ADDR_TYPE_RT
-       },
-       { }
-};
-
-static struct omap_hwmod_ocp_if am33xx_l4_wkup__adc_tsc = {
-       .master         = &am33xx_l4_wkup_hwmod,
-       .slave          = &am33xx_adc_tsc_hwmod,
-       .clk            = "dpll_core_m4_div2_ck",
-       .addr           = am33xx_adc_tsc_addrs,
-       .user           = OCP_USER_MPU,
-};
-
-static struct omap_hwmod_ocp_if am33xx_l4_hs__cpgmac0 = {
-       .master         = &am33xx_l4_hs_hwmod,
-       .slave          = &am33xx_cpgmac0_hwmod,
-       .clk            = "cpsw_125mhz_gclk",
-       .user           = OCP_USER_MPU,
-};
-
-static struct omap_hwmod_ocp_if am33xx_cpgmac0__mdio = {
-       .master         = &am33xx_cpgmac0_hwmod,
-       .slave          = &am33xx_mdio_hwmod,
-       .user           = OCP_USER_MPU,
-};
-
-static struct omap_hwmod_addr_space am33xx_elm_addr_space[] = {
-       {
-               .pa_start       = 0x48080000,
-               .pa_end         = 0x48080000 + SZ_8K - 1,
-               .flags          = ADDR_TYPE_RT
-       },
-       { }
-};
-
-static struct omap_hwmod_ocp_if am33xx_l4_ls__elm = {
-       .master         = &am33xx_l4_ls_hwmod,
-       .slave          = &am33xx_elm_hwmod,
-       .clk            = "l4ls_gclk",
-       .addr           = am33xx_elm_addr_space,
-       .user           = OCP_USER_MPU,
-};
-
-static struct omap_hwmod_addr_space am33xx_epwmss0_addr_space[] = {
-       {
-               .pa_start       = 0x48300000,
-               .pa_end         = 0x48300000 + SZ_16 - 1,
-               .flags          = ADDR_TYPE_RT
-       },
-       { }
-};
-
-static struct omap_hwmod_ocp_if am33xx_l4_ls__epwmss0 = {
-       .master         = &am33xx_l4_ls_hwmod,
-       .slave          = &am33xx_epwmss0_hwmod,
-       .clk            = "l4ls_gclk",
-       .addr           = am33xx_epwmss0_addr_space,
-       .user           = OCP_USER_MPU,
-};
-
-static struct omap_hwmod_ocp_if am33xx_epwmss0__ecap0 = {
-       .master         = &am33xx_epwmss0_hwmod,
-       .slave          = &am33xx_ecap0_hwmod,
-       .clk            = "l4ls_gclk",
-       .user           = OCP_USER_MPU,
-};
-
-static struct omap_hwmod_ocp_if am33xx_epwmss0__eqep0 = {
-       .master         = &am33xx_epwmss0_hwmod,
-       .slave          = &am33xx_eqep0_hwmod,
-       .clk            = "l4ls_gclk",
-       .user           = OCP_USER_MPU,
-};
-
-static struct omap_hwmod_ocp_if am33xx_epwmss0__ehrpwm0 = {
-       .master         = &am33xx_epwmss0_hwmod,
-       .slave          = &am33xx_ehrpwm0_hwmod,
-       .clk            = "l4ls_gclk",
-       .user           = OCP_USER_MPU,
-};
-
-
-static struct omap_hwmod_addr_space am33xx_epwmss1_addr_space[] = {
+/* l3_main -> debugss */
+static struct omap_hwmod_addr_space am33xx_debugss_addrs[] = {
        {
-               .pa_start       = 0x48302000,
-               .pa_end         = 0x48302000 + SZ_16 - 1,
+               .pa_start       = 0x4b000000,
+               .pa_end         = 0x4b000000 + SZ_16M - 1,
                .flags          = ADDR_TYPE_RT
        },
        { }
 };
 
-static struct omap_hwmod_ocp_if am33xx_l4_ls__epwmss1 = {
-       .master         = &am33xx_l4_ls_hwmod,
-       .slave          = &am33xx_epwmss1_hwmod,
-       .clk            = "l4ls_gclk",
-       .addr           = am33xx_epwmss1_addr_space,
-       .user           = OCP_USER_MPU,
-};
-
-static struct omap_hwmod_ocp_if am33xx_epwmss1__ecap1 = {
-       .master         = &am33xx_epwmss1_hwmod,
-       .slave          = &am33xx_ecap1_hwmod,
-       .clk            = "l4ls_gclk",
-       .user           = OCP_USER_MPU,
-};
-
-static struct omap_hwmod_ocp_if am33xx_epwmss1__eqep1 = {
-       .master         = &am33xx_epwmss1_hwmod,
-       .slave          = &am33xx_eqep1_hwmod,
-       .clk            = "l4ls_gclk",
+static struct omap_hwmod_ocp_if am33xx_l3_main__debugss = {
+       .master         = &am33xx_l3_main_hwmod,
+       .slave          = &am33xx_debugss_hwmod,
+       .clk            = "dpll_core_m4_ck",
+       .addr           = am33xx_debugss_addrs,
        .user           = OCP_USER_MPU,
 };
 
-static struct omap_hwmod_ocp_if am33xx_epwmss1__ehrpwm1 = {
-       .master         = &am33xx_epwmss1_hwmod,
-       .slave          = &am33xx_ehrpwm1_hwmod,
-       .clk            = "l4ls_gclk",
+/* l4 wkup -> smartreflex0 */
+static struct omap_hwmod_ocp_if am33xx_l4_wkup__smartreflex0 = {
+       .master         = &am33xx_l4_wkup_hwmod,
+       .slave          = &am33xx_smartreflex0_hwmod,
+       .clk            = "dpll_core_m4_div2_ck",
        .user           = OCP_USER_MPU,
 };
 
-static struct omap_hwmod_addr_space am33xx_epwmss2_addr_space[] = {
-       {
-               .pa_start       = 0x48304000,
-               .pa_end         = 0x48304000 + SZ_16 - 1,
-               .flags          = ADDR_TYPE_RT
-       },
-       { }
-};
-
-static struct omap_hwmod_ocp_if am33xx_l4_ls__epwmss2 = {
-       .master         = &am33xx_l4_ls_hwmod,
-       .slave          = &am33xx_epwmss2_hwmod,
-       .clk            = "l4ls_gclk",
-       .addr           = am33xx_epwmss2_addr_space,
+/* l4 wkup -> smartreflex1 */
+static struct omap_hwmod_ocp_if am33xx_l4_wkup__smartreflex1 = {
+       .master         = &am33xx_l4_wkup_hwmod,
+       .slave          = &am33xx_smartreflex1_hwmod,
+       .clk            = "dpll_core_m4_div2_ck",
        .user           = OCP_USER_MPU,
 };
 
-static struct omap_hwmod_ocp_if am33xx_epwmss2__ecap2 = {
-       .master         = &am33xx_epwmss2_hwmod,
-       .slave          = &am33xx_ecap2_hwmod,
-       .clk            = "l4ls_gclk",
+/* l4 wkup -> control */
+static struct omap_hwmod_ocp_if am33xx_l4_wkup__control = {
+       .master         = &am33xx_l4_wkup_hwmod,
+       .slave          = &am33xx_control_hwmod,
+       .clk            = "dpll_core_m4_div2_ck",
        .user           = OCP_USER_MPU,
 };
 
-static struct omap_hwmod_ocp_if am33xx_epwmss2__eqep2 = {
-       .master         = &am33xx_epwmss2_hwmod,
-       .slave          = &am33xx_eqep2_hwmod,
-       .clk            = "l4ls_gclk",
+/* L4 WKUP -> I2C1 */
+static struct omap_hwmod_ocp_if am33xx_l4_wkup__i2c1 = {
+       .master         = &am33xx_l4_wkup_hwmod,
+       .slave          = &am33xx_i2c1_hwmod,
+       .clk            = "dpll_core_m4_div2_ck",
        .user           = OCP_USER_MPU,
 };
 
-static struct omap_hwmod_ocp_if am33xx_epwmss2__ehrpwm2 = {
-       .master         = &am33xx_epwmss2_hwmod,
-       .slave          = &am33xx_ehrpwm2_hwmod,
-       .clk            = "l4ls_gclk",
-       .user           = OCP_USER_MPU,
+/* L4 WKUP -> GPIO1 */
+static struct omap_hwmod_ocp_if am33xx_l4_wkup__gpio0 = {
+       .master         = &am33xx_l4_wkup_hwmod,
+       .slave          = &am33xx_gpio0_hwmod,
+       .clk            = "dpll_core_m4_div2_ck",
+       .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
-/* l3s cfg -> gpmc */
-static struct omap_hwmod_addr_space am33xx_gpmc_addr_space[] = {
+/* L4 WKUP -> ADC_TSC */
+static struct omap_hwmod_addr_space am33xx_adc_tsc_addrs[] = {
        {
-               .pa_start       = 0x50000000,
-               .pa_end         = 0x50000000 + SZ_8K - 1,
-               .flags          = ADDR_TYPE_RT,
+               .pa_start       = 0x44E0D000,
+               .pa_end         = 0x44E0D000 + SZ_8K - 1,
+               .flags          = ADDR_TYPE_RT
        },
        { }
 };
 
-static struct omap_hwmod_ocp_if am33xx_l3_s__gpmc = {
-       .master         = &am33xx_l3_s_hwmod,
-       .slave          = &am33xx_gpmc_hwmod,
-       .clk            = "l3s_gclk",
-       .addr           = am33xx_gpmc_addr_space,
-       .user           = OCP_USER_MPU,
-};
-
-/* i2c2 */
-static struct omap_hwmod_ocp_if am33xx_l4_per__i2c2 = {
-       .master         = &am33xx_l4_ls_hwmod,
-       .slave          = &am33xx_i2c2_hwmod,
-       .clk            = "l4ls_gclk",
+static struct omap_hwmod_ocp_if am33xx_l4_wkup__adc_tsc = {
+       .master         = &am33xx_l4_wkup_hwmod,
+       .slave          = &am33xx_adc_tsc_hwmod,
+       .clk            = "dpll_core_m4_div2_ck",
+       .addr           = am33xx_adc_tsc_addrs,
        .user           = OCP_USER_MPU,
 };
 
-static struct omap_hwmod_ocp_if am33xx_l4_per__i2c3 = {
-       .master         = &am33xx_l4_ls_hwmod,
-       .slave          = &am33xx_i2c3_hwmod,
-       .clk            = "l4ls_gclk",
+static struct omap_hwmod_ocp_if am33xx_l4_hs__cpgmac0 = {
+       .master         = &am33xx_l4_hs_hwmod,
+       .slave          = &am33xx_cpgmac0_hwmod,
+       .clk            = "cpsw_125mhz_gclk",
        .user           = OCP_USER_MPU,
 };
 
@@ -2121,138 +483,6 @@ static struct omap_hwmod_ocp_if am33xx_l3_main__lcdc = {
        .user           = OCP_USER_MPU,
 };
 
-static struct omap_hwmod_addr_space am33xx_mailbox_addrs[] = {
-       {
-               .pa_start       = 0x480C8000,
-               .pa_end         = 0x480C8000 + (SZ_4K - 1),
-               .flags          = ADDR_TYPE_RT
-       },
-       { }
-};
-
-/* l4 ls -> mailbox */
-static struct omap_hwmod_ocp_if am33xx_l4_per__mailbox = {
-       .master         = &am33xx_l4_ls_hwmod,
-       .slave          = &am33xx_mailbox_hwmod,
-       .clk            = "l4ls_gclk",
-       .addr           = am33xx_mailbox_addrs,
-       .user           = OCP_USER_MPU,
-};
-
-/* l4 ls -> spinlock */
-static struct omap_hwmod_ocp_if am33xx_l4_ls__spinlock = {
-       .master         = &am33xx_l4_ls_hwmod,
-       .slave          = &am33xx_spinlock_hwmod,
-       .clk            = "l4ls_gclk",
-       .user           = OCP_USER_MPU,
-};
-
-/* l4 ls -> mcasp0 */
-static struct omap_hwmod_addr_space am33xx_mcasp0_addr_space[] = {
-       {
-               .pa_start       = 0x48038000,
-               .pa_end         = 0x48038000 + SZ_8K - 1,
-               .flags          = ADDR_TYPE_RT
-       },
-       { }
-};
-
-static struct omap_hwmod_ocp_if am33xx_l4_ls__mcasp0 = {
-       .master         = &am33xx_l4_ls_hwmod,
-       .slave          = &am33xx_mcasp0_hwmod,
-       .clk            = "l4ls_gclk",
-       .addr           = am33xx_mcasp0_addr_space,
-       .user           = OCP_USER_MPU,
-};
-
-/* l4 ls -> mcasp1 */
-static struct omap_hwmod_addr_space am33xx_mcasp1_addr_space[] = {
-       {
-               .pa_start       = 0x4803C000,
-               .pa_end         = 0x4803C000 + SZ_8K - 1,
-               .flags          = ADDR_TYPE_RT
-       },
-       { }
-};
-
-static struct omap_hwmod_ocp_if am33xx_l4_ls__mcasp1 = {
-       .master         = &am33xx_l4_ls_hwmod,
-       .slave          = &am33xx_mcasp1_hwmod,
-       .clk            = "l4ls_gclk",
-       .addr           = am33xx_mcasp1_addr_space,
-       .user           = OCP_USER_MPU,
-};
-
-/* l4 ls -> mmc0 */
-static struct omap_hwmod_addr_space am33xx_mmc0_addr_space[] = {
-       {
-               .pa_start       = 0x48060100,
-               .pa_end         = 0x48060100 + SZ_4K - 1,
-               .flags          = ADDR_TYPE_RT,
-       },
-       { }
-};
-
-static struct omap_hwmod_ocp_if am33xx_l4_ls__mmc0 = {
-       .master         = &am33xx_l4_ls_hwmod,
-       .slave          = &am33xx_mmc0_hwmod,
-       .clk            = "l4ls_gclk",
-       .addr           = am33xx_mmc0_addr_space,
-       .user           = OCP_USER_MPU,
-};
-
-/* l4 ls -> mmc1 */
-static struct omap_hwmod_addr_space am33xx_mmc1_addr_space[] = {
-       {
-               .pa_start       = 0x481d8100,
-               .pa_end         = 0x481d8100 + SZ_4K - 1,
-               .flags          = ADDR_TYPE_RT,
-       },
-       { }
-};
-
-static struct omap_hwmod_ocp_if am33xx_l4_ls__mmc1 = {
-       .master         = &am33xx_l4_ls_hwmod,
-       .slave          = &am33xx_mmc1_hwmod,
-       .clk            = "l4ls_gclk",
-       .addr           = am33xx_mmc1_addr_space,
-       .user           = OCP_USER_MPU,
-};
-
-/* l3 s -> mmc2 */
-static struct omap_hwmod_addr_space am33xx_mmc2_addr_space[] = {
-       {
-               .pa_start       = 0x47810100,
-               .pa_end         = 0x47810100 + SZ_64K - 1,
-               .flags          = ADDR_TYPE_RT,
-       },
-       { }
-};
-
-static struct omap_hwmod_ocp_if am33xx_l3_s__mmc2 = {
-       .master         = &am33xx_l3_s_hwmod,
-       .slave          = &am33xx_mmc2_hwmod,
-       .clk            = "l3s_gclk",
-       .addr           = am33xx_mmc2_addr_space,
-       .user           = OCP_USER_MPU,
-};
-
-/* l4 ls -> mcspi0 */
-static struct omap_hwmod_ocp_if am33xx_l4_ls__mcspi0 = {
-       .master         = &am33xx_l4_ls_hwmod,
-       .slave          = &am33xx_spi0_hwmod,
-       .clk            = "l4ls_gclk",
-       .user           = OCP_USER_MPU,
-};
-
-/* l4 ls -> mcspi1 */
-static struct omap_hwmod_ocp_if am33xx_l4_ls__mcspi1 = {
-       .master         = &am33xx_l4_ls_hwmod,
-       .slave          = &am33xx_spi1_hwmod,
-       .clk            = "l4ls_gclk",
-       .user           = OCP_USER_MPU,
-};
-
 /* l4 wkup -> timer1 */
 static struct omap_hwmod_ocp_if am33xx_l4_wkup__timer1 = {
        .master         = &am33xx_l4_wkup_hwmod,
@@ -2261,116 +491,6 @@ static struct omap_hwmod_ocp_if am33xx_l4_wkup__timer1 = {
        .user           = OCP_USER_MPU,
 };
 
-/* l4 per -> timer2 */
-static struct omap_hwmod_ocp_if am33xx_l4_ls__timer2 = {
-       .master         = &am33xx_l4_ls_hwmod,
-       .slave          = &am33xx_timer2_hwmod,
-       .clk            = "l4ls_gclk",
-       .user           = OCP_USER_MPU,
-};
-
-/* l4 per -> timer3 */
-static struct omap_hwmod_ocp_if am33xx_l4_ls__timer3 = {
-       .master         = &am33xx_l4_ls_hwmod,
-       .slave          = &am33xx_timer3_hwmod,
-       .clk            = "l4ls_gclk",
-       .user           = OCP_USER_MPU,
-};
-
-/* l4 per -> timer4 */
-static struct omap_hwmod_ocp_if am33xx_l4_ls__timer4 = {
-       .master         = &am33xx_l4_ls_hwmod,
-       .slave          = &am33xx_timer4_hwmod,
-       .clk            = "l4ls_gclk",
-       .user           = OCP_USER_MPU,
-};
-
-/* l4 per -> timer5 */
-static struct omap_hwmod_ocp_if am33xx_l4_ls__timer5 = {
-       .master         = &am33xx_l4_ls_hwmod,
-       .slave          = &am33xx_timer5_hwmod,
-       .clk            = "l4ls_gclk",
-       .user           = OCP_USER_MPU,
-};
-
-/* l4 per -> timer6 */
-static struct omap_hwmod_ocp_if am33xx_l4_ls__timer6 = {
-       .master         = &am33xx_l4_ls_hwmod,
-       .slave          = &am33xx_timer6_hwmod,
-       .clk            = "l4ls_gclk",
-       .user           = OCP_USER_MPU,
-};
-
-/* l4 per -> timer7 */
-static struct omap_hwmod_ocp_if am33xx_l4_ls__timer7 = {
-       .master         = &am33xx_l4_ls_hwmod,
-       .slave          = &am33xx_timer7_hwmod,
-       .clk            = "l4ls_gclk",
-       .user           = OCP_USER_MPU,
-};
-
-/* l3 main -> tpcc */
-static struct omap_hwmod_ocp_if am33xx_l3_main__tpcc = {
-       .master         = &am33xx_l3_main_hwmod,
-       .slave          = &am33xx_tpcc_hwmod,
-       .clk            = "l3_gclk",
-       .user           = OCP_USER_MPU,
-};
-
-/* l3 main -> tpcc0 */
-static struct omap_hwmod_addr_space am33xx_tptc0_addr_space[] = {
-       {
-               .pa_start       = 0x49800000,
-               .pa_end         = 0x49800000 + SZ_8K - 1,
-               .flags          = ADDR_TYPE_RT,
-       },
-       { }
-};
-
-static struct omap_hwmod_ocp_if am33xx_l3_main__tptc0 = {
-       .master         = &am33xx_l3_main_hwmod,
-       .slave          = &am33xx_tptc0_hwmod,
-       .clk            = "l3_gclk",
-       .addr           = am33xx_tptc0_addr_space,
-       .user           = OCP_USER_MPU,
-};
-
-/* l3 main -> tpcc1 */
-static struct omap_hwmod_addr_space am33xx_tptc1_addr_space[] = {
-       {
-               .pa_start       = 0x49900000,
-               .pa_end         = 0x49900000 + SZ_8K - 1,
-               .flags          = ADDR_TYPE_RT,
-       },
-       { }
-};
-
-static struct omap_hwmod_ocp_if am33xx_l3_main__tptc1 = {
-       .master         = &am33xx_l3_main_hwmod,
-       .slave          = &am33xx_tptc1_hwmod,
-       .clk            = "l3_gclk",
-       .addr           = am33xx_tptc1_addr_space,
-       .user           = OCP_USER_MPU,
-};
-
-/* l3 main -> tpcc2 */
-static struct omap_hwmod_addr_space am33xx_tptc2_addr_space[] = {
-       {
-               .pa_start       = 0x49a00000,
-               .pa_end         = 0x49a00000 + SZ_8K - 1,
-               .flags          = ADDR_TYPE_RT,
-       },
-       { }
-};
-
-static struct omap_hwmod_ocp_if am33xx_l3_main__tptc2 = {
-       .master         = &am33xx_l3_main_hwmod,
-       .slave          = &am33xx_tptc2_hwmod,
-       .clk            = "l3_gclk",
-       .addr           = am33xx_tptc2_addr_space,
-       .user           = OCP_USER_MPU,
-};
-
 /* l4 wkup -> uart1 */
 static struct omap_hwmod_ocp_if am33xx_l4_wkup__uart1 = {
        .master         = &am33xx_l4_wkup_hwmod,
@@ -2379,46 +499,6 @@ static struct omap_hwmod_ocp_if am33xx_l4_wkup__uart1 = {
        .user           = OCP_USER_MPU,
 };
 
-/* l4 ls -> uart2 */
-static struct omap_hwmod_ocp_if am33xx_l4_ls__uart2 = {
-       .master         = &am33xx_l4_ls_hwmod,
-       .slave          = &am33xx_uart2_hwmod,
-       .clk            = "l4ls_gclk",
-       .user           = OCP_USER_MPU,
-};
-
-/* l4 ls -> uart3 */
-static struct omap_hwmod_ocp_if am33xx_l4_ls__uart3 = {
-       .master         = &am33xx_l4_ls_hwmod,
-       .slave          = &am33xx_uart3_hwmod,
-       .clk            = "l4ls_gclk",
-       .user           = OCP_USER_MPU,
-};
-
-/* l4 ls -> uart4 */
-static struct omap_hwmod_ocp_if am33xx_l4_ls__uart4 = {
-       .master         = &am33xx_l4_ls_hwmod,
-       .slave          = &am33xx_uart4_hwmod,
-       .clk            = "l4ls_gclk",
-       .user           = OCP_USER_MPU,
-};
-
-/* l4 ls -> uart5 */
-static struct omap_hwmod_ocp_if am33xx_l4_ls__uart5 = {
-       .master         = &am33xx_l4_ls_hwmod,
-       .slave          = &am33xx_uart5_hwmod,
-       .clk            = "l4ls_gclk",
-       .user           = OCP_USER_MPU,
-};
-
-/* l4 ls -> uart6 */
-static struct omap_hwmod_ocp_if am33xx_l4_ls__uart6 = {
-       .master         = &am33xx_l4_ls_hwmod,
-       .slave          = &am33xx_uart6_hwmod,
-       .clk            = "l4ls_gclk",
-       .user           = OCP_USER_MPU,
-};
-
 /* l4 wkup -> wd_timer1 */
 static struct omap_hwmod_ocp_if am33xx_l4_wkup__wd_timer1 = {
        .master         = &am33xx_l4_wkup_hwmod,
@@ -2437,47 +517,39 @@ static struct omap_hwmod_ocp_if am33xx_l3_s__usbss = {
        .flags          = OCPIF_SWSUP_IDLE,
 };
 
-/* l3 main -> ocmc */
-static struct omap_hwmod_ocp_if am33xx_l3_main__ocmc = {
-       .master         = &am33xx_l3_main_hwmod,
-       .slave          = &am33xx_ocmcram_hwmod,
-       .user           = OCP_USER_MPU | OCP_USER_SDMA,
-};
-
-/* l3 main -> sha0 HIB2 */
-static struct omap_hwmod_addr_space am33xx_sha0_addrs[] = {
-       {
-               .pa_start       = 0x53100000,
-               .pa_end         = 0x53100000 + SZ_512 - 1,
-               .flags          = ADDR_TYPE_RT
-       },
-       { }
+/* rng */
+static struct omap_hwmod_class_sysconfig am33xx_rng_sysc = {
+       .rev_offs       = 0x1fe0,
+       .sysc_offs      = 0x1fe4,
+       .sysc_flags     = SYSC_HAS_AUTOIDLE | SYSC_HAS_SIDLEMODE,
+       .idlemodes      = SIDLE_FORCE | SIDLE_NO,
+       .sysc_fields    = &omap_hwmod_sysc_type1,
 };
 
-static struct omap_hwmod_ocp_if am33xx_l3_main__sha0 = {
-       .master         = &am33xx_l3_main_hwmod,
-       .slave          = &am33xx_sha0_hwmod,
-       .clk            = "sha0_fck",
-       .addr           = am33xx_sha0_addrs,
-       .user           = OCP_USER_MPU | OCP_USER_SDMA,
+static struct omap_hwmod_class am33xx_rng_hwmod_class = {
+       .name           = "rng",
+       .sysc           = &am33xx_rng_sysc,
 };
 
-/* l3 main -> AES0 HIB2 */
-static struct omap_hwmod_addr_space am33xx_aes0_addrs[] = {
-       {
-               .pa_start       = 0x53500000,
-               .pa_end         = 0x53500000 + SZ_1M - 1,
-               .flags          = ADDR_TYPE_RT
+static struct omap_hwmod am33xx_rng_hwmod = {
+       .name           = "rng",
+       .class          = &am33xx_rng_hwmod_class,
+       .clkdm_name     = "l4ls_clkdm",
+       .flags          = HWMOD_SWSUP_SIDLE,
+       .main_clk       = "rng_fck",
+       .prcm           = {
+               .omap4  = {
+                       .clkctrl_offs   = AM33XX_CM_PER_RNG_CLKCTRL_OFFSET,
+                       .modulemode     = MODULEMODE_SWCTRL,
+               },
        },
-       { }
 };
 
-static struct omap_hwmod_ocp_if am33xx_l3_main__aes0 = {
-       .master         = &am33xx_l3_main_hwmod,
-       .slave          = &am33xx_aes0_hwmod,
-       .clk            = "aes0_fck",
-       .addr           = am33xx_aes0_addrs,
-       .user           = OCP_USER_MPU | OCP_USER_SDMA,
+static struct omap_hwmod_ocp_if am33xx_l4_per__rng = {
+       .master         = &am33xx_l4_ls_hwmod,
+       .slave          = &am33xx_rng_hwmod,
+       .clk            = "rng_fck",
+       .user           = OCP_USER_MPU,
 };
 
 static struct omap_hwmod_ocp_if *am33xx_hwmod_ocp_ifs[] __initdata = {
@@ -2559,11 +631,13 @@ static struct omap_hwmod_ocp_if *am33xx_hwmod_ocp_ifs[] __initdata = {
        &am33xx_cpgmac0__mdio,
        &am33xx_l3_main__sha0,
        &am33xx_l3_main__aes0,
+       &am33xx_l4_per__rng,
        NULL,
 };
 
 int __init am33xx_hwmod_init(void)
 {
+       omap_hwmod_am33xx_reg();
        omap_hwmod_init();
        return omap_hwmod_register_links(am33xx_hwmod_ocp_ifs);
 }
index 0c3a427da5445a5d2f990e05f2f3fcec50634143..9e56fabd7fa3b834fbe09a463facd521592107a7 100644 (file)
@@ -3693,6 +3693,53 @@ static struct omap_hwmod_ocp_if omap3xxx_l4_core__aes = {
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
+/*
+ * 'ssi' class
+ * synchronous serial interface (multichannel and full-duplex serial if)
+ */
+
+static struct omap_hwmod_class_sysconfig omap34xx_ssi_sysc = {
+       .rev_offs       = 0x0000,
+       .sysc_offs      = 0x0010,
+       .syss_offs      = 0x0014,
+       .sysc_flags     = (SYSC_HAS_AUTOIDLE | SYSC_HAS_EMUFREE |
+                          SYSC_HAS_MIDLEMODE | SYSC_HAS_SIDLEMODE |
+                          SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
+       .idlemodes      = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
+                          SIDLE_SMART_WKUP | MSTANDBY_FORCE | MSTANDBY_NO |
+                          MSTANDBY_SMART | MSTANDBY_SMART_WKUP),
+       .sysc_fields    = &omap_hwmod_sysc_type1,
+};
+
+static struct omap_hwmod_class omap34xx_ssi_hwmod_class = {
+       .name   = "ssi",
+       .sysc   = &omap34xx_ssi_sysc,
+};
+
+static struct omap_hwmod omap34xx_ssi_hwmod = {
+       .name           = "ssi",
+       .class          = &omap34xx_ssi_hwmod_class,
+       .clkdm_name     = "core_l4_clkdm",
+       .main_clk       = "ssi_ssr_fck",
+       .prcm           = {
+               .omap2 = {
+                       .prcm_reg_id            = 1,
+                       .module_bit             = OMAP3430_EN_SSI_SHIFT,
+                       .module_offs            = CORE_MOD,
+                       .idlest_reg_id          = 1,
+                       .idlest_idle_bit        = OMAP3430ES2_ST_SSI_IDLE_SHIFT,
+               },
+       },
+};
+
+/* L4 CORE -> SSI */
+static struct omap_hwmod_ocp_if omap34xx_l4_core__ssi = {
+       .master         = &omap3xxx_l4_core_hwmod,
+       .slave          = &omap34xx_ssi_hwmod,
+       .clk            = "ssi_ick",
+       .user           = OCP_USER_MPU | OCP_USER_SDMA,
+};
+
 static struct omap_hwmod_ocp_if *omap3xxx_hwmod_ocp_ifs[] __initdata = {
        &omap3xxx_l3_main__l4_core,
        &omap3xxx_l3_main__l4_per,
@@ -3818,6 +3865,7 @@ static struct omap_hwmod_ocp_if *omap34xx_hwmod_ocp_ifs[] __initdata = {
 #ifdef CONFIG_OMAP_IOMMU_IVA2
        &omap3xxx_l3_main__mmu_iva,
 #endif
+       &omap34xx_l4_core__ssi,
        NULL
 };
 
diff --git a/arch/arm/mach-omap2/omap_hwmod_43xx_data.c b/arch/arm/mach-omap2/omap_hwmod_43xx_data.c
new file mode 100644 (file)
index 0000000..9002fca
--- /dev/null
@@ -0,0 +1,758 @@
+/*
+ * Copyright (C) 2013 Texas Instruments Incorporated
+ *
+ * Hwmod present only in AM43x and those that differ other than register
+ * offsets as compared to AM335x.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation version 2.
+ *
+ * This program is distributed "as is" WITHOUT ANY WARRANTY of any
+ * kind, whether express or implied; without even the implied warranty
+ * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+
+#include <linux/platform_data/gpio-omap.h>
+#include <linux/platform_data/spi-omap2-mcspi.h>
+#include "omap_hwmod.h"
+#include "omap_hwmod_33xx_43xx_common_data.h"
+#include "prcm43xx.h"
+
+/* IP blocks */
+static struct omap_hwmod am43xx_l4_hs_hwmod = {
+       .name           = "l4_hs",
+       .class          = &am33xx_l4_hwmod_class,
+       .clkdm_name     = "l3_clkdm",
+       .flags          = HWMOD_INIT_NO_IDLE,
+       .main_clk       = "l4hs_gclk",
+       .prcm           = {
+               .omap4  = {
+                       .clkctrl_offs   = AM43XX_CM_PER_L4HS_CLKCTRL_OFFSET,
+                       .modulemode     = MODULEMODE_SWCTRL,
+               },
+       },
+};
+
+static struct omap_hwmod_rst_info am33xx_wkup_m3_resets[] = {
+       { .name = "wkup_m3", .rst_shift = 3, .st_shift = 5 },
+};
+
+static struct omap_hwmod am43xx_wkup_m3_hwmod = {
+       .name           = "wkup_m3",
+       .class          = &am33xx_wkup_m3_hwmod_class,
+       .clkdm_name     = "l4_wkup_aon_clkdm",
+       /* Keep hardreset asserted */
+       .flags          = HWMOD_INIT_NO_RESET | HWMOD_NO_IDLEST,
+       .main_clk       = "sys_clkin_ck",
+       .prcm           = {
+               .omap4  = {
+                       .clkctrl_offs   = AM43XX_CM_WKUP_WKUP_M3_CLKCTRL_OFFSET,
+                       .rstctrl_offs   = AM43XX_RM_WKUP_RSTCTRL_OFFSET,
+                       .rstst_offs     = AM43XX_RM_WKUP_RSTST_OFFSET,
+                       .modulemode     = MODULEMODE_SWCTRL,
+               },
+       },
+       .rst_lines      = am33xx_wkup_m3_resets,
+       .rst_lines_cnt  = ARRAY_SIZE(am33xx_wkup_m3_resets),
+};
+
+static struct omap_hwmod am43xx_control_hwmod = {
+       .name           = "control",
+       .class          = &am33xx_control_hwmod_class,
+       .clkdm_name     = "l4_wkup_clkdm",
+       .flags          = HWMOD_INIT_NO_IDLE,
+       .main_clk       = "sys_clkin_ck",
+       .prcm           = {
+               .omap4  = {
+                       .clkctrl_offs   = AM43XX_CM_WKUP_CONTROL_CLKCTRL_OFFSET,
+                       .modulemode     = MODULEMODE_SWCTRL,
+               },
+       },
+};
+
+static struct omap_hwmod_opt_clk gpio0_opt_clks[] = {
+       { .role = "dbclk", .clk = "gpio0_dbclk" },
+};
+
+static struct omap_hwmod am43xx_gpio0_hwmod = {
+       .name           = "gpio1",
+       .class          = &am33xx_gpio_hwmod_class,
+       .clkdm_name     = "l4_wkup_clkdm",
+       .flags          = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
+       .main_clk       = "sys_clkin_ck",
+       .prcm           = {
+               .omap4  = {
+                       .clkctrl_offs   = AM43XX_CM_WKUP_GPIO0_CLKCTRL_OFFSET,
+                       .modulemode     = MODULEMODE_SWCTRL,
+               },
+       },
+       .opt_clks       = gpio0_opt_clks,
+       .opt_clks_cnt   = ARRAY_SIZE(gpio0_opt_clks),
+       .dev_attr       = &gpio_dev_attr,
+};
+
+static struct omap_hwmod_class_sysconfig am43xx_synctimer_sysc = {
+       .rev_offs       = 0x0,
+       .sysc_offs      = 0x4,
+       .sysc_flags     = SYSC_HAS_SIDLEMODE,
+       .idlemodes      = (SIDLE_FORCE | SIDLE_NO),
+       .sysc_fields    = &omap_hwmod_sysc_type1,
+};
+
+static struct omap_hwmod_class am43xx_synctimer_hwmod_class = {
+       .name   = "synctimer",
+       .sysc   = &am43xx_synctimer_sysc,
+};
+
+static struct omap_hwmod am43xx_synctimer_hwmod = {
+       .name           = "counter_32k",
+       .class          = &am43xx_synctimer_hwmod_class,
+       .clkdm_name     = "l4_wkup_aon_clkdm",
+       .flags          = HWMOD_SWSUP_SIDLE,
+       .main_clk       = "synctimer_32kclk",
+       .prcm = {
+               .omap4 = {
+                       .clkctrl_offs = AM43XX_CM_WKUP_SYNCTIMER_CLKCTRL_OFFSET,
+                       .modulemode   = MODULEMODE_SWCTRL,
+               },
+       },
+};
+
+static struct omap_hwmod am43xx_timer8_hwmod = {
+       .name           = "timer8",
+       .class          = &am33xx_timer_hwmod_class,
+       .clkdm_name     = "l4ls_clkdm",
+       .main_clk       = "timer8_fck",
+       .prcm           = {
+               .omap4  = {
+                       .clkctrl_offs   = AM43XX_CM_PER_TIMER8_CLKCTRL_OFFSET,
+                       .modulemode     = MODULEMODE_SWCTRL,
+               },
+       },
+};
+
+static struct omap_hwmod am43xx_timer9_hwmod = {
+       .name           = "timer9",
+       .class          = &am33xx_timer_hwmod_class,
+       .clkdm_name     = "l4ls_clkdm",
+       .main_clk       = "timer9_fck",
+       .prcm           = {
+               .omap4  = {
+                       .clkctrl_offs   = AM43XX_CM_PER_TIMER9_CLKCTRL_OFFSET,
+                       .modulemode     = MODULEMODE_SWCTRL,
+               },
+       },
+};
+
+static struct omap_hwmod am43xx_timer10_hwmod = {
+       .name           = "timer10",
+       .class          = &am33xx_timer_hwmod_class,
+       .clkdm_name     = "l4ls_clkdm",
+       .main_clk       = "timer10_fck",
+       .prcm           = {
+               .omap4  = {
+                       .clkctrl_offs   = AM43XX_CM_PER_TIMER10_CLKCTRL_OFFSET,
+                       .modulemode     = MODULEMODE_SWCTRL,
+               },
+       },
+};
+
+static struct omap_hwmod am43xx_timer11_hwmod = {
+       .name           = "timer11",
+       .class          = &am33xx_timer_hwmod_class,
+       .clkdm_name     = "l4ls_clkdm",
+       .main_clk       = "timer11_fck",
+       .prcm           = {
+               .omap4  = {
+                       .clkctrl_offs   = AM43XX_CM_PER_TIMER11_CLKCTRL_OFFSET,
+                       .modulemode     = MODULEMODE_SWCTRL,
+               },
+       },
+};
+
+static struct omap_hwmod am43xx_epwmss3_hwmod = {
+       .name           = "epwmss3",
+       .class          = &am33xx_epwmss_hwmod_class,
+       .clkdm_name     = "l4ls_clkdm",
+       .main_clk       = "l4ls_gclk",
+       .prcm           = {
+               .omap4  = {
+                       .clkctrl_offs = AM43XX_CM_PER_EPWMSS3_CLKCTRL_OFFSET,
+                       .modulemode   = MODULEMODE_SWCTRL,
+               },
+       },
+};
+
+static struct omap_hwmod am43xx_ehrpwm3_hwmod = {
+       .name           = "ehrpwm3",
+       .class          = &am33xx_ehrpwm_hwmod_class,
+       .clkdm_name     = "l4ls_clkdm",
+       .main_clk       = "l4ls_gclk",
+};
+
+static struct omap_hwmod am43xx_epwmss4_hwmod = {
+       .name           = "epwmss4",
+       .class          = &am33xx_epwmss_hwmod_class,
+       .clkdm_name     = "l4ls_clkdm",
+       .main_clk       = "l4ls_gclk",
+       .prcm           = {
+               .omap4  = {
+                       .clkctrl_offs = AM43XX_CM_PER_EPWMSS4_CLKCTRL_OFFSET,
+                       .modulemode   = MODULEMODE_SWCTRL,
+               },
+       },
+};
+
+static struct omap_hwmod am43xx_ehrpwm4_hwmod = {
+       .name           = "ehrpwm4",
+       .class          = &am33xx_ehrpwm_hwmod_class,
+       .clkdm_name     = "l4ls_clkdm",
+       .main_clk       = "l4ls_gclk",
+};
+
+static struct omap_hwmod am43xx_epwmss5_hwmod = {
+       .name           = "epwmss5",
+       .class          = &am33xx_epwmss_hwmod_class,
+       .clkdm_name     = "l4ls_clkdm",
+       .main_clk       = "l4ls_gclk",
+       .prcm           = {
+               .omap4  = {
+                       .clkctrl_offs = AM43XX_CM_PER_EPWMSS5_CLKCTRL_OFFSET,
+                       .modulemode   = MODULEMODE_SWCTRL,
+               },
+       },
+};
+
+static struct omap_hwmod am43xx_ehrpwm5_hwmod = {
+       .name           = "ehrpwm5",
+       .class          = &am33xx_ehrpwm_hwmod_class,
+       .clkdm_name     = "l4ls_clkdm",
+       .main_clk       = "l4ls_gclk",
+};
+
+static struct omap_hwmod am43xx_spi2_hwmod = {
+       .name           = "spi2",
+       .class          = &am33xx_spi_hwmod_class,
+       .clkdm_name     = "l4ls_clkdm",
+       .main_clk       = "dpll_per_m2_div4_ck",
+       .prcm           = {
+               .omap4  = {
+                       .clkctrl_offs = AM43XX_CM_PER_SPI2_CLKCTRL_OFFSET,
+                       .modulemode   = MODULEMODE_SWCTRL,
+               },
+       },
+       .dev_attr       = &mcspi_attrib,
+};
+
+static struct omap_hwmod am43xx_spi3_hwmod = {
+       .name           = "spi3",
+       .class          = &am33xx_spi_hwmod_class,
+       .clkdm_name     = "l4ls_clkdm",
+       .main_clk       = "dpll_per_m2_div4_ck",
+       .prcm           = {
+               .omap4  = {
+                       .clkctrl_offs = AM43XX_CM_PER_SPI3_CLKCTRL_OFFSET,
+                       .modulemode   = MODULEMODE_SWCTRL,
+               },
+       },
+       .dev_attr       = &mcspi_attrib,
+};
+
+static struct omap_hwmod am43xx_spi4_hwmod = {
+       .name           = "spi4",
+       .class          = &am33xx_spi_hwmod_class,
+       .clkdm_name     = "l4ls_clkdm",
+       .main_clk       = "dpll_per_m2_div4_ck",
+       .prcm           = {
+               .omap4  = {
+                       .clkctrl_offs = AM43XX_CM_PER_SPI4_CLKCTRL_OFFSET,
+                       .modulemode   = MODULEMODE_SWCTRL,
+               },
+       },
+       .dev_attr       = &mcspi_attrib,
+};
+
+static struct omap_hwmod_opt_clk gpio4_opt_clks[] = {
+       { .role = "dbclk", .clk = "gpio4_dbclk" },
+};
+
+static struct omap_hwmod am43xx_gpio4_hwmod = {
+       .name           = "gpio5",
+       .class          = &am33xx_gpio_hwmod_class,
+       .clkdm_name     = "l4ls_clkdm",
+       .flags          = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
+       .main_clk       = "l4ls_gclk",
+       .prcm           = {
+               .omap4  = {
+                       .clkctrl_offs = AM43XX_CM_PER_GPIO4_CLKCTRL_OFFSET,
+                       .modulemode   = MODULEMODE_SWCTRL,
+               },
+       },
+       .opt_clks       = gpio4_opt_clks,
+       .opt_clks_cnt   = ARRAY_SIZE(gpio4_opt_clks),
+       .dev_attr       = &gpio_dev_attr,
+};
+
+static struct omap_hwmod_opt_clk gpio5_opt_clks[] = {
+       { .role = "dbclk", .clk = "gpio5_dbclk" },
+};
+
+static struct omap_hwmod am43xx_gpio5_hwmod = {
+       .name           = "gpio6",
+       .class          = &am33xx_gpio_hwmod_class,
+       .clkdm_name     = "l4ls_clkdm",
+       .flags          = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
+       .main_clk       = "l4ls_gclk",
+       .prcm           = {
+               .omap4  = {
+                       .clkctrl_offs = AM43XX_CM_PER_GPIO5_CLKCTRL_OFFSET,
+                       .modulemode   = MODULEMODE_SWCTRL,
+               },
+       },
+       .opt_clks       = gpio5_opt_clks,
+       .opt_clks_cnt   = ARRAY_SIZE(gpio5_opt_clks),
+       .dev_attr       = &gpio_dev_attr,
+};
+
+static struct omap_hwmod_class am43xx_ocp2scp_hwmod_class = {
+       .name   = "ocp2scp",
+};
+
+static struct omap_hwmod am43xx_ocp2scp0_hwmod = {
+       .name           = "ocp2scp0",
+       .class          = &am43xx_ocp2scp_hwmod_class,
+       .clkdm_name     = "l4ls_clkdm",
+       .main_clk       = "l4ls_gclk",
+       .prcm = {
+               .omap4 = {
+                       .clkctrl_offs = AM43XX_CM_PER_USBPHYOCP2SCP0_CLKCTRL_OFFSET,
+                       .modulemode   = MODULEMODE_SWCTRL,
+               },
+       },
+};
+
+static struct omap_hwmod am43xx_ocp2scp1_hwmod = {
+       .name           = "ocp2scp1",
+       .class          = &am43xx_ocp2scp_hwmod_class,
+       .clkdm_name     = "l4ls_clkdm",
+       .main_clk       = "l4ls_gclk",
+       .prcm = {
+               .omap4 = {
+                       .clkctrl_offs   = AM43XX_CM_PER_USBPHYOCP2SCP1_CLKCTRL_OFFSET,
+                       .modulemode     = MODULEMODE_SWCTRL,
+               },
+       },
+};
+
+static struct omap_hwmod_class_sysconfig am43xx_usb_otg_ss_sysc = {
+       .rev_offs       = 0x0000,
+       .sysc_offs      = 0x0010,
+       .sysc_flags     = (SYSC_HAS_DMADISABLE | SYSC_HAS_MIDLEMODE |
+                               SYSC_HAS_SIDLEMODE),
+       .idlemodes      = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
+                               SIDLE_SMART_WKUP | MSTANDBY_FORCE |
+                               MSTANDBY_NO | MSTANDBY_SMART |
+                               MSTANDBY_SMART_WKUP),
+       .sysc_fields    = &omap_hwmod_sysc_type2,
+};
+
+static struct omap_hwmod_class am43xx_usb_otg_ss_hwmod_class = {
+       .name   = "usb_otg_ss",
+       .sysc   = &am43xx_usb_otg_ss_sysc,
+};
+
+static struct omap_hwmod am43xx_usb_otg_ss0_hwmod = {
+       .name           = "usb_otg_ss0",
+       .class          = &am43xx_usb_otg_ss_hwmod_class,
+       .clkdm_name     = "l3s_clkdm",
+       .main_clk       = "l3s_gclk",
+       .prcm = {
+               .omap4 = {
+                       .clkctrl_offs   = AM43XX_CM_PER_USB_OTG_SS0_CLKCTRL_OFFSET,
+                       .modulemode     = MODULEMODE_SWCTRL,
+               },
+       },
+};
+
+static struct omap_hwmod am43xx_usb_otg_ss1_hwmod = {
+       .name           = "usb_otg_ss1",
+       .class          = &am43xx_usb_otg_ss_hwmod_class,
+       .clkdm_name     = "l3s_clkdm",
+       .main_clk       = "l3s_gclk",
+       .prcm = {
+               .omap4 = {
+                       .clkctrl_offs   = AM43XX_CM_PER_USB_OTG_SS1_CLKCTRL_OFFSET,
+                       .modulemode     = MODULEMODE_SWCTRL,
+               },
+       },
+};
+
+static struct omap_hwmod_class_sysconfig am43xx_qspi_sysc = {
+       .sysc_offs      = 0x0010,
+       .sysc_flags     = SYSC_HAS_SIDLEMODE,
+       .idlemodes      = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
+                               SIDLE_SMART_WKUP),
+       .sysc_fields    = &omap_hwmod_sysc_type2,
+};
+
+static struct omap_hwmod_class am43xx_qspi_hwmod_class = {
+       .name   = "qspi",
+       .sysc   = &am43xx_qspi_sysc,
+};
+
+static struct omap_hwmod am43xx_qspi_hwmod = {
+       .name           = "qspi",
+       .class          = &am43xx_qspi_hwmod_class,
+       .clkdm_name     = "l3s_clkdm",
+       .main_clk       = "l3s_gclk",
+       .prcm = {
+               .omap4 = {
+                       .clkctrl_offs = AM43XX_CM_PER_QSPI_CLKCTRL_OFFSET,
+                       .modulemode   = MODULEMODE_SWCTRL,
+               },
+       },
+};
+
+/* Interfaces */
+static struct omap_hwmod_ocp_if am43xx_l3_main__l4_hs = {
+       .master         = &am33xx_l3_main_hwmod,
+       .slave          = &am43xx_l4_hs_hwmod,
+       .clk            = "l3s_gclk",
+       .user           = OCP_USER_MPU | OCP_USER_SDMA,
+};
+
+static struct omap_hwmod_ocp_if am43xx_wkup_m3__l4_wkup = {
+       .master         = &am43xx_wkup_m3_hwmod,
+       .slave          = &am33xx_l4_wkup_hwmod,
+       .clk            = "sys_clkin_ck",
+       .user           = OCP_USER_MPU | OCP_USER_SDMA,
+};
+
+static struct omap_hwmod_ocp_if am43xx_l4_wkup__wkup_m3 = {
+       .master         = &am33xx_l4_wkup_hwmod,
+       .slave          = &am43xx_wkup_m3_hwmod,
+       .clk            = "sys_clkin_ck",
+       .user           = OCP_USER_MPU | OCP_USER_SDMA,
+};
+
+static struct omap_hwmod_ocp_if am43xx_l3_main__pruss = {
+       .master         = &am33xx_l3_main_hwmod,
+       .slave          = &am33xx_pruss_hwmod,
+       .clk            = "dpll_core_m4_ck",
+       .user           = OCP_USER_MPU,
+};
+
+static struct omap_hwmod_ocp_if am43xx_l4_wkup__smartreflex0 = {
+       .master         = &am33xx_l4_wkup_hwmod,
+       .slave          = &am33xx_smartreflex0_hwmod,
+       .clk            = "sys_clkin_ck",
+       .user           = OCP_USER_MPU,
+};
+
+static struct omap_hwmod_ocp_if am43xx_l4_wkup__smartreflex1 = {
+       .master         = &am33xx_l4_wkup_hwmod,
+       .slave          = &am33xx_smartreflex1_hwmod,
+       .clk            = "sys_clkin_ck",
+       .user           = OCP_USER_MPU,
+};
+
+static struct omap_hwmod_ocp_if am43xx_l4_wkup__control = {
+       .master         = &am33xx_l4_wkup_hwmod,
+       .slave          = &am43xx_control_hwmod,
+       .clk            = "sys_clkin_ck",
+       .user           = OCP_USER_MPU,
+};
+
+static struct omap_hwmod_ocp_if am43xx_l4_wkup__i2c1 = {
+       .master         = &am33xx_l4_wkup_hwmod,
+       .slave          = &am33xx_i2c1_hwmod,
+       .clk            = "sys_clkin_ck",
+       .user           = OCP_USER_MPU,
+};
+
+static struct omap_hwmod_ocp_if am43xx_l4_wkup__gpio0 = {
+       .master         = &am33xx_l4_wkup_hwmod,
+       .slave          = &am43xx_gpio0_hwmod,
+       .clk            = "sys_clkin_ck",
+       .user           = OCP_USER_MPU | OCP_USER_SDMA,
+};
+
+static struct omap_hwmod_ocp_if am43xx_l4_hs__cpgmac0 = {
+       .master         = &am43xx_l4_hs_hwmod,
+       .slave          = &am33xx_cpgmac0_hwmod,
+       .clk            = "cpsw_125mhz_gclk",
+       .user           = OCP_USER_MPU,
+};
+
+static struct omap_hwmod_ocp_if am43xx_l4_wkup__timer1 = {
+       .master         = &am33xx_l4_wkup_hwmod,
+       .slave          = &am33xx_timer1_hwmod,
+       .clk            = "sys_clkin_ck",
+       .user           = OCP_USER_MPU,
+};
+
+static struct omap_hwmod_ocp_if am43xx_l4_wkup__uart1 = {
+       .master         = &am33xx_l4_wkup_hwmod,
+       .slave          = &am33xx_uart1_hwmod,
+       .clk            = "sys_clkin_ck",
+       .user           = OCP_USER_MPU,
+};
+
+static struct omap_hwmod_ocp_if am43xx_l4_wkup__wd_timer1 = {
+       .master         = &am33xx_l4_wkup_hwmod,
+       .slave          = &am33xx_wd_timer1_hwmod,
+       .clk            = "sys_clkin_ck",
+       .user           = OCP_USER_MPU,
+};
+
+static struct omap_hwmod_ocp_if am33xx_l4_wkup__synctimer = {
+       .master         = &am33xx_l4_wkup_hwmod,
+       .slave          = &am43xx_synctimer_hwmod,
+       .clk            = "sys_clkin_ck",
+       .user           = OCP_USER_MPU,
+};
+
+static struct omap_hwmod_ocp_if am43xx_l4_ls__timer8 = {
+       .master         = &am33xx_l4_ls_hwmod,
+       .slave          = &am43xx_timer8_hwmod,
+       .clk            = "l4ls_gclk",
+       .user           = OCP_USER_MPU,
+};
+
+static struct omap_hwmod_ocp_if am43xx_l4_ls__timer9 = {
+       .master         = &am33xx_l4_ls_hwmod,
+       .slave          = &am43xx_timer9_hwmod,
+       .clk            = "l4ls_gclk",
+       .user           = OCP_USER_MPU,
+};
+
+static struct omap_hwmod_ocp_if am43xx_l4_ls__timer10 = {
+       .master         = &am33xx_l4_ls_hwmod,
+       .slave          = &am43xx_timer10_hwmod,
+       .clk            = "l4ls_gclk",
+       .user           = OCP_USER_MPU,
+};
+
+static struct omap_hwmod_ocp_if am43xx_l4_ls__timer11 = {
+       .master         = &am33xx_l4_ls_hwmod,
+       .slave          = &am43xx_timer11_hwmod,
+       .clk            = "l4ls_gclk",
+       .user           = OCP_USER_MPU,
+};
+
+static struct omap_hwmod_ocp_if am43xx_l4_ls__epwmss3 = {
+       .master         = &am33xx_l4_ls_hwmod,
+       .slave          = &am43xx_epwmss3_hwmod,
+       .clk            = "l4ls_gclk",
+       .user           = OCP_USER_MPU,
+};
+
+static struct omap_hwmod_ocp_if am43xx_epwmss3__ehrpwm3 = {
+       .master         = &am43xx_epwmss3_hwmod,
+       .slave          = &am43xx_ehrpwm3_hwmod,
+       .clk            = "l4ls_gclk",
+       .user           = OCP_USER_MPU,
+};
+
+static struct omap_hwmod_ocp_if am43xx_l4_ls__epwmss4 = {
+       .master         = &am33xx_l4_ls_hwmod,
+       .slave          = &am43xx_epwmss4_hwmod,
+       .clk            = "l4ls_gclk",
+       .user           = OCP_USER_MPU,
+};
+
+static struct omap_hwmod_ocp_if am43xx_epwmss4__ehrpwm4 = {
+       .master         = &am43xx_epwmss4_hwmod,
+       .slave          = &am43xx_ehrpwm4_hwmod,
+       .clk            = "l4ls_gclk",
+       .user           = OCP_USER_MPU,
+};
+
+static struct omap_hwmod_ocp_if am43xx_l4_ls__epwmss5 = {
+       .master         = &am33xx_l4_ls_hwmod,
+       .slave          = &am43xx_epwmss5_hwmod,
+       .clk            = "l4ls_gclk",
+       .user           = OCP_USER_MPU,
+};
+
+static struct omap_hwmod_ocp_if am43xx_epwmss5__ehrpwm5 = {
+       .master         = &am43xx_epwmss5_hwmod,
+       .slave          = &am43xx_ehrpwm5_hwmod,
+       .clk            = "l4ls_gclk",
+       .user           = OCP_USER_MPU,
+};
+
+static struct omap_hwmod_ocp_if am43xx_l4_ls__mcspi2 = {
+       .master         = &am33xx_l4_ls_hwmod,
+       .slave          = &am43xx_spi2_hwmod,
+       .clk            = "l4ls_gclk",
+       .user           = OCP_USER_MPU,
+};
+
+static struct omap_hwmod_ocp_if am43xx_l4_ls__mcspi3 = {
+       .master         = &am33xx_l4_ls_hwmod,
+       .slave          = &am43xx_spi3_hwmod,
+       .clk            = "l4ls_gclk",
+       .user           = OCP_USER_MPU,
+};
+
+static struct omap_hwmod_ocp_if am43xx_l4_ls__mcspi4 = {
+       .master         = &am33xx_l4_ls_hwmod,
+       .slave          = &am43xx_spi4_hwmod,
+       .clk            = "l4ls_gclk",
+       .user           = OCP_USER_MPU,
+};
+
+static struct omap_hwmod_ocp_if am43xx_l4_ls__gpio4 = {
+       .master         = &am33xx_l4_ls_hwmod,
+       .slave          = &am43xx_gpio4_hwmod,
+       .clk            = "l4ls_gclk",
+       .user           = OCP_USER_MPU | OCP_USER_SDMA,
+};
+
+static struct omap_hwmod_ocp_if am43xx_l4_ls__gpio5 = {
+       .master         = &am33xx_l4_ls_hwmod,
+       .slave          = &am43xx_gpio5_hwmod,
+       .clk            = "l4ls_gclk",
+       .user           = OCP_USER_MPU | OCP_USER_SDMA,
+};
+
+static struct omap_hwmod_ocp_if am43xx_l4_ls__ocp2scp0 = {
+       .master         = &am33xx_l4_ls_hwmod,
+       .slave          = &am43xx_ocp2scp0_hwmod,
+       .clk            = "l4ls_gclk",
+       .user           = OCP_USER_MPU,
+};
+
+static struct omap_hwmod_ocp_if am43xx_l4_ls__ocp2scp1 = {
+       .master         = &am33xx_l4_ls_hwmod,
+       .slave          = &am43xx_ocp2scp1_hwmod,
+       .clk            = "l4ls_gclk",
+       .user           = OCP_USER_MPU,
+};
+
+static struct omap_hwmod_ocp_if am43xx_l3_s__usbotgss0 = {
+       .master         = &am33xx_l3_s_hwmod,
+       .slave          = &am43xx_usb_otg_ss0_hwmod,
+       .clk            = "l3s_gclk",
+       .user           = OCP_USER_MPU | OCP_USER_SDMA,
+};
+
+static struct omap_hwmod_ocp_if am43xx_l3_s__usbotgss1 = {
+       .master         = &am33xx_l3_s_hwmod,
+       .slave          = &am43xx_usb_otg_ss1_hwmod,
+       .clk            = "l3s_gclk",
+       .user           = OCP_USER_MPU | OCP_USER_SDMA,
+};
+
+static struct omap_hwmod_ocp_if am43xx_l3_s__qspi = {
+       .master         = &am33xx_l3_s_hwmod,
+       .slave          = &am43xx_qspi_hwmod,
+       .clk            = "l3s_gclk",
+       .user           = OCP_USER_MPU | OCP_USER_SDMA,
+};
+
+static struct omap_hwmod_ocp_if *am43xx_hwmod_ocp_ifs[] __initdata = {
+       &am33xx_l4_wkup__synctimer,
+       &am43xx_l4_ls__timer8,
+       &am43xx_l4_ls__timer9,
+       &am43xx_l4_ls__timer10,
+       &am43xx_l4_ls__timer11,
+       &am43xx_l4_ls__epwmss3,
+       &am43xx_epwmss3__ehrpwm3,
+       &am43xx_l4_ls__epwmss4,
+       &am43xx_epwmss4__ehrpwm4,
+       &am43xx_l4_ls__epwmss5,
+       &am43xx_epwmss5__ehrpwm5,
+       &am43xx_l4_ls__mcspi2,
+       &am43xx_l4_ls__mcspi3,
+       &am43xx_l4_ls__mcspi4,
+       &am43xx_l4_ls__gpio4,
+       &am43xx_l4_ls__gpio5,
+       &am43xx_l3_main__pruss,
+       &am33xx_mpu__l3_main,
+       &am33xx_mpu__prcm,
+       &am33xx_l3_s__l4_ls,
+       &am33xx_l3_s__l4_wkup,
+       &am43xx_l3_main__l4_hs,
+       &am33xx_l3_main__l3_s,
+       &am33xx_l3_main__l3_instr,
+       &am33xx_l3_main__gfx,
+       &am33xx_l3_s__l3_main,
+       &am33xx_pruss__l3_main,
+       &am43xx_wkup_m3__l4_wkup,
+       &am33xx_gfx__l3_main,
+       &am43xx_l4_wkup__wkup_m3,
+       &am43xx_l4_wkup__control,
+       &am43xx_l4_wkup__smartreflex0,
+       &am43xx_l4_wkup__smartreflex1,
+       &am43xx_l4_wkup__uart1,
+       &am43xx_l4_wkup__timer1,
+       &am43xx_l4_wkup__i2c1,
+       &am43xx_l4_wkup__gpio0,
+       &am43xx_l4_wkup__wd_timer1,
+       &am43xx_l3_s__qspi,
+       &am33xx_l4_per__dcan0,
+       &am33xx_l4_per__dcan1,
+       &am33xx_l4_per__gpio1,
+       &am33xx_l4_per__gpio2,
+       &am33xx_l4_per__gpio3,
+       &am33xx_l4_per__i2c2,
+       &am33xx_l4_per__i2c3,
+       &am33xx_l4_per__mailbox,
+       &am33xx_l4_ls__mcasp0,
+       &am33xx_l4_ls__mcasp1,
+       &am33xx_l4_ls__mmc0,
+       &am33xx_l4_ls__mmc1,
+       &am33xx_l3_s__mmc2,
+       &am33xx_l4_ls__timer2,
+       &am33xx_l4_ls__timer3,
+       &am33xx_l4_ls__timer4,
+       &am33xx_l4_ls__timer5,
+       &am33xx_l4_ls__timer6,
+       &am33xx_l4_ls__timer7,
+       &am33xx_l3_main__tpcc,
+       &am33xx_l4_ls__uart2,
+       &am33xx_l4_ls__uart3,
+       &am33xx_l4_ls__uart4,
+       &am33xx_l4_ls__uart5,
+       &am33xx_l4_ls__uart6,
+       &am33xx_l4_ls__elm,
+       &am33xx_l4_ls__epwmss0,
+       &am33xx_epwmss0__ecap0,
+       &am33xx_epwmss0__eqep0,
+       &am33xx_epwmss0__ehrpwm0,
+       &am33xx_l4_ls__epwmss1,
+       &am33xx_epwmss1__ecap1,
+       &am33xx_epwmss1__eqep1,
+       &am33xx_epwmss1__ehrpwm1,
+       &am33xx_l4_ls__epwmss2,
+       &am33xx_epwmss2__ecap2,
+       &am33xx_epwmss2__eqep2,
+       &am33xx_epwmss2__ehrpwm2,
+       &am33xx_l3_s__gpmc,
+       &am33xx_l4_ls__mcspi0,
+       &am33xx_l4_ls__mcspi1,
+       &am33xx_l3_main__tptc0,
+       &am33xx_l3_main__tptc1,
+       &am33xx_l3_main__tptc2,
+       &am33xx_l3_main__ocmc,
+       &am43xx_l4_hs__cpgmac0,
+       &am33xx_cpgmac0__mdio,
+       &am33xx_l3_main__sha0,
+       &am33xx_l3_main__aes0,
+       &am43xx_l4_ls__ocp2scp0,
+       &am43xx_l4_ls__ocp2scp1,
+       &am43xx_l3_s__usbotgss0,
+       &am43xx_l3_s__usbotgss1,
+       NULL,
+};
+
+int __init am43xx_hwmod_init(void)
+{
+       omap_hwmod_am43xx_reg();
+       omap_hwmod_init();
+       return omap_hwmod_register_links(am43xx_hwmod_ocp_ifs);
+}
index 9c3b504477d7b341b4492ec350bb3404769fa219..1e5b12cb8246290cc8e2865036e0f4a291513f9c 100644 (file)
@@ -914,7 +914,7 @@ static struct omap_hwmod omap44xx_emif1_hwmod = {
        .name           = "emif1",
        .class          = &omap44xx_emif_hwmod_class,
        .clkdm_name     = "l3_emif_clkdm",
-       .flags          = HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET,
+       .flags          = HWMOD_INIT_NO_IDLE,
        .main_clk       = "ddrphy_ck",
        .prcm = {
                .omap4 = {
@@ -930,7 +930,7 @@ static struct omap_hwmod omap44xx_emif2_hwmod = {
        .name           = "emif2",
        .class          = &omap44xx_emif_hwmod_class,
        .clkdm_name     = "l3_emif_clkdm",
-       .flags          = HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET,
+       .flags          = HWMOD_INIT_NO_IDLE,
        .main_clk       = "ddrphy_ck",
        .prcm = {
                .omap4 = {
@@ -2193,7 +2193,7 @@ static struct omap_hwmod omap44xx_mpu_hwmod = {
        .name           = "mpu",
        .class          = &omap44xx_mpu_hwmod_class,
        .clkdm_name     = "mpuss_clkdm",
-       .flags          = HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET,
+       .flags          = HWMOD_INIT_NO_IDLE,
        .main_clk       = "dpll_mpu_m2_ck",
        .prcm = {
                .omap4 = {
index cde415570e0465caffebba3b4edbac1976cf92ed..9e08d6994a0b09c44760e03323c9543f720ad026 100644 (file)
@@ -352,7 +352,7 @@ static struct omap_hwmod omap54xx_emif1_hwmod = {
        .name           = "emif1",
        .class          = &omap54xx_emif_hwmod_class,
        .clkdm_name     = "emif_clkdm",
-       .flags          = HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET,
+       .flags          = HWMOD_INIT_NO_IDLE,
        .main_clk       = "dpll_core_h11x2_ck",
        .prcm = {
                .omap4 = {
@@ -368,7 +368,7 @@ static struct omap_hwmod omap54xx_emif2_hwmod = {
        .name           = "emif2",
        .class          = &omap54xx_emif_hwmod_class,
        .clkdm_name     = "emif_clkdm",
-       .flags          = HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET,
+       .flags          = HWMOD_INIT_NO_IDLE,
        .main_clk       = "dpll_core_h11x2_ck",
        .prcm = {
                .omap4 = {
@@ -1135,7 +1135,7 @@ static struct omap_hwmod omap54xx_mpu_hwmod = {
        .name           = "mpu",
        .class          = &omap54xx_mpu_hwmod_class,
        .clkdm_name     = "mpu_clkdm",
-       .flags          = HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET,
+       .flags          = HWMOD_INIT_NO_IDLE,
        .main_clk       = "dpll_mpu_m2_ck",
        .prcm = {
                .omap4 = {
@@ -1145,6 +1145,77 @@ static struct omap_hwmod omap54xx_mpu_hwmod = {
        },
 };
 
+/*
+ * 'spinlock' class
+ * spinlock provides hardware assistance for synchronizing the processes
+ * running on multiple processors
+ */
+
+static struct omap_hwmod_class_sysconfig omap54xx_spinlock_sysc = {
+       .rev_offs       = 0x0000,
+       .sysc_offs      = 0x0010,
+       .syss_offs      = 0x0014,
+       .sysc_flags     = (SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY |
+                          SYSC_HAS_ENAWAKEUP | SYSC_HAS_SIDLEMODE |
+                          SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
+       .idlemodes      = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
+       .sysc_fields    = &omap_hwmod_sysc_type1,
+};
+
+static struct omap_hwmod_class omap54xx_spinlock_hwmod_class = {
+       .name   = "spinlock",
+       .sysc   = &omap54xx_spinlock_sysc,
+};
+
+/* spinlock */
+static struct omap_hwmod omap54xx_spinlock_hwmod = {
+       .name           = "spinlock",
+       .class          = &omap54xx_spinlock_hwmod_class,
+       .clkdm_name     = "l4cfg_clkdm",
+       .prcm = {
+               .omap4 = {
+                       .clkctrl_offs = OMAP54XX_CM_L4CFG_SPINLOCK_CLKCTRL_OFFSET,
+                       .context_offs = OMAP54XX_RM_L4CFG_SPINLOCK_CONTEXT_OFFSET,
+               },
+       },
+};
+
+/*
+ * 'ocp2scp' class
+ * bridge to transform ocp interface protocol to scp (serial control port)
+ * protocol
+ */
+
+static struct omap_hwmod_class_sysconfig omap54xx_ocp2scp_sysc = {
+       .rev_offs       = 0x0000,
+       .sysc_offs      = 0x0010,
+       .syss_offs      = 0x0014,
+       .sysc_flags     = (SYSC_HAS_AUTOIDLE | SYSC_HAS_SIDLEMODE |
+                       SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
+       .idlemodes      = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
+       .sysc_fields    = &omap_hwmod_sysc_type1,
+};
+
+static struct omap_hwmod_class omap54xx_ocp2scp_hwmod_class = {
+       .name   = "ocp2scp",
+       .sysc   = &omap54xx_ocp2scp_sysc,
+};
+
+/* ocp2scp1 */
+static struct omap_hwmod omap54xx_ocp2scp1_hwmod = {
+       .name           = "ocp2scp1",
+       .class          = &omap54xx_ocp2scp_hwmod_class,
+       .clkdm_name     = "l3init_clkdm",
+       .main_clk       = "l4_root_clk_div",
+       .prcm = {
+               .omap4 = {
+                       .clkctrl_offs = OMAP54XX_CM_L3INIT_OCP2SCP1_CLKCTRL_OFFSET,
+                       .context_offs = OMAP54XX_RM_L3INIT_OCP2SCP1_CONTEXT_OFFSET,
+                       .modulemode   = MODULEMODE_HWCTRL,
+               },
+       },
+};
+
 /*
  * 'timer' class
  * general purpose timer module with accurate 1ms tick
@@ -1464,6 +1535,123 @@ static struct omap_hwmod omap54xx_uart6_hwmod = {
        },
 };
 
+/*
+ * 'usb_host_hs' class
+ * high-speed multi-port usb host controller
+ */
+
+static struct omap_hwmod_class_sysconfig omap54xx_usb_host_hs_sysc = {
+       .rev_offs       = 0x0000,
+       .sysc_offs      = 0x0010,
+       .sysc_flags     = (SYSC_HAS_MIDLEMODE | SYSC_HAS_RESET_STATUS |
+                          SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET),
+       .idlemodes      = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
+                          SIDLE_SMART_WKUP | MSTANDBY_FORCE | MSTANDBY_NO |
+                          MSTANDBY_SMART | MSTANDBY_SMART_WKUP),
+       .sysc_fields    = &omap_hwmod_sysc_type2,
+};
+
+static struct omap_hwmod_class omap54xx_usb_host_hs_hwmod_class = {
+       .name   = "usb_host_hs",
+       .sysc   = &omap54xx_usb_host_hs_sysc,
+};
+
+static struct omap_hwmod omap54xx_usb_host_hs_hwmod = {
+       .name           = "usb_host_hs",
+       .class          = &omap54xx_usb_host_hs_hwmod_class,
+       .clkdm_name     = "l3init_clkdm",
+       /*
+        * Errata: USBHOST Configured In Smart-Idle Can Lead To a Deadlock
+        * id: i660
+        *
+        * Description:
+        * In the following configuration :
+        * - USBHOST module is set to smart-idle mode
+        * - PRCM asserts idle_req to the USBHOST module ( This typically
+        *   happens when the system is going to a low power mode : all ports
+        *   have been suspended, the master part of the USBHOST module has
+        *   entered the standby state, and SW has cut the functional clocks)
+        * - an USBHOST interrupt occurs before the module is able to answer
+        *   idle_ack, typically a remote wakeup IRQ.
+        * Then the USB HOST module will enter a deadlock situation where it
+        * is no more accessible nor functional.
+        *
+        * Workaround:
+        * Don't use smart idle; use only force idle, hence HWMOD_SWSUP_SIDLE
+        */
+
+       /*
+        * Errata: USB host EHCI may stall when entering smart-standby mode
+        * Id: i571
+        *
+        * Description:
+        * When the USBHOST module is set to smart-standby mode, and when it is
+        * ready to enter the standby state (i.e. all ports are suspended and
+        * all attached devices are in suspend mode), then it can wrongly assert
+        * the Mstandby signal too early while there are still some residual OCP
+        * transactions ongoing. If this condition occurs, the internal state
+        * machine may go to an undefined state and the USB link may be stuck
+        * upon the next resume.
+        *
+        * Workaround:
+        * Don't use smart standby; use only force standby,
+        * hence HWMOD_SWSUP_MSTANDBY
+        */
+
+       /*
+        * During system boot; If the hwmod framework resets the module
+        * the module will have smart idle settings; which can lead to deadlock
+        * (above Errata Id:i660); so, dont reset the module during boot;
+        * Use HWMOD_INIT_NO_RESET.
+        */
+
+       .flags          = HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY |
+                         HWMOD_INIT_NO_RESET,
+       .main_clk       = "l3init_60m_fclk",
+       .prcm = {
+               .omap4 = {
+                       .clkctrl_offs = OMAP54XX_CM_L3INIT_USB_HOST_HS_CLKCTRL_OFFSET,
+                       .context_offs = OMAP54XX_RM_L3INIT_USB_HOST_HS_CONTEXT_OFFSET,
+                       .modulemode   = MODULEMODE_SWCTRL,
+               },
+       },
+};
+
+/*
+ * 'usb_tll_hs' class
+ * usb_tll_hs module is the adapter on the usb_host_hs ports
+ */
+
+static struct omap_hwmod_class_sysconfig omap54xx_usb_tll_hs_sysc = {
+       .rev_offs       = 0x0000,
+       .sysc_offs      = 0x0010,
+       .syss_offs      = 0x0014,
+       .sysc_flags     = (SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY |
+                          SYSC_HAS_ENAWAKEUP | SYSC_HAS_SIDLEMODE |
+                          SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
+       .idlemodes      = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
+       .sysc_fields    = &omap_hwmod_sysc_type1,
+};
+
+static struct omap_hwmod_class omap54xx_usb_tll_hs_hwmod_class = {
+       .name   = "usb_tll_hs",
+       .sysc   = &omap54xx_usb_tll_hs_sysc,
+};
+
+static struct omap_hwmod omap54xx_usb_tll_hs_hwmod = {
+       .name           = "usb_tll_hs",
+       .class          = &omap54xx_usb_tll_hs_hwmod_class,
+       .clkdm_name     = "l3init_clkdm",
+       .main_clk       = "l4_root_clk_div",
+       .prcm = {
+               .omap4 = {
+                       .clkctrl_offs = OMAP54XX_CM_L3INIT_USB_TLL_HS_CLKCTRL_OFFSET,
+                       .context_offs = OMAP54XX_RM_L3INIT_USB_TLL_HS_CONTEXT_OFFSET,
+                       .modulemode   = MODULEMODE_HWCTRL,
+               },
+       },
+};
+
 /*
  * 'usb_otg_ss' class
  * 2.0 super speed (usb_otg_ss) controller
@@ -1960,6 +2148,22 @@ static struct omap_hwmod_ocp_if omap54xx_l4_cfg__mpu = {
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
+/* l4_cfg -> spinlock */
+static struct omap_hwmod_ocp_if omap54xx_l4_cfg__spinlock = {
+       .master         = &omap54xx_l4_cfg_hwmod,
+       .slave          = &omap54xx_spinlock_hwmod,
+       .clk            = "l4_root_clk_div",
+       .user           = OCP_USER_MPU | OCP_USER_SDMA,
+};
+
+/* l4_cfg -> ocp2scp1 */
+static struct omap_hwmod_ocp_if omap54xx_l4_cfg__ocp2scp1 = {
+       .master         = &omap54xx_l4_cfg_hwmod,
+       .slave          = &omap54xx_ocp2scp1_hwmod,
+       .clk            = "l4_root_clk_div",
+       .user           = OCP_USER_MPU | OCP_USER_SDMA,
+};
+
 /* l4_wkup -> timer1 */
 static struct omap_hwmod_ocp_if omap54xx_l4_wkup__timer1 = {
        .master         = &omap54xx_l4_wkup_hwmod,
@@ -2096,6 +2300,22 @@ static struct omap_hwmod_ocp_if omap54xx_l4_per__uart6 = {
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
+/* l4_cfg -> usb_host_hs */
+static struct omap_hwmod_ocp_if omap54xx_l4_cfg__usb_host_hs = {
+       .master         = &omap54xx_l4_cfg_hwmod,
+       .slave          = &omap54xx_usb_host_hs_hwmod,
+       .clk            = "l3_iclk_div",
+       .user           = OCP_USER_MPU | OCP_USER_SDMA,
+};
+
+/* l4_cfg -> usb_tll_hs */
+static struct omap_hwmod_ocp_if omap54xx_l4_cfg__usb_tll_hs = {
+       .master         = &omap54xx_l4_cfg_hwmod,
+       .slave          = &omap54xx_usb_tll_hs_hwmod,
+       .clk            = "l4_root_clk_div",
+       .user           = OCP_USER_MPU | OCP_USER_SDMA,
+};
+
 /* l4_cfg -> usb_otg_ss */
 static struct omap_hwmod_ocp_if omap54xx_l4_cfg__usb_otg_ss = {
        .master         = &omap54xx_l4_cfg_hwmod,
@@ -2163,6 +2383,8 @@ static struct omap_hwmod_ocp_if *omap54xx_hwmod_ocp_ifs[] __initdata = {
        &omap54xx_l4_per__mmc4,
        &omap54xx_l4_per__mmc5,
        &omap54xx_l4_cfg__mpu,
+       &omap54xx_l4_cfg__spinlock,
+       &omap54xx_l4_cfg__ocp2scp1,
        &omap54xx_l4_wkup__timer1,
        &omap54xx_l4_per__timer2,
        &omap54xx_l4_per__timer3,
@@ -2180,6 +2402,8 @@ static struct omap_hwmod_ocp_if *omap54xx_hwmod_ocp_ifs[] __initdata = {
        &omap54xx_l4_per__uart4,
        &omap54xx_l4_per__uart5,
        &omap54xx_l4_per__uart6,
+       &omap54xx_l4_cfg__usb_host_hs,
+       &omap54xx_l4_cfg__usb_tll_hs,
        &omap54xx_l4_cfg__usb_otg_ss,
        &omap54xx_l4_wkup__wd_timer2,
        NULL,
diff --git a/arch/arm/mach-omap2/pdata-quirks.c b/arch/arm/mach-omap2/pdata-quirks.c
new file mode 100644 (file)
index 0000000..10c7145
--- /dev/null
@@ -0,0 +1,174 @@
+/*
+ * Legacy platform_data quirks
+ *
+ * Copyright (C) 2013 Texas Instruments
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+#include <linux/clk.h>
+#include <linux/gpio.h>
+#include <linux/init.h>
+#include <linux/kernel.h>
+#include <linux/of_platform.h>
+#include <linux/wl12xx.h>
+
+#include <linux/platform_data/pinctrl-single.h>
+
+#include "common.h"
+#include "common-board-devices.h"
+#include "dss-common.h"
+#include "control.h"
+
+struct pdata_init {
+       const char *compatible;
+       void (*fn)(void);
+};
+
+/*
+ * Create alias for USB host PHY clock.
+ * Remove this when clock phandle can be provided via DT
+ */
+static void __init __used legacy_init_ehci_clk(char *clkname)
+{
+       int ret;
+
+       ret = clk_add_alias("main_clk", NULL, clkname, NULL);
+       if (ret)
+               pr_err("%s:Failed to add main_clk alias to %s :%d\n",
+                      __func__, clkname, ret);
+}
+
+#if IS_ENABLED(CONFIG_WL12XX)
+
+static struct wl12xx_platform_data wl12xx __initdata;
+
+static void __init __used legacy_init_wl12xx(unsigned ref_clock,
+                                            unsigned tcxo_clock,
+                                            int gpio)
+{
+       int res;
+
+       wl12xx.board_ref_clock = ref_clock;
+       wl12xx.board_tcxo_clock = tcxo_clock;
+       wl12xx.irq = gpio_to_irq(gpio);
+
+       res = wl12xx_set_platform_data(&wl12xx);
+       if (res) {
+               pr_err("error setting wl12xx data: %d\n", res);
+               return;
+       }
+}
+#else
+static inline void legacy_init_wl12xx(unsigned ref_clock,
+                                     unsigned tcxo_clock,
+                                     int gpio)
+{
+}
+#endif
+
+#ifdef CONFIG_ARCH_OMAP3
+static void __init hsmmc2_internal_input_clk(void)
+{
+       u32 reg;
+
+       reg = omap_ctrl_readl(OMAP343X_CONTROL_DEVCONF1);
+       reg |= OMAP2_MMCSDIO2ADPCLKISEL;
+       omap_ctrl_writel(reg, OMAP343X_CONTROL_DEVCONF1);
+}
+
+static void __init omap3_igep0020_legacy_init(void)
+{
+       omap3_igep2_display_init_of();
+}
+
+static void __init omap3_evm_legacy_init(void)
+{
+       legacy_init_wl12xx(WL12XX_REFCLOCK_38, 0, 149);
+}
+
+static void __init omap3_zoom_legacy_init(void)
+{
+       legacy_init_wl12xx(WL12XX_REFCLOCK_26, 0, 162);
+}
+#endif /* CONFIG_ARCH_OMAP3 */
+
+#ifdef CONFIG_ARCH_OMAP4
+static void __init omap4_sdp_legacy_init(void)
+{
+       omap_4430sdp_display_init_of();
+       legacy_init_wl12xx(WL12XX_REFCLOCK_26,
+                          WL12XX_TCXOCLOCK_26, 53);
+}
+
+static void __init omap4_panda_legacy_init(void)
+{
+       omap4_panda_display_init_of();
+       legacy_init_ehci_clk("auxclk3_ck");
+       legacy_init_wl12xx(WL12XX_REFCLOCK_38, 0, 53);
+}
+#endif
+
+#ifdef CONFIG_SOC_OMAP5
+static void __init omap5_uevm_legacy_init(void)
+{
+       legacy_init_ehci_clk("auxclk1_ck");
+}
+#endif
+
+static struct pcs_pdata pcs_pdata;
+
+void omap_pcs_legacy_init(int irq, void (*rearm)(void))
+{
+       pcs_pdata.irq = irq;
+       pcs_pdata.rearm = rearm;
+}
+
+struct of_dev_auxdata omap_auxdata_lookup[] __initdata = {
+#ifdef CONFIG_ARCH_OMAP3
+       OF_DEV_AUXDATA("ti,omap3-padconf", 0x48002030, "48002030.pinmux", &pcs_pdata),
+       OF_DEV_AUXDATA("ti,omap3-padconf", 0x48002a00, "48002a00.pinmux", &pcs_pdata),
+#endif
+#ifdef CONFIG_ARCH_OMAP4
+       OF_DEV_AUXDATA("ti,omap4-padconf", 0x4a100040, "4a100040.pinmux", &pcs_pdata),
+       OF_DEV_AUXDATA("ti,omap4-padconf", 0x4a31e040, "4a31e040.pinmux", &pcs_pdata),
+#endif
+       { /* sentinel */ },
+};
+
+static struct pdata_init pdata_quirks[] __initdata = {
+#ifdef CONFIG_ARCH_OMAP3
+       { "nokia,omap3-n9", hsmmc2_internal_input_clk, },
+       { "nokia,omap3-n950", hsmmc2_internal_input_clk, },
+       { "isee,omap3-igep0020", omap3_igep0020_legacy_init, },
+       { "ti,omap3-evm-37xx", omap3_evm_legacy_init, },
+       { "ti,omap3-zoom3", omap3_zoom_legacy_init, },
+#endif
+#ifdef CONFIG_ARCH_OMAP4
+       { "ti,omap4-sdp", omap4_sdp_legacy_init, },
+       { "ti,omap4-panda", omap4_panda_legacy_init, },
+#endif
+#ifdef CONFIG_SOC_OMAP5
+       { "ti,omap5-uevm", omap5_uevm_legacy_init, },
+#endif
+       { /* sentinel */ },
+};
+
+void __init pdata_quirks_init(struct of_device_id *omap_dt_match_table)
+{
+       struct pdata_init *quirks = pdata_quirks;
+
+       omap_sdrc_init(NULL, NULL);
+       of_platform_populate(NULL, omap_dt_match_table,
+                            omap_auxdata_lookup, NULL);
+
+       while (quirks->compatible) {
+               if (of_machine_is_compatible(quirks->compatible)) {
+                       if (quirks->fn)
+                               quirks->fn();
+                       break;
+               }
+               quirks++;
+       }
+}
index baf3d8bf6beabcf51c50fca4d56ca4e33f667024..da5a59ae77b6d0f5b752ebf0be3ae950d71acb49 100644 (file)
@@ -257,6 +257,7 @@ extern void am33xx_powerdomains_init(void);
 extern void omap44xx_powerdomains_init(void);
 extern void omap54xx_powerdomains_init(void);
 extern void dra7xx_powerdomains_init(void);
+void am43xx_powerdomains_init(void);
 
 extern struct pwrdm_ops omap2_pwrdm_operations;
 extern struct pwrdm_ops omap3_pwrdm_operations;
diff --git a/arch/arm/mach-omap2/powerdomains43xx_data.c b/arch/arm/mach-omap2/powerdomains43xx_data.c
new file mode 100644 (file)
index 0000000..95fee54
--- /dev/null
@@ -0,0 +1,136 @@
+/*
+ * AM43xx Power domains framework
+ *
+ * Copyright (C) 2013 Texas Instruments, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#include <linux/kernel.h>
+#include <linux/init.h>
+
+#include "powerdomain.h"
+
+#include "prcm-common.h"
+#include "prcm44xx.h"
+#include "prcm43xx.h"
+
+static struct powerdomain gfx_43xx_pwrdm = {
+       .name             = "gfx_pwrdm",
+       .voltdm           = { .name = "core" },
+       .prcm_offs        = AM43XX_PRM_GFX_INST,
+       .prcm_partition   = AM43XX_PRM_PARTITION,
+       .pwrsts           = PWRSTS_OFF_ON,
+       .banks            = 1,
+       .pwrsts_mem_on  = {
+               [0] = PWRSTS_ON,        /* gfx_mem */
+       },
+       .flags            = PWRDM_HAS_LOWPOWERSTATECHANGE,
+};
+
+static struct powerdomain mpu_43xx_pwrdm = {
+       .name             = "mpu_pwrdm",
+       .voltdm           = { .name = "mpu" },
+       .prcm_offs        = AM43XX_PRM_MPU_INST,
+       .prcm_partition   = AM43XX_PRM_PARTITION,
+       .pwrsts           = PWRSTS_OFF_RET_ON,
+       .pwrsts_logic_ret = PWRSTS_OFF_RET,
+       .banks            = 3,
+       .pwrsts_mem_ret = {
+               [0] = PWRSTS_OFF_RET,   /* mpu_l1 */
+               [1] = PWRSTS_OFF_RET,   /* mpu_l2 */
+               [2] = PWRSTS_OFF_RET,   /* mpu_ram */
+       },
+       .pwrsts_mem_on  = {
+               [0] = PWRSTS_ON,        /* mpu_l1 */
+               [1] = PWRSTS_ON,        /* mpu_l2 */
+               [2] = PWRSTS_ON,        /* mpu_ram */
+       },
+       .flags            = PWRDM_HAS_LOWPOWERSTATECHANGE,
+};
+
+static struct powerdomain rtc_43xx_pwrdm = {
+       .name             = "rtc_pwrdm",
+       .voltdm           = { .name = "rtc" },
+       .prcm_offs        = AM43XX_PRM_RTC_INST,
+       .prcm_partition   = AM43XX_PRM_PARTITION,
+       .pwrsts           = PWRSTS_ON,
+};
+
+static struct powerdomain wkup_43xx_pwrdm = {
+       .name             = "wkup_pwrdm",
+       .voltdm           = { .name = "core" },
+       .prcm_offs        = AM43XX_PRM_WKUP_INST,
+       .prcm_partition   = AM43XX_PRM_PARTITION,
+       .pwrsts           = PWRSTS_ON,
+       .banks            = 1,
+       .pwrsts_mem_on  = {
+               [0] = PWRSTS_ON,        /* debugss_mem */
+       },
+};
+
+static struct powerdomain tamper_43xx_pwrdm = {
+       .name             = "tamper_pwrdm",
+       .voltdm           = { .name = "tamper" },
+       .prcm_offs        = AM43XX_PRM_TAMPER_INST,
+       .prcm_partition   = AM43XX_PRM_PARTITION,
+       .pwrsts           = PWRSTS_ON,
+};
+
+static struct powerdomain cefuse_43xx_pwrdm = {
+       .name             = "cefuse_pwrdm",
+       .voltdm           = { .name = "core" },
+       .prcm_offs        = AM43XX_PRM_CEFUSE_INST,
+       .prcm_partition   = AM43XX_PRM_PARTITION,
+       .pwrsts           = PWRSTS_OFF_ON,
+       .flags            = PWRDM_HAS_LOWPOWERSTATECHANGE,
+};
+
+static struct powerdomain per_43xx_pwrdm = {
+       .name             = "per_pwrdm",
+       .voltdm           = { .name = "core" },
+       .prcm_offs        = AM43XX_PRM_PER_INST,
+       .prcm_partition   = AM43XX_PRM_PARTITION,
+       .pwrsts           = PWRSTS_OFF_RET_ON,
+       .pwrsts_logic_ret = PWRSTS_OFF_RET,
+       .banks            = 4,
+       .pwrsts_mem_ret = {
+               [0] = PWRSTS_OFF_RET,   /* icss_mem */
+               [1] = PWRSTS_OFF_RET,   /* per_mem */
+               [2] = PWRSTS_OFF_RET,   /* ram1_mem */
+               [3] = PWRSTS_OFF_RET,   /* ram2_mem */
+       },
+       .pwrsts_mem_on  = {
+               [0] = PWRSTS_ON,        /* icss_mem */
+               [1] = PWRSTS_ON,        /* per_mem */
+               [2] = PWRSTS_ON,        /* ram1_mem */
+               [3] = PWRSTS_ON,        /* ram2_mem */
+       },
+       .flags            = PWRDM_HAS_LOWPOWERSTATECHANGE,
+};
+
+static struct powerdomain *powerdomains_am43xx[] __initdata = {
+       &gfx_43xx_pwrdm,
+       &mpu_43xx_pwrdm,
+       &rtc_43xx_pwrdm,
+       &wkup_43xx_pwrdm,
+       &tamper_43xx_pwrdm,
+       &cefuse_43xx_pwrdm,
+       &per_43xx_pwrdm,
+       NULL
+};
+
+static int am43xx_check_vcvp(void)
+{
+       return 0;
+}
+
+void __init am43xx_powerdomains_init(void)
+{
+       omap4_pwrdm_operations.pwrdm_has_voltdm = am43xx_check_vcvp;
+       pwrdm_register_platform_funcs(&omap4_pwrdm_operations);
+       pwrdm_register_pwrdms(powerdomains_am43xx);
+       pwrdm_complete_init();
+}
diff --git a/arch/arm/mach-omap2/prcm43xx.h b/arch/arm/mach-omap2/prcm43xx.h
new file mode 100644 (file)
index 0000000..7785be9
--- /dev/null
@@ -0,0 +1,146 @@
+/*
+ * AM43x PRCM defines
+ *
+ * Copyright (C) 2013 Texas Instruments Incorporated - http://www.ti.com/
+ *
+ * This file is licensed under the terms of the GNU General Public License
+ * version 2.  This program is licensed "as is" without any warranty of any
+ * kind, whether express or implied.
+ */
+
+#ifndef __ARCH_ARM_MACH_OMAP2_PRCM_43XX_H
+#define __ARCH_ARM_MACH_OMAP2_PRCM_43XX_H
+
+#define AM43XX_PRM_PARTITION                           1
+#define AM43XX_CM_PARTITION                            1
+
+/* PRM instances */
+#define AM43XX_PRM_OCP_SOCKET_INST                     0x0000
+#define AM43XX_PRM_MPU_INST                            0x0300
+#define AM43XX_PRM_GFX_INST                            0x0400
+#define AM43XX_PRM_RTC_INST                            0x0500
+#define AM43XX_PRM_TAMPER_INST                         0x0600
+#define AM43XX_PRM_CEFUSE_INST                         0x0700
+#define AM43XX_PRM_PER_INST                            0x0800
+#define AM43XX_PRM_WKUP_INST                           0x2000
+#define AM43XX_PRM_DEVICE_INST                         0x4000
+
+/* RM RSTCTRL offsets */
+#define AM43XX_RM_PER_RSTCTRL_OFFSET                   0x0010
+#define AM43XX_RM_GFX_RSTCTRL_OFFSET                   0x0010
+#define AM43XX_RM_WKUP_RSTCTRL_OFFSET                  0x0010
+
+/* RM RSTST offsets */
+#define AM43XX_RM_GFX_RSTST_OFFSET                     0x0014
+#define AM43XX_RM_WKUP_RSTST_OFFSET                    0x0014
+
+/* CM instances */
+#define AM43XX_CM_WKUP_INST                            0x2800
+#define AM43XX_CM_DEVICE_INST                          0x4100
+#define AM43XX_CM_DPLL_INST                            0x4200
+#define AM43XX_CM_MPU_INST                             0x8300
+#define AM43XX_CM_GFX_INST                             0x8400
+#define AM43XX_CM_RTC_INST                             0x8500
+#define AM43XX_CM_TAMPER_INST                          0x8600
+#define AM43XX_CM_CEFUSE_INST                          0x8700
+#define AM43XX_CM_PER_INST                             0x8800
+
+/* CD offsets */
+#define AM43XX_CM_WKUP_L3_AON_CDOFFS                   0x0000
+#define AM43XX_CM_WKUP_L3S_TSC_CDOFFS                  0x0100
+#define AM43XX_CM_WKUP_L4_WKUP_AON_CDOFFS              0x0200
+#define AM43XX_CM_WKUP_WKUP_CDOFFS                     0x0300
+#define AM43XX_CM_MPU_MPU_CDOFFS                       0x0000
+#define AM43XX_CM_GFX_GFX_L3_CDOFFS                    0x0000
+#define AM43XX_CM_RTC_RTC_CDOFFS                       0x0000
+#define AM43XX_CM_TAMPER_TAMPER_CDOFFS                 0x0000
+#define AM43XX_CM_CEFUSE_CEFUSE_CDOFFS                 0x0000
+#define AM43XX_CM_PER_L3_CDOFFS                                0x0000
+#define AM43XX_CM_PER_L3S_CDOFFS                       0x0200
+#define AM43XX_CM_PER_ICSS_CDOFFS                      0x0300
+#define AM43XX_CM_PER_L4LS_CDOFFS                      0x0400
+#define AM43XX_CM_PER_EMIF_CDOFFS                      0x0700
+#define AM43XX_CM_PER_DSS_CDOFFS                       0x0a00
+#define AM43XX_CM_PER_CPSW_CDOFFS                      0x0b00
+#define AM43XX_CM_PER_OCPWP_L3_CDOFFS                  0x0c00
+
+/* CLK CTRL offsets */
+#define AM43XX_CM_PER_UART1_CLKCTRL_OFFSET             0x0580
+#define AM43XX_CM_PER_UART2_CLKCTRL_OFFSET             0x0588
+#define AM43XX_CM_PER_UART3_CLKCTRL_OFFSET             0x0590
+#define AM43XX_CM_PER_UART4_CLKCTRL_OFFSET             0x0598
+#define AM43XX_CM_PER_UART5_CLKCTRL_OFFSET             0x05a0
+#define AM43XX_CM_PER_DCAN0_CLKCTRL_OFFSET             0x0428
+#define AM43XX_CM_PER_DCAN1_CLKCTRL_OFFSET             0x0430
+#define AM43XX_CM_PER_ELM_CLKCTRL_OFFSET               0x0468
+#define AM43XX_CM_PER_EPWMSS0_CLKCTRL_OFFSET           0x0438
+#define AM43XX_CM_PER_EPWMSS1_CLKCTRL_OFFSET           0x0440
+#define AM43XX_CM_PER_EPWMSS2_CLKCTRL_OFFSET           0x0448
+#define AM43XX_CM_PER_GPIO1_CLKCTRL_OFFSET             0x0478
+#define AM43XX_CM_PER_GPIO2_CLKCTRL_OFFSET             0x0480
+#define AM43XX_CM_PER_GPIO3_CLKCTRL_OFFSET             0x0488
+#define AM43XX_CM_PER_I2C1_CLKCTRL_OFFSET              0x04a8
+#define AM43XX_CM_PER_I2C2_CLKCTRL_OFFSET              0x04b0
+#define AM43XX_CM_PER_MAILBOX0_CLKCTRL_OFFSET          0x04b8
+#define AM43XX_CM_PER_MMC0_CLKCTRL_OFFSET              0x04c0
+#define AM43XX_CM_PER_MMC1_CLKCTRL_OFFSET              0x04c8
+#define AM43XX_CM_PER_SPI0_CLKCTRL_OFFSET              0x0500
+#define AM43XX_CM_PER_SPI1_CLKCTRL_OFFSET              0x0508
+#define AM43XX_CM_PER_SPINLOCK_CLKCTRL_OFFSET          0x0528
+#define AM43XX_CM_PER_TIMER2_CLKCTRL_OFFSET            0x0530
+#define AM43XX_CM_PER_TIMER3_CLKCTRL_OFFSET            0x0538
+#define AM43XX_CM_PER_TIMER4_CLKCTRL_OFFSET            0x0540
+#define AM43XX_CM_PER_TIMER5_CLKCTRL_OFFSET            0x0548
+#define AM43XX_CM_PER_TIMER6_CLKCTRL_OFFSET            0x0550
+#define AM43XX_CM_PER_TIMER7_CLKCTRL_OFFSET            0x0558
+#define AM43XX_CM_WKUP_WKUP_M3_CLKCTRL_OFFSET          0x0228
+#define AM43XX_CM_WKUP_CONTROL_CLKCTRL_OFFSET          0x0360
+#define AM43XX_CM_WKUP_SMARTREFLEX0_CLKCTRL_OFFSET     0x0350
+#define AM43XX_CM_WKUP_SMARTREFLEX1_CLKCTRL_OFFSET     0x0358
+#define AM43XX_CM_WKUP_UART0_CLKCTRL_OFFSET            0x0348
+#define AM43XX_CM_WKUP_TIMER1_CLKCTRL_OFFSET           0x0328
+#define AM43XX_CM_WKUP_I2C0_CLKCTRL_OFFSET             0x0340
+#define AM43XX_CM_WKUP_GPIO0_CLKCTRL_OFFSET            0x0368
+#define AM43XX_CM_WKUP_ADC_TSC_CLKCTRL_OFFSET          0x0120
+#define AM43XX_CM_WKUP_WDT1_CLKCTRL_OFFSET             0x0338
+#define AM43XX_CM_WKUP_L4WKUP_CLKCTRL_OFFSET           0x0220
+#define AM43XX_CM_RTC_RTC_CLKCTRL_OFFSET               0x0020
+#define AM43XX_CM_PER_MMC2_CLKCTRL_OFFSET              0x0248
+#define AM43XX_CM_PER_QSPI_CLKCTRL_OFFSET               0x0258
+#define AM43XX_CM_PER_GPMC_CLKCTRL_OFFSET              0x0220
+#define AM43XX_CM_PER_MCASP0_CLKCTRL_OFFSET            0x0238
+#define AM43XX_CM_PER_MCASP1_CLKCTRL_OFFSET            0x0240
+#define AM43XX_CM_PER_L4LS_CLKCTRL_OFFSET              0x0420
+#define AM43XX_CM_PER_L3_CLKCTRL_OFFSET                        0x0020
+#define AM43XX_CM_PER_TPCC_CLKCTRL_OFFSET              0x0078
+#define AM43XX_CM_PER_TPTC0_CLKCTRL_OFFSET             0x0080
+#define AM43XX_CM_PER_TPTC1_CLKCTRL_OFFSET             0x0088
+#define AM43XX_CM_PER_TPTC2_CLKCTRL_OFFSET             0x0090
+#define AM43XX_CM_PER_CPGMAC0_CLKCTRL_OFFSET           0x0b20
+#define AM43XX_CM_PER_PRUSS_CLKCTRL_OFFSET             0x0320
+#define AM43XX_CM_GFX_GFX_CLKCTRL_OFFSET               0x0020
+#define AM43XX_CM_PER_L4HS_CLKCTRL_OFFSET              0x00a0
+#define AM43XX_CM_MPU_MPU_CLKCTRL_OFFSET               0x0020
+#define AM43XX_CM_PER_L3_INSTR_CLKCTRL_OFFSET          0x0040
+#define AM43XX_CM_PER_OCMCRAM_CLKCTRL_OFFSET           0x0050
+#define AM43XX_CM_PER_SHA0_CLKCTRL_OFFSET              0x0058
+#define AM43XX_CM_PER_AES0_CLKCTRL_OFFSET              0x0028
+#define AM43XX_CM_PER_TIMER8_CLKCTRL_OFFSET            0x0560
+#define AM43XX_CM_PER_TIMER9_CLKCTRL_OFFSET            0x0568
+#define AM43XX_CM_PER_TIMER10_CLKCTRL_OFFSET           0x0570
+#define AM43XX_CM_PER_TIMER11_CLKCTRL_OFFSET           0x0578
+#define AM43XX_CM_WKUP_SYNCTIMER_CLKCTRL_OFFSET                0x0230
+#define AM43XX_CM_PER_EPWMSS3_CLKCTRL_OFFSET           0x0450
+#define AM43XX_CM_PER_EPWMSS4_CLKCTRL_OFFSET           0x0458
+#define AM43XX_CM_PER_EPWMSS5_CLKCTRL_OFFSET           0x0460
+#define AM43XX_CM_PER_SPI2_CLKCTRL_OFFSET              0x0510
+#define AM43XX_CM_PER_SPI3_CLKCTRL_OFFSET              0x0518
+#define AM43XX_CM_PER_SPI4_CLKCTRL_OFFSET              0x0520
+#define AM43XX_CM_PER_GPIO4_CLKCTRL_OFFSET             0x0490
+#define AM43XX_CM_PER_GPIO5_CLKCTRL_OFFSET             0x0498
+#define AM43XX_CM_PER_USB_OTG_SS0_CLKCTRL_OFFSET       0x0260
+#define AM43XX_CM_PER_USBPHYOCP2SCP0_CLKCTRL_OFFSET    0x05B8
+#define AM43XX_CM_PER_USB_OTG_SS1_CLKCTRL_OFFSET        0x0268
+#define AM43XX_CM_PER_USBPHYOCP2SCP1_CLKCTRL_OFFSET    0x05C0
+
+#endif
index 277f71794e61adc9016212de3f9ae05efb87fd1c..f8eb83323b1a068271c5e222471706bb5d1c1708 100644 (file)
@@ -144,7 +144,13 @@ extern u32 omap3_prm_vcvp_read(u8 offset);
 extern void omap3_prm_vcvp_write(u32 val, u8 offset);
 extern u32 omap3_prm_vcvp_rmw(u32 mask, u32 bits, u8 offset);
 
-extern void omap3xxx_prm_reconfigure_io_chain(void);
+#ifdef CONFIG_ARCH_OMAP3
+void omap3xxx_prm_reconfigure_io_chain(void);
+#else
+static inline void omap3xxx_prm_reconfigure_io_chain(void)
+{
+}
+#endif
 
 /* PRM interrupt-related functions */
 extern void omap3xxx_prm_read_pending_irqs(unsigned long *events);
index 7cd22abb8f15b54628dbc96b872fea903c7cdb95..a085d9cc1f5d0c01fbe02e2f490e18037e450a33 100644 (file)
@@ -42,7 +42,13 @@ extern u32 omap4_prm_vcvp_read(u8 offset);
 extern void omap4_prm_vcvp_write(u32 val, u8 offset);
 extern u32 omap4_prm_vcvp_rmw(u32 mask, u32 bits, u8 offset);
 
-extern void omap44xx_prm_reconfigure_io_chain(void);
+#if defined(CONFIG_ARCH_OMAP4) || defined(CONFIG_SOC_OMAP5)
+void omap44xx_prm_reconfigure_io_chain(void);
+#else
+static inline void omap44xx_prm_reconfigure_io_chain(void)
+{
+}
+#endif
 
 /* PRM interrupt-related functions */
 extern void omap44xx_prm_read_pending_irqs(unsigned long *events);
index 228b850e632f6be77894b9d75a7162a105fd6889..a2e1174ad1b6a6632ad904e4a0b8c5f37dea1e79 100644 (file)
@@ -24,6 +24,7 @@
 #include <linux/interrupt.h>
 #include <linux/slab.h>
 
+#include "soc.h"
 #include "prm2xxx_3xxx.h"
 #include "prm2xxx.h"
 #include "prm3xxx.h"
@@ -322,6 +323,16 @@ int omap_prcm_register_chain_handler(struct omap_prcm_irq_setup *irq_setup)
                prcm_irq_chips[i] = gc;
        }
 
+       if (of_have_populated_dt()) {
+               int irq = omap_prcm_event_to_irq("io");
+               if (cpu_is_omap34xx())
+                       omap_pcs_legacy_init(irq,
+                               omap3xxx_prm_reconfigure_io_chain);
+               else
+                       omap_pcs_legacy_init(irq,
+                               omap44xx_prm_reconfigure_io_chain);
+       }
+
        return 0;
 
 err:
index 4588df1447ed74bd4512ca6889a8f6f9a42102fb..076bd90a6ce0aca8d30914432c293dee1dbb071d 100644 (file)
@@ -455,9 +455,7 @@ IS_OMAP_TYPE(3430, 0x3430)
 #define OMAP4470_REV_ES1_0     (OMAP447X_CLASS | (0x10 << 8))
 
 #define OMAP54XX_CLASS         0x54000054
-#define OMAP5430_REV_ES1_0     (OMAP54XX_CLASS | (0x30 << 16) | (0x10 << 8))
 #define OMAP5430_REV_ES2_0     (OMAP54XX_CLASS | (0x30 << 16) | (0x20 << 8))
-#define OMAP5432_REV_ES1_0     (OMAP54XX_CLASS | (0x32 << 16) | (0x10 << 8))
 #define OMAP5432_REV_ES2_0     (OMAP54XX_CLASS | (0x32 << 16) | (0x20 << 8))
 
 void omap2xxx_check_revision(void);
index ead48fa5715e16fb197dfa4fac56b0f71069bd20..3ca81e0ada5e228e083ed591f0976174e2e6b972 100644 (file)
@@ -55,6 +55,7 @@
 #include "soc.h"
 #include "common.h"
 #include "powerdomain.h"
+#include "omap-secure.h"
 
 #define REALTIME_COUNTER_BASE                          0x48243200
 #define INCREMENTER_NUMERATOR_OFFSET                   0x10
 static struct omap_dm_timer clkev;
 static struct clock_event_device clockevent_gpt;
 
+#ifdef CONFIG_SOC_HAS_REALTIME_COUNTER
+static unsigned long arch_timer_freq;
+
+void set_cntfreq(void)
+{
+       omap_smc1(OMAP5_DRA7_MON_SET_CNTFRQ_INDEX, arch_timer_freq);
+}
+#endif
+
 static irqreturn_t omap2_gp_timer_interrupt(int irq, void *dev_id)
 {
        struct clock_event_device *evt = &clockevent_gpt;
@@ -78,7 +88,7 @@ static irqreturn_t omap2_gp_timer_interrupt(int irq, void *dev_id)
 
 static struct irqaction omap2_gp_timer_irq = {
        .name           = "gp_timer",
-       .flags          = IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL,
+       .flags          = IRQF_TIMER | IRQF_IRQPOLL,
        .handler        = omap2_gp_timer_interrupt,
 };
 
@@ -515,6 +525,10 @@ static void __init realtime_counter_init(void)
                num = 8;
                den = 25;
                break;
+       case 20000000:
+               num = 192;
+               den = 625;
+               break;
        case 2600000:
                num = 384;
                den = 1625;
@@ -542,6 +556,9 @@ static void __init realtime_counter_init(void)
        reg |= den;
        __raw_writel(reg, base + INCREMENTER_DENUMERATOR_RELOAD_OFFSET);
 
+       arch_timer_freq = (rate / den) * num;
+       set_cntfreq();
+
        iounmap(base);
 }
 #else
index e110b6d4ae8cd0fc81a654ac4af1113758836515..d49aff74de98a778c14dfc495718adfc6e15fdb6 100644 (file)
@@ -6,7 +6,6 @@
  * Licensed under GPLv2 or later.
  */
 
-#include <linux/clocksource.h>
 #include <linux/init.h>
 #include <linux/kernel.h>
 #include <asm/sizes.h>
@@ -21,13 +20,6 @@ void __init sirfsoc_init_late(void)
        sirfsoc_pm_init();
 }
 
-static __init void sirfsoc_init_time(void)
-{
-       /* initialize clocking early, we want to set the OS timer */
-       sirfsoc_of_clk_init();
-       clocksource_of_init();
-}
-
 static __init void sirfsoc_map_io(void)
 {
        sirfsoc_map_lluart();
@@ -43,7 +35,6 @@ static const char *atlas6_dt_match[] __initdata = {
 DT_MACHINE_START(ATLAS6_DT, "Generic ATLAS6 (Flattened Device Tree)")
        /* Maintainer: Barry Song <baohua.song@csr.com> */
        .map_io         = sirfsoc_map_io,
-       .init_time      = sirfsoc_init_time,
        .init_late      = sirfsoc_init_late,
        .dt_compat      = atlas6_dt_match,
        .restart        = sirfsoc_restart,
@@ -59,7 +50,6 @@ static const char *prima2_dt_match[] __initdata = {
 DT_MACHINE_START(PRIMA2_DT, "Generic PRIMA2 (Flattened Device Tree)")
        /* Maintainer: Barry Song <baohua.song@csr.com> */
        .map_io         = sirfsoc_map_io,
-       .init_time      = sirfsoc_init_time,
        .dma_zone_size  = SZ_256M,
        .init_late      = sirfsoc_init_late,
        .dt_compat      = prima2_dt_match,
@@ -77,7 +67,6 @@ DT_MACHINE_START(MARCO_DT, "Generic MARCO (Flattened Device Tree)")
        /* Maintainer: Barry Song <baohua.song@csr.com> */
        .smp            = smp_ops(sirfsoc_smp_ops),
        .map_io         = sirfsoc_map_io,
-       .init_time      = sirfsoc_init_time,
        .init_late      = sirfsoc_init_late,
        .dt_compat      = marco_dt_match,
        .restart        = sirfsoc_restart,
index a6304858474aa202c1d23860aee61329f713831b..4b768060a858e98c51a085e192cf0e6c43a3c198 100644 (file)
@@ -23,7 +23,6 @@ extern void sirfsoc_secondary_startup(void);
 extern void sirfsoc_cpu_die(unsigned int cpu);
 
 extern void __init sirfsoc_of_irq_init(void);
-extern void __init sirfsoc_of_clk_init(void);
 extern void sirfsoc_restart(enum reboot_mode, const char *);
 extern asmlinkage void __exception_irq_entry sirfsoc_handle_irq(struct pt_regs *regs);
 
index 25ee12b21f0180f8cfcbead0377f2a0c3e71d80a..cf073dea5784b3c0fa125f1931305c55706f81e3 100644 (file)
@@ -5,12 +5,13 @@ config ARCH_ROCKCHIP
        select ARCH_REQUIRE_GPIOLIB
        select ARM_GIC
        select CACHE_L2X0
-       select HAVE_ARM_TWD if LOCAL_TIMERS
+       select HAVE_ARM_TWD if SMP
        select HAVE_SMP
-       select LOCAL_TIMERS if SMP
        select COMMON_CLK
        select GENERIC_CLOCKEVENTS
        select DW_APB_TIMER_OF
+       select ARM_GLOBAL_TIMER
+       select CLKSRC_ARM_GLOBAL_TIMER_SCHED_CLOCK
        help
          Support for Rockchip's Cortex-A9 Single-to-Quad-Core-SoCs
          containing the RK2928, RK30xx and RK31xx series.
index 724d2d81f976131d43a43704f009d948af0025eb..82c0b0709712465774b2824eef96a8572edb7f51 100644 (file)
 #include <linux/init.h>
 #include <linux/of_platform.h>
 #include <linux/irqchip.h>
-#include <linux/dw_apb_timer.h>
-#include <linux/clk-provider.h>
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
 #include <asm/hardware/cache-l2x0.h>
 
-static void __init rockchip_timer_init(void)
-{
-       of_clk_init(NULL);
-       clocksource_of_init();
-}
-
 static void __init rockchip_dt_init(void)
 {
        l2x0_of_init(0, ~0UL);
@@ -47,6 +39,5 @@ static const char * const rockchip_board_dt_compat[] = {
 
 DT_MACHINE_START(ROCKCHIP_DT, "Rockchip Cortex-A9 (Device Tree)")
        .init_machine   = rockchip_dt_init,
-       .init_time      = rockchip_timer_init,
        .dt_compat      = rockchip_board_dt_compat,
 MACHINE_END
index 041da5172423742277e778fdbb861dfee98c7e1a..bd14e3a37128ef9c1b84559a5c31a74eb1c06752 100644 (file)
@@ -306,3 +306,19 @@ config MACH_WLF_CRAGG_6410
        select SAMSUNG_GPIO_EXTRA128
        help
          Machine support for the Wolfson Cragganmore S3C6410 variant.
+
+config MACH_S3C64XX_DT
+       bool "Samsung S3C6400/S3C6410 machine using Device Tree"
+       select CLKSRC_OF
+       select CPU_S3C6400
+       select CPU_S3C6410
+       select PINCTRL
+       select PINCTRL_S3C64XX
+       select USE_OF
+       help
+         Machine support for Samsung S3C6400/S3C6410 machines with Device Tree
+         enabled.
+         Select this if a fdt blob is available for your S3C64XX SoC based
+         board.
+         Note: This is under development and not all peripherals can be
+         supported with this machine file.
index 31d0c9101272196e81f7da943bc25bfdd1420722..6faedcffce040d0cfc041c9d3b559ff1be94a207 100644 (file)
@@ -12,7 +12,7 @@ obj-                          :=
 
 # Core
 
-obj-y                          += common.o clock.o
+obj-y                          += common.o
 
 # Core support
 
@@ -57,3 +57,4 @@ obj-$(CONFIG_MACH_SMARTQ7)            += mach-smartq7.o
 obj-$(CONFIG_MACH_SMDK6400)            += mach-smdk6400.o
 obj-$(CONFIG_MACH_SMDK6410)            += mach-smdk6410.o
 obj-$(CONFIG_MACH_WLF_CRAGG_6410)      += mach-crag6410.o mach-crag6410-module.o
+obj-$(CONFIG_MACH_S3C64XX_DT)          += mach-s3c64xx-dt.o
diff --git a/arch/arm/mach-s3c64xx/clock.c b/arch/arm/mach-s3c64xx/clock.c
deleted file mode 100644 (file)
index c1bcc4a..0000000
+++ /dev/null
@@ -1,1007 +0,0 @@
-/* linux/arch/arm/plat-s3c64xx/clock.c
- *
- * Copyright 2008 Openmoko, Inc.
- * Copyright 2008 Simtec Electronics
- *     Ben Dooks <ben@simtec.co.uk>
- *     http://armlinux.simtec.co.uk/
- *
- * S3C64XX Base clock support
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
-*/
-
-#include <linux/init.h>
-#include <linux/module.h>
-#include <linux/interrupt.h>
-#include <linux/ioport.h>
-#include <linux/clk.h>
-#include <linux/err.h>
-#include <linux/io.h>
-
-#include <mach/hardware.h>
-#include <mach/map.h>
-
-#include <mach/regs-clock.h>
-
-#include <plat/cpu.h>
-#include <plat/devs.h>
-#include <plat/cpu-freq.h>
-#include <plat/clock.h>
-#include <plat/clock-clksrc.h>
-#include <plat/pll.h>
-
-#include "regs-sys.h"
-
-/* fin_apll, fin_mpll and fin_epll are all the same clock, which we call
- * ext_xtal_mux for want of an actual name from the manual.
-*/
-
-static struct clk clk_ext_xtal_mux = {
-       .name           = "ext_xtal",
-};
-
-#define clk_fin_apll clk_ext_xtal_mux
-#define clk_fin_mpll clk_ext_xtal_mux
-#define clk_fin_epll clk_ext_xtal_mux
-
-#define clk_fout_mpll  clk_mpll
-#define clk_fout_epll  clk_epll
-
-struct clk clk_h2 = {
-       .name           = "hclk2",
-       .rate           = 0,
-};
-
-struct clk clk_27m = {
-       .name           = "clk_27m",
-       .rate           = 27000000,
-};
-
-static int clk_48m_ctrl(struct clk *clk, int enable)
-{
-       unsigned long flags;
-       u32 val;
-
-       /* can't rely on clock lock, this register has other usages */
-       local_irq_save(flags);
-
-       val = __raw_readl(S3C64XX_OTHERS);
-       if (enable)
-               val |= S3C64XX_OTHERS_USBMASK;
-       else
-               val &= ~S3C64XX_OTHERS_USBMASK;
-
-       __raw_writel(val, S3C64XX_OTHERS);
-       local_irq_restore(flags);
-
-       return 0;
-}
-
-struct clk clk_48m = {
-       .name           = "clk_48m",
-       .rate           = 48000000,
-       .enable         = clk_48m_ctrl,
-};
-
-struct clk clk_xusbxti = {
-       .name           = "xusbxti",
-       .rate           = 48000000,
-};
-
-static int inline s3c64xx_gate(void __iomem *reg,
-                               struct clk *clk,
-                               int enable)
-{
-       unsigned int ctrlbit = clk->ctrlbit;
-       u32 con;
-
-       con = __raw_readl(reg);
-
-       if (enable)
-               con |= ctrlbit;
-       else
-               con &= ~ctrlbit;
-
-       __raw_writel(con, reg);
-       return 0;
-}
-
-static int s3c64xx_pclk_ctrl(struct clk *clk, int enable)
-{
-       return s3c64xx_gate(S3C_PCLK_GATE, clk, enable);
-}
-
-static int s3c64xx_hclk_ctrl(struct clk *clk, int enable)
-{
-       return s3c64xx_gate(S3C_HCLK_GATE, clk, enable);
-}
-
-int s3c64xx_sclk_ctrl(struct clk *clk, int enable)
-{
-       return s3c64xx_gate(S3C_SCLK_GATE, clk, enable);
-}
-
-static struct clk init_clocks_off[] = {
-       {
-               .name           = "nand",
-               .parent         = &clk_h,
-       }, {
-               .name           = "rtc",
-               .parent         = &clk_p,
-               .enable         = s3c64xx_pclk_ctrl,
-               .ctrlbit        = S3C_CLKCON_PCLK_RTC,
-       }, {
-               .name           = "adc",
-               .parent         = &clk_p,
-               .enable         = s3c64xx_pclk_ctrl,
-               .ctrlbit        = S3C_CLKCON_PCLK_TSADC,
-       }, {
-               .name           = "i2c",
-               .devname        = "s3c2440-i2c.0",
-               .parent         = &clk_p,
-               .enable         = s3c64xx_pclk_ctrl,
-               .ctrlbit        = S3C_CLKCON_PCLK_IIC,
-       }, {
-               .name           = "i2c",
-               .devname        = "s3c2440-i2c.1",
-               .parent         = &clk_p,
-               .enable         = s3c64xx_pclk_ctrl,
-               .ctrlbit        = S3C6410_CLKCON_PCLK_I2C1,
-       }, {
-               .name           = "keypad",
-               .parent         = &clk_p,
-               .enable         = s3c64xx_pclk_ctrl,
-               .ctrlbit        = S3C_CLKCON_PCLK_KEYPAD,
-       }, {
-               .name           = "spi",
-               .devname        = "s3c6410-spi.0",
-               .parent         = &clk_p,
-               .enable         = s3c64xx_pclk_ctrl,
-               .ctrlbit        = S3C_CLKCON_PCLK_SPI0,
-       }, {
-               .name           = "spi",
-               .devname        = "s3c6410-spi.1",
-               .parent         = &clk_p,
-               .enable         = s3c64xx_pclk_ctrl,
-               .ctrlbit        = S3C_CLKCON_PCLK_SPI1,
-       }, {
-               .name           = "48m",
-               .devname        = "s3c-sdhci.0",
-               .parent         = &clk_48m,
-               .enable         = s3c64xx_sclk_ctrl,
-               .ctrlbit        = S3C_CLKCON_SCLK_MMC0_48,
-       }, {
-               .name           = "48m",
-               .devname        = "s3c-sdhci.1",
-               .parent         = &clk_48m,
-               .enable         = s3c64xx_sclk_ctrl,
-               .ctrlbit        = S3C_CLKCON_SCLK_MMC1_48,
-       }, {
-               .name           = "48m",
-               .devname        = "s3c-sdhci.2",
-               .parent         = &clk_48m,
-               .enable         = s3c64xx_sclk_ctrl,
-               .ctrlbit        = S3C_CLKCON_SCLK_MMC2_48,
-       }, {
-               .name           = "ac97",
-               .parent         = &clk_p,
-               .ctrlbit        = S3C_CLKCON_PCLK_AC97,
-       }, {
-               .name           = "cfcon",
-               .parent         = &clk_h,
-               .enable         = s3c64xx_hclk_ctrl,
-               .ctrlbit        = S3C_CLKCON_HCLK_IHOST,
-       }, {
-               .name           = "dma0",
-               .parent         = &clk_h,
-               .enable         = s3c64xx_hclk_ctrl,
-               .ctrlbit        = S3C_CLKCON_HCLK_DMA0,
-       }, {
-               .name           = "dma1",
-               .parent         = &clk_h,
-               .enable         = s3c64xx_hclk_ctrl,
-               .ctrlbit        = S3C_CLKCON_HCLK_DMA1,
-       }, {
-               .name           = "3dse",
-               .parent         = &clk_h,
-               .enable         = s3c64xx_hclk_ctrl,
-               .ctrlbit        = S3C_CLKCON_HCLK_3DSE,
-       }, {
-               .name           = "hclk_secur",
-               .parent         = &clk_h,
-               .enable         = s3c64xx_hclk_ctrl,
-               .ctrlbit        = S3C_CLKCON_HCLK_SECUR,
-       }, {
-               .name           = "sdma1",
-               .parent         = &clk_h,
-               .enable         = s3c64xx_hclk_ctrl,
-               .ctrlbit        = S3C_CLKCON_HCLK_SDMA1,
-       }, {
-               .name           = "sdma0",
-               .parent         = &clk_h,
-               .enable         = s3c64xx_hclk_ctrl,
-               .ctrlbit        = S3C_CLKCON_HCLK_SDMA0,
-       }, {
-               .name           = "hclk_jpeg",
-               .parent         = &clk_h,
-               .enable         = s3c64xx_hclk_ctrl,
-               .ctrlbit        = S3C_CLKCON_HCLK_JPEG,
-       }, {
-               .name           = "camif",
-               .parent         = &clk_h,
-               .enable         = s3c64xx_hclk_ctrl,
-               .ctrlbit        = S3C_CLKCON_HCLK_CAMIF,
-       }, {
-               .name           = "hclk_scaler",
-               .parent         = &clk_h,
-               .enable         = s3c64xx_hclk_ctrl,
-               .ctrlbit        = S3C_CLKCON_HCLK_SCALER,
-       }, {
-               .name           = "2d",
-               .parent         = &clk_h,
-               .enable         = s3c64xx_hclk_ctrl,
-               .ctrlbit        = S3C_CLKCON_HCLK_2D,
-       }, {
-               .name           = "tv",
-               .parent         = &clk_h,
-               .enable         = s3c64xx_hclk_ctrl,
-               .ctrlbit        = S3C_CLKCON_HCLK_TV,
-       }, {
-               .name           = "post0",
-               .parent         = &clk_h,
-               .enable         = s3c64xx_hclk_ctrl,
-               .ctrlbit        = S3C_CLKCON_HCLK_POST0,
-       }, {
-               .name           = "rot",
-               .parent         = &clk_h,
-               .enable         = s3c64xx_hclk_ctrl,
-               .ctrlbit        = S3C_CLKCON_HCLK_ROT,
-       }, {
-               .name           = "hclk_mfc",
-               .parent         = &clk_h,
-               .enable         = s3c64xx_hclk_ctrl,
-               .ctrlbit        = S3C_CLKCON_HCLK_MFC,
-       }, {
-               .name           = "pclk_mfc",
-               .parent         = &clk_p,
-               .enable         = s3c64xx_pclk_ctrl,
-               .ctrlbit        = S3C_CLKCON_PCLK_MFC,
-       }, {
-               .name           = "dac27",
-               .enable         = s3c64xx_sclk_ctrl,
-               .ctrlbit        = S3C_CLKCON_SCLK_DAC27,
-       }, {
-               .name           = "tv27",
-               .enable         = s3c64xx_sclk_ctrl,
-               .ctrlbit        = S3C_CLKCON_SCLK_TV27,
-       }, {
-               .name           = "scaler27",
-               .enable         = s3c64xx_sclk_ctrl,
-               .ctrlbit        = S3C_CLKCON_SCLK_SCALER27,
-       }, {
-               .name           = "sclk_scaler",
-               .enable         = s3c64xx_sclk_ctrl,
-               .ctrlbit        = S3C_CLKCON_SCLK_SCALER,
-       }, {
-               .name           = "post0_27",
-               .enable         = s3c64xx_sclk_ctrl,
-               .ctrlbit        = S3C_CLKCON_SCLK_POST0_27,
-       }, {
-               .name           = "secur",
-               .enable         = s3c64xx_sclk_ctrl,
-               .ctrlbit        = S3C_CLKCON_SCLK_SECUR,
-       }, {
-               .name           = "sclk_mfc",
-               .enable         = s3c64xx_sclk_ctrl,
-               .ctrlbit        = S3C_CLKCON_SCLK_MFC,
-       }, {
-               .name           = "sclk_jpeg",
-               .enable         = s3c64xx_sclk_ctrl,
-               .ctrlbit        = S3C_CLKCON_SCLK_JPEG,
-       },
-};
-
-static struct clk clk_48m_spi0 = {
-       .name           = "spi_48m",
-       .devname        = "s3c6410-spi.0",
-       .parent         = &clk_48m,
-       .enable         = s3c64xx_sclk_ctrl,
-       .ctrlbit        = S3C_CLKCON_SCLK_SPI0_48,
-};
-
-static struct clk clk_48m_spi1 = {
-       .name           = "spi_48m",
-       .devname        = "s3c6410-spi.1",
-       .parent         = &clk_48m,
-       .enable         = s3c64xx_sclk_ctrl,
-       .ctrlbit        = S3C_CLKCON_SCLK_SPI1_48,
-};
-
-static struct clk clk_i2s0 = {
-       .name           = "iis",
-       .devname        = "samsung-i2s.0",
-       .parent         = &clk_p,
-       .enable         = s3c64xx_pclk_ctrl,
-       .ctrlbit        = S3C_CLKCON_PCLK_IIS0,
-};
-
-static struct clk clk_i2s1 = {
-       .name           = "iis",
-       .devname        = "samsung-i2s.1",
-       .parent         = &clk_p,
-       .enable         = s3c64xx_pclk_ctrl,
-       .ctrlbit        = S3C_CLKCON_PCLK_IIS1,
-};
-
-#ifdef CONFIG_CPU_S3C6410
-static struct clk clk_i2s2 = {
-       .name           = "iis",
-       .devname        = "samsung-i2s.2",
-       .parent         = &clk_p,
-       .enable         = s3c64xx_pclk_ctrl,
-       .ctrlbit        = S3C6410_CLKCON_PCLK_IIS2,
-};
-#endif
-
-static struct clk init_clocks[] = {
-       {
-               .name           = "lcd",
-               .parent         = &clk_h,
-               .enable         = s3c64xx_hclk_ctrl,
-               .ctrlbit        = S3C_CLKCON_HCLK_LCD,
-       }, {
-               .name           = "gpio",
-               .parent         = &clk_p,
-               .enable         = s3c64xx_pclk_ctrl,
-               .ctrlbit        = S3C_CLKCON_PCLK_GPIO,
-       }, {
-               .name           = "usb-host",
-               .parent         = &clk_h,
-               .enable         = s3c64xx_hclk_ctrl,
-               .ctrlbit        = S3C_CLKCON_HCLK_UHOST,
-       }, {
-               .name           = "otg",
-               .parent         = &clk_h,
-               .enable         = s3c64xx_hclk_ctrl,
-               .ctrlbit        = S3C_CLKCON_HCLK_USB,
-       }, {
-               .name           = "timers",
-               .parent         = &clk_p,
-               .enable         = s3c64xx_pclk_ctrl,
-               .ctrlbit        = S3C_CLKCON_PCLK_PWM,
-       }, {
-               .name           = "uart",
-               .devname        = "s3c6400-uart.0",
-               .parent         = &clk_p,
-               .enable         = s3c64xx_pclk_ctrl,
-               .ctrlbit        = S3C_CLKCON_PCLK_UART0,
-       }, {
-               .name           = "uart",
-               .devname        = "s3c6400-uart.1",
-               .parent         = &clk_p,
-               .enable         = s3c64xx_pclk_ctrl,
-               .ctrlbit        = S3C_CLKCON_PCLK_UART1,
-       }, {
-               .name           = "uart",
-               .devname        = "s3c6400-uart.2",
-               .parent         = &clk_p,
-               .enable         = s3c64xx_pclk_ctrl,
-               .ctrlbit        = S3C_CLKCON_PCLK_UART2,
-       }, {
-               .name           = "uart",
-               .devname        = "s3c6400-uart.3",
-               .parent         = &clk_p,
-               .enable         = s3c64xx_pclk_ctrl,
-               .ctrlbit        = S3C_CLKCON_PCLK_UART3,
-       }, {
-               .name           = "watchdog",
-               .parent         = &clk_p,
-               .ctrlbit        = S3C_CLKCON_PCLK_WDT,
-       },
-};
-
-static struct clk clk_hsmmc0 = {
-       .name           = "hsmmc",
-       .devname        = "s3c-sdhci.0",
-       .parent         = &clk_h,
-       .enable         = s3c64xx_hclk_ctrl,
-       .ctrlbit        = S3C_CLKCON_HCLK_HSMMC0,
-};
-
-static struct clk clk_hsmmc1 = {
-       .name           = "hsmmc",
-       .devname        = "s3c-sdhci.1",
-       .parent         = &clk_h,
-       .enable         = s3c64xx_hclk_ctrl,
-       .ctrlbit        = S3C_CLKCON_HCLK_HSMMC1,
-};
-
-static struct clk clk_hsmmc2 = {
-       .name           = "hsmmc",
-       .devname        = "s3c-sdhci.2",
-       .parent         = &clk_h,
-       .enable         = s3c64xx_hclk_ctrl,
-       .ctrlbit        = S3C_CLKCON_HCLK_HSMMC2,
-};
-
-static struct clk clk_fout_apll = {
-       .name           = "fout_apll",
-};
-
-static struct clk *clk_src_apll_list[] = {
-       [0] = &clk_fin_apll,
-       [1] = &clk_fout_apll,
-};
-
-static struct clksrc_sources clk_src_apll = {
-       .sources        = clk_src_apll_list,
-       .nr_sources     = ARRAY_SIZE(clk_src_apll_list),
-};
-
-static struct clksrc_clk clk_mout_apll = {
-       .clk    = {
-               .name           = "mout_apll",
-       },
-       .reg_src        = { .reg = S3C_CLK_SRC, .shift = 0, .size = 1  },
-       .sources        = &clk_src_apll,
-};
-
-static struct clk *clk_src_epll_list[] = {
-       [0] = &clk_fin_epll,
-       [1] = &clk_fout_epll,
-};
-
-static struct clksrc_sources clk_src_epll = {
-       .sources        = clk_src_epll_list,
-       .nr_sources     = ARRAY_SIZE(clk_src_epll_list),
-};
-
-static struct clksrc_clk clk_mout_epll = {
-       .clk    = {
-               .name           = "mout_epll",
-       },
-       .reg_src        = { .reg = S3C_CLK_SRC, .shift = 2, .size = 1  },
-       .sources        = &clk_src_epll,
-};
-
-static struct clk *clk_src_mpll_list[] = {
-       [0] = &clk_fin_mpll,
-       [1] = &clk_fout_mpll,
-};
-
-static struct clksrc_sources clk_src_mpll = {
-       .sources        = clk_src_mpll_list,
-       .nr_sources     = ARRAY_SIZE(clk_src_mpll_list),
-};
-
-static struct clksrc_clk clk_mout_mpll = {
-       .clk = {
-               .name           = "mout_mpll",
-       },
-       .reg_src        = { .reg = S3C_CLK_SRC, .shift = 1, .size = 1  },
-       .sources        = &clk_src_mpll,
-};
-
-static unsigned int armclk_mask;
-
-static unsigned long s3c64xx_clk_arm_get_rate(struct clk *clk)
-{
-       unsigned long rate = clk_get_rate(clk->parent);
-       u32 clkdiv;
-
-       /* divisor mask starts at bit0, so no need to shift */
-       clkdiv = __raw_readl(S3C_CLK_DIV0) & armclk_mask;
-
-       return rate / (clkdiv + 1);
-}
-
-static unsigned long s3c64xx_clk_arm_round_rate(struct clk *clk,
-                                               unsigned long rate)
-{
-       unsigned long parent = clk_get_rate(clk->parent);
-       u32 div;
-
-       if (parent < rate)
-               return parent;
-
-       div = (parent / rate) - 1;
-       if (div > armclk_mask)
-               div = armclk_mask;
-
-       return parent / (div + 1);
-}
-
-static int s3c64xx_clk_arm_set_rate(struct clk *clk, unsigned long rate)
-{
-       unsigned long parent = clk_get_rate(clk->parent);
-       u32 div;
-       u32 val;
-
-       if (rate < parent / (armclk_mask + 1))
-               return -EINVAL;
-
-       rate = clk_round_rate(clk, rate);
-       div = clk_get_rate(clk->parent) / rate;
-
-       val = __raw_readl(S3C_CLK_DIV0);
-       val &= ~armclk_mask;
-       val |= (div - 1);
-       __raw_writel(val, S3C_CLK_DIV0);
-
-       return 0;
-
-}
-
-static struct clk clk_arm = {
-       .name           = "armclk",
-       .parent         = &clk_mout_apll.clk,
-       .ops            = &(struct clk_ops) {
-               .get_rate       = s3c64xx_clk_arm_get_rate,
-               .set_rate       = s3c64xx_clk_arm_set_rate,
-               .round_rate     = s3c64xx_clk_arm_round_rate,
-       },
-};
-
-static unsigned long s3c64xx_clk_doutmpll_get_rate(struct clk *clk)
-{
-       unsigned long rate = clk_get_rate(clk->parent);
-
-       printk(KERN_DEBUG "%s: parent is %ld\n", __func__, rate);
-
-       if (__raw_readl(S3C_CLK_DIV0) & S3C6400_CLKDIV0_MPLL_MASK)
-               rate /= 2;
-
-       return rate;
-}
-
-static struct clk_ops clk_dout_ops = {
-       .get_rate       = s3c64xx_clk_doutmpll_get_rate,
-};
-
-static struct clk clk_dout_mpll = {
-       .name           = "dout_mpll",
-       .parent         = &clk_mout_mpll.clk,
-       .ops            = &clk_dout_ops,
-};
-
-static struct clk *clkset_spi_mmc_list[] = {
-       &clk_mout_epll.clk,
-       &clk_dout_mpll,
-       &clk_fin_epll,
-       &clk_27m,
-};
-
-static struct clksrc_sources clkset_spi_mmc = {
-       .sources        = clkset_spi_mmc_list,
-       .nr_sources     = ARRAY_SIZE(clkset_spi_mmc_list),
-};
-
-static struct clk *clkset_irda_list[] = {
-       &clk_mout_epll.clk,
-       &clk_dout_mpll,
-       NULL,
-       &clk_27m,
-};
-
-static struct clksrc_sources clkset_irda = {
-       .sources        = clkset_irda_list,
-       .nr_sources     = ARRAY_SIZE(clkset_irda_list),
-};
-
-static struct clk *clkset_uart_list[] = {
-       &clk_mout_epll.clk,
-       &clk_dout_mpll,
-       NULL,
-       NULL
-};
-
-static struct clksrc_sources clkset_uart = {
-       .sources        = clkset_uart_list,
-       .nr_sources     = ARRAY_SIZE(clkset_uart_list),
-};
-
-static struct clk *clkset_uhost_list[] = {
-       &clk_48m,
-       &clk_mout_epll.clk,
-       &clk_dout_mpll,
-       &clk_fin_epll,
-};
-
-static struct clksrc_sources clkset_uhost = {
-       .sources        = clkset_uhost_list,
-       .nr_sources     = ARRAY_SIZE(clkset_uhost_list),
-};
-
-/* The peripheral clocks are all controlled via clocksource followed
- * by an optional divider and gate stage. We currently roll this into
- * one clock which hides the intermediate clock from the mux.
- *
- * Note, the JPEG clock can only be an even divider...
- *
- * The scaler and LCD clocks depend on the S3C64XX version, and also
- * have a common parent divisor so are not included here.
- */
-
-/* clocks that feed other parts of the clock source tree */
-
-static struct clk clk_iis_cd0 = {
-       .name           = "iis_cdclk0",
-};
-
-static struct clk clk_iis_cd1 = {
-       .name           = "iis_cdclk1",
-};
-
-static struct clk clk_iisv4_cd = {
-       .name           = "iis_cdclk_v4",
-};
-
-static struct clk clk_pcm_cd = {
-       .name           = "pcm_cdclk",
-};
-
-static struct clk *clkset_audio0_list[] = {
-       [0] = &clk_mout_epll.clk,
-       [1] = &clk_dout_mpll,
-       [2] = &clk_fin_epll,
-       [3] = &clk_iis_cd0,
-       [4] = &clk_pcm_cd,
-};
-
-static struct clksrc_sources clkset_audio0 = {
-       .sources        = clkset_audio0_list,
-       .nr_sources     = ARRAY_SIZE(clkset_audio0_list),
-};
-
-static struct clk *clkset_audio1_list[] = {
-       [0] = &clk_mout_epll.clk,
-       [1] = &clk_dout_mpll,
-       [2] = &clk_fin_epll,
-       [3] = &clk_iis_cd1,
-       [4] = &clk_pcm_cd,
-};
-
-static struct clksrc_sources clkset_audio1 = {
-       .sources        = clkset_audio1_list,
-       .nr_sources     = ARRAY_SIZE(clkset_audio1_list),
-};
-
-#ifdef CONFIG_CPU_S3C6410
-static struct clk *clkset_audio2_list[] = {
-       [0] = &clk_mout_epll.clk,
-       [1] = &clk_dout_mpll,
-       [2] = &clk_fin_epll,
-       [3] = &clk_iisv4_cd,
-       [4] = &clk_pcm_cd,
-};
-
-static struct clksrc_sources clkset_audio2 = {
-       .sources        = clkset_audio2_list,
-       .nr_sources     = ARRAY_SIZE(clkset_audio2_list),
-};
-#endif
-
-static struct clksrc_clk clksrcs[] = {
-       {
-               .clk    = {
-                       .name           = "usb-bus-host",
-                       .ctrlbit        = S3C_CLKCON_SCLK_UHOST,
-                       .enable         = s3c64xx_sclk_ctrl,
-               },
-               .reg_src        = { .reg = S3C_CLK_SRC, .shift = 5, .size = 2  },
-               .reg_div        = { .reg = S3C_CLK_DIV1, .shift = 20, .size = 4  },
-               .sources        = &clkset_uhost,
-       }, {
-               .clk    = {
-                       .name           = "irda-bus",
-                       .ctrlbit        = S3C_CLKCON_SCLK_IRDA,
-                       .enable         = s3c64xx_sclk_ctrl,
-               },
-               .reg_src        = { .reg = S3C_CLK_SRC, .shift = 24, .size = 2  },
-               .reg_div        = { .reg = S3C_CLK_DIV2, .shift = 20, .size = 4  },
-               .sources        = &clkset_irda,
-       }, {
-               .clk    = {
-                       .name           = "camera",
-                       .ctrlbit        = S3C_CLKCON_SCLK_CAM,
-                       .enable         = s3c64xx_sclk_ctrl,
-                       .parent         = &clk_h2,
-               },
-               .reg_div        = { .reg = S3C_CLK_DIV0, .shift = 20, .size = 4  },
-       },
-};
-
-/* Where does UCLK0 come from? */
-static struct clksrc_clk clk_sclk_uclk = {
-       .clk    = {
-               .name           = "uclk1",
-               .ctrlbit        = S3C_CLKCON_SCLK_UART,
-               .enable         = s3c64xx_sclk_ctrl,
-       },
-       .reg_src        = { .reg = S3C_CLK_SRC, .shift = 13, .size = 1  },
-       .reg_div        = { .reg = S3C_CLK_DIV2, .shift = 16, .size = 4  },
-       .sources        = &clkset_uart,
-};
-
-static struct clksrc_clk clk_sclk_mmc0 = {
-       .clk    = {
-               .name           = "mmc_bus",
-               .devname        = "s3c-sdhci.0",
-               .ctrlbit        = S3C_CLKCON_SCLK_MMC0,
-               .enable         = s3c64xx_sclk_ctrl,
-       },
-       .reg_src        = { .reg = S3C_CLK_SRC, .shift = 18, .size = 2  },
-       .reg_div        = { .reg = S3C_CLK_DIV1, .shift = 0, .size = 4  },
-       .sources        = &clkset_spi_mmc,
-};
-
-static struct clksrc_clk clk_sclk_mmc1 = {
-       .clk    = {
-               .name           = "mmc_bus",
-               .devname        = "s3c-sdhci.1",
-               .ctrlbit        = S3C_CLKCON_SCLK_MMC1,
-               .enable         = s3c64xx_sclk_ctrl,
-       },
-       .reg_src        = { .reg = S3C_CLK_SRC, .shift = 20, .size = 2  },
-       .reg_div        = { .reg = S3C_CLK_DIV1, .shift = 4, .size = 4  },
-       .sources        = &clkset_spi_mmc,
-};
-
-static struct clksrc_clk clk_sclk_mmc2 = {
-       .clk    = {
-               .name           = "mmc_bus",
-               .devname        = "s3c-sdhci.2",
-               .ctrlbit        = S3C_CLKCON_SCLK_MMC2,
-               .enable         = s3c64xx_sclk_ctrl,
-       },
-       .reg_src        = { .reg = S3C_CLK_SRC, .shift = 22, .size = 2  },
-       .reg_div        = { .reg = S3C_CLK_DIV1, .shift = 8, .size = 4  },
-       .sources        = &clkset_spi_mmc,
-};
-
-static struct clksrc_clk clk_sclk_spi0 = {
-       .clk    = {
-               .name           = "spi-bus",
-               .devname        = "s3c6410-spi.0",
-               .ctrlbit        = S3C_CLKCON_SCLK_SPI0,
-               .enable         = s3c64xx_sclk_ctrl,
-       },
-       .reg_src = { .reg = S3C_CLK_SRC, .shift = 14, .size = 2 },
-       .reg_div = { .reg = S3C_CLK_DIV2, .shift = 0, .size = 4 },
-       .sources = &clkset_spi_mmc,
-};
-
-static struct clksrc_clk clk_sclk_spi1 = {
-       .clk    = {
-               .name           = "spi-bus",
-               .devname        = "s3c6410-spi.1",
-               .ctrlbit        = S3C_CLKCON_SCLK_SPI1,
-               .enable         = s3c64xx_sclk_ctrl,
-       },
-       .reg_src = { .reg = S3C_CLK_SRC, .shift = 16, .size = 2 },
-       .reg_div = { .reg = S3C_CLK_DIV2, .shift = 4, .size = 4 },
-       .sources = &clkset_spi_mmc,
-};
-
-static struct clksrc_clk clk_audio_bus0 = {
-       .clk    = {
-               .name           = "audio-bus",
-               .devname        = "samsung-i2s.0",
-               .ctrlbit        = S3C_CLKCON_SCLK_AUDIO0,
-               .enable         = s3c64xx_sclk_ctrl,
-       },
-       .reg_src        = { .reg = S3C_CLK_SRC, .shift = 7, .size = 3  },
-       .reg_div        = { .reg = S3C_CLK_DIV2, .shift = 8, .size = 4  },
-       .sources        = &clkset_audio0,
-};
-
-static struct clksrc_clk clk_audio_bus1 = {
-       .clk    = {
-               .name           = "audio-bus",
-               .devname        = "samsung-i2s.1",
-               .ctrlbit        = S3C_CLKCON_SCLK_AUDIO1,
-               .enable         = s3c64xx_sclk_ctrl,
-       },
-       .reg_src        = { .reg = S3C_CLK_SRC, .shift = 10, .size = 3  },
-       .reg_div        = { .reg = S3C_CLK_DIV2, .shift = 12, .size = 4  },
-       .sources        = &clkset_audio1,
-};
-
-#ifdef CONFIG_CPU_S3C6410
-static struct clksrc_clk clk_audio_bus2 = {
-       .clk    = {
-               .name           = "audio-bus",
-               .devname        = "samsung-i2s.2",
-               .ctrlbit        = S3C6410_CLKCON_SCLK_AUDIO2,
-               .enable         = s3c64xx_sclk_ctrl,
-       },
-       .reg_src        = { .reg = S3C6410_CLK_SRC2, .shift = 0, .size = 3  },
-       .reg_div        = { .reg = S3C_CLK_DIV2, .shift = 24, .size = 4  },
-       .sources        = &clkset_audio2,
-};
-#endif
-/* Clock initialisation code */
-
-static struct clksrc_clk *init_parents[] = {
-       &clk_mout_apll,
-       &clk_mout_epll,
-       &clk_mout_mpll,
-};
-
-static struct clksrc_clk *clksrc_cdev[] = {
-       &clk_sclk_uclk,
-       &clk_sclk_mmc0,
-       &clk_sclk_mmc1,
-       &clk_sclk_mmc2,
-       &clk_sclk_spi0,
-       &clk_sclk_spi1,
-       &clk_audio_bus0,
-       &clk_audio_bus1,
-};
-
-static struct clk *clk_cdev[] = {
-       &clk_hsmmc0,
-       &clk_hsmmc1,
-       &clk_hsmmc2,
-       &clk_48m_spi0,
-       &clk_48m_spi1,
-       &clk_i2s0,
-       &clk_i2s1,
-};
-
-static struct clk_lookup s3c64xx_clk_lookup[] = {
-       CLKDEV_INIT(NULL, "clk_uart_baud2", &clk_p),
-       CLKDEV_INIT(NULL, "clk_uart_baud3", &clk_sclk_uclk.clk),
-       CLKDEV_INIT("s3c-sdhci.0", "mmc_busclk.0", &clk_hsmmc0),
-       CLKDEV_INIT("s3c-sdhci.1", "mmc_busclk.0", &clk_hsmmc1),
-       CLKDEV_INIT("s3c-sdhci.2", "mmc_busclk.0", &clk_hsmmc2),
-       CLKDEV_INIT("s3c-sdhci.0", "mmc_busclk.2", &clk_sclk_mmc0.clk),
-       CLKDEV_INIT("s3c-sdhci.1", "mmc_busclk.2", &clk_sclk_mmc1.clk),
-       CLKDEV_INIT("s3c-sdhci.2", "mmc_busclk.2", &clk_sclk_mmc2.clk),
-       CLKDEV_INIT(NULL, "spi_busclk0", &clk_p),
-       CLKDEV_INIT("s3c6410-spi.0", "spi_busclk1", &clk_sclk_spi0.clk),
-       CLKDEV_INIT("s3c6410-spi.0", "spi_busclk2", &clk_48m_spi0),
-       CLKDEV_INIT("s3c6410-spi.1", "spi_busclk1", &clk_sclk_spi1.clk),
-       CLKDEV_INIT("s3c6410-spi.1", "spi_busclk2", &clk_48m_spi1),
-       CLKDEV_INIT("samsung-i2s.0", "i2s_opclk0", &clk_i2s0),
-       CLKDEV_INIT("samsung-i2s.0", "i2s_opclk1", &clk_audio_bus0.clk),
-       CLKDEV_INIT("samsung-i2s.1", "i2s_opclk0", &clk_i2s1),
-       CLKDEV_INIT("samsung-i2s.1", "i2s_opclk1", &clk_audio_bus1.clk),
-#ifdef CONFIG_CPU_S3C6410
-       CLKDEV_INIT("samsung-i2s.2", "i2s_opclk0", &clk_i2s2),
-       CLKDEV_INIT("samsung-i2s.2", "i2s_opclk1", &clk_audio_bus2.clk),
-#endif
-};
-
-#define GET_DIV(clk, field) ((((clk) & field##_MASK) >> field##_SHIFT) + 1)
-
-void __init_or_cpufreq s3c64xx_setup_clocks(void)
-{
-       struct clk *xtal_clk;
-       unsigned long xtal;
-       unsigned long fclk;
-       unsigned long hclk;
-       unsigned long hclk2;
-       unsigned long pclk;
-       unsigned long epll;
-       unsigned long apll;
-       unsigned long mpll;
-       unsigned int ptr;
-       u32 clkdiv0;
-
-       printk(KERN_DEBUG "%s: registering clocks\n", __func__);
-
-       clkdiv0 = __raw_readl(S3C_CLK_DIV0);
-       printk(KERN_DEBUG "%s: clkdiv0 = %08x\n", __func__, clkdiv0);
-
-       xtal_clk = clk_get(NULL, "xtal");
-       BUG_ON(IS_ERR(xtal_clk));
-
-       xtal = clk_get_rate(xtal_clk);
-       clk_put(xtal_clk);
-
-       printk(KERN_DEBUG "%s: xtal is %ld\n", __func__, xtal);
-
-       /* For now assume the mux always selects the crystal */
-       clk_ext_xtal_mux.parent = xtal_clk;
-
-       epll = s3c_get_pll6553x(xtal, __raw_readl(S3C_EPLL_CON0),
-                               __raw_readl(S3C_EPLL_CON1));
-       mpll = s3c6400_get_pll(xtal, __raw_readl(S3C_MPLL_CON));
-       apll = s3c6400_get_pll(xtal, __raw_readl(S3C_APLL_CON));
-
-       fclk = mpll;
-
-       printk(KERN_INFO "S3C64XX: PLL settings, A=%ld, M=%ld, E=%ld\n",
-              apll, mpll, epll);
-
-       if(__raw_readl(S3C64XX_OTHERS) & S3C64XX_OTHERS_SYNCMUXSEL)
-               /* Synchronous mode */
-               hclk2 = apll / GET_DIV(clkdiv0, S3C6400_CLKDIV0_HCLK2);
-       else
-               /* Asynchronous mode */
-               hclk2 = mpll / GET_DIV(clkdiv0, S3C6400_CLKDIV0_HCLK2);
-
-       hclk = hclk2 / GET_DIV(clkdiv0, S3C6400_CLKDIV0_HCLK);
-       pclk = hclk2 / GET_DIV(clkdiv0, S3C6400_CLKDIV0_PCLK);
-
-       printk(KERN_INFO "S3C64XX: HCLK2=%ld, HCLK=%ld, PCLK=%ld\n",
-              hclk2, hclk, pclk);
-
-       clk_fout_mpll.rate = mpll;
-       clk_fout_epll.rate = epll;
-       clk_fout_apll.rate = apll;
-
-       clk_h2.rate = hclk2;
-       clk_h.rate = hclk;
-       clk_p.rate = pclk;
-       clk_f.rate = fclk;
-
-       for (ptr = 0; ptr < ARRAY_SIZE(init_parents); ptr++)
-               s3c_set_clksrc(init_parents[ptr], true);
-
-       for (ptr = 0; ptr < ARRAY_SIZE(clksrcs); ptr++)
-               s3c_set_clksrc(&clksrcs[ptr], true);
-}
-
-static struct clk *clks1[] __initdata = {
-       &clk_ext_xtal_mux,
-       &clk_iis_cd0,
-       &clk_iis_cd1,
-       &clk_iisv4_cd,
-       &clk_pcm_cd,
-       &clk_mout_epll.clk,
-       &clk_mout_mpll.clk,
-       &clk_dout_mpll,
-       &clk_arm,
-};
-
-static struct clk *clks[] __initdata = {
-       &clk_ext,
-       &clk_epll,
-       &clk_27m,
-       &clk_48m,
-       &clk_h2,
-       &clk_xusbxti,
-};
-
-/**
- * s3c64xx_register_clocks - register clocks for s3c6400 and s3c6410
- * @xtal: The rate for the clock crystal feeding the PLLs.
- * @armclk_divlimit: Divisor mask for ARMCLK.
- *
- * Register the clocks for the S3C6400 and S3C6410 SoC range, such
- * as ARMCLK as well as the necessary parent clocks.
- *
- * This call does not setup the clocks, which is left to the
- * s3c64xx_setup_clocks() call which may be needed by the cpufreq
- * or resume code to re-set the clocks if the bootloader has changed
- * them.
- */
-void __init s3c64xx_register_clocks(unsigned long xtal, 
-                                   unsigned armclk_divlimit)
-{
-       unsigned int cnt;
-
-       armclk_mask = armclk_divlimit;
-
-       s3c24xx_register_baseclocks(xtal);
-       s3c24xx_register_clocks(clks, ARRAY_SIZE(clks));
-
-       s3c_register_clocks(init_clocks, ARRAY_SIZE(init_clocks));
-
-       s3c_register_clocks(init_clocks_off, ARRAY_SIZE(init_clocks_off));
-       s3c_disable_clocks(init_clocks_off, ARRAY_SIZE(init_clocks_off));
-
-       s3c24xx_register_clocks(clk_cdev, ARRAY_SIZE(clk_cdev));
-       for (cnt = 0; cnt < ARRAY_SIZE(clk_cdev); cnt++)
-               s3c_disable_clocks(clk_cdev[cnt], 1);
-
-       s3c24xx_register_clocks(clks1, ARRAY_SIZE(clks1));
-       s3c_register_clksrc(clksrcs, ARRAY_SIZE(clksrcs));
-       for (cnt = 0; cnt < ARRAY_SIZE(clksrc_cdev); cnt++)
-               s3c_register_clksrc(clksrc_cdev[cnt], 1);
-       clkdev_add_table(s3c64xx_clk_lookup, ARRAY_SIZE(s3c64xx_clk_lookup));
-}
index 73d79cf5e14118b1e99861c5bd79d6ffc9517164..7a3ce4c39e5fecd3470b06344295d766869b702e 100644 (file)
  * published by the Free Software Foundation.
  */
 
+/*
+ * NOTE: Code in this file is not used when booting with Device Tree support.
+ */
+
 #include <linux/kernel.h>
 #include <linux/init.h>
 #include <linux/module.h>
+#include <linux/clk-provider.h>
 #include <linux/interrupt.h>
 #include <linux/ioport.h>
 #include <linux/serial_core.h>
@@ -38,7 +43,6 @@
 #include <mach/regs-gpio.h>
 
 #include <plat/cpu.h>
-#include <plat/clock.h>
 #include <plat/devs.h>
 #include <plat/pm.h>
 #include <plat/gpio-cfg.h>
 
 #include "common.h"
 
+/* External clock frequency */
+static unsigned long xtal_f = 12000000, xusbxti_f = 48000000;
+
+void __init s3c64xx_set_xtal_freq(unsigned long freq)
+{
+       xtal_f = freq;
+}
+
+void __init s3c64xx_set_xusbxti_freq(unsigned long freq)
+{
+       xusbxti_f = freq;
+}
+
 /* uart registration process */
 
 static void __init s3c64xx_init_uarts(struct s3c2410_uartcfg *cfg, int no)
@@ -67,7 +84,6 @@ static struct cpu_table cpu_ids[] __initdata = {
                .idcode         = S3C6400_CPU_ID,
                .idmask         = S3C64XX_CPU_MASK,
                .map_io         = s3c6400_map_io,
-               .init_clocks    = s3c6400_init_clocks,
                .init_uarts     = s3c64xx_init_uarts,
                .init           = s3c6400_init,
                .name           = name_s3c6400,
@@ -75,7 +91,6 @@ static struct cpu_table cpu_ids[] __initdata = {
                .idcode         = S3C6410_CPU_ID,
                .idmask         = S3C64XX_CPU_MASK,
                .map_io         = s3c6410_map_io,
-               .init_clocks    = s3c6410_init_clocks,
                .init_uarts     = s3c64xx_init_uarts,
                .init           = s3c6410_init,
                .name           = name_s3c6410,
@@ -192,6 +207,10 @@ void __init s3c64xx_init_io(struct map_desc *mach_desc, int size)
 
 static __init int s3c64xx_dev_init(void)
 {
+       /* Not applicable when using DT. */
+       if (of_have_populated_dt())
+               return 0;
+
        subsys_system_register(&s3c64xx_subsys, NULL);
        return device_register(&s3c64xx_dev);
 }
@@ -213,8 +232,10 @@ void __init s3c64xx_init_irq(u32 vic0_valid, u32 vic1_valid)
 {
        /*
         * FIXME: there is no better place to put this at the moment
-        * (samsung_wdt_reset_init needs clocks)
+        * (s3c64xx_clk_init needs ioremap and must happen before init_time
+        * samsung_wdt_reset_init needs clocks)
         */
+       s3c64xx_clk_init(NULL, xtal_f, xusbxti_f, soc_is_s3c6400(), S3C_VA_SYS);
        samsung_wdt_reset_init(S3C_VA_WATCHDOG);
 
        printk(KERN_DEBUG "%s: initialising interrupts\n", __func__);
@@ -391,6 +412,10 @@ static int __init s3c64xx_init_irq_eint(void)
 {
        int irq;
 
+       /* On DT-enabled systems EINTs are handled by pinctrl-s3c64xx driver. */
+       if (of_have_populated_dt())
+               return -ENODEV;
+
        for (irq = IRQ_EINT(0); irq <= IRQ_EINT(27); irq++) {
                irq_set_chip_and_handler(irq, &s3c_irq_eint, handle_level_irq);
                irq_set_chip_data(irq, (void *)eint_irq_to_bit(irq));
index e8f990b37665b900d667c7332b6e26bf389beb93..bd3bd562011e1515198e924627fd7165f57cb3dd 100644 (file)
 void s3c64xx_init_irq(u32 vic0, u32 vic1);
 void s3c64xx_init_io(struct map_desc *mach_desc, int size);
 
-void s3c64xx_register_clocks(unsigned long xtal, unsigned armclk_limit);
-void s3c64xx_setup_clocks(void);
-
 void s3c64xx_restart(enum reboot_mode mode, const char *cmd);
 void s3c64xx_init_late(void);
 
+void s3c64xx_clk_init(struct device_node *np, unsigned long xtal_f,
+       unsigned long xusbxti_f, bool is_s3c6400, void __iomem *reg_base);
+void s3c64xx_set_xtal_freq(unsigned long freq);
+void s3c64xx_set_xusbxti_freq(unsigned long freq);
+
 #ifdef CONFIG_CPU_S3C6400
 
 extern  int s3c6400_init(void);
 extern void s3c6400_init_irq(void);
 extern void s3c6400_map_io(void);
-extern void s3c6400_init_clocks(int xtal);
 
 #else
-#define s3c6400_init_clocks NULL
 #define s3c6400_map_io NULL
 #define s3c6400_init NULL
 #endif
@@ -46,10 +46,8 @@ extern void s3c6400_init_clocks(int xtal);
 extern  int s3c6410_init(void);
 extern void s3c6410_init_irq(void);
 extern void s3c6410_map_io(void);
-extern void s3c6410_init_clocks(int xtal);
 
 #else
-#define s3c6410_init_clocks NULL
 #define s3c6410_map_io NULL
 #define s3c6410_init NULL
 #endif
index 759846c28d1296990bea0f1817ae782f46e042af..7e22c2113816a4c6bb897dc0c54a74e876da3f86 100644 (file)
  * published by the Free Software Foundation.
 */
 
+/*
+ * NOTE: Code in this file is not used when booting with Device Tree support.
+ */
+
 #include <linux/kernel.h>
 #include <linux/module.h>
 #include <linux/interrupt.h>
@@ -24,6 +28,7 @@
 #include <linux/err.h>
 #include <linux/io.h>
 #include <linux/amba/pl080.h>
+#include <linux/of.h>
 
 #include <mach/dma.h>
 #include <mach/map.h>
@@ -677,7 +682,7 @@ static int s3c64xx_dma_init1(int chno, enum dma_ch chbase,
                goto err_map;
        }
 
-       clk_enable(dmac->clk);
+       clk_prepare_enable(dmac->clk);
 
        dmac->regs = regs;
        dmac->chanbase = chbase;
@@ -711,7 +716,7 @@ static int s3c64xx_dma_init1(int chno, enum dma_ch chbase,
        return 0;
 
 err_clk:
-       clk_disable(dmac->clk);
+       clk_disable_unprepare(dmac->clk);
        clk_put(dmac->clk);
 err_map:
        iounmap(regs);
@@ -726,6 +731,10 @@ static int __init s3c64xx_dma_init(void)
 {
        int ret;
 
+       /* This driver is not supported when booting with device tree. */
+       if (of_have_populated_dt())
+               return -ENODEV;
+
        printk(KERN_INFO "%s: Registering DMA channels\n", __func__);
 
        dma_pool = dma_pool_create("DMA-LLI", NULL, sizeof(struct pl080s_lli), 16, 0);
index 05332b998ec07d36e1dba08453a265d7230ddba6..4f44aac770924134e735bf5e8b41eb6fe25c5920 100644 (file)
 #ifndef __PLAT_REGS_CLOCK_H
 #define __PLAT_REGS_CLOCK_H __FILE__
 
+/*
+ * FIXME: Remove remaining definitions
+ */
+
 #define S3C_CLKREG(x)          (S3C_VA_SYS + (x))
 
-#define S3C_APLL_LOCK          S3C_CLKREG(0x00)
-#define S3C_MPLL_LOCK          S3C_CLKREG(0x04)
-#define S3C_EPLL_LOCK          S3C_CLKREG(0x08)
-#define S3C_APLL_CON           S3C_CLKREG(0x0C)
-#define S3C_MPLL_CON           S3C_CLKREG(0x10)
-#define S3C_EPLL_CON0          S3C_CLKREG(0x14)
-#define S3C_EPLL_CON1          S3C_CLKREG(0x18)
-#define S3C_CLK_SRC            S3C_CLKREG(0x1C)
-#define S3C_CLK_DIV0           S3C_CLKREG(0x20)
-#define S3C_CLK_DIV1           S3C_CLKREG(0x24)
-#define S3C_CLK_DIV2           S3C_CLKREG(0x28)
-#define S3C_CLK_OUT            S3C_CLKREG(0x2C)
-#define S3C_HCLK_GATE          S3C_CLKREG(0x30)
 #define S3C_PCLK_GATE          S3C_CLKREG(0x34)
-#define S3C_SCLK_GATE          S3C_CLKREG(0x38)
-#define S3C_MEM0_GATE          S3C_CLKREG(0x3C)
 #define S3C6410_CLK_SRC2       S3C_CLKREG(0x10C)
 #define S3C_MEM_SYS_CFG                S3C_CLKREG(0x120)
 
-/* CLKDIV0 */
-#define S3C6400_CLKDIV0_PCLK_MASK      (0xf << 12)
-#define S3C6400_CLKDIV0_PCLK_SHIFT     (12)
-#define S3C6400_CLKDIV0_HCLK2_MASK     (0x7 << 9)
-#define S3C6400_CLKDIV0_HCLK2_SHIFT    (9)
-#define S3C6400_CLKDIV0_HCLK_MASK      (0x1 << 8)
-#define S3C6400_CLKDIV0_HCLK_SHIFT     (8)
-#define S3C6400_CLKDIV0_MPLL_MASK      (0x1 << 4)
-#define S3C6400_CLKDIV0_MPLL_SHIFT     (4)
-
-#define S3C6400_CLKDIV0_ARM_MASK       (0x7 << 0)
-#define S3C6410_CLKDIV0_ARM_MASK       (0xf << 0)
-#define S3C6400_CLKDIV0_ARM_SHIFT      (0)
-
-/* HCLK GATE Registers */
-#define S3C_CLKCON_HCLK_3DSE   (1<<31)
-#define S3C_CLKCON_HCLK_UHOST  (1<<29)
-#define S3C_CLKCON_HCLK_SECUR  (1<<28)
-#define S3C_CLKCON_HCLK_SDMA1  (1<<27)
-#define S3C_CLKCON_HCLK_SDMA0  (1<<26)
-#define S3C_CLKCON_HCLK_IROM   (1<<25)
-#define S3C_CLKCON_HCLK_DDR1   (1<<24)
-#define S3C_CLKCON_HCLK_DDR0   (1<<23)
-#define S3C_CLKCON_HCLK_MEM1   (1<<22)
-#define S3C_CLKCON_HCLK_MEM0   (1<<21)
-#define S3C_CLKCON_HCLK_USB    (1<<20)
-#define S3C_CLKCON_HCLK_HSMMC2 (1<<19)
-#define S3C_CLKCON_HCLK_HSMMC1 (1<<18)
-#define S3C_CLKCON_HCLK_HSMMC0 (1<<17)
-#define S3C_CLKCON_HCLK_MDP    (1<<16)
-#define S3C_CLKCON_HCLK_DHOST  (1<<15)
-#define S3C_CLKCON_HCLK_IHOST  (1<<14)
-#define S3C_CLKCON_HCLK_DMA1   (1<<13)
-#define S3C_CLKCON_HCLK_DMA0   (1<<12)
-#define S3C_CLKCON_HCLK_JPEG   (1<<11)
-#define S3C_CLKCON_HCLK_CAMIF  (1<<10)
-#define S3C_CLKCON_HCLK_SCALER (1<<9)
-#define S3C_CLKCON_HCLK_2D     (1<<8)
-#define S3C_CLKCON_HCLK_TV     (1<<7)
-#define S3C_CLKCON_HCLK_POST0  (1<<5)
-#define S3C_CLKCON_HCLK_ROT    (1<<4)
-#define S3C_CLKCON_HCLK_LCD    (1<<3)
-#define S3C_CLKCON_HCLK_TZIC   (1<<2)
-#define S3C_CLKCON_HCLK_INTC   (1<<1)
-#define S3C_CLKCON_HCLK_MFC    (1<<0)
-
 /* PCLK GATE Registers */
-#define S3C6410_CLKCON_PCLK_I2C1       (1<<27)
-#define S3C6410_CLKCON_PCLK_IIS2       (1<<26)
-#define S3C_CLKCON_PCLK_SKEY           (1<<24)
-#define S3C_CLKCON_PCLK_CHIPID         (1<<23)
-#define S3C_CLKCON_PCLK_SPI1           (1<<22)
-#define S3C_CLKCON_PCLK_SPI0           (1<<21)
-#define S3C_CLKCON_PCLK_HSIRX          (1<<20)
-#define S3C_CLKCON_PCLK_HSITX          (1<<19)
-#define S3C_CLKCON_PCLK_GPIO           (1<<18)
-#define S3C_CLKCON_PCLK_IIC            (1<<17)
-#define S3C_CLKCON_PCLK_IIS1           (1<<16)
-#define S3C_CLKCON_PCLK_IIS0           (1<<15)
-#define S3C_CLKCON_PCLK_AC97           (1<<14)
-#define S3C_CLKCON_PCLK_TZPC           (1<<13)
-#define S3C_CLKCON_PCLK_TSADC          (1<<12)
-#define S3C_CLKCON_PCLK_KEYPAD         (1<<11)
-#define S3C_CLKCON_PCLK_IRDA           (1<<10)
-#define S3C_CLKCON_PCLK_PCM1           (1<<9)
-#define S3C_CLKCON_PCLK_PCM0           (1<<8)
-#define S3C_CLKCON_PCLK_PWM            (1<<7)
-#define S3C_CLKCON_PCLK_RTC            (1<<6)
-#define S3C_CLKCON_PCLK_WDT            (1<<5)
 #define S3C_CLKCON_PCLK_UART3          (1<<4)
 #define S3C_CLKCON_PCLK_UART2          (1<<3)
 #define S3C_CLKCON_PCLK_UART1          (1<<2)
 #define S3C_CLKCON_PCLK_UART0          (1<<1)
-#define S3C_CLKCON_PCLK_MFC            (1<<0)
-
-/* SCLK GATE Registers */
-#define S3C_CLKCON_SCLK_UHOST          (1<<30)
-#define S3C_CLKCON_SCLK_MMC2_48                (1<<29)
-#define S3C_CLKCON_SCLK_MMC1_48                (1<<28)
-#define S3C_CLKCON_SCLK_MMC0_48                (1<<27)
-#define S3C_CLKCON_SCLK_MMC2           (1<<26)
-#define S3C_CLKCON_SCLK_MMC1           (1<<25)
-#define S3C_CLKCON_SCLK_MMC0           (1<<24)
-#define S3C_CLKCON_SCLK_SPI1_48        (1<<23)
-#define S3C_CLKCON_SCLK_SPI0_48        (1<<22)
-#define S3C_CLKCON_SCLK_SPI1           (1<<21)
-#define S3C_CLKCON_SCLK_SPI0           (1<<20)
-#define S3C_CLKCON_SCLK_DAC27          (1<<19)
-#define S3C_CLKCON_SCLK_TV27           (1<<18)
-#define S3C_CLKCON_SCLK_SCALER27       (1<<17)
-#define S3C_CLKCON_SCLK_SCALER         (1<<16)
-#define S3C_CLKCON_SCLK_LCD27          (1<<15)
-#define S3C_CLKCON_SCLK_LCD            (1<<14)
-#define S3C6400_CLKCON_SCLK_POST1_27   (1<<13)
-#define S3C6410_CLKCON_FIMC            (1<<13)
-#define S3C_CLKCON_SCLK_POST0_27       (1<<12)
-#define S3C6400_CLKCON_SCLK_POST1      (1<<11)
-#define S3C6410_CLKCON_SCLK_AUDIO2     (1<<11)
-#define S3C_CLKCON_SCLK_POST0          (1<<10)
-#define S3C_CLKCON_SCLK_AUDIO1         (1<<9)
-#define S3C_CLKCON_SCLK_AUDIO0         (1<<8)
-#define S3C_CLKCON_SCLK_SECUR          (1<<7)
-#define S3C_CLKCON_SCLK_IRDA           (1<<6)
-#define S3C_CLKCON_SCLK_UART           (1<<5)
-#define S3C_CLKCON_SCLK_ONENAND        (1<<4)
-#define S3C_CLKCON_SCLK_MFC            (1<<3)
-#define S3C_CLKCON_SCLK_CAM            (1<<2)
-#define S3C_CLKCON_SCLK_JPEG           (1<<1)
-
-/* CLKSRC */
-
-#define S3C6400_CLKSRC_APLL_MOUT       (1 << 0)
-#define S3C6400_CLKSRC_MPLL_MOUT       (1 << 1)
-#define S3C6400_CLKSRC_EPLL_MOUT       (1 << 2)
-#define S3C6400_CLKSRC_APLL_MOUT_SHIFT (0)
-#define S3C6400_CLKSRC_MPLL_MOUT_SHIFT (1)
-#define S3C6400_CLKSRC_EPLL_MOUT_SHIFT (2)
-#define S3C6400_CLKSRC_MFC             (1 << 4)
 
 /* MEM_SYS_CFG */
 #define MEM_SYS_CFG_INDEP_CF           0x4000
index c3da1b68d03e0b352490b0df0e5ee8f1741ad87f..1649c0d1c1b80ff6a40f83ceb84881e354a54b1f 100644 (file)
  * published by the Free Software Foundation.
  */
 
+/*
+ * NOTE: Code in this file is not used when booting with Device Tree support.
+ */
+
 #include <linux/kernel.h>
 #include <linux/syscore_ops.h>
 #include <linux/interrupt.h>
 #include <linux/serial_core.h>
 #include <linux/irq.h>
 #include <linux/io.h>
+#include <linux/of.h>
 
 #include <mach/map.h>
 
@@ -101,6 +106,10 @@ static struct syscore_ops s3c64xx_irq_syscore_ops = {
 
 static __init int s3c64xx_syscore_init(void)
 {
+       /* Appropriate drivers (pinctrl, uart) handle this when using DT. */
+       if (of_have_populated_dt())
+               return 0;
+
        register_syscore_ops(&s3c64xx_irq_syscore_ops);
 
        return 0;
index 35e3f54574eff6773f5c2eca10b69d0d1e02cccc..d266dd5f7060ec37d0266205bf129bdf86177a3e 100644 (file)
@@ -207,7 +207,7 @@ static struct platform_device *anw6410_devices[] __initdata = {
 static void __init anw6410_map_io(void)
 {
        s3c64xx_init_io(anw6410_iodesc, ARRAY_SIZE(anw6410_iodesc));
-       s3c24xx_init_clocks(12000000);
+       s3c64xx_set_xtal_freq(12000000);
        s3c24xx_init_uarts(anw6410_uartcfgs, ARRAY_SIZE(anw6410_uartcfgs));
        samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4);
 
index f27ca3b89f4c4ccca96c707d5bc179f946e63ef9..aca7d16e195dec0fda2989680cc58e73abb50315 100644 (file)
@@ -731,7 +731,7 @@ static struct s3c2410_platform_i2c i2c1_pdata = {
 static void __init crag6410_map_io(void)
 {
        s3c64xx_init_io(NULL, 0);
-       s3c24xx_init_clocks(12000000);
+       s3c64xx_set_xtal_freq(12000000);
        s3c24xx_init_uarts(crag6410_uartcfgs, ARRAY_SIZE(crag6410_uartcfgs));
        samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4);
 
index f39569e0f2e6c4045f95e333a255c72d87be4c98..e8064044ef796d35a12bfcc0e06c86dea065dca1 100644 (file)
@@ -247,7 +247,7 @@ static struct platform_device *hmt_devices[] __initdata = {
 static void __init hmt_map_io(void)
 {
        s3c64xx_init_io(hmt_iodesc, ARRAY_SIZE(hmt_iodesc));
-       s3c24xx_init_clocks(12000000);
+       s3c64xx_set_xtal_freq(12000000);
        s3c24xx_init_uarts(hmt_uartcfgs, ARRAY_SIZE(hmt_uartcfgs));
        samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4);
 }
index fc043e3ecdf8a869ea77e27af42dad5c24222356..58d46a3d7b78936f88318824d1a378fea2532fc1 100644 (file)
@@ -231,7 +231,7 @@ static void __init mini6410_map_io(void)
        u32 tmp;
 
        s3c64xx_init_io(NULL, 0);
-       s3c24xx_init_clocks(12000000);
+       s3c64xx_set_xtal_freq(12000000);
        s3c24xx_init_uarts(mini6410_uartcfgs, ARRAY_SIZE(mini6410_uartcfgs));
        samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4);
 
index 7e2c3908f1f87a2db546867d9ff8417e2051049e..2067b0bf55b43127eef766b52beb283a11db6431 100644 (file)
@@ -86,7 +86,7 @@ static struct map_desc ncp_iodesc[] __initdata = {};
 static void __init ncp_map_io(void)
 {
        s3c64xx_init_io(ncp_iodesc, ARRAY_SIZE(ncp_iodesc));
-       s3c24xx_init_clocks(12000000);
+       s3c64xx_set_xtal_freq(12000000);
        s3c24xx_init_uarts(ncp_uartcfgs, ARRAY_SIZE(ncp_uartcfgs));
        samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4);
 }
diff --git a/arch/arm/mach-s3c64xx/mach-s3c64xx-dt.c b/arch/arm/mach-s3c64xx/mach-s3c64xx-dt.c
new file mode 100644 (file)
index 0000000..7eb9a10
--- /dev/null
@@ -0,0 +1,85 @@
+/*
+ * Samsung's S3C64XX flattened device tree enabled machine
+ *
+ * Copyright (c) 2013 Tomasz Figa <tomasz.figa@gmail.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+*/
+
+#include <linux/clk-provider.h>
+#include <linux/irqchip.h>
+#include <linux/of_platform.h>
+
+#include <asm/mach/arch.h>
+#include <asm/mach/map.h>
+#include <asm/system_misc.h>
+
+#include <plat/cpu.h>
+#include <plat/watchdog-reset.h>
+
+#include <mach/map.h>
+
+#include "common.h"
+
+/*
+ * IO mapping for shared system controller IP.
+ *
+ * FIXME: Make remaining drivers use dynamic mapping.
+ */
+static struct map_desc s3c64xx_dt_iodesc[] __initdata = {
+       {
+               .virtual        = (unsigned long)S3C_VA_SYS,
+               .pfn            = __phys_to_pfn(S3C64XX_PA_SYSCON),
+               .length         = SZ_4K,
+               .type           = MT_DEVICE,
+       },
+};
+
+static void __init s3c64xx_dt_map_io(void)
+{
+       debug_ll_io_init();
+       iotable_init(s3c64xx_dt_iodesc, ARRAY_SIZE(s3c64xx_dt_iodesc));
+
+       s3c64xx_init_cpu();
+
+       if (!soc_is_s3c64xx())
+               panic("SoC is not S3C64xx!");
+}
+
+static void __init s3c64xx_dt_init_irq(void)
+{
+       of_clk_init(NULL);
+       samsung_wdt_reset_of_init();
+       irqchip_init();
+};
+
+static void __init s3c64xx_dt_init_machine(void)
+{
+       of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
+}
+
+static void s3c64xx_dt_restart(enum reboot_mode mode, const char *cmd)
+{
+       if (mode != REBOOT_SOFT)
+               samsung_wdt_reset();
+
+       /* if all else fails, or mode was for soft, jump to 0 */
+       soft_restart(0);
+}
+
+static char const *s3c64xx_dt_compat[] __initdata = {
+       "samsung,s3c6400",
+       "samsung,s3c6410",
+       NULL
+};
+
+DT_MACHINE_START(S3C6400_DT, "Samsung S3C64xx (Flattened Device Tree)")
+       /* Maintainer: Tomasz Figa <tomasz.figa@gmail.com> */
+       .dt_compat      = s3c64xx_dt_compat,
+       .map_io         = s3c64xx_dt_map_io,
+       .init_irq       = s3c64xx_dt_init_irq,
+       .init_machine   = s3c64xx_dt_init_machine,
+       .restart        = s3c64xx_dt_restart,
+MACHINE_END
index 86d980b448fd0bc272e1e0cf1ab616f0e32ab24e..0f47237be3b2dd2286fe0582791548d16df3a786 100644 (file)
@@ -337,13 +337,6 @@ err:
        return ret;
 }
 
-static int __init smartq_usb_otg_init(void)
-{
-       clk_xusbxti.rate = 12000000;
-
-       return 0;
-}
-
 static int __init smartq_wifi_init(void)
 {
        int ret;
@@ -377,7 +370,8 @@ static struct map_desc smartq_iodesc[] __initdata = {};
 void __init smartq_map_io(void)
 {
        s3c64xx_init_io(smartq_iodesc, ARRAY_SIZE(smartq_iodesc));
-       s3c24xx_init_clocks(12000000);
+       s3c64xx_set_xtal_freq(12000000);
+       s3c64xx_set_xusbxti_freq(12000000);
        s3c24xx_init_uarts(smartq_uartcfgs, ARRAY_SIZE(smartq_uartcfgs));
        samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4);
 
@@ -399,7 +393,6 @@ void __init smartq_machine_init(void)
        WARN_ON(smartq_lcd_setup_gpio());
        WARN_ON(smartq_power_off_init());
        WARN_ON(smartq_usb_host_init());
-       WARN_ON(smartq_usb_otg_init());
        WARN_ON(smartq_wifi_init());
 
        platform_add_devices(smartq_devices, ARRAY_SIZE(smartq_devices));
index d70c0843aea2d8bca384cc814d0270e778def128..27381cfcabbedbe2a669272d3786f56db08f11ba 100644 (file)
@@ -65,7 +65,7 @@ static struct map_desc smdk6400_iodesc[] = {};
 static void __init smdk6400_map_io(void)
 {
        s3c64xx_init_io(smdk6400_iodesc, ARRAY_SIZE(smdk6400_iodesc));
-       s3c24xx_init_clocks(12000000);
+       s3c64xx_set_xtal_freq(12000000);
        s3c24xx_init_uarts(smdk6400_uartcfgs, ARRAY_SIZE(smdk6400_uartcfgs));
        samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4);
 }
index d90b450c5645bb9f9c10944a65e3086623e25b3b..2a7b32ca5c96a3037c007eeb032092cf2127bfec 100644 (file)
@@ -634,7 +634,7 @@ static void __init smdk6410_map_io(void)
        u32 tmp;
 
        s3c64xx_init_io(smdk6410_iodesc, ARRAY_SIZE(smdk6410_iodesc));
-       s3c24xx_init_clocks(12000000);
+       s3c64xx_set_xtal_freq(12000000);
        s3c24xx_init_uarts(smdk6410_uartcfgs, ARRAY_SIZE(smdk6410_uartcfgs));
        samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4);
 
index 6a1f91fea678e471fdbf5a161ed2bdbd08a26108..8cdb824a3b432456c39353b64e658ac920e3e353 100644 (file)
@@ -194,29 +194,8 @@ void s3c_pm_debug_smdkled(u32 set, u32 clear)
 #endif
 
 static struct sleep_save core_save[] = {
-       SAVE_ITEM(S3C_APLL_LOCK),
-       SAVE_ITEM(S3C_MPLL_LOCK),
-       SAVE_ITEM(S3C_EPLL_LOCK),
-       SAVE_ITEM(S3C_CLK_SRC),
-       SAVE_ITEM(S3C_CLK_DIV0),
-       SAVE_ITEM(S3C_CLK_DIV1),
-       SAVE_ITEM(S3C_CLK_DIV2),
-       SAVE_ITEM(S3C_CLK_OUT),
-       SAVE_ITEM(S3C_HCLK_GATE),
-       SAVE_ITEM(S3C_PCLK_GATE),
-       SAVE_ITEM(S3C_SCLK_GATE),
-       SAVE_ITEM(S3C_MEM0_GATE),
-
-       SAVE_ITEM(S3C_EPLL_CON1),
-       SAVE_ITEM(S3C_EPLL_CON0),
-
        SAVE_ITEM(S3C64XX_MEM0DRVCON),
        SAVE_ITEM(S3C64XX_MEM1DRVCON),
-
-#ifndef CONFIG_CPU_FREQ
-       SAVE_ITEM(S3C_APLL_CON),
-       SAVE_ITEM(S3C_MPLL_CON),
-#endif
 };
 
 static struct sleep_save misc_save[] = {
index 4869714c6f1bb015e4b6af08705837169bad2466..3db0c98222f7686574be92d880f1ee25e5369e3f 100644 (file)
@@ -9,6 +9,10 @@
  * published by the Free Software Foundation.
 */
 
+/*
+ * NOTE: Code in this file is not used when booting with Device Tree support.
+ */
+
 #include <linux/kernel.h>
 #include <linux/types.h>
 #include <linux/interrupt.h>
@@ -20,6 +24,7 @@
 #include <linux/device.h>
 #include <linux/serial_core.h>
 #include <linux/platform_device.h>
+#include <linux/of.h>
 
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
@@ -58,12 +63,6 @@ void __init s3c6400_map_io(void)
        s3c64xx_onenand1_setname("s3c6400-onenand");
 }
 
-void __init s3c6400_init_clocks(int xtal)
-{
-       s3c64xx_register_clocks(xtal, S3C6400_CLKDIV0_ARM_MASK);
-       s3c64xx_setup_clocks();
-}
-
 void __init s3c6400_init_irq(void)
 {
        /* VIC0 does not have IRQS 5..7,
@@ -82,6 +81,10 @@ static struct device s3c6400_dev = {
 
 static int __init s3c6400_core_init(void)
 {
+       /* Not applicable when using DT. */
+       if (of_have_populated_dt())
+               return 0;
+
        return subsys_system_register(&s3c6400_subsys, NULL);
 }
 
index 31c29fdf1800404948a9e9e207454dcf337b7f7e..72b2278953a896a6dad6ad892e3a1438fd62d882 100644 (file)
  * published by the Free Software Foundation.
 */
 
+/*
+ * NOTE: Code in this file is not used when booting with Device Tree support.
+ */
+
 #include <linux/kernel.h>
 #include <linux/types.h>
 #include <linux/interrupt.h>
@@ -21,6 +25,7 @@
 #include <linux/device.h>
 #include <linux/serial_core.h>
 #include <linux/platform_device.h>
+#include <linux/of.h>
 
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
@@ -62,13 +67,6 @@ void __init s3c6410_map_io(void)
        s3c_cfcon_setname("s3c64xx-pata");
 }
 
-void __init s3c6410_init_clocks(int xtal)
-{
-       printk(KERN_DEBUG "%s: initialising clocks\n", __func__);
-       s3c64xx_register_clocks(xtal, S3C6410_CLKDIV0_ARM_MASK);
-       s3c64xx_setup_clocks();
-}
-
 void __init s3c6410_init_irq(void)
 {
        /* VIC0 is missing IRQ7, VIC1 is fully populated. */
@@ -86,6 +84,10 @@ static struct device s3c6410_dev = {
 
 static int __init s3c6410_core_init(void)
 {
+       /* Not applicable when using DT. */
+       if (of_have_populated_dt())
+               return 0;
+
        return subsys_system_register(&s3c6410_subsys, NULL);
 }
 
diff --git a/arch/arm/mach-shark/Makefile b/arch/arm/mach-shark/Makefile
deleted file mode 100644 (file)
index 2965718..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-#
-# Makefile for the linux kernel.
-#
-
-# Object file lists.
-
-obj-y                  := core.o dma.o irq.o pci.o leds.o
-obj-m                  :=
-obj-n                  :=
-obj-                   :=
diff --git a/arch/arm/mach-shark/Makefile.boot b/arch/arm/mach-shark/Makefile.boot
deleted file mode 100644 (file)
index e40e24e..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-   zreladdr-y  += 0x08008000
-
diff --git a/arch/arm/mach-shark/core.c b/arch/arm/mach-shark/core.c
deleted file mode 100644 (file)
index 1d32c5e..0000000
+++ /dev/null
@@ -1,146 +0,0 @@
-/*
- *  linux/arch/arm/mach-shark/arch.c
- *
- *  Architecture specific stuff.
- */
-#include <linux/kernel.h>
-#include <linux/init.h>
-#include <linux/interrupt.h>
-#include <linux/irq.h>
-#include <linux/sched.h>
-#include <linux/serial_8250.h>
-#include <linux/io.h>
-#include <linux/cpu.h>
-#include <linux/reboot.h>
-
-#include <asm/setup.h>
-#include <asm/mach-types.h>
-#include <asm/param.h>
-#include <asm/system_misc.h>
-
-#include <asm/mach/map.h>
-#include <asm/mach/arch.h>
-#include <asm/mach/time.h>
-
-#define ROMCARD_SIZE            0x08000000
-#define ROMCARD_START           0x10000000
-
-static void shark_restart(enum reboot_mode mode, const char *cmd)
-{
-        short temp;
-        /* Reset the Machine via pc[3] of the sequoia chipset */
-        outw(0x09,0x24);
-        temp=inw(0x26);
-        temp = temp | (1<<3) | (1<<10);
-        outw(0x09,0x24);
-        outw(temp,0x26);
-}
-
-static struct plat_serial8250_port serial_platform_data[] = {
-       {
-               .iobase         = 0x3f8,
-               .irq            = 4,
-               .uartclk        = 1843200,
-               .regshift       = 0,
-               .iotype         = UPIO_PORT,
-               .flags          = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST,
-       },
-       {
-               .iobase         = 0x2f8,
-               .irq            = 3,
-               .uartclk        = 1843200,
-               .regshift       = 0,
-               .iotype         = UPIO_PORT,
-               .flags          = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST,
-       },
-       { },
-};
-
-static struct platform_device serial_device = {
-       .name                   = "serial8250",
-       .id                     = PLAT8250_DEV_PLATFORM,
-       .dev                    = {
-               .platform_data  = serial_platform_data,
-       },
-};
-
-static struct resource rtc_resources[] = {
-       [0] = {
-               .start  = 0x70,
-               .end    = 0x73,
-               .flags  = IORESOURCE_IO,
-       },
-       [1] = {
-               .start  = IRQ_ISA_RTC_ALARM,
-               .end    = IRQ_ISA_RTC_ALARM,
-               .flags  = IORESOURCE_IRQ,
-       }
-};
-
-static struct platform_device rtc_device = {
-       .name           = "rtc_cmos",
-       .id             = -1,
-       .resource       = rtc_resources,
-       .num_resources  = ARRAY_SIZE(rtc_resources),
-};
-
-static int __init shark_init(void)
-{
-       int ret;
-
-       if (machine_is_shark())
-       {
-               ret = platform_device_register(&rtc_device);
-               if (ret) printk(KERN_ERR "Unable to register RTC device: %d\n", ret);
-               ret = platform_device_register(&serial_device);
-               if (ret) printk(KERN_ERR "Unable to register Serial device: %d\n", ret);
-       }
-       return 0;
-}
-
-arch_initcall(shark_init);
-
-extern void shark_init_irq(void);
-
-#define IRQ_TIMER 0
-#define HZ_TIME ((1193180 + HZ/2) / HZ)
-
-static irqreturn_t
-shark_timer_interrupt(int irq, void *dev_id)
-{
-       timer_tick();
-       return IRQ_HANDLED;
-}
-
-static struct irqaction shark_timer_irq = {
-       .name           = "Shark Timer Tick",
-       .flags          = IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL,
-       .handler        = shark_timer_interrupt,
-};
-
-/*
- * Set up timer interrupt, and return the current time in seconds.
- */
-static void __init shark_timer_init(void)
-{
-       outb(0x34, 0x43);               /* binary, mode 0, LSB/MSB, Ch 0 */
-       outb(HZ_TIME & 0xff, 0x40);     /* LSB of count */
-       outb(HZ_TIME >> 8, 0x40);
-
-       setup_irq(IRQ_TIMER, &shark_timer_irq);
-}
-
-static void shark_init_early(void)
-{
-       cpu_idle_poll_ctrl(true);
-}
-
-MACHINE_START(SHARK, "Shark")
-       /* Maintainer: Alexander Schulz */
-       .atag_offset    = 0x3000,
-       .init_early     = shark_init_early,
-       .init_irq       = shark_init_irq,
-       .init_time      = shark_timer_init,
-       .dma_zone_size  = SZ_4M,
-       .restart        = shark_restart,
-MACHINE_END
diff --git a/arch/arm/mach-shark/dma.c b/arch/arm/mach-shark/dma.c
deleted file mode 100644 (file)
index 10b5b8b..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- *  linux/arch/arm/mach-shark/dma.c
- *
- *  by Alexander Schulz
- *
- *  derived from:
- *  arch/arm/kernel/dma-ebsa285.c
- *  Copyright (C) 1998 Phil Blundell
- */
-
-#include <linux/init.h>
-
-#include <asm/dma.h>
-#include <asm/mach/dma.h>
-
-static int __init shark_dma_init(void)
-{
-#ifdef CONFIG_ISA_DMA
-       isa_init_dma();
-#endif
-       return 0;
-}
-core_initcall(shark_dma_init);
diff --git a/arch/arm/mach-shark/include/mach/debug-macro.S b/arch/arm/mach-shark/include/mach/debug-macro.S
deleted file mode 100644 (file)
index d129119..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-/* arch/arm/mach-shark/include/mach/debug-macro.S
- *
- * Debugging macro include header
- *
- *  Copyright (C) 1994-1999 Russell King
- *  Moved from linux/arch/arm/kernel/debug.S by Ben Dooks
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- *
-*/
-
-               .macro  addruart, rp, rv, tmp
-               mov     \rp, #0x3f8
-               orr     \rv, \rp, #0xfe000000
-               orr     \rv, \rv, #0x00e00000
-               orr     \rp, \rp, #0x40000000
-               .endm
-
-               .macro  senduart,rd,rx
-               strb    \rd, [\rx]
-               .endm
-
-               .macro waituart,rd,rx
-               .endm
-
-               .macro  busyuart,rd,rx
-               mov     \rd, #0
-1001:          add     \rd, \rd, #1
-               teq     \rd, #0x10000
-               bne     1001b
-               .endm
-
diff --git a/arch/arm/mach-shark/include/mach/entry-macro.S b/arch/arm/mach-shark/include/mach/entry-macro.S
deleted file mode 100644 (file)
index c9e49f0..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * arch/arm/mach-shark/include/mach/entry-macro.S
- *
- * Low-level IRQ helper macros for Shark platform
- *
- * This file is licensed under  the terms of the GNU General Public
- * License version 2. This program is licensed "as is" without any
- * warranty of any kind, whether express or implied.
- */
-               .macro  get_irqnr_preamble, base, tmp
-               mov     \base, #0xfe000000
-               orr     \base, \base, #0x00e00000
-               .endm
-
-               .macro  get_irqnr_and_base, irqnr, irqstat, base, tmp
-
-               mov     \irqstat, #0x0C
-               strb    \irqstat, [\base, #0x20]        @outb(0x0C, 0x20) /* Poll command */
-               ldrb    \irqnr, [\base, #0x20]          @irq = inb(0x20) & 7
-               and     \irqstat, \irqnr, #0x80
-               teq     \irqstat, #0
-               beq     43f
-               and     \irqnr, \irqnr, #7
-               teq     \irqnr, #2
-               bne     44f
-43:            mov     \irqstat, #0x0C
-               strb    \irqstat, [\base, #0xa0]        @outb(0x0C, 0xA0) /* Poll command */
-               ldrb    \irqnr, [\base, #0xa0]          @irq = (inb(0xA0) & 7) + 8
-               and     \irqstat, \irqnr, #0x80
-               teq     \irqstat, #0
-               beq     44f
-               and     \irqnr, \irqnr, #7
-               add     \irqnr, \irqnr, #8
-44:            teq     \irqstat, #0
-               .endm
-
diff --git a/arch/arm/mach-shark/include/mach/framebuffer.h b/arch/arm/mach-shark/include/mach/framebuffer.h
deleted file mode 100644 (file)
index 84a5bf6..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-/*
- * arch/arm/mach-shark/include/mach/framebuffer.h
- *
- * by Alexander Schulz
- *
- */
-
-#ifndef __ASM_ARCH_FRAMEBUFFER_H
-#define __ASM_ARCH_FRAMEBUFFER_H
-
-/* defines for the Framebuffer */
-#define FB_START               0x06000000
-#define FB_SIZE                        0x01000000
-
-#endif
-
diff --git a/arch/arm/mach-shark/include/mach/hardware.h b/arch/arm/mach-shark/include/mach/hardware.h
deleted file mode 100644 (file)
index 663f952..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-/*
- * arch/arm/mach-shark/include/mach/hardware.h
- *
- * by Alexander Schulz
- *
- * derived from:
- * arch/arm/mach-ebsa110/include/mach/hardware.h
- * Copyright (C) 1996-1999 Russell King.
- */
-#ifndef __ASM_ARCH_HARDWARE_H
-#define __ASM_ARCH_HARDWARE_H
-
-#define UNCACHEABLE_ADDR        0xdf010000
-
-#endif
-
diff --git a/arch/arm/mach-shark/include/mach/irqs.h b/arch/arm/mach-shark/include/mach/irqs.h
deleted file mode 100644 (file)
index c8e8a4e..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-/*
- * arch/arm/mach-shark/include/mach/irqs.h
- *
- * by Alexander Schulz
- */
-
-#define NR_IRQS                        16
-
-#define IRQ_ISA_KEYBOARD        1
-#define IRQ_ISA_RTC_ALARM       8
-#define I8042_KBD_IRQ           1
-#define I8042_AUX_IRQ          12
-#define IRQ_HARDDISK            14
diff --git a/arch/arm/mach-shark/include/mach/isa-dma.h b/arch/arm/mach-shark/include/mach/isa-dma.h
deleted file mode 100644 (file)
index 96c43b8..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-/*
- * arch/arm/mach-shark/include/mach/isa-dma.h
- *
- * by Alexander Schulz
- */
-#ifndef __ASM_ARCH_DMA_H
-#define __ASM_ARCH_DMA_H
-
-#define MAX_DMA_CHANNELS       8
-#define DMA_ISA_CASCADE         4
-
-#endif /* _ASM_ARCH_DMA_H */
-
diff --git a/arch/arm/mach-shark/include/mach/memory.h b/arch/arm/mach-shark/include/mach/memory.h
deleted file mode 100644 (file)
index 1cf8d69..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * arch/arm/mach-shark/include/mach/memory.h
- *
- * by Alexander Schulz
- *
- * derived from:
- * arch/arm/mach-ebsa110/include/mach/memory.h
- * Copyright (c) 1996-1999 Russell King.
- */
-#ifndef __ASM_ARCH_MEMORY_H
-#define __ASM_ARCH_MEMORY_H
-
-#include <asm/sizes.h>
-
-/*
- * Physical DRAM offset.
- */
-#define PLAT_PHYS_OFFSET     UL(0x08000000)
-
-/*
- * Cache flushing area
- */
-#define FLUSH_BASE_PHYS                0x80000000
-#define FLUSH_BASE             0xdf000000
-
-#endif
diff --git a/arch/arm/mach-shark/include/mach/timex.h b/arch/arm/mach-shark/include/mach/timex.h
deleted file mode 100644 (file)
index bb6eeae..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-/*
- * arch/arm/mach-shark/include/mach/timex.h
- *
- * by Alexander Schulz
- */
-
-#define CLOCK_TICK_RATE 1193180
diff --git a/arch/arm/mach-shark/include/mach/uncompress.h b/arch/arm/mach-shark/include/mach/uncompress.h
deleted file mode 100644 (file)
index a168435..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * arch/arm/mach-shark/include/mach/uncompress.h
- * by Alexander Schulz
- *
- * derived from:
- * arch/arm/mach-footbridge/include/mach/uncompress.h
- * Copyright (C) 1996,1997,1998 Russell King
- */
-
-#define SERIAL_BASE ((volatile unsigned char *)0x400003f8)
-
-static inline void putc(int c)
-{
-       volatile int t;
-
-       SERIAL_BASE[0] = c;
-       t=0x10000;
-       while (t--);
-}
-
-static inline void flush(void)
-{
-}
-
-#ifdef DEBUG
-static void putn(unsigned long z)
-{
-       int i;
-       char x;
-
-       putc('0');
-       putc('x');
-       for (i=0;i<8;i++) {
-               x='0'+((z>>((7-i)*4))&0xf);
-               if (x>'9') x=x-'0'+'A'-10;
-               putc(x);
-       }
-}
-
-static void putr()
-{
-       putc('\n');
-       putc('\r');
-}
-#endif
-
-/*
- * nothing to do
- */
-#define arch_decomp_setup()
diff --git a/arch/arm/mach-shark/irq.c b/arch/arm/mach-shark/irq.c
deleted file mode 100644 (file)
index 5dce13e..0000000
+++ /dev/null
@@ -1,108 +0,0 @@
-/*
- *  linux/arch/arm/mach-shark/irq.c
- *
- * by Alexander Schulz
- *
- * derived from linux/arch/ppc/kernel/i8259.c and:
- * arch/arm/mach-ebsa110/include/mach/irq.h
- * Copyright (C) 1996-1998 Russell King
- */
-
-#include <linux/init.h>
-#include <linux/fs.h>
-#include <linux/interrupt.h>
-#include <linux/io.h>
-
-#include <asm/irq.h>
-#include <asm/mach/irq.h>
-
-/*
- * 8259A PIC functions to handle ISA devices:
- */
-
-/*
- * This contains the irq mask for both 8259A irq controllers,
- * Let through the cascade-interrupt no. 2 (ff-(1<<2)==fb)
- */
-static unsigned char cached_irq_mask[2] = { 0xfb, 0xff };
-
-/*
- * These have to be protected by the irq controller spinlock
- * before being called.
- */
-static void shark_disable_8259A_irq(struct irq_data *d)
-{
-       unsigned int mask;
-       if (d->irq<8) {
-         mask = 1 << d->irq;
-         cached_irq_mask[0] |= mask;
-         outb(cached_irq_mask[1],0xA1);
-       } else {
-         mask = 1 << (d->irq-8);
-         cached_irq_mask[1] |= mask;
-         outb(cached_irq_mask[0],0x21);
-       }
-}
-
-static void shark_enable_8259A_irq(struct irq_data *d)
-{
-       unsigned int mask;
-       if (d->irq<8) {
-         mask = ~(1 << d->irq);
-         cached_irq_mask[0] &= mask;
-         outb(cached_irq_mask[0],0x21);
-       } else {
-         mask = ~(1 << (d->irq-8));
-         cached_irq_mask[1] &= mask;
-         outb(cached_irq_mask[1],0xA1);
-       }
-}
-
-static void shark_ack_8259A_irq(struct irq_data *d){}
-
-static irqreturn_t bogus_int(int irq, void *dev_id)
-{
-       printk("Got interrupt %i!\n",irq);
-       return IRQ_NONE;
-}
-
-static struct irqaction cascade;
-
-static struct irq_chip fb_chip = {
-       .name           = "XT-PIC",
-       .irq_ack        = shark_ack_8259A_irq,
-       .irq_mask       = shark_disable_8259A_irq,
-       .irq_unmask     = shark_enable_8259A_irq,
-};
-
-void __init shark_init_irq(void)
-{
-       int irq;
-
-       for (irq = 0; irq < NR_IRQS; irq++) {
-               irq_set_chip_and_handler(irq, &fb_chip, handle_edge_irq);
-               set_irq_flags(irq, IRQF_VALID | IRQF_PROBE);
-       }
-
-       /* init master interrupt controller */
-       outb(0x11, 0x20); /* Start init sequence, edge triggered (level: 0x19)*/
-       outb(0x00, 0x21); /* Vector base */
-       outb(0x04, 0x21); /* Cascade (slave) on IRQ2 */
-       outb(0x03, 0x21); /* Select 8086 mode , auto eoi*/
-       outb(0x0A, 0x20);
-       /* init slave interrupt controller */
-       outb(0x11, 0xA0); /* Start init sequence, edge triggered */
-       outb(0x08, 0xA1); /* Vector base */
-       outb(0x02, 0xA1); /* Cascade (slave) on IRQ2 */
-       outb(0x03, 0xA1); /* Select 8086 mode, auto eoi */
-       outb(0x0A, 0xA0);
-       outb(cached_irq_mask[1],0xA1);
-       outb(cached_irq_mask[0],0x21);
-       //request_region(0x20,0x2,"pic1");
-       //request_region(0xA0,0x2,"pic2");
-
-       cascade.handler = bogus_int;
-       cascade.name = "cascade";
-       setup_irq(2,&cascade);
-}
-
diff --git a/arch/arm/mach-shark/leds.c b/arch/arm/mach-shark/leds.c
deleted file mode 100644 (file)
index 081c778..0000000
+++ /dev/null
@@ -1,117 +0,0 @@
-/*
- * DIGITAL Shark LED control routines.
- *
- * Driver for the 3 user LEDs found on the Shark
- * Based on Versatile and RealView machine LED code
- *
- * License terms: GNU General Public License (GPL) version 2
- * Author: Bryan Wu <bryan.wu@canonical.com>
- */
-#include <linux/kernel.h>
-#include <linux/init.h>
-#include <linux/io.h>
-#include <linux/ioport.h>
-#include <linux/slab.h>
-#include <linux/leds.h>
-
-#include <asm/mach-types.h>
-
-#if defined(CONFIG_NEW_LEDS) && defined(CONFIG_LEDS_CLASS)
-struct shark_led {
-       struct led_classdev cdev;
-       u8 mask;
-};
-
-/*
- * The triggers lines up below will only be used if the
- * LED triggers are compiled in.
- */
-static const struct {
-       const char *name;
-       const char *trigger;
-} shark_leds[] = {
-       { "shark:amber0", "default-on", },      /* Bit 5 */
-       { "shark:green", "heartbeat", },        /* Bit 6 */
-       { "shark:amber1", "cpu0" },             /* Bit 7 */
-};
-
-static u16 led_reg_read(void)
-{
-       outw(0x09, 0x24);
-       return inw(0x26);
-}
-
-static void led_reg_write(u16 value)
-{
-       outw(0x09, 0x24);
-       outw(value, 0x26);
-}
-
-static void shark_led_set(struct led_classdev *cdev,
-                             enum led_brightness b)
-{
-       struct shark_led *led = container_of(cdev,
-                                                struct shark_led, cdev);
-       u16 reg = led_reg_read();
-
-       if (b != LED_OFF)
-               reg |= led->mask;
-       else
-               reg &= ~led->mask;
-
-       led_reg_write(reg);
-}
-
-static enum led_brightness shark_led_get(struct led_classdev *cdev)
-{
-       struct shark_led *led = container_of(cdev,
-                                                struct shark_led, cdev);
-       u16 reg = led_reg_read();
-
-       return (reg & led->mask) ? LED_FULL : LED_OFF;
-}
-
-static int __init shark_leds_init(void)
-{
-       int i;
-       u16 reg;
-
-       if (!machine_is_shark())
-               return -ENODEV;
-
-       for (i = 0; i < ARRAY_SIZE(shark_leds); i++) {
-               struct shark_led *led;
-
-               led = kzalloc(sizeof(*led), GFP_KERNEL);
-               if (!led)
-                       break;
-
-               led->cdev.name = shark_leds[i].name;
-               led->cdev.brightness_set = shark_led_set;
-               led->cdev.brightness_get = shark_led_get;
-               led->cdev.default_trigger = shark_leds[i].trigger;
-
-               /* Count in 5 bits offset */
-               led->mask = BIT(i + 5);
-
-               if (led_classdev_register(NULL, &led->cdev) < 0) {
-                       kfree(led);
-                       break;
-               }
-       }
-
-       /* Make LEDs independent of power-state */
-       request_region(0x24, 4, "led_reg");
-       reg = led_reg_read();
-       reg |= 1 << 10;
-       led_reg_write(reg);
-
-       return 0;
-}
-
-/*
- * Since we may have triggers on any subsystem, defer registration
- * until after subsystem_init.
- */
-fs_initcall(shark_leds_init);
-#endif
diff --git a/arch/arm/mach-shark/pci.c b/arch/arm/mach-shark/pci.c
deleted file mode 100644 (file)
index 6d91a91..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- *  linux/arch/arm/mach-shark/pci.c
- *
- *  PCI bios-type initialisation for PCI machines
- *
- *  Bits taken from various places.
- */
-#include <linux/kernel.h>
-#include <linux/pci.h>
-#include <linux/init.h>
-#include <linux/io.h>
-#include <video/vga.h>
-
-#include <asm/irq.h>
-#include <asm/mach/pci.h>
-#include <asm/mach-types.h>
-
-#define IO_START       0x40000000
-
-static int __init shark_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
-{
-       if (dev->bus->number == 0)
-               if (dev->devfn == 0)
-                       return 255;
-               else
-                       return 11;
-       else
-               return 255;
-}
-
-extern void __init via82c505_preinit(void);
-
-static struct hw_pci shark_pci __initdata = {
-       .setup          = via82c505_setup,
-       .map_irq        = shark_map_irq,
-       .nr_controllers = 1,
-       .ops            = &via82c505_ops,
-       .preinit        = via82c505_preinit,
-};
-
-static int __init shark_pci_init(void)
-{
-       if (!machine_is_shark())
-               return -ENODEV;
-
-       pcibios_min_io = 0x6000;
-       pcibios_min_mem = 0x50000000;
-       vga_base = 0xe8000000;
-
-       pci_ioremap_io(0, IO_START);
-
-       pci_common_init(&shark_pci);
-
-       return 0;
-}
-
-subsys_initcall(shark_pci_init);
index 1f94c310c4775f3a40e168e84845d4da6dbd40ab..a4a4b75109b218c53fc2cb8357f2465fb90b18d7 100644 (file)
@@ -22,16 +22,10 @@ config ARCH_EMEV2
 
 comment "SH-Mobile Board Type"
 
-config MACH_KZM9D_REFERENCE
-       bool "KZM9D board - Reference Device Tree Implementation"
+config MACH_KZM9D
+       bool "KZM9D board"
        depends on ARCH_EMEV2
        select REGULATOR_FIXED_VOLTAGE if REGULATOR
-       ---help---
-          Use reference implementation of KZM9D board support
-          which makes a greater use of device tree at the expense
-          of not supporting a number of devices.
-
-          This is intended to aid developers
 
 comment "SH-Mobile System Configuration"
 endif
@@ -101,12 +95,24 @@ config ARCH_R8A7790
        select SH_CLK_CPG
        select RENESAS_IRQC
 
+config ARCH_R8A7791
+       bool "R-Car M2 (R8A77910)"
+       select ARM_GIC
+       select CPU_V7
+       select SH_CLK_CPG
+
 config ARCH_EMEV2
        bool "Emma Mobile EV2"
        select ARCH_WANT_OPTIONAL_GPIOLIB
        select ARM_GIC
        select CPU_V7
 
+config ARCH_R7S72100
+       bool "RZ/A1H (R7S72100)"
+       select ARM_GIC
+       select CPU_V7
+       select SH_CLK_CPG
+
 comment "SH-Mobile Board Type"
 
 config MACH_APE6EVM
@@ -162,6 +168,8 @@ config MACH_BOCKW
        select RENESAS_INTC_IRQPIN
        select REGULATOR_FIXED_VOLTAGE if REGULATOR
        select USE_OF
+       select SND_SOC_AK4554 if SND_SIMPLE_CARD
+       select SND_SOC_AK4642 if SND_SIMPLE_CARD
 
 config MACH_BOCKW_REFERENCE
        bool "BOCK-W  - Reference Device Tree Implementation"
@@ -177,6 +185,11 @@ config MACH_BOCKW_REFERENCE
 
           This is intended to aid developers
 
+config MACH_GENMAI
+       bool "Genmai board"
+       depends on ARCH_R7S72100
+       select USE_OF
+
 config MACH_MARZEN
        bool "MARZEN board"
        depends on ARCH_R8A7779
@@ -213,23 +226,16 @@ config MACH_LAGER_REFERENCE
 
           This is intended to aid developers
 
-config MACH_KZM9D
-       bool "KZM9D board"
-       depends on ARCH_EMEV2
-       select REGULATOR_FIXED_VOLTAGE if REGULATOR
+config MACH_KOELSCH
+       bool "Koelsch board"
+       depends on ARCH_R8A7791
        select USE_OF
 
-config MACH_KZM9D_REFERENCE
-       bool "KZM9D board - Reference Device Tree Implementation"
+config MACH_KZM9D
+       bool "KZM9D board"
        depends on ARCH_EMEV2
        select REGULATOR_FIXED_VOLTAGE if REGULATOR
        select USE_OF
-       ---help---
-          Use reference implementation of KZM9D board support
-          which makes a greater use of device tree at the expense
-          of not supporting a number of devices.
-
-          This is intended to aid developers
 
 config MACH_KZM9G
        bool "KZM-A9-GT board"
index 2705bfa8c113161d0368e11e7f7158a294cb26a6..51db2bcafabf028f97cb4ffc5e32def8ef1aad77 100644 (file)
@@ -15,7 +15,10 @@ obj-$(CONFIG_ARCH_R8A7740)   += setup-r8a7740.o
 obj-$(CONFIG_ARCH_R8A7778)     += setup-r8a7778.o
 obj-$(CONFIG_ARCH_R8A7779)     += setup-r8a7779.o
 obj-$(CONFIG_ARCH_R8A7790)     += setup-r8a7790.o
+obj-$(CONFIG_ARCH_R8A7790)     += setup-r8a7790.o setup-rcar-gen2.o
+obj-$(CONFIG_ARCH_R8A7791)     += setup-r8a7791.o setup-rcar-gen2.o
 obj-$(CONFIG_ARCH_EMEV2)       += setup-emev2.o
+obj-$(CONFIG_ARCH_R7S72100)    += setup-r7s72100.o
 
 # Clock objects
 ifndef CONFIG_COMMON_CLK
@@ -27,13 +30,17 @@ obj-$(CONFIG_ARCH_R8A7740)  += clock-r8a7740.o
 obj-$(CONFIG_ARCH_R8A7778)     += clock-r8a7778.o
 obj-$(CONFIG_ARCH_R8A7779)     += clock-r8a7779.o
 obj-$(CONFIG_ARCH_R8A7790)     += clock-r8a7790.o
+obj-$(CONFIG_ARCH_R8A7791)     += clock-r8a7791.o
 obj-$(CONFIG_ARCH_EMEV2)       += clock-emev2.o
+obj-$(CONFIG_ARCH_R7S72100)    += clock-r7s72100.o
 endif
 
 # SMP objects
 smp-y                          := platsmp.o headsmp.o
 smp-$(CONFIG_ARCH_SH73A0)      += smp-sh73a0.o headsmp-scu.o platsmp-scu.o
 smp-$(CONFIG_ARCH_R8A7779)     += smp-r8a7779.o headsmp-scu.o platsmp-scu.o
+smp-$(CONFIG_ARCH_R8A7790)     += smp-r8a7790.o platsmp-apmu.o
+smp-$(CONFIG_ARCH_R8A7791)     += smp-r8a7791.o platsmp-apmu.o
 smp-$(CONFIG_ARCH_EMEV2)       += smp-emev2.o headsmp-scu.o platsmp-scu.o
 
 # IRQ objects
@@ -48,21 +55,26 @@ obj-$(CONFIG_ARCH_R8A7740)  += pm-r8a7740.o pm-rmobile.o
 obj-$(CONFIG_ARCH_R8A7779)     += pm-r8a7779.o
 
 # Board objects
+ifdef CONFIG_ARCH_SHMOBILE_MULTI
+obj-$(CONFIG_MACH_KZM9D)       += board-kzm9d-reference.o
+else
 obj-$(CONFIG_MACH_APE6EVM)     += board-ape6evm.o
 obj-$(CONFIG_MACH_APE6EVM_REFERENCE)   += board-ape6evm-reference.o
 obj-$(CONFIG_MACH_MACKEREL)    += board-mackerel.o
 obj-$(CONFIG_MACH_BOCKW)       += board-bockw.o
 obj-$(CONFIG_MACH_BOCKW_REFERENCE)     += board-bockw-reference.o
+obj-$(CONFIG_MACH_GENMAI)      += board-genmai.o
 obj-$(CONFIG_MACH_MARZEN)      += board-marzen.o
 obj-$(CONFIG_MACH_MARZEN_REFERENCE)    += board-marzen-reference.o
 obj-$(CONFIG_MACH_LAGER)       += board-lager.o
 obj-$(CONFIG_MACH_LAGER_REFERENCE)     += board-lager-reference.o
 obj-$(CONFIG_MACH_ARMADILLO800EVA)     += board-armadillo800eva.o
 obj-$(CONFIG_MACH_ARMADILLO800EVA_REFERENCE)   += board-armadillo800eva-reference.o
+obj-$(CONFIG_MACH_KOELSCH)     += board-koelsch.o
 obj-$(CONFIG_MACH_KZM9D)       += board-kzm9d.o
-obj-$(CONFIG_MACH_KZM9D_REFERENCE)     += board-kzm9d-reference.o
 obj-$(CONFIG_MACH_KZM9G)       += board-kzm9g.o
 obj-$(CONFIG_MACH_KZM9G_REFERENCE)     += board-kzm9g-reference.o
+endif
 
 # Framework support
 obj-$(CONFIG_SMP)              += $(smp-y)
index 6a504fe7d86c45cb1c9c43a746bfe5beecfca7bb..391d72a5536ceb473acee7eaf2f0312ef268b6ce 100644 (file)
@@ -6,8 +6,9 @@ loadaddr-$(CONFIG_MACH_ARMADILLO800EVA) += 0x40008000
 loadaddr-$(CONFIG_MACH_ARMADILLO800EVA_REFERENCE) += 0x40008000
 loadaddr-$(CONFIG_MACH_BOCKW) += 0x60008000
 loadaddr-$(CONFIG_MACH_BOCKW_REFERENCE) += 0x60008000
+loadaddr-$(CONFIG_MACH_GENMAI) += 0x8008000
+loadaddr-$(CONFIG_MACH_KOELSCH) += 0x40008000
 loadaddr-$(CONFIG_MACH_KZM9D) += 0x40008000
-loadaddr-$(CONFIG_MACH_KZM9D_REFERENCE) += 0x40008000
 loadaddr-$(CONFIG_MACH_KZM9G) += 0x41008000
 loadaddr-$(CONFIG_MACH_KZM9G_REFERENCE) += 0x41008000
 loadaddr-$(CONFIG_MACH_LAGER) += 0x40008000
index a23fa714f7ac5c12016916cbbad0ffc8b68dccab..3276afcf3cc92de2c0ab94548a7f9d6bac039e37 100644 (file)
@@ -57,7 +57,7 @@ static const char *ape6evm_boards_compat_dt[] __initdata = {
 };
 
 DT_MACHINE_START(APE6EVM_DT, "ape6evm")
-       .init_early     = r8a73a4_init_delay,
+       .init_early     = r8a73a4_init_early,
        .init_machine   = ape6evm_add_standard_devices,
        .dt_compat      = ape6evm_boards_compat_dt,
 MACHINE_END
index 24b87eea9da36d2f029a668a4bbacd7223c40683..0fa068e30a3001992952a41230cf9ca609793c72 100644 (file)
@@ -86,7 +86,7 @@ static struct gpio_keys_button gpio_buttons[] = {
        GPIO_KEY(KEY_VOLUMEDOWN,        329,    "S21"),
 };
 
-static struct __initdata gpio_keys_platform_data ape6evm_keys_pdata = {
+static struct gpio_keys_platform_data ape6evm_keys_pdata __initdata = {
        .buttons        = gpio_buttons,
        .nbuttons       = ARRAY_SIZE(gpio_buttons),
 };
@@ -113,22 +113,58 @@ static const struct smsc911x_platform_config lan9220_data __initconst = {
 };
 
 /*
- * On APE6EVM power is supplied to MMCIF by a tps80032 regulator. For now we
- * model a VDD supply to MMCIF, using a fixed 3.3V regulator. Also use the
- * static power supply for SDHI0 and SDHI1, whereas SDHI0's VccQ is also
- * supplied by the same tps80032 regulator and thus can also be adjusted
- * dynamically.
+ * MMC0 power supplies:
+ * Both Vcc and VccQ to eMMC on APE6EVM are supplied by a tps80032 voltage
+ * regulator. Until support for it is added to this file we simulate the
+ * Vcc supply by a fixed always-on regulator
  */
-static struct regulator_consumer_supply fixed3v3_power_consumers[] =
+static struct regulator_consumer_supply vcc_mmc0_consumers[] =
 {
        REGULATOR_SUPPLY("vmmc", "sh_mmcif.0"),
+};
+
+/*
+ * SDHI0 power supplies:
+ * Vcc to SDHI0 on APE6EVM is supplied by a GPIO-switchable regulator. VccQ is
+ * provided by the same tps80032 regulator as both MMC0 voltages - see comment
+ * above
+ */
+static struct regulator_consumer_supply vcc_sdhi0_consumers[] =
+{
        REGULATOR_SUPPLY("vmmc", "sh_mobile_sdhi.0"),
+};
+
+static struct regulator_init_data vcc_sdhi0_init_data = {
+       .constraints = {
+               .valid_ops_mask = REGULATOR_CHANGE_STATUS,
+       },
+       .num_consumer_supplies  = ARRAY_SIZE(vcc_sdhi0_consumers),
+       .consumer_supplies      = vcc_sdhi0_consumers,
+};
+
+static const struct fixed_voltage_config vcc_sdhi0_info __initconst = {
+       .supply_name = "SDHI0 Vcc",
+       .microvolts = 3300000,
+       .gpio = 76,
+       .enable_high = 1,
+       .init_data = &vcc_sdhi0_init_data,
+};
+
+/*
+ * SDHI1 power supplies:
+ * Vcc and VccQ to SDHI1 on APE6EVM are both fixed at 3.3V
+ */
+static struct regulator_consumer_supply vcc_sdhi1_consumers[] =
+{
        REGULATOR_SUPPLY("vmmc", "sh_mobile_sdhi.1"),
 };
 
 /* MMCIF */
 static const struct sh_mmcif_plat_data mmcif0_pdata __initconst = {
        .caps           = MMC_CAP_8_BIT_DATA | MMC_CAP_NONREMOVABLE,
+       .slave_id_tx    = SHDMA_SLAVE_MMCIF0_TX,
+       .slave_id_rx    = SHDMA_SLAVE_MMCIF0_RX,
+       .ccs_unsupported = true,
 };
 
 static const struct resource mmcif0_resources[] __initconst = {
@@ -215,14 +251,19 @@ static void __init ape6evm_add_standard_devices(void)
        platform_device_register_resndata(&platform_bus, "smsc911x", -1,
                                          lan9220_res, ARRAY_SIZE(lan9220_res),
                                          &lan9220_data, sizeof(lan9220_data));
-       regulator_register_always_on(1, "fixed-3.3V", fixed3v3_power_consumers,
-                                    ARRAY_SIZE(fixed3v3_power_consumers), 3300000);
+
+       regulator_register_always_on(1, "MMC0 Vcc", vcc_mmc0_consumers,
+                                    ARRAY_SIZE(vcc_mmc0_consumers), 2800000);
        platform_device_register_resndata(&platform_bus, "sh_mmcif", 0,
                                          mmcif0_resources, ARRAY_SIZE(mmcif0_resources),
                                          &mmcif0_pdata, sizeof(mmcif0_pdata));
+       platform_device_register_data(&platform_bus, "reg-fixed-voltage", 2,
+                                     &vcc_sdhi0_info, sizeof(vcc_sdhi0_info));
        platform_device_register_resndata(&platform_bus, "sh_mobile_sdhi", 0,
                                          sdhi0_resources, ARRAY_SIZE(sdhi0_resources),
                                          &sdhi0_pdata, sizeof(sdhi0_pdata));
+       regulator_register_always_on(3, "SDHI1 Vcc", vcc_sdhi1_consumers,
+                                    ARRAY_SIZE(vcc_sdhi1_consumers), 3300000);
        platform_device_register_resndata(&platform_bus, "sh_mobile_sdhi", 1,
                                          sdhi1_resources, ARRAY_SIZE(sdhi1_resources),
                                          &sdhi1_pdata, sizeof(sdhi1_pdata));
@@ -240,7 +281,7 @@ static const char *ape6evm_boards_compat_dt[] __initdata = {
 };
 
 DT_MACHINE_START(APE6EVM_DT, "ape6evm")
-       .init_early     = r8a73a4_init_delay,
+       .init_early     = r8a73a4_init_early,
        .init_machine   = ape6evm_add_standard_devices,
        .dt_compat      = ape6evm_boards_compat_dt,
 MACHINE_END
index 7f8f6076d3609e82382bb98f116df3bfc59049ed..8bc8e4c5884767f381c09da79ffcf2b52e2ffdc9 100644 (file)
@@ -823,6 +823,7 @@ static struct sh_mmcif_plat_data sh_mmcif_plat = {
        .caps           = MMC_CAP_4_BIT_DATA |
                          MMC_CAP_8_BIT_DATA |
                          MMC_CAP_NONREMOVABLE,
+       .ccs_unsupported = true,
        .slave_id_tx    = SHDMA_SLAVE_MMCIF_TX,
        .slave_id_rx    = SHDMA_SLAVE_MMCIF_RX,
 };
index 1a7c893e1a529d1cfd293575a1b75c62eebfb00c..ae88fdad4b3a9921ea02f9c1db001348753bb98a 100644 (file)
@@ -36,15 +36,35 @@ static const struct pinctrl_map bockw_pinctrl_map[] = {
                                  "scif0_ctrl", "scif0"),
 };
 
+#define FPGA   0x18200000
+#define IRQ0MR 0x30
+#define COMCTLR        0x101c
 static void __init bockw_init(void)
 {
+       static void __iomem *fpga;
+
        r8a7778_clock_init();
+       r8a7778_init_irq_extpin_dt(1);
 
        pinctrl_register_mappings(bockw_pinctrl_map,
                                  ARRAY_SIZE(bockw_pinctrl_map));
        r8a7778_pinmux_init();
        r8a7778_add_dt_devices();
 
+       fpga = ioremap_nocache(FPGA, SZ_1M);
+       if (fpga) {
+               /*
+                * CAUTION
+                *
+                * IRQ0/1 is cascaded interrupt from FPGA.
+                * it should be cared in the future
+                * Now, it is assuming IRQ0 was used only from SMSC.
+                */
+               u16 val = ioread16(fpga + IRQ0MR);
+               val &= ~(1 << 4); /* enable SMSC911x */
+               iowrite16(val, fpga + IRQ0MR);
+       }
+
        of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
 }
 
index 6b9faf3908f72b2f23bd3a1a3b07887c6581bc9b..6163fb1bde60fe14459af6c49bb480319ba7e6d2 100644 (file)
 #include <linux/smsc911x.h>
 #include <linux/spi/spi.h>
 #include <linux/spi/flash.h>
+#include <linux/usb/renesas_usbhs.h>
 #include <media/soc_camera.h>
 #include <mach/common.h>
 #include <mach/irqs.h>
 #include <mach/r8a7778.h>
 #include <asm/mach/arch.h>
+#include <sound/rcar_snd.h>
+#include <sound/simple_card.h>
+
+#define FPGA   0x18200000
+#define IRQ0MR 0x30
+#define COMCTLR        0x101c
+static void __iomem *fpga;
 
 /*
  *     CN9(Upper side) SCIF/RCAN selection
  * SW19        (MMC)   1 pin
  */
 
+/*
+ *     SSI settings
+ *
+ * SW45: 1-4 side      (SSI5 out, ROUT/LOUT CN19 Mid)
+ * SW46: 1101          (SSI6 Recorde)
+ * SW47: 1110          (SSI5 Playback)
+ * SW48: 11            (Recorde power)
+ * SW49: 1             (SSI slave mode)
+ * SW50: 1111          (SSI7, SSI8)
+ * SW51: 1111          (SSI3, SSI4)
+ * SW54: 1pin          (ak4554 FPGA control)
+ * SW55: 1             (CLKB is 24.5760MHz)
+ * SW60: 1pin          (ak4554 FPGA control)
+ * SW61: 3pin          (use X11 clock)
+ * SW78: 3-6           (ak4642 connects I2C0)
+ *
+ * You can use sound as
+ *
+ * hw0: CN19: SSI56-AK4643
+ * hw1: CN21: SSI3-AK4554(playback)
+ * hw2: CN21: SSI4-AK4554(capture)
+ * hw3: CN20: SSI7-AK4554(playback)
+ * hw4: CN20: SSI8-AK4554(capture)
+ *
+ * this command is required when playback on hw0.
+ *
+ * # amixer set "LINEOUT Mixer DACL" on
+ */
+
+/*
+ * USB
+ *
+ * USB1 (CN29) can be Host/Function
+ *
+ *             Host    Func
+ * SW98                1       2
+ * SW99                1       3
+ */
+
 /* Dummy supplies, where voltage doesn't matter */
 static struct regulator_consumer_supply dummy_supplies[] = {
        REGULATOR_SUPPLY("vddvario", "smsc911x"),
@@ -81,16 +128,76 @@ static struct resource smsc911x_resources[] __initdata = {
        DEFINE_RES_IRQ(irq_pin(0)), /* IRQ 0 */
 };
 
+#if IS_ENABLED(CONFIG_USB_RENESAS_USBHS_UDC)
+/*
+ * When USB1 is Func
+ */
+static int usbhsf_get_id(struct platform_device *pdev)
+{
+       return USBHS_GADGET;
+}
+
+#define SUSPMODE       0x102
+static int usbhsf_power_ctrl(struct platform_device *pdev,
+                            void __iomem *base, int enable)
+{
+       enable = !!enable;
+
+       r8a7778_usb_phy_power(enable);
+
+       iowrite16(enable << 14, base + SUSPMODE);
+
+       return 0;
+}
+
+static struct resource usbhsf_resources[] __initdata = {
+       DEFINE_RES_MEM(0xffe60000, 0x110),
+       DEFINE_RES_IRQ(gic_iid(0x4f)),
+};
+
+static struct renesas_usbhs_platform_info usbhs_info __initdata = {
+       .platform_callback = {
+               .get_id         = usbhsf_get_id,
+               .power_ctrl     = usbhsf_power_ctrl,
+       },
+       .driver_param = {
+               .buswait_bwait  = 4,
+       },
+};
+
+#define USB_PHY_SETTING {.port1_func = 1, .ovc_pin[1].active_high = 1,}
+#define USB1_DEVICE    "renesas_usbhs"
+#define ADD_USB_FUNC_DEVICE_IF_POSSIBLE()                      \
+       platform_device_register_resndata(                      \
+               &platform_bus, "renesas_usbhs", -1,             \
+               usbhsf_resources,                               \
+               ARRAY_SIZE(usbhsf_resources),                   \
+               &usbhs_info, sizeof(struct renesas_usbhs_platform_info))
+
+#else
+/*
+ * When USB1 is Host
+ */
+#define USB_PHY_SETTING { }
+#define USB1_DEVICE    "ehci-platform"
+#define ADD_USB_FUNC_DEVICE_IF_POSSIBLE()
+
+#endif
+
 /* USB */
 static struct resource usb_phy_resources[] __initdata = {
        DEFINE_RES_MEM(0xffe70800, 0x100),
        DEFINE_RES_MEM(0xffe76000, 0x100),
 };
 
-static struct rcar_phy_platform_data usb_phy_platform_data __initdata;
+static struct rcar_phy_platform_data usb_phy_platform_data __initdata =
+       USB_PHY_SETTING;
+
 
 /* SDHI */
 static struct sh_mobile_sdhi_info sdhi0_info __initdata = {
+       .dma_slave_tx   = HPBDMA_SLAVE_SDHI0_TX,
+       .dma_slave_rx   = HPBDMA_SLAVE_SDHI0_RX,
        .tmio_caps      = MMC_CAP_SD_HIGHSPEED,
        .tmio_ocr_mask  = MMC_VDD_165_195 | MMC_VDD_32_33 | MMC_VDD_33_34,
        .tmio_flags     = TMIO_MMC_HAS_IDLE_WAIT,
@@ -101,6 +208,12 @@ static struct resource sdhi0_resources[] __initdata = {
        DEFINE_RES_IRQ(gic_iid(0x77)),
 };
 
+/* Ether */
+static struct resource ether_resources[] __initdata = {
+       DEFINE_RES_MEM(0xfde00000, 0x400),
+       DEFINE_RES_IRQ(gic_iid(0x89)),
+};
+
 static struct sh_eth_plat_data ether_platform_data __initdata = {
        .phy            = 0x01,
        .edmac_endian   = EDMAC_LITTLE_ENDIAN,
@@ -118,7 +231,9 @@ static struct sh_eth_plat_data ether_platform_data __initdata = {
 static struct i2c_board_info i2c0_devices[] = {
        {
                I2C_BOARD_INFO("rx8581", 0x51),
-       },
+       }, {
+               I2C_BOARD_INFO("ak4643", 0x12),
+       }
 };
 
 /* HSPI*/
@@ -162,10 +277,6 @@ static struct sh_mmcif_plat_data sh_mmcif_plat __initdata = {
                          MMC_CAP_NEEDS_POLL,
 };
 
-static struct rcar_vin_platform_data vin_platform_data __initdata = {
-       .flags  = RCAR_VIN_BT656,
-};
-
 /* In the default configuration both decoders reside on I2C bus 0 */
 #define BOCKW_CAMERA(idx)                                              \
 static struct i2c_board_info camera##idx##_info = {                    \
@@ -181,7 +292,237 @@ static struct soc_camera_link iclink##idx##_ml86v7667 __initdata = {      \
 BOCKW_CAMERA(0);
 BOCKW_CAMERA(1);
 
+/* Sound */
+static struct resource rsnd_resources[] __initdata = {
+       [RSND_GEN1_SRU] = DEFINE_RES_MEM(0xffd90000, 0x1000),
+       [RSND_GEN1_SSI] = DEFINE_RES_MEM(0xffd91000, 0x1240),
+       [RSND_GEN1_ADG] = DEFINE_RES_MEM(0xfffe0000, 0x24),
+};
+
+static struct rsnd_ssi_platform_info rsnd_ssi[] = {
+       RSND_SSI_UNUSED, /* SSI 0 */
+       RSND_SSI_UNUSED, /* SSI 1 */
+       RSND_SSI_UNUSED, /* SSI 2 */
+       RSND_SSI_SET(1, 0, gic_iid(0x85), RSND_SSI_PLAY),
+       RSND_SSI_SET(2, 0, gic_iid(0x85), RSND_SSI_CLK_PIN_SHARE | RSND_SSI_CLK_FROM_ADG),
+       RSND_SSI_SET(0, 0, gic_iid(0x86), RSND_SSI_PLAY),
+       RSND_SSI_SET(0, 0, gic_iid(0x86), 0),
+       RSND_SSI_SET(3, 0, gic_iid(0x86), RSND_SSI_PLAY),
+       RSND_SSI_SET(4, 0, gic_iid(0x86), RSND_SSI_CLK_PIN_SHARE | RSND_SSI_CLK_FROM_ADG),
+};
+
+static struct rsnd_scu_platform_info rsnd_scu[9] = {
+       /* no member at this point */
+};
+
+enum {
+       AK4554_34 = 0,
+       AK4643_56,
+       AK4554_78,
+       SOUND_MAX,
+};
+
+static int rsnd_codec_power(int id, int enable)
+{
+       static int sound_user[SOUND_MAX] = {0, 0, 0};
+       int *usr = NULL;
+       u32 bit;
+
+       switch (id) {
+       case 3:
+       case 4:
+               usr = sound_user + AK4554_34;
+               bit = (1 << 10);
+               break;
+       case 5:
+       case 6:
+               usr = sound_user + AK4643_56;
+               bit = (1 << 6);
+               break;
+       case 7:
+       case 8:
+               usr = sound_user + AK4554_78;
+               bit = (1 << 7);
+               break;
+       }
+
+       if (!usr)
+               return -EIO;
+
+       if (enable) {
+               if (*usr == 0) {
+                       u32 val = ioread16(fpga + COMCTLR);
+                       val &= ~bit;
+                       iowrite16(val, fpga + COMCTLR);
+               }
+
+               (*usr)++;
+       } else {
+               if (*usr == 0)
+                       return 0;
+
+               (*usr)--;
+
+               if (*usr == 0) {
+                       u32 val = ioread16(fpga + COMCTLR);
+                       val |= bit;
+                       iowrite16(val, fpga + COMCTLR);
+               }
+       }
+
+       return 0;
+}
+
+static int rsnd_start(int id)
+{
+       return rsnd_codec_power(id, 1);
+}
+
+static int rsnd_stop(int id)
+{
+       return rsnd_codec_power(id, 0);
+}
+
+static struct rcar_snd_info rsnd_info = {
+       .flags          = RSND_GEN1,
+       .ssi_info       = rsnd_ssi,
+       .ssi_info_nr    = ARRAY_SIZE(rsnd_ssi),
+       .scu_info       = rsnd_scu,
+       .scu_info_nr    = ARRAY_SIZE(rsnd_scu),
+       .start          = rsnd_start,
+       .stop           = rsnd_stop,
+};
+
+static struct asoc_simple_card_info rsnd_card_info[] = {
+       /* SSI5, SSI6 */
+       {
+               .name           = "AK4643",
+               .card           = "SSI56-AK4643",
+               .codec          = "ak4642-codec.0-0012",
+               .platform       = "rcar_sound",
+               .daifmt         = SND_SOC_DAIFMT_LEFT_J,
+               .cpu_dai = {
+                       .name   = "rsnd-dai.0",
+                       .fmt    = SND_SOC_DAIFMT_CBS_CFS,
+               },
+               .codec_dai = {
+                       .name   = "ak4642-hifi",
+                       .fmt    = SND_SOC_DAIFMT_CBM_CFM,
+                       .sysclk = 11289600,
+               },
+       },
+       /* SSI3 */
+       {
+               .name           = "AK4554",
+               .card           = "SSI3-AK4554(playback)",
+               .codec          = "ak4554-adc-dac.0",
+               .platform       = "rcar_sound",
+               .cpu_dai = {
+                       .name   = "rsnd-dai.1",
+                       .fmt    = SND_SOC_DAIFMT_CBM_CFM |
+                                 SND_SOC_DAIFMT_RIGHT_J,
+               },
+               .codec_dai = {
+                       .name   = "ak4554-hifi",
+               },
+       },
+       /* SSI4 */
+       {
+               .name           = "AK4554",
+               .card           = "SSI4-AK4554(capture)",
+               .codec          = "ak4554-adc-dac.0",
+               .platform       = "rcar_sound",
+               .cpu_dai = {
+                       .name   = "rsnd-dai.2",
+                       .fmt    = SND_SOC_DAIFMT_CBM_CFM |
+                                 SND_SOC_DAIFMT_LEFT_J,
+               },
+               .codec_dai = {
+                       .name   = "ak4554-hifi",
+               },
+       },
+       /* SSI7 */
+       {
+               .name           = "AK4554",
+               .card           = "SSI7-AK4554(playback)",
+               .codec          = "ak4554-adc-dac.1",
+               .platform       = "rcar_sound",
+               .cpu_dai = {
+                       .name   = "rsnd-dai.3",
+                       .fmt    = SND_SOC_DAIFMT_CBM_CFM |
+                                 SND_SOC_DAIFMT_RIGHT_J,
+               },
+               .codec_dai = {
+                       .name   = "ak4554-hifi",
+               },
+       },
+       /* SSI8 */
+       {
+               .name           = "AK4554",
+               .card           = "SSI8-AK4554(capture)",
+               .codec          = "ak4554-adc-dac.1",
+               .platform       = "rcar_sound",
+               .cpu_dai = {
+                       .name   = "rsnd-dai.4",
+                       .fmt    = SND_SOC_DAIFMT_CBM_CFM |
+                                 SND_SOC_DAIFMT_LEFT_J,
+               },
+               .codec_dai = {
+                       .name   = "ak4554-hifi",
+               },
+       }
+};
+
+/* VIN */
+static struct rcar_vin_platform_data vin_platform_data __initdata = {
+       .flags  = RCAR_VIN_BT656,
+};
+
+#define R8A7778_VIN(idx)                                               \
+static struct resource vin##idx##_resources[] __initdata = {           \
+       DEFINE_RES_MEM(0xffc50000 + 0x1000 * (idx), 0x1000),            \
+       DEFINE_RES_IRQ(gic_iid(0x5a)),                                  \
+};                                                                     \
+                                                                       \
+static struct platform_device_info vin##idx##_info __initdata = {      \
+       .parent         = &platform_bus,                                \
+       .name           = "r8a7778-vin",                                \
+       .id             = idx,                                          \
+       .res            = vin##idx##_resources,                         \
+       .num_res        = ARRAY_SIZE(vin##idx##_resources),             \
+       .dma_mask       = DMA_BIT_MASK(32),                             \
+       .data           = &vin_platform_data,                           \
+       .size_data      = sizeof(vin_platform_data),                    \
+}
+R8A7778_VIN(0);
+R8A7778_VIN(1);
+
 static const struct pinctrl_map bockw_pinctrl_map[] = {
+       /* AUDIO */
+       PIN_MAP_MUX_GROUP_DEFAULT("rcar_sound", "pfc-r8a7778",
+                                 "audio_clk_a", "audio_clk"),
+       PIN_MAP_MUX_GROUP_DEFAULT("rcar_sound", "pfc-r8a7778",
+                                 "audio_clk_b", "audio_clk"),
+       PIN_MAP_MUX_GROUP_DEFAULT("rcar_sound", "pfc-r8a7778",
+                                 "ssi34_ctrl", "ssi"),
+       PIN_MAP_MUX_GROUP_DEFAULT("rcar_sound", "pfc-r8a7778",
+                                 "ssi3_data", "ssi"),
+       PIN_MAP_MUX_GROUP_DEFAULT("rcar_sound", "pfc-r8a7778",
+                                 "ssi4_data", "ssi"),
+       PIN_MAP_MUX_GROUP_DEFAULT("rcar_sound", "pfc-r8a7778",
+                                 "ssi5_ctrl", "ssi"),
+       PIN_MAP_MUX_GROUP_DEFAULT("rcar_sound", "pfc-r8a7778",
+                                 "ssi5_data", "ssi"),
+       PIN_MAP_MUX_GROUP_DEFAULT("rcar_sound", "pfc-r8a7778",
+                                 "ssi6_ctrl", "ssi"),
+       PIN_MAP_MUX_GROUP_DEFAULT("rcar_sound", "pfc-r8a7778",
+                                 "ssi6_data", "ssi"),
+       PIN_MAP_MUX_GROUP_DEFAULT("rcar_sound", "pfc-r8a7778",
+                                 "ssi78_ctrl", "ssi"),
+       PIN_MAP_MUX_GROUP_DEFAULT("rcar_sound", "pfc-r8a7778",
+                                 "ssi7_data", "ssi"),
+       PIN_MAP_MUX_GROUP_DEFAULT("rcar_sound", "pfc-r8a7778",
+                                 "ssi8_data", "ssi"),
        /* Ether */
        PIN_MAP_MUX_GROUP_DEFAULT("r8a777x-ether", "pfc-r8a7778",
                                  "ether_rmii", "ether"),
@@ -201,7 +542,7 @@ static const struct pinctrl_map bockw_pinctrl_map[] = {
        /* USB */
        PIN_MAP_MUX_GROUP_DEFAULT("ehci-platform", "pfc-r8a7778",
                                  "usb0", "usb0"),
-       PIN_MAP_MUX_GROUP_DEFAULT("ehci-platform", "pfc-r8a7778",
+       PIN_MAP_MUX_GROUP_DEFAULT(USB1_DEVICE, "pfc-r8a7778",
                                  "usb1", "usb1"),
        /* SDHI0 */
        PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.0", "pfc-r8a7778",
@@ -224,22 +565,28 @@ static const struct pinctrl_map bockw_pinctrl_map[] = {
                                  "vin1_data8", "vin1"),
 };
 
-#define FPGA   0x18200000
-#define IRQ0MR 0x30
 #define PFC    0xfffc0000
 #define PUPR4  0x110
 static void __init bockw_init(void)
 {
        void __iomem *base;
+       struct clk *clk;
+       int i;
 
        r8a7778_clock_init();
        r8a7778_init_irq_extpin(1);
        r8a7778_add_standard_devices();
-       r8a7778_add_ether_device(&ether_platform_data);
-       r8a7778_add_vin_device(0, &vin_platform_data);
+
+       platform_device_register_resndata(&platform_bus, "r8a777x-ether", -1,
+                                         ether_resources,
+                                         ARRAY_SIZE(ether_resources),
+                                         &ether_platform_data,
+                                         sizeof(ether_platform_data));
+
+       platform_device_register_full(&vin0_info);
        /* VIN1 has a pin conflict with Ether */
        if (!IS_ENABLED(CONFIG_SH_ETH))
-               r8a7778_add_vin_device(1, &vin_platform_data);
+               platform_device_register_full(&vin1_info);
        platform_device_register_data(&platform_bus, "soc-camera-pdrv", 0,
                                      &iclink0_ml86v7667,
                                      sizeof(iclink0_ml86v7667));
@@ -269,8 +616,8 @@ static void __init bockw_init(void)
 
 
        /* for SMSC */
-       base = ioremap_nocache(FPGA, SZ_1M);
-       if (base) {
+       fpga = ioremap_nocache(FPGA, SZ_1M);
+       if (fpga) {
                /*
                 * CAUTION
                 *
@@ -278,10 +625,9 @@ static void __init bockw_init(void)
                 * it should be cared in the future
                 * Now, it is assuming IRQ0 was used only from SMSC.
                 */
-               u16 val = ioread16(base + IRQ0MR);
+               u16 val = ioread16(fpga + IRQ0MR);
                val &= ~(1 << 4); /* enable SMSC911x */
-               iowrite16(val, base + IRQ0MR);
-               iounmap(base);
+               iowrite16(val, fpga + IRQ0MR);
 
                regulator_register_fixed(0, dummy_supplies,
                                         ARRAY_SIZE(dummy_supplies));
@@ -308,6 +654,42 @@ static void __init bockw_init(void)
                        sdhi0_resources, ARRAY_SIZE(sdhi0_resources),
                        &sdhi0_info, sizeof(struct sh_mobile_sdhi_info));
        }
+
+       /* for Audio */
+       clk = clk_get(NULL, "audio_clk_b");
+       clk_set_rate(clk, 24576000);
+       clk_put(clk);
+       rsnd_codec_power(5, 1); /* enable ak4642 */
+
+       platform_device_register_simple(
+               "ak4554-adc-dac", 0, NULL, 0);
+
+       platform_device_register_simple(
+               "ak4554-adc-dac", 1, NULL, 0);
+
+       platform_device_register_resndata(
+               &platform_bus, "rcar_sound", -1,
+               rsnd_resources, ARRAY_SIZE(rsnd_resources),
+               &rsnd_info, sizeof(rsnd_info));
+
+       for (i = 0; i < ARRAY_SIZE(rsnd_card_info); i++) {
+               struct platform_device_info cardinfo = {
+                       .parent         = &platform_bus,
+                       .name           = "asoc-simple-card",
+                       .id             = i,
+                       .data           = &rsnd_card_info[i],
+                       .size_data      = sizeof(struct asoc_simple_card_info),
+                       .dma_mask       = ~0,
+               };
+
+               platform_device_register_full(&cardinfo);
+       }
+}
+
+static void __init bockw_init_late(void)
+{
+       r8a7778_init_late();
+       ADD_USB_FUNC_DEVICE_IF_POSSIBLE();
 }
 
 static const char *bockw_boards_compat_dt[] __initdata = {
@@ -320,5 +702,5 @@ DT_MACHINE_START(BOCKW_DT, "bockw")
        .init_irq       = r8a7778_init_irq_dt,
        .init_machine   = bockw_init,
        .dt_compat      = bockw_boards_compat_dt,
-       .init_late      = r8a7778_init_late,
+       .init_late      = bockw_init_late,
 MACHINE_END
diff --git a/arch/arm/mach-shmobile/board-genmai.c b/arch/arm/mach-shmobile/board-genmai.c
new file mode 100644 (file)
index 0000000..3e92e3c
--- /dev/null
@@ -0,0 +1,43 @@
+/*
+ * Genmai board support
+ *
+ * Copyright (C) 2013  Renesas Solutions Corp.
+ * Copyright (C) 2013  Magnus Damm
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ */
+
+#include <linux/kernel.h>
+#include <linux/platform_device.h>
+#include <mach/common.h>
+#include <mach/r7s72100.h>
+#include <asm/mach-types.h>
+#include <asm/mach/arch.h>
+
+static void __init genmai_add_standard_devices(void)
+{
+       r7s72100_clock_init();
+       r7s72100_add_dt_devices();
+}
+
+static const char * const genmai_boards_compat_dt[] __initconst = {
+       "renesas,genmai",
+       NULL,
+};
+
+DT_MACHINE_START(GENMAI_DT, "genmai")
+       .init_early     = r7s72100_init_early,
+       .init_machine   = genmai_add_standard_devices,
+       .dt_compat      = genmai_boards_compat_dt,
+MACHINE_END
diff --git a/arch/arm/mach-shmobile/board-koelsch.c b/arch/arm/mach-shmobile/board-koelsch.c
new file mode 100644 (file)
index 0000000..ace1711
--- /dev/null
@@ -0,0 +1,47 @@
+/*
+ * Koelsch board support
+ *
+ * Copyright (C) 2013  Renesas Electronics Corporation
+ * Copyright (C) 2013  Renesas Solutions Corp.
+ * Copyright (C) 2013  Magnus Damm
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ */
+
+#include <linux/kernel.h>
+#include <linux/platform_device.h>
+#include <mach/common.h>
+#include <mach/r8a7791.h>
+#include <mach/rcar-gen2.h>
+#include <asm/mach-types.h>
+#include <asm/mach/arch.h>
+
+static void __init koelsch_add_standard_devices(void)
+{
+       r8a7791_clock_init();
+       r8a7791_add_standard_devices();
+}
+
+static const char * const koelsch_boards_compat_dt[] __initconst = {
+       "renesas,koelsch",
+       NULL,
+};
+
+DT_MACHINE_START(KOELSCH_DT, "koelsch")
+       .smp            = smp_ops(r8a7791_smp_ops),
+       .init_early     = r8a7791_init_early,
+       .init_machine   = koelsch_add_standard_devices,
+       .init_time      = rcar_gen2_timer_init,
+       .dt_compat      = koelsch_boards_compat_dt,
+MACHINE_END
index 8f8bb2fab07697413486d9ac07b4004b528a05bf..054d8d5c8fc1a5b743962e0c0ee6be920e9f981d 100644 (file)
@@ -33,6 +33,7 @@ static void __init kzm9d_add_standard_devices(void)
 }
 
 static const char *kzm9d_boards_compat_dt[] __initdata = {
+       "renesas,kzm9d",
        "renesas,kzm9d-reference",
        NULL,
 };
index f1994968d303eac3bf022501c2d8007343b261e0..fe689b7fdc9e715ecd724edcc746913010627fb4 100644 (file)
@@ -366,6 +366,7 @@ static struct resource sh_mmcif_resources[] = {
 static struct sh_mmcif_plat_data sh_mmcif_platdata = {
        .ocr            = MMC_VDD_165_195,
        .caps           = MMC_CAP_8_BIT_DATA | MMC_CAP_NONREMOVABLE,
+       .ccs_unsupported = true,
        .slave_id_tx    = SHDMA_SLAVE_MMCIF_TX,
        .slave_id_rx    = SHDMA_SLAVE_MMCIF_RX,
 };
index 9c316a1b2e32a32b2e48e579e3af78da97f3a729..1a1a4a888632afb67fa47a532d3c251d3818fd65 100644 (file)
@@ -38,8 +38,9 @@ static const char *lager_boards_compat_dt[] __initdata = {
 };
 
 DT_MACHINE_START(LAGER_DT, "lager")
-       .init_early     = r8a7790_init_delay,
+       .smp            = smp_ops(r8a7790_smp_ops),
+       .init_early     = r8a7790_init_early,
+       .init_time      = rcar_gen2_timer_init,
        .init_machine   = lager_add_standard_devices,
-       .init_time      = r8a7790_timer_init,
        .dt_compat      = lager_boards_compat_dt,
 MACHINE_END
index 5930af8d434fb90c4a79fd8b0f8c225be9b93b58..a8d3ce646fb900514fa983964bf8d70d0e88c278 100644 (file)
@@ -28,6 +28,7 @@
 #include <linux/mmc/sh_mmcif.h>
 #include <linux/pinctrl/machine.h>
 #include <linux/platform_data/gpio-rcar.h>
+#include <linux/platform_data/rcar-du.h>
 #include <linux/platform_device.h>
 #include <linux/phy.h>
 #include <linux/regulator/fixed.h>
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
 
+/* DU */
+static struct rcar_du_encoder_data lager_du_encoders[] = {
+       {
+               .type = RCAR_DU_ENCODER_VGA,
+               .output = RCAR_DU_OUTPUT_DPAD0,
+       }, {
+               .type = RCAR_DU_ENCODER_NONE,
+               .output = RCAR_DU_OUTPUT_LVDS1,
+               .connector.lvds.panel = {
+                       .width_mm = 210,
+                       .height_mm = 158,
+                       .mode = {
+                               .clock = 65000,
+                               .hdisplay = 1024,
+                               .hsync_start = 1048,
+                               .hsync_end = 1184,
+                               .htotal = 1344,
+                               .vdisplay = 768,
+                               .vsync_start = 771,
+                               .vsync_end = 777,
+                               .vtotal = 806,
+                               .flags = 0,
+                       },
+               },
+       },
+};
+
+static const struct rcar_du_platform_data lager_du_pdata __initconst = {
+       .encoders = lager_du_encoders,
+       .num_encoders = ARRAY_SIZE(lager_du_encoders),
+};
+
+static const struct resource du_resources[] __initconst = {
+       DEFINE_RES_MEM(0xfeb00000, 0x70000),
+       DEFINE_RES_MEM_NAMED(0xfeb90000, 0x1c, "lvds.0"),
+       DEFINE_RES_MEM_NAMED(0xfeb94000, 0x1c, "lvds.1"),
+       DEFINE_RES_IRQ(gic_spi(256)),
+       DEFINE_RES_IRQ(gic_spi(268)),
+       DEFINE_RES_IRQ(gic_spi(269)),
+};
+
+static void __init lager_add_du_device(void)
+{
+       struct platform_device_info info = {
+               .name = "rcar-du-r8a7790",
+               .id = -1,
+               .res = du_resources,
+               .num_res = ARRAY_SIZE(du_resources),
+               .data = &lager_du_pdata,
+               .size_data = sizeof(lager_du_pdata),
+               .dma_mask = DMA_BIT_MASK(32),
+       };
+
+       platform_device_register_full(&info);
+}
+
 /* LEDS */
 static struct gpio_led lager_leds[] = {
        {
@@ -56,7 +113,7 @@ static struct gpio_led lager_leds[] = {
        },
 };
 
-static __initdata struct gpio_led_platform_data lager_leds_pdata = {
+static const struct gpio_led_platform_data lager_leds_pdata __initconst = {
        .leds           = lager_leds,
        .num_leds       = ARRAY_SIZE(lager_leds),
 };
@@ -72,7 +129,7 @@ static struct gpio_keys_button gpio_buttons[] = {
        GPIO_KEY(KEY_1,         RCAR_GP_PIN(1, 14),     "SW2-pin1"),
 };
 
-static __initdata struct gpio_keys_platform_data lager_keys_pdata = {
+static const struct gpio_keys_platform_data lager_keys_pdata __initconst = {
        .buttons        = gpio_buttons,
        .nbuttons       = ARRAY_SIZE(gpio_buttons),
 };
@@ -84,29 +141,38 @@ static struct regulator_consumer_supply fixed3v3_power_consumers[] =
 };
 
 /* MMCIF */
-static struct sh_mmcif_plat_data mmcif1_pdata __initdata = {
+static const struct sh_mmcif_plat_data mmcif1_pdata __initconst = {
        .caps           = MMC_CAP_8_BIT_DATA | MMC_CAP_NONREMOVABLE,
+       .clk_ctrl2_present = true,
+       .ccs_unsupported = true,
 };
 
-static struct resource mmcif1_resources[] __initdata = {
+static const struct resource mmcif1_resources[] __initconst = {
        DEFINE_RES_MEM_NAMED(0xee220000, 0x80, "MMCIF1"),
        DEFINE_RES_IRQ(gic_spi(170)),
 };
 
 /* Ether */
-static struct sh_eth_plat_data ether_pdata __initdata = {
+static const struct sh_eth_plat_data ether_pdata __initconst = {
        .phy                    = 0x1,
        .edmac_endian           = EDMAC_LITTLE_ENDIAN,
        .phy_interface          = PHY_INTERFACE_MODE_RMII,
        .ether_link_active_low  = 1,
 };
 
-static struct resource ether_resources[] __initdata = {
+static const struct resource ether_resources[] __initconst = {
        DEFINE_RES_MEM(0xee700000, 0x400),
        DEFINE_RES_IRQ(gic_spi(162)),
 };
 
 static const struct pinctrl_map lager_pinctrl_map[] = {
+       /* DU (CN10: ARGB0, CN13: LVDS) */
+       PIN_MAP_MUX_GROUP_DEFAULT("rcar-du-r8a7790", "pfc-r8a7790",
+                                 "du_rgb666", "du"),
+       PIN_MAP_MUX_GROUP_DEFAULT("rcar-du-r8a7790", "pfc-r8a7790",
+                                 "du_sync_1", "du"),
+       PIN_MAP_MUX_GROUP_DEFAULT("rcar-du-r8a7790", "pfc-r8a7790",
+                                 "du_clk_out_0", "du"),
        /* SCIF0 (CN19: DEBUG SERIAL0) */
        PIN_MAP_MUX_GROUP_DEFAULT("sh-sci.6", "pfc-r8a7790",
                                  "scif0_data", "scif0"),
@@ -154,6 +220,8 @@ static void __init lager_add_standard_devices(void)
                                          ether_resources,
                                          ARRAY_SIZE(ether_resources),
                                          &ether_pdata, sizeof(ether_pdata));
+
+       lager_add_du_device();
 }
 
 /*
@@ -180,14 +248,15 @@ static void __init lager_init(void)
        phy_register_fixup_for_id("r8a7790-ether-ff:01", lager_ksz8041_fixup);
 }
 
-static const char *lager_boards_compat_dt[] __initdata = {
+static const char * const lager_boards_compat_dt[] __initconst = {
        "renesas,lager",
        NULL,
 };
 
 DT_MACHINE_START(LAGER_DT, "lager")
-       .init_early     = r8a7790_init_delay,
-       .init_time      = r8a7790_timer_init,
+       .smp            = smp_ops(r8a7790_smp_ops),
+       .init_early     = r8a7790_init_early,
+       .init_time      = rcar_gen2_timer_init,
        .init_machine   = lager_init,
        .dt_compat      = lager_boards_compat_dt,
 MACHINE_END
index 3f4250a2d4eb50f86a6b0ed4ff5b837b741dcd6e..2773936bf7dcffab9be79f2c8e7deed9c12e8093 100644 (file)
@@ -28,6 +28,7 @@
 static void __init marzen_init(void)
 {
        r8a7779_add_standard_devices_dt();
+       r8a7779_init_irq_extpin_dt(1); /* IRQ1 as individual interrupt */
 }
 
 static const char *marzen_boards_compat_dt[] __initdata = {
index 3f5044fda4e30ec20610c677188f9647430f1bf0..da1352f5f71b6195969d17ef0de30ba9d4c8e7fe 100644 (file)
@@ -30,6 +30,7 @@
 #include <linux/dma-mapping.h>
 #include <linux/pinctrl/machine.h>
 #include <linux/platform_data/gpio-rcar.h>
+#include <linux/platform_data/rcar-du.h>
 #include <linux/platform_data/usb-rcar-phy.h>
 #include <linux/regulator/fixed.h>
 #include <linux/regulator/machine.h>
@@ -124,6 +125,8 @@ static struct resource sdhi0_resources[] = {
 };
 
 static struct sh_mobile_sdhi_info sdhi0_platform_data = {
+       .dma_slave_tx = HPBDMA_SLAVE_SDHI0_TX,
+       .dma_slave_rx = HPBDMA_SLAVE_SDHI0_RX,
        .tmio_flags = TMIO_MMC_WRPROTECT_DISABLE | TMIO_MMC_HAS_IDLE_WAIT,
        .tmio_caps = MMC_CAP_SD_HIGHSPEED,
 };
@@ -169,6 +172,63 @@ static struct platform_device hspi_device = {
        .num_resources  = ARRAY_SIZE(hspi_resources),
 };
 
+/*
+ * DU
+ *
+ * The panel only specifies the [hv]display and [hv]total values. The position
+ * and width of the sync pulses don't matter, they're copied from VESA timings.
+ */
+static struct rcar_du_encoder_data du_encoders[] = {
+       {
+               .type = RCAR_DU_ENCODER_VGA,
+               .output = RCAR_DU_OUTPUT_DPAD0,
+       }, {
+               .type = RCAR_DU_ENCODER_LVDS,
+               .output = RCAR_DU_OUTPUT_DPAD1,
+               .connector.lvds.panel = {
+                       .width_mm = 210,
+                       .height_mm = 158,
+                       .mode = {
+                               .clock = 65000,
+                               .hdisplay = 1024,
+                               .hsync_start = 1048,
+                               .hsync_end = 1184,
+                               .htotal = 1344,
+                               .vdisplay = 768,
+                               .vsync_start = 771,
+                               .vsync_end = 777,
+                               .vtotal = 806,
+                               .flags = 0,
+                       },
+               },
+       },
+};
+
+static const struct rcar_du_platform_data du_pdata __initconst = {
+       .encoders = du_encoders,
+       .num_encoders = ARRAY_SIZE(du_encoders),
+};
+
+static const struct resource du_resources[] __initconst = {
+       DEFINE_RES_MEM(0xfff80000, 0x40000),
+       DEFINE_RES_IRQ(gic_iid(0x3f)),
+};
+
+static void __init marzen_add_du_device(void)
+{
+       struct platform_device_info info = {
+               .name = "rcar-du-r8a7779",
+               .id = -1,
+               .res = du_resources,
+               .num_res = ARRAY_SIZE(du_resources),
+               .data = &du_pdata,
+               .size_data = sizeof(du_pdata),
+               .dma_mask = DMA_BIT_MASK(32),
+       };
+
+       platform_device_register_full(&info);
+}
+
 /* LEDS */
 static struct gpio_led marzen_leds[] = {
        {
@@ -237,6 +297,19 @@ static struct platform_device *marzen_devices[] __initdata = {
 };
 
 static const struct pinctrl_map marzen_pinctrl_map[] = {
+       /* DU (CN10: ARGB0, CN13: LVDS) */
+       PIN_MAP_MUX_GROUP_DEFAULT("rcar-du-r8a7779", "pfc-r8a7779",
+                                 "du0_rgb888", "du0"),
+       PIN_MAP_MUX_GROUP_DEFAULT("rcar-du-r8a7779", "pfc-r8a7779",
+                                 "du0_sync_1", "du0"),
+       PIN_MAP_MUX_GROUP_DEFAULT("rcar-du-r8a7779", "pfc-r8a7779",
+                                 "du0_clk_out_0", "du0"),
+       PIN_MAP_MUX_GROUP_DEFAULT("rcar-du-r8a7779", "pfc-r8a7779",
+                                 "du1_rgb666", "du1"),
+       PIN_MAP_MUX_GROUP_DEFAULT("rcar-du-r8a7779", "pfc-r8a7779",
+                                 "du1_sync_1", "du1"),
+       PIN_MAP_MUX_GROUP_DEFAULT("rcar-du-r8a7779", "pfc-r8a7779",
+                                 "du1_clk_out", "du1"),
        /* HSPI0 */
        PIN_MAP_MUX_GROUP_DEFAULT("sh-hspi.0", "pfc-r8a7779",
                                  "hspi0", "hspi0"),
@@ -297,6 +370,7 @@ static void __init marzen_init(void)
        r8a7779_add_vin_device(1, &vin_platform_data);
        r8a7779_add_vin_device(3, &vin_platform_data);
        platform_add_devices(marzen_devices, ARRAY_SIZE(marzen_devices));
+       marzen_add_du_device();
 }
 
 static const char *marzen_boards_compat_dt[] __initdata = {
diff --git a/arch/arm/mach-shmobile/clock-r7s72100.c b/arch/arm/mach-shmobile/clock-r7s72100.c
new file mode 100644 (file)
index 0000000..4aba20c
--- /dev/null
@@ -0,0 +1,202 @@
+/*
+ * r7a72100 clock framework support
+ *
+ * Copyright (C) 2013  Renesas Solutions Corp.
+ * Copyright (C) 2012  Phil Edworthy
+ * Copyright (C) 2011  Magnus Damm
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */
+#include <linux/init.h>
+#include <linux/kernel.h>
+#include <linux/io.h>
+#include <linux/sh_clk.h>
+#include <linux/clkdev.h>
+#include <mach/common.h>
+#include <mach/r7s72100.h>
+
+/* registers */
+#define FRQCR          0xfcfe0010
+#define FRQCR2         0xfcfe0014
+#define STBCR3         0xfcfe0420
+#define STBCR4         0xfcfe0424
+
+#define PLL_RATE 30
+
+static struct clk_mapping cpg_mapping = {
+       .phys   = 0xfcfe0000,
+       .len    = 0x1000,
+};
+
+/* Fixed 32 KHz root clock for RTC */
+static struct clk r_clk = {
+       .rate           = 32768,
+};
+
+/*
+ * Default rate for the root input clock, reset this with clk_set_rate()
+ * from the platform code.
+ */
+static struct clk extal_clk = {
+       .rate           = 13330000,
+       .mapping        = &cpg_mapping,
+};
+
+static unsigned long pll_recalc(struct clk *clk)
+{
+       return clk->parent->rate * PLL_RATE;
+}
+
+static struct sh_clk_ops pll_clk_ops = {
+       .recalc         = pll_recalc,
+};
+
+static struct clk pll_clk = {
+       .ops            = &pll_clk_ops,
+       .parent         = &extal_clk,
+       .flags          = CLK_ENABLE_ON_INIT,
+};
+
+static unsigned long bus_recalc(struct clk *clk)
+{
+       return clk->parent->rate * 2 / 3;
+}
+
+static struct sh_clk_ops bus_clk_ops = {
+       .recalc         = bus_recalc,
+};
+
+static struct clk bus_clk = {
+       .ops            = &bus_clk_ops,
+       .parent         = &pll_clk,
+       .flags          = CLK_ENABLE_ON_INIT,
+};
+
+static unsigned long peripheral0_recalc(struct clk *clk)
+{
+       return clk->parent->rate / 12;
+}
+
+static struct sh_clk_ops peripheral0_clk_ops = {
+       .recalc         = peripheral0_recalc,
+};
+
+static struct clk peripheral0_clk = {
+       .ops            = &peripheral0_clk_ops,
+       .parent         = &pll_clk,
+       .flags          = CLK_ENABLE_ON_INIT,
+};
+
+static unsigned long peripheral1_recalc(struct clk *clk)
+{
+       return clk->parent->rate / 6;
+}
+
+static struct sh_clk_ops peripheral1_clk_ops = {
+       .recalc         = peripheral1_recalc,
+};
+
+static struct clk peripheral1_clk = {
+       .ops            = &peripheral1_clk_ops,
+       .parent         = &pll_clk,
+       .flags          = CLK_ENABLE_ON_INIT,
+};
+
+struct clk *main_clks[] = {
+       &r_clk,
+       &extal_clk,
+       &pll_clk,
+       &bus_clk,
+       &peripheral0_clk,
+       &peripheral1_clk,
+};
+
+static int div2[] = { 1, 3, 0, 3 }; /* 1, 2/3, reserve, 1/3 */
+static int multipliers[] = { 1, 2, 1, 1 };
+
+static struct clk_div_mult_table div4_div_mult_table = {
+       .divisors = div2,
+       .nr_divisors = ARRAY_SIZE(div2),
+       .multipliers = multipliers,
+       .nr_multipliers = ARRAY_SIZE(multipliers),
+};
+
+static struct clk_div4_table div4_table = {
+       .div_mult_table = &div4_div_mult_table,
+};
+
+enum { DIV4_I,
+       DIV4_NR };
+
+#define DIV4(_reg, _bit, _mask, _flags) \
+       SH_CLK_DIV4(&pll_clk, _reg, _bit, _mask, _flags)
+
+/* The mask field specifies the div2 entries that are valid */
+struct clk div4_clks[DIV4_NR] = {
+       [DIV4_I]  = DIV4(FRQCR, 8, 0xB, CLK_ENABLE_REG_16BIT
+                                       | CLK_ENABLE_ON_INIT),
+};
+
+enum { MSTP47, MSTP46, MSTP45, MSTP44, MSTP43, MSTP42, MSTP41, MSTP40,
+       MSTP33, MSTP_NR };
+
+static struct clk mstp_clks[MSTP_NR] = {
+       [MSTP47] = SH_CLK_MSTP8(&peripheral1_clk, STBCR4, 7, 0), /* SCIF0 */
+       [MSTP46] = SH_CLK_MSTP8(&peripheral1_clk, STBCR4, 6, 0), /* SCIF1 */
+       [MSTP45] = SH_CLK_MSTP8(&peripheral1_clk, STBCR4, 5, 0), /* SCIF2 */
+       [MSTP44] = SH_CLK_MSTP8(&peripheral1_clk, STBCR4, 4, 0), /* SCIF3 */
+       [MSTP43] = SH_CLK_MSTP8(&peripheral1_clk, STBCR4, 3, 0), /* SCIF4 */
+       [MSTP42] = SH_CLK_MSTP8(&peripheral1_clk, STBCR4, 2, 0), /* SCIF5 */
+       [MSTP41] = SH_CLK_MSTP8(&peripheral1_clk, STBCR4, 1, 0), /* SCIF6 */
+       [MSTP40] = SH_CLK_MSTP8(&peripheral1_clk, STBCR4, 0, 0), /* SCIF7 */
+       [MSTP33] = SH_CLK_MSTP8(&peripheral0_clk, STBCR3, 3, 0), /* MTU2 */
+};
+
+static struct clk_lookup lookups[] = {
+       /* main clocks */
+       CLKDEV_CON_ID("rclk", &r_clk),
+       CLKDEV_CON_ID("extal", &extal_clk),
+       CLKDEV_CON_ID("pll_clk", &pll_clk),
+       CLKDEV_CON_ID("peripheral_clk", &peripheral1_clk),
+
+       /* DIV4 clocks */
+       CLKDEV_CON_ID("cpu_clk", &div4_clks[DIV4_I]),
+
+       /* MSTP clocks */
+       CLKDEV_ICK_ID("sci_fck", "sh-sci.0", &mstp_clks[MSTP47]),
+       CLKDEV_ICK_ID("sci_fck", "sh-sci.1", &mstp_clks[MSTP46]),
+       CLKDEV_ICK_ID("sci_fck", "sh-sci.2", &mstp_clks[MSTP45]),
+       CLKDEV_ICK_ID("sci_fck", "sh-sci.3", &mstp_clks[MSTP44]),
+       CLKDEV_ICK_ID("sci_fck", "sh-sci.4", &mstp_clks[MSTP43]),
+       CLKDEV_ICK_ID("sci_fck", "sh-sci.5", &mstp_clks[MSTP42]),
+       CLKDEV_ICK_ID("sci_fck", "sh-sci.6", &mstp_clks[MSTP41]),
+       CLKDEV_ICK_ID("sci_fck", "sh-sci.7", &mstp_clks[MSTP40]),
+};
+
+void __init r7s72100_clock_init(void)
+{
+       int k, ret = 0;
+
+       for (k = 0; !ret && (k < ARRAY_SIZE(main_clks)); k++)
+               ret = clk_register(main_clks[k]);
+
+       clkdev_add_table(lookups, ARRAY_SIZE(lookups));
+
+       if (!ret)
+               ret = sh_clk_div4_register(div4_clks, DIV4_NR, &div4_table);
+
+       if (!ret)
+               ret = sh_clk_mstp_register(mstp_clks, MSTP_NR);
+
+       if (!ret)
+               shmobile_clk_init();
+       else
+               panic("failed to setup rza1 clocks\n");
+}
index 5bd2e851e3c7f2d03cd7ae4dd647ec1cc7d9c537..571409b611d386b5067236248d129d2f0ca154a1 100644 (file)
@@ -504,7 +504,7 @@ static struct clk div6_clks[DIV6_NR] = {
 
 /* MSTP */
 enum {
-       MSTP217, MSTP216, MSTP207, MSTP206, MSTP204, MSTP203,
+       MSTP218, MSTP217, MSTP216, MSTP207, MSTP206, MSTP204, MSTP203,
        MSTP329, MSTP323, MSTP318, MSTP317, MSTP316,
        MSTP315, MSTP314, MSTP313, MSTP312, MSTP305, MSTP300,
        MSTP411, MSTP410, MSTP409,
@@ -519,6 +519,7 @@ static struct clk mstp_clks[MSTP_NR] = {
        [MSTP207] = SH_CLK_MSTP32(&div6_clks[DIV6_MP],  SMSTPCR2, 7, 0), /* SCIFB1 */
        [MSTP216] = SH_CLK_MSTP32(&div6_clks[DIV6_MP],  SMSTPCR2, 16, 0), /* SCIFB2 */
        [MSTP217] = SH_CLK_MSTP32(&div6_clks[DIV6_MP],  SMSTPCR2, 17, 0), /* SCIFB3 */
+       [MSTP218] = SH_CLK_MSTP32(&div4_clks[DIV4_HP],  SMSTPCR2, 18, 0), /* DMAC */
        [MSTP300] = SH_CLK_MSTP32(&div4_clks[DIV4_HP],  SMSTPCR3, 0, 0), /* IIC2 */
        [MSTP305] = SH_CLK_MSTP32(&div6_clks[DIV6_MMC1],SMSTPCR3, 5, 0), /* MMCIF1 */
        [MSTP312] = SH_CLK_MSTP32(&div6_clks[DIV6_SDHI2],SMSTPCR3, 12, 0), /* SDHI2 */
@@ -578,6 +579,8 @@ static struct clk_lookup lookups[] = {
        CLKDEV_DEV_ID("sh-sci.3", &mstp_clks[MSTP207]),
        CLKDEV_DEV_ID("sh-sci.4", &mstp_clks[MSTP216]),
        CLKDEV_DEV_ID("sh-sci.5", &mstp_clks[MSTP217]),
+       CLKDEV_DEV_ID("sh-dma-engine.0", &mstp_clks[MSTP218]),
+       CLKDEV_DEV_ID("e6700020.dma-controller", &mstp_clks[MSTP218]),
        CLKDEV_DEV_ID("rcar_thermal", &mstp_clks[MSTP522]),
        CLKDEV_DEV_ID("e6520000.i2c", &mstp_clks[MSTP300]),
        CLKDEV_DEV_ID("sh_mmcif.1", &mstp_clks[MSTP305]),
index c4bf2d8fb111aba4bbddb54a2fdb95287f784582..fb6af83858e3f0210f9eeaae2c2794a5a618ca48 100644 (file)
@@ -69,6 +69,15 @@ static struct clk extal_clk = {
        .mapping = &cpg_mapping,
 };
 
+static struct clk audio_clk_a = {
+};
+
+static struct clk audio_clk_b = {
+};
+
+static struct clk audio_clk_c = {
+};
+
 /*
  * clock ratio of these clock will be updated
  * on r8a7778_clock_init()
@@ -100,18 +109,23 @@ static struct clk *main_clks[] = {
        &p_clk,
        &g_clk,
        &z_clk,
+       &audio_clk_a,
+       &audio_clk_b,
+       &audio_clk_c,
 };
 
 enum {
        MSTP331,
        MSTP323, MSTP322, MSTP321,
+       MSTP311, MSTP310,
+       MSTP309, MSTP308, MSTP307,
        MSTP114,
        MSTP110, MSTP109,
        MSTP100,
        MSTP030,
        MSTP029, MSTP028, MSTP027, MSTP026, MSTP025, MSTP024, MSTP023, MSTP022, MSTP021,
-       MSTP016, MSTP015,
-       MSTP007,
+       MSTP016, MSTP015, MSTP012, MSTP011, MSTP010,
+       MSTP009, MSTP008, MSTP007,
        MSTP_NR };
 
 static struct clk mstp_clks[MSTP_NR] = {
@@ -119,6 +133,11 @@ static struct clk mstp_clks[MSTP_NR] = {
        [MSTP323] = SH_CLK_MSTP32(&p_clk, MSTPCR3, 23, 0), /* SDHI0 */
        [MSTP322] = SH_CLK_MSTP32(&p_clk, MSTPCR3, 22, 0), /* SDHI1 */
        [MSTP321] = SH_CLK_MSTP32(&p_clk, MSTPCR3, 21, 0), /* SDHI2 */
+       [MSTP311] = SH_CLK_MSTP32(&p_clk, MSTPCR3, 11, 0), /* SSI4 */
+       [MSTP310] = SH_CLK_MSTP32(&p_clk, MSTPCR3, 10, 0), /* SSI5 */
+       [MSTP309] = SH_CLK_MSTP32(&p_clk, MSTPCR3,  9, 0), /* SSI6 */
+       [MSTP308] = SH_CLK_MSTP32(&p_clk, MSTPCR3,  8, 0), /* SSI7 */
+       [MSTP307] = SH_CLK_MSTP32(&p_clk, MSTPCR3,  7, 0), /* SSI8 */
        [MSTP114] = SH_CLK_MSTP32(&p_clk, MSTPCR1, 14, 0), /* Ether */
        [MSTP110] = SH_CLK_MSTP32(&s_clk, MSTPCR1, 10, 0), /* VIN0 */
        [MSTP109] = SH_CLK_MSTP32(&s_clk, MSTPCR1,  9, 0), /* VIN1 */
@@ -135,11 +154,20 @@ static struct clk mstp_clks[MSTP_NR] = {
        [MSTP021] = SH_CLK_MSTP32(&p_clk, MSTPCR0, 21, 0), /* SCIF5 */
        [MSTP016] = SH_CLK_MSTP32(&p_clk, MSTPCR0, 16, 0), /* TMU0 */
        [MSTP015] = SH_CLK_MSTP32(&p_clk, MSTPCR0, 15, 0), /* TMU1 */
+       [MSTP012] = SH_CLK_MSTP32(&p_clk, MSTPCR0, 12, 0), /* SSI0 */
+       [MSTP011] = SH_CLK_MSTP32(&p_clk, MSTPCR0, 11, 0), /* SSI1 */
+       [MSTP010] = SH_CLK_MSTP32(&p_clk, MSTPCR0, 10, 0), /* SSI2 */
+       [MSTP009] = SH_CLK_MSTP32(&p_clk, MSTPCR0,  9, 0), /* SSI3 */
+       [MSTP008] = SH_CLK_MSTP32(&p_clk, MSTPCR0,  8, 0), /* SRU */
        [MSTP007] = SH_CLK_MSTP32(&p_clk, MSTPCR0,  7, 0), /* HSPI */
 };
 
 static struct clk_lookup lookups[] = {
        /* main */
+       CLKDEV_CON_ID("audio_clk_a",    &audio_clk_a),
+       CLKDEV_CON_ID("audio_clk_b",    &audio_clk_b),
+       CLKDEV_CON_ID("audio_clk_c",    &audio_clk_c),
+       CLKDEV_CON_ID("audio_clk_internal",     &s1_clk),
        CLKDEV_CON_ID("shyway_clk",     &s_clk),
        CLKDEV_CON_ID("peripheral_clk", &p_clk),
 
@@ -153,6 +181,7 @@ static struct clk_lookup lookups[] = {
        CLKDEV_DEV_ID("r8a7778-vin.1", &mstp_clks[MSTP109]), /* VIN1 */
        CLKDEV_DEV_ID("ehci-platform", &mstp_clks[MSTP100]), /* USB EHCI port0/1 */
        CLKDEV_DEV_ID("ohci-platform", &mstp_clks[MSTP100]), /* USB OHCI port0/1 */
+       CLKDEV_DEV_ID("renesas_usbhs", &mstp_clks[MSTP100]), /* USB FUNC */
        CLKDEV_DEV_ID("i2c-rcar.0", &mstp_clks[MSTP030]), /* I2C0 */
        CLKDEV_DEV_ID("i2c-rcar.1", &mstp_clks[MSTP029]), /* I2C1 */
        CLKDEV_DEV_ID("i2c-rcar.2", &mstp_clks[MSTP028]), /* I2C2 */
@@ -168,6 +197,17 @@ static struct clk_lookup lookups[] = {
        CLKDEV_DEV_ID("sh-hspi.0", &mstp_clks[MSTP007]), /* HSPI0 */
        CLKDEV_DEV_ID("sh-hspi.1", &mstp_clks[MSTP007]), /* HSPI1 */
        CLKDEV_DEV_ID("sh-hspi.2", &mstp_clks[MSTP007]), /* HSPI2 */
+       CLKDEV_DEV_ID("rcar_sound", &mstp_clks[MSTP008]), /* SRU */
+
+       CLKDEV_ICK_ID("ssi.0", "rcar_sound", &mstp_clks[MSTP012]),
+       CLKDEV_ICK_ID("ssi.1", "rcar_sound", &mstp_clks[MSTP011]),
+       CLKDEV_ICK_ID("ssi.2", "rcar_sound", &mstp_clks[MSTP010]),
+       CLKDEV_ICK_ID("ssi.3", "rcar_sound", &mstp_clks[MSTP009]),
+       CLKDEV_ICK_ID("ssi.4", "rcar_sound", &mstp_clks[MSTP311]),
+       CLKDEV_ICK_ID("ssi.5", "rcar_sound", &mstp_clks[MSTP310]),
+       CLKDEV_ICK_ID("ssi.6", "rcar_sound", &mstp_clks[MSTP309]),
+       CLKDEV_ICK_ID("ssi.7", "rcar_sound", &mstp_clks[MSTP308]),
+       CLKDEV_ICK_ID("ssi.8", "rcar_sound", &mstp_clks[MSTP307]),
 };
 
 void __init r8a7778_clock_init(void)
index bd6ad922eb7ec6c4213607031810310dd2a289bd..1f7080fab0a53556a4ce5efb3cbf3368dce71465 100644 (file)
@@ -200,7 +200,7 @@ static struct clk_lookup lookups[] = {
        CLKDEV_DEV_ID("sh_mobile_sdhi.1", &mstp_clks[MSTP322]), /* SDHI1 */
        CLKDEV_DEV_ID("sh_mobile_sdhi.2", &mstp_clks[MSTP321]), /* SDHI2 */
        CLKDEV_DEV_ID("sh_mobile_sdhi.3", &mstp_clks[MSTP320]), /* SDHI3 */
-       CLKDEV_DEV_ID("rcar-du.0", &mstp_clks[MSTP103]), /* DU */
+       CLKDEV_DEV_ID("rcar-du-r8a7779", &mstp_clks[MSTP103]), /* DU */
 };
 
 void __init r8a7779_clock_init(void)
index fc36d3db0b4d9541d9b8ca08c47b4530a8891c29..a64f965c7da142b118ab42a52afadeb5038dff81 100644 (file)
@@ -52,6 +52,7 @@
 #define SMSTPCR5 0xe6150144
 #define SMSTPCR7 0xe615014c
 #define SMSTPCR8 0xe6150990
+#define SMSTPCR9 0xe6150994
 
 #define SDCKCR         0xE6150074
 #define SD2CKCR                0xE6150078
@@ -181,8 +182,9 @@ static struct clk div6_clks[DIV6_NR] = {
 
 /* MSTP */
 enum {
+       MSTP931, MSTP930, MSTP929, MSTP928,
        MSTP813,
-       MSTP721, MSTP720,
+       MSTP726, MSTP725, MSTP724, MSTP723, MSTP722, MSTP721, MSTP720,
        MSTP717, MSTP716,
        MSTP522,
        MSTP315, MSTP314, MSTP313, MSTP312, MSTP311, MSTP305, MSTP304,
@@ -192,7 +194,16 @@ enum {
 };
 
 static struct clk mstp_clks[MSTP_NR] = {
+       [MSTP931] = SH_CLK_MSTP32(&hp_clk, SMSTPCR9, 31, 0), /* I2C0 */
+       [MSTP930] = SH_CLK_MSTP32(&hp_clk, SMSTPCR9, 30, 0), /* I2C1 */
+       [MSTP929] = SH_CLK_MSTP32(&hp_clk, SMSTPCR9, 29, 0), /* I2C2 */
+       [MSTP928] = SH_CLK_MSTP32(&hp_clk, SMSTPCR9, 28, 0), /* I2C3 */
        [MSTP813] = SH_CLK_MSTP32(&p_clk, SMSTPCR8, 13, 0), /* Ether */
+       [MSTP726] = SH_CLK_MSTP32(&zx_clk, SMSTPCR7, 26, 0), /* LVDS0 */
+       [MSTP725] = SH_CLK_MSTP32(&zx_clk, SMSTPCR7, 25, 0), /* LVDS1 */
+       [MSTP724] = SH_CLK_MSTP32(&zx_clk, SMSTPCR7, 24, 0), /* DU0 */
+       [MSTP723] = SH_CLK_MSTP32(&zx_clk, SMSTPCR7, 23, 0), /* DU1 */
+       [MSTP722] = SH_CLK_MSTP32(&zx_clk, SMSTPCR7, 22, 0), /* DU2 */
        [MSTP721] = SH_CLK_MSTP32(&p_clk, SMSTPCR7, 21, 0), /* SCIF0 */
        [MSTP720] = SH_CLK_MSTP32(&p_clk, SMSTPCR7, 20, 0), /* SCIF1 */
        [MSTP717] = SH_CLK_MSTP32(&zs_clk, SMSTPCR7, 17, 0), /* HSCIF0 */
@@ -251,6 +262,11 @@ static struct clk_lookup lookups[] = {
        CLKDEV_CON_ID("ssprs",          &div6_clks[DIV6_SSPRS]),
 
        /* MSTP */
+       CLKDEV_ICK_ID("lvds.0", "rcar-du-r8a7790", &mstp_clks[MSTP726]),
+       CLKDEV_ICK_ID("lvds.1", "rcar-du-r8a7790", &mstp_clks[MSTP725]),
+       CLKDEV_ICK_ID("du.0", "rcar-du-r8a7790", &mstp_clks[MSTP724]),
+       CLKDEV_ICK_ID("du.1", "rcar-du-r8a7790", &mstp_clks[MSTP723]),
+       CLKDEV_ICK_ID("du.2", "rcar-du-r8a7790", &mstp_clks[MSTP722]),
        CLKDEV_DEV_ID("sh-sci.0", &mstp_clks[MSTP204]),
        CLKDEV_DEV_ID("sh-sci.1", &mstp_clks[MSTP203]),
        CLKDEV_DEV_ID("sh-sci.2", &mstp_clks[MSTP206]),
@@ -261,6 +277,10 @@ static struct clk_lookup lookups[] = {
        CLKDEV_DEV_ID("sh-sci.7", &mstp_clks[MSTP720]),
        CLKDEV_DEV_ID("sh-sci.8", &mstp_clks[MSTP717]),
        CLKDEV_DEV_ID("sh-sci.9", &mstp_clks[MSTP716]),
+       CLKDEV_DEV_ID("e6508000.i2c", &mstp_clks[MSTP931]),
+       CLKDEV_DEV_ID("e6518000.i2c", &mstp_clks[MSTP930]),
+       CLKDEV_DEV_ID("e6530000.i2c", &mstp_clks[MSTP929]),
+       CLKDEV_DEV_ID("e6540000.i2c", &mstp_clks[MSTP928]),
        CLKDEV_DEV_ID("r8a7790-ether", &mstp_clks[MSTP813]),
        CLKDEV_DEV_ID("rcar_thermal", &mstp_clks[MSTP522]),
        CLKDEV_DEV_ID("ee200000.mmcif", &mstp_clks[MSTP315]),
@@ -290,7 +310,7 @@ static struct clk_lookup lookups[] = {
 
 void __init r8a7790_clock_init(void)
 {
-       u32 mode = r8a7790_read_mode_pins();
+       u32 mode = rcar_gen2_read_mode_pins();
        int k, ret = 0;
 
        switch (mode & (MD(14) | MD(13))) {
diff --git a/arch/arm/mach-shmobile/clock-r8a7791.c b/arch/arm/mach-shmobile/clock-r8a7791.c
new file mode 100644 (file)
index 0000000..c9a26f1
--- /dev/null
@@ -0,0 +1,237 @@
+/*
+ * r8a7791 clock framework support
+ *
+ * Copyright (C) 2013  Renesas Electronics Corporation
+ * Copyright (C) 2013  Renesas Solutions Corp.
+ * Copyright (C) 2013  Magnus Damm
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ */
+#include <linux/init.h>
+#include <linux/io.h>
+#include <linux/kernel.h>
+#include <linux/sh_clk.h>
+#include <linux/clkdev.h>
+#include <mach/clock.h>
+#include <mach/common.h>
+
+/*
+ *   MD                EXTAL           PLL0    PLL1    PLL3
+ * 14 13 19    (MHz)           *1      *1
+ *---------------------------------------------------
+ * 0  0  0     15 x 1          x172/2  x208/2  x106
+ * 0  0  1     15 x 1          x172/2  x208/2  x88
+ * 0  1  0     20 x 1          x130/2  x156/2  x80
+ * 0  1  1     20 x 1          x130/2  x156/2  x66
+ * 1  0  0     26 / 2          x200/2  x240/2  x122
+ * 1  0  1     26 / 2          x200/2  x240/2  x102
+ * 1  1  0     30 / 2          x172/2  x208/2  x106
+ * 1  1  1     30 / 2          x172/2  x208/2  x88
+ *
+ * *1 :        Table 7.6 indicates VCO ouput (PLLx = VCO/2)
+ *     see "p1 / 2" on R8A7791_CLOCK_ROOT() below
+ */
+
+#define MD(nr) (1 << nr)
+
+#define CPG_BASE 0xe6150000
+#define CPG_LEN 0x1000
+
+#define SMSTPCR0       0xE6150130
+#define SMSTPCR1       0xE6150134
+#define SMSTPCR2       0xe6150138
+#define SMSTPCR3       0xE615013C
+#define SMSTPCR5       0xE6150144
+#define SMSTPCR7       0xe615014c
+#define SMSTPCR8       0xE6150990
+#define SMSTPCR9       0xE6150994
+#define SMSTPCR10      0xE6150998
+#define SMSTPCR11      0xE615099C
+
+#define MODEMR         0xE6160060
+#define SDCKCR         0xE6150074
+#define SD2CKCR                0xE6150078
+#define SD3CKCR                0xE615007C
+#define MMC0CKCR       0xE6150240
+#define MMC1CKCR       0xE6150244
+#define SSPCKCR                0xE6150248
+#define SSPRSCKCR      0xE615024C
+
+static struct clk_mapping cpg_mapping = {
+       .phys   = CPG_BASE,
+       .len    = CPG_LEN,
+};
+
+static struct clk extal_clk = {
+       /* .rate will be updated on r8a7791_clock_init() */
+       .mapping        = &cpg_mapping,
+};
+
+static struct sh_clk_ops followparent_clk_ops = {
+       .recalc = followparent_recalc,
+};
+
+static struct clk main_clk = {
+       /* .parent will be set r8a73a4_clock_init */
+       .ops    = &followparent_clk_ops,
+};
+
+/*
+ * clock ratio of these clock will be updated
+ * on r8a7791_clock_init()
+ */
+SH_FIXED_RATIO_CLK_SET(pll1_clk,               main_clk,       1, 1);
+SH_FIXED_RATIO_CLK_SET(pll3_clk,               main_clk,       1, 1);
+
+/* fixed ratio clock */
+SH_FIXED_RATIO_CLK_SET(extal_div2_clk,         extal_clk,      1, 2);
+SH_FIXED_RATIO_CLK_SET(cp_clk,                 extal_clk,      1, 2);
+
+SH_FIXED_RATIO_CLK_SET(pll1_div2_clk,          pll1_clk,       1, 2);
+SH_FIXED_RATIO_CLK_SET(hp_clk,                 pll1_clk,       1, 12);
+SH_FIXED_RATIO_CLK_SET(p_clk,                  pll1_clk,       1, 24);
+SH_FIXED_RATIO_CLK_SET(rclk_clk,               pll1_clk,       1, (48 * 1024));
+SH_FIXED_RATIO_CLK_SET(mp_clk,                 pll1_div2_clk,  1, 15);
+
+static struct clk *main_clks[] = {
+       &extal_clk,
+       &extal_div2_clk,
+       &main_clk,
+       &pll1_clk,
+       &pll1_div2_clk,
+       &pll3_clk,
+       &hp_clk,
+       &p_clk,
+       &rclk_clk,
+       &mp_clk,
+       &cp_clk,
+};
+
+/* MSTP */
+enum {
+       MSTP721, MSTP720,
+       MSTP719, MSTP718, MSTP715, MSTP714,
+       MSTP216, MSTP207, MSTP206,
+       MSTP204, MSTP203, MSTP202, MSTP1105, MSTP1106, MSTP1107,
+       MSTP124,
+       MSTP_NR
+};
+
+static struct clk mstp_clks[MSTP_NR] = {
+       [MSTP721] = SH_CLK_MSTP32(&p_clk, SMSTPCR7, 21, 0), /* SCIF0 */
+       [MSTP720] = SH_CLK_MSTP32(&p_clk, SMSTPCR7, 20, 0), /* SCIF1 */
+       [MSTP719] = SH_CLK_MSTP32(&p_clk, SMSTPCR7, 19, 0), /* SCIF2 */
+       [MSTP718] = SH_CLK_MSTP32(&p_clk, SMSTPCR7, 18, 0), /* SCIF3 */
+       [MSTP715] = SH_CLK_MSTP32(&p_clk, SMSTPCR7, 15, 0), /* SCIF4 */
+       [MSTP714] = SH_CLK_MSTP32(&p_clk, SMSTPCR7, 14, 0), /* SCIF5 */
+       [MSTP216] = SH_CLK_MSTP32(&mp_clk, SMSTPCR2, 16, 0), /* SCIFB2 */
+       [MSTP207] = SH_CLK_MSTP32(&mp_clk, SMSTPCR2, 7, 0), /* SCIFB1 */
+       [MSTP206] = SH_CLK_MSTP32(&mp_clk, SMSTPCR2, 6, 0), /* SCIFB0 */
+       [MSTP204] = SH_CLK_MSTP32(&mp_clk, SMSTPCR2, 4, 0), /* SCIFA0 */
+       [MSTP203] = SH_CLK_MSTP32(&mp_clk, SMSTPCR2, 3, 0), /* SCIFA1 */
+       [MSTP202] = SH_CLK_MSTP32(&mp_clk, SMSTPCR2, 2, 0), /* SCIFA2 */
+       [MSTP1105] = SH_CLK_MSTP32(&mp_clk, SMSTPCR11, 5, 0), /* SCIFA3 */
+       [MSTP1106] = SH_CLK_MSTP32(&mp_clk, SMSTPCR11, 6, 0), /* SCIFA4 */
+       [MSTP1107] = SH_CLK_MSTP32(&mp_clk, SMSTPCR11, 7, 0), /* SCIFA5 */
+       [MSTP124] = SH_CLK_MSTP32(&rclk_clk, SMSTPCR1, 24, 0), /* CMT0 */
+};
+
+static struct clk_lookup lookups[] = {
+
+       /* main clocks */
+       CLKDEV_CON_ID("extal",          &extal_clk),
+       CLKDEV_CON_ID("extal_div2",     &extal_div2_clk),
+       CLKDEV_CON_ID("main",           &main_clk),
+       CLKDEV_CON_ID("pll1",           &pll1_clk),
+       CLKDEV_CON_ID("pll1_div2",      &pll1_div2_clk),
+       CLKDEV_CON_ID("pll3",           &pll3_clk),
+       CLKDEV_CON_ID("hp",             &hp_clk),
+       CLKDEV_CON_ID("p",              &p_clk),
+       CLKDEV_CON_ID("rclk",           &rclk_clk),
+       CLKDEV_CON_ID("mp",             &mp_clk),
+       CLKDEV_CON_ID("cp",             &cp_clk),
+       CLKDEV_CON_ID("peripheral_clk", &hp_clk),
+
+       /* MSTP */
+       CLKDEV_DEV_ID("sh-sci.0", &mstp_clks[MSTP204]), /* SCIFA0 */
+       CLKDEV_DEV_ID("sh-sci.1", &mstp_clks[MSTP203]), /* SCIFA1 */
+       CLKDEV_DEV_ID("sh-sci.2", &mstp_clks[MSTP206]), /* SCIFB0 */
+       CLKDEV_DEV_ID("sh-sci.3", &mstp_clks[MSTP207]), /* SCIFB1 */
+       CLKDEV_DEV_ID("sh-sci.4", &mstp_clks[MSTP216]), /* SCIFB2 */
+       CLKDEV_DEV_ID("sh-sci.5", &mstp_clks[MSTP202]), /* SCIFA2 */
+       CLKDEV_DEV_ID("sh-sci.6", &mstp_clks[MSTP721]), /* SCIF0 */
+       CLKDEV_DEV_ID("sh-sci.7", &mstp_clks[MSTP720]), /* SCIF1 */
+       CLKDEV_DEV_ID("sh-sci.8", &mstp_clks[MSTP719]), /* SCIF2 */
+       CLKDEV_DEV_ID("sh-sci.9", &mstp_clks[MSTP718]), /* SCIF3 */
+       CLKDEV_DEV_ID("sh-sci.10", &mstp_clks[MSTP715]), /* SCIF4 */
+       CLKDEV_DEV_ID("sh-sci.11", &mstp_clks[MSTP714]), /* SCIF5 */
+       CLKDEV_DEV_ID("sh-sci.12", &mstp_clks[MSTP1105]), /* SCIFA3 */
+       CLKDEV_DEV_ID("sh-sci.13", &mstp_clks[MSTP1106]), /* SCIFA4 */
+       CLKDEV_DEV_ID("sh-sci.14", &mstp_clks[MSTP1107]), /* SCIFA5 */
+       CLKDEV_DEV_ID("sh_cmt.0", &mstp_clks[MSTP124]),
+};
+
+#define R8A7791_CLOCK_ROOT(e, m, p0, p1, p30, p31)             \
+       extal_clk.rate  = e * 1000 * 1000;                      \
+       main_clk.parent = m;                                    \
+       SH_CLK_SET_RATIO(&pll1_clk_ratio, p1 / 2, 1);           \
+       if (mode & MD(19))                                      \
+               SH_CLK_SET_RATIO(&pll3_clk_ratio, p31, 1);      \
+       else                                                    \
+               SH_CLK_SET_RATIO(&pll3_clk_ratio, p30, 1)
+
+
+void __init r8a7791_clock_init(void)
+{
+       void __iomem *modemr = ioremap_nocache(MODEMR, PAGE_SIZE);
+       u32 mode;
+       int k, ret = 0;
+
+       BUG_ON(!modemr);
+       mode = ioread32(modemr);
+       iounmap(modemr);
+
+       switch (mode & (MD(14) | MD(13))) {
+       case 0:
+               R8A7791_CLOCK_ROOT(15, &extal_clk, 172, 208, 106, 88);
+               break;
+       case MD(13):
+               R8A7791_CLOCK_ROOT(20, &extal_clk, 130, 156, 80, 66);
+               break;
+       case MD(14):
+               R8A7791_CLOCK_ROOT(26, &extal_div2_clk, 200, 240, 122, 102);
+               break;
+       case MD(13) | MD(14):
+               R8A7791_CLOCK_ROOT(30, &extal_div2_clk, 172, 208, 106, 88);
+               break;
+       }
+
+       for (k = 0; !ret && (k < ARRAY_SIZE(main_clks)); k++)
+               ret = clk_register(main_clks[k]);
+
+       if (!ret)
+               ret = sh_clk_mstp_register(mstp_clks, MSTP_NR);
+
+       clkdev_add_table(lookups, ARRAY_SIZE(lookups));
+
+       if (!ret)
+               shmobile_clk_init();
+       else
+               goto epanic;
+
+       return;
+
+epanic:
+       panic("failed to setup r8a7791 clocks\n");
+}
index f93751caf5cbf5f4d34e2099d494249b0eac02e8..e5be5c88644b70aa8bb6196807bff7f000085658 100644 (file)
@@ -40,6 +40,9 @@ shmobile_boot_fn:
        .globl  shmobile_boot_arg
 shmobile_boot_arg:
 2:     .space  4
+       .globl  shmobile_boot_size
+shmobile_boot_size:
+       .long   . - shmobile_boot_vector
 
 /*
  * Per-CPU SMP boot function/argument selection code based on MPIDR
index 7b938681e7569d29231b232d2be8f46d81f6be39..e31980590eb452bbc209400d303e9d6d016181d7 100644 (file)
@@ -9,16 +9,23 @@ extern void shmobile_setup_console(void);
 extern void shmobile_boot_vector(void);
 extern unsigned long shmobile_boot_fn;
 extern unsigned long shmobile_boot_arg;
+extern unsigned long shmobile_boot_size;
 extern void shmobile_smp_boot(void);
 extern void shmobile_smp_sleep(void);
 extern void shmobile_smp_hook(unsigned int cpu, unsigned long fn,
                              unsigned long arg);
+extern int shmobile_smp_cpu_disable(unsigned int cpu);
+extern void shmobile_invalidate_start(void);
 extern void shmobile_boot_scu(void);
 extern void shmobile_smp_scu_prepare_cpus(unsigned int max_cpus);
-extern int shmobile_smp_scu_boot_secondary(unsigned int cpu,
-                                          struct task_struct *idle);
 extern void shmobile_smp_scu_cpu_die(unsigned int cpu);
 extern int shmobile_smp_scu_cpu_kill(unsigned int cpu);
+extern void shmobile_smp_apmu_prepare_cpus(unsigned int max_cpus);
+extern int shmobile_smp_apmu_boot_secondary(unsigned int cpu,
+                                           struct task_struct *idle);
+extern void shmobile_smp_apmu_cpu_die(unsigned int cpu);
+extern int shmobile_smp_apmu_cpu_kill(unsigned int cpu);
+extern void shmobile_invalidate_start(void);
 struct clk;
 extern int shmobile_clk_init(void);
 extern void shmobile_handle_irq_intc(struct pt_regs *);
@@ -39,7 +46,6 @@ static inline int shmobile_cpuidle_init(void) { return 0; }
 #endif
 
 extern void __iomem *shmobile_scu_base;
-extern void shmobile_smp_init_cpus(unsigned int ncores);
 
 static inline void __init shmobile_init_late(void)
 {
diff --git a/arch/arm/mach-shmobile/include/mach/r7s72100.h b/arch/arm/mach-shmobile/include/mach/r7s72100.h
new file mode 100644 (file)
index 0000000..5f34b20
--- /dev/null
@@ -0,0 +1,8 @@
+#ifndef __ASM_R7S72100_H__
+#define __ASM_R7S72100_H__
+
+void r7s72100_add_dt_devices(void);
+void r7s72100_clock_init(void);
+void r7s72100_init_early(void);
+
+#endif /* __ASM_R7S72100_H__ */
index f3a9b702da56f326055029c8ffb81275b619d2ec..ce8bdd1d8a8a029616bb4b5929c55ba1f8726f8f 100644 (file)
@@ -1,10 +1,19 @@
 #ifndef __ASM_R8A73A4_H__
 #define __ASM_R8A73A4_H__
 
+/* DMA slave IDs */
+enum {
+       SHDMA_SLAVE_INVALID,
+       SHDMA_SLAVE_MMCIF0_TX,
+       SHDMA_SLAVE_MMCIF0_RX,
+       SHDMA_SLAVE_MMCIF1_TX,
+       SHDMA_SLAVE_MMCIF1_RX,
+};
+
 void r8a73a4_add_standard_devices(void);
 void r8a73a4_add_dt_devices(void);
 void r8a73a4_clock_init(void);
 void r8a73a4_pinmux_init(void);
-void r8a73a4_init_delay(void);
+void r8a73a4_init_early(void);
 
 #endif /* __ASM_R8A73A4_H__ */
index adfcf51b163dcd0503f51ec4961647534428daa5..441886c9714baddffb609247b872fca7054c514a 100644 (file)
@@ -1,6 +1,7 @@
 /*
  * Copyright (C) 2013  Renesas Solutions Corp.
  * Copyright (C) 2013  Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
+ * Copyright (C) 2013  Cogent Embedded, Inc.
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
 #include <linux/sh_eth.h>
 #include <linux/platform_data/camera-rcar.h>
 
+/* HPB-DMA slave IDs */
+enum {
+       HPBDMA_SLAVE_DUMMY,
+       HPBDMA_SLAVE_SDHI0_TX,
+       HPBDMA_SLAVE_SDHI0_RX,
+};
+
 extern void r8a7778_add_standard_devices(void);
 extern void r8a7778_add_standard_devices_dt(void);
-extern void r8a7778_add_ether_device(struct sh_eth_plat_data *pdata);
-extern void r8a7778_add_vin_device(int id,
-                                  struct rcar_vin_platform_data *pdata);
 extern void r8a7778_add_dt_devices(void);
 
 extern void r8a7778_init_late(void);
@@ -33,6 +38,9 @@ extern void r8a7778_init_delay(void);
 extern void r8a7778_init_irq_dt(void);
 extern void r8a7778_clock_init(void);
 extern void r8a7778_init_irq_extpin(int irlm);
+extern void r8a7778_init_irq_extpin_dt(int irlm);
 extern void r8a7778_pinmux_init(void);
 
+extern int r8a7778_usb_phy_power(bool enable);
+
 #endif /* __ASM_R8A7778_H__ */
index 11c740047e14cae3d8cef131e30961ee04e7bcd9..17af34ed89c801553b248f12f0d3c39336553854 100644 (file)
@@ -6,6 +6,13 @@
 #include <linux/sh_eth.h>
 #include <linux/platform_data/camera-rcar.h>
 
+/* HPB-DMA slave IDs */
+enum {
+       HPBDMA_SLAVE_DUMMY,
+       HPBDMA_SLAVE_SDHI0_TX,
+       HPBDMA_SLAVE_SDHI0_RX,
+};
+
 struct platform_device;
 
 struct r8a7779_pm_ch {
@@ -26,6 +33,7 @@ static inline struct r8a7779_pm_ch *to_r8a7779_ch(struct generic_pm_domain *d)
 
 extern void r8a7779_init_delay(void);
 extern void r8a7779_init_irq_extpin(int irlm);
+extern void r8a7779_init_irq_extpin_dt(int irlm);
 extern void r8a7779_init_irq_dt(void);
 extern void r8a7779_map_io(void);
 extern void r8a7779_earlytimer_init(void);
index 788d55952091b3f04ddd47f8b1847f2638503c92..5fbfa28b40b64353d5f801c4999395ee76f819b0 100644 (file)
@@ -1,14 +1,13 @@
 #ifndef __ASM_R8A7790_H__
 #define __ASM_R8A7790_H__
 
+#include <mach/rcar-gen2.h>
+
 void r8a7790_add_standard_devices(void);
 void r8a7790_add_dt_devices(void);
 void r8a7790_clock_init(void);
 void r8a7790_pinmux_init(void);
-void r8a7790_init_delay(void);
-void r8a7790_timer_init(void);
-
-#define MD(nr) BIT(nr)
-u32 r8a7790_read_mode_pins(void);
+void r8a7790_init_early(void);
+extern struct smp_operations r8a7790_smp_ops;
 
 #endif /* __ASM_R8A7790_H__ */
diff --git a/arch/arm/mach-shmobile/include/mach/r8a7791.h b/arch/arm/mach-shmobile/include/mach/r8a7791.h
new file mode 100644 (file)
index 0000000..051ead3
--- /dev/null
@@ -0,0 +1,10 @@
+#ifndef __ASM_R8A7791_H__
+#define __ASM_R8A7791_H__
+
+void r8a7791_add_standard_devices(void);
+void r8a7791_add_dt_devices(void);
+void r8a7791_clock_init(void);
+void r8a7791_init_early(void);
+extern struct smp_operations r8a7791_smp_ops;
+
+#endif /* __ASM_R8A7791_H__ */
diff --git a/arch/arm/mach-shmobile/include/mach/rcar-gen2.h b/arch/arm/mach-shmobile/include/mach/rcar-gen2.h
new file mode 100644 (file)
index 0000000..43f606e
--- /dev/null
@@ -0,0 +1,8 @@
+#ifndef __ASM_RCAR_GEN2_H__
+#define __ASM_RCAR_GEN2_H__
+
+void rcar_gen2_timer_init(void);
+#define MD(nr) BIT(nr)
+u32 rcar_gen2_read_mode_pins(void);
+
+#endif /* __ASM_RCAR_GEN2_H__ */
diff --git a/arch/arm/mach-shmobile/platsmp-apmu.c b/arch/arm/mach-shmobile/platsmp-apmu.c
new file mode 100644 (file)
index 0000000..1da5a72
--- /dev/null
@@ -0,0 +1,195 @@
+/*
+ * SMP support for SoCs with APMU
+ *
+ * Copyright (C) 2013  Magnus Damm
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+#include <linux/delay.h>
+#include <linux/init.h>
+#include <linux/io.h>
+#include <linux/ioport.h>
+#include <linux/of_address.h>
+#include <linux/smp.h>
+#include <asm/cacheflush.h>
+#include <asm/cp15.h>
+#include <asm/smp_plat.h>
+#include <mach/common.h>
+
+static struct {
+       void __iomem *iomem;
+       int bit;
+} apmu_cpus[CONFIG_NR_CPUS];
+
+#define WUPCR_OFFS 0x10
+#define PSTR_OFFS 0x40
+#define CPUNCR_OFFS(n) (0x100 + (0x10 * (n)))
+
+static int apmu_power_on(void __iomem *p, int bit)
+{
+       /* request power on */
+       writel_relaxed(BIT(bit), p + WUPCR_OFFS);
+
+       /* wait for APMU to finish */
+       while (readl_relaxed(p + WUPCR_OFFS) != 0)
+               ;
+
+       return 0;
+}
+
+static int apmu_power_off(void __iomem *p, int bit)
+{
+       /* request Core Standby for next WFI */
+       writel_relaxed(3, p + CPUNCR_OFFS(bit));
+       return 0;
+}
+
+static int apmu_power_off_poll(void __iomem *p, int bit)
+{
+       int k;
+
+       for (k = 0; k < 1000; k++) {
+               if (((readl_relaxed(p + PSTR_OFFS) >> (bit * 4)) & 0x03) == 3)
+                       return 1;
+
+               mdelay(1);
+       }
+
+       return 0;
+}
+
+static int apmu_wrap(int cpu, int (*fn)(void __iomem *p, int cpu))
+{
+       void __iomem *p = apmu_cpus[cpu].iomem;
+
+       return p ? fn(p, apmu_cpus[cpu].bit) : -EINVAL;
+}
+
+static void apmu_init_cpu(struct resource *res, int cpu, int bit)
+{
+       if (apmu_cpus[cpu].iomem)
+               return;
+
+       apmu_cpus[cpu].iomem = ioremap_nocache(res->start, resource_size(res));
+       apmu_cpus[cpu].bit = bit;
+
+       pr_debug("apmu ioremap %d %d 0x%08x 0x%08x\n", cpu, bit,
+                res->start, resource_size(res));
+}
+
+static struct {
+       struct resource iomem;
+       int cpus[4];
+} apmu_config[] = {
+       {
+               .iomem = DEFINE_RES_MEM(0xe6152000, 0x88),
+               .cpus = { 0, 1, 2, 3 },
+       },
+       {
+               .iomem = DEFINE_RES_MEM(0xe6151000, 0x88),
+               .cpus = { 0x100, 0x101, 0x102, 0x103 },
+       }
+};
+
+static void apmu_parse_cfg(void (*fn)(struct resource *res, int cpu, int bit))
+{
+       u32 id;
+       int k;
+       int bit, index;
+       bool is_allowed;
+
+       for (k = 0; k < ARRAY_SIZE(apmu_config); k++) {
+               /* only enable the cluster that includes the boot CPU */
+               is_allowed = false;
+               for (bit = 0; bit < ARRAY_SIZE(apmu_config[k].cpus); bit++) {
+                       id = apmu_config[k].cpus[bit];
+                       if (id >= 0) {
+                               if (id == cpu_logical_map(0))
+                                       is_allowed = true;
+                       }
+               }
+               if (!is_allowed)
+                       continue;
+
+               for (bit = 0; bit < ARRAY_SIZE(apmu_config[k].cpus); bit++) {
+                       id = apmu_config[k].cpus[bit];
+                       if (id >= 0) {
+                               index = get_logical_index(id);
+                               if (index >= 0)
+                                       fn(&apmu_config[k].iomem, index, bit);
+                       }
+               }
+       }
+}
+
+void __init shmobile_smp_apmu_prepare_cpus(unsigned int max_cpus)
+{
+       /* install boot code shared by all CPUs */
+       shmobile_boot_fn = virt_to_phys(shmobile_smp_boot);
+       shmobile_boot_arg = MPIDR_HWID_BITMASK;
+
+       /* perform per-cpu setup */
+       apmu_parse_cfg(apmu_init_cpu);
+}
+
+int shmobile_smp_apmu_boot_secondary(unsigned int cpu, struct task_struct *idle)
+{
+       /* For this particular CPU register boot vector */
+       shmobile_smp_hook(cpu, virt_to_phys(shmobile_invalidate_start), 0);
+
+       return apmu_wrap(cpu, apmu_power_on);
+}
+
+#ifdef CONFIG_HOTPLUG_CPU
+/* nicked from arch/arm/mach-exynos/hotplug.c */
+static inline void cpu_enter_lowpower_a15(void)
+{
+       unsigned int v;
+
+       asm volatile(
+       "       mrc     p15, 0, %0, c1, c0, 0\n"
+       "       bic     %0, %0, %1\n"
+       "       mcr     p15, 0, %0, c1, c0, 0\n"
+               : "=&r" (v)
+               : "Ir" (CR_C)
+               : "cc");
+
+       flush_cache_louis();
+
+       asm volatile(
+       /*
+        * Turn off coherency
+        */
+       "       mrc     p15, 0, %0, c1, c0, 1\n"
+       "       bic     %0, %0, %1\n"
+       "       mcr     p15, 0, %0, c1, c0, 1\n"
+               : "=&r" (v)
+               : "Ir" (0x40)
+               : "cc");
+
+       isb();
+       dsb();
+}
+
+void shmobile_smp_apmu_cpu_die(unsigned int cpu)
+{
+       /* For this particular CPU deregister boot vector */
+       shmobile_smp_hook(cpu, 0, 0);
+
+       /* Select next sleep mode using the APMU */
+       apmu_wrap(cpu, apmu_power_off);
+
+       /* Do ARM specific CPU shutdown */
+       cpu_enter_lowpower_a15();
+
+       /* jump to shared mach-shmobile sleep / reset code */
+       shmobile_smp_sleep();
+}
+
+int shmobile_smp_apmu_cpu_kill(unsigned int cpu)
+{
+       return apmu_wrap(cpu, apmu_power_off_poll);
+}
+#endif
index c96f50160be69eb8c0be9798c95374e664163615..673ad6e808694f1cab787fe6430090900efc8150 100644 (file)
@@ -7,6 +7,7 @@
  * it under the terms of the GNU General Public License version 2 as
  * published by the Free Software Foundation.
  */
+#include <linux/cpu.h>
 #include <linux/delay.h>
 #include <linux/init.h>
 #include <linux/io.h>
 #include <asm/smp_scu.h>
 #include <mach/common.h>
 
+static int shmobile_smp_scu_notifier_call(struct notifier_block *nfb,
+                                         unsigned long action, void *hcpu)
+{
+       unsigned int cpu = (long)hcpu;
+
+       switch (action) {
+       case CPU_UP_PREPARE:
+               /* For this particular CPU register SCU SMP boot vector */
+               shmobile_smp_hook(cpu, virt_to_phys(shmobile_boot_scu),
+                                 (unsigned long)shmobile_scu_base);
+               break;
+       };
+
+       return NOTIFY_OK;
+}
+
+static struct notifier_block shmobile_smp_scu_notifier = {
+       .notifier_call = shmobile_smp_scu_notifier_call,
+};
+
 void __init shmobile_smp_scu_prepare_cpus(unsigned int max_cpus)
 {
        /* install boot code shared by all CPUs */
@@ -25,14 +46,9 @@ void __init shmobile_smp_scu_prepare_cpus(unsigned int max_cpus)
        /* enable SCU and cache coherency on booting CPU */
        scu_enable(shmobile_scu_base);
        scu_power_mode(shmobile_scu_base, SCU_PM_NORMAL);
-}
 
-int shmobile_smp_scu_boot_secondary(unsigned int cpu, struct task_struct *idle)
-{
-       /* For this particular CPU register SCU boot vector */
-       shmobile_smp_hook(cpu, virt_to_phys(shmobile_boot_scu),
-                         (unsigned long)shmobile_scu_base);
-       return 0;
+       /* Use CPU notifier for reset vector control */
+       register_cpu_notifier(&shmobile_smp_scu_notifier);
 }
 
 #ifdef CONFIG_HOTPLUG_CPU
index d4ae616bcedb4f09c4342a8e19a0d9c7dc98f581..9ebc246b8d7dd7fc46505ba40691a0ff8e4dbb4f 100644 (file)
  * published by the Free Software Foundation.
  */
 #include <linux/init.h>
-#include <linux/smp.h>
 #include <asm/cacheflush.h>
 #include <asm/smp_plat.h>
 #include <mach/common.h>
 
-void __init shmobile_smp_init_cpus(unsigned int ncores)
-{
-       unsigned int i;
-
-       if (ncores > nr_cpu_ids) {
-               pr_warn("SMP: %u cores greater than maximum (%u), clipping\n",
-                       ncores, nr_cpu_ids);
-               ncores = nr_cpu_ids;
-       }
-
-       for (i = 0; i < ncores; i++)
-               set_cpu_possible(i, true);
-}
-
 extern unsigned long shmobile_smp_fn[];
 extern unsigned long shmobile_smp_arg[];
 extern unsigned long shmobile_smp_mpidr[];
@@ -44,3 +29,10 @@ void shmobile_smp_hook(unsigned int cpu, unsigned long fn, unsigned long arg)
        shmobile_smp_arg[cpu] = arg;
        flush_cache_all();
 }
+
+#ifdef CONFIG_HOTPLUG_CPU
+int shmobile_smp_cpu_disable(unsigned int cpu)
+{
+       return 0; /* Hotplug of any CPU is supported */
+}
+#endif
diff --git a/arch/arm/mach-shmobile/setup-r7s72100.c b/arch/arm/mach-shmobile/setup-r7s72100.c
new file mode 100644 (file)
index 0000000..d4eb509
--- /dev/null
@@ -0,0 +1,88 @@
+/*
+ * r7s72100 processor support
+ *
+ * Copyright (C) 2013  Renesas Solutions Corp.
+ * Copyright (C) 2013  Magnus Damm
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ */
+
+#include <linux/irq.h>
+#include <linux/kernel.h>
+#include <linux/of_platform.h>
+#include <linux/serial_sci.h>
+#include <mach/common.h>
+#include <mach/irqs.h>
+#include <mach/r7s72100.h>
+#include <asm/mach/arch.h>
+
+#define SCIF_DATA(index, baseaddr, irq)                                        \
+[index] = {                                                            \
+       .type           = PORT_SCIF,                                    \
+       .regtype        = SCIx_SH2_SCIF_FIFODATA_REGTYPE,               \
+       .flags          = UPF_BOOT_AUTOCONF | UPF_IOREMAP,              \
+       .scbrr_algo_id  = SCBRR_ALGO_2,                                 \
+       .scscr          = SCSCR_RIE | SCSCR_TIE | SCSCR_RE | SCSCR_TE | \
+                         SCSCR_REIE,                                   \
+       .mapbase        = baseaddr,                                     \
+       .irqs           = { irq + 1, irq + 2, irq + 3, irq },           \
+}
+
+enum { SCIF0, SCIF1, SCIF2, SCIF3, SCIF4, SCIF5, SCIF6, SCIF7 };
+
+static const struct plat_sci_port scif[] __initconst = {
+       SCIF_DATA(SCIF0, 0xe8007000, gic_iid(221)), /* SCIF0 */
+       SCIF_DATA(SCIF1, 0xe8007800, gic_iid(225)), /* SCIF1 */
+       SCIF_DATA(SCIF2, 0xe8008000, gic_iid(229)), /* SCIF2 */
+       SCIF_DATA(SCIF3, 0xe8008800, gic_iid(233)), /* SCIF3 */
+       SCIF_DATA(SCIF4, 0xe8009000, gic_iid(237)), /* SCIF4 */
+       SCIF_DATA(SCIF5, 0xe8009800, gic_iid(241)), /* SCIF5 */
+       SCIF_DATA(SCIF6, 0xe800a000, gic_iid(245)), /* SCIF6 */
+       SCIF_DATA(SCIF7, 0xe800a800, gic_iid(249)), /* SCIF7 */
+};
+
+static inline void r7s72100_register_scif(int idx)
+{
+       platform_device_register_data(&platform_bus, "sh-sci", idx, &scif[idx],
+                                     sizeof(struct plat_sci_port));
+}
+
+void __init r7s72100_add_dt_devices(void)
+{
+       r7s72100_register_scif(SCIF0);
+       r7s72100_register_scif(SCIF1);
+       r7s72100_register_scif(SCIF2);
+       r7s72100_register_scif(SCIF3);
+       r7s72100_register_scif(SCIF4);
+       r7s72100_register_scif(SCIF5);
+       r7s72100_register_scif(SCIF6);
+       r7s72100_register_scif(SCIF7);
+}
+
+void __init r7s72100_init_early(void)
+{
+       shmobile_setup_delay(400, 1, 3); /* Cortex-A9 @ 400MHz */
+}
+
+#ifdef CONFIG_USE_OF
+static const char *r7s72100_boards_compat_dt[] __initdata = {
+       "renesas,r7s72100",
+       NULL,
+};
+
+DT_MACHINE_START(R7S72100_DT, "Generic R7S72100 (Flattened Device Tree)")
+       .init_early     = r7s72100_init_early,
+       .dt_compat      = r7s72100_boards_compat_dt,
+MACHINE_END
+#endif /* CONFIG_USE_OF */
index 89491700afb78b8c706aba61b638ffb699031610..b0f2749071bec3feee42e44a82c52449a8494e81 100644 (file)
 #include <linux/of_platform.h>
 #include <linux/platform_data/irq-renesas-irqc.h>
 #include <linux/serial_sci.h>
+#include <linux/sh_dma.h>
 #include <linux/sh_timer.h>
 #include <mach/common.h>
+#include <mach/dma-register.h>
 #include <mach/irqs.h>
 #include <mach/r8a73a4.h>
 #include <asm/mach/arch.h>
@@ -199,15 +201,104 @@ void __init r8a73a4_add_dt_devices(void)
        r8a7790_register_cmt(10);
 }
 
+/* DMA */
+static const struct sh_dmae_slave_config dma_slaves[] = {
+       {
+               .slave_id       = SHDMA_SLAVE_MMCIF0_TX,
+               .addr           = 0xee200034,
+               .chcr           = CHCR_TX(XMIT_SZ_32BIT),
+               .mid_rid        = 0xd1,
+       }, {
+               .slave_id       = SHDMA_SLAVE_MMCIF0_RX,
+               .addr           = 0xee200034,
+               .chcr           = CHCR_RX(XMIT_SZ_32BIT),
+               .mid_rid        = 0xd2,
+       }, {
+               .slave_id       = SHDMA_SLAVE_MMCIF1_TX,
+               .addr           = 0xee220034,
+               .chcr           = CHCR_TX(XMIT_SZ_32BIT),
+               .mid_rid        = 0xe1,
+       }, {
+               .slave_id       = SHDMA_SLAVE_MMCIF1_RX,
+               .addr           = 0xee220034,
+               .chcr           = CHCR_RX(XMIT_SZ_32BIT),
+               .mid_rid        = 0xe2,
+       },
+};
+
+#define DMAE_CHANNEL(a, b)                             \
+       {                                               \
+               .offset         = (a) - 0x20,           \
+               .dmars          = (a) - 0x20 + 0x40,    \
+               .chclr_bit      = (b),                  \
+               .chclr_offset   = 0x80 - 0x20,          \
+       }
+
+static const struct sh_dmae_channel dma_channels[] = {
+       DMAE_CHANNEL(0x8000, 0),
+       DMAE_CHANNEL(0x8080, 1),
+       DMAE_CHANNEL(0x8100, 2),
+       DMAE_CHANNEL(0x8180, 3),
+       DMAE_CHANNEL(0x8200, 4),
+       DMAE_CHANNEL(0x8280, 5),
+       DMAE_CHANNEL(0x8300, 6),
+       DMAE_CHANNEL(0x8380, 7),
+       DMAE_CHANNEL(0x8400, 8),
+       DMAE_CHANNEL(0x8480, 9),
+       DMAE_CHANNEL(0x8500, 10),
+       DMAE_CHANNEL(0x8580, 11),
+       DMAE_CHANNEL(0x8600, 12),
+       DMAE_CHANNEL(0x8680, 13),
+       DMAE_CHANNEL(0x8700, 14),
+       DMAE_CHANNEL(0x8780, 15),
+       DMAE_CHANNEL(0x8800, 16),
+       DMAE_CHANNEL(0x8880, 17),
+       DMAE_CHANNEL(0x8900, 18),
+       DMAE_CHANNEL(0x8980, 19),
+};
+
+static const struct sh_dmae_pdata dma_pdata = {
+       .slave          = dma_slaves,
+       .slave_num      = ARRAY_SIZE(dma_slaves),
+       .channel        = dma_channels,
+       .channel_num    = ARRAY_SIZE(dma_channels),
+       .ts_low_shift   = TS_LOW_SHIFT,
+       .ts_low_mask    = TS_LOW_BIT << TS_LOW_SHIFT,
+       .ts_high_shift  = TS_HI_SHIFT,
+       .ts_high_mask   = TS_HI_BIT << TS_HI_SHIFT,
+       .ts_shift       = dma_ts_shift,
+       .ts_shift_num   = ARRAY_SIZE(dma_ts_shift),
+       .dmaor_init     = DMAOR_DME,
+       .chclr_present  = 1,
+       .chclr_bitwise  = 1,
+};
+
+static struct resource dma_resources[] = {
+       DEFINE_RES_MEM(0xe6700020, 0x89e0),
+       DEFINE_RES_IRQ_NAMED(gic_spi(220), "error_irq"),
+       {
+               /* IRQ for channels 0-19 */
+               .start  = gic_spi(200),
+               .end    = gic_spi(219),
+               .flags  = IORESOURCE_IRQ,
+       },
+};
+
+#define r8a73a4_register_dmac()                                                        \
+       platform_device_register_resndata(&platform_bus, "sh-dma-engine", 0,    \
+                               dma_resources, ARRAY_SIZE(dma_resources),       \
+                               &dma_pdata, sizeof(dma_pdata))
+
 void __init r8a73a4_add_standard_devices(void)
 {
        r8a73a4_add_dt_devices();
        r8a73a4_register_irqc(0);
        r8a73a4_register_irqc(1);
        r8a73a4_register_thermal();
+       r8a73a4_register_dmac();
 }
 
-void __init r8a73a4_init_delay(void)
+void __init r8a73a4_init_early(void)
 {
 #ifndef CONFIG_ARM_ARCH_TIMER
        shmobile_setup_delay(1500, 2, 4); /* Cortex-A15 @ 1500MHz */
@@ -222,7 +313,7 @@ static const char *r8a73a4_boards_compat_dt[] __initdata = {
 };
 
 DT_MACHINE_START(R8A73A4_DT, "Generic R8A73A4 (Flattened Device Tree)")
-       .init_early     = r8a73a4_init_delay,
+       .init_early     = r8a73a4_init_early,
        .dt_compat      = r8a73a4_boards_compat_dt,
 MACHINE_END
 #endif /* CONFIG_USE_OF */
index 6a2657ebd19775c4a9c79bae91f7aa0dac2bc812..03fcc5974ef92170c5002bf857ddb35e95a49d57 100644 (file)
@@ -24,6 +24,7 @@
 #include <linux/irqchip/arm-gic.h>
 #include <linux/of.h>
 #include <linux/of_platform.h>
+#include <linux/platform_data/dma-rcar-hpbdma.h>
 #include <linux/platform_data/gpio-rcar.h>
 #include <linux/platform_data/irq-renesas-intc-irqpin.h>
 #include <linux/platform_device.h>
@@ -95,29 +96,46 @@ static struct sh_timer_config sh_tmu1_platform_data __initdata = {
                &sh_tmu##idx##_platform_data,           \
                sizeof(sh_tmu##idx##_platform_data))
 
-/* USB */
-static struct usb_phy *phy;
+int r8a7778_usb_phy_power(bool enable)
+{
+       static struct usb_phy *phy = NULL;
+       int ret = 0;
 
+       if (!phy)
+               phy = usb_get_phy(USB_PHY_TYPE_USB2);
+
+       if (IS_ERR(phy)) {
+               pr_err("kernel doesn't have usb phy driver\n");
+               return PTR_ERR(phy);
+       }
+
+       if (enable)
+               ret = usb_phy_init(phy);
+       else
+               usb_phy_shutdown(phy);
+
+       return ret;
+}
+
+/* USB */
 static int usb_power_on(struct platform_device *pdev)
 {
-       if (IS_ERR(phy))
-               return PTR_ERR(phy);
+       int ret = r8a7778_usb_phy_power(true);
+
+       if (ret)
+               return ret;
 
        pm_runtime_enable(&pdev->dev);
        pm_runtime_get_sync(&pdev->dev);
 
-       usb_phy_init(phy);
-
        return 0;
 }
 
 static void usb_power_off(struct platform_device *pdev)
 {
-       if (IS_ERR(phy))
+       if (r8a7778_usb_phy_power(false))
                return;
 
-       usb_phy_shutdown(phy);
-
        pm_runtime_put_sync(&pdev->dev);
        pm_runtime_disable(&pdev->dev);
 }
@@ -174,20 +192,6 @@ static struct platform_device_info hci##_info __initdata = {       \
 USB_PLATFORM_INFO(ehci);
 USB_PLATFORM_INFO(ohci);
 
-/* Ether */
-static struct resource ether_resources[] __initdata = {
-       DEFINE_RES_MEM(0xfde00000, 0x400),
-       DEFINE_RES_IRQ(gic_iid(0x89)),
-};
-
-void __init r8a7778_add_ether_device(struct sh_eth_plat_data *pdata)
-{
-       platform_device_register_resndata(&platform_bus, "r8a777x-ether", -1,
-                                         ether_resources,
-                                         ARRAY_SIZE(ether_resources),
-                                         pdata, sizeof(*pdata));
-}
-
 /* PFC/GPIO */
 static struct resource pfc_resources[] __initdata = {
        DEFINE_RES_MEM(0xfffc0000, 0x118),
@@ -272,7 +276,7 @@ static struct resource hspi_resources[] __initdata = {
        DEFINE_RES_IRQ(gic_iid(0x75)),
 };
 
-void __init r8a7778_register_hspi(int id)
+static void __init r8a7778_register_hspi(int id)
 {
        BUG_ON(id < 0 || id > 2);
 
@@ -281,40 +285,6 @@ void __init r8a7778_register_hspi(int id)
                hspi_resources + (2 * id), 2);
 }
 
-/* VIN */
-#define R8A7778_VIN(idx)                                               \
-static struct resource vin##idx##_resources[] __initdata = {           \
-       DEFINE_RES_MEM(0xffc50000 + 0x1000 * (idx), 0x1000),            \
-       DEFINE_RES_IRQ(gic_iid(0x5a)),                                  \
-};                                                                     \
-                                                                       \
-static struct platform_device_info vin##idx##_info __initdata = {      \
-       .parent         = &platform_bus,                                \
-       .name           = "r8a7778-vin",                                \
-       .id             = idx,                                          \
-       .res            = vin##idx##_resources,                         \
-       .num_res        = ARRAY_SIZE(vin##idx##_resources),             \
-       .dma_mask       = DMA_BIT_MASK(32),                             \
-}
-
-R8A7778_VIN(0);
-R8A7778_VIN(1);
-
-static struct platform_device_info *vin_info_table[] __initdata = {
-       &vin0_info,
-       &vin1_info,
-};
-
-void __init r8a7778_add_vin_device(int id, struct rcar_vin_platform_data *pdata)
-{
-       BUG_ON(id < 0 || id > 1);
-
-       vin_info_table[id]->data = pdata;
-       vin_info_table[id]->size_data = sizeof(*pdata);
-
-       platform_device_register_full(vin_info_table[id]);
-}
-
 void __init r8a7778_add_dt_devices(void)
 {
        int i;
@@ -339,6 +309,88 @@ void __init r8a7778_add_dt_devices(void)
        r8a7778_register_tmu(1);
 }
 
+/* HPB-DMA */
+
+/* Asynchronous mode register (ASYNCMDR) bits */
+#define HPB_DMAE_ASYNCMDR_ASMD22_MASK  BIT(2)  /* SDHI0 */
+#define HPB_DMAE_ASYNCMDR_ASMD22_SINGLE        BIT(2)  /* SDHI0 */
+#define HPB_DMAE_ASYNCMDR_ASMD22_MULTI 0       /* SDHI0 */
+#define HPB_DMAE_ASYNCMDR_ASMD21_MASK  BIT(1)  /* SDHI0 */
+#define HPB_DMAE_ASYNCMDR_ASMD21_SINGLE        BIT(1)  /* SDHI0 */
+#define HPB_DMAE_ASYNCMDR_ASMD21_MULTI 0       /* SDHI0 */
+
+static const struct hpb_dmae_slave_config hpb_dmae_slaves[] = {
+       {
+               .id     = HPBDMA_SLAVE_SDHI0_TX,
+               .addr   = 0xffe4c000 + 0x30,
+               .dcr    = HPB_DMAE_DCR_SPDS_16BIT |
+                         HPB_DMAE_DCR_DMDL |
+                         HPB_DMAE_DCR_DPDS_16BIT,
+               .rstr   = HPB_DMAE_ASYNCRSTR_ASRST21 |
+                         HPB_DMAE_ASYNCRSTR_ASRST22 |
+                         HPB_DMAE_ASYNCRSTR_ASRST23,
+               .mdr    = HPB_DMAE_ASYNCMDR_ASMD21_MULTI,
+               .mdm    = HPB_DMAE_ASYNCMDR_ASMD21_MASK,
+               .port   = 0x0D0C,
+               .flags  = HPB_DMAE_SET_ASYNC_RESET | HPB_DMAE_SET_ASYNC_MODE,
+               .dma_ch = 21,
+       }, {
+               .id     = HPBDMA_SLAVE_SDHI0_RX,
+               .addr   = 0xffe4c000 + 0x30,
+               .dcr    = HPB_DMAE_DCR_SMDL |
+                         HPB_DMAE_DCR_SPDS_16BIT |
+                         HPB_DMAE_DCR_DPDS_16BIT,
+               .rstr   = HPB_DMAE_ASYNCRSTR_ASRST21 |
+                         HPB_DMAE_ASYNCRSTR_ASRST22 |
+                         HPB_DMAE_ASYNCRSTR_ASRST23,
+               .mdr    = HPB_DMAE_ASYNCMDR_ASMD22_MULTI,
+               .mdm    = HPB_DMAE_ASYNCMDR_ASMD22_MASK,
+               .port   = 0x0D0C,
+               .flags  = HPB_DMAE_SET_ASYNC_RESET | HPB_DMAE_SET_ASYNC_MODE,
+               .dma_ch = 22,
+       },
+};
+
+static const struct hpb_dmae_channel hpb_dmae_channels[] = {
+       HPB_DMAE_CHANNEL(0x7e, HPBDMA_SLAVE_SDHI0_TX), /* ch. 21 */
+       HPB_DMAE_CHANNEL(0x7e, HPBDMA_SLAVE_SDHI0_RX), /* ch. 22 */
+};
+
+static struct hpb_dmae_pdata dma_platform_data __initdata = {
+       .slaves                 = hpb_dmae_slaves,
+       .num_slaves             = ARRAY_SIZE(hpb_dmae_slaves),
+       .channels               = hpb_dmae_channels,
+       .num_channels           = ARRAY_SIZE(hpb_dmae_channels),
+       .ts_shift               = {
+               [XMIT_SZ_8BIT]  = 0,
+               [XMIT_SZ_16BIT] = 1,
+               [XMIT_SZ_32BIT] = 2,
+       },
+       .num_hw_channels        = 39,
+};
+
+static struct resource hpb_dmae_resources[] __initdata = {
+       /* Channel registers */
+       DEFINE_RES_MEM(0xffc08000, 0x1000),
+       /* Common registers */
+       DEFINE_RES_MEM(0xffc09000, 0x170),
+       /* Asynchronous reset registers */
+       DEFINE_RES_MEM(0xffc00300, 4),
+       /* Asynchronous mode registers */
+       DEFINE_RES_MEM(0xffc00400, 4),
+       /* IRQ for DMA channels */
+       DEFINE_RES_NAMED(gic_iid(0x7b), 5, NULL, IORESOURCE_IRQ),
+};
+
+static void __init r8a7778_register_hpb_dmae(void)
+{
+       platform_device_register_resndata(&platform_bus, "hpb-dma-engine", -1,
+                                         hpb_dmae_resources,
+                                         ARRAY_SIZE(hpb_dmae_resources),
+                                         &dma_platform_data,
+                                         sizeof(dma_platform_data));
+}
+
 void __init r8a7778_add_standard_devices(void)
 {
        r8a7778_add_dt_devices();
@@ -349,12 +401,12 @@ void __init r8a7778_add_standard_devices(void)
        r8a7778_register_hspi(0);
        r8a7778_register_hspi(1);
        r8a7778_register_hspi(2);
+
+       r8a7778_register_hpb_dmae();
 }
 
 void __init r8a7778_init_late(void)
 {
-       phy = usb_get_phy(USB_PHY_TYPE_USB2);
-
        platform_device_register_full(&ehci_info);
        platform_device_register_full(&ohci_info);
 }
@@ -376,7 +428,7 @@ static struct resource irqpin_resources[] __initdata = {
        DEFINE_RES_IRQ(gic_iid(0x3e)), /* IRQ3 */
 };
 
-void __init r8a7778_init_irq_extpin(int irlm)
+void __init r8a7778_init_irq_extpin_dt(int irlm)
 {
        void __iomem *icr0 = ioremap_nocache(0xfe780000, PAGE_SIZE);
        unsigned long tmp;
@@ -394,7 +446,11 @@ void __init r8a7778_init_irq_extpin(int irlm)
        tmp |= (1 << 21); /* LVLMODE = 1 */
        iowrite32(tmp, icr0);
        iounmap(icr0);
+}
 
+void __init r8a7778_init_irq_extpin(int irlm)
+{
+       r8a7778_init_irq_extpin_dt(irlm);
        if (irlm)
                platform_device_register_resndata(
                        &platform_bus, "renesas_intc_irqpin", -1,
index ecd0148ee1e1711144eb2fd75bc146d97a582bb6..13049e9d691ca17d7be5d5d3dc9b8b565b42a3e3 100644 (file)
@@ -25,6 +25,7 @@
 #include <linux/irqchip.h>
 #include <linux/irqchip/arm-gic.h>
 #include <linux/of_platform.h>
+#include <linux/platform_data/dma-rcar-hpbdma.h>
 #include <linux/platform_data/gpio-rcar.h>
 #include <linux/platform_data/irq-renesas-intc-irqpin.h>
 #include <linux/platform_device.h>
@@ -97,7 +98,7 @@ static struct resource irqpin0_resources[] __initdata = {
        DEFINE_RES_IRQ(gic_spi(30)), /* IRQ3 */
 };
 
-void __init r8a7779_init_irq_extpin(int irlm)
+void __init r8a7779_init_irq_extpin_dt(int irlm)
 {
        void __iomem *icr0 = ioremap_nocache(0xfe780000, PAGE_SIZE);
        u32 tmp;
@@ -115,7 +116,11 @@ void __init r8a7779_init_irq_extpin(int irlm)
        tmp |= (1 << 21); /* LVLMODE = 1 */
        iowrite32(tmp, icr0);
        iounmap(icr0);
+}
 
+void __init r8a7779_init_irq_extpin(int irlm)
+{
+       r8a7779_init_irq_extpin_dt(irlm);
        if (irlm)
                platform_device_register_resndata(
                        &platform_bus, "renesas_intc_irqpin", -1,
@@ -632,6 +637,158 @@ static struct platform_device_info *vin_info_table[] __initdata = {
        &vin3_info,
 };
 
+/* HPB-DMA */
+
+/* Asynchronous mode register bits */
+#define HPB_DMAE_ASYNCMDR_ASMD43_MASK          BIT(23) /* MMC1 */
+#define HPB_DMAE_ASYNCMDR_ASMD43_SINGLE                BIT(23) /* MMC1 */
+#define HPB_DMAE_ASYNCMDR_ASMD43_MULTI         0       /* MMC1 */
+#define HPB_DMAE_ASYNCMDR_ASBTMD43_MASK                BIT(22) /* MMC1 */
+#define HPB_DMAE_ASYNCMDR_ASBTMD43_BURST       BIT(22) /* MMC1 */
+#define HPB_DMAE_ASYNCMDR_ASBTMD43_NBURST      0       /* MMC1 */
+#define HPB_DMAE_ASYNCMDR_ASMD24_MASK          BIT(21) /* MMC0 */
+#define HPB_DMAE_ASYNCMDR_ASMD24_SINGLE                BIT(21) /* MMC0 */
+#define HPB_DMAE_ASYNCMDR_ASMD24_MULTI         0       /* MMC0 */
+#define HPB_DMAE_ASYNCMDR_ASBTMD24_MASK                BIT(20) /* MMC0 */
+#define HPB_DMAE_ASYNCMDR_ASBTMD24_BURST       BIT(20) /* MMC0 */
+#define HPB_DMAE_ASYNCMDR_ASBTMD24_NBURST      0       /* MMC0 */
+#define HPB_DMAE_ASYNCMDR_ASMD41_MASK          BIT(19) /* SDHI3 */
+#define HPB_DMAE_ASYNCMDR_ASMD41_SINGLE                BIT(19) /* SDHI3 */
+#define HPB_DMAE_ASYNCMDR_ASMD41_MULTI         0       /* SDHI3 */
+#define HPB_DMAE_ASYNCMDR_ASBTMD41_MASK                BIT(18) /* SDHI3 */
+#define HPB_DMAE_ASYNCMDR_ASBTMD41_BURST       BIT(18) /* SDHI3 */
+#define HPB_DMAE_ASYNCMDR_ASBTMD41_NBURST      0       /* SDHI3 */
+#define HPB_DMAE_ASYNCMDR_ASMD40_MASK          BIT(17) /* SDHI3 */
+#define HPB_DMAE_ASYNCMDR_ASMD40_SINGLE                BIT(17) /* SDHI3 */
+#define HPB_DMAE_ASYNCMDR_ASMD40_MULTI         0       /* SDHI3 */
+#define HPB_DMAE_ASYNCMDR_ASBTMD40_MASK                BIT(16) /* SDHI3 */
+#define HPB_DMAE_ASYNCMDR_ASBTMD40_BURST       BIT(16) /* SDHI3 */
+#define HPB_DMAE_ASYNCMDR_ASBTMD40_NBURST      0       /* SDHI3 */
+#define HPB_DMAE_ASYNCMDR_ASMD39_MASK          BIT(15) /* SDHI3 */
+#define HPB_DMAE_ASYNCMDR_ASMD39_SINGLE                BIT(15) /* SDHI3 */
+#define HPB_DMAE_ASYNCMDR_ASMD39_MULTI         0       /* SDHI3 */
+#define HPB_DMAE_ASYNCMDR_ASBTMD39_MASK                BIT(14) /* SDHI3 */
+#define HPB_DMAE_ASYNCMDR_ASBTMD39_BURST       BIT(14) /* SDHI3 */
+#define HPB_DMAE_ASYNCMDR_ASBTMD39_NBURST      0       /* SDHI3 */
+#define HPB_DMAE_ASYNCMDR_ASMD27_MASK          BIT(13) /* SDHI2 */
+#define HPB_DMAE_ASYNCMDR_ASMD27_SINGLE                BIT(13) /* SDHI2 */
+#define HPB_DMAE_ASYNCMDR_ASMD27_MULTI         0       /* SDHI2 */
+#define HPB_DMAE_ASYNCMDR_ASBTMD27_MASK                BIT(12) /* SDHI2 */
+#define HPB_DMAE_ASYNCMDR_ASBTMD27_BURST       BIT(12) /* SDHI2 */
+#define HPB_DMAE_ASYNCMDR_ASBTMD27_NBURST      0       /* SDHI2 */
+#define HPB_DMAE_ASYNCMDR_ASMD26_MASK          BIT(11) /* SDHI2 */
+#define HPB_DMAE_ASYNCMDR_ASMD26_SINGLE                BIT(11) /* SDHI2 */
+#define HPB_DMAE_ASYNCMDR_ASMD26_MULTI         0       /* SDHI2 */
+#define HPB_DMAE_ASYNCMDR_ASBTMD26_MASK                BIT(10) /* SDHI2 */
+#define HPB_DMAE_ASYNCMDR_ASBTMD26_BURST       BIT(10) /* SDHI2 */
+#define HPB_DMAE_ASYNCMDR_ASBTMD26_NBURST      0       /* SDHI2 */
+#define HPB_DMAE_ASYNCMDR_ASMD25_MASK          BIT(9)  /* SDHI2 */
+#define HPB_DMAE_ASYNCMDR_ASMD25_SINGLE                BIT(9)  /* SDHI2 */
+#define HPB_DMAE_ASYNCMDR_ASMD25_MULTI         0       /* SDHI2 */
+#define HPB_DMAE_ASYNCMDR_ASBTMD25_MASK                BIT(8)  /* SDHI2 */
+#define HPB_DMAE_ASYNCMDR_ASBTMD25_BURST       BIT(8)  /* SDHI2 */
+#define HPB_DMAE_ASYNCMDR_ASBTMD25_NBURST      0       /* SDHI2 */
+#define HPB_DMAE_ASYNCMDR_ASMD23_MASK          BIT(7)  /* SDHI0 */
+#define HPB_DMAE_ASYNCMDR_ASMD23_SINGLE                BIT(7)  /* SDHI0 */
+#define HPB_DMAE_ASYNCMDR_ASMD23_MULTI         0       /* SDHI0 */
+#define HPB_DMAE_ASYNCMDR_ASBTMD23_MASK                BIT(6)  /* SDHI0 */
+#define HPB_DMAE_ASYNCMDR_ASBTMD23_BURST       BIT(6)  /* SDHI0 */
+#define HPB_DMAE_ASYNCMDR_ASBTMD23_NBURST      0       /* SDHI0 */
+#define HPB_DMAE_ASYNCMDR_ASMD22_MASK          BIT(5)  /* SDHI0 */
+#define HPB_DMAE_ASYNCMDR_ASMD22_SINGLE                BIT(5)  /* SDHI0 */
+#define HPB_DMAE_ASYNCMDR_ASMD22_MULTI         0       /* SDHI0 */
+#define HPB_DMAE_ASYNCMDR_ASBTMD22_MASK                BIT(4)  /* SDHI0 */
+#define HPB_DMAE_ASYNCMDR_ASBTMD22_BURST       BIT(4)  /* SDHI0 */
+#define HPB_DMAE_ASYNCMDR_ASBTMD22_NBURST      0       /* SDHI0 */
+#define HPB_DMAE_ASYNCMDR_ASMD21_MASK          BIT(3)  /* SDHI0 */
+#define HPB_DMAE_ASYNCMDR_ASMD21_SINGLE                BIT(3)  /* SDHI0 */
+#define HPB_DMAE_ASYNCMDR_ASMD21_MULTI         0       /* SDHI0 */
+#define HPB_DMAE_ASYNCMDR_ASBTMD21_MASK                BIT(2)  /* SDHI0 */
+#define HPB_DMAE_ASYNCMDR_ASBTMD21_BURST       BIT(2)  /* SDHI0 */
+#define HPB_DMAE_ASYNCMDR_ASBTMD21_NBURST      0       /* SDHI0 */
+#define HPB_DMAE_ASYNCMDR_ASMD20_MASK          BIT(1)  /* SDHI1 */
+#define HPB_DMAE_ASYNCMDR_ASMD20_SINGLE                BIT(1)  /* SDHI1 */
+#define HPB_DMAE_ASYNCMDR_ASMD20_MULTI         0       /* SDHI1 */
+#define HPB_DMAE_ASYNCMDR_ASBTMD20_MASK                BIT(0)  /* SDHI1 */
+#define HPB_DMAE_ASYNCMDR_ASBTMD20_BURST       BIT(0)  /* SDHI1 */
+#define HPB_DMAE_ASYNCMDR_ASBTMD20_NBURST      0       /* SDHI1 */
+
+static const struct hpb_dmae_slave_config hpb_dmae_slaves[] = {
+       {
+               .id     = HPBDMA_SLAVE_SDHI0_TX,
+               .addr   = 0xffe4c000 + 0x30,
+               .dcr    = HPB_DMAE_DCR_SPDS_16BIT |
+                         HPB_DMAE_DCR_DMDL |
+                         HPB_DMAE_DCR_DPDS_16BIT,
+               .rstr   = HPB_DMAE_ASYNCRSTR_ASRST21 |
+                         HPB_DMAE_ASYNCRSTR_ASRST22 |
+                         HPB_DMAE_ASYNCRSTR_ASRST23,
+               .mdr    = HPB_DMAE_ASYNCMDR_ASMD21_SINGLE |
+                         HPB_DMAE_ASYNCMDR_ASBTMD21_NBURST,
+               .mdm    = HPB_DMAE_ASYNCMDR_ASMD21_MASK |
+                         HPB_DMAE_ASYNCMDR_ASBTMD21_MASK,
+               .port   = 0x0D0C,
+               .flags  = HPB_DMAE_SET_ASYNC_RESET | HPB_DMAE_SET_ASYNC_MODE,
+               .dma_ch = 21,
+       }, {
+               .id     = HPBDMA_SLAVE_SDHI0_RX,
+               .addr   = 0xffe4c000 + 0x30,
+               .dcr    = HPB_DMAE_DCR_SMDL |
+                         HPB_DMAE_DCR_SPDS_16BIT |
+                         HPB_DMAE_DCR_DPDS_16BIT,
+               .rstr   = HPB_DMAE_ASYNCRSTR_ASRST21 |
+                         HPB_DMAE_ASYNCRSTR_ASRST22 |
+                         HPB_DMAE_ASYNCRSTR_ASRST23,
+               .mdr    = HPB_DMAE_ASYNCMDR_ASMD22_SINGLE |
+                         HPB_DMAE_ASYNCMDR_ASBTMD22_NBURST,
+               .mdm    = HPB_DMAE_ASYNCMDR_ASMD22_MASK |
+                         HPB_DMAE_ASYNCMDR_ASBTMD22_MASK,
+               .port   = 0x0D0C,
+               .flags  = HPB_DMAE_SET_ASYNC_RESET | HPB_DMAE_SET_ASYNC_MODE,
+               .dma_ch = 22,
+       },
+};
+
+static const struct hpb_dmae_channel hpb_dmae_channels[] = {
+       HPB_DMAE_CHANNEL(0x93, HPBDMA_SLAVE_SDHI0_TX), /* ch. 21 */
+       HPB_DMAE_CHANNEL(0x93, HPBDMA_SLAVE_SDHI0_RX), /* ch. 22 */
+};
+
+static struct hpb_dmae_pdata dma_platform_data __initdata = {
+       .slaves                 = hpb_dmae_slaves,
+       .num_slaves             = ARRAY_SIZE(hpb_dmae_slaves),
+       .channels               = hpb_dmae_channels,
+       .num_channels           = ARRAY_SIZE(hpb_dmae_channels),
+       .ts_shift               = {
+               [XMIT_SZ_8BIT]  = 0,
+               [XMIT_SZ_16BIT] = 1,
+               [XMIT_SZ_32BIT] = 2,
+       },
+       .num_hw_channels        = 44,
+};
+
+static struct resource hpb_dmae_resources[] __initdata = {
+       /* Channel registers */
+       DEFINE_RES_MEM(0xffc08000, 0x1000),
+       /* Common registers */
+       DEFINE_RES_MEM(0xffc09000, 0x170),
+       /* Asynchronous reset registers */
+       DEFINE_RES_MEM(0xffc00300, 4),
+       /* Asynchronous mode registers */
+       DEFINE_RES_MEM(0xffc00400, 4),
+       /* IRQ for DMA channels */
+       DEFINE_RES_NAMED(gic_iid(0x8e), 12, NULL, IORESOURCE_IRQ),
+};
+
+static void __init r8a7779_register_hpb_dmae(void)
+{
+       platform_device_register_resndata(&platform_bus, "hpb-dma-engine", -1,
+                                         hpb_dmae_resources,
+                                         ARRAY_SIZE(hpb_dmae_resources),
+                                         &dma_platform_data,
+                                         sizeof(dma_platform_data));
+}
+
 static struct platform_device *r8a7779_devices_dt[] __initdata = {
        &scif0_device,
        &scif1_device,
@@ -665,6 +822,7 @@ void __init r8a7779_add_standard_devices(void)
                            ARRAY_SIZE(r8a7779_devices_dt));
        platform_add_devices(r8a7779_standard_devices,
                            ARRAY_SIZE(r8a7779_standard_devices));
+       r8a7779_register_hpb_dmae();
 }
 
 void __init r8a7779_add_ether_device(struct sh_eth_plat_data *pdata)
index d0f5c9f9349a186412da1f912fc9dbcac0e851d0..c47bcebbcb00bbfa229d16c9d2fcad2430ef631e 100644 (file)
@@ -18,7 +18,6 @@
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
-#include <linux/clocksource.h>
 #include <linux/irq.h>
 #include <linux/kernel.h>
 #include <linux/of_platform.h>
 #include <mach/r8a7790.h>
 #include <asm/mach/arch.h>
 
-static struct resource pfc_resources[] __initdata = {
+static const struct resource pfc_resources[] __initconst = {
        DEFINE_RES_MEM(0xe6060000, 0x250),
 };
 
 #define R8A7790_GPIO(idx)                                              \
-static struct resource r8a7790_gpio##idx##_resources[] __initdata = {  \
+static const struct resource r8a7790_gpio##idx##_resources[] __initconst = { \
        DEFINE_RES_MEM(0xe6050000 + 0x1000 * (idx), 0x50),              \
        DEFINE_RES_IRQ(gic_spi(4 + (idx))),                             \
 };                                                                     \
                                                                        \
-static struct gpio_rcar_config r8a7790_gpio##idx##_platform_data __initdata = {        \
+static const struct gpio_rcar_config                                   \
+r8a7790_gpio##idx##_platform_data __initconst = {                      \
        .gpio_base      = 32 * (idx),                                   \
        .irq_base       = 0,                                            \
        .number_of_pins = 32,                                           \
@@ -112,7 +112,7 @@ void __init r8a7790_pinmux_init(void)
 enum { SCIFA0, SCIFA1, SCIFB0, SCIFB1, SCIFB2, SCIFA2, SCIF0, SCIF1,
        HSCIF0, HSCIF1 };
 
-static struct plat_sci_port scif[] __initdata = {
+static const struct plat_sci_port scif[] __initconst = {
        SCIFA_DATA(SCIFA0, 0xe6c40000, gic_spi(144)), /* SCIFA0 */
        SCIFA_DATA(SCIFA1, 0xe6c50000, gic_spi(145)), /* SCIFA1 */
        SCIFB_DATA(SCIFB0, 0xe6c20000, gic_spi(148)), /* SCIFB0 */
@@ -131,11 +131,11 @@ static inline void r8a7790_register_scif(int idx)
                                      sizeof(struct plat_sci_port));
 }
 
-static struct renesas_irqc_config irqc0_data __initdata = {
+static const struct renesas_irqc_config irqc0_data __initconst = {
        .irq_base = irq_pin(0), /* IRQ0 -> IRQ3 */
 };
 
-static struct resource irqc0_resources[] __initdata = {
+static const struct resource irqc0_resources[] __initconst = {
        DEFINE_RES_MEM(0xe61c0000, 0x200), /* IRQC Event Detector Block_0 */
        DEFINE_RES_IRQ(gic_spi(0)), /* IRQ0 */
        DEFINE_RES_IRQ(gic_spi(1)), /* IRQ1 */
@@ -150,7 +150,7 @@ static struct resource irqc0_resources[] __initdata = {
                                          &irqc##idx##_data,            \
                                          sizeof(struct renesas_irqc_config))
 
-static struct resource thermal_resources[] __initdata = {
+static const struct resource thermal_resources[] __initconst = {
        DEFINE_RES_MEM(0xe61f0000, 0x14),
        DEFINE_RES_MEM(0xe61f0100, 0x38),
        DEFINE_RES_IRQ(gic_spi(69)),
@@ -161,13 +161,13 @@ static struct resource thermal_resources[] __initdata = {
                                        thermal_resources,              \
                                        ARRAY_SIZE(thermal_resources))
 
-static struct sh_timer_config cmt00_platform_data __initdata = {
+static const struct sh_timer_config cmt00_platform_data __initconst = {
        .name = "CMT00",
        .timer_bit = 0,
        .clockevent_rating = 80,
 };
 
-static struct resource cmt00_resources[] __initdata = {
+static const struct resource cmt00_resources[] __initconst = {
        DEFINE_RES_MEM(0xffca0510, 0x0c),
        DEFINE_RES_MEM(0xffca0500, 0x04),
        DEFINE_RES_IRQ(gic_spi(142)), /* CMT0_0 */
@@ -202,72 +202,7 @@ void __init r8a7790_add_standard_devices(void)
        r8a7790_register_thermal();
 }
 
-#define MODEMR 0xe6160060
-
-u32 __init r8a7790_read_mode_pins(void)
-{
-       void __iomem *modemr = ioremap_nocache(MODEMR, 4);
-       u32 mode;
-
-       BUG_ON(!modemr);
-       mode = ioread32(modemr);
-       iounmap(modemr);
-
-       return mode;
-}
-
-#define CNTCR 0
-#define CNTFID0 0x20
-
-void __init r8a7790_timer_init(void)
-{
-#ifdef CONFIG_ARM_ARCH_TIMER
-       u32 mode = r8a7790_read_mode_pins();
-       void __iomem *base;
-       int extal_mhz = 0;
-       u32 freq;
-
-       /* At Linux boot time the r8a7790 arch timer comes up
-        * with the counter disabled. Moreover, it may also report
-        * a potentially incorrect fixed 13 MHz frequency. To be
-        * correct these registers need to be updated to use the
-        * frequency EXTAL / 2 which can be determined by the MD pins.
-        */
-
-       switch (mode & (MD(14) | MD(13))) {
-       case 0:
-               extal_mhz = 15;
-               break;
-       case MD(13):
-               extal_mhz = 20;
-               break;
-       case MD(14):
-               extal_mhz = 26;
-               break;
-       case MD(13) | MD(14):
-               extal_mhz = 30;
-               break;
-       }
-
-       /* The arch timer frequency equals EXTAL / 2 */
-       freq = extal_mhz * (1000000 / 2);
-
-       /* Remap "armgcnt address map" space */
-       base = ioremap(0xe6080000, PAGE_SIZE);
-
-       /* Update registers with correct frequency */
-       iowrite32(freq, base + CNTFID0);
-       asm volatile("mcr p15, 0, %0, c14, c0, 0" : : "r" (freq));
-
-       /* make sure arch timer is started by setting bit 0 of CNTCR */
-       iowrite32(1, base + CNTCR);
-       iounmap(base);
-#endif /* CONFIG_ARM_ARCH_TIMER */
-
-       clocksource_of_init();
-}
-
-void __init r8a7790_init_delay(void)
+void __init r8a7790_init_early(void)
 {
 #ifndef CONFIG_ARM_ARCH_TIMER
        shmobile_setup_delay(1300, 2, 4); /* Cortex-A15 @ 1300MHz */
@@ -276,14 +211,15 @@ void __init r8a7790_init_delay(void)
 
 #ifdef CONFIG_USE_OF
 
-static const char *r8a7790_boards_compat_dt[] __initdata = {
+static const char * const r8a7790_boards_compat_dt[] __initconst = {
        "renesas,r8a7790",
        NULL,
 };
 
 DT_MACHINE_START(R8A7790_DT, "Generic R8A7790 (Flattened Device Tree)")
-       .init_early     = r8a7790_init_delay,
-       .init_time      = r8a7790_timer_init,
+       .smp            = smp_ops(r8a7790_smp_ops),
+       .init_early     = r8a7790_init_early,
+       .init_time      = rcar_gen2_timer_init,
        .dt_compat      = r8a7790_boards_compat_dt,
 MACHINE_END
 #endif /* CONFIG_USE_OF */
diff --git a/arch/arm/mach-shmobile/setup-r8a7791.c b/arch/arm/mach-shmobile/setup-r8a7791.c
new file mode 100644 (file)
index 0000000..d9393d6
--- /dev/null
@@ -0,0 +1,184 @@
+/*
+ * r8a7791 processor support
+ *
+ * Copyright (C) 2013  Renesas Electronics Corporation
+ * Copyright (C) 2013  Renesas Solutions Corp.
+ * Copyright (C) 2013  Magnus Damm
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ */
+
+#include <linux/irq.h>
+#include <linux/kernel.h>
+#include <linux/of_platform.h>
+#include <linux/platform_data/irq-renesas-irqc.h>
+#include <linux/serial_sci.h>
+#include <linux/sh_timer.h>
+#include <mach/common.h>
+#include <mach/irqs.h>
+#include <mach/r8a7791.h>
+#include <mach/rcar-gen2.h>
+#include <asm/mach/arch.h>
+
+#define SCIF_COMMON(scif_type, baseaddr, irq)                  \
+       .type           = scif_type,                            \
+       .mapbase        = baseaddr,                             \
+       .flags          = UPF_BOOT_AUTOCONF | UPF_IOREMAP,      \
+       .irqs           = SCIx_IRQ_MUXED(irq)
+
+#define SCIFA_DATA(index, baseaddr, irq)               \
+[index] = {                                            \
+       SCIF_COMMON(PORT_SCIFA, baseaddr, irq),         \
+       .scbrr_algo_id  = SCBRR_ALGO_4,                 \
+       .scscr = SCSCR_RE | SCSCR_TE,   \
+}
+
+#define SCIFB_DATA(index, baseaddr, irq)       \
+[index] = {                                    \
+       SCIF_COMMON(PORT_SCIFB, baseaddr, irq), \
+       .scbrr_algo_id  = SCBRR_ALGO_4,         \
+       .scscr = SCSCR_RE | SCSCR_TE,           \
+}
+
+#define SCIF_DATA(index, baseaddr, irq)                \
+[index] = {                                            \
+       SCIF_COMMON(PORT_SCIF, baseaddr, irq),          \
+       .scbrr_algo_id  = SCBRR_ALGO_2,                 \
+       .scscr = SCSCR_RE | SCSCR_TE,   \
+}
+
+#define HSCIF_DATA(index, baseaddr, irq)               \
+[index] = {                                            \
+       SCIF_COMMON(PORT_HSCIF, baseaddr, irq),         \
+       .scbrr_algo_id  = SCBRR_ALGO_6,                 \
+       .scscr = SCSCR_RE | SCSCR_TE,   \
+}
+
+enum { SCIFA0, SCIFA1, SCIFB0, SCIFB1, SCIFB2, SCIFA2, SCIF0, SCIF1,
+       SCIF2, SCIF3, SCIF4, SCIF5, SCIFA3, SCIFA4, SCIFA5 };
+
+static const struct plat_sci_port scif[] __initconst = {
+       SCIFA_DATA(SCIFA0, 0xe6c40000, gic_spi(144)), /* SCIFA0 */
+       SCIFA_DATA(SCIFA1, 0xe6c50000, gic_spi(145)), /* SCIFA1 */
+       SCIFB_DATA(SCIFB0, 0xe6c20000, gic_spi(148)), /* SCIFB0 */
+       SCIFB_DATA(SCIFB1, 0xe6c30000, gic_spi(149)), /* SCIFB1 */
+       SCIFB_DATA(SCIFB2, 0xe6ce0000, gic_spi(150)), /* SCIFB2 */
+       SCIFA_DATA(SCIFA2, 0xe6c60000, gic_spi(151)), /* SCIFA2 */
+       SCIF_DATA(SCIF0, 0xe6e60000, gic_spi(152)), /* SCIF0 */
+       SCIF_DATA(SCIF1, 0xe6e68000, gic_spi(153)), /* SCIF1 */
+       SCIF_DATA(SCIF2, 0xe6e58000, gic_spi(22)), /* SCIF2 */
+       SCIF_DATA(SCIF3, 0xe6ea8000, gic_spi(23)), /* SCIF3 */
+       SCIF_DATA(SCIF4, 0xe6ee0000, gic_spi(24)), /* SCIF4 */
+       SCIF_DATA(SCIF5, 0xe6ee8000, gic_spi(25)), /* SCIF5 */
+       SCIFA_DATA(SCIFA3, 0xe6c70000, gic_spi(29)), /* SCIFA3 */
+       SCIFA_DATA(SCIFA4, 0xe6c78000, gic_spi(30)), /* SCIFA4 */
+       SCIFA_DATA(SCIFA5, 0xe6c80000, gic_spi(31)), /* SCIFA5 */
+};
+
+static inline void r8a7791_register_scif(int idx)
+{
+       platform_device_register_data(&platform_bus, "sh-sci", idx, &scif[idx],
+                                     sizeof(struct plat_sci_port));
+}
+
+static const struct sh_timer_config cmt00_platform_data __initconst = {
+       .name = "CMT00",
+       .timer_bit = 0,
+       .clockevent_rating = 80,
+};
+
+static const struct resource cmt00_resources[] __initconst = {
+       DEFINE_RES_MEM(0xffca0510, 0x0c),
+       DEFINE_RES_MEM(0xffca0500, 0x04),
+       DEFINE_RES_IRQ(gic_spi(142)), /* CMT0_0 */
+};
+
+#define r8a7791_register_cmt(idx)                                      \
+       platform_device_register_resndata(&platform_bus, "sh_cmt",      \
+                                         idx, cmt##idx##_resources,    \
+                                         ARRAY_SIZE(cmt##idx##_resources), \
+                                         &cmt##idx##_platform_data,    \
+                                         sizeof(struct sh_timer_config))
+
+static struct renesas_irqc_config irqc0_data = {
+       .irq_base = irq_pin(0), /* IRQ0 -> IRQ9 */
+};
+
+static struct resource irqc0_resources[] = {
+       DEFINE_RES_MEM(0xe61c0000, 0x200), /* IRQC Event Detector Block_0 */
+       DEFINE_RES_IRQ(gic_spi(0)), /* IRQ0 */
+       DEFINE_RES_IRQ(gic_spi(1)), /* IRQ1 */
+       DEFINE_RES_IRQ(gic_spi(2)), /* IRQ2 */
+       DEFINE_RES_IRQ(gic_spi(3)), /* IRQ3 */
+       DEFINE_RES_IRQ(gic_spi(12)), /* IRQ4 */
+       DEFINE_RES_IRQ(gic_spi(13)), /* IRQ5 */
+       DEFINE_RES_IRQ(gic_spi(14)), /* IRQ6 */
+       DEFINE_RES_IRQ(gic_spi(15)), /* IRQ7 */
+       DEFINE_RES_IRQ(gic_spi(16)), /* IRQ8 */
+       DEFINE_RES_IRQ(gic_spi(17)), /* IRQ9 */
+};
+
+#define r8a7791_register_irqc(idx)                                     \
+       platform_device_register_resndata(&platform_bus, "renesas_irqc", \
+                                         idx, irqc##idx##_resources,   \
+                                         ARRAY_SIZE(irqc##idx##_resources), \
+                                         &irqc##idx##_data,            \
+                                         sizeof(struct renesas_irqc_config))
+
+void __init r8a7791_add_dt_devices(void)
+{
+       r8a7791_register_scif(SCIFA0);
+       r8a7791_register_scif(SCIFA1);
+       r8a7791_register_scif(SCIFB0);
+       r8a7791_register_scif(SCIFB1);
+       r8a7791_register_scif(SCIFB2);
+       r8a7791_register_scif(SCIFA2);
+       r8a7791_register_scif(SCIF0);
+       r8a7791_register_scif(SCIF1);
+       r8a7791_register_scif(SCIF2);
+       r8a7791_register_scif(SCIF3);
+       r8a7791_register_scif(SCIF4);
+       r8a7791_register_scif(SCIF5);
+       r8a7791_register_scif(SCIFA3);
+       r8a7791_register_scif(SCIFA4);
+       r8a7791_register_scif(SCIFA5);
+       r8a7791_register_cmt(00);
+}
+
+void __init r8a7791_add_standard_devices(void)
+{
+       r8a7791_add_dt_devices();
+       r8a7791_register_irqc(0);
+}
+
+void __init r8a7791_init_early(void)
+{
+#ifndef CONFIG_ARM_ARCH_TIMER
+       shmobile_setup_delay(1300, 2, 4); /* Cortex-A15 @ 1300MHz */
+#endif
+}
+
+#ifdef CONFIG_USE_OF
+static const char *r8a7791_boards_compat_dt[] __initdata = {
+       "renesas,r8a7791",
+       NULL,
+};
+
+DT_MACHINE_START(R8A7791_DT, "Generic R8A7791 (Flattened Device Tree)")
+       .smp            = smp_ops(r8a7791_smp_ops),
+       .init_early     = r8a7791_init_early,
+       .init_time      = rcar_gen2_timer_init,
+       .dt_compat      = r8a7791_boards_compat_dt,
+MACHINE_END
+#endif /* CONFIG_USE_OF */
diff --git a/arch/arm/mach-shmobile/setup-rcar-gen2.c b/arch/arm/mach-shmobile/setup-rcar-gen2.c
new file mode 100644 (file)
index 0000000..5734c24
--- /dev/null
@@ -0,0 +1,91 @@
+/*
+ * R-Car Generation 2 support
+ *
+ * Copyright (C) 2013  Renesas Solutions Corp.
+ * Copyright (C) 2013  Magnus Damm
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ */
+
+#include <linux/clocksource.h>
+#include <linux/io.h>
+#include <linux/kernel.h>
+#include <mach/common.h>
+#include <mach/rcar-gen2.h>
+#include <asm/mach/arch.h>
+
+#define MODEMR 0xe6160060
+
+u32 __init rcar_gen2_read_mode_pins(void)
+{
+       void __iomem *modemr = ioremap_nocache(MODEMR, 4);
+       u32 mode;
+
+       BUG_ON(!modemr);
+       mode = ioread32(modemr);
+       iounmap(modemr);
+
+       return mode;
+}
+
+#define CNTCR 0
+#define CNTFID0 0x20
+
+void __init rcar_gen2_timer_init(void)
+{
+#ifdef CONFIG_ARM_ARCH_TIMER
+       u32 mode = rcar_gen2_read_mode_pins();
+       void __iomem *base;
+       int extal_mhz = 0;
+       u32 freq;
+
+       /* At Linux boot time the r8a7790 arch timer comes up
+        * with the counter disabled. Moreover, it may also report
+        * a potentially incorrect fixed 13 MHz frequency. To be
+        * correct these registers need to be updated to use the
+        * frequency EXTAL / 2 which can be determined by the MD pins.
+        */
+
+       switch (mode & (MD(14) | MD(13))) {
+       case 0:
+               extal_mhz = 15;
+               break;
+       case MD(13):
+               extal_mhz = 20;
+               break;
+       case MD(14):
+               extal_mhz = 26;
+               break;
+       case MD(13) | MD(14):
+               extal_mhz = 30;
+               break;
+       }
+
+       /* The arch timer frequency equals EXTAL / 2 */
+       freq = extal_mhz * (1000000 / 2);
+
+       /* Remap "armgcnt address map" space */
+       base = ioremap(0xe6080000, PAGE_SIZE);
+
+       /* Update registers with correct frequency */
+       iowrite32(freq, base + CNTFID0);
+       asm volatile("mcr p15, 0, %0, c14, c0, 0" : : "r" (freq));
+
+       /* make sure arch timer is started by setting bit 0 of CNTCR */
+       iowrite32(1, base + CNTCR);
+       iounmap(base);
+#endif /* CONFIG_ARM_ARCH_TIMER */
+
+       clocksource_of_init();
+}
index 522de5ebb55fd727004e3934e4a38d8e2357462c..f2ca92308f7568f851289626fddd9c25c6064fee 100644 (file)
 
 static int emev2_boot_secondary(unsigned int cpu, struct task_struct *idle)
 {
-       int ret;
-
-       ret = shmobile_smp_scu_boot_secondary(cpu, idle);
-       if (ret)
-               return ret;
-
        arch_send_wakeup_ipi_mask(cpumask_of(cpu_logical_map(cpu)));
        return 0;
 }
index 0f05e9fb722fbfd0c3b921b6caa5a85d68b5d25d..627c1f0d9478b36ff79342d25053b9557d429189 100644 (file)
@@ -87,10 +87,6 @@ static int r8a7779_boot_secondary(unsigned int cpu, struct task_struct *idle)
        unsigned int lcpu = cpu_logical_map(cpu);
        int ret;
 
-       ret = shmobile_smp_scu_boot_secondary(cpu, idle);
-       if (ret)
-               return ret;
-
        if (lcpu < ARRAY_SIZE(r8a7779_ch_cpu))
                ch = r8a7779_ch_cpu[lcpu];
 
diff --git a/arch/arm/mach-shmobile/smp-r8a7790.c b/arch/arm/mach-shmobile/smp-r8a7790.c
new file mode 100644 (file)
index 0000000..015e275
--- /dev/null
@@ -0,0 +1,67 @@
+/*
+ * SMP support for r8a7790
+ *
+ * Copyright (C) 2012-2013 Renesas Solutions Corp.
+ * Copyright (C) 2012 Takashi Yoshii <takashi.yoshii.ze@renesas.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */
+#include <linux/kernel.h>
+#include <linux/init.h>
+#include <linux/smp.h>
+#include <linux/io.h>
+#include <asm/smp_plat.h>
+#include <mach/common.h>
+
+#define RST            0xe6160000
+#define CA15BAR                0x0020
+#define CA7BAR         0x0030
+#define CA15RESCNT     0x0040
+#define CA7RESCNT      0x0044
+#define MERAM          0xe8080000
+
+static void __init r8a7790_smp_prepare_cpus(unsigned int max_cpus)
+{
+       void __iomem *p;
+       u32 bar;
+
+       /* let APMU code install data related to shmobile_boot_vector */
+       shmobile_smp_apmu_prepare_cpus(max_cpus);
+
+       /* MERAM for jump stub, because BAR requires 256KB aligned address */
+       p = ioremap_nocache(MERAM, shmobile_boot_size);
+       memcpy_toio(p, shmobile_boot_vector, shmobile_boot_size);
+       iounmap(p);
+
+       /* setup reset vectors */
+       p = ioremap_nocache(RST, 0x63);
+       bar = (MERAM >> 8) & 0xfffffc00;
+       writel_relaxed(bar, p + CA15BAR);
+       writel_relaxed(bar, p + CA7BAR);
+       writel_relaxed(bar | 0x10, p + CA15BAR);
+       writel_relaxed(bar | 0x10, p + CA7BAR);
+
+       /* enable clocks to all CPUs */
+       writel_relaxed((readl_relaxed(p + CA15RESCNT) & ~0x0f) | 0xa5a50000,
+                      p + CA15RESCNT);
+       writel_relaxed((readl_relaxed(p + CA7RESCNT) & ~0x0f) | 0x5a5a0000,
+                      p + CA7RESCNT);
+       iounmap(p);
+}
+
+struct smp_operations r8a7790_smp_ops __initdata = {
+       .smp_prepare_cpus       = r8a7790_smp_prepare_cpus,
+       .smp_boot_secondary     = shmobile_smp_apmu_boot_secondary,
+#ifdef CONFIG_HOTPLUG_CPU
+       .cpu_disable            = shmobile_smp_cpu_disable,
+       .cpu_die                = shmobile_smp_apmu_cpu_die,
+       .cpu_kill               = shmobile_smp_apmu_cpu_kill,
+#endif
+};
diff --git a/arch/arm/mach-shmobile/smp-r8a7791.c b/arch/arm/mach-shmobile/smp-r8a7791.c
new file mode 100644 (file)
index 0000000..2df5bd1
--- /dev/null
@@ -0,0 +1,62 @@
+/*
+ * SMP support for r8a7791
+ *
+ * Copyright (C) 2013 Renesas Solutions Corp.
+ * Copyright (C) 2013 Magnus Damm
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */
+#include <linux/kernel.h>
+#include <linux/init.h>
+#include <linux/smp.h>
+#include <linux/io.h>
+#include <asm/smp_plat.h>
+#include <mach/common.h>
+#include <mach/r8a7791.h>
+
+#define RST            0xe6160000
+#define CA15BAR                0x0020
+#define CA15RESCNT     0x0040
+#define RAM            0xe6300000
+
+static void __init r8a7791_smp_prepare_cpus(unsigned int max_cpus)
+{
+       void __iomem *p;
+       u32 bar;
+
+       /* let APMU code install data related to shmobile_boot_vector */
+       shmobile_smp_apmu_prepare_cpus(max_cpus);
+
+       /* RAM for jump stub, because BAR requires 256KB aligned address */
+       p = ioremap_nocache(RAM, shmobile_boot_size);
+       memcpy_toio(p, shmobile_boot_vector, shmobile_boot_size);
+       iounmap(p);
+
+       /* setup reset vectors */
+       p = ioremap_nocache(RST, 0x63);
+       bar = (RAM >> 8) & 0xfffffc00;
+       writel_relaxed(bar, p + CA15BAR);
+       writel_relaxed(bar | 0x10, p + CA15BAR);
+
+       /* enable clocks to all CPUs */
+       writel_relaxed((readl_relaxed(p + CA15RESCNT) & ~0x0f) | 0xa5a50000,
+                      p + CA15RESCNT);
+       iounmap(p);
+}
+
+struct smp_operations r8a7791_smp_ops __initdata = {
+       .smp_prepare_cpus       = r8a7791_smp_prepare_cpus,
+       .smp_boot_secondary     = shmobile_smp_apmu_boot_secondary,
+#ifdef CONFIG_HOTPLUG_CPU
+       .cpu_disable            = shmobile_smp_cpu_disable,
+       .cpu_die                = shmobile_smp_apmu_cpu_die,
+       .cpu_kill               = shmobile_smp_apmu_cpu_kill,
+#endif
+};
index 0baa24443793402b2313969e8a2bdb0ac81e0038..13ba36a6831fb2374ff62dcfc967cf426b98ae3c 100644 (file)
@@ -46,11 +46,6 @@ void __init sh73a0_register_twd(void)
 static int sh73a0_boot_secondary(unsigned int cpu, struct task_struct *idle)
 {
        unsigned int lcpu = cpu_logical_map(cpu);
-       int ret;
-
-       ret = shmobile_smp_scu_boot_secondary(cpu, idle);
-       if (ret)
-               return ret;
 
        if (((__raw_readl(PSTR) >> (4 * lcpu)) & 3) == 3)
                __raw_writel(1 << lcpu, WUPCR); /* wake up */
@@ -71,18 +66,11 @@ static void __init sh73a0_smp_prepare_cpus(unsigned int max_cpus)
        shmobile_smp_scu_prepare_cpus(max_cpus);
 }
 
-#ifdef CONFIG_HOTPLUG_CPU
-static int sh73a0_cpu_disable(unsigned int cpu)
-{
-       return 0; /* CPU0 and CPU1 supported */
-}
-#endif /* CONFIG_HOTPLUG_CPU */
-
 struct smp_operations sh73a0_smp_ops __initdata = {
        .smp_prepare_cpus       = sh73a0_smp_prepare_cpus,
        .smp_boot_secondary     = sh73a0_boot_secondary,
 #ifdef CONFIG_HOTPLUG_CPU
-       .cpu_disable            = sh73a0_cpu_disable,
+       .cpu_disable            = shmobile_smp_cpu_disable,
        .cpu_die                = shmobile_smp_scu_cpu_die,
        .cpu_kill               = shmobile_smp_scu_cpu_kill,
 #endif
index dd86db467521956f6a1d06f5a157f77ce7ac4e5e..037100a1563aca5f52dd2e68f42c711dc71484c2 100644 (file)
@@ -4,7 +4,6 @@ config ARCH_SOCFPGA
        select ARM_AMBA
        select ARM_GIC
        select CACHE_L2X0
-       select CLKDEV_LOOKUP
        select COMMON_CLK
        select CPU_V7
        select DW_APB_TIMER_OF
index bfce9641e32f76299aa8555b997fe2e55fb142ad..dd0d49cdbe097c09fb15d0a652f2aa6d10e60db9 100644 (file)
@@ -14,7 +14,6 @@
  * You should have received a copy of the GNU General Public License
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
-#include <linux/clk-provider.h>
 #include <linux/irqchip.h>
 #include <linux/of_address.h>
 #include <linux/of_irq.h>
@@ -107,7 +106,6 @@ static void __init socfpga_cyclone5_init(void)
 {
        l2x0_of_init(0, ~0UL);
        of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
-       of_clk_init(NULL);
        socfpga_init_clocks();
 }
 
index df0d59afeb402a63ba2dad7bd86a81e12211e1b3..ac1710e64d9afbda6e9cb9f68ac1302eb38b4661 100644 (file)
@@ -7,11 +7,9 @@ menuconfig PLAT_SPEAR
        default PLAT_SPEAR_SINGLE
        select ARCH_REQUIRE_GPIOLIB
        select ARM_AMBA
-       select CLKDEV_LOOKUP
        select CLKSRC_MMIO
        select COMMON_CLK
        select GENERIC_CLOCKEVENTS
-       select HAVE_CLK
 
 if PLAT_SPEAR
 
index 8fe6f0c464809691c4be22c040ce4d3a3b72c22e..1217fb598cfdc7dacd877e9df8a8fee3dc83ba43 100644 (file)
@@ -7,9 +7,8 @@
  * published by the Free Software Foundation.
  */
 
-#include <linux/clk-provider.h>
-#include <linux/clocksource.h>
 #include <linux/irq.h>
+#include <linux/of_platform.h>
 #include <asm/hardware/cache-l2x0.h>
 #include <asm/mach/arch.h>
 
@@ -28,11 +27,10 @@ void __init stih41x_l2x0_init(void)
        l2x0_of_init(aux_ctrl, L2X0_AUX_CTRL_MASK);
 }
 
-static void __init stih41x_timer_init(void)
+static void __init stih41x_machine_init(void)
 {
-       of_clk_init(NULL);
-       clocksource_of_init();
        stih41x_l2x0_init();
+       of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
 }
 
 static const char *stih41x_dt_match[] __initdata = {
@@ -42,7 +40,7 @@ static const char *stih41x_dt_match[] __initdata = {
 };
 
 DT_MACHINE_START(STM, "STiH415/416 SoC with Flattened Device Tree")
-       .init_time      = stih41x_timer_init,
+       .init_machine   = stih41x_machine_init,
        .smp            = smp_ops(sti_smp_ops),
        .dt_compat      = stih41x_dt_match,
 MACHINE_END
index e79fb3469341d1f6907d39b66aa7c08be5f80940..90dda622851073bb2c78453ae20edd7e463ebf16 100644 (file)
@@ -10,7 +10,6 @@
  * warranty of any kind, whether express or implied.
  */
 
-#include <linux/clocksource.h>
 #include <linux/delay.h>
 #include <linux/kernel.h>
 #include <linux/init.h>
@@ -20,8 +19,6 @@
 #include <linux/io.h>
 #include <linux/reboot.h>
 
-#include <linux/clk/sunxi.h>
-
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
 #include <asm/system_misc.h>
@@ -116,12 +113,6 @@ static void sunxi_setup_restart(void)
        arm_pm_restart = of_id->data;
 }
 
-static void __init sunxi_timer_init(void)
-{
-       sunxi_init_clocks();
-       clocksource_of_init();
-}
-
 static void __init sunxi_dt_init(void)
 {
        sunxi_setup_restart();
@@ -140,6 +131,5 @@ static const char * const sunxi_board_dt_compat[] = {
 
 DT_MACHINE_START(SUNXI_DT, "Allwinner A1X (Device Tree)")
        .init_machine   = sunxi_dt_init,
-       .init_time      = sunxi_timer_init,
        .dt_compat      = sunxi_board_dt_compat,
 MACHINE_END
index f26428d8b62a18828a08cd0ff42bc08f35e5b206..f8d1276d18afca4fd3960a79af12b4cd425e8cf9 100644 (file)
@@ -3,7 +3,6 @@ config ARCH_TEGRA
        select ARCH_HAS_CPUFREQ
        select ARCH_REQUIRE_GPIOLIB
        select ARM_GIC
-       select CLKDEV_LOOKUP
        select CLKSRC_MMIO
        select CLKSRC_OF
        select COMMON_CLK
@@ -11,7 +10,6 @@ config ARCH_TEGRA
        select GENERIC_CLOCKEVENTS
        select HAVE_ARM_SCU if SMP
        select HAVE_ARM_TWD if SMP
-       select HAVE_CLK
        select HAVE_SMP
        select MIGHT_HAVE_CACHE_L2X0
        select MIGHT_HAVE_PCI
@@ -53,9 +51,9 @@ config ARCH_TEGRA_3x_SOC
 
 config ARCH_TEGRA_114_SOC
        bool "Enable support for Tegra114 family"
-       select HAVE_ARM_ARCH_TIMER
        select ARM_ERRATA_798181 if SMP
        select ARM_L1_CACHE_SHIFT_6
+       select HAVE_ARM_ARCH_TIMER
        select PINCTRL_TEGRA114
        help
          Support for NVIDIA Tegra T114 processor family, based on the
index e7e5f45c6558d6a004b653be43b8a664694e7b1d..97eb48e977e553afa0d66b786a1091bbc2bdbd77 100644 (file)
@@ -1,6 +1,5 @@
 asflags-y                              += -march=armv7-a
 
-obj-y                                   += common.o
 obj-y                                   += io.o
 obj-y                                   += irq.o
 obj-y                                  += fuse.o
index 740e16f64728f5c457cb2ccd303718b9278abaf8..06f024070dab6ef9a826a2090d068328adeeea50 100644 (file)
 #include <linux/platform_device.h>
 #include <linux/rfkill-gpio.h>
 #include "board.h"
-#include "board-paz00.h"
 
 static struct rfkill_gpio_platform_data wifi_rfkill_platform_data = {
        .name           = "wifi_rfkill",
-       .reset_gpio     = TEGRA_WIFI_RST,
-       .shutdown_gpio  = TEGRA_WIFI_PWRN,
+       .reset_gpio     = 25, /* PD1 */
+       .shutdown_gpio  = 85, /* PK5 */
        .type   = RFKILL_TYPE_WLAN,
 };
 
diff --git a/arch/arm/mach-tegra/board-paz00.h b/arch/arm/mach-tegra/board-paz00.h
deleted file mode 100644 (file)
index 25c08ec..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * arch/arm/mach-tegra/board-paz00.h
- *
- * Copyright (C) 2010 Marc Dietrich <marvin24@gmx.de>
- *
- * This software is licensed under the terms of the GNU General Public
- * License version 2, as published by the Free Software Foundation, and
- * may be copied, distributed, and modified under those terms.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- */
-
-#ifndef _MACH_TEGRA_BOARD_PAZ00_H
-#define _MACH_TEGRA_BOARD_PAZ00_H
-
-#include "gpio-names.h"
-
-#define TEGRA_WIFI_PWRN                        TEGRA_GPIO_PK5
-#define TEGRA_WIFI_RST                 TEGRA_GPIO_PD1
-
-#endif
index db6810dc0b3d21d300576a7ced765195d56db26e..bcf5dbf69d5891edde4df4f202b7c93cab9f24d7 100644 (file)
 #include <linux/types.h>
 #include <linux/reboot.h>
 
-void tegra_assert_system_reset(enum reboot_mode mode, const char *cmd);
-
-void __init tegra_init_early(void);
 void __init tegra_map_common_io(void);
 void __init tegra_init_irq(void);
-void __init tegra_dt_init_irq(void);
-
-void tegra_init_late(void);
-
-#ifdef CONFIG_DEBUG_FS
-int tegra_clk_debugfs_init(void);
-#else
-static inline int tegra_clk_debugfs_init(void) { return 0; }
-#endif
 
 int __init tegra_powergate_init(void);
 #if defined(CONFIG_ARCH_TEGRA_2x_SOC) && defined(CONFIG_DEBUG_FS)
diff --git a/arch/arm/mach-tegra/common.c b/arch/arm/mach-tegra/common.c
deleted file mode 100644 (file)
index 94a119a..0000000
+++ /dev/null
@@ -1,115 +0,0 @@
-/*
- * arch/arm/mach-tegra/common.c
- *
- * Copyright (c) 2013 NVIDIA Corporation. All rights reserved.
- * Copyright (C) 2010 Google, Inc.
- *
- * Author:
- *     Colin Cross <ccross@android.com>
- *
- * This software is licensed under the terms of the GNU General Public
- * License version 2, as published by the Free Software Foundation, and
- * may be copied, distributed, and modified under those terms.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- */
-
-#include <linux/init.h>
-#include <linux/io.h>
-#include <linux/clk.h>
-#include <linux/delay.h>
-#include <linux/reboot.h>
-#include <linux/irqchip.h>
-#include <linux/clk-provider.h>
-
-#include <asm/hardware/cache-l2x0.h>
-
-#include "board.h"
-#include "common.h"
-#include "cpuidle.h"
-#include "fuse.h"
-#include "iomap.h"
-#include "irq.h"
-#include "pmc.h"
-#include "apbio.h"
-#include "sleep.h"
-#include "pm.h"
-#include "reset.h"
-
-/*
- * Storage for debug-macro.S's state.
- *
- * This must be in .data not .bss so that it gets initialized each time the
- * kernel is loaded. The data is declared here rather than debug-macro.S so
- * that multiple inclusions of debug-macro.S point at the same data.
- */
-u32 tegra_uart_config[4] = {
-       /* Debug UART initialization required */
-       1,
-       /* Debug UART physical address */
-       0,
-       /* Debug UART virtual address */
-       0,
-       /* Scratch space for debug macro */
-       0,
-};
-
-#ifdef CONFIG_OF
-void __init tegra_dt_init_irq(void)
-{
-       of_clk_init(NULL);
-       tegra_pmc_init();
-       tegra_init_irq();
-       irqchip_init();
-       tegra_legacy_irq_syscore_init();
-}
-#endif
-
-void tegra_assert_system_reset(enum reboot_mode mode, const char *cmd)
-{
-       void __iomem *reset = IO_ADDRESS(TEGRA_PMC_BASE + 0);
-       u32 reg;
-
-       reg = readl_relaxed(reset);
-       reg |= 0x10;
-       writel_relaxed(reg, reset);
-}
-
-static void __init tegra_init_cache(void)
-{
-#ifdef CONFIG_CACHE_L2X0
-       int ret;
-       void __iomem *p = IO_ADDRESS(TEGRA_ARM_PERIF_BASE) + 0x3000;
-       u32 aux_ctrl, cache_type;
-
-       cache_type = readl(p + L2X0_CACHE_TYPE);
-       aux_ctrl = (cache_type & 0x700) << (17-8);
-       aux_ctrl |= 0x7C400001;
-
-       ret = l2x0_of_init(aux_ctrl, 0x8200c3fe);
-       if (!ret)
-               l2x0_saved_regs_addr = virt_to_phys(&l2x0_saved_regs);
-#endif
-
-}
-
-void __init tegra_init_early(void)
-{
-       tegra_cpu_reset_handler_init();
-       tegra_apb_io_init();
-       tegra_init_fuse();
-       tegra_init_cache();
-       tegra_powergate_init();
-       tegra_hotplug_init();
-}
-
-void __init tegra_init_late(void)
-{
-       tegra_init_suspend();
-       tegra_cpuidle_init();
-       tegra_powergate_debugfs_init();
-}
index 64652b37488627e1a3feea9d7b3224dd7773c7a3..fef1dc8305d3341d9a9f95b1176619495ae0ec1c 100644 (file)
@@ -112,7 +112,7 @@ u32 tegra_read_chipid(void)
        return readl_relaxed(IO_ADDRESS(TEGRA_APB_MISC_BASE) + 0x804);
 }
 
-void tegra_init_fuse(void)
+void __init tegra_init_fuse(void)
 {
        u32 id;
 
diff --git a/arch/arm/mach-tegra/gpio-names.h b/arch/arm/mach-tegra/gpio-names.h
deleted file mode 100644 (file)
index f28220a..0000000
+++ /dev/null
@@ -1,247 +0,0 @@
-/*
- * arch/arm/mach-tegra/include/mach/gpio-names.h
- *
- * Copyright (c) 2010 Google, Inc
- *
- * Author:
- *     Erik Gilling <konkers@google.com>
- *
- * This software is licensed under the terms of the GNU General Public
- * License version 2, as published by the Free Software Foundation, and
- * may be copied, distributed, and modified under those terms.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- */
-
-#ifndef __MACH_TEGRA_GPIO_NAMES_H
-#define __MACH_TEGRA_GPIO_NAMES_H
-
-#define TEGRA_GPIO_PA0         0
-#define TEGRA_GPIO_PA1         1
-#define TEGRA_GPIO_PA2         2
-#define TEGRA_GPIO_PA3         3
-#define TEGRA_GPIO_PA4         4
-#define TEGRA_GPIO_PA5         5
-#define TEGRA_GPIO_PA6         6
-#define TEGRA_GPIO_PA7         7
-#define TEGRA_GPIO_PB0         8
-#define TEGRA_GPIO_PB1         9
-#define TEGRA_GPIO_PB2         10
-#define TEGRA_GPIO_PB3         11
-#define TEGRA_GPIO_PB4         12
-#define TEGRA_GPIO_PB5         13
-#define TEGRA_GPIO_PB6         14
-#define TEGRA_GPIO_PB7         15
-#define TEGRA_GPIO_PC0         16
-#define TEGRA_GPIO_PC1         17
-#define TEGRA_GPIO_PC2         18
-#define TEGRA_GPIO_PC3         19
-#define TEGRA_GPIO_PC4         20
-#define TEGRA_GPIO_PC5         21
-#define TEGRA_GPIO_PC6         22
-#define TEGRA_GPIO_PC7         23
-#define TEGRA_GPIO_PD0         24
-#define TEGRA_GPIO_PD1         25
-#define TEGRA_GPIO_PD2         26
-#define TEGRA_GPIO_PD3         27
-#define TEGRA_GPIO_PD4         28
-#define TEGRA_GPIO_PD5         29
-#define TEGRA_GPIO_PD6         30
-#define TEGRA_GPIO_PD7         31
-#define TEGRA_GPIO_PE0         32
-#define TEGRA_GPIO_PE1         33
-#define TEGRA_GPIO_PE2         34
-#define TEGRA_GPIO_PE3         35
-#define TEGRA_GPIO_PE4         36
-#define TEGRA_GPIO_PE5         37
-#define TEGRA_GPIO_PE6         38
-#define TEGRA_GPIO_PE7         39
-#define TEGRA_GPIO_PF0         40
-#define TEGRA_GPIO_PF1         41
-#define TEGRA_GPIO_PF2         42
-#define TEGRA_GPIO_PF3         43
-#define TEGRA_GPIO_PF4         44
-#define TEGRA_GPIO_PF5         45
-#define TEGRA_GPIO_PF6         46
-#define TEGRA_GPIO_PF7         47
-#define TEGRA_GPIO_PG0         48
-#define TEGRA_GPIO_PG1         49
-#define TEGRA_GPIO_PG2         50
-#define TEGRA_GPIO_PG3         51
-#define TEGRA_GPIO_PG4         52
-#define TEGRA_GPIO_PG5         53
-#define TEGRA_GPIO_PG6         54
-#define TEGRA_GPIO_PG7         55
-#define TEGRA_GPIO_PH0         56
-#define TEGRA_GPIO_PH1         57
-#define TEGRA_GPIO_PH2         58
-#define TEGRA_GPIO_PH3         59
-#define TEGRA_GPIO_PH4         60
-#define TEGRA_GPIO_PH5         61
-#define TEGRA_GPIO_PH6         62
-#define TEGRA_GPIO_PH7         63
-#define TEGRA_GPIO_PI0         64
-#define TEGRA_GPIO_PI1         65
-#define TEGRA_GPIO_PI2         66
-#define TEGRA_GPIO_PI3         67
-#define TEGRA_GPIO_PI4         68
-#define TEGRA_GPIO_PI5         69
-#define TEGRA_GPIO_PI6         70
-#define TEGRA_GPIO_PI7         71
-#define TEGRA_GPIO_PJ0         72
-#define TEGRA_GPIO_PJ1         73
-#define TEGRA_GPIO_PJ2         74
-#define TEGRA_GPIO_PJ3         75
-#define TEGRA_GPIO_PJ4         76
-#define TEGRA_GPIO_PJ5         77
-#define TEGRA_GPIO_PJ6         78
-#define TEGRA_GPIO_PJ7         79
-#define TEGRA_GPIO_PK0         80
-#define TEGRA_GPIO_PK1         81
-#define TEGRA_GPIO_PK2         82
-#define TEGRA_GPIO_PK3         83
-#define TEGRA_GPIO_PK4         84
-#define TEGRA_GPIO_PK5         85
-#define TEGRA_GPIO_PK6         86
-#define TEGRA_GPIO_PK7         87
-#define TEGRA_GPIO_PL0         88
-#define TEGRA_GPIO_PL1         89
-#define TEGRA_GPIO_PL2         90
-#define TEGRA_GPIO_PL3         91
-#define TEGRA_GPIO_PL4         92
-#define TEGRA_GPIO_PL5         93
-#define TEGRA_GPIO_PL6         94
-#define TEGRA_GPIO_PL7         95
-#define TEGRA_GPIO_PM0         96
-#define TEGRA_GPIO_PM1         97
-#define TEGRA_GPIO_PM2         98
-#define TEGRA_GPIO_PM3         99
-#define TEGRA_GPIO_PM4         100
-#define TEGRA_GPIO_PM5         101
-#define TEGRA_GPIO_PM6         102
-#define TEGRA_GPIO_PM7         103
-#define TEGRA_GPIO_PN0         104
-#define TEGRA_GPIO_PN1         105
-#define TEGRA_GPIO_PN2         106
-#define TEGRA_GPIO_PN3         107
-#define TEGRA_GPIO_PN4         108
-#define TEGRA_GPIO_PN5         109
-#define TEGRA_GPIO_PN6         110
-#define TEGRA_GPIO_PN7         111
-#define TEGRA_GPIO_PO0         112
-#define TEGRA_GPIO_PO1         113
-#define TEGRA_GPIO_PO2         114
-#define TEGRA_GPIO_PO3         115
-#define TEGRA_GPIO_PO4         116
-#define TEGRA_GPIO_PO5         117
-#define TEGRA_GPIO_PO6         118
-#define TEGRA_GPIO_PO7         119
-#define TEGRA_GPIO_PP0         120
-#define TEGRA_GPIO_PP1         121
-#define TEGRA_GPIO_PP2         122
-#define TEGRA_GPIO_PP3         123
-#define TEGRA_GPIO_PP4         124
-#define TEGRA_GPIO_PP5         125
-#define TEGRA_GPIO_PP6         126
-#define TEGRA_GPIO_PP7         127
-#define TEGRA_GPIO_PQ0         128
-#define TEGRA_GPIO_PQ1         129
-#define TEGRA_GPIO_PQ2         130
-#define TEGRA_GPIO_PQ3         131
-#define TEGRA_GPIO_PQ4         132
-#define TEGRA_GPIO_PQ5         133
-#define TEGRA_GPIO_PQ6         134
-#define TEGRA_GPIO_PQ7         135
-#define TEGRA_GPIO_PR0         136
-#define TEGRA_GPIO_PR1         137
-#define TEGRA_GPIO_PR2         138
-#define TEGRA_GPIO_PR3         139
-#define TEGRA_GPIO_PR4         140
-#define TEGRA_GPIO_PR5         141
-#define TEGRA_GPIO_PR6         142
-#define TEGRA_GPIO_PR7         143
-#define TEGRA_GPIO_PS0         144
-#define TEGRA_GPIO_PS1         145
-#define TEGRA_GPIO_PS2         146
-#define TEGRA_GPIO_PS3         147
-#define TEGRA_GPIO_PS4         148
-#define TEGRA_GPIO_PS5         149
-#define TEGRA_GPIO_PS6         150
-#define TEGRA_GPIO_PS7         151
-#define TEGRA_GPIO_PT0         152
-#define TEGRA_GPIO_PT1         153
-#define TEGRA_GPIO_PT2         154
-#define TEGRA_GPIO_PT3         155
-#define TEGRA_GPIO_PT4         156
-#define TEGRA_GPIO_PT5         157
-#define TEGRA_GPIO_PT6         158
-#define TEGRA_GPIO_PT7         159
-#define TEGRA_GPIO_PU0         160
-#define TEGRA_GPIO_PU1         161
-#define TEGRA_GPIO_PU2         162
-#define TEGRA_GPIO_PU3         163
-#define TEGRA_GPIO_PU4         164
-#define TEGRA_GPIO_PU5         165
-#define TEGRA_GPIO_PU6         166
-#define TEGRA_GPIO_PU7         167
-#define TEGRA_GPIO_PV0         168
-#define TEGRA_GPIO_PV1         169
-#define TEGRA_GPIO_PV2         170
-#define TEGRA_GPIO_PV3         171
-#define TEGRA_GPIO_PV4         172
-#define TEGRA_GPIO_PV5         173
-#define TEGRA_GPIO_PV6         174
-#define TEGRA_GPIO_PV7         175
-#define TEGRA_GPIO_PW0         176
-#define TEGRA_GPIO_PW1         177
-#define TEGRA_GPIO_PW2         178
-#define TEGRA_GPIO_PW3         179
-#define TEGRA_GPIO_PW4         180
-#define TEGRA_GPIO_PW5         181
-#define TEGRA_GPIO_PW6         182
-#define TEGRA_GPIO_PW7         183
-#define TEGRA_GPIO_PX0         184
-#define TEGRA_GPIO_PX1         185
-#define TEGRA_GPIO_PX2         186
-#define TEGRA_GPIO_PX3         187
-#define TEGRA_GPIO_PX4         188
-#define TEGRA_GPIO_PX5         189
-#define TEGRA_GPIO_PX6         190
-#define TEGRA_GPIO_PX7         191
-#define TEGRA_GPIO_PY0         192
-#define TEGRA_GPIO_PY1         193
-#define TEGRA_GPIO_PY2         194
-#define TEGRA_GPIO_PY3         195
-#define TEGRA_GPIO_PY4         196
-#define TEGRA_GPIO_PY5         197
-#define TEGRA_GPIO_PY6         198
-#define TEGRA_GPIO_PY7         199
-#define TEGRA_GPIO_PZ0         200
-#define TEGRA_GPIO_PZ1         201
-#define TEGRA_GPIO_PZ2         202
-#define TEGRA_GPIO_PZ3         203
-#define TEGRA_GPIO_PZ4         204
-#define TEGRA_GPIO_PZ5         205
-#define TEGRA_GPIO_PZ6         206
-#define TEGRA_GPIO_PZ7         207
-#define TEGRA_GPIO_PAA0                208
-#define TEGRA_GPIO_PAA1                209
-#define TEGRA_GPIO_PAA2                210
-#define TEGRA_GPIO_PAA3                211
-#define TEGRA_GPIO_PAA4                212
-#define TEGRA_GPIO_PAA5                213
-#define TEGRA_GPIO_PAA6                214
-#define TEGRA_GPIO_PAA7                215
-#define TEGRA_GPIO_PBB0                216
-#define TEGRA_GPIO_PBB1                217
-#define TEGRA_GPIO_PBB2                218
-#define TEGRA_GPIO_PBB3                219
-#define TEGRA_GPIO_PBB4                220
-#define TEGRA_GPIO_PBB5                221
-#define TEGRA_GPIO_PBB6                222
-#define TEGRA_GPIO_PBB7                223
-
-#endif
index 3f5fa0749bde4a50f98d0ea2e70501ca3cc6bf59..cbee57fc4fd86f1cb0bda0dbd543e9cf6f81a3b5 100644 (file)
 #define TEGRA_IRAM_BASE                        0x40000000
 #define TEGRA_IRAM_SIZE                        SZ_256K
 
-#define TEGRA_IRAM_CODE_AREA           (TEGRA_IRAM_BASE + SZ_4K)
-
-#define TEGRA_HOST1X_BASE              0x50000000
-#define TEGRA_HOST1X_SIZE              0x24000
-
 #define TEGRA_ARM_PERIF_BASE           0x50040000
 #define TEGRA_ARM_PERIF_SIZE           SZ_8K
 
-#define TEGRA_ARM_PL310_BASE           0x50043000
-#define TEGRA_ARM_PL310_SIZE           SZ_4K
-
 #define TEGRA_ARM_INT_DIST_BASE                0x50041000
 #define TEGRA_ARM_INT_DIST_SIZE                SZ_4K
 
-#define TEGRA_MPE_BASE                 0x54040000
-#define TEGRA_MPE_SIZE                 SZ_256K
-
-#define TEGRA_VI_BASE                  0x54080000
-#define TEGRA_VI_SIZE                  SZ_256K
-
-#define TEGRA_ISP_BASE                 0x54100000
-#define TEGRA_ISP_SIZE                 SZ_256K
-
-#define TEGRA_DISPLAY_BASE             0x54200000
-#define TEGRA_DISPLAY_SIZE             SZ_256K
-
-#define TEGRA_DISPLAY2_BASE            0x54240000
-#define TEGRA_DISPLAY2_SIZE            SZ_256K
-
-#define TEGRA_HDMI_BASE                        0x54280000
-#define TEGRA_HDMI_SIZE                        SZ_256K
-
-#define TEGRA_GART_BASE                        0x58000000
-#define TEGRA_GART_SIZE                        SZ_32M
-
-#define TEGRA_RES_SEMA_BASE            0x60001000
-#define TEGRA_RES_SEMA_SIZE            SZ_4K
-
 #define TEGRA_PRIMARY_ICTLR_BASE       0x60004000
 #define TEGRA_PRIMARY_ICTLR_SIZE       SZ_64
 
 #define TEGRA_FLOW_CTRL_BASE           0x60007000
 #define TEGRA_FLOW_CTRL_SIZE           20
 
-#define TEGRA_AHB_DMA_BASE             0x60008000
-#define TEGRA_AHB_DMA_SIZE             SZ_4K
-
-#define TEGRA_AHB_DMA_CH0_BASE         0x60009000
-#define TEGRA_AHB_DMA_CH0_SIZE         32
-
-#define TEGRA_APB_DMA_BASE             0x6000A000
-#define TEGRA_APB_DMA_SIZE             SZ_4K
-
-#define TEGRA_APB_DMA_CH0_BASE         0x6000B000
-#define TEGRA_APB_DMA_CH0_SIZE         32
-
-#define TEGRA_AHB_GIZMO_BASE           0x6000C004
-#define TEGRA_AHB_GIZMO_SIZE           0x10C
-
 #define TEGRA_SB_BASE                  0x6000C200
 #define TEGRA_SB_SIZE                  256
 
-#define TEGRA_STATMON_BASE             0x6000C400
-#define TEGRA_STATMON_SIZE             SZ_1K
-
-#define TEGRA_GPIO_BASE                        0x6000D000
-#define TEGRA_GPIO_SIZE                        SZ_4K
-
 #define TEGRA_EXCEPTION_VECTORS_BASE    0x6000F000
 #define TEGRA_EXCEPTION_VECTORS_SIZE    SZ_4K
 
 #define TEGRA_APB_MISC_BASE            0x70000000
 #define TEGRA_APB_MISC_SIZE            SZ_4K
 
-#define TEGRA_APB_MISC_DAS_BASE                0x70000c00
-#define TEGRA_APB_MISC_DAS_SIZE                SZ_128
-
-#define TEGRA_AC97_BASE                        0x70002000
-#define TEGRA_AC97_SIZE                        SZ_512
-
-#define TEGRA_SPDIF_BASE               0x70002400
-#define TEGRA_SPDIF_SIZE               SZ_512
-
-#define TEGRA_I2S1_BASE                        0x70002800
-#define TEGRA_I2S1_SIZE                        SZ_256
-
-#define TEGRA_I2S2_BASE                        0x70002A00
-#define TEGRA_I2S2_SIZE                        SZ_256
-
 #define TEGRA_UARTA_BASE               0x70006000
 #define TEGRA_UARTA_SIZE               SZ_64
 
 #define TEGRA_UARTE_BASE               0x70006400
 #define TEGRA_UARTE_SIZE               SZ_256
 
-#define TEGRA_NAND_BASE                        0x70008000
-#define TEGRA_NAND_SIZE                        SZ_256
-
-#define TEGRA_HSMMC_BASE               0x70008500
-#define TEGRA_HSMMC_SIZE               SZ_256
-
-#define TEGRA_SNOR_BASE                        0x70009000
-#define TEGRA_SNOR_SIZE                        SZ_4K
-
-#define TEGRA_PWFM_BASE                        0x7000A000
-#define TEGRA_PWFM_SIZE                        SZ_256
-
-#define TEGRA_PWFM0_BASE               0x7000A000
-#define TEGRA_PWFM0_SIZE               4
-
-#define TEGRA_PWFM1_BASE               0x7000A010
-#define TEGRA_PWFM1_SIZE               4
-
-#define TEGRA_PWFM2_BASE               0x7000A020
-#define TEGRA_PWFM2_SIZE               4
-
-#define TEGRA_PWFM3_BASE               0x7000A030
-#define TEGRA_PWFM3_SIZE               4
-
-#define TEGRA_MIPI_BASE                        0x7000B000
-#define TEGRA_MIPI_SIZE                        SZ_256
-
-#define TEGRA_I2C_BASE                 0x7000C000
-#define TEGRA_I2C_SIZE                 SZ_256
-
-#define TEGRA_TWC_BASE                 0x7000C100
-#define TEGRA_TWC_SIZE                 SZ_256
-
-#define TEGRA_SPI_BASE                 0x7000C380
-#define TEGRA_SPI_SIZE                 48
-
-#define TEGRA_I2C2_BASE                        0x7000C400
-#define TEGRA_I2C2_SIZE                        SZ_256
-
-#define TEGRA_I2C3_BASE                        0x7000C500
-#define TEGRA_I2C3_SIZE                        SZ_256
-
-#define TEGRA_OWR_BASE                 0x7000C600
-#define TEGRA_OWR_SIZE                 80
-
-#define TEGRA_DVC_BASE                 0x7000D000
-#define TEGRA_DVC_SIZE                 SZ_512
-
-#define TEGRA_SPI1_BASE                        0x7000D400
-#define TEGRA_SPI1_SIZE                        SZ_512
-
-#define TEGRA_SPI2_BASE                        0x7000D600
-#define TEGRA_SPI2_SIZE                        SZ_512
-
-#define TEGRA_SPI3_BASE                        0x7000D800
-#define TEGRA_SPI3_SIZE                        SZ_512
-
-#define TEGRA_SPI4_BASE                        0x7000DA00
-#define TEGRA_SPI4_SIZE                        SZ_512
-
-#define TEGRA_RTC_BASE                 0x7000E000
-#define TEGRA_RTC_SIZE                 SZ_256
-
-#define TEGRA_KBC_BASE                 0x7000E200
-#define TEGRA_KBC_SIZE                 SZ_256
-
 #define TEGRA_PMC_BASE                 0x7000E400
 #define TEGRA_PMC_SIZE                 SZ_256
 
-#define TEGRA_MC_BASE                  0x7000F000
-#define TEGRA_MC_SIZE                  SZ_1K
-
 #define TEGRA_EMC_BASE                 0x7000F400
 #define TEGRA_EMC_SIZE                 SZ_1K
 
 #define TEGRA_FUSE_BASE                        0x7000F800
 #define TEGRA_FUSE_SIZE                        SZ_1K
 
-#define TEGRA_KFUSE_BASE               0x7000FC00
-#define TEGRA_KFUSE_SIZE               SZ_1K
-
 #define TEGRA_EMC0_BASE                        0x7001A000
 #define TEGRA_EMC0_SIZE                        SZ_2K
 
 #define TEGRA_CSITE_BASE               0x70040000
 #define TEGRA_CSITE_SIZE               SZ_256K
 
-#define TEGRA_SDMMC1_BASE              0xC8000000
-#define TEGRA_SDMMC1_SIZE              SZ_512
-
-#define TEGRA_SDMMC2_BASE              0xC8000200
-#define TEGRA_SDMMC2_SIZE              SZ_512
-
-#define TEGRA_SDMMC3_BASE              0xC8000400
-#define TEGRA_SDMMC3_SIZE              SZ_512
-
-#define TEGRA_SDMMC4_BASE              0xC8000600
-#define TEGRA_SDMMC4_SIZE              SZ_512
-
 /* On TEGRA, many peripherals are very closely packed in
  * two 256MB io windows (that actually only use about 64KB
  * at the start of each).
index 501952a8434455af70aeea381aeb6cca63b7d6b4..e32e1742c9a11730bd287ecc93cd09f2c1b33f6d 100644 (file)
 #define TEGRA_IRAM_RESET_HANDLER_OFFSET        0
 #define TEGRA_IRAM_RESET_HANDLER_SIZE  SZ_1K
 
+/*
+ * This area is used for LPx resume vector, only while LPx power state is
+ * active. At other times, the AVP may use this area for arbitrary purposes
+ */
+#define TEGRA_IRAM_LPx_RESUME_AREA     (TEGRA_IRAM_BASE + SZ_4K)
+
 #endif
index ed294a04e1d39d11ef3548c8e0710a06128abccd..36ed88af1cc14ca0f41938b473a4a818e007e3fe 100644 (file)
@@ -263,10 +263,10 @@ static void tegra_suspend_enter_lp1(void)
        tegra_pmc_suspend();
 
        /* copy the reset vector & SDRAM shutdown code into IRAM */
-       memcpy(iram_save_addr, IO_ADDRESS(TEGRA_IRAM_CODE_AREA),
-               iram_save_size);
-       memcpy(IO_ADDRESS(TEGRA_IRAM_CODE_AREA), tegra_lp1_iram.start_addr,
+       memcpy(iram_save_addr, IO_ADDRESS(TEGRA_IRAM_LPx_RESUME_AREA),
                iram_save_size);
+       memcpy(IO_ADDRESS(TEGRA_IRAM_LPx_RESUME_AREA),
+               tegra_lp1_iram.start_addr, iram_save_size);
 
        *((u32 *)tegra_cpu_lp1_mask) = 1;
 }
@@ -276,7 +276,7 @@ static void tegra_suspend_exit_lp1(void)
        tegra_pmc_resume();
 
        /* restore IRAM */
-       memcpy(IO_ADDRESS(TEGRA_IRAM_CODE_AREA), iram_save_addr,
+       memcpy(IO_ADDRESS(TEGRA_IRAM_LPx_RESUME_AREA), iram_save_addr,
                iram_save_size);
 
        *(u32 *)tegra_cpu_lp1_mask = 0;
index fe204e5256e761c781b375272162412a5c2119c5..6e92a7c2ecbd164c5be483b457e18b3bae1cab8d 100644 (file)
@@ -37,9 +37,6 @@ void tegra30_sleep_core_init(void);
 
 extern unsigned long l2x0_saved_regs_addr;
 
-void save_cpu_arch_register(void);
-void restore_cpu_arch_register(void);
-
 void tegra_clear_cpu_in_lp2(void);
 bool tegra_set_cpu_in_lp2(void);
 
index 8acb881f7cfe5c8025f4c133cb5a1a60d2ec9181..93a4dbcde27e5dd3391dc47e0f8876945abbba21 100644 (file)
@@ -166,6 +166,15 @@ int tegra_pmc_cpu_remove_clamping(int cpuid)
        return tegra_pmc_powergate_remove_clamping(id);
 }
 
+void tegra_pmc_restart(enum reboot_mode mode, const char *cmd)
+{
+       u32 val;
+
+       val = tegra_pmc_readl(0);
+       val |= 0x10;
+       tegra_pmc_writel(val, 0);
+}
+
 #ifdef CONFIG_PM_SLEEP
 static void set_power_timers(u32 us_on, u32 us_off, unsigned long rate)
 {
@@ -285,13 +294,10 @@ static const struct of_device_id matches[] __initconst = {
        { }
 };
 
-static void __init tegra_pmc_parse_dt(void)
+void __init tegra_pmc_init_irq(void)
 {
        struct device_node *np;
-       u32 prop;
-       enum tegra_suspend_mode suspend_mode;
-       u32 core_good_time[2] = {0, 0};
-       u32 lp0_vec[2] = {0, 0};
+       u32 val;
 
        np = of_find_matching_node(NULL, matches);
        BUG_ON(!np);
@@ -300,6 +306,26 @@ static void __init tegra_pmc_parse_dt(void)
 
        tegra_pmc_invert_interrupt = of_property_read_bool(np,
                                     "nvidia,invert-interrupt");
+
+       val = tegra_pmc_readl(PMC_CTRL);
+       if (tegra_pmc_invert_interrupt)
+               val |= PMC_CTRL_INTR_LOW;
+       else
+               val &= ~PMC_CTRL_INTR_LOW;
+       tegra_pmc_writel(val, PMC_CTRL);
+}
+
+void __init tegra_pmc_init(void)
+{
+       struct device_node *np;
+       u32 prop;
+       enum tegra_suspend_mode suspend_mode;
+       u32 core_good_time[2] = {0, 0};
+       u32 lp0_vec[2] = {0, 0};
+
+       np = of_find_matching_node(NULL, matches);
+       BUG_ON(!np);
+
        tegra_pclk = of_clk_get_by_name(np, "pclk");
        WARN_ON(IS_ERR(tegra_pclk));
 
@@ -365,17 +391,3 @@ static void __init tegra_pmc_parse_dt(void)
 
        pmc_pm_data.suspend_mode = suspend_mode;
 }
-
-void __init tegra_pmc_init(void)
-{
-       u32 val;
-
-       tegra_pmc_parse_dt();
-
-       val = tegra_pmc_readl(PMC_CTRL);
-       if (tegra_pmc_invert_interrupt)
-               val |= PMC_CTRL_INTR_LOW;
-       else
-               val &= ~PMC_CTRL_INTR_LOW;
-       tegra_pmc_writel(val, PMC_CTRL);
-}
index 549f8c7b762c970530d434c35345c2e2f45472e9..59e19c3442987f420c62fe18e683f08e90e38318 100644 (file)
@@ -18,6 +18,8 @@
 #ifndef __MACH_TEGRA_PMC_H
 #define __MACH_TEGRA_PMC_H
 
+#include <linux/reboot.h>
+
 enum tegra_suspend_mode {
        TEGRA_SUSPEND_NONE = 0,
        TEGRA_SUSPEND_LP2,      /* CPU voltage off */
@@ -39,6 +41,9 @@ bool tegra_pmc_cpu_is_powered(int cpuid);
 int tegra_pmc_cpu_power_on(int cpuid);
 int tegra_pmc_cpu_remove_clamping(int cpuid);
 
+void tegra_pmc_restart(enum reboot_mode mode, const char *cmd);
+
+void tegra_pmc_init_irq(void);
 void tegra_pmc_init(void);
 
 #endif
index fd0bbf8a6c948494efaa497facc51f15aaba8f5f..568f5bbf979da4429e677430dd582d2a6c2f9f29 100644 (file)
@@ -82,7 +82,7 @@ void __init tegra_cpu_reset_handler_init(void)
 
 #ifdef CONFIG_PM_SLEEP
        __tegra_cpu_reset_handler_data[TEGRA_RESET_STARTUP_LP1] =
-               TEGRA_IRAM_CODE_AREA;
+               TEGRA_IRAM_LPx_RESUME_AREA;
        __tegra_cpu_reset_handler_data[TEGRA_RESET_STARTUP_LP2] =
                virt_to_phys((void *)tegra_resume);
 #endif
index 5c3bd11c98387da88e5c3eccd36e23eab5d68d78..aaaf3abd2688e85269271d45c2b32eecf5944cb5 100644 (file)
@@ -25,6 +25,7 @@
 #include <asm/cp15.h>
 #include <asm/cache.h>
 
+#include "irammap.h"
 #include "sleep.h"
 #include "flowctrl.h"
 
@@ -235,7 +236,7 @@ ENTRY(tegra20_sleep_core_finish)
        mov32   r0, tegra20_tear_down_core
        mov32   r1, tegra20_iram_start
        sub     r0, r0, r1
-       mov32   r1, TEGRA_IRAM_CODE_AREA
+       mov32   r1, TEGRA_IRAM_LPx_RESUME_AREA
        add     r0, r0, r1
 
        mov     pc, r3
@@ -328,7 +329,7 @@ tegra20_iram_start:
  * The physical address of tegra_resume expected to be stored in
  * PMC_SCRATCH41.
  *
- * NOTE: THIS *MUST* BE RELOCATED TO TEGRA_IRAM_CODE_AREA.
+ * NOTE: THIS *MUST* BE RELOCATED TO TEGRA_IRAM_LPx_RESUME_AREA.
  */
 ENTRY(tegra20_lp1_reset)
        /*
index 63fa91b5fafb9ad1293ca2d18798324d6fa886db..c6fc15cb25df7cccc6ac859576b9449d5ca2e5cb 100644 (file)
@@ -20,6 +20,7 @@
 #include <asm/asm-offsets.h>
 #include <asm/cache.h>
 
+#include "irammap.h"
 #include "fuse.h"
 #include "sleep.h"
 #include "flowctrl.h"
@@ -262,7 +263,7 @@ ENTRY(tegra30_sleep_core_finish)
        mov32   r0, tegra30_tear_down_core
        mov32   r1, tegra30_iram_start
        sub     r0, r0, r1
-       mov32   r1, TEGRA_IRAM_CODE_AREA
+       mov32   r1, TEGRA_IRAM_LPx_RESUME_AREA
        add     r0, r0, r1
 
        mov     pc, r3
@@ -314,7 +315,7 @@ tegra30_iram_start:
  * The physical address of tegra_resume expected to be stored in
  * PMC_SCRATCH41.
  *
- * NOTE: THIS *MUST* BE RELOCATED TO TEGRA_IRAM_CODE_AREA.
+ * NOTE: THIS *MUST* BE RELOCATED TO TEGRA_IRAM_LPx_RESUME_AREA.
  */
 ENTRY(tegra30_lp1_reset)
        /*
index 5b8605547a09113a65daaf65b902d9a6098fe522..386115ae5c0322e487e51b289cb831f18aa4fa37 100644 (file)
@@ -16,7 +16,6 @@
  *
  */
 
-#include <linux/clocksource.h>
 #include <linux/kernel.h>
 #include <linux/init.h>
 #include <linux/platform_device.h>
 #include <linux/sys_soc.h>
 #include <linux/usb/tegra_usb_phy.h>
 #include <linux/clk/tegra.h>
+#include <linux/irqchip.h>
 
+#include <asm/hardware/cache-l2x0.h>
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
 #include <asm/mach/time.h>
 #include <asm/setup.h>
 
+#include "apbio.h"
 #include "board.h"
 #include "common.h"
+#include "cpuidle.h"
 #include "fuse.h"
 #include "iomap.h"
+#include "irq.h"
+#include "pmc.h"
+#include "pm.h"
+#include "reset.h"
+#include "sleep.h"
+
+/*
+ * Storage for debug-macro.S's state.
+ *
+ * This must be in .data not .bss so that it gets initialized each time the
+ * kernel is loaded. The data is declared here rather than debug-macro.S so
+ * that multiple inclusions of debug-macro.S point at the same data.
+ */
+u32 tegra_uart_config[4] = {
+       /* Debug UART initialization required */
+       1,
+       /* Debug UART physical address */
+       0,
+       /* Debug UART virtual address */
+       0,
+       /* Scratch space for debug macro */
+       0,
+};
+
+static void __init tegra_init_cache(void)
+{
+#ifdef CONFIG_CACHE_L2X0
+       int ret;
+       void __iomem *p = IO_ADDRESS(TEGRA_ARM_PERIF_BASE) + 0x3000;
+       u32 aux_ctrl, cache_type;
+
+       cache_type = readl(p + L2X0_CACHE_TYPE);
+       aux_ctrl = (cache_type & 0x700) << (17-8);
+       aux_ctrl |= 0x7C400001;
+
+       ret = l2x0_of_init(aux_ctrl, 0x8200c3fe);
+       if (!ret)
+               l2x0_saved_regs_addr = virt_to_phys(&l2x0_saved_regs);
+#endif
+}
+
+static void __init tegra_init_early(void)
+{
+       tegra_cpu_reset_handler_init();
+       tegra_apb_io_init();
+       tegra_init_fuse();
+       tegra_init_cache();
+       tegra_powergate_init();
+       tegra_hotplug_init();
+}
+
+static void __init tegra_dt_init_irq(void)
+{
+       tegra_pmc_init_irq();
+       tegra_init_irq();
+       irqchip_init();
+       tegra_legacy_irq_syscore_init();
+}
 
 static void __init tegra_dt_init(void)
 {
@@ -51,6 +112,8 @@ static void __init tegra_dt_init(void)
        struct soc_device *soc_dev;
        struct device *parent = NULL;
 
+       tegra_pmc_init();
+
        tegra_clocks_apply_init_table();
 
        soc_dev_attr = kzalloc(sizeof(*soc_dev_attr), GFP_KERNEL);
@@ -97,7 +160,9 @@ static void __init tegra_dt_init_late(void)
 {
        int i;
 
-       tegra_init_late();
+       tegra_init_suspend();
+       tegra_cpuidle_init();
+       tegra_powergate_debugfs_init();
 
        for (i = 0; i < ARRAY_SIZE(board_init_funcs); i++) {
                if (of_machine_is_compatible(board_init_funcs[i].machine)) {
@@ -119,9 +184,8 @@ DT_MACHINE_START(TEGRA_DT, "NVIDIA Tegra SoC (Flattened Device Tree)")
        .smp            = smp_ops(tegra_smp_ops),
        .init_early     = tegra_init_early,
        .init_irq       = tegra_dt_init_irq,
-       .init_time      = clocksource_of_init,
        .init_machine   = tegra_dt_init,
        .init_late      = tegra_dt_init_late,
-       .restart        = tegra_assert_system_reset,
+       .restart        = tegra_pmc_restart,
        .dt_compat      = tegra_dt_board_compat,
 MACHINE_END
index a1659863bfd5cb650338d6d8919ab0b145da1d57..8e23071bd1b34ff2a47f729c60721a6fa4a9ec5b 100644 (file)
@@ -5,7 +5,6 @@ config ARCH_U300
        select ARM_AMBA
        select ARM_PATCH_PHYS_VIRT
        select ARM_VIC
-       select CLKDEV_LOOKUP
        select CLKSRC_MMIO
        select CLKSRC_OF
        select COMMON_CLK
index 7a3fc1af6944b2cd9175a46f7c1749c83a090220..0034d2cd69734e7cad97bf11cbc4976a3b9790c5 100644 (file)
@@ -1,37 +1,32 @@
 config ARCH_U8500
        bool "ST-Ericsson U8500 Series" if ARCH_MULTI_V7
        depends on MMU
+       select AB8500_CORE
+       select ABX500_CORE
        select ARCH_HAS_CPUFREQ
        select ARCH_REQUIRE_GPIOLIB
        select ARM_AMBA
-       select CLKDEV_LOOKUP
+       select ARM_ERRATA_754322
+       select ARM_ERRATA_764369 if SMP
+       select ARM_GIC
+       select CACHE_L2X0
+       select CLKSRC_NOMADIK_MTU
+       select COMMON_CLK
        select CPU_V7
        select GENERIC_CLOCKEVENTS
        select HAVE_ARM_SCU if SMP
        select HAVE_ARM_TWD if SMP
        select HAVE_SMP
        select MIGHT_HAVE_CACHE_L2X0
+       select PINCTRL
+       select PINCTRL_ABX500
+       select PINCTRL_NOMADIK
+       select PL310_ERRATA_753970 if CACHE_PL310
        help
          Support for ST-Ericsson's Ux500 architecture
 
 if ARCH_U8500
 
-config UX500_SOC_COMMON
-       bool
-       default y
-       select ABX500_CORE
-       select AB8500_CORE
-       select ARM_ERRATA_754322
-       select ARM_ERRATA_764369 if SMP
-       select ARM_GIC
-       select CACHE_L2X0
-       select CLKSRC_NOMADIK_MTU
-       select COMMON_CLK
-       select PINCTRL
-       select PINCTRL_NOMADIK
-       select PINCTRL_ABX500
-       select PL310_ERRATA_753970 if CACHE_PL310
-
 config UX500_SOC_DB8500
        bool
        select MFD_DB8500_PRCMU
index fe1f3e26b88b114b2c47ecb082b358a6a220bea7..616b96e86ad4fb067395ad4d2411cb8befcb92b8 100644 (file)
@@ -2,14 +2,11 @@
 # Makefile for the linux kernel, U8500 machine.
 #
 
-obj-y                          := cpu.o devices.o devices-common.o \
-                                  id.o usb.o timer.o pm.o
+obj-y                          := cpu.o devices.o id.o timer.o pm.o
 obj-$(CONFIG_CACHE_L2X0)       += cache-l2x0.o
 obj-$(CONFIG_UX500_SOC_DB8500) += cpu-db8500.o devices-db8500.o
 obj-$(CONFIG_MACH_MOP500)      += board-mop500.o board-mop500-sdi.o \
                                board-mop500-regulators.o \
-                               board-mop500-uib.o board-mop500-stuib.o \
-                               board-mop500-u8500uib.o \
                                board-mop500-pins.o \
                                board-mop500-audio.o
 obj-$(CONFIG_SMP)              += platsmp.o headsmp.o
index ec0807247e60cb1a40d1f4f8dbdb23b266932b31..154e15f59702c1010af74cce8fed51077c78e111 100644 (file)
@@ -68,40 +68,6 @@ static struct stedma40_chan_cfg msp2_dma_tx = {
        .phy_channel = 1,
 };
 
-static struct platform_device *db8500_add_msp_i2s(struct device *parent,
-                       int id,
-                       resource_size_t base, int irq,
-                       struct msp_i2s_platform_data *pdata)
-{
-       struct platform_device *pdev;
-       struct resource res[] = {
-               DEFINE_RES_MEM(base, SZ_4K),
-               DEFINE_RES_IRQ(irq),
-       };
-
-       pr_info("Register platform-device 'ux500-msp-i2s', id %d, irq %d\n",
-               id, irq);
-       pdev = platform_device_register_resndata(parent, "ux500-msp-i2s", id,
-                                               res, ARRAY_SIZE(res),
-                                               pdata, sizeof(*pdata));
-       if (!pdev) {
-               pr_err("Failed to register platform-device 'ux500-msp-i2s.%d'!\n",
-                       id);
-               return NULL;
-       }
-
-       return pdev;
-}
-
-/* Platform device for ASoC MOP500 machine */
-static struct platform_device snd_soc_mop500 = {
-       .name = "snd-soc-mop500",
-       .id = 0,
-       .dev = {
-               .platform_data = NULL,
-       },
-};
-
 struct msp_i2s_platform_data msp2_platform_data = {
        .id = MSP_I2S_2,
        .msp_i2s_dma_rx = &msp2_dma_rx,
@@ -113,19 +79,3 @@ struct msp_i2s_platform_data msp3_platform_data = {
        .msp_i2s_dma_rx = &msp1_dma_rx,
        .msp_i2s_dma_tx = NULL,
 };
-
-void mop500_audio_init(struct device *parent)
-{
-       pr_info("%s: Register platform-device 'snd-soc-mop500'.\n", __func__);
-       platform_device_register(&snd_soc_mop500);
-
-       pr_info("Initialize MSP I2S-devices.\n");
-       db8500_add_msp_i2s(parent, 0, U8500_MSP0_BASE, IRQ_DB8500_MSP0,
-                          &msp0_platform_data);
-       db8500_add_msp_i2s(parent, 1, U8500_MSP1_BASE, IRQ_DB8500_MSP1,
-                          &msp1_platform_data);
-       db8500_add_msp_i2s(parent, 2, U8500_MSP2_BASE, IRQ_DB8500_MSP2,
-                          &msp2_platform_data);
-       db8500_add_msp_i2s(parent, 3, U8500_MSP3_BASE, IRQ_DB8500_MSP1,
-                          &msp3_platform_data);
-}
index b3e61a38e5c8aee776c5eff883b770d80529fe10..26600a1c53190ad3ae3724456a17dd7b8a35009d 100644 (file)
@@ -65,18 +65,6 @@ struct mmci_platform_data mop500_sdi0_data = {
 #endif
 };
 
-static void sdi0_configure(struct device *parent)
-{
-       /* Add the device, force v2 to subrevision 1 */
-       db8500_add_sdi0(parent, &mop500_sdi0_data, U8500_SDI_V2_PERIPHID);
-}
-
-void mop500_sdi_tc35892_init(struct device *parent)
-{
-       mop500_sdi0_data.gpio_cd = GPIO_SDMMC_CD;
-       sdi0_configure(parent);
-}
-
 /*
  * SDI1 (SDIO WLAN)
  */
@@ -178,42 +166,3 @@ struct mmci_platform_data mop500_sdi4_data = {
        .dma_tx_param   = &mop500_sdi4_dma_cfg_tx,
 #endif
 };
-
-void __init mop500_sdi_init(struct device *parent)
-{
-       /* PoP:ed eMMC */
-       db8500_add_sdi2(parent, &mop500_sdi2_data, U8500_SDI_V2_PERIPHID);
-       /* On-board eMMC */
-       db8500_add_sdi4(parent, &mop500_sdi4_data, U8500_SDI_V2_PERIPHID);
-
-       /*
-        * On boards with the TC35892 GPIO expander, sdi0 will finally
-        * be added when the TC35892 initializes and calls
-        * mop500_sdi_tc35892_init() above.
-        */
-}
-
-void __init snowball_sdi_init(struct device *parent)
-{
-       /* On Snowball MMC_CAP_SD_HIGHSPEED isn't supported (Hardware issue?) */
-       mop500_sdi0_data.capabilities &= ~MMC_CAP_SD_HIGHSPEED;
-       /* On-board eMMC */
-       db8500_add_sdi4(parent, &mop500_sdi4_data, U8500_SDI_V2_PERIPHID);
-       /* External Micro SD slot */
-       mop500_sdi0_data.gpio_cd = SNOWBALL_SDMMC_CD_GPIO;
-       mop500_sdi0_data.cd_invert = true;
-       sdi0_configure(parent);
-}
-
-void __init hrefv60_sdi_init(struct device *parent)
-{
-       /* PoP:ed eMMC */
-       db8500_add_sdi2(parent, &mop500_sdi2_data, U8500_SDI_V2_PERIPHID);
-       /* On-board eMMC */
-       db8500_add_sdi4(parent, &mop500_sdi4_data, U8500_SDI_V2_PERIPHID);
-       /* External Micro SD slot */
-       mop500_sdi0_data.gpio_cd = HREFV60_SDMMC_CD_GPIO;
-       sdi0_configure(parent);
-       /* WLAN SDIO channel */
-       db8500_add_sdi1(parent, &mop500_sdi1_data, U8500_SDI_V2_PERIPHID);
-}
diff --git a/arch/arm/mach-ux500/board-mop500-stuib.c b/arch/arm/mach-ux500/board-mop500-stuib.c
deleted file mode 100644 (file)
index 7e1f294..0000000
+++ /dev/null
@@ -1,120 +0,0 @@
-/*
- * Copyright (C) ST-Ericsson SA 2010
- *
- * License terms: GNU General Public License (GPL), version 2
- */
-
-#include <linux/kernel.h>
-#include <linux/init.h>
-#include <linux/mfd/stmpe.h>
-#include <linux/input/bu21013.h>
-#include <linux/gpio.h>
-#include <linux/interrupt.h>
-#include <linux/i2c.h>
-#include <linux/input/matrix_keypad.h>
-#include <asm/mach-types.h>
-
-#include "board-mop500.h"
-
-/* STMPE/SKE keypad use this key layout */
-static const unsigned int mop500_keymap[] = {
-       KEY(2, 5, KEY_END),
-       KEY(4, 1, KEY_POWER),
-       KEY(3, 5, KEY_VOLUMEDOWN),
-       KEY(1, 3, KEY_3),
-       KEY(5, 2, KEY_RIGHT),
-       KEY(5, 0, KEY_9),
-
-       KEY(0, 5, KEY_MENU),
-       KEY(7, 6, KEY_ENTER),
-       KEY(4, 5, KEY_0),
-       KEY(6, 7, KEY_2),
-       KEY(3, 4, KEY_UP),
-       KEY(3, 3, KEY_DOWN),
-
-       KEY(6, 4, KEY_SEND),
-       KEY(6, 2, KEY_BACK),
-       KEY(4, 2, KEY_VOLUMEUP),
-       KEY(5, 5, KEY_1),
-       KEY(4, 3, KEY_LEFT),
-       KEY(3, 2, KEY_7),
-};
-
-static const struct matrix_keymap_data mop500_keymap_data = {
-       .keymap         = mop500_keymap,
-       .keymap_size    = ARRAY_SIZE(mop500_keymap),
-};
-/*
- * STMPE1601
- */
-static struct stmpe_keypad_platform_data stmpe1601_keypad_data = {
-       .debounce_ms    = 64,
-       .scan_count     = 8,
-       .no_autorepeat  = true,
-       .keymap_data    = &mop500_keymap_data,
-};
-
-static struct stmpe_platform_data stmpe1601_data = {
-       .id             = 1,
-       .blocks         = STMPE_BLOCK_KEYPAD,
-       .irq_trigger    = IRQF_TRIGGER_FALLING,
-       .irq_base       = MOP500_STMPE1601_IRQ(0),
-       .keypad         = &stmpe1601_keypad_data,
-       .autosleep      = true,
-       .autosleep_timeout = 1024,
-};
-
-static struct i2c_board_info __initdata mop500_i2c0_devices_stuib[] = {
-       {
-               I2C_BOARD_INFO("stmpe1601", 0x40),
-               .irq = NOMADIK_GPIO_TO_IRQ(218),
-               .platform_data = &stmpe1601_data,
-               .flags = I2C_CLIENT_WAKE,
-       },
-};
-
-/*
- * BU21013 ROHM touchscreen interface on the STUIBs
- */
-
-#define TOUCH_GPIO_PIN  84
-
-#define TOUCH_XMAX     384
-#define TOUCH_YMAX     704
-
-#define PRCMU_CLOCK_OCR                0x1CC
-#define TSC_EXT_CLOCK_9_6MHZ   0x840000
-
-static struct bu21013_platform_device tsc_plat_device = {
-       .touch_pin = TOUCH_GPIO_PIN,
-       .touch_x_max = TOUCH_XMAX,
-       .touch_y_max = TOUCH_YMAX,
-       .ext_clk = false,
-       .x_flip = false,
-       .y_flip = true,
-};
-
-static struct i2c_board_info __initdata u8500_i2c3_devices_stuib[] = {
-       {
-               I2C_BOARD_INFO("bu21013_tp", 0x5C),
-               .platform_data = &tsc_plat_device,
-       },
-       {
-               I2C_BOARD_INFO("bu21013_tp", 0x5D),
-               .platform_data = &tsc_plat_device,
-       },
-};
-
-void __init mop500_stuib_init(void)
-{
-       if (machine_is_hrefv60())
-               tsc_plat_device.cs_pin = HREFV60_TOUCH_RST_GPIO;
-       else
-               tsc_plat_device.cs_pin = GPIO_BU21013_CS;
-
-       mop500_uib_i2c_add(0, mop500_i2c0_devices_stuib,
-                       ARRAY_SIZE(mop500_i2c0_devices_stuib));
-
-       mop500_uib_i2c_add(3, u8500_i2c3_devices_stuib,
-                       ARRAY_SIZE(u8500_i2c3_devices_stuib));
-}
diff --git a/arch/arm/mach-ux500/board-mop500-u8500uib.c b/arch/arm/mach-ux500/board-mop500-u8500uib.c
deleted file mode 100644 (file)
index d397c19..0000000
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
- * Copyright (C) ST-Ericsson SA 2010
- *
- * Board data for the U8500 UIB, also known as the New UIB
- * License terms: GNU General Public License (GPL), version 2
- */
-#include <linux/gpio.h>
-#include <linux/kernel.h>
-#include <linux/init.h>
-#include <linux/i2c.h>
-#include <linux/interrupt.h>
-#include <linux/mfd/tc3589x.h>
-#include <linux/input/matrix_keypad.h>
-
-#include "irqs.h"
-
-#include "board-mop500.h"
-
-static struct i2c_board_info __initdata mop500_i2c3_devices_u8500[] = {
-       {
-               I2C_BOARD_INFO("synaptics_rmi4_i2c", 0x4B),
-               .irq = NOMADIK_GPIO_TO_IRQ(84),
-       },
-};
-
-/*
- * TC35893
- */
-static const unsigned int u8500_keymap[] = {
-       KEY(3, 1, KEY_END),
-       KEY(4, 1, KEY_POWER),
-       KEY(6, 4, KEY_VOLUMEDOWN),
-       KEY(4, 2, KEY_EMAIL),
-       KEY(3, 3, KEY_RIGHT),
-       KEY(2, 5, KEY_BACKSPACE),
-
-       KEY(6, 7, KEY_MENU),
-       KEY(5, 0, KEY_ENTER),
-       KEY(4, 3, KEY_0),
-       KEY(3, 4, KEY_DOT),
-       KEY(5, 2, KEY_UP),
-       KEY(3, 5, KEY_DOWN),
-
-       KEY(4, 5, KEY_SEND),
-       KEY(0, 5, KEY_BACK),
-       KEY(6, 2, KEY_VOLUMEUP),
-       KEY(1, 3, KEY_SPACE),
-       KEY(7, 6, KEY_LEFT),
-       KEY(5, 5, KEY_SEARCH),
-};
-
-static struct matrix_keymap_data u8500_keymap_data = {
-       .keymap         = u8500_keymap,
-       .keymap_size    = ARRAY_SIZE(u8500_keymap),
-};
-
-static struct tc3589x_keypad_platform_data tc35893_data = {
-       .krow = TC_KPD_ROWS,
-       .kcol = TC_KPD_COLUMNS,
-       .debounce_period = TC_KPD_DEBOUNCE_PERIOD,
-       .settle_time = TC_KPD_SETTLE_TIME,
-       .irqtype = IRQF_TRIGGER_FALLING,
-       .enable_wakeup = true,
-       .keymap_data    = &u8500_keymap_data,
-       .no_autorepeat  = true,
-};
-
-static struct tc3589x_platform_data tc3589x_keypad_data = {
-       .block = TC3589x_BLOCK_KEYPAD,
-       .keypad = &tc35893_data,
-       .irq_base = MOP500_EGPIO_IRQ_BASE,
-};
-
-static struct i2c_board_info __initdata mop500_i2c0_devices_u8500[] = {
-       {
-               I2C_BOARD_INFO("tc3589x", 0x44),
-               .platform_data = &tc3589x_keypad_data,
-               .irq = NOMADIK_GPIO_TO_IRQ(218),
-               .flags = I2C_CLIENT_WAKE,
-       },
-};
-
-
-void __init mop500_u8500uib_init(void)
-{
-       mop500_uib_i2c_add(3, mop500_i2c3_devices_u8500,
-                       ARRAY_SIZE(mop500_i2c3_devices_u8500));
-
-       mop500_uib_i2c_add(0, mop500_i2c0_devices_u8500,
-                       ARRAY_SIZE(mop500_i2c0_devices_u8500));
-
-}
diff --git a/arch/arm/mach-ux500/board-mop500-uib.c b/arch/arm/mach-ux500/board-mop500-uib.c
deleted file mode 100644 (file)
index bdaa422..0000000
+++ /dev/null
@@ -1,133 +0,0 @@
-/*
- * Copyright (C) ST-Ericsson SA 2010
- *
- * Author: Rabin Vincent <rabin.vincent@stericsson.com> for ST-Ericsson
- * License terms: GNU General Public License (GPL), version 2
- */
-
-#define pr_fmt(fmt)    "mop500-uib: " fmt
-
-#include <linux/kernel.h>
-#include <linux/init.h>
-#include <linux/i2c.h>
-
-#include "board-mop500.h"
-#include "id.h"
-
-enum mop500_uib {
-       STUIB,
-       U8500UIB,
-};
-
-struct uib {
-       const char *name;
-       const char *option;
-       void (*init)(void);
-};
-
-static struct uib __initdata mop500_uibs[] = {
-       [STUIB] = {
-               .name   = "ST-UIB",
-               .option = "stuib",
-               .init   = mop500_stuib_init,
-       },
-       [U8500UIB] = {
-               .name   = "U8500-UIB",
-               .option = "u8500uib",
-               .init   = mop500_u8500uib_init,
-       },
-};
-
-static struct uib *mop500_uib;
-
-static int __init mop500_uib_setup(char *str)
-{
-       int i;
-
-       for (i = 0; i < ARRAY_SIZE(mop500_uibs); i++) {
-               struct uib *uib = &mop500_uibs[i];
-
-               if (!strcmp(str, uib->option)) {
-                       mop500_uib = uib;
-                       break;
-               }
-       }
-
-       if (i == ARRAY_SIZE(mop500_uibs))
-               pr_err("invalid uib= option (%s)\n", str);
-
-       return 1;
-}
-__setup("uib=", mop500_uib_setup);
-
-/*
- * The UIBs are detected after the I2C host controllers are registered, so
- * i2c_register_board_info() can't be used.
- */
-void mop500_uib_i2c_add(int busnum, struct i2c_board_info *info,
-               unsigned n)
-{
-       struct i2c_adapter *adap;
-       struct i2c_client *client;
-       int i;
-
-       adap = i2c_get_adapter(busnum);
-       if (!adap) {
-               pr_err("failed to get adapter i2c%d\n", busnum);
-               return;
-       }
-
-       for (i = 0; i < n; i++) {
-               client = i2c_new_device(adap, &info[i]);
-               if (!client)
-                       pr_err("failed to register %s to i2c%d\n",
-                                       info[i].type, busnum);
-       }
-
-       i2c_put_adapter(adap);
-}
-
-static void __init __mop500_uib_init(struct uib *uib, const char *why)
-{
-       pr_info("%s (%s)\n", uib->name, why);
-       uib->init();
-}
-
-/*
- * Detect the UIB attached based on the presence or absence of i2c devices.
- */
-int __init mop500_uib_init(void)
-{
-       struct uib *uib = mop500_uib;
-       struct i2c_adapter *i2c0;
-       int ret;
-
-       if (!cpu_is_u8500_family())
-               return -ENODEV;
-
-       if (uib) {
-               __mop500_uib_init(uib, "from uib= boot argument");
-               return 0;
-       }
-
-       i2c0 = i2c_get_adapter(0);
-       if (!i2c0) {
-               __mop500_uib_init(&mop500_uibs[STUIB],
-                               "fallback, could not get i2c0");
-               return -ENODEV;
-       }
-
-       /* U8500-UIB has the TC35893 at 0x44 on I2C0, the ST-UIB doesn't. */
-       ret = i2c_smbus_xfer(i2c0, 0x44, 0, I2C_SMBUS_WRITE, 0,
-                       I2C_SMBUS_QUICK, NULL);
-       i2c_put_adapter(i2c0);
-
-       if (ret == 0)
-               uib = &mop500_uibs[U8500UIB];
-       else
-               uib = &mop500_uibs[STUIB];
-
-       __mop500_uib_init(uib, "detected");
-
-       return 0;
-}
index 703dec2b7d8da8013543f5faf868f0d308eefda9..514d40b625a4604c16c179b9562aa54b84f4d27e 100644 (file)
 #include <linux/platform_device.h>
 #include <linux/clk.h>
 #include <linux/io.h>
-#include <linux/i2c.h>
-#include <linux/platform_data/i2c-nomadik.h>
 #include <linux/platform_data/db8500_thermal.h>
-#include <linux/gpio.h>
 #include <linux/amba/bus.h>
 #include <linux/amba/pl022.h>
-#include <linux/amba/serial.h>
-#include <linux/spi/spi.h>
 #include <linux/mfd/abx500/ab8500.h>
 #include <linux/regulator/ab8500.h>
 #include <linux/regulator/fixed.h>
 #include <linux/regulator/driver.h>
-#include <linux/regulator/gpio-regulator.h>
-#include <linux/mfd/tc3589x.h>
 #include <linux/mfd/tps6105x.h>
-#include <linux/mfd/abx500/ab8500-gpio.h>
-#include <linux/mfd/abx500/ab8500-codec.h>
 #include <linux/platform_data/leds-lp55xx.h>
 #include <linux/input.h>
-#include <linux/smsc911x.h>
-#include <linux/gpio_keys.h>
 #include <linux/delay.h>
 #include <linux/leds.h>
 #include <linux/pinctrl/consumer.h>
@@ -46,7 +35,6 @@
 #include "setup.h"
 #include "devices.h"
 #include "irqs.h"
-#include <linux/platform_data/crypto-ux500.h>
 
 #include "ste-dma40-db8500.h"
 #include "db8500-regs.h"
 #include "board-mop500.h"
 #include "board-mop500-regulators.h"
 
-static struct gpio_led snowball_led_array[] = {
-       {
-               .name = "user_led",
-               .default_trigger = "heartbeat",
-               .gpio = 142,
-       },
-};
-
-static struct gpio_led_platform_data snowball_led_data = {
-       .leds = snowball_led_array,
-       .num_leds = ARRAY_SIZE(snowball_led_array),
-};
-
-static struct platform_device snowball_led_dev = {
-       .name = "leds-gpio",
-       .dev = {
-               .platform_data = &snowball_led_data,
-       },
-};
-
-static struct fixed_voltage_config snowball_gpio_en_3v3_data = {
-       .supply_name            = "EN-3V3",
-       .gpio                   = SNOWBALL_EN_3V3_ETH_GPIO,
-       .microvolts             = 3300000,
-       .enable_high            = 1,
-       .init_data              = &gpio_en_3v3_regulator,
-       .startup_delay          = 5000, /* 1200us */
-};
-
-static struct platform_device snowball_gpio_en_3v3_regulator_dev = {
-       .name   = "reg-fixed-voltage",
-       .id     = 1,
-       .dev    = {
-               .platform_data  = &snowball_gpio_en_3v3_data,
-       },
-};
-
-/* Dynamically populated. */
-static struct gpio sdi0_reg_gpios[] = {
-       { 0, GPIOF_OUT_INIT_LOW, "mmci_vsel" },
-};
-
-static struct gpio_regulator_state sdi0_reg_states[] = {
-       { .value = 2900000, .gpios = (0 << 0) },
-       { .value = 1800000, .gpios = (1 << 0) },
-};
-
-static struct gpio_regulator_config sdi0_reg_info = {
-       .supply_name            = "ext-mmc-level-shifter",
-       .gpios                  = sdi0_reg_gpios,
-       .nr_gpios               = ARRAY_SIZE(sdi0_reg_gpios),
-       .states                 = sdi0_reg_states,
-       .nr_states              = ARRAY_SIZE(sdi0_reg_states),
-       .type                   = REGULATOR_VOLTAGE,
-       .enable_high            = 1,
-       .enabled_at_boot        = 0,
-       .init_data              = &sdi0_reg_init_data,
-       .startup_delay          = 100,
-};
-
-static struct platform_device sdi0_regulator = {
-       .name = "gpio-regulator",
-       .id   = -1,
-       .dev  = {
-               .platform_data = &sdi0_reg_info,
-       },
-};
-
-static struct abx500_gpio_platform_data ab8500_gpio_pdata = {
-       .gpio_base              = MOP500_AB8500_PIN_GPIO(1),
-};
-
-/* ab8500-codec */
-static struct ab8500_codec_platform_data ab8500_codec_pdata = {
-       .amics =  {
-               .mic1_type = AMIC_TYPE_DIFFERENTIAL,
-               .mic2_type = AMIC_TYPE_DIFFERENTIAL,
-               .mic1a_micbias = AMIC_MICBIAS_VAMIC1,
-               .mic1b_micbias = AMIC_MICBIAS_VAMIC1,
-               .mic2_micbias = AMIC_MICBIAS_VAMIC2
-       },
-       .ear_cmv = EAR_CMV_0_95V
-};
-
-static struct gpio_keys_button snowball_key_array[] = {
-       {
-               .gpio           = 32,
-               .type           = EV_KEY,
-               .code           = KEY_1,
-               .desc           = "userpb",
-               .active_low     = 1,
-               .debounce_interval = 50,
-               .wakeup         = 1,
-       },
-       {
-               .gpio           = 151,
-               .type           = EV_KEY,
-               .code           = KEY_2,
-               .desc           = "extkb1",
-               .active_low     = 1,
-               .debounce_interval = 50,
-               .wakeup         = 1,
-       },
-       {
-               .gpio           = 152,
-               .type           = EV_KEY,
-               .code           = KEY_3,
-               .desc           = "extkb2",
-               .active_low     = 1,
-               .debounce_interval = 50,
-               .wakeup         = 1,
-       },
-       {
-               .gpio           = 161,
-               .type           = EV_KEY,
-               .code           = KEY_4,
-               .desc           = "extkb3",
-               .active_low     = 1,
-               .debounce_interval = 50,
-               .wakeup         = 1,
-       },
-       {
-               .gpio           = 162,
-               .type           = EV_KEY,
-               .code           = KEY_5,
-               .desc           = "extkb4",
-               .active_low     = 1,
-               .debounce_interval = 50,
-               .wakeup         = 1,
-       },
-};
-
-static struct gpio_keys_platform_data snowball_key_data = {
-       .buttons        = snowball_key_array,
-       .nbuttons       = ARRAY_SIZE(snowball_key_array),
-};
-
-static struct platform_device snowball_key_dev = {
-       .name           = "gpio-keys",
-       .id             = -1,
-       .dev            = {
-               .platform_data  = &snowball_key_data,
-       }
-};
-
-static struct smsc911x_platform_config snowball_sbnet_cfg = {
-       .irq_polarity = SMSC911X_IRQ_POLARITY_ACTIVE_HIGH,
-       .irq_type = SMSC911X_IRQ_TYPE_PUSH_PULL,
-       .flags = SMSC911X_USE_16BIT | SMSC911X_FORCE_INTERNAL_PHY,
-       .shift = 1,
-};
-
-static struct resource sbnet_res[] = {
-       {
-               .name = "smsc911x-memory",
-               .start = (0x5000 << 16),
-               .end  =  (0x5000 << 16) + 0xffff,
-               .flags = IORESOURCE_MEM,
-       },
-       {
-               .start = NOMADIK_GPIO_TO_IRQ(140),
-               .end = NOMADIK_GPIO_TO_IRQ(140),
-               .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE,
-       },
-};
-
-static struct platform_device snowball_sbnet_dev = {
-       .name           = "smsc911x",
-       .num_resources  = ARRAY_SIZE(sbnet_res),
-       .resource       = sbnet_res,
-       .dev            = {
-               .platform_data = &snowball_sbnet_cfg,
-       },
-};
-
 struct ab8500_platform_data ab8500_platdata = {
        .irq_base       = MOP500_AB8500_IRQ_BASE,
        .regulator      = &ab8500_regulator_plat_data,
-       .gpio           = &ab8500_gpio_pdata,
-       .codec          = &ab8500_codec_pdata,
-};
-
-static struct platform_device u8500_cpufreq_cooling_device = {
-       .name           = "db8500-cpufreq-cooling",
-};
-
-/*
- * TPS61052
- */
-
-static struct tps6105x_platform_data mop500_tps61052_data = {
-       .mode = TPS6105X_MODE_VOLTAGE,
-       .regulator_data = &tps61052_regulator,
-};
-
-/*
- * TC35892
- */
-
-static void mop500_tc35892_init(struct tc3589x *tc3589x, unsigned int base)
-{
-       struct device *parent = NULL;
-#if 0
-       /* FIXME: Is the sdi actually part of tc3589x? */
-       parent = tc3589x->dev;
-#endif
-       mop500_sdi_tc35892_init(parent);
-}
-
-static struct tc3589x_gpio_platform_data mop500_tc35892_gpio_data = {
-       .gpio_base      = MOP500_EGPIO(0),
-       .setup          = mop500_tc35892_init,
-};
-
-static struct tc3589x_platform_data mop500_tc35892_data = {
-       .block          = TC3589x_BLOCK_GPIO,
-       .gpio           = &mop500_tc35892_gpio_data,
-       .irq_base       = MOP500_EGPIO_IRQ_BASE,
-};
-
-static struct lp55xx_led_config lp5521_pri_led[] = {
-       [0] = {
-              .chan_nr = 0,
-              .led_current = 0x2f,
-              .max_current = 0x5f,
-       },
-       [1] = {
-              .chan_nr = 1,
-              .led_current = 0x2f,
-              .max_current = 0x5f,
-       },
-       [2] = {
-              .chan_nr = 2,
-              .led_current = 0x2f,
-              .max_current = 0x5f,
-       },
-};
-
-static struct lp55xx_platform_data __initdata lp5521_pri_data = {
-       .label = "lp5521_pri",
-       .led_config     = &lp5521_pri_led[0],
-       .num_channels   = 3,
-       .clock_mode     = LP55XX_CLOCK_EXT,
-       .enable_gpio    = -1,
-};
-
-static struct lp55xx_led_config lp5521_sec_led[] = {
-       [0] = {
-              .chan_nr = 0,
-              .led_current = 0x2f,
-              .max_current = 0x5f,
-       },
-       [1] = {
-              .chan_nr = 1,
-              .led_current = 0x2f,
-              .max_current = 0x5f,
-       },
-       [2] = {
-              .chan_nr = 2,
-              .led_current = 0x2f,
-              .max_current = 0x5f,
-       },
-};
-
-static struct lp55xx_platform_data __initdata lp5521_sec_data = {
-       .label = "lp5521_sec",
-       .led_config     = &lp5521_sec_led[0],
-       .num_channels   = 3,
-       .clock_mode     = LP55XX_CLOCK_EXT,
-       .enable_gpio    = -1,
-};
-
-/* I2C0 devices only available on the first HREF/MOP500 */
-static struct i2c_board_info __initdata mop500_i2c0_devices[] = {
-       {
-               I2C_BOARD_INFO("tc3589x", 0x42),
-               .irq            = NOMADIK_GPIO_TO_IRQ(217),
-               .platform_data  = &mop500_tc35892_data,
-       },
-       {
-               I2C_BOARD_INFO("tps61052", 0x33),
-               .platform_data  = &mop500_tps61052_data,
-       },
-};
-
-static struct i2c_board_info __initdata mop500_i2c2_devices[] = {
-       {
-               /* lp5521 LED driver, 1st device */
-               I2C_BOARD_INFO("lp5521", 0x33),
-               .platform_data = &lp5521_pri_data,
-       },
-       {
-               /* lp5521 LED driver, 2st device */
-               I2C_BOARD_INFO("lp5521", 0x34),
-               .platform_data = &lp5521_sec_data,
-       },
-       {
-               /* Light sensor Rohm BH1780GLI */
-               I2C_BOARD_INFO("bh1780", 0x29),
-       },
-};
-
-static int __init mop500_i2c_board_init(void)
-{
-       if (machine_is_u8500())
-               mop500_uib_i2c_add(0, mop500_i2c0_devices,
-                                  ARRAY_SIZE(mop500_i2c0_devices));
-       mop500_uib_i2c_add(2, mop500_i2c2_devices,
-                          ARRAY_SIZE(mop500_i2c2_devices));
-       return 0;
-}
-device_initcall(mop500_i2c_board_init);
-
-static void __init mop500_i2c_init(struct device *parent)
-{
-       db8500_add_i2c0(parent, NULL);
-       db8500_add_i2c1(parent, NULL);
-       db8500_add_i2c2(parent, NULL);
-       db8500_add_i2c3(parent, NULL);
-}
-
-static struct gpio_keys_button mop500_gpio_keys[] = {
-       {
-               .desc                   = "SFH7741 Proximity Sensor",
-               .type                   = EV_SW,
-               .code                   = SW_FRONT_PROXIMITY,
-               .active_low             = 0,
-               .can_disable            = 1,
-       }
-};
-
-static struct regulator *prox_regulator;
-static int mop500_prox_activate(struct device *dev);
-static void mop500_prox_deactivate(struct device *dev);
-
-static struct gpio_keys_platform_data mop500_gpio_keys_data = {
-       .buttons        = mop500_gpio_keys,
-       .nbuttons       = ARRAY_SIZE(mop500_gpio_keys),
-       .enable         = mop500_prox_activate,
-       .disable        = mop500_prox_deactivate,
-};
-
-static struct platform_device mop500_gpio_keys_device = {
-       .name   = "gpio-keys",
-       .id     = 0,
-       .dev    = {
-               .platform_data  = &mop500_gpio_keys_data,
-       },
-};
-
-static int mop500_prox_activate(struct device *dev)
-{
-       prox_regulator = regulator_get(&mop500_gpio_keys_device.dev,
-                                               "vcc");
-       if (IS_ERR(prox_regulator)) {
-               dev_err(&mop500_gpio_keys_device.dev,
-                       "no regulator\n");
-               return PTR_ERR(prox_regulator);
-       }
-
-       return regulator_enable(prox_regulator);
-}
-
-static void mop500_prox_deactivate(struct device *dev)
-{
-       regulator_disable(prox_regulator);
-       regulator_put(prox_regulator);
-}
-
-static struct cryp_platform_data u8500_cryp1_platform_data = {
-               .mem_to_engine = {
-                               .dir = DMA_MEM_TO_DEV,
-                               .dev_type = DB8500_DMA_DEV48_CAC1,
-                               .mode = STEDMA40_MODE_LOGICAL,
-               },
-               .engine_to_mem = {
-                               .dir = DMA_DEV_TO_MEM,
-                               .dev_type = DB8500_DMA_DEV48_CAC1,
-                               .mode = STEDMA40_MODE_LOGICAL,
-               }
-};
-
-static struct stedma40_chan_cfg u8500_hash_dma_cfg_tx = {
-               .dir = DMA_MEM_TO_DEV,
-               .dev_type = DB8500_DMA_DEV50_HAC1_TX,
-               .mode = STEDMA40_MODE_LOGICAL,
-};
-
-static struct hash_platform_data u8500_hash1_platform_data = {
-               .mem_to_engine = &u8500_hash_dma_cfg_tx,
-               .dma_filter = stedma40_filter,
-};
-
-/* add any platform devices here - TODO */
-static struct platform_device *mop500_platform_devs[] __initdata = {
-       &mop500_gpio_keys_device,
-       &sdi0_regulator,
 };
 
 #ifdef CONFIG_STE_DMA40
@@ -482,236 +76,3 @@ struct pl022_ssp_controller ssp0_plat = {
         */
        .num_chipselect = 5,
 };
-
-static void __init mop500_spi_init(struct device *parent)
-{
-       db8500_add_ssp0(parent, &ssp0_plat);
-}
-
-#ifdef CONFIG_STE_DMA40
-static struct stedma40_chan_cfg uart0_dma_cfg_rx = {
-       .mode = STEDMA40_MODE_LOGICAL,
-       .dir = DMA_DEV_TO_MEM,
-       .dev_type = DB8500_DMA_DEV13_UART0,
-};
-
-static struct stedma40_chan_cfg uart0_dma_cfg_tx = {
-       .mode = STEDMA40_MODE_LOGICAL,
-       .dir = DMA_MEM_TO_DEV,
-       .dev_type = DB8500_DMA_DEV13_UART0,
-};
-
-static struct stedma40_chan_cfg uart1_dma_cfg_rx = {
-       .mode = STEDMA40_MODE_LOGICAL,
-       .dir = DMA_DEV_TO_MEM,
-       .dev_type = DB8500_DMA_DEV12_UART1,
-};
-
-static struct stedma40_chan_cfg uart1_dma_cfg_tx = {
-       .mode = STEDMA40_MODE_LOGICAL,
-       .dir = DMA_MEM_TO_DEV,
-       .dev_type = DB8500_DMA_DEV12_UART1,
-};
-
-static struct stedma40_chan_cfg uart2_dma_cfg_rx = {
-       .mode = STEDMA40_MODE_LOGICAL,
-       .dir = DMA_DEV_TO_MEM,
-       .dev_type = DB8500_DMA_DEV11_UART2,
-};
-
-static struct stedma40_chan_cfg uart2_dma_cfg_tx = {
-       .mode = STEDMA40_MODE_LOGICAL,
-       .dir = DMA_MEM_TO_DEV,
-       .dev_type = DB8500_DMA_DEV11_UART2,
-};
-#endif
-
-struct amba_pl011_data uart0_plat = {
-#ifdef CONFIG_STE_DMA40
-       .dma_filter = stedma40_filter,
-       .dma_rx_param = &uart0_dma_cfg_rx,
-       .dma_tx_param = &uart0_dma_cfg_tx,
-#endif
-};
-
-struct amba_pl011_data uart1_plat = {
-#ifdef CONFIG_STE_DMA40
-       .dma_filter = stedma40_filter,
-       .dma_rx_param = &uart1_dma_cfg_rx,
-       .dma_tx_param = &uart1_dma_cfg_tx,
-#endif
-};
-
-struct amba_pl011_data uart2_plat = {
-#ifdef CONFIG_STE_DMA40
-       .dma_filter = stedma40_filter,
-       .dma_rx_param = &uart2_dma_cfg_rx,
-       .dma_tx_param = &uart2_dma_cfg_tx,
-#endif
-};
-
-static void __init mop500_uart_init(struct device *parent)
-{
-       db8500_add_uart0(parent, &uart0_plat);
-       db8500_add_uart1(parent, &uart1_plat);
-       db8500_add_uart2(parent, &uart2_plat);
-}
-
-static void __init u8500_cryp1_hash1_init(struct device *parent)
-{
-       db8500_add_cryp1(parent, &u8500_cryp1_platform_data);
-       db8500_add_hash1(parent, &u8500_hash1_platform_data);
-}
-
-static struct platform_device *snowball_platform_devs[] __initdata = {
-       &snowball_led_dev,
-       &snowball_key_dev,
-       &snowball_sbnet_dev,
-       &snowball_gpio_en_3v3_regulator_dev,
-       &u8500_cpufreq_cooling_device,
-       &sdi0_regulator,
-};
-
-static void __init mop500_init_machine(void)
-{
-       struct device *parent = NULL;
-       int i;
-
-       platform_device_register(&db8500_prcmu_device);
-       mop500_gpio_keys[0].gpio = GPIO_PROX_SENSOR;
-
-       sdi0_reg_info.enable_gpio = GPIO_SDMMC_EN;
-       sdi0_reg_info.gpios[0].gpio = GPIO_SDMMC_1V8_3V_SEL;
-
-       mop500_pinmaps_init();
-       parent = u8500_init_devices();
-
-       for (i = 0; i < ARRAY_SIZE(mop500_platform_devs); i++)
-               mop500_platform_devs[i]->dev.parent = parent;
-
-       platform_add_devices(mop500_platform_devs,
-                       ARRAY_SIZE(mop500_platform_devs));
-
-       mop500_i2c_init(parent);
-       mop500_sdi_init(parent);
-       mop500_spi_init(parent);
-       mop500_audio_init(parent);
-       mop500_uart_init(parent);
-       u8500_cryp1_hash1_init(parent);
-
-       /* This board has full regulator constraints */
-       regulator_has_full_constraints();
-}
-
-
-static void __init snowball_init_machine(void)
-{
-       struct device *parent = NULL;
-       int i;
-
-       platform_device_register(&db8500_prcmu_device);
-
-       sdi0_reg_info.enable_gpio = SNOWBALL_SDMMC_EN_GPIO;
-       sdi0_reg_info.gpios[0].gpio = SNOWBALL_SDMMC_1V8_3V_GPIO;
-
-       snowball_pinmaps_init();
-       parent = u8500_init_devices();
-
-       for (i = 0; i < ARRAY_SIZE(snowball_platform_devs); i++)
-               snowball_platform_devs[i]->dev.parent = parent;
-
-       platform_add_devices(snowball_platform_devs,
-                       ARRAY_SIZE(snowball_platform_devs));
-
-       mop500_i2c_init(parent);
-       snowball_sdi_init(parent);
-       mop500_spi_init(parent);
-       mop500_audio_init(parent);
-       mop500_uart_init(parent);
-
-       u8500_cryp1_hash1_init(parent);
-
-       /* This board has full regulator constraints */
-       regulator_has_full_constraints();
-}
-
-static void __init hrefv60_init_machine(void)
-{
-       struct device *parent = NULL;
-       int i;
-
-       platform_device_register(&db8500_prcmu_device);
-       /*
-        * The HREFv60 board removed a GPIO expander and routed
-        * all these GPIO pins to the internal GPIO controller
-        * instead.
-        */
-       mop500_gpio_keys[0].gpio = HREFV60_PROX_SENSE_GPIO;
-
-       sdi0_reg_info.enable_gpio = HREFV60_SDMMC_EN_GPIO;
-       sdi0_reg_info.gpios[0].gpio = HREFV60_SDMMC_1V8_3V_GPIO;
-
-       hrefv60_pinmaps_init();
-       parent = u8500_init_devices();
-
-       for (i = 0; i < ARRAY_SIZE(mop500_platform_devs); i++)
-               mop500_platform_devs[i]->dev.parent = parent;
-
-       platform_add_devices(mop500_platform_devs,
-                       ARRAY_SIZE(mop500_platform_devs));
-
-       mop500_i2c_init(parent);
-       hrefv60_sdi_init(parent);
-       mop500_spi_init(parent);
-       mop500_audio_init(parent);
-       mop500_uart_init(parent);
-
-       /* This board has full regulator constraints */
-       regulator_has_full_constraints();
-}
-
-MACHINE_START(U8500, "ST-Ericsson MOP500 platform")
-       /* Maintainer: Srinidhi Kasagar <srinidhi.kasagar@stericsson.com> */
-       .atag_offset    = 0x100,
-       .smp            = smp_ops(ux500_smp_ops),
-       .map_io         = u8500_map_io,
-       .init_irq       = ux500_init_irq,
-       /* we re-use nomadik timer here */
-       .init_time      = ux500_timer_init,
-       .init_machine   = mop500_init_machine,
-       .init_late      = ux500_init_late,
-       .restart        = ux500_restart,
-MACHINE_END
-
-MACHINE_START(U8520, "ST-Ericsson U8520 Platform HREFP520")
-       .atag_offset    = 0x100,
-       .map_io         = u8500_map_io,
-       .init_irq       = ux500_init_irq,
-       .init_time      = ux500_timer_init,
-       .init_machine   = mop500_init_machine,
-       .init_late      = ux500_init_late,
-       .restart        = ux500_restart,
-MACHINE_END
-
-MACHINE_START(HREFV60, "ST-Ericsson U8500 Platform HREFv60+")
-       .atag_offset    = 0x100,
-       .smp            = smp_ops(ux500_smp_ops),
-       .map_io         = u8500_map_io,
-       .init_irq       = ux500_init_irq,
-       .init_time      = ux500_timer_init,
-       .init_machine   = hrefv60_init_machine,
-       .init_late      = ux500_init_late,
-       .restart        = ux500_restart,
-MACHINE_END
-
-MACHINE_START(SNOWBALL, "Calao Systems Snowball platform")
-       .atag_offset    = 0x100,
-       .smp            = smp_ops(ux500_smp_ops),
-       .map_io         = u8500_map_io,
-       .init_irq       = ux500_init_irq,
-       /* we re-use nomadik timer here */
-       .init_time      = ux500_timer_init,
-       .init_machine   = snowball_init_machine,
-       .init_late      = NULL,
-       .restart        = ux500_restart,
-MACHINE_END
index d6fab166cbf113b36e52306c8fc62632a984be89..511d6febbe9996ac7f4831ba6d878435765c2869 100644 (file)
@@ -79,7 +79,6 @@
 #define SNOWBALL_EN_3V3_ETH_GPIO       MOP500_AB8500_PIN_GPIO(26)      /* GPIO26 */
 
 struct device;
-struct i2c_board_info;
 extern struct mmci_platform_data mop500_sdi0_data;
 extern struct mmci_platform_data mop500_sdi1_data;
 extern struct mmci_platform_data mop500_sdi2_data;
@@ -88,25 +87,10 @@ extern struct msp_i2s_platform_data msp0_platform_data;
 extern struct msp_i2s_platform_data msp1_platform_data;
 extern struct msp_i2s_platform_data msp2_platform_data;
 extern struct msp_i2s_platform_data msp3_platform_data;
-extern struct arm_pmu_platdata db8500_pmu_platdata;
-extern struct amba_pl011_data uart0_plat;
-extern struct amba_pl011_data uart1_plat;
-extern struct amba_pl011_data uart2_plat;
 extern struct pl022_ssp_controller ssp0_plat;
-extern struct stedma40_platform_data dma40_plat_data;
 
-extern void mop500_sdi_init(struct device *parent);
-extern void snowball_sdi_init(struct device *parent);
-extern void hrefv60_sdi_init(struct device *parent);
-extern void mop500_sdi_tc35892_init(struct device *parent);
-void __init mop500_u8500uib_init(void);
-void __init mop500_stuib_init(void);
 void __init mop500_pinmaps_init(void);
 void __init snowball_pinmaps_init(void);
 void __init hrefv60_pinmaps_init(void);
-void mop500_audio_init(struct device *parent);
 
-int __init mop500_uib_init(void);
-void mop500_uib_i2c_add(int busnum, struct i2c_board_info *info,
-               unsigned n);
 #endif
index 301c3460d96af48f8bed5f3f89378cad8893c486..2e85c1e72535138a1b90c543ec3e95e2b36a6fa6 100644 (file)
@@ -32,7 +32,6 @@
 #include "irqs.h"
 
 #include "devices-db8500.h"
-#include "ste-dma40-db8500.h"
 #include "db8500-regs.h"
 #include "board-mop500.h"
 #include "id.h"
@@ -93,14 +92,6 @@ void __init u8500_map_io(void)
                iotable_init(u8500_io_desc, ARRAY_SIZE(u8500_io_desc));
 }
 
-static struct resource db8500_pmu_resources[] = {
-       [0] = {
-               .start          = IRQ_DB8500_PMU,
-               .end            = IRQ_DB8500_PMU,
-               .flags          = IORESOURCE_IRQ,
-       },
-};
-
 /*
  * The PMU IRQ lines of two cores are wired together into a single interrupt.
  * Bounce the interrupt to the other core if it's not ours.
@@ -125,54 +116,6 @@ struct arm_pmu_platdata db8500_pmu_platdata = {
        .handle_irq             = db8500_pmu_handler,
 };
 
-static struct platform_device db8500_pmu_device = {
-       .name                   = "arm-pmu",
-       .id                     = -1,
-       .num_resources          = ARRAY_SIZE(db8500_pmu_resources),
-       .resource               = db8500_pmu_resources,
-       .dev.platform_data      = &db8500_pmu_platdata,
-};
-
-static struct platform_device *platform_devs[] __initdata = {
-       &u8500_dma40_device,
-       &db8500_pmu_device,
-};
-
-static resource_size_t __initdata db8500_gpio_base[] = {
-       U8500_GPIOBANK0_BASE,
-       U8500_GPIOBANK1_BASE,
-       U8500_GPIOBANK2_BASE,
-       U8500_GPIOBANK3_BASE,
-       U8500_GPIOBANK4_BASE,
-       U8500_GPIOBANK5_BASE,
-       U8500_GPIOBANK6_BASE,
-       U8500_GPIOBANK7_BASE,
-       U8500_GPIOBANK8_BASE,
-};
-
-static void __init db8500_add_gpios(struct device *parent)
-{
-       struct nmk_gpio_platform_data pdata = {
-               .supports_sleepmode = true,
-       };
-
-       dbx500_add_gpios(parent, db8500_gpio_base,
-                        ARRAY_SIZE(db8500_gpio_base),
-                        IRQ_DB8500_GPIO0, &pdata);
-       dbx500_add_pinctrl(parent, "pinctrl-db8500", U8500_PRCMU_BASE);
-}
-
-static int usb_db8500_dma_cfg[] = {
-       DB8500_DMA_DEV38_USB_OTG_IEP_AND_OEP_1_9,
-       DB8500_DMA_DEV37_USB_OTG_IEP_AND_OEP_2_10,
-       DB8500_DMA_DEV36_USB_OTG_IEP_AND_OEP_3_11,
-       DB8500_DMA_DEV19_USB_OTG_IEP_AND_OEP_4_12,
-       DB8500_DMA_DEV18_USB_OTG_IEP_AND_OEP_5_13,
-       DB8500_DMA_DEV17_USB_OTG_IEP_AND_OEP_6_14,
-       DB8500_DMA_DEV16_USB_OTG_IEP_AND_OEP_7_15,
-       DB8500_DMA_DEV39_USB_OTG_IEP_AND_OEP_8
-};
-
 static const char *db8500_read_soc_id(void)
 {
        void __iomem *uid = __io_address(U8500_BB_UID_BASE);
@@ -192,60 +135,22 @@ static struct device * __init db8500_soc_device_init(void)
        return ux500_soc_device_init(soc_id);
 }
 
-/*
- * This function is called from the board init
- */
-struct device * __init u8500_init_devices(void)
-{
-       struct device *parent;
-       int i;
-
-       parent = db8500_soc_device_init();
-
-       db8500_add_rtc(parent);
-       db8500_add_gpios(parent);
-       db8500_add_usb(parent, usb_db8500_dma_cfg, usb_db8500_dma_cfg);
-
-       for (i = 0; i < ARRAY_SIZE(platform_devs); i++)
-               platform_devs[i]->dev.parent = parent;
-
-       platform_add_devices(platform_devs, ARRAY_SIZE(platform_devs));
-
-       return parent;
-}
-
 #ifdef CONFIG_MACH_UX500_DT
 static struct of_dev_auxdata u8500_auxdata_lookup[] __initdata = {
        /* Requires call-back bindings. */
        OF_DEV_AUXDATA("arm,cortex-a9-pmu", 0, "arm-pmu", &db8500_pmu_platdata),
        /* Requires DMA bindings. */
-       OF_DEV_AUXDATA("arm,pl011", 0x80120000, "uart0", NULL),
-       OF_DEV_AUXDATA("arm,pl011", 0x80121000, "uart1", NULL),
-       OF_DEV_AUXDATA("arm,pl011", 0x80007000, "uart2", NULL),
-       OF_DEV_AUXDATA("arm,pl022", 0x80002000, "ssp0",  &ssp0_plat),
-       OF_DEV_AUXDATA("arm,pl18x", 0x80126000, "sdi0",  NULL),
-       OF_DEV_AUXDATA("arm,pl18x", 0x80118000, "sdi1",  NULL),
-       OF_DEV_AUXDATA("arm,pl18x", 0x80005000, "sdi2",  NULL),
-       OF_DEV_AUXDATA("arm,pl18x", 0x80114000, "sdi4",  NULL),
-       /* Requires clock name bindings. */
-       OF_DEV_AUXDATA("st,nomadik-gpio", 0x8012e000, "gpio.0", NULL),
-       OF_DEV_AUXDATA("st,nomadik-gpio", 0x8012e080, "gpio.1", NULL),
-       OF_DEV_AUXDATA("st,nomadik-gpio", 0x8000e000, "gpio.2", NULL),
-       OF_DEV_AUXDATA("st,nomadik-gpio", 0x8000e080, "gpio.3", NULL),
-       OF_DEV_AUXDATA("st,nomadik-gpio", 0x8000e100, "gpio.4", NULL),
-       OF_DEV_AUXDATA("st,nomadik-gpio", 0x8000e180, "gpio.5", NULL),
-       OF_DEV_AUXDATA("st,nomadik-gpio", 0x8011e000, "gpio.6", NULL),
-       OF_DEV_AUXDATA("st,nomadik-gpio", 0x8011e080, "gpio.7", NULL),
-       OF_DEV_AUXDATA("st,nomadik-gpio", 0xa03fe000, "gpio.8", NULL),
-       OF_DEV_AUXDATA("st,nomadik-i2c", 0x80004000, "nmk-i2c.0", NULL),
-       OF_DEV_AUXDATA("st,nomadik-i2c", 0x80122000, "nmk-i2c.1", NULL),
-       OF_DEV_AUXDATA("st,nomadik-i2c", 0x80128000, "nmk-i2c.2", NULL),
-       OF_DEV_AUXDATA("st,nomadik-i2c", 0x80110000, "nmk-i2c.3", NULL),
-       OF_DEV_AUXDATA("st,nomadik-i2c", 0x8012a000, "nmk-i2c.4", NULL),
-       OF_DEV_AUXDATA("stericsson,db8500-musb", 0xa03e0000, "musb-ux500.0", NULL),
+       OF_DEV_AUXDATA("stericsson,ux500-msp-i2s", 0x80123000,
+                      "ux500-msp-i2s.0", &msp0_platform_data),
+       OF_DEV_AUXDATA("stericsson,ux500-msp-i2s", 0x80124000,
+                      "ux500-msp-i2s.1", &msp1_platform_data),
+       OF_DEV_AUXDATA("stericsson,ux500-msp-i2s", 0x80117000,
+                      "ux500-msp-i2s.2", &msp2_platform_data),
+       OF_DEV_AUXDATA("stericsson,ux500-msp-i2s", 0x80125000,
+                      "ux500-msp-i2s.3", &msp3_platform_data),
+       /* Requires non-DT:able platform data. */
        OF_DEV_AUXDATA("stericsson,db8500-prcmu", 0x80157000, "db8500-prcmu",
                        &db8500_prcmu_pdata),
-       OF_DEV_AUXDATA("smsc,lan9115", 0x50000000, "smsc911x.0", NULL),
        OF_DEV_AUXDATA("stericsson,ux500-cryp", 0xa03cb000, "cryp1", NULL),
        OF_DEV_AUXDATA("stericsson,ux500-hash", 0xa03c2000, "hash1", NULL),
        OF_DEV_AUXDATA("stericsson,snd-soc-mop500", 0, "snd-soc-mop500.0",
@@ -253,17 +158,6 @@ static struct of_dev_auxdata u8500_auxdata_lookup[] __initdata = {
        /* Requires device name bindings. */
        OF_DEV_AUXDATA("stericsson,db8500-pinctrl", U8500_PRCMU_BASE,
                "pinctrl-db8500", NULL),
-       /* Requires clock name and DMA bindings. */
-       OF_DEV_AUXDATA("stericsson,ux500-msp-i2s", 0x80123000,
-               "ux500-msp-i2s.0", &msp0_platform_data),
-       OF_DEV_AUXDATA("stericsson,ux500-msp-i2s", 0x80124000,
-               "ux500-msp-i2s.1", &msp1_platform_data),
-       OF_DEV_AUXDATA("stericsson,ux500-msp-i2s", 0x80117000,
-               "ux500-msp-i2s.2", &msp2_platform_data),
-       OF_DEV_AUXDATA("stericsson,ux500-msp-i2s", 0x80125000,
-               "ux500-msp-i2s.3", &msp3_platform_data),
-       /* Requires clock name bindings and channel address lookup table. */
-       OF_DEV_AUXDATA("stericsson,db8500-dma40", 0x801C0000, "dma40.0", NULL),
        {},
 };
 
index 5d7eebcabc63a12e6a699ecbe047099d95482496..f84d4397896b39705e0227dac27555542c1d9cc0 100644 (file)
@@ -78,9 +78,17 @@ void __init ux500_init_irq(void)
        if (cpu_is_u8500_family()) {
                prcmu_early_init(U8500_PRCMU_BASE, SZ_8K - 1);
                ux500_pm_init(U8500_PRCMU_BASE, SZ_8K - 1);
-               u8500_clk_init(U8500_CLKRST1_BASE, U8500_CLKRST2_BASE,
-                              U8500_CLKRST3_BASE, U8500_CLKRST5_BASE,
-                              U8500_CLKRST6_BASE);
+
+               if (of_have_populated_dt())
+                       u8500_of_clk_init(U8500_CLKRST1_BASE,
+                                         U8500_CLKRST2_BASE,
+                                         U8500_CLKRST3_BASE,
+                                         U8500_CLKRST5_BASE,
+                                         U8500_CLKRST6_BASE);
+               else
+                       u8500_clk_init(U8500_CLKRST1_BASE, U8500_CLKRST2_BASE,
+                                      U8500_CLKRST3_BASE, U8500_CLKRST5_BASE,
+                                      U8500_CLKRST6_BASE);
        } else if (cpu_is_u9540()) {
                prcmu_early_init(U8500_PRCMU_BASE, SZ_8K - 1);
                ux500_pm_init(U8500_PRCMU_BASE, SZ_8K - 1);
@@ -96,11 +104,6 @@ void __init ux500_init_irq(void)
        }
 }
 
-void __init ux500_init_late(void)
-{
-       mop500_uib_init();
-}
-
 static const char * __init ux500_get_machine(void)
 {
        return kasprintf(GFP_KERNEL, "DB%4x", dbx500_partnumber());
diff --git a/arch/arm/mach-ux500/devices-common.c b/arch/arm/mach-ux500/devices-common.c
deleted file mode 100644 (file)
index f71b3d7..0000000
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Copyright (C) ST-Ericsson SA 2010
- *
- * Author: Rabin Vincent <rabin.vincent@stericsson.com> for ST-Ericsson
- * License terms: GNU General Public License (GPL), version 2.
- */
-
-#include <linux/kernel.h>
-#include <linux/dma-mapping.h>
-#include <linux/err.h>
-#include <linux/irq.h>
-#include <linux/slab.h>
-#include <linux/platform_device.h>
-#include <linux/platform_data/pinctrl-nomadik.h>
-
-#include "irqs.h"
-
-#include "devices-common.h"
-
-static struct platform_device *
-dbx500_add_gpio(struct device *parent, int id, resource_size_t addr, int irq,
-               struct nmk_gpio_platform_data *pdata)
-{
-       struct resource resources[] = {
-               {
-                       .start  = addr,
-                       .end    = addr + 127,
-                       .flags  = IORESOURCE_MEM,
-               },
-               {
-                       .start  = irq,
-                       .end    = irq,
-                       .flags  = IORESOURCE_IRQ,
-               }
-       };
-
-       return platform_device_register_resndata(
-               parent,
-               "gpio",
-               id,
-               resources,
-               ARRAY_SIZE(resources),
-               pdata,
-               sizeof(*pdata));
-}
-
-void dbx500_add_gpios(struct device *parent, resource_size_t *base, int num,
-                     int irq, struct nmk_gpio_platform_data *pdata)
-{
-       int first = 0;
-       int i;
-
-       for (i = 0; i < num; i++, first += 32, irq++) {
-               pdata->first_gpio = first;
-               pdata->first_irq = NOMADIK_GPIO_TO_IRQ(first);
-               pdata->num_gpio = 32;
-
-               dbx500_add_gpio(parent, i, base[i], irq, pdata);
-       }
-}
diff --git a/arch/arm/mach-ux500/devices-common.h b/arch/arm/mach-ux500/devices-common.h
deleted file mode 100644 (file)
index 96fa4ac..0000000
+++ /dev/null
@@ -1,149 +0,0 @@
-/*
- * Copyright (C) ST-Ericsson SA 2010
- *
- * Author: Rabin Vincent <rabin.vincent@stericsson.com> for ST-Ericsson
- * License terms: GNU General Public License (GPL), version 2.
- */
-
-#ifndef __DEVICES_COMMON_H
-#define __DEVICES_COMMON_H
-
-#include <linux/platform_device.h>
-#include <linux/dma-mapping.h>
-#include <linux/sys_soc.h>
-#include <linux/amba/bus.h>
-#include <linux/platform_data/i2c-nomadik.h>
-#include <linux/platform_data/crypto-ux500.h>
-
-struct spi_master_cntlr;
-
-static inline struct amba_device *
-dbx500_add_msp_spi(struct device *parent, const char *name,
-                  resource_size_t base, int irq,
-                  struct spi_master_cntlr *pdata)
-{
-       return amba_ahb_device_add(parent, name, base, SZ_4K, irq, 0,
-                                  pdata, 0);
-}
-
-static inline struct amba_device *
-dbx500_add_spi(struct device *parent, const char *name, resource_size_t base,
-              int irq, struct spi_master_cntlr *pdata,
-              u32 periphid)
-{
-       return amba_ahb_device_add(parent, name, base, SZ_4K, irq, 0,
-                                  pdata, periphid);
-}
-
-struct mmci_platform_data;
-
-static inline struct amba_device *
-dbx500_add_sdi(struct device *parent, const char *name, resource_size_t base,
-              int irq, struct mmci_platform_data *pdata, u32 periphid)
-{
-       return amba_ahb_device_add(parent, name, base, SZ_4K, irq, 0,
-                                  pdata, periphid);
-}
-
-struct amba_pl011_data;
-
-static inline struct amba_device *
-dbx500_add_uart(struct device *parent, const char *name, resource_size_t base,
-               int irq, struct amba_pl011_data *pdata)
-{
-       return amba_ahb_device_add(parent, name, base, SZ_4K, irq, 0, pdata, 0);
-}
-
-struct nmk_i2c_controller;
-
-static inline struct amba_device *
-dbx500_add_i2c(struct device *parent, int id, resource_size_t base, int irq,
-              struct nmk_i2c_controller *data)
-{
-       /* Conjure a name similar to what the platform device used to have */
-       char name[16];
-
-       snprintf(name, sizeof(name), "nmk-i2c.%d", id);
-       return amba_apb_device_add(parent, name, base, SZ_4K, irq, 0, data, 0);
-}
-
-static inline struct amba_device *
-dbx500_add_rtc(struct device *parent, resource_size_t base, int irq)
-{
-       return amba_apb_device_add(parent, "rtc-pl031", base, SZ_4K, irq,
-                               0, NULL, 0);
-}
-
-struct cryp_platform_data;
-
-static inline struct platform_device *
-dbx500_add_cryp1(struct device *parent, int id, resource_size_t base, int irq,
-               struct cryp_platform_data *pdata)
-{
-       struct resource res[] = {
-                       DEFINE_RES_MEM(base, SZ_4K),
-                       DEFINE_RES_IRQ(irq),
-       };
-
-       struct platform_device_info pdevinfo = {
-                       .parent = parent,
-                       .name = "cryp1",
-                       .id = id,
-                       .res = res,
-                       .num_res = ARRAY_SIZE(res),
-                       .data = pdata,
-                       .size_data = sizeof(*pdata),
-                       .dma_mask = DMA_BIT_MASK(32),
-       };
-
-       return platform_device_register_full(&pdevinfo);
-}
-
-struct hash_platform_data;
-
-static inline struct platform_device *
-dbx500_add_hash1(struct device *parent, int id, resource_size_t base,
-               struct hash_platform_data *pdata)
-{
-       struct resource res[] = {
-                       DEFINE_RES_MEM(base, SZ_4K),
-       };
-
-       struct platform_device_info pdevinfo = {
-                       .parent = parent,
-                       .name = "hash1",
-                       .id = id,
-                       .res = res,
-                       .num_res = ARRAY_SIZE(res),
-                       .data = pdata,
-                       .size_data = sizeof(*pdata),
-                       .dma_mask = DMA_BIT_MASK(32),
-       };
-
-       return platform_device_register_full(&pdevinfo);
-}
-
-struct nmk_gpio_platform_data;
-
-void dbx500_add_gpios(struct device *parent, resource_size_t *base, int num,
-                     int irq, struct nmk_gpio_platform_data *pdata);
-
-static inline void
-dbx500_add_pinctrl(struct device *parent, const char *name,
-                  resource_size_t base)
-{
-       struct resource res[] = {
-               DEFINE_RES_MEM(base, SZ_8K),
-       };
-       struct platform_device_info pdevinfo = {
-               .parent = parent,
-               .name = name,
-               .id = -1,
-               .res = res,
-               .num_res = ARRAY_SIZE(res),
-       };
-
-       platform_device_register_full(&pdevinfo);
-}
-
-#endif
index bc316062e0c23661c118429036207e50911ffebb..c59f89d058ff4499c6d7dd33b6464d086a8fdd0b 100644 (file)
@@ -9,10 +9,8 @@
 #include <linux/platform_device.h>
 #include <linux/interrupt.h>
 #include <linux/io.h>
-#include <linux/gpio.h>
 #include <linux/amba/bus.h>
 #include <linux/amba/pl022.h>
-#include <linux/platform_data/dma-ste-dma40.h>
 #include <linux/mfd/dbx500-prcmu.h>
 
 #include "setup.h"
 
 #include "db8500-regs.h"
 #include "devices-db8500.h"
-#include "ste-dma40-db8500.h"
-
-static struct resource dma40_resources[] = {
-       [0] = {
-               .start = U8500_DMA_BASE,
-               .end   = U8500_DMA_BASE + SZ_4K - 1,
-               .flags = IORESOURCE_MEM,
-               .name  = "base",
-       },
-       [1] = {
-               .start = U8500_DMA_LCPA_BASE,
-               .end   = U8500_DMA_LCPA_BASE + 2 * SZ_1K - 1,
-               .flags = IORESOURCE_MEM,
-               .name  = "lcpa",
-       },
-       [2] = {
-               .start = IRQ_DB8500_DMA,
-               .end   = IRQ_DB8500_DMA,
-               .flags = IORESOURCE_IRQ,
-       }
-};
-
-struct stedma40_platform_data dma40_plat_data = {
-       .disabled_channels = {-1},
-};
-
-struct platform_device u8500_dma40_device = {
-       .dev = {
-               .platform_data = &dma40_plat_data,
-               .coherent_dma_mask = DMA_BIT_MASK(32),
-       },
-       .name = "dma40",
-       .id = 0,
-       .num_resources = ARRAY_SIZE(dma40_resources),
-       .resource = dma40_resources
-};
-
-struct resource keypad_resources[] = {
-       [0] = {
-               .start = U8500_SKE_BASE,
-               .end = U8500_SKE_BASE + SZ_4K - 1,
-               .flags = IORESOURCE_MEM,
-       },
-       [1] = {
-               .start = IRQ_DB8500_KB,
-               .end = IRQ_DB8500_KB,
-               .flags = IORESOURCE_IRQ,
-       },
-};
-
-struct platform_device u8500_ske_keypad_device = {
-       .name = "nmk-ske-keypad",
-       .id = -1,
-       .num_resources = ARRAY_SIZE(keypad_resources),
-       .resource = keypad_resources,
-};
 
 struct prcmu_pdata db8500_prcmu_pdata = {
        .ab_platdata    = &ab8500_platdata,
@@ -84,39 +26,3 @@ struct prcmu_pdata db8500_prcmu_pdata = {
        .version_offset = DB8500_PRCMU_FW_VERSION_OFFSET,
        .legacy_offset  = DB8500_PRCMU_LEGACY_OFFSET,
 };
-
-static struct resource db8500_prcmu_res[] = {
-       {
-               .name  = "prcmu",
-               .start = U8500_PRCMU_BASE,
-               .end   = U8500_PRCMU_BASE + SZ_8K - 1,
-               .flags = IORESOURCE_MEM,
-       },
-       {
-               .name  = "prcmu-tcdm",
-               .start = U8500_PRCMU_TCDM_BASE,
-               .end   = U8500_PRCMU_TCDM_BASE + SZ_4K - 1,
-               .flags = IORESOURCE_MEM,
-       },
-       {
-               .name  = "irq",
-               .start = IRQ_DB8500_PRCMU1,
-               .end   = IRQ_DB8500_PRCMU1,
-               .flags = IORESOURCE_IRQ,
-       },
-       {
-               .name  = "prcmu-tcpm",
-               .start = U8500_PRCMU_TCPM_BASE,
-               .end   = U8500_PRCMU_TCPM_BASE + SZ_32K - 1,
-               .flags = IORESOURCE_MEM,
-       },
-};
-
-struct platform_device db8500_prcmu_device = {
-       .name                   = "db8500-prcmu",
-       .resource               = db8500_prcmu_res,
-       .num_resources          = ARRAY_SIZE(db8500_prcmu_res),
-       .dev = {
-               .platform_data = &db8500_prcmu_pdata,
-       },
-};
index 321998320f98536abf4ef603b498d430ab0e1ac0..b8ffc9979bb2db763738a2cf8f39cf441edd3887 100644 (file)
 #ifndef __DEVICES_DB8500_H
 #define __DEVICES_DB8500_H
 
-#include <linux/platform_data/usb-musb-ux500.h>
 #include "irqs.h"
 #include "db8500-regs.h"
-#include "devices-common.h"
 
-struct ske_keypad_platform_data;
-struct pl022_ssp_controller;
 struct platform_device;
 
 extern struct ab8500_platform_data ab8500_platdata;
 extern struct prcmu_pdata db8500_prcmu_pdata;
-extern struct platform_device db8500_prcmu_device;
 
-static inline struct platform_device *
-db8500_add_ske_keypad(struct device *parent,
-                     struct ske_keypad_platform_data *pdata,
-                     size_t size)
-{
-       struct resource resources[] = {
-               DEFINE_RES_MEM(U8500_SKE_BASE, SZ_4K),
-               DEFINE_RES_IRQ(IRQ_DB8500_KB),
-       };
-
-       return platform_device_register_resndata(parent, "nmk-ske-keypad", -1,
-                                                resources, 2, pdata, size);
-}
-
-static inline struct amba_device *
-db8500_add_ssp(struct device *parent, const char *name, resource_size_t base,
-              int irq, struct pl022_ssp_controller *pdata)
-{
-       return amba_ahb_device_add(parent, name, base, SZ_4K, irq, 0, pdata, 0);
-}
-
-#define db8500_add_i2c0(parent, pdata) \
-       dbx500_add_i2c(parent, 0, U8500_I2C0_BASE, IRQ_DB8500_I2C0, pdata)
-#define db8500_add_i2c1(parent, pdata) \
-       dbx500_add_i2c(parent, 1, U8500_I2C1_BASE, IRQ_DB8500_I2C1, pdata)
-#define db8500_add_i2c2(parent, pdata) \
-       dbx500_add_i2c(parent, 2, U8500_I2C2_BASE, IRQ_DB8500_I2C2, pdata)
-#define db8500_add_i2c3(parent, pdata) \
-       dbx500_add_i2c(parent, 3, U8500_I2C3_BASE, IRQ_DB8500_I2C3, pdata)
-#define db8500_add_i2c4(parent, pdata) \
-       dbx500_add_i2c(parent, 4, U8500_I2C4_BASE, IRQ_DB8500_I2C4, pdata)
-
-#define db8500_add_msp0_spi(parent, pdata) \
-       dbx500_add_msp_spi(parent, "msp0", U8500_MSP0_BASE, \
-                          IRQ_DB8500_MSP0, pdata)
-#define db8500_add_msp1_spi(parent, pdata) \
-       dbx500_add_msp_spi(parent, "msp1", U8500_MSP1_BASE, \
-                          IRQ_DB8500_MSP1, pdata)
-#define db8500_add_msp2_spi(parent, pdata) \
-       dbx500_add_msp_spi(parent, "msp2", U8500_MSP2_BASE, \
-                          IRQ_DB8500_MSP2, pdata)
-#define db8500_add_msp3_spi(parent, pdata) \
-       dbx500_add_msp_spi(parent, "msp3", U8500_MSP3_BASE, \
-                          IRQ_DB8500_MSP1, pdata)
-
-#define db8500_add_rtc(parent) \
-       dbx500_add_rtc(parent, U8500_RTC_BASE, IRQ_DB8500_RTC);
-
-#define db8500_add_usb(parent, rx_cfg, tx_cfg) \
-       ux500_add_usb(parent, U8500_USBOTG_BASE, \
-                     IRQ_DB8500_USBOTG, rx_cfg, tx_cfg)
-
-#define db8500_add_sdi0(parent, pdata, pid) \
-       dbx500_add_sdi(parent, "sdi0", U8500_SDI0_BASE, \
-                      IRQ_DB8500_SDMMC0, pdata, pid)
-#define db8500_add_sdi1(parent, pdata, pid) \
-       dbx500_add_sdi(parent, "sdi1", U8500_SDI1_BASE, \
-                      IRQ_DB8500_SDMMC1, pdata, pid)
-#define db8500_add_sdi2(parent, pdata, pid) \
-       dbx500_add_sdi(parent, "sdi2", U8500_SDI2_BASE, \
-                      IRQ_DB8500_SDMMC2, pdata, pid)
-#define db8500_add_sdi3(parent, pdata, pid) \
-       dbx500_add_sdi(parent, "sdi3", U8500_SDI3_BASE, \
-                      IRQ_DB8500_SDMMC3, pdata, pid)
-#define db8500_add_sdi4(parent, pdata, pid) \
-       dbx500_add_sdi(parent, "sdi4", U8500_SDI4_BASE, \
-                      IRQ_DB8500_SDMMC4, pdata, pid)
-#define db8500_add_sdi5(parent, pdata, pid) \
-       dbx500_add_sdi(parent, "sdi5", U8500_SDI5_BASE, \
-                      IRQ_DB8500_SDMMC5, pdata, pid)
-
-#define db8500_add_ssp0(parent, pdata) \
-       db8500_add_ssp(parent, "ssp0", U8500_SSP0_BASE, \
-                      IRQ_DB8500_SSP0, pdata)
-#define db8500_add_ssp1(parent, pdata) \
-       db8500_add_ssp(parent, "ssp1", U8500_SSP1_BASE, \
-                      IRQ_DB8500_SSP1, pdata)
-
-#define db8500_add_spi0(parent, pdata) \
-       dbx500_add_spi(parent, "spi0", U8500_SPI0_BASE, \
-                      IRQ_DB8500_SPI0, pdata, 0)
-#define db8500_add_spi1(parent, pdata) \
-       dbx500_add_spi(parent, "spi1", U8500_SPI1_BASE, \
-                      IRQ_DB8500_SPI1, pdata, 0)
-#define db8500_add_spi2(parent, pdata) \
-       dbx500_add_spi(parent, "spi2", U8500_SPI2_BASE, \
-                      IRQ_DB8500_SPI2, pdata, 0)
-#define db8500_add_spi3(parent, pdata) \
-       dbx500_add_spi(parent, "spi3", U8500_SPI3_BASE, \
-                      IRQ_DB8500_SPI3, pdata, 0)
-
-#define db8500_add_uart0(parent, pdata) \
-       dbx500_add_uart(parent, "uart0", U8500_UART0_BASE, \
-                       IRQ_DB8500_UART0, pdata)
-#define db8500_add_uart1(parent, pdata) \
-       dbx500_add_uart(parent, "uart1", U8500_UART1_BASE, \
-                       IRQ_DB8500_UART1, pdata)
-#define db8500_add_uart2(parent, pdata) \
-       dbx500_add_uart(parent, "uart2", U8500_UART2_BASE, \
-                       IRQ_DB8500_UART2, pdata)
-
-#define db8500_add_cryp1(parent, pdata) \
-       dbx500_add_cryp1(parent, -1, U8500_CRYP1_BASE, IRQ_DB8500_CRYP1, pdata)
-#define db8500_add_hash1(parent, pdata) \
-       dbx500_add_hash1(parent, -1, U8500_HASH1_BASE, pdata)
 #endif
index cbc6f1e4104ddc2c9b8c0bd7c3b96f662167f24f..5bca7c605cd6c1a0cc5bffb54df3f006ff338a52 100644 (file)
 struct platform_device;
 struct amba_device;
 
-extern struct platform_device u8500_gpio_devs[];
-
 extern struct amba_device ux500_pl031_device;
 
-extern struct platform_device ux500_hash1_device;
-extern struct platform_device ux500_cryp1_device;
-
-extern struct platform_device u8500_dma40_device;
-extern struct platform_device ux500_ske_keypad_device;
-
 #endif
index 656324aad18e229d67a3abaf36af2c04d6c85c3c..bdb356498a748563091d7563525db015500dbfc1 100644 (file)
@@ -24,7 +24,6 @@ extern void __init u8500_map_io(void);
 extern struct device * __init u8500_init_devices(void);
 
 extern void __init ux500_init_irq(void);
-extern void __init ux500_init_late(void);
 
 extern struct device *ux500_soc_device_init(const char *soc_id);
 
index b6bd0efcbe64465bed83d2814e01f57483a03c92..05a4ff78b3bd9e73deaf4c0e814f79cdae8e971e 100644 (file)
@@ -97,8 +97,8 @@ dt_fail:
         * sched_clock with higher rating then MTU since is always-on.
         *
         */
-
-       nmdk_timer_init(mtu_timer_base, IRQ_MTU0);
+       if (!of_have_populated_dt())
+               nmdk_timer_init(mtu_timer_base, IRQ_MTU0);
        clksrc_dbx500_prcmu_init(prcmu_timer_base);
        ux500_twd_init();
 }
diff --git a/arch/arm/mach-ux500/usb.c b/arch/arm/mach-ux500/usb.c
deleted file mode 100644 (file)
index b7bd8d3..0000000
+++ /dev/null
@@ -1,135 +0,0 @@
-/*
- * Copyright (C) ST-Ericsson SA 2011
- *
- * Author: Mian Yousaf Kaukab <mian.yousaf.kaukab@stericsson.com>
- * License terms: GNU General Public License (GPL) version 2
- */
-#include <linux/platform_device.h>
-#include <linux/usb/musb.h>
-#include <linux/dma-mapping.h>
-#include <linux/platform_data/usb-musb-ux500.h>
-#include <linux/platform_data/dma-ste-dma40.h>
-
-#include "db8500-regs.h"
-
-#define MUSB_DMA40_RX_CH { \
-               .mode = STEDMA40_MODE_LOGICAL, \
-               .dir = DMA_DEV_TO_MEM, \
-       }
-
-#define MUSB_DMA40_TX_CH { \
-               .mode = STEDMA40_MODE_LOGICAL, \
-               .dir = DMA_MEM_TO_DEV, \
-       }
-
-static struct stedma40_chan_cfg musb_dma_rx_ch[UX500_MUSB_DMA_NUM_RX_TX_CHANNELS]
-       = {
-       MUSB_DMA40_RX_CH,
-       MUSB_DMA40_RX_CH,
-       MUSB_DMA40_RX_CH,
-       MUSB_DMA40_RX_CH,
-       MUSB_DMA40_RX_CH,
-       MUSB_DMA40_RX_CH,
-       MUSB_DMA40_RX_CH,
-       MUSB_DMA40_RX_CH
-};
-
-static struct stedma40_chan_cfg musb_dma_tx_ch[UX500_MUSB_DMA_NUM_RX_TX_CHANNELS]
-       = {
-       MUSB_DMA40_TX_CH,
-       MUSB_DMA40_TX_CH,
-       MUSB_DMA40_TX_CH,
-       MUSB_DMA40_TX_CH,
-       MUSB_DMA40_TX_CH,
-       MUSB_DMA40_TX_CH,
-       MUSB_DMA40_TX_CH,
-       MUSB_DMA40_TX_CH,
-};
-
-static void *ux500_dma_rx_param_array[UX500_MUSB_DMA_NUM_RX_TX_CHANNELS] = {
-       &musb_dma_rx_ch[0],
-       &musb_dma_rx_ch[1],
-       &musb_dma_rx_ch[2],
-       &musb_dma_rx_ch[3],
-       &musb_dma_rx_ch[4],
-       &musb_dma_rx_ch[5],
-       &musb_dma_rx_ch[6],
-       &musb_dma_rx_ch[7]
-};
-
-static void *ux500_dma_tx_param_array[UX500_MUSB_DMA_NUM_RX_TX_CHANNELS] = {
-       &musb_dma_tx_ch[0],
-       &musb_dma_tx_ch[1],
-       &musb_dma_tx_ch[2],
-       &musb_dma_tx_ch[3],
-       &musb_dma_tx_ch[4],
-       &musb_dma_tx_ch[5],
-       &musb_dma_tx_ch[6],
-       &musb_dma_tx_ch[7]
-};
-
-static struct ux500_musb_board_data musb_board_data = {
-       .dma_rx_param_array = ux500_dma_rx_param_array,
-       .dma_tx_param_array = ux500_dma_tx_param_array,
-       .dma_filter = stedma40_filter,
-};
-
-static struct musb_hdrc_platform_data musb_platform_data = {
-       .mode = MUSB_OTG,
-       .board_data = &musb_board_data,
-};
-
-static struct resource usb_resources[] = {
-       [0] = {
-               .name   = "usb-mem",
-               .flags  =  IORESOURCE_MEM,
-       },
-
-       [1] = {
-               .name   = "mc", /* hard-coded in musb */
-               .flags  = IORESOURCE_IRQ,
-       },
-};
-
-struct platform_device ux500_musb_device = {
-       .name = "musb-ux500",
-       .id = 0,
-       .dev = {
-               .platform_data = &musb_platform_data,
-               .coherent_dma_mask = DMA_BIT_MASK(32),
-       },
-       .num_resources = ARRAY_SIZE(usb_resources),
-       .resource = usb_resources,
-};
-
-static inline void ux500_usb_dma_update_rx_ch_config(int *dev_type)
-{
-       u32 idx;
-
-       for (idx = 0; idx < UX500_MUSB_DMA_NUM_RX_TX_CHANNELS; idx++)
-               musb_dma_rx_ch[idx].dev_type = dev_type[idx];
-}
-
-static inline void ux500_usb_dma_update_tx_ch_config(int *dev_type)
-{
-       u32 idx;
-
-       for (idx = 0; idx < UX500_MUSB_DMA_NUM_RX_TX_CHANNELS; idx++)
-               musb_dma_tx_ch[idx].dev_type = dev_type[idx];
-}
-
-void ux500_add_usb(struct device *parent, resource_size_t base, int irq,
-                  int *dma_rx_cfg, int *dma_tx_cfg)
-{
-       ux500_musb_device.resource[0].start = base;
-       ux500_musb_device.resource[0].end = base + SZ_64K - 1;
-       ux500_musb_device.resource[1].start = irq;
-       ux500_musb_device.resource[1].end = irq;
-
-       ux500_usb_dma_update_rx_ch_config(dma_rx_cfg);
-       ux500_usb_dma_update_tx_ch_config(dma_tx_cfg);
-
-       ux500_musb_device.dev.parent = parent;
-
-       platform_device_register(&ux500_musb_device);
-}
index 36579544780493706381c22008c64577bc04fde2..d7e7422527cac791938e4006873bad4fc8883d64 100644 (file)
@@ -4,14 +4,12 @@ config ARCH_VEXPRESS
        select ARM_AMBA
        select ARM_GIC
        select ARM_TIMER_SP804
-       select CLKDEV_LOOKUP
        select COMMON_CLK
        select COMMON_CLK_VERSATILE
        select CPU_V7
        select GENERIC_CLOCKEVENTS
        select HAVE_ARM_SCU if SMP
        select HAVE_ARM_TWD if SMP
-       select HAVE_CLK
        select HAVE_PATA_PLATFORM
        select HAVE_SMP
        select ICST
index 95a469e23e378078af77ffcd9eecc9b29e5ff264..4f8b8cb17ff50560c751058b2f44980294482428 100644 (file)
@@ -1,12 +1,10 @@
 /*
  * Versatile Express V2M Motherboard Support
  */
-#include <linux/clocksource.h>
 #include <linux/device.h>
 #include <linux/amba/bus.h>
 #include <linux/amba/mmci.h>
 #include <linux/io.h>
-#include <linux/clocksource.h>
 #include <linux/smp.h>
 #include <linux/init.h>
 #include <linux/of_address.h>
@@ -22,7 +20,6 @@
 #include <linux/regulator/fixed.h>
 #include <linux/regulator/machine.h>
 #include <linux/vexpress.h>
-#include <linux/clk-provider.h>
 #include <linux/clkdev.h>
 
 #include <asm/mach-types.h>
@@ -422,16 +419,8 @@ void __init v2m_dt_init_early(void)
                        pr_warning("vexpress: DT HBI (%x) is not matching "
                                        "hardware (%x)!\n", dt_hbi, hbi);
        }
-}
-
-static void __init v2m_dt_timer_init(void)
-{
-       of_clk_init(NULL);
 
-       clocksource_of_init();
-
-       versatile_sched_clock_init(vexpress_get_24mhz_clock_base(),
-                               24000000);
+       versatile_sched_clock_init(vexpress_get_24mhz_clock_base(), 24000000);
 }
 
 static const struct of_device_id v2m_dt_bus_match[] __initconst = {
@@ -458,6 +447,5 @@ DT_MACHINE_START(VEXPRESS_DT, "ARM-Versatile Express")
        .smp_init       = smp_init_ops(vexpress_smp_init_ops),
        .map_io         = v2m_dt_map_io,
        .init_early     = v2m_dt_init_early,
-       .init_time      = v2m_dt_timer_init,
        .init_machine   = v2m_dt_init,
 MACHINE_END
index 9b252934b2065f60f21888f5bc76ffd7c609326e..927be93b692ec37fff6e5944649d1237c25617d8 100644 (file)
@@ -5,7 +5,6 @@ config ARCH_VT8500
        select CLKDEV_LOOKUP
        select CLKSRC_OF
        select GENERIC_CLOCKEVENTS
-       select HAVE_CLK
        select VT8500_TIMER
        select PINCTRL
        help
diff --git a/arch/arm/mach-vt8500/common.h b/arch/arm/mach-vt8500/common.h
deleted file mode 100644 (file)
index 087787a..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-/* linux/arch/arm/mach-vt8500/dt_common.h
- *
- * Copyright (C) 2012 Tony Prisk <linux@prisktech.co.nz>
- *
- * This software is licensed under the terms of the GNU General Public
- * License version 2, as published by the Free Software Foundation, and
- * may be copied, distributed, and modified under those terms.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- */
-
-#ifndef __ARCH_ARM_MACH_VT8500_DT_COMMON_H
-#define __ARCH_ARM_MACH_VT8500_DT_COMMON_H
-
-#include <linux/of.h>
-
-/* defined in drivers/clk/clk-vt8500.c */
-void __init vtwm_clk_init(void __iomem *pmc_base);
-
-#endif
index eefaa60d6614c72ca20608fd2636bf18cc12b65f..4a73464cb11b4f449aa15c55628a0f35bab06d3a 100644 (file)
@@ -18,7 +18,6 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
-#include <linux/clocksource.h>
 #include <linux/io.h>
 #include <linux/pm.h>
 #include <linux/reboot.h>
@@ -33,8 +32,6 @@
 #include <linux/of_irq.h>
 #include <linux/of_platform.h>
 
-#include "common.h"
-
 #define LEGACY_GPIO_BASE       0xD8110000
 #define LEGACY_PMC_BASE                0xD8130000
 
@@ -162,8 +159,6 @@ void __init vt8500_init(void)
        else
                pr_err("%s: PMC Hibernation register could not be remapped, not enabling power off!\n", __func__);
 
-       vtwm_clk_init(pmc_base);
-
        of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
 }
 
@@ -180,7 +175,6 @@ DT_MACHINE_START(WMT_DT, "VIA/Wondermedia SoC (Device Tree Support)")
        .dt_compat      = vt8500_dt_compat,
        .map_io         = vt8500_map_io,
        .init_machine   = vt8500_init,
-       .init_time      = clocksource_of_init,
        .restart        = vt8500_restart,
 MACHINE_END
 
index 037660633fa4caab075722bc693cb638419d0082..01619c2910e364271ab565f49c8644850b9fc70b 100644 (file)
@@ -1965,7 +1965,6 @@ static irqreturn_t omap2_dma_irq_handler(int irq, void *dev_id)
 static struct irqaction omap24xx_dma_irq = {
        .name = "DMA",
        .handler = omap2_dma_irq_handler,
-       .flags = IRQF_DISABLED
 };
 
 #else
index 4fb1f03a10d1f718b9f99d1e5309c9732ebc0a1f..335beb3413556637510b10ced41cc7f0a62f0b48 100644 (file)
@@ -87,8 +87,12 @@ IS_SAMSUNG_CPU(exynos5440, EXYNOS5440_SOC_ID, EXYNOS5_SOC_MASK)
 #endif
 
 #if defined(CONFIG_CPU_S3C6400) || defined(CONFIG_CPU_S3C6410)
+# define soc_is_s3c6400()      is_samsung_s3c6400()
+# define soc_is_s3c6410()      is_samsung_s3c6410()
 # define soc_is_s3c64xx()      (is_samsung_s3c6400() || is_samsung_s3c6410())
 #else
+# define soc_is_s3c6400()      0
+# define soc_is_s3c6410()      0
 # define soc_is_s3c64xx()      0
 #endif
 
index 50a3ea0037db10d2032e2ce020688b6fa74614b0..aa9511b6914a40c92e1cb99c2b544740a8407c24 100644 (file)
  * published by the Free Software Foundation.
 */
 
+/*
+ * NOTE: Code in this file is not used on S3C64xx when booting with
+ * Device Tree support.
+ */
+
 #include <linux/init.h>
 #include <linux/module.h>
 #include <linux/interrupt.h>
 #include <linux/ioport.h>
 #include <linux/serial_core.h>
 #include <linux/platform_device.h>
+#include <linux/of.h>
 
 #include <mach/hardware.h>
 
@@ -148,8 +154,12 @@ static int __init s3c_arch_init(void)
 
        // do the correct init for cpu
 
-       if (cpu == NULL)
+       if (cpu == NULL) {
+               /* Not needed when booting with device tree. */
+               if (of_have_populated_dt())
+                       return 0;
                panic("s3c_arch_init: NULL cpu\n");
+       }
 
        ret = (cpu->init)();
        if (ret != 0)
index f616109a57a66be4ab4f429e8204fa69b06f21d1..d038b3c072a920956bbd406e0189c35dba0b5b46 100644 (file)
@@ -515,7 +515,7 @@ config VIRTIO_BLK
 config BLK_DEV_HD
        bool "Very old hard disk (MFM/RLL/IDE) driver"
        depends on HAVE_IDE
-       depends on !ARM || ARCH_RPC || ARCH_SHARK || BROKEN
+       depends on !ARM || ARCH_RPC || BROKEN
        help
          This is a very old hard disk driver that lacks the enhanced
          functionality of the newer ones.
index 5fb4ff53d0887eca089a7a853b29a11df9cab6a5..6b950ca8b71108fdf3f32dd5ea6503eb1e5dc7ed 100644 (file)
 #include <linux/clk-provider.h>
 #include <linux/clkdev.h>
 #include <linux/clk/bcm2835.h>
-#include <linux/clk-provider.h>
 #include <linux/of.h>
 
-static const struct of_device_id clk_match[] __initconst = {
-       { .compatible = "fixed-clock", .data = of_fixed_clk_setup, },
-       { }
-};
-
 /*
  * These are fixed clocks. They're probably not all root clocks and it may
  * be possible to turn them on and off but until this is mapped out better
@@ -63,6 +57,4 @@ void __init bcm2835_init_clocks(void)
        ret = clk_register_clkdev(clk, NULL, "20215000.uart");
        if (ret)
                pr_err("uart1_pclk alias not registered\n");
-
-       of_clk_init(clk_match);
 }
index 2e08cb00193685eb80e617c386dcb0b31871c122..2e7e9d9798cb20901cc2dd234c33ef6d306dc966 100644 (file)
@@ -20,8 +20,7 @@
 #include <linux/clk-provider.h>
 #include <linux/io.h>
 #include <linux/of.h>
-
-extern void __iomem *sregs_base;
+#include <linux/of_address.h>
 
 #define HB_PLL_LOCK_500                0x20000000
 #define HB_PLL_LOCK            0x10000000
@@ -280,6 +279,7 @@ static __init struct clk *hb_clk_init(struct device_node *node, const struct clk
        const char *clk_name = node->name;
        const char *parent_name;
        struct clk_init_data init;
+       struct device_node *srnp;
        int rc;
 
        rc = of_property_read_u32(node, "reg", &reg);
@@ -290,7 +290,11 @@ static __init struct clk *hb_clk_init(struct device_node *node, const struct clk
        if (WARN_ON(!hb_clk))
                return NULL;
 
-       hb_clk->reg = sregs_base + reg;
+       /* Map system registers */
+       srnp = of_find_compatible_node(NULL, NULL, "calxeda,hb-sregs");
+       hb_clk->reg = of_iomap(srnp, 0);
+       BUG_ON(!hb_clk->reg);
+       hb_clk->reg += reg;
 
        of_property_read_string(node, "clock-output-names", &clk_name);
 
index 51410c2ac2cb617b9a98b9c0fd869e1ddd541870..6a934a5296bd4ca2867146dc06272ea1003e238e 100644 (file)
  */
 
 #define SRC_CR                 0x00U
+#define SRC_CR_T0_ENSEL                BIT(15)
+#define SRC_CR_T1_ENSEL                BIT(17)
+#define SRC_CR_T2_ENSEL                BIT(19)
+#define SRC_CR_T3_ENSEL                BIT(21)
+#define SRC_CR_T4_ENSEL                BIT(23)
+#define SRC_CR_T5_ENSEL                BIT(25)
+#define SRC_CR_T6_ENSEL                BIT(27)
+#define SRC_CR_T7_ENSEL                BIT(29)
 #define SRC_XTALCR             0x0CU
 #define SRC_XTALCR_XTALTIMEN   BIT(20)
 #define SRC_XTALCR_SXTALDIS    BIT(19)
@@ -54,6 +62,79 @@ static DEFINE_SPINLOCK(src_lock);
 /* Base address of the SRC */
 static void __iomem *src_base;
 
+static int nomadik_clk_reboot_handler(struct notifier_block *this,
+                               unsigned long code,
+                               void *unused)
+{
+       u32 val;
+
+       /* The main chrystal need to be enabled for reboot to work */
+       val = readl(src_base + SRC_XTALCR);
+       val &= ~SRC_XTALCR_MXTALOVER;
+       val |= SRC_XTALCR_MXTALEN;
+       pr_crit("force-enabling MXTALO\n");
+       writel(val, src_base + SRC_XTALCR);
+       return NOTIFY_OK;
+}
+
+static struct notifier_block nomadik_clk_reboot_notifier = {
+       .notifier_call = nomadik_clk_reboot_handler,
+};
+
+static const struct of_device_id nomadik_src_match[] __initconst = {
+       { .compatible = "stericsson,nomadik-src" },
+       { /* sentinel */ }
+};
+
+static void __init nomadik_src_init(void)
+{
+       struct device_node *np;
+       u32 val;
+
+       np = of_find_matching_node(NULL, nomadik_src_match);
+       if (!np) {
+               pr_crit("no matching node for SRC, aborting clock init\n");
+               return;
+       }
+       src_base = of_iomap(np, 0);
+       if (!src_base) {
+               pr_err("%s: must have src parent node with REGS (%s)\n",
+                      __func__, np->name);
+               return;
+       }
+
+       /* Set all timers to use the 2.4 MHz TIMCLK */
+       val = readl(src_base + SRC_CR);
+       val |= SRC_CR_T0_ENSEL;
+       val |= SRC_CR_T1_ENSEL;
+       val |= SRC_CR_T2_ENSEL;
+       val |= SRC_CR_T3_ENSEL;
+       val |= SRC_CR_T4_ENSEL;
+       val |= SRC_CR_T5_ENSEL;
+       val |= SRC_CR_T6_ENSEL;
+       val |= SRC_CR_T7_ENSEL;
+       writel(val, src_base + SRC_CR);
+
+       val = readl(src_base + SRC_XTALCR);
+       pr_info("SXTALO is %s\n",
+               (val & SRC_XTALCR_SXTALDIS) ? "disabled" : "enabled");
+       pr_info("MXTAL is %s\n",
+               (val & SRC_XTALCR_MXTALSTAT) ? "enabled" : "disabled");
+       if (of_property_read_bool(np, "disable-sxtalo")) {
+               /* The machine uses an external oscillator circuit */
+               val |= SRC_XTALCR_SXTALDIS;
+               pr_info("disabling SXTALO\n");
+       }
+       if (of_property_read_bool(np, "disable-mxtalo")) {
+               /* Disable this too: also run by external oscillator */
+               val |= SRC_XTALCR_MXTALOVER;
+               val &= ~SRC_XTALCR_MXTALEN;
+               pr_info("disabling MXTALO\n");
+       }
+       writel(val, src_base + SRC_XTALCR);
+       register_reboot_notifier(&nomadik_clk_reboot_notifier);
+}
+
 /**
  * struct clk_pll1 - Nomadik PLL1 clock
  * @hw: corresponding clock hardware entry
@@ -431,6 +512,9 @@ static void __init of_nomadik_pll_setup(struct device_node *np)
        const char *parent_name;
        u32 pll_id;
 
+       if (!src_base)
+               nomadik_src_init();
+
        if (of_property_read_u32(np, "pll-id", &pll_id)) {
                pr_err("%s: PLL \"%s\" missing pll-id property\n",
                        __func__, clk_name);
@@ -441,6 +525,8 @@ static void __init of_nomadik_pll_setup(struct device_node *np)
        if (!IS_ERR(clk))
                of_clk_add_provider(np, of_clk_src_simple_get, clk);
 }
+CLK_OF_DECLARE(nomadik_pll_clk,
+       "st,nomadik-pll-clock", of_nomadik_pll_setup);
 
 static void __init of_nomadik_hclk_setup(struct device_node *np)
 {
@@ -448,6 +534,9 @@ static void __init of_nomadik_hclk_setup(struct device_node *np)
        const char *clk_name = np->name;
        const char *parent_name;
 
+       if (!src_base)
+               nomadik_src_init();
+
        parent_name = of_clk_get_parent_name(np, 0);
        /*
         * The HCLK divides PLL1 with 1 (passthru), 2, 3 or 4.
@@ -460,6 +549,8 @@ static void __init of_nomadik_hclk_setup(struct device_node *np)
        if (!IS_ERR(clk))
                of_clk_add_provider(np, of_clk_src_simple_get, clk);
 }
+CLK_OF_DECLARE(nomadik_hclk_clk,
+       "st,nomadik-hclk-clock", of_nomadik_hclk_setup);
 
 static void __init of_nomadik_src_clk_setup(struct device_node *np)
 {
@@ -468,6 +559,9 @@ static void __init of_nomadik_src_clk_setup(struct device_node *np)
        const char *parent_name;
        u32 clk_id;
 
+       if (!src_base)
+               nomadik_src_init();
+
        if (of_property_read_u32(np, "clock-id", &clk_id)) {
                pr_err("%s: SRC clock \"%s\" missing clock-id property\n",
                        __func__, clk_name);
@@ -478,89 +572,5 @@ static void __init of_nomadik_src_clk_setup(struct device_node *np)
        if (!IS_ERR(clk))
                of_clk_add_provider(np, of_clk_src_simple_get, clk);
 }
-
-static const struct of_device_id nomadik_src_match[] __initconst = {
-       { .compatible = "stericsson,nomadik-src" },
-       { /* sentinel */ }
-};
-
-static const struct of_device_id nomadik_src_clk_match[] __initconst = {
-       {
-               .compatible = "fixed-clock",
-               .data = of_fixed_clk_setup,
-       },
-       {
-               .compatible = "fixed-factor-clock",
-               .data = of_fixed_factor_clk_setup,
-       },
-       {
-               .compatible = "st,nomadik-pll-clock",
-               .data = of_nomadik_pll_setup,
-       },
-       {
-               .compatible = "st,nomadik-hclk-clock",
-               .data = of_nomadik_hclk_setup,
-       },
-       {
-               .compatible = "st,nomadik-src-clock",
-               .data = of_nomadik_src_clk_setup,
-       },
-       { /* sentinel */ }
-};
-
-static int nomadik_clk_reboot_handler(struct notifier_block *this,
-                               unsigned long code,
-                               void *unused)
-{
-       u32 val;
-
-       /* The main chrystal need to be enabled for reboot to work */
-       val = readl(src_base + SRC_XTALCR);
-       val &= ~SRC_XTALCR_MXTALOVER;
-       val |= SRC_XTALCR_MXTALEN;
-       pr_crit("force-enabling MXTALO\n");
-       writel(val, src_base + SRC_XTALCR);
-       return NOTIFY_OK;
-}
-
-static struct notifier_block nomadik_clk_reboot_notifier = {
-       .notifier_call = nomadik_clk_reboot_handler,
-};
-
-void __init nomadik_clk_init(void)
-{
-       struct device_node *np;
-       u32 val;
-
-       np = of_find_matching_node(NULL, nomadik_src_match);
-       if (!np) {
-               pr_crit("no matching node for SRC, aborting clock init\n");
-               return;
-       }
-       src_base = of_iomap(np, 0);
-       if (!src_base) {
-               pr_err("%s: must have src parent node with REGS (%s)\n",
-                      __func__, np->name);
-               return;
-       }
-       val = readl(src_base + SRC_XTALCR);
-       pr_info("SXTALO is %s\n",
-               (val & SRC_XTALCR_SXTALDIS) ? "disabled" : "enabled");
-       pr_info("MXTAL is %s\n",
-               (val & SRC_XTALCR_MXTALSTAT) ? "enabled" : "disabled");
-       if (of_property_read_bool(np, "disable-sxtalo")) {
-               /* The machine uses an external oscillator circuit */
-               val |= SRC_XTALCR_SXTALDIS;
-               pr_info("disabling SXTALO\n");
-       }
-       if (of_property_read_bool(np, "disable-mxtalo")) {
-               /* Disable this too: also run by external oscillator */
-               val |= SRC_XTALCR_MXTALOVER;
-               val &= ~SRC_XTALCR_MXTALEN;
-               pr_info("disabling MXTALO\n");
-       }
-       writel(val, src_base + SRC_XTALCR);
-       register_reboot_notifier(&nomadik_clk_reboot_notifier);
-
-       of_clk_init(nomadik_src_clk_match);
-}
+CLK_OF_DECLARE(nomadik_src_clk,
+       "st,nomadik-src-clock", of_nomadik_src_clk_setup);
index 5ab95f1ad579288c516dc782b14a2b5a871ad7dc..6c15e3316137b87177753f3bd2b04d154d2f3f7a 100644 (file)
@@ -1015,16 +1015,6 @@ static struct clk_std clk_usb1 = {
        },
 };
 
-static struct of_device_id clkc_ids[] = {
-       { .compatible = "sirf,prima2-clkc" },
-       {},
-};
-
-static struct of_device_id rsc_ids[] = {
-       { .compatible = "sirf,prima2-rsc" },
-       {},
-};
-
 enum prima2_clk_index {
        /* 0    1     2      3      4      5      6       7         8      9 */
        rtc,    osc,   pll1,  pll2,  pll3,  mem,   sys,   security, dsp,   gps,
@@ -1082,24 +1072,16 @@ static struct clk_hw *prima2_clk_hw_array[maxclk] __initdata = {
 static struct clk *prima2_clks[maxclk];
 static struct clk_onecell_data clk_data;
 
-void __init sirfsoc_of_clk_init(void)
+static void __init sirfsoc_clk_init(struct device_node *np)
 {
-       struct device_node *np;
+       struct device_node *rscnp;
        int i;
 
-       np = of_find_matching_node(NULL, rsc_ids);
-       if (!np)
-               panic("unable to find compatible rsc node in dtb\n");
-
-       sirfsoc_rsc_vbase = of_iomap(np, 0);
+       rscnp = of_find_compatible_node(NULL, NULL, "sirf,prima2-rsc");
+       sirfsoc_rsc_vbase = of_iomap(rscnp, 0);
        if (!sirfsoc_rsc_vbase)
                panic("unable to map rsc registers\n");
-
-       of_node_put(np);
-
-       np = of_find_matching_node(NULL, clkc_ids);
-       if (!np)
-               return;
+       of_node_put(rscnp);
 
        sirfsoc_clk_vbase = of_iomap(np, 0);
        if (!sirfsoc_clk_vbase)
@@ -1124,3 +1106,4 @@ void __init sirfsoc_of_clk_init(void)
 
        of_clk_add_provider(np, of_clk_src_onecell_get, &clk_data);
 }
+CLK_OF_DECLARE(sirfsoc_clk, "sirf,prima2-clkc", sirfsoc_clk_init);
index 82306f5fb9c2497f82bcfafe403cdbc091b3dc66..7fd5c5e9e25dbbd72a94cd0923ddf9d0a18d1c36 100644 (file)
 
 #include <linux/io.h>
 #include <linux/of.h>
+#include <linux/of_address.h>
 #include <linux/slab.h>
 #include <linux/bitops.h>
 #include <linux/clkdev.h>
 #include <linux/clk-provider.h>
 
+#define LEGACY_PMC_BASE                0xD8130000
+
 /* All clocks share the same lock as none can be changed concurrently */
 static DEFINE_SPINLOCK(_lock);
 
@@ -53,6 +56,21 @@ struct clk_pll {
 
 static void __iomem *pmc_base;
 
+static __init void vtwm_set_pmc_base(void)
+{
+       struct device_node *np =
+               of_find_compatible_node(NULL, NULL, "via,vt8500-pmc");
+
+       if (np)
+               pmc_base = of_iomap(np, 0);
+       else
+               pmc_base = ioremap(LEGACY_PMC_BASE, 0x1000);
+       of_node_put(np);
+
+       if (!pmc_base)
+               pr_err("%s:of_iomap(pmc) failed\n", __func__);
+}
+
 #define to_clk_device(_hw) container_of(_hw, struct clk_device, hw)
 
 #define VT8500_PMC_BUSY_MASK           0x18
@@ -222,6 +240,9 @@ static __init void vtwm_device_clk_init(struct device_node *node)
        int rc;
        int clk_init_flags = 0;
 
+       if (!pmc_base)
+               vtwm_set_pmc_base();
+
        dev_clk = kzalloc(sizeof(*dev_clk), GFP_KERNEL);
        if (WARN_ON(!dev_clk))
                return;
@@ -636,6 +657,9 @@ static __init void vtwm_pll_clk_init(struct device_node *node, int pll_type)
        struct clk_init_data init;
        int rc;
 
+       if (!pmc_base)
+               vtwm_set_pmc_base();
+
        rc = of_property_read_u32(node, "reg", &reg);
        if (WARN_ON(rc))
                return;
@@ -694,13 +718,3 @@ static void __init wm8850_pll_init(struct device_node *node)
        vtwm_pll_clk_init(node, PLL_TYPE_WM8850);
 }
 CLK_OF_DECLARE(wm8850_pll, "wm,wm8850-pll-clock", wm8850_pll_init);
-
-void __init vtwm_clk_init(void __iomem *base)
-{
-       if (!base)
-               return;
-
-       pmc_base = base;
-
-       of_clk_init(NULL);
-}
index c396fe3615891501e6f7a21ca6c3bfe88d81acec..9fc9359f51335e60451e9073469f0a6a34ed6730 100644 (file)
@@ -12,6 +12,7 @@
 #include <linux/clk.h>
 #include <linux/clk/mxs.h>
 #include <linux/clkdev.h>
+#include <linux/clk-provider.h>
 #include <linux/err.h>
 #include <linux/init.h>
 #include <linux/io.h>
@@ -100,16 +101,16 @@ static enum imx23_clk clks_init_on[] __initdata = {
        cpu, hbus, xbus, emi, uart,
 };
 
-int __init mx23_clocks_init(void)
+static void __init mx23_clocks_init(struct device_node *np)
 {
-       struct device_node *np;
+       struct device_node *dcnp;
        u32 i;
 
-       np = of_find_compatible_node(NULL, NULL, "fsl,imx23-digctl");
-       digctrl = of_iomap(np, 0);
+       dcnp = of_find_compatible_node(NULL, NULL, "fsl,imx23-digctl");
+       digctrl = of_iomap(dcnp, 0);
        WARN_ON(!digctrl);
+       of_node_put(dcnp);
 
-       np = of_find_compatible_node(NULL, NULL, "fsl,imx23-clkctrl");
        clkctrl = of_iomap(np, 0);
        WARN_ON(!clkctrl);
 
@@ -162,7 +163,7 @@ int __init mx23_clocks_init(void)
                if (IS_ERR(clks[i])) {
                        pr_err("i.MX23 clk %d: register failed with %ld\n",
                                i, PTR_ERR(clks[i]));
-                       return PTR_ERR(clks[i]);
+                       return;
                }
 
        clk_data.clks = clks;
@@ -172,5 +173,5 @@ int __init mx23_clocks_init(void)
        for (i = 0; i < ARRAY_SIZE(clks_init_on); i++)
                clk_prepare_enable(clks[clks_init_on[i]]);
 
-       return 0;
 }
+CLK_OF_DECLARE(imx23_clkctrl, "fsl,imx23-clkctrl", mx23_clocks_init);
index 4faf0afc44cd5a2ebe0761af3e8d1250ed6c2b77..a6c35010e4e5b1a61f8e802896bc15ad623bc74a 100644 (file)
@@ -12,6 +12,7 @@
 #include <linux/clk.h>
 #include <linux/clk/mxs.h>
 #include <linux/clkdev.h>
+#include <linux/clk-provider.h>
 #include <linux/err.h>
 #include <linux/init.h>
 #include <linux/io.h>
@@ -154,16 +155,16 @@ static enum imx28_clk clks_init_on[] __initdata = {
        cpu, hbus, xbus, emi, uart,
 };
 
-int __init mx28_clocks_init(void)
+static void __init mx28_clocks_init(struct device_node *np)
 {
-       struct device_node *np;
+       struct device_node *dcnp;
        u32 i;
 
-       np = of_find_compatible_node(NULL, NULL, "fsl,imx28-digctl");
-       digctrl = of_iomap(np, 0);
+       dcnp = of_find_compatible_node(NULL, NULL, "fsl,imx28-digctl");
+       digctrl = of_iomap(dcnp, 0);
        WARN_ON(!digctrl);
+       of_node_put(dcnp);
 
-       np = of_find_compatible_node(NULL, NULL, "fsl,imx28-clkctrl");
        clkctrl = of_iomap(np, 0);
        WARN_ON(!clkctrl);
 
@@ -239,7 +240,7 @@ int __init mx28_clocks_init(void)
                if (IS_ERR(clks[i])) {
                        pr_err("i.MX28 clk %d: register failed with %ld\n",
                                i, PTR_ERR(clks[i]));
-                       return PTR_ERR(clks[i]);
+                       return;
                }
 
        clk_data.clks = clks;
@@ -250,6 +251,5 @@ int __init mx28_clocks_init(void)
 
        for (i = 0; i < ARRAY_SIZE(clks_init_on); i++)
                clk_prepare_enable(clks[clks_init_on[i]]);
-
-       return 0;
 }
+CLK_OF_DECLARE(imx28_clkctrl, "fsl,imx28-clkctrl", mx28_clocks_init);
index 3413380086d5b22f7e9a618231e33af9a1e37b1e..8eb4799237f03d5106cfe52537c587fb7fc648dd 100644 (file)
@@ -8,6 +8,4 @@ obj-$(CONFIG_SOC_EXYNOS5250)    += clk-exynos5250.o
 obj-$(CONFIG_SOC_EXYNOS5420)   += clk-exynos5420.o
 obj-$(CONFIG_SOC_EXYNOS5440)   += clk-exynos5440.o
 obj-$(CONFIG_ARCH_EXYNOS)      += clk-exynos-audss.o
-ifdef CONFIG_COMMON_CLK
 obj-$(CONFIG_ARCH_S3C64XX)     += clk-s3c64xx.o
-endif
index 34ee69f4d50c5bd574ceeed4893b0bb9f67a3686..9bbd035145409b9908ca25fecfd412d5e7345840 100644 (file)
@@ -16,7 +16,6 @@
 
 #include <linux/clk-provider.h>
 #include <linux/clkdev.h>
-#include <linux/clk/sunxi.h>
 #include <linux/of.h>
 #include <linux/of_address.h>
 
@@ -617,11 +616,8 @@ static void __init of_sunxi_table_clock_setup(const struct of_device_id *clk_mat
        }
 }
 
-void __init sunxi_init_clocks(void)
+static void __init sunxi_init_clocks(struct device_node *np)
 {
-       /* Register all the simple and basic clocks on DT */
-       of_clk_init(NULL);
-
        /* Register factor clocks */
        of_sunxi_table_clock_setup(clk_factors_match, sunxi_factors_clk_setup);
 
@@ -634,3 +630,8 @@ void __init sunxi_init_clocks(void)
        /* Register gate clocks */
        of_sunxi_table_clock_setup(clk_gates_match, sunxi_gates_clk_setup);
 }
+CLK_OF_DECLARE(sun4i_a10_clk_init, "allwinner,sun4i-a10", sunxi_init_clocks);
+CLK_OF_DECLARE(sun5i_a10s_clk_init, "allwinner,sun5i-a10s", sunxi_init_clocks);
+CLK_OF_DECLARE(sun5i_a13_clk_init, "allwinner,sun5i-a13", sunxi_init_clocks);
+CLK_OF_DECLARE(sun6i_a31_clk_init, "allwinner,sun6i-a31", sunxi_init_clocks);
+CLK_OF_DECLARE(sun7i_a20_clk_init, "allwinner,sun7i-a20", sunxi_init_clocks);
index c6a806ed0e8c85439d3c3753bcc133c24ed0cdb7..521483f0ba335f67a5bf7dc96e26adf3ca89fbcf 100644 (file)
@@ -8,6 +8,7 @@ obj-y += clk-prcmu.o
 obj-y += clk-sysctrl.o
 
 # Clock definitions
+obj-y += u8500_of_clk.o
 obj-y += u8500_clk.o
 obj-y += u9540_clk.o
 obj-y += u8540_clk.o
diff --git a/drivers/clk/ux500/u8500_of_clk.c b/drivers/clk/ux500/u8500_of_clk.c
new file mode 100644 (file)
index 0000000..b768b50
--- /dev/null
@@ -0,0 +1,559 @@
+/*
+ * Clock definitions for u8500 platform.
+ *
+ * Copyright (C) 2012 ST-Ericsson SA
+ * Author: Ulf Hansson <ulf.hansson@linaro.org>
+ *
+ * License terms: GNU General Public License (GPL) version 2
+ */
+
+#include <linux/of.h>
+#include <linux/clk.h>
+#include <linux/clkdev.h>
+#include <linux/clk-provider.h>
+#include <linux/mfd/dbx500-prcmu.h>
+#include <linux/platform_data/clk-ux500.h>
+#include "clk.h"
+
+#define PRCC_NUM_PERIPH_CLUSTERS 6
+#define PRCC_PERIPHS_PER_CLUSTER 32
+
+static struct clk *prcmu_clk[PRCMU_NUM_CLKS];
+static struct clk *prcc_pclk[(PRCC_NUM_PERIPH_CLUSTERS + 1) * PRCC_PERIPHS_PER_CLUSTER];
+static struct clk *prcc_kclk[(PRCC_NUM_PERIPH_CLUSTERS + 1) * PRCC_PERIPHS_PER_CLUSTER];
+
+#define PRCC_SHOW(clk, base, bit) \
+       clk[(base * PRCC_PERIPHS_PER_CLUSTER) + bit]
+#define PRCC_PCLK_STORE(clk, base, bit)        \
+       prcc_pclk[(base * PRCC_PERIPHS_PER_CLUSTER) + bit] = clk
+#define PRCC_KCLK_STORE(clk, base, bit)        \
+       prcc_kclk[(base * PRCC_PERIPHS_PER_CLUSTER) + bit] = clk
+
+struct clk *ux500_twocell_get(struct of_phandle_args *clkspec, void *data)
+{
+       struct clk **clk_data = data;
+       unsigned int base, bit;
+
+       if (clkspec->args_count != 2)
+               return  ERR_PTR(-EINVAL);
+
+       base = clkspec->args[0];
+       bit = clkspec->args[1];
+
+       if (base != 1 && base != 2 && base != 3 && base != 5 && base != 6) {
+               pr_err("%s: invalid PRCC base %d\n", __func__, base);
+               return ERR_PTR(-EINVAL);
+       }
+
+       return PRCC_SHOW(clk_data, base, bit);
+}
+
+static const struct of_device_id u8500_clk_of_match[] = {
+       { .compatible = "stericsson,u8500-clks", },
+       { },
+};
+
+void u8500_of_clk_init(u32 clkrst1_base, u32 clkrst2_base, u32 clkrst3_base,
+                      u32 clkrst5_base, u32 clkrst6_base)
+{
+       struct prcmu_fw_version *fw_version;
+       struct device_node *np = NULL;
+       struct device_node *child = NULL;
+       const char *sgaclk_parent = NULL;
+       struct clk *clk, *rtc_clk, *twd_clk;
+
+       if (of_have_populated_dt())
+               np = of_find_matching_node(NULL, u8500_clk_of_match);
+       if (!np) {
+               pr_err("Either DT or U8500 Clock node not found\n");
+               return;
+       }
+
+       /* Clock sources */
+       clk = clk_reg_prcmu_gate("soc0_pll", NULL, PRCMU_PLLSOC0,
+                               CLK_IS_ROOT|CLK_IGNORE_UNUSED);
+       prcmu_clk[PRCMU_PLLSOC0] = clk;
+
+       clk = clk_reg_prcmu_gate("soc1_pll", NULL, PRCMU_PLLSOC1,
+                               CLK_IS_ROOT|CLK_IGNORE_UNUSED);
+       prcmu_clk[PRCMU_PLLSOC1] = clk;
+
+       clk = clk_reg_prcmu_gate("ddr_pll", NULL, PRCMU_PLLDDR,
+                               CLK_IS_ROOT|CLK_IGNORE_UNUSED);
+       prcmu_clk[PRCMU_PLLDDR] = clk;
+
+       /* FIXME: Add sys, ulp and int clocks here. */
+
+       rtc_clk = clk_register_fixed_rate(NULL, "rtc32k", "NULL",
+                               CLK_IS_ROOT|CLK_IGNORE_UNUSED,
+                               32768);
+
+       /* PRCMU clocks */
+       fw_version = prcmu_get_fw_version();
+       if (fw_version != NULL) {
+               switch (fw_version->project) {
+               case PRCMU_FW_PROJECT_U8500_C2:
+               case PRCMU_FW_PROJECT_U8520:
+               case PRCMU_FW_PROJECT_U8420:
+                       sgaclk_parent = "soc0_pll";
+                       break;
+               default:
+                       break;
+               }
+       }
+
+       if (sgaclk_parent)
+               clk = clk_reg_prcmu_gate("sgclk", sgaclk_parent,
+                                       PRCMU_SGACLK, 0);
+       else
+               clk = clk_reg_prcmu_gate("sgclk", NULL,
+                                       PRCMU_SGACLK, CLK_IS_ROOT);
+       prcmu_clk[PRCMU_SGACLK] = clk;
+
+       clk = clk_reg_prcmu_gate("uartclk", NULL, PRCMU_UARTCLK, CLK_IS_ROOT);
+       prcmu_clk[PRCMU_UARTCLK] = clk;
+
+       clk = clk_reg_prcmu_gate("msp02clk", NULL, PRCMU_MSP02CLK, CLK_IS_ROOT);
+       prcmu_clk[PRCMU_MSP02CLK] = clk;
+
+       clk = clk_reg_prcmu_gate("msp1clk", NULL, PRCMU_MSP1CLK, CLK_IS_ROOT);
+       prcmu_clk[PRCMU_MSP1CLK] = clk;
+
+       clk = clk_reg_prcmu_gate("i2cclk", NULL, PRCMU_I2CCLK, CLK_IS_ROOT);
+       prcmu_clk[PRCMU_I2CCLK] = clk;
+
+       clk = clk_reg_prcmu_gate("slimclk", NULL, PRCMU_SLIMCLK, CLK_IS_ROOT);
+       prcmu_clk[PRCMU_SLIMCLK] = clk;
+
+       clk = clk_reg_prcmu_gate("per1clk", NULL, PRCMU_PER1CLK, CLK_IS_ROOT);
+       prcmu_clk[PRCMU_PER1CLK] = clk;
+
+       clk = clk_reg_prcmu_gate("per2clk", NULL, PRCMU_PER2CLK, CLK_IS_ROOT);
+       prcmu_clk[PRCMU_PER2CLK] = clk;
+
+       clk = clk_reg_prcmu_gate("per3clk", NULL, PRCMU_PER3CLK, CLK_IS_ROOT);
+       prcmu_clk[PRCMU_PER3CLK] = clk;
+
+       clk = clk_reg_prcmu_gate("per5clk", NULL, PRCMU_PER5CLK, CLK_IS_ROOT);
+       prcmu_clk[PRCMU_PER5CLK] = clk;
+
+       clk = clk_reg_prcmu_gate("per6clk", NULL, PRCMU_PER6CLK, CLK_IS_ROOT);
+       prcmu_clk[PRCMU_PER6CLK] = clk;
+
+       clk = clk_reg_prcmu_gate("per7clk", NULL, PRCMU_PER7CLK, CLK_IS_ROOT);
+       prcmu_clk[PRCMU_PER7CLK] = clk;
+
+       clk = clk_reg_prcmu_scalable("lcdclk", NULL, PRCMU_LCDCLK, 0,
+                               CLK_IS_ROOT|CLK_SET_RATE_GATE);
+       prcmu_clk[PRCMU_LCDCLK] = clk;
+
+       clk = clk_reg_prcmu_opp_gate("bmlclk", NULL, PRCMU_BMLCLK, CLK_IS_ROOT);
+       prcmu_clk[PRCMU_BMLCLK] = clk;
+
+       clk = clk_reg_prcmu_scalable("hsitxclk", NULL, PRCMU_HSITXCLK, 0,
+                               CLK_IS_ROOT|CLK_SET_RATE_GATE);
+       prcmu_clk[PRCMU_HSITXCLK] = clk;
+
+       clk = clk_reg_prcmu_scalable("hsirxclk", NULL, PRCMU_HSIRXCLK, 0,
+                               CLK_IS_ROOT|CLK_SET_RATE_GATE);
+       prcmu_clk[PRCMU_HSIRXCLK] = clk;
+
+       clk = clk_reg_prcmu_scalable("hdmiclk", NULL, PRCMU_HDMICLK, 0,
+                               CLK_IS_ROOT|CLK_SET_RATE_GATE);
+       prcmu_clk[PRCMU_HDMICLK] = clk;
+
+       clk = clk_reg_prcmu_gate("apeatclk", NULL, PRCMU_APEATCLK, CLK_IS_ROOT);
+       prcmu_clk[PRCMU_APEATCLK] = clk;
+
+       clk = clk_reg_prcmu_gate("apetraceclk", NULL, PRCMU_APETRACECLK,
+                               CLK_IS_ROOT);
+       prcmu_clk[PRCMU_APETRACECLK] = clk;
+
+       clk = clk_reg_prcmu_gate("mcdeclk", NULL, PRCMU_MCDECLK, CLK_IS_ROOT);
+       prcmu_clk[PRCMU_MCDECLK] = clk;
+
+       clk = clk_reg_prcmu_opp_gate("ipi2cclk", NULL, PRCMU_IPI2CCLK,
+                               CLK_IS_ROOT);
+       prcmu_clk[PRCMU_IPI2CCLK] = clk;
+
+       clk = clk_reg_prcmu_gate("dsialtclk", NULL, PRCMU_DSIALTCLK,
+                               CLK_IS_ROOT);
+       prcmu_clk[PRCMU_DSIALTCLK] = clk;
+
+       clk = clk_reg_prcmu_gate("dmaclk", NULL, PRCMU_DMACLK, CLK_IS_ROOT);
+       prcmu_clk[PRCMU_DMACLK] = clk;
+
+       clk = clk_reg_prcmu_gate("b2r2clk", NULL, PRCMU_B2R2CLK, CLK_IS_ROOT);
+       prcmu_clk[PRCMU_B2R2CLK] = clk;
+
+       clk = clk_reg_prcmu_scalable("tvclk", NULL, PRCMU_TVCLK, 0,
+                               CLK_IS_ROOT|CLK_SET_RATE_GATE);
+       prcmu_clk[PRCMU_TVCLK] = clk;
+
+       clk = clk_reg_prcmu_gate("sspclk", NULL, PRCMU_SSPCLK, CLK_IS_ROOT);
+       prcmu_clk[PRCMU_SSPCLK] = clk;
+
+       clk = clk_reg_prcmu_gate("rngclk", NULL, PRCMU_RNGCLK, CLK_IS_ROOT);
+       prcmu_clk[PRCMU_RNGCLK] = clk;
+
+       clk = clk_reg_prcmu_gate("uiccclk", NULL, PRCMU_UICCCLK, CLK_IS_ROOT);
+       prcmu_clk[PRCMU_UICCCLK] = clk;
+
+       clk = clk_reg_prcmu_gate("timclk", NULL, PRCMU_TIMCLK, CLK_IS_ROOT);
+       prcmu_clk[PRCMU_TIMCLK] = clk;
+
+       clk = clk_reg_prcmu_opp_volt_scalable("sdmmcclk", NULL, PRCMU_SDMMCCLK,
+                                       100000000,
+                                       CLK_IS_ROOT|CLK_SET_RATE_GATE);
+       prcmu_clk[PRCMU_SDMMCCLK] = clk;
+
+       clk = clk_reg_prcmu_scalable("dsi_pll", "hdmiclk",
+                               PRCMU_PLLDSI, 0, CLK_SET_RATE_GATE);
+       prcmu_clk[PRCMU_PLLDSI] = clk;
+
+       clk = clk_reg_prcmu_scalable("dsi0clk", "dsi_pll",
+                               PRCMU_DSI0CLK, 0, CLK_SET_RATE_GATE);
+       prcmu_clk[PRCMU_DSI0CLK] = clk;
+
+       clk = clk_reg_prcmu_scalable("dsi1clk", "dsi_pll",
+                               PRCMU_DSI1CLK, 0, CLK_SET_RATE_GATE);
+       prcmu_clk[PRCMU_DSI1CLK] = clk;
+
+       clk = clk_reg_prcmu_scalable("dsi0escclk", "tvclk",
+                               PRCMU_DSI0ESCCLK, 0, CLK_SET_RATE_GATE);
+       prcmu_clk[PRCMU_DSI0ESCCLK] = clk;
+
+       clk = clk_reg_prcmu_scalable("dsi1escclk", "tvclk",
+                               PRCMU_DSI1ESCCLK, 0, CLK_SET_RATE_GATE);
+       prcmu_clk[PRCMU_DSI1ESCCLK] = clk;
+
+       clk = clk_reg_prcmu_scalable("dsi2escclk", "tvclk",
+                               PRCMU_DSI2ESCCLK, 0, CLK_SET_RATE_GATE);
+       prcmu_clk[PRCMU_DSI2ESCCLK] = clk;
+
+       clk = clk_reg_prcmu_scalable_rate("armss", NULL,
+                               PRCMU_ARMSS, 0, CLK_IS_ROOT|CLK_IGNORE_UNUSED);
+       prcmu_clk[PRCMU_ARMSS] = clk;
+
+       twd_clk = clk_register_fixed_factor(NULL, "smp_twd", "armss",
+                               CLK_IGNORE_UNUSED, 1, 2);
+
+       /*
+        * FIXME: Add special handled PRCMU clocks here:
+        * 1. clkout0yuv, use PRCMU as parent + need regulator + pinctrl.
+        * 2. ab9540_clkout1yuv, see clkout0yuv
+        */
+
+       /* PRCC P-clocks */
+       clk = clk_reg_prcc_pclk("p1_pclk0", "per1clk", clkrst1_base,
+                               BIT(0), 0);
+       PRCC_PCLK_STORE(clk, 1, 0);
+
+       clk = clk_reg_prcc_pclk("p1_pclk1", "per1clk", clkrst1_base,
+                               BIT(1), 0);
+       PRCC_PCLK_STORE(clk, 1, 1);
+
+       clk = clk_reg_prcc_pclk("p1_pclk2", "per1clk", clkrst1_base,
+                               BIT(2), 0);
+       PRCC_PCLK_STORE(clk, 1, 2);
+
+       clk = clk_reg_prcc_pclk("p1_pclk3", "per1clk", clkrst1_base,
+                               BIT(3), 0);
+       PRCC_PCLK_STORE(clk, 1, 3);
+
+       clk = clk_reg_prcc_pclk("p1_pclk4", "per1clk", clkrst1_base,
+                               BIT(4), 0);
+       PRCC_PCLK_STORE(clk, 1, 4);
+
+       clk = clk_reg_prcc_pclk("p1_pclk5", "per1clk", clkrst1_base,
+                               BIT(5), 0);
+       PRCC_PCLK_STORE(clk, 1, 5);
+
+       clk = clk_reg_prcc_pclk("p1_pclk6", "per1clk", clkrst1_base,
+                               BIT(6), 0);
+       PRCC_PCLK_STORE(clk, 1, 6);
+
+       clk = clk_reg_prcc_pclk("p1_pclk7", "per1clk", clkrst1_base,
+                               BIT(7), 0);
+       PRCC_PCLK_STORE(clk, 1, 7);
+
+       clk = clk_reg_prcc_pclk("p1_pclk8", "per1clk", clkrst1_base,
+                               BIT(8), 0);
+       PRCC_PCLK_STORE(clk, 1, 8);
+
+       clk = clk_reg_prcc_pclk("p1_pclk9", "per1clk", clkrst1_base,
+                               BIT(9), 0);
+       PRCC_PCLK_STORE(clk, 1, 9);
+
+       clk = clk_reg_prcc_pclk("p1_pclk10", "per1clk", clkrst1_base,
+                               BIT(10), 0);
+       PRCC_PCLK_STORE(clk, 1, 10);
+
+       clk = clk_reg_prcc_pclk("p1_pclk11", "per1clk", clkrst1_base,
+                               BIT(11), 0);
+       PRCC_PCLK_STORE(clk, 1, 11);
+
+       clk = clk_reg_prcc_pclk("p2_pclk0", "per2clk", clkrst2_base,
+                               BIT(0), 0);
+       PRCC_PCLK_STORE(clk, 2, 0);
+
+       clk = clk_reg_prcc_pclk("p2_pclk1", "per2clk", clkrst2_base,
+                               BIT(1), 0);
+       PRCC_PCLK_STORE(clk, 2, 1);
+
+       clk = clk_reg_prcc_pclk("p2_pclk2", "per2clk", clkrst2_base,
+                               BIT(2), 0);
+       PRCC_PCLK_STORE(clk, 2, 2);
+
+       clk = clk_reg_prcc_pclk("p2_pclk3", "per2clk", clkrst2_base,
+                               BIT(3), 0);
+       PRCC_PCLK_STORE(clk, 2, 3);
+
+       clk = clk_reg_prcc_pclk("p2_pclk4", "per2clk", clkrst2_base,
+                               BIT(4), 0);
+       PRCC_PCLK_STORE(clk, 2, 4);
+
+       clk = clk_reg_prcc_pclk("p2_pclk5", "per2clk", clkrst2_base,
+                               BIT(5), 0);
+       PRCC_PCLK_STORE(clk, 2, 5);
+
+       clk = clk_reg_prcc_pclk("p2_pclk6", "per2clk", clkrst2_base,
+                               BIT(6), 0);
+       PRCC_PCLK_STORE(clk, 2, 6);
+
+       clk = clk_reg_prcc_pclk("p2_pclk7", "per2clk", clkrst2_base,
+                               BIT(7), 0);
+       PRCC_PCLK_STORE(clk, 2, 7);
+
+       clk = clk_reg_prcc_pclk("p2_pclk8", "per2clk", clkrst2_base,
+                               BIT(8), 0);
+       PRCC_PCLK_STORE(clk, 2, 8);
+
+       clk = clk_reg_prcc_pclk("p2_pclk9", "per2clk", clkrst2_base,
+                               BIT(9), 0);
+       PRCC_PCLK_STORE(clk, 2, 9);
+
+       clk = clk_reg_prcc_pclk("p2_pclk10", "per2clk", clkrst2_base,
+                               BIT(10), 0);
+       PRCC_PCLK_STORE(clk, 2, 10);
+
+       clk = clk_reg_prcc_pclk("p2_pclk11", "per2clk", clkrst2_base,
+                               BIT(11), 0);
+       PRCC_PCLK_STORE(clk, 2, 1);
+
+       clk = clk_reg_prcc_pclk("p2_pclk12", "per2clk", clkrst2_base,
+                               BIT(12), 0);
+       PRCC_PCLK_STORE(clk, 2, 12);
+
+       clk = clk_reg_prcc_pclk("p3_pclk0", "per3clk", clkrst3_base,
+                               BIT(0), 0);
+       PRCC_PCLK_STORE(clk, 3, 0);
+
+       clk = clk_reg_prcc_pclk("p3_pclk1", "per3clk", clkrst3_base,
+                               BIT(1), 0);
+       PRCC_PCLK_STORE(clk, 3, 1);
+
+       clk = clk_reg_prcc_pclk("p3_pclk2", "per3clk", clkrst3_base,
+                               BIT(2), 0);
+       PRCC_PCLK_STORE(clk, 3, 2);
+
+       clk = clk_reg_prcc_pclk("p3_pclk3", "per3clk", clkrst3_base,
+                               BIT(3), 0);
+       PRCC_PCLK_STORE(clk, 3, 3);
+
+       clk = clk_reg_prcc_pclk("p3_pclk4", "per3clk", clkrst3_base,
+                               BIT(4), 0);
+       PRCC_PCLK_STORE(clk, 3, 4);
+
+       clk = clk_reg_prcc_pclk("p3_pclk5", "per3clk", clkrst3_base,
+                               BIT(5), 0);
+       PRCC_PCLK_STORE(clk, 3, 5);
+
+       clk = clk_reg_prcc_pclk("p3_pclk6", "per3clk", clkrst3_base,
+                               BIT(6), 0);
+       PRCC_PCLK_STORE(clk, 3, 6);
+
+       clk = clk_reg_prcc_pclk("p3_pclk7", "per3clk", clkrst3_base,
+                               BIT(7), 0);
+       PRCC_PCLK_STORE(clk, 3, 7);
+
+       clk = clk_reg_prcc_pclk("p3_pclk8", "per3clk", clkrst3_base,
+                               BIT(8), 0);
+       PRCC_PCLK_STORE(clk, 3, 8);
+
+       clk = clk_reg_prcc_pclk("p5_pclk0", "per5clk", clkrst5_base,
+                               BIT(0), 0);
+       PRCC_PCLK_STORE(clk, 5, 0);
+
+       clk = clk_reg_prcc_pclk("p5_pclk1", "per5clk", clkrst5_base,
+                               BIT(1), 0);
+       PRCC_PCLK_STORE(clk, 5, 1);
+
+       clk = clk_reg_prcc_pclk("p6_pclk0", "per6clk", clkrst6_base,
+                               BIT(0), 0);
+       PRCC_PCLK_STORE(clk, 6, 0);
+
+       clk = clk_reg_prcc_pclk("p6_pclk1", "per6clk", clkrst6_base,
+                               BIT(1), 0);
+       PRCC_PCLK_STORE(clk, 6, 1);
+
+       clk = clk_reg_prcc_pclk("p6_pclk2", "per6clk", clkrst6_base,
+                               BIT(2), 0);
+       PRCC_PCLK_STORE(clk, 6, 2);
+
+       clk = clk_reg_prcc_pclk("p6_pclk3", "per6clk", clkrst6_base,
+                               BIT(3), 0);
+       PRCC_PCLK_STORE(clk, 6, 3);
+
+       clk = clk_reg_prcc_pclk("p6_pclk4", "per6clk", clkrst6_base,
+                               BIT(4), 0);
+       PRCC_PCLK_STORE(clk, 6, 4);
+
+       clk = clk_reg_prcc_pclk("p6_pclk5", "per6clk", clkrst6_base,
+                               BIT(5), 0);
+       PRCC_PCLK_STORE(clk, 6, 5);
+
+       clk = clk_reg_prcc_pclk("p6_pclk6", "per6clk", clkrst6_base,
+                               BIT(6), 0);
+       PRCC_PCLK_STORE(clk, 6, 6);
+
+       clk = clk_reg_prcc_pclk("p6_pclk7", "per6clk", clkrst6_base,
+                               BIT(7), 0);
+       PRCC_PCLK_STORE(clk, 6, 7);
+
+       /* PRCC K-clocks
+        *
+        * FIXME: Some drivers requires PERPIH[n| to be automatically enabled
+        * by enabling just the K-clock, even if it is not a valid parent to
+        * the K-clock. Until drivers get fixed we might need some kind of
+        * "parent muxed join".
+        */
+
+       /* Periph1 */
+       clk = clk_reg_prcc_kclk("p1_uart0_kclk", "uartclk",
+                       clkrst1_base, BIT(0), CLK_SET_RATE_GATE);
+       PRCC_KCLK_STORE(clk, 1, 0);
+
+       clk = clk_reg_prcc_kclk("p1_uart1_kclk", "uartclk",
+                       clkrst1_base, BIT(1), CLK_SET_RATE_GATE);
+       PRCC_KCLK_STORE(clk, 1, 1);
+
+       clk = clk_reg_prcc_kclk("p1_i2c1_kclk", "i2cclk",
+                       clkrst1_base, BIT(2), CLK_SET_RATE_GATE);
+       PRCC_KCLK_STORE(clk, 1, 2);
+
+       clk = clk_reg_prcc_kclk("p1_msp0_kclk", "msp02clk",
+                       clkrst1_base, BIT(3), CLK_SET_RATE_GATE);
+       PRCC_KCLK_STORE(clk, 1, 3);
+
+       clk = clk_reg_prcc_kclk("p1_msp1_kclk", "msp1clk",
+                       clkrst1_base, BIT(4), CLK_SET_RATE_GATE);
+       PRCC_KCLK_STORE(clk, 1, 4);
+
+       clk = clk_reg_prcc_kclk("p1_sdi0_kclk", "sdmmcclk",
+                       clkrst1_base, BIT(5), CLK_SET_RATE_GATE);
+       PRCC_KCLK_STORE(clk, 1, 5);
+
+       clk = clk_reg_prcc_kclk("p1_i2c2_kclk", "i2cclk",
+                       clkrst1_base, BIT(6), CLK_SET_RATE_GATE);
+       PRCC_KCLK_STORE(clk, 1, 6);
+
+       clk = clk_reg_prcc_kclk("p1_slimbus0_kclk", "slimclk",
+                       clkrst1_base, BIT(8), CLK_SET_RATE_GATE);
+       PRCC_KCLK_STORE(clk, 1, 8);
+
+       clk = clk_reg_prcc_kclk("p1_i2c4_kclk", "i2cclk",
+                       clkrst1_base, BIT(9), CLK_SET_RATE_GATE);
+       PRCC_KCLK_STORE(clk, 1, 9);
+
+       clk = clk_reg_prcc_kclk("p1_msp3_kclk", "msp1clk",
+                       clkrst1_base, BIT(10), CLK_SET_RATE_GATE);
+       PRCC_KCLK_STORE(clk, 1, 10);
+
+       /* Periph2 */
+       clk = clk_reg_prcc_kclk("p2_i2c3_kclk", "i2cclk",
+                       clkrst2_base, BIT(0), CLK_SET_RATE_GATE);
+       PRCC_KCLK_STORE(clk, 2, 0);
+
+       clk = clk_reg_prcc_kclk("p2_sdi4_kclk", "sdmmcclk",
+                       clkrst2_base, BIT(2), CLK_SET_RATE_GATE);
+       PRCC_KCLK_STORE(clk, 2, 2);
+
+       clk = clk_reg_prcc_kclk("p2_msp2_kclk", "msp02clk",
+                       clkrst2_base, BIT(3), CLK_SET_RATE_GATE);
+       PRCC_KCLK_STORE(clk, 2, 3);
+
+       clk = clk_reg_prcc_kclk("p2_sdi1_kclk", "sdmmcclk",
+                       clkrst2_base, BIT(4), CLK_SET_RATE_GATE);
+       PRCC_KCLK_STORE(clk, 2, 4);
+
+       clk = clk_reg_prcc_kclk("p2_sdi3_kclk", "sdmmcclk",
+                       clkrst2_base, BIT(5), CLK_SET_RATE_GATE);
+       PRCC_KCLK_STORE(clk, 2, 5);
+
+       /* Note that rate is received from parent. */
+       clk = clk_reg_prcc_kclk("p2_ssirx_kclk", "hsirxclk",
+                       clkrst2_base, BIT(6),
+                       CLK_SET_RATE_GATE|CLK_SET_RATE_PARENT);
+       PRCC_KCLK_STORE(clk, 2, 6);
+
+       clk = clk_reg_prcc_kclk("p2_ssitx_kclk", "hsitxclk",
+                       clkrst2_base, BIT(7),
+                       CLK_SET_RATE_GATE|CLK_SET_RATE_PARENT);
+       PRCC_KCLK_STORE(clk, 2, 7);
+
+       /* Periph3 */
+       clk = clk_reg_prcc_kclk("p3_ssp0_kclk", "sspclk",
+                       clkrst3_base, BIT(1), CLK_SET_RATE_GATE);
+       PRCC_KCLK_STORE(clk, 3, 1);
+
+       clk = clk_reg_prcc_kclk("p3_ssp1_kclk", "sspclk",
+                       clkrst3_base, BIT(2), CLK_SET_RATE_GATE);
+       PRCC_KCLK_STORE(clk, 3, 2);
+
+       clk = clk_reg_prcc_kclk("p3_i2c0_kclk", "i2cclk",
+                       clkrst3_base, BIT(3), CLK_SET_RATE_GATE);
+       PRCC_KCLK_STORE(clk, 3, 3);
+
+       clk = clk_reg_prcc_kclk("p3_sdi2_kclk", "sdmmcclk",
+                       clkrst3_base, BIT(4), CLK_SET_RATE_GATE);
+       PRCC_KCLK_STORE(clk, 3, 4);
+
+       clk = clk_reg_prcc_kclk("p3_ske_kclk", "rtc32k",
+                       clkrst3_base, BIT(5), CLK_SET_RATE_GATE);
+       PRCC_KCLK_STORE(clk, 3, 5);
+
+       clk = clk_reg_prcc_kclk("p3_uart2_kclk", "uartclk",
+                       clkrst3_base, BIT(6), CLK_SET_RATE_GATE);
+       PRCC_KCLK_STORE(clk, 3, 6);
+
+       clk = clk_reg_prcc_kclk("p3_sdi5_kclk", "sdmmcclk",
+                       clkrst3_base, BIT(7), CLK_SET_RATE_GATE);
+       PRCC_KCLK_STORE(clk, 3, 7);
+
+       /* Periph6 */
+       clk = clk_reg_prcc_kclk("p3_rng_kclk", "rngclk",
+                       clkrst6_base, BIT(0), CLK_SET_RATE_GATE);
+       PRCC_KCLK_STORE(clk, 6, 0);
+
+       for_each_child_of_node(np, child) {
+               static struct clk_onecell_data clk_data;
+
+               if (!of_node_cmp(child->name, "prcmu-clock")) {
+                       clk_data.clks = prcmu_clk;
+                       clk_data.clk_num = ARRAY_SIZE(prcmu_clk);
+                       of_clk_add_provider(child, of_clk_src_onecell_get, &clk_data);
+               }
+               if (!of_node_cmp(child->name, "prcc-periph-clock"))
+                       of_clk_add_provider(child, ux500_twocell_get, prcc_pclk);
+
+               if (!of_node_cmp(child->name, "prcc-kernel-clock"))
+                       of_clk_add_provider(child, ux500_twocell_get, prcc_kclk);
+
+               if (!of_node_cmp(child->name, "rtc32k-clock"))
+                       of_clk_add_provider(child, of_clk_src_simple_get, rtc_clk);
+
+               if (!of_node_cmp(child->name, "smp-twd-clock"))
+                       of_clk_add_provider(child, of_clk_src_simple_get, twd_clk);
+       }
+}
index f26258869deb22d4f2fd760b2139395ae25c9b0f..20c8add90d110db1575e0ccb5695499581853af5 100644 (file)
@@ -83,7 +83,7 @@ void u8540_clk_init(u32 clkrst1_base, u32 clkrst2_base, u32 clkrst3_base,
        clk_register_clkdev(clk, NULL, "lcd");
        clk_register_clkdev(clk, "lcd", "mcde");
 
-       clk = clk_reg_prcmu_opp_gate("bmlclk", NULL, PRCMU_BML8580CLK,
+       clk = clk_reg_prcmu_opp_gate("bmlclk", NULL, PRCMU_BMLCLK,
                                CLK_IS_ROOT);
        clk_register_clkdev(clk, NULL, "bml");
 
index babf3e40e9fa5030be4420f7038681954ebc5bb8..7d8ab000d3172eb677f0344932cb151cbb2c6b44 100644 (file)
 #include <linux/smp.h>
 #include <linux/init.h>
 #include <linux/io.h>
+#include <linux/platform_device.h>
+#include <linux/of.h>
+#include <linux/of_address.h>
 
-#include <mach/hardware.h>
-#include <mach/platform.h>
 #include <asm/mach-types.h>
 #include <asm/hardware/icst.h>
 
-static struct cpufreq_driver integrator_driver;
+static void __iomem *cm_base;
+/* The cpufreq driver only use the OSC register */
+#define INTEGRATOR_HDR_OSC_OFFSET       0x08
+#define INTEGRATOR_HDR_LOCK_OFFSET      0x14
 
-#define CM_ID          __io_address(INTEGRATOR_HDR_ID)
-#define CM_OSC __io_address(INTEGRATOR_HDR_OSC)
-#define CM_STAT __io_address(INTEGRATOR_HDR_STAT)
-#define CM_LOCK __io_address(INTEGRATOR_HDR_LOCK)
+static struct cpufreq_driver integrator_driver;
 
 static const struct icst_params lclk_params = {
        .ref            = 24000000,
@@ -95,7 +96,7 @@ static int integrator_set_target(struct cpufreq_policy *policy,
        BUG_ON(cpu != smp_processor_id());
 
        /* get current setting */
-       cm_osc = __raw_readl(CM_OSC);
+       cm_osc = __raw_readl(cm_base + INTEGRATOR_HDR_OSC_OFFSET);
 
        if (machine_is_integrator()) {
                vco.s = (cm_osc >> 8) & 7;
@@ -123,7 +124,7 @@ static int integrator_set_target(struct cpufreq_policy *policy,
 
        cpufreq_notify_transition(policy, &freqs, CPUFREQ_PRECHANGE);
 
-       cm_osc = __raw_readl(CM_OSC);
+       cm_osc = __raw_readl(cm_base + INTEGRATOR_HDR_OSC_OFFSET);
 
        if (machine_is_integrator()) {
                cm_osc &= 0xfffff800;
@@ -133,9 +134,9 @@ static int integrator_set_target(struct cpufreq_policy *policy,
        }
        cm_osc |= vco.v;
 
-       __raw_writel(0xa05f, CM_LOCK);
-       __raw_writel(cm_osc, CM_OSC);
-       __raw_writel(0, CM_LOCK);
+       __raw_writel(0xa05f, cm_base + INTEGRATOR_HDR_LOCK_OFFSET);
+       __raw_writel(cm_osc, cm_base + INTEGRATOR_HDR_OSC_OFFSET);
+       __raw_writel(0, cm_base + INTEGRATOR_HDR_LOCK_OFFSET);
 
        /*
         * Restore the CPUs allowed mask.
@@ -160,7 +161,7 @@ static unsigned int integrator_get(unsigned int cpu)
        BUG_ON(cpu != smp_processor_id());
 
        /* detect memory etc. */
-       cm_osc = __raw_readl(CM_OSC);
+       cm_osc = __raw_readl(cm_base + INTEGRATOR_HDR_OSC_OFFSET);
 
        if (machine_is_integrator()) {
                vco.s = (cm_osc >> 8) & 7;
@@ -196,19 +197,43 @@ static struct cpufreq_driver integrator_driver = {
        .name           = "integrator",
 };
 
-static int __init integrator_cpu_init(void)
+static int __init integrator_cpufreq_probe(struct platform_device *pdev)
 {
+       struct resource *res;
+
+       res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+        if (!res)
+               return -ENODEV;
+
+       cm_base = devm_ioremap(&pdev->dev, res->start, resource_size(res));
+       if (!cm_base)
+               return -ENODEV;
+
        return cpufreq_register_driver(&integrator_driver);
 }
 
-static void __exit integrator_cpu_exit(void)
+static void __exit integrator_cpufreq_remove(struct platform_device *pdev)
 {
        cpufreq_unregister_driver(&integrator_driver);
 }
 
+static const struct of_device_id integrator_cpufreq_match[] = {
+       { .compatible = "arm,core-module-integrator"},
+       { },
+};
+
+static struct platform_driver integrator_cpufreq_driver = {
+       .driver = {
+               .name = "integrator-cpufreq",
+               .owner = THIS_MODULE,
+               .of_match_table = integrator_cpufreq_match,
+       },
+       .remove = __exit_p(integrator_cpufreq_remove),
+};
+
+module_platform_driver_probe(integrator_cpufreq_driver,
+                            integrator_cpufreq_probe);
+
 MODULE_AUTHOR ("Russell M. King");
 MODULE_DESCRIPTION ("cpufreq driver for ARM Integrator CPUs");
 MODULE_LICENSE ("GPL");
-
-module_init(integrator_cpu_init);
-module_exit(integrator_cpu_exit);
index f23bd75426cdfcac5da246ef6f23adef0a15b0da..d988948a89a069510c32bda5ca79a1a422b8827b 100644 (file)
@@ -15,7 +15,7 @@ config ARM_BIG_LITTLE_CPUIDLE
 
 config ARM_HIGHBANK_CPUIDLE
        bool "CPU Idle Driver for Calxeda processors"
-       depends on ARCH_HIGHBANK
+       depends on ARM_PSCI
        select ARM_CPU_SUSPEND
        help
          Select this to enable cpuidle on Calxeda processors.
index 34605847957269635b650997d51ac7eb9062416f..36795639df0da2d828c784b61c82a728037f6e1c 100644 (file)
  */
 
 #include <linux/cpuidle.h>
+#include <linux/cpu_pm.h>
 #include <linux/init.h>
-#include <linux/io.h>
-#include <linux/of.h>
-#include <linux/time.h>
-#include <linux/delay.h>
-#include <linux/suspend.h>
+#include <linux/mm.h>
+#include <linux/platform_device.h>
 #include <asm/cpuidle.h>
-#include <asm/proc-fns.h>
-#include <asm/smp_scu.h>
 #include <asm/suspend.h>
-#include <asm/cacheflush.h>
-#include <asm/cp15.h>
-
-extern void highbank_set_cpu_jump(int cpu, void *jump_addr);
-extern void __iomem *scu_base_addr;
-
-static noinline void calxeda_idle_restore(void)
-{
-       set_cr(get_cr() | CR_C);
-       set_auxcr(get_auxcr() | 0x40);
-       scu_power_mode(scu_base_addr, SCU_PM_NORMAL);
-}
+#include <asm/psci.h>
 
 static int calxeda_idle_finish(unsigned long val)
 {
-       /* Already flushed cache, but do it again as the outer cache functions
-        * dirty the cache with spinlocks */
-       flush_cache_all();
-
-       set_auxcr(get_auxcr() & ~0x40);
-       set_cr(get_cr() & ~CR_C);
-
-       scu_power_mode(scu_base_addr, SCU_PM_DORMANT);
-
-       cpu_do_idle();
-
-       /* Restore things if we didn't enter power-gating */
-       calxeda_idle_restore();
-       return 1;
+       const struct psci_power_state ps = {
+               .type = PSCI_POWER_STATE_TYPE_POWER_DOWN,
+       };
+       return psci_ops.cpu_suspend(ps, __pa(cpu_resume));
 }
 
 static int calxeda_pwrdown_idle(struct cpuidle_device *dev,
                                struct cpuidle_driver *drv,
                                int index)
 {
-       highbank_set_cpu_jump(smp_processor_id(), cpu_resume);
+       cpu_pm_enter();
        cpu_suspend(0, calxeda_idle_finish);
+       cpu_pm_exit();
+
        return index;
 }
 
@@ -88,11 +65,17 @@ static struct cpuidle_driver calxeda_idle_driver = {
        .state_count = 2,
 };
 
-static int __init calxeda_cpuidle_init(void)
+static int __init calxeda_cpuidle_probe(struct platform_device *pdev)
 {
-       if (!of_machine_is_compatible("calxeda,highbank"))
-               return -ENODEV;
-
        return cpuidle_register(&calxeda_idle_driver, NULL);
 }
-module_init(calxeda_cpuidle_init);
+
+static struct platform_driver calxeda_cpuidle_plat_driver = {
+        .driver = {
+                .name = "cpuidle-calxeda",
+                .owner = THIS_MODULE,
+        },
+        .probe = calxeda_cpuidle_probe,
+};
+
+module_platform_driver(calxeda_cpuidle_plat_driver);
index fcba96cce6477024ccd6df9cf55beba87fa22949..9ec1c5c864dd7dd315b5973d438fb794bef2e6c7 100644 (file)
@@ -195,7 +195,7 @@ config SIRF_DMA
 
 config TI_EDMA
        bool "TI EDMA support"
-       depends on ARCH_DAVINCI || ARCH_OMAP
+       depends on ARCH_DAVINCI || ARCH_OMAP || ARCH_KEYSTONE
        select DMA_ENGINE
        select DMA_VIRTUAL_CHANNELS
        select TI_PRIV_EDMA
index 17df6db5dca7df56729af877b561d99f8892a15e..8847adf392b7ecf823f9f603314c76001367203f 100644 (file)
@@ -15,8 +15,9 @@
 #include <linux/clk.h>
 #include <linux/err.h>
 #include <linux/io.h>
-
-#include <asm/mach/irq.h>
+#include <linux/irq.h>
+#include <linux/platform_device.h>
+#include <linux/platform_data/gpio-davinci.h>
 
 struct davinci_gpio_regs {
        u32     dir;
@@ -31,13 +32,14 @@ struct davinci_gpio_regs {
        u32     intstat;
 };
 
+#define BINTEN 0x8 /* GPIO Interrupt Per-Bank Enable Register */
+
 #define chip2controller(chip)  \
        container_of(chip, struct davinci_gpio_controller, chip)
 
-static struct davinci_gpio_controller chips[DIV_ROUND_UP(DAVINCI_N_GPIO, 32)];
 static void __iomem *gpio_base;
 
-static struct davinci_gpio_regs __iomem __init *gpio2regs(unsigned gpio)
+static struct davinci_gpio_regs __iomem *gpio2regs(unsigned gpio)
 {
        void __iomem *ptr;
 
@@ -65,7 +67,7 @@ static inline struct davinci_gpio_regs __iomem *irq2regs(int irq)
        return g;
 }
 
-static int __init davinci_gpio_irq_setup(void);
+static int davinci_gpio_irq_setup(struct platform_device *pdev);
 
 /*--------------------------------------------------------------------------*/
 
@@ -131,33 +133,53 @@ davinci_gpio_set(struct gpio_chip *chip, unsigned offset, int value)
        __raw_writel((1 << offset), value ? &g->set_data : &g->clr_data);
 }
 
-static int __init davinci_gpio_setup(void)
+static int davinci_gpio_probe(struct platform_device *pdev)
 {
        int i, base;
        unsigned ngpio;
-       struct davinci_soc_info *soc_info = &davinci_soc_info;
-       struct davinci_gpio_regs *regs;
-
-       if (soc_info->gpio_type != GPIO_TYPE_DAVINCI)
-               return 0;
+       struct davinci_gpio_controller *chips;
+       struct davinci_gpio_platform_data *pdata;
+       struct davinci_gpio_regs __iomem *regs;
+       struct device *dev = &pdev->dev;
+       struct resource *res;
+
+       pdata = dev->platform_data;
+       if (!pdata) {
+               dev_err(dev, "No platform data found\n");
+               return -EINVAL;
+       }
 
        /*
         * The gpio banks conceptually expose a segmented bitmap,
         * and "ngpio" is one more than the largest zero-based
         * bit index that's valid.
         */
-       ngpio = soc_info->gpio_num;
+       ngpio = pdata->ngpio;
        if (ngpio == 0) {
-               pr_err("GPIO setup:  how many GPIOs?\n");
+               dev_err(dev, "How many GPIOs?\n");
                return -EINVAL;
        }
 
        if (WARN_ON(DAVINCI_N_GPIO < ngpio))
                ngpio = DAVINCI_N_GPIO;
 
-       gpio_base = ioremap(soc_info->gpio_base, SZ_4K);
-       if (WARN_ON(!gpio_base))
+       chips = devm_kzalloc(dev,
+                            ngpio * sizeof(struct davinci_gpio_controller),
+                            GFP_KERNEL);
+       if (!chips) {
+               dev_err(dev, "Memory allocation failed\n");
                return -ENOMEM;
+       }
+
+       res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+       if (!res) {
+               dev_err(dev, "Invalid memory resource\n");
+               return -EBUSY;
+       }
+
+       gpio_base = devm_ioremap_resource(dev, res);
+       if (IS_ERR(gpio_base))
+               return PTR_ERR(gpio_base);
 
        for (i = 0, base = 0; base < ngpio; i++, base += 32) {
                chips[i].chip.label = "DaVinci";
@@ -183,13 +205,10 @@ static int __init davinci_gpio_setup(void)
                gpiochip_add(&chips[i].chip);
        }
 
-       soc_info->gpio_ctlrs = chips;
-       soc_info->gpio_ctlrs_num = DIV_ROUND_UP(ngpio, 32);
-
-       davinci_gpio_irq_setup();
+       platform_set_drvdata(pdev, chips);
+       davinci_gpio_irq_setup(pdev);
        return 0;
 }
-pure_initcall(davinci_gpio_setup);
 
 /*--------------------------------------------------------------------------*/
 /*
@@ -302,13 +321,14 @@ static int gpio_to_irq_banked(struct gpio_chip *chip, unsigned offset)
 
 static int gpio_to_irq_unbanked(struct gpio_chip *chip, unsigned offset)
 {
-       struct davinci_soc_info *soc_info = &davinci_soc_info;
+       struct davinci_gpio_controller *d = chip2controller(chip);
 
-       /* NOTE:  we assume for now that only irqs in the first gpio_chip
+       /*
+        * NOTE:  we assume for now that only irqs in the first gpio_chip
         * can provide direct-mapped IRQs to AINTC (up to 32 GPIOs).
         */
-       if (offset < soc_info->gpio_unbanked)
-               return soc_info->gpio_irq + offset;
+       if (offset < d->irq_base)
+               return d->gpio_irq + offset;
        else
                return -ENODEV;
 }
@@ -317,12 +337,11 @@ static int gpio_irq_type_unbanked(struct irq_data *data, unsigned trigger)
 {
        struct davinci_gpio_controller *d;
        struct davinci_gpio_regs __iomem *g;
-       struct davinci_soc_info *soc_info = &davinci_soc_info;
        u32 mask;
 
        d = (struct davinci_gpio_controller *)data->handler_data;
        g = (struct davinci_gpio_regs __iomem *)d->regs;
-       mask = __gpio_mask(data->irq - soc_info->gpio_irq);
+       mask = __gpio_mask(data->irq - d->gpio_irq);
 
        if (trigger & ~(IRQ_TYPE_EDGE_FALLING | IRQ_TYPE_EDGE_RISING))
                return -EINVAL;
@@ -343,24 +362,33 @@ static int gpio_irq_type_unbanked(struct irq_data *data, unsigned trigger)
  * (dm6446) can be set appropriately for GPIOV33 pins.
  */
 
-static int __init davinci_gpio_irq_setup(void)
+static int davinci_gpio_irq_setup(struct platform_device *pdev)
 {
        unsigned        gpio, irq, bank;
        struct clk      *clk;
        u32             binten = 0;
        unsigned        ngpio, bank_irq;
-       struct davinci_soc_info *soc_info = &davinci_soc_info;
-       struct davinci_gpio_regs        __iomem *g;
+       struct device *dev = &pdev->dev;
+       struct resource *res;
+       struct davinci_gpio_controller *chips = platform_get_drvdata(pdev);
+       struct davinci_gpio_platform_data *pdata = dev->platform_data;
+       struct davinci_gpio_regs __iomem *g;
 
-       ngpio = soc_info->gpio_num;
+       ngpio = pdata->ngpio;
+       res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
+       if (!res) {
+               dev_err(dev, "Invalid IRQ resource\n");
+               return -EBUSY;
+       }
 
-       bank_irq = soc_info->gpio_irq;
-       if (bank_irq == 0) {
-               printk(KERN_ERR "Don't know first GPIO bank IRQ.\n");
-               return -EINVAL;
+       bank_irq = res->start;
+
+       if (!bank_irq) {
+               dev_err(dev, "Invalid IRQ resource\n");
+               return -ENODEV;
        }
 
-       clk = clk_get(NULL, "gpio");
+       clk = devm_clk_get(dev, "gpio");
        if (IS_ERR(clk)) {
                printk(KERN_ERR "Error %ld getting gpio clock?\n",
                       PTR_ERR(clk));
@@ -368,16 +396,17 @@ static int __init davinci_gpio_irq_setup(void)
        }
        clk_prepare_enable(clk);
 
-       /* Arrange gpio_to_irq() support, handling either direct IRQs or
+       /*
+        * Arrange gpio_to_irq() support, handling either direct IRQs or
         * banked IRQs.  Having GPIOs in the first GPIO bank use direct
         * IRQs, while the others use banked IRQs, would need some setup
         * tweaks to recognize hardware which can do that.
         */
        for (gpio = 0, bank = 0; gpio < ngpio; bank++, gpio += 32) {
                chips[bank].chip.to_irq = gpio_to_irq_banked;
-               chips[bank].irq_base = soc_info->gpio_unbanked
+               chips[bank].irq_base = pdata->gpio_unbanked
                        ? -EINVAL
-                       : (soc_info->intc_irq_num + gpio);
+                       : (pdata->intc_irq_num + gpio);
        }
 
        /*
@@ -385,7 +414,7 @@ static int __init davinci_gpio_irq_setup(void)
         * controller only handling trigger modes.  We currently assume no
         * IRQ mux conflicts; gpio_irq_type_unbanked() is only for GPIOs.
         */
-       if (soc_info->gpio_unbanked) {
+       if (pdata->gpio_unbanked) {
                static struct irq_chip_type gpio_unbanked;
 
                /* pass "bank 0" GPIO IRQs to AINTC */
@@ -405,7 +434,7 @@ static int __init davinci_gpio_irq_setup(void)
                __raw_writel(~0, &g->set_rising);
 
                /* set the direct IRQs up to use that irqchip */
-               for (gpio = 0; gpio < soc_info->gpio_unbanked; gpio++, irq++) {
+               for (gpio = 0; gpio < pdata->gpio_unbanked; gpio++, irq++) {
                        irq_set_chip(irq, &gpio_unbanked.chip);
                        irq_set_handler_data(irq, &chips[gpio / 32]);
                        irq_set_status_flags(irq, IRQ_TYPE_EDGE_BOTH);
@@ -450,12 +479,31 @@ static int __init davinci_gpio_irq_setup(void)
        }
 
 done:
-       /* BINTEN -- per-bank interrupt enable. genirq would also let these
+       /*
+        * BINTEN -- per-bank interrupt enable. genirq would also let these
         * bits be set/cleared dynamically.
         */
-       __raw_writel(binten, gpio_base + 0x08);
+       __raw_writel(binten, gpio_base + BINTEN);
 
        printk(KERN_INFO "DaVinci: %d gpio irqs\n", irq - gpio_to_irq(0));
 
        return 0;
 }
+
+static struct platform_driver davinci_gpio_driver = {
+       .probe          = davinci_gpio_probe,
+       .driver         = {
+               .name   = "davinci_gpio",
+               .owner  = THIS_MODULE,
+       },
+};
+
+/**
+ * GPIO driver registration needs to be done before machine_init functions
+ * access GPIO. Hence davinci_gpio_drv_reg() is a postcore_initcall.
+ */
+static int __init davinci_gpio_drv_reg(void)
+{
+       return platform_driver_register(&davinci_gpio_driver);
+}
+postcore_initcall(davinci_gpio_drv_reg);
index 358a21c2d811bc6637960ed167ae8e95260ecfca..29b5d6777dc541dc9c55e1bdf1df93237117b364 100644 (file)
@@ -2082,34 +2082,14 @@ static __init int samsung_gpiolib_init(void)
        int i, nr_chips;
        int group = 0;
 
-#if defined(CONFIG_PINCTRL_EXYNOS) || defined(CONFIG_PINCTRL_EXYNOS5440)
        /*
-       * This gpio driver includes support for device tree support and there
-       * are platforms using it. In order to maintain compatibility with those
-       * platforms, and to allow non-dt Exynos4210 platforms to use this
-       * gpiolib support, a check is added to find out if there is a active
-       * pin-controller driver support available. If it is available, this
-       * gpiolib support is ignored and the gpiolib support available in
-       * pin-controller driver is used. This is a temporary check and will go
-       * away when all of the Exynos4210 platforms have switched to using
-       * device tree and the pin-ctrl driver.
-       */
-       struct device_node *pctrl_np;
-       static const struct of_device_id exynos_pinctrl_ids[] = {
-               { .compatible = "samsung,s3c2412-pinctrl", },
-               { .compatible = "samsung,s3c2416-pinctrl", },
-               { .compatible = "samsung,s3c2440-pinctrl", },
-               { .compatible = "samsung,s3c2450-pinctrl", },
-               { .compatible = "samsung,exynos4210-pinctrl", },
-               { .compatible = "samsung,exynos4x12-pinctrl", },
-               { .compatible = "samsung,exynos5250-pinctrl", },
-               { .compatible = "samsung,exynos5440-pinctrl", },
-               { }
-       };
-       for_each_matching_node(pctrl_np, exynos_pinctrl_ids)
-               if (pctrl_np && of_device_is_available(pctrl_np))
-                       return -ENODEV;
-#endif
+        * Currently there are two drivers that can provide GPIO support for
+        * Samsung SoCs. For device tree enabled platforms, the new
+        * pinctrl-samsung driver is used, providing both GPIO and pin control
+        * interfaces. For legacy (non-DT) platforms this driver is used.
+        */
+       if (of_have_populated_dt())
+               return -ENODEV;
 
        samsung_gpiolib_set_cfg(samsung_gpio_cfgs, ARRAY_SIZE(samsung_gpio_cfgs));
 
index 3fa3e2867e19b8dfcbd3ca2275b0fbd194cb0693..58445bb69106c71ab648263e731e12151e48c911 100644 (file)
@@ -15,6 +15,7 @@
 #include <linux/kernel.h>
 #include <linux/init.h>
 #include <linux/gpio.h>
+#include <linux/platform_data/gpio-davinci.h>
 
 #include <mach/common.h>
 #include <mach/tnetv107x.h>
index 5dba90a8a27cbc8445cffbf621971ce5d9c6fb43..8fb46aab2d87d5bf85ddc2a1b68ca38341bcb058 100644 (file)
@@ -197,8 +197,8 @@ comment "IDE chipset support/bugfixes"
 
 config IDE_GENERIC
        tristate "generic/default IDE chipset support"
-       depends on ALPHA || X86 || IA64 || M32R || MIPS || ARCH_RPC || ARCH_SHARK
-       default ARM && (ARCH_RPC || ARCH_SHARK)
+       depends on ALPHA || X86 || IA64 || M32R || MIPS || ARCH_RPC
+       default ARM && ARCH_RPC
        help
          This is the generic IDE driver.  This driver attaches to the
          fixed legacy ports (e.g. on PCs 0x1f0/0x170, 0x1e8/0x168 and
index 296cb88d70080eaae14c06a5179ffb11cfae107f..58efc7c3d09cfa081e027140a212befa02b42543 100644 (file)
@@ -21,7 +21,7 @@ if SERIO
 config SERIO_I8042
        tristate "i8042 PC Keyboard controller" if EXPERT || !X86
        default y
-       depends on !PARISC && (!ARM || ARCH_SHARK || FOOTBRIDGE_HOST) && \
+       depends on !PARISC && (!ARM || FOOTBRIDGE_HOST) && \
                   (!SUPERH || SH_CAYMAN) && !M68K && !BLACKFIN && !S390 && \
                   !ARC
        help
index bb328a366122851b0d28308e13079dfb3ad146d2..433cc8568dec803c78957d12e9bb9b15d7e4ff00 100644 (file)
 #include <linux/io.h>
 #include <linux/of_address.h>
 #include <linux/of_irq.h>
+#include <linux/of_pci.h>
 #include <linux/irqdomain.h>
+#include <linux/slab.h>
+#include <linux/msi.h>
 #include <asm/mach/arch.h>
 #include <asm/exception.h>
 #include <asm/smp_plat.h>
 #define IPI_DOORBELL_START                      (0)
 #define IPI_DOORBELL_END                        (8)
 #define IPI_DOORBELL_MASK                       0xFF
+#define PCI_MSI_DOORBELL_START                  (16)
+#define PCI_MSI_DOORBELL_NR                     (16)
+#define PCI_MSI_DOORBELL_END                    (32)
+#define PCI_MSI_DOORBELL_MASK                   0xFFFF0000
 
 static DEFINE_RAW_SPINLOCK(irq_controller_lock);
 
 static void __iomem *per_cpu_int_base;
 static void __iomem *main_int_base;
 static struct irq_domain *armada_370_xp_mpic_domain;
+#ifdef CONFIG_PCI_MSI
+static struct irq_domain *armada_370_xp_msi_domain;
+static DECLARE_BITMAP(msi_used, PCI_MSI_DOORBELL_NR);
+static DEFINE_MUTEX(msi_used_lock);
+static phys_addr_t msi_doorbell_addr;
+#endif
 
 /*
  * In SMP mode:
@@ -87,6 +100,144 @@ static void armada_370_xp_irq_unmask(struct irq_data *d)
                                ARMADA_370_XP_INT_CLEAR_MASK_OFFS);
 }
 
+#ifdef CONFIG_PCI_MSI
+
+static int armada_370_xp_alloc_msi(void)
+{
+       int hwirq;
+
+       mutex_lock(&msi_used_lock);
+       hwirq = find_first_zero_bit(&msi_used, PCI_MSI_DOORBELL_NR);
+       if (hwirq >= PCI_MSI_DOORBELL_NR)
+               hwirq = -ENOSPC;
+       else
+               set_bit(hwirq, msi_used);
+       mutex_unlock(&msi_used_lock);
+
+       return hwirq;
+}
+
+static void armada_370_xp_free_msi(int hwirq)
+{
+       mutex_lock(&msi_used_lock);
+       if (!test_bit(hwirq, msi_used))
+               pr_err("trying to free unused MSI#%d\n", hwirq);
+       else
+               clear_bit(hwirq, msi_used);
+       mutex_unlock(&msi_used_lock);
+}
+
+static int armada_370_xp_setup_msi_irq(struct msi_chip *chip,
+                                      struct pci_dev *pdev,
+                                      struct msi_desc *desc)
+{
+       struct msi_msg msg;
+       irq_hw_number_t hwirq;
+       int virq;
+
+       hwirq = armada_370_xp_alloc_msi();
+       if (hwirq < 0)
+               return hwirq;
+
+       virq = irq_create_mapping(armada_370_xp_msi_domain, hwirq);
+       if (!virq) {
+               armada_370_xp_free_msi(hwirq);
+               return -EINVAL;
+       }
+
+       irq_set_msi_desc(virq, desc);
+
+       msg.address_lo = msi_doorbell_addr;
+       msg.address_hi = 0;
+       msg.data = 0xf00 | (hwirq + 16);
+
+       write_msi_msg(virq, &msg);
+       return 0;
+}
+
+static void armada_370_xp_teardown_msi_irq(struct msi_chip *chip,
+                                          unsigned int irq)
+{
+       struct irq_data *d = irq_get_irq_data(irq);
+       irq_dispose_mapping(irq);
+       armada_370_xp_free_msi(d->hwirq);
+}
+
+static struct irq_chip armada_370_xp_msi_irq_chip = {
+       .name = "armada_370_xp_msi_irq",
+       .irq_enable = unmask_msi_irq,
+       .irq_disable = mask_msi_irq,
+       .irq_mask = mask_msi_irq,
+       .irq_unmask = unmask_msi_irq,
+};
+
+static int armada_370_xp_msi_map(struct irq_domain *domain, unsigned int virq,
+                                irq_hw_number_t hw)
+{
+       irq_set_chip_and_handler(virq, &armada_370_xp_msi_irq_chip,
+                                handle_simple_irq);
+       set_irq_flags(virq, IRQF_VALID);
+
+       return 0;
+}
+
+static const struct irq_domain_ops armada_370_xp_msi_irq_ops = {
+       .map = armada_370_xp_msi_map,
+};
+
+static int armada_370_xp_msi_init(struct device_node *node,
+                                 phys_addr_t main_int_phys_base)
+{
+       struct msi_chip *msi_chip;
+       u32 reg;
+       int ret;
+
+       msi_doorbell_addr = main_int_phys_base +
+               ARMADA_370_XP_SW_TRIG_INT_OFFS;
+
+       msi_chip = kzalloc(sizeof(*msi_chip), GFP_KERNEL);
+       if (!msi_chip)
+               return -ENOMEM;
+
+       msi_chip->setup_irq = armada_370_xp_setup_msi_irq;
+       msi_chip->teardown_irq = armada_370_xp_teardown_msi_irq;
+       msi_chip->of_node = node;
+
+       armada_370_xp_msi_domain =
+               irq_domain_add_linear(NULL, PCI_MSI_DOORBELL_NR,
+                                     &armada_370_xp_msi_irq_ops,
+                                     NULL);
+       if (!armada_370_xp_msi_domain) {
+               kfree(msi_chip);
+               return -ENOMEM;
+       }
+
+       ret = of_pci_msi_chip_add(msi_chip);
+       if (ret < 0) {
+               irq_domain_remove(armada_370_xp_msi_domain);
+               kfree(msi_chip);
+               return ret;
+       }
+
+       reg = readl(per_cpu_int_base + ARMADA_370_XP_IN_DRBEL_MSK_OFFS)
+               | PCI_MSI_DOORBELL_MASK;
+
+       writel(reg, per_cpu_int_base +
+              ARMADA_370_XP_IN_DRBEL_MSK_OFFS);
+
+       /* Unmask IPI interrupt */
+       writel(1, per_cpu_int_base + ARMADA_370_XP_INT_CLEAR_MASK_OFFS);
+
+       return 0;
+}
+#else
+static inline int armada_370_xp_msi_init(struct device_node *node,
+                                        phys_addr_t main_int_phys_base)
+{
+       return 0;
+}
+#endif
+
 #ifdef CONFIG_SMP
 static int armada_xp_set_affinity(struct irq_data *d,
                                  const struct cpumask *mask_val, bool force)
@@ -214,12 +365,39 @@ armada_370_xp_handle_irq(struct pt_regs *regs)
                if (irqnr > 1022)
                        break;
 
-               if (irqnr > 0) {
+               if (irqnr > 1) {
                        irqnr = irq_find_mapping(armada_370_xp_mpic_domain,
                                        irqnr);
                        handle_IRQ(irqnr, regs);
                        continue;
                }
+
+#ifdef CONFIG_PCI_MSI
+               /* MSI handling */
+               if (irqnr == 1) {
+                       u32 msimask, msinr;
+
+                       msimask = readl_relaxed(per_cpu_int_base +
+                                               ARMADA_370_XP_IN_DRBEL_CAUSE_OFFS)
+                               & PCI_MSI_DOORBELL_MASK;
+
+                       writel(~PCI_MSI_DOORBELL_MASK, per_cpu_int_base +
+                              ARMADA_370_XP_IN_DRBEL_CAUSE_OFFS);
+
+                       for (msinr = PCI_MSI_DOORBELL_START;
+                            msinr < PCI_MSI_DOORBELL_END; msinr++) {
+                               int irq;
+
+                               if (!(msimask & BIT(msinr)))
+                                       continue;
+
+                               irq = irq_find_mapping(armada_370_xp_msi_domain,
+                                                      msinr - 16);
+                               handle_IRQ(irq, regs);
+                       }
+               }
+#endif
+
 #ifdef CONFIG_SMP
                /* IPI Handling */
                if (irqnr == 0) {
@@ -248,12 +426,25 @@ armada_370_xp_handle_irq(struct pt_regs *regs)
 static int __init armada_370_xp_mpic_of_init(struct device_node *node,
                                             struct device_node *parent)
 {
+       struct resource main_int_res, per_cpu_int_res;
        u32 control;
 
-       main_int_base = of_iomap(node, 0);
-       per_cpu_int_base = of_iomap(node, 1);
+       BUG_ON(of_address_to_resource(node, 0, &main_int_res));
+       BUG_ON(of_address_to_resource(node, 1, &per_cpu_int_res));
+
+       BUG_ON(!request_mem_region(main_int_res.start,
+                                  resource_size(&main_int_res),
+                                  node->full_name));
+       BUG_ON(!request_mem_region(per_cpu_int_res.start,
+                                  resource_size(&per_cpu_int_res),
+                                  node->full_name));
 
+       main_int_base = ioremap(main_int_res.start,
+                               resource_size(&main_int_res));
        BUG_ON(!main_int_base);
+
+       per_cpu_int_base = ioremap(per_cpu_int_res.start,
+                                  resource_size(&per_cpu_int_res));
        BUG_ON(!per_cpu_int_base);
 
        control = readl(main_int_base + ARMADA_370_XP_INT_CONTROL);
@@ -262,8 +453,7 @@ static int __init armada_370_xp_mpic_of_init(struct device_node *node,
                irq_domain_add_linear(node, (control >> 2) & 0x3ff,
                                &armada_370_xp_mpic_irq_ops, NULL);
 
-       if (!armada_370_xp_mpic_domain)
-               panic("Unable to add Armada_370_Xp MPIC irq domain (DT)\n");
+       BUG_ON(!armada_370_xp_mpic_domain);
 
        irq_set_default_host(armada_370_xp_mpic_domain);
 
@@ -280,6 +470,8 @@ static int __init armada_370_xp_mpic_of_init(struct device_node *node,
 
 #endif
 
+       armada_370_xp_msi_init(node, main_int_res.start);
+
        set_handle_irq(armada_370_xp_handle_irq);
 
        return 0;
index 2bbb00404cf5001df2c6f8654de6d467d58f3b6d..8e21ae0bab4658a2ee2beb15a07a7a396411261f 100644 (file)
@@ -469,6 +469,8 @@ void __init vic_init(void __iomem *base, unsigned int irq_start,
 int __init vic_of_init(struct device_node *node, struct device_node *parent)
 {
        void __iomem *regs;
+       u32 interrupt_mask = ~0;
+       u32 wakeup_mask = ~0;
 
        if (WARN(parent, "non-root VICs are not supported"))
                return -EINVAL;
@@ -477,10 +479,13 @@ int __init vic_of_init(struct device_node *node, struct device_node *parent)
        if (WARN_ON(!regs))
                return -EIO;
 
+       of_property_read_u32(node, "valid-mask", &interrupt_mask);
+       of_property_read_u32(node, "valid-wakeup-mask", &wakeup_mask);
+
        /*
         * Passing 0 as first IRQ makes the simple domain allocate descriptors
         */
-       __vic_init(regs, 0, ~0, ~0, node);
+       __vic_init(regs, 0, interrupt_mask, wakeup_mask, node);
 
        return 0;
 }
index 53f371dcbb6e96550537b108fffbba1c00af3015..b9ce60c301de026bba38daf276e83773c44379ec 100644 (file)
@@ -480,7 +480,6 @@ static struct clk_mgt clk_mgt[PRCMU_NUM_REG_CLOCKS] = {
        CLK_MGT_ENTRY(PER6CLK, PLL_DIV, true),
        CLK_MGT_ENTRY(PER7CLK, PLL_DIV, true),
        CLK_MGT_ENTRY(LCDCLK, PLL_FIX, true),
-       CLK_MGT_ENTRY(BML8580CLK, PLL_DIV, true),
        CLK_MGT_ENTRY(BMLCLK, PLL_DIV, true),
        CLK_MGT_ENTRY(HSITXCLK, PLL_DIV, true),
        CLK_MGT_ENTRY(HSIRXCLK, PLL_DIV, true),
index 4f6f0fa5d3b7768d4265b632f4e1620be22c347b..7cc32a8ff01c01b06e8d29ae44134253d81828ba 100644 (file)
@@ -32,7 +32,6 @@
 #define PRCM_PER7CLK_MGT       (0x040)
 #define PRCM_LCDCLK_MGT                (0x044)
 #define PRCM_BMLCLK_MGT                (0x04C)
-#define PRCM_BML8580CLK_MGT    (0x108)
 #define PRCM_HSITXCLK_MGT      (0x050)
 #define PRCM_HSIRXCLK_MGT      (0x054)
 #define PRCM_HDMICLK_MGT       (0x058)
index efa24d9a33615a1268e83212fc3a04844806497f..a4cf9552cf7c52bf1ae3e4bd42370164b07dd4ea 100644 (file)
@@ -3,7 +3,7 @@ menu "PCI host controller drivers"
 
 config PCI_MVEBU
        bool "Marvell EBU PCIe controller"
-       depends on ARCH_MVEBU || ARCH_KIRKWOOD
+       depends on ARCH_MVEBU || ARCH_DOVE || ARCH_KIRKWOOD
        depends on OF
 
 config PCIE_DW
index 729d5a101d621ece6d36b425ad213a48a57a859f..80b2250ea19a6f892e3645e8736216c7dd96aafd 100644 (file)
@@ -9,13 +9,17 @@
 #include <linux/kernel.h>
 #include <linux/pci.h>
 #include <linux/clk.h>
+#include <linux/delay.h>
+#include <linux/gpio.h>
 #include <linux/module.h>
 #include <linux/mbus.h>
+#include <linux/msi.h>
 #include <linux/slab.h>
 #include <linux/platform_device.h>
 #include <linux/of_address.h>
-#include <linux/of_pci.h>
 #include <linux/of_irq.h>
+#include <linux/of_gpio.h>
+#include <linux/of_pci.h>
 #include <linux/of_platform.h>
 
 /*
@@ -103,6 +107,7 @@ struct mvebu_pcie_port;
 struct mvebu_pcie {
        struct platform_device *pdev;
        struct mvebu_pcie_port *ports;
+       struct msi_chip *msi;
        struct resource io;
        struct resource realio;
        struct resource mem;
@@ -115,7 +120,6 @@ struct mvebu_pcie_port {
        char *name;
        void __iomem *base;
        spinlock_t conf_lock;
-       int haslink;
        u32 port;
        u32 lane;
        int devfn;
@@ -124,6 +128,9 @@ struct mvebu_pcie_port {
        unsigned int io_target;
        unsigned int io_attr;
        struct clk *clk;
+       int reset_gpio;
+       int reset_active_low;
+       char *reset_name;
        struct mvebu_sw_pci_bridge bridge;
        struct device_node *dn;
        struct mvebu_pcie *pcie;
@@ -133,29 +140,39 @@ struct mvebu_pcie_port {
        size_t iowin_size;
 };
 
+static inline void mvebu_writel(struct mvebu_pcie_port *port, u32 val, u32 reg)
+{
+       writel(val, port->base + reg);
+}
+
+static inline u32 mvebu_readl(struct mvebu_pcie_port *port, u32 reg)
+{
+       return readl(port->base + reg);
+}
+
 static bool mvebu_pcie_link_up(struct mvebu_pcie_port *port)
 {
-       return !(readl(port->base + PCIE_STAT_OFF) & PCIE_STAT_LINK_DOWN);
+       return !(mvebu_readl(port, PCIE_STAT_OFF) & PCIE_STAT_LINK_DOWN);
 }
 
 static void mvebu_pcie_set_local_bus_nr(struct mvebu_pcie_port *port, int nr)
 {
        u32 stat;
 
-       stat = readl(port->base + PCIE_STAT_OFF);
+       stat = mvebu_readl(port, PCIE_STAT_OFF);
        stat &= ~PCIE_STAT_BUS;
        stat |= nr << 8;
-       writel(stat, port->base + PCIE_STAT_OFF);
+       mvebu_writel(port, stat, PCIE_STAT_OFF);
 }
 
 static void mvebu_pcie_set_local_dev_nr(struct mvebu_pcie_port *port, int nr)
 {
        u32 stat;
 
-       stat = readl(port->base + PCIE_STAT_OFF);
+       stat = mvebu_readl(port, PCIE_STAT_OFF);
        stat &= ~PCIE_STAT_DEV;
        stat |= nr << 16;
-       writel(stat, port->base + PCIE_STAT_OFF);
+       mvebu_writel(port, stat, PCIE_STAT_OFF);
 }
 
 /*
@@ -163,7 +180,7 @@ static void mvebu_pcie_set_local_dev_nr(struct mvebu_pcie_port *port, int nr)
  * BAR[0,2] -> disabled, BAR[1] -> covers all DRAM banks
  * WIN[0-3] -> DRAM bank[0-3]
  */
-static void __init mvebu_pcie_setup_wins(struct mvebu_pcie_port *port)
+static void mvebu_pcie_setup_wins(struct mvebu_pcie_port *port)
 {
        const struct mbus_dram_target_info *dram;
        u32 size;
@@ -173,33 +190,34 @@ static void __init mvebu_pcie_setup_wins(struct mvebu_pcie_port *port)
 
        /* First, disable and clear BARs and windows. */
        for (i = 1; i < 3; i++) {
-               writel(0, port->base + PCIE_BAR_CTRL_OFF(i));
-               writel(0, port->base + PCIE_BAR_LO_OFF(i));
-               writel(0, port->base + PCIE_BAR_HI_OFF(i));
+               mvebu_writel(port, 0, PCIE_BAR_CTRL_OFF(i));
+               mvebu_writel(port, 0, PCIE_BAR_LO_OFF(i));
+               mvebu_writel(port, 0, PCIE_BAR_HI_OFF(i));
        }
 
        for (i = 0; i < 5; i++) {
-               writel(0, port->base + PCIE_WIN04_CTRL_OFF(i));
-               writel(0, port->base + PCIE_WIN04_BASE_OFF(i));
-               writel(0, port->base + PCIE_WIN04_REMAP_OFF(i));
+               mvebu_writel(port, 0, PCIE_WIN04_CTRL_OFF(i));
+               mvebu_writel(port, 0, PCIE_WIN04_BASE_OFF(i));
+               mvebu_writel(port, 0, PCIE_WIN04_REMAP_OFF(i));
        }
 
-       writel(0, port->base + PCIE_WIN5_CTRL_OFF);
-       writel(0, port->base + PCIE_WIN5_BASE_OFF);
-       writel(0, port->base + PCIE_WIN5_REMAP_OFF);
+       mvebu_writel(port, 0, PCIE_WIN5_CTRL_OFF);
+       mvebu_writel(port, 0, PCIE_WIN5_BASE_OFF);
+       mvebu_writel(port, 0, PCIE_WIN5_REMAP_OFF);
 
        /* Setup windows for DDR banks.  Count total DDR size on the fly. */
        size = 0;
        for (i = 0; i < dram->num_cs; i++) {
                const struct mbus_dram_window *cs = dram->cs + i;
 
-               writel(cs->base & 0xffff0000,
-                      port->base + PCIE_WIN04_BASE_OFF(i));
-               writel(0, port->base + PCIE_WIN04_REMAP_OFF(i));
-               writel(((cs->size - 1) & 0xffff0000) |
-                       (cs->mbus_attr << 8) |
-                       (dram->mbus_dram_target_id << 4) | 1,
-                      port->base + PCIE_WIN04_CTRL_OFF(i));
+               mvebu_writel(port, cs->base & 0xffff0000,
+                            PCIE_WIN04_BASE_OFF(i));
+               mvebu_writel(port, 0, PCIE_WIN04_REMAP_OFF(i));
+               mvebu_writel(port,
+                            ((cs->size - 1) & 0xffff0000) |
+                            (cs->mbus_attr << 8) |
+                            (dram->mbus_dram_target_id << 4) | 1,
+                            PCIE_WIN04_CTRL_OFF(i));
 
                size += cs->size;
        }
@@ -209,41 +227,40 @@ static void __init mvebu_pcie_setup_wins(struct mvebu_pcie_port *port)
                size = 1 << fls(size);
 
        /* Setup BAR[1] to all DRAM banks. */
-       writel(dram->cs[0].base, port->base + PCIE_BAR_LO_OFF(1));
-       writel(0, port->base + PCIE_BAR_HI_OFF(1));
-       writel(((size - 1) & 0xffff0000) | 1,
-              port->base + PCIE_BAR_CTRL_OFF(1));
+       mvebu_writel(port, dram->cs[0].base, PCIE_BAR_LO_OFF(1));
+       mvebu_writel(port, 0, PCIE_BAR_HI_OFF(1));
+       mvebu_writel(port, ((size - 1) & 0xffff0000) | 1,
+                    PCIE_BAR_CTRL_OFF(1));
 }
 
-static void __init mvebu_pcie_setup_hw(struct mvebu_pcie_port *port)
+static void mvebu_pcie_setup_hw(struct mvebu_pcie_port *port)
 {
-       u16 cmd;
-       u32 mask;
+       u32 cmd, mask;
 
        /* Point PCIe unit MBUS decode windows to DRAM space. */
        mvebu_pcie_setup_wins(port);
 
        /* Master + slave enable. */
-       cmd = readw(port->base + PCIE_CMD_OFF);
+       cmd = mvebu_readl(port, PCIE_CMD_OFF);
        cmd |= PCI_COMMAND_IO;
        cmd |= PCI_COMMAND_MEMORY;
        cmd |= PCI_COMMAND_MASTER;
-       writew(cmd, port->base + PCIE_CMD_OFF);
+       mvebu_writel(port, cmd, PCIE_CMD_OFF);
 
        /* Enable interrupt lines A-D. */
-       mask = readl(port->base + PCIE_MASK_OFF);
+       mask = mvebu_readl(port, PCIE_MASK_OFF);
        mask |= PCIE_MASK_ENABLE_INTS;
-       writel(mask, port->base + PCIE_MASK_OFF);
+       mvebu_writel(port, mask, PCIE_MASK_OFF);
 }
 
 static int mvebu_pcie_hw_rd_conf(struct mvebu_pcie_port *port,
                                 struct pci_bus *bus,
                                 u32 devfn, int where, int size, u32 *val)
 {
-       writel(PCIE_CONF_ADDR(bus->number, devfn, where),
-              port->base + PCIE_CONF_ADDR_OFF);
+       mvebu_writel(port, PCIE_CONF_ADDR(bus->number, devfn, where),
+                    PCIE_CONF_ADDR_OFF);
 
-       *val = readl(port->base + PCIE_CONF_DATA_OFF);
+       *val = mvebu_readl(port, PCIE_CONF_DATA_OFF);
 
        if (size == 1)
                *val = (*val >> (8 * (where & 3))) & 0xff;
@@ -257,21 +274,24 @@ static int mvebu_pcie_hw_wr_conf(struct mvebu_pcie_port *port,
                                 struct pci_bus *bus,
                                 u32 devfn, int where, int size, u32 val)
 {
-       int ret = PCIBIOS_SUCCESSFUL;
+       u32 _val, shift = 8 * (where & 3);
 
-       writel(PCIE_CONF_ADDR(bus->number, devfn, where),
-              port->base + PCIE_CONF_ADDR_OFF);
+       mvebu_writel(port, PCIE_CONF_ADDR(bus->number, devfn, where),
+                    PCIE_CONF_ADDR_OFF);
+       _val = mvebu_readl(port, PCIE_CONF_DATA_OFF);
 
        if (size == 4)
-               writel(val, port->base + PCIE_CONF_DATA_OFF);
+               _val = val;
        else if (size == 2)
-               writew(val, port->base + PCIE_CONF_DATA_OFF + (where & 3));
+               _val = (_val & ~(0xffff << shift)) | ((val & 0xffff) << shift);
        else if (size == 1)
-               writeb(val, port->base + PCIE_CONF_DATA_OFF + (where & 3));
+               _val = (_val & ~(0xff << shift)) | ((val & 0xff) << shift);
        else
-               ret = PCIBIOS_BAD_REGISTER_NUMBER;
+               return PCIBIOS_BAD_REGISTER_NUMBER;
 
-       return ret;
+       mvebu_writel(port, _val, PCIE_CONF_DATA_OFF);
+
+       return PCIBIOS_SUCCESSFUL;
 }
 
 static void mvebu_pcie_handle_iobase_change(struct mvebu_pcie_port *port)
@@ -552,7 +572,7 @@ static int mvebu_pcie_wr_conf(struct pci_bus *bus, u32 devfn,
        if (bus->number == 0)
                return mvebu_sw_pci_bridge_write(port, where, size, val);
 
-       if (!port->haslink)
+       if (!mvebu_pcie_link_up(port))
                return PCIBIOS_DEVICE_NOT_FOUND;
 
        /*
@@ -594,7 +614,7 @@ static int mvebu_pcie_rd_conf(struct pci_bus *bus, u32 devfn, int where,
        if (bus->number == 0)
                return mvebu_sw_pci_bridge_read(port, where, size, val);
 
-       if (!port->haslink) {
+       if (!mvebu_pcie_link_up(port)) {
                *val = 0xffffffff;
                return PCIBIOS_DEVICE_NOT_FOUND;
        }
@@ -626,7 +646,7 @@ static struct pci_ops mvebu_pcie_ops = {
        .write = mvebu_pcie_wr_conf,
 };
 
-static int __init mvebu_pcie_setup(int nr, struct pci_sys_data *sys)
+static int mvebu_pcie_setup(int nr, struct pci_sys_data *sys)
 {
        struct mvebu_pcie *pcie = sys_to_pcie(sys);
        int i;
@@ -645,7 +665,7 @@ static int __init mvebu_pcie_setup(int nr, struct pci_sys_data *sys)
        return 1;
 }
 
-static int __init mvebu_pcie_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
+static int mvebu_pcie_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
 {
        struct of_irq oirq;
        int ret;
@@ -673,11 +693,17 @@ static struct pci_bus *mvebu_pcie_scan_bus(int nr, struct pci_sys_data *sys)
        return bus;
 }
 
-resource_size_t mvebu_pcie_align_resource(struct pci_dev *dev,
-                                         const struct resource *res,
-                                         resource_size_t start,
-                                         resource_size_t size,
-                                         resource_size_t align)
+static void mvebu_pcie_add_bus(struct pci_bus *bus)
+{
+       struct mvebu_pcie *pcie = sys_to_pcie(bus->sysdata);
+       bus->msi = pcie->msi;
+}
+
+static resource_size_t mvebu_pcie_align_resource(struct pci_dev *dev,
+                                               const struct resource *res,
+                                               resource_size_t start,
+                                               resource_size_t size,
+                                               resource_size_t align)
 {
        if (dev->bus->number != 0)
                return start;
@@ -696,7 +722,7 @@ resource_size_t mvebu_pcie_align_resource(struct pci_dev *dev,
                return start;
 }
 
-static void __init mvebu_pcie_enable(struct mvebu_pcie *pcie)
+static void mvebu_pcie_enable(struct mvebu_pcie *pcie)
 {
        struct hw_pci hw;
 
@@ -709,6 +735,7 @@ static void __init mvebu_pcie_enable(struct mvebu_pcie *pcie)
        hw.map_irq        = mvebu_pcie_map_irq;
        hw.ops            = &mvebu_pcie_ops;
        hw.align_resource = mvebu_pcie_align_resource;
+       hw.add_bus        = mvebu_pcie_add_bus;
 
        pci_common_init(&hw);
 }
@@ -718,10 +745,8 @@ static void __init mvebu_pcie_enable(struct mvebu_pcie *pcie)
  * <...> property for one that matches the given port/lane. Once
  * found, maps it.
  */
-static void __iomem * __init
-mvebu_pcie_map_registers(struct platform_device *pdev,
-                        struct device_node *np,
-                        struct mvebu_pcie_port *port)
+static void __iomem *mvebu_pcie_map_registers(struct platform_device *pdev,
+                     struct device_node *np, struct mvebu_pcie_port *port)
 {
        struct resource regs;
        int ret = 0;
@@ -777,7 +802,22 @@ static int mvebu_get_tgt_attr(struct device_node *np, int devfn,
        return -ENOENT;
 }
 
-static int __init mvebu_pcie_probe(struct platform_device *pdev)
+static void mvebu_pcie_msi_enable(struct mvebu_pcie *pcie)
+{
+       struct device_node *msi_node;
+
+       msi_node = of_parse_phandle(pcie->pdev->dev.of_node,
+                                   "msi-parent", 0);
+       if (!msi_node)
+               return;
+
+       pcie->msi = of_pci_find_msi_chip_by_node(msi_node);
+
+       if (pcie->msi)
+               pcie->msi->dev = &pcie->pdev->dev;
+}
+
+static int mvebu_pcie_probe(struct platform_device *pdev)
 {
        struct mvebu_pcie *pcie;
        struct device_node *np = pdev->dev.of_node;
@@ -790,6 +830,7 @@ static int __init mvebu_pcie_probe(struct platform_device *pdev)
                return -ENOMEM;
 
        pcie->pdev = pdev;
+       platform_set_drvdata(pdev, pcie);
 
        /* Get the PCIe memory and I/O aperture */
        mvebu_mbus_get_pcie_mem_aperture(&pcie->mem);
@@ -818,13 +859,14 @@ static int __init mvebu_pcie_probe(struct platform_device *pdev)
                return ret;
        }
 
+       i = 0;
        for_each_child_of_node(pdev->dev.of_node, child) {
                if (!of_device_is_available(child))
                        continue;
-               pcie->nports++;
+               i++;
        }
 
-       pcie->ports = devm_kzalloc(&pdev->dev, pcie->nports *
+       pcie->ports = devm_kzalloc(&pdev->dev, i *
                                   sizeof(struct mvebu_pcie_port),
                                   GFP_KERNEL);
        if (!pcie->ports)
@@ -833,6 +875,7 @@ static int __init mvebu_pcie_probe(struct platform_device *pdev)
        i = 0;
        for_each_child_of_node(pdev->dev.of_node, child) {
                struct mvebu_pcie_port *port = &pcie->ports[i];
+               enum of_gpio_flags flags;
 
                if (!of_device_is_available(child))
                        continue;
@@ -873,45 +916,68 @@ static int __init mvebu_pcie_probe(struct platform_device *pdev)
                        continue;
                }
 
+               port->reset_gpio = of_get_named_gpio_flags(child,
+                                                  "reset-gpios", 0, &flags);
+               if (gpio_is_valid(port->reset_gpio)) {
+                       u32 reset_udelay = 20000;
+
+                       port->reset_active_low = flags & OF_GPIO_ACTIVE_LOW;
+                       port->reset_name = kasprintf(GFP_KERNEL,
+                                    "pcie%d.%d-reset", port->port, port->lane);
+                       of_property_read_u32(child, "reset-delay-us",
+                                            &reset_udelay);
+
+                       ret = devm_gpio_request_one(&pdev->dev,
+                           port->reset_gpio, GPIOF_DIR_OUT, port->reset_name);
+                       if (ret) {
+                               if (ret == -EPROBE_DEFER)
+                                       return ret;
+                               continue;
+                       }
+
+                       gpio_set_value(port->reset_gpio,
+                                      (port->reset_active_low) ? 1 : 0);
+                       msleep(reset_udelay/1000);
+               }
+
+               port->clk = of_clk_get_by_name(child, NULL);
+               if (IS_ERR(port->clk)) {
+                       dev_err(&pdev->dev, "PCIe%d.%d: cannot get clock\n",
+                              port->port, port->lane);
+                       continue;
+               }
+
+               ret = clk_prepare_enable(port->clk);
+               if (ret)
+                       continue;
+
                port->base = mvebu_pcie_map_registers(pdev, child, port);
                if (IS_ERR(port->base)) {
                        dev_err(&pdev->dev, "PCIe%d.%d: cannot map registers\n",
                                port->port, port->lane);
                        port->base = NULL;
+                       clk_disable_unprepare(port->clk);
                        continue;
                }
 
                mvebu_pcie_set_local_dev_nr(port, 1);
 
-               if (mvebu_pcie_link_up(port)) {
-                       port->haslink = 1;
-                       dev_info(&pdev->dev, "PCIe%d.%d: link up\n",
-                                port->port, port->lane);
-               } else {
-                       port->haslink = 0;
-                       dev_info(&pdev->dev, "PCIe%d.%d: link down\n",
-                                port->port, port->lane);
-               }
-
                port->clk = of_clk_get_by_name(child, NULL);
                if (IS_ERR(port->clk)) {
                        dev_err(&pdev->dev, "PCIe%d.%d: cannot get clock\n",
                               port->port, port->lane);
                        iounmap(port->base);
-                       port->haslink = 0;
                        continue;
                }
 
                port->dn = child;
-
-               clk_prepare_enable(port->clk);
                spin_lock_init(&port->conf_lock);
-
                mvebu_sw_pci_bridge_init(port);
-
                i++;
        }
 
+       pcie->nports = i;
+       mvebu_pcie_msi_enable(pcie);
        mvebu_pcie_enable(pcie);
 
        return 0;
@@ -920,6 +986,7 @@ static int __init mvebu_pcie_probe(struct platform_device *pdev)
 static const struct of_device_id mvebu_pcie_of_match_table[] = {
        { .compatible = "marvell,armada-xp-pcie", },
        { .compatible = "marvell,armada-370-pcie", },
+       { .compatible = "marvell,dove-pcie", },
        { .compatible = "marvell,kirkwood-pcie", },
        {},
 };
@@ -931,16 +998,12 @@ static struct platform_driver mvebu_pcie_driver = {
                .name = "mvebu-pcie",
                .of_match_table =
                   of_match_ptr(mvebu_pcie_of_match_table),
+               /* driver unloading/unbinding currently not supported */
+               .suppress_bind_attrs = true,
        },
+       .probe = mvebu_pcie_probe,
 };
-
-static int __init mvebu_pcie_init(void)
-{
-       return platform_driver_probe(&mvebu_pcie_driver,
-                                    mvebu_pcie_probe);
-}
-
-subsys_initcall(mvebu_pcie_init);
+module_platform_driver(mvebu_pcie_driver);
 
 MODULE_AUTHOR("Thomas Petazzoni <thomas.petazzoni@free-electrons.com>");
 MODULE_DESCRIPTION("Marvell EBU PCIe driver");
index a82ace4d9a20975ee7ddc44fd7632191316c3eb9..0846922b2316d0774e4f154aee45256c6019a41a 100644 (file)
 #include <linux/slab.h>
 #include <linux/err.h>
 #include <linux/list.h>
+#include <linux/interrupt.h>
+
+#include <linux/irqchip/chained_irq.h>
 
 #include <linux/of.h>
 #include <linux/of_device.h>
 #include <linux/of_address.h>
+#include <linux/of_irq.h>
 
 #include <linux/pinctrl/pinctrl.h>
 #include <linux/pinctrl/pinmux.h>
 #include <linux/pinctrl/pinconf-generic.h>
 
+#include <linux/platform_data/pinctrl-single.h>
+
 #include "core.h"
 #include "pinconf.h"
 
@@ -149,6 +155,22 @@ struct pcs_name {
        char name[PCS_REG_NAME_LEN];
 };
 
+/**
+ * struct pcs_soc_data - SoC specific settings
+ * @flags:     initial SoC specific PCS_FEAT_xxx values
+ * @irq:       optional interrupt for the controller
+ * @irq_enable_mask:   optional SoC specific interrupt enable mask
+ * @irq_status_mask:   optional SoC specific interrupt status mask
+ * @rearm:     optional SoC specific wake-up rearm function
+ */
+struct pcs_soc_data {
+       unsigned flags;
+       int irq;
+       unsigned irq_enable_mask;
+       unsigned irq_status_mask;
+       void (*rearm)(void);
+};
+
 /**
  * struct pcs_device - pinctrl device instance
  * @res:       resources
@@ -156,13 +178,14 @@ struct pcs_name {
  * @size:      size of the ioremapped area
  * @dev:       device entry
  * @pctl:      pin controller device
+ * @flags:     mask of PCS_FEAT_xxx values
+ * @lock:      spinlock for register access
  * @mutex:     mutex protecting the lists
  * @width:     bits per mux register
  * @fmask:     function register mask
  * @fshift:    function register shift
  * @foff:      value to turn mux off
  * @fmax:      max number of functions in fmask
- * @is_pinconf:        whether supports pinconf
  * @bits_per_pin:number of bits per pin
  * @names:     array of register names for pins
  * @pins:      physical pins on the SoC
@@ -171,6 +194,9 @@ struct pcs_name {
  * @pingroups: list of pingroups
  * @functions: list of functions
  * @gpiofuncs: list of gpio functions
+ * @irqs:      list of interrupt registers
+ * @chip:      chip container for this instance
+ * @domain:    IRQ domain for this instance
  * @ngroups:   number of pingroups
  * @nfuncs:    number of functions
  * @desc:      pin controller descriptor
@@ -183,6 +209,12 @@ struct pcs_device {
        unsigned size;
        struct device *dev;
        struct pinctrl_dev *pctl;
+       unsigned flags;
+#define PCS_QUIRK_SHARED_IRQ   (1 << 2)
+#define PCS_FEAT_IRQ           (1 << 1)
+#define PCS_FEAT_PINCONF       (1 << 0)
+       struct pcs_soc_data socdata;
+       raw_spinlock_t lock;
        struct mutex mutex;
        unsigned width;
        unsigned fmask;
@@ -190,7 +222,6 @@ struct pcs_device {
        unsigned foff;
        unsigned fmax;
        bool bits_per_mux;
-       bool is_pinconf;
        unsigned bits_per_pin;
        struct pcs_name *names;
        struct pcs_data pins;
@@ -199,6 +230,9 @@ struct pcs_device {
        struct list_head pingroups;
        struct list_head functions;
        struct list_head gpiofuncs;
+       struct list_head irqs;
+       struct irq_chip chip;
+       struct irq_domain *domain;
        unsigned ngroups;
        unsigned nfuncs;
        struct pinctrl_desc desc;
@@ -206,6 +240,10 @@ struct pcs_device {
        void (*write)(unsigned val, void __iomem *reg);
 };
 
+#define PCS_QUIRK_HAS_SHARED_IRQ       (pcs->flags & PCS_QUIRK_SHARED_IRQ)
+#define PCS_HAS_IRQ            (pcs->flags & PCS_FEAT_IRQ)
+#define PCS_HAS_PINCONF                (pcs->flags & PCS_FEAT_PINCONF)
+
 static int pcs_pinconf_get(struct pinctrl_dev *pctldev, unsigned pin,
                           unsigned long *config);
 static int pcs_pinconf_set(struct pinctrl_dev *pctldev, unsigned pin,
@@ -429,9 +467,11 @@ static int pcs_enable(struct pinctrl_dev *pctldev, unsigned fselector,
 
        for (i = 0; i < func->nvals; i++) {
                struct pcs_func_vals *vals;
+               unsigned long flags;
                unsigned val, mask;
 
                vals = &func->vals[i];
+               raw_spin_lock_irqsave(&pcs->lock, flags);
                val = pcs->read(vals->reg);
 
                if (pcs->bits_per_mux)
@@ -442,6 +482,7 @@ static int pcs_enable(struct pinctrl_dev *pctldev, unsigned fselector,
                val &= ~mask;
                val |= (vals->val & mask);
                pcs->write(val, vals->reg);
+               raw_spin_unlock_irqrestore(&pcs->lock, flags);
        }
 
        return 0;
@@ -483,13 +524,16 @@ static void pcs_disable(struct pinctrl_dev *pctldev, unsigned fselector,
 
        for (i = 0; i < func->nvals; i++) {
                struct pcs_func_vals *vals;
+               unsigned long flags;
                unsigned val;
 
                vals = &func->vals[i];
+               raw_spin_lock_irqsave(&pcs->lock, flags);
                val = pcs->read(vals->reg);
                val &= ~pcs->fmask;
                val |= pcs->foff << pcs->fshift;
                pcs->write(val, vals->reg);
+               raw_spin_unlock_irqrestore(&pcs->lock, flags);
        }
 }
 
@@ -1060,7 +1104,7 @@ static int pcs_parse_pinconf(struct pcs_device *pcs, struct device_node *np,
        };
 
        /* If pinconf isn't supported, don't parse properties in below. */
-       if (!pcs->is_pinconf)
+       if (!PCS_HAS_PINCONF)
                return 0;
 
        /* cacluate how much properties are supported in current node */
@@ -1184,7 +1228,7 @@ static int pcs_parse_one_pinctrl_entry(struct pcs_device *pcs,
        (*map)->data.mux.group = np->name;
        (*map)->data.mux.function = np->name;
 
-       if (pcs->is_pinconf) {
+       if (PCS_HAS_PINCONF) {
                res = pcs_parse_pinconf(pcs, np, function, map);
                if (res)
                        goto free_pingroups;
@@ -1305,7 +1349,7 @@ static int pcs_parse_bits_in_pinctrl_entry(struct pcs_device *pcs,
        (*map)->data.mux.group = np->name;
        (*map)->data.mux.function = np->name;
 
-       if (pcs->is_pinconf) {
+       if (PCS_HAS_PINCONF) {
                dev_err(pcs->dev, "pinconf not supported\n");
                goto free_pingroups;
        }
@@ -1439,12 +1483,34 @@ static void pcs_free_pingroups(struct pcs_device *pcs)
        mutex_unlock(&pcs->mutex);
 }
 
+/**
+ * pcs_irq_free() - free interrupt
+ * @pcs: pcs driver instance
+ */
+static void pcs_irq_free(struct pcs_device *pcs)
+{
+       struct pcs_soc_data *pcs_soc = &pcs->socdata;
+
+       if (pcs_soc->irq < 0)
+               return;
+
+       if (pcs->domain)
+               irq_domain_remove(pcs->domain);
+
+       if (PCS_QUIRK_HAS_SHARED_IRQ)
+               free_irq(pcs_soc->irq, pcs_soc);
+       else
+               irq_set_chained_handler(pcs_soc->irq, NULL);
+}
+
 /**
  * pcs_free_resources() - free memory used by this driver
  * @pcs: pcs driver instance
  */
 static void pcs_free_resources(struct pcs_device *pcs)
 {
+       pcs_irq_free(pcs);
+
        if (pcs->pctl)
                pinctrl_unregister(pcs->pctl);
 
@@ -1493,6 +1559,268 @@ static int pcs_add_gpio_func(struct device_node *node, struct pcs_device *pcs)
        }
        return ret;
 }
+/**
+ * @reg:       virtual address of interrupt register
+ * @hwirq:     hardware irq number
+ * @irq:       virtual irq number
+ * @node:      list node
+ */
+struct pcs_interrupt {
+       void __iomem *reg;
+       irq_hw_number_t hwirq;
+       unsigned int irq;
+       struct list_head node;
+};
+
+/**
+ * pcs_irq_set() - enables or disables an interrupt
+ *
+ * Note that this currently assumes one interrupt per pinctrl
+ * register that is typically used for wake-up events.
+ */
+static inline void pcs_irq_set(struct pcs_soc_data *pcs_soc,
+                              int irq, const bool enable)
+{
+       struct pcs_device *pcs;
+       struct list_head *pos;
+       unsigned mask;
+
+       pcs = container_of(pcs_soc, struct pcs_device, socdata);
+       list_for_each(pos, &pcs->irqs) {
+               struct pcs_interrupt *pcswi;
+               unsigned soc_mask;
+
+               pcswi = list_entry(pos, struct pcs_interrupt, node);
+               if (irq != pcswi->irq)
+                       continue;
+
+               soc_mask = pcs_soc->irq_enable_mask;
+               raw_spin_lock(&pcs->lock);
+               mask = pcs->read(pcswi->reg);
+               if (enable)
+                       mask |= soc_mask;
+               else
+                       mask &= ~soc_mask;
+               pcs->write(mask, pcswi->reg);
+               raw_spin_unlock(&pcs->lock);
+       }
+}
+
+/**
+ * pcs_irq_mask() - mask pinctrl interrupt
+ * @d: interrupt data
+ */
+static void pcs_irq_mask(struct irq_data *d)
+{
+       struct pcs_soc_data *pcs_soc = irq_data_get_irq_chip_data(d);
+
+       pcs_irq_set(pcs_soc, d->irq, false);
+}
+
+/**
+ * pcs_irq_unmask() - unmask pinctrl interrupt
+ * @d: interrupt data
+ */
+static void pcs_irq_unmask(struct irq_data *d)
+{
+       struct pcs_soc_data *pcs_soc = irq_data_get_irq_chip_data(d);
+
+       pcs_irq_set(pcs_soc, d->irq, true);
+       if (pcs_soc->rearm)
+               pcs_soc->rearm();
+}
+
+/**
+ * pcs_irq_set_wake() - toggle the suspend and resume wake up
+ * @d: interrupt data
+ * @state: wake-up state
+ *
+ * Note that this should be called only for suspend and resume.
+ * For runtime PM, the wake-up events should be enabled by default.
+ */
+static int pcs_irq_set_wake(struct irq_data *d, unsigned int state)
+{
+       if (state)
+               pcs_irq_unmask(d);
+       else
+               pcs_irq_mask(d);
+
+       return 0;
+}
+
+/**
+ * pcs_irq_handle() - common interrupt handler
+ * @pcs_irq: interrupt data
+ *
+ * Note that this currently assumes we have one interrupt bit per
+ * mux register. This interrupt is typically used for wake-up events.
+ * For more complex interrupts different handlers can be specified.
+ */
+static int pcs_irq_handle(struct pcs_soc_data *pcs_soc)
+{
+       struct pcs_device *pcs;
+       struct list_head *pos;
+       int count = 0;
+
+       pcs = container_of(pcs_soc, struct pcs_device, socdata);
+       list_for_each(pos, &pcs->irqs) {
+               struct pcs_interrupt *pcswi;
+               unsigned mask;
+
+               pcswi = list_entry(pos, struct pcs_interrupt, node);
+               raw_spin_lock(&pcs->lock);
+               mask = pcs->read(pcswi->reg);
+               raw_spin_unlock(&pcs->lock);
+               if (mask & pcs_soc->irq_status_mask) {
+                       generic_handle_irq(irq_find_mapping(pcs->domain,
+                                                           pcswi->hwirq));
+                       count++;
+               }
+       }
+
+       /*
+        * For debugging on omaps, you may want to call pcs_soc->rearm()
+        * here to see wake-up interrupts during runtime also.
+        */
+
+       return count;
+}
+
+/**
+ * pcs_irq_handler() - handler for the shared interrupt case
+ * @irq: interrupt
+ * @d: data
+ *
+ * Use this for cases where multiple instances of
+ * pinctrl-single share a single interrupt like on omaps.
+ */
+static irqreturn_t pcs_irq_handler(int irq, void *d)
+{
+       struct pcs_soc_data *pcs_soc = d;
+
+       return pcs_irq_handle(pcs_soc) ? IRQ_HANDLED : IRQ_NONE;
+}
+
+/**
+ * pcs_irq_handle() - handler for the dedicated chained interrupt case
+ * @irq: interrupt
+ * @desc: interrupt descriptor
+ *
+ * Use this if you have a separate interrupt for each
+ * pinctrl-single instance.
+ */
+static void pcs_irq_chain_handler(unsigned int irq, struct irq_desc *desc)
+{
+       struct pcs_soc_data *pcs_soc = irq_desc_get_handler_data(desc);
+       struct irq_chip *chip;
+       int res;
+
+       chip = irq_get_chip(irq);
+       chained_irq_enter(chip, desc);
+       res = pcs_irq_handle(pcs_soc);
+       /* REVISIT: export and add handle_bad_irq(irq, desc)? */
+       chained_irq_exit(chip, desc);
+
+       return;
+}
+
+static int pcs_irqdomain_map(struct irq_domain *d, unsigned int irq,
+                            irq_hw_number_t hwirq)
+{
+       struct pcs_soc_data *pcs_soc = d->host_data;
+       struct pcs_device *pcs;
+       struct pcs_interrupt *pcswi;
+
+       pcs = container_of(pcs_soc, struct pcs_device, socdata);
+       pcswi = devm_kzalloc(pcs->dev, sizeof(*pcswi), GFP_KERNEL);
+       if (!pcswi)
+               return -ENOMEM;
+
+       pcswi->reg = pcs->base + hwirq;
+       pcswi->hwirq = hwirq;
+       pcswi->irq = irq;
+
+       mutex_lock(&pcs->mutex);
+       list_add_tail(&pcswi->node, &pcs->irqs);
+       mutex_unlock(&pcs->mutex);
+
+       irq_set_chip_data(irq, pcs_soc);
+       irq_set_chip_and_handler(irq, &pcs->chip,
+                                handle_level_irq);
+
+#ifdef CONFIG_ARM
+       set_irq_flags(irq, IRQF_VALID);
+#else
+       irq_set_noprobe(irq);
+#endif
+
+       return 0;
+}
+
+static struct irq_domain_ops pcs_irqdomain_ops = {
+       .map = pcs_irqdomain_map,
+       .xlate = irq_domain_xlate_onecell,
+};
+
+/**
+ * pcs_irq_init_chained_handler() - set up a chained interrupt handler
+ * @pcs: pcs driver instance
+ * @np: device node pointer
+ */
+static int pcs_irq_init_chained_handler(struct pcs_device *pcs,
+                                       struct device_node *np)
+{
+       struct pcs_soc_data *pcs_soc = &pcs->socdata;
+       const char *name = "pinctrl";
+       int num_irqs;
+
+       if (!pcs_soc->irq_enable_mask ||
+           !pcs_soc->irq_status_mask) {
+               pcs_soc->irq = -1;
+               return -EINVAL;
+       }
+
+       INIT_LIST_HEAD(&pcs->irqs);
+       pcs->chip.name = name;
+       pcs->chip.irq_ack = pcs_irq_mask;
+       pcs->chip.irq_mask = pcs_irq_mask;
+       pcs->chip.irq_unmask = pcs_irq_unmask;
+       pcs->chip.irq_set_wake = pcs_irq_set_wake;
+
+       if (PCS_QUIRK_HAS_SHARED_IRQ) {
+               int res;
+
+               res = request_irq(pcs_soc->irq, pcs_irq_handler,
+                                 IRQF_SHARED | IRQF_NO_SUSPEND,
+                                 name, pcs_soc);
+               if (res) {
+                       pcs_soc->irq = -1;
+                       return res;
+               }
+       } else {
+               irq_set_handler_data(pcs_soc->irq, pcs_soc);
+               irq_set_chained_handler(pcs_soc->irq,
+                                       pcs_irq_chain_handler);
+       }
+
+       /*
+        * We can use the register offset as the hardirq
+        * number as irq_domain_add_simple maps them lazily.
+        * This way we can easily support more than one
+        * interrupt per function if needed.
+        */
+       num_irqs = pcs->size;
+
+       pcs->domain = irq_domain_add_simple(np, num_irqs, 0,
+                                           &pcs_irqdomain_ops,
+                                           pcs_soc);
+       if (!pcs->domain) {
+               irq_set_chained_handler(pcs_soc->irq, NULL);
+               return -EINVAL;
+       }
+
+       return 0;
+}
 
 #ifdef CONFIG_PM
 static int pinctrl_single_suspend(struct platform_device *pdev,
@@ -1523,8 +1851,10 @@ static int pcs_probe(struct platform_device *pdev)
 {
        struct device_node *np = pdev->dev.of_node;
        const struct of_device_id *match;
+       struct pcs_pdata *pdata;
        struct resource *res;
        struct pcs_device *pcs;
+       const struct pcs_soc_data *soc;
        int ret;
 
        match = of_match_device(pcs_of_match, &pdev->dev);
@@ -1537,11 +1867,14 @@ static int pcs_probe(struct platform_device *pdev)
                return -ENOMEM;
        }
        pcs->dev = &pdev->dev;
+       raw_spin_lock_init(&pcs->lock);
        mutex_init(&pcs->mutex);
        INIT_LIST_HEAD(&pcs->pingroups);
        INIT_LIST_HEAD(&pcs->functions);
        INIT_LIST_HEAD(&pcs->gpiofuncs);
-       pcs->is_pinconf = match->data;
+       soc = match->data;
+       pcs->flags = soc->flags;
+       memcpy(&pcs->socdata, soc, sizeof(*soc));
 
        PCS_GET_PROP_U32("pinctrl-single,register-width", &pcs->width,
                         "register width not specified\n");
@@ -1610,7 +1943,7 @@ static int pcs_probe(struct platform_device *pdev)
        pcs->desc.name = DRIVER_NAME;
        pcs->desc.pctlops = &pcs_pinctrl_ops;
        pcs->desc.pmxops = &pcs_pinmux_ops;
-       if (pcs->is_pinconf)
+       if (PCS_HAS_PINCONF)
                pcs->desc.confops = &pcs_pinconf_ops;
        pcs->desc.owner = THIS_MODULE;
 
@@ -1629,6 +1962,27 @@ static int pcs_probe(struct platform_device *pdev)
        if (ret < 0)
                goto free;
 
+       pcs->socdata.irq = irq_of_parse_and_map(np, 0);
+       if (pcs->socdata.irq)
+               pcs->flags |= PCS_FEAT_IRQ;
+
+       /* We still need auxdata for some omaps for PRM interrupts */
+       pdata = dev_get_platdata(&pdev->dev);
+       if (pdata) {
+               if (pdata->rearm)
+                       pcs->socdata.rearm = pdata->rearm;
+               if (pdata->irq) {
+                       pcs->socdata.irq = pdata->irq;
+                       pcs->flags |= PCS_FEAT_IRQ;
+               }
+       }
+
+       if (PCS_HAS_IRQ) {
+               ret = pcs_irq_init_chained_handler(pcs, np);
+               if (ret < 0)
+                       dev_warn(pcs->dev, "initialized with no interrupts\n");
+       }
+
        dev_info(pcs->dev, "%i pins at pa %p size %u\n",
                 pcs->desc.npins, pcs->base, pcs->size);
 
@@ -1652,9 +2006,25 @@ static int pcs_remove(struct platform_device *pdev)
        return 0;
 }
 
+static const struct pcs_soc_data pinctrl_single_omap_wkup = {
+       .flags = PCS_QUIRK_SHARED_IRQ,
+       .irq_enable_mask = (1 << 14),   /* OMAP_WAKEUP_EN */
+       .irq_status_mask = (1 << 15),   /* OMAP_WAKEUP_EVENT */
+};
+
+static const struct pcs_soc_data pinctrl_single = {
+};
+
+static const struct pcs_soc_data pinconf_single = {
+       .flags = PCS_FEAT_PINCONF,
+};
+
 static struct of_device_id pcs_of_match[] = {
-       { .compatible = "pinctrl-single", .data = (void *)false },
-       { .compatible = "pinconf-single", .data = (void *)true },
+       { .compatible = "ti,omap3-padconf", .data = &pinctrl_single_omap_wkup },
+       { .compatible = "ti,omap4-padconf", .data = &pinctrl_single_omap_wkup },
+       { .compatible = "ti,omap5-padconf", .data = &pinctrl_single_omap_wkup },
+       { .compatible = "pinctrl-single", .data = &pinctrl_single },
+       { .compatible = "pinconf-single", .data = &pinconf_single },
        { },
 };
 MODULE_DEVICE_TABLE(of, pcs_of_match);
index be3429e08d909a58b3b2d3fb9923ca592d4eabc4..f90101b9cdb98a7b68053281a39e5b4796e56f60 100644 (file)
@@ -64,10 +64,10 @@ static void s3c2410_start_hc(struct platform_device *dev, struct usb_hcd *hcd)
 
        dev_dbg(&dev->dev, "s3c2410_start_hc:\n");
 
-       clk_enable(usb_clk);
+       clk_prepare_enable(usb_clk);
        mdelay(2);                      /* let the bus clock stabilise */
 
-       clk_enable(clk);
+       clk_prepare_enable(clk);
 
        if (info != NULL) {
                info->hcd       = hcd;
@@ -92,8 +92,8 @@ static void s3c2410_stop_hc(struct platform_device *dev)
                        (info->enable_oc)(info, 0);
        }
 
-       clk_disable(clk);
-       clk_disable(usb_clk);
+       clk_disable_unprepare(clk);
+       clk_disable_unprepare(usb_clk);
 }
 
 /* ohci_s3c2410_hub_status_data
index f483d1924c282883b6e679d419885884959c33c9..122446bf166403fc08523eb6ba7161a17b1a8082 100644 (file)
@@ -259,7 +259,7 @@ static int ux500_probe(struct platform_device *pdev)
                goto err1;
        }
 
-       clk = clk_get(&pdev->dev, "usb");
+       clk = clk_get(&pdev->dev, NULL);
        if (IS_ERR(clk)) {
                dev_err(&pdev->dev, "failed to get clock\n");
                ret = PTR_ERR(clk);
index c824b4223b8302f9e98311fa4584d5f7fcf49a4a..b0a950f369703ff4ca002aabdecc55f638ea6189 100644 (file)
@@ -1641,67 +1641,6 @@ static void cyberpro_common_resume(struct cfb_info *cfb)
        cyber2000fb_set_par(&cfb->fb);
 }
 
-#ifdef CONFIG_ARCH_SHARK
-
-#include <mach/framebuffer.h>
-
-static int cyberpro_vl_probe(void)
-{
-       struct cfb_info *cfb;
-       int err = -ENOMEM;
-
-       if (!request_mem_region(FB_START, FB_SIZE, "CyberPro2010"))
-               return err;
-
-       cfb = cyberpro_alloc_fb_info(ID_CYBERPRO_2010, "CyberPro2010");
-       if (!cfb)
-               goto failed_release;
-
-       cfb->irq = -1;
-       cfb->region = ioremap(FB_START, FB_SIZE);
-       if (!cfb->region)
-               goto failed_ioremap;
-
-       cfb->regs = cfb->region + MMIO_OFFSET;
-       cfb->fb.device = NULL;
-       cfb->fb.fix.mmio_start = FB_START + MMIO_OFFSET;
-       cfb->fb.fix.smem_start = FB_START;
-
-       /*
-        * Bring up the hardware.  This is expected to enable access
-        * to the linear memory region, and allow access to the memory
-        * mapped registers.  Also, mem_ctl1 and mem_ctl2 must be
-        * initialised.
-        */
-       cyber2000fb_writeb(0x18, 0x46e8, cfb);
-       cyber2000fb_writeb(0x01, 0x102, cfb);
-       cyber2000fb_writeb(0x08, 0x46e8, cfb);
-       cyber2000fb_writeb(EXT_BIU_MISC, 0x3ce, cfb);
-       cyber2000fb_writeb(EXT_BIU_MISC_LIN_ENABLE, 0x3cf, cfb);
-
-       cfb->mclk_mult = 0xdb;
-       cfb->mclk_div  = 0x54;
-
-       err = cyberpro_common_probe(cfb);
-       if (err)
-               goto failed;
-
-       if (int_cfb_info == NULL)
-               int_cfb_info = cfb;
-
-       return 0;
-
-failed:
-       iounmap(cfb->region);
-failed_ioremap:
-       cyberpro_free_fb_info(cfb);
-failed_release:
-       release_mem_region(FB_START, FB_SIZE);
-
-       return err;
-}
-#endif /* CONFIG_ARCH_SHARK */
-
 /*
  * PCI specific support.
  */
@@ -1943,28 +1882,19 @@ static int __init cyber2000fb_init(void)
        cyber2000fb_setup(option);
 #endif
 
-#ifdef CONFIG_ARCH_SHARK
-       err = cyberpro_vl_probe();
-       if (!err)
-               ret = 0;
-#endif
-#ifdef CONFIG_PCI
        err = pci_register_driver(&cyberpro_driver);
        if (!err)
                ret = 0;
-#endif
 
        return ret ? err : 0;
 }
 module_init(cyber2000fb_init);
 
-#ifndef CONFIG_ARCH_SHARK
 static void __exit cyberpro_exit(void)
 {
        pci_unregister_driver(&cyberpro_driver);
 }
 module_exit(cyberpro_exit);
-#endif
 
 MODULE_AUTHOR("Russell King");
 MODULE_DESCRIPTION("CyberPro 2000, 2010 and 5000 framebuffer driver");
diff --git a/include/dt-bindings/mfd/dbx500-prcmu.h b/include/dt-bindings/mfd/dbx500-prcmu.h
new file mode 100644 (file)
index 0000000..552a2d1
--- /dev/null
@@ -0,0 +1,83 @@
+/*
+ * This header provides constants for the PRCMU bindings.
+ *
+ */
+
+#ifndef _DT_BINDINGS_MFD_PRCMU_H
+#define _DT_BINDINGS_MFD_PRCMU_H
+
+/*
+ * Clock identifiers.
+ */
+#define ARMCLK                 0
+#define PRCMU_ACLK             1
+#define PRCMU_SVAMMCSPCLK      2
+#define PRCMU_SDMMCHCLK        2  /* DBx540 only. */
+#define PRCMU_SIACLK           3
+#define PRCMU_SIAMMDSPCLK      3  /* DBx540 only. */
+#define PRCMU_SGACLK           4
+#define PRCMU_UARTCLK          5
+#define PRCMU_MSP02CLK                 6
+#define PRCMU_MSP1CLK          7
+#define PRCMU_I2CCLK           8
+#define PRCMU_SDMMCCLK                 9
+#define PRCMU_SLIMCLK          10
+#define PRCMU_CAMCLK           10 /* DBx540 only. */
+#define PRCMU_PER1CLK          11
+#define PRCMU_PER2CLK          12
+#define PRCMU_PER3CLK          13
+#define PRCMU_PER5CLK          14
+#define PRCMU_PER6CLK          15
+#define PRCMU_PER7CLK          16
+#define PRCMU_LCDCLK           17
+#define PRCMU_BMLCLK           18
+#define PRCMU_HSITXCLK                 19
+#define PRCMU_HSIRXCLK                 20
+#define PRCMU_HDMICLK          21
+#define PRCMU_APEATCLK                 22
+#define PRCMU_APETRACECLK      23
+#define PRCMU_MCDECLK                  24
+#define PRCMU_IPI2CCLK         25
+#define PRCMU_DSIALTCLK        26
+#define PRCMU_DMACLK           27
+#define PRCMU_B2R2CLK                  28
+#define PRCMU_TVCLK            29
+#define SPARE_UNIPROCLK        30
+#define PRCMU_SSPCLK           31
+#define PRCMU_RNGCLK           32
+#define PRCMU_UICCCLK                  33
+#define PRCMU_G1CLK             34 /* DBx540 only. */
+#define PRCMU_HVACLK            35 /* DBx540 only. */
+#define PRCMU_SPARE1CLK                36
+#define PRCMU_SPARE2CLK                37
+
+#define PRCMU_NUM_REG_CLOCKS   38
+
+#define PRCMU_RTCCLK           PRCMU_NUM_REG_CLOCKS
+#define PRCMU_SYSCLK           39
+#define PRCMU_CDCLK            40
+#define PRCMU_TIMCLK           41
+#define PRCMU_PLLSOC0                  42
+#define PRCMU_PLLSOC1                  43
+#define PRCMU_ARMSS            44
+#define PRCMU_PLLDDR           45
+
+/* DSI Clocks */
+#define PRCMU_PLLDSI           46
+#define PRCMU_DSI0CLK          47
+#define PRCMU_DSI1CLK                  48
+#define PRCMU_DSI0ESCCLK       49
+#define PRCMU_DSI1ESCCLK       50
+#define PRCMU_DSI2ESCCLK       51
+
+/* LCD DSI PLL - Ux540 only */
+#define PRCMU_PLLDSI_LCD        52
+#define PRCMU_DSI0CLK_LCD       53
+#define PRCMU_DSI1CLK_LCD       54
+#define PRCMU_DSI0ESCCLK_LCD    55
+#define PRCMU_DSI1ESCCLK_LCD    56
+#define PRCMU_DSI2ESCCLK_LCD    57
+
+#define PRCMU_NUM_CLKS         58
+
+#endif
diff --git a/include/dt-bindings/pinctrl/dra.h b/include/dt-bindings/pinctrl/dra.h
new file mode 100644 (file)
index 0000000..002a285
--- /dev/null
@@ -0,0 +1,50 @@
+/*
+ * This header provides constants for DRA pinctrl bindings.
+ *
+ * Copyright (C) 2013 Texas Instruments Incorporated - http://www.ti.com/
+ * Author: Rajendra Nayak <rnayak@ti.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#ifndef _DT_BINDINGS_PINCTRL_DRA_H
+#define _DT_BINDINGS_PINCTRL_DRA_H
+
+/* DRA7 mux mode options for each pin. See TRM for options */
+#define MUX_MODE0      0x0
+#define MUX_MODE1      0x1
+#define MUX_MODE2      0x2
+#define MUX_MODE3      0x3
+#define MUX_MODE4      0x4
+#define MUX_MODE5      0x5
+#define MUX_MODE6      0x6
+#define MUX_MODE7      0x7
+#define MUX_MODE8      0x8
+#define MUX_MODE9      0x9
+#define MUX_MODE10     0xa
+#define MUX_MODE11     0xb
+#define MUX_MODE12     0xc
+#define MUX_MODE13     0xd
+#define MUX_MODE14     0xe
+#define MUX_MODE15     0xf
+
+#define PULL_ENA               (1 << 16)
+#define PULL_UP                        (1 << 17)
+#define INPUT_EN               (1 << 18)
+#define SLEWCONTROL            (1 << 19)
+#define WAKEUP_EN              (1 << 24)
+#define WAKEUP_EVENT           (1 << 25)
+
+/* Active pin states */
+#define PIN_OUTPUT             0
+#define PIN_OUTPUT_PULLUP      (PIN_OUTPUT | PULL_ENA | PULL_UP)
+#define PIN_OUTPUT_PULLDOWN    (PIN_OUTPUT | PULL_ENA)
+#define PIN_INPUT              INPUT_EN
+#define PIN_INPUT_SLEW         (INPUT_EN | SLEWCONTROL)
+#define PIN_INPUT_PULLUP       (PULL_ENA | INPUT_EN | PULL_UP)
+#define PIN_INPUT_PULLDOWN     (PULL_ENA | INPUT_EN)
+
+#endif
+
index 90c30dc3efc773abe3a8bdf9c18620209738b1ba..5138a90e018c981ce5fa8291351a2bb84303fd2e 100644 (file)
@@ -9,8 +9,6 @@
 #ifndef __LINUX_CLK_MXS_H
 #define __LINUX_CLK_MXS_H
 
-int mx23_clocks_init(void);
-int mx28_clocks_init(void);
 int mxs_saif_clkmux_select(unsigned int clkmux);
 
 #endif
index ca0790fba2f5d60abbe975fa3547c363c525f443..060e11256fbcf8866afc23d900134d4040c7a59a 100644 (file)
@@ -12,6 +12,8 @@
 #include <linux/notifier.h>
 #include <linux/err.h>
 
+#include <dt-bindings/mfd/dbx500-prcmu.h> /* For clock identifiers */
+
 /* Offset for the firmware version within the TCPM */
 #define DB8500_PRCMU_FW_VERSION_OFFSET 0xA4
 #define DBX540_PRCMU_FW_VERSION_OFFSET 0xA8
@@ -94,74 +96,6 @@ enum prcmu_wakeup_index {
 #define PRCMU_CLKSRC_ARMCLKFIX         0x46
 #define PRCMU_CLKSRC_HDMICLK           0x47
 
-/*
- * Clock identifiers.
- */
-enum prcmu_clock {
-       PRCMU_SGACLK,
-       PRCMU_UARTCLK,
-       PRCMU_MSP02CLK,
-       PRCMU_MSP1CLK,
-       PRCMU_I2CCLK,
-       PRCMU_SDMMCCLK,
-       PRCMU_SPARE1CLK,
-       PRCMU_SLIMCLK,
-       PRCMU_PER1CLK,
-       PRCMU_PER2CLK,
-       PRCMU_PER3CLK,
-       PRCMU_PER5CLK,
-       PRCMU_PER6CLK,
-       PRCMU_PER7CLK,
-       PRCMU_LCDCLK,
-       PRCMU_BMLCLK,
-       PRCMU_HSITXCLK,
-       PRCMU_HSIRXCLK,
-       PRCMU_HDMICLK,
-       PRCMU_APEATCLK,
-       PRCMU_APETRACECLK,
-       PRCMU_MCDECLK,
-       PRCMU_IPI2CCLK,
-       PRCMU_DSIALTCLK,
-       PRCMU_DMACLK,
-       PRCMU_B2R2CLK,
-       PRCMU_TVCLK,
-       PRCMU_SSPCLK,
-       PRCMU_RNGCLK,
-       PRCMU_UICCCLK,
-       PRCMU_PWMCLK,
-       PRCMU_IRDACLK,
-       PRCMU_IRRCCLK,
-       PRCMU_SIACLK,
-       PRCMU_SVACLK,
-       PRCMU_ACLK,
-       PRCMU_HVACLK, /* Ux540 only */
-       PRCMU_G1CLK, /* Ux540 only */
-       PRCMU_SDMMCHCLK,
-       PRCMU_CAMCLK,
-       PRCMU_BML8580CLK,
-       PRCMU_NUM_REG_CLOCKS,
-       PRCMU_SYSCLK = PRCMU_NUM_REG_CLOCKS,
-       PRCMU_CDCLK,
-       PRCMU_TIMCLK,
-       PRCMU_PLLSOC0,
-       PRCMU_PLLSOC1,
-       PRCMU_ARMSS,
-       PRCMU_PLLDDR,
-       PRCMU_PLLDSI,
-       PRCMU_DSI0CLK,
-       PRCMU_DSI1CLK,
-       PRCMU_DSI0ESCCLK,
-       PRCMU_DSI1ESCCLK,
-       PRCMU_DSI2ESCCLK,
-       /* LCD DSI PLL - Ux540 only */
-       PRCMU_PLLDSI_LCD,
-       PRCMU_DSI0CLK_LCD,
-       PRCMU_DSI1CLK_LCD,
-       PRCMU_DSI0ESCCLK_LCD,
-       PRCMU_DSI1ESCCLK_LCD,
-       PRCMU_DSI2ESCCLK_LCD,
-};
-
 /**
  * enum prcmu_wdog_id - PRCMU watchdog IDs
  * @PRCMU_WDOG_ALL: use all timers
diff --git a/include/linux/platform_data/clk-nomadik.h b/include/linux/platform_data/clk-nomadik.h
deleted file mode 100644 (file)
index 5713c87..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-/* Minimal platform data header */
-void nomadik_clk_init(void);
index 9d98f3aaa16c7637b42a8de33530aab4df9137ac..97baf831e07114c04b5e3d4163738da98b0ba5be 100644 (file)
@@ -10,6 +10,9 @@
 #ifndef __CLK_UX500_H
 #define __CLK_UX500_H
 
+void u8500_of_clk_init(u32 clkrst1_base, u32 clkrst2_base, u32 clkrst3_base,
+                      u32 clkrst5_base, u32 clkrst6_base);
+
 void u8500_clk_init(u32 clkrst1_base, u32 clkrst2_base, u32 clkrst3_base,
                    u32 clkrst5_base, u32 clkrst6_base);
 void u9540_clk_init(u32 clkrst1_base, u32 clkrst2_base, u32 clkrst3_base,
diff --git a/include/linux/platform_data/gpio-davinci.h b/include/linux/platform_data/gpio-davinci.h
new file mode 100644 (file)
index 0000000..6efd202
--- /dev/null
@@ -0,0 +1,60 @@
+/*
+ * DaVinci GPIO Platform Related Defines
+ *
+ * Copyright (C) 2013 Texas Instruments Incorporated - http://www.ti.com/
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation version 2.
+ *
+ * This program is distributed "as is" WITHOUT ANY WARRANTY of any
+ * kind, whether express or implied; without even the implied warranty
+ * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */
+
+#ifndef __DAVINCI_GPIO_PLATFORM_H
+#define __DAVINCI_GPIO_PLATFORM_H
+
+#include <linux/io.h>
+#include <linux/spinlock.h>
+
+#include <asm-generic/gpio.h>
+
+enum davinci_gpio_type {
+       GPIO_TYPE_TNETV107X = 0,
+};
+
+struct davinci_gpio_platform_data {
+       u32     ngpio;
+       u32     gpio_unbanked;
+       u32     intc_irq_num;
+};
+
+
+struct davinci_gpio_controller {
+       struct gpio_chip        chip;
+       int                     irq_base;
+       /* Serialize access to GPIO registers */
+       spinlock_t              lock;
+       void __iomem            *regs;
+       void __iomem            *set_data;
+       void __iomem            *clr_data;
+       void __iomem            *in_data;
+       int                     gpio_unbanked;
+       unsigned                gpio_irq;
+};
+
+/*
+ * basic gpio routines
+ */
+#define        GPIO(X)         (X)     /* 0 <= X <= (DAVINCI_N_GPIO - 1) */
+
+/* Convert GPIO signal to GPIO pin number */
+#define GPIO_TO_PIN(bank, gpio)        (16 * (bank) + (gpio))
+
+static inline u32 __gpio_mask(unsigned gpio)
+{
+       return 1 << (gpio % 32);
+}
+#endif
diff --git a/include/linux/platform_data/pinctrl-single.h b/include/linux/platform_data/pinctrl-single.h
new file mode 100644 (file)
index 0000000..72eacda
--- /dev/null
@@ -0,0 +1,12 @@
+/**
+ * irq:                optional wake-up interrupt
+ * rearm:      optional soc specific rearm function
+ *
+ * Note that the irq and rearm setup should come from device
+ * tree except for omap where there are still some dependencies
+ * to the legacy PRM code.
+ */
+struct pcs_pdata {
+       int irq;
+       void (*rearm)(void);
+};